@nuxt/ui 2.18.4 → 3.0.0-alpha.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/README.md +19 -2
- package/cli/commands/init.mjs +83 -0
- package/cli/index.mjs +15 -0
- package/cli/node_modules/.ignored/citty/LICENSE +36 -0
- package/cli/node_modules/.ignored/citty/README.md +134 -0
- package/cli/node_modules/.ignored/citty/dist/index.cjs +475 -0
- package/cli/node_modules/.ignored/citty/dist/index.d.cts +80 -0
- package/cli/node_modules/.ignored/citty/dist/index.d.mts +80 -0
- package/cli/node_modules/.ignored/citty/dist/index.d.ts +80 -0
- package/cli/node_modules/.ignored/citty/dist/index.mjs +463 -0
- package/cli/node_modules/.ignored/citty/package.json +49 -0
- package/cli/node_modules/.ignored/consola/LICENSE +47 -0
- package/cli/node_modules/.ignored/consola/README.md +318 -0
- package/cli/node_modules/.ignored/consola/core.d.ts +1 -0
- package/cli/node_modules/.ignored/consola/dist/basic.cjs +32 -0
- package/cli/node_modules/.ignored/consola/dist/basic.d.ts +9 -0
- package/cli/node_modules/.ignored/consola/dist/basic.mjs +24 -0
- package/cli/node_modules/.ignored/consola/dist/browser.cjs +80 -0
- package/cli/node_modules/.ignored/consola/dist/browser.d.ts +7 -0
- package/cli/node_modules/.ignored/consola/dist/browser.mjs +72 -0
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +436 -0
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +429 -0
- package/cli/node_modules/.ignored/consola/dist/core.cjs +415 -0
- package/cli/node_modules/.ignored/consola/dist/core.d.ts +124 -0
- package/cli/node_modules/.ignored/consola/dist/core.mjs +410 -0
- package/cli/node_modules/.ignored/consola/dist/index.cjs +21 -0
- package/cli/node_modules/.ignored/consola/dist/index.d.ts +9 -0
- package/cli/node_modules/.ignored/consola/dist/index.mjs +8 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +62 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +636 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +645 -0
- package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +65 -0
- package/cli/node_modules/.ignored/consola/dist/utils.cjs +308 -0
- package/cli/node_modules/.ignored/consola/dist/utils.d.ts +169 -0
- package/cli/node_modules/.ignored/consola/dist/utils.mjs +284 -0
- package/cli/node_modules/.ignored/consola/lib/index.cjs +9 -0
- package/cli/node_modules/.ignored/consola/package.json +101 -0
- package/cli/node_modules/.ignored/consola/utils.d.ts +1 -0
- package/cli/node_modules/.ignored/pathe/LICENSE +44 -0
- package/cli/node_modules/.ignored/pathe/README.md +69 -0
- package/cli/node_modules/.ignored/pathe/dist/index.cjs +23 -0
- package/cli/node_modules/.ignored/pathe/dist/index.d.cts +36 -0
- package/cli/node_modules/.ignored/pathe/dist/index.d.mts +36 -0
- package/cli/node_modules/.ignored/pathe/dist/index.d.ts +36 -0
- package/cli/node_modules/.ignored/pathe/dist/index.mjs +1 -0
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +238 -0
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +221 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.cjs +58 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +5 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +5 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +5 -0
- package/cli/node_modules/.ignored/pathe/dist/utils.mjs +54 -0
- package/cli/node_modules/.ignored/pathe/package.json +48 -0
- package/cli/node_modules/.ignored/pathe/utils.d.ts +1 -0
- package/cli/node_modules/.ignored/scule/LICENSE +21 -0
- package/cli/node_modules/.ignored/scule/README.md +149 -0
- package/cli/node_modules/.ignored/scule/dist/index.cjs +92 -0
- package/cli/node_modules/.ignored/scule/dist/index.d.cts +57 -0
- package/cli/node_modules/.ignored/scule/dist/index.d.mts +57 -0
- package/cli/node_modules/.ignored/scule/dist/index.d.ts +57 -0
- package/cli/node_modules/.ignored/scule/dist/index.mjs +80 -0
- package/cli/node_modules/.ignored/scule/package.json +43 -0
- package/cli/node_modules/.package-lock.json +33 -0
- package/cli/package.json +13 -0
- package/cli/templates.mjs +171 -0
- package/cli/utils.mjs +17 -0
- package/dist/module.d.mts +10 -26
- package/dist/module.d.ts +10 -26
- package/dist/module.json +4 -4
- package/dist/module.mjs +2574 -154
- package/dist/runtime/components/Accordion.vue +110 -0
- package/dist/runtime/components/Alert.vue +130 -0
- package/dist/runtime/components/App.vue +42 -0
- package/dist/runtime/components/Avatar.vue +69 -0
- package/dist/runtime/components/AvatarGroup.vue +98 -0
- package/dist/runtime/components/Badge.vue +46 -0
- package/dist/runtime/components/Breadcrumb.vue +98 -0
- package/dist/runtime/components/Button.vue +82 -0
- package/dist/runtime/components/ButtonGroup.vue +53 -0
- package/dist/runtime/components/Card.vue +52 -0
- package/dist/runtime/components/Checkbox.vue +128 -0
- package/dist/runtime/components/Chip.vue +76 -0
- package/dist/runtime/components/Collapsible.vue +54 -0
- package/dist/runtime/components/CommandPalette.vue +303 -0
- package/dist/runtime/components/Container.vue +36 -0
- package/dist/runtime/components/ContextMenu.vue +103 -0
- package/dist/runtime/components/ContextMenuContent.vue +122 -0
- package/dist/runtime/components/Drawer.vue +115 -0
- package/dist/runtime/components/DropdownMenu.vue +115 -0
- package/dist/runtime/components/DropdownMenuContent.vue +129 -0
- package/dist/runtime/components/Form.vue +227 -0
- package/dist/runtime/components/FormField.vue +107 -0
- package/dist/runtime/components/Icon.vue +26 -0
- package/dist/runtime/components/Input.vue +180 -0
- package/dist/runtime/components/InputMenu.vue +371 -0
- package/dist/runtime/components/Kbd.vue +49 -0
- package/dist/runtime/components/Link.vue +147 -0
- package/dist/runtime/components/LinkBase.vue +60 -0
- package/dist/runtime/components/Modal.vue +163 -0
- package/dist/runtime/components/ModalProvider.vue +12 -0
- package/dist/runtime/components/NavigationMenu.vue +195 -0
- package/dist/runtime/components/Pagination.vue +173 -0
- package/dist/runtime/components/Popover.vue +88 -0
- package/dist/runtime/components/Progress.vue +164 -0
- package/dist/runtime/components/RadioGroup.vue +159 -0
- package/dist/runtime/components/Select.vue +230 -0
- package/dist/runtime/components/SelectMenu.vue +306 -0
- package/dist/runtime/components/Separator.vue +82 -0
- package/dist/runtime/components/Skeleton.vue +31 -0
- package/dist/runtime/components/Slideover.vue +162 -0
- package/dist/runtime/components/SlideoverProvider.vue +12 -0
- package/dist/runtime/components/Slider.vue +113 -0
- package/dist/runtime/components/Switch.vue +124 -0
- package/dist/runtime/components/Tabs.vue +114 -0
- package/dist/runtime/components/Textarea.vue +189 -0
- package/dist/runtime/components/Toast.vue +161 -0
- package/dist/runtime/components/Toaster.vue +130 -0
- package/dist/runtime/components/Tooltip.vue +88 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +7 -5
- package/dist/runtime/composables/defineShortcuts.js +94 -65
- package/dist/runtime/composables/useAvatarGroup.d.ts +10 -0
- package/dist/runtime/composables/useAvatarGroup.js +10 -0
- package/dist/runtime/composables/useButtonGroup.d.ts +12 -17
- package/dist/runtime/composables/useButtonGroup.js +6 -56
- package/dist/runtime/composables/useComponentIcons.d.ts +26 -0
- package/dist/runtime/composables/useComponentIcons.js +26 -0
- package/dist/runtime/composables/useFormField.d.ts +34 -0
- package/dist/runtime/composables/useFormField.js +54 -0
- package/dist/runtime/composables/useKbd.d.ts +28 -0
- package/dist/runtime/composables/useKbd.js +46 -0
- package/dist/runtime/composables/useModal.d.ts +8 -4
- package/dist/runtime/composables/useModal.js +1 -0
- package/dist/runtime/composables/useSlideover.d.ts +9 -5
- package/dist/runtime/composables/useSlideover.js +3 -2
- package/dist/runtime/composables/useToast.d.ts +9 -17
- package/dist/runtime/composables/useToast.js +27 -13
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/plugins/colors.js +9 -17
- package/dist/runtime/plugins/{slideovers.js → slideover.js} +3 -3
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/component.d.ts +17 -14
- package/dist/runtime/types/component.js +0 -0
- package/dist/runtime/types/form.d.ts +62 -32
- package/dist/runtime/types/form.js +12 -0
- package/dist/runtime/types/index.d.ts +41 -30
- package/dist/runtime/types/index.js +42 -31
- package/dist/runtime/types/utils.d.ts +13 -32
- package/dist/runtime/types/utils.js +0 -0
- package/dist/runtime/utils/form.d.ts +15 -0
- package/dist/runtime/utils/form.js +66 -0
- package/dist/runtime/utils/fuse.d.ts +4 -0
- package/dist/runtime/utils/fuse.js +63 -0
- package/dist/runtime/utils/index.d.ts +4 -10
- package/dist/runtime/utils/index.js +40 -60
- package/dist/runtime/utils/link.d.ts +26 -71
- package/dist/runtime/utils/link.js +4 -124
- package/package.json +50 -49
- package/dist/runtime/components/data/Table.vue +0 -355
- package/dist/runtime/components/data/Table.vue.d.ts +0 -439
- package/dist/runtime/components/elements/Accordion.vue +0 -185
- package/dist/runtime/components/elements/Accordion.vue.d.ts +0 -223
- package/dist/runtime/components/elements/Alert.vue +0 -139
- package/dist/runtime/components/elements/Alert.vue.d.ts +0 -194
- package/dist/runtime/components/elements/Avatar.vue +0 -160
- package/dist/runtime/components/elements/Avatar.vue.d.ts +0 -255
- package/dist/runtime/components/elements/AvatarGroup.d.ts +0 -56
- package/dist/runtime/components/elements/AvatarGroup.js +0 -58
- package/dist/runtime/components/elements/Badge.vue +0 -75
- package/dist/runtime/components/elements/Badge.vue.d.ts +0 -109
- package/dist/runtime/components/elements/Button.vue +0 -193
- package/dist/runtime/components/elements/Button.vue.d.ts +0 -504
- package/dist/runtime/components/elements/ButtonGroup.d.ts +0 -153
- package/dist/runtime/components/elements/ButtonGroup.js +0 -51
- package/dist/runtime/components/elements/Carousel.vue +0 -165
- package/dist/runtime/components/elements/Carousel.vue.d.ts +0 -159
- package/dist/runtime/components/elements/Chip.vue +0 -85
- package/dist/runtime/components/elements/Chip.vue.d.ts +0 -162
- package/dist/runtime/components/elements/Dropdown.vue +0 -254
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +0 -254
- package/dist/runtime/components/elements/Icon.vue +0 -30
- package/dist/runtime/components/elements/Icon.vue.d.ts +0 -47
- package/dist/runtime/components/elements/Kbd.vue +0 -59
- package/dist/runtime/components/elements/Kbd.vue.d.ts +0 -86
- package/dist/runtime/components/elements/Link.vue +0 -95
- package/dist/runtime/components/elements/Link.vue.d.ts +0 -225
- package/dist/runtime/components/elements/Meter.vue +0 -170
- package/dist/runtime/components/elements/Meter.vue.d.ts +0 -279
- package/dist/runtime/components/elements/MeterGroup.d.ts +0 -135
- package/dist/runtime/components/elements/MeterGroup.js +0 -159
- package/dist/runtime/components/elements/Progress.vue +0 -203
- package/dist/runtime/components/elements/Progress.vue.d.ts +0 -280
- package/dist/runtime/components/forms/Checkbox.vue +0 -143
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +0 -179
- package/dist/runtime/components/forms/Form.vue +0 -219
- package/dist/runtime/components/forms/Form.vue.d.ts +0 -53
- package/dist/runtime/components/forms/FormGroup.vue +0 -128
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +0 -169
- package/dist/runtime/components/forms/Input.vue +0 -300
- package/dist/runtime/components/forms/Input.vue.d.ts +0 -482
- package/dist/runtime/components/forms/InputMenu.vue +0 -439
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +0 -700
- package/dist/runtime/components/forms/Radio.vue +0 -140
- package/dist/runtime/components/forms/Radio.vue.d.ts +0 -168
- package/dist/runtime/components/forms/RadioGroup.vue +0 -145
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +0 -176
- package/dist/runtime/components/forms/Range.vue +0 -173
- package/dist/runtime/components/forms/Range.vue.d.ts +0 -268
- package/dist/runtime/components/forms/Select.vue +0 -322
- package/dist/runtime/components/forms/Select.vue.d.ts +0 -471
- package/dist/runtime/components/forms/SelectMenu.vue +0 -546
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +0 -754
- package/dist/runtime/components/forms/Textarea.vue +0 -231
- package/dist/runtime/components/forms/Textarea.vue.d.ts +0 -436
- package/dist/runtime/components/forms/Toggle.vue +0 -171
- package/dist/runtime/components/forms/Toggle.vue.d.ts +0 -262
- package/dist/runtime/components/layout/Card.vue +0 -63
- package/dist/runtime/components/layout/Card.vue.d.ts +0 -89
- package/dist/runtime/components/layout/Container.vue +0 -48
- package/dist/runtime/components/layout/Container.vue.d.ts +0 -53
- package/dist/runtime/components/layout/Divider.vue +0 -108
- package/dist/runtime/components/layout/Divider.vue.d.ts +0 -198
- package/dist/runtime/components/layout/Skeleton.vue +0 -46
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +0 -53
- package/dist/runtime/components/navigation/Breadcrumb.vue +0 -82
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +0 -95
- package/dist/runtime/components/navigation/CommandPalette.vue +0 -345
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +0 -390
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +0 -152
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +0 -60
- package/dist/runtime/components/navigation/HorizontalNavigation.vue +0 -102
- package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +0 -99
- package/dist/runtime/components/navigation/Pagination.vue +0 -270
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +0 -260
- package/dist/runtime/components/navigation/Tabs.vue +0 -163
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +0 -165
- package/dist/runtime/components/navigation/VerticalNavigation.vue +0 -105
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +0 -113
- package/dist/runtime/components/overlays/ContextMenu.vue +0 -85
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +0 -126
- package/dist/runtime/components/overlays/Modal.vue +0 -122
- package/dist/runtime/components/overlays/Modal.vue.d.ts +0 -166
- package/dist/runtime/components/overlays/Modals.client.vue +0 -18
- package/dist/runtime/components/overlays/Notification.vue +0 -212
- package/dist/runtime/components/overlays/Notification.vue.d.ts +0 -235
- package/dist/runtime/components/overlays/Notifications.vue +0 -69
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +0 -66
- package/dist/runtime/components/overlays/Popover.vue +0 -213
- package/dist/runtime/components/overlays/Popover.vue.d.ts +0 -220
- package/dist/runtime/components/overlays/Slideover.vue +0 -152
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +0 -167
- package/dist/runtime/components/overlays/Slideovers.client.vue +0 -18
- package/dist/runtime/components/overlays/Tooltip.vue +0 -127
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +0 -165
- package/dist/runtime/composables/useCarouselScroll.d.ts +0 -2
- package/dist/runtime/composables/useCarouselScroll.js +0 -37
- package/dist/runtime/composables/useCopyToClipboard.d.ts +0 -10
- package/dist/runtime/composables/useCopyToClipboard.js +0 -26
- package/dist/runtime/composables/useFormGroup.d.ts +0 -18
- package/dist/runtime/composables/useFormGroup.js +0 -45
- package/dist/runtime/composables/usePopper.d.ts +0 -268
- package/dist/runtime/composables/usePopper.js +0 -94
- package/dist/runtime/composables/useShortcuts.d.ts +0 -12
- package/dist/runtime/composables/useShortcuts.js +0 -26
- package/dist/runtime/composables/useTimer.d.ts +0 -8
- package/dist/runtime/composables/useTimer.js +0 -51
- package/dist/runtime/composables/useUI.d.ts +0 -10
- package/dist/runtime/composables/useUI.js +0 -24
- package/dist/runtime/types/accordion.d.ts +0 -9
- package/dist/runtime/types/alert.d.ts +0 -12
- package/dist/runtime/types/avatar.d.ts +0 -17
- package/dist/runtime/types/badge.d.ts +0 -15
- package/dist/runtime/types/breadcrumb.d.ts +0 -10
- package/dist/runtime/types/button.d.ts +0 -31
- package/dist/runtime/types/chip.d.ts +0 -15
- package/dist/runtime/types/clipboard.d.ts +0 -3
- package/dist/runtime/types/command-palette.d.ts +0 -29
- package/dist/runtime/types/divider.d.ts +0 -3
- package/dist/runtime/types/dropdown.d.ts +0 -15
- package/dist/runtime/types/form-group.d.ts +0 -5
- package/dist/runtime/types/horizontal-navigation.d.ts +0 -13
- package/dist/runtime/types/input.d.ts +0 -8
- package/dist/runtime/types/kbd.d.ts +0 -5
- package/dist/runtime/types/link.d.ts +0 -12
- package/dist/runtime/types/meter.d.ts +0 -5
- package/dist/runtime/types/modal.d.ts +0 -18
- package/dist/runtime/types/notification.d.ts +0 -24
- package/dist/runtime/types/popper.d.ts +0 -17
- package/dist/runtime/types/progress.d.ts +0 -6
- package/dist/runtime/types/range.d.ts +0 -7
- package/dist/runtime/types/select.d.ts +0 -8
- package/dist/runtime/types/slideover.d.ts +0 -16
- package/dist/runtime/types/tabs.d.ts +0 -8
- package/dist/runtime/types/textarea.d.ts +0 -8
- package/dist/runtime/types/toggle.d.ts +0 -7
- package/dist/runtime/types/tooltip.d.ts +0 -7
- package/dist/runtime/types/vertical-navigation.d.ts +0 -13
- package/dist/runtime/ui.config/data/table.d.ts +0 -81
- package/dist/runtime/ui.config/data/table.js +0 -80
- package/dist/runtime/ui.config/elements/accordion.d.ts +0 -23
- package/dist/runtime/ui.config/elements/accordion.js +0 -22
- package/dist/runtime/ui.config/elements/alert.d.ts +0 -41
- package/dist/runtime/ui.config/elements/alert.js +0 -40
- package/dist/runtime/ui.config/elements/avatar.d.ts +0 -60
- package/dist/runtime/ui.config/elements/avatar.js +0 -59
- package/dist/runtime/ui.config/elements/avatarGroup.d.ts +0 -6
- package/dist/runtime/ui.config/elements/avatarGroup.js +0 -5
- package/dist/runtime/ui.config/elements/badge.d.ts +0 -34
- package/dist/runtime/ui.config/elements/badge.js +0 -33
- package/dist/runtime/ui.config/elements/button.d.ts +0 -81
- package/dist/runtime/ui.config/elements/button.js +0 -80
- package/dist/runtime/ui.config/elements/buttonGroup.d.ts +0 -101
- package/dist/runtime/ui.config/elements/buttonGroup.js +0 -19
- package/dist/runtime/ui.config/elements/carousel.d.ts +0 -27
- package/dist/runtime/ui.config/elements/carousel.js +0 -26
- package/dist/runtime/ui.config/elements/chip.d.ts +0 -35
- package/dist/runtime/ui.config/elements/chip.js +0 -34
- package/dist/runtime/ui.config/elements/dropdown.d.ts +0 -59
- package/dist/runtime/ui.config/elements/dropdown.js +0 -57
- package/dist/runtime/ui.config/elements/kbd.d.ts +0 -17
- package/dist/runtime/ui.config/elements/kbd.js +0 -16
- package/dist/runtime/ui.config/elements/meter.d.ts +0 -77
- package/dist/runtime/ui.config/elements/meter.js +0 -76
- package/dist/runtime/ui.config/elements/meterGroup.d.ts +0 -52
- package/dist/runtime/ui.config/elements/meterGroup.js +0 -24
- package/dist/runtime/ui.config/elements/progress.d.ts +0 -75
- package/dist/runtime/ui.config/elements/progress.js +0 -74
- package/dist/runtime/ui.config/forms/checkbox.d.ts +0 -19
- package/dist/runtime/ui.config/forms/checkbox.js +0 -18
- package/dist/runtime/ui.config/forms/formGroup.d.ts +0 -26
- package/dist/runtime/ui.config/forms/formGroup.js +0 -26
- package/dist/runtime/ui.config/forms/input.d.ts +0 -110
- package/dist/runtime/ui.config/forms/input.js +0 -109
- package/dist/runtime/ui.config/forms/inputMenu.d.ts +0 -64
- package/dist/runtime/ui.config/forms/inputMenu.js +0 -62
- package/dist/runtime/ui.config/forms/radio.d.ts +0 -18
- package/dist/runtime/ui.config/forms/radio.js +0 -17
- package/dist/runtime/ui.config/forms/radioGroup.d.ts +0 -9
- package/dist/runtime/ui.config/forms/radioGroup.js +0 -8
- package/dist/runtime/ui.config/forms/range.d.ts +0 -64
- package/dist/runtime/ui.config/forms/range.js +0 -63
- package/dist/runtime/ui.config/forms/select.d.ts +0 -111
- package/dist/runtime/ui.config/forms/select.js +0 -13
- package/dist/runtime/ui.config/forms/selectMenu.d.ts +0 -70
- package/dist/runtime/ui.config/forms/selectMenu.js +0 -32
- package/dist/runtime/ui.config/forms/textarea.d.ts +0 -109
- package/dist/runtime/ui.config/forms/textarea.js +0 -10
- package/dist/runtime/ui.config/forms/toggle.d.ts +0 -63
- package/dist/runtime/ui.config/forms/toggle.js +0 -62
- package/dist/runtime/ui.config/index.d.ts +0 -43
- package/dist/runtime/ui.config/index.js +0 -43
- package/dist/runtime/ui.config/layout/card.d.ts +0 -24
- package/dist/runtime/ui.config/layout/card.js +0 -23
- package/dist/runtime/ui.config/layout/container.d.ts +0 -6
- package/dist/runtime/ui.config/layout/container.js +0 -5
- package/dist/runtime/ui.config/layout/divider.d.ts +0 -52
- package/dist/runtime/ui.config/layout/divider.js +0 -51
- package/dist/runtime/ui.config/layout/skeleton.d.ts +0 -6
- package/dist/runtime/ui.config/layout/skeleton.js +0 -5
- package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +0 -21
- package/dist/runtime/ui.config/navigation/breadcrumb.js +0 -20
- package/dist/runtime/ui.config/navigation/commandPalette.d.ts +0 -72
- package/dist/runtime/ui.config/navigation/commandPalette.js +0 -71
- package/dist/runtime/ui.config/navigation/horizontalNavigation.d.ts +0 -27
- package/dist/runtime/ui.config/navigation/horizontalNavigation.js +0 -26
- package/dist/runtime/ui.config/navigation/pagination.d.ts +0 -35
- package/dist/runtime/ui.config/navigation/pagination.js +0 -34
- package/dist/runtime/ui.config/navigation/tabs.d.ts +0 -35
- package/dist/runtime/ui.config/navigation/tabs.js +0 -34
- package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +0 -34
- package/dist/runtime/ui.config/navigation/verticalNavigation.js +0 -33
- package/dist/runtime/ui.config/overlays/contextMenu.d.ts +0 -31
- package/dist/runtime/ui.config/overlays/contextMenu.js +0 -25
- package/dist/runtime/ui.config/overlays/modal.d.ts +0 -36
- package/dist/runtime/ui.config/overlays/modal.js +0 -37
- package/dist/runtime/ui.config/overlays/notification.d.ts +0 -50
- package/dist/runtime/ui.config/overlays/notification.js +0 -50
- package/dist/runtime/ui.config/overlays/notifications.d.ts +0 -7
- package/dist/runtime/ui.config/overlays/notifications.js +0 -6
- package/dist/runtime/ui.config/overlays/popover.d.ts +0 -47
- package/dist/runtime/ui.config/overlays/popover.js +0 -41
- package/dist/runtime/ui.config/overlays/slideover.d.ts +0 -35
- package/dist/runtime/ui.config/overlays/slideover.js +0 -36
- package/dist/runtime/ui.config/overlays/tooltip.d.ts +0 -37
- package/dist/runtime/ui.config/overlays/tooltip.js +0 -34
- package/dist/runtime/ui.config/popper.d.ts +0 -8
- package/dist/runtime/ui.config/popper.js +0 -9
- package/dist/runtime/ui.css +0 -1
- package/dist/runtime/utils/colors.d.ts +0 -11
- package/dist/runtime/utils/colors.js +0 -307
- package/dist/runtime/utils/lodash.d.ts +0 -2
- package/dist/runtime/utils/lodash.js +0 -23
- package/dist/runtime/plugins/{modals.d.ts → modal.d.ts} +0 -0
- package/dist/runtime/plugins/{modals.js → modal.js} +1 -1
- /package/dist/runtime/plugins/{slideovers.d.ts → slideover.d.ts} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { inject, ref, computed } from "vue";
|
|
2
|
+
import { useDebounceFn } from "@vueuse/core";
|
|
3
|
+
export const formOptionsInjectionKey = Symbol("nuxt-ui.form-options");
|
|
4
|
+
export const formBusInjectionKey = Symbol("nuxt-ui.form-events");
|
|
5
|
+
export const formFieldInjectionKey = Symbol("nuxt-ui.form-field");
|
|
6
|
+
export const inputIdInjectionKey = Symbol("nuxt-ui.input-id");
|
|
7
|
+
export const formInputsInjectionKey = Symbol("nuxt-ui.form-inputs");
|
|
8
|
+
export function useFormField(props, opts) {
|
|
9
|
+
const formOptions = inject(formOptionsInjectionKey, void 0);
|
|
10
|
+
const formBus = inject(formBusInjectionKey, void 0);
|
|
11
|
+
const formField = inject(formFieldInjectionKey, void 0);
|
|
12
|
+
const formInputs = inject(formInputsInjectionKey, void 0);
|
|
13
|
+
const inputId = inject(inputIdInjectionKey, void 0);
|
|
14
|
+
if (formField && inputId) {
|
|
15
|
+
if (opts?.bind === false || props?.legend) {
|
|
16
|
+
inputId.value = void 0;
|
|
17
|
+
} else if (props?.id) {
|
|
18
|
+
inputId.value = props?.id;
|
|
19
|
+
}
|
|
20
|
+
if (formInputs && formField.value.name && inputId.value) {
|
|
21
|
+
formInputs.value[formField.value.name] = inputId.value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const blurred = ref(false);
|
|
25
|
+
function emitFormEvent(type, name) {
|
|
26
|
+
if (formBus && formField && name) {
|
|
27
|
+
formBus.emit({ type, name });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function emitFormBlur() {
|
|
31
|
+
emitFormEvent("blur", formField?.value.name);
|
|
32
|
+
blurred.value = true;
|
|
33
|
+
}
|
|
34
|
+
function emitFormChange() {
|
|
35
|
+
emitFormEvent("change", formField?.value.name);
|
|
36
|
+
}
|
|
37
|
+
const emitFormInput = useDebounceFn(
|
|
38
|
+
() => {
|
|
39
|
+
emitFormEvent("input", formField?.value.name);
|
|
40
|
+
},
|
|
41
|
+
formField?.value.validateOnInputDelay ?? formOptions?.value.validateOnInputDelay ?? 0
|
|
42
|
+
);
|
|
43
|
+
return {
|
|
44
|
+
id: computed(() => props?.id ?? inputId?.value),
|
|
45
|
+
name: computed(() => props?.name ?? formField?.value.name),
|
|
46
|
+
size: computed(() => props?.size ?? formField?.value.size),
|
|
47
|
+
color: computed(() => formField?.value.error ? "error" : props?.color),
|
|
48
|
+
highlight: computed(() => formField?.value.error ? true : props?.highlight),
|
|
49
|
+
disabled: computed(() => formOptions?.value.disabled || props?.disabled),
|
|
50
|
+
emitFormBlur,
|
|
51
|
+
emitFormInput,
|
|
52
|
+
emitFormChange
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const kbdKeysMap: {
|
|
2
|
+
meta: string;
|
|
3
|
+
command: string;
|
|
4
|
+
shift: string;
|
|
5
|
+
ctrl: string;
|
|
6
|
+
option: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
enter: string;
|
|
9
|
+
delete: string;
|
|
10
|
+
backspace: string;
|
|
11
|
+
escape: string;
|
|
12
|
+
tab: string;
|
|
13
|
+
capslock: string;
|
|
14
|
+
arrowup: string;
|
|
15
|
+
arrowright: string;
|
|
16
|
+
arrowdown: string;
|
|
17
|
+
arrowleft: string;
|
|
18
|
+
pageup: string;
|
|
19
|
+
pagedown: string;
|
|
20
|
+
home: string;
|
|
21
|
+
end: string;
|
|
22
|
+
};
|
|
23
|
+
export type KbdKey = keyof typeof kbdKeysMap;
|
|
24
|
+
export declare const useKbd: () => {
|
|
25
|
+
macOS: import("vue").ComputedRef<false | "" | RegExpMatchArray | null | undefined>;
|
|
26
|
+
metaSymbol: import("vue").Ref<string, string>;
|
|
27
|
+
getKbdKey: (value?: KbdKey | string) => string | undefined;
|
|
28
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createSharedComposable } from "@vueuse/core";
|
|
2
|
+
import { ref, computed, onMounted } from "vue";
|
|
3
|
+
export const kbdKeysMap = {
|
|
4
|
+
meta: "",
|
|
5
|
+
command: "\u2318",
|
|
6
|
+
shift: "\u21E7",
|
|
7
|
+
ctrl: "\u2303",
|
|
8
|
+
option: "\u2325",
|
|
9
|
+
alt: "\u2387",
|
|
10
|
+
enter: "\u21B5",
|
|
11
|
+
delete: "\u2326",
|
|
12
|
+
backspace: "\u232B",
|
|
13
|
+
escape: "\u238B",
|
|
14
|
+
tab: "\u21E5",
|
|
15
|
+
capslock: "\u21EA",
|
|
16
|
+
arrowup: "\u2191",
|
|
17
|
+
arrowright: "\u2192",
|
|
18
|
+
arrowdown: "\u2193",
|
|
19
|
+
arrowleft: "\u2190",
|
|
20
|
+
pageup: "\u21DE",
|
|
21
|
+
pagedown: "\u21DF",
|
|
22
|
+
home: "\u2196",
|
|
23
|
+
end: "\u2198"
|
|
24
|
+
};
|
|
25
|
+
const _useKbd = () => {
|
|
26
|
+
const macOS = computed(() => import.meta.client && navigator && navigator.userAgent && navigator.userAgent.match(/Macintosh;/));
|
|
27
|
+
const metaSymbol = ref(" ");
|
|
28
|
+
onMounted(() => {
|
|
29
|
+
metaSymbol.value = macOS.value ? kbdKeysMap.command : kbdKeysMap.ctrl;
|
|
30
|
+
});
|
|
31
|
+
function getKbdKey(value) {
|
|
32
|
+
if (!value) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (value === "meta") {
|
|
36
|
+
return metaSymbol.value;
|
|
37
|
+
}
|
|
38
|
+
return kbdKeysMap[value] || value.toUpperCase();
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
macOS,
|
|
42
|
+
metaSymbol,
|
|
43
|
+
getKbdKey
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export const useKbd = createSharedComposable(_useKbd);
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { ShallowRef, Component, InjectionKey } from 'vue';
|
|
2
|
+
import type { ModalProps } from '../types/index.js';
|
|
2
3
|
import type { ComponentProps } from '../types/component.js';
|
|
3
|
-
|
|
4
|
+
export interface ModalState {
|
|
5
|
+
component: Component | string;
|
|
6
|
+
props: ModalProps;
|
|
7
|
+
}
|
|
4
8
|
export declare const modalInjectionKey: InjectionKey<ShallowRef<ModalState>>;
|
|
5
9
|
declare function _useModal(): {
|
|
6
|
-
open: <T extends Component>(component: T, props?:
|
|
10
|
+
open: <T extends Component>(component: T, props?: ModalProps & ComponentProps<T>) => void;
|
|
7
11
|
close: () => Promise<void>;
|
|
8
12
|
reset: () => void;
|
|
9
|
-
patch: <T extends Component =
|
|
10
|
-
isOpen: import("vue").Ref<boolean>;
|
|
13
|
+
patch: <T extends Component = Record<string, never>>(props: Partial<ModalProps & ComponentProps<T>>) => void;
|
|
14
|
+
isOpen: import("vue").Ref<boolean, boolean>;
|
|
11
15
|
};
|
|
12
16
|
export declare const useModal: typeof _useModal;
|
|
13
17
|
export {};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { ShallowRef, Component, InjectionKey } from 'vue';
|
|
2
|
+
import type { SlideoverProps } from '../types/index.js';
|
|
2
3
|
import type { ComponentProps } from '../types/component.js';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
export interface SlideoverState {
|
|
5
|
+
component: Component | string;
|
|
6
|
+
props: SlideoverProps;
|
|
7
|
+
}
|
|
8
|
+
export declare const slideoverInjectionKey: InjectionKey<ShallowRef<SlideoverState>>;
|
|
5
9
|
declare function _useSlideover(): {
|
|
6
|
-
open: <T extends Component>(component: T, props?:
|
|
10
|
+
open: <T extends Component>(component: T, props?: SlideoverProps & ComponentProps<T>) => void;
|
|
7
11
|
close: () => Promise<void>;
|
|
8
12
|
reset: () => void;
|
|
9
|
-
patch: <T extends Component =
|
|
10
|
-
isOpen: import("vue").Ref<boolean>;
|
|
13
|
+
patch: <T extends Component = Record<string, never>>(props: Partial<SlideoverState & ComponentProps<T>>) => void;
|
|
14
|
+
isOpen: import("vue").Ref<boolean, boolean>;
|
|
11
15
|
};
|
|
12
16
|
export declare const useSlideover: typeof _useSlideover;
|
|
13
17
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref, inject } from "vue";
|
|
2
2
|
import { createSharedComposable } from "@vueuse/core";
|
|
3
|
-
export const
|
|
3
|
+
export const slideoverInjectionKey = Symbol("nuxt-ui.slideover");
|
|
4
4
|
function _useSlideover() {
|
|
5
|
-
const slideoverState = inject(
|
|
5
|
+
const slideoverState = inject(slideoverInjectionKey);
|
|
6
6
|
const isOpen = ref(false);
|
|
7
7
|
function open(component, props) {
|
|
8
8
|
if (!slideoverState) {
|
|
@@ -19,6 +19,7 @@ function _useSlideover() {
|
|
|
19
19
|
isOpen.value = false;
|
|
20
20
|
}
|
|
21
21
|
function reset() {
|
|
22
|
+
if (!slideoverState) return;
|
|
22
23
|
slideoverState.value = {
|
|
23
24
|
component: "div",
|
|
24
25
|
props: {}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ToastProps } from '../types/index.js';
|
|
2
|
+
export interface Toast extends Omit<ToastProps, 'defaultOpen'> {
|
|
3
|
+
id: string | number;
|
|
4
|
+
click?: (toast: Toast) => void;
|
|
5
|
+
}
|
|
2
6
|
export declare function useToast(): {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
icon?: string;
|
|
8
|
-
avatar?: import("../types").Avatar;
|
|
9
|
-
closeButton?: import("../types").Button;
|
|
10
|
-
timeout?: number;
|
|
11
|
-
actions?: import("../types").NotificationAction[];
|
|
12
|
-
click?: (...args: any[]) => void;
|
|
13
|
-
callback?: (...args: any[]) => void;
|
|
14
|
-
color?: import("../types").NotificationColor;
|
|
15
|
-
ui?: any;
|
|
16
|
-
};
|
|
17
|
-
remove: (id: string) => void;
|
|
18
|
-
update: (id: string, notification: Partial<Notification>) => void;
|
|
7
|
+
toasts: import("vue").Ref<Toast[], Toast[]>;
|
|
8
|
+
add: (toast: Partial<Toast>) => Toast;
|
|
9
|
+
update: (id: string | number, toast: Partial<Toast>) => void;
|
|
10
|
+
remove: (id: string | number) => void;
|
|
19
11
|
clear: () => void;
|
|
20
12
|
};
|
|
@@ -1,34 +1,48 @@
|
|
|
1
1
|
import { useState } from "#imports";
|
|
2
2
|
export function useToast() {
|
|
3
|
-
const
|
|
4
|
-
function add(
|
|
3
|
+
const toasts = useState("toasts", () => []);
|
|
4
|
+
function add(toast) {
|
|
5
5
|
const body = {
|
|
6
6
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
7
|
-
|
|
7
|
+
open: true,
|
|
8
|
+
...toast
|
|
8
9
|
};
|
|
9
|
-
const index =
|
|
10
|
+
const index = toasts.value.findIndex((t) => t.id === body.id);
|
|
10
11
|
if (index === -1) {
|
|
11
|
-
|
|
12
|
+
toasts.value.push(body);
|
|
12
13
|
}
|
|
14
|
+
toasts.value = toasts.value.slice(-5);
|
|
13
15
|
return body;
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
+
function update(id, toast) {
|
|
18
|
+
const index = toasts.value.findIndex((t) => t.id === id);
|
|
19
|
+
if (index !== -1) {
|
|
20
|
+
toasts.value[index] = {
|
|
21
|
+
...toasts.value[index],
|
|
22
|
+
...toast
|
|
23
|
+
};
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
|
-
function
|
|
19
|
-
const index =
|
|
26
|
+
function remove(id) {
|
|
27
|
+
const index = toasts.value.findIndex((t) => t.id === id);
|
|
20
28
|
if (index !== -1) {
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
toasts.value[index] = {
|
|
30
|
+
...toasts.value[index],
|
|
31
|
+
open: false
|
|
32
|
+
};
|
|
23
33
|
}
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
toasts.value = toasts.value.filter((t) => t.id !== id);
|
|
36
|
+
}, 200);
|
|
24
37
|
}
|
|
25
38
|
function clear() {
|
|
26
|
-
|
|
39
|
+
toasts.value = [];
|
|
27
40
|
}
|
|
28
41
|
return {
|
|
42
|
+
toasts,
|
|
29
43
|
add,
|
|
30
|
-
remove,
|
|
31
44
|
update,
|
|
45
|
+
remove,
|
|
32
46
|
clear
|
|
33
47
|
};
|
|
34
48
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@theme{--color-gray-*:initial;--color-cool-50:#f9fafb;--color-cool-100:#f3f4f6;--color-cool-200:#e5e7eb;--color-cool-300:#d1d5db;--color-cool-400:#9ca3af;--color-cool-500:#6b7280;--color-cool-600:#4b5563;--color-cool-700:#374151;--color-cool-800:#1f2937;--color-cool-900:#111827;--color-cool-950:#030712;--spacing-4_5:1.125rem;--color-primary-50:var(--color-primary-50);--color-primary-100:var(--color-primary-100);--color-primary-200:var(--color-primary-200);--color-primary-300:var(--color-primary-300);--color-primary-400:var(--color-primary-400);--color-primary-500:var(--color-primary-500);--color-primary-600:var(--color-primary-600);--color-primary-700:var(--color-primary-700);--color-primary-800:var(--color-primary-800);--color-primary-900:var(--color-primary-900);--color-primary-950:var(--color-primary-950);--color-error-50:var(--color-error-50);--color-error-100:var(--color-error-100);--color-error-200:var(--color-error-200);--color-error-300:var(--color-error-300);--color-error-400:var(--color-error-400);--color-error-500:var(--color-error-500);--color-error-600:var(--color-error-600);--color-error-700:var(--color-error-700);--color-error-800:var(--color-error-800);--color-error-900:var(--color-error-900);--color-error-950:var(--color-error-950);--color-gray-50:var(--color-gray-50);--color-gray-100:var(--color-gray-100);--color-gray-200:var(--color-gray-200);--color-gray-300:var(--color-gray-300);--color-gray-400:var(--color-gray-400);--color-gray-500:var(--color-gray-500);--color-gray-600:var(--color-gray-600);--color-gray-700:var(--color-gray-700);--color-gray-800:var(--color-gray-800);--color-gray-900:var(--color-gray-900);--color-gray-950:var(--color-gray-950)}@layer base{:root{color-scheme:light dark}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}@keyframes collapsible-up{0%{height:var(--radix-collapsible-content-height)}to{height:0}}@keyframes collapsible-down{0%{height:0}to{height:var(--radix-collapsible-content-height)}}@keyframes toast-collapsed-closed{0%{transform:var(--transform)}to{transform:translateY(calc((var(--before) - var(--height))*var(--gap))) scale(var(--scale))}}@keyframes toast-closed{0%{transform:var(--transform)}to{transform:translateY(calc((var(--offset) - var(--height))*var(--translate-factor)))}}@keyframes toast-slide-left{0%{transform:translateX(0) translateY(var(--translate))}to{transform:translateX(-100%) translateY(var(--translate))}}@keyframes toast-slide-right{0%{transform:translateX(0) translateY(var(--translate))}to{transform:translateX(100%) translateY(var(--translate))}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-from-top{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slide-out-to-top{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes slide-in-from-right{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-out-to-right{0%{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slide-in-from-bottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slide-out-to-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slide-in-from-left{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-out-to-left{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes slide-in-from-top-and-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-out-to-top-and-fade{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes slide-in-from-right-and-fade{0%{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-to-right-and-fade{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes slide-in-from-bottom-and-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-out-to-bottom-and-fade{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes slide-in-from-left-and-fade{0%{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-to-left-and-fade{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes enter-from-right{0%{opacity:0;transform:translateX(200px)}to{opacity:1;transform:translateX(0)}}@keyframes enter-from-left{0%{opacity:0;transform:translateX(-200px)}to{opacity:1;transform:translateX(0)}}@keyframes exit-to-right{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(200px)}}@keyframes exit-to-left{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-200px)}}@keyframes carousel{0%,to{width:50%}0%{transform:translateX(-100%)}to{transform:translateX(200%)}}@keyframes carousel-vertical{0%,to{height:50%}0%{transform:translateY(-100%)}to{transform:translateY(200%)}}@keyframes carousel-inverse{0%,to{width:50%}0%{transform:translateX(200%)}to{transform:translateX(-100%)}}@keyframes carousel-inverse-vertical{0%,to{height:50%}0%{transform:translateY(200%)}to{transform:translateY(-100%)}}@keyframes swing{0%,to{width:50%}0%,to{transform:translateX(-25%)}50%{transform:translateX(125%)}}@keyframes swing-vertical{0%,to{height:50%}0%,to{transform:translateY(-25%)}50%{transform:translateY(125%)}}@keyframes elastic{0%,to{margin-left:25%;width:50%}50%{margin-left:5%;width:90%}}@keyframes elastic-vertical{0%,to{height:50%;margin-top:25%}50%{height:90%;margin-top:5%}}}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
|
-
import { get, hexToRgb } from "../utils/index.js";
|
|
3
2
|
import { defineNuxtPlugin, useAppConfig, useNuxtApp, useHead } from "#imports";
|
|
4
|
-
import colors from "#tailwind-config/theme/colors";
|
|
5
3
|
export default defineNuxtPlugin(() => {
|
|
6
4
|
const appConfig = useAppConfig();
|
|
7
5
|
const nuxtApp = useNuxtApp();
|
|
6
|
+
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
7
|
+
function generateColor(key, value) {
|
|
8
|
+
return `${shades.map((shade) => `--color-${key}-${shade}: var(--color-${value}-${shade});`).join("\n ")}`;
|
|
9
|
+
}
|
|
8
10
|
const root = computed(() => {
|
|
9
|
-
const primary = get(colors, appConfig.ui.primary);
|
|
10
|
-
const gray = get(colors, appConfig.ui.gray);
|
|
11
|
-
if (!primary) {
|
|
12
|
-
console.warn(`[@nuxt/ui] Primary color '${appConfig.ui.primary}' not found in Tailwind config`);
|
|
13
|
-
}
|
|
14
|
-
if (!gray) {
|
|
15
|
-
console.warn(`[@nuxt/ui] Gray color '${appConfig.ui.gray}' not found in Tailwind config`);
|
|
16
|
-
}
|
|
17
11
|
return `:root {
|
|
18
|
-
${Object.entries(
|
|
19
|
-
--color-primary-DEFAULT: var(--color-primary-500);
|
|
20
|
-
|
|
21
|
-
${Object.entries(gray || colors.cool).map(([key, value]) => `--color-gray-${key}: ${hexToRgb(value)};`).join("\n")}
|
|
12
|
+
${Object.entries(appConfig.ui.colors).map(([key, value]) => generateColor(key, value)).join("\n ")}
|
|
13
|
+
--color-primary-DEFAULT: var(--color-primary-500);
|
|
22
14
|
}
|
|
23
|
-
|
|
24
|
-
.dark {
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
25
16
|
--color-primary-DEFAULT: var(--color-primary-400);
|
|
26
17
|
}
|
|
27
18
|
`;
|
|
@@ -30,7 +21,8 @@ ${Object.entries(gray || colors.cool).map(([key, value]) => `--color-gray-${key}
|
|
|
30
21
|
style: [{
|
|
31
22
|
innerHTML: () => root.value,
|
|
32
23
|
tagPriority: -2,
|
|
33
|
-
id: "nuxt-ui-colors"
|
|
24
|
+
id: "nuxt-ui-colors",
|
|
25
|
+
type: "text/css"
|
|
34
26
|
}]
|
|
35
27
|
};
|
|
36
28
|
if (import.meta.client && nuxtApp.isHydrating && !nuxtApp.payload.serverRendered) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from "#imports";
|
|
2
1
|
import { shallowRef } from "vue";
|
|
3
|
-
import {
|
|
2
|
+
import { defineNuxtPlugin } from "#imports";
|
|
3
|
+
import { slideoverInjectionKey } from "../composables/useSlideover.js";
|
|
4
4
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
5
5
|
const slideoverState = shallowRef({
|
|
6
6
|
component: "div",
|
|
7
7
|
props: {}
|
|
8
8
|
});
|
|
9
|
-
nuxtApp.vueApp.provide(
|
|
9
|
+
nuxtApp.vueApp.provide(slideoverInjectionKey, slideoverState);
|
|
10
10
|
});
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
export type ComponentProps<T> =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export type ComponentEmit<T> =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export type ComponentProps<T> = T extends new () => {
|
|
2
|
+
$props: infer P;
|
|
3
|
+
} ? NonNullable<P> : T extends (props: infer P, ...args: any) => any ? P : Record<string, never>;
|
|
4
|
+
export type ComponentSlots<T> = T extends new () => {
|
|
5
|
+
$slots: infer S;
|
|
6
|
+
} ? NonNullable<S> : T extends (props: any, ctx: {
|
|
7
|
+
slots: infer S;
|
|
8
|
+
attrs: any;
|
|
9
|
+
emit: any;
|
|
10
|
+
}, ...args: any) => any ? NonNullable<S> : Record<string, never>;
|
|
11
|
+
export type ComponentEmit<T> = T extends new () => {
|
|
12
|
+
$emit: infer E;
|
|
13
|
+
} ? NonNullable<E> : T extends (props: any, ctx: {
|
|
14
|
+
slots: any;
|
|
15
|
+
attrs: any;
|
|
16
|
+
emit: infer E;
|
|
17
|
+
}, ...args: any) => any ? NonNullable<E> : Record<string, never>;
|
|
File without changes
|
|
@@ -1,38 +1,68 @@
|
|
|
1
|
-
import type { Ref } from 'vue'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { ZodSchema } from 'zod';
|
|
3
|
+
import type { Schema as JoiSchema } from 'joi';
|
|
4
|
+
import type { ObjectSchema as YupObjectSchema } from 'yup';
|
|
5
|
+
import type { GenericSchema as ValibotSchema, GenericSchemaAsync as ValibotSchemaAsync, SafeParser as ValibotSafeParser, SafeParserAsync as ValibotSafeParserAsync } from 'valibot';
|
|
6
|
+
import type { GetObjectField } from './utils.js';
|
|
7
|
+
export interface Form<T> {
|
|
8
|
+
validate(opts?: {
|
|
9
|
+
name: string | string[];
|
|
10
|
+
silent?: false;
|
|
11
|
+
nested?: boolean;
|
|
12
|
+
}): Promise<T | false>;
|
|
13
|
+
clear(path?: string): void;
|
|
14
|
+
errors: Ref<FormError[]>;
|
|
15
|
+
setErrors(errs: FormError[], path?: string): void;
|
|
16
|
+
getErrors(path?: string): FormError[];
|
|
17
|
+
submit(): Promise<void>;
|
|
18
|
+
disabled: ComputedRef<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export type FormSchema<T extends Record<string, any>> = ZodSchema | YupObjectSchema<T> | ValibotSchema | ValibotSchemaAsync | ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any> | JoiSchema<T>;
|
|
21
|
+
export type FormInputEvents = 'input' | 'blur' | 'change';
|
|
22
|
+
export interface FormError<P extends string = string> {
|
|
23
|
+
name: P;
|
|
24
|
+
message: string;
|
|
6
25
|
}
|
|
7
|
-
|
|
8
26
|
export interface FormErrorWithId extends FormError {
|
|
9
|
-
|
|
27
|
+
id?: string;
|
|
10
28
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
29
|
+
export type FormSubmitEvent<T> = SubmitEvent & {
|
|
30
|
+
data: T;
|
|
31
|
+
};
|
|
32
|
+
export type FormValidationError = {
|
|
33
|
+
errors: FormErrorWithId[];
|
|
34
|
+
childrens: FormValidationError[];
|
|
35
|
+
};
|
|
36
|
+
export type FormErrorEvent = SubmitEvent & FormValidationError;
|
|
37
|
+
export type FormEventType = FormInputEvents;
|
|
38
|
+
export type FormChildAttachEvent = {
|
|
39
|
+
type: 'attach';
|
|
40
|
+
formId: string | number;
|
|
41
|
+
validate: Form<any>['validate'];
|
|
42
|
+
};
|
|
43
|
+
export type FormChildDetachEvent = {
|
|
44
|
+
type: 'detach';
|
|
45
|
+
formId: string | number;
|
|
46
|
+
};
|
|
47
|
+
export type FormInputEvent = {
|
|
48
|
+
type: FormEventType;
|
|
49
|
+
name?: string;
|
|
50
|
+
};
|
|
51
|
+
export type FormEvent = FormInputEvent | FormChildAttachEvent | FormChildDetachEvent;
|
|
52
|
+
export interface FormInjectedOptions {
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
validateOnInputDelay?: number;
|
|
20
55
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export interface FormEvent {
|
|
28
|
-
type: FormEventType
|
|
29
|
-
path?: string
|
|
56
|
+
export interface FormFieldInjectedOptions<T> {
|
|
57
|
+
name?: string;
|
|
58
|
+
size?: GetObjectField<T, 'size'>;
|
|
59
|
+
error?: string | boolean;
|
|
60
|
+
eagerValidation?: boolean;
|
|
61
|
+
validateOnInputDelay?: number;
|
|
30
62
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
error: Ref<string | boolean | undefined>
|
|
37
|
-
eagerValidation: Ref<boolean>
|
|
63
|
+
export declare class FormValidationException extends Error {
|
|
64
|
+
formId: string | number;
|
|
65
|
+
errors: FormErrorWithId[];
|
|
66
|
+
childrens: FormValidationException[];
|
|
67
|
+
constructor(formId: string | number, errors: FormErrorWithId[], childErrors: FormValidationException[]);
|
|
38
68
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class FormValidationException extends Error {
|
|
2
|
+
formId;
|
|
3
|
+
errors;
|
|
4
|
+
childrens;
|
|
5
|
+
constructor(formId, errors, childErrors) {
|
|
6
|
+
super("Form validation exception");
|
|
7
|
+
this.formId = formId;
|
|
8
|
+
this.errors = errors;
|
|
9
|
+
this.childrens = childErrors;
|
|
10
|
+
Object.setPrototypeOf(this, FormValidationException.prototype);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,31 +1,42 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
9
|
-
export * from '
|
|
10
|
-
export * from '
|
|
11
|
-
export * from '
|
|
12
|
-
export * from '
|
|
1
|
+
export * from '../components/Accordion.vue.js';
|
|
2
|
+
export * from '../components/Alert.vue.js';
|
|
3
|
+
export * from '../components/App.vue.js';
|
|
4
|
+
export * from '../components/Avatar.vue.js';
|
|
5
|
+
export * from '../components/AvatarGroup.vue.js';
|
|
6
|
+
export * from '../components/Badge.vue.js';
|
|
7
|
+
export * from '../components/Breadcrumb.vue.js';
|
|
8
|
+
export * from '../components/Button.vue.js';
|
|
9
|
+
export * from '../components/Card.vue.js';
|
|
10
|
+
export * from '../components/Checkbox.vue.js';
|
|
11
|
+
export * from '../components/Chip.vue.js';
|
|
12
|
+
export * from '../components/Collapsible.vue.js';
|
|
13
|
+
export * from '../components/CommandPalette.vue.js';
|
|
14
|
+
export * from '../components/Container.vue.js';
|
|
15
|
+
export * from '../components/ContextMenu.vue.js';
|
|
16
|
+
export * from '../components/Drawer.vue.js';
|
|
17
|
+
export * from '../components/DropdownMenu.vue.js';
|
|
18
|
+
export * from '../components/Form.vue.js';
|
|
19
|
+
export * from '../components/FormField.vue.js';
|
|
20
|
+
export * from '../components/Input.vue.js';
|
|
21
|
+
export * from '../components/InputMenu.vue.js';
|
|
22
|
+
export * from '../components/Kbd.vue.js';
|
|
23
|
+
export * from '../components/Link.vue.js';
|
|
24
|
+
export * from '../components/Modal.vue.js';
|
|
25
|
+
export * from '../components/NavigationMenu.vue.js';
|
|
26
|
+
export * from '../components/Pagination.vue.js';
|
|
27
|
+
export * from '../components/Popover.vue.js';
|
|
28
|
+
export * from '../components/Progress.vue.js';
|
|
29
|
+
export * from '../components/RadioGroup.vue.js';
|
|
30
|
+
export * from '../components/Select.vue.js';
|
|
31
|
+
export * from '../components/SelectMenu.vue.js';
|
|
32
|
+
export * from '../components/Separator.vue.js';
|
|
33
|
+
export * from '../components/Skeleton.vue.js';
|
|
34
|
+
export * from '../components/Slideover.vue.js';
|
|
35
|
+
export * from '../components/Slider.vue.js';
|
|
36
|
+
export * from '../components/Switch.vue.js';
|
|
37
|
+
export * from '../components/Tabs.vue.js';
|
|
38
|
+
export * from '../components/Textarea.vue.js';
|
|
39
|
+
export * from '../components/Toast.vue.js';
|
|
40
|
+
export * from '../components/Toaster.vue.js';
|
|
41
|
+
export * from '../components/Tooltip.vue.js';
|
|
13
42
|
export * from './form.js';
|
|
14
|
-
export * from './horizontal-navigation.js';
|
|
15
|
-
export * from './input.js';
|
|
16
|
-
export * from './kbd.js';
|
|
17
|
-
export * from './link.js';
|
|
18
|
-
export * from './meter.js';
|
|
19
|
-
export * from './modal.js';
|
|
20
|
-
export * from './slideover.js';
|
|
21
|
-
export * from './notification.js';
|
|
22
|
-
export * from './popper.js';
|
|
23
|
-
export * from './progress.js';
|
|
24
|
-
export * from './range.js';
|
|
25
|
-
export * from './select.js';
|
|
26
|
-
export * from './tabs.js';
|
|
27
|
-
export * from './textarea.js';
|
|
28
|
-
export * from './toggle.js';
|
|
29
|
-
export * from './tooltip.js';
|
|
30
|
-
export * from './vertical-navigation.js';
|
|
31
|
-
export * from './utils.js';
|