@bridge-ui/vue 0.0.2 → 0.0.4
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/dist/Actions/Dialog/BridgeDialogAction.vue_vue_type_script_setup_true_lang.js +19 -35
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +41 -54
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Alert/alertDefaultIcons.d.ts +1 -1
- package/dist/Components/Alert/composables/useAlert.js +2 -2
- package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Avatar/avatar.types.d.ts +34 -1
- package/dist/Components/Avatar/composables/useAvatar.d.ts +4 -4
- package/dist/Components/Avatar/composables/useAvatar.js +10 -9
- package/dist/Components/Avatar/index.d.ts +1 -1
- package/dist/Components/Badge/composables/useBadge.js +2 -2
- package/dist/Components/Button/composables/useButton.d.ts +1 -1
- package/dist/Components/Button/composables/useButton.js +2 -2
- package/dist/Components/Card/composables/useCard.js +4 -4
- package/dist/Components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/Components/Checkbox/checkbox.types.d.ts +7 -6
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +6 -11
- package/dist/Components/Checkbox/composables/useCheckbox.js +4 -3
- package/dist/Components/Chip/composables/useChip.js +2 -2
- package/dist/Components/Divider/composables/useDivider.js +2 -2
- package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +2 -2
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +24 -18
- package/dist/Components/FormControl/FormControlLabel.js +5 -0
- package/dist/Components/FormControl/FormControlLabel.vue.d.ts +8 -0
- package/dist/Components/FormControl/FormControlLabel.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/Components/FormControl/composables/useFormControl.d.ts +7 -11
- package/dist/Components/FormControl/composables/useFormControl.js +62 -68
- package/dist/Components/FormControl/formControl.types.d.ts +19 -30
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/FormFieldLabel.js +5 -0
- package/dist/Components/FormField/FormFieldLabel.vue.d.ts +7 -0
- package/dist/Components/FormField/FormFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +22 -24
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +25 -27
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/composables/useFormField.d.ts +3 -3
- package/dist/Components/FormField/composables/useFormField.js +112 -111
- package/dist/Components/FormField/formField.types.d.ts +6 -3
- package/dist/Components/Icon/composables/useIcon.js +2 -2
- package/dist/Components/Label/composables/useLabel.js +2 -2
- package/dist/Components/Link/composables/useLink.js +2 -2
- package/dist/Components/Listbox/Listbox.vue.d.ts +1 -1
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +82 -118
- package/dist/Components/Listbox/composables/useListbox.js +2 -2
- package/dist/Components/Listbox/listbox.types.d.ts +39 -5
- package/dist/Components/Menu/Menu.vue.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.d.ts +1 -1
- package/dist/Components/Menu/composables/useMenu.js +2 -2
- package/dist/Components/Modal/composables/useModal.js +2 -2
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +52 -47
- package/dist/Components/NumberField/composables/useNumberField.d.ts +3 -4
- package/dist/Components/NumberField/composables/useNumberField.js +2 -2
- package/dist/Components/NumberField/numberField.types.d.ts +41 -2
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +35 -29
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +3 -4
- package/dist/Components/PasswordField/composables/usePasswordField.js +2 -2
- package/dist/Components/PasswordField/passwordField.types.d.ts +29 -2
- package/dist/Components/Progress/composables/useProgress.js +2 -2
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +15 -16
- package/dist/Components/Radio/composables/useRadio.d.ts +6 -11
- package/dist/Components/Radio/composables/useRadio.js +4 -3
- package/dist/Components/Radio/radio.types.d.ts +7 -6
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +64 -57
- package/dist/Components/Select/composables/useSelect.d.ts +16 -16
- package/dist/Components/Select/composables/useSelect.js +13 -13
- package/dist/Components/Select/select.types.d.ts +23 -4
- package/dist/Components/Skeleton/composables/useSkeleton.js +2 -2
- package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
- package/dist/Components/Spinner/composables/useSpinner.js +2 -2
- package/dist/Components/Switch/Switch.vue.d.ts +3 -3
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/Components/Switch/composables/useSwitch.d.ts +6 -11
- package/dist/Components/Switch/composables/useSwitch.js +4 -3
- package/dist/Components/Switch/switch.types.d.ts +7 -6
- package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/Components/Tabs/composables/useTabs.js +2 -2
- package/dist/Components/Tabs/tabs.types.d.ts +27 -1
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +15 -8
- package/dist/Components/TextField/composables/useTextField.d.ts +3 -4
- package/dist/Components/TextField/composables/useTextField.js +7 -4
- package/dist/Components/TextField/textField.types.d.ts +9 -1
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +19 -12
- package/dist/Components/Textarea/composables/useTextarea.d.ts +3 -4
- package/dist/Components/Textarea/composables/useTextarea.js +4 -3
- package/dist/Components/Textarea/textarea.types.d.ts +7 -0
- package/dist/Utils/index.d.ts +9 -2
- package/dist/Utils/index.js +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -14
- package/dist/theme.css +1 -1
- package/package.json +2 -2
|
@@ -437,10 +437,9 @@ 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">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "
|
|
440
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>;
|
|
441
441
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
442
442
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
443
|
-
labelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
444
443
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
445
444
|
cornerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
446
445
|
headerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -450,12 +449,12 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
450
449
|
endIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
451
450
|
endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
452
451
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
453
|
-
requiredBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
454
452
|
containerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
455
453
|
"data-bridge-rounded": NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
456
454
|
}>>;
|
|
457
455
|
startIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
458
456
|
startSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
457
|
+
fieldLabelProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
459
458
|
ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
460
459
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
461
460
|
stackedBodyBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
@@ -721,32 +720,33 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
721
720
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
722
721
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
723
722
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
724
|
-
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "
|
|
723
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>>;
|
|
725
724
|
selectOption: (option: SelectOption) => void;
|
|
726
725
|
containerRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
727
726
|
listboxProps: import('vue').ComputedRef<{
|
|
728
|
-
|
|
729
|
-
isSelected: (value: SelectValue) => boolean;
|
|
730
|
-
loading: boolean;
|
|
731
|
-
multiple: boolean;
|
|
732
|
-
entries: ListboxEntry[];
|
|
733
|
-
options: import('@bridge-ui/core').ListboxOption[];
|
|
734
|
-
labelledBy: string;
|
|
735
|
-
rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
736
|
-
invalidated: boolean;
|
|
737
|
-
highlightedIndex: number;
|
|
738
|
-
color: "dark" | "error" | "info" | "primary" | "secondary" | "success" | "warning";
|
|
739
|
-
size: "2xl" | "2xs" | "lg" | "md" | "sm" | "xl" | "xs";
|
|
727
|
+
anchorEl?: null | HTMLElement;
|
|
740
728
|
classes?: import('../../Listbox').ListboxClasses;
|
|
729
|
+
color: "dark" | "error" | "info" | "primary" | "secondary" | "success" | "warning";
|
|
741
730
|
customProps?: import('../../Listbox').ListboxCustomProps;
|
|
742
731
|
disableAutoFocus: boolean;
|
|
743
732
|
disableMaxHeight: boolean;
|
|
744
733
|
emptyMessage: string;
|
|
734
|
+
entries: ListboxEntry[];
|
|
745
735
|
hideEmptyMessage: boolean;
|
|
736
|
+
highlightedIndex: number;
|
|
737
|
+
invalidated: boolean;
|
|
738
|
+
isSelected: (value: import('@bridge-ui/core').ListboxValue) => boolean;
|
|
739
|
+
labelledBy: string;
|
|
740
|
+
listboxId: string;
|
|
741
|
+
loading: boolean;
|
|
746
742
|
loadingMessage: string;
|
|
747
743
|
maxHeight: string;
|
|
744
|
+
multiple: boolean;
|
|
745
|
+
options: import('@bridge-ui/core').ListboxOption[];
|
|
748
746
|
placement?: import('@floating-ui/utils').Placement;
|
|
747
|
+
rounded: "2xl" | "lg" | "md" | "sm" | "xl" | "xs" | "none" | "3xl" | "4xl" | "full";
|
|
749
748
|
showCheckmark?: boolean;
|
|
749
|
+
size: "2xl" | "2xs" | "lg" | "md" | "sm" | "xl" | "xs";
|
|
750
750
|
}>;
|
|
751
751
|
clearIconSize: import('vue').ComputedRef<keyof import('@bridge-ui/core').IconSize>;
|
|
752
752
|
mergedClasses: import('vue').ComputedRef<Partial<SelectClasses>>;
|
|
@@ -6,7 +6,7 @@ import { Comment as re, Text as ie, computed as a, nextTick as ae, onBeforeUnmou
|
|
|
6
6
|
import { get as c, isNil as de, omit as fe } from "es-toolkit/compat";
|
|
7
7
|
import { adjustAutosizeTextareaHeight as pe, cn as l, createSelectAsyncSearch as me, filterListboxEntries as he, flattenListboxOptions as u, mergeBridgeUILayeredClasses as d, normalizeListboxEntries as f, normalizeSelectOptions as ge, resolveSelectAsyncDebounce as _e, resolveSelectAsyncOptions as ve, selectValuesEqual as p, splitComponentProps as ye } from "@bridge-ui/core";
|
|
8
8
|
import { ChevronsUpDown as be } from "@lucide/vue";
|
|
9
|
-
import { colorProps as xe, invalidatedProps as Se } from "@bridge-ui/core/
|
|
9
|
+
import { colorProps as xe, invalidatedProps as Se } from "@bridge-ui/core/Tokens/Listbox";
|
|
10
10
|
//#region src/Components/Select/composables/useSelect.ts
|
|
11
11
|
var Ce = [
|
|
12
12
|
"classes",
|
|
@@ -240,12 +240,12 @@ function m(m, h, g, _, we) {
|
|
|
240
240
|
let Ye = a(() => {
|
|
241
241
|
let e = c(d(xe, c(j.value, [
|
|
242
242
|
"Listbox",
|
|
243
|
-
"
|
|
243
|
+
"tokens",
|
|
244
244
|
"color"
|
|
245
245
|
])), K.merged.value.color ?? "primary");
|
|
246
246
|
return K.invalidated.value ? d(Se, c(j.value, [
|
|
247
247
|
"Listbox",
|
|
248
|
-
"
|
|
248
|
+
"tokens",
|
|
249
249
|
"invalidated"
|
|
250
250
|
])) : e;
|
|
251
251
|
}), Xe = a(() => Ye.value?.value), Ze = a(() => {
|
|
@@ -303,25 +303,25 @@ function m(m, h, g, _, we) {
|
|
|
303
303
|
[M.value.clear ?? ""]: !0
|
|
304
304
|
})
|
|
305
305
|
})), et = a(() => ({
|
|
306
|
-
disableAutoFocus: !0,
|
|
307
|
-
maxHeight: m.maxHeight,
|
|
308
|
-
size: K.merged.value.size,
|
|
309
|
-
color: K.merged.value.color,
|
|
310
|
-
disableMaxHeight: m.disableMaxHeight === !0,
|
|
311
|
-
emptyMessage: k.value.emptyMessage ?? "No options",
|
|
312
|
-
hideEmptyMessage: k.value.hideEmptyMessage === !0,
|
|
313
|
-
loadingMessage: k.value.loadingMessage ?? "Loading...",
|
|
314
|
-
...Ve.value,
|
|
315
306
|
listboxId: y,
|
|
316
307
|
isSelected: J,
|
|
308
|
+
disableAutoFocus: !0,
|
|
317
309
|
loading: Ne.value,
|
|
318
310
|
multiple: N.value,
|
|
311
|
+
maxHeight: m.maxHeight,
|
|
319
312
|
entries: Pe.value,
|
|
320
313
|
options: W.value,
|
|
314
|
+
size: K.merged.value.size,
|
|
315
|
+
color: K.merged.value.color,
|
|
321
316
|
labelledBy: K.controlId.value,
|
|
322
317
|
rounded: K.merged.value.rounded,
|
|
323
318
|
invalidated: K.invalidated.value,
|
|
324
|
-
highlightedIndex: S.value
|
|
319
|
+
highlightedIndex: S.value,
|
|
320
|
+
disableMaxHeight: m.disableMaxHeight === !0,
|
|
321
|
+
emptyMessage: k.value.emptyMessage ?? "No options",
|
|
322
|
+
hideEmptyMessage: k.value.hideEmptyMessage === !0,
|
|
323
|
+
loadingMessage: k.value.loadingMessage ?? "Loading...",
|
|
324
|
+
...Ve.value
|
|
325
325
|
}));
|
|
326
326
|
function tt(e) {
|
|
327
327
|
let t = I.value;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { InputHTMLAttributes, Slot, TextareaHTMLAttributes } from 'vue';
|
|
2
2
|
import { ListboxOptionsInput, MergeHtmlProps, SelectAsyncData, SelectModel, SelectOption, SelectValue } from '@bridge-ui/core';
|
|
3
|
+
import { ChipOwnProps } from '../Chip/chip.types';
|
|
3
4
|
import { FormFieldClasses, FormFieldCustomProps, FormFieldOwnProps, FormFieldSlots } from '../FormField/formField.types';
|
|
5
|
+
import { IconProps } from '../Icon';
|
|
4
6
|
import { ListboxOwnProps } from '../Listbox/listbox.types';
|
|
5
7
|
export type { ListboxOptionGroup, ListboxOptionsInput, SelectAsyncData, SelectModel, SelectOption, SelectOptionInput, SelectOptionLike, SelectValue, } from '@bridge-ui/core';
|
|
6
8
|
export interface SelectClasses extends FormFieldClasses {
|
|
@@ -26,13 +28,26 @@ export interface SelectClasses extends FormFieldClasses {
|
|
|
26
28
|
value?: string;
|
|
27
29
|
}
|
|
28
30
|
export interface SelectCustomProps extends FormFieldCustomProps {
|
|
31
|
+
/**
|
|
32
|
+
* Props forwarded to each selected-value `Chip` (multiple mode).
|
|
33
|
+
* Dismiss behavior, size, and label stay owned by `Select`.
|
|
34
|
+
*
|
|
35
|
+
* @default undefined
|
|
36
|
+
*/
|
|
37
|
+
chip?: Partial<Omit<ChipOwnProps, "size" | "label" | "disabled" | "clearLabel" | "dismissible">>;
|
|
38
|
+
/**
|
|
39
|
+
* Props forwarded to the clear `Icon` (`icon` is set by `Select`).
|
|
40
|
+
*
|
|
41
|
+
* @default undefined
|
|
42
|
+
*/
|
|
43
|
+
clearIcon?: Partial<Omit<IconProps, "icon">>;
|
|
29
44
|
/**
|
|
30
45
|
* Props forwarded to the internal `Listbox`.
|
|
31
|
-
*
|
|
46
|
+
* Merged last so they override Select defaults.
|
|
32
47
|
*
|
|
33
48
|
* @default undefined
|
|
34
49
|
*/
|
|
35
|
-
listbox?: Partial<
|
|
50
|
+
listbox?: Partial<ListboxOwnProps>;
|
|
36
51
|
}
|
|
37
52
|
export interface SelectEmits {
|
|
38
53
|
/**
|
|
@@ -98,13 +113,17 @@ export interface SelectOwnProps extends Omit<FormFieldOwnProps, "field"> {
|
|
|
98
113
|
*/
|
|
99
114
|
clearable?: boolean;
|
|
100
115
|
/**
|
|
101
|
-
* Extra props for FormField parts and the
|
|
116
|
+
* Extra props for FormField parts, selected chips, clear icon, and the
|
|
117
|
+
* internal `Listbox`.
|
|
102
118
|
*
|
|
103
119
|
* @default undefined
|
|
104
120
|
*/
|
|
105
121
|
customProps?: SelectCustomProps;
|
|
106
122
|
/**
|
|
107
|
-
* Initial value when
|
|
123
|
+
* Initial value for uncontrolled usage (when `v-model` / `modelValue` is
|
|
124
|
+
* not bound).
|
|
125
|
+
*
|
|
126
|
+
* @default undefined
|
|
108
127
|
*/
|
|
109
128
|
defaultValue?: SelectModel;
|
|
110
129
|
/**
|
|
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
|
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
3
|
import { get as a } from "es-toolkit/compat";
|
|
4
4
|
import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
|
|
5
|
-
import { roundedProps as l } from "@bridge-ui/core/
|
|
5
|
+
import { roundedProps as l } from "@bridge-ui/core/Tokens/Skeleton";
|
|
6
6
|
//#region src/Components/Skeleton/composables/useSkeleton.ts
|
|
7
7
|
var u = ["classes", "rounded"];
|
|
8
8
|
function d(d, f) {
|
|
@@ -19,7 +19,7 @@ function d(d, f) {
|
|
|
19
19
|
}), _ = n({
|
|
20
20
|
entry: g,
|
|
21
21
|
props: () => m.value.componentProps
|
|
22
|
-
}), v = r(() => a(s(l, g.value?.
|
|
22
|
+
}), v = r(() => a(s(l, g.value?.tokens?.rounded), h.value.rounded));
|
|
23
23
|
return {
|
|
24
24
|
merged: h,
|
|
25
25
|
rootBind: r(() => e({}, m.value.inheritedAttrs, o({
|
|
@@ -39,7 +39,7 @@ function h(h, _e, g = {}) {
|
|
|
39
39
|
}), z = r(() => ie(g.show) ? !1 : ne(g.show)), B = r(() => {
|
|
40
40
|
let e = P.value.transition ?? "none";
|
|
41
41
|
return e in pe ? e : "none";
|
|
42
|
-
}), V = r(() => se(B.value)), ve = r(() => oe(B.value)), H = r(() => s(m(le, F.value?.
|
|
42
|
+
}), V = r(() => se(B.value)), ve = r(() => oe(B.value)), H = r(() => s(m(le, F.value?.tokens?.color), P.value.color)), U = r(() => s(m(ue, F.value?.tokens?.padding), P.value.padding)), ye = r(() => s(m(fe, F.value?.tokens?.rounded), P.value.rounded)), be = r(() => c(P.value.icon) ? null : P.value.icon ? P.value.icon : s(H.value, "icon") ?? s(ee, P.value.color)), W = r(() => P.value.duration === !1 ? 0 : P.value.duration ?? 0), G = r(() => z.value && v.value && W.value > 0 && P.value.progressbar !== !1), K = r(() => P.value.teleportTo !== !1), xe = r(() => K.value ? s(m(de, F.value?.tokens?.position), P.value.position ?? "bottom-center") : "");
|
|
43
43
|
function q() {
|
|
44
44
|
k.value &&= (clearTimeout(k.value), null);
|
|
45
45
|
}
|
|
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
|
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
3
|
import { get as a, isNil as o } from "es-toolkit/compat";
|
|
4
4
|
import { DEFAULT_SPINNER_THICKNESS as s, SPINNER_VIEWBOX_SIZE as c, cn as l, getSpinnerCircleGeometry as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core";
|
|
5
|
-
import { colorProps as p, sizeProps as m, variantProps as h } from "@bridge-ui/core/
|
|
5
|
+
import { colorProps as p, sizeProps as m, variantProps as h } from "@bridge-ui/core/Tokens/Spinner";
|
|
6
6
|
//#region src/Components/Spinner/composables/useSpinner.ts
|
|
7
7
|
var g = [
|
|
8
8
|
"size",
|
|
@@ -32,7 +32,7 @@ function v(o, v) {
|
|
|
32
32
|
}), C = n({
|
|
33
33
|
entry: S,
|
|
34
34
|
props: () => b.value.componentProps
|
|
35
|
-
}), w = r(() => x.value.customProps), T = r(() => a(d(p, S.value?.
|
|
35
|
+
}), w = r(() => x.value.customProps), T = r(() => a(d(p, S.value?.tokens?.color), x.value.color)), E = r(() => a(d(m, S.value?.tokens?.size), x.value.size)), D = r(() => a(d(h, S.value?.tokens?.variant), x.value.variant)), O = r(() => x.value.thickness ?? s), k = r(() => u(O.value)), A = c / 2, j = r(() => _(x.value.value)), M = r(() => !!x.value.enableTrack), N = r(() => !!x.value.disableShrink), P = r(() => x.value.variant === "determinate"), F = r(() => x.value.variant === "indeterminate"), I = r(() => e(w.value?.root, b.value.inheritedAttrs, {
|
|
36
36
|
role: "progressbar",
|
|
37
37
|
...P.value ? {
|
|
38
38
|
"aria-valuemin": 0,
|
|
@@ -2,13 +2,13 @@ import { SwitchOwnProps, SwitchSlots } from './switch.types';
|
|
|
2
2
|
type __VLS_Slots = SwitchSlots;
|
|
3
3
|
type __VLS_Props = SwitchOwnProps;
|
|
4
4
|
type __VLS_ModelProps = {
|
|
5
|
-
modelValue?: boolean;
|
|
5
|
+
modelValue?: boolean | undefined;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
8
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
-
"update:modelValue": (value: boolean) => any;
|
|
9
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e from "../FormControl/FormControl.js";
|
|
2
2
|
import { useSwitch as t } from "./composables/useSwitch.js";
|
|
3
|
-
import { computed as n, createBlock as r, createElementVNode as i, defineComponent as a, guardReactiveProps as o, mergeModels as s, mergeProps as c, normalizeProps as l, openBlock as u,
|
|
3
|
+
import { computed as n, createBlock as r, createElementVNode as i, defineComponent as a, guardReactiveProps as o, mergeModels as s, mergeProps as c, normalizeProps as l, openBlock as u, ref as d, unref as f, useAttrs as p, useModel as m, withCtx as h } from "vue";
|
|
4
4
|
//#region src/Components/Switch/Switch.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var g = ["checked"], _ = /* @__PURE__ */ a({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "Switch",
|
|
8
8
|
props: /* @__PURE__ */ s({
|
|
9
|
-
checked: { type: Boolean },
|
|
10
9
|
classes: {},
|
|
11
10
|
color: {},
|
|
12
11
|
customProps: {},
|
|
12
|
+
defaultChecked: { type: Boolean },
|
|
13
13
|
rounded: {},
|
|
14
14
|
size: {},
|
|
15
15
|
slots: {},
|
|
@@ -19,7 +19,6 @@ var h = ["checked"], g = /* @__PURE__ */ a({
|
|
|
19
19
|
endLabel: {},
|
|
20
20
|
error: { type: Boolean },
|
|
21
21
|
errorMessage: {},
|
|
22
|
-
mainLabel: {},
|
|
23
22
|
readonly: { type: Boolean },
|
|
24
23
|
required: { type: Boolean },
|
|
25
24
|
startLabel: {},
|
|
@@ -27,35 +26,36 @@ var h = ["checked"], g = /* @__PURE__ */ a({
|
|
|
27
26
|
}, {
|
|
28
27
|
modelValue: {
|
|
29
28
|
type: Boolean,
|
|
30
|
-
default:
|
|
29
|
+
default: void 0
|
|
31
30
|
},
|
|
32
31
|
modelModifiers: {}
|
|
33
32
|
}),
|
|
34
33
|
emits: ["update:modelValue"],
|
|
35
34
|
setup(a) {
|
|
36
|
-
let s =
|
|
35
|
+
let s = p(), _ = a, v = d(!!_.defaultChecked), y = m(a, "modelValue"), { fieldBind: b, inputBind: x, isChecked: S, thumbBind: C, trackBind: w, formControl: T } = t(() => ({
|
|
37
36
|
...s,
|
|
38
|
-
...
|
|
37
|
+
..._
|
|
39
38
|
}), {
|
|
40
39
|
size: "md",
|
|
41
40
|
rounded: "full",
|
|
42
41
|
color: "primary"
|
|
43
|
-
}, n(() =>
|
|
44
|
-
function
|
|
45
|
-
|
|
42
|
+
}, n(() => y.value ?? v.value));
|
|
43
|
+
function E(e) {
|
|
44
|
+
let t = e.target;
|
|
45
|
+
y.value = t.checked, v.value = t.checked;
|
|
46
46
|
}
|
|
47
|
-
return (t, n) => (u(), r(
|
|
48
|
-
default:
|
|
49
|
-
i("input", c(
|
|
50
|
-
checked:
|
|
51
|
-
onChange:
|
|
52
|
-
}), null, 16,
|
|
53
|
-
i("span", l(o(
|
|
54
|
-
i("span", l(o(
|
|
47
|
+
return (t, n) => (u(), r(f(e), { field: f(T) }, {
|
|
48
|
+
default: h(() => [i("label", l(o(f(b))), [
|
|
49
|
+
i("input", c(f(x), {
|
|
50
|
+
checked: f(S),
|
|
51
|
+
onChange: E
|
|
52
|
+
}), null, 16, g),
|
|
53
|
+
i("span", l(o(f(w))), null, 16),
|
|
54
|
+
i("span", l(o(f(C))), null, 16)
|
|
55
55
|
], 16)]),
|
|
56
56
|
_: 1
|
|
57
57
|
}, 8, ["field"]));
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
//#endregion
|
|
61
|
-
export {
|
|
61
|
+
export { _ as default };
|
|
@@ -225,7 +225,7 @@ export declare function useSwitch(props: MaybeRefOrGetter<SwitchOwnProps>, libDe
|
|
|
225
225
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
226
226
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
227
227
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
228
|
-
}, Partial<Omit<SwitchOwnProps, "color" | "size" | "classes" | "customProps" | "rounded">>>>;
|
|
228
|
+
}, Partial<Omit<SwitchOwnProps, "color" | "size" | "classes" | "customProps" | "rounded" | "defaultChecked">>>>;
|
|
229
229
|
isChecked: import('vue').ComputedRef<boolean>;
|
|
230
230
|
thumbBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').InputHTMLAttributes | undefined, {
|
|
231
231
|
"aria-hidden": boolean;
|
|
@@ -243,7 +243,7 @@ export declare function useSwitch(props: MaybeRefOrGetter<SwitchOwnProps>, libDe
|
|
|
243
243
|
withoutErrorMessage: NonNullable<boolean | undefined>;
|
|
244
244
|
}>;
|
|
245
245
|
rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
246
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "size" | "classes" | "customProps" | "error" | "disabled" | "
|
|
246
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "size" | "classes" | "customProps" | "error" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
|
|
247
247
|
controlId: import('vue').ComputedRef<string>;
|
|
248
248
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
249
249
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -256,15 +256,10 @@ export declare function useSwitch(props: MaybeRefOrGetter<SwitchOwnProps>, libDe
|
|
|
256
256
|
"aria-invalid": true | undefined;
|
|
257
257
|
}>;
|
|
258
258
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
for: string;
|
|
264
|
-
}>>;
|
|
265
|
-
startLabelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
266
|
-
for: string;
|
|
267
|
-
}>>;
|
|
259
|
+
fieldLabelProps: import('vue').ComputedRef<{
|
|
260
|
+
endLabel: import('../../Label').LabelProps;
|
|
261
|
+
startLabel: import('../../Label').LabelProps;
|
|
262
|
+
}>;
|
|
268
263
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
269
264
|
id: string;
|
|
270
265
|
}>>;
|
|
@@ -3,14 +3,15 @@ import { useFormControl as r } from "../../FormControl/composables/useFormContro
|
|
|
3
3
|
import { computed as i, toValue as a, useAttrs as o } from "vue";
|
|
4
4
|
import { get as s, omit as c } from "es-toolkit/compat";
|
|
5
5
|
import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core";
|
|
6
|
-
import { colorProps as f, invalidatedProps as p, roundedProps as m, sizeProps as h } from "@bridge-ui/core/
|
|
6
|
+
import { colorProps as f, invalidatedProps as p, roundedProps as m, sizeProps as h } from "@bridge-ui/core/Tokens/Switch";
|
|
7
7
|
//#region src/Components/Switch/composables/useSwitch.ts
|
|
8
8
|
var g = [
|
|
9
9
|
"size",
|
|
10
10
|
"color",
|
|
11
11
|
"classes",
|
|
12
12
|
"rounded",
|
|
13
|
-
"customProps"
|
|
13
|
+
"customProps",
|
|
14
|
+
"defaultChecked"
|
|
14
15
|
];
|
|
15
16
|
function _(_, v, y) {
|
|
16
17
|
let b = o(), x = r(() => ({
|
|
@@ -33,7 +34,7 @@ function _(_, v, y) {
|
|
|
33
34
|
}), T = i(() => C.value.customProps), E = n({
|
|
34
35
|
entry: w,
|
|
35
36
|
props: () => S.value.componentProps
|
|
36
|
-
}), D = i(() => !!a(y)), O = i(() => s(u(f, w.value?.
|
|
37
|
+
}), D = i(() => !!a(y)), O = i(() => s(u(f, w.value?.tokens?.color), C.value.color ?? "primary")), k = i(() => u(p, w.value?.tokens?.invalidated)), A = i(() => x.invalidated.value ? k.value : O.value), j = i(() => s(u(h, w.value?.tokens?.size), C.value.size ?? "sm")), M = i(() => s(u(m, w.value?.tokens?.rounded), C.value.rounded ?? "full")), N = i(() => e({
|
|
37
38
|
...T.value?.input,
|
|
38
39
|
...x.controlBind.value,
|
|
39
40
|
role: "switch",
|
|
@@ -39,12 +39,6 @@ export interface SwitchEmits {
|
|
|
39
39
|
"update:modelValue": [value: boolean];
|
|
40
40
|
}
|
|
41
41
|
export interface SwitchOwnProps extends Omit<FormControlOwnProps, "field" | "slots" | "classes" | "customProps"> {
|
|
42
|
-
/**
|
|
43
|
-
* Whether the switch is on.
|
|
44
|
-
*
|
|
45
|
-
* @default undefined
|
|
46
|
-
*/
|
|
47
|
-
checked?: boolean;
|
|
48
42
|
/**
|
|
49
43
|
* Classes for the form control chrome and the switch control.
|
|
50
44
|
*
|
|
@@ -63,6 +57,13 @@ export interface SwitchOwnProps extends Omit<FormControlOwnProps, "field" | "slo
|
|
|
63
57
|
* @default undefined
|
|
64
58
|
*/
|
|
65
59
|
customProps?: SwitchCustomProps;
|
|
60
|
+
/**
|
|
61
|
+
* Initial on state for uncontrolled usage (when `v-model` / `modelValue`
|
|
62
|
+
* is not bound).
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
defaultChecked?: boolean;
|
|
66
67
|
/**
|
|
67
68
|
* The roundedness of the switch track.
|
|
68
69
|
*
|
|
@@ -3,9 +3,9 @@ import t from "../Tab/Tab.js";
|
|
|
3
3
|
import n from "../TabList/TabList.js";
|
|
4
4
|
import r from "../TabPanel/TabPanel.js";
|
|
5
5
|
import { useTabs as i } from "./composables/useTabs.js";
|
|
6
|
-
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createSlots as u, createTextVNode as d, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeModels as h,
|
|
6
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createSlots as u, createTextVNode as d, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeModels as h, mergeProps as g, normalizeProps as _, openBlock as v, renderList as y, resolveDynamicComponent as b, toDisplayString as x, unref as S, useModel as C, useSlots as w, withCtx as T } from "vue";
|
|
7
7
|
//#region src/Components/Tabs/Tabs.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var E = /* @__PURE__ */ p({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "Tabs",
|
|
11
11
|
props: /* @__PURE__ */ h({
|
|
@@ -26,48 +26,48 @@ var T = /* @__PURE__ */ p({
|
|
|
26
26
|
}),
|
|
27
27
|
emits: /* @__PURE__ */ h(["change", "update:modelValue"], ["update:modelValue"]),
|
|
28
28
|
setup(p, { emit: h }) {
|
|
29
|
-
let
|
|
29
|
+
let E = w(), D = h, O = p, { rootBind: k, tabItems: A } = i(O, {
|
|
30
30
|
size: "md",
|
|
31
31
|
variant: "line",
|
|
32
32
|
color: "primary",
|
|
33
33
|
keepMounted: !0,
|
|
34
34
|
activation: "automatic",
|
|
35
35
|
orientation: "horizontal"
|
|
36
|
-
},
|
|
37
|
-
return (i, o) => (
|
|
38
|
-
default:
|
|
36
|
+
}, C(p, "modelValue"), D), j = o(() => A.value.length > 0);
|
|
37
|
+
return (i, o) => (v(), l("div", _(m(S(k))), [j.value ? (v(), l(a, { key: 0 }, [f(n, _(m(O.customProps?.tabList)), {
|
|
38
|
+
default: T(() => [(v(!0), l(a, null, y(S(A), (e) => (v(), s(t, g({
|
|
39
39
|
key: e.value,
|
|
40
40
|
value: e.value,
|
|
41
41
|
"end-icon": e.endIcon,
|
|
42
42
|
disabled: e.disabled,
|
|
43
43
|
"start-icon": e.startIcon
|
|
44
|
-
}, u({
|
|
45
|
-
default:
|
|
44
|
+
}, { ref_for: !0 }, O.customProps?.tab), u({
|
|
45
|
+
default: T(() => [typeof e.label == "string" ? (v(), l(a, { key: 0 }, [d(x(e.label), 1)], 64)) : (v(), s(b(e.label), { key: 1 }))]),
|
|
46
46
|
_: 2
|
|
47
47
|
}, [e.slots?.start ? {
|
|
48
48
|
name: "start",
|
|
49
|
-
fn:
|
|
49
|
+
fn: T(() => [(v(), s(b(e.slots.start)))]),
|
|
50
50
|
key: "0"
|
|
51
51
|
} : void 0, e.slots?.end ? {
|
|
52
52
|
name: "end",
|
|
53
|
-
fn:
|
|
53
|
+
fn: T(() => [(v(), s(b(e.slots.end)))]),
|
|
54
54
|
key: "1"
|
|
55
|
-
} : void 0]),
|
|
55
|
+
} : void 0]), 1040, [
|
|
56
56
|
"value",
|
|
57
57
|
"end-icon",
|
|
58
58
|
"disabled",
|
|
59
59
|
"start-icon"
|
|
60
60
|
]))), 128))]),
|
|
61
61
|
_: 1
|
|
62
|
-
}), (
|
|
62
|
+
}, 16), (v(!0), l(a, null, y(S(A), (e) => (v(), s(r, g({
|
|
63
63
|
key: e.value,
|
|
64
64
|
value: e.value,
|
|
65
65
|
"keep-mounted": e.keepMounted
|
|
66
|
-
}, {
|
|
67
|
-
default:
|
|
66
|
+
}, { ref_for: !0 }, O.customProps?.tabPanel), {
|
|
67
|
+
default: T(() => [(v(), s(b(e.panel)))]),
|
|
68
68
|
_: 2
|
|
69
|
-
},
|
|
69
|
+
}, 1040, ["value", "keep-mounted"]))), 128))], 64)) : c("", !0), (v(), s(b(S(e)(S(E), "default"))))], 16));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
//#endregion
|
|
73
|
-
export {
|
|
73
|
+
export { E as default };
|
|
@@ -3,7 +3,7 @@ import { TABS_INJECTION_KEY as r } from "../tabsInjectionKey.js";
|
|
|
3
3
|
import { computed as i, provide as a, ref as o, useAttrs as s, useId as c } from "vue";
|
|
4
4
|
import { get as l } from "es-toolkit/compat";
|
|
5
5
|
import { cn as u, getTabId as d, mergeBridgeUILayeredClasses as f, splitComponentProps as p } from "@bridge-ui/core";
|
|
6
|
-
import { colorProps as m, orientationProps as h, sizeProps as g, variantProps as _ } from "@bridge-ui/core/
|
|
6
|
+
import { colorProps as m, orientationProps as h, sizeProps as g, variantProps as _ } from "@bridge-ui/core/Tokens/Tabs";
|
|
7
7
|
//#region src/Components/Tabs/composables/useTabs.ts
|
|
8
8
|
var v = [
|
|
9
9
|
"size",
|
|
@@ -52,7 +52,7 @@ function y(y, b, x, S) {
|
|
|
52
52
|
let L = n({
|
|
53
53
|
entry: j,
|
|
54
54
|
props: () => k.value.componentProps
|
|
55
|
-
}), R = i(() => f(g, j.value?.
|
|
55
|
+
}), R = i(() => f(g, j.value?.tokens?.size)), z = i(() => f(_, j.value?.tokens?.variant)), B = i(() => f(m, j.value?.tokens?.color)), V = i(() => f(h, j.value?.tokens?.orientation)), H = i(() => l(R.value, A.value.size)), U = i(() => l(z.value, A.value.variant)), W = i(() => l(B.value, A.value.color)), G = i(() => l(V.value, A.value.orientation)), K = i(() => ({
|
|
56
56
|
focusTab: F,
|
|
57
57
|
id: T,
|
|
58
58
|
setSelected: N,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes, Slot } from 'vue';
|
|
2
2
|
import { MergeHtmlProps, MergeProps, TabsActivation, TabsColor, TabsOrientation, TabsSize, TabsVariant } from '@bridge-ui/core';
|
|
3
|
+
import { TabOwnProps } from '../Tab/tab.types';
|
|
4
|
+
import { TabListOwnProps } from '../TabList/tabList.types';
|
|
5
|
+
import { TabPanelOwnProps } from '../TabPanel/tabPanel.types';
|
|
3
6
|
export interface TabsSizeOverrides {}
|
|
4
7
|
export interface TabsColorOverrides {}
|
|
5
8
|
export interface TabsVariantOverrides {}
|
|
@@ -13,8 +16,30 @@ export interface TabsClasses {
|
|
|
13
16
|
export interface TabsCustomProps {
|
|
14
17
|
/**
|
|
15
18
|
* Props forwarded to the root element.
|
|
19
|
+
*
|
|
20
|
+
* @default undefined
|
|
16
21
|
*/
|
|
17
22
|
root?: HTMLAttributes;
|
|
23
|
+
/**
|
|
24
|
+
* Props forwarded to each mapped `Tab` when using the `items` API.
|
|
25
|
+
* Value, icons, and disabled stay owned by `Tabs`.
|
|
26
|
+
*
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
tab?: Partial<Omit<TabOwnProps, "value" | "endIcon" | "disabled" | "startIcon">>;
|
|
30
|
+
/**
|
|
31
|
+
* Props forwarded to the mapped `TabList` when using the `items` API.
|
|
32
|
+
*
|
|
33
|
+
* @default undefined
|
|
34
|
+
*/
|
|
35
|
+
tabList?: Partial<TabListOwnProps>;
|
|
36
|
+
/**
|
|
37
|
+
* Props forwarded to each mapped `TabPanel` when using the `items` API.
|
|
38
|
+
* Value and keepMounted stay owned by `Tabs`.
|
|
39
|
+
*
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
42
|
+
tabPanel?: Partial<Omit<TabPanelOwnProps, "value" | "keepMounted">>;
|
|
18
43
|
}
|
|
19
44
|
export interface TabsEmits {
|
|
20
45
|
/**
|
|
@@ -49,7 +74,8 @@ export interface TabsOwnProps {
|
|
|
49
74
|
*/
|
|
50
75
|
color?: MergeProps<TabsColor, TabsColorOverrides>;
|
|
51
76
|
/**
|
|
52
|
-
*
|
|
77
|
+
* Extra props for the root and mapped `TabList` / `Tab` / `TabPanel` parts
|
|
78
|
+
* (items API).
|
|
53
79
|
*
|
|
54
80
|
* @default undefined
|
|
55
81
|
*/
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import e from "../FormField/FormField.js";
|
|
2
2
|
import { useTextField as t } from "./composables/useTextField.js";
|
|
3
|
-
import {
|
|
3
|
+
import { computed as n, createBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, openBlock as c, ref as l, unref as u, useModel as d, vModelDynamic as f, withCtx as p, withDirectives as m } from "vue";
|
|
4
|
+
import { isUndefined as h } from "es-toolkit/compat";
|
|
4
5
|
//#region src/Components/TextField/TextField.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
6
|
+
var g = /* @__PURE__ */ a({
|
|
6
7
|
inheritAttrs: !1,
|
|
7
8
|
__name: "TextField",
|
|
8
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ o({
|
|
10
|
+
defaultValue: {},
|
|
9
11
|
classes: {},
|
|
10
12
|
color: {},
|
|
11
13
|
controlId: {},
|
|
@@ -37,13 +39,18 @@ var p = /* @__PURE__ */ i({
|
|
|
37
39
|
modelModifiers: {}
|
|
38
40
|
}),
|
|
39
41
|
emits: ["update:modelValue"],
|
|
40
|
-
setup(
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
setup(a) {
|
|
43
|
+
let o = d(a, "modelValue"), g = a, _ = l(g.defaultValue), v = n({
|
|
44
|
+
set: (e) => {
|
|
45
|
+
o.value = e, _.value = e;
|
|
46
|
+
},
|
|
47
|
+
get: () => h(o.value) ? _.value : o.value
|
|
48
|
+
}), { formField: y, inputBind: b } = t(g);
|
|
49
|
+
return (t, n) => (c(), r(u(e), { field: u(y) }, {
|
|
50
|
+
default: p(() => [m(i("input", s({ "onUpdate:modelValue": n[0] ||= (e) => v.value = e }, u(b)), null, 16), [[f, v.value]])]),
|
|
44
51
|
_: 1
|
|
45
52
|
}, 8, ["field"]));
|
|
46
53
|
}
|
|
47
54
|
});
|
|
48
55
|
//#endregion
|
|
49
|
-
export {
|
|
56
|
+
export { g as default };
|