@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,10 +1,10 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { snackbarDefaultIcons as ee } from "../snackbarDefaultIcons.js";
|
|
3
3
|
import { computed as r, nextTick as te, onBeforeUnmount as i, ref as a, toValue as ne, useAttrs as re, watch as o } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { LAYER_STACK_BASE_Z_INDEX as s, acquireLayerStackOrder as ie, cn as c, getLayerStackEntry as l, getSnackbarTransitionClass as u, hasSnackbarTransition as d, mergeBridgeUILayeredClasses as f, pushLayerStack as ae, snackbarColorProps as oe, snackbarPaddingProps as se, snackbarPositionProps as ce, snackbarRoundedProps as le, snackbarTransitionProps as ue, splitComponentProps as de, subscribeLayerStack as fe } from "@bridge-ui/core";
|
|
5
|
+
import { get as p, isNil as pe, isNull as me, isObject as he, omit as ge } from "es-toolkit/compat";
|
|
6
6
|
//#region src/Components/Snackbar/composables/useSnackbar.ts
|
|
7
|
-
var
|
|
7
|
+
var _e = [
|
|
8
8
|
"img",
|
|
9
9
|
"icon",
|
|
10
10
|
"color",
|
|
@@ -22,189 +22,189 @@ var ge = [
|
|
|
22
22
|
"description",
|
|
23
23
|
"progressbar"
|
|
24
24
|
];
|
|
25
|
-
function
|
|
26
|
-
let
|
|
25
|
+
function m(m, h, g = {}) {
|
|
26
|
+
let ve = re(), _ = a(!1), v = a(""), y = a(1), b = a(0), x = a(!1), S = a(!1), C = a(0), w = a(!1), T = a(0), E = a(s), D = a("closed"), O = a(null), k = null, A = null, j = null, M = r(() => de({
|
|
27
27
|
props: {
|
|
28
|
-
...
|
|
29
|
-
...
|
|
28
|
+
...ve,
|
|
29
|
+
...m
|
|
30
30
|
},
|
|
31
|
-
bridgeKeys:
|
|
32
|
-
})), { merged:
|
|
33
|
-
libDefaults:
|
|
31
|
+
bridgeKeys: _e
|
|
32
|
+
})), { merged: N, entry: P } = t({
|
|
33
|
+
libDefaults: h,
|
|
34
34
|
componentName: "Snackbar",
|
|
35
|
-
props: () =>
|
|
36
|
-
}),
|
|
37
|
-
entry:
|
|
38
|
-
props: () =>
|
|
39
|
-
}),
|
|
40
|
-
let e =
|
|
41
|
-
return e in
|
|
42
|
-
}),
|
|
43
|
-
function
|
|
44
|
-
|
|
35
|
+
props: () => M.value.componentProps
|
|
36
|
+
}), F = r(() => N.value.customProps), I = r(() => ge(M.value.inheritedAttrs, ["onShowChange"])), L = n({
|
|
37
|
+
entry: P,
|
|
38
|
+
props: () => M.value.componentProps
|
|
39
|
+
}), R = r(() => pe(g.show) ? !1 : ne(g.show)), z = r(() => {
|
|
40
|
+
let e = N.value.transition ?? "none";
|
|
41
|
+
return e in ue ? e : "none";
|
|
42
|
+
}), B = r(() => d(z.value)), ye = r(() => u(z.value)), V = r(() => p(f(oe, P.value?.tokens?.color), N.value.color)), H = r(() => p(f(se, P.value?.tokens?.padding), N.value.padding)), be = r(() => p(f(le, P.value?.tokens?.rounded), N.value.rounded)), xe = r(() => me(N.value.icon) ? null : N.value.icon ? N.value.icon : p(V.value, "icon") ?? p(ee, N.value.color)), U = r(() => N.value.duration === !1 ? 0 : N.value.duration ?? 0), W = r(() => R.value && _.value && U.value > 0 && N.value.progressbar !== !1), G = r(() => N.value.teleportTo !== !1), Se = r(() => G.value ? p(f(ce, P.value?.tokens?.position), N.value.position ?? "bottom-center") : "");
|
|
43
|
+
function K() {
|
|
44
|
+
O.value &&= (clearTimeout(O.value), null);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
e || g.onClose?.(),
|
|
46
|
+
function q(e) {
|
|
47
|
+
e || g.onClose?.(), he(g.show) && "value" in g.show && (g.show.value = e), g.onShowChange?.(e);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
49
|
+
function J() {
|
|
50
|
+
S.value && (S.value = !1, D.value = "closed", K(), R.value ? q(!1) : g.onLeaveComplete?.(), _.value = !1);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
if (
|
|
54
|
-
|
|
52
|
+
function Y() {
|
|
53
|
+
if (K(), S.value = !0, !B.value) {
|
|
54
|
+
J();
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
D.value = "closed";
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
if (
|
|
61
|
-
|
|
59
|
+
function Ce() {
|
|
60
|
+
if (S.value = !1, !B.value) {
|
|
61
|
+
D.value = "open";
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
D.value = "closed", te(() => {
|
|
65
65
|
requestAnimationFrame(() => {
|
|
66
|
-
|
|
66
|
+
D.value = "open";
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
if (!
|
|
72
|
-
|
|
70
|
+
function X() {
|
|
71
|
+
if (!B.value) {
|
|
72
|
+
q(!1);
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
_.value && Y();
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
function Z(e) {
|
|
78
|
+
K(), b.value = e, C.value = Date.now(), T.value = e, O.value = setTimeout(() => {
|
|
79
|
+
X();
|
|
80
80
|
}, e);
|
|
81
81
|
}
|
|
82
|
-
function Ce() {
|
|
83
|
-
!k.value || W.value <= 0 || (q(), x.value -= Date.now() - w.value, b.value = Math.max(x.value / W.value, 0), T.value = !1, S.value = !0);
|
|
84
|
-
}
|
|
85
82
|
function we() {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
!O.value || U.value <= 0 || (K(), b.value -= Date.now() - C.value, y.value = Math.max(b.value / U.value, 0), w.value = !1, x.value = !0);
|
|
84
|
+
}
|
|
85
|
+
function Te() {
|
|
86
|
+
if (U.value <= 0 || !x.value) return;
|
|
87
|
+
let e = Math.max(b.value, 0);
|
|
88
|
+
x.value = !1, w.value = !1, requestAnimationFrame(() => {
|
|
89
|
+
w.value = !0;
|
|
90
|
+
}), Z(e);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
!
|
|
92
|
+
function Ee(e) {
|
|
93
|
+
!_.value || D.value !== "closed" || e.target === e.currentTarget && (e.propertyName === "none" || e.elapsedTime === 0 || J());
|
|
94
94
|
}
|
|
95
|
-
o(
|
|
95
|
+
o(R, (e) => {
|
|
96
96
|
if (e) {
|
|
97
|
-
|
|
97
|
+
_.value = !0, Ce();
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
_.value && Y();
|
|
101
101
|
}, { immediate: !0 }), o([
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
R,
|
|
103
|
+
_,
|
|
104
|
+
U
|
|
105
105
|
], ([e, t, n]) => {
|
|
106
106
|
if (!e || !t || n <= 0) {
|
|
107
|
-
|
|
107
|
+
K();
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
}, { immediate: !0 }), o([
|
|
110
|
+
x.value = !1, Z(n);
|
|
111
|
+
}, { immediate: !0 }), o([U, W], ([e]) => {
|
|
112
112
|
if (!e) {
|
|
113
|
-
|
|
113
|
+
w.value = !1, y.value = 1;
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
w.value = !1, y.value = 1;
|
|
117
117
|
let t = requestAnimationFrame(() => {
|
|
118
|
-
|
|
118
|
+
w.value = !0;
|
|
119
119
|
});
|
|
120
120
|
return () => {
|
|
121
121
|
cancelAnimationFrame(t);
|
|
122
122
|
};
|
|
123
123
|
}, { immediate: !0 });
|
|
124
|
-
function
|
|
125
|
-
let e =
|
|
126
|
-
e && (
|
|
124
|
+
function Q() {
|
|
125
|
+
let e = l(v.value);
|
|
126
|
+
e && (E.value = e.zIndex);
|
|
127
127
|
}
|
|
128
|
-
o([
|
|
129
|
-
t && (e ? (
|
|
130
|
-
order:
|
|
128
|
+
o([_, G], ([e, t]) => {
|
|
129
|
+
t && (e ? (k = ie(), A = ae({
|
|
130
|
+
order: k,
|
|
131
131
|
lockScroll: !1,
|
|
132
132
|
id: g.stackId,
|
|
133
133
|
onEscape: () => {
|
|
134
|
-
|
|
134
|
+
X();
|
|
135
135
|
}
|
|
136
|
-
}),
|
|
136
|
+
}), v.value = A.id, E.value = A.zIndex, Q(), j = fe(Q)) : (j?.(), j = null, A?.release(), A = null, k = null, v.value = "", E.value = s));
|
|
137
137
|
}, { immediate: !0 }), i(() => {
|
|
138
|
-
|
|
138
|
+
K(), j?.(), j = null, A?.release(), A = null;
|
|
139
139
|
});
|
|
140
|
-
let
|
|
140
|
+
let $ = r(() => e(F.value?.portal, {
|
|
141
141
|
"data-snackbar-layer": !0,
|
|
142
|
-
style: { zIndex:
|
|
143
|
-
},
|
|
142
|
+
style: { zIndex: E.value }
|
|
143
|
+
}, c({
|
|
144
144
|
"fixed inset-0 flex pointer-events-none px-4 py-6 sm:p-5 sm:pt-4": !0,
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
}))), De = r(() => e(
|
|
148
|
-
...
|
|
145
|
+
[Se.value ?? ""]: !0,
|
|
146
|
+
[p(L.value, "portal") ?? ""]: !0
|
|
147
|
+
}))), De = r(() => e(F.value?.root, {
|
|
148
|
+
...I.value,
|
|
149
149
|
"data-snackbar-part": "panel",
|
|
150
|
-
onMouseenter:
|
|
151
|
-
onMouseleave:
|
|
152
|
-
"data-state":
|
|
153
|
-
onTransitionend:
|
|
154
|
-
role:
|
|
155
|
-
"aria-live":
|
|
156
|
-
},
|
|
150
|
+
onMouseenter: we,
|
|
151
|
+
onMouseleave: Te,
|
|
152
|
+
"data-state": D.value,
|
|
153
|
+
onTransitionend: Ee,
|
|
154
|
+
role: I.value.role ?? "status",
|
|
155
|
+
"aria-live": I.value["aria-live"] ?? "polite"
|
|
156
|
+
}, c({
|
|
157
157
|
"relative w-full max-w-sm overflow-hidden pointer-events-auto": !0,
|
|
158
158
|
"bg-white shadow-lg ring-1 ring-black/5": !0,
|
|
159
159
|
"dark:bg-dark-800 dark:border dark:border-dark-700": !0,
|
|
160
|
-
[
|
|
161
|
-
[
|
|
162
|
-
[
|
|
163
|
-
}))), Oe = r(() => e(
|
|
160
|
+
[p(be.value, "base") ?? ""]: !0,
|
|
161
|
+
[ye.value]: B.value,
|
|
162
|
+
[p(L.value, "root") ?? ""]: !0
|
|
163
|
+
}))), Oe = r(() => e(F.value?.icon, {}, c({
|
|
164
164
|
"w-6 h-6 shrink-0": !0,
|
|
165
|
-
[
|
|
166
|
-
[
|
|
167
|
-
}))), ke = r(() => e(
|
|
165
|
+
[p(V.value, "iconColor") ?? ""]: !0,
|
|
166
|
+
[p(L.value, "icon") ?? ""]: !0
|
|
167
|
+
}))), ke = r(() => e(F.value?.title, {}, c({
|
|
168
168
|
"text-sm font-medium": !0,
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
}))), Ae = r(() => e(
|
|
169
|
+
[p(V.value, "titleColor") ?? ""]: !0,
|
|
170
|
+
[p(L.value, "title") ?? ""]: !0
|
|
171
|
+
}))), Ae = r(() => e(F.value?.description, {}, c({
|
|
172
172
|
"mt-1 text-sm text-dark-500 dark:text-dark-500": !0,
|
|
173
|
-
[
|
|
174
|
-
}))), je = r(() => e(
|
|
175
|
-
class:
|
|
173
|
+
[p(L.value, "description") ?? ""]: !0
|
|
174
|
+
}))), je = r(() => e(F.value?.progress, {}, {
|
|
175
|
+
class: c({
|
|
176
176
|
"absolute bottom-0 left-0 h-0.5 w-full rounded-full": !0,
|
|
177
|
-
[
|
|
178
|
-
[
|
|
177
|
+
[p(V.value, "progressColor") ?? ""]: !0,
|
|
178
|
+
[p(L.value, "progress") ?? ""]: !0
|
|
179
179
|
}),
|
|
180
|
-
style:
|
|
180
|
+
style: W.value ? {
|
|
181
181
|
transformOrigin: "left center",
|
|
182
|
-
transform: `scaleX(${
|
|
183
|
-
transition:
|
|
182
|
+
transform: `scaleX(${w.value && !x.value ? 0 : y.value})`,
|
|
183
|
+
transition: w.value && !x.value ? `transform ${T.value}ms linear` : "none"
|
|
184
184
|
} : void 0
|
|
185
185
|
}));
|
|
186
186
|
function Me(t) {
|
|
187
|
-
return e(
|
|
188
|
-
[
|
|
189
|
-
[
|
|
190
|
-
[
|
|
187
|
+
return e(F.value?.content, {}, c({
|
|
188
|
+
[p(H.value, "contentRight") ?? ""]: t,
|
|
189
|
+
[p(H.value, "content") ?? ""]: !t,
|
|
190
|
+
[p(L.value, "content") ?? ""]: !0
|
|
191
191
|
}));
|
|
192
192
|
}
|
|
193
193
|
return {
|
|
194
|
-
merged:
|
|
194
|
+
merged: N,
|
|
195
195
|
iconBind: Oe,
|
|
196
|
-
rendered:
|
|
196
|
+
rendered: _,
|
|
197
197
|
panelBind: De,
|
|
198
198
|
titleBind: ke,
|
|
199
|
-
isPortaled:
|
|
200
|
-
portalBind:
|
|
199
|
+
isPortaled: G,
|
|
200
|
+
portalBind: $,
|
|
201
201
|
contentBind: Me,
|
|
202
|
-
showProgress:
|
|
202
|
+
showProgress: W,
|
|
203
203
|
progressBind: je,
|
|
204
|
-
requestClose:
|
|
205
|
-
resolvedIcon:
|
|
204
|
+
requestClose: X,
|
|
205
|
+
resolvedIcon: xe,
|
|
206
206
|
descriptionBind: Ae
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
//#endregion
|
|
210
|
-
export {
|
|
210
|
+
export { m as useSnackbar };
|
|
@@ -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 { DEFAULT_SPINNER_THICKNESS as a, SPINNER_VIEWBOX_SIZE as o, cn as s, getSpinnerCircleGeometry as c, mergeBridgeUILayeredClasses as l, splitComponentProps as u } from "@bridge-ui/core";
|
|
4
|
+
import { get as d, isNil as f } from "es-toolkit/compat";
|
|
5
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 = [
|
|
@@ -16,13 +16,13 @@ var g = [
|
|
|
16
16
|
"disableShrink"
|
|
17
17
|
];
|
|
18
18
|
function _(e) {
|
|
19
|
-
return
|
|
19
|
+
return f(e) || Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e));
|
|
20
20
|
}
|
|
21
|
-
function v(
|
|
22
|
-
let y = i(), b = r(() =>
|
|
21
|
+
function v(f, v) {
|
|
22
|
+
let y = i(), b = r(() => u({
|
|
23
23
|
props: {
|
|
24
24
|
...y,
|
|
25
|
-
...
|
|
25
|
+
...f
|
|
26
26
|
},
|
|
27
27
|
bridgeKeys: g
|
|
28
28
|
})), { merged: x, entry: S } = t({
|
|
@@ -32,14 +32,14 @@ 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(() =>
|
|
35
|
+
}), w = r(() => x.value.customProps), T = r(() => d(l(p, S.value?.tokens?.color), x.value.color)), E = r(() => d(l(m, S.value?.tokens?.size), x.value.size)), D = r(() => d(l(h, S.value?.tokens?.variant), x.value.variant)), O = r(() => x.value.thickness ?? a), k = r(() => c(O.value)), A = o / 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,
|
|
39
39
|
"aria-valuemax": 100,
|
|
40
40
|
"aria-valuenow": j.value
|
|
41
41
|
} : {},
|
|
42
|
-
class:
|
|
42
|
+
class: s({
|
|
43
43
|
"inline-block": !0,
|
|
44
44
|
[E.value ?? ""]: !0,
|
|
45
45
|
[D.value ?? ""]: F.value,
|
|
@@ -48,7 +48,7 @@ function v(o, v) {
|
|
|
48
48
|
}));
|
|
49
49
|
return {
|
|
50
50
|
merged: x,
|
|
51
|
-
svgBind: r(() => e(w.value?.svg, { viewBox: `0 0 ${
|
|
51
|
+
svgBind: r(() => e(w.value?.svg, { viewBox: `0 0 ${o} ${o}` }, s({
|
|
52
52
|
"block size-full": !0,
|
|
53
53
|
[C.value.svg ?? ""]: !0
|
|
54
54
|
}))),
|
|
@@ -59,7 +59,7 @@ function v(o, v) {
|
|
|
59
59
|
fill: "none",
|
|
60
60
|
r: k.value.radius,
|
|
61
61
|
"stroke-width": O.value
|
|
62
|
-
},
|
|
62
|
+
}, s({
|
|
63
63
|
[T.value?.track ?? ""]: !0,
|
|
64
64
|
[C.value.track ?? ""]: !0
|
|
65
65
|
})) : null),
|
|
@@ -84,7 +84,7 @@ function v(o, v) {
|
|
|
84
84
|
...r,
|
|
85
85
|
...i
|
|
86
86
|
}
|
|
87
|
-
},
|
|
87
|
+
}, s({
|
|
88
88
|
[T.value?.circle ?? ""]: !0,
|
|
89
89
|
"animate-bridge-spinner-dash": F.value && !N.value,
|
|
90
90
|
[C.value.circle ?? ""]: !0
|
|
@@ -19,10 +19,10 @@ var g = ["checked"], _ = /* @__PURE__ */ a({
|
|
|
19
19
|
endLabel: {},
|
|
20
20
|
error: { type: Boolean },
|
|
21
21
|
errorMessage: {},
|
|
22
|
+
hideErrorMessage: { type: Boolean },
|
|
22
23
|
readonly: { type: Boolean },
|
|
23
24
|
required: { type: Boolean },
|
|
24
|
-
startLabel: {}
|
|
25
|
-
withoutErrorMessage: { type: Boolean }
|
|
25
|
+
startLabel: {}
|
|
26
26
|
}, {
|
|
27
27
|
modelValue: {
|
|
28
28
|
type: Boolean,
|
|
@@ -237,13 +237,13 @@ export declare function useSwitch(props: MaybeRefOrGetter<SwitchOwnProps>, libDe
|
|
|
237
237
|
slots: Readonly<{
|
|
238
238
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
239
239
|
}>;
|
|
240
|
-
merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "error" | "size" | "
|
|
240
|
+
merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "error" | "size" | "hideErrorMessage"> & {
|
|
241
241
|
error: NonNullable<boolean | undefined>;
|
|
242
242
|
size: NonNullable<keyof import('@bridge-ui/core').LabelSize | undefined>;
|
|
243
|
-
|
|
243
|
+
hideErrorMessage: 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">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "
|
|
246
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "description" | "errorMessage" | "controlId" | "hideErrorMessage" | "readonly" | "endLabel" | "startLabel">>>>;
|
|
247
247
|
controlId: import('vue').ComputedRef<string>;
|
|
248
248
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
249
249
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -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, toValue as a, useAttrs as o } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as s, mergeBridgeUILayeredClasses as c, splitComponentProps as l } from "@bridge-ui/core";
|
|
5
|
+
import { get as u, omit as d } from "es-toolkit/compat";
|
|
6
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 = [
|
|
@@ -19,9 +19,9 @@ function _(_, v, y) {
|
|
|
19
19
|
...a(_)
|
|
20
20
|
}), {
|
|
21
21
|
error: !1,
|
|
22
|
-
|
|
22
|
+
hideErrorMessage: !1,
|
|
23
23
|
size: v.size ?? "sm"
|
|
24
|
-
}), S = i(() =>
|
|
24
|
+
}, { componentName: "Switch" }), S = i(() => l({
|
|
25
25
|
bridgeKeys: g,
|
|
26
26
|
props: {
|
|
27
27
|
...b,
|
|
@@ -34,22 +34,22 @@ function _(_, v, y) {
|
|
|
34
34
|
}), T = i(() => C.value.customProps), E = n({
|
|
35
35
|
entry: w,
|
|
36
36
|
props: () => S.value.componentProps
|
|
37
|
-
}), D = i(() => !!a(y)), O = i(() =>
|
|
37
|
+
}), D = i(() => !!a(y)), O = i(() => u(c(f, w.value?.tokens?.color), C.value.color ?? "primary")), k = i(() => c(p, w.value?.tokens?.invalidated)), A = i(() => x.invalidated.value ? k.value : O.value), j = i(() => u(c(h, w.value?.tokens?.size), C.value.size ?? "sm")), M = i(() => u(c(m, w.value?.tokens?.rounded), C.value.rounded ?? "full")), N = i(() => e({
|
|
38
38
|
...T.value?.input,
|
|
39
39
|
...x.controlBind.value,
|
|
40
40
|
role: "switch",
|
|
41
41
|
type: "checkbox"
|
|
42
|
-
},
|
|
42
|
+
}, d(S.value.inheritedAttrs, ["class"]), s({
|
|
43
43
|
"sr-only": !0,
|
|
44
44
|
[E.value.input ?? ""]: !0
|
|
45
|
-
}))), P = i(() => e(T.value?.track, { "aria-hidden": !0 },
|
|
45
|
+
}))), P = i(() => e(T.value?.track, { "aria-hidden": !0 }, s({
|
|
46
46
|
"block cursor-pointer transition ease-in-out duration-100": !0,
|
|
47
47
|
[j.value?.track ?? ""]: !0,
|
|
48
48
|
[M.value ?? ""]: !0,
|
|
49
49
|
[A.value?.track ?? ""]: !D.value,
|
|
50
50
|
[A.value?.trackChecked ?? ""]: D.value,
|
|
51
51
|
[E.value.track ?? ""]: !0
|
|
52
|
-
}))), F = i(() => e(T.value?.thumb, { "aria-hidden": !0 },
|
|
52
|
+
}))), F = i(() => e(T.value?.thumb, { "aria-hidden": !0 }, s({
|
|
53
53
|
"pointer-events-none absolute start-0.5 top-1/2 -translate-y-1/2 rounded-full shadow-sm transition ease-in-out duration-200": !0,
|
|
54
54
|
[j.value?.thumb ?? ""]: !0,
|
|
55
55
|
[j.value?.thumbCheckedTranslate ?? ""]: D.value,
|
|
@@ -57,7 +57,7 @@ function _(_, v, y) {
|
|
|
57
57
|
[E.value.thumb ?? ""]: !0
|
|
58
58
|
})));
|
|
59
59
|
return {
|
|
60
|
-
fieldBind: i(() => e({}, {},
|
|
60
|
+
fieldBind: i(() => e({}, {}, s({
|
|
61
61
|
"relative inline-flex shrink-0 select-none": !0,
|
|
62
62
|
"has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2": !0,
|
|
63
63
|
[M.value ?? ""]: !0,
|
|
@@ -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 "../../Tabs/tabsInjectionKey.js";
|
|
3
3
|
import { computed as i, inject as a, onBeforeUnmount as o, onMounted as s, useAttrs as c, watch as l } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as u, getTabId as d, getTabPanelId as f, splitComponentProps as p } from "@bridge-ui/core";
|
|
5
|
+
import { get as m } from "es-toolkit/compat";
|
|
6
6
|
//#region src/Components/Tab/composables/useTab.ts
|
|
7
7
|
var h = [
|
|
8
8
|
"value",
|
|
@@ -15,7 +15,7 @@ var h = [
|
|
|
15
15
|
function g(g) {
|
|
16
16
|
let _ = c(), v = a(r, null);
|
|
17
17
|
if (!v) throw Error("Tab must be used within a Tabs provider");
|
|
18
|
-
let y = v, b = i(() =>
|
|
18
|
+
let y = v, b = i(() => p({
|
|
19
19
|
bridgeKeys: h,
|
|
20
20
|
props: {
|
|
21
21
|
..._,
|
|
@@ -56,9 +56,9 @@ function g(g) {
|
|
|
56
56
|
onKeydown: A,
|
|
57
57
|
"aria-selected": T.value,
|
|
58
58
|
tabindex: T.value ? 0 : -1,
|
|
59
|
-
id:
|
|
60
|
-
"aria-controls":
|
|
61
|
-
class:
|
|
59
|
+
id: d(t.id, C.value),
|
|
60
|
+
"aria-controls": f(t.id, C.value),
|
|
61
|
+
class: u({
|
|
62
62
|
"inline-flex cursor-pointer items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40 disabled:pointer-events-none disabled:opacity-50": !0,
|
|
63
63
|
[t.tokenClasses.iconGap ?? ""]: !0,
|
|
64
64
|
[t.tokenClasses.tabSize ?? ""]: !0,
|
|
@@ -67,19 +67,19 @@ function g(g) {
|
|
|
67
67
|
[t.tokenClasses.tabVariantSelected ?? ""]: T.value,
|
|
68
68
|
[t.tokenClasses.colorSelected ?? ""]: T.value,
|
|
69
69
|
[t.tokenClasses.colorSelectedSoft ?? ""]: T.value && t.tokenClasses.softFill === !0,
|
|
70
|
-
[
|
|
70
|
+
[m(O.value, "root") ?? ""]: !0
|
|
71
71
|
})
|
|
72
72
|
});
|
|
73
73
|
}),
|
|
74
74
|
selected: T,
|
|
75
|
-
endIconBind: i(() => e(j.value?.endIcon, {},
|
|
75
|
+
endIconBind: i(() => e(j.value?.endIcon, {}, u({
|
|
76
76
|
"shrink-0": !0,
|
|
77
|
-
[
|
|
77
|
+
[m(O.value, "endIcon") ?? ""]: !0
|
|
78
78
|
}))),
|
|
79
79
|
endSlotBind: i(() => e(j.value?.end, {}, "inline-flex shrink-0 items-center")),
|
|
80
|
-
startIconBind: i(() => e(j.value?.startIcon, {},
|
|
80
|
+
startIconBind: i(() => e(j.value?.startIcon, {}, u({
|
|
81
81
|
"shrink-0": !0,
|
|
82
|
-
[
|
|
82
|
+
[m(O.value, "startIcon") ?? ""]: !0
|
|
83
83
|
}))),
|
|
84
84
|
startSlotBind: i(() => e(j.value?.start, {}, "inline-flex shrink-0 items-center"))
|
|
85
85
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
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 "../../Tabs/tabsInjectionKey.js";
|
|
3
3
|
import { computed as i, inject as a, useAttrs as o } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as s, getAdjacentTabValue as c, getTabId as l, splitComponentProps as u } from "@bridge-ui/core";
|
|
5
|
+
import { get as d } from "es-toolkit/compat";
|
|
6
6
|
//#region src/Components/TabList/composables/useTabList.ts
|
|
7
7
|
var f = ["classes", "customProps"];
|
|
8
8
|
function p(p) {
|
|
9
9
|
let m = o(), h = a(r, null);
|
|
10
10
|
if (!h) throw Error("TabList must be used within a Tabs provider");
|
|
11
|
-
let g = h, _ = i(() =>
|
|
11
|
+
let g = h, _ = i(() => u({
|
|
12
12
|
bridgeKeys: f,
|
|
13
13
|
props: {
|
|
14
14
|
...m,
|
|
@@ -22,10 +22,10 @@ function p(p) {
|
|
|
22
22
|
props: () => _.value.componentProps
|
|
23
23
|
});
|
|
24
24
|
function x(e) {
|
|
25
|
-
let t = g.value, n = t.orientation === "horizontal", r = n ? "ArrowRight" : "ArrowDown", i = n ? "ArrowLeft" : "ArrowUp", a = typeof document < "u" ? document.activeElement?.id : void 0, o = t.tabValues.find((e) =>
|
|
25
|
+
let t = g.value, n = t.orientation === "horizontal", r = n ? "ArrowRight" : "ArrowDown", i = n ? "ArrowLeft" : "ArrowUp", a = typeof document < "u" ? document.activeElement?.id : void 0, o = t.tabValues.find((e) => l(t.id, e) === a) ?? t.selected;
|
|
26
26
|
if (e.key === r || e.key === i) {
|
|
27
27
|
e.preventDefault();
|
|
28
|
-
let n = e.key === r ? 1 : -1, i =
|
|
28
|
+
let n = e.key === r ? 1 : -1, i = c(t.tabValues, o, n, new Set(t.disabledValues));
|
|
29
29
|
t.focusTab(i), t.activation === "automatic" && t.setSelected(i);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
@@ -50,12 +50,12 @@ function p(p) {
|
|
|
50
50
|
role: "tablist",
|
|
51
51
|
onKeydown: x,
|
|
52
52
|
"aria-orientation": t.orientation,
|
|
53
|
-
class:
|
|
53
|
+
class: s({
|
|
54
54
|
flex: !0,
|
|
55
55
|
[t.tokenClasses.listOrientation ?? ""]: !0,
|
|
56
56
|
[t.tokenClasses.listSize ?? ""]: !0,
|
|
57
57
|
[t.tokenClasses.listVariant ?? ""]: !0,
|
|
58
|
-
[
|
|
58
|
+
[d(b.value, "root") ?? ""]: !0
|
|
59
59
|
})
|
|
60
60
|
});
|
|
61
61
|
})
|
|
@@ -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 "../../Tabs/tabsInjectionKey.js";
|
|
3
3
|
import { computed as i, getCurrentInstance as a, inject as o, useAttrs as s } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as c, getTabId as l, getTabPanelId as u, splitComponentProps as d } from "@bridge-ui/core";
|
|
5
|
+
import { get as f } from "es-toolkit/compat";
|
|
6
6
|
//#region src/Components/TabPanel/composables/useTabPanel.ts
|
|
7
7
|
var p = [
|
|
8
8
|
"value",
|
|
@@ -13,7 +13,7 @@ var p = [
|
|
|
13
13
|
function m(m) {
|
|
14
14
|
let h = s(), g = o(r, null);
|
|
15
15
|
if (!g) throw Error("TabPanel must be used within a Tabs provider");
|
|
16
|
-
let _ = g, v = i(() =>
|
|
16
|
+
let _ = g, v = i(() => d({
|
|
17
17
|
props: {
|
|
18
18
|
...h,
|
|
19
19
|
...m
|
|
@@ -34,12 +34,12 @@ function m(m) {
|
|
|
34
34
|
role: "tabpanel",
|
|
35
35
|
hidden: !S.value,
|
|
36
36
|
tabindex: S.value ? 0 : -1,
|
|
37
|
-
id:
|
|
38
|
-
"aria-labelledby":
|
|
39
|
-
class:
|
|
37
|
+
id: u(t.id, x.value),
|
|
38
|
+
"aria-labelledby": l(t.id, x.value),
|
|
39
|
+
class: c({
|
|
40
40
|
[t.tokenClasses.panelSize ?? ""]: !0,
|
|
41
41
|
[t.tokenClasses.panelOrientation ?? ""]: !0,
|
|
42
|
-
[
|
|
42
|
+
[f(w.value, "root") ?? ""]: !0
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
}),
|
|
@@ -6,11 +6,11 @@ type __VLS_ModelProps = {
|
|
|
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": (...args: unknown[]) => any;
|
|
10
9
|
change: (value: string) => any;
|
|
10
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
13
12
|
onChange?: ((value: string) => any) | undefined;
|
|
13
|
+
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
keepMounted: boolean;
|
|
16
16
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|