@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
package/dist/textarea.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// src/textarea.ts
|
|
2
|
+
import {
|
|
3
|
+
textarea as textareaPrimitive
|
|
4
|
+
} from "@ui-sdk/core/input";
|
|
5
|
+
import { defineComponent } from "vue";
|
|
6
|
+
import { withElement } from "./create-parts.js";
|
|
7
|
+
import { useFieldControl } from "./field-context.js";
|
|
8
|
+
import {
|
|
9
|
+
elementProps,
|
|
10
|
+
readOnlyOf,
|
|
11
|
+
textEmits,
|
|
12
|
+
textOptions,
|
|
13
|
+
textProps
|
|
14
|
+
} from "./text-control.js";
|
|
15
|
+
import {
|
|
16
|
+
optionalBoolean,
|
|
17
|
+
orModel,
|
|
18
|
+
usePart,
|
|
19
|
+
usePrimitive
|
|
20
|
+
} from "./use-primitive.js";
|
|
21
|
+
import { createInputController } from "@ui-sdk/core/input";
|
|
22
|
+
var Textarea = withElement(
|
|
23
|
+
"textarea",
|
|
24
|
+
defineComponent({
|
|
25
|
+
name: "Textarea",
|
|
26
|
+
inheritAttrs: false,
|
|
27
|
+
props: {
|
|
28
|
+
...textProps,
|
|
29
|
+
autoResize: optionalBoolean,
|
|
30
|
+
submitShortcut: String,
|
|
31
|
+
// A function prop, so `@submit` binds to it, and without one the shortcut submits the form.
|
|
32
|
+
onSubmit: Function
|
|
33
|
+
},
|
|
34
|
+
emits: textEmits,
|
|
35
|
+
slots: Object,
|
|
36
|
+
setup(props, { attrs, emit }) {
|
|
37
|
+
const field = useFieldControl();
|
|
38
|
+
const options = textOptions(props, emit);
|
|
39
|
+
const textarea = usePrimitive(textareaPrimitive, () => ({
|
|
40
|
+
...options(),
|
|
41
|
+
autoResize: props.autoResize,
|
|
42
|
+
submitShortcut: props.submitShortcut,
|
|
43
|
+
onSubmit: props.onSubmit
|
|
44
|
+
}));
|
|
45
|
+
const part = () => ({
|
|
46
|
+
disabled: props.disabled || field?.disabled(),
|
|
47
|
+
readOnly: readOnlyOf(props, attrs),
|
|
48
|
+
required: props.required
|
|
49
|
+
});
|
|
50
|
+
return usePart(
|
|
51
|
+
textarea,
|
|
52
|
+
"root",
|
|
53
|
+
part,
|
|
54
|
+
() => elementProps(props, field, attrs, "textarea"),
|
|
55
|
+
{
|
|
56
|
+
tag: "textarea",
|
|
57
|
+
// A default value is the textarea's text, which a form reset returns to.
|
|
58
|
+
children: () => orModel(props.value, props.modelValue) === void 0 ? props.defaultValue : void 0,
|
|
59
|
+
extend: field?.props
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
);
|
|
65
|
+
export {
|
|
66
|
+
Textarea,
|
|
67
|
+
createInputController
|
|
68
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type TimeInputGranularity } from "@ui-sdk/core/time-input";
|
|
2
|
+
import { type PropType } from "vue";
|
|
3
|
+
import type { PartSlots } from "./use-primitive.js";
|
|
4
|
+
/**
|
|
5
|
+
* A segment, like the hour: an input arrow keys step and digits fill, named
|
|
6
|
+
* by its unit. The text between segments renders as a span.
|
|
7
|
+
* @stable
|
|
8
|
+
*/
|
|
9
|
+
declare const TimeInputSegment: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
segment: {
|
|
11
|
+
type: PropType<import("@ui-sdk/core/date-input").DateInputSegmentData>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>[] | null) & {
|
|
19
|
+
state: NoInfer<import("@ui-sdk/core/date-input").DateInputSegmentState>;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
segment: {
|
|
22
|
+
type: PropType<import("@ui-sdk/core/date-input").DateInputSegmentData>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {}, PartSlots<import("@ui-sdk/core/date-input").DateInputPrimitive, "segment">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "input">;
|
|
26
|
+
/**
|
|
27
|
+
* The root: a group of segments, hours and minutes, with seconds and AM/PM
|
|
28
|
+
* when shown, and the hidden input the time submits with. Without content it
|
|
29
|
+
* renders every segment; its default slot gets `state`, whose `segments` it can render.
|
|
30
|
+
* @stable
|
|
31
|
+
*/
|
|
32
|
+
declare const TimeInput: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
33
|
+
granularity: PropType<TimeInputGranularity>;
|
|
34
|
+
value: {
|
|
35
|
+
type: PropType<string | null>;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
modelValue: {
|
|
39
|
+
type: PropType<string | null>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
defaultValue: {
|
|
43
|
+
type: PropType<string | null>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
hourCycle: PropType<import("@ui-sdk/core/date-input").HourCycle>;
|
|
47
|
+
min: StringConstructor;
|
|
48
|
+
max: StringConstructor;
|
|
49
|
+
locale: StringConstructor;
|
|
50
|
+
disabled: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
readOnly: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
required: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
name: StringConstructor;
|
|
63
|
+
form: StringConstructor;
|
|
64
|
+
controller: PropType<import("@ui-sdk/core/date-input").DateInputController>;
|
|
65
|
+
debug: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
}>, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
72
|
+
[key: string]: any;
|
|
73
|
+
}>[] | null) & {
|
|
74
|
+
state: NoInfer<import("@ui-sdk/core/date-input").DateInputState>;
|
|
75
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
76
|
+
"update:value": (_value: string | null) => boolean;
|
|
77
|
+
"update:modelValue": (_value: string | null) => boolean;
|
|
78
|
+
valueChange: (_value: string | null, _details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/date-input").DateInputValueChangeReason>) => boolean;
|
|
79
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
|
+
granularity: PropType<TimeInputGranularity>;
|
|
81
|
+
value: {
|
|
82
|
+
type: PropType<string | null>;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
modelValue: {
|
|
86
|
+
type: PropType<string | null>;
|
|
87
|
+
default: undefined;
|
|
88
|
+
};
|
|
89
|
+
defaultValue: {
|
|
90
|
+
type: PropType<string | null>;
|
|
91
|
+
default: undefined;
|
|
92
|
+
};
|
|
93
|
+
hourCycle: PropType<import("@ui-sdk/core/date-input").HourCycle>;
|
|
94
|
+
min: StringConstructor;
|
|
95
|
+
max: StringConstructor;
|
|
96
|
+
locale: StringConstructor;
|
|
97
|
+
disabled: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: undefined;
|
|
100
|
+
};
|
|
101
|
+
readOnly: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: undefined;
|
|
104
|
+
};
|
|
105
|
+
required: {
|
|
106
|
+
type: BooleanConstructor;
|
|
107
|
+
default: undefined;
|
|
108
|
+
};
|
|
109
|
+
name: StringConstructor;
|
|
110
|
+
form: StringConstructor;
|
|
111
|
+
controller: PropType<import("@ui-sdk/core/date-input").DateInputController>;
|
|
112
|
+
debug: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
default: undefined;
|
|
115
|
+
};
|
|
116
|
+
}>> & Readonly<{
|
|
117
|
+
"onUpdate:modelValue"?: ((_value: string | null) => any) | undefined;
|
|
118
|
+
"onUpdate:value"?: ((_value: string | null) => any) | undefined;
|
|
119
|
+
onValueChange?: ((_value: string | null, _details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/date-input").DateInputValueChangeReason>) => any) | undefined;
|
|
120
|
+
}>, {
|
|
121
|
+
value: string | null;
|
|
122
|
+
disabled: boolean;
|
|
123
|
+
debug: boolean;
|
|
124
|
+
defaultValue: string | null;
|
|
125
|
+
required: boolean;
|
|
126
|
+
readOnly: boolean;
|
|
127
|
+
modelValue: string | null;
|
|
128
|
+
}, PartSlots<import("@ui-sdk/core/date-input").DateInputPrimitive, "root">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "div">;
|
|
129
|
+
export { createTimeInputController } from "@ui-sdk/core/time-input";
|
|
130
|
+
export type { HourCycle, TimeInputApi, TimeInputChangeOptions, TimeInputController, TimeInputGranularity, TimeInputOptions, TimeInputPrimitive, TimeInputSegmentData, TimeInputSegmentProps, TimeInputSegmentState, TimeInputSegmentType, TimeInputState, TimeInputValueChangeReason, } from "@ui-sdk/core/time-input";
|
|
131
|
+
export { TimeInput, TimeInputSegment };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/time-input.ts
|
|
2
|
+
import { timeInput } from "@ui-sdk/core/time-input";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { withElement } from "./create-parts.js";
|
|
5
|
+
import {
|
|
6
|
+
defineSegment,
|
|
7
|
+
rootEmits,
|
|
8
|
+
rootProps,
|
|
9
|
+
setupRoot
|
|
10
|
+
} from "./segmented-input.js";
|
|
11
|
+
import { createTimeInputController } from "@ui-sdk/core/time-input";
|
|
12
|
+
var primitive = timeInput;
|
|
13
|
+
var TimeInputSegment = defineSegment(primitive, "TimeInputSegment");
|
|
14
|
+
var TimeInput = withElement(
|
|
15
|
+
"div",
|
|
16
|
+
defineComponent({
|
|
17
|
+
name: "TimeInput",
|
|
18
|
+
inheritAttrs: false,
|
|
19
|
+
props: {
|
|
20
|
+
...rootProps,
|
|
21
|
+
granularity: String
|
|
22
|
+
},
|
|
23
|
+
emits: rootEmits,
|
|
24
|
+
slots: Object,
|
|
25
|
+
setup: (props, context) => setupRoot(primitive, TimeInputSegment, props, context)
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
export {
|
|
29
|
+
TimeInput,
|
|
30
|
+
TimeInputSegment,
|
|
31
|
+
createTimeInputController
|
|
32
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list of dated events, like an activity feed or an order's history, with
|
|
3
|
+
* one tab stop and arrow keys between events. `feed` makes it a feed of
|
|
4
|
+
* articles that loads more as people scroll.
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
declare const Timeline: import("./create-parts.js").ElementPart<new (props: Omit<import("@ui-sdk/core").OptionsOf<import("@ui-sdk/core/timeline").TimelinePrimitive> & import("@ui-sdk/core/renderer").BaseSlotProps, never> & {} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<Omit<import("@ui-sdk/core").OptionsOf<import("@ui-sdk/core/timeline").TimelinePrimitive> & import("@ui-sdk/core/renderer").BaseSlotProps, never> & {}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {}, import("vue").PublicProps, {}, false, {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineState>>, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
8
|
+
P: {};
|
|
9
|
+
B: {};
|
|
10
|
+
D: {};
|
|
11
|
+
C: {};
|
|
12
|
+
M: {};
|
|
13
|
+
Defaults: {};
|
|
14
|
+
}, Omit<import("@ui-sdk/core").OptionsOf<import("@ui-sdk/core/timeline").TimelinePrimitive> & import("@ui-sdk/core/renderer").BaseSlotProps, never> & {}, {}, {}, {}, {}, {}>, "div">;
|
|
15
|
+
/**
|
|
16
|
+
* One event. Arrow keys move between events, and links and buttons inside
|
|
17
|
+
* stay in the tab order.
|
|
18
|
+
* @experimental
|
|
19
|
+
*/
|
|
20
|
+
declare const TimelineItem: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/timeline").TimelineItemProps> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/timeline").TimelineItemProps> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, "div">;
|
|
21
|
+
/**
|
|
22
|
+
* The dot or icon that marks its event on the line. Hidden from assistive
|
|
23
|
+
* technology.
|
|
24
|
+
* @experimental
|
|
25
|
+
*/
|
|
26
|
+
declare const TimelineMarker: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
27
|
+
value?: string;
|
|
28
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
29
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
30
|
+
value?: string;
|
|
31
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
32
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, "div">;
|
|
33
|
+
/**
|
|
34
|
+
* The line between its event's marker and the next one. Hidden from assistive
|
|
35
|
+
* technology.
|
|
36
|
+
* @experimental
|
|
37
|
+
*/
|
|
38
|
+
declare const TimelineConnector: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
39
|
+
value?: string;
|
|
40
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
41
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
42
|
+
value?: string;
|
|
43
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
44
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, "div">;
|
|
45
|
+
/**
|
|
46
|
+
* When its event happened, as a `<time>`. Pass `datetime` so machines can read
|
|
47
|
+
* it. It describes the event.
|
|
48
|
+
* @experimental
|
|
49
|
+
*/
|
|
50
|
+
declare const TimelineTime: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
51
|
+
value?: string;
|
|
52
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
53
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
54
|
+
value?: string;
|
|
55
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
56
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, "time">;
|
|
57
|
+
/**
|
|
58
|
+
* What happened. It names its event.
|
|
59
|
+
* @experimental
|
|
60
|
+
*/
|
|
61
|
+
declare const TimelineTitle: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
62
|
+
value?: string;
|
|
63
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
64
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
65
|
+
value?: string;
|
|
66
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
67
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, "div">;
|
|
68
|
+
/**
|
|
69
|
+
* More about its event. It describes the event.
|
|
70
|
+
* @experimental
|
|
71
|
+
*/
|
|
72
|
+
declare const TimelineDescription: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
73
|
+
value?: string;
|
|
74
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
75
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
76
|
+
value?: string;
|
|
77
|
+
status?: import("@ui-sdk/core/timeline").TimelineStatus;
|
|
78
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/timeline").TimelineItemState>>>, "div">;
|
|
79
|
+
export { createTimelineController } from "@ui-sdk/core/timeline";
|
|
80
|
+
export type { TimelineApi, TimelineConnectorState, TimelineController, TimelineDescriptionState, TimelineItemProps, TimelineItemState, TimelineMarkerState, TimelineOptions, TimelineOrientation, TimelinePrimitive, TimelineState, TimelineStatus, TimelineTimeState, TimelineTitleState, } from "@ui-sdk/core/timeline";
|
|
81
|
+
export { Timeline, TimelineConnector, TimelineDescription, TimelineItem, TimelineMarker, TimelineTime, TimelineTitle, };
|
package/dist/timeline.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/timeline.ts
|
|
2
|
+
import { timeline } from "@ui-sdk/core/timeline";
|
|
3
|
+
import { createParts } from "./create-parts.js";
|
|
4
|
+
import { createTimelineController } from "@ui-sdk/core/timeline";
|
|
5
|
+
var parts = createParts(timeline, {
|
|
6
|
+
root: "div",
|
|
7
|
+
item: "div",
|
|
8
|
+
marker: "div",
|
|
9
|
+
connector: "div",
|
|
10
|
+
time: "time",
|
|
11
|
+
title: "div",
|
|
12
|
+
description: "div"
|
|
13
|
+
});
|
|
14
|
+
var Timeline = parts.Root;
|
|
15
|
+
var TimelineItem = parts.Item;
|
|
16
|
+
var TimelineMarker = parts.Marker;
|
|
17
|
+
var TimelineConnector = parts.Connector;
|
|
18
|
+
var TimelineTime = parts.Time;
|
|
19
|
+
var TimelineTitle = parts.Title;
|
|
20
|
+
var TimelineDescription = parts.Description;
|
|
21
|
+
export {
|
|
22
|
+
Timeline,
|
|
23
|
+
TimelineConnector,
|
|
24
|
+
TimelineDescription,
|
|
25
|
+
TimelineItem,
|
|
26
|
+
TimelineMarker,
|
|
27
|
+
TimelineTime,
|
|
28
|
+
TimelineTitle,
|
|
29
|
+
createTimelineController
|
|
30
|
+
};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { createToaster as createCoreToaster, type ToastCloseProps, type ToastItem, type Toaster } from "@ui-sdk/core/toast";
|
|
2
|
+
import { type PropType, type SlotsType, type VNode } from "vue";
|
|
3
|
+
import { type PartSlots } from "./use-primitive.js";
|
|
4
|
+
/**
|
|
5
|
+
* What toasts can say in Vue: text, or a VNode.
|
|
6
|
+
* @stable
|
|
7
|
+
*/
|
|
8
|
+
type ToastContent = string | VNode;
|
|
9
|
+
type ButtonAction = NonNullable<ToastCloseProps["action"]>;
|
|
10
|
+
/**
|
|
11
|
+
* Shows a toaster's toasts. Place it once, or let `<OverlayHost />` render it.
|
|
12
|
+
* @stable
|
|
13
|
+
*/
|
|
14
|
+
declare const ToastRegion: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
15
|
+
toaster: PropType<Toaster<any>>;
|
|
16
|
+
side: PropType<"top" | "bottom">;
|
|
17
|
+
align: PropType<"start" | "center" | "end">;
|
|
18
|
+
maxVisible: NumberConstructor;
|
|
19
|
+
expanded: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: undefined;
|
|
22
|
+
};
|
|
23
|
+
shortcut: {
|
|
24
|
+
type: PropType<string | null>;
|
|
25
|
+
default: undefined;
|
|
26
|
+
};
|
|
27
|
+
pendingAnnouncement: StringConstructor;
|
|
28
|
+
debug: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
container: PropType<Element | DocumentFragment | null>;
|
|
33
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
toaster: PropType<Toaster<any>>;
|
|
39
|
+
side: PropType<"top" | "bottom">;
|
|
40
|
+
align: PropType<"start" | "center" | "end">;
|
|
41
|
+
maxVisible: NumberConstructor;
|
|
42
|
+
expanded: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
shortcut: {
|
|
47
|
+
type: PropType<string | null>;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
pendingAnnouncement: StringConstructor;
|
|
51
|
+
debug: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
container: PropType<Element | DocumentFragment | null>;
|
|
56
|
+
}>> & Readonly<{}>, {
|
|
57
|
+
shortcut: string | null;
|
|
58
|
+
debug: boolean;
|
|
59
|
+
expanded: boolean;
|
|
60
|
+
}, SlotsType<{
|
|
61
|
+
/** Renders each toast: `#default="{ toast }"`. */
|
|
62
|
+
default?: (scope: {
|
|
63
|
+
toast: ToastItem<ToastContent>["toast"];
|
|
64
|
+
item: ToastItem<ToastContent>;
|
|
65
|
+
}) => VNode[];
|
|
66
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "section">;
|
|
67
|
+
declare const HostedToastRegion: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
68
|
+
toaster: PropType<Toaster<any>>;
|
|
69
|
+
side: PropType<"top" | "bottom">;
|
|
70
|
+
align: PropType<"start" | "center" | "end">;
|
|
71
|
+
maxVisible: NumberConstructor;
|
|
72
|
+
expanded: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
shortcut: {
|
|
77
|
+
type: PropType<string | null>;
|
|
78
|
+
default: undefined;
|
|
79
|
+
};
|
|
80
|
+
pendingAnnouncement: StringConstructor;
|
|
81
|
+
debug: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
container: PropType<Element | DocumentFragment | null>;
|
|
86
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
91
|
+
toaster: PropType<Toaster<any>>;
|
|
92
|
+
side: PropType<"top" | "bottom">;
|
|
93
|
+
align: PropType<"start" | "center" | "end">;
|
|
94
|
+
maxVisible: NumberConstructor;
|
|
95
|
+
expanded: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
shortcut: {
|
|
100
|
+
type: PropType<string | null>;
|
|
101
|
+
default: undefined;
|
|
102
|
+
};
|
|
103
|
+
pendingAnnouncement: StringConstructor;
|
|
104
|
+
debug: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: undefined;
|
|
107
|
+
};
|
|
108
|
+
container: PropType<Element | DocumentFragment | null>;
|
|
109
|
+
}>> & Readonly<{}>, {
|
|
110
|
+
shortcut: string | null;
|
|
111
|
+
debug: boolean;
|
|
112
|
+
expanded: boolean;
|
|
113
|
+
}, SlotsType<{
|
|
114
|
+
/** Renders each toast: `#default="{ toast }"`. */
|
|
115
|
+
default?: (scope: {
|
|
116
|
+
toast: ToastItem<ToastContent>["toast"];
|
|
117
|
+
item: ToastItem<ToastContent>;
|
|
118
|
+
}) => VNode[];
|
|
119
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "section">;
|
|
120
|
+
/**
|
|
121
|
+
* One toast. Swipe it toward the region's side, or press Escape on it, to dismiss it.
|
|
122
|
+
* @stable
|
|
123
|
+
*/
|
|
124
|
+
declare const Toast: import("./create-parts.js").ElementPart<import("vue").DefineComponent<{}, (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
127
|
+
[key: string]: any;
|
|
128
|
+
}>[] | null) & {
|
|
129
|
+
state: NoInfer<import("@ui-sdk/core/toast").ToastState>;
|
|
130
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, PartSlots<import("@ui-sdk/core/toast").ToastRegionPrimitive, "root">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "li">;
|
|
131
|
+
/**
|
|
132
|
+
* The toast's title. Renders the toast's `title` without content of its own, and nothing when it has neither.
|
|
133
|
+
* @stable
|
|
134
|
+
*/
|
|
135
|
+
declare const ToastTitle: import("./create-parts.js").ElementPart<import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
136
|
+
[key: string]: any;
|
|
137
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
138
|
+
[key: string]: any;
|
|
139
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, PartSlots<import("@ui-sdk/core/toast").ToastRegionPrimitive, "title" | "description">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "div">;
|
|
140
|
+
/**
|
|
141
|
+
* The toast's description. Renders the toast's `description` without content of its own, and nothing when it has neither.
|
|
142
|
+
* @stable
|
|
143
|
+
*/
|
|
144
|
+
declare const ToastDescription: import("./create-parts.js").ElementPart<import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
145
|
+
[key: string]: any;
|
|
146
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
147
|
+
[key: string]: any;
|
|
148
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, PartSlots<import("@ui-sdk/core/toast").ToastRegionPrimitive, "title" | "description">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "div">;
|
|
149
|
+
/**
|
|
150
|
+
* The toast's action, like Undo. Renders the toast's `action` label without
|
|
151
|
+
* content of its own, as a link when the action has an `href`. A Promise from
|
|
152
|
+
* its handler keeps the toast open and the button pending.
|
|
153
|
+
* @stable
|
|
154
|
+
*/
|
|
155
|
+
declare const ToastAction: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
156
|
+
onAction: PropType<ButtonAction>;
|
|
157
|
+
dismiss: {
|
|
158
|
+
type: BooleanConstructor;
|
|
159
|
+
default: undefined;
|
|
160
|
+
};
|
|
161
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
162
|
+
[key: string]: any;
|
|
163
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
164
|
+
[key: string]: any;
|
|
165
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
166
|
+
onAction: PropType<ButtonAction>;
|
|
167
|
+
dismiss: {
|
|
168
|
+
type: BooleanConstructor;
|
|
169
|
+
default: undefined;
|
|
170
|
+
};
|
|
171
|
+
}>> & Readonly<{}>, {
|
|
172
|
+
dismiss: boolean;
|
|
173
|
+
}, PartSlots<import("@ui-sdk/core/toast").ToastRegionPrimitive, "action">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "button">;
|
|
174
|
+
/**
|
|
175
|
+
* Closes the toast. With an `action`, runs it first, and a returned Promise keeps the toast open until it settles.
|
|
176
|
+
* @stable
|
|
177
|
+
*/
|
|
178
|
+
declare const ToastClose: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
179
|
+
action: PropType<ButtonAction>;
|
|
180
|
+
onAction: PropType<ButtonAction>;
|
|
181
|
+
}>, (() => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
182
|
+
[key: string]: any;
|
|
183
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
184
|
+
[key: string]: any;
|
|
185
|
+
}>[] | null) & {
|
|
186
|
+
state: NoInfer<import("@ui-sdk/core/toast").ToastButtonState>;
|
|
187
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
188
|
+
action: PropType<ButtonAction>;
|
|
189
|
+
onAction: PropType<ButtonAction>;
|
|
190
|
+
}>> & Readonly<{}>, {}, PartSlots<import("@ui-sdk/core/toast").ToastRegionPrimitive, "close">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "button">;
|
|
191
|
+
/**
|
|
192
|
+
* Shows a toast from anywhere: `toast("Saved")`, `toast.success(...)`,
|
|
193
|
+
* `toast.promise(save(), { loading, success, error })`. Content is text or a VNode.
|
|
194
|
+
* @stable
|
|
195
|
+
*/
|
|
196
|
+
declare const toast: Toaster<ToastContent>;
|
|
197
|
+
/**
|
|
198
|
+
* Creates a queue of toasts and the function that adds to it, for a second
|
|
199
|
+
* region with its own toasts. Pass it to that region as `toaster`.
|
|
200
|
+
* @stable
|
|
201
|
+
*/
|
|
202
|
+
declare const createToaster: <Content = ToastContent>(options?: Parameters<typeof createCoreToaster>[0]) => Toaster<Content>;
|
|
203
|
+
export { createToaster, HostedToastRegion, toast, Toast, ToastAction, ToastClose, type ToastContent, ToastDescription, ToastRegion, ToastTitle, };
|