@bridge-ui/vue 0.25.0 → 0.27.0

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 (102) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +2 -1
  2. package/dist/Components/ActionFooter/ActionFooter.vue.d.ts +2 -2
  3. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +4 -4
  4. package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +4 -3
  5. package/dist/Components/Autocomplete/composables/useAutocomplete.js +1 -1
  6. package/dist/Components/BaseField/composables/useBaseField.js +0 -1
  7. package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +62 -58
  8. package/dist/Components/Calendar/calendar.types.d.ts +8 -0
  9. package/dist/Components/Calendar/composables/useCalendar.d.ts +2 -1
  10. package/dist/Components/Calendar/composables/useCalendar.js +188 -177
  11. package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +96 -92
  12. package/dist/Components/CalendarRange/calendarRange.types.d.ts +8 -0
  13. package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +2 -1
  14. package/dist/Components/CalendarRange/composables/useCalendarRange.js +203 -220
  15. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -1
  16. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +1 -0
  17. package/dist/Components/Checkbox/composables/useCheckbox.js +2 -1
  18. package/dist/Components/ColorField/ColorField.vue.d.ts +2 -2
  19. package/dist/Components/ColorField/composables/useColorField.js +1 -1
  20. package/dist/Components/ColorPicker/ColorPicker.vue.d.ts +2 -2
  21. package/dist/Components/DateField/DateField.vue.d.ts +2 -2
  22. package/dist/Components/DateField/composables/useDateField.js +1 -1
  23. package/dist/Components/DatePicker/DatePicker.vue.d.ts +2 -2
  24. package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +1 -0
  25. package/dist/Components/DateRangeField/DateRangeField.vue.d.ts +2 -2
  26. package/dist/Components/DateRangeField/composables/useDateRangeField.js +1 -1
  27. package/dist/Components/DateRangePicker/DateRangePicker.vue.d.ts +2 -2
  28. package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +1 -0
  29. package/dist/Components/DateTimeField/DateTimeField.vue.d.ts +2 -2
  30. package/dist/Components/DateTimeField/composables/useDateTimeField.js +1 -1
  31. package/dist/Components/DateTimePicker/DateTimePicker.vue.d.ts +2 -2
  32. package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +1 -0
  33. package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue.d.ts +2 -2
  34. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +1 -1
  35. package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts +2 -2
  36. package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +1 -0
  37. package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
  38. package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
  39. package/dist/Components/FormControl/composables/useFormControl.d.ts +1 -0
  40. package/dist/Components/FormControl/composables/useFormControl.js +14 -11
  41. package/dist/Components/FormField/composables/useFormField.js +0 -1
  42. package/dist/Components/List/List.vue_vue_type_script_setup_true_lang.js +2 -1
  43. package/dist/Components/List/composables/useList.d.ts +1 -1
  44. package/dist/Components/List/composables/useList.js +5 -1
  45. package/dist/Components/List/index.d.ts +1 -1
  46. package/dist/Components/List/list.types.d.ts +10 -1
  47. package/dist/Components/List/listInjectionKey.d.ts +2 -0
  48. package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +1 -0
  49. package/dist/Components/ListItem/composables/useListItem.d.ts +1 -2
  50. package/dist/Components/ListItem/composables/useListItem.js +92 -86
  51. package/dist/Components/ListItem/listItem.types.d.ts +8 -0
  52. package/dist/Components/ListSection/composables/useListSection.js +31 -29
  53. package/dist/Components/Listbox/Listbox.vue.d.ts +2 -2
  54. package/dist/Components/Listbox/listbox.types.d.ts +2 -2
  55. package/dist/Components/Modal/Modal.vue.d.ts +1 -1
  56. package/dist/Components/Modal/composables/useModal.d.ts +1 -1
  57. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +30 -30
  58. package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -0
  59. package/dist/Components/NumberField/composables/useNumberField.js +11 -10
  60. package/dist/Components/OtpField/composables/useOtpField.js +7 -1
  61. package/dist/Components/Pagination/Pagination.vue.d.ts +2 -2
  62. package/dist/Components/QrCode/QrCode.js +4 -0
  63. package/dist/Components/QrCode/QrCode.vue.d.ts +17 -0
  64. package/dist/Components/QrCode/QrCode.vue_vue_type_script_setup_true_lang.js +45 -0
  65. package/dist/Components/QrCode/composables/useQrCode.d.ts +881 -0
  66. package/dist/Components/QrCode/composables/useQrCode.js +137 -0
  67. package/dist/Components/QrCode/index.d.ts +3 -0
  68. package/dist/Components/QrCode/index.js +3 -0
  69. package/dist/Components/QrCode/qrCode.types.d.ts +168 -0
  70. package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -1
  71. package/dist/Components/Radio/composables/useRadio.d.ts +1 -0
  72. package/dist/Components/Radio/composables/useRadio.js +2 -1
  73. package/dist/Components/Select/Select.vue.d.ts +4 -4
  74. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +4 -3
  75. package/dist/Components/Select/composables/useSelect.js +1 -1
  76. package/dist/Components/Sidebar/SidebarList.vue_vue_type_script_setup_true_lang.js +1 -0
  77. package/dist/Components/Sidebar/SidebarListItem.vue_vue_type_script_setup_true_lang.js +1 -0
  78. package/dist/Components/Slider/composables/useSlider.d.ts +2 -2
  79. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +1 -1
  80. package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -1
  81. package/dist/Components/Switch/composables/useSwitch.d.ts +1 -0
  82. package/dist/Components/Switch/composables/useSwitch.js +2 -1
  83. package/dist/Components/TimeField/TimeField.vue.d.ts +2 -2
  84. package/dist/Components/TimeField/composables/useTimeField.js +1 -1
  85. package/dist/Components/TimePicker/TimePicker.vue.d.ts +2 -2
  86. package/dist/Components/TimeRangeField/TimeRangeField.vue.d.ts +2 -2
  87. package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +1 -1
  88. package/dist/Components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -2
  89. package/dist/Utils/index.d.ts +2 -0
  90. package/dist/Utils/index.js +40 -39
  91. package/dist/Utils/useWheelNavigation.d.ts +11 -0
  92. package/dist/Utils/useWheelNavigation.js +20 -0
  93. package/dist/augments.d.ts +7 -1
  94. package/dist/index.d.ts +3 -1
  95. package/dist/index.js +84 -82
  96. package/docs/README.md +1 -0
  97. package/docs/components/Calendar.md +31 -30
  98. package/docs/components/CalendarRange.md +29 -28
  99. package/docs/components/I18n.md +2 -0
  100. package/docs/components/List.md +43 -27
  101. package/docs/components/QrCode.md +134 -0
  102. package/package.json +3 -3
@@ -5,14 +5,15 @@ import { mergePartBind as r, useBridgeUIComponent as i, useBridgeUIMergedRegistr
5
5
  import { resolveLinkAsProps as o } from "../../../Utils/linkAs.js";
6
6
  import { computed as s, getCurrentInstance as c, inject as l, onBeforeUnmount as u, toValue as d, useAttrs as f, watch as p } from "vue";
7
7
  import { get as m, isNil as h, isNull as g, omit as _ } from "es-toolkit/compat";
8
- import { getListboxOptionId as v, listboxOptionFromComposedItem as y } from "@bridge-ui/core/Domain";
9
- import { cn as b, splitComponentProps as x } from "@bridge-ui/core/Utils";
8
+ import { getListboxOptionId as v, listboxOptionFromComposedItem as y, resolveListSizeClasses as b } from "@bridge-ui/core/Domain";
9
+ import { cn as x, splitComponentProps as ee } from "@bridge-ui/core/Utils";
10
10
  // src/Components/ListItem/composables/useListItem.ts
11
11
  var S = [
12
12
  "as",
13
13
  "rel",
14
14
  "href",
15
15
  "role",
16
+ "size",
16
17
  "dense",
17
18
  "value",
18
19
  "linkAs",
@@ -29,132 +30,137 @@ var S = [
29
30
  "selectedIcon"
30
31
  ];
31
32
  function C(C, w, T) {
32
- let E = f(), D = l(t, null), O = l(n, null), k = !h(O), A = s(() => x({
33
+ let E = f(), D = l(t, null), O = l(n, null), k = !h(O), A = s(() => ee({
33
34
  props: {
34
35
  ...E,
35
36
  ...C
36
37
  },
37
38
  bridgeKeys: S
38
- })), { merged: j, entry: M } = i({
39
+ })), { merged: j, components: M, entry: N } = i({
39
40
  libDefaults: w,
40
41
  componentName: "ListItem",
41
42
  props: () => A.value.componentProps
42
- }), N = s(() => O ? d(O) : null), P = s(() => k ? y({
43
+ }), P = s(() => O ? d(O) : null), F = s(() => k ? y({
43
44
  value: j.value.value,
44
45
  primary: j.value.primary,
45
46
  disabled: j.value.disabled,
46
47
  secondary: j.value.secondary
47
- }) : null), F;
48
+ }) : null), I;
48
49
  p(() => {
49
- let e = P.value;
50
+ let e = F.value;
50
51
  return e ? `${String(e.value)}:${e.label}:${e.disabled}:${e.description ?? ""}` : null;
51
52
  }, () => {
52
- F?.(), F = void 0;
53
- let e = P.value;
54
- e && O && (F = d(O).registerOption(e));
53
+ I?.(), I = void 0;
54
+ let e = F.value;
55
+ e && O && (I = d(O).registerOption(e));
55
56
  }, { immediate: !0 }), u(() => {
56
- F?.();
57
+ I?.();
57
58
  });
58
- let I = s(() => !h(P.value)), L = s(() => !P.value || !N.value ? !1 : N.value.isSelected(P.value.value)), R = s(() => !P.value || !N.value ? -1 : N.value.getOptionIndex(P.value.value)), z = s(() => !N.value || R.value < 0 ? !1 : N.value.highlightedIndex === R.value), B = s(() => j.value.customProps), V = a({
59
- entry: M,
59
+ let L = s(() => !h(F.value)), R = s(() => !F.value || !P.value ? !1 : P.value.isSelected(F.value.value)), z = s(() => !F.value || !P.value ? -1 : P.value.getOptionIndex(F.value.value)), B = s(() => !P.value || z.value < 0 ? !1 : P.value.highlightedIndex === z.value), V = s(() => j.value.customProps), H = a({
60
+ entry: N,
60
61
  props: () => A.value.componentProps
61
- }), H = s(() => "dense" in (c()?.vnode.props ?? {}) ? C.dense === !0 : C.dense === !0 ? !0 : D ? d(D).dense : !1), U = s(() => e(T, "primary") || e(T, "default") || !!j.value.primary), W = s(() => e(T, "secondary") || !!j.value.secondary), G = s(() => I.value ? !L.value || !N.value?.showCheckmark ? null : "check" : !j.value.selected || g(j.value.selectedIcon) ? null : j.value.selectedIcon ?? "check"), K = s(() => e(T, "end") || G.value != null), q = s(() => _(A.value.inheritedAttrs, [])), J = s(() => r(B.value?.root, q.value, {
62
- class: b({
62
+ }), U = s(() => "dense" in (c()?.vnode.props ?? {}) ? C.dense === !0 : C.dense === !0 ? !0 : D ? d(D).dense : !1), W = s(() => {
63
+ let e = k ? void 0 : j.value.size ?? (D ? d(D).size : void 0);
64
+ return b(M.value, e);
65
+ }), G = s(() => e(T, "primary") || e(T, "default") || !!j.value.primary), K = s(() => e(T, "secondary") || !!j.value.secondary), q = s(() => L.value ? !R.value || !P.value?.showCheckmark ? null : "check" : !j.value.selected || g(j.value.selectedIcon) ? null : j.value.selectedIcon ?? "check"), J = s(() => e(T, "end") || q.value != null), Y = s(() => _(A.value.inheritedAttrs, [])), X = s(() => r(V.value?.root, Y.value, {
66
+ class: x({
63
67
  "list-none": !0,
64
68
  "border-b border-black/10 last:border-b-0 dark:border-white/10": j.value.divider,
65
- [m(V.value, "root") ?? ""]: !0
69
+ [m(H.value, "root") ?? ""]: !0
66
70
  }),
67
- id: I.value && N.value?.listboxId && R.value >= 0 ? v(N.value.listboxId, R.value) : void 0
68
- })), Y = s(() => !!j.value.href && !I.value), X = s(() => !!(j.value.interactive || I.value || Y.value)), Z = s(() => Y.value ? j.value.disabled || j.value.linkAs == null ? "a" : j.value.linkAs : "div"), Q = s(() => {
69
- if (!X.value) return null;
70
- let e = r(B.value?.interactive, o(j.value.linkAs, j.value.linkProps, Z.value), {
71
+ id: L.value && P.value?.listboxId && z.value >= 0 ? v(P.value.listboxId, z.value) : void 0
72
+ })), Z = s(() => !!j.value.href && !L.value), Q = s(() => !!(j.value.interactive || L.value || Z.value)), $ = s(() => Z.value ? j.value.disabled || j.value.linkAs == null ? "a" : j.value.linkAs : "div"), te = s(() => {
73
+ if (!Q.value) return null;
74
+ let e = r(V.value?.interactive, o(j.value.linkAs, j.value.linkProps, $.value), {
71
75
  "aria-disabled": j.value.disabled ? !0 : void 0,
72
- rel: Y.value && !j.value.disabled ? j.value.rel : void 0,
73
- "data-selected": j.value.selected || L.value ? !0 : void 0,
74
- "aria-selected": I.value ? L.value : void 0,
75
- href: Y.value && !j.value.disabled ? j.value.href : void 0,
76
- target: Y.value && !j.value.disabled ? j.value.target : void 0,
77
- role: I.value ? "option" : Y.value ? void 0 : j.value.role,
78
- onMousedown: I.value ? (e) => {
76
+ rel: Z.value && !j.value.disabled ? j.value.rel : void 0,
77
+ "data-selected": j.value.selected || R.value ? !0 : void 0,
78
+ "aria-selected": L.value ? R.value : void 0,
79
+ href: Z.value && !j.value.disabled ? j.value.href : void 0,
80
+ target: Z.value && !j.value.disabled ? j.value.target : void 0,
81
+ role: L.value ? "option" : Z.value ? void 0 : j.value.role,
82
+ onMousedown: L.value ? (e) => {
79
83
  e.preventDefault();
80
84
  } : void 0,
81
- tabindex: j.value.disabled || I.value ? -1 : Y.value ? void 0 : 0,
82
- onClick: I.value ? () => {
83
- P.value && N.value?.onSelect(P.value);
85
+ tabindex: j.value.disabled || L.value ? -1 : Z.value ? void 0 : 0,
86
+ onClick: L.value ? () => {
87
+ F.value && P.value?.onSelect(F.value);
84
88
  } : void 0,
85
- class: b({
86
- "flex w-full min-w-0 items-center gap-x-2 rounded-md text-left text-sm text-dark-900 outline-hidden transition-colors dark:text-dark-100": !0,
87
- "no-underline": Y.value,
89
+ class: x({
90
+ "flex w-full min-w-0 items-center gap-x-2 rounded-md text-left text-dark-900 outline-hidden transition-colors dark:text-dark-100": !0,
91
+ [W.value.item]: !L.value,
92
+ "no-underline": Z.value,
88
93
  "cursor-pointer select-none": !j.value.disabled,
89
- "px-2": !I.value,
90
- "py-1.5": !I.value && !H.value,
91
- "py-1": !I.value && H.value,
92
- "hover:bg-black/5 focus-visible:bg-black/5 dark:hover:bg-white/10 dark:focus-visible:bg-white/10": !j.value.disabled && !I.value,
93
- "bg-dark-100 font-medium text-dark-900 dark:bg-white/15 dark:text-white": j.value.selected && !I.value,
94
- [N.value?.optionHoverClass ?? ""]: I.value && !j.value.disabled && !L.value,
95
- [N.value?.mergedClasses.optionHover ?? ""]: I.value && !j.value.disabled && !L.value,
96
- [N.value?.optionSelectedClass ?? ""]: I.value && L.value,
97
- [N.value?.mergedClasses.optionSelected ?? ""]: I.value && L.value,
98
- [N.value?.optionHighlightedClass ?? ""]: I.value && z.value && !L.value,
99
- [N.value?.mergedClasses.optionHighlighted ?? ""]: I.value && z.value && !L.value,
94
+ "px-2": !L.value,
95
+ "py-1.5": !L.value && !U.value,
96
+ "py-1": !L.value && U.value,
97
+ "hover:bg-black/5 focus-visible:bg-black/5 dark:hover:bg-white/10 dark:focus-visible:bg-white/10": !j.value.disabled && !L.value,
98
+ "bg-dark-100 font-medium text-dark-900 dark:bg-white/15 dark:text-white": j.value.selected && !L.value,
99
+ [P.value?.optionHoverClass ?? ""]: L.value && !j.value.disabled && !R.value,
100
+ [P.value?.mergedClasses.optionHover ?? ""]: L.value && !j.value.disabled && !R.value,
101
+ [P.value?.optionSelectedClass ?? ""]: L.value && R.value,
102
+ [P.value?.mergedClasses.optionSelected ?? ""]: L.value && R.value,
103
+ [P.value?.optionHighlightedClass ?? ""]: L.value && B.value && !R.value,
104
+ [P.value?.mergedClasses.optionHighlighted ?? ""]: L.value && B.value && !R.value,
100
105
  "opacity-50 pointer-events-none": j.value.disabled,
101
- [N.value?.sizeClasses?.option ?? ""]: I.value,
102
- [m(V.value, "interactive") ?? ""]: !0
106
+ [P.value?.sizeClasses?.option ?? ""]: L.value,
107
+ [m(H.value, "interactive") ?? ""]: !0
103
108
  })
104
109
  });
105
- return !Y.value || !j.value.disabled ? e : {
110
+ return !Z.value || !j.value.disabled ? e : {
106
111
  ...e,
107
112
  rel: void 0,
108
113
  href: void 0,
109
114
  target: void 0
110
115
  };
111
- }), $ = s(() => b({
116
+ }), ne = s(() => x({
112
117
  "flex w-full min-w-0 items-center gap-x-2": !0,
113
- "rounded-md text-dark-900 dark:text-dark-100": !X.value,
114
- "px-2": !X.value,
115
- "py-1.5": !X.value && !H.value,
116
- "py-1": !X.value && H.value
117
- })), ee = s(() => r(B.value?.start, {}, b({
118
+ "rounded-md text-dark-900 dark:text-dark-100": !Q.value,
119
+ [W.value.item]: !Q.value,
120
+ "px-2": !Q.value,
121
+ "py-1.5": !Q.value && !U.value,
122
+ "py-1": !Q.value && U.value
123
+ })), re = s(() => r(V.value?.start, {}, x({
118
124
  "flex shrink-0 items-center text-dark-600 dark:text-dark-300": !0,
119
- [m(V.value, "start") ?? ""]: !0
120
- }))), te = s(() => r(B.value?.content, {}, b({
125
+ [m(H.value, "start") ?? ""]: !0
126
+ }))), ie = s(() => r(V.value?.content, {}, x({
121
127
  "min-w-0 flex-1": !0,
122
- [m(V.value, "content") ?? ""]: !0
123
- }))), ne = s(() => r(B.value?.primary, {}, b({
124
- "block truncate text-sm leading-normal font-medium": !0,
125
- [N.value?.sizeClasses?.primary ?? ""]: I.value,
126
- [m(V.value, "primary") ?? ""]: !0
127
- }))), re = s(() => r(B.value?.secondary, {}, b({
128
- "mt-0.5 block truncate text-xs leading-normal text-dark-500 dark:text-dark-400": !0,
129
- [N.value?.sizeClasses?.secondary ?? ""]: I.value,
130
- [m(V.value, "secondary") ?? ""]: !0
128
+ [m(H.value, "content") ?? ""]: !0
129
+ }))), ae = s(() => r(V.value?.primary, {}, x({
130
+ "block truncate leading-normal font-medium": !0,
131
+ [W.value.primary]: !L.value,
132
+ [P.value?.sizeClasses?.primary ?? ""]: L.value,
133
+ [m(H.value, "primary") ?? ""]: !0
134
+ }))), oe = s(() => r(V.value?.secondary, {}, x({
135
+ "mt-0.5 block truncate leading-normal text-dark-500 dark:text-dark-400": !0,
136
+ [W.value.secondary]: !L.value,
137
+ [P.value?.sizeClasses?.secondary ?? ""]: L.value,
138
+ [m(H.value, "secondary") ?? ""]: !0
131
139
  })));
132
140
  return {
133
141
  merged: j,
134
- hasEnd: K,
135
- endBind: s(() => r(B.value?.end, {}, b({
142
+ hasEnd: J,
143
+ endBind: s(() => r(V.value?.end, {}, x({
136
144
  "ml-auto flex shrink-0 items-center": !0,
137
- [m(V.value, "end") ?? ""]: !0
145
+ [m(H.value, "end") ?? ""]: !0
138
146
  }))),
139
- rootBind: J,
140
- rowClass: $,
141
- startBind: ee,
142
- hasPrimary: U,
143
- contentBind: te,
144
- primaryBind: ne,
145
- hasSecondary: W,
146
- secondaryBind: re,
147
- interactiveTag: Z,
148
- interactiveBind: Q,
149
- selectedIconBind: s(() => r(B.value?.selectedIcon, {}, {
150
- ...I.value ? {} : { size: "sm" },
151
- class: b({
152
- "block shrink-0": !0,
153
- [N.value?.checkClass ?? ""]: I.value,
154
- [m(V.value, "selectedIcon") ?? ""]: !0
155
- })
156
- })),
157
- resolvedSelectedIcon: G
147
+ rootBind: X,
148
+ rowClass: ne,
149
+ startBind: re,
150
+ hasPrimary: G,
151
+ contentBind: ie,
152
+ primaryBind: ae,
153
+ hasSecondary: K,
154
+ secondaryBind: oe,
155
+ interactiveTag: $,
156
+ interactiveBind: te,
157
+ selectedIconBind: s(() => r(V.value?.selectedIcon, {}, { class: x({
158
+ "block shrink-0": !0,
159
+ [W.value.icon]: !L.value,
160
+ [P.value?.checkClass ?? ""]: L.value,
161
+ [m(H.value, "selectedIcon") ?? ""]: !0
162
+ }) })),
163
+ resolvedSelectedIcon: q
158
164
  };
159
165
  }
160
166
  export { C as useListItem };
@@ -3,6 +3,7 @@ import { ListboxValue } from '@bridge-ui/core/Domain';
3
3
  import { MergeHtmlProps } from '@bridge-ui/core/Utils';
4
4
  import { IconSource } from '../../Adapters/Icon';
5
5
  import { IconProps } from '../Icon';
6
+ import { ListOwnProps } from '../List/list.types';
6
7
  import { LinkAsTag, LinkHref, LinkPropsOf } from '../../Utils/linkAs';
7
8
  export interface ListItemClasses {
8
9
  /**
@@ -179,6 +180,13 @@ export interface ListItemOwnProps<T extends LinkAsTag = "a"> {
179
180
  * @default Check
180
181
  */
181
182
  selectedIcon?: null | IconSource;
183
+ /**
184
+ * Typography scale for the row. Inherits `size` from parent `List` when
185
+ * omitted. Ignored inside a `Listbox`, which applies its own size.
186
+ *
187
+ * @default undefined
188
+ */
189
+ size?: ListOwnProps["size"];
182
190
  /**
183
191
  * Where to open the URL. Forwarded to the anchor when `href` is set.
184
192
  *
@@ -4,9 +4,10 @@ import { LIST_SECTION_INJECTION_KEY as n } from "../listSectionInjectionKey.js";
4
4
  import { mergePartBind as r, useBridgeUIComponent as i, useBridgeUIMergedRegistryClasses as a } from "../../../Utils/index.js";
5
5
  import { computed as o, inject as s, toValue as c, useAttrs as l } from "vue";
6
6
  import { get as u, isNil as d, omit as f } from "es-toolkit/compat";
7
- import { cn as p, splitComponentProps as m } from "@bridge-ui/core/Utils";
7
+ import { resolveListSizeClasses as p } from "@bridge-ui/core/Domain";
8
+ import { cn as m, splitComponentProps as h } from "@bridge-ui/core/Utils";
8
9
  // src/Components/ListSection/composables/useListSection.ts
9
- var h = [
10
+ var g = [
10
11
  "as",
11
12
  "inset",
12
13
  "title",
@@ -14,41 +15,42 @@ var h = [
14
15
  "classes",
15
16
  "customProps"
16
17
  ];
17
- function g(g) {
18
- let _ = l(), v = s(e, null), y = s(n, null), b = s(t, null), x = o(() => b ? c(b) : null), S = o(() => m({
18
+ function _(_) {
19
+ let v = l(), y = s(e, null), b = s(n, null), x = s(t, null), S = o(() => x ? c(x) : null), C = o(() => h({
19
20
  props: {
20
- ..._,
21
- ...g
21
+ ...v,
22
+ ..._
22
23
  },
23
- bridgeKeys: h
24
- })), { merged: C, entry: w } = i({
24
+ bridgeKeys: g
25
+ })), { merged: w, components: T, entry: E } = i({
25
26
  componentName: "ListSection",
26
- props: () => S.value.componentProps
27
- }), T = o(() => C.value.customProps), E = a({
28
- entry: w,
29
- props: () => S.value.componentProps
30
- }), D = o(() => v ? c(v).dense : !1), O = o(() => y ? c(y).hidden : !1), k = o(() => f(S.value.inheritedAttrs, [])), A = o(() => C.value.as === "div");
27
+ props: () => C.value.componentProps
28
+ }), D = o(() => w.value.customProps), O = a({
29
+ entry: E,
30
+ props: () => C.value.componentProps
31
+ }), k = o(() => y ? c(y).dense : !1), A = o(() => p(T.value, y ? c(y).size : void 0)), j = o(() => b ? c(b).hidden : !1), M = o(() => f(C.value.inheritedAttrs, [])), N = o(() => w.value.as === "div");
31
32
  return {
32
- merged: C,
33
- rootBind: o(() => r(T.value?.root, k.value, p({
33
+ merged: w,
34
+ rootBind: o(() => r(D.value?.root, M.value, m({
34
35
  "mt-1 list-none first:mt-0": !0,
35
- "sticky top-0 z-10 bg-white dark:bg-dark-800": C.value.sticky && !A.value,
36
- [u(E.value, "root") ?? ""]: !0
36
+ "sticky top-0 z-10 bg-white dark:bg-dark-800": w.value.sticky && !N.value,
37
+ [u(O.value, "root") ?? ""]: !0
37
38
  }))),
38
- isHidden: O,
39
- titleBind: o(() => r(T.value?.title, {}, {
39
+ isHidden: j,
40
+ titleBind: o(() => r(D.value?.title, {}, {
40
41
  role: "presentation",
41
- class: p({
42
- "sticky top-0 z-10 bg-white dark:bg-dark-800": C.value.sticky && A.value,
43
- "px-2": d(b),
44
- "py-1": d(b) && D.value,
45
- "py-1.5": d(b) && !D.value,
46
- [x.value?.sizeClasses?.option ?? ""]: !d(b),
47
- "text-xs font-medium text-dark-500 dark:text-dark-400": !0,
48
- "pl-14": C.value.inset,
49
- [u(E.value, "title") ?? ""]: !0
42
+ class: m({
43
+ "sticky top-0 z-10 bg-white dark:bg-dark-800": w.value.sticky && N.value,
44
+ "px-2": d(x),
45
+ "py-1": d(x) && k.value,
46
+ "py-1.5": d(x) && !k.value,
47
+ [S.value?.sizeClasses?.option ?? ""]: !d(x),
48
+ "font-medium text-dark-500 dark:text-dark-400": !0,
49
+ [d(x) ? A.value.section : "text-xs"]: !0,
50
+ "pl-14": w.value.inset,
51
+ [u(O.value, "title") ?? ""]: !0
50
52
  })
51
53
  }))
52
54
  };
53
55
  }
54
- export { g as useListSection };
56
+ export { _ as useListSection };
@@ -7,16 +7,16 @@ type __VLS_ModelProps = {
7
7
  };
8
8
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
9
  declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
- apply: () => any;
11
10
  cancel: () => any;
12
11
  select: (option: ListboxOption) => any;
12
+ apply: () => any;
13
13
  "update:modelValue": (value: boolean) => any;
14
14
  "show-change": (show: boolean) => any;
15
15
  "registered-options-change": (options: ListboxOption[]) => any;
16
16
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
- onApply?: (() => any) | undefined;
18
17
  onCancel?: (() => any) | undefined;
19
18
  onSelect?: ((option: ListboxOption) => any) | undefined;
19
+ onApply?: (() => any) | undefined;
20
20
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
21
21
  "onShow-change"?: ((show: boolean) => any) | undefined;
22
22
  "onRegistered-options-change"?: ((options: ListboxOption[]) => any) | undefined;
@@ -78,14 +78,14 @@ export interface ListboxCustomProps {
78
78
  *
79
79
  * @default undefined
80
80
  */
81
- list?: Partial<ListOwnProps>;
81
+ list?: Partial<Omit<ListOwnProps, "size">>;
82
82
  /**
83
83
  * Props forwarded to each mapped `ListItem` option.
84
84
  * Merged last so they override Listbox defaults.
85
85
  *
86
86
  * @default undefined
87
87
  */
88
- listItem?: Partial<ListItemOwnProps>;
88
+ listItem?: Partial<Omit<ListItemOwnProps, "size">>;
89
89
  /**
90
90
  * Props forwarded to each mapped `ListSection`.
91
91
  *
@@ -16,6 +16,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
16
16
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
17
  "onShow-change"?: ((show: boolean) => any) | undefined;
18
18
  }>, {
19
+ scroll: keyof import('@bridge-ui/core/Tokens').ModalScroll;
19
20
  autoFocus: boolean;
20
21
  closeOnEscape: boolean;
21
22
  closeOnOverlay: boolean;
@@ -25,7 +26,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
25
26
  hideBackdrop: boolean;
26
27
  keepMounted: boolean;
27
28
  persistent: boolean;
28
- scroll: keyof import('@bridge-ui/core/Tokens').ModalScroll;
29
29
  teleportTo: string | false;
30
30
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
31
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -34,7 +34,7 @@ export declare function useModal(props: ModalOwnProps, libDefaults: ModalLibDefa
34
34
  };
35
35
  "aria-hidden": boolean | undefined;
36
36
  class: string;
37
- }, "class", import('vue').HTMLAttributes | undefined, Omit<ModalProps, "size" | "classes" | "customProps" | "transition" | "autoFocus" | "blur" | "closeOnEscape" | "closeOnOverlay" | "disableEnforceFocus" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "persistent" | "scroll" | "stackId" | "teleportTo" | "align">>>;
37
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<ModalProps, "size" | "blur" | "scroll" | "classes" | "customProps" | "transition" | "autoFocus" | "closeOnEscape" | "closeOnOverlay" | "disableEnforceFocus" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "persistent" | "stackId" | "teleportTo" | "align">>>;
38
38
  panelBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
39
39
  "data-modal-part": string;
40
40
  "data-state": "open" | "closed";
@@ -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
  }
@@ -8,15 +8,15 @@ type __VLS_ModelProps = {
8
8
  };
9
9
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
10
  declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ change: (page: number) => any;
11
12
  next: () => any;
12
13
  previous: () => any;
13
- change: (page: number) => any;
14
14
  "update:modelValue": (...args: unknown[]) => any;
15
15
  "update:cursor": (...args: unknown[]) => any;
16
16
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ onChange?: ((page: number) => any) | undefined;
17
18
  onNext?: (() => any) | undefined;
18
19
  onPrevious?: (() => any) | undefined;
19
- onChange?: ((page: number) => any) | undefined;
20
20
  "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
21
21
  "onUpdate:cursor"?: ((...args: unknown[]) => any) | undefined;
22
22
  }>, {
@@ -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 };