@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 { 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
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as l, getTabId as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core";
|
|
5
|
+
import { get as p } from "es-toolkit/compat";
|
|
6
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 = [
|
|
@@ -16,7 +16,7 @@ var v = [
|
|
|
16
16
|
"orientation"
|
|
17
17
|
];
|
|
18
18
|
function y(y, b, x, S) {
|
|
19
|
-
let C = c(), w = s(), T = `bridge-tabs${C}`, E = o([]), D = o([]), O = o([]), k = i(() =>
|
|
19
|
+
let C = c(), w = s(), T = `bridge-tabs${C}`, E = o([]), D = o([]), O = o([]), k = i(() => f({
|
|
20
20
|
bridgeKeys: v,
|
|
21
21
|
props: {
|
|
22
22
|
...w,
|
|
@@ -36,7 +36,7 @@ function y(y, b, x, S) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function F(e) {
|
|
39
|
-
document.getElementById(
|
|
39
|
+
document.getElementById(u(T, e))?.focus();
|
|
40
40
|
}
|
|
41
41
|
function I(e) {
|
|
42
42
|
let t = O.value.findIndex((t) => t.value === e.value);
|
|
@@ -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(() =>
|
|
55
|
+
}), R = i(() => d(g, j.value?.tokens?.size)), z = i(() => d(_, j.value?.tokens?.variant)), B = i(() => d(m, j.value?.tokens?.color)), V = i(() => d(h, j.value?.tokens?.orientation)), H = i(() => p(R.value, A.value.size)), U = i(() => p(z.value, A.value.variant)), W = i(() => p(B.value, A.value.color)), G = i(() => p(V.value, A.value.orientation)), K = i(() => ({
|
|
56
56
|
focusTab: F,
|
|
57
57
|
id: T,
|
|
58
58
|
setSelected: N,
|
|
@@ -66,20 +66,20 @@ function y(y, b, x, S) {
|
|
|
66
66
|
activation: A.value.activation ?? "automatic",
|
|
67
67
|
orientation: A.value.orientation ?? "horizontal",
|
|
68
68
|
tokenClasses: {
|
|
69
|
-
tabSize:
|
|
70
|
-
iconGap:
|
|
71
|
-
iconSize:
|
|
72
|
-
listSize:
|
|
73
|
-
panelSize:
|
|
74
|
-
tabVariant:
|
|
75
|
-
listVariant:
|
|
76
|
-
tabOrientation:
|
|
77
|
-
colorSelected:
|
|
78
|
-
listOrientation:
|
|
79
|
-
rootOrientation:
|
|
80
|
-
panelOrientation:
|
|
81
|
-
tabVariantSelected:
|
|
82
|
-
colorSelectedSoft:
|
|
69
|
+
tabSize: p(H.value, "tab"),
|
|
70
|
+
iconGap: p(H.value, "gap"),
|
|
71
|
+
iconSize: p(H.value, "icon"),
|
|
72
|
+
listSize: p(H.value, "list"),
|
|
73
|
+
panelSize: p(H.value, "panel"),
|
|
74
|
+
tabVariant: p(U.value, "tab"),
|
|
75
|
+
listVariant: p(U.value, "list"),
|
|
76
|
+
tabOrientation: p(G.value, "tab"),
|
|
77
|
+
colorSelected: p(W.value, "tabSelected"),
|
|
78
|
+
listOrientation: p(G.value, "list"),
|
|
79
|
+
rootOrientation: p(G.value, "root"),
|
|
80
|
+
panelOrientation: p(G.value, "panel"),
|
|
81
|
+
tabVariantSelected: p(U.value, "tabSelected"),
|
|
82
|
+
colorSelectedSoft: p(W.value, "tabSelectedSoft"),
|
|
83
83
|
softFill: A.value.variant === "pill" || A.value.variant === "solid"
|
|
84
84
|
}
|
|
85
85
|
}));
|
|
@@ -87,9 +87,9 @@ function y(y, b, x, S) {
|
|
|
87
87
|
let q = i(() => A.value.customProps);
|
|
88
88
|
return {
|
|
89
89
|
merged: A,
|
|
90
|
-
rootBind: i(() => e(q.value?.root, k.value.inheritedAttrs, { class:
|
|
91
|
-
[
|
|
92
|
-
[
|
|
90
|
+
rootBind: i(() => e(q.value?.root, k.value.inheritedAttrs, { class: l({
|
|
91
|
+
[p(G.value, "root") ?? ""]: !0,
|
|
92
|
+
[p(L.value, "root") ?? ""]: !0
|
|
93
93
|
}) })),
|
|
94
94
|
tabItems: O,
|
|
95
95
|
contextValue: K
|
|
@@ -10,7 +10,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
11
|
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
-
|
|
13
|
+
showErrorIcon: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -20,20 +20,20 @@ var g = /* @__PURE__ */ a({
|
|
|
20
20
|
error: { type: Boolean },
|
|
21
21
|
errorIcon: {},
|
|
22
22
|
errorMessage: {},
|
|
23
|
+
hideErrorMessage: { type: Boolean },
|
|
23
24
|
label: {},
|
|
24
25
|
readonly: { type: Boolean },
|
|
25
26
|
required: { type: Boolean },
|
|
26
27
|
rounded: {},
|
|
28
|
+
showErrorIcon: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !0
|
|
31
|
+
},
|
|
27
32
|
size: {},
|
|
28
33
|
slots: {},
|
|
29
34
|
start: {},
|
|
30
35
|
startIcon: {},
|
|
31
|
-
variant: {}
|
|
32
|
-
withErrorIcon: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: !0
|
|
35
|
-
},
|
|
36
|
-
withoutErrorMessage: { type: Boolean }
|
|
36
|
+
variant: {}
|
|
37
37
|
}, {
|
|
38
38
|
modelValue: {},
|
|
39
39
|
modelModifiers: {}
|
|
@@ -4,13 +4,13 @@ export declare function useTextField(props: TextFieldOwnProps): {
|
|
|
4
4
|
slots: Readonly<{
|
|
5
5
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
6
6
|
}>;
|
|
7
|
-
merged: import('vue').ComputedRef<Omit<import('../../FormField').FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "
|
|
7
|
+
merged: import('vue').ComputedRef<Omit<import('../../FormField').FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "showErrorIcon"> & {
|
|
8
8
|
color: NonNullable<keyof import('@bridge-ui/core').FormFieldColor | undefined>;
|
|
9
9
|
size: NonNullable<keyof import('@bridge-ui/core').FormFieldSize | undefined>;
|
|
10
10
|
rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
11
11
|
variant: NonNullable<keyof import('@bridge-ui/core').FormFieldVariant | undefined>;
|
|
12
12
|
errorIcon: NonNullable<import('../../..').IconSource | undefined>;
|
|
13
|
-
|
|
13
|
+
showErrorIcon: NonNullable<boolean | undefined>;
|
|
14
14
|
}>;
|
|
15
15
|
control: import('vue').ComputedRef<string>;
|
|
16
16
|
endBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -427,7 +427,7 @@ export declare function useTextField(props: TextFieldOwnProps): {
|
|
|
427
427
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
428
428
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
429
429
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
430
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
430
|
+
}, 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">>>>;
|
|
431
431
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
432
432
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
433
433
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -675,5 +675,5 @@ export declare function useTextField(props: TextFieldOwnProps): {
|
|
|
675
675
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
676
676
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
677
677
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
678
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
678
|
+
}, 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">>>>;
|
|
679
679
|
};
|
|
@@ -10,7 +10,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
11
|
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
-
|
|
13
|
+
showErrorIcon: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -23,20 +23,20 @@ var v = /* @__PURE__ */ a({
|
|
|
23
23
|
error: { type: Boolean },
|
|
24
24
|
errorIcon: {},
|
|
25
25
|
errorMessage: {},
|
|
26
|
+
hideErrorMessage: { type: Boolean },
|
|
26
27
|
label: {},
|
|
27
28
|
readonly: { type: Boolean },
|
|
28
29
|
required: { type: Boolean },
|
|
29
30
|
rounded: {},
|
|
31
|
+
showErrorIcon: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !0
|
|
34
|
+
},
|
|
30
35
|
size: {},
|
|
31
36
|
slots: {},
|
|
32
37
|
start: {},
|
|
33
38
|
startIcon: {},
|
|
34
|
-
variant: {}
|
|
35
|
-
withErrorIcon: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: !0
|
|
38
|
-
},
|
|
39
|
-
withoutErrorMessage: { type: Boolean }
|
|
39
|
+
variant: {}
|
|
40
40
|
}, {
|
|
41
41
|
modelValue: {},
|
|
42
42
|
modelModifiers: {}
|
|
@@ -5,13 +5,13 @@ export declare function useTextarea(props: TextareaOwnProps, textareaRef: Ref<nu
|
|
|
5
5
|
slots: Readonly<{
|
|
6
6
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
7
7
|
}>;
|
|
8
|
-
merged: import('vue').ComputedRef<Omit<import('../../FormField').FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "
|
|
8
|
+
merged: import('vue').ComputedRef<Omit<import('../../FormField').FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "showErrorIcon"> & {
|
|
9
9
|
color: NonNullable<keyof import('@bridge-ui/core').FormFieldColor | undefined>;
|
|
10
10
|
size: NonNullable<keyof import('@bridge-ui/core').FormFieldSize | undefined>;
|
|
11
11
|
rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
12
12
|
variant: NonNullable<keyof import('@bridge-ui/core').FormFieldVariant | undefined>;
|
|
13
13
|
errorIcon: NonNullable<import('../../..').IconSource | undefined>;
|
|
14
|
-
|
|
14
|
+
showErrorIcon: NonNullable<boolean | undefined>;
|
|
15
15
|
}>;
|
|
16
16
|
control: import('vue').ComputedRef<string>;
|
|
17
17
|
endBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -428,7 +428,7 @@ export declare function useTextarea(props: TextareaOwnProps, textareaRef: Ref<nu
|
|
|
428
428
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
429
429
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
430
430
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
431
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
431
|
+
}, 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">>>>;
|
|
432
432
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
433
433
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
434
434
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -677,7 +677,7 @@ export declare function useTextarea(props: TextareaOwnProps, textareaRef: Ref<nu
|
|
|
677
677
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
678
678
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
679
679
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
680
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "
|
|
680
|
+
}, 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">>>, {
|
|
681
681
|
rows?: string | number | undefined;
|
|
682
682
|
onInput?: ((event: Event) => void) | undefined;
|
|
683
683
|
}>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { useFormField as r } from "../../FormField/composables/useFormField.js";
|
|
3
3
|
import { computed as i, onMounted as a, useAttrs as o, watch as s } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { adjustAutosizeTextareaHeight as c, cn as l, mergeBridgeUILayeredClasses as u } from "@bridge-ui/core";
|
|
5
|
+
import { get as d, isNil as f, omit as p } from "es-toolkit/compat";
|
|
6
6
|
import { resizeProps as m } from "@bridge-ui/core/Tokens/Textarea";
|
|
7
7
|
//#region src/Components/Textarea/composables/useTextarea.ts
|
|
8
8
|
function h(h, g) {
|
|
@@ -24,8 +24,8 @@ function h(h, g) {
|
|
|
24
24
|
let e = _.rows;
|
|
25
25
|
return S.value ? e ?? 1 : e;
|
|
26
26
|
}), T = r(() => ({
|
|
27
|
-
...
|
|
28
|
-
...
|
|
27
|
+
...p(_, ["rows"]),
|
|
28
|
+
...p(h, [
|
|
29
29
|
"autosize",
|
|
30
30
|
"resize",
|
|
31
31
|
"likeInput",
|
|
@@ -37,18 +37,19 @@ function h(h, g) {
|
|
|
37
37
|
rounded: "md",
|
|
38
38
|
color: "primary",
|
|
39
39
|
variant: "outline",
|
|
40
|
-
|
|
40
|
+
showErrorIcon: !0
|
|
41
41
|
}, {
|
|
42
|
+
componentName: "Textarea",
|
|
42
43
|
control: () => "textarea",
|
|
43
44
|
likeInput: () => S.value
|
|
44
|
-
}), E = i(() => C.value ? "none" : b.value.resize ?? "none"), D = i(() =>
|
|
45
|
-
!e || !C.value ||
|
|
45
|
+
}), E = i(() => C.value ? "none" : b.value.resize ?? "none"), D = i(() => d(u(m, y.value?.tokens?.resize), E.value ?? "none")), O = i(() => _.onInput), k = (e) => {
|
|
46
|
+
!e || !C.value || c(e);
|
|
46
47
|
}, A = (e) => {
|
|
47
48
|
k(e.target), O.value?.(e);
|
|
48
49
|
}, j = i(() => e(T.inputBind.value, {
|
|
49
50
|
...C.value ? { onInput: A } : {},
|
|
50
|
-
...
|
|
51
|
-
},
|
|
51
|
+
...f(w.value) ? {} : { rows: w.value }
|
|
52
|
+
}, l({
|
|
52
53
|
"flex-1 min-w-0": S.value,
|
|
53
54
|
"overflow-hidden": C.value,
|
|
54
55
|
"min-w-0 flex-none": !S.value,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as r, nextTick as i, onBeforeUnmount as a, ref as o, toValue as s, useAttrs as c, useId as l, watch as u } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { LAYER_STACK_BASE_Z_INDEX as d, acquireLayerStackOrder as f, cn as p, createPositionable as m, mergeBridgeUILayeredClasses as h, pushLayerStack as te, splitComponentProps as ne } from "@bridge-ui/core";
|
|
4
|
+
import { get as g, omit as _ } from "es-toolkit/compat";
|
|
5
5
|
import { colorProps as v, roundedProps as y, sizeProps as re } from "@bridge-ui/core/Tokens/Tooltip";
|
|
6
6
|
//#region src/Components/Tooltip/composables/useTooltip.ts
|
|
7
7
|
var b = [
|
|
@@ -21,11 +21,11 @@ var b = [
|
|
|
21
21
|
"customProps"
|
|
22
22
|
];
|
|
23
23
|
function x(x, ie, S = {}) {
|
|
24
|
-
let C = c(), w = l(), T = o(!1), E = o(""), D = o(null), O = o(null), k = o(null), A = null, j = !1, M = null, N = null, P = null, F = null, I = o(
|
|
24
|
+
let C = c(), w = l(), T = o(!1), E = o(""), D = o(null), O = o(null), k = o(null), A = null, j = !1, M = null, N = null, P = null, F = null, I = o(d), L = r(() => s(S.show ?? !1));
|
|
25
25
|
function R(e) {
|
|
26
26
|
S.show && (S.show.value = e), S.onShowChange?.(e);
|
|
27
27
|
}
|
|
28
|
-
let z = r(() =>
|
|
28
|
+
let z = r(() => ne({
|
|
29
29
|
bridgeKeys: b,
|
|
30
30
|
props: {
|
|
31
31
|
...C,
|
|
@@ -38,7 +38,7 @@ function x(x, ie, S = {}) {
|
|
|
38
38
|
}), H = r(() => B.value.customProps), U = n({
|
|
39
39
|
entry: V,
|
|
40
40
|
props: () => z.value.componentProps
|
|
41
|
-
}), W = r(() => B.value.teleportTo !== !1), G = r(() =>
|
|
41
|
+
}), W = r(() => B.value.teleportTo !== !1), G = r(() => g(h(v, V.value?.tokens?.color), B.value.color)), K = r(() => g(h(re, V.value?.tokens?.size), B.value.size)), q = r(() => g(h(y, V.value?.tokens?.rounded), B.value.rounded)), J = r(() => _(z.value.inheritedAttrs, ["anchorEl", "onShowChange"]));
|
|
42
42
|
function Y() {
|
|
43
43
|
P !== null && (clearTimeout(P), P = null), F !== null && (clearTimeout(F), F = null);
|
|
44
44
|
}
|
|
@@ -89,7 +89,7 @@ function x(x, ie, S = {}) {
|
|
|
89
89
|
function de() {
|
|
90
90
|
Q();
|
|
91
91
|
let e = ae(), t = O.value;
|
|
92
|
-
!L.value || !e || !t || (N =
|
|
92
|
+
!L.value || !e || !t || (N = m({
|
|
93
93
|
floating: t,
|
|
94
94
|
reference: e,
|
|
95
95
|
shiftCrossAxis: !1,
|
|
@@ -105,18 +105,18 @@ function x(x, ie, S = {}) {
|
|
|
105
105
|
}));
|
|
106
106
|
}
|
|
107
107
|
function $() {
|
|
108
|
-
M?.release(), M = null, E.value = "", I.value =
|
|
108
|
+
M?.release(), M = null, E.value = "", I.value = d;
|
|
109
109
|
}
|
|
110
110
|
function fe() {
|
|
111
111
|
if ($(), !L.value) {
|
|
112
112
|
A = null;
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
A === null && (A =
|
|
115
|
+
A === null && (A = f());
|
|
116
116
|
function e() {
|
|
117
117
|
L.value && (Y(), R(!1));
|
|
118
118
|
}
|
|
119
|
-
M =
|
|
119
|
+
M = te({
|
|
120
120
|
order: A,
|
|
121
121
|
lockScroll: !1,
|
|
122
122
|
onEscape: e
|
|
@@ -156,9 +156,9 @@ function x(x, ie, S = {}) {
|
|
|
156
156
|
}, { immediate: !0 }), a(() => {
|
|
157
157
|
Y(), Q(), $();
|
|
158
158
|
});
|
|
159
|
-
let ge = r(() => e(H.value?.root, J.value,
|
|
159
|
+
let ge = r(() => e(H.value?.root, J.value, p({
|
|
160
160
|
"relative inline-flex": !0,
|
|
161
|
-
[
|
|
161
|
+
[g(U.value, "root") ?? ""]: !0
|
|
162
162
|
}))), _e = r(() => e(H.value?.trigger, {}, {
|
|
163
163
|
onBlur: le,
|
|
164
164
|
onFocus: ce,
|
|
@@ -166,20 +166,20 @@ function x(x, ie, S = {}) {
|
|
|
166
166
|
onPointerenter: oe,
|
|
167
167
|
onPointerleave: se,
|
|
168
168
|
"aria-describedby": L.value ? w : void 0,
|
|
169
|
-
class:
|
|
169
|
+
class: p({
|
|
170
170
|
"inline-flex w-fit max-w-full outline-hidden": !0,
|
|
171
|
-
[
|
|
171
|
+
[g(U.value, "trigger") ?? ""]: !0
|
|
172
172
|
})
|
|
173
173
|
})), ve = r(() => e(H.value?.content, {}, {
|
|
174
174
|
id: w,
|
|
175
175
|
role: "tooltip",
|
|
176
176
|
style: { zIndex: I.value },
|
|
177
|
-
class:
|
|
177
|
+
class: p({
|
|
178
178
|
"pointer-events-none absolute w-max max-w-xs font-medium shadow-md": !0,
|
|
179
179
|
[G.value?.content ?? ""]: !0,
|
|
180
180
|
[K.value?.content ?? ""]: !0,
|
|
181
181
|
[q.value ?? ""]: !0,
|
|
182
|
-
[
|
|
182
|
+
[g(U.value, "content") ?? ""]: !0
|
|
183
183
|
})
|
|
184
184
|
}));
|
|
185
185
|
return {
|
|
@@ -190,10 +190,10 @@ function x(x, ie, S = {}) {
|
|
|
190
190
|
tooltipId: w,
|
|
191
191
|
arrowBind: r(() => B.value.arrow ? e(H.value?.arrow, {}, {
|
|
192
192
|
"aria-hidden": !0,
|
|
193
|
-
class:
|
|
193
|
+
class: p({
|
|
194
194
|
"pointer-events-none absolute size-2 rotate-45": !0,
|
|
195
195
|
[G.value?.arrow ?? ""]: !0,
|
|
196
|
-
[
|
|
196
|
+
[g(U.value, "arrow") ?? ""]: !0
|
|
197
197
|
})
|
|
198
198
|
}) : null),
|
|
199
199
|
isPortaled: W,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
-
import { BridgeUIComponentsConfig, BridgeUIGlobal } from '@bridge-ui/core';
|
|
2
|
+
import { BridgeUIComponentsConfig, BridgeUIGlobal, Direction } from '@bridge-ui/core';
|
|
3
3
|
export interface BridgeUIContextApi {
|
|
4
4
|
components: ComputedRef<BridgeUIComponentsConfig>;
|
|
5
5
|
global: ComputedRef<BridgeUIGlobal>;
|
|
6
6
|
setComponents: (patch: BridgeUIComponentsConfig) => void;
|
|
7
|
+
setDirection: (direction: Direction) => void;
|
|
7
8
|
setGlobal: (patch: Partial<BridgeUIGlobal>) => void;
|
|
9
|
+
setLocale: (locale: string) => void;
|
|
10
|
+
setTheme: (theme: string) => void;
|
|
8
11
|
}
|
|
@@ -21,6 +21,15 @@ function o(o, s) {
|
|
|
21
21
|
t !== void 0 && (r.icons = t), c.value = r;
|
|
22
22
|
}
|
|
23
23
|
function h(e) {
|
|
24
|
+
m({ theme: e });
|
|
25
|
+
}
|
|
26
|
+
function g(e) {
|
|
27
|
+
m({ locale: e }), d.value.i18n?.setLocale?.(e);
|
|
28
|
+
}
|
|
29
|
+
function _(e) {
|
|
30
|
+
m({ direction: e });
|
|
31
|
+
}
|
|
32
|
+
function v(e) {
|
|
24
33
|
l.value = r({
|
|
25
34
|
partials: [e],
|
|
26
35
|
base: l.value
|
|
@@ -28,9 +37,12 @@ function o(o, s) {
|
|
|
28
37
|
}
|
|
29
38
|
return {
|
|
30
39
|
global: d,
|
|
40
|
+
setTheme: h,
|
|
31
41
|
setGlobal: m,
|
|
42
|
+
setLocale: g,
|
|
32
43
|
components: p,
|
|
33
|
-
|
|
44
|
+
setDirection: _,
|
|
45
|
+
setComponents: v
|
|
34
46
|
};
|
|
35
47
|
}
|
|
36
48
|
//#endregion
|
package/dist/Utils/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { FormFieldSize } from '@bridge-ui/core/Tokens/FormField';
|
|
|
4
4
|
import { IconSize } from '@bridge-ui/core/Tokens/Icon';
|
|
5
5
|
import { useBridgeUI } from '../Provider/useBridgeUI';
|
|
6
6
|
type RegistryEntryFor<K extends keyof BridgeUIComponentsConfig> = NonNullable<BridgeUIComponentsConfig[K]>;
|
|
7
|
-
export type UseBridgeUIComponentReturn<P extends object, K extends keyof BridgeUIComponentsConfig> = {
|
|
7
|
+
export type UseBridgeUIComponentReturn<P extends object, K extends keyof BridgeUIComponentsConfig = keyof BridgeUIComponentsConfig> = {
|
|
8
8
|
bridge: ReturnType<typeof useBridgeUI>;
|
|
9
9
|
components: ComputedRef<null | BridgeUIComponentsConfig>;
|
|
10
10
|
entry: ComputedRef<undefined | RegistryEntryFor<K>>;
|
|
@@ -28,8 +28,8 @@ export declare const mergeNestedComponentProps: <P extends {
|
|
|
28
28
|
/**
|
|
29
29
|
* Registry entry + props merged with Bridge defaults for a named component.
|
|
30
30
|
*/
|
|
31
|
-
export declare function useBridgeUIComponent<P extends object, K extends keyof BridgeUIComponentsConfig>({ props, libDefaults, componentName, }: {
|
|
32
|
-
componentName
|
|
31
|
+
export declare function useBridgeUIComponent<P extends object, K extends keyof BridgeUIComponentsConfig = keyof BridgeUIComponentsConfig>({ props, libDefaults, componentName, }: {
|
|
32
|
+
componentName?: K;
|
|
33
33
|
libDefaults?: Partial<P>;
|
|
34
34
|
props: MaybeRefOrGetter<Partial<P>>;
|
|
35
35
|
}): UseBridgeUIComponentReturn<P, K>;
|
package/dist/Utils/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { hasNamedSlot as t, hasSlotOrProp as n, isPropPresent as r, resolveNamed
|
|
|
3
3
|
import { useBreakpoint as o } from "./useBreakpoint.js";
|
|
4
4
|
import { useHoldRepeat as s } from "./useHoldRepeat.js";
|
|
5
5
|
import { computed as c, defineComponent as l, toValue as u, unref as d } from "vue";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { createMergeNestedComponentProps as f, createMergePartBind as p } from "@bridge-ui/core";
|
|
7
|
+
import { get as m, isNil as h } from "es-toolkit/compat";
|
|
8
8
|
import { mergeBridgeUILayeredClasses as g, mergePropsWithBridgeUIDefaults as _ } from "@bridge-ui/core/Utils";
|
|
9
9
|
//#region src/Utils/index.ts
|
|
10
10
|
function v(e) {
|
|
@@ -15,26 +15,29 @@ function v(e) {
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
var y =
|
|
18
|
+
var y = p("class"), b = f(y);
|
|
19
19
|
function x({ props: t, libDefaults: n, componentName: r }) {
|
|
20
|
-
let i = e(), a = c(() =>
|
|
20
|
+
let i = e(), a = c(() => h(i) ? null : d(i.components));
|
|
21
21
|
return {
|
|
22
|
-
entry: c(() =>
|
|
22
|
+
entry: c(() => {
|
|
23
|
+
if (r) return m(a.value, r);
|
|
24
|
+
}),
|
|
23
25
|
bridge: i,
|
|
24
26
|
merged: c(() => _({
|
|
25
27
|
libDefaults: n,
|
|
26
28
|
componentName: r,
|
|
27
29
|
props: u(t),
|
|
28
|
-
components: a.value
|
|
30
|
+
components: a.value,
|
|
31
|
+
formDefaults: i?.global.value.formDefaults
|
|
29
32
|
})),
|
|
30
33
|
components: a
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
function S({ entry: e, props: t }) {
|
|
34
|
-
return c(() => g(
|
|
37
|
+
return c(() => g(m(e.value, "classes"), u(t).classes));
|
|
35
38
|
}
|
|
36
39
|
function C(e) {
|
|
37
|
-
return
|
|
40
|
+
return m({
|
|
38
41
|
xs: "xs",
|
|
39
42
|
sm: "sm",
|
|
40
43
|
md: "md",
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { useBridgeUI as e } from "../Provider/useBridgeUI.js";
|
|
2
2
|
import { onBeforeUnmount as t, reactive as n, toValue as r, watch as i } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { buildBreakpointSnapshot as a, createBreakpointObserver as o, resolveBreakpoints as s } from "@bridge-ui/core";
|
|
4
|
+
import { isEmpty as c, isNil as l } from "es-toolkit/compat";
|
|
5
5
|
import { toMerged as u } from "es-toolkit/object";
|
|
6
6
|
//#region src/Utils/useBreakpoint.ts
|
|
7
7
|
function d(d) {
|
|
8
|
-
let f = e(), p = n(
|
|
8
|
+
let f = e(), p = n(a(0, 0, s(), "sm")), m, h;
|
|
9
9
|
function g(e) {
|
|
10
10
|
Object.assign(p, e);
|
|
11
11
|
}
|
|
12
12
|
function _(e) {
|
|
13
13
|
let t = u(f?.global.value.breakpoints ?? {}, e?.breakpoints ?? {});
|
|
14
14
|
return {
|
|
15
|
-
breakpoints:
|
|
16
|
-
mobileBreakpoint:
|
|
15
|
+
breakpoints: c(t) ? void 0 : t,
|
|
16
|
+
mobileBreakpoint: l(e?.mobileBreakpoint) ? f?.global.value.mobileBreakpoint : e.mobileBreakpoint
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
function v(e) {
|
|
20
|
-
h?.(), h = void 0, m =
|
|
21
|
-
|
|
20
|
+
h?.(), h = void 0, m = o(_(e)), g(m.getSnapshot()), h = m.subscribe(() => {
|
|
21
|
+
l(m) || g(m.getSnapshot());
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
return v(r(d)), i(() => [
|