@bridge-ui/vue 0.26.0 → 0.27.1

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.
Files changed (44) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +2 -1
  2. package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +4 -3
  3. package/dist/Components/Autocomplete/composables/useAutocomplete.js +1 -1
  4. package/dist/Components/BaseField/composables/useBaseField.js +0 -1
  5. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -1
  6. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +1 -0
  7. package/dist/Components/Checkbox/composables/useCheckbox.js +2 -1
  8. package/dist/Components/ColorField/composables/useColorField.js +1 -1
  9. package/dist/Components/DateField/composables/useDateField.js +1 -1
  10. package/dist/Components/DateRangeField/composables/useDateRangeField.js +1 -1
  11. package/dist/Components/DateTimeField/composables/useDateTimeField.js +1 -1
  12. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +1 -1
  13. package/dist/Components/FormControl/composables/useFormControl.d.ts +1 -0
  14. package/dist/Components/FormControl/composables/useFormControl.js +14 -11
  15. package/dist/Components/FormField/composables/useFormField.js +0 -1
  16. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +30 -30
  17. package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -0
  18. package/dist/Components/NumberField/composables/useNumberField.js +11 -10
  19. package/dist/Components/OtpField/composables/useOtpField.js +7 -1
  20. package/dist/Components/QrCode/QrCode.js +4 -0
  21. package/dist/Components/QrCode/QrCode.vue.d.ts +17 -0
  22. package/dist/Components/QrCode/QrCode.vue_vue_type_script_setup_true_lang.js +45 -0
  23. package/dist/Components/QrCode/composables/useQrCode.d.ts +881 -0
  24. package/dist/Components/QrCode/composables/useQrCode.js +137 -0
  25. package/dist/Components/QrCode/index.d.ts +3 -0
  26. package/dist/Components/QrCode/index.js +3 -0
  27. package/dist/Components/QrCode/qrCode.types.d.ts +168 -0
  28. package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -1
  29. package/dist/Components/Radio/composables/useRadio.d.ts +1 -0
  30. package/dist/Components/Radio/composables/useRadio.js +2 -1
  31. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +4 -3
  32. package/dist/Components/Select/composables/useSelect.js +1 -1
  33. package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -1
  34. package/dist/Components/Switch/composables/useSwitch.d.ts +1 -0
  35. package/dist/Components/Switch/composables/useSwitch.js +2 -1
  36. package/dist/Components/TimeField/composables/useTimeField.js +1 -1
  37. package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +1 -1
  38. package/dist/augments.d.ts +5 -0
  39. package/dist/index.d.ts +2 -0
  40. package/dist/index.js +84 -82
  41. package/docs/README.md +1 -0
  42. package/docs/components/I18n.md +2 -0
  43. package/docs/components/QrCode.md +134 -0
  44. package/package.json +3 -3
@@ -2,7 +2,7 @@
2
2
  name: bridge-ui-components
3
3
  description: >-
4
4
  Use Bridge UI Vue components — Button, ButtonGroup, Avatar, Card, Alert, Accordion, ActionFooter, Badge, Icon, Text, Heading,
5
- Link, List, Table, DataTable, Tabs, Spinner, Skeleton, EmptyState, Sidebar, Progress, Stepper, Carousel, Resizable, ChartLine, ChartBar, ChartScatter, ChartPie, ChartFunnel, Pagination, TextField, Select,
5
+ Link, List, Table, DataTable, Tabs, Spinner, Skeleton, EmptyState, Sidebar, Progress, QrCode, Stepper, Carousel, Resizable, ChartLine, ChartBar, ChartScatter, ChartPie, ChartFunnel, Pagination, TextField, Select,
6
6
  Autocomplete, DateField, DatePicker, DateRangeField, DateRangePicker,
7
7
  TimeField, TimePicker, DateTimeField, DateTimePicker, ColorField, ColorPicker,
8
8
  classes, customProps, slots. Use when building UI with Bridge components.
@@ -47,6 +47,7 @@ In templates, use kebab-case attrs (`start-icon`, `custom-props`, `error-message
47
47
  | Color | `.ai/docs/components/ColorField.md`, `ColorPicker.md` |
48
48
  | Spinner / skeleton / progress | `.ai/docs/components/Spinner.md`, `Skeleton.md`, `Progress.md` |
49
49
  | Empty / no data | `.ai/docs/components/EmptyState.md` |
50
+ | QR code (payment, 2FA, links) | `.ai/docs/components/QrCode.md` |
50
51
  | Scroll fade / scrollbar | `.ai/docs/ScrollUtilities.md` |
51
52
  | Index | `.ai/docs/README.md` |
52
53
 
@@ -120,12 +120,12 @@ var N = {
120
120
  return (e, r) => (S(), f(l, null, [
121
121
  h(D(te), { field: D(J) }, m({
122
122
  default: k(() => [D(q) ? (S(), f("div", N, [(S(!0), f(l, null, T(D(me), (t) => (S(), u(D(a), b({
123
- dismissible: "",
124
123
  key: String(t.value),
125
124
  size: D(J).merged.value.size,
126
125
  disabled: D(J).isDisabled.value,
127
126
  "clear-label": `Remove ${t.label}`,
128
- onDismiss: (e) => D(oe)(t, e)
127
+ onDismiss: (e) => D(oe)(t, e),
128
+ dismissible: !D(J).isReadonly.value
129
129
  }, { ref_for: !0 }, D(c)(R.customProps?.chip, {
130
130
  customProps: { clear: D(Y) },
131
131
  classes: { root: D(M)({
@@ -139,7 +139,8 @@ var N = {
139
139
  "size",
140
140
  "disabled",
141
141
  "clear-label",
142
- "onDismiss"
142
+ "onDismiss",
143
+ "dismissible"
143
144
  ]))), 128)), p("textarea", b({ ref: "trigger" }, D(Z)), null, 16)])) : (S(), f("div", P, [p("input", b({
144
145
  ref: "trigger",
145
146
  class: "min-w-0 flex-1"
@@ -212,7 +212,7 @@ function g(g, _, v, y, Me) {
212
212
  e?.preventDefault(), e?.stopPropagation(), g.disabled || g.readonly || (P.value ? Z([]) : Z(null), y("clear"), $());
213
213
  }
214
214
  function lt(e, t) {
215
- t.preventDefault(), t.stopPropagation(), P.value && (Z(B.value.filter((t) => !p(t, e.value))), y("deselect", e), s(() => X(v.value)));
215
+ t.preventDefault(), t.stopPropagation(), !P.value || g.disabled || g.readonly || (Z(B.value.filter((t) => !p(t, e.value))), y("deselect", e), s(() => X(v.value)));
216
216
  }
217
217
  function ut() {
218
218
  let e = J.getHighlightedOption();
@@ -53,7 +53,6 @@ function _(_, v = {
53
53
  }, p({
54
54
  "group w-full relative": !0,
55
55
  "aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60": !0,
56
- "aria-readonly:pointer-events-none aria-readonly:select-none": !0,
57
56
  [O.value.root ?? ""]: !0
58
57
  }))), V = a(() => n(k.value?.header, {}, p({
59
58
  "flex w-full gap-x-2 mb-1.5": !0,
@@ -59,7 +59,8 @@ var O = ["for"], k = ["checked"], A = {
59
59
  ref: z
60
60
  }, S(V), {
61
61
  checked: S(H),
62
- onChange: G
62
+ onChange: G,
63
+ onClick: t[0] ||= (...e) => S(U).preventReadonlyChange && S(U).preventReadonlyChange(...e)
63
64
  }), null, 16, k), l("span", g(f(S(W))), [S(H) && !S(L).indeterminate ? (_(), o(x(I.value), {
64
65
  key: 0,
65
66
  "stroke-width": 3,
@@ -264,6 +264,7 @@ export declare function useCheckbox(props: MaybeRefOrGetter<CheckboxOwnProps>, l
264
264
  errorMessageBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
265
265
  id: string;
266
266
  }>>;
267
+ preventReadonlyChange: (event: Event) => void;
267
268
  showErrorMessageContent: import('vue').ComputedRef<boolean>;
268
269
  reservesErrorMessageSpace: import('vue').ComputedRef<boolean>;
269
270
  };
@@ -81,7 +81,8 @@ function b(b, x, S) {
81
81
  }))),
82
82
  inputRef: w,
83
83
  fieldBind: a(() => n({}, {}, h({
84
- "relative inline-flex shrink-0 cursor-pointer items-center": !0,
84
+ "relative inline-flex shrink-0 items-center": !0,
85
+ "cursor-pointer": !T.isReadonly.value,
85
86
  "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2": !0,
86
87
  [M.value?.focus ?? ""]: !0
87
88
  }))),
@@ -43,7 +43,7 @@ function D(h, D, O) {
43
43
  M.value = e instanceof HTMLElement ? e : null;
44
44
  };
45
45
  function G(e) {
46
- j.value !== e && (j.value = e, O(e ? "open" : "close"));
46
+ e && (h.disabled || h.readonly) || j.value !== e && (j.value = e, O(e ? "open" : "close"));
47
47
  }
48
48
  let ae = c(() => te(P.value.inheritedAttrs, ["class"])), K = c(() => {
49
49
  let n = w({
@@ -61,7 +61,7 @@ function O(h, g, O) {
61
61
  P.value = e instanceof HTMLElement ? e : null;
62
62
  };
63
63
  function K(e) {
64
- N.value !== e && (N.value = e, O(e ? "open" : "close"));
64
+ e && (h.disabled || h.readonly) || N.value !== e && (N.value = e, O(e ? "open" : "close"));
65
65
  }
66
66
  let q = u(() => _(F.value.inheritedAttrs, ["class"])), J = u(() => {
67
67
  let e = T({
@@ -44,7 +44,7 @@ function T(T, E, D) {
44
44
  M.value = e instanceof HTMLElement ? e : null;
45
45
  };
46
46
  function B(e) {
47
- j.value !== e && (j.value = e, D(e ? "open" : "close"));
47
+ e && (T.disabled || T.readonly) || j.value !== e && (j.value = e, D(e ? "open" : "close"));
48
48
  }
49
49
  let V = l(() => h(N.value.inheritedAttrs, ["class"])), H = l(() => {
50
50
  let e = C({
@@ -32,7 +32,7 @@ function T(T, E, D) {
32
32
  N.value = e instanceof HTMLElement ? e : null;
33
33
  };
34
34
  function W(e) {
35
- M.value !== e && (M.value = e, D(e ? "open" : "close"));
35
+ e && (T.disabled || T.readonly) || M.value !== e && (M.value = e, D(e ? "open" : "close"));
36
36
  }
37
37
  let G = u(() => g(P.value.inheritedAttrs, ["class"])), K = u(() => {
38
38
  let e = S({
@@ -30,7 +30,7 @@ function T(_, T, E) {
30
30
  M.value = e instanceof HTMLElement ? e : null;
31
31
  };
32
32
  function B(e) {
33
- j.value !== e && (j.value = e, E(e ? "open" : "close"));
33
+ e && (_.disabled || _.readonly) || j.value !== e && (j.value = e, E(e ? "open" : "close"));
34
34
  }
35
35
  let V = u(() => g(N.value.inheritedAttrs, ["class"])), H = u(() => {
36
36
  let e = C({
@@ -45,6 +45,7 @@ export declare function useFormControl(props: MaybeRefOrGetter<Omit<FormControlO
45
45
  errorMessageBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {
46
46
  id: string;
47
47
  }>>;
48
+ preventReadonlyChange: (event: Event) => void;
48
49
  showErrorMessageContent: import('vue').ComputedRef<boolean>;
49
50
  reservesErrorMessageSpace: import('vue').ComputedRef<boolean>;
50
51
  };
@@ -45,7 +45,6 @@ function _(_, v, y = {}) {
45
45
  }), L = a(() => u(f, T.value.size ?? "md")), R = a(() => n(O.value?.root, d(C.value.inheritedAttrs, ["style"]), p({
46
46
  "group/form-control relative w-full": !0,
47
47
  "aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60 aria-disabled:cursor-not-allowed": !0,
48
- "aria-readonly:pointer-events-none aria-readonly:select-none": !0,
49
48
  [k.value.root ?? ""]: !0,
50
49
  [S.class]: !!S.class
51
50
  }))), z = a(() => n(O.value?.row, {}, p({
@@ -58,7 +57,7 @@ function _(_, v, y = {}) {
58
57
  error: A.value,
59
58
  required: T.value.required,
60
59
  classes: { root: p({
61
- "cursor-pointer": !0,
60
+ "cursor-pointer": !M.value,
62
61
  [k.value[e] ?? ""]: !0
63
62
  }) }
64
63
  });
@@ -76,7 +75,17 @@ function _(_, v, y = {}) {
76
75
  "text-error-600 dark:text-error-400": !0,
77
76
  [L.value ?? ""]: !0,
78
77
  [k.value.errorMessage ?? ""]: !0
79
- })));
78
+ }))), U = a(() => ({
79
+ id: N.value,
80
+ disabled: j.value,
81
+ readonly: M.value,
82
+ "aria-describedby": I.value,
83
+ required: T.value.required || void 0,
84
+ "aria-invalid": A.value || void 0
85
+ }));
86
+ function W(e) {
87
+ M.value && e.preventDefault();
88
+ }
80
89
  return {
81
90
  slots: x,
82
91
  merged: T,
@@ -85,18 +94,12 @@ function _(_, v, y = {}) {
85
94
  controlId: N,
86
95
  isDisabled: j,
87
96
  isReadonly: M,
88
- controlBind: a(() => ({
89
- id: N.value,
90
- disabled: j.value,
91
- readonly: M.value,
92
- "aria-describedby": I.value,
93
- required: T.value.required || void 0,
94
- "aria-invalid": A.value || void 0
95
- })),
97
+ controlBind: U,
96
98
  invalidated: A,
97
99
  fieldLabelProps: B,
98
100
  descriptionBind: V,
99
101
  errorMessageBind: H,
102
+ preventReadonlyChange: W,
100
103
  showErrorMessageContent: F,
101
104
  reservesErrorMessageSpace: P
102
105
  };
@@ -93,7 +93,6 @@ function v(l, v, y = {}) {
93
93
  }, h({
94
94
  "group w-full relative": !0,
95
95
  "aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60": !0,
96
- "aria-readonly:pointer-events-none aria-readonly:select-none": !0,
97
96
  [k.value.root ?? ""]: !0
98
97
  }));
99
98
  }), he = i(() => r(D.value?.errorMessage, {}, h({
@@ -3,11 +3,11 @@ import { presentSlotNames as t } from "../../Utils/slotOrProp.js";
3
3
  import { useHoldRepeat as n } from "../../Utils/useHoldRepeat.js";
4
4
  import { useOptionalModel as r } from "../../Utils/useOptionalModel.js";
5
5
  import { FORM_FIELD_CHROME_SLOT_NAMES as i } from "../FormField/formField.types.js";
6
- import a from "../FormField/FormField.js";
7
- import o from "../Icon/Icon.js";
8
- import { useNumberField as s } from "./composables/useNumberField.js";
9
- import { mergePartBind as c } from "../../Utils/index.js";
10
- import { computed as l, createBlock as ee, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createVNode as m, defineComponent as h, guardReactiveProps as g, isRef as _, mergeModels as v, mergeProps as y, normalizeClass as b, normalizeProps as x, openBlock as S, ref as C, renderList as w, renderSlot as T, unref as E, useModel as D, vModelDynamic as O, withCtx as k, withDirectives as A } from "vue";
6
+ import ee from "../FormField/FormField.js";
7
+ import a from "../Icon/Icon.js";
8
+ import { useNumberField as o } from "./composables/useNumberField.js";
9
+ import { mergePartBind as s } from "../../Utils/index.js";
10
+ import { computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, createVNode as m, defineComponent as h, guardReactiveProps as g, isRef as _, mergeModels as v, mergeProps as y, normalizeClass as b, normalizeProps as x, openBlock as S, ref as C, renderList as w, renderSlot as T, unref as E, useModel as D, vModelDynamic as O, withCtx as k, withDirectives as A } from "vue";
11
11
  import { cn as j } from "@bridge-ui/core/Utils";
12
12
  // src/Components/NumberField/NumberField.vue?vue&type=script&setup=true&lang.ts
13
13
  var M = /*@__PURE__*/ h({
@@ -47,54 +47,54 @@ var M = /*@__PURE__*/ h({
47
47
  }),
48
48
  emits: /*@__PURE__*/ v(["change", "update:modelValue"], ["update:modelValue"]),
49
49
  setup(h, { emit: v }) {
50
- let M = e(), te = v, N = D(h, "modelValue"), P = h, F = C(P.defaultValue), I = r(N, F), { isSplit: L, decrement: R, formField: z, increment: B, inputBind: V, stringModel: H, decrementIcon: U, incrementIcon: W, mergedClasses: G, incrementFirst: K, stepperIconSize: q, controlVariantItem: J } = s(P, I, { onChange: (e) => te("change", e) }), Y = n(() => B(), () => ({ disabled: P.disabled })), X = n(() => R(), () => ({ disabled: P.disabled })), Z = l(() => i.filter((e) => !(e === "end" || e === "start" && L.value))), Q = l(() => c(P.customProps?.increment, {
50
+ let M = e(), N = v, te = D(h, "modelValue"), P = h, F = C(P.defaultValue), I = r(te, F), { isSplit: L, decrement: R, formField: z, increment: B, inputBind: V, stringModel: H, decrementIcon: U, incrementIcon: W, mergedClasses: G, incrementFirst: K, steppersLocked: q, stepperIconSize: J, controlVariantItem: Y } = o(P, I, { onChange: (e) => N("change", e) }), X = n(() => B(), () => ({ disabled: q.value })), Z = n(() => R(), () => ({ disabled: q.value })), ne = c(() => i.filter((e) => !(e === "end" || e === "start" && L.value))), Q = c(() => s(P.customProps?.increment, {
51
51
  type: "button",
52
- disabled: P.disabled,
53
- onClick: Y.onPressClick,
54
- onPointerup: Y.onPressPointerUp,
55
- onPointerdown: Y.onPressPointerDown,
52
+ disabled: q.value,
53
+ onClick: X.onPressClick,
54
+ onPointerup: X.onPressPointerUp,
55
+ onPointerdown: X.onPressPointerDown,
56
56
  "aria-label": M("Increment value"),
57
- onLostpointercapture: Y.onPressLostPointerCapture
57
+ onLostpointercapture: X.onPressLostPointerCapture
58
58
  }, j({
59
- [J.value.button]: !0,
59
+ [Y.value.button]: !0,
60
60
  [G.value.increment ?? ""]: !0
61
- }))), $ = l(() => c(P.customProps?.decrement, {
61
+ }))), $ = c(() => s(P.customProps?.decrement, {
62
62
  type: "button",
63
- disabled: P.disabled,
64
- onClick: X.onPressClick,
65
- onPointerup: X.onPressPointerUp,
66
- onPointerdown: X.onPressPointerDown,
63
+ disabled: q.value,
64
+ onClick: Z.onPressClick,
65
+ onPointerup: Z.onPressPointerUp,
66
+ onPointerdown: Z.onPressPointerDown,
67
67
  "aria-label": M("Decrement value"),
68
- onLostpointercapture: X.onPressLostPointerCapture
68
+ onLostpointercapture: Z.onPressLostPointerCapture
69
69
  }, j({
70
- [J.value.button]: !0,
70
+ [Y.value.button]: !0,
71
71
  [G.value.decrement ?? ""]: !0
72
72
  })));
73
- return (e, n) => (S(), ee(E(a), { field: E(z) }, p({
74
- end: k(() => [f("div", { class: b(E(J).endGroup) }, [
75
- E(K) ? (S(), d("button", x(y({ key: 0 }, Q.value)), [m(E(o), y({
73
+ return (e, n) => (S(), l(E(ee), { field: E(z) }, p({
74
+ end: k(() => [f("div", { class: b(E(Y).endGroup) }, [
75
+ E(K) ? (S(), d("button", x(y({ key: 0 }, Q.value)), [m(E(a), y({
76
76
  icon: E(W),
77
- size: E(q)
77
+ size: E(J)
78
78
  }, P.customProps?.incrementIcon), null, 16, ["icon", "size"])], 16)) : u("", !0),
79
- E(L) ? u("", !0) : (S(), d("button", x(y({ key: 1 }, $.value)), [m(E(o), y({
79
+ E(L) ? u("", !0) : (S(), d("button", x(y({ key: 1 }, $.value)), [m(E(a), y({
80
80
  icon: E(U),
81
- size: E(q)
81
+ size: E(J)
82
82
  }, P.customProps?.decrementIcon), null, 16, ["icon", "size"])], 16)),
83
- E(K) ? u("", !0) : (S(), d("button", x(y({ key: 2 }, Q.value)), [m(E(o), y({
83
+ E(K) ? u("", !0) : (S(), d("button", x(y({ key: 2 }, Q.value)), [m(E(a), y({
84
84
  icon: E(W),
85
- size: E(q)
85
+ size: E(J)
86
86
  }, P.customProps?.incrementIcon), null, 16, ["icon", "size"])], 16))
87
87
  ], 2)]),
88
88
  default: k(() => [A(f("input", y({ "onUpdate:modelValue": n[0] ||= (e) => _(H) ? H.value = e : null }, E(V)), null, 16), [[O, E(H)]])]),
89
89
  _: 2
90
- }, [w(E(t)(Z.value, e.$slots), (t) => ({
90
+ }, [w(E(t)(ne.value, e.$slots), (t) => ({
91
91
  name: t,
92
92
  fn: k((n) => [T(e.$slots, t, x(g(n || {})))])
93
93
  })), E(L) ? {
94
94
  name: "start",
95
- fn: k(() => [f("div", { class: b(E(J).startGroup) }, [f("button", x(g($.value)), [m(E(o), y({
95
+ fn: k(() => [f("div", { class: b(E(Y).startGroup) }, [f("button", x(g($.value)), [m(E(a), y({
96
96
  icon: E(U),
97
- size: E(q)
97
+ size: E(J)
98
98
  }, P.customProps?.decrementIcon), null, 16, ["icon", "size"])], 16)], 2)]),
99
99
  key: "0"
100
100
  } : void 0]), 1032, ["field"]));
@@ -696,6 +696,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
696
696
  }>>;
697
697
  stringModel: import('vue').WritableComputedRef<string, string | null | undefined>;
698
698
  mergedClasses: import('vue').ComputedRef<Partial<NumberFieldClasses>>;
699
+ steppersLocked: import('vue').ComputedRef<boolean>;
699
700
  stepperIconSize: import('vue').ComputedRef<keyof import('@bridge-ui/core/Tokens').IconSize>;
700
701
  controlVariantItem: import('vue').ComputedRef<import('@bridge-ui/core/Tokens').NumberFieldControlVariantItem>;
701
702
  isSplit: import('vue').ComputedRef<boolean>;
@@ -38,13 +38,13 @@ function p(p, m, h = {}) {
38
38
  }, {
39
39
  componentName: "NumberField",
40
40
  reservedSlots: () => C.value.isSplit ? ["start", "end"] : ["end"]
41
- }), E = i(() => l(T.merged.value.size, S.value)), D = i(() => t(T.inputBind.value, {
41
+ }), E = i(() => l(T.merged.value.size, S.value)), D = i(() => !!(p.disabled || p.readonly)), O = i(() => t(T.inputBind.value, {
42
42
  min: p.min,
43
43
  max: p.max,
44
44
  type: "number",
45
45
  step: _.value
46
- }, d({ "appearance:textfield [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none": !0 }))), O = i(() => m.value ?? void 0), k = i({
47
- get: () => s(O.value) ? "" : String(O.value),
46
+ }, d({ "appearance:textfield [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none": !0 }))), k = i(() => m.value ?? void 0), A = i({
47
+ get: () => s(k.value) ? "" : String(k.value),
48
48
  set: (e) => {
49
49
  if (e === "" || s(e)) {
50
50
  m.value = void 0;
@@ -53,22 +53,23 @@ function p(p, m, h = {}) {
53
53
  let t = Number(e);
54
54
  Number.isNaN(t) || (m.value = t, h.onChange?.(t));
55
55
  }
56
- }), A = (e) => {
56
+ }), j = (e) => {
57
57
  m.value = e, h.onChange?.(e);
58
58
  };
59
59
  return {
60
60
  decrement: () => {
61
- let e = (O.value ?? p.min ?? 0) - _.value;
62
- return !s(p.min) && e < p.min ? !1 : (A(e), !0);
61
+ let e = (k.value ?? p.min ?? 0) - _.value;
62
+ return !s(p.min) && e < p.min ? !1 : (j(e), !0);
63
63
  },
64
64
  formField: T,
65
65
  increment: () => {
66
- let e = (O.value ?? p.min ?? 0) + _.value;
67
- return !s(p.max) && e > p.max ? !1 : (A(e), !0);
66
+ let e = (k.value ?? p.min ?? 0) + _.value;
67
+ return !s(p.max) && e > p.max ? !1 : (j(e), !0);
68
68
  },
69
- inputBind: D,
70
- stringModel: k,
69
+ inputBind: O,
70
+ stringModel: A,
71
71
  mergedClasses: x,
72
+ steppersLocked: D,
72
73
  stepperIconSize: E,
73
74
  controlVariantItem: w,
74
75
  isSplit: i(() => C.value.isSplit),
@@ -148,6 +148,7 @@ function w(w, T, E = {}, D = {
148
148
  k.value[e]?.select();
149
149
  },
150
150
  handlePinPaste: (e, t) => {
151
+ if (B.value) return;
151
152
  let n = t.clipboardData?.getData("text") ?? "", r = d({
152
153
  index: e,
153
154
  pasted: n,
@@ -162,7 +163,12 @@ function w(w, T, E = {}, D = {
162
163
  key: t.key,
163
164
  digits: Y.value
164
165
  });
165
- n && (t.preventDefault(), X(n.digits, n.focusIndex));
166
+ if (n) {
167
+ if (B.value) {
168
+ let { focusIndex: r } = n;
169
+ n.digits.every((e, t) => e === Y.value[t]) && r != null && r !== e && (t.preventDefault(), k.value[r]?.focus());
170
+ } else t.preventDefault(), X(n.digits, n.focusIndex);
171
+ }
166
172
  }
167
173
  };
168
174
  }
@@ -0,0 +1,4 @@
1
+ import e from "./QrCode.vue_vue_type_script_setup_true_lang.js";
2
+ // src/Components/QrCode/QrCode.vue
3
+ var t = e;
4
+ export { t as default };
@@ -0,0 +1,17 @@
1
+ import { QrCodeOwnProps, QrCodeSlots } from './qrCode.types';
2
+ type __VLS_Slots = QrCodeSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<QrCodeOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ refresh: () => any;
5
+ }, string, import('vue').PublicProps, Readonly<QrCodeOwnProps> & Readonly<{
6
+ onRefresh?: (() => any) | undefined;
7
+ }>, {
8
+ bordered: boolean;
9
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,45 @@
1
+ import e from "../Button/Button.js";
2
+ import { useQrCode as t } from "./composables/useQrCode.js";
3
+ import n from "../Skeleton/Skeleton.js";
4
+ import { hasNamedSlot as r } from "../../Utils/slotOrProp.js";
5
+ import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g } from "vue";
6
+ // src/Components/QrCode/QrCode.vue?vue&type=script&setup=true&lang.ts
7
+ var _ = /*@__PURE__*/ l({
8
+ inheritAttrs: !1,
9
+ __name: "QrCode",
10
+ props: {
11
+ background: {},
12
+ bordered: {
13
+ type: Boolean,
14
+ default: void 0
15
+ },
16
+ classes: {},
17
+ color: {},
18
+ customProps: {},
19
+ errorLevel: {},
20
+ icon: {},
21
+ iconSize: {},
22
+ label: {},
23
+ rounded: {},
24
+ size: {},
25
+ status: {},
26
+ value: {}
27
+ },
28
+ emits: ["refresh"],
29
+ setup(l, { emit: _ }) {
30
+ let { slots: v, hasIcon: y, svgBind: b, rootBind: x, codeBind: S, pathBind: C, iconBind: w, isLoading: T, isExpired: E, showRefresh: D, overlayBind: O, skeletonBind: k, handleRefresh: A, expiredMessage: j, refreshButtonBind: M } = t(l, {
31
+ size: 160,
32
+ rounded: "xl",
33
+ color: "#000",
34
+ bordered: !0,
35
+ errorLevel: "M",
36
+ status: "active",
37
+ background: "#fff"
38
+ }, _);
39
+ return (t, l) => (p(), s("div", f(u(g(x))), [c("div", f(u(g(S))), [g(T) ? (p(), s(i, { key: 0 }, [g(r)(g(v), "loading") ? m(t.$slots, "loading", {}, void 0, void 0, 0) : (p(), a(g(n), f(d({ key: 1 }, g(k))), null, 16))], 64)) : (p(), s(i, { key: 1 }, [(p(), s("svg", f(u(g(b))), [c("path", f(u(g(C))), null, 16)], 16)), g(y) ? (p(), s("img", f(d({ key: 0 }, g(w))), null, 16)) : o("", !0)], 64))], 16), c("div", f(u(g(O))), [g(E) ? (p(), s(i, { key: 0 }, [g(r)(g(v), "expired") ? m(t.$slots, "expired", {}, void 0, void 0, 0) : (p(), s(i, { key: 1 }, [c("span", null, h(g(j)), 1), g(D) ? (p(), a(g(e), d({
40
+ key: 0,
41
+ onClick: g(A)
42
+ }, g(M)), null, 16, ["onClick"])) : o("", !0)], 64))], 64)) : o("", !0)], 16)], 16));
43
+ }
44
+ });
45
+ export { _ as default };