@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
package/README.md
CHANGED
|
@@ -27,7 +27,24 @@ Read more on [ui.nuxt.com](https://ui.nuxt.com)
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
# npm
|
|
31
|
+
npm install @nuxt/ui
|
|
32
|
+
# yarn
|
|
33
|
+
yarn add @nuxt/ui
|
|
34
|
+
# pnpm
|
|
35
|
+
pnpm add @nuxt/ui
|
|
36
|
+
# bun
|
|
37
|
+
bun add @nuxt/ui
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Then, register the module in your `nuxt.config.ts`:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
export default defineNuxtConfig({
|
|
44
|
+
modules: [
|
|
45
|
+
'@nuxt/ui'
|
|
46
|
+
]
|
|
47
|
+
})
|
|
31
48
|
```
|
|
32
49
|
|
|
33
50
|
If you want latest updates, please use `@nuxt/ui-edge` in your `package.json`:
|
|
@@ -77,7 +94,7 @@ Licensed under the [MIT license](https://github.com/nuxt/ui/blob/dev/LICENSE.md)
|
|
|
77
94
|
[npm-downloads-href]: https://npmjs.com/package/@nuxt/ui
|
|
78
95
|
|
|
79
96
|
[license-src]: https://img.shields.io/github/license/nuxt/ui.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
80
|
-
[license-href]: https://github.com/nuxt/ui/blob/main/LICENSE
|
|
97
|
+
[license-href]: https://github.com/nuxt/ui/blob/main/LICENSE.md
|
|
81
98
|
|
|
82
99
|
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
|
|
83
100
|
[nuxt-href]: https://nuxt.com
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { existsSync, promises as fsp } from 'node:fs'
|
|
2
|
+
import { resolve } from 'pathe'
|
|
3
|
+
import { defineCommand } from 'citty'
|
|
4
|
+
import { consola } from 'consola'
|
|
5
|
+
import { splitByCase, upperFirst, camelCase, kebabCase } from 'scule'
|
|
6
|
+
import { appendFile, sortFile } from '../utils.mjs'
|
|
7
|
+
import templates from '../templates.mjs'
|
|
8
|
+
|
|
9
|
+
export default defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: 'init',
|
|
12
|
+
description: 'Init a new component.'
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
name: {
|
|
16
|
+
type: 'positional',
|
|
17
|
+
required: true,
|
|
18
|
+
description: 'Name of the component.'
|
|
19
|
+
},
|
|
20
|
+
primitive: {
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
description: 'Create a primitive component.'
|
|
23
|
+
},
|
|
24
|
+
pro: {
|
|
25
|
+
type: 'boolean',
|
|
26
|
+
description: 'Create a pro component.'
|
|
27
|
+
},
|
|
28
|
+
prose: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
description: 'Create a prose component (with --pro).'
|
|
31
|
+
},
|
|
32
|
+
content: {
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
description: 'Create a content component (with --pro).'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
async setup({ args }) {
|
|
38
|
+
const name = args.name
|
|
39
|
+
if (!name) {
|
|
40
|
+
consola.error('`name` argument is missing!')
|
|
41
|
+
process.exit(1)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (args.prose && !args.pro) {
|
|
45
|
+
consola.error('`--prose` flag can only be used with `--pro` flag!')
|
|
46
|
+
process.exit(1)
|
|
47
|
+
}
|
|
48
|
+
if (args.content && !args.pro) {
|
|
49
|
+
consola.error('`--content` flag can only be used with `--pro` flag!')
|
|
50
|
+
process.exit(1)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const path = resolve('.')
|
|
54
|
+
|
|
55
|
+
for (const template of Object.keys(templates)) {
|
|
56
|
+
const { filename, contents } = templates[template](args)
|
|
57
|
+
if (!contents) {
|
|
58
|
+
continue
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const filePath = resolve(path, filename)
|
|
62
|
+
|
|
63
|
+
if (existsSync(filePath)) {
|
|
64
|
+
consola.error(`🚨 ${filePath} already exists!`)
|
|
65
|
+
continue
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
await fsp.writeFile(filePath, contents.trim() + '\n')
|
|
69
|
+
|
|
70
|
+
consola.success(`🪄 Generated ${filePath}!`)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const themePath = resolve(path, `src/theme/${args.prose ? 'prose/' : ''}${args.content ? 'content/' : ''}index.ts`)
|
|
74
|
+
await appendFile(themePath, `export { default as ${camelCase(name)} } from './${kebabCase(name)}'`)
|
|
75
|
+
await sortFile(themePath)
|
|
76
|
+
|
|
77
|
+
if (!args.prose) {
|
|
78
|
+
const typesPath = resolve(path, 'src/runtime/types/index.d.ts')
|
|
79
|
+
await appendFile(typesPath, `export * from '../components/${args.content ? 'content/' : ''}${splitByCase(name).map(p => upperFirst(p)).join('')}.vue'`)
|
|
80
|
+
await sortFile(typesPath)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
})
|
package/cli/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { defineCommand, runMain } from 'citty'
|
|
3
|
+
import init from './commands/init.mjs'
|
|
4
|
+
|
|
5
|
+
const main = defineCommand({
|
|
6
|
+
meta: {
|
|
7
|
+
name: 'nuxt-ui',
|
|
8
|
+
description: 'Nuxt UI CLI'
|
|
9
|
+
},
|
|
10
|
+
subCommands: {
|
|
11
|
+
init
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
runMain(main)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Pooya Parsa <pooya@pi0.io>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Parser is based on https://github.com/lukeed/mri
|
|
26
|
+
|
|
27
|
+
The MIT License (MIT)
|
|
28
|
+
|
|
29
|
+
Copyright (c) Luke Edwards luke.edwards05@gmail.com (lukeed.com)
|
|
30
|
+
|
|
31
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
32
|
+
|
|
33
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
34
|
+
|
|
35
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
36
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# 🌆 citty
|
|
2
|
+
|
|
3
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
|
+
[![bundle][bundle-src]][bundle-href]
|
|
6
|
+
[![Codecov][codecov-src]][codecov-href]
|
|
7
|
+
[![License][license-src]][license-href]
|
|
8
|
+
|
|
9
|
+
> Elegant CLI Builder
|
|
10
|
+
|
|
11
|
+
- Fast and lightweight argument parser based on [mri](https://github.com/lukeed/mri)
|
|
12
|
+
- Smart value parsing with typecast, boolean shortcuts and unknown flag handling
|
|
13
|
+
- Nested sub-commands
|
|
14
|
+
- Lazy and Async commands
|
|
15
|
+
- Plugable and composable API
|
|
16
|
+
- Auto generated usage and help
|
|
17
|
+
|
|
18
|
+
🚧 This project is under heavy development. More features are coming soon!
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
Install package:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
# npm
|
|
26
|
+
npm install citty
|
|
27
|
+
|
|
28
|
+
# yarn
|
|
29
|
+
yarn add citty
|
|
30
|
+
|
|
31
|
+
# pnpm
|
|
32
|
+
pnpm install citty
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Import:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
// ESM
|
|
39
|
+
import { defineCommand, runMain } from "citty";
|
|
40
|
+
|
|
41
|
+
// CommonJS
|
|
42
|
+
const { defineCommand, runMain } = require("citty");
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Define main command to run:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { defineCommand, runMain } from "citty";
|
|
49
|
+
|
|
50
|
+
const main = defineCommand({
|
|
51
|
+
meta: {
|
|
52
|
+
name: "hello",
|
|
53
|
+
version: "1.0.0",
|
|
54
|
+
description: "My Awesome CLI App",
|
|
55
|
+
},
|
|
56
|
+
args: {
|
|
57
|
+
name: {
|
|
58
|
+
type: "positional",
|
|
59
|
+
description: "Your name",
|
|
60
|
+
required: true,
|
|
61
|
+
},
|
|
62
|
+
friendly: {
|
|
63
|
+
type: "boolean",
|
|
64
|
+
description: "Use friendly greeting",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
run({ args }) {
|
|
68
|
+
console.log(`${args.friendly ? "Hi" : "Greetings"} ${args.name}!`);
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
runMain(main);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Utils
|
|
76
|
+
|
|
77
|
+
### `defineCommand`
|
|
78
|
+
|
|
79
|
+
`defineCommand` is a type helper for defining commands.
|
|
80
|
+
|
|
81
|
+
### `runMain`
|
|
82
|
+
|
|
83
|
+
Runs a command with usage support and graceful error handling.
|
|
84
|
+
|
|
85
|
+
### `createMain`
|
|
86
|
+
|
|
87
|
+
Create a wrapper around command that calls `runMain` when called.
|
|
88
|
+
|
|
89
|
+
### `runCommand`
|
|
90
|
+
|
|
91
|
+
Parses input args and runs command and sub-commands (unsupervised). You can access `result` key from returnd/awaited value to access command's result.
|
|
92
|
+
|
|
93
|
+
### `parseArgs`
|
|
94
|
+
|
|
95
|
+
Parses input arguments and applies defaults.
|
|
96
|
+
|
|
97
|
+
### `renderUsage`
|
|
98
|
+
|
|
99
|
+
Renders command usage to a string value.
|
|
100
|
+
|
|
101
|
+
### `showUsage`
|
|
102
|
+
|
|
103
|
+
Renders usage and prints to the console
|
|
104
|
+
|
|
105
|
+
## Development
|
|
106
|
+
|
|
107
|
+
- Clone this repository
|
|
108
|
+
- Install latest LTS version of [Node.js](https://nodejs.org/en/)
|
|
109
|
+
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
|
|
110
|
+
- Install dependencies using `pnpm install`
|
|
111
|
+
- Run interactive tests using `pnpm dev`
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
Made with 💛 Published under [MIT License](./LICENSE).
|
|
116
|
+
|
|
117
|
+
Argument parser is based on [lukeed/mri](https://github.com/lukeed/mri) by Luke Edwards ([@lukeed](https://github.com/lukeed)).
|
|
118
|
+
|
|
119
|
+
<!-- Badges -->
|
|
120
|
+
|
|
121
|
+
<!-- Badges -->
|
|
122
|
+
|
|
123
|
+
[npm-version-src]: https://img.shields.io/npm/v/citty?style=flat&colorA=18181B&colorB=F0DB4F
|
|
124
|
+
[npm-version-href]: https://npmjs.com/package/citty
|
|
125
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/citty?style=flat&colorA=18181B&colorB=F0DB4F
|
|
126
|
+
[npm-downloads-href]: https://npmjs.com/package/citty
|
|
127
|
+
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/citty/main?style=flat&colorA=18181B&colorB=F0DB4F
|
|
128
|
+
[codecov-href]: https://codecov.io/gh/unjs/citty
|
|
129
|
+
[bundle-src]: https://img.shields.io/bundlephobia/minzip/citty?style=flat&colorA=18181B&colorB=F0DB4F
|
|
130
|
+
[bundle-href]: https://bundlephobia.com/result?p=citty
|
|
131
|
+
[license-src]: https://img.shields.io/github/license/unjs/citty.svg?style=flat&colorA=18181B&colorB=F0DB4F
|
|
132
|
+
[license-href]: https://github.com/unjs/citty/blob/main/LICENSE
|
|
133
|
+
[jsdocs-src]: https://img.shields.io/badge/jsDocs.io-reference-18181B?style=flat&colorA=18181B&colorB=F0DB4F
|
|
134
|
+
[jsdocs-href]: https://www.jsdocs.io/package/citty
|