@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/tabs.d.ts
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layered sections of content, one shown at a time.
|
|
3
|
+
* @stable
|
|
4
|
+
*/
|
|
5
|
+
declare const Tabs: new <A extends string = string, B extends unknown = unknown>(props: {
|
|
6
|
+
value?: A | null | undefined;
|
|
7
|
+
defaultValue?: A | null | undefined;
|
|
8
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => void) | undefined;
|
|
9
|
+
orientation?: import("@ui-sdk/core/tabs").TabsOrientation;
|
|
10
|
+
activation?: "automatic" | "manual";
|
|
11
|
+
loop?: boolean;
|
|
12
|
+
hiddenUntilFound?: boolean;
|
|
13
|
+
controller?: {
|
|
14
|
+
getValue: () => A | null;
|
|
15
|
+
setValue: (value: A | null, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
16
|
+
select: (value: A, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
17
|
+
focus: () => void;
|
|
18
|
+
} | undefined;
|
|
19
|
+
} & import("@ui-sdk/core").PrimitiveOptions & import("@ui-sdk/core/renderer").BaseSlotProps & {
|
|
20
|
+
"onUpdate:value"?: ((value: A | null) => any) | undefined;
|
|
21
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => any) | undefined;
|
|
22
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
23
|
+
[x: `data${Capitalize<string>}`]: unknown;
|
|
24
|
+
contextmenu?: string | undefined | undefined;
|
|
25
|
+
style?: import("vue").StyleValue;
|
|
26
|
+
title?: string | undefined | undefined;
|
|
27
|
+
dir?: string | undefined | undefined;
|
|
28
|
+
'aria-labelledby'?: string | undefined | undefined;
|
|
29
|
+
'aria-label'?: string | undefined | undefined;
|
|
30
|
+
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
31
|
+
radiogroup?: string | undefined | undefined;
|
|
32
|
+
'aria-activedescendant'?: string | undefined | undefined;
|
|
33
|
+
'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
34
|
+
'aria-checked'?: "mixed" | (boolean | "true" | "false") | undefined;
|
|
35
|
+
'aria-colcount'?: (string | number) | undefined;
|
|
36
|
+
'aria-colindex'?: (string | number) | undefined;
|
|
37
|
+
'aria-colspan'?: (string | number) | undefined;
|
|
38
|
+
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
39
|
+
'aria-level'?: (string | number) | undefined;
|
|
40
|
+
'aria-modal'?: (boolean | "true" | "false") | undefined;
|
|
41
|
+
'aria-multiline'?: (boolean | "true" | "false") | undefined;
|
|
42
|
+
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
|
|
43
|
+
'aria-orientation'?: "horizontal" | "vertical" | undefined | undefined;
|
|
44
|
+
'aria-placeholder'?: string | undefined | undefined;
|
|
45
|
+
'aria-posinset'?: (string | number) | undefined;
|
|
46
|
+
'aria-pressed'?: "mixed" | (boolean | "true" | "false") | undefined;
|
|
47
|
+
'aria-readonly'?: (boolean | "true" | "false") | undefined;
|
|
48
|
+
'aria-required'?: (boolean | "true" | "false") | undefined;
|
|
49
|
+
'aria-rowcount'?: (string | number) | undefined;
|
|
50
|
+
'aria-rowindex'?: (string | number) | undefined;
|
|
51
|
+
'aria-rowspan'?: (string | number) | undefined;
|
|
52
|
+
'aria-selected'?: (boolean | "true" | "false") | undefined;
|
|
53
|
+
'aria-setsize'?: (string | number) | undefined;
|
|
54
|
+
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
55
|
+
'aria-valuemax'?: (string | number) | undefined;
|
|
56
|
+
'aria-valuemin'?: (string | number) | undefined;
|
|
57
|
+
'aria-valuenow'?: (string | number) | undefined;
|
|
58
|
+
'aria-valuetext'?: string | undefined | undefined;
|
|
59
|
+
role?: string | undefined | undefined;
|
|
60
|
+
tabindex?: (string | number) | undefined;
|
|
61
|
+
property?: string | undefined | undefined;
|
|
62
|
+
autocapitalize?: string | undefined | undefined;
|
|
63
|
+
autocorrect?: string | undefined | undefined;
|
|
64
|
+
spellcheck?: (boolean | "true" | "false") | undefined;
|
|
65
|
+
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
66
|
+
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
67
|
+
'aria-controls'?: string | undefined | undefined;
|
|
68
|
+
'aria-describedby'?: string | undefined | undefined;
|
|
69
|
+
'aria-details'?: string | undefined | undefined;
|
|
70
|
+
'aria-errormessage'?: string | undefined | undefined;
|
|
71
|
+
'aria-flowto'?: string | undefined | undefined;
|
|
72
|
+
'aria-owns'?: string | undefined | undefined;
|
|
73
|
+
part?: string | undefined;
|
|
74
|
+
hidden?: "" | "hidden" | "until-found" | (boolean | "true" | "false") | undefined;
|
|
75
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
76
|
+
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
77
|
+
color?: string | undefined | undefined;
|
|
78
|
+
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
79
|
+
onChange?: ((payload: Event) => void) | undefined;
|
|
80
|
+
lang?: string | undefined | undefined;
|
|
81
|
+
innerHTML?: string | undefined | undefined;
|
|
82
|
+
onScroll?: ((payload: Event) => void) | undefined;
|
|
83
|
+
contenteditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
84
|
+
inert?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
86
|
+
results?: (string | number) | undefined;
|
|
87
|
+
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
onSubmit?: ((payload: SubmitEvent) => void) | undefined;
|
|
89
|
+
onBlur?: ((payload: FocusEvent) => void) | undefined;
|
|
90
|
+
onSelect?: ((payload: Event) => void) | undefined;
|
|
91
|
+
'aria-keyshortcuts'?: string | undefined | undefined;
|
|
92
|
+
'aria-haspopup'?: "dialog" | "menu" | "grid" | "listbox" | "tree" | (boolean | "true" | "false") | undefined;
|
|
93
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
94
|
+
prefix?: string | undefined | undefined;
|
|
95
|
+
enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
|
|
96
|
+
'aria-current'?: "time" | "date" | "location" | "step" | "page" | (boolean | "true" | "false") | undefined;
|
|
97
|
+
class?: import("vue").ClassValue;
|
|
98
|
+
placeholder?: string | undefined | undefined;
|
|
99
|
+
'aria-invalid'?: (boolean | "true" | "false") | "grammar" | "spelling" | undefined;
|
|
100
|
+
onError?: ((payload: Event) => void) | undefined;
|
|
101
|
+
onInput?: ((payload: InputEvent) => void) | undefined;
|
|
102
|
+
onReset?: ((payload: Event) => void) | undefined;
|
|
103
|
+
onFullscreenchange?: ((payload: Event) => void) | undefined;
|
|
104
|
+
onFullscreenerror?: ((payload: Event) => void) | undefined;
|
|
105
|
+
onAbort?: ((payload: UIEvent) => void) | undefined;
|
|
106
|
+
onAnimationcancel?: ((payload: AnimationEvent) => void) | undefined;
|
|
107
|
+
onAnimationend?: ((payload: AnimationEvent) => void) | undefined;
|
|
108
|
+
onAnimationiteration?: ((payload: AnimationEvent) => void) | undefined;
|
|
109
|
+
onAnimationstart?: ((payload: AnimationEvent) => void) | undefined;
|
|
110
|
+
onAuxclick?: ((payload: PointerEvent) => void) | undefined;
|
|
111
|
+
onBeforeinput?: ((payload: InputEvent) => void) | undefined;
|
|
112
|
+
onBeforetoggle?: ((payload: ToggleEvent) => void) | undefined;
|
|
113
|
+
onCanplay?: ((payload: Event) => void) | undefined;
|
|
114
|
+
onCanplaythrough?: ((payload: Event) => void) | undefined;
|
|
115
|
+
onClick?: ((payload: PointerEvent) => void) | undefined;
|
|
116
|
+
onCompositionend?: ((payload: CompositionEvent) => void) | undefined;
|
|
117
|
+
onCompositionstart?: ((payload: CompositionEvent) => void) | undefined;
|
|
118
|
+
onCompositionupdate?: ((payload: CompositionEvent) => void) | undefined;
|
|
119
|
+
onContextmenu?: ((payload: PointerEvent) => void) | undefined;
|
|
120
|
+
onCopy?: ((payload: ClipboardEvent) => void) | undefined;
|
|
121
|
+
onCut?: ((payload: ClipboardEvent) => void) | undefined;
|
|
122
|
+
onDblclick?: ((payload: MouseEvent) => void) | undefined;
|
|
123
|
+
onDrag?: ((payload: DragEvent) => void) | undefined;
|
|
124
|
+
onDragend?: ((payload: DragEvent) => void) | undefined;
|
|
125
|
+
onDragenter?: ((payload: DragEvent) => void) | undefined;
|
|
126
|
+
onDragleave?: ((payload: DragEvent) => void) | undefined;
|
|
127
|
+
onDragover?: ((payload: DragEvent) => void) | undefined;
|
|
128
|
+
onDragstart?: ((payload: DragEvent) => void) | undefined;
|
|
129
|
+
onDrop?: ((payload: DragEvent) => void) | undefined;
|
|
130
|
+
onDurationchange?: ((payload: Event) => void) | undefined;
|
|
131
|
+
onEmptied?: ((payload: Event) => void) | undefined;
|
|
132
|
+
onEnded?: ((payload: Event) => void) | undefined;
|
|
133
|
+
onFocus?: ((payload: FocusEvent) => void) | undefined;
|
|
134
|
+
onFocusin?: ((payload: FocusEvent) => void) | undefined;
|
|
135
|
+
onFocusout?: ((payload: FocusEvent) => void) | undefined;
|
|
136
|
+
onFormdata?: ((payload: FormDataEvent) => void) | undefined;
|
|
137
|
+
onGotpointercapture?: ((payload: PointerEvent) => void) | undefined;
|
|
138
|
+
onInvalid?: ((payload: Event) => void) | undefined;
|
|
139
|
+
onKeydown?: ((payload: KeyboardEvent) => void) | undefined;
|
|
140
|
+
onKeypress?: ((payload: KeyboardEvent) => void) | undefined;
|
|
141
|
+
onKeyup?: ((payload: KeyboardEvent) => void) | undefined;
|
|
142
|
+
onLoad?: ((payload: Event) => void) | undefined;
|
|
143
|
+
onLoadeddata?: ((payload: Event) => void) | undefined;
|
|
144
|
+
onLoadedmetadata?: ((payload: Event) => void) | undefined;
|
|
145
|
+
onLoadstart?: ((payload: Event) => void) | undefined;
|
|
146
|
+
onLostpointercapture?: ((payload: PointerEvent) => void) | undefined;
|
|
147
|
+
onMousedown?: ((payload: MouseEvent) => void) | undefined;
|
|
148
|
+
onMouseenter?: ((payload: MouseEvent) => void) | undefined;
|
|
149
|
+
onMouseleave?: ((payload: MouseEvent) => void) | undefined;
|
|
150
|
+
onMousemove?: ((payload: MouseEvent) => void) | undefined;
|
|
151
|
+
onMouseout?: ((payload: MouseEvent) => void) | undefined;
|
|
152
|
+
onMouseover?: ((payload: MouseEvent) => void) | undefined;
|
|
153
|
+
onMouseup?: ((payload: MouseEvent) => void) | undefined;
|
|
154
|
+
onPaste?: ((payload: ClipboardEvent) => void) | undefined;
|
|
155
|
+
onPause?: ((payload: Event) => void) | undefined;
|
|
156
|
+
onPlay?: ((payload: Event) => void) | undefined;
|
|
157
|
+
onPlaying?: ((payload: Event) => void) | undefined;
|
|
158
|
+
onPointercancel?: ((payload: PointerEvent) => void) | undefined;
|
|
159
|
+
onPointerdown?: ((payload: PointerEvent) => void) | undefined;
|
|
160
|
+
onPointerenter?: ((payload: PointerEvent) => void) | undefined;
|
|
161
|
+
onPointerleave?: ((payload: PointerEvent) => void) | undefined;
|
|
162
|
+
onPointermove?: ((payload: PointerEvent) => void) | undefined;
|
|
163
|
+
onPointerout?: ((payload: PointerEvent) => void) | undefined;
|
|
164
|
+
onPointerover?: ((payload: PointerEvent) => void) | undefined;
|
|
165
|
+
onPointerup?: ((payload: PointerEvent) => void) | undefined;
|
|
166
|
+
onProgress?: ((payload: ProgressEvent<EventTarget>) => void) | undefined;
|
|
167
|
+
onRatechange?: ((payload: Event) => void) | undefined;
|
|
168
|
+
onScrollend?: ((payload: Event) => void) | undefined;
|
|
169
|
+
onSecuritypolicyviolation?: ((payload: SecurityPolicyViolationEvent) => void) | undefined;
|
|
170
|
+
onSeeked?: ((payload: Event) => void) | undefined;
|
|
171
|
+
onSeeking?: ((payload: Event) => void) | undefined;
|
|
172
|
+
onStalled?: ((payload: Event) => void) | undefined;
|
|
173
|
+
onSuspend?: ((payload: Event) => void) | undefined;
|
|
174
|
+
onTimeupdate?: ((payload: Event) => void) | undefined;
|
|
175
|
+
onToggle?: ((payload: ToggleEvent) => void) | undefined;
|
|
176
|
+
onTouchcancel?: ((payload: TouchEvent) => void) | undefined;
|
|
177
|
+
onTouchend?: ((payload: TouchEvent) => void) | undefined;
|
|
178
|
+
onTouchmove?: ((payload: TouchEvent) => void) | undefined;
|
|
179
|
+
onTouchstart?: ((payload: TouchEvent) => void) | undefined;
|
|
180
|
+
onTransitioncancel?: ((payload: TransitionEvent) => void) | undefined;
|
|
181
|
+
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
182
|
+
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
183
|
+
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
184
|
+
onVolumechange?: ((payload: Event) => void) | undefined;
|
|
185
|
+
onWaiting?: ((payload: Event) => void) | undefined;
|
|
186
|
+
onWheel?: ((payload: WheelEvent) => void) | undefined;
|
|
187
|
+
onDragexit?: ((payload: DragEvent) => void) | undefined;
|
|
188
|
+
onEncrypted?: ((payload: MediaEncryptedEvent) => void) | undefined;
|
|
189
|
+
accesskey?: string | undefined | undefined;
|
|
190
|
+
about?: string | undefined | undefined;
|
|
191
|
+
datatype?: string | undefined | undefined;
|
|
192
|
+
inlist?: any;
|
|
193
|
+
resource?: string | undefined | undefined;
|
|
194
|
+
typeof?: string | undefined | undefined;
|
|
195
|
+
vocab?: string | undefined | undefined;
|
|
196
|
+
autosave?: string | undefined | undefined;
|
|
197
|
+
itemprop?: string | undefined | undefined;
|
|
198
|
+
itemscope?: (boolean | "true" | "false") | undefined;
|
|
199
|
+
itemtype?: string | undefined | undefined;
|
|
200
|
+
itemid?: string | undefined | undefined;
|
|
201
|
+
itemref?: string | undefined | undefined;
|
|
202
|
+
security?: string | undefined | undefined;
|
|
203
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
204
|
+
is?: string | undefined | undefined;
|
|
205
|
+
exportparts?: string | undefined;
|
|
206
|
+
'aria-dropeffect'?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
207
|
+
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
208
|
+
'aria-relevant'?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
209
|
+
'aria-roledescription'?: string | undefined | undefined;
|
|
210
|
+
} & {
|
|
211
|
+
modelValue?: A | null | undefined;
|
|
212
|
+
} & {
|
|
213
|
+
"onUpdate:modelValue"?: ((value: A | null) => any) | undefined;
|
|
214
|
+
}) => import("./create-parts.js").ElementInstance<new (props: Omit<{
|
|
215
|
+
value?: A | null | undefined;
|
|
216
|
+
defaultValue?: A | null | undefined;
|
|
217
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => void) | undefined;
|
|
218
|
+
orientation?: import("@ui-sdk/core/tabs").TabsOrientation;
|
|
219
|
+
activation?: "automatic" | "manual";
|
|
220
|
+
loop?: boolean;
|
|
221
|
+
hiddenUntilFound?: boolean;
|
|
222
|
+
controller?: {
|
|
223
|
+
getValue: () => A | null;
|
|
224
|
+
setValue: (value: A | null, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
225
|
+
select: (value: A, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
226
|
+
focus: () => void;
|
|
227
|
+
} | undefined;
|
|
228
|
+
} & import("@ui-sdk/core").PrimitiveOptions & import("@ui-sdk/core/renderer").BaseSlotProps, "onValueChange"> & {
|
|
229
|
+
modelValue?: A | null | undefined;
|
|
230
|
+
} & {
|
|
231
|
+
"onUpdate:modelValue"?: ((value: A | null) => any) | undefined;
|
|
232
|
+
"onUpdate:value"?: ((value: A | null) => any) | undefined;
|
|
233
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => any) | undefined;
|
|
234
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<Omit<{
|
|
235
|
+
value?: A | null | undefined;
|
|
236
|
+
defaultValue?: A | null | undefined;
|
|
237
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => void) | undefined;
|
|
238
|
+
orientation?: import("@ui-sdk/core/tabs").TabsOrientation;
|
|
239
|
+
activation?: "automatic" | "manual";
|
|
240
|
+
loop?: boolean;
|
|
241
|
+
hiddenUntilFound?: boolean;
|
|
242
|
+
controller?: {
|
|
243
|
+
getValue: () => A | null;
|
|
244
|
+
setValue: (value: A | null, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
245
|
+
select: (value: A, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
246
|
+
focus: () => void;
|
|
247
|
+
} | undefined;
|
|
248
|
+
} & import("@ui-sdk/core").PrimitiveOptions & import("@ui-sdk/core/renderer").BaseSlotProps, "onValueChange"> & {
|
|
249
|
+
modelValue?: A | null | undefined;
|
|
250
|
+
} & {
|
|
251
|
+
"onUpdate:modelValue"?: ((value: A | null) => any) | undefined;
|
|
252
|
+
"onUpdate:value"?: ((value: A | null) => any) | undefined;
|
|
253
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => any) | undefined;
|
|
254
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
255
|
+
valueChange: (value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => true;
|
|
256
|
+
} & {
|
|
257
|
+
"update:value": (value: A | null) => true;
|
|
258
|
+
} & {
|
|
259
|
+
"update:modelValue": (value: A | null) => true;
|
|
260
|
+
}, import("vue").PublicProps, {}, false, {}, import("./use-primitive.js").StateSlots<import("@ui-sdk/core/tabs").TabsState<A>>, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
261
|
+
P: {};
|
|
262
|
+
B: {};
|
|
263
|
+
D: {};
|
|
264
|
+
C: {};
|
|
265
|
+
M: {};
|
|
266
|
+
Defaults: {};
|
|
267
|
+
}, Omit<{
|
|
268
|
+
value?: A | null | undefined;
|
|
269
|
+
defaultValue?: A | null | undefined;
|
|
270
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => void) | undefined;
|
|
271
|
+
orientation?: import("@ui-sdk/core/tabs").TabsOrientation;
|
|
272
|
+
activation?: "automatic" | "manual";
|
|
273
|
+
loop?: boolean;
|
|
274
|
+
hiddenUntilFound?: boolean;
|
|
275
|
+
controller?: {
|
|
276
|
+
getValue: () => A | null;
|
|
277
|
+
setValue: (value: A | null, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
278
|
+
select: (value: A, options?: import("@ui-sdk/core/tabs").TabsChangeOptions) => boolean;
|
|
279
|
+
focus: () => void;
|
|
280
|
+
} | undefined;
|
|
281
|
+
} & import("@ui-sdk/core").PrimitiveOptions & import("@ui-sdk/core/renderer").BaseSlotProps, "onValueChange"> & {
|
|
282
|
+
modelValue?: A | null | undefined;
|
|
283
|
+
} & {
|
|
284
|
+
"onUpdate:modelValue"?: ((value: A | null) => any) | undefined;
|
|
285
|
+
"onUpdate:value"?: ((value: A | null) => any) | undefined;
|
|
286
|
+
onValueChange?: ((value: A | null, details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/tabs").TabsValueChangeReason>) => any) | undefined;
|
|
287
|
+
}, {}, {}, {}, {}, {}>, "div">;
|
|
288
|
+
/**
|
|
289
|
+
* The row of tabs, a tablist with one tab stop and arrow keys between its tabs.
|
|
290
|
+
* @stable
|
|
291
|
+
*/
|
|
292
|
+
declare const TabsList: Pick<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsListState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsListState>>>, "div">;
|
|
293
|
+
/**
|
|
294
|
+
* A tab. Selecting it shows the panel with the same `value`.
|
|
295
|
+
* @stable
|
|
296
|
+
*/
|
|
297
|
+
declare const TabsTab: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
298
|
+
value: string;
|
|
299
|
+
disabled?: boolean;
|
|
300
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsTabState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
301
|
+
value: string;
|
|
302
|
+
disabled?: boolean;
|
|
303
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsTabState>>>, "button">;
|
|
304
|
+
/**
|
|
305
|
+
* An icon inside a tab. A tab with only an icon needs an `aria-label`. Screen
|
|
306
|
+
* readers skip it, and `mirror` flips it in right-to-left text.
|
|
307
|
+
* @stable
|
|
308
|
+
*/
|
|
309
|
+
declare const TabsTabIcon: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/renderer").ItemIconProps & {
|
|
310
|
+
item?: string;
|
|
311
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<{
|
|
312
|
+
mirror: boolean;
|
|
313
|
+
}>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/renderer").ItemIconProps & {
|
|
314
|
+
item?: string;
|
|
315
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<{
|
|
316
|
+
mirror: boolean;
|
|
317
|
+
}>>>, "span">;
|
|
318
|
+
/**
|
|
319
|
+
* Marks the selected tab. Its box comes from the `--active-tab-*` variables, measured from the tab list.
|
|
320
|
+
* @stable
|
|
321
|
+
*/
|
|
322
|
+
declare const TabsIndicator: Pick<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsIndicatorState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsIndicatorState>>>, "span">;
|
|
323
|
+
/**
|
|
324
|
+
* The content of the tab with the same `value`, shown while that tab is selected.
|
|
325
|
+
* @stable
|
|
326
|
+
*/
|
|
327
|
+
declare const TabsPanel: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
328
|
+
value: string;
|
|
329
|
+
keepMounted?: boolean;
|
|
330
|
+
hiddenUntilFound?: boolean;
|
|
331
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsPanelState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
332
|
+
value: string;
|
|
333
|
+
keepMounted?: boolean;
|
|
334
|
+
hiddenUntilFound?: boolean;
|
|
335
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/tabs").TabsPanelState>>>, "div">;
|
|
336
|
+
export { createTabsController } from "@ui-sdk/core/tabs";
|
|
337
|
+
export type { TabsApi, TabsChangeOptions, TabsController, TabsDirection, TabsIndicatorState, TabsListState, TabsOptions, TabsOrientation, TabsPanelProps, TabsPanelState, TabsPrimitive, TabsState, TabsTabIconProps, TabsTabIconState, TabsTabProps, TabsTabState, TabsValueChangeReason, } from "@ui-sdk/core/tabs";
|
|
338
|
+
export { Tabs, TabsIndicator, TabsList, TabsPanel, TabsTab, TabsTabIcon };
|
package/dist/tabs.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/tabs.ts
|
|
2
|
+
import { tabs } from "@ui-sdk/core/tabs";
|
|
3
|
+
import { createParts } from "./create-parts.js";
|
|
4
|
+
import { createTabsController } from "@ui-sdk/core/tabs";
|
|
5
|
+
var parts = createParts(tabs, {
|
|
6
|
+
root: "div",
|
|
7
|
+
list: "div",
|
|
8
|
+
tab: "button",
|
|
9
|
+
"tab-icon": "span",
|
|
10
|
+
indicator: "span",
|
|
11
|
+
panel: "div"
|
|
12
|
+
});
|
|
13
|
+
var Tabs = parts.Root;
|
|
14
|
+
var TabsList = parts.List;
|
|
15
|
+
var TabsTab = parts.Tab;
|
|
16
|
+
var TabsTabIcon = parts.TabIcon;
|
|
17
|
+
var TabsIndicator = parts.Indicator;
|
|
18
|
+
var TabsPanel = parts.Panel;
|
|
19
|
+
export {
|
|
20
|
+
Tabs,
|
|
21
|
+
TabsIndicator,
|
|
22
|
+
TabsList,
|
|
23
|
+
TabsPanel,
|
|
24
|
+
TabsTab,
|
|
25
|
+
TabsTabIcon,
|
|
26
|
+
createTabsController
|
|
27
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { ChangeDetails } from "@ui-sdk/core";
|
|
2
|
+
import type { InputController, InputValueChangeReason } from "@ui-sdk/core/input";
|
|
3
|
+
import type { PropType } from "vue";
|
|
4
|
+
import type { useFieldControl } from "./field-context.js";
|
|
5
|
+
declare const textProps: {
|
|
6
|
+
value: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
defaultValue: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
disabled: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
readOnly: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
required: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
controller: PropType<InputController>;
|
|
31
|
+
debug: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
declare const textEmits: {
|
|
37
|
+
"update:value": (_value: string) => boolean;
|
|
38
|
+
"update:modelValue": (_value: string) => boolean;
|
|
39
|
+
valueChange: (_value: string, _details: ChangeDetails<InputValueChangeReason>) => boolean;
|
|
40
|
+
};
|
|
41
|
+
type TextProps = {
|
|
42
|
+
value?: string;
|
|
43
|
+
modelValue?: string;
|
|
44
|
+
defaultValue?: string;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
required?: boolean;
|
|
48
|
+
controller?: InputController;
|
|
49
|
+
debug?: boolean;
|
|
50
|
+
};
|
|
51
|
+
type Emit = ((event: "update:value", value: string) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "valueChange", value: string, details: ChangeDetails<InputValueChangeReason>) => void);
|
|
52
|
+
declare const textOptions: (props: TextProps, emit: Emit) => () => {
|
|
53
|
+
value: string | undefined;
|
|
54
|
+
defaultValue: string | undefined;
|
|
55
|
+
controller: {
|
|
56
|
+
getValue: () => string;
|
|
57
|
+
setValue: (value: string, options?: import("@ui-sdk/core").ChangeOptions<InputValueChangeReason>) => boolean;
|
|
58
|
+
clear: (options?: import("@ui-sdk/core").ChangeOptions<InputValueChangeReason>) => boolean;
|
|
59
|
+
focus: () => void;
|
|
60
|
+
} | undefined;
|
|
61
|
+
debug: boolean | undefined;
|
|
62
|
+
onValueChange: (value: string, details: ChangeDetails<InputValueChangeReason>) => void;
|
|
63
|
+
};
|
|
64
|
+
declare const readOnlyOf: (props: {
|
|
65
|
+
readOnly?: boolean;
|
|
66
|
+
}, attrs: Record<string, unknown>) => boolean;
|
|
67
|
+
declare function elementProps(props: TextProps, field: ReturnType<typeof useFieldControl>, attrs: Record<string, unknown>, tag: "input" | "textarea"): {
|
|
68
|
+
value: string;
|
|
69
|
+
"^value"?: undefined;
|
|
70
|
+
disabled: boolean | undefined;
|
|
71
|
+
readonly: true | undefined;
|
|
72
|
+
required: boolean | undefined;
|
|
73
|
+
name: string | undefined;
|
|
74
|
+
} | {
|
|
75
|
+
"^value": string | undefined;
|
|
76
|
+
value?: undefined;
|
|
77
|
+
disabled: boolean | undefined;
|
|
78
|
+
readonly: true | undefined;
|
|
79
|
+
required: boolean | undefined;
|
|
80
|
+
name: string | undefined;
|
|
81
|
+
} | {
|
|
82
|
+
value?: undefined;
|
|
83
|
+
"^value"?: undefined;
|
|
84
|
+
disabled: boolean | undefined;
|
|
85
|
+
readonly: true | undefined;
|
|
86
|
+
required: boolean | undefined;
|
|
87
|
+
name: string | undefined;
|
|
88
|
+
};
|
|
89
|
+
export { elementProps, readOnlyOf, textEmits, textOptions, textProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// src/text-control.ts
|
|
2
|
+
import { optionalBoolean, orModel } from "./use-primitive.js";
|
|
3
|
+
var textProps = {
|
|
4
|
+
value: { type: String, default: void 0 },
|
|
5
|
+
modelValue: { type: String, default: void 0 },
|
|
6
|
+
defaultValue: { type: String, default: void 0 },
|
|
7
|
+
disabled: optionalBoolean,
|
|
8
|
+
readOnly: optionalBoolean,
|
|
9
|
+
required: optionalBoolean,
|
|
10
|
+
controller: Object,
|
|
11
|
+
debug: optionalBoolean
|
|
12
|
+
};
|
|
13
|
+
var textEmits = {
|
|
14
|
+
"update:value": (_value) => true,
|
|
15
|
+
"update:modelValue": (_value) => true,
|
|
16
|
+
valueChange: (_value, _details) => true
|
|
17
|
+
};
|
|
18
|
+
var textOptions = (props, emit) => () => ({
|
|
19
|
+
value: orModel(props.value, props.modelValue),
|
|
20
|
+
defaultValue: props.defaultValue,
|
|
21
|
+
controller: props.controller,
|
|
22
|
+
debug: props.debug,
|
|
23
|
+
onValueChange: (value, details) => {
|
|
24
|
+
emit("valueChange", value, details);
|
|
25
|
+
if (details.canceled) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
emit("update:value", value);
|
|
29
|
+
emit("update:modelValue", value);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
var readOnlyOf = (props, attrs) => props.readOnly ?? (attrs.readonly != null && attrs.readonly !== false);
|
|
33
|
+
function elementProps(props, field, attrs, tag) {
|
|
34
|
+
const controlled = orModel(props.value, props.modelValue);
|
|
35
|
+
const value = controlled !== void 0 ? { value: controlled } : tag === "input" ? { "^value": props.defaultValue } : {};
|
|
36
|
+
return {
|
|
37
|
+
name: field?.name(),
|
|
38
|
+
...attrs,
|
|
39
|
+
disabled: props.disabled || field?.disabled(),
|
|
40
|
+
readonly: readOnlyOf(props, attrs) || void 0,
|
|
41
|
+
required: props.required,
|
|
42
|
+
...value
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
elementProps,
|
|
47
|
+
readOnlyOf,
|
|
48
|
+
textEmits,
|
|
49
|
+
textOptions,
|
|
50
|
+
textProps
|
|
51
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { type TextareaSubmitDetails } from "@ui-sdk/core/input";
|
|
2
|
+
import { type PropType } from "vue";
|
|
3
|
+
import { type PartSlots } from "./use-primitive.js";
|
|
4
|
+
/**
|
|
5
|
+
* A native <textarea>, wired to the Field it's in, that can grow with its text.
|
|
6
|
+
* @stable
|
|
7
|
+
*/
|
|
8
|
+
declare const Textarea: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
autoResize: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
submitShortcut: PropType<"enter" | "mod+enter">;
|
|
14
|
+
onSubmit: PropType<(value: string, details: TextareaSubmitDetails) => void>;
|
|
15
|
+
value: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: undefined;
|
|
22
|
+
};
|
|
23
|
+
defaultValue: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: undefined;
|
|
26
|
+
};
|
|
27
|
+
disabled: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
readOnly: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
required: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: undefined;
|
|
38
|
+
};
|
|
39
|
+
controller: PropType<import("@ui-sdk/core/input").InputController>;
|
|
40
|
+
debug: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: undefined;
|
|
43
|
+
};
|
|
44
|
+
}>, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}>[] | null) & {
|
|
49
|
+
state: NoInfer<import("@ui-sdk/core/input").InputState>;
|
|
50
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:value": (_value: string) => boolean;
|
|
52
|
+
"update:modelValue": (_value: string) => boolean;
|
|
53
|
+
valueChange: (_value: string, _details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/input").InputValueChangeReason>) => boolean;
|
|
54
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
|
+
autoResize: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
submitShortcut: PropType<"enter" | "mod+enter">;
|
|
60
|
+
onSubmit: PropType<(value: string, details: TextareaSubmitDetails) => void>;
|
|
61
|
+
value: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: undefined;
|
|
64
|
+
};
|
|
65
|
+
modelValue: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
defaultValue: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: undefined;
|
|
72
|
+
};
|
|
73
|
+
disabled: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
readOnly: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: undefined;
|
|
80
|
+
};
|
|
81
|
+
required: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
controller: PropType<import("@ui-sdk/core/input").InputController>;
|
|
86
|
+
debug: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
90
|
+
}>> & Readonly<{
|
|
91
|
+
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
92
|
+
"onUpdate:value"?: ((_value: string) => any) | undefined;
|
|
93
|
+
onValueChange?: ((_value: string, _details: import("@ui-sdk/core").ChangeDetails<import("@ui-sdk/core/input").InputValueChangeReason>) => any) | undefined;
|
|
94
|
+
}>, {
|
|
95
|
+
value: string;
|
|
96
|
+
disabled: boolean;
|
|
97
|
+
debug: boolean;
|
|
98
|
+
defaultValue: string;
|
|
99
|
+
required: boolean;
|
|
100
|
+
readOnly: boolean;
|
|
101
|
+
modelValue: string;
|
|
102
|
+
autoResize: boolean;
|
|
103
|
+
}, PartSlots<import("@ui-sdk/core/input").TextareaPrimitive, "root">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "textarea">;
|
|
104
|
+
export { createInputController } from "@ui-sdk/core/input";
|
|
105
|
+
export type { InputController, InputGroupOptions, InputGroupPrimitive, InputGroupState, InputOptions, InputPrimitive, InputProps, InputState, InputValueChangeReason, TextareaOptions, TextareaPrimitive, TextareaProps, TextareaState, TextareaSubmitDetails, } from "@ui-sdk/core/input";
|
|
106
|
+
export { Textarea };
|