@ui-sdk/vue 0.0.0-stage → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +10 -2
- package/dist/accordion.d.ts +561 -0
- package/dist/accordion.js +24 -0
- package/dist/agent.d.ts +2 -0
- package/dist/agent.js +7 -0
- package/dist/alert-dialog.d.ts +231 -0
- package/dist/alert-dialog.js +33 -0
- package/dist/async-options.d.ts +18 -0
- package/dist/async-options.js +40 -0
- package/dist/autocomplete.d.ts +384 -0
- package/dist/autocomplete.js +344 -0
- package/dist/avatar.d.ts +40 -0
- package/dist/avatar.js +28 -0
- package/dist/button.d.ts +52 -0
- package/dist/button.js +43 -0
- package/dist/calendar-context.d.ts +10 -0
- package/dist/calendar-context.js +7 -0
- package/dist/calendar.d.ts +311 -0
- package/dist/calendar.js +349 -0
- package/dist/carousel.d.ts +236 -0
- package/dist/carousel.js +204 -0
- package/dist/checkbox.d.ts +211 -0
- package/dist/checkbox.js +151 -0
- package/dist/children.d.ts +41 -0
- package/dist/children.js +135 -0
- package/dist/collapsible.d.ts +54 -0
- package/dist/collapsible.js +18 -0
- package/dist/color-picker.d.ts +187 -0
- package/dist/color-picker.js +158 -0
- package/dist/color.d.ts +2 -0
- package/dist/color.js +21 -0
- package/dist/combobox.d.ts +517 -0
- package/dist/combobox.js +531 -0
- package/dist/command.d.ts +322 -0
- package/dist/command.js +345 -0
- package/dist/controller-target.d.ts +49 -0
- package/dist/controller-target.js +112 -0
- package/dist/create-parts.d.ts +126 -0
- package/dist/create-parts.js +206 -0
- package/dist/date-input.d.ts +133 -0
- package/dist/date-input.js +31 -0
- package/dist/date-picker.d.ts +328 -0
- package/dist/date-picker.js +354 -0
- package/dist/date.d.ts +2 -0
- package/dist/date.js +59 -0
- package/dist/dialog-parts.d.ts +259 -0
- package/dist/dialog-parts.js +300 -0
- package/dist/dialog.d.ts +251 -0
- package/dist/dialog.js +25 -0
- package/dist/drawer.d.ts +304 -0
- package/dist/drawer.js +373 -0
- package/dist/editor-context.d.ts +4 -0
- package/dist/editor-context.js +5 -0
- package/dist/field-context.d.ts +26 -0
- package/dist/field-context.js +44 -0
- package/dist/field.d.ts +154 -0
- package/dist/field.js +240 -0
- package/dist/file-input.d.ts +212 -0
- package/dist/file-input.js +255 -0
- package/dist/form-inputs.d.ts +16 -0
- package/dist/form-inputs.js +25 -0
- package/dist/gesture.d.ts +1 -0
- package/dist/gesture.js +15 -0
- package/dist/history.d.ts +2 -0
- package/dist/history.js +11 -0
- package/dist/hover-card.d.ts +137 -0
- package/dist/hover-card.js +153 -0
- package/dist/image-cropper.d.ts +74 -0
- package/dist/image-cropper.js +36 -0
- package/dist/image.d.ts +2 -0
- package/dist/image.js +5 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +60 -0
- package/dist/input.d.ts +120 -0
- package/dist/input.js +73 -0
- package/dist/item-icon.d.ts +34 -0
- package/dist/item-icon.js +63 -0
- package/dist/label.d.ts +16 -0
- package/dist/label.js +8 -0
- package/dist/lifecycle.d.ts +11 -0
- package/dist/lifecycle.js +91 -0
- package/dist/list-items.d.ts +38 -0
- package/dist/list-items.js +59 -0
- package/dist/list-text.d.ts +7 -0
- package/dist/list-text.js +15 -0
- package/dist/listbox.d.ts +273 -0
- package/dist/listbox.js +126 -0
- package/dist/menu.d.ts +678 -0
- package/dist/menu.js +607 -0
- package/dist/menubar-context.d.ts +5 -0
- package/dist/menubar-context.js +5 -0
- package/dist/menubar.d.ts +61 -0
- package/dist/menubar.js +48 -0
- package/dist/meter.d.ts +41 -0
- package/dist/meter.js +37 -0
- package/dist/navigation-menu.d.ts +228 -0
- package/dist/navigation-menu.js +195 -0
- package/dist/number-input.d.ts +176 -0
- package/dist/number-input.js +231 -0
- package/dist/number.d.ts +2 -0
- package/dist/number.js +39 -0
- package/dist/nuxt/entries.json +977 -0
- package/dist/nuxt/module.d.ts +18 -0
- package/dist/nuxt/module.js +31 -0
- package/dist/nuxt/registrations.d.ts +22 -0
- package/dist/nuxt/registrations.js +22 -0
- package/dist/observe.d.ts +2 -0
- package/dist/observe.js +7 -0
- package/dist/otp-input.d.ts +142 -0
- package/dist/otp-input.js +130 -0
- package/dist/overlays.d.ts +40 -0
- package/dist/overlays.js +118 -0
- package/dist/pagination.d.ts +201 -0
- package/dist/pagination.js +146 -0
- package/dist/password-input.d.ts +144 -0
- package/dist/password-input.js +134 -0
- package/dist/popover.d.ts +211 -0
- package/dist/popover.js +258 -0
- package/dist/popup.d.ts +60 -0
- package/dist/popup.js +89 -0
- package/dist/preferences.d.ts +44 -0
- package/dist/preferences.js +102 -0
- package/dist/primitive.d.ts +2 -0
- package/dist/primitive.js +11 -0
- package/dist/progress.d.ts +41 -0
- package/dist/progress.js +37 -0
- package/dist/radio.d.ts +164 -0
- package/dist/radio.js +145 -0
- package/dist/rating.d.ts +149 -0
- package/dist/rating.js +146 -0
- package/dist/renderless.d.ts +4 -0
- package/dist/renderless.js +28 -0
- package/dist/resizable.d.ts +54 -0
- package/dist/resizable.js +22 -0
- package/dist/scroll-area.d.ts +72 -0
- package/dist/scroll-area.js +77 -0
- package/dist/segmented-control.d.ts +151 -0
- package/dist/segmented-control.js +110 -0
- package/dist/segmented-input.d.ts +76 -0
- package/dist/segmented-input.js +115 -0
- package/dist/select.d.ts +458 -0
- package/dist/select.js +468 -0
- package/dist/separator.d.ts +14 -0
- package/dist/separator.js +8 -0
- package/dist/shortcuts.d.ts +32 -0
- package/dist/shortcuts.js +56 -0
- package/dist/slider.d.ts +65 -0
- package/dist/slider.js +194 -0
- package/dist/switch.d.ts +103 -0
- package/dist/switch.js +71 -0
- package/dist/tabs.d.ts +338 -0
- package/dist/tabs.js +27 -0
- package/dist/text-control.d.ts +89 -0
- package/dist/text-control.js +51 -0
- package/dist/text-match.d.ts +2 -0
- package/dist/text-match.js +7 -0
- package/dist/textarea.d.ts +106 -0
- package/dist/textarea.js +68 -0
- package/dist/time-input.d.ts +131 -0
- package/dist/time-input.js +32 -0
- package/dist/timeline.d.ts +81 -0
- package/dist/timeline.js +30 -0
- package/dist/toast-parts.d.ts +203 -0
- package/dist/toast-parts.js +270 -0
- package/dist/toast.d.ts +2 -0
- package/dist/toast.js +21 -0
- package/dist/toggle-props.d.ts +22 -0
- package/dist/toggle-props.js +14 -0
- package/dist/toggle.d.ts +199 -0
- package/dist/toggle.js +129 -0
- package/dist/token-input.d.ts +136 -0
- package/dist/token-input.js +214 -0
- package/dist/toolbar-context.d.ts +7 -0
- package/dist/toolbar-context.js +20 -0
- package/dist/toolbar.d.ts +120 -0
- package/dist/toolbar.js +77 -0
- package/dist/tooltip.d.ts +160 -0
- package/dist/tooltip.js +224 -0
- package/dist/tree.d.ts +300 -0
- package/dist/tree.js +209 -0
- package/dist/trigger-menu.d.ts +452 -0
- package/dist/trigger-menu.js +254 -0
- package/dist/use-primitive.d.ts +132 -0
- package/dist/use-primitive.js +462 -0
- package/dist/waterfall.d.ts +201 -0
- package/dist/waterfall.js +171 -0
- package/docs/README.md +89 -0
- package/docs/agents.md +1523 -0
- package/docs/components/accordion.md +1369 -0
- package/docs/components/alert-dialog.md +799 -0
- package/docs/components/autocomplete.md +1857 -0
- package/docs/components/avatar.md +272 -0
- package/docs/components/button.md +435 -0
- package/docs/components/calendar.md +1589 -0
- package/docs/components/carousel.md +1171 -0
- package/docs/components/checkbox.md +1008 -0
- package/docs/components/collapsible.md +536 -0
- package/docs/components/color-picker.md +706 -0
- package/docs/components/combobox.md +3504 -0
- package/docs/components/command.md +1481 -0
- package/docs/components/date-input.md +536 -0
- package/docs/components/date-picker.md +1244 -0
- package/docs/components/dialog.md +1397 -0
- package/docs/components/drawer.md +1166 -0
- package/docs/components/field.md +538 -0
- package/docs/components/file-input.md +611 -0
- package/docs/components/hover-card.md +505 -0
- package/docs/components/image-cropper.md +556 -0
- package/docs/components/input.md +306 -0
- package/docs/components/label.md +203 -0
- package/docs/components/listbox.md +1004 -0
- package/docs/components/menu.md +1229 -0
- package/docs/components/menubar.md +443 -0
- package/docs/components/meter.md +315 -0
- package/docs/components/navigation-menu.md +1523 -0
- package/docs/components/number-input.md +1029 -0
- package/docs/components/otp-input.md +512 -0
- package/docs/components/pagination.md +613 -0
- package/docs/components/password-input.md +649 -0
- package/docs/components/popover.md +1448 -0
- package/docs/components/preferences.md +208 -0
- package/docs/components/progress.md +423 -0
- package/docs/components/radio.md +785 -0
- package/docs/components/rating.md +416 -0
- package/docs/components/resizable.md +910 -0
- package/docs/components/scroll-area.md +915 -0
- package/docs/components/segmented-control.md +435 -0
- package/docs/components/select.md +2015 -0
- package/docs/components/separator.md +229 -0
- package/docs/components/slider.md +1084 -0
- package/docs/components/switch.md +565 -0
- package/docs/components/tabs.md +944 -0
- package/docs/components/textarea.md +299 -0
- package/docs/components/time-input.md +224 -0
- package/docs/components/timeline.md +654 -0
- package/docs/components/toast.md +1224 -0
- package/docs/components/toggle.md +500 -0
- package/docs/components/token-input.md +953 -0
- package/docs/components/toolbar.md +739 -0
- package/docs/components/tooltip.md +818 -0
- package/docs/components/tree.md +1306 -0
- package/docs/components/trigger-menu.md +1223 -0
- package/docs/components/waterfall.md +717 -0
- package/docs/controllers.md +71 -0
- package/docs/core.md +8027 -0
- package/docs/custom-parts.md +89 -0
- package/docs/first-component.md +83 -0
- package/docs/forms.md +122 -0
- package/docs/installation.md +72 -0
- package/docs/introduction.md +32 -0
- package/docs/lists-and-menus.md +122 -0
- package/docs/llms.txt +1502 -0
- package/docs/parts-and-composition.md +85 -0
- package/docs/popups.md +108 -0
- package/docs/rendering.md +56 -0
- package/docs/server-rendering.md +180 -0
- package/docs/state-and-events.md +100 -0
- package/docs/styling-and-animation.md +148 -0
- package/docs/utilities/async-options.md +348 -0
- package/docs/utilities/shortcuts.md +159 -0
- package/package.json +352 -3
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A modal dialog that interrupts the user with something important and waits for an answer.
|
|
3
|
+
* It takes none of the props only Dialog has, like `modal`.
|
|
4
|
+
* @stable
|
|
5
|
+
*/
|
|
6
|
+
declare const AlertDialog: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
open: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
defaultOpen: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
controller: import("vue").PropType<import("@ui-sdk/core/dialog").DialogController<any, any> | import("@ui-sdk/core/dialog").AlertDialogController<any, any>>;
|
|
20
|
+
dismissible: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: undefined;
|
|
23
|
+
};
|
|
24
|
+
persistentElements: import("vue").PropType<(Element | string)[] | (() => Element[])>;
|
|
25
|
+
pendingAnnouncement: StringConstructor;
|
|
26
|
+
debug: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
container: import("vue").PropType<Element | DocumentFragment | null>;
|
|
31
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
}>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
|
+
"update:open": (_open: boolean) => boolean;
|
|
35
|
+
"update:modelValue": (_open: boolean) => boolean;
|
|
36
|
+
openChange: (_open: boolean, _details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/dialog").DialogOpenChangeReason> & {
|
|
37
|
+
returnValue?: string;
|
|
38
|
+
}) => boolean;
|
|
39
|
+
openChangeComplete: (_open: boolean) => boolean;
|
|
40
|
+
payloadChange: (_payload: unknown, _details: {
|
|
41
|
+
reason: "trigger-press";
|
|
42
|
+
event?: MouseEvent | KeyboardEvent | TouchEvent | undefined;
|
|
43
|
+
source: import("@ui-sdk/core").ChangeSource;
|
|
44
|
+
cancel: () => void;
|
|
45
|
+
readonly canceled: boolean;
|
|
46
|
+
} | {
|
|
47
|
+
reason: "imperative";
|
|
48
|
+
event?: undefined;
|
|
49
|
+
source: import("@ui-sdk/core").ChangeSource;
|
|
50
|
+
cancel: () => void;
|
|
51
|
+
readonly canceled: boolean;
|
|
52
|
+
} | {
|
|
53
|
+
reason: "shortcut";
|
|
54
|
+
event?: KeyboardEvent | undefined;
|
|
55
|
+
source: import("@ui-sdk/core").ChangeSource;
|
|
56
|
+
cancel: () => void;
|
|
57
|
+
readonly canceled: boolean;
|
|
58
|
+
}) => boolean;
|
|
59
|
+
dismissAttempt: (_details: import("@ui-sdk/core/dialog").DialogDismissAttemptDetails) => boolean;
|
|
60
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
61
|
+
open: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: undefined;
|
|
64
|
+
};
|
|
65
|
+
modelValue: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
defaultOpen: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: undefined;
|
|
72
|
+
};
|
|
73
|
+
controller: import("vue").PropType<import("@ui-sdk/core/dialog").DialogController<any, any> | import("@ui-sdk/core/dialog").AlertDialogController<any, any>>;
|
|
74
|
+
dismissible: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: undefined;
|
|
77
|
+
};
|
|
78
|
+
persistentElements: import("vue").PropType<(Element | string)[] | (() => Element[])>;
|
|
79
|
+
pendingAnnouncement: StringConstructor;
|
|
80
|
+
debug: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
container: import("vue").PropType<Element | DocumentFragment | null>;
|
|
85
|
+
}>> & Readonly<{
|
|
86
|
+
"onUpdate:modelValue"?: ((_open: boolean) => any) | undefined;
|
|
87
|
+
"onUpdate:open"?: ((_open: boolean) => any) | undefined;
|
|
88
|
+
onOpenChange?: ((_open: boolean, _details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/dialog").DialogOpenChangeReason> & {
|
|
89
|
+
returnValue?: string;
|
|
90
|
+
}) => any) | undefined;
|
|
91
|
+
onOpenChangeComplete?: ((_open: boolean) => any) | undefined;
|
|
92
|
+
onPayloadChange?: ((_payload: unknown, _details: {
|
|
93
|
+
reason: "trigger-press";
|
|
94
|
+
event?: MouseEvent | KeyboardEvent | TouchEvent | undefined;
|
|
95
|
+
source: import("@ui-sdk/core").ChangeSource;
|
|
96
|
+
cancel: () => void;
|
|
97
|
+
readonly canceled: boolean;
|
|
98
|
+
} | {
|
|
99
|
+
reason: "imperative";
|
|
100
|
+
event?: undefined;
|
|
101
|
+
source: import("@ui-sdk/core").ChangeSource;
|
|
102
|
+
cancel: () => void;
|
|
103
|
+
readonly canceled: boolean;
|
|
104
|
+
} | {
|
|
105
|
+
reason: "shortcut";
|
|
106
|
+
event?: KeyboardEvent | undefined;
|
|
107
|
+
source: import("@ui-sdk/core").ChangeSource;
|
|
108
|
+
cancel: () => void;
|
|
109
|
+
readonly canceled: boolean;
|
|
110
|
+
}) => any) | undefined;
|
|
111
|
+
onDismissAttempt?: ((_details: import("@ui-sdk/core/dialog").DialogDismissAttemptDetails) => any) | undefined;
|
|
112
|
+
}>, {
|
|
113
|
+
open: boolean;
|
|
114
|
+
debug: boolean;
|
|
115
|
+
defaultOpen: boolean;
|
|
116
|
+
dismissible: boolean;
|
|
117
|
+
modelValue: boolean;
|
|
118
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
119
|
+
/**
|
|
120
|
+
* The button that opens the alert dialog. A trigger outside the alert dialog connects through `controller`.
|
|
121
|
+
* @stable
|
|
122
|
+
*/
|
|
123
|
+
declare const AlertDialogTrigger: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
124
|
+
disabled: {
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
default: undefined;
|
|
127
|
+
};
|
|
128
|
+
focusableWhenDisabled: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: undefined;
|
|
131
|
+
};
|
|
132
|
+
payload: import("vue").PropType<unknown>;
|
|
133
|
+
shortcut: StringConstructor;
|
|
134
|
+
controller: import("vue").PropType<import("@ui-sdk/core/dialog").DialogController<any, any> | import("@ui-sdk/core/dialog").AlertDialogController<any, any>>;
|
|
135
|
+
}>, () => unknown, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
136
|
+
disabled: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
default: undefined;
|
|
139
|
+
};
|
|
140
|
+
focusableWhenDisabled: {
|
|
141
|
+
type: BooleanConstructor;
|
|
142
|
+
default: undefined;
|
|
143
|
+
};
|
|
144
|
+
payload: import("vue").PropType<unknown>;
|
|
145
|
+
shortcut: StringConstructor;
|
|
146
|
+
controller: import("vue").PropType<import("@ui-sdk/core/dialog").DialogController<any, any> | import("@ui-sdk/core/dialog").AlertDialogController<any, any>>;
|
|
147
|
+
}>> & Readonly<{}>, {
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
focusableWhenDisabled: boolean;
|
|
150
|
+
}, import("./use-primitive.js").PartSlots<import("@ui-sdk/core/dialog").DialogPrimitive, "trigger">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "button">;
|
|
151
|
+
/**
|
|
152
|
+
* A dim behind the alert dialog. Pressing it does nothing.
|
|
153
|
+
* @stable
|
|
154
|
+
*/
|
|
155
|
+
declare const AlertDialogBackdrop: import("./create-parts.js").ElementPart<import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
156
|
+
[key: string]: any;
|
|
157
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
158
|
+
[key: string]: any;
|
|
159
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, import("./use-primitive.js").PartSlots<import("@ui-sdk/core/dialog").DialogPrimitive, "backdrop">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "div">;
|
|
160
|
+
/**
|
|
161
|
+
* The alert dialog itself, with the `alertdialog` role, named by its title. Put the title, the description
|
|
162
|
+
* and the buttons that answer it inside.
|
|
163
|
+
* @stable
|
|
164
|
+
*/
|
|
165
|
+
declare const AlertDialogContent: import("./popup.js").PayloadPart<import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
166
|
+
initialFocus: import("vue").PropType<import("@ui-sdk/core/dialog").DialogInitialFocus>;
|
|
167
|
+
finalFocus: import("vue").PropType<import("@ui-sdk/core/dialog").DialogFinalFocus>;
|
|
168
|
+
keepMounted: {
|
|
169
|
+
type: BooleanConstructor;
|
|
170
|
+
default: undefined;
|
|
171
|
+
};
|
|
172
|
+
container: import("vue").PropType<Element | DocumentFragment | null>;
|
|
173
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
174
|
+
[key: string]: any;
|
|
175
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
176
|
+
[key: string]: any;
|
|
177
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
178
|
+
initialFocus: import("vue").PropType<import("@ui-sdk/core/dialog").DialogInitialFocus>;
|
|
179
|
+
finalFocus: import("vue").PropType<import("@ui-sdk/core/dialog").DialogFinalFocus>;
|
|
180
|
+
keepMounted: {
|
|
181
|
+
type: BooleanConstructor;
|
|
182
|
+
default: undefined;
|
|
183
|
+
};
|
|
184
|
+
container: import("vue").PropType<Element | DocumentFragment | null>;
|
|
185
|
+
}>> & Readonly<{}>, {
|
|
186
|
+
keepMounted: boolean;
|
|
187
|
+
}, import("./use-primitive.js").PartSlots<import("@ui-sdk/core/dialog").DialogPrimitive, "content">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "div">>;
|
|
188
|
+
/**
|
|
189
|
+
* The alert dialog's title, which names it. A level 2 heading by default.
|
|
190
|
+
* @stable
|
|
191
|
+
*/
|
|
192
|
+
declare const AlertDialogTitle: Pick<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, "h2">;
|
|
193
|
+
/**
|
|
194
|
+
* Describes the alert dialog while it's rendered. A paragraph by default.
|
|
195
|
+
* @stable
|
|
196
|
+
*/
|
|
197
|
+
declare const AlertDialogDescription: Pick<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, "p">;
|
|
198
|
+
/**
|
|
199
|
+
* A button that closes the alert dialog, like Cancel or Delete. An `action` runs first, and a Promise it
|
|
200
|
+
* returns keeps the alert dialog open until it settles.
|
|
201
|
+
* @stable
|
|
202
|
+
*/
|
|
203
|
+
declare const AlertDialogClose: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
204
|
+
value: StringConstructor;
|
|
205
|
+
action: import("vue").PropType<(event: Event | undefined, details: import("@ui-sdk/core").ActionDetails) => unknown>;
|
|
206
|
+
onAction: import("vue").PropType<(event: Event | undefined, details: import("@ui-sdk/core").ActionDetails) => unknown>;
|
|
207
|
+
}>, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
208
|
+
[key: string]: any;
|
|
209
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
210
|
+
[key: string]: any;
|
|
211
|
+
}>[] | null) & {
|
|
212
|
+
state: NoInfer<import("@ui-sdk/core/dialog").DialogCloseState>;
|
|
213
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
214
|
+
value: StringConstructor;
|
|
215
|
+
action: import("vue").PropType<(event: Event | undefined, details: import("@ui-sdk/core").ActionDetails) => unknown>;
|
|
216
|
+
onAction: import("vue").PropType<(event: Event | undefined, details: import("@ui-sdk/core").ActionDetails) => unknown>;
|
|
217
|
+
}>> & Readonly<{}>, {}, import("./use-primitive.js").PartSlots<import("@ui-sdk/core/dialog").DialogPrimitive, "close">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "button">;
|
|
218
|
+
/**
|
|
219
|
+
* Shows a trigger's shortcut inside the trigger.
|
|
220
|
+
* @stable
|
|
221
|
+
*/
|
|
222
|
+
declare const AlertDialogShortcut: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
223
|
+
shortcut: StringConstructor;
|
|
224
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
225
|
+
[key: string]: any;
|
|
226
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
227
|
+
shortcut: StringConstructor;
|
|
228
|
+
}>> & Readonly<{}>, {}, import("./use-primitive.js").PartSlots<import("@ui-sdk/core/dialog").DialogPrimitive, "shortcut">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "span">;
|
|
229
|
+
export { confirm, createAlertDialogController, createConfirm, } from "@ui-sdk/core/alert-dialog";
|
|
230
|
+
export type { AlertDialogBackdropState, AlertDialogCloseActionDetails, AlertDialogCloseProps, AlertDialogCloseState, AlertDialogContentProps, AlertDialogContentState, AlertDialogController, AlertDialogOpenChangeReason, AlertDialogOptions, AlertDialogPayloadChangeReason, AlertDialogPrimitive, AlertDialogShortcutProps, AlertDialogShortcutState, AlertDialogTriggerProps, AlertDialogTriggerState, ConfirmEntry, ConfirmOptions, } from "@ui-sdk/core/alert-dialog";
|
|
231
|
+
export { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogShortcut, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/alert-dialog.ts
|
|
2
|
+
import { alertDialog as alertDialogPrimitive } from "@ui-sdk/core/alert-dialog";
|
|
3
|
+
import { defineDialogParts } from "./dialog-parts.js";
|
|
4
|
+
import {
|
|
5
|
+
confirm,
|
|
6
|
+
createAlertDialogController,
|
|
7
|
+
createConfirm
|
|
8
|
+
} from "@ui-sdk/core/alert-dialog";
|
|
9
|
+
var alertParts = defineDialogParts(
|
|
10
|
+
alertDialogPrimitive,
|
|
11
|
+
"AlertDialog"
|
|
12
|
+
);
|
|
13
|
+
var AlertDialog = alertParts.AlertRoot;
|
|
14
|
+
var AlertDialogTrigger = alertParts.Trigger;
|
|
15
|
+
var AlertDialogBackdrop = alertParts.Backdrop;
|
|
16
|
+
var AlertDialogContent = alertParts.Content;
|
|
17
|
+
var AlertDialogTitle = alertParts.Title;
|
|
18
|
+
var AlertDialogDescription = alertParts.Description;
|
|
19
|
+
var AlertDialogClose = alertParts.Close;
|
|
20
|
+
var AlertDialogShortcut = alertParts.Shortcut;
|
|
21
|
+
export {
|
|
22
|
+
AlertDialog,
|
|
23
|
+
AlertDialogBackdrop,
|
|
24
|
+
AlertDialogClose,
|
|
25
|
+
AlertDialogContent,
|
|
26
|
+
AlertDialogDescription,
|
|
27
|
+
AlertDialogShortcut,
|
|
28
|
+
AlertDialogTitle,
|
|
29
|
+
AlertDialogTrigger,
|
|
30
|
+
confirm,
|
|
31
|
+
createAlertDialogController,
|
|
32
|
+
createConfirm
|
|
33
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type AsyncOptionsContext, type AsyncOptionsOptions, type AsyncOptionsState } from "@ui-sdk/core/async-options";
|
|
2
|
+
/**
|
|
3
|
+
* Options loaded for what the user types, latest first. Returns reactive state
|
|
4
|
+
* and `setQuery`, for a combobox with `:filter="false"`.
|
|
5
|
+
* @stable
|
|
6
|
+
*/
|
|
7
|
+
declare function useAsyncOptions<Item>(load: (query: string, context: AsyncOptionsContext) => Promise<Item[] | {
|
|
8
|
+
items: Item[];
|
|
9
|
+
hasMore?: boolean;
|
|
10
|
+
}>, options?: AsyncOptionsOptions): {
|
|
11
|
+
state: import("vue").ShallowRef<AsyncOptionsState<Item>, AsyncOptionsState<Item>>;
|
|
12
|
+
setQuery: (next: string) => void;
|
|
13
|
+
reload: () => void;
|
|
14
|
+
loadMore: () => void;
|
|
15
|
+
};
|
|
16
|
+
export { createAsyncOptions } from "@ui-sdk/core/async-options";
|
|
17
|
+
export type { AsyncOptions, AsyncOptionsContext, AsyncOptionsOptions, AsyncOptionsState, AsyncOptionsStatus, } from "@ui-sdk/core/async-options";
|
|
18
|
+
export { useAsyncOptions };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/async-options.ts
|
|
2
|
+
import {
|
|
3
|
+
createAsyncOptions
|
|
4
|
+
} from "@ui-sdk/core/async-options";
|
|
5
|
+
import { getCurrentInstance, onMounted, onScopeDispose, shallowRef } from "vue";
|
|
6
|
+
import { createAsyncOptions as createAsyncOptions2 } from "@ui-sdk/core/async-options";
|
|
7
|
+
function useAsyncOptions(load, options) {
|
|
8
|
+
const helper = createAsyncOptions(load, {
|
|
9
|
+
...options,
|
|
10
|
+
immediate: false
|
|
11
|
+
});
|
|
12
|
+
const immediate = !!options?.immediate;
|
|
13
|
+
const initial = helper.getState();
|
|
14
|
+
const state = shallowRef(
|
|
15
|
+
immediate ? { ...initial, status: "loading" } : initial
|
|
16
|
+
);
|
|
17
|
+
onScopeDispose(helper.subscribe(() => state.value = helper.getState()));
|
|
18
|
+
const start = () => {
|
|
19
|
+
if (immediate && helper.getState() === initial) {
|
|
20
|
+
helper.reload();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const instance = getCurrentInstance();
|
|
24
|
+
if (instance && !instance.isMounted) {
|
|
25
|
+
onMounted(start);
|
|
26
|
+
} else if (typeof document !== "undefined") {
|
|
27
|
+
start();
|
|
28
|
+
}
|
|
29
|
+
onScopeDispose(() => helper.cancel());
|
|
30
|
+
return {
|
|
31
|
+
state,
|
|
32
|
+
setQuery: helper.setQuery,
|
|
33
|
+
reload: helper.reload,
|
|
34
|
+
loadMore: helper.loadMore
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
createAsyncOptions2 as createAsyncOptions,
|
|
39
|
+
useAsyncOptions
|
|
40
|
+
};
|