@ghostvue/themes 0.0.0-stage → 0.2.0
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/LICENSE +22 -0
- package/README.md +59 -2
- package/THIRD_PARTY_NOTICES.md +30 -0
- package/dist/base.css +341 -0
- package/dist/calm.css +1909 -0
- package/dist/components.d.ts +153 -0
- package/dist/components.js +148 -0
- package/dist/default.css +11271 -0
- package/dist/define.d.ts +75 -0
- package/dist/define.js +5952 -0
- package/dist/flagship-themes.d.ts +5 -0
- package/dist/flagship-themes.js +3 -0
- package/dist/generated/tokens.d.ts +5286 -0
- package/dist/generated/tokens.js +5283 -0
- package/dist/ghost-accordion-content.d.ts +26 -0
- package/dist/ghost-accordion-content.js +22 -0
- package/dist/ghost-accordion-item.d.ts +24 -0
- package/dist/ghost-accordion-item.js +16 -0
- package/dist/ghost-accordion-trigger.d.ts +17 -0
- package/dist/ghost-accordion-trigger.js +33 -0
- package/dist/ghost-accordion.d.ts +72 -0
- package/dist/ghost-accordion.js +56 -0
- package/dist/ghost-avatar.d.ts +60 -0
- package/dist/ghost-avatar.js +39 -0
- package/dist/ghost-badge.d.ts +46 -0
- package/dist/ghost-badge.js +33 -0
- package/dist/ghost-breadcrumb-ellipsis.d.ts +16 -0
- package/dist/ghost-breadcrumb-ellipsis.js +20 -0
- package/dist/ghost-breadcrumb-item.d.ts +18 -0
- package/dist/ghost-breadcrumb-item.js +20 -0
- package/dist/ghost-breadcrumb-link.d.ts +18 -0
- package/dist/ghost-breadcrumb-link.js +33 -0
- package/dist/ghost-breadcrumb-list.d.ts +18 -0
- package/dist/ghost-breadcrumb-list.js +27 -0
- package/dist/ghost-breadcrumb-page.d.ts +18 -0
- package/dist/ghost-breadcrumb-page.js +20 -0
- package/dist/ghost-breadcrumb-separator.d.ts +18 -0
- package/dist/ghost-breadcrumb-separator.js +20 -0
- package/dist/ghost-breadcrumb.d.ts +34 -0
- package/dist/ghost-breadcrumb.js +27 -0
- package/dist/ghost-button.d.ts +102 -0
- package/dist/ghost-button.js +66 -0
- package/dist/ghost-calendar-cell.d.ts +15 -0
- package/dist/ghost-calendar-cell.js +12 -0
- package/dist/ghost-calendar-grid.d.ts +5 -0
- package/dist/ghost-calendar-grid.js +21 -0
- package/dist/ghost-calendar-header.d.ts +3 -0
- package/dist/ghost-calendar-header.js +9 -0
- package/dist/ghost-calendar-heading.d.ts +3 -0
- package/dist/ghost-calendar-heading.js +9 -0
- package/dist/ghost-calendar-next-button.d.ts +9 -0
- package/dist/ghost-calendar-next-button.js +18 -0
- package/dist/ghost-calendar-prev-button.d.ts +9 -0
- package/dist/ghost-calendar-prev-button.js +18 -0
- package/dist/ghost-calendar.d.ts +119 -0
- package/dist/ghost-calendar.js +101 -0
- package/dist/ghost-card.d.ts +33 -0
- package/dist/ghost-card.js +36 -0
- package/dist/ghost-checkbox-group.d.ts +50 -0
- package/dist/ghost-checkbox-group.js +56 -0
- package/dist/ghost-checkbox.d.ts +76 -0
- package/dist/ghost-checkbox.js +59 -0
- package/dist/ghost-collapsible-content.d.ts +28 -0
- package/dist/ghost-collapsible-content.js +41 -0
- package/dist/ghost-collapsible-trigger.d.ts +28 -0
- package/dist/ghost-collapsible-trigger.js +41 -0
- package/dist/ghost-collapsible.d.ts +44 -0
- package/dist/ghost-collapsible.js +38 -0
- package/dist/ghost-combobox-content.d.ts +82 -0
- package/dist/ghost-combobox-content.js +58 -0
- package/dist/ghost-combobox-input.d.ts +28 -0
- package/dist/ghost-combobox-input.js +36 -0
- package/dist/ghost-combobox-trigger.d.ts +28 -0
- package/dist/ghost-combobox-trigger.js +36 -0
- package/dist/ghost-combobox.d.ts +179 -0
- package/dist/ghost-combobox.js +98 -0
- package/dist/ghost-command-palette-content.d.ts +86 -0
- package/dist/ghost-command-palette-content.js +55 -0
- package/dist/ghost-command-palette-overlay.d.ts +40 -0
- package/dist/ghost-command-palette-overlay.js +40 -0
- package/dist/ghost-command-palette.d.ts +114 -0
- package/dist/ghost-command-palette.js +93 -0
- package/dist/ghost-context-menu-checkbox-item.d.ts +50 -0
- package/dist/ghost-context-menu-checkbox-item.js +57 -0
- package/dist/ghost-context-menu-content.d.ts +85 -0
- package/dist/ghost-context-menu-content.js +75 -0
- package/dist/ghost-context-menu-group.d.ts +19 -0
- package/dist/ghost-context-menu-group.js +23 -0
- package/dist/ghost-context-menu-item.d.ts +32 -0
- package/dist/ghost-context-menu-item.js +43 -0
- package/dist/ghost-context-menu-label.d.ts +19 -0
- package/dist/ghost-context-menu-label.js +23 -0
- package/dist/ghost-context-menu-radio-group.d.ts +50 -0
- package/dist/ghost-context-menu-radio-group.js +46 -0
- package/dist/ghost-context-menu-radio-item.d.ts +40 -0
- package/dist/ghost-context-menu-radio-item.js +53 -0
- package/dist/ghost-context-menu-separator.d.ts +28 -0
- package/dist/ghost-context-menu-separator.js +28 -0
- package/dist/ghost-context-menu-trigger.d.ts +28 -0
- package/dist/ghost-context-menu-trigger.js +41 -0
- package/dist/ghost-context-menu.d.ts +35 -0
- package/dist/ghost-context-menu.js +33 -0
- package/dist/ghost-data-table-preset.d.ts +31 -0
- package/dist/ghost-data-table-preset.js +12 -0
- package/dist/ghost-data-table-table.d.ts +30 -0
- package/dist/ghost-data-table-table.js +9 -0
- package/dist/ghost-data-table.d.ts +94 -0
- package/dist/ghost-data-table.js +105 -0
- package/dist/ghost-date-picker-calendar.d.ts +9 -0
- package/dist/ghost-date-picker-calendar.js +30 -0
- package/dist/ghost-date-picker-content.d.ts +95 -0
- package/dist/ghost-date-picker-content.js +58 -0
- package/dist/ghost-date-picker-input.d.ts +46 -0
- package/dist/ghost-date-picker-input.js +39 -0
- package/dist/ghost-date-picker-trigger.d.ts +6 -0
- package/dist/ghost-date-picker-trigger.js +22 -0
- package/dist/ghost-date-picker.d.ts +245 -0
- package/dist/ghost-date-picker.js +68 -0
- package/dist/ghost-dialog-close.d.ts +28 -0
- package/dist/ghost-dialog-close.js +37 -0
- package/dist/ghost-dialog-content.d.ts +95 -0
- package/dist/ghost-dialog-content.js +78 -0
- package/dist/ghost-dialog-description.d.ts +19 -0
- package/dist/ghost-dialog-description.js +37 -0
- package/dist/ghost-dialog-overlay.d.ts +40 -0
- package/dist/ghost-dialog-overlay.js +46 -0
- package/dist/ghost-dialog-title.d.ts +19 -0
- package/dist/ghost-dialog-title.js +33 -0
- package/dist/ghost-dialog-trigger.d.ts +28 -0
- package/dist/ghost-dialog-trigger.js +37 -0
- package/dist/ghost-dialog.d.ts +44 -0
- package/dist/ghost-dialog.js +38 -0
- package/dist/ghost-drawer-close.d.ts +28 -0
- package/dist/ghost-drawer-close.js +37 -0
- package/dist/ghost-drawer-content.d.ts +87 -0
- package/dist/ghost-drawer-content.js +73 -0
- package/dist/ghost-drawer-description.d.ts +19 -0
- package/dist/ghost-drawer-description.js +36 -0
- package/dist/ghost-drawer-overlay.d.ts +40 -0
- package/dist/ghost-drawer-overlay.js +46 -0
- package/dist/ghost-drawer-title.d.ts +19 -0
- package/dist/ghost-drawer-title.js +32 -0
- package/dist/ghost-drawer-trigger.d.ts +28 -0
- package/dist/ghost-drawer-trigger.js +37 -0
- package/dist/ghost-drawer.d.ts +62 -0
- package/dist/ghost-drawer.js +48 -0
- package/dist/ghost-dropdown-menu-checkbox-item.d.ts +50 -0
- package/dist/ghost-dropdown-menu-checkbox-item.js +57 -0
- package/dist/ghost-dropdown-menu-content.d.ts +85 -0
- package/dist/ghost-dropdown-menu-content.js +75 -0
- package/dist/ghost-dropdown-menu-group.d.ts +19 -0
- package/dist/ghost-dropdown-menu-group.js +23 -0
- package/dist/ghost-dropdown-menu-item.d.ts +32 -0
- package/dist/ghost-dropdown-menu-item.js +47 -0
- package/dist/ghost-dropdown-menu-label.d.ts +19 -0
- package/dist/ghost-dropdown-menu-label.js +23 -0
- package/dist/ghost-dropdown-menu-radio-group.d.ts +50 -0
- package/dist/ghost-dropdown-menu-radio-group.js +46 -0
- package/dist/ghost-dropdown-menu-radio-item.d.ts +40 -0
- package/dist/ghost-dropdown-menu-radio-item.js +53 -0
- package/dist/ghost-dropdown-menu-separator.d.ts +28 -0
- package/dist/ghost-dropdown-menu-separator.js +28 -0
- package/dist/ghost-dropdown-menu-trigger.d.ts +28 -0
- package/dist/ghost-dropdown-menu-trigger.js +41 -0
- package/dist/ghost-dropdown-menu.d.ts +35 -0
- package/dist/ghost-dropdown-menu.js +33 -0
- package/dist/ghost-empty-state.d.ts +31 -0
- package/dist/ghost-empty-state.js +35 -0
- package/dist/ghost-field.d.ts +53 -0
- package/dist/ghost-field.js +49 -0
- package/dist/ghost-file-upload-dropzone.d.ts +9 -0
- package/dist/ghost-file-upload-dropzone.js +23 -0
- package/dist/ghost-file-upload-item-remove.d.ts +10 -0
- package/dist/ghost-file-upload-item-remove.js +30 -0
- package/dist/ghost-file-upload-list.d.ts +10 -0
- package/dist/ghost-file-upload-list.js +24 -0
- package/dist/ghost-file-upload-trigger.d.ts +18 -0
- package/dist/ghost-file-upload-trigger.js +30 -0
- package/dist/ghost-file-upload.d.ts +147 -0
- package/dist/ghost-file-upload.js +98 -0
- package/dist/ghost-hover-card-content.d.ts +85 -0
- package/dist/ghost-hover-card-content.js +75 -0
- package/dist/ghost-hover-card-trigger.d.ts +28 -0
- package/dist/ghost-hover-card-trigger.js +41 -0
- package/dist/ghost-hover-card.d.ts +62 -0
- package/dist/ghost-hover-card.js +48 -0
- package/dist/ghost-inline-alert.d.ts +62 -0
- package/dist/ghost-inline-alert.js +50 -0
- package/dist/ghost-input.d.ts +100 -0
- package/dist/ghost-input.js +60 -0
- package/dist/ghost-interactive-surface.d.ts +31 -0
- package/dist/ghost-interactive-surface.js +36 -0
- package/dist/ghost-kbd.d.ts +42 -0
- package/dist/ghost-kbd.js +32 -0
- package/dist/ghost-link.d.ts +94 -0
- package/dist/ghost-link.js +59 -0
- package/dist/ghost-menubar-checkbox-item.d.ts +50 -0
- package/dist/ghost-menubar-checkbox-item.js +57 -0
- package/dist/ghost-menubar-content.d.ts +85 -0
- package/dist/ghost-menubar-content.js +71 -0
- package/dist/ghost-menubar-group.d.ts +19 -0
- package/dist/ghost-menubar-group.js +19 -0
- package/dist/ghost-menubar-item.d.ts +32 -0
- package/dist/ghost-menubar-item.js +43 -0
- package/dist/ghost-menubar-label.d.ts +19 -0
- package/dist/ghost-menubar-label.js +19 -0
- package/dist/ghost-menubar-menu.d.ts +35 -0
- package/dist/ghost-menubar-menu.js +33 -0
- package/dist/ghost-menubar-radio-group.d.ts +50 -0
- package/dist/ghost-menubar-radio-group.js +46 -0
- package/dist/ghost-menubar-radio-item.d.ts +40 -0
- package/dist/ghost-menubar-radio-item.js +53 -0
- package/dist/ghost-menubar-separator.d.ts +28 -0
- package/dist/ghost-menubar-separator.js +28 -0
- package/dist/ghost-menubar-trigger.d.ts +28 -0
- package/dist/ghost-menubar-trigger.js +37 -0
- package/dist/ghost-menubar.d.ts +28 -0
- package/dist/ghost-menubar.js +33 -0
- package/dist/ghost-number-input.d.ts +153 -0
- package/dist/ghost-number-input.js +87 -0
- package/dist/ghost-pagination.d.ts +151 -0
- package/dist/ghost-pagination.js +71 -0
- package/dist/ghost-popover-close.d.ts +28 -0
- package/dist/ghost-popover-close.js +37 -0
- package/dist/ghost-popover-content.d.ts +86 -0
- package/dist/ghost-popover-content.js +72 -0
- package/dist/ghost-popover-trigger.d.ts +28 -0
- package/dist/ghost-popover-trigger.js +37 -0
- package/dist/ghost-popover.d.ts +35 -0
- package/dist/ghost-popover.js +33 -0
- package/dist/ghost-progress.d.ts +69 -0
- package/dist/ghost-progress.js +37 -0
- package/dist/ghost-radio-group-item.d.ts +37 -0
- package/dist/ghost-radio-group-item.js +33 -0
- package/dist/ghost-radio-group.d.ts +91 -0
- package/dist/ghost-radio-group.js +65 -0
- package/dist/ghost-scroll-area.d.ts +49 -0
- package/dist/ghost-scroll-area.js +32 -0
- package/dist/ghost-scroll-spy-item.d.ts +27 -0
- package/dist/ghost-scroll-spy-item.js +29 -0
- package/dist/ghost-scroll-spy-link.d.ts +44 -0
- package/dist/ghost-scroll-spy-link.js +39 -0
- package/dist/ghost-scroll-spy-list.d.ts +18 -0
- package/dist/ghost-scroll-spy-list.js +27 -0
- package/dist/ghost-scroll-spy.d.ts +121 -0
- package/dist/ghost-scroll-spy.js +83 -0
- package/dist/ghost-segmented-control-item.d.ts +36 -0
- package/dist/ghost-segmented-control-item.js +47 -0
- package/dist/ghost-segmented-control.d.ts +77 -0
- package/dist/ghost-segmented-control.js +73 -0
- package/dist/ghost-select-content.d.ts +82 -0
- package/dist/ghost-select-content.js +58 -0
- package/dist/ghost-select-trigger.d.ts +28 -0
- package/dist/ghost-select-trigger.js +36 -0
- package/dist/ghost-select.d.ts +54 -0
- package/dist/ghost-select.js +51 -0
- package/dist/ghost-separator.d.ts +41 -0
- package/dist/ghost-separator.js +34 -0
- package/dist/ghost-skeleton.d.ts +34 -0
- package/dist/ghost-skeleton.js +31 -0
- package/dist/ghost-slider.d.ts +150 -0
- package/dist/ghost-slider.js +83 -0
- package/dist/ghost-spinner.d.ts +42 -0
- package/dist/ghost-spinner.js +26 -0
- package/dist/ghost-submenu-content.d.ts +22 -0
- package/dist/ghost-submenu-content.js +17 -0
- package/dist/ghost-submenu-trigger.d.ts +11 -0
- package/dist/ghost-submenu-trigger.js +11 -0
- package/dist/ghost-submenu.d.ts +1 -0
- package/dist/ghost-submenu.js +1 -0
- package/dist/ghost-switch.d.ts +102 -0
- package/dist/ghost-switch.js +68 -0
- package/dist/ghost-table.d.ts +30 -0
- package/dist/ghost-table.js +36 -0
- package/dist/ghost-tabs-content.d.ts +27 -0
- package/dist/ghost-tabs-content.js +38 -0
- package/dist/ghost-tabs-list.d.ts +19 -0
- package/dist/ghost-tabs-list.js +33 -0
- package/dist/ghost-tabs-trigger.d.ts +36 -0
- package/dist/ghost-tabs-trigger.js +43 -0
- package/dist/ghost-tabs.d.ts +59 -0
- package/dist/ghost-tabs.js +45 -0
- package/dist/ghost-tags-input.d.ts +75 -0
- package/dist/ghost-tags-input.js +54 -0
- package/dist/ghost-textarea.d.ts +109 -0
- package/dist/ghost-textarea.js +66 -0
- package/dist/ghost-toast-viewport.d.ts +43 -0
- package/dist/ghost-toast-viewport.js +74 -0
- package/dist/ghost-toast.d.ts +54 -0
- package/dist/ghost-toast.js +48 -0
- package/dist/ghost-toggle-group-item.d.ts +36 -0
- package/dist/ghost-toggle-group-item.js +43 -0
- package/dist/ghost-toggle-group.d.ts +77 -0
- package/dist/ghost-toggle-group.js +69 -0
- package/dist/ghost-toolbar.d.ts +6 -0
- package/dist/ghost-toolbar.js +24 -0
- package/dist/ghost-tooltip-content.d.ts +86 -0
- package/dist/ghost-tooltip-content.js +72 -0
- package/dist/ghost-tooltip-trigger.d.ts +28 -0
- package/dist/ghost-tooltip-trigger.js +37 -0
- package/dist/ghost-tooltip.d.ts +62 -0
- package/dist/ghost-tooltip.js +50 -0
- package/dist/ghost-tree-group.d.ts +32 -0
- package/dist/ghost-tree-group.js +39 -0
- package/dist/ghost-tree-item.d.ts +45 -0
- package/dist/ghost-tree-item.js +42 -0
- package/dist/ghost-tree-trigger.d.ts +40 -0
- package/dist/ghost-tree-trigger.js +43 -0
- package/dist/ghost-tree.d.ts +122 -0
- package/dist/ghost-tree.js +98 -0
- package/dist/index.d.ts +153 -0
- package/dist/index.js +149 -0
- package/dist/manifest.json +6835 -0
- package/dist/mono.css +1874 -0
- package/dist/recipes/accordion.css +42 -0
- package/dist/recipes/avatar.css +87 -0
- package/dist/recipes/badge.css +170 -0
- package/dist/recipes/breadcrumb.css +149 -0
- package/dist/recipes/button.css +632 -0
- package/dist/recipes/calendar.css +292 -0
- package/dist/recipes/card.css +54 -0
- package/dist/recipes/checkbox-group.css +30 -0
- package/dist/recipes/checkbox.css +262 -0
- package/dist/recipes/collapsible.css +304 -0
- package/dist/recipes/combobox.css +276 -0
- package/dist/recipes/command-palette.css +296 -0
- package/dist/recipes/context-menu.css +138 -0
- package/dist/recipes/data-table.css +462 -0
- package/dist/recipes/date-picker.css +292 -0
- package/dist/recipes/dialog.css +199 -0
- package/dist/recipes/drawer.css +436 -0
- package/dist/recipes/dropdown-menu.css +138 -0
- package/dist/recipes/empty-state.css +66 -0
- package/dist/recipes/field.css +63 -0
- package/dist/recipes/file-upload.css +260 -0
- package/dist/recipes/hover-card.css +83 -0
- package/dist/recipes/inline-alert.css +172 -0
- package/dist/recipes/input.css +176 -0
- package/dist/recipes/kbd.css +113 -0
- package/dist/recipes/link.css +158 -0
- package/dist/recipes/menubar.css +161 -0
- package/dist/recipes/number-input.css +222 -0
- package/dist/recipes/pagination.css +143 -0
- package/dist/recipes/popover.css +102 -0
- package/dist/recipes/progress.css +124 -0
- package/dist/recipes/radio-group.css +200 -0
- package/dist/recipes/scroll-area.css +72 -0
- package/dist/recipes/scroll-spy.css +72 -0
- package/dist/recipes/segmented-control.css +237 -0
- package/dist/recipes/select.css +299 -0
- package/dist/recipes/separator.css +41 -0
- package/dist/recipes/skeleton.css +132 -0
- package/dist/recipes/slider.css +239 -0
- package/dist/recipes/spinner.css +93 -0
- package/dist/recipes/switch.css +314 -0
- package/dist/recipes/table.css +120 -0
- package/dist/recipes/tabs.css +139 -0
- package/dist/recipes/tags-input.css +120 -0
- package/dist/recipes/textarea.css +148 -0
- package/dist/recipes/toast.css +321 -0
- package/dist/recipes/toggle-group.css +92 -0
- package/dist/recipes/toolbar.css +25 -0
- package/dist/recipes/tooltip.css +48 -0
- package/dist/recipes/tree.css +231 -0
- package/dist/start-theme-transition.d.ts +9 -0
- package/dist/start-theme-transition.js +27 -0
- package/dist/tokens/primitives.json +612 -0
- package/dist/tokens/seeds.json +23 -0
- package/dist/tokens/semantic.compact.json +175 -0
- package/dist/tokens/semantic.dark.json +583 -0
- package/dist/tokens/semantic.json +1656 -0
- package/dist/tokens/semantic.spacious.json +175 -0
- package/dist/tokens.css +1874 -0
- package/dist/tokens.json +6152 -0
- package/dist/vibrant.css +1874 -0
- package/package.json +75 -4
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostFileUpload as GhostUnstyledFileUpload, } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostFileUpload} root wrapper.
|
|
5
|
+
* Importing it loads the default stylesheet; behavior stays on the unstyled
|
|
6
|
+
* primitive. The root only gains `data-themed`, which scopes
|
|
7
|
+
* `ghost-file-upload.css` to the themed family.
|
|
8
|
+
*/
|
|
9
|
+
export const GhostFileUpload = defineComponent({
|
|
10
|
+
name: 'GhostFileUpload',
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: undefined,
|
|
16
|
+
},
|
|
17
|
+
defaultValue: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => [],
|
|
20
|
+
},
|
|
21
|
+
accept: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: undefined,
|
|
24
|
+
},
|
|
25
|
+
maxFiles: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: undefined,
|
|
28
|
+
},
|
|
29
|
+
maxFileSize: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: undefined,
|
|
32
|
+
},
|
|
33
|
+
validate: {
|
|
34
|
+
type: Function,
|
|
35
|
+
default: undefined,
|
|
36
|
+
},
|
|
37
|
+
disabled: { type: Boolean, default: false },
|
|
38
|
+
invalid: { type: Boolean, default: false },
|
|
39
|
+
required: { type: Boolean, default: false },
|
|
40
|
+
name: { type: String, default: undefined },
|
|
41
|
+
form: { type: String, default: undefined },
|
|
42
|
+
id: { type: String, default: undefined },
|
|
43
|
+
messages: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: undefined,
|
|
46
|
+
},
|
|
47
|
+
preventDocumentDrop: { type: Boolean, default: true },
|
|
48
|
+
},
|
|
49
|
+
emits: {
|
|
50
|
+
'update:modelValue': (files) => Array.isArray(files),
|
|
51
|
+
reject: (rejections) => Array.isArray(rejections),
|
|
52
|
+
},
|
|
53
|
+
setup(props, { attrs, emit, slots, expose }) {
|
|
54
|
+
const inner = ref(null);
|
|
55
|
+
expose({
|
|
56
|
+
get element() {
|
|
57
|
+
return inner.value?.element ?? null;
|
|
58
|
+
},
|
|
59
|
+
focus(options) {
|
|
60
|
+
inner.value?.focus(options);
|
|
61
|
+
},
|
|
62
|
+
blur() {
|
|
63
|
+
inner.value?.blur();
|
|
64
|
+
},
|
|
65
|
+
openPicker() {
|
|
66
|
+
inner.value?.openPicker();
|
|
67
|
+
},
|
|
68
|
+
clear() {
|
|
69
|
+
inner.value?.clear();
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
return () => h(GhostUnstyledFileUpload, {
|
|
73
|
+
...attrs,
|
|
74
|
+
ref: inner,
|
|
75
|
+
modelValue: props.modelValue,
|
|
76
|
+
defaultValue: props.defaultValue,
|
|
77
|
+
accept: props.accept,
|
|
78
|
+
maxFiles: props.maxFiles,
|
|
79
|
+
maxFileSize: props.maxFileSize,
|
|
80
|
+
validate: props.validate,
|
|
81
|
+
disabled: props.disabled,
|
|
82
|
+
invalid: props.invalid,
|
|
83
|
+
required: props.required,
|
|
84
|
+
name: props.name,
|
|
85
|
+
form: props.form,
|
|
86
|
+
id: props.id,
|
|
87
|
+
messages: props.messages,
|
|
88
|
+
preventDocumentDrop: props.preventDocumentDrop,
|
|
89
|
+
'data-themed': '',
|
|
90
|
+
'onUpdate:modelValue': (files) => {
|
|
91
|
+
emit('update:modelValue', files);
|
|
92
|
+
},
|
|
93
|
+
onReject: (rejections) => {
|
|
94
|
+
emit('reject', rejections);
|
|
95
|
+
},
|
|
96
|
+
}, slots);
|
|
97
|
+
},
|
|
98
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostHoverCardContentElement, type GhostHoverCardContentExposed, type GhostHoverCardFlipOptions, type GhostHoverCardOffsetOptions, type GhostHoverCardPlacement, type GhostPortalTarget, type GhostHoverCardShiftOptions, type GhostHoverCardStrategy } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostHoverCardContent} wrapper.
|
|
5
|
+
* Sets `data-themed` so portaled cards pick up elevation and surface tokens.
|
|
6
|
+
*/
|
|
7
|
+
export declare const GhostHoverCardContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
as: {
|
|
9
|
+
type: PropType<GhostHoverCardContentElement>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
placement: {
|
|
13
|
+
type: PropType<GhostHoverCardPlacement>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
offset: {
|
|
17
|
+
type: PropType<GhostHoverCardOffsetOptions | boolean | undefined>;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
flip: {
|
|
21
|
+
type: PropType<boolean | GhostHoverCardFlipOptions>;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
shift: {
|
|
25
|
+
type: PropType<boolean | GhostHoverCardShiftOptions>;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
strategy: {
|
|
29
|
+
type: PropType<GhostHoverCardStrategy>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
portal: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
portalTo: {
|
|
37
|
+
type: PropType<GhostPortalTarget>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
as: {
|
|
44
|
+
type: PropType<GhostHoverCardContentElement>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
placement: {
|
|
48
|
+
type: PropType<GhostHoverCardPlacement>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
offset: {
|
|
52
|
+
type: PropType<GhostHoverCardOffsetOptions | boolean | undefined>;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
flip: {
|
|
56
|
+
type: PropType<boolean | GhostHoverCardFlipOptions>;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
shift: {
|
|
60
|
+
type: PropType<boolean | GhostHoverCardShiftOptions>;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
strategy: {
|
|
64
|
+
type: PropType<GhostHoverCardStrategy>;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
portal: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
portalTo: {
|
|
72
|
+
type: PropType<GhostPortalTarget>;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
}>> & Readonly<{}>, {
|
|
76
|
+
shift: boolean | GhostHoverCardShiftOptions;
|
|
77
|
+
as: GhostHoverCardContentElement;
|
|
78
|
+
placement: import("@floating-ui/dom").Placement;
|
|
79
|
+
offset: boolean | GhostHoverCardOffsetOptions | undefined;
|
|
80
|
+
flip: boolean | GhostHoverCardFlipOptions;
|
|
81
|
+
strategy: import("@floating-ui/dom").Strategy;
|
|
82
|
+
portal: boolean;
|
|
83
|
+
portalTo: GhostPortalTarget;
|
|
84
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
85
|
+
export type { GhostHoverCardContentElement, GhostHoverCardContentExposed, GhostHoverCardFlipOptions, GhostHoverCardOffsetOptions, GhostHoverCardPlacement, GhostHoverCardShiftOptions, GhostHoverCardStrategy, };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostHoverCardContent as GhostUnstyledHoverCardContent, } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostHoverCardContent} wrapper.
|
|
5
|
+
* Sets `data-themed` so portaled cards pick up elevation and surface tokens.
|
|
6
|
+
*/
|
|
7
|
+
export const GhostHoverCardContent = defineComponent({
|
|
8
|
+
name: 'GhostHoverCardContent',
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
props: {
|
|
11
|
+
as: {
|
|
12
|
+
type: [
|
|
13
|
+
String,
|
|
14
|
+
Object,
|
|
15
|
+
Function,
|
|
16
|
+
],
|
|
17
|
+
default: 'div',
|
|
18
|
+
},
|
|
19
|
+
placement: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'bottom',
|
|
22
|
+
},
|
|
23
|
+
offset: {
|
|
24
|
+
type: [Number, Object, Boolean],
|
|
25
|
+
default: undefined,
|
|
26
|
+
},
|
|
27
|
+
flip: {
|
|
28
|
+
type: [Boolean, Object],
|
|
29
|
+
default: true,
|
|
30
|
+
},
|
|
31
|
+
shift: {
|
|
32
|
+
type: [Boolean, Object],
|
|
33
|
+
default: true,
|
|
34
|
+
},
|
|
35
|
+
strategy: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'absolute',
|
|
38
|
+
},
|
|
39
|
+
portal: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: true,
|
|
42
|
+
},
|
|
43
|
+
portalTo: {
|
|
44
|
+
type: [String, Object, null],
|
|
45
|
+
default: 'body',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
setup(props, { attrs, slots, expose }) {
|
|
49
|
+
const inner = ref(null);
|
|
50
|
+
expose({
|
|
51
|
+
get element() {
|
|
52
|
+
return inner.value?.element ?? null;
|
|
53
|
+
},
|
|
54
|
+
focus(options) {
|
|
55
|
+
inner.value?.focus(options);
|
|
56
|
+
},
|
|
57
|
+
blur() {
|
|
58
|
+
inner.value?.blur();
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
return () => h(GhostUnstyledHoverCardContent, {
|
|
62
|
+
...attrs,
|
|
63
|
+
ref: inner,
|
|
64
|
+
as: props.as,
|
|
65
|
+
placement: props.placement,
|
|
66
|
+
offset: props.offset,
|
|
67
|
+
flip: props.flip,
|
|
68
|
+
shift: props.shift,
|
|
69
|
+
strategy: props.strategy,
|
|
70
|
+
portal: props.portal,
|
|
71
|
+
portalTo: props.portalTo,
|
|
72
|
+
'data-themed': '',
|
|
73
|
+
}, slots);
|
|
74
|
+
},
|
|
75
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostHoverCardTriggerElement, type GhostHoverCardTriggerExposed } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostHoverCardTrigger} wrapper. */
|
|
4
|
+
export declare const GhostHoverCardTrigger: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
as: {
|
|
6
|
+
type: PropType<GhostHoverCardTriggerElement>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
disabled: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
as: {
|
|
17
|
+
type: PropType<GhostHoverCardTriggerElement>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
disabled: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {
|
|
25
|
+
as: GhostHoverCardTriggerElement;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export type { GhostHoverCardTriggerElement, GhostHoverCardTriggerExposed };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostHoverCardTrigger as GhostUnstyledHoverCardTrigger, } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostHoverCardTrigger} wrapper. */
|
|
4
|
+
export const GhostHoverCardTrigger = defineComponent({
|
|
5
|
+
name: 'GhostHoverCardTrigger',
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
props: {
|
|
8
|
+
as: {
|
|
9
|
+
type: [
|
|
10
|
+
String,
|
|
11
|
+
Object,
|
|
12
|
+
Function,
|
|
13
|
+
],
|
|
14
|
+
default: 'button',
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
setup(props, { attrs, slots, expose }) {
|
|
22
|
+
const inner = ref(null);
|
|
23
|
+
expose({
|
|
24
|
+
get element() {
|
|
25
|
+
return inner.value?.element ?? null;
|
|
26
|
+
},
|
|
27
|
+
focus(options) {
|
|
28
|
+
inner.value?.focus(options);
|
|
29
|
+
},
|
|
30
|
+
blur() {
|
|
31
|
+
inner.value?.blur();
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
return () => h(GhostUnstyledHoverCardTrigger, {
|
|
35
|
+
...attrs,
|
|
36
|
+
ref: inner,
|
|
37
|
+
as: props.as,
|
|
38
|
+
disabled: props.disabled,
|
|
39
|
+
}, slots);
|
|
40
|
+
},
|
|
41
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostHoverCardSlotProps } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostHoverCard} root wrapper.
|
|
5
|
+
* Importing it loads the default stylesheet; behavior stays on the unstyled primitive.
|
|
6
|
+
*/
|
|
7
|
+
export declare const GhostHoverCard: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
open: {
|
|
9
|
+
type: PropType<boolean | undefined>;
|
|
10
|
+
default: undefined;
|
|
11
|
+
};
|
|
12
|
+
defaultOpen: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
openDelay: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
closeDelay: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
closeOnEscape: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
'update:open': (open: boolean) => boolean;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
open: {
|
|
34
|
+
type: PropType<boolean | undefined>;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
defaultOpen: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
openDelay: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
closeDelay: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
closeOnEscape: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{
|
|
54
|
+
"onUpdate:open"?: (open: boolean) => any;
|
|
55
|
+
}>, {
|
|
56
|
+
open: boolean | undefined;
|
|
57
|
+
defaultOpen: boolean;
|
|
58
|
+
closeOnEscape: boolean;
|
|
59
|
+
openDelay: number;
|
|
60
|
+
closeDelay: number;
|
|
61
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
|
+
export type { GhostHoverCardSlotProps };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent, h } from 'vue';
|
|
2
|
+
import { GhostHoverCard as GhostUnstyledHoverCard, } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostHoverCard} root wrapper.
|
|
5
|
+
* Importing it loads the default stylesheet; behavior stays on the unstyled primitive.
|
|
6
|
+
*/
|
|
7
|
+
export const GhostHoverCard = defineComponent({
|
|
8
|
+
name: 'GhostHoverCard',
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
props: {
|
|
11
|
+
open: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: undefined,
|
|
14
|
+
},
|
|
15
|
+
defaultOpen: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
19
|
+
openDelay: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 700,
|
|
22
|
+
},
|
|
23
|
+
closeDelay: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 300,
|
|
26
|
+
},
|
|
27
|
+
closeOnEscape: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
emits: {
|
|
33
|
+
'update:open': (open) => typeof open === 'boolean',
|
|
34
|
+
},
|
|
35
|
+
setup(props, { attrs, emit, slots }) {
|
|
36
|
+
return () => h(GhostUnstyledHoverCard, {
|
|
37
|
+
...attrs,
|
|
38
|
+
open: props.open,
|
|
39
|
+
defaultOpen: props.defaultOpen,
|
|
40
|
+
openDelay: props.openDelay,
|
|
41
|
+
closeDelay: props.closeDelay,
|
|
42
|
+
closeOnEscape: props.closeOnEscape,
|
|
43
|
+
'onUpdate:open': (next) => {
|
|
44
|
+
emit('update:open', next);
|
|
45
|
+
},
|
|
46
|
+
}, slots);
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostInlineAlertAnnounce, type GhostInlineAlertExposed, type GhostInlineAlertHeadingLevel, type GhostInlineAlertElement } from '@ghostvue/vue';
|
|
3
|
+
/** Visual treatment for the themed inline alert. Omitting it selects `soft`. */
|
|
4
|
+
export type GhostInlineAlertVariant = 'solid' | 'soft' | 'outline' | 'ghost';
|
|
5
|
+
/** Semantic color intent, independent of {@link GhostInlineAlertVariant}. */
|
|
6
|
+
export type GhostInlineAlertTone = 'accent' | 'neutral' | 'danger';
|
|
7
|
+
/**
|
|
8
|
+
* Themed wrapper: visual props as `data-*`, `data-themed` on the inner root.
|
|
9
|
+
* Behavior and live-region semantics stay on the unstyled primitive.
|
|
10
|
+
*/
|
|
11
|
+
export declare const GhostInlineAlert: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
12
|
+
as: {
|
|
13
|
+
type: PropType<GhostInlineAlertElement>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
headingLevel: {
|
|
17
|
+
type: PropType<GhostInlineAlertHeadingLevel>;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
announce: {
|
|
21
|
+
type: PropType<GhostInlineAlertAnnounce>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
variant: {
|
|
25
|
+
type: PropType<GhostInlineAlertVariant>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
tone: {
|
|
29
|
+
type: PropType<GhostInlineAlertTone>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
as: {
|
|
36
|
+
type: PropType<GhostInlineAlertElement>;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
headingLevel: {
|
|
40
|
+
type: PropType<GhostInlineAlertHeadingLevel>;
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
announce: {
|
|
44
|
+
type: PropType<GhostInlineAlertAnnounce>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
variant: {
|
|
48
|
+
type: PropType<GhostInlineAlertVariant>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
tone: {
|
|
52
|
+
type: PropType<GhostInlineAlertTone>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
}>> & Readonly<{}>, {
|
|
56
|
+
as: GhostInlineAlertElement;
|
|
57
|
+
headingLevel: GhostInlineAlertHeadingLevel;
|
|
58
|
+
variant: GhostInlineAlertVariant;
|
|
59
|
+
tone: GhostInlineAlertTone;
|
|
60
|
+
announce: GhostInlineAlertAnnounce;
|
|
61
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
|
+
export type { GhostInlineAlertExposed };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostInlineAlert as GhostUnstyledInlineAlert, } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed wrapper: visual props as `data-*`, `data-themed` on the inner root.
|
|
5
|
+
* Behavior and live-region semantics stay on the unstyled primitive.
|
|
6
|
+
*/
|
|
7
|
+
export const GhostInlineAlert = defineComponent({
|
|
8
|
+
name: 'GhostInlineAlert',
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
props: {
|
|
11
|
+
as: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'div',
|
|
14
|
+
},
|
|
15
|
+
headingLevel: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: 3,
|
|
18
|
+
},
|
|
19
|
+
announce: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'off',
|
|
22
|
+
},
|
|
23
|
+
variant: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'soft',
|
|
26
|
+
},
|
|
27
|
+
tone: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: 'neutral',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
setup(props, { attrs, slots, expose }) {
|
|
33
|
+
const inner = ref(null);
|
|
34
|
+
expose({
|
|
35
|
+
get element() {
|
|
36
|
+
return inner.value?.element ?? null;
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
return () => h(GhostUnstyledInlineAlert, {
|
|
40
|
+
...attrs,
|
|
41
|
+
as: props.as,
|
|
42
|
+
headingLevel: props.headingLevel,
|
|
43
|
+
announce: props.announce,
|
|
44
|
+
ref: inner,
|
|
45
|
+
'data-themed': '',
|
|
46
|
+
'data-variant': props.variant === 'soft' ? undefined : props.variant,
|
|
47
|
+
'data-tone': props.tone === 'neutral' ? undefined : props.tone,
|
|
48
|
+
}, slots);
|
|
49
|
+
},
|
|
50
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostInputExposed, type GhostInputType } from '@ghostvue/vue';
|
|
3
|
+
/** Visual size. Omitting it selects `md`. */
|
|
4
|
+
export type GhostInputSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
/**
|
|
6
|
+
* Themed wrapper: visual props as `data-*`, instance-scoped CSS. Behavior stays
|
|
7
|
+
* on the unstyled primitive; native attrs fall through.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GhostInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
defaultValue: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
type: {
|
|
19
|
+
type: PropType<GhostInputType>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
disabled: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
readonly: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
invalid: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
required: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
size: {
|
|
39
|
+
type: PropType<GhostInputSize>;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
block: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
|
+
'update:modelValue': (value: string) => boolean;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
modelValue: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
defaultValue: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
type: {
|
|
60
|
+
type: PropType<GhostInputType>;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
disabled: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
readonly: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
invalid: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
required: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
size: {
|
|
80
|
+
type: PropType<GhostInputSize>;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
block: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
}>> & Readonly<{
|
|
88
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
89
|
+
}>, {
|
|
90
|
+
type: GhostInputType;
|
|
91
|
+
invalid: boolean;
|
|
92
|
+
size: GhostInputSize;
|
|
93
|
+
required: boolean;
|
|
94
|
+
disabled: boolean;
|
|
95
|
+
modelValue: string;
|
|
96
|
+
defaultValue: string;
|
|
97
|
+
block: boolean;
|
|
98
|
+
readonly: boolean;
|
|
99
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
100
|
+
export type { GhostInputExposed, GhostInputType };
|