@nuxt/ui 3.0.0-alpha.8 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/accordion.ts +2 -2
- package/.nuxt/ui/alert.ts +122 -95
- package/.nuxt/ui/avatar-group.ts +14 -2
- package/.nuxt/ui/avatar.ts +16 -4
- package/.nuxt/ui/badge.ts +139 -93
- package/.nuxt/ui/breadcrumb.ts +5 -5
- package/.nuxt/ui/button-group.ts +13 -0
- package/.nuxt/ui/button.ts +167 -136
- package/.nuxt/ui/calendar.ts +103 -0
- package/.nuxt/ui/card.ts +27 -1
- package/.nuxt/ui/carousel.ts +9 -7
- package/.nuxt/ui/checkbox.ts +45 -27
- package/.nuxt/ui/chip.ts +44 -15
- package/.nuxt/ui/color-picker.ts +47 -0
- package/.nuxt/ui/command-palette.ts +28 -18
- package/.nuxt/ui/container.ts +1 -1
- package/.nuxt/ui/context-menu.ts +64 -46
- package/.nuxt/ui/drawer.ts +83 -15
- package/.nuxt/ui/dropdown-menu.ts +65 -47
- package/.nuxt/ui/form-field.ts +15 -7
- package/.nuxt/ui/index.ts +7 -1
- package/.nuxt/ui/input-menu.ts +150 -116
- package/.nuxt/ui/input-number.ts +235 -0
- package/.nuxt/ui/input.ts +111 -76
- package/.nuxt/ui/kbd.ts +18 -6
- package/.nuxt/ui/link.ts +3 -3
- package/.nuxt/ui/modal.ts +8 -7
- package/.nuxt/ui/navigation-menu.ts +244 -131
- package/.nuxt/ui/pin-input.ts +171 -0
- package/.nuxt/ui/popover.ts +2 -2
- package/.nuxt/ui/progress.ts +111 -72
- package/.nuxt/ui/radio-group.ts +45 -22
- package/.nuxt/ui/select-menu.ts +127 -96
- package/.nuxt/ui/select.ts +120 -84
- package/.nuxt/ui/separator.ts +60 -31
- package/.nuxt/ui/skeleton.ts +1 -1
- package/.nuxt/ui/slideover.ts +17 -9
- package/.nuxt/ui/slider.ts +61 -38
- package/.nuxt/ui/stepper.ts +202 -0
- package/.nuxt/ui/switch.ts +40 -22
- package/.nuxt/ui/table.ts +49 -31
- package/.nuxt/ui/tabs.ts +101 -73
- package/.nuxt/ui/textarea.ts +111 -76
- package/.nuxt/ui/toast.ts +53 -33
- package/.nuxt/ui/toaster.ts +31 -15
- package/.nuxt/ui/tooltip.ts +2 -2
- package/.nuxt/ui/tree.ts +154 -0
- package/.nuxt/ui.css +92 -0
- package/README.md +69 -18
- package/cli/commands/{init.mjs → make/component.mjs} +16 -4
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +2 -2
- package/cli/package.json +2 -2
- package/cli/templates.mjs +62 -12
- package/cli/utils.mjs +14 -0
- package/dist/module.cjs +9 -170
- package/dist/module.d.cts +5 -15
- package/dist/module.d.mts +5 -15
- package/dist/module.d.ts +5 -15
- package/dist/module.json +2 -2
- package/dist/module.mjs +12 -167
- package/dist/runtime/components/Accordion.vue +8 -39
- package/dist/runtime/components/Alert.vue +25 -21
- package/dist/runtime/components/App.vue +15 -15
- package/dist/runtime/components/Avatar.vue +33 -21
- package/dist/runtime/components/AvatarGroup.vue +5 -7
- package/dist/runtime/components/Badge.vue +10 -8
- package/dist/runtime/components/Breadcrumb.vue +13 -34
- package/dist/runtime/components/Button.vue +5 -8
- package/dist/runtime/components/ButtonGroup.vue +5 -7
- package/dist/runtime/components/Calendar.vue +194 -0
- package/dist/runtime/components/Card.vue +10 -9
- package/dist/runtime/components/Carousel.vue +26 -17
- package/dist/runtime/components/Checkbox.vue +32 -38
- package/dist/runtime/components/Chip.vue +6 -8
- package/dist/runtime/components/Collapsible.vue +10 -11
- package/dist/runtime/components/ColorPicker.vue +297 -0
- package/dist/runtime/components/CommandPalette.vue +114 -98
- package/dist/runtime/components/Container.vue +4 -7
- package/dist/runtime/components/ContextMenu.vue +16 -69
- package/dist/runtime/components/ContextMenuContent.vue +14 -10
- package/dist/runtime/components/Drawer.vue +23 -12
- package/dist/runtime/components/DropdownMenu.vue +18 -59
- package/dist/runtime/components/DropdownMenuContent.vue +14 -10
- package/dist/runtime/components/Form.vue +78 -49
- package/dist/runtime/components/FormField.vue +28 -15
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Input.vue +15 -7
- package/dist/runtime/components/InputMenu.vue +133 -66
- package/dist/runtime/components/InputNumber.vue +197 -0
- package/dist/runtime/components/Kbd.vue +5 -6
- package/dist/runtime/components/Link.vue +24 -13
- package/dist/runtime/components/LinkBase.vue +1 -1
- package/dist/runtime/components/Modal.vue +56 -34
- package/dist/runtime/components/NavigationMenu.vue +129 -112
- package/dist/runtime/components/OverlayProvider.vue +28 -0
- package/dist/runtime/components/Pagination.vue +18 -14
- package/dist/runtime/components/PinInput.vue +95 -0
- package/dist/runtime/components/Popover.vue +28 -14
- package/dist/runtime/components/Progress.vue +28 -12
- package/dist/runtime/components/RadioGroup.vue +9 -12
- package/dist/runtime/components/Select.vue +61 -35
- package/dist/runtime/components/SelectMenu.vue +201 -130
- package/dist/runtime/components/Separator.vue +6 -5
- package/dist/runtime/components/Skeleton.vue +4 -7
- package/dist/runtime/components/Slideover.vue +56 -33
- package/dist/runtime/components/Slider.vue +8 -7
- package/dist/runtime/components/Stepper.vue +170 -0
- package/dist/runtime/components/Switch.vue +19 -23
- package/dist/runtime/components/Table.vue +157 -32
- package/dist/runtime/components/Tabs.vue +12 -31
- package/dist/runtime/components/Textarea.vue +18 -9
- package/dist/runtime/components/Toast.vue +39 -25
- package/dist/runtime/components/Toaster.vue +31 -24
- package/dist/runtime/components/Tooltip.vue +9 -12
- package/dist/runtime/components/Tree.vue +196 -0
- package/dist/runtime/composables/defineLocale.d.ts +9 -0
- package/dist/runtime/composables/defineLocale.js +4 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +2 -2
- package/dist/runtime/composables/useFormField.d.ts +11 -4
- package/dist/runtime/composables/useFormField.js +19 -9
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/composables/useOverlay.d.ts +30 -0
- package/dist/runtime/composables/useOverlay.js +70 -0
- package/dist/runtime/composables/useToast.d.ts +4 -3
- package/dist/runtime/composables/useToast.js +20 -6
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/keyframes.css +1 -1
- package/dist/runtime/locale/ar.d.ts +2 -0
- package/dist/runtime/locale/ar.js +55 -0
- package/dist/runtime/locale/az.d.ts +2 -0
- package/dist/runtime/locale/az.js +54 -0
- package/dist/runtime/locale/bn.d.ts +2 -0
- package/dist/runtime/locale/bn.js +54 -0
- package/dist/runtime/locale/cs.d.ts +2 -0
- package/dist/runtime/locale/cs.js +54 -0
- package/dist/runtime/locale/da.d.ts +2 -0
- package/dist/runtime/locale/da.js +54 -0
- package/dist/runtime/locale/de.d.ts +2 -0
- package/dist/runtime/locale/de.js +54 -0
- package/dist/runtime/locale/el.d.ts +2 -0
- package/dist/runtime/locale/el.js +54 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +54 -0
- package/dist/runtime/locale/es.d.ts +2 -0
- package/dist/runtime/locale/es.js +54 -0
- package/dist/runtime/locale/et.d.ts +2 -0
- package/dist/runtime/locale/et.js +54 -0
- package/dist/runtime/locale/fa_ir.d.ts +2 -0
- package/dist/runtime/locale/fa_ir.js +55 -0
- package/dist/runtime/locale/fi.d.ts +2 -0
- package/dist/runtime/locale/fi.js +54 -0
- package/dist/runtime/locale/fr.d.ts +2 -0
- package/dist/runtime/locale/fr.js +54 -0
- package/dist/runtime/locale/he.d.ts +2 -0
- package/dist/runtime/locale/he.js +53 -0
- package/dist/runtime/locale/hi.d.ts +2 -0
- package/dist/runtime/locale/hi.js +54 -0
- package/dist/runtime/locale/hu.d.ts +2 -0
- package/dist/runtime/locale/hu.js +54 -0
- package/dist/runtime/locale/id.d.ts +2 -0
- package/dist/runtime/locale/id.js +54 -0
- package/dist/runtime/locale/index.d.ts +34 -0
- package/dist/runtime/locale/index.js +34 -0
- package/dist/runtime/locale/it.d.ts +2 -0
- package/dist/runtime/locale/it.js +54 -0
- package/dist/runtime/locale/ja.d.ts +2 -0
- package/dist/runtime/locale/ja.js +54 -0
- package/dist/runtime/locale/km.d.ts +2 -0
- package/dist/runtime/locale/km.js +54 -0
- package/dist/runtime/locale/ko.d.ts +2 -0
- package/dist/runtime/locale/ko.js +54 -0
- package/dist/runtime/locale/nb_no.d.ts +2 -0
- package/dist/runtime/locale/nb_no.js +54 -0
- package/dist/runtime/locale/nl.d.ts +2 -0
- package/dist/runtime/locale/nl.js +54 -0
- package/dist/runtime/locale/pl.d.ts +2 -0
- package/dist/runtime/locale/pl.js +54 -0
- package/dist/runtime/locale/pt.d.ts +2 -0
- package/dist/runtime/locale/pt.js +54 -0
- package/dist/runtime/locale/pt_br.d.ts +2 -0
- package/dist/runtime/locale/pt_br.js +54 -0
- package/dist/runtime/locale/ru.d.ts +2 -0
- package/dist/runtime/locale/ru.js +54 -0
- package/dist/runtime/locale/sk.d.ts +2 -0
- package/dist/runtime/locale/sk.js +54 -0
- package/dist/runtime/locale/sv.d.ts +2 -0
- package/dist/runtime/locale/sv.js +54 -0
- package/dist/runtime/locale/th.d.ts +2 -0
- package/dist/runtime/locale/th.js +54 -0
- package/dist/runtime/locale/tr.d.ts +2 -0
- package/dist/runtime/locale/tr.js +54 -0
- package/dist/runtime/locale/uk.d.ts +2 -0
- package/dist/runtime/locale/uk.js +54 -0
- package/dist/runtime/locale/vi.d.ts +2 -0
- package/dist/runtime/locale/vi.js +54 -0
- package/dist/runtime/locale/zh_cn.d.ts +2 -0
- package/dist/runtime/locale/zh_cn.js +54 -0
- package/dist/runtime/locale/zh_tw.d.ts +2 -0
- package/dist/runtime/locale/zh_tw.js +54 -0
- package/dist/runtime/plugins/colors.js +8 -5
- package/dist/runtime/types/form.d.ts +29 -15
- package/dist/runtime/types/form.js +2 -2
- package/dist/runtime/types/index.d.ts +8 -0
- package/dist/runtime/types/index.js +8 -0
- package/dist/runtime/types/locale.d.ts +56 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/utils.d.ts +7 -3
- package/dist/runtime/utils/form.d.ts +5 -9
- package/dist/runtime/utils/form.js +113 -50
- package/dist/runtime/utils/index.d.ts +1 -1
- package/dist/runtime/utils/index.js +15 -2
- package/dist/runtime/utils/link.d.ts +1 -1
- package/dist/runtime/utils/locale.d.ts +15 -0
- package/dist/runtime/utils/locale.js +25 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/vue/components/Icon.vue +2 -2
- package/dist/runtime/vue/components/Link.vue +87 -23
- package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
- package/dist/runtime/vue/composables/useAppConfig.js +2 -0
- package/dist/runtime/vue/plugins/head.d.ts +1 -1
- package/dist/runtime/vue/plugins/head.js +3 -3
- package/dist/runtime/vue/stubs.d.ts +19 -0
- package/dist/runtime/vue/stubs.js +37 -0
- package/dist/shared/{ui.BufKhDiD.mjs → ui.DSPu6Y8j.mjs} +1071 -409
- package/dist/shared/{ui.BU7wzH0D.cjs → ui.DfK2RX6G.cjs} +1074 -409
- package/dist/unplugin.cjs +62 -26
- package/dist/unplugin.d.cts +17 -3
- package/dist/unplugin.d.mts +17 -3
- package/dist/unplugin.d.ts +17 -3
- package/dist/unplugin.mjs +61 -25
- package/dist/vite.cjs +3 -2
- package/dist/vite.d.cts +2 -0
- package/dist/vite.d.mts +2 -0
- package/dist/vite.d.ts +2 -0
- package/dist/vite.mjs +3 -2
- package/package.json +110 -67
- package/dist/chunks/component-meta.cjs +0 -73264
- package/dist/chunks/component-meta.mjs +0 -73262
- package/dist/client/devtools/200.html +0 -1
- package/dist/client/devtools/404.html +0 -1
- package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
- package/dist/client/devtools/_nuxt/Bj9hdafK.js +0 -1
- package/dist/client/devtools/_nuxt/DM3_wAgz.js +0 -62
- package/dist/client/devtools/_nuxt/builds/latest.json +0 -1
- package/dist/client/devtools/_nuxt/builds/meta/e6b425f7-b919-4014-915b-0ea07c316790.json +0 -1
- package/dist/client/devtools/_nuxt/entry.DaJP-ZMB.css +0 -24
- package/dist/client/devtools/_nuxt/error-404.B0Nmv3fV.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.C8fgTxVz.css +0 -1
- package/dist/client/devtools/_nuxt/hKiujHsR.js +0 -1
- package/dist/client/devtools/favicon.svg +0 -1
- package/dist/client/devtools/index.html +0 -1
- package/dist/devtools/runtime/DevtoolsRenderer.vue +0 -53
- package/dist/devtools/runtime/examples/AvatarGroupExample.vue +0 -7
- package/dist/devtools/runtime/examples/ButtonGroupExample.vue +0 -8
- package/dist/devtools/runtime/examples/CardExample.vue +0 -13
- package/dist/devtools/runtime/examples/CarouselExample.vue +0 -13
- package/dist/devtools/runtime/examples/ChipExample.vue +0 -5
- package/dist/devtools/runtime/examples/CollapsibleExample.vue +0 -8
- package/dist/devtools/runtime/examples/CommandPaletteExample.vue +0 -29
- package/dist/devtools/runtime/examples/ContainerExample.vue +0 -5
- package/dist/devtools/runtime/examples/ContextMenuExample.vue +0 -5
- package/dist/devtools/runtime/examples/DrawerExample.vue +0 -8
- package/dist/devtools/runtime/examples/DropdownMenuExample.vue +0 -5
- package/dist/devtools/runtime/examples/FormExample.vue +0 -30
- package/dist/devtools/runtime/examples/FormFieldExample.vue +0 -5
- package/dist/devtools/runtime/examples/LinkExample.vue +0 -5
- package/dist/devtools/runtime/examples/ModalExample.vue +0 -8
- package/dist/devtools/runtime/examples/PopoverExample.vue +0 -8
- package/dist/devtools/runtime/examples/SkeletonExample.vue +0 -3
- package/dist/devtools/runtime/examples/SlideoverExample.vue +0 -8
- package/dist/devtools/runtime/examples/ToasterExample.vue +0 -11
- package/dist/devtools/runtime/examples/TooltipExample.vue +0 -5
- package/dist/runtime/components/ModalProvider.vue +0 -12
- package/dist/runtime/components/SlideoverProvider.vue +0 -12
- package/dist/runtime/composables/extendDevtoolsMeta.d.ts +0 -7
- package/dist/runtime/composables/extendDevtoolsMeta.js +0 -2
- package/dist/runtime/composables/useModal.d.ts +0 -17
- package/dist/runtime/composables/useModal.js +0 -46
- package/dist/runtime/composables/useSlideover.d.ts +0 -17
- package/dist/runtime/composables/useSlideover.js +0 -46
- package/dist/runtime/plugins/modal.d.ts +0 -2
- package/dist/runtime/plugins/modal.js +0 -10
- package/dist/runtime/plugins/slideover.d.ts +0 -2
- package/dist/runtime/plugins/slideover.js +0 -10
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { NumberFieldRootProps } from 'reka-ui'
|
|
4
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
5
|
+
import _appConfig from '#build/app.config'
|
|
6
|
+
import theme from '#build/ui/input-number'
|
|
7
|
+
import { tv } from '../utils/tv'
|
|
8
|
+
import type { ButtonProps } from '../types'
|
|
9
|
+
import type { PartialString } from '../types/utils'
|
|
10
|
+
|
|
11
|
+
const appConfigInputNumber = _appConfig as AppConfig & { ui: { inputNumber: Partial<typeof theme> } }
|
|
12
|
+
|
|
13
|
+
const inputNumber = tv({ extend: tv(theme), ...(appConfigInputNumber.ui?.inputNumber || {}) })
|
|
14
|
+
|
|
15
|
+
type InputNumberVariants = VariantProps<typeof inputNumber>
|
|
16
|
+
|
|
17
|
+
export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'step' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions'> {
|
|
18
|
+
/**
|
|
19
|
+
* The element or component this component should render as.
|
|
20
|
+
* @defaultValue 'div'
|
|
21
|
+
*/
|
|
22
|
+
as?: any
|
|
23
|
+
/** The placeholder text when the input is empty. */
|
|
24
|
+
placeholder?: string
|
|
25
|
+
color?: InputNumberVariants['color']
|
|
26
|
+
variant?: InputNumberVariants['variant']
|
|
27
|
+
size?: InputNumberVariants['size']
|
|
28
|
+
/** Highlight the ring color like a focus state. */
|
|
29
|
+
highlight?: boolean
|
|
30
|
+
/**
|
|
31
|
+
* The orientation of the input menu.
|
|
32
|
+
* @defaultValue 'horizontal'
|
|
33
|
+
*/
|
|
34
|
+
orientation?: 'vertical' | 'horizontal'
|
|
35
|
+
/**
|
|
36
|
+
* Configure the increment button. The `color` and `size` are inherited.
|
|
37
|
+
* @defaultValue { variant: 'link' }
|
|
38
|
+
*/
|
|
39
|
+
increment?: ButtonProps
|
|
40
|
+
/**
|
|
41
|
+
* The icon displayed to increment the value.
|
|
42
|
+
* @defaultValue appConfig.ui.icons.plus
|
|
43
|
+
*/
|
|
44
|
+
incrementIcon?: string
|
|
45
|
+
/**
|
|
46
|
+
* Configure the decrement button. The `color` and `size` are inherited.
|
|
47
|
+
* @defaultValue { variant: 'link' }
|
|
48
|
+
*/
|
|
49
|
+
decrement?: ButtonProps
|
|
50
|
+
/**
|
|
51
|
+
* The icon displayed to decrement the value.
|
|
52
|
+
* @defaultValue appConfig.ui.icons.minus
|
|
53
|
+
*/
|
|
54
|
+
decrementIcon?: string
|
|
55
|
+
autofocus?: boolean
|
|
56
|
+
autofocusDelay?: number
|
|
57
|
+
/**
|
|
58
|
+
* The locale to use for formatting and parsing numbers.
|
|
59
|
+
* @defaultValue UApp.locale.code
|
|
60
|
+
*/
|
|
61
|
+
locale?: string
|
|
62
|
+
class?: any
|
|
63
|
+
ui?: PartialString<typeof inputNumber.slots>
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface InputNumberEmits {
|
|
67
|
+
(e: 'update:modelValue', payload: number): void
|
|
68
|
+
(e: 'blur', event: FocusEvent): void
|
|
69
|
+
(e: 'change', payload: Event): void
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface InputNumberSlots {
|
|
73
|
+
increment(props?: {}): any
|
|
74
|
+
decrement(props?: {}): any
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<script setup lang="ts">
|
|
79
|
+
import { onMounted, ref, computed } from 'vue'
|
|
80
|
+
import { NumberFieldRoot, NumberFieldInput, NumberFieldDecrement, NumberFieldIncrement, useForwardPropsEmits } from 'reka-ui'
|
|
81
|
+
import { reactivePick } from '@vueuse/core'
|
|
82
|
+
import { useAppConfig } from '#imports'
|
|
83
|
+
import { useFormField } from '../composables/useFormField'
|
|
84
|
+
import { useLocale } from '../composables/useLocale'
|
|
85
|
+
import UButton from './Button.vue'
|
|
86
|
+
|
|
87
|
+
defineOptions({ inheritAttrs: false })
|
|
88
|
+
|
|
89
|
+
const props = withDefaults(defineProps<InputNumberProps>(), {
|
|
90
|
+
orientation: 'horizontal'
|
|
91
|
+
})
|
|
92
|
+
const emits = defineEmits<InputNumberEmits>()
|
|
93
|
+
defineSlots<InputNumberSlots>()
|
|
94
|
+
|
|
95
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'min', 'max', 'step', 'formatOptions'), emits)
|
|
96
|
+
|
|
97
|
+
const appConfig = useAppConfig()
|
|
98
|
+
const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size, name, highlight, disabled, ariaAttrs } = useFormField<InputNumberProps>(props)
|
|
99
|
+
|
|
100
|
+
const { t, code: codeLocale } = useLocale()
|
|
101
|
+
const locale = computed(() => props.locale || codeLocale.value)
|
|
102
|
+
|
|
103
|
+
const ui = computed(() => inputNumber({
|
|
104
|
+
color: color.value,
|
|
105
|
+
variant: props.variant,
|
|
106
|
+
size: size.value,
|
|
107
|
+
highlight: highlight.value,
|
|
108
|
+
orientation: props.orientation
|
|
109
|
+
}))
|
|
110
|
+
|
|
111
|
+
const incrementIcon = computed(() => props.incrementIcon || (props.orientation === 'horizontal' ? appConfig.ui.icons.plus : appConfig.ui.icons.chevronUp))
|
|
112
|
+
const decrementIcon = computed(() => props.decrementIcon || (props.orientation === 'horizontal' ? appConfig.ui.icons.minus : appConfig.ui.icons.chevronDown))
|
|
113
|
+
|
|
114
|
+
const inputRef = ref<InstanceType<typeof NumberFieldInput> | null>(null)
|
|
115
|
+
|
|
116
|
+
function autoFocus() {
|
|
117
|
+
if (props.autofocus) {
|
|
118
|
+
inputRef.value?.$el?.focus()
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
onMounted(() => {
|
|
123
|
+
setTimeout(() => {
|
|
124
|
+
autoFocus()
|
|
125
|
+
}, props.autofocusDelay)
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
function onUpdate(value: number) {
|
|
129
|
+
// @ts-expect-error - 'target' does not exist in type 'EventInit'
|
|
130
|
+
const event = new Event('change', { target: { value } })
|
|
131
|
+
emits('change', event)
|
|
132
|
+
|
|
133
|
+
emitFormChange()
|
|
134
|
+
emitFormInput()
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function onBlur(event: FocusEvent) {
|
|
138
|
+
emitFormBlur()
|
|
139
|
+
emits('blur', event)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
defineExpose({
|
|
143
|
+
inputRef
|
|
144
|
+
})
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<template>
|
|
148
|
+
<NumberFieldRoot
|
|
149
|
+
v-bind="rootProps"
|
|
150
|
+
:id="id"
|
|
151
|
+
:class="ui.root({ class: [props.class, props.ui?.root] })"
|
|
152
|
+
:name="name"
|
|
153
|
+
:disabled="disabled"
|
|
154
|
+
:locale="locale"
|
|
155
|
+
@update:model-value="onUpdate"
|
|
156
|
+
>
|
|
157
|
+
<NumberFieldInput
|
|
158
|
+
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
159
|
+
ref="inputRef"
|
|
160
|
+
:placeholder="placeholder"
|
|
161
|
+
:required="required"
|
|
162
|
+
:class="ui.base({ class: props.ui?.base })"
|
|
163
|
+
@blur="onBlur"
|
|
164
|
+
@focus="emitFormFocus"
|
|
165
|
+
/>
|
|
166
|
+
|
|
167
|
+
<div :class="ui.increment({ class: props.ui?.increment })">
|
|
168
|
+
<NumberFieldIncrement as-child :disabled="disabled">
|
|
169
|
+
<slot name="increment">
|
|
170
|
+
<UButton
|
|
171
|
+
:icon="incrementIcon"
|
|
172
|
+
:color="color"
|
|
173
|
+
:size="size"
|
|
174
|
+
variant="link"
|
|
175
|
+
:aria-label="t('inputNumber.increment')"
|
|
176
|
+
v-bind="typeof increment === 'object' ? increment : undefined"
|
|
177
|
+
/>
|
|
178
|
+
</slot>
|
|
179
|
+
</NumberFieldIncrement>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
<div :class="ui.decrement({ class: props.ui?.decrement })">
|
|
183
|
+
<NumberFieldDecrement as-child :disabled="disabled">
|
|
184
|
+
<slot name="decrement">
|
|
185
|
+
<UButton
|
|
186
|
+
:icon="decrementIcon"
|
|
187
|
+
:color="color"
|
|
188
|
+
:size="size"
|
|
189
|
+
variant="link"
|
|
190
|
+
:aria-label="t('inputNumber.decrement')"
|
|
191
|
+
v-bind="typeof decrement === 'object' ? decrement : undefined"
|
|
192
|
+
/>
|
|
193
|
+
</slot>
|
|
194
|
+
</NumberFieldDecrement>
|
|
195
|
+
</div>
|
|
196
|
+
</NumberFieldRoot>
|
|
197
|
+
</template>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
3
|
import type { AppConfig } from '@nuxt/schema'
|
|
4
4
|
import _appConfig from '#build/app.config'
|
|
5
5
|
import theme from '#build/ui/kbd'
|
|
6
6
|
import type { KbdKey } from '../composables/useKbd'
|
|
7
|
-
import {
|
|
7
|
+
import { tv } from '../utils/tv'
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const appConfigKbd = _appConfig as AppConfig & { ui: { kbd: Partial<typeof theme> } }
|
|
10
10
|
|
|
11
|
-
const kbd = tv({ extend: tv(theme), ...(
|
|
11
|
+
const kbd = tv({ extend: tv(theme), ...(appConfigKbd.ui?.kbd || {}) })
|
|
12
12
|
|
|
13
13
|
type KbdVariants = VariantProps<typeof kbd>
|
|
14
14
|
|
|
@@ -27,11 +27,10 @@ export interface KbdProps {
|
|
|
27
27
|
export interface KbdSlots {
|
|
28
28
|
default(props?: {}): any
|
|
29
29
|
}
|
|
30
|
-
extendDevtoolsMeta({ defaultProps: { value: 'K' } })
|
|
31
30
|
</script>
|
|
32
31
|
|
|
33
32
|
<script setup lang="ts">
|
|
34
|
-
import { Primitive } from '
|
|
33
|
+
import { Primitive } from 'reka-ui'
|
|
35
34
|
import { useKbd } from '../composables/useKbd'
|
|
36
35
|
|
|
37
36
|
const props = withDefaults(defineProps<KbdProps>(), {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ButtonHTMLAttributes } from 'vue'
|
|
3
|
-
import { tv } from 'tailwind-variants'
|
|
4
3
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
4
|
import _appConfig from '#build/app.config'
|
|
6
5
|
import type { RouterLinkProps, RouteLocationRaw } from 'vue-router'
|
|
7
6
|
import theme from '#build/ui/link'
|
|
8
|
-
import {
|
|
7
|
+
import { tv } from '../utils/tv'
|
|
9
8
|
|
|
10
9
|
interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
|
|
11
10
|
/**
|
|
@@ -53,9 +52,9 @@ interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
|
|
|
53
52
|
noPrefetch?: boolean
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
const
|
|
55
|
+
const appConfigLink = _appConfig as AppConfig & { ui: { link: Partial<typeof theme> } }
|
|
57
56
|
|
|
58
|
-
const link = tv({ extend: tv(theme), ...(
|
|
57
|
+
const link = tv({ extend: tv(theme), ...(appConfigLink.ui?.link || {}) })
|
|
59
58
|
|
|
60
59
|
export interface LinkProps extends NuxtLinkProps {
|
|
61
60
|
/**
|
|
@@ -73,8 +72,8 @@ export interface LinkProps extends NuxtLinkProps {
|
|
|
73
72
|
active?: boolean
|
|
74
73
|
/** Will only be active if the current route is an exact match. */
|
|
75
74
|
exact?: boolean
|
|
76
|
-
/**
|
|
77
|
-
exactQuery?: boolean
|
|
75
|
+
/** Allows controlling how the current route query sets the link as active. */
|
|
76
|
+
exactQuery?: boolean | 'partial'
|
|
78
77
|
/** Will only be active if the current route hash is an exact match. */
|
|
79
78
|
exactHash?: boolean
|
|
80
79
|
/** The class to apply when the link is inactive. */
|
|
@@ -88,16 +87,15 @@ export interface LinkProps extends NuxtLinkProps {
|
|
|
88
87
|
export interface LinkSlots {
|
|
89
88
|
default(props: { active: boolean }): any
|
|
90
89
|
}
|
|
91
|
-
|
|
92
|
-
extendDevtoolsMeta({ example: 'LinkExample' })
|
|
93
90
|
</script>
|
|
94
91
|
|
|
95
92
|
<script setup lang="ts">
|
|
96
93
|
import { computed } from 'vue'
|
|
97
|
-
import { isEqual } from 'ohash'
|
|
98
|
-
import { useForwardProps } from '
|
|
94
|
+
import { isEqual, diff } from 'ohash'
|
|
95
|
+
import { useForwardProps } from 'reka-ui'
|
|
99
96
|
import { reactiveOmit } from '@vueuse/core'
|
|
100
97
|
import { useRoute } from '#imports'
|
|
98
|
+
import ULinkBase from './LinkBase.vue'
|
|
101
99
|
|
|
102
100
|
defineOptions({ inheritAttrs: false })
|
|
103
101
|
|
|
@@ -111,7 +109,7 @@ const props = withDefaults(defineProps<LinkProps>(), {
|
|
|
111
109
|
defineSlots<LinkSlots>()
|
|
112
110
|
|
|
113
111
|
const route = useRoute()
|
|
114
|
-
const nuxtLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass'))
|
|
112
|
+
const nuxtLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass', 'raw', 'class'))
|
|
115
113
|
|
|
116
114
|
const ui = computed(() => tv({
|
|
117
115
|
extend: link,
|
|
@@ -123,14 +121,27 @@ const ui = computed(() => tv({
|
|
|
123
121
|
}
|
|
124
122
|
}))
|
|
125
123
|
|
|
124
|
+
function isPartiallyEqual(item1: any, item2: any) {
|
|
125
|
+
const diffedKeys = diff(item1, item2).reduce((filtered, q) => {
|
|
126
|
+
if (q.type === 'added') {
|
|
127
|
+
filtered.push(q.key)
|
|
128
|
+
}
|
|
129
|
+
return filtered
|
|
130
|
+
}, [] as string[])
|
|
131
|
+
return isEqual(item1, item2, { excludeKeys: key => diffedKeys.includes(key) })
|
|
132
|
+
}
|
|
133
|
+
|
|
126
134
|
function isLinkActive({ route: linkRoute, isActive, isExactActive }: any) {
|
|
127
135
|
if (props.active !== undefined) {
|
|
128
136
|
return props.active
|
|
129
137
|
}
|
|
130
138
|
|
|
131
|
-
if (props.exactQuery
|
|
132
|
-
return false
|
|
139
|
+
if (props.exactQuery === 'partial') {
|
|
140
|
+
if (!isPartiallyEqual(linkRoute.query, route.query)) return false
|
|
141
|
+
} else if (props.exactQuery === true) {
|
|
142
|
+
if (!isEqual(linkRoute.query, route.query)) return false
|
|
133
143
|
}
|
|
144
|
+
|
|
134
145
|
if (props.exactHash && linkRoute.hash !== route.hash) {
|
|
135
146
|
return false
|
|
136
147
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import type { DialogRootProps, DialogRootEmits, DialogContentProps } from 'radix-vue'
|
|
2
|
+
import type { DialogRootProps, DialogRootEmits, DialogContentProps } from 'reka-ui'
|
|
4
3
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
4
|
import _appConfig from '#build/app.config'
|
|
6
5
|
import theme from '#build/ui/modal'
|
|
7
|
-
import {
|
|
6
|
+
import { tv } from '../utils/tv'
|
|
8
7
|
import type { ButtonProps } from '../types'
|
|
9
8
|
|
|
10
|
-
const
|
|
9
|
+
const appConfigModal = _appConfig as AppConfig & { ui: { modal: Partial<typeof theme> } }
|
|
11
10
|
|
|
12
|
-
const modal = tv({ extend: tv(theme), ...(
|
|
11
|
+
const modal = tv({ extend: tv(theme), ...(appConfigModal.ui?.modal || {}) })
|
|
13
12
|
|
|
14
13
|
export interface ModalProps extends DialogRootProps {
|
|
15
14
|
title?: string
|
|
@@ -41,22 +40,24 @@ export interface ModalProps extends DialogRootProps {
|
|
|
41
40
|
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
42
41
|
* @defaultValue true
|
|
43
42
|
*/
|
|
44
|
-
close?:
|
|
43
|
+
close?: boolean | Partial<ButtonProps>
|
|
45
44
|
/**
|
|
46
45
|
* The icon displayed in the close button.
|
|
47
46
|
* @defaultValue appConfig.ui.icons.close
|
|
48
47
|
*/
|
|
49
48
|
closeIcon?: string
|
|
50
49
|
/**
|
|
51
|
-
* When `
|
|
52
|
-
* @defaultValue
|
|
50
|
+
* When `false`, the modal will not close when clicking outside or pressing escape.
|
|
51
|
+
* @defaultValue true
|
|
53
52
|
*/
|
|
54
|
-
|
|
53
|
+
dismissible?: boolean
|
|
55
54
|
class?: any
|
|
56
55
|
ui?: Partial<typeof modal.slots>
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
export interface ModalEmits extends DialogRootEmits {
|
|
58
|
+
export interface ModalEmits extends DialogRootEmits {
|
|
59
|
+
'after:leave': []
|
|
60
|
+
}
|
|
60
61
|
|
|
61
62
|
export interface ModalSlots {
|
|
62
63
|
default(props: { open: boolean }): any
|
|
@@ -68,15 +69,14 @@ export interface ModalSlots {
|
|
|
68
69
|
body(props?: {}): any
|
|
69
70
|
footer(props?: {}): any
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
-
extendDevtoolsMeta({ example: 'ModalExample' })
|
|
73
72
|
</script>
|
|
74
73
|
|
|
75
74
|
<script setup lang="ts">
|
|
76
75
|
import { computed, toRef } from 'vue'
|
|
77
|
-
import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, useForwardPropsEmits } from '
|
|
76
|
+
import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, VisuallyHidden, useForwardPropsEmits } from 'reka-ui'
|
|
78
77
|
import { reactivePick } from '@vueuse/core'
|
|
79
78
|
import { useAppConfig } from '#imports'
|
|
79
|
+
import { useLocale } from '../composables/useLocale'
|
|
80
80
|
import UButton from './Button.vue'
|
|
81
81
|
|
|
82
82
|
const props = withDefaults(defineProps<ModalProps>(), {
|
|
@@ -84,26 +84,32 @@ const props = withDefaults(defineProps<ModalProps>(), {
|
|
|
84
84
|
portal: true,
|
|
85
85
|
overlay: true,
|
|
86
86
|
transition: true,
|
|
87
|
-
modal: true
|
|
87
|
+
modal: true,
|
|
88
|
+
dismissible: true
|
|
88
89
|
})
|
|
89
90
|
const emits = defineEmits<ModalEmits>()
|
|
90
91
|
const slots = defineSlots<ModalSlots>()
|
|
91
92
|
|
|
93
|
+
const { t } = useLocale()
|
|
94
|
+
const appConfig = useAppConfig()
|
|
95
|
+
|
|
92
96
|
const rootProps = useForwardPropsEmits(reactivePick(props, 'open', 'defaultOpen', 'modal'), emits)
|
|
93
97
|
const contentProps = toRef(() => props.content)
|
|
94
98
|
const contentEvents = computed(() => {
|
|
95
|
-
if (props.
|
|
99
|
+
if (!props.dismissible) {
|
|
96
100
|
return {
|
|
97
101
|
pointerDownOutside: (e: Event) => e.preventDefault(),
|
|
98
|
-
interactOutside: (e: Event) => e.preventDefault()
|
|
102
|
+
interactOutside: (e: Event) => e.preventDefault(),
|
|
103
|
+
escapeKeyDown: (e: Event) => e.preventDefault(),
|
|
104
|
+
closeAutoFocus: (e: Event) => e.preventDefault()
|
|
99
105
|
}
|
|
100
106
|
}
|
|
101
107
|
|
|
102
|
-
return {
|
|
108
|
+
return {
|
|
109
|
+
closeAutoFocus: (e: Event) => e.preventDefault()
|
|
110
|
+
}
|
|
103
111
|
})
|
|
104
112
|
|
|
105
|
-
const appConfig = useAppConfig()
|
|
106
|
-
|
|
107
113
|
const ui = computed(() => modal({
|
|
108
114
|
transition: props.transition,
|
|
109
115
|
fullscreen: props.fullscreen
|
|
@@ -112,28 +118,44 @@ const ui = computed(() => modal({
|
|
|
112
118
|
|
|
113
119
|
<template>
|
|
114
120
|
<DialogRoot v-slot="{ open }" v-bind="rootProps">
|
|
115
|
-
<DialogTrigger v-if="!!slots.default" as-child>
|
|
121
|
+
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
116
122
|
<slot :open="open" />
|
|
117
123
|
</DialogTrigger>
|
|
118
124
|
|
|
119
125
|
<DialogPortal :disabled="!portal">
|
|
120
126
|
<DialogOverlay v-if="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
|
|
121
127
|
|
|
122
|
-
<DialogContent :class="ui.content({ class: [props.class, props.ui?.content] })" v-bind="contentProps" v-on="contentEvents">
|
|
128
|
+
<DialogContent :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-bind="contentProps" @after-leave="emits('after:leave')" v-on="contentEvents">
|
|
129
|
+
<VisuallyHidden v-if="!!slots.content && ((title || !!slots.title) || (description || !!slots.description))">
|
|
130
|
+
<DialogTitle v-if="title || !!slots.title">
|
|
131
|
+
<slot name="title">
|
|
132
|
+
{{ title }}
|
|
133
|
+
</slot>
|
|
134
|
+
</DialogTitle>
|
|
135
|
+
|
|
136
|
+
<DialogDescription v-if="description || !!slots.description">
|
|
137
|
+
<slot name="description">
|
|
138
|
+
{{ description }}
|
|
139
|
+
</slot>
|
|
140
|
+
</DialogDescription>
|
|
141
|
+
</VisuallyHidden>
|
|
142
|
+
|
|
123
143
|
<slot name="content">
|
|
124
144
|
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (close || !!slots.close)" :class="ui.header({ class: props.ui?.header })">
|
|
125
145
|
<slot name="header">
|
|
126
|
-
<
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
146
|
+
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
147
|
+
<DialogTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
148
|
+
<slot name="title">
|
|
149
|
+
{{ title }}
|
|
150
|
+
</slot>
|
|
151
|
+
</DialogTitle>
|
|
152
|
+
|
|
153
|
+
<DialogDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
154
|
+
<slot name="description">
|
|
155
|
+
{{ description }}
|
|
156
|
+
</slot>
|
|
157
|
+
</DialogDescription>
|
|
158
|
+
</div>
|
|
137
159
|
|
|
138
160
|
<DialogClose as-child>
|
|
139
161
|
<slot name="close" :ui="ui">
|
|
@@ -143,8 +165,8 @@ const ui = computed(() => modal({
|
|
|
143
165
|
size="md"
|
|
144
166
|
color="neutral"
|
|
145
167
|
variant="ghost"
|
|
146
|
-
aria-label="
|
|
147
|
-
v-bind="typeof close === 'object' ? close :
|
|
168
|
+
:aria-label="t('modal.close')"
|
|
169
|
+
v-bind="(typeof close === 'object' ? close as Partial<ButtonProps> : {})"
|
|
148
170
|
:class="ui.close({ class: props.ui?.close })"
|
|
149
171
|
/>
|
|
150
172
|
</slot>
|