Compare commits

...

18 Commits

Author SHA1 Message Date
Benjamin Canac
3558eb1a4f chore(release): 0.1.35 2023-02-01 14:38:15 +01:00
Benjamin Canac
1c4d46e056 fix(Dropdown): lint 2023-02-01 14:38:07 +01:00
Benjamin Canac
1b0ed9e732 docs: simplify popover panel template 2023-02-01 14:37:55 +01:00
Benjamin Canac
b72037a777 chore: handle disabled prop for Dropdown and Popover 2023-02-01 14:34:28 +01:00
Benjamin Canac
a7644860b8 fix(Dropdown): prevent panel display when no items 2023-01-31 12:33:27 +01:00
Benjamin Canac
c90cd9c4f3 fix(AvatarGroup): preset size prop 2023-01-28 01:49:24 +01:00
Benjamin Canac
7805168685 chore(release): 0.1.34 2023-01-27 14:10:46 +01:00
Benjamin Canac
27717a55b3 fix(CommandPalette): typecheck 2023-01-27 14:10:35 +01:00
Benjamin Canac
d651a22dce chore(release): 0.1.33 2023-01-27 13:02:18 +01:00
Benjamin Canac
c3ecbf4b20 chore(CommandPalette): start preset 2023-01-27 13:02:01 +01:00
Benjamin Canac
d8b10f3eef chore(release): 0.1.32 2023-01-23 14:24:36 +01:00
Benjamin Canac
1071b80b39 chore(deps): bump 2023-01-23 14:24:20 +01:00
Benjamin Canac
c5e9a1ef46 chore(release): 0.1.31 2023-01-17 15:35:38 +01:00
Benjamin Canac
afe69a570d chore(deps): bump 2023-01-17 15:35:16 +01:00
Benjamin Canac
e6ed834cea chore(release): 0.1.30 2023-01-17 15:00:54 +01:00
Benjamin Canac
30c5412a6b chore(CommandPalette): input close icon position 2023-01-17 15:00:21 +01:00
Benjamin Canac
01f56d9553 chore(Button): handle compact 2023-01-17 15:00:21 +01:00
Benjamin Canac
91f273c117 chore(release): 0.1.29 2023-01-17 15:00:19 +01:00
10 changed files with 590 additions and 393 deletions

View File

@@ -2,6 +2,32 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.1.35](https://github.com/nuxtlabs/ui/compare/v0.1.34...v0.1.35) (2023-02-01)
### Bug Fixes
* **AvatarGroup:** preset size prop ([c90cd9c](https://github.com/nuxtlabs/ui/commit/c90cd9c4f37bc3ce5f6e13f3279dc2c574c76524))
* **Dropdown:** lint ([1c4d46e](https://github.com/nuxtlabs/ui/commit/1c4d46e056adf84d69462a12af8ac29f93cbf87a))
* **Dropdown:** prevent panel display when no items ([a764486](https://github.com/nuxtlabs/ui/commit/a7644860b8c22a0163e01ca2c0eab2c48b09745a))
### [0.1.34](https://github.com/nuxtlabs/ui/compare/v0.1.33...v0.1.34) (2023-01-27)
### Bug Fixes
* **CommandPalette:** typecheck ([27717a5](https://github.com/nuxtlabs/ui/commit/27717a55b3e5120f32fba2bcea30f5a91262f1c5))
### [0.1.33](https://github.com/nuxtlabs/ui/compare/v0.1.32...v0.1.33) (2023-01-27)
### [0.1.32](https://github.com/nuxtlabs/ui/compare/v0.1.31...v0.1.32) (2023-01-23)
### [0.1.31](https://github.com/nuxtlabs/ui/compare/v0.1.30...v0.1.31) (2023-01-17)
### [0.1.30](https://github.com/nuxtlabs/ui/compare/v0.1.29...v0.1.30) (2023-01-17)
### [0.1.29](https://github.com/nuxtlabs/ui/compare/v0.1.28...v0.1.29) (2023-01-17)
### [0.1.28](https://github.com/nuxtlabs/ui/compare/v0.1.27...v0.1.28) (2023-01-13) ### [0.1.28](https://github.com/nuxtlabs/ui/compare/v0.1.27...v0.1.28) (2023-01-13)
### [0.1.27](https://github.com/nuxtlabs/ui/compare/v0.1.26...v0.1.27) (2023-01-12) ### [0.1.27](https://github.com/nuxtlabs/ui/compare/v0.1.26...v0.1.27) (2023-01-12)

View File

@@ -96,7 +96,7 @@
Popover: Popover:
</div> </div>
<UPopover mode="hover" wrapper-class="inline-block relative"> <UPopover wrapper-class="inline-block relative">
<template #default="{ open }"> <template #default="{ open }">
<UButton variant="secondary" :icon="open ? 'heroicons-solid:chevron-up' : 'heroicons-solid:chevron-down'" trailing icon-class="transition"> <UButton variant="secondary" :icon="open ? 'heroicons-solid:chevron-up' : 'heroicons-solid:chevron-down'" trailing icon-class="transition">
Open popover! Open popover!
@@ -104,46 +104,8 @@
</template> </template>
<template #panel> <template #panel>
<div <div class="p-4 u-bg-white border u-border-gray-200 rounded-md">
class="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5" Panel
>
<div class="relative grid gap-8 bg-white p-7">
<a
v-for="item in solutions"
:key="item.name"
:href="item.href"
class="flex items-center p-2 -m-3 transition duration-150 ease-in-out rounded-lg hover:bg-gray-50 focus:outline-none focus-visible:ring focus-visible:ring-orange-500 focus-visible:ring-opacity-50"
>
<div
class="flex items-center justify-center flex-shrink-0 w-10 h-10 text-white sm:h-12 sm:w-12"
>
<div v-html="item.icon" />
</div>
<div class="ml-4">
<p class="text-sm font-medium u-text-gray-900">
{{ item.name }}
</p>
<p class="text-sm u-text-gray-500">
{{ item.description }}
</p>
</div>
</a>
</div>
<div class="p-4 bg-gray-50">
<a
href="##"
class="flow-root px-2 py-2 transition duration-150 ease-in-out rounded-md hover:bg-gray-100 focus:outline-none focus-visible:ring focus-visible:ring-orange-500 focus-visible:ring-opacity-50"
>
<span class="flex items-center">
<span class="text-sm font-medium u-text-gray-900">
Documentation
</span>
</span>
<span class="block text-sm u-text-gray-500">
Start integrating products and tools
</span>
</a>
</div>
</div> </div>
</template> </template>
</UPopover> </UPopover>
@@ -378,95 +340,6 @@ const customDropdownItems = [
}] }]
] ]
const solutions = [
{
name: 'Insights',
description: 'Measure actions your users take',
href: '##',
icon: `
<svg
width="48"
height="48"
viewBox="0 0 48 48"
fill="none"
aria-hidden='true'
xmlns="http://www.w3.org/2000/svg"
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<path
d="M24 11L35.2583 17.5V30.5L24 37L12.7417 30.5V17.5L24 11Z"
stroke="#FB923C"
stroke-width="2"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M16.7417 19.8094V28.1906L24 32.3812L31.2584 28.1906V19.8094L24 15.6188L16.7417 19.8094Z"
stroke="#FDBA74"
stroke-width="2"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M20.7417 22.1196V25.882L24 27.7632L27.2584 25.882V22.1196L24 20.2384L20.7417 22.1196Z"
stroke="#FDBA74"
stroke-width="2"
/>
</svg>
`
},
{
name: 'Automations',
description: 'Create your own targeted content',
href: '##',
icon: `
<svg
width="48"
height="48"
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<path
d="M28.0413 20L23.9998 13L19.9585 20M32.0828 27.0001L36.1242 34H28.0415M19.9585 34H11.8755L15.9171 27"
stroke="#FB923C"
stroke-width="2"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M18.804 30H29.1963L24.0001 21L18.804 30Z"
stroke="#FDBA74"
stroke-width="2"
/>
</svg>
`
},
{
name: 'Reports',
description: 'Keep track of your growth',
href: '##',
icon: `
<svg
width="48"
height="48"
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<rect x="13" y="32" width="2" height="4" fill="#FDBA74" />
<rect x="17" y="28" width="2" height="8" fill="#FDBA74" />
<rect x="21" y="24" width="2" height="12" fill="#FDBA74" />
<rect x="25" y="20" width="2" height="16" fill="#FDBA74" />
<rect x="29" y="16" width="2" height="20" fill="#FB923C" />
<rect x="33" y="12" width="2" height="24" fill="#FB923C" />
</svg>
`
}
]
const onNotificationClick = () => { const onNotificationClick = () => {
$toast.error({ title: 'Error', description: 'This is an error message' }) $toast.error({ title: 'Error', description: 'This is an error message' })
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nuxthq/ui", "name": "@nuxthq/ui",
"version": "0.1.28", "version": "0.1.35",
"repository": "https://github.com/nuxtlabs/ui", "repository": "https://github.com/nuxtlabs/ui",
"license": "MIT", "license": "MIT",
"exports": { "exports": {
@@ -34,9 +34,9 @@
"@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.3", "@tailwindcss/forms": "^0.5.3",
"@tailwindcss/line-clamp": "^0.4.2", "@tailwindcss/line-clamp": "^0.4.2",
"@tailwindcss/typography": "^0.5.8", "@tailwindcss/typography": "^0.5.9",
"@vueuse/core": "^9.10.0", "@vueuse/core": "^9.11.1",
"@vueuse/integrations": "^9.10.0", "@vueuse/integrations": "^9.11.1",
"defu": "^6.1.1", "defu": "^6.1.1",
"fuse.js": "^6.6.2", "fuse.js": "^6.6.2",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
@@ -46,11 +46,11 @@
"@nuxt/module-builder": "^0.2.1", "@nuxt/module-builder": "^0.2.1",
"@nuxtjs/eslint-config-typescript": "^12.0.0", "@nuxtjs/eslint-config-typescript": "^12.0.0",
"@types/lodash-es": "^4.17.6", "@types/lodash-es": "^4.17.6",
"eslint": "^8.31.0", "eslint": "^8.32.0",
"nuxt": "^3.0.0", "nuxt": "^3.0.0",
"standard-version": "^9.5.0", "standard-version": "^9.5.0",
"unbuild": "^1.0.2", "unbuild": "^1.1.1",
"vue-tsc": "^1.0.20" "vue-tsc": "^1.0.24"
}, },
"build": { "build": {
"externals": [ "externals": [

View File

@@ -31,7 +31,7 @@ const props = defineProps({
type: String, type: String,
default: 'md', default: 'md',
validator (value: string) { validator (value: string) {
return ['xxxs', 'xxs', 'xs', 'sm', 'md', 'lg', 'xl'].includes(value) return Object.keys($ui.avatar.size).includes(value)
} }
}, },
max: { max: {

View File

@@ -7,7 +7,12 @@
v-bind="buttonProps" v-bind="buttonProps"
> >
<Icon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="leadingIconClass" aria-hidden="true" /> <Icon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="leadingIconClass" aria-hidden="true" />
<slot><span :class="truncate ? 'text-left break-all line-clamp-1' : ''">{{ label }}</span></slot> <slot>
<span :class="[truncate ? 'text-left break-all line-clamp-1' : '', compact ? 'hidden sm:block' : '']">
<span :class="[labelCompact && 'hidden sm:block']">{{ label }}</span>
<span v-if="labelCompact" class="sm:hidden">{{ labelCompact }}</span>
</span>
</slot>
<Icon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="trailingIconClass" aria-hidden="true" /> <Icon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="trailingIconClass" aria-hidden="true" />
</component> </component>
</template> </template>
@@ -34,6 +39,10 @@ const props = defineProps({
type: String, type: String,
default: null default: null
}, },
labelCompact: {
type: String,
default: null
},
loading: { loading: {
type: Boolean, type: Boolean,
default: false default: false
@@ -127,6 +136,10 @@ const props = defineProps({
truncate: { truncate: {
type: Boolean, type: Boolean,
default: false default: false
},
compact: {
type: Boolean,
default: false
} }
}) })
@@ -164,7 +177,7 @@ const buttonClass = computed(() => {
return classNames( return classNames(
props.baseClass, props.baseClass,
$ui.button.size[props.size], $ui.button.size[props.size],
$ui.button[isSquare.value ? 'square' : 'spacing'][props.size], $ui.button[isSquare.value ? 'square' : (props.compact ? 'compact' : 'spacing')][props.size],
$ui.button.variant[props.variant], $ui.button.variant[props.variant],
props.block ? 'w-full flex justify-center items-center' : 'inline-flex items-center', props.block ? 'w-full flex justify-center items-center' : 'inline-flex items-center',
props.rounded ? 'rounded-full' : props.roundedClass, props.rounded ? 'rounded-full' : props.roundedClass,
@@ -192,7 +205,7 @@ const leadingIconClass = computed(() => {
return classNames( return classNames(
props.iconBaseClass, props.iconBaseClass,
$ui.button.icon.size[props.size], $ui.button.icon.size[props.size],
(!!slots.default || !!props.label?.length) && $ui.button.icon.leading.spacing[props.size], (!!slots.default || !!props.label?.length) && $ui.button.icon.leading[props.compact ? 'compactSpacing' : 'spacing'][props.size],
props.leadingIconClass, props.leadingIconClass,
props.loading && 'animate-spin' props.loading && 'animate-spin'
) )
@@ -202,7 +215,7 @@ const trailingIconClass = computed(() => {
return classNames( return classNames(
props.iconBaseClass, props.iconBaseClass,
$ui.button.icon.size[props.size], $ui.button.icon.size[props.size],
(!!slots.default || !!props.label?.length) && $ui.button.icon.trailing.spacing[props.size], (!!slots.default || !!props.label?.length) && $ui.button.icon.trailing[props.compact ? 'compactSpacing' : 'spacing'][props.size],
props.trailingIconClass, props.trailingIconClass,
props.loading && !isLeading.value && 'animate-spin' props.loading && !isLeading.value && 'animate-spin'
) )

View File

@@ -3,24 +3,27 @@
<MenuButton <MenuButton
ref="trigger" ref="trigger"
as="div" as="div"
:disabled="disabled"
class="inline-flex w-full" class="inline-flex w-full"
role="button" role="button"
@mouseover="onMouseOver" @mouseover="onMouseOver"
> >
<slot :open="open"> <slot :open="open">
<button>Open</button> <button :disabled="disabled">
Open
</button>
</slot> </slot>
</MenuButton> </MenuButton>
<div v-if="open" ref="container" :class="[containerClass, widthClass]" @mouseover="onMouseOver"> <div v-if="open && items.length" ref="container" :class="[containerClass, widthClass]" @mouseover="onMouseOver">
<transition appear v-bind="transitionClass"> <transition appear v-bind="transitionClass">
<MenuItems :class="baseClass" static> <MenuItems :class="baseClass" static>
<div v-for="(subItems, index) of items" :key="index" :class="groupClass"> <div v-for="(subItems, index) of items" :key="index" :class="groupClass">
<MenuItem v-for="(item, subIndex) of subItems" :key="subIndex" v-slot="{ active, disabled }" :disabled="item.disabled"> <MenuItem v-for="(item, subIndex) of subItems" :key="subIndex" v-slot="{ active, disabled: itemDisabled }" :disabled="item.disabled">
<Component <Component
v-bind="omit(item, ['click'])" v-bind="omit(item, ['click'])"
:is="(item.to && NuxtLink) || (item.click && 'button') || 'div'" :is="(item.to && NuxtLink) || (item.click && 'button') || 'div'"
:class="resolveItemClass({ active, disabled })" :class="resolveItemClass({ active, disabled: itemDisabled })"
@click="item.click" @click="item.click"
> >
<slot :name="item.slot" :item="item"> <slot :name="item.slot" :item="item">
@@ -85,6 +88,10 @@ const props = defineProps({
return ['click', 'hover'].includes(value) return ['click', 'hover'].includes(value)
} }
}, },
disabled: {
type: Boolean,
default: false
},
wrapperClass: { wrapperClass: {
type: String, type: String,
default: () => $ui.dropdown.wrapper default: () => $ui.dropdown.wrapper

View File

@@ -7,23 +7,24 @@
:nullable="nullable" :nullable="nullable"
@update:model-value="onSelect" @update:model-value="onSelect"
> >
<div class="flex flex-col flex-1 min-h-0 divide-y divide-gray-100 dark:divide-gray-800"> <div :class="$ui.commandPalette.wrapper">
<div v-show="searchable" class="relative flex items-center"> <div v-show="searchable" class="relative flex items-center">
<Icon :name="inputIcon" class="pointer-events-none absolute top-3.5 left-5 h-5 w-5 u-text-gray-400" aria-hidden="true" /> <Icon v-if="inputIcon" :name="inputIcon" :class="$ui.commandPalette.input.icon.base" aria-hidden="true" />
<ComboboxInput <ComboboxInput
ref="comboboxInput" ref="comboboxInput"
:value="query" :value="query"
class="w-full h-12 pr-4 placeholder-gray-400 dark:placeholder-gray-500 bg-transparent border-0 pl-[3.25rem] u-text-gray-900 focus:ring-0 sm:text-sm" :class="$ui.commandPalette.input.base"
:placeholder="inputPlaceholder" :placeholder="inputPlaceholder"
autocomplete="off" autocomplete="off"
@change="query = $event.target.value" @change="query = $event.target.value"
/> />
<Button <Button
v-if="closeIcon" v-if="inputCloseIcon"
:icon="closeIcon" :icon="inputCloseIcon"
variant="transparent" :class="$ui.commandPalette.input.close.base"
class="absolute right-3" :size="$ui.commandPalette.input.close.size"
:variant="$ui.commandPalette.input.close.variant"
aria-label="close" aria-label="close"
@click="onClear" @click="onClear"
/> />
@@ -38,8 +39,8 @@
</ComboboxOptions> </ComboboxOptions>
<div v-else-if="placeholder" class="flex flex-col items-center justify-center flex-1 px-6 py-14 sm:px-14"> <div v-else-if="placeholder" class="flex flex-col items-center justify-center flex-1 px-6 py-14 sm:px-14">
<Icon :name="emptyIcon" class="w-6 h-6 mx-auto u-text-gray-400" aria-hidden="true" /> <Icon v-if="emptyIcon" :name="emptyIcon" class="w-6 h-6 mx-auto u-text-gray-400 mb-4" aria-hidden="true" />
<p class="mt-4 text-sm text-center u-text-gray-900"> <p class="text-sm text-center u-text-gray-900">
{{ query ? "We couldn't find any items with that term. Please try again." : "We couldn't find any items." }} {{ query ? "We couldn't find any items with that term. Please try again." : "We couldn't find any items." }}
</p> </p>
</div> </div>
@@ -59,6 +60,7 @@ import type { Group, Command } from '../../types/command-palette'
import Icon from '../elements/Icon.vue' import Icon from '../elements/Icon.vue'
import Button from '../elements/Button.vue' import Button from '../elements/Button.vue'
import CommandPaletteGroup from './CommandPaletteGroup.vue' import CommandPaletteGroup from './CommandPaletteGroup.vue'
import $ui from '#build/ui'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
@@ -85,13 +87,13 @@ const props = defineProps({
type: Array as PropType<Group[]>, type: Array as PropType<Group[]>,
default: () => [] default: () => []
}, },
closeIcon: {
type: String,
default: null
},
inputIcon: { inputIcon: {
type: String, type: String,
default: 'heroicons-outline:search' default: () => $ui.commandPalette.input.icon.name
},
inputCloseIcon: {
type: String,
default: () => $ui.commandPalette.input.close.icon.name
}, },
inputPlaceholder: { inputPlaceholder: {
type: String, type: String,
@@ -99,7 +101,7 @@ const props = defineProps({
}, },
emptyIcon: { emptyIcon: {
type: String, type: String,
default: 'heroicons-outline:search' default: () => $ui.commandPalette.empty.icon.name
}, },
groupAttribute: { groupAttribute: {
type: String, type: String,

View File

@@ -1,8 +1,17 @@
<template> <template>
<Popover v-slot="{ open, close }" :class="wrapperClass" @mouseleave="onMouseLeave"> <Popover v-slot="{ open, close }" :class="wrapperClass" @mouseleave="onMouseLeave">
<PopoverButton ref="trigger" as="div" class="inline-flex w-full" role="button" @mouseover="onMouseOver"> <PopoverButton
ref="trigger"
as="div"
:disabled="disabled"
class="inline-flex w-full"
role="button"
@mouseover="onMouseOver"
>
<slot :open="open" :close="close"> <slot :open="open" :close="close">
<button>Open</button> <button :disabled="disabled">
Open
</button>
</slot> </slot>
</PopoverButton> </PopoverButton>
@@ -33,6 +42,10 @@ const props = defineProps({
return ['click', 'hover'].includes(value) return ['click', 'hover'].includes(value)
} }
}, },
disabled: {
type: Boolean,
default: false
},
wrapperClass: { wrapperClass: {
type: String, type: String,
default: () => $ui.popover.wrapper default: () => $ui.popover.wrapper

View File

@@ -26,6 +26,14 @@ export default function defaultPreset (variantColors: string[]) {
lg: 'p-2', lg: 'p-2',
xl: 'p-3' xl: 'p-3'
}, },
compact: {
xxs: 'p-1 sm:px-2',
xs: 'p-1.5 sm:px-2.5',
sm: 'p-2 sm:px-3',
md: 'p-2 sm:px-4',
lg: 'p-2 sm:px-4',
xl: 'p-3 sm:px-6'
},
variant: { variant: {
...variantColors.reduce((acc: any, color: string) => { ...variantColors.reduce((acc: any, color: string) => {
acc[color] = `shadow-sm border border-transparent text-white bg-${color}-600 hover:bg-${color}-700 disabled:bg-${color}-600 focus:ring-2 focus:ring-offset-2 focus:ring-${color}-500` acc[color] = `shadow-sm border border-transparent text-white bg-${color}-600 hover:bg-${color}-700 disabled:bg-${color}-600 focus:ring-2 focus:ring-offset-2 focus:ring-${color}-500`
@@ -57,6 +65,14 @@ export default function defaultPreset (variantColors: string[]) {
md: '-ml-1 mr-2', md: '-ml-1 mr-2',
lg: '-ml-1 mr-3', lg: '-ml-1 mr-3',
xl: '-ml-1 mr-3' xl: '-ml-1 mr-3'
},
compactSpacing: {
xxs: 'sm:-ml-0.5 sm:mr-1',
xs: 'sm:-ml-0.5 sm:mr-1.5',
sm: 'sm:-ml-0.5 sm:mr-2',
md: 'sm:-ml-1 sm:mr-2',
lg: 'sm:-ml-1 sm:mr-3',
xl: 'sm:-ml-1 sm:mr-3'
} }
}, },
trailing: { trailing: {
@@ -67,6 +83,14 @@ export default function defaultPreset (variantColors: string[]) {
md: 'ml-2 -mr-1', md: 'ml-2 -mr-1',
lg: 'ml-3 -mr-1', lg: 'ml-3 -mr-1',
xl: 'ml-3 -mr-1' xl: 'ml-3 -mr-1'
},
compactSpacing: {
xxs: 'sm:ml-1 sm:-mr-0.5',
xs: 'sm:ml-1.5 sm:-mr-0.5',
sm: 'sm:ml-2 sm:-mr-0.5',
md: 'sm:ml-2 sm:-mr-1',
lg: 'sm:ml-3 sm:-mr-1',
xl: 'sm:ml-3 sm:-mr-1'
} }
} }
} }
@@ -542,6 +566,30 @@ export default function defaultPreset (variantColors: string[]) {
} }
} }
const commandPalette = {
wrapper: 'flex flex-col flex-1 min-h-0 divide-y divide-gray-100 dark:divide-gray-800',
input: {
base: 'w-full h-12 pr-4 placeholder-gray-400 dark:placeholder-gray-500 bg-transparent border-0 pl-[3.25rem] u-text-gray-900 focus:ring-0 sm:text-sm',
icon: {
base: 'pointer-events-none absolute top-3.5 left-5 h-5 w-5 u-text-gray-400',
name: 'heroicons-outline:search'
},
close: {
base: 'absolute right-2',
variant: 'transparent',
size: 'md',
icon: {
name: ''
}
}
},
empty: {
icon: {
name: 'heroicons-outline:search'
}
}
}
return { return {
card, card,
modal, modal,
@@ -567,7 +615,8 @@ export default function defaultPreset (variantColors: string[]) {
notification, notification,
tooltip, tooltip,
popover, popover,
contextMenu contextMenu,
commandPalette
} }
} }

672
yarn.lock

File diff suppressed because it is too large Load Diff