@bridge-ui/vue 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/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 -0
- package/dist/Adapters/I18n/index.js +2 -0
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +16 -0
- package/dist/Adapters/I18n/useI18nAdapter.js +18 -0
- package/dist/Adapters/Icon/iconSource.types.d.ts +11 -0
- package/dist/Adapters/Icon/index.d.ts +2 -0
- package/dist/Adapters/Icon/index.js +2 -0
- package/dist/Adapters/Icon/useIconAdapter.d.ts +11 -0
- package/dist/Adapters/Icon/useIconAdapter.js +13 -0
- package/dist/Adapters/index.d.ts +3 -0
- package/dist/Adapters/index.js +3 -0
- package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +1 -5
- package/dist/Components/Alert/alert.types.d.ts +2 -2
- package/dist/Components/Alert/alertDefaultIcons.d.ts +2 -2
- package/dist/Components/Alert/alertDefaultIcons.js +9 -10
- package/dist/Components/Alert/composables/useAlert.d.ts +2 -2
- 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 +762 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +382 -0
- package/dist/Components/Autocomplete/index.d.ts +4 -0
- package/dist/Components/Autocomplete/index.js +4 -0
- package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Avatar/avatar.types.d.ts +2 -2
- package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
- package/dist/Components/Avatar/composables/useAvatar.js +46 -47
- package/dist/Components/Badge/composables/useBadge.js +8 -8
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +24 -25
- package/dist/Components/Button/button.types.d.ts +4 -4
- 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 +27 -27
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +4 -4
- package/dist/Components/Checkbox/composables/useCheckbox.js +9 -9
- package/dist/Components/Chip/Chip.vue_vue_type_script_setup_true_lang.js +8 -9
- package/dist/Components/Chip/composables/useChip.js +6 -6
- package/dist/Components/Divider/composables/useDivider.js +5 -5
- 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 +3 -3
- package/dist/Components/FormControl/composables/useFormControl.js +12 -12
- package/dist/Components/FormControl/formControl.types.d.ts +6 -6
- 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 +6 -6
- package/dist/Components/FormField/composables/useFormField.js +108 -109
- package/dist/Components/FormField/formField.types.d.ts +19 -19
- package/dist/Components/Icon/Icon.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/Components/Icon/composables/useIcon.d.ts +2 -0
- package/dist/Components/Icon/composables/useIcon.js +20 -18
- package/dist/Components/Icon/icon.types.d.ts +3 -3
- package/dist/Components/Label/composables/useLabel.d.ts +1 -1
- package/dist/Components/Label/composables/useLabel.js +5 -5
- package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Link/composables/useLink.js +9 -9
- package/dist/Components/Link/link.types.d.ts +3 -3
- package/dist/Components/List/composables/useList.js +6 -6
- package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
- package/dist/Components/ListItem/composables/useListItem.js +81 -82
- package/dist/Components/ListItem/listItem.types.d.ts +2 -2
- package/dist/Components/ListSection/composables/useListSection.js +8 -8
- package/dist/Components/Listbox/Listbox.vue.d.ts +0 -2
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +75 -74
- package/dist/Components/Listbox/composables/useListbox.js +7 -7
- package/dist/Components/Listbox/index.js +3 -3
- package/dist/Components/Menu/composables/useMenu.js +43 -43
- package/dist/Components/Modal/composables/useModal.js +18 -18
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +43 -43
- package/dist/Components/NumberField/composables/useNumberField.d.ts +8 -8
- package/dist/Components/NumberField/composables/useNumberField.js +9 -9
- 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 +80 -0
- package/dist/Components/OtpField/OtpFieldLabel.js +5 -0
- package/dist/Components/OtpField/OtpFieldLabel.vue.d.ts +7 -0
- package/dist/Components/OtpField/OtpFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/Components/OtpField/composables/useOtpField.d.ts +460 -0
- package/dist/Components/OtpField/composables/useOtpField.js +212 -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 +290 -0
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +8 -8
- package/dist/Components/PasswordField/composables/usePasswordField.js +2 -2
- 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 +4 -4
- package/dist/Components/Radio/composables/useRadio.js +9 -9
- package/dist/Components/Select/Select.vue.d.ts +1 -2
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +72 -68
- package/dist/Components/Select/composables/useSelect.d.ts +10 -10
- package/dist/Components/Select/composables/useSelect.js +193 -193
- package/dist/Components/Skeleton/composables/useSkeleton.js +5 -5
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +81 -75
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +4 -4
- package/dist/Components/Snackbar/composables/useSnackbar.js +115 -115
- package/dist/Components/Snackbar/snackbar.types.d.ts +2 -2
- package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +3 -3
- package/dist/Components/Snackbar/snackbarDefaultIcons.js +9 -10
- 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 +4 -4
- package/dist/Components/Switch/composables/useSwitch.js +9 -9
- package/dist/Components/Tab/Tab.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Tab/composables/useTab.js +11 -11
- package/dist/Components/Tab/tab.types.d.ts +3 -3
- package/dist/Components/TabItem/TabItem.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/TabItem/tabItem.types.d.ts +3 -3
- package/dist/Components/TabList/composables/useTabList.js +7 -7
- package/dist/Components/TabPanel/composables/useTabPanel.js +7 -7
- package/dist/Components/Tabs/composables/useTabs.d.ts +468 -4
- package/dist/Components/Tabs/composables/useTabs.js +22 -22
- package/dist/Components/Tabs/tabsInjectionKey.d.ts +5 -5
- 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 +8 -8
- package/dist/Components/TextField/composables/useTextField.js +1 -1
- 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 +8 -8
- package/dist/Components/Textarea/composables/useTextarea.js +9 -9
- package/dist/Components/Tooltip/Tooltip.js +5 -0
- package/dist/Components/Tooltip/Tooltip.vue.d.ts +35 -0
- package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/Components/Tooltip/composables/useTooltip.d.ts +50 -0
- package/dist/Components/Tooltip/composables/useTooltip.js +208 -0
- package/dist/Components/Tooltip/index.d.ts +4 -0
- package/dist/Components/Tooltip/index.js +3 -0
- package/dist/Components/Tooltip/tooltip.types.d.ts +166 -0
- package/dist/Provider/bridgeUITypes.d.ts +4 -1
- package/dist/Provider/createBridgeUIApi.js +15 -2
- package/dist/Utils/index.js +7 -7
- package/dist/Utils/useBreakpoint.js +7 -7
- package/dist/augments.d.ts +2 -2
- package/dist/index.d.ts +11 -1
- package/dist/index.js +84 -76
- package/package.json +21 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { findFirstEnabledOptionIndex as e, findLastEnabledOptionIndex as t, getListboxActiveDescendantId as n, getListboxOptionId as r, moveListboxHighlight as i, useListboxNavigation as a } from "./composables/useListboxNavigation.js";
|
|
2
|
+
import { useListbox as o } from "./composables/useListbox.js";
|
|
3
3
|
import { LISTBOX_INJECTION_KEY as s } from "./listboxInjectionKey.js";
|
|
4
4
|
import c from "./Listbox.js";
|
|
5
|
-
export { s as LISTBOX_INJECTION_KEY, c as Listbox,
|
|
5
|
+
export { s as LISTBOX_INJECTION_KEY, c as Listbox, e as findFirstEnabledOptionIndex, t as findLastEnabledOptionIndex, n as getListboxActiveDescendantId, r as getListboxOptionId, i as moveListboxHighlight, o as useListbox, a as useListboxNavigation };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent as n, useBridgeUIMergedRegistryClasses as ee } from "../../../Utils/index.js";
|
|
2
|
-
import { computed as r, nextTick as i, onBeforeUnmount as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { roundedProps as
|
|
2
|
+
import { computed as r, nextTick as i, onBeforeUnmount as a, ref as o, toValue as te, useAttrs as s, useId as ne, watch as c } from "vue";
|
|
3
|
+
import { LAYER_STACK_BASE_Z_INDEX as l, acquireLayerStackOrder as u, claimOpenMenu as re, cn as d, createFocusable as f, createPositionable as p, getLayerStackEntry as m, mergeBridgeUILayeredClasses as h, pushLayerStack as ie, splitComponentProps as ae, subscribeLayerStack as oe } from "@bridge-ui/core";
|
|
4
|
+
import { get as g, omit as _ } from "es-toolkit/compat";
|
|
5
|
+
import { roundedProps as v, shadowProps as se } from "@bridge-ui/core/Tokens/Menu";
|
|
6
6
|
//#region src/Components/Menu/composables/useMenu.ts
|
|
7
7
|
var ce = [
|
|
8
8
|
"offset",
|
|
@@ -21,11 +21,11 @@ var ce = [
|
|
|
21
21
|
"disableScrollLock"
|
|
22
22
|
];
|
|
23
23
|
function y(y, le, b = {}) {
|
|
24
|
-
let ue =
|
|
24
|
+
let ue = s(), x = ne(), S = o(!1), C = o(""), w = o(null), T = o(null), E = null, D = null, O = null, k = null, A = null, j = null, M = !1, N = o(l), P = r(() => te(b.show ?? !1));
|
|
25
25
|
function F(e) {
|
|
26
26
|
e || b.onClose?.(), b.show && (b.show.value = e), b.onShowChange?.(e);
|
|
27
27
|
}
|
|
28
|
-
let I = r(() =>
|
|
28
|
+
let I = r(() => ae({
|
|
29
29
|
bridgeKeys: ce,
|
|
30
30
|
props: {
|
|
31
31
|
...ue,
|
|
@@ -38,35 +38,35 @@ function y(y, le, b = {}) {
|
|
|
38
38
|
}), z = r(() => L.value.customProps), B = ee({
|
|
39
39
|
entry: R,
|
|
40
40
|
props: () => I.value.componentProps
|
|
41
|
-
}), V = r(() => L.value.keepMounted && !P.value), H = r(() => L.value.teleportTo !== !1), de = r(() =>
|
|
42
|
-
function
|
|
41
|
+
}), V = r(() => L.value.keepMounted && !P.value), H = r(() => L.value.teleportTo !== !1), de = r(() => g(h(v, R.value?.tokens?.rounded), L.value.rounded)), fe = r(() => g(h(se, R.value?.tokens?.shadow), L.value.shadow)), U = r(() => !L.value.persistent), W = r(() => _(I.value.inheritedAttrs, ["anchorEl", "onShowChange"]));
|
|
42
|
+
function G() {
|
|
43
43
|
return y.anchorEl ?? w.value;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
45
|
+
function K() {
|
|
46
|
+
G()?.focus({ preventScroll: !0 });
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
48
|
+
function q(e) {
|
|
49
|
+
return G()?.contains(e) ?? !1;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return !(e instanceof Element) ||
|
|
51
|
+
function pe(e) {
|
|
52
|
+
return !(e instanceof Element) || q(e) || T.value?.contains(e) ? !1 : !!e.closest("[aria-haspopup=\"menu\"], button, [role=\"button\"]");
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function J() {
|
|
55
55
|
!U.value || !P.value || F(!1);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function me() {
|
|
58
58
|
L.value.persistent && P.value || F(!P.value);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function he(e) {
|
|
61
61
|
e.key !== "ArrowDown" && e.key !== "Enter" && e.key !== " " || (e.preventDefault(), P.value || F(!0));
|
|
62
62
|
}
|
|
63
63
|
function ge(e) {
|
|
64
64
|
let t = T.value;
|
|
65
65
|
if (!t) return;
|
|
66
|
-
let n =
|
|
66
|
+
let n = f(t);
|
|
67
67
|
switch (e.key) {
|
|
68
68
|
case "Escape":
|
|
69
|
-
e.preventDefault(),
|
|
69
|
+
e.preventDefault(), J(), K();
|
|
70
70
|
break;
|
|
71
71
|
case "ArrowDown":
|
|
72
72
|
e.preventDefault(), n.next()?.focus({ preventScroll: !0 });
|
|
@@ -87,22 +87,22 @@ function y(y, le, b = {}) {
|
|
|
87
87
|
}
|
|
88
88
|
function X() {
|
|
89
89
|
Y();
|
|
90
|
-
let e =
|
|
91
|
-
!P.value || !e || !t || (k =
|
|
90
|
+
let e = G(), t = T.value;
|
|
91
|
+
!P.value || !e || !t || (k = p({
|
|
92
92
|
floating: t,
|
|
93
93
|
reference: e,
|
|
94
94
|
offset: L.value.offset,
|
|
95
95
|
strategy: L.value.strategy,
|
|
96
96
|
placement: L.value.placement,
|
|
97
97
|
onReferenceHidden: () => {
|
|
98
|
-
!M || !U.value || !P.value ||
|
|
98
|
+
!M || !U.value || !P.value || J();
|
|
99
99
|
}
|
|
100
100
|
}), k.start(), i(() => {
|
|
101
101
|
M = !0;
|
|
102
102
|
}));
|
|
103
103
|
}
|
|
104
104
|
function Z() {
|
|
105
|
-
!P.value || L.value.disableAutoFocus || !T.value ||
|
|
105
|
+
!P.value || L.value.disableAutoFocus || !T.value || f(T.value).focusFirst();
|
|
106
106
|
}
|
|
107
107
|
function _e() {
|
|
108
108
|
if (A?.(), !P.value) {
|
|
@@ -111,7 +111,7 @@ function y(y, le, b = {}) {
|
|
|
111
111
|
}
|
|
112
112
|
function e(e) {
|
|
113
113
|
let t = e.target;
|
|
114
|
-
|
|
114
|
+
q(t) || T.value?.contains(t) || L.value.closeOnClickAway === !1 || !U.value || pe(t) || J();
|
|
115
115
|
}
|
|
116
116
|
document.addEventListener("pointerdown", e, !0), A = () => {
|
|
117
117
|
document.removeEventListener("pointerdown", e, !0);
|
|
@@ -130,29 +130,29 @@ function y(y, le, b = {}) {
|
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
132
132
|
function be() {
|
|
133
|
-
!P.value || L.value.closeOnEscape === !1 || !U.value || (
|
|
133
|
+
!P.value || L.value.closeOnEscape === !1 || !U.value || (J(), K());
|
|
134
134
|
}
|
|
135
135
|
function Q() {
|
|
136
|
-
let e =
|
|
136
|
+
let e = m(C.value);
|
|
137
137
|
e && (N.value = e.zIndex);
|
|
138
138
|
}
|
|
139
139
|
function $() {
|
|
140
|
-
j?.(), j = null, A?.(), A = null, O?.(), O = null, D?.release(), D = null, E = null, C.value = "", N.value =
|
|
140
|
+
j?.(), j = null, A?.(), A = null, O?.(), O = null, D?.release(), D = null, E = null, C.value = "", N.value = l, Y();
|
|
141
141
|
}
|
|
142
|
-
let xe = r(() => e(z.value?.root,
|
|
142
|
+
let xe = r(() => e(z.value?.root, W.value, d({
|
|
143
143
|
"relative inline-block text-left": !0,
|
|
144
|
-
[
|
|
144
|
+
[g(B.value, "root") ?? ""]: !0
|
|
145
145
|
}))), Se = r(() => e(z.value?.trigger, {}, {
|
|
146
146
|
tabindex: 0,
|
|
147
147
|
role: "button",
|
|
148
148
|
"aria-expanded": P.value,
|
|
149
|
-
onKeydown:
|
|
149
|
+
onKeydown: he,
|
|
150
150
|
"aria-haspopup": "menu",
|
|
151
|
-
onClickCapture:
|
|
151
|
+
onClickCapture: me,
|
|
152
152
|
"aria-controls": P.value ? x : void 0,
|
|
153
|
-
class:
|
|
153
|
+
class: d({
|
|
154
154
|
"inline-block w-fit max-w-full cursor-pointer outline-hidden": !0,
|
|
155
|
-
[
|
|
155
|
+
[g(B.value, "trigger") ?? ""]: !0
|
|
156
156
|
})
|
|
157
157
|
})), Ce = r(() => e(z.value?.content, {}, {
|
|
158
158
|
id: x,
|
|
@@ -160,32 +160,32 @@ function y(y, le, b = {}) {
|
|
|
160
160
|
onKeydown: ge,
|
|
161
161
|
style: { zIndex: N.value },
|
|
162
162
|
"aria-hidden": V.value ? !0 : void 0,
|
|
163
|
-
class:
|
|
163
|
+
class: d({
|
|
164
164
|
"bg-white text-dark-900 dark:bg-dark-800 dark:text-dark-100 ring-1 ring-black/5 dark:ring-white/10 outline-hidden overflow-hidden min-w-32 w-max max-w-[calc(100vw-16px)]": !0,
|
|
165
165
|
"invisible pointer-events-none": V.value,
|
|
166
166
|
[de.value ?? ""]: !0,
|
|
167
167
|
[fe.value ?? ""]: !0,
|
|
168
|
-
[
|
|
168
|
+
[g(B.value, "content") ?? ""]: !0
|
|
169
169
|
})
|
|
170
170
|
}));
|
|
171
|
-
return
|
|
171
|
+
return c(P, (e) => {
|
|
172
172
|
if (e) {
|
|
173
173
|
S.value = !0, i(() => {
|
|
174
|
-
P.value && (j =
|
|
174
|
+
P.value && (j = re({
|
|
175
175
|
id: x,
|
|
176
|
-
requestClose:
|
|
176
|
+
requestClose: J
|
|
177
177
|
}));
|
|
178
|
-
}), E =
|
|
178
|
+
}), E = u(), D = ie({
|
|
179
179
|
order: E,
|
|
180
180
|
onEscape: be,
|
|
181
181
|
lockScroll: L.value.disableScrollLock !== !0
|
|
182
|
-
}), C.value = D.id, N.value = D.zIndex, Q(), O =
|
|
182
|
+
}), C.value = D.id, N.value = D.zIndex, Q(), O = oe(Q), i(() => {
|
|
183
183
|
X(), Z(), _e();
|
|
184
184
|
});
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
187
|
$(), L.value.keepMounted || (S.value = !1);
|
|
188
|
-
}, { immediate: !0 }),
|
|
188
|
+
}, { immediate: !0 }), c([
|
|
189
189
|
P,
|
|
190
190
|
() => y.anchorEl,
|
|
191
191
|
() => L.value.offset,
|
|
@@ -195,11 +195,11 @@ function y(y, le, b = {}) {
|
|
|
195
195
|
i(() => {
|
|
196
196
|
X();
|
|
197
197
|
});
|
|
198
|
-
}),
|
|
198
|
+
}), c([P, () => L.value.disableAutoFocus], () => {
|
|
199
199
|
i(() => {
|
|
200
200
|
Z();
|
|
201
201
|
});
|
|
202
|
-
}),
|
|
202
|
+
}), a(() => {
|
|
203
203
|
$();
|
|
204
204
|
}), {
|
|
205
205
|
merged: L,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as te } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as n, nextTick as r, onBeforeUnmount as ne, ref as i, toValue as re, useAttrs as a, watch as o } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { LAYER_STACK_BASE_Z_INDEX as s, acquireLayerStackOrder as ie, cn as c, countModalTransitionLayers as ae, createFocusTrap as l, getLayerStackEntry as u, getModalOverlayTransitionClass as d, getModalPanelTransitionClass as f, hasModalTransition as p, mergeBridgeUILayeredClasses as m, pushLayerStack as h, resolveEffectiveModalTransition as oe, splitComponentProps as g, subscribeLayerStack as se } from "@bridge-ui/core";
|
|
4
|
+
import { get as _ } from "es-toolkit/compat";
|
|
5
5
|
import { isModalBackdropClick as ce } from "@bridge-ui/core/Utils";
|
|
6
6
|
import { alignProps as v, blurProps as y, sizeProps as b } from "@bridge-ui/core/Tokens/Modal";
|
|
7
7
|
//#region src/Components/Modal/composables/useModal.ts
|
|
@@ -26,11 +26,11 @@ var le = [
|
|
|
26
26
|
"disableRestoreFocus"
|
|
27
27
|
];
|
|
28
28
|
function x(x, ue, S = {}) {
|
|
29
|
-
let de = a(), C = i(!1), w = i(!1), T = i(""), E = i(null), D = 0, O = null, k = null, A = null, j = null, M = i(
|
|
29
|
+
let de = a(), C = i(!1), w = i(!1), T = i(""), E = i(null), D = 0, O = null, k = null, A = null, j = null, M = i(s), N = i("closed"), P = n(() => re(S.show ?? !1));
|
|
30
30
|
function F(e) {
|
|
31
31
|
e || S.onClose?.(), S.show && (S.show.value = e), S.onShowChange?.(e);
|
|
32
32
|
}
|
|
33
|
-
let I = n(() =>
|
|
33
|
+
let I = n(() => g({
|
|
34
34
|
bridgeKeys: le,
|
|
35
35
|
props: {
|
|
36
36
|
...de,
|
|
@@ -43,42 +43,42 @@ function x(x, ue, S = {}) {
|
|
|
43
43
|
}), z = n(() => L.value.customProps), B = te({
|
|
44
44
|
entry: R,
|
|
45
45
|
props: () => I.value.componentProps
|
|
46
|
-
}), V = n(() =>
|
|
46
|
+
}), V = n(() => oe(L.value.transition ?? "none")), H = n(() => p(V.value)), U = n(() => L.value.scroll ?? "body"), W = n(() => L.value.keepMounted && !w.value), fe = n(() => _(m(v, R.value?.tokens?.align), L.value.align)), pe = n(() => _(m(y, R.value?.tokens?.blur), L.value.blur)), me = n(() => _(m(b, R.value?.tokens?.size), L.value.size)), he = n(() => d(V.value)), ge = n(() => f(V.value)), G = n(() => !L.value.persistent), _e = n(() => I.value.inheritedAttrs), ve = n(() => e(z.value?.root, _e.value, {
|
|
47
47
|
onTransitionend: we,
|
|
48
48
|
style: { zIndex: M.value },
|
|
49
49
|
"aria-hidden": W.value ? !0 : void 0,
|
|
50
|
-
class:
|
|
50
|
+
class: c({
|
|
51
51
|
"fixed inset-0": !0,
|
|
52
52
|
"overflow-y-auto": U.value === "body",
|
|
53
53
|
"overflow-hidden": U.value === "paper",
|
|
54
54
|
"invisible pointer-events-none": W.value,
|
|
55
|
-
[
|
|
55
|
+
[_(B.value, "root") ?? ""]: !0
|
|
56
56
|
})
|
|
57
57
|
})), ye = n(() => e(z.value?.overlay, { onClick: Z }, {
|
|
58
58
|
"data-modal-part": "overlay",
|
|
59
59
|
"data-state": N.value,
|
|
60
|
-
class:
|
|
60
|
+
class: c({
|
|
61
61
|
"fixed inset-0 bg-black/50": !0,
|
|
62
62
|
[pe.value ?? ""]: !0,
|
|
63
63
|
[he.value]: H.value,
|
|
64
|
-
[
|
|
64
|
+
[_(B.value, "overlay") ?? ""]: !0
|
|
65
65
|
})
|
|
66
|
-
})), be = n(() => e(z.value?.wrapper, { onClick: Q },
|
|
66
|
+
})), be = n(() => e(z.value?.wrapper, { onClick: Q }, c({
|
|
67
67
|
"flex min-h-full w-full transform p-4": !0,
|
|
68
68
|
[fe.value ?? ""]: !0,
|
|
69
|
-
[
|
|
69
|
+
[_(B.value, "wrapper") ?? ""]: !0
|
|
70
70
|
}))), xe = n(() => e(z.value?.panel, {
|
|
71
71
|
role: "dialog",
|
|
72
72
|
"aria-modal": !0
|
|
73
73
|
}, {
|
|
74
74
|
"data-modal-part": "panel",
|
|
75
75
|
"data-state": N.value,
|
|
76
|
-
class:
|
|
76
|
+
class: c({
|
|
77
77
|
"relative w-full": !0,
|
|
78
78
|
[me.value ?? ""]: !0,
|
|
79
79
|
"max-h-[calc(100dvh-2rem)] overflow-y-auto": U.value === "paper",
|
|
80
80
|
[ge.value]: H.value,
|
|
81
|
-
[
|
|
81
|
+
[_(B.value, "panel") ?? ""]: !0
|
|
82
82
|
})
|
|
83
83
|
}));
|
|
84
84
|
function K() {
|
|
@@ -89,7 +89,7 @@ function x(x, ue, S = {}) {
|
|
|
89
89
|
K();
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
K(), k =
|
|
92
|
+
K(), k = l({
|
|
93
93
|
container: E.value,
|
|
94
94
|
disableAutoFocus: !L.value.autoFocus,
|
|
95
95
|
disableEnforceFocus: L.value.disableEnforceFocus,
|
|
@@ -107,7 +107,7 @@ function x(x, ue, S = {}) {
|
|
|
107
107
|
J();
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
N.value = "closed", D =
|
|
110
|
+
N.value = "closed", D = ae(V.value, { hideBackdrop: L.value.hideBackdrop }), D === 0 && J();
|
|
111
111
|
}
|
|
112
112
|
function Ce() {
|
|
113
113
|
if (!H.value) {
|
|
@@ -161,16 +161,16 @@ function x(x, ue, S = {}) {
|
|
|
161
161
|
});
|
|
162
162
|
});
|
|
163
163
|
function $() {
|
|
164
|
-
let e =
|
|
164
|
+
let e = u(T.value);
|
|
165
165
|
e && (M.value = e.zIndex);
|
|
166
166
|
}
|
|
167
167
|
return o(w, (e) => {
|
|
168
|
-
e ? (O = ie(), A =
|
|
168
|
+
e ? (O = ie(), A = h({
|
|
169
169
|
order: O,
|
|
170
170
|
id: S.stackId,
|
|
171
171
|
onEscape: Te,
|
|
172
172
|
lockScroll: L.value.disableScrollLock !== !0
|
|
173
|
-
}), T.value = A.id, M.value = A.zIndex, $(), j = se($)) : (j?.(), j = null, A?.release(), A = null, O = null, T.value = "", M.value =
|
|
173
|
+
}), T.value = A.id, M.value = A.zIndex, $(), j = se($)) : (j?.(), j = null, A?.release(), A = null, O = null, T.value = "", M.value = s);
|
|
174
174
|
}, { immediate: !0 }), ne(() => {
|
|
175
175
|
j?.(), j = null, K(), A?.release(), A = null;
|
|
176
176
|
}), {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import r from "
|
|
4
|
-
import i from "../
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { useResolveMessage as e } from "../../Adapters/I18n/useI18nAdapter.js";
|
|
2
|
+
import { useHoldRepeat as t } from "../../Utils/useHoldRepeat.js";
|
|
3
|
+
import { mergePartBind as n, resolveFieldAdornmentIconSize as r } from "../../Utils/index.js";
|
|
4
|
+
import i from "../Icon/Icon.js";
|
|
5
|
+
import a from "../FormField/FormField.js";
|
|
6
|
+
import { useNumberField as o } from "./composables/useNumberField.js";
|
|
7
|
+
import { computed as s, createBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, isRef as p, mergeModels as m, mergeProps as h, normalizeProps as g, openBlock as _, ref as v, unref as y, useModel as b, vModelDynamic as x, withCtx as S, withDirectives as C } from "vue";
|
|
8
8
|
import { cn as w } from "@bridge-ui/core";
|
|
9
|
-
import {
|
|
9
|
+
import { isUndefined as T } from "es-toolkit/compat";
|
|
10
10
|
//#region src/Components/NumberField/NumberField.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var E = { class: "bridge-end-adornment flex h-full min-w-9 flex-col gap-px overflow-hidden" }, D = /* @__PURE__ */ d({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "NumberField",
|
|
14
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ m({
|
|
15
15
|
classes: {},
|
|
16
16
|
customProps: {},
|
|
17
17
|
defaultValue: {},
|
|
@@ -27,62 +27,62 @@ var D = { class: "bridge-end-adornment flex h-full min-w-9 flex-col gap-px overf
|
|
|
27
27
|
error: { type: Boolean },
|
|
28
28
|
errorIcon: {},
|
|
29
29
|
errorMessage: {},
|
|
30
|
+
hideErrorMessage: { type: Boolean },
|
|
30
31
|
label: {},
|
|
31
32
|
readonly: { type: Boolean },
|
|
32
33
|
required: { type: Boolean },
|
|
33
34
|
rounded: {},
|
|
35
|
+
showErrorIcon: { type: Boolean },
|
|
34
36
|
size: {},
|
|
35
37
|
slots: {},
|
|
36
38
|
start: {},
|
|
37
|
-
variant: {}
|
|
38
|
-
withErrorIcon: { type: Boolean },
|
|
39
|
-
withoutErrorMessage: { type: Boolean }
|
|
39
|
+
variant: {}
|
|
40
40
|
}, {
|
|
41
41
|
modelValue: {},
|
|
42
42
|
modelModifiers: {}
|
|
43
43
|
}),
|
|
44
|
-
emits: /* @__PURE__ */
|
|
45
|
-
setup(
|
|
46
|
-
let
|
|
44
|
+
emits: /* @__PURE__ */ m(["change", "update:modelValue"], ["update:modelValue"]),
|
|
45
|
+
setup(d, { emit: m }) {
|
|
46
|
+
let D = m, O = b(d, "modelValue"), k = d, A = v(k.defaultValue), j = s({
|
|
47
47
|
set: (e) => {
|
|
48
|
-
|
|
48
|
+
O.value = e, A.value = e;
|
|
49
49
|
},
|
|
50
|
-
get: () =>
|
|
51
|
-
}), { onChange: (e) =>
|
|
50
|
+
get: () => T(O.value) ? A.value : O.value
|
|
51
|
+
}), M = e(), { decrement: N, formField: P, increment: F, inputBind: I, stringModel: L, mergedClasses: R } = o(k, j, { onChange: (e) => D("change", e) }), z = t(() => F(), () => ({ disabled: k.disabled })), B = t(() => N(), () => ({ disabled: k.disabled })), V = s(() => r(k.size)), H = s(() => n(k.customProps?.increment, {
|
|
52
52
|
type: "button",
|
|
53
|
-
disabled:
|
|
54
|
-
"aria-label": "Increment value",
|
|
55
|
-
onClick: R.onPressClick,
|
|
56
|
-
onPointerup: R.onPressPointerUp,
|
|
57
|
-
onPointerdown: R.onPressPointerDown,
|
|
58
|
-
onLostpointercapture: R.onPressLostPointerCapture
|
|
59
|
-
}, w({
|
|
60
|
-
"bridge-field-adornment-button inline-flex min-h-0 min-w-8 flex-1 items-center justify-center": !0,
|
|
61
|
-
[L.value.increment ?? ""]: !0
|
|
62
|
-
}))), H = o(() => t(A.customProps?.decrement, {
|
|
63
|
-
type: "button",
|
|
64
|
-
disabled: A.disabled,
|
|
65
|
-
"aria-label": "Decrement value",
|
|
53
|
+
disabled: k.disabled,
|
|
66
54
|
onClick: z.onPressClick,
|
|
67
55
|
onPointerup: z.onPressPointerUp,
|
|
68
56
|
onPointerdown: z.onPressPointerDown,
|
|
57
|
+
"aria-label": M("Increment value"),
|
|
69
58
|
onLostpointercapture: z.onPressLostPointerCapture
|
|
70
59
|
}, w({
|
|
71
60
|
"bridge-field-adornment-button inline-flex min-h-0 min-w-8 flex-1 items-center justify-center": !0,
|
|
72
|
-
[
|
|
61
|
+
[R.value.increment ?? ""]: !0
|
|
62
|
+
}))), U = s(() => n(k.customProps?.decrement, {
|
|
63
|
+
type: "button",
|
|
64
|
+
disabled: k.disabled,
|
|
65
|
+
onClick: B.onPressClick,
|
|
66
|
+
onPointerup: B.onPressPointerUp,
|
|
67
|
+
onPointerdown: B.onPressPointerDown,
|
|
68
|
+
"aria-label": M("Decrement value"),
|
|
69
|
+
onLostpointercapture: B.onPressLostPointerCapture
|
|
70
|
+
}, w({
|
|
71
|
+
"bridge-field-adornment-button inline-flex min-h-0 min-w-8 flex-1 items-center justify-center": !0,
|
|
72
|
+
[R.value.decrement ?? ""]: !0
|
|
73
73
|
})));
|
|
74
|
-
return (e, t) => (
|
|
75
|
-
end:
|
|
76
|
-
icon:
|
|
77
|
-
size:
|
|
78
|
-
},
|
|
79
|
-
icon:
|
|
80
|
-
size:
|
|
81
|
-
},
|
|
82
|
-
default:
|
|
74
|
+
return (e, t) => (_(), c(y(a), { field: y(P) }, {
|
|
75
|
+
end: S(() => [l("div", E, [l("button", g(f(H.value)), [u(y(i), h({
|
|
76
|
+
icon: "chevronUp",
|
|
77
|
+
size: V.value
|
|
78
|
+
}, k.customProps?.incrementIcon), null, 16, ["size"])], 16), l("button", g(f(U.value)), [u(y(i), h({
|
|
79
|
+
icon: "chevronDown",
|
|
80
|
+
size: V.value
|
|
81
|
+
}, k.customProps?.decrementIcon), null, 16, ["size"])], 16)])]),
|
|
82
|
+
default: S(() => [C(l("input", h({ "onUpdate:modelValue": t[0] ||= (e) => p(L) ? L.value = e : null }, y(I)), null, 16), [[x, y(L)]])]),
|
|
83
83
|
_: 1
|
|
84
84
|
}, 8, ["field"]));
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
//#endregion
|
|
88
|
-
export {
|
|
88
|
+
export { D as default };
|
|
@@ -12,13 +12,13 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
|
|
|
12
12
|
slots: Readonly<{
|
|
13
13
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
14
14
|
}>;
|
|
15
|
-
merged: import('vue').ComputedRef<Omit<import('../../FormField').FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "
|
|
15
|
+
merged: import('vue').ComputedRef<Omit<import('../../FormField').FormFieldOwnProps, "color" | "size" | "rounded" | "variant" | "errorIcon" | "showErrorIcon"> & {
|
|
16
16
|
color: NonNullable<keyof import('@bridge-ui/core').FormFieldColor | undefined>;
|
|
17
17
|
size: NonNullable<keyof import('@bridge-ui/core').FormFieldSize | undefined>;
|
|
18
18
|
rounded: NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
|
|
19
19
|
variant: NonNullable<keyof import('@bridge-ui/core').FormFieldVariant | undefined>;
|
|
20
|
-
errorIcon: import('
|
|
21
|
-
|
|
20
|
+
errorIcon: NonNullable<import('../../..').IconSource | undefined>;
|
|
21
|
+
showErrorIcon: NonNullable<boolean | undefined>;
|
|
22
22
|
}>;
|
|
23
23
|
control: import('vue').ComputedRef<string>;
|
|
24
24
|
endBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -173,13 +173,13 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
|
|
|
173
173
|
'aria-valuenow'?: (string | number) | undefined;
|
|
174
174
|
'aria-valuetext'?: string | undefined | undefined;
|
|
175
175
|
accesskey?: string | undefined | undefined;
|
|
176
|
-
contenteditable?:
|
|
176
|
+
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
177
177
|
contextmenu?: string | undefined | undefined;
|
|
178
178
|
dir?: string | undefined | undefined;
|
|
179
179
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
180
180
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
181
181
|
enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
182
|
-
hidden?: "" | "until-found" | (boolean | "true" | "false") |
|
|
182
|
+
hidden?: "" | "until-found" | "hidden" | (boolean | "true" | "false") | undefined;
|
|
183
183
|
inert?: (boolean | "true" | "false") | undefined;
|
|
184
184
|
placeholder?: string | undefined | undefined;
|
|
185
185
|
spellcheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -213,7 +213,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
|
|
|
213
213
|
}>>;
|
|
214
214
|
controlId: import('vue').ComputedRef<string>;
|
|
215
215
|
errorBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
216
|
-
errorIcon: import('vue').ComputedRef<import('
|
|
216
|
+
errorIcon: import('vue').ComputedRef<NonNullable<import('../../..').IconSource | undefined>>;
|
|
217
217
|
inputBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {
|
|
218
218
|
id: string;
|
|
219
219
|
disabled: boolean;
|
|
@@ -435,7 +435,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
|
|
|
435
435
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
436
436
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
437
437
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
438
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "
|
|
438
|
+
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "hideErrorMessage" | "readonly" | "errorIcon" | "showErrorIcon" | "corner">>>>;
|
|
439
439
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
440
440
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
441
441
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -684,7 +684,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
|
|
|
684
684
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
685
685
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
686
686
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
687
|
-
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "
|
|
687
|
+
}, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "hideErrorMessage" | "readonly" | "errorIcon" | "showErrorIcon" | "corner">>>, {
|
|
688
688
|
min: number | undefined;
|
|
689
689
|
max: number | undefined;
|
|
690
690
|
type: string;
|
|
@@ -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, useAttrs as a } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cn as o } from "@bridge-ui/core";
|
|
5
|
+
import { isNil as s } from "es-toolkit/compat";
|
|
6
6
|
//#region src/Components/NumberField/composables/useNumberField.ts
|
|
7
7
|
function c(c, l, u = {}) {
|
|
8
8
|
let d = a(), f = i(() => c.step ?? 1), { entry: p } = t({
|
|
@@ -16,7 +16,7 @@ function c(c, l, u = {}) {
|
|
|
16
16
|
return {
|
|
17
17
|
...d,
|
|
18
18
|
...a,
|
|
19
|
-
|
|
19
|
+
showErrorIcon: !1,
|
|
20
20
|
classes: m.value
|
|
21
21
|
};
|
|
22
22
|
}, {
|
|
@@ -24,18 +24,18 @@ function c(c, l, u = {}) {
|
|
|
24
24
|
rounded: "md",
|
|
25
25
|
color: "primary",
|
|
26
26
|
variant: "outline",
|
|
27
|
-
|
|
27
|
+
showErrorIcon: !1
|
|
28
28
|
}, { reservedSlots: () => ["end"] }), g = i(() => e(h.inputBind.value, {
|
|
29
29
|
min: c.min,
|
|
30
30
|
max: c.max,
|
|
31
31
|
type: "number",
|
|
32
32
|
step: f.value
|
|
33
|
-
},
|
|
33
|
+
}, o({ "appearance:textfield [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none": !0 }))), _ = i(() => l.value ?? void 0), v = i({
|
|
34
34
|
get: () => {
|
|
35
|
-
if (!
|
|
35
|
+
if (!s(_.value)) return String(_.value);
|
|
36
36
|
},
|
|
37
37
|
set: (e) => {
|
|
38
|
-
if (e === "" ||
|
|
38
|
+
if (e === "" || s(e)) {
|
|
39
39
|
l.value = void 0;
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
@@ -48,12 +48,12 @@ function c(c, l, u = {}) {
|
|
|
48
48
|
return {
|
|
49
49
|
decrement: () => {
|
|
50
50
|
let e = (_.value ?? c.min ?? 0) - f.value;
|
|
51
|
-
return !
|
|
51
|
+
return !s(c.min) && e < c.min ? !1 : (y(e), !0);
|
|
52
52
|
},
|
|
53
53
|
formField: h,
|
|
54
54
|
increment: () => {
|
|
55
55
|
let e = (_.value ?? c.min ?? 0) + f.value;
|
|
56
|
-
return !
|
|
56
|
+
return !s(c.max) && e > c.max ? !1 : (y(e), !0);
|
|
57
57
|
},
|
|
58
58
|
inputBind: g,
|
|
59
59
|
stringModel: v,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OtpFieldOwnProps, OtpFieldSlots } from './otpField.types';
|
|
2
|
+
type __VLS_Slots = OtpFieldSlots;
|
|
3
|
+
type __VLS_Props = OtpFieldOwnProps;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: null | string | undefined;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string | null | undefined) => any;
|
|
10
|
+
change: (value: string) => any;
|
|
11
|
+
complete: (value: string) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string | null | undefined) => any) | undefined;
|
|
14
|
+
onChange?: ((value: string) => any) | undefined;
|
|
15
|
+
onComplete?: ((value: string) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
color: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').OtpFieldColor, import('./otpField.types').OtpFieldColorOverrides>;
|
|
18
|
+
type: import('@bridge-ui/core').OtpInputType;
|
|
19
|
+
size: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').OtpFieldSize, import('./otpField.types').OtpFieldSizeOverrides>;
|
|
20
|
+
length: number;
|
|
21
|
+
rounded: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').OtpFieldRounded, import('./otpField.types').OtpFieldRoundedOverrides>;
|
|
22
|
+
variant: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').OtpFieldVariant, import('./otpField.types').OtpFieldVariantOverrides>;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|