@bridge-ui/vue 0.0.7 → 0.0.8
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/ai/AGENTS.md +31 -0
- package/ai/README.md +35 -0
- package/ai/guidelines/core.md +44 -0
- package/ai/llms.txt +38 -0
- package/ai/skills/bridge-ui-components/SKILL.md +37 -0
- package/ai/skills/bridge-ui-forms/SKILL.md +38 -0
- package/ai/skills/bridge-ui-overlays/SKILL.md +37 -0
- package/ai/skills/bridge-ui-setup/SKILL.md +38 -0
- package/bin/__tests__/ai.test.ts +319 -0
- package/bin/ai.mjs +469 -0
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +1 -1
- package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +5 -5
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +3 -2
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +6 -2
- package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
- package/dist/Components/BaseField/BaseField.js +5 -0
- package/dist/Components/BaseField/BaseField.vue.d.ts +15 -0
- package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/Components/BaseField/BaseFieldLabel.js +5 -0
- package/dist/Components/{OtpField/OtpFieldLabel.vue.d.ts → BaseField/BaseFieldLabel.vue.d.ts} +2 -2
- package/dist/Components/{OtpField/OtpFieldLabel.vue_vue_type_script_setup_true_lang.js → BaseField/BaseFieldLabel.vue_vue_type_script_setup_true_lang.js} +2 -2
- package/dist/Components/BaseField/baseField.types.d.ts +222 -0
- package/dist/Components/BaseField/composables/useBaseField.d.ts +55 -0
- package/dist/Components/BaseField/composables/useBaseField.js +131 -0
- package/dist/Components/BaseField/index.d.ts +4 -0
- package/dist/Components/BaseField/index.js +3 -0
- package/dist/Components/Button/composables/useButton.d.ts +1 -1
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +1 -1
- package/dist/Components/Checkbox/composables/useCheckbox.js +1 -1
- package/dist/Components/Chip/Chip.vue.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.d.ts +1 -1
- package/dist/Components/Drawer/Drawer.vue.d.ts +2 -2
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/FormControl/composables/useFormControl.d.ts +11 -2
- package/dist/Components/FormControl/composables/useFormControl.js +57 -53
- package/dist/Components/FormControl/index.d.ts +1 -1
- package/dist/Components/FormField/composables/useFormField.d.ts +5 -1
- package/dist/Components/FormField/composables/useFormField.js +1 -1
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
- package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/Components/Listbox/composables/useListbox.d.ts +10 -1
- package/dist/Components/Listbox/composables/useListbox.js +20 -20
- package/dist/Components/Listbox/index.d.ts +1 -0
- package/dist/Components/Listbox/listbox.types.d.ts +6 -0
- package/dist/Components/Menu/Menu.vue.d.ts +2 -2
- package/dist/Components/Modal/Modal.vue.d.ts +2 -2
- package/dist/Components/Modal/composables/useModal.d.ts +1 -1
- package/dist/Components/NumberField/NumberField.vue.d.ts +2 -2
- package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
- package/dist/Components/NumberField/composables/useNumberField.js +4 -1
- package/dist/Components/OtpField/OtpField.vue.d.ts +3 -3
- package/dist/Components/OtpField/OtpField.vue_vue_type_script_setup_true_lang.js +34 -52
- package/dist/Components/OtpField/composables/useOtpField.d.ts +40 -213
- package/dist/Components/OtpField/composables/useOtpField.js +92 -150
- package/dist/Components/OtpField/otpField.types.d.ts +10 -180
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
- package/dist/Components/PasswordField/composables/usePasswordField.js +4 -1
- package/dist/Components/Radio/composables/useRadio.d.ts +1 -1
- package/dist/Components/Radio/composables/useRadio.js +1 -1
- package/dist/Components/Select/Select.vue.d.ts +4 -4
- package/dist/Components/Select/composables/useSelect.d.ts +3 -2
- package/dist/Components/Select/composables/useSelect.js +6 -2
- package/dist/Components/Slider/Slider.js +5 -0
- package/dist/Components/Slider/Slider.vue.d.ts +25 -0
- package/dist/Components/Slider/Slider.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/Components/Slider/composables/useSlider.d.ts +482 -0
- package/dist/Components/Slider/composables/useSlider.js +287 -0
- package/dist/Components/Slider/index.d.ts +4 -0
- package/dist/Components/Slider/index.js +3 -0
- package/dist/Components/Slider/slider.types.d.ts +169 -0
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +2 -2
- package/dist/Components/Switch/composables/useSwitch.d.ts +1 -1
- package/dist/Components/Switch/composables/useSwitch.js +1 -1
- package/dist/Components/Tabs/Tabs.vue.d.ts +2 -2
- package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
- package/dist/Components/TextField/composables/useTextField.js +1 -1
- package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
- package/dist/Components/Textarea/composables/useTextarea.js +1 -0
- package/dist/Utils/index.d.ts +3 -3
- package/dist/Utils/index.js +5 -2
- package/dist/augments.d.ts +29 -17
- package/dist/index.d.ts +5 -1
- package/dist/index.js +59 -55
- package/docs/README.md +56 -0
- package/docs/components/Alert.md +96 -0
- package/docs/components/Autocomplete.md +198 -0
- package/docs/components/Avatar.md +60 -0
- package/docs/components/Badge.md +47 -0
- package/docs/components/BaseField.md +126 -0
- package/docs/components/BridgeUIProvider.md +151 -0
- package/docs/components/Button.md +93 -0
- package/docs/components/Card.md +287 -0
- package/docs/components/Checkbox.md +87 -0
- package/docs/components/Divider.md +56 -0
- package/docs/components/Drawer.md +137 -0
- package/docs/components/FormControl.md +66 -0
- package/docs/components/FormField.md +71 -0
- package/docs/components/I18n.md +125 -0
- package/docs/components/Icon.md +88 -0
- package/docs/components/Label.md +31 -0
- package/docs/components/Link.md +71 -0
- package/docs/components/List.md +167 -0
- package/docs/components/Menu.md +97 -0
- package/docs/components/Modal.md +154 -0
- package/docs/components/NumberField.md +80 -0
- package/docs/components/OtpField.md +133 -0
- package/docs/components/PasswordField.md +82 -0
- package/docs/components/Progress.md +68 -0
- package/docs/components/Radio.md +91 -0
- package/docs/components/Select.md +181 -0
- package/docs/components/Skeleton.md +38 -0
- package/docs/components/Slider.md +140 -0
- package/docs/components/Snackbar.md +99 -0
- package/docs/components/Spinner.md +61 -0
- package/docs/components/Switch.md +72 -0
- package/docs/components/Tabs.md +207 -0
- package/docs/components/TextField.md +72 -0
- package/docs/components/Textarea.md +80 -0
- package/docs/components/Tooltip.md +125 -0
- package/docs/components/useBreakpoint.md +100 -0
- package/docs/components/useDialogAction.md +97 -0
- package/docs/components/useDrawerAction.md +75 -0
- package/docs/components/useModalAction.md +75 -0
- package/docs/components/useSnackbarAction.md +85 -0
- package/docs/examples/i18n-dictionary.ts +48 -0
- package/docs/examples/i18n-vue-i18n.ts +34 -0
- package/docs/examples/icon-fontawesome.ts +112 -0
- package/docs/examples/icon-heroicons.ts +57 -0
- package/docs/examples/icon-lucide.ts +57 -0
- package/docs/examples/icon-phosphor.ts +57 -0
- package/docs/examples/icon-tabler.ts +57 -0
- package/package.json +12 -5
- package/dist/Components/OtpField/OtpFieldLabel.js +0 -5
|
@@ -1,114 +1,36 @@
|
|
|
1
|
-
import { HTMLAttributes, InputHTMLAttributes
|
|
2
|
-
import { MergeHtmlProps, MergeProps, OtpFieldColor, OtpFieldInvalidated, OtpFieldRounded,
|
|
3
|
-
import {
|
|
1
|
+
import { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
2
|
+
import { BaseFieldInvalidated, MergeHtmlProps, MergeProps, OtpFieldColor, OtpFieldInvalidated, OtpFieldRounded, OtpFieldVariant, OtpInputType } from '@bridge-ui/core';
|
|
3
|
+
import { BaseFieldClasses, BaseFieldCustomProps, BaseFieldOwnProps, BaseFieldSlots } from '../BaseField/baseField.types';
|
|
4
4
|
export interface OtpFieldColorOverrides {}
|
|
5
5
|
export interface OtpFieldRoundedOverrides {}
|
|
6
6
|
export interface OtpFieldSizeOverrides {}
|
|
7
7
|
export interface OtpFieldVariantOverrides {}
|
|
8
|
-
export interface OtpFieldClasses {
|
|
9
|
-
/**
|
|
10
|
-
* Classes merged onto the corner label in the header row.
|
|
11
|
-
*/
|
|
12
|
-
corner?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Classes merged onto the helper text below the pins.
|
|
15
|
-
*/
|
|
16
|
-
description?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Classes merged onto the inline-end adornment slot wrapper.
|
|
19
|
-
*/
|
|
20
|
-
end?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Classes merged onto the error message below the pins.
|
|
23
|
-
*/
|
|
24
|
-
errorMessage?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Classes merged onto the pin group wrapper.
|
|
27
|
-
*/
|
|
28
|
-
group?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Classes merged onto the label + corner header row.
|
|
31
|
-
*/
|
|
32
|
-
header?: string;
|
|
8
|
+
export interface OtpFieldClasses extends BaseFieldClasses {
|
|
33
9
|
/**
|
|
34
10
|
* Classes merged onto each pin `<input>`.
|
|
35
11
|
*/
|
|
36
12
|
input?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Classes merged onto the primary label.
|
|
39
|
-
*/
|
|
40
|
-
label?: string;
|
|
41
13
|
/**
|
|
42
14
|
* Classes merged onto each pin cell wrapper.
|
|
43
15
|
*/
|
|
44
16
|
pin?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Classes merged onto the required asterisk.
|
|
47
|
-
*/
|
|
48
|
-
required?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Classes merged onto the root wrapper.
|
|
51
|
-
*/
|
|
52
|
-
root?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Classes merged onto the inline-start adornment slot wrapper.
|
|
55
|
-
*/
|
|
56
|
-
start?: string;
|
|
57
17
|
}
|
|
58
|
-
export interface OtpFieldCustomProps {
|
|
59
|
-
/**
|
|
60
|
-
* Props forwarded to the corner label element.
|
|
61
|
-
*/
|
|
62
|
-
corner?: HTMLAttributes;
|
|
63
|
-
/**
|
|
64
|
-
* Props forwarded to the helper text below the pins.
|
|
65
|
-
*/
|
|
66
|
-
description?: HTMLAttributes;
|
|
67
|
-
/**
|
|
68
|
-
* Props forwarded to the inline-end adornment slot wrapper.
|
|
69
|
-
*/
|
|
70
|
-
end?: HTMLAttributes;
|
|
71
|
-
/**
|
|
72
|
-
* Props forwarded to the error message element.
|
|
73
|
-
*/
|
|
74
|
-
errorMessage?: HTMLAttributes;
|
|
75
|
-
/**
|
|
76
|
-
* Props forwarded to the pin group wrapper.
|
|
77
|
-
*/
|
|
78
|
-
group?: HTMLAttributes;
|
|
79
|
-
/**
|
|
80
|
-
* Props forwarded to the label + corner header row.
|
|
81
|
-
*/
|
|
82
|
-
header?: HTMLAttributes;
|
|
18
|
+
export interface OtpFieldCustomProps extends Omit<BaseFieldCustomProps, "invalidated"> {
|
|
83
19
|
/**
|
|
84
20
|
* Props forwarded to each pin `<input>`.
|
|
85
21
|
*/
|
|
86
22
|
input?: Partial<InputHTMLAttributes>;
|
|
87
23
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* @default undefined
|
|
92
|
-
*/
|
|
93
|
-
invalidated?: Partial<OtpFieldInvalidated>;
|
|
94
|
-
/**
|
|
95
|
-
* Props forwarded to the primary `Label` (content stays owned by `OtpField`).
|
|
24
|
+
* Pin error chrome (`pin` / `pinUnderlined`). Error message color comes from
|
|
25
|
+
* {@link BaseField} (`Tokens/BaseField`); pass `errorMessage` here to override.
|
|
96
26
|
*
|
|
97
27
|
* @default undefined
|
|
98
28
|
*/
|
|
99
|
-
|
|
29
|
+
invalidated?: Partial<OtpFieldInvalidated & BaseFieldInvalidated>;
|
|
100
30
|
/**
|
|
101
31
|
* Props forwarded to each pin cell wrapper.
|
|
102
32
|
*/
|
|
103
33
|
pin?: HTMLAttributes;
|
|
104
|
-
/**
|
|
105
|
-
* Props forwarded to the root wrapper.
|
|
106
|
-
*/
|
|
107
|
-
root?: HTMLAttributes;
|
|
108
|
-
/**
|
|
109
|
-
* Props forwarded to the inline-start adornment slot wrapper.
|
|
110
|
-
*/
|
|
111
|
-
start?: HTMLAttributes;
|
|
112
34
|
}
|
|
113
35
|
export interface OtpFieldEmits {
|
|
114
36
|
/**
|
|
@@ -120,7 +42,7 @@ export interface OtpFieldEmits {
|
|
|
120
42
|
*/
|
|
121
43
|
complete: [value: string];
|
|
122
44
|
}
|
|
123
|
-
export interface OtpFieldOwnProps {
|
|
45
|
+
export interface OtpFieldOwnProps extends Omit<BaseFieldOwnProps, "field" | "slots" | "classes" | "children" | "customProps"> {
|
|
124
46
|
/**
|
|
125
47
|
* Autofocus the first empty pin (or the first pin) on mount.
|
|
126
48
|
*
|
|
@@ -139,19 +61,6 @@ export interface OtpFieldOwnProps {
|
|
|
139
61
|
* @default "primary"
|
|
140
62
|
*/
|
|
141
63
|
color?: MergeProps<OtpFieldColor, OtpFieldColorOverrides>;
|
|
142
|
-
/**
|
|
143
|
-
* Associates labels and helper text with the pin group. When omitted, an id
|
|
144
|
-
* is generated automatically.
|
|
145
|
-
*
|
|
146
|
-
* @default undefined
|
|
147
|
-
*/
|
|
148
|
-
controlId?: string;
|
|
149
|
-
/**
|
|
150
|
-
* Secondary label text at the inline end of the header row.
|
|
151
|
-
*
|
|
152
|
-
* @default undefined
|
|
153
|
-
*/
|
|
154
|
-
corner?: string;
|
|
155
64
|
/**
|
|
156
65
|
* Extra props for internal parts (`root`, `pin`, `input`, …).
|
|
157
66
|
*
|
|
@@ -165,42 +74,6 @@ export interface OtpFieldOwnProps {
|
|
|
165
74
|
* @default undefined
|
|
166
75
|
*/
|
|
167
76
|
defaultValue?: string;
|
|
168
|
-
/**
|
|
169
|
-
* Helper text below the pins (hidden when the field is invalid).
|
|
170
|
-
*
|
|
171
|
-
* @default undefined
|
|
172
|
-
*/
|
|
173
|
-
description?: string;
|
|
174
|
-
/**
|
|
175
|
-
* Whether all pins are disabled.
|
|
176
|
-
*
|
|
177
|
-
* @default false
|
|
178
|
-
*/
|
|
179
|
-
disabled?: boolean;
|
|
180
|
-
/**
|
|
181
|
-
* When `true`, applies invalid styling on the label and pins.
|
|
182
|
-
*
|
|
183
|
-
* @default false
|
|
184
|
-
*/
|
|
185
|
-
error?: boolean;
|
|
186
|
-
/**
|
|
187
|
-
* Error message below the pins. Shown only when set (or via `errorMessage` slot).
|
|
188
|
-
*
|
|
189
|
-
* @default undefined
|
|
190
|
-
*/
|
|
191
|
-
errorMessage?: string;
|
|
192
|
-
/**
|
|
193
|
-
* When `true`, does not reserve space below the pins for error messages.
|
|
194
|
-
*
|
|
195
|
-
* @default false
|
|
196
|
-
*/
|
|
197
|
-
hideErrorMessage?: boolean;
|
|
198
|
-
/**
|
|
199
|
-
* The primary label text above the pins.
|
|
200
|
-
*
|
|
201
|
-
* @default undefined
|
|
202
|
-
*/
|
|
203
|
-
label?: string;
|
|
204
77
|
/**
|
|
205
78
|
* Number of pin slots.
|
|
206
79
|
*
|
|
@@ -219,30 +92,12 @@ export interface OtpFieldOwnProps {
|
|
|
219
92
|
* @default undefined
|
|
220
93
|
*/
|
|
221
94
|
placeholder?: string;
|
|
222
|
-
/**
|
|
223
|
-
* Whether all pins are read-only.
|
|
224
|
-
*
|
|
225
|
-
* @default false
|
|
226
|
-
*/
|
|
227
|
-
readonly?: boolean;
|
|
228
|
-
/**
|
|
229
|
-
* Shows a red asterisk on the label.
|
|
230
|
-
*
|
|
231
|
-
* @default false
|
|
232
|
-
*/
|
|
233
|
-
required?: boolean;
|
|
234
95
|
/**
|
|
235
96
|
* Border radius of each pin cell.
|
|
236
97
|
*
|
|
237
98
|
* @default "md"
|
|
238
99
|
*/
|
|
239
100
|
rounded?: MergeProps<OtpFieldRounded, OtpFieldRoundedOverrides>;
|
|
240
|
-
/**
|
|
241
|
-
* Pin size and label typography scale.
|
|
242
|
-
*
|
|
243
|
-
* @default "md"
|
|
244
|
-
*/
|
|
245
|
-
size?: MergeProps<OtpFieldSize, OtpFieldSizeOverrides>;
|
|
246
101
|
/**
|
|
247
102
|
* Character set accepted by each pin.
|
|
248
103
|
*
|
|
@@ -256,32 +111,7 @@ export interface OtpFieldOwnProps {
|
|
|
256
111
|
*/
|
|
257
112
|
variant?: MergeProps<OtpFieldVariant, OtpFieldVariantOverrides>;
|
|
258
113
|
}
|
|
259
|
-
export interface OtpFieldSlots {
|
|
260
|
-
/**
|
|
261
|
-
* Secondary header text at the inline end.
|
|
262
|
-
*/
|
|
263
|
-
corner?: Slot;
|
|
264
|
-
/**
|
|
265
|
-
* Helper text below the pins.
|
|
266
|
-
*/
|
|
267
|
-
description?: Slot;
|
|
268
|
-
/**
|
|
269
|
-
* Inline-end slot beside the pin group (e.g. a button or timer).
|
|
270
|
-
*/
|
|
271
|
-
end?: Slot;
|
|
272
|
-
/**
|
|
273
|
-
* Error message below the pins.
|
|
274
|
-
*/
|
|
275
|
-
errorMessage?: Slot;
|
|
276
|
-
/**
|
|
277
|
-
* Primary label content.
|
|
278
|
-
*/
|
|
279
|
-
label?: Slot;
|
|
280
|
-
/**
|
|
281
|
-
* Inline-start slot beside the pin group (e.g. an icon or button).
|
|
282
|
-
*/
|
|
283
|
-
start?: Slot;
|
|
284
|
-
}
|
|
114
|
+
export interface OtpFieldSlots extends BaseFieldSlots {}
|
|
285
115
|
export type OtpFieldProps = MergeHtmlProps<OtpFieldOwnProps, Omit<HTMLAttributes, "color" | "onChange">> & {
|
|
286
116
|
/**
|
|
287
117
|
* Bound with `v-model` on the component (`defineModel` internally).
|
|
@@ -433,7 +433,7 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
|
|
|
433
433
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
434
434
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
435
435
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
436
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
436
|
+
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "required" | "corner" | "description" | "errorMessage" | "start" | "endIcon" | "errorIcon" | "hideErrorMessage" | "readonly" | "showErrorIcon" | "startIcon">>>>;
|
|
437
437
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
438
438
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
439
439
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -681,7 +681,7 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
|
|
|
681
681
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
682
682
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
683
683
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
684
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
684
|
+
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "required" | "corner" | "description" | "errorMessage" | "start" | "endIcon" | "errorIcon" | "hideErrorMessage" | "readonly" | "showErrorIcon" | "startIcon">>>, {
|
|
685
685
|
type: string;
|
|
686
686
|
}>>;
|
|
687
687
|
isVisible: import('vue').ComputedRef<boolean>;
|
|
@@ -24,7 +24,10 @@ function l(l, u = {}) {
|
|
|
24
24
|
color: "primary",
|
|
25
25
|
variant: "outline",
|
|
26
26
|
showErrorIcon: !1
|
|
27
|
-
}, {
|
|
27
|
+
}, {
|
|
28
|
+
reservedSlots: () => ["end"],
|
|
29
|
+
componentName: "PasswordField"
|
|
30
|
+
});
|
|
28
31
|
return {
|
|
29
32
|
formField: y,
|
|
30
33
|
inputBind: i(() => e(y.inputBind.value, { type: g.value }, "")),
|
|
@@ -240,7 +240,7 @@ export declare function useRadio(props: MaybeRefOrGetter<RadioOwnProps>, libDefa
|
|
|
240
240
|
hideErrorMessage: NonNullable<boolean | undefined>;
|
|
241
241
|
}>;
|
|
242
242
|
rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
243
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "
|
|
243
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "description" | "errorMessage" | "controlId" | "hideErrorMessage" | "readonly" | "endLabel" | "startLabel">>>>;
|
|
244
244
|
controlId: import('vue').ComputedRef<string>;
|
|
245
245
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
246
246
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -9,20 +9,20 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
9
9
|
clear: () => any;
|
|
10
10
|
search: (query: string) => any;
|
|
11
11
|
select: (option: import('@bridge-ui/core').ListboxOption) => any;
|
|
12
|
-
"update:modelValue": (...args: unknown[]) => any;
|
|
13
12
|
change: (value: import('@bridge-ui/core').SelectModel) => any;
|
|
14
13
|
close: () => any;
|
|
15
|
-
open: () => any;
|
|
16
14
|
deselect: (option: import('@bridge-ui/core').ListboxOption) => any;
|
|
15
|
+
open: () => any;
|
|
16
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
17
17
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
18
|
onClear?: (() => any) | undefined;
|
|
19
19
|
onSearch?: ((query: string) => any) | undefined;
|
|
20
20
|
onSelect?: ((option: import('@bridge-ui/core').ListboxOption) => any) | undefined;
|
|
21
|
-
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
22
21
|
onChange?: ((value: import('@bridge-ui/core').SelectModel) => any) | undefined;
|
|
23
22
|
onClose?: (() => any) | undefined;
|
|
24
|
-
onOpen?: (() => any) | undefined;
|
|
25
23
|
onDeselect?: ((option: import('@bridge-ui/core').ListboxOption) => any) | undefined;
|
|
24
|
+
onOpen?: (() => any) | undefined;
|
|
25
|
+
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
showErrorIcon: boolean;
|
|
28
28
|
clearable: boolean;
|
|
@@ -437,7 +437,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
437
437
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
438
438
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
439
439
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
440
|
-
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
440
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "required" | "corner" | "description" | "errorMessage" | "start" | "endIcon" | "errorIcon" | "hideErrorMessage" | "readonly" | "showErrorIcon" | "startIcon">>>>;
|
|
441
441
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
442
442
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
443
443
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -720,13 +720,14 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
720
720
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
721
721
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
722
722
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
723
|
-
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
723
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "required" | "corner" | "description" | "errorMessage" | "start" | "endIcon" | "errorIcon" | "hideErrorMessage" | "readonly" | "showErrorIcon" | "startIcon">>>>>;
|
|
724
724
|
selectOption: (option: SelectOption) => void;
|
|
725
725
|
containerRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
726
726
|
listboxProps: import('vue').ComputedRef<{
|
|
727
727
|
anchorEl?: null | HTMLElement;
|
|
728
728
|
classes?: import('../../Listbox').ListboxClasses;
|
|
729
729
|
color: "info" | "error" | "success" | "warning" | "dark" | "primary" | "secondary";
|
|
730
|
+
componentName: "Select" | "Autocomplete";
|
|
730
731
|
customProps?: import('../../Listbox').ListboxCustomProps;
|
|
731
732
|
disableAutoFocus: boolean;
|
|
732
733
|
disableMaxHeight: boolean;
|
|
@@ -135,6 +135,7 @@ function p(p, m, h, g, _) {
|
|
|
135
135
|
variant: "outline",
|
|
136
136
|
showErrorIcon: !0
|
|
137
137
|
}, {
|
|
138
|
+
componentName: "Select",
|
|
138
139
|
likeInput: () => P.value,
|
|
139
140
|
control: () => P.value ? "textarea" : "input"
|
|
140
141
|
}), J = (e) => {
|
|
@@ -239,13 +240,15 @@ function p(p, m, h, g, _) {
|
|
|
239
240
|
}
|
|
240
241
|
let Xe = a(() => {
|
|
241
242
|
let e = f(u(Se, f(M.value, [
|
|
242
|
-
"
|
|
243
|
+
"Select",
|
|
243
244
|
"tokens",
|
|
245
|
+
"listbox",
|
|
244
246
|
"color"
|
|
245
247
|
])), q.merged.value.color ?? "primary");
|
|
246
248
|
return q.invalidated.value ? u(Ce, f(M.value, [
|
|
247
|
-
"
|
|
249
|
+
"Select",
|
|
248
250
|
"tokens",
|
|
251
|
+
"listbox",
|
|
249
252
|
"invalidated"
|
|
250
253
|
])) : e;
|
|
251
254
|
}), Ze = a(() => Xe.value?.value), Qe = a(() => {
|
|
@@ -311,6 +314,7 @@ function p(p, m, h, g, _) {
|
|
|
311
314
|
maxHeight: p.maxHeight,
|
|
312
315
|
entries: Pe.value,
|
|
313
316
|
options: G.value,
|
|
317
|
+
componentName: "Select",
|
|
314
318
|
size: q.merged.value.size,
|
|
315
319
|
color: q.merged.value.color,
|
|
316
320
|
labelledBy: q.controlId.value,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SliderRangeValue } from '@bridge-ui/core';
|
|
2
|
+
import { SliderOwnProps, SliderSlots } from './slider.types';
|
|
3
|
+
type __VLS_Slots = SliderSlots;
|
|
4
|
+
type __VLS_Props = SliderOwnProps;
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: number | undefined | SliderRangeValue;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
change: (value: number | SliderRangeValue) => any;
|
|
11
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
onChange?: ((value: number | SliderRangeValue) => any) | undefined;
|
|
14
|
+
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
showTooltip: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import e from "../BaseField/BaseField.js";
|
|
2
|
+
import { useSlider as t } from "./composables/useSlider.js";
|
|
3
|
+
import n from "../Tooltip/Tooltip.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, guardReactiveProps as u, mergeModels as d, mergeProps as f, normalizeProps as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useModel as b, withCtx as x } from "vue";
|
|
5
|
+
import { resolveSliderBounds as S, resolveSliderDefaultValue as C } from "@bridge-ui/core";
|
|
6
|
+
import { isUndefined as w } from "es-toolkit/compat";
|
|
7
|
+
//#region src/Components/Slider/Slider.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var T = /* @__PURE__ */ l({
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "Slider",
|
|
11
|
+
props: /* @__PURE__ */ d({
|
|
12
|
+
classes: {},
|
|
13
|
+
color: {},
|
|
14
|
+
customProps: {},
|
|
15
|
+
defaultValue: {},
|
|
16
|
+
max: {},
|
|
17
|
+
min: {},
|
|
18
|
+
range: { type: Boolean },
|
|
19
|
+
rounded: {},
|
|
20
|
+
showStops: { type: Boolean },
|
|
21
|
+
showTooltip: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
step: {},
|
|
26
|
+
stops: {},
|
|
27
|
+
controlId: {},
|
|
28
|
+
corner: {},
|
|
29
|
+
description: {},
|
|
30
|
+
disabled: { type: Boolean },
|
|
31
|
+
error: { type: Boolean },
|
|
32
|
+
errorMessage: {},
|
|
33
|
+
hideErrorMessage: { type: Boolean },
|
|
34
|
+
label: {},
|
|
35
|
+
readonly: { type: Boolean },
|
|
36
|
+
required: { type: Boolean },
|
|
37
|
+
size: {}
|
|
38
|
+
}, {
|
|
39
|
+
modelValue: { default: void 0 },
|
|
40
|
+
modelModifiers: {}
|
|
41
|
+
}),
|
|
42
|
+
emits: /* @__PURE__ */ d(["change", "update:modelValue"], ["update:modelValue"]),
|
|
43
|
+
setup(l, { emit: d }) {
|
|
44
|
+
let T = d, E = l, D = b(l, "modelValue"), O = {
|
|
45
|
+
min: 0,
|
|
46
|
+
step: 1,
|
|
47
|
+
max: 100,
|
|
48
|
+
size: "md",
|
|
49
|
+
rounded: "full",
|
|
50
|
+
color: "primary",
|
|
51
|
+
showStops: !1,
|
|
52
|
+
showTooltip: !0
|
|
53
|
+
}, k = S({
|
|
54
|
+
min: E.min ?? O.min,
|
|
55
|
+
max: E.max ?? O.max,
|
|
56
|
+
step: E.step ?? O.step
|
|
57
|
+
}), A = h(C({
|
|
58
|
+
min: k.min,
|
|
59
|
+
max: k.max,
|
|
60
|
+
step: k.step,
|
|
61
|
+
range: !!E.range,
|
|
62
|
+
defaultValue: E.defaultValue
|
|
63
|
+
})), j = i({
|
|
64
|
+
set: (e) => {
|
|
65
|
+
D.value = e, A.value = e;
|
|
66
|
+
},
|
|
67
|
+
get: () => w(D.value) ? A.value : D.value
|
|
68
|
+
}), M = h([null, null]), { barBind: N, trackRef: P, baseField: F, trackBind: I, controlBind: L, getStopBind: R, thumbIndexes: z, tooltipProps: B, getThumbBind: V, resolvedStops: H, isTooltipOpen: U, readThumbValue: W, getStopLabelBind: G, getThumbKnobBind: K, showTooltip: q } = t(() => E, O, j, { onChange: (e) => {
|
|
69
|
+
T("change", e);
|
|
70
|
+
} });
|
|
71
|
+
function J(e) {
|
|
72
|
+
P.value = e instanceof HTMLDivElement ? e : e?.$el ?? null;
|
|
73
|
+
}
|
|
74
|
+
function Y(e, t) {
|
|
75
|
+
let n = t instanceof HTMLButtonElement ? t : t?.$el ?? null;
|
|
76
|
+
M.value[e] = n;
|
|
77
|
+
}
|
|
78
|
+
return (t, i) => (m(), a(e, { field: y(F) }, {
|
|
79
|
+
default: x(() => [c("div", p(u(y(L))), [
|
|
80
|
+
c("div", f({ ref: J }, y(I)), [
|
|
81
|
+
c("div", p(u(y(N))), null, 16),
|
|
82
|
+
(m(!0), s(r, null, g(y(H), (e) => (m(), s("div", f({ key: `stop-${e.value}` }, { ref_for: !0 }, y(R)(e)), null, 16))), 128)),
|
|
83
|
+
(m(!0), s(r, null, g(y(z), (e) => (m(), s("button", f({ key: e }, { ref_for: !0 }, y(V)(e), {
|
|
84
|
+
ref_for: !0,
|
|
85
|
+
ref: (t) => Y(e, t)
|
|
86
|
+
}), [_(t.$slots, "thumb", {}, () => [c("span", f({ ref_for: !0 }, y(K)(e)), null, 16)])], 16))), 128))
|
|
87
|
+
], 16),
|
|
88
|
+
y(q) ? (m(!0), s(r, { key: 0 }, g(y(z), (e) => (m(), a(y(n), f({
|
|
89
|
+
arrow: "",
|
|
90
|
+
size: "sm",
|
|
91
|
+
"open-delay": 0,
|
|
92
|
+
placement: "top",
|
|
93
|
+
"close-delay": 0,
|
|
94
|
+
key: `tooltip-${e}`,
|
|
95
|
+
"anchor-el": M.value[e],
|
|
96
|
+
"model-value": y(U)(e),
|
|
97
|
+
content: String(y(W)(e))
|
|
98
|
+
}, { ref_for: !0 }, y(B)), null, 16, [
|
|
99
|
+
"anchor-el",
|
|
100
|
+
"model-value",
|
|
101
|
+
"content"
|
|
102
|
+
]))), 128)) : o("", !0),
|
|
103
|
+
(m(!0), s(r, null, g(y(H), (e) => (m(), s(r, { key: `label-${e.value}` }, [e.label ? (m(), s("div", f({
|
|
104
|
+
key: 0,
|
|
105
|
+
ref_for: !0
|
|
106
|
+
}, y(G)(e)), v(e.label), 17)) : o("", !0)], 64))), 128))
|
|
107
|
+
], 16)]),
|
|
108
|
+
_: 3
|
|
109
|
+
}, 8, ["field"]));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//#endregion
|
|
113
|
+
export { T as default };
|