@bridge-ui/vue 0.0.6 → 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/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +17 -17
- package/dist/Adapters/I18n/index.d.ts +1 -1
- package/dist/Adapters/I18n/index.js +2 -2
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +7 -3
- package/dist/Adapters/I18n/useI18nAdapter.js +12 -7
- package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
- package/dist/Adapters/index.d.ts +1 -1
- package/dist/Adapters/index.js +3 -3
- package/dist/Components/Alert/composables/useAlert.js +17 -17
- package/dist/Components/Autocomplete/Autocomplete.js +5 -0
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +40 -0
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +197 -0
- package/dist/Components/Autocomplete/AutocompleteOption.js +5 -0
- package/dist/Components/Autocomplete/AutocompleteOption.vue.d.ts +4 -0
- package/dist/Components/Autocomplete/AutocompleteOption.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/Components/Autocomplete/autocomplete.types.d.ts +285 -0
- package/dist/Components/Autocomplete/autocompleteInjectionKey.d.ts +7 -0
- package/dist/Components/Autocomplete/autocompleteInjectionKey.js +4 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +763 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +386 -0
- package/dist/Components/Autocomplete/index.d.ts +4 -0
- package/dist/Components/Autocomplete/index.js +4 -0
- package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
- package/dist/Components/Avatar/composables/useAvatar.js +13 -13
- package/dist/Components/Badge/composables/useBadge.js +8 -8
- 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/BaseField/BaseFieldLabel.vue.d.ts +7 -0
- package/dist/Components/BaseField/BaseFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
- 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/Button/composables/useButton.js +14 -14
- package/dist/Components/Card/composables/useCard.js +27 -27
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +3 -3
- package/dist/Components/Checkbox/composables/useCheckbox.js +9 -9
- package/dist/Components/Chip/Chip.vue.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.js +6 -6
- package/dist/Components/Divider/composables/useDivider.js +5 -5
- package/dist/Components/Drawer/Drawer.vue.d.ts +2 -2
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +23 -23
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/FormControl/composables/useFormControl.d.ts +13 -4
- package/dist/Components/FormControl/composables/useFormControl.js +63 -59
- package/dist/Components/FormControl/formControl.types.d.ts +6 -6
- package/dist/Components/FormControl/index.d.ts +1 -1
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/composables/useFormField.d.ts +7 -3
- package/dist/Components/FormField/composables/useFormField.js +29 -29
- package/dist/Components/FormField/formField.types.d.ts +14 -14
- package/dist/Components/Icon/composables/useIcon.js +5 -5
- package/dist/Components/Label/composables/useLabel.js +5 -5
- package/dist/Components/Link/composables/useLink.js +9 -9
- package/dist/Components/List/composables/useList.js +6 -6
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.js +20 -20
- package/dist/Components/ListSection/composables/useListSection.js +8 -8
- package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/Components/Listbox/composables/useListbox.d.ts +10 -1
- package/dist/Components/Listbox/composables/useListbox.js +23 -23
- package/dist/Components/Listbox/index.d.ts +1 -0
- package/dist/Components/Listbox/index.js +3 -3
- package/dist/Components/Listbox/listbox.types.d.ts +6 -0
- package/dist/Components/Menu/Menu.vue.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.js +43 -43
- package/dist/Components/Modal/Modal.vue.d.ts +2 -2
- package/dist/Components/Modal/composables/useModal.d.ts +1 -1
- package/dist/Components/Modal/composables/useModal.js +18 -18
- package/dist/Components/NumberField/NumberField.vue.d.ts +2 -2
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +34 -34
- package/dist/Components/NumberField/composables/useNumberField.d.ts +4 -4
- package/dist/Components/NumberField/composables/useNumberField.js +13 -10
- package/dist/Components/OtpField/OtpField.js +5 -0
- package/dist/Components/OtpField/OtpField.vue.d.ts +31 -0
- package/dist/Components/OtpField/OtpField.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/Components/OtpField/composables/useOtpField.d.ts +287 -0
- package/dist/Components/OtpField/composables/useOtpField.js +154 -0
- package/dist/Components/OtpField/index.d.ts +4 -0
- package/dist/Components/OtpField/index.js +3 -0
- package/dist/Components/OtpField/otpField.types.d.ts +120 -0
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +4 -4
- package/dist/Components/PasswordField/composables/usePasswordField.js +6 -3
- package/dist/Components/Progress/composables/useProgress.js +11 -11
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Radio/composables/useRadio.d.ts +3 -3
- package/dist/Components/Radio/composables/useRadio.js +9 -9
- package/dist/Components/Select/Select.vue.d.ts +5 -5
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +16 -13
- package/dist/Components/Select/composables/useSelect.d.ts +5 -4
- package/dist/Components/Select/composables/useSelect.js +167 -163
- package/dist/Components/Skeleton/composables/useSkeleton.js +5 -5
- 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/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/Components/Snackbar/composables/useSnackbar.js +115 -115
- package/dist/Components/Spinner/composables/useSpinner.js +11 -11
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Switch/composables/useSwitch.d.ts +3 -3
- package/dist/Components/Switch/composables/useSwitch.js +9 -9
- package/dist/Components/Tab/composables/useTab.js +11 -11
- package/dist/Components/TabList/composables/useTabList.js +7 -7
- package/dist/Components/TabPanel/composables/useTabPanel.js +7 -7
- package/dist/Components/Tabs/Tabs.vue.d.ts +2 -2
- package/dist/Components/Tabs/composables/useTabs.js +22 -22
- package/dist/Components/TextField/TextField.vue.d.ts +1 -1
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/TextField/composables/useTextField.d.ts +4 -4
- package/dist/Components/TextField/composables/useTextField.js +2 -2
- package/dist/Components/Textarea/Textarea.vue.d.ts +1 -1
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/Textarea/composables/useTextarea.d.ts +4 -4
- package/dist/Components/Textarea/composables/useTextarea.js +10 -9
- package/dist/Components/Tooltip/composables/useTooltip.js +17 -17
- package/dist/Provider/bridgeUITypes.d.ts +4 -1
- package/dist/Provider/createBridgeUIApi.js +13 -1
- package/dist/Utils/index.d.ts +3 -3
- package/dist/Utils/index.js +11 -8
- package/dist/Utils/useBreakpoint.js +7 -7
- package/dist/augments.d.ts +29 -17
- package/dist/index.d.ts +11 -3
- package/dist/index.js +88 -80
- 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 +13 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { useFormControl as r } from "../../FormControl/composables/useFormControl.js";
|
|
3
3
|
import { computed as i, ref as a, toValue as o, useAttrs as s, watchEffect as c } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core";
|
|
5
|
+
import { get as f, omit as p } from "es-toolkit/compat";
|
|
6
6
|
import { colorProps as m, invalidatedProps as h, roundedProps as g, sizeProps as _ } from "@bridge-ui/core/Tokens/Checkbox";
|
|
7
7
|
//#region src/Components/Checkbox/composables/useCheckbox.ts
|
|
8
8
|
var v = [
|
|
@@ -20,9 +20,9 @@ function y(y, b, x) {
|
|
|
20
20
|
...o(y)
|
|
21
21
|
}), {
|
|
22
22
|
error: !1,
|
|
23
|
-
|
|
23
|
+
hideErrorMessage: !1,
|
|
24
24
|
size: b.size ?? "sm"
|
|
25
|
-
}), T = i(() =>
|
|
25
|
+
}, { componentName: "Checkbox" }), T = i(() => d({
|
|
26
26
|
bridgeKeys: v,
|
|
27
27
|
props: {
|
|
28
28
|
...S,
|
|
@@ -35,7 +35,7 @@ function y(y, b, x) {
|
|
|
35
35
|
}), O = i(() => E.value.customProps), k = n({
|
|
36
36
|
entry: D,
|
|
37
37
|
props: () => T.value.componentProps
|
|
38
|
-
}), A = i(() => !!o(x)), j = i(() =>
|
|
38
|
+
}), A = i(() => !!o(x)), j = i(() => f(u(m, D.value?.tokens?.color), E.value.color ?? "primary")), M = i(() => u(h, D.value?.tokens?.invalidated)), N = i(() => w.invalidated.value ? M.value : j.value), P = i(() => f(u(_, D.value?.tokens?.size), E.value.size ?? "sm")), F = i(() => f(u(g, D.value?.tokens?.rounded), E.value.rounded ?? "sm"));
|
|
39
39
|
c(() => {
|
|
40
40
|
C.value && (C.value.indeterminate = !!E.value.indeterminate);
|
|
41
41
|
});
|
|
@@ -43,10 +43,10 @@ function y(y, b, x) {
|
|
|
43
43
|
...O.value?.input,
|
|
44
44
|
...w.controlBind.value,
|
|
45
45
|
type: "checkbox"
|
|
46
|
-
},
|
|
46
|
+
}, p(T.value.inheritedAttrs, ["class"]), l({
|
|
47
47
|
"sr-only": !0,
|
|
48
48
|
[k.value.input ?? ""]: !0
|
|
49
|
-
}))), L = i(() => e(O.value?.control, { "aria-hidden": !0 },
|
|
49
|
+
}))), L = i(() => e(O.value?.control, { "aria-hidden": !0 }, l({
|
|
50
50
|
"inline-flex shrink-0 items-center justify-center border shadow-sm transition ease-in-out duration-100": !0,
|
|
51
51
|
"pointer-events-none": !0,
|
|
52
52
|
[P.value ?? ""]: !0,
|
|
@@ -57,12 +57,12 @@ function y(y, b, x) {
|
|
|
57
57
|
})));
|
|
58
58
|
return {
|
|
59
59
|
merged: E,
|
|
60
|
-
iconBind: i(() => e(O.value?.icon, {},
|
|
60
|
+
iconBind: i(() => e(O.value?.icon, {}, l({
|
|
61
61
|
"text-white": !0,
|
|
62
62
|
[k.value.icon ?? ""]: !0
|
|
63
63
|
}))),
|
|
64
64
|
inputRef: C,
|
|
65
|
-
fieldBind: i(() => e({}, {},
|
|
65
|
+
fieldBind: i(() => e({}, {}, l({
|
|
66
66
|
"relative inline-flex shrink-0 cursor-pointer items-center": !0,
|
|
67
67
|
"has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2": !0,
|
|
68
68
|
[N.value?.focus ?? ""]: !0
|
|
@@ -6,8 +6,8 @@ declare const __VLS_base: import('vue').DefineComponent<ChipOwnProps, {}, {}, {}
|
|
|
6
6
|
onDismiss?: ((event: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
8
|
size: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').ChipSize, import('./chip.types').ChipSizeOverrides>;
|
|
9
|
-
disabled: boolean;
|
|
10
9
|
clearLabel: string;
|
|
10
|
+
disabled: boolean;
|
|
11
11
|
dismissible: boolean;
|
|
12
12
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -6,7 +6,7 @@ type ChipLibDefaults = LibDefaultsShape<ChipOwnProps, "size">;
|
|
|
6
6
|
type ChipMerged = MergeLibDefaults<ChipOwnProps, ChipLibDefaults>;
|
|
7
7
|
export declare function useChip(props: ChipOwnProps, libDefaults: ChipLibDefaults, emit: SetupContext<ChipEmits>["emit"]): {
|
|
8
8
|
merged: import('vue').ComputedRef<ChipMerged>;
|
|
9
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<ChipProps, "size" | "classes" | "customProps" | "label" | "
|
|
9
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<ChipProps, "size" | "classes" | "customProps" | "label" | "clearLabel" | "disabled" | "dismissible">>>;
|
|
10
10
|
labelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
11
11
|
clearBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
12
12
|
role: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cn as a, mergeBridgeUILayeredClasses as o, splitComponentProps as s } from "@bridge-ui/core";
|
|
4
|
+
import { get as c } from "es-toolkit/compat";
|
|
5
5
|
import { sizeProps as l } from "@bridge-ui/core/Tokens/Chip";
|
|
6
6
|
//#region src/Components/Chip/composables/useChip.ts
|
|
7
7
|
var u = [
|
|
@@ -14,7 +14,7 @@ var u = [
|
|
|
14
14
|
"dismissible"
|
|
15
15
|
];
|
|
16
16
|
function d(d, f, p) {
|
|
17
|
-
let m = i(), h = r(() =>
|
|
17
|
+
let m = i(), h = r(() => s({
|
|
18
18
|
bridgeKeys: u,
|
|
19
19
|
props: {
|
|
20
20
|
...m,
|
|
@@ -27,12 +27,12 @@ function d(d, f, p) {
|
|
|
27
27
|
}), v = n({
|
|
28
28
|
entry: _,
|
|
29
29
|
props: () => h.value.componentProps
|
|
30
|
-
}), y = r(() => g.value.customProps), b = r(() =>
|
|
30
|
+
}), y = r(() => g.value.customProps), b = r(() => c(o(l, _.value?.tokens?.size), g.value.size ?? "md")), x = r(() => b.value?.clear ?? "md"), S = r(() => e(y.value?.root, h.value.inheritedAttrs, a({
|
|
31
31
|
"inline-flex max-w-full items-center bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-100": !0,
|
|
32
32
|
"opacity-50 pointer-events-none": g.value.disabled === !0,
|
|
33
33
|
[b.value?.root ?? ""]: !0,
|
|
34
34
|
[v.value.root ?? ""]: !0
|
|
35
|
-
}))), C = r(() => e(y.value?.label, {},
|
|
35
|
+
}))), C = r(() => e(y.value?.label, {}, a({
|
|
36
36
|
truncate: !0,
|
|
37
37
|
[b.value?.label ?? ""]: !0,
|
|
38
38
|
[v.value.label ?? ""]: !0
|
|
@@ -41,7 +41,7 @@ function d(d, f, p) {
|
|
|
41
41
|
tabindex: g.value.disabled ? -1 : 0,
|
|
42
42
|
"aria-label": g.value.clearLabel ?? "Remove",
|
|
43
43
|
"aria-disabled": g.value.disabled ? !0 : void 0
|
|
44
|
-
},
|
|
44
|
+
}, a({
|
|
45
45
|
"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm text-gray-400 transition-colors duration-150 hover:text-gray-700 dark:text-gray-500 dark:hover:text-gray-200": !0,
|
|
46
46
|
[v.value.clear ?? ""]: !0
|
|
47
47
|
})));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cn as a, mergeBridgeUILayeredClasses as o, splitComponentProps as s } from "@bridge-ui/core";
|
|
4
|
+
import { get as c } from "es-toolkit/compat";
|
|
5
5
|
import { colorProps as l, orientationProps as u } from "@bridge-ui/core/Tokens/Divider";
|
|
6
6
|
//#region src/Components/Divider/composables/useDivider.ts
|
|
7
7
|
var d = [
|
|
@@ -10,7 +10,7 @@ var d = [
|
|
|
10
10
|
"orientation"
|
|
11
11
|
];
|
|
12
12
|
function f(f, p) {
|
|
13
|
-
let m = i(), h = r(() =>
|
|
13
|
+
let m = i(), h = r(() => s({
|
|
14
14
|
props: {
|
|
15
15
|
...m,
|
|
16
16
|
...f
|
|
@@ -23,13 +23,13 @@ function f(f, p) {
|
|
|
23
23
|
}), v = n({
|
|
24
24
|
entry: _,
|
|
25
25
|
props: () => h.value.componentProps
|
|
26
|
-
}), y = r(() =>
|
|
26
|
+
}), y = r(() => c(o(l, _.value?.tokens?.color), g.value.color)), b = r(() => c(o(u, _.value?.tokens?.orientation), g.value.orientation));
|
|
27
27
|
return {
|
|
28
28
|
merged: g,
|
|
29
29
|
rootBind: r(() => e({}, h.value.inheritedAttrs, {
|
|
30
30
|
role: "separator",
|
|
31
31
|
"aria-orientation": g.value.orientation,
|
|
32
|
-
class:
|
|
32
|
+
class: a({
|
|
33
33
|
"m-0 shrink-0 border-0": !0,
|
|
34
34
|
[y.value ?? ""]: !0,
|
|
35
35
|
[b.value ?? ""]: !0,
|
|
@@ -8,12 +8,12 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
8
8
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
9
9
|
stackId: import('vue').ComputedRef<string>;
|
|
10
10
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
-
"update:modelValue": (value: boolean) => any;
|
|
12
11
|
close: () => any;
|
|
12
|
+
"update:modelValue": (value: boolean) => any;
|
|
13
13
|
"show-change": (show: boolean) => any;
|
|
14
14
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
16
15
|
onClose?: (() => any) | undefined;
|
|
16
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
17
|
"onShow-change"?: ((show: boolean) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
19
|
closeOnEscape: boolean;
|
|
@@ -34,7 +34,7 @@ export declare function useDrawer(props: DrawerOwnProps, libDefaults: DrawerLibD
|
|
|
34
34
|
};
|
|
35
35
|
"aria-hidden": boolean | undefined;
|
|
36
36
|
class: string;
|
|
37
|
-
}, "class", import('vue').HTMLAttributes | undefined, Omit<DrawerProps, "size" | "classes" | "customProps" | "closeOnEscape" | "disableScrollLock" | "keepMounted" | "persistent" | "placement" | "teleportTo" | "
|
|
37
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<DrawerProps, "size" | "classes" | "customProps" | "closeOnEscape" | "disableScrollLock" | "keepMounted" | "persistent" | "placement" | "teleportTo" | "scroll" | "blur" | "autoFocus" | "closeOnOverlay" | "disableEnforceFocus" | "disableRestoreFocus" | "hideBackdrop" | "stackId" | "transition" | "ariaLabel" | "ariaLabelledBy">>>;
|
|
38
38
|
panelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
|
|
39
39
|
"data-drawer-part": string;
|
|
40
40
|
"data-state": "open" | "closed";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as te } from "../../../Utils/index.js";
|
|
2
|
-
import { computed as n, nextTick as r, onBeforeUnmount as ne, ref as i, toValue as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { computed as n, nextTick as r, onBeforeUnmount as ne, ref as i, toValue as re, useAttrs as ie, watch as a } from "vue";
|
|
3
|
+
import { DRAWER_LEAVE_FALLBACK_MS as o, LAYER_STACK_BASE_Z_INDEX as s, acquireLayerStackOrder as ae, cn as c, countDrawerTransitionLayers as l, createFocusTrap as u, getDrawerOverlayTransitionClass as oe, getDrawerPanelTransitionClass as se, getLayerStackEntry as ce, hasDrawerTransition as le, mergeBridgeUILayeredClasses as d, pushLayerStack as f, resolveEffectiveDrawerTransition as p, splitComponentProps as m, subscribeLayerStack as h } from "@bridge-ui/core";
|
|
4
|
+
import { get as g } from "es-toolkit/compat";
|
|
5
5
|
import { isModalBackdropClick as ue } from "@bridge-ui/core/Utils";
|
|
6
6
|
import { blurProps as de, placementPanelProps as fe, placementProps as pe, sizeProps as me } from "@bridge-ui/core/Tokens/Drawer";
|
|
7
7
|
//#region src/Components/Drawer/composables/useDrawer.ts
|
|
@@ -28,11 +28,11 @@ var he = [
|
|
|
28
28
|
"disableRestoreFocus"
|
|
29
29
|
];
|
|
30
30
|
function _(_, ge, v = {}) {
|
|
31
|
-
let _e =
|
|
31
|
+
let _e = ie(), y = i(!1), b = i(!1), x = i(""), S = 0, C = null, w = null, T = i(null), E = null, D = i(s), O = null, k = i("closed"), A = null, j = n(() => re(v.show ?? !1));
|
|
32
32
|
function M(e) {
|
|
33
33
|
e || v.onClose?.(), v.show && (v.show.value = e), v.onShowChange?.(e);
|
|
34
34
|
}
|
|
35
|
-
let N = n(() =>
|
|
35
|
+
let N = n(() => m({
|
|
36
36
|
bridgeKeys: he,
|
|
37
37
|
props: {
|
|
38
38
|
..._e,
|
|
@@ -45,30 +45,30 @@ function _(_, ge, v = {}) {
|
|
|
45
45
|
}), I = n(() => P.value.customProps), L = te({
|
|
46
46
|
entry: F,
|
|
47
47
|
props: () => N.value.componentProps
|
|
48
|
-
}), R = n(() =>
|
|
48
|
+
}), R = n(() => p(P.value.transition ?? "none")), z = n(() => le(R.value)), B = n(() => P.value.scroll ?? "paper"), V = n(() => P.value.keepMounted && !y.value), H = n(() => P.value.placement ?? "left"), U = n(() => H.value === "left" || H.value === "right" ? "horizontal" : "vertical"), ve = n(() => g(d(pe, F.value?.tokens?.placement), H.value)), ye = n(() => g(fe, H.value)), be = n(() => g(d(de, F.value?.tokens?.blur), P.value.blur)), xe = n(() => g(d(me, F.value?.tokens?.size), [P.value.size, U.value])), Se = n(() => oe(R.value)), Ce = n(() => se(R.value, H.value)), W = n(() => !P.value.persistent), we = n(() => N.value.inheritedAttrs), Te = n(() => e(I.value?.root, we.value, {
|
|
49
49
|
onTransitionend: je,
|
|
50
50
|
style: { zIndex: D.value },
|
|
51
51
|
"aria-hidden": V.value ? !0 : void 0,
|
|
52
|
-
class:
|
|
52
|
+
class: c({
|
|
53
53
|
"fixed inset-0": !0,
|
|
54
54
|
"overflow-y-auto": B.value === "body",
|
|
55
55
|
"overflow-hidden": B.value === "paper",
|
|
56
56
|
"invisible pointer-events-none": V.value,
|
|
57
|
-
[
|
|
57
|
+
[g(L.value, "root") ?? ""]: !0
|
|
58
58
|
})
|
|
59
59
|
})), Ee = n(() => e(I.value?.overlay, { onClick: Z }, {
|
|
60
60
|
"data-drawer-part": "overlay",
|
|
61
61
|
"data-state": k.value,
|
|
62
|
-
class:
|
|
62
|
+
class: c({
|
|
63
63
|
"fixed inset-0 bg-black/50": !0,
|
|
64
64
|
[be.value ?? ""]: !0,
|
|
65
65
|
[Se.value]: z.value,
|
|
66
|
-
[
|
|
66
|
+
[g(L.value, "overlay") ?? ""]: !0
|
|
67
67
|
})
|
|
68
|
-
})), De = n(() => e(I.value?.wrapper, { onClick: Q },
|
|
68
|
+
})), De = n(() => e(I.value?.wrapper, { onClick: Q }, c({
|
|
69
69
|
"flex min-h-full w-full transform": !0,
|
|
70
70
|
[ve.value ?? ""]: !0,
|
|
71
|
-
[
|
|
71
|
+
[g(L.value, "wrapper") ?? ""]: !0
|
|
72
72
|
}))), Oe = n(() => e(I.value?.panel, {
|
|
73
73
|
role: "dialog",
|
|
74
74
|
"aria-modal": !0,
|
|
@@ -77,13 +77,13 @@ function _(_, ge, v = {}) {
|
|
|
77
77
|
}, {
|
|
78
78
|
"data-drawer-part": "panel",
|
|
79
79
|
"data-state": k.value,
|
|
80
|
-
class:
|
|
80
|
+
class: c({
|
|
81
81
|
"relative rounded-none": !0,
|
|
82
82
|
[ye.value ?? ""]: !0,
|
|
83
83
|
[xe.value ?? ""]: !0,
|
|
84
84
|
"overflow-y-auto": B.value === "paper",
|
|
85
85
|
[Ce.value]: z.value,
|
|
86
|
-
[
|
|
86
|
+
[g(L.value, "panel") ?? ""]: !0
|
|
87
87
|
})
|
|
88
88
|
}));
|
|
89
89
|
function G() {
|
|
@@ -94,7 +94,7 @@ function _(_, ge, v = {}) {
|
|
|
94
94
|
G();
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
|
-
G(), w =
|
|
97
|
+
G(), w = u({
|
|
98
98
|
container: T.value,
|
|
99
99
|
disableAutoFocus: !P.value.autoFocus,
|
|
100
100
|
disableEnforceFocus: P.value.disableEnforceFocus,
|
|
@@ -115,13 +115,13 @@ function _(_, ge, v = {}) {
|
|
|
115
115
|
J();
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
if (k.value = "closed", S =
|
|
118
|
+
if (k.value = "closed", S = l(R.value, { hideBackdrop: P.value.hideBackdrop }), S === 0) {
|
|
119
119
|
J();
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
q(), A = setTimeout(() => {
|
|
123
123
|
A = null, S > 0 && J();
|
|
124
|
-
},
|
|
124
|
+
}, o);
|
|
125
125
|
}
|
|
126
126
|
function Ae() {
|
|
127
127
|
if (!z.value) {
|
|
@@ -157,13 +157,13 @@ function _(_, ge, v = {}) {
|
|
|
157
157
|
function Me() {
|
|
158
158
|
!j.value || P.value.closeOnEscape === !1 || !W.value || X();
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
a(j, (e) => {
|
|
161
161
|
if (e) {
|
|
162
162
|
b.value = !0, y.value = !0, Ae();
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
b.value && Y();
|
|
166
|
-
}, { immediate: !0 }),
|
|
166
|
+
}, { immediate: !0 }), a([
|
|
167
167
|
y,
|
|
168
168
|
k,
|
|
169
169
|
() => P.value.autoFocus,
|
|
@@ -178,17 +178,17 @@ function _(_, ge, v = {}) {
|
|
|
178
178
|
let e = ce(x.value);
|
|
179
179
|
e && (D.value = e.zIndex);
|
|
180
180
|
}
|
|
181
|
-
return
|
|
181
|
+
return a(y, (e) => {
|
|
182
182
|
if (e) {
|
|
183
|
-
C === null && (C =
|
|
183
|
+
C === null && (C = ae()), E = f({
|
|
184
184
|
order: C,
|
|
185
185
|
id: v.stackId,
|
|
186
186
|
onEscape: Me,
|
|
187
187
|
lockScroll: P.value.disableScrollLock !== !0
|
|
188
|
-
}), x.value = E.id, D.value = E.zIndex, $(), O =
|
|
188
|
+
}), x.value = E.id, D.value = E.zIndex, $(), O = h($);
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
|
-
O?.(), O = null, E?.release(), E = null, x.value = "", D.value =
|
|
191
|
+
O?.(), O = null, E?.release(), E = null, x.value = "", D.value = s, b.value || (C = null);
|
|
192
192
|
}, { immediate: !0 }), ne(() => {
|
|
193
193
|
q(), O?.(), O = null, G(), E?.release(), E = null, C = null;
|
|
194
194
|
}), {
|
|
@@ -29,7 +29,7 @@ var _ = [
|
|
|
29
29
|
}, null, 8, ["api"])
|
|
30
30
|
], 16),
|
|
31
31
|
!b.value.invalidated.value && g(e)(b.value.slots, "description", b.value.merged.value.description) ? (p(), o("p", f(d({ key: 0 }, b.value.descriptionBind.value)), [(p(), i(h(g(t)(b.value.slots, "description", b.value.merged.value.description))))], 16)) : a("", !0),
|
|
32
|
-
b.value.merged.value.
|
|
32
|
+
b.value.merged.value.hideErrorMessage ? a("", !0) : (p(), o("p", d({ key: 1 }, b.value.errorMessageBind.value, { "aria-hidden": b.value.showErrorMessageContent.value ? void 0 : !0 }), [b.value.showErrorMessageContent.value ? (p(), i(h(g(t)(b.value.slots, "errorMessage", b.value.merged.value.errorMessage)), { key: 0 })) : a("", !0)], 16, v))
|
|
33
33
|
], 16, _));
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -2,16 +2,25 @@ import { HTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
|
2
2
|
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
3
3
|
import { FormControlOwnProps } from '../formControl.types';
|
|
4
4
|
import { LabelProps } from '../../Label/label.types';
|
|
5
|
-
export declare const formControlBridgeKeys: readonly ["size", "error", "classes", "disabled", "endLabel", "readonly", "required", "controlId", "startLabel", "customProps", "description", "errorMessage", "
|
|
6
|
-
type FormControlLibDefaults = LibDefaultsShape<FormControlOwnProps, "size" | "error" | "
|
|
5
|
+
export declare const formControlBridgeKeys: readonly ["size", "error", "classes", "disabled", "endLabel", "readonly", "required", "controlId", "startLabel", "customProps", "description", "errorMessage", "hideErrorMessage"];
|
|
6
|
+
type FormControlLibDefaults = LibDefaultsShape<FormControlOwnProps, "size" | "error" | "hideErrorMessage">;
|
|
7
7
|
type FormControlMerged = MergeLibDefaults<FormControlOwnProps, FormControlLibDefaults>;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Options for {@link useFormControl}.
|
|
10
|
+
*/
|
|
11
|
+
export type FormControlOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* Public registry key that owns FormControl chrome defaults/tokens.
|
|
14
|
+
*/
|
|
15
|
+
componentName?: "Radio" | "Switch" | "Checkbox";
|
|
16
|
+
};
|
|
17
|
+
export declare function useFormControl(props: MaybeRefOrGetter<Omit<FormControlOwnProps, "field">>, libDefaults: FormControlLibDefaults, options?: FormControlOptions): {
|
|
9
18
|
slots: Readonly<{
|
|
10
19
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
11
20
|
}>;
|
|
12
21
|
merged: import('vue').ComputedRef<FormControlMerged>;
|
|
13
22
|
rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
|
|
14
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, Partial<Omit<Omit<FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "
|
|
23
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, Partial<Omit<Omit<FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "description" | "errorMessage" | "controlId" | "hideErrorMessage" | "readonly" | "endLabel" | "startLabel">>>>;
|
|
15
24
|
controlId: import('vue').ComputedRef<string>;
|
|
16
25
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
17
26
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { hasSlotOrProp as e } from "../../../Utils/slotOrProp.js";
|
|
2
2
|
import { mergeNestedComponentProps as t, mergePartBind as n, useBridgeUIComponent as r, useBridgeUIMergedRegistryClasses as i } from "../../../Utils/index.js";
|
|
3
3
|
import { computed as a, toValue as o, useAttrs as s, useId as c, useSlots as l } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { cn as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core";
|
|
5
|
+
import { get as p, omit as m } from "es-toolkit/compat";
|
|
6
|
+
import { sizeProps as h } from "@bridge-ui/core/Tokens/Label";
|
|
7
|
+
import { invalidatedProps as g } from "@bridge-ui/core/Tokens/FormControl";
|
|
8
8
|
//#region src/Components/FormControl/composables/useFormControl.ts
|
|
9
9
|
var _ = [
|
|
10
10
|
"size",
|
|
@@ -19,85 +19,89 @@ var _ = [
|
|
|
19
19
|
"customProps",
|
|
20
20
|
"description",
|
|
21
21
|
"errorMessage",
|
|
22
|
-
"
|
|
22
|
+
"hideErrorMessage"
|
|
23
23
|
];
|
|
24
|
-
function v(v, y) {
|
|
25
|
-
let
|
|
24
|
+
function v(v, y, b = {}) {
|
|
25
|
+
let x = c(), S = l(), C = s(), w = a(() => f({
|
|
26
26
|
bridgeKeys: _,
|
|
27
27
|
props: {
|
|
28
|
-
...
|
|
28
|
+
...C,
|
|
29
29
|
...o(v)
|
|
30
30
|
}
|
|
31
|
-
})), { merged:
|
|
31
|
+
})), { merged: T, entry: E } = r({
|
|
32
32
|
libDefaults: y,
|
|
33
|
-
componentName:
|
|
34
|
-
props: () =>
|
|
35
|
-
}),
|
|
36
|
-
entry:
|
|
37
|
-
props: () =>
|
|
38
|
-
}),
|
|
39
|
-
let e =
|
|
40
|
-
return
|
|
41
|
-
}),
|
|
33
|
+
componentName: b.componentName,
|
|
34
|
+
props: () => w.value.componentProps
|
|
35
|
+
}), D = a(() => T.value.customProps), O = i({
|
|
36
|
+
entry: E,
|
|
37
|
+
props: () => w.value.componentProps
|
|
38
|
+
}), k = a(() => T.value.error === !0), A = a(() => !!T.value.disabled), j = a(() => !!T.value.readonly), M = a(() => {
|
|
39
|
+
let e = w.value.inheritedAttrs.id;
|
|
40
|
+
return T.value.controlId ?? e ?? x;
|
|
41
|
+
}), N = a(() => !T.value.hideErrorMessage), P = a(() => k.value && e(S, "errorMessage", T.value.errorMessage)), F = a(() => {
|
|
42
42
|
let t = [];
|
|
43
|
-
return !
|
|
44
|
-
}),
|
|
43
|
+
return !k.value && e(S, "description", T.value.description) && t.push(`${M.value}-description`), k.value && N.value && e(S, "errorMessage", T.value.errorMessage) && t.push(`${M.value}-error`), t.length > 0 ? t.join(" ") : void 0;
|
|
44
|
+
}), I = a(() => p(h, T.value.size ?? "md")), L = a(() => d(g, p(E.value, [
|
|
45
|
+
"tokens",
|
|
46
|
+
"formControl",
|
|
47
|
+
"invalidated"
|
|
48
|
+
]), T.value.customProps?.invalidated)), R = a(() => n(D.value?.root, m(w.value.inheritedAttrs, ["class"]), u({
|
|
45
49
|
"group/form-control relative w-full": !0,
|
|
46
50
|
"aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60 aria-disabled:cursor-not-allowed": !0,
|
|
47
51
|
"aria-readonly:pointer-events-none aria-readonly:select-none": !0,
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
}))),
|
|
52
|
+
[O.value.root ?? ""]: !0,
|
|
53
|
+
[C.class]: !!C.class
|
|
54
|
+
}))), z = a(() => n(D.value?.row, {}, u({
|
|
51
55
|
"flex flex-row items-center gap-x-2": !0,
|
|
52
|
-
[
|
|
53
|
-
}))),
|
|
54
|
-
let e = (e) => t(
|
|
55
|
-
for:
|
|
56
|
-
size:
|
|
57
|
-
error:
|
|
58
|
-
required:
|
|
59
|
-
classes: { root:
|
|
56
|
+
[O.value.row ?? ""]: !0
|
|
57
|
+
}))), B = a(() => {
|
|
58
|
+
let e = (e) => t(D.value?.[e], {
|
|
59
|
+
for: M.value,
|
|
60
|
+
size: T.value.size,
|
|
61
|
+
error: k.value,
|
|
62
|
+
required: T.value.required,
|
|
63
|
+
classes: { root: u({
|
|
60
64
|
"cursor-pointer": !0,
|
|
61
|
-
[
|
|
65
|
+
[O.value[e] ?? ""]: !0
|
|
62
66
|
}) }
|
|
63
67
|
});
|
|
64
68
|
return {
|
|
65
69
|
endLabel: e("endLabel"),
|
|
66
70
|
startLabel: e("startLabel")
|
|
67
71
|
};
|
|
68
|
-
}),
|
|
72
|
+
}), V = a(() => n(D.value?.description, { id: `${M.value}-description` }, u({
|
|
69
73
|
"mt-2 text-gray-500 dark:text-gray-400": !0,
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
}))),
|
|
74
|
+
[I.value ?? ""]: !0,
|
|
75
|
+
[O.value.description ?? ""]: !0
|
|
76
|
+
}))), H = a(() => n(D.value?.errorMessage, { id: `${M.value}-error` }, u({
|
|
73
77
|
"mt-2": !0,
|
|
74
|
-
"min-h-[1lh]":
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
+
"min-h-[1lh]": N.value,
|
|
79
|
+
[L.value.errorMessage ?? ""]: !0,
|
|
80
|
+
[I.value ?? ""]: !0,
|
|
81
|
+
[O.value.errorMessage ?? ""]: !0
|
|
78
82
|
})));
|
|
79
83
|
return {
|
|
80
|
-
slots:
|
|
81
|
-
merged:
|
|
82
|
-
rowBind:
|
|
83
|
-
rootBind:
|
|
84
|
-
controlId:
|
|
85
|
-
isDisabled:
|
|
86
|
-
isReadonly:
|
|
84
|
+
slots: S,
|
|
85
|
+
merged: T,
|
|
86
|
+
rowBind: z,
|
|
87
|
+
rootBind: R,
|
|
88
|
+
controlId: M,
|
|
89
|
+
isDisabled: A,
|
|
90
|
+
isReadonly: j,
|
|
87
91
|
controlBind: a(() => ({
|
|
88
|
-
id:
|
|
89
|
-
disabled:
|
|
90
|
-
readonly:
|
|
91
|
-
"aria-describedby":
|
|
92
|
-
required:
|
|
93
|
-
"aria-invalid":
|
|
92
|
+
id: M.value,
|
|
93
|
+
disabled: A.value,
|
|
94
|
+
readonly: j.value,
|
|
95
|
+
"aria-describedby": F.value,
|
|
96
|
+
required: T.value.required || void 0,
|
|
97
|
+
"aria-invalid": k.value || void 0
|
|
94
98
|
})),
|
|
95
|
-
invalidated:
|
|
96
|
-
fieldLabelProps:
|
|
97
|
-
descriptionBind:
|
|
98
|
-
errorMessageBind:
|
|
99
|
-
showErrorMessageContent:
|
|
100
|
-
reservesErrorMessageSpace:
|
|
99
|
+
invalidated: k,
|
|
100
|
+
fieldLabelProps: B,
|
|
101
|
+
descriptionBind: V,
|
|
102
|
+
errorMessageBind: H,
|
|
103
|
+
showErrorMessageContent: P,
|
|
104
|
+
reservesErrorMessageSpace: N
|
|
101
105
|
};
|
|
102
106
|
}
|
|
103
107
|
//#endregion
|
|
@@ -122,6 +122,12 @@ export interface FormControlOwnProps {
|
|
|
122
122
|
* @default undefined
|
|
123
123
|
*/
|
|
124
124
|
field?: UseFormControlReturn;
|
|
125
|
+
/**
|
|
126
|
+
* When `true`, does not reserve space below the row for error messages.
|
|
127
|
+
*
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
hideErrorMessage?: boolean;
|
|
125
131
|
/**
|
|
126
132
|
* Whether the control is read-only.
|
|
127
133
|
*
|
|
@@ -155,12 +161,6 @@ export interface FormControlOwnProps {
|
|
|
155
161
|
* @default undefined
|
|
156
162
|
*/
|
|
157
163
|
startLabel?: string;
|
|
158
|
-
/**
|
|
159
|
-
* When `true`, does not reserve space below the row for error messages.
|
|
160
|
-
*
|
|
161
|
-
* @default false
|
|
162
|
-
*/
|
|
163
|
-
withoutErrorMessage?: boolean;
|
|
164
164
|
}
|
|
165
165
|
export interface FormControlSlots {
|
|
166
166
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { formControlBridgeKeys, useFormControl, } from './composables/useFormControl';
|
|
2
|
-
export type { UseFormControlReturn } from './composables/useFormControl';
|
|
2
|
+
export type { FormControlOptions, UseFormControlReturn, } from './composables/useFormControl';
|
|
3
3
|
export type { FormControlClasses, FormControlCustomProps, FormControlOwnProps, FormControlProps, FormControlSizeOverrides, FormControlSlots, } from './formControl.types';
|
|
4
4
|
export { default as FormControl } from './FormControl.vue';
|
|
@@ -20,13 +20,13 @@ var x = [
|
|
|
20
20
|
u("div", h(p(f.api.containerBind.value)), [
|
|
21
21
|
b(e)(f.api.slots, "start") ? (g(), l("div", h(m({ key: 0 }, f.api.startSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "start"))))], 16)) : b(n)(f.api.merged.value.start) ? (g(), l("div", h(m({ key: 1 }, f.api.startBind.value)), y(f.api.merged.value.start), 17)) : f.api.merged.value.startIcon ? (g(), l("div", h(m({ key: 2 }, f.api.startBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.startIconBind.value, { icon: f.api.merged.value.startIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0),
|
|
22
22
|
_(w.$slots, "default"),
|
|
23
|
-
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.
|
|
23
|
+
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.showErrorIcon !== !1 ? (g(), l("div", h(m({ key: 5 }, f.api.endBind.value)), [d(b(a), m({
|
|
24
24
|
icon: f.api.errorIcon.value,
|
|
25
25
|
size: f.api.merged.value.size
|
|
26
26
|
}, f.api.endIconBind.value), null, 16, ["icon", "size"])], 16)) : f.api.merged.value.endIcon ? (g(), l("div", h(m({ key: 6 }, f.api.endBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.endIconBind.value, { icon: f.api.merged.value.endIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0)
|
|
27
27
|
], 16),
|
|
28
28
|
!f.api.invalidated.value && b(t)(f.api.slots, "description", f.api.merged.value.description) ? (g(), l("p", m({ key: 1 }, f.api.descriptionBind.value, { id: `${f.api.controlId.value}-description` }), [(g(), s(v(b(i)(f.api.slots, "description", f.api.merged.value.description))))], 16, S)) : c("", !0),
|
|
29
|
-
f.api.merged.value.
|
|
29
|
+
f.api.merged.value.hideErrorMessage ? c("", !0) : (g(), l("p", m({ key: 2 }, f.api.errorBind.value, {
|
|
30
30
|
id: `${f.api.controlId.value}-error`,
|
|
31
31
|
"aria-hidden": f.api.showErrorMessageContent.value ? void 0 : !0
|
|
32
32
|
}), [f.api.showErrorMessageContent.value ? (g(), s(v(b(i)(f.api.slots, "errorMessage", f.api.merged.value.errorMessage)), { key: 0 })) : c("", !0)], 16, C))
|
|
@@ -19,13 +19,13 @@ var x = [
|
|
|
19
19
|
u("div", h(p(f.api.containerBind.value)), [f.api.hasInsetLabelRow.value ? (g(), l("div", h(m({ key: 0 }, f.api.insetLabelRowBind.value)), [d(o, { api: f.api }, null, 8, ["api"]), b(t)(f.api.slots, "corner", f.api.merged.value.corner) ? (g(), l("span", h(m({ key: 0 }, f.api.cornerBind.value)), [(g(), s(v(b(i)(f.api.slots, "corner", f.api.merged.value.corner))))], 16)) : c("", !0)], 16)) : c("", !0), u("div", S, [
|
|
20
20
|
b(e)(f.api.slots, "start") ? (g(), l("div", h(m({ key: 0 }, f.api.startSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "start"))))], 16)) : b(n)(f.api.merged.value.start) ? (g(), l("div", h(m({ key: 1 }, f.api.startBind.value)), y(f.api.merged.value.start), 17)) : f.api.merged.value.startIcon ? (g(), l("div", h(m({ key: 2 }, f.api.startBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.startIconBind.value, { icon: f.api.merged.value.startIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0),
|
|
21
21
|
_(T.$slots, "default"),
|
|
22
|
-
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.
|
|
22
|
+
b(e)(f.api.slots, "end") ? (g(), l("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [(g(), s(v(b(r)(f.api.slots, "end"))))], 16)) : b(n)(f.api.merged.value.end) ? (g(), l("div", h(m({ key: 4 }, f.api.endBind.value)), y(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.showErrorIcon !== !1 ? (g(), l("div", h(m({ key: 5 }, f.api.endBind.value)), [d(b(a), m({
|
|
23
23
|
icon: f.api.errorIcon.value,
|
|
24
24
|
size: f.api.merged.value.size
|
|
25
25
|
}, f.api.endIconBind.value), null, 16, ["icon", "size"])], 16)) : f.api.merged.value.endIcon ? (g(), l("div", h(m({ key: 6 }, f.api.endBind.value)), [d(b(a), m({ size: f.api.merged.value.size }, f.api.endIconBind.value, { icon: f.api.merged.value.endIcon }), null, 16, ["size", "icon"])], 16)) : c("", !0)
|
|
26
26
|
])], 16),
|
|
27
27
|
!f.api.invalidated.value && b(t)(f.api.slots, "description", f.api.merged.value.description) ? (g(), l("p", m({ key: 0 }, f.api.descriptionBind.value, { id: `${f.api.controlId.value}-description` }), [(g(), s(v(b(i)(f.api.slots, "description", f.api.merged.value.description))))], 16, C)) : c("", !0),
|
|
28
|
-
f.api.merged.value.
|
|
28
|
+
f.api.merged.value.hideErrorMessage ? c("", !0) : (g(), l("p", m({ key: 1 }, f.api.errorBind.value, {
|
|
29
29
|
id: `${f.api.controlId.value}-error`,
|
|
30
30
|
"aria-hidden": f.api.showErrorMessageContent.value ? void 0 : !0
|
|
31
31
|
}), [f.api.showErrorMessageContent.value ? (g(), s(v(b(i)(f.api.slots, "errorMessage", f.api.merged.value.errorMessage)), { key: 0 })) : c("", !0)], 16, w))
|