@ghostvue/themes 0.0.0-stage → 0.1.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 +1899 -0
- package/dist/components.d.ts +148 -0
- package/dist/components.js +143 -0
- package/dist/default.css +11017 -0
- package/dist/define.d.ts +75 -0
- package/dist/define.js +5934 -0
- package/dist/flagship-themes.d.ts +5 -0
- package/dist/flagship-themes.js +3 -0
- package/dist/generated/tokens.d.ts +5275 -0
- package/dist/generated/tokens.js +5272 -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.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 +44 -0
- package/dist/ghost-field.js +44 -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 +115 -0
- package/dist/ghost-select.js +74 -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-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-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 +148 -0
- package/dist/index.js +144 -0
- package/dist/manifest.json +6375 -0
- package/dist/mono.css +1864 -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.css +262 -0
- package/dist/recipes/collapsible.css +304 -0
- package/dist/recipes/combobox.css +276 -0
- package/dist/recipes/command-palette.css +244 -0
- package/dist/recipes/context-menu.css +227 -0
- package/dist/recipes/data-table.css +455 -0
- package/dist/recipes/date-picker.css +292 -0
- package/dist/recipes/dialog.css +141 -0
- package/dist/recipes/drawer.css +338 -0
- package/dist/recipes/dropdown-menu.css +232 -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 +64 -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 +242 -0
- package/dist/recipes/number-input.css +222 -0
- package/dist/recipes/pagination.css +143 -0
- package/dist/recipes/popover.css +83 -0
- package/dist/recipes/progress.css +119 -0
- package/dist/recipes/radio-group.css +200 -0
- package/dist/recipes/scroll-area.css +31 -0
- package/dist/recipes/scroll-spy.css +72 -0
- package/dist/recipes/segmented-control.css +178 -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/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 +1651 -0
- package/dist/tokens/semantic.spacious.json +175 -0
- package/dist/tokens.css +1864 -0
- package/dist/tokens.json +6137 -0
- package/dist/vibrant.css +1864 -0
- package/package.json +75 -4
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostToastExposed, type GhostToastRecord, type GhostToastSlotProps } from '@ghostvue/vue';
|
|
3
|
+
/** Visual treatment of a themed toast. Omitting it selects `surface`. */
|
|
4
|
+
export type GhostToastVariant = 'surface' | 'solid';
|
|
5
|
+
/**
|
|
6
|
+
* Semantic color intent, independent of {@link GhostToastVariant}. When it is
|
|
7
|
+
* not set, the record's `type` picks it: `'error'` maps to `danger`, anything
|
|
8
|
+
* else to `neutral`.
|
|
9
|
+
*/
|
|
10
|
+
export type GhostToastTone = 'neutral' | 'accent' | 'danger';
|
|
11
|
+
/**
|
|
12
|
+
* Themed {@link GhostToast} wrapper. Adds `data-themed` plus `data-variant` and
|
|
13
|
+
* `data-tone` visual hooks (defaults omitted, as on `GhostInlineAlert`).
|
|
14
|
+
* Timers, pause reasons, Escape, and focus return all stay on the unstyled
|
|
15
|
+
* root, so the themed stack has no behavior of its own.
|
|
16
|
+
*
|
|
17
|
+
* Enter motion lives in `ghost-toast.css` as a CSS animation, which plays once
|
|
18
|
+
* when the root element is inserted. The viewport keys each root by toast id,
|
|
19
|
+
* so `update()` and duplicate-id merges patch the same element and the
|
|
20
|
+
* animation does not replay (spec T7).
|
|
21
|
+
*/
|
|
22
|
+
export declare const GhostToast: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
23
|
+
toast: {
|
|
24
|
+
type: PropType<GhostToastRecord>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
variant: {
|
|
28
|
+
type: PropType<GhostToastVariant>;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
tone: {
|
|
32
|
+
type: PropType<GhostToastTone | undefined>;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
toast: {
|
|
39
|
+
type: PropType<GhostToastRecord>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
variant: {
|
|
43
|
+
type: PropType<GhostToastVariant>;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
tone: {
|
|
47
|
+
type: PropType<GhostToastTone | undefined>;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
}>> & Readonly<{}>, {
|
|
51
|
+
variant: GhostToastVariant;
|
|
52
|
+
tone: GhostToastTone | undefined;
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
export type { GhostToastExposed, GhostToastRecord, GhostToastSlotProps };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { computed, defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostToast as GhostUnstyledToast, } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostToast} wrapper. Adds `data-themed` plus `data-variant` and
|
|
5
|
+
* `data-tone` visual hooks (defaults omitted, as on `GhostInlineAlert`).
|
|
6
|
+
* Timers, pause reasons, Escape, and focus return all stay on the unstyled
|
|
7
|
+
* root, so the themed stack has no behavior of its own.
|
|
8
|
+
*
|
|
9
|
+
* Enter motion lives in `ghost-toast.css` as a CSS animation, which plays once
|
|
10
|
+
* when the root element is inserted. The viewport keys each root by toast id,
|
|
11
|
+
* so `update()` and duplicate-id merges patch the same element and the
|
|
12
|
+
* animation does not replay (spec T7).
|
|
13
|
+
*/
|
|
14
|
+
export const GhostToast = defineComponent({
|
|
15
|
+
name: 'GhostToast',
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
props: {
|
|
18
|
+
toast: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'surface',
|
|
25
|
+
},
|
|
26
|
+
tone: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: undefined,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
setup(props, { attrs, slots, expose }) {
|
|
32
|
+
const inner = ref(null);
|
|
33
|
+
expose({
|
|
34
|
+
get element() {
|
|
35
|
+
return inner.value?.element ?? null;
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const tone = computed(() => props.tone ?? (props.toast.type === 'error' ? 'danger' : 'neutral'));
|
|
39
|
+
return () => h(GhostUnstyledToast, {
|
|
40
|
+
...attrs,
|
|
41
|
+
ref: inner,
|
|
42
|
+
toast: props.toast,
|
|
43
|
+
'data-themed': '',
|
|
44
|
+
'data-variant': props.variant === 'surface' ? undefined : props.variant,
|
|
45
|
+
'data-tone': tone.value === 'neutral' ? undefined : tone.value,
|
|
46
|
+
}, slots);
|
|
47
|
+
},
|
|
48
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostToggleGroupItemElement, type GhostToggleGroupItemExposed } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostToggleGroupItem} wrapper. */
|
|
4
|
+
export declare const GhostToggleGroupItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
as: {
|
|
6
|
+
type: PropType<GhostToggleGroupItemElement>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
value: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
disabled: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
as: {
|
|
21
|
+
type: PropType<GhostToggleGroupItemElement>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
value: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
disabled: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}>> & Readonly<{}>, {
|
|
33
|
+
as: GhostToggleGroupItemElement;
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
36
|
+
export type { GhostToggleGroupItemElement, GhostToggleGroupItemExposed };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostToggleGroupItem as GhostUnstyledToggleGroupItem, } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostToggleGroupItem} wrapper. */
|
|
4
|
+
export const GhostToggleGroupItem = defineComponent({
|
|
5
|
+
name: 'GhostToggleGroupItem',
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
props: {
|
|
8
|
+
as: {
|
|
9
|
+
type: [String, Object, Function],
|
|
10
|
+
default: 'button',
|
|
11
|
+
},
|
|
12
|
+
value: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
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(GhostUnstyledToggleGroupItem, {
|
|
35
|
+
...attrs,
|
|
36
|
+
ref: inner,
|
|
37
|
+
as: props.as,
|
|
38
|
+
value: props.value,
|
|
39
|
+
disabled: props.disabled,
|
|
40
|
+
'data-themed': '',
|
|
41
|
+
}, slots);
|
|
42
|
+
},
|
|
43
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostToggleGroupElement, type GhostToggleGroupExposed, type GhostToggleGroupOrientation, type GhostToggleGroupType, type GhostToggleGroupValue } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostToggleGroup} wrapper. */
|
|
4
|
+
export declare const GhostToggleGroup: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
type: {
|
|
6
|
+
type: PropType<GhostToggleGroupType>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: PropType<GhostToggleGroupValue>;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
defaultValue: {
|
|
14
|
+
type: PropType<GhostToggleGroupValue>;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
orientation: {
|
|
18
|
+
type: PropType<GhostToggleGroupOrientation>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
dir: {
|
|
22
|
+
type: PropType<"ltr" | "rtl">;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
as: {
|
|
26
|
+
type: PropType<GhostToggleGroupElement>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
disabled: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
'update:modelValue': (value: GhostToggleGroupValue) => value is string | string[] | undefined;
|
|
37
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
type: {
|
|
39
|
+
type: PropType<GhostToggleGroupType>;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
modelValue: {
|
|
43
|
+
type: PropType<GhostToggleGroupValue>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
defaultValue: {
|
|
47
|
+
type: PropType<GhostToggleGroupValue>;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
orientation: {
|
|
51
|
+
type: PropType<GhostToggleGroupOrientation>;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
dir: {
|
|
55
|
+
type: PropType<"ltr" | "rtl">;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
as: {
|
|
59
|
+
type: PropType<GhostToggleGroupElement>;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
disabled: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
}>> & Readonly<{
|
|
67
|
+
"onUpdate:modelValue"?: (value: GhostToggleGroupValue) => any;
|
|
68
|
+
}>, {
|
|
69
|
+
as: GhostToggleGroupElement;
|
|
70
|
+
type: GhostToggleGroupType;
|
|
71
|
+
disabled: boolean;
|
|
72
|
+
modelValue: GhostToggleGroupValue;
|
|
73
|
+
defaultValue: GhostToggleGroupValue;
|
|
74
|
+
dir: "ltr" | "rtl";
|
|
75
|
+
orientation: GhostToggleGroupOrientation;
|
|
76
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
77
|
+
export type { GhostToggleGroupExposed };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostToggleGroup as GhostUnstyledToggleGroup, } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostToggleGroup} wrapper. */
|
|
4
|
+
export const GhostToggleGroup = defineComponent({
|
|
5
|
+
name: 'GhostToggleGroup',
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
props: {
|
|
8
|
+
type: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: 'single',
|
|
11
|
+
},
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: [String, Array],
|
|
14
|
+
default: undefined,
|
|
15
|
+
},
|
|
16
|
+
defaultValue: {
|
|
17
|
+
type: [String, Array],
|
|
18
|
+
default: undefined,
|
|
19
|
+
},
|
|
20
|
+
orientation: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'horizontal',
|
|
23
|
+
},
|
|
24
|
+
dir: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: undefined,
|
|
27
|
+
},
|
|
28
|
+
as: {
|
|
29
|
+
type: [String, Object, Function],
|
|
30
|
+
default: 'div',
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
emits: {
|
|
38
|
+
'update:modelValue': (value) => value === undefined || typeof value === 'string' || Array.isArray(value),
|
|
39
|
+
},
|
|
40
|
+
setup(props, { attrs, emit, slots, expose }) {
|
|
41
|
+
const inner = ref(null);
|
|
42
|
+
expose({
|
|
43
|
+
get element() {
|
|
44
|
+
return inner.value?.element ?? null;
|
|
45
|
+
},
|
|
46
|
+
focus(options) {
|
|
47
|
+
inner.value?.focus(options);
|
|
48
|
+
},
|
|
49
|
+
blur() {
|
|
50
|
+
inner.value?.blur();
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
return () => h(GhostUnstyledToggleGroup, {
|
|
54
|
+
...attrs,
|
|
55
|
+
ref: inner,
|
|
56
|
+
type: props.type,
|
|
57
|
+
modelValue: props.modelValue,
|
|
58
|
+
defaultValue: props.defaultValue,
|
|
59
|
+
orientation: props.orientation,
|
|
60
|
+
dir: props.dir,
|
|
61
|
+
as: props.as,
|
|
62
|
+
disabled: props.disabled,
|
|
63
|
+
'data-themed': '',
|
|
64
|
+
'onUpdate:modelValue': (value) => {
|
|
65
|
+
emit('update:modelValue', value);
|
|
66
|
+
},
|
|
67
|
+
}, slots);
|
|
68
|
+
},
|
|
69
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type GhostToolbarExposed } from '@ghostvue/vue';
|
|
2
|
+
/** Themed wrapper: layout via instance-scoped CSS. Behavior stays unstyled. */
|
|
3
|
+
export declare const GhostToolbar: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export type { GhostToolbarExposed };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostToolbar as GhostUnstyledToolbar, } from '@ghostvue/vue';
|
|
3
|
+
/** Themed wrapper: layout via instance-scoped CSS. Behavior stays unstyled. */
|
|
4
|
+
export const GhostToolbar = defineComponent({
|
|
5
|
+
name: 'GhostToolbar',
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
setup(_props, { attrs, slots, expose }) {
|
|
8
|
+
const inner = ref(null);
|
|
9
|
+
expose({
|
|
10
|
+
get element() {
|
|
11
|
+
return inner.value?.element ?? null;
|
|
12
|
+
},
|
|
13
|
+
focus(options) {
|
|
14
|
+
inner.value?.focus(options);
|
|
15
|
+
},
|
|
16
|
+
blur() {
|
|
17
|
+
inner.value?.blur();
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
return () => h('span', { class: 'ghost-themed-scope' }, [
|
|
21
|
+
h(GhostUnstyledToolbar, { ...attrs, ref: inner }, slots),
|
|
22
|
+
]);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostTooltipContentElement, type GhostTooltipContentExposed, type GhostTooltipFlipOptions, type GhostTooltipOffsetOptions, type GhostTooltipPlacement, type GhostTooltipShiftOptions, type GhostTooltipStrategy, type GhostPortalTarget } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostTooltipContent} wrapper.
|
|
5
|
+
* Sets `data-themed` so portaled tooltips pick up elevation, radius, border,
|
|
6
|
+
* and surface tokens inside any `.ghost-theme` / `[data-ghost-theme]` host.
|
|
7
|
+
*/
|
|
8
|
+
export declare const GhostTooltipContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
as: {
|
|
10
|
+
type: PropType<GhostTooltipContentElement>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
placement: {
|
|
14
|
+
type: PropType<GhostTooltipPlacement>;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
offset: {
|
|
18
|
+
type: PropType<GhostTooltipOffsetOptions | boolean | undefined>;
|
|
19
|
+
default: undefined;
|
|
20
|
+
};
|
|
21
|
+
flip: {
|
|
22
|
+
type: PropType<boolean | GhostTooltipFlipOptions>;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
shift: {
|
|
26
|
+
type: PropType<boolean | GhostTooltipShiftOptions>;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
strategy: {
|
|
30
|
+
type: PropType<GhostTooltipStrategy>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
portal: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
portalTo: {
|
|
38
|
+
type: PropType<GhostPortalTarget>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
+
as: {
|
|
45
|
+
type: PropType<GhostTooltipContentElement>;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
placement: {
|
|
49
|
+
type: PropType<GhostTooltipPlacement>;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
offset: {
|
|
53
|
+
type: PropType<GhostTooltipOffsetOptions | boolean | undefined>;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
56
|
+
flip: {
|
|
57
|
+
type: PropType<boolean | GhostTooltipFlipOptions>;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
shift: {
|
|
61
|
+
type: PropType<boolean | GhostTooltipShiftOptions>;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
strategy: {
|
|
65
|
+
type: PropType<GhostTooltipStrategy>;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
portal: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
portalTo: {
|
|
73
|
+
type: PropType<GhostPortalTarget>;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
}>> & Readonly<{}>, {
|
|
77
|
+
shift: boolean | GhostTooltipShiftOptions;
|
|
78
|
+
as: GhostTooltipContentElement;
|
|
79
|
+
placement: import("@floating-ui/dom").Placement;
|
|
80
|
+
offset: boolean | GhostTooltipOffsetOptions | undefined;
|
|
81
|
+
flip: boolean | GhostTooltipFlipOptions;
|
|
82
|
+
strategy: import("@floating-ui/dom").Strategy;
|
|
83
|
+
portal: boolean;
|
|
84
|
+
portalTo: GhostPortalTarget;
|
|
85
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
86
|
+
export type { GhostTooltipContentElement, GhostTooltipContentExposed, GhostTooltipFlipOptions, GhostTooltipOffsetOptions, GhostTooltipPlacement, GhostTooltipShiftOptions, GhostTooltipStrategy, GhostPortalTarget, };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostTooltipContent as GhostUnstyledTooltipContent, } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostTooltipContent} wrapper.
|
|
5
|
+
* Sets `data-themed` so portaled tooltips pick up elevation, radius, border,
|
|
6
|
+
* and surface tokens inside any `.ghost-theme` / `[data-ghost-theme]` host.
|
|
7
|
+
*/
|
|
8
|
+
export const GhostTooltipContent = defineComponent({
|
|
9
|
+
name: 'GhostTooltipContent',
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
props: {
|
|
12
|
+
as: {
|
|
13
|
+
type: [String, Object, Function],
|
|
14
|
+
default: 'div',
|
|
15
|
+
},
|
|
16
|
+
placement: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: 'top',
|
|
19
|
+
},
|
|
20
|
+
offset: {
|
|
21
|
+
type: [Number, Object, Boolean],
|
|
22
|
+
default: undefined,
|
|
23
|
+
},
|
|
24
|
+
flip: {
|
|
25
|
+
type: [Boolean, Object],
|
|
26
|
+
default: true,
|
|
27
|
+
},
|
|
28
|
+
shift: {
|
|
29
|
+
type: [Boolean, Object],
|
|
30
|
+
default: true,
|
|
31
|
+
},
|
|
32
|
+
strategy: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'absolute',
|
|
35
|
+
},
|
|
36
|
+
portal: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true,
|
|
39
|
+
},
|
|
40
|
+
portalTo: {
|
|
41
|
+
type: [String, Object, null],
|
|
42
|
+
default: 'body',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
setup(props, { attrs, slots, expose }) {
|
|
46
|
+
const inner = ref(null);
|
|
47
|
+
expose({
|
|
48
|
+
get element() {
|
|
49
|
+
return inner.value?.element ?? null;
|
|
50
|
+
},
|
|
51
|
+
focus(options) {
|
|
52
|
+
inner.value?.focus(options);
|
|
53
|
+
},
|
|
54
|
+
blur() {
|
|
55
|
+
inner.value?.blur();
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
return () => h(GhostUnstyledTooltipContent, {
|
|
59
|
+
...attrs,
|
|
60
|
+
ref: inner,
|
|
61
|
+
as: props.as,
|
|
62
|
+
placement: props.placement,
|
|
63
|
+
offset: props.offset,
|
|
64
|
+
flip: props.flip,
|
|
65
|
+
shift: props.shift,
|
|
66
|
+
strategy: props.strategy,
|
|
67
|
+
portal: props.portal,
|
|
68
|
+
portalTo: props.portalTo,
|
|
69
|
+
'data-themed': '',
|
|
70
|
+
}, slots);
|
|
71
|
+
},
|
|
72
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostTooltipTriggerElement, type GhostTooltipTriggerExposed } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostTooltipTrigger} wrapper. */
|
|
4
|
+
export declare const GhostTooltipTrigger: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
as: {
|
|
6
|
+
type: PropType<GhostTooltipTriggerElement>;
|
|
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<GhostTooltipTriggerElement>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
disabled: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, {
|
|
25
|
+
as: GhostTooltipTriggerElement;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export type { GhostTooltipTriggerElement, GhostTooltipTriggerExposed };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'vue';
|
|
2
|
+
import { GhostTooltipTrigger as GhostUnstyledTooltipTrigger, } from '@ghostvue/vue';
|
|
3
|
+
/** Themed {@link GhostTooltipTrigger} wrapper. */
|
|
4
|
+
export const GhostTooltipTrigger = defineComponent({
|
|
5
|
+
name: 'GhostTooltipTrigger',
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
props: {
|
|
8
|
+
as: {
|
|
9
|
+
type: [String, Object, Function],
|
|
10
|
+
default: 'button',
|
|
11
|
+
},
|
|
12
|
+
disabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
setup(props, { attrs, slots, expose }) {
|
|
18
|
+
const inner = ref(null);
|
|
19
|
+
expose({
|
|
20
|
+
get element() {
|
|
21
|
+
return inner.value?.element ?? null;
|
|
22
|
+
},
|
|
23
|
+
focus(options) {
|
|
24
|
+
inner.value?.focus(options);
|
|
25
|
+
},
|
|
26
|
+
blur() {
|
|
27
|
+
inner.value?.blur();
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
return () => h(GhostUnstyledTooltipTrigger, {
|
|
31
|
+
...attrs,
|
|
32
|
+
ref: inner,
|
|
33
|
+
as: props.as,
|
|
34
|
+
disabled: props.disabled,
|
|
35
|
+
}, slots);
|
|
36
|
+
},
|
|
37
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type GhostTooltipSlotProps } from '@ghostvue/vue';
|
|
3
|
+
/**
|
|
4
|
+
* Themed {@link GhostTooltip} root wrapper.
|
|
5
|
+
* Importing it loads the default stylesheet; behavior stays on the unstyled primitive.
|
|
6
|
+
*/
|
|
7
|
+
export declare const GhostTooltip: 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
|
+
delayDuration: {
|
|
17
|
+
type: PropType<number | undefined>;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
closeDelay: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
disableHoverableContent: {
|
|
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
|
+
delayDuration: {
|
|
42
|
+
type: PropType<number | undefined>;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
closeDelay: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
disableHoverableContent: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{
|
|
54
|
+
"onUpdate:open"?: (open: boolean) => any;
|
|
55
|
+
}>, {
|
|
56
|
+
open: boolean | undefined;
|
|
57
|
+
defaultOpen: boolean;
|
|
58
|
+
closeDelay: number;
|
|
59
|
+
delayDuration: number | undefined;
|
|
60
|
+
disableHoverableContent: boolean;
|
|
61
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
|
+
export type { GhostTooltipSlotProps };
|