@bridge-ui/vue 0.0.1 → 0.0.3

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 (83) hide show
  1. package/dist/Actions/Dialog/BridgeDialogAction.vue_vue_type_script_setup_true_lang.js +19 -35
  2. package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +41 -54
  3. package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +1 -1
  4. package/dist/Components/Alert/alertDefaultIcons.d.ts +1 -1
  5. package/dist/Components/Alert/composables/useAlert.js +2 -2
  6. package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -0
  7. package/dist/Components/Avatar/avatar.types.d.ts +34 -1
  8. package/dist/Components/Avatar/composables/useAvatar.d.ts +4 -4
  9. package/dist/Components/Avatar/composables/useAvatar.js +10 -9
  10. package/dist/Components/Avatar/index.d.ts +1 -1
  11. package/dist/Components/Badge/composables/useBadge.js +2 -2
  12. package/dist/Components/Button/composables/useButton.d.ts +1 -1
  13. package/dist/Components/Button/composables/useButton.js +2 -2
  14. package/dist/Components/Card/composables/useCard.js +4 -4
  15. package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +0 -1
  16. package/dist/Components/Checkbox/composables/useCheckbox.d.ts +5 -10
  17. package/dist/Components/Checkbox/composables/useCheckbox.js +2 -2
  18. package/dist/Components/Chip/composables/useChip.js +2 -2
  19. package/dist/Components/Divider/composables/useDivider.js +2 -2
  20. package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
  21. package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
  22. package/dist/Components/Drawer/composables/useDrawer.js +2 -2
  23. package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +24 -18
  24. package/dist/Components/FormControl/FormControlLabel.js +5 -0
  25. package/dist/Components/FormControl/FormControlLabel.vue.d.ts +8 -0
  26. package/dist/Components/FormControl/FormControlLabel.vue_vue_type_script_setup_true_lang.js +19 -0
  27. package/dist/Components/FormControl/composables/useFormControl.d.ts +7 -11
  28. package/dist/Components/FormControl/composables/useFormControl.js +62 -68
  29. package/dist/Components/FormControl/formControl.types.d.ts +19 -30
  30. package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +23 -25
  31. package/dist/Components/FormField/FormFieldLabel.js +5 -0
  32. package/dist/Components/FormField/FormFieldLabel.vue.d.ts +7 -0
  33. package/dist/Components/FormField/FormFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
  34. package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +22 -24
  35. package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
  36. package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +25 -27
  37. package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
  38. package/dist/Components/FormField/composables/useFormField.d.ts +3 -3
  39. package/dist/Components/FormField/composables/useFormField.js +112 -111
  40. package/dist/Components/FormField/formField.types.d.ts +6 -3
  41. package/dist/Components/Icon/composables/useIcon.js +2 -2
  42. package/dist/Components/Label/composables/useLabel.js +2 -2
  43. package/dist/Components/Link/composables/useLink.js +2 -2
  44. package/dist/Components/Listbox/Listbox.vue.d.ts +1 -1
  45. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +78 -112
  46. package/dist/Components/Listbox/composables/useListbox.js +2 -2
  47. package/dist/Components/Listbox/listbox.types.d.ts +49 -6
  48. package/dist/Components/Menu/Menu.vue.d.ts +2 -2
  49. package/dist/Components/Menu/composables/useMenu.d.ts +1 -1
  50. package/dist/Components/Menu/composables/useMenu.js +2 -2
  51. package/dist/Components/Modal/composables/useModal.js +2 -2
  52. package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +42 -44
  53. package/dist/Components/NumberField/composables/useNumberField.d.ts +3 -4
  54. package/dist/Components/NumberField/numberField.types.d.ts +34 -2
  55. package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +28 -29
  56. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +3 -4
  57. package/dist/Components/PasswordField/passwordField.types.d.ts +22 -2
  58. package/dist/Components/Progress/composables/useProgress.js +2 -2
  59. package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +0 -1
  60. package/dist/Components/Radio/composables/useRadio.d.ts +5 -10
  61. package/dist/Components/Radio/composables/useRadio.js +2 -2
  62. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +55 -54
  63. package/dist/Components/Select/composables/useSelect.d.ts +16 -15
  64. package/dist/Components/Select/composables/useSelect.js +14 -13
  65. package/dist/Components/Select/select.types.d.ts +19 -3
  66. package/dist/Components/Skeleton/composables/useSkeleton.js +2 -2
  67. package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
  68. package/dist/Components/Spinner/composables/useSpinner.js +2 -2
  69. package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +0 -1
  70. package/dist/Components/Switch/composables/useSwitch.d.ts +5 -10
  71. package/dist/Components/Switch/composables/useSwitch.js +2 -2
  72. package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +16 -16
  73. package/dist/Components/Tabs/composables/useTabs.js +2 -2
  74. package/dist/Components/Tabs/tabs.types.d.ts +28 -2
  75. package/dist/Components/TextField/composables/useTextField.d.ts +3 -4
  76. package/dist/Components/Textarea/composables/useTextarea.d.ts +3 -4
  77. package/dist/Components/Textarea/composables/useTextarea.js +2 -2
  78. package/dist/Utils/index.d.ts +9 -2
  79. package/dist/Utils/index.js +11 -11
  80. package/dist/index.d.ts +1 -1
  81. package/dist/index.js +14 -14
  82. package/dist/theme.css +1 -1
  83. package/package.json +2 -2
@@ -1,16 +1,17 @@
1
1
  import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp.js";
2
- import n from "../List/List.js";
3
- import { useListbox as r } from "./composables/useListbox.js";
4
- import { LISTBOX_INJECTION_KEY as i } from "./listboxInjectionKey.js";
5
- import a from "../ListItem/ListItem.js";
6
- import o from "../ListSection/ListSection.js";
7
- import s from "../Menu/Menu.js";
8
- import ee from "../Progress/Progress.js";
9
- import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as te, createVNode as m, defineComponent as h, guardReactiveProps as g, mergeModels as _, mergeProps as v, normalizeClass as y, normalizeProps as b, openBlock as x, provide as S, ref as C, renderList as ne, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, useModel as O, useSlots as k, watch as A, withCtx as j } from "vue";
10
- import { cn as M, entriesFromListboxOptions as re, flattenListboxOptions as ie, mapListboxEntriesToRows as ae } from "@bridge-ui/core";
11
- import { Check as oe } from "@lucide/vue";
2
+ import { mergeNestedComponentProps as n } from "../../Utils/index.js";
3
+ import r from "../List/List.js";
4
+ import { useListbox as i } from "./composables/useListbox.js";
5
+ import { LISTBOX_INJECTION_KEY as ee } from "./listboxInjectionKey.js";
6
+ import te from "../ListItem/ListItem.js";
7
+ import ne from "../ListSection/ListSection.js";
8
+ import a from "../Menu/Menu.js";
9
+ import o from "../Progress/Progress.js";
10
+ import { Fragment as s, 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, mergeModels as _, mergeProps as v, normalizeProps as y, openBlock as b, provide as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, useModel as re, useSlots as ie, watch as O, withCtx as k } from "vue";
11
+ import { isNil as ae } from "es-toolkit/compat";
12
+ import { cn as A, entriesFromListboxOptions as j, flattenListboxOptions as M, mapListboxEntriesToRows as N } from "@bridge-ui/core";
12
13
  //#region src/Components/Listbox/Listbox.vue?vue&type=script&setup=true&lang.ts
13
- var se = { key: 1 }, N = /* @__PURE__ */ h({
14
+ var P = { key: 1 }, F = /* @__PURE__ */ h({
14
15
  __name: "Listbox",
15
16
  props: /* @__PURE__ */ _({
16
17
  anchorEl: {},
@@ -45,6 +46,7 @@ var se = { key: 1 }, N = /* @__PURE__ */ h({
45
46
  },
46
47
  options: {},
47
48
  placement: { default: "bottom-start" },
49
+ rounded: {},
48
50
  showCheckmark: {
49
51
  type: Boolean,
50
52
  default: !0
@@ -63,150 +65,114 @@ var se = { key: 1 }, N = /* @__PURE__ */ h({
63
65
  "show-change"
64
66
  ], ["update:modelValue"]),
65
67
  setup(h, { emit: _ }) {
66
- let N = k(), P = _, F = O(h, "modelValue");
67
- A(F, (e) => {
68
- P("show-change", e);
68
+ let F = ie(), I = _, L = re(h, "modelValue");
69
+ O(L, (e) => {
70
+ I("show-change", e);
69
71
  });
70
- let I = h, { merged: L, checkClass: R, scrollBind: z, messageBind: B, sizeClasses: V, mergedClasses: H, optionSelectedClass: U, optionHighlightedClass: W } = r(I, {
72
+ let R = h, { merged: z, checkClass: B, scrollBind: V, messageBind: H, sizeClasses: U, mergedClasses: W, optionSelectedClass: G, optionHighlightedClass: oe } = i(R, {
71
73
  size: "md",
72
74
  color: "primary"
73
- }), G = l(() => I.options ?? []), K = l(() => I.entries ? I.entries : re(G.value)), q = l(() => ie(K.value)), J = l(() => e(N, "default")), Y = l(() => !I.loading && !J.value && q.value.length === 0 && I.hideEmptyMessage !== !0), X = l(() => M(R.value, H.value.check)), Z = C([]);
75
+ }), K = c(() => R.options ?? []), q = c(() => R.entries ? R.entries : j(K.value)), J = c(() => M(q.value)), Y = c(() => e(F, "default")), X = c(() => !R.loading && !Y.value && J.value.length === 0 && R.hideEmptyMessage !== !0), se = c(() => A(B.value, W.value.check)), Z = S([]);
74
76
  function Q(e) {
75
- return I.isSelected?.(e) ?? !1;
77
+ return R.isSelected?.(e) ?? !1;
76
78
  }
77
79
  function ce(e) {
78
- return I.highlightedIndex === e;
80
+ e.disabled || I("select", e);
79
81
  }
80
82
  function le(e) {
81
- e.preventDefault();
82
- }
83
- function ue(e, t) {
84
- let n = {
85
- tabindex: -1,
86
- onMousedown: le,
87
- class: M(V.value?.option)
88
- };
89
- return Q(e.value) ? n.class = M(n.class, U.value, H.value.optionSelected) : ce(t) && (n.class = M(n.class, W.value, H.value.optionHighlighted)), {
90
- interactive: n,
91
- primary: { class: V.value?.primary },
92
- secondary: { class: V.value?.secondary }
93
- };
94
- }
95
- function $(e) {
96
- e.disabled || P("select", e);
97
- }
98
- function de(e) {
99
83
  return Z.value.some((t) => String(t.value) === String(e.value)) || (Z.value = [...Z.value, e]), () => {
100
84
  Z.value = Z.value.filter((t) => String(t.value) !== String(e.value));
101
85
  };
102
86
  }
103
- function fe(e) {
104
- return (J.value ? Z.value : q.value).findIndex((t) => String(t.value) === String(e));
87
+ function ue(e) {
88
+ return (Y.value ? Z.value : J.value).findIndex((t) => String(t.value) === String(e));
105
89
  }
106
- A(Z, (e) => {
107
- J.value && P("registered-options-change", e);
108
- }, { deep: !0 }), S(i, l(() => ({
109
- getOptionIndex: fe,
110
- registerOption: de,
111
- onSelect: $,
112
- listboxId: I.listboxId,
90
+ O(Z, (e) => {
91
+ Y.value && I("registered-options-change", e);
92
+ }, { deep: !0 }), x(ee, c(() => ({
93
+ getOptionIndex: ue,
94
+ registerOption: le,
95
+ onSelect: ce,
96
+ listboxId: R.listboxId,
113
97
  isSelected: Q,
114
- sizeClasses: V.value,
115
- showCheckmark: I.showCheckmark,
116
- checkClass: X.value,
117
- highlightedIndex: I.highlightedIndex,
118
- optionSelectedClass: U.value,
119
- optionHighlightedClass: W.value,
98
+ sizeClasses: U.value,
99
+ showCheckmark: R.showCheckmark,
100
+ checkClass: se.value,
101
+ highlightedIndex: R.highlightedIndex,
102
+ optionSelectedClass: G.value,
103
+ optionHighlightedClass: oe.value,
120
104
  mergedClasses: {
121
- optionSelected: H.value.optionSelected,
122
- optionHighlighted: H.value.optionHighlighted
105
+ optionSelected: W.value.optionSelected,
106
+ optionHighlighted: W.value.optionHighlighted
123
107
  }
124
108
  })));
125
- let pe = l(() => ae(K.value, Q));
126
- return (r, i) => (x(), u(D(s), {
127
- modelValue: F.value,
128
- "onUpdate:modelValue": i[0] ||= (e) => F.value = e,
109
+ let de = c(() => N(q.value, Q)), fe = c(() => z.value.customProps?.menu), pe = c(() => z.value.customProps?.list), $ = c(() => z.value.customProps?.listItem), me = c(() => z.value.customProps?.progress), he = c(() => z.value.customProps?.listSection), ge = c(() => ({
110
+ ...ae(R.rounded) ? {} : { rounded: R.rounded },
111
+ ...fe.value
112
+ })), _e = c(() => ({
113
+ size: "xs",
114
+ "aria-hidden": !0,
115
+ color: z.value.color,
116
+ ...n(me.value, {
117
+ class: "shrink-0",
118
+ classes: { bar: W.value.loading }
119
+ })
120
+ })), ve = c(() => ({
121
+ dense: !0,
122
+ role: "listbox",
123
+ id: R.listboxId,
124
+ "aria-labelledby": R.labelledBy,
125
+ "aria-multiselectable": R.multiple || void 0,
126
+ ...n(pe.value, { class: "p-0" })
127
+ }));
128
+ return (n, i) => (b(), l(D(a), v({
129
+ modelValue: L.value,
130
+ "onUpdate:modelValue": i[0] ||= (e) => L.value = e,
129
131
  "anchor-el": h.anchorEl,
130
132
  placement: h.placement,
131
133
  "close-on-click-away": !0,
132
- "disable-auto-focus": h.disableAutoFocus,
133
- "custom-props": { content: D(L).customProps?.content }
134
- }, {
135
- default: j(() => [
136
- D(e)(D(N), "beforeOptions") ? (x(), u(T(D(t)(D(N), "beforeOptions")), { key: 0 })) : d("", !0),
137
- h.loading ? (x(), f(c, { key: 1 }, [m(D(ee), {
138
- size: "xs",
139
- "aria-hidden": "",
140
- class: "shrink-0",
141
- color: D(L).color,
142
- classes: { bar: D(H).loading },
143
- "custom-props": { bar: D(L).customProps?.loading }
144
- }, null, 8, [
145
- "color",
146
- "classes",
147
- "custom-props"
148
- ]), p("div", b(g(D(B))), [D(e)(D(N), "loading") ? (x(), u(T(D(t)(D(N), "loading")), { key: 0 })) : (x(), f("span", se, E(h.loadingMessage), 1))], 16)], 64)) : (x(), f("div", b(v({ key: 2 }, D(z))), [m(D(n), {
149
- dense: "",
150
- class: "p-0",
151
- role: "listbox",
152
- id: h.listboxId,
153
- "aria-labelledby": h.labelledBy,
154
- "aria-multiselectable": h.multiple || void 0
155
- }, {
156
- default: j(() => [J.value ? w(r.$slots, "default", { key: 0 }) : (x(!0), f(c, { key: 1 }, ne(pe.value, (t) => (x(), f(c, { key: t.key }, [t.kind === "section" ? (x(), u(D(o), {
134
+ "disable-auto-focus": h.disableAutoFocus
135
+ }, ge.value), {
136
+ default: k(() => [
137
+ D(e)(D(F), "beforeOptions") ? (b(), l(T(D(t)(D(F), "beforeOptions")), { key: 0 })) : u("", !0),
138
+ h.loading ? (b(), d(s, { key: 1 }, [m(D(o), y(g(_e.value)), null, 16), f("div", y(g(D(H))), [D(e)(D(F), "loading") ? (b(), l(T(D(t)(D(F), "loading")), { key: 0 })) : (b(), d("span", P, E(h.loadingMessage), 1))], 16)], 64)) : (b(), d("div", y(v({ key: 2 }, D(V))), [m(D(r), y(g(ve.value)), {
139
+ default: k(() => [Y.value ? w(n.$slots, "default", { key: 0 }) : (b(!0), d(s, { key: 1 }, C(de.value, (t) => (b(), d(s, { key: t.key }, [t.kind === "section" ? (b(), l(D(ne), v({
157
140
  key: 0,
158
141
  title: t.title,
159
142
  sticky: t.sticky
160
- }, null, 8, ["title", "sticky"])) : (x(), u(D(a), {
143
+ }, { ref_for: !0 }, he.value), null, 16, ["title", "sticky"])) : (b(), l(D(te), v({
161
144
  key: 1,
162
145
  interactive: "",
163
- role: "option",
164
- selected: !1,
165
- "aria-selected": t.selected,
146
+ value: t.option.value,
166
147
  disabled: t.option.disabled,
167
148
  secondary: t.option.description,
168
- onClick: (e) => $(t.option),
169
- id: `${h.listboxId}-option-${t.index}`,
170
- "custom-props": ue(t.option, t.index),
171
- primary: D(e)(D(N), "option") ? void 0 : t.option.label
172
- }, te({ _: 2 }, [D(e)(D(N), "option") ? {
149
+ primary: D(e)(D(F), "option") ? void 0 : t.option.label
150
+ }, { ref_for: !0 }, $.value), p({ _: 2 }, [D(e)(D(F), "option") ? {
173
151
  name: "default",
174
- fn: j(() => [w(r.$slots, "option", {
152
+ fn: k(() => [w(n.$slots, "option", {
175
153
  option: t.option,
176
154
  selected: t.selected
177
155
  })]),
178
156
  key: "0"
179
- } : void 0, h.showCheckmark && t.selected ? {
180
- name: "end",
181
- fn: j(() => [m(D(oe), { class: y(X.value) }, null, 8, ["class"])]),
182
- key: "1"
183
- } : void 0]), 1032, [
184
- "aria-selected",
157
+ } : void 0]), 1040, [
158
+ "value",
185
159
  "disabled",
186
160
  "secondary",
187
- "onClick",
188
- "id",
189
- "custom-props",
190
161
  "primary"
191
162
  ]))], 64))), 128))]),
192
163
  _: 3
193
- }, 8, [
194
- "id",
195
- "aria-labelledby",
196
- "aria-multiselectable"
197
- ])], 16)),
198
- Y.value && !D(e)(D(N), "empty") ? (x(), f("div", b(v({ key: 3 }, D(B))), E(h.emptyMessage), 17)) : Y.value && D(e)(D(N), "empty") ? (x(), u(T(D(t)(D(N), "empty")), { key: 4 })) : d("", !0),
199
- D(e)(D(N), "afterOptions") ? (x(), u(T(D(t)(D(N), "afterOptions")), { key: 5 })) : d("", !0)
164
+ }, 16)], 16)),
165
+ X.value && !D(e)(D(F), "empty") ? (b(), d("div", y(v({ key: 3 }, D(H))), E(h.emptyMessage), 17)) : X.value && D(e)(D(F), "empty") ? (b(), l(T(D(t)(D(F), "empty")), { key: 4 })) : u("", !0),
166
+ D(e)(D(F), "afterOptions") ? (b(), l(T(D(t)(D(F), "afterOptions")), { key: 5 })) : u("", !0)
200
167
  ]),
201
168
  _: 3
202
- }, 8, [
169
+ }, 16, [
203
170
  "modelValue",
204
171
  "anchor-el",
205
172
  "placement",
206
- "disable-auto-focus",
207
- "custom-props"
173
+ "disable-auto-focus"
208
174
  ]));
209
175
  }
210
176
  });
211
177
  //#endregion
212
- export { N as default };
178
+ export { F as default };
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
2
2
  import { computed as r, useAttrs as i } from "vue";
3
3
  import { get as a } from "es-toolkit/compat";
4
4
  import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
5
- import { colorProps as l, invalidatedProps as u, sizeProps as d } from "@bridge-ui/core/Components/Listbox";
5
+ import { colorProps as l, invalidatedProps as u, sizeProps as d } from "@bridge-ui/core/Tokens/Listbox";
6
6
  //#region src/Components/Listbox/composables/useListbox.ts
7
7
  var f = [
8
8
  "size",
@@ -27,7 +27,7 @@ function p(p, m) {
27
27
  }), y = n({
28
28
  entry: v,
29
29
  props: () => g.value.componentProps
30
- }), b = r(() => a(s(l, v.value?.customProps?.color), _.value.color ?? "primary")), x = r(() => s(u, v.value?.customProps?.invalidated)), S = r(() => _.value.invalidated ? x.value : b.value), C = r(() => a(s(d, v.value?.customProps?.size), _.value.size ?? "md")), w = r(() => S.value?.selected), T = r(() => S.value?.highlighted);
30
+ }), b = r(() => a(s(l, v.value?.tokens?.color), _.value.color ?? "primary")), x = r(() => s(u, v.value?.tokens?.invalidated)), S = r(() => _.value.invalidated ? x.value : b.value), C = r(() => a(s(d, v.value?.tokens?.size), _.value.size ?? "md")), w = r(() => S.value?.selected), T = r(() => S.value?.highlighted);
31
31
  return {
32
32
  merged: _,
33
33
  checkClass: r(() => o(C.value?.check, S.value?.check)),
@@ -1,7 +1,13 @@
1
1
  import { HTMLAttributes, Slot } from 'vue';
2
- import { ListboxColor, ListboxEntry, ListboxOption, ListboxSize, ListboxValue, MergeHtmlProps, MergeProps, PositionPlacement } from '@bridge-ui/core';
2
+ import { ListboxColor, ListboxEntry, ListboxOption, ListboxSize, ListboxValue, MenuRounded, MergeHtmlProps, MergeProps, PositionPlacement } from '@bridge-ui/core';
3
+ import { ListOwnProps } from '../List/list.types';
4
+ import { ListItemOwnProps } from '../ListItem/listItem.types';
5
+ import { ListSectionOwnProps } from '../ListSection/listSection.types';
6
+ import { MenuOwnProps } from '../Menu/menu.types';
7
+ import { ProgressOwnProps } from '../Progress/progress.types';
3
8
  export interface ListboxSizeOverrides {}
4
9
  export interface ListboxColorOverrides {}
10
+ export interface ListboxRoundedOverrides {}
5
11
  export interface ListboxClasses {
6
12
  /**
7
13
  * Classes merged onto the check icon.
@@ -26,15 +32,41 @@ export interface ListboxClasses {
26
32
  }
27
33
  export interface ListboxCustomProps {
28
34
  /**
29
- * Props forwarded to the floating menu panel.
35
+ * Props forwarded to the internal `List`.
36
+ *
37
+ * @default undefined
38
+ */
39
+ list?: Partial<ListOwnProps>;
40
+ /**
41
+ * Props forwarded to each mapped `ListItem` option.
42
+ * Merged last so they override Listbox defaults.
43
+ *
44
+ * @default undefined
45
+ */
46
+ listItem?: Partial<ListItemOwnProps>;
47
+ /**
48
+ * Props forwarded to each mapped `ListSection`.
49
+ *
50
+ * @default undefined
51
+ */
52
+ listSection?: Partial<Omit<ListSectionOwnProps, "title">>;
53
+ /**
54
+ * Props forwarded to the floating `Menu`.
55
+ * Merged last so they override Listbox defaults.
56
+ *
57
+ * @default undefined
30
58
  */
31
- content?: HTMLAttributes;
59
+ menu?: Partial<MenuOwnProps>;
32
60
  /**
33
- * Props forwarded to the loading `Progress` bar.
61
+ * Props forwarded to the loading `Progress`.
62
+ *
63
+ * @default undefined
34
64
  */
35
- loading?: HTMLAttributes;
65
+ progress?: Partial<ProgressOwnProps>;
36
66
  /**
37
67
  * Props forwarded to the scrollable options container.
68
+ *
69
+ * @default undefined
38
70
  */
39
71
  scroll?: HTMLAttributes;
40
72
  }
@@ -70,7 +102,10 @@ export interface ListboxOwnProps {
70
102
  */
71
103
  color?: MergeProps<ListboxColor, ListboxColorOverrides>;
72
104
  /**
73
- * Extra props for internal parts.
105
+ * Extra props for internal parts (`list`, `listItem`, `listSection`, `menu`,
106
+ * `progress`, `scroll`).
107
+ *
108
+ * @default undefined
74
109
  */
75
110
  customProps?: ListboxCustomProps;
76
111
  /**
@@ -165,6 +200,14 @@ export interface ListboxOwnProps {
165
200
  * @default "bottom-start"
166
201
  */
167
202
  placement?: PositionPlacement;
203
+ /**
204
+ * Roundedness of the floating panel (`Menu`). When omitted, `Menu` defaults
205
+ * apply (including `Menu.defaultProps.rounded`).
206
+ *
207
+ * `Select` always forwards its own `rounded` here so the dropdown matches the
208
+ * field, independent of `Menu.defaultProps`.
209
+ */
210
+ rounded?: MergeProps<MenuRounded, ListboxRoundedOverrides>;
168
211
  /**
169
212
  * Shows a check icon on selected options.
170
213
  *
@@ -16,13 +16,13 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
16
16
  rounded: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').MenuRounded, import('./menu.types').MenuRoundedOverrides>;
17
17
  shadow: import('@bridge-ui/core').MergeProps<import('@bridge-ui/core').MenuShadow, import('./menu.types').MenuShadowOverrides>;
18
18
  anchorEl: null | HTMLElement;
19
- disableAutoFocus: boolean;
20
- placement: import('@floating-ui/utils').Placement;
21
19
  closeOnClickAway: boolean;
22
20
  closeOnEscape: boolean;
21
+ disableAutoFocus: boolean;
23
22
  disableScrollLock: boolean;
24
23
  keepMounted: boolean;
25
24
  persistent: boolean;
25
+ placement: import('@floating-ui/utils').Placement;
26
26
  strategy: import('@bridge-ui/core').PositionStrategy;
27
27
  teleportTo: false | string;
28
28
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -24,7 +24,7 @@ export declare function useMenu(props: MenuOwnProps, libDefaults: MenuLibDefault
24
24
  merged: import('vue').ComputedRef<MenuMerged>;
25
25
  menuId: string;
26
26
  mounted: Ref<boolean, boolean>;
27
- rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<MenuProps, "offset" | "classes" | "customProps" | "rounded" | "shadow" | "disableAutoFocus" | "placement" | "closeOnClickAway" | "closeOnEscape" | "disableScrollLock" | "keepMounted" | "persistent" | "strategy" | "teleportTo">, "anchorEl" | "onShowChange">>>;
27
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<MenuProps, "offset" | "classes" | "customProps" | "rounded" | "shadow" | "closeOnClickAway" | "closeOnEscape" | "disableAutoFocus" | "disableScrollLock" | "keepMounted" | "persistent" | "placement" | "strategy" | "teleportTo">, "anchorEl" | "onShowChange">>>;
28
28
  isPortaled: import('vue').ComputedRef<boolean>;
29
29
  triggerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
30
30
  tabindex: number;
@@ -2,7 +2,7 @@ import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent a
2
2
  import { computed as r, nextTick as i, onBeforeUnmount as te, ref as a, toValue as o, useAttrs as ne, useId as re, watch as s } from "vue";
3
3
  import { get as c, omit as l } from "es-toolkit/compat";
4
4
  import { LAYER_STACK_BASE_Z_INDEX as u, acquireLayerStackOrder as ie, claimOpenMenu as d, cn as f, createFocusable as p, createPositionable as m, getLayerStackEntry as ae, mergeBridgeUILayeredClasses as h, pushLayerStack as g, splitComponentProps as _, subscribeLayerStack as v } from "@bridge-ui/core";
5
- import { roundedProps as oe, shadowProps as se } from "@bridge-ui/core/Components/Menu";
5
+ import { roundedProps as oe, 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",
@@ -38,7 +38,7 @@ 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(() => c(h(oe, R.value?.customProps?.rounded), L.value.rounded)), fe = r(() => c(h(se, R.value?.customProps?.shadow), L.value.shadow)), U = r(() => !L.value.persistent), pe = r(() => l(I.value.inheritedAttrs, ["anchorEl", "onShowChange"]));
41
+ }), V = r(() => L.value.keepMounted && !P.value), H = r(() => L.value.teleportTo !== !1), de = r(() => c(h(oe, R.value?.tokens?.rounded), L.value.rounded)), fe = r(() => c(h(se, R.value?.tokens?.shadow), L.value.shadow)), U = r(() => !L.value.persistent), pe = r(() => l(I.value.inheritedAttrs, ["anchorEl", "onShowChange"]));
42
42
  function W() {
43
43
  return y.anchorEl ?? w.value;
44
44
  }
@@ -3,7 +3,7 @@ import { computed as n, nextTick as r, onBeforeUnmount as ne, ref as i, toValue
3
3
  import { get as s } from "es-toolkit/compat";
4
4
  import { LAYER_STACK_BASE_Z_INDEX as c, acquireLayerStackOrder as ie, cn as l, countModalTransitionLayers as u, createFocusTrap as d, getLayerStackEntry as f, getModalOverlayTransitionClass as p, getModalPanelTransitionClass as m, hasModalTransition as h, mergeBridgeUILayeredClasses as g, pushLayerStack as ae, resolveEffectiveModalTransition as _, splitComponentProps as oe, subscribeLayerStack as se } from "@bridge-ui/core";
5
5
  import { isModalBackdropClick as ce } from "@bridge-ui/core/Utils";
6
- import { alignProps as v, blurProps as y, sizeProps as b } from "@bridge-ui/core/Components/Modal";
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
8
8
  var le = [
9
9
  "blur",
@@ -43,7 +43,7 @@ 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(() => _(L.value.transition ?? "none")), H = n(() => h(V.value)), U = n(() => L.value.scroll ?? "body"), W = n(() => L.value.keepMounted && !w.value), fe = n(() => s(g(v, R.value?.customProps?.align), L.value.align)), pe = n(() => s(g(y, R.value?.customProps?.blur), L.value.blur)), me = n(() => s(g(b, R.value?.customProps?.size), L.value.size)), he = n(() => p(V.value)), ge = n(() => m(V.value)), G = n(() => !L.value.persistent), _e = n(() => I.value.inheritedAttrs), ve = n(() => e(z.value?.root, _e.value, {
46
+ }), V = n(() => _(L.value.transition ?? "none")), H = n(() => h(V.value)), U = n(() => L.value.scroll ?? "body"), W = n(() => L.value.keepMounted && !w.value), fe = n(() => s(g(v, R.value?.tokens?.align), L.value.align)), pe = n(() => s(g(y, R.value?.tokens?.blur), L.value.blur)), me = n(() => s(g(b, R.value?.tokens?.size), L.value.size)), he = n(() => p(V.value)), ge = n(() => m(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,
@@ -1,24 +1,24 @@
1
1
  import { useHoldRepeat as e } from "../../Utils/useHoldRepeat.js";
2
- import { resolveFieldAdornmentIconSize as t } from "../../Utils/index.js";
3
- import n from "../Icon/Icon.js";
4
- import r from "../FormField/FormField.js";
5
- import { useNumberField as i } from "./composables/useNumberField.js";
6
- import { computed as a, createBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, isRef as u, mergeModels as d, mergeProps as f, normalizeClass as p, openBlock as m, unref as h, useModel as g, vModelDynamic as _, withCtx as v, withDirectives as y } from "vue";
7
- import { cn as b } from "@bridge-ui/core";
8
- import { ChevronDown as x, ChevronUp as S } from "@lucide/vue";
2
+ import { mergePartBind as t, resolveFieldAdornmentIconSize as n } from "../../Utils/index.js";
3
+ import r from "../Icon/Icon.js";
4
+ import i from "../FormField/FormField.js";
5
+ import { useNumberField as a } from "./composables/useNumberField.js";
6
+ import { computed as o, createBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, isRef as f, mergeModels as p, mergeProps as m, normalizeProps as h, openBlock as g, unref as _, useModel as v, vModelDynamic as y, withCtx as b, withDirectives as x } from "vue";
7
+ import { cn as S } from "@bridge-ui/core";
8
+ import { ChevronDown as C, ChevronUp as w } from "@lucide/vue";
9
9
  //#region src/Components/NumberField/NumberField.vue?vue&type=script&setup=true&lang.ts
10
- var C = { class: "bridge-end-adornment flex h-full min-w-9 flex-col gap-px overflow-hidden" }, w = ["disabled"], T = ["disabled"], E = /* @__PURE__ */ l({
10
+ var T = { class: "bridge-end-adornment flex h-full min-w-9 flex-col gap-px overflow-hidden" }, E = /* @__PURE__ */ u({
11
11
  inheritAttrs: !1,
12
12
  __name: "NumberField",
13
- props: /* @__PURE__ */ d({
13
+ props: /* @__PURE__ */ p({
14
14
  classes: {},
15
+ customProps: {},
15
16
  max: {},
16
17
  min: {},
17
18
  step: { default: 1 },
18
19
  color: {},
19
20
  controlId: {},
20
21
  corner: {},
21
- customProps: {},
22
22
  description: {},
23
23
  disabled: { type: Boolean },
24
24
  end: {},
@@ -39,42 +39,40 @@ var C = { class: "bridge-end-adornment flex h-full min-w-9 flex-col gap-px overf
39
39
  modelValue: {},
40
40
  modelModifiers: {}
41
41
  }),
42
- emits: /* @__PURE__ */ d(["change", "update:modelValue"], ["update:modelValue"]),
43
- setup(l, { emit: d }) {
44
- let E = d, D = g(l, "modelValue"), O = l, { decrement: k, formField: A, increment: j, inputBind: M, stringModel: N, mergedClasses: P } = i(O, D, { onChange: (e) => E("change", e) }), F = e(() => j(), () => ({ disabled: O.disabled })), I = e(() => k(), () => ({ disabled: O.disabled })), L = a(() => t(O.size));
45
- return (e, t) => (m(), o(h(r), { field: h(A) }, {
46
- end: v(() => [s("div", C, [s("button", {
47
- type: "button",
48
- disabled: O.disabled,
49
- "aria-label": "Increment value",
50
- onClick: t[1] ||= (...e) => h(F).onPressClick && h(F).onPressClick(...e),
51
- onPointerup: t[2] ||= (...e) => h(F).onPressPointerUp && h(F).onPressPointerUp(...e),
52
- onPointerdown: t[3] ||= (...e) => h(F).onPressPointerDown && h(F).onPressPointerDown(...e),
53
- onLostpointercapture: t[4] ||= (...e) => h(F).onPressLostPointerCapture && h(F).onPressLostPointerCapture(...e),
54
- class: p(h(b)({
55
- "bridge-field-adornment-button inline-flex min-h-0 min-w-8 flex-1 items-center justify-center": !0,
56
- [h(P).increment ?? ""]: !0
57
- }))
58
- }, [c(h(n), {
59
- icon: h(S),
42
+ emits: /* @__PURE__ */ p(["change", "update:modelValue"], ["update:modelValue"]),
43
+ setup(u, { emit: p }) {
44
+ let E = p, D = v(u, "modelValue"), O = u, { decrement: k, formField: A, increment: j, inputBind: M, stringModel: N, mergedClasses: P } = a(O, D, { onChange: (e) => E("change", e) }), F = e(() => j(), () => ({ disabled: O.disabled })), I = e(() => k(), () => ({ disabled: O.disabled })), L = o(() => n(O.size)), R = o(() => t(O.customProps?.increment, {
45
+ type: "button",
46
+ disabled: O.disabled,
47
+ "aria-label": "Increment value",
48
+ onClick: F.onPressClick,
49
+ onPointerup: F.onPressPointerUp,
50
+ onPointerdown: F.onPressPointerDown,
51
+ onLostpointercapture: F.onPressLostPointerCapture
52
+ }, S({
53
+ "bridge-field-adornment-button inline-flex min-h-0 min-w-8 flex-1 items-center justify-center": !0,
54
+ [P.value.increment ?? ""]: !0
55
+ }))), z = o(() => t(O.customProps?.decrement, {
56
+ type: "button",
57
+ disabled: O.disabled,
58
+ "aria-label": "Decrement value",
59
+ onClick: I.onPressClick,
60
+ onPointerup: I.onPressPointerUp,
61
+ onPointerdown: I.onPressPointerDown,
62
+ onLostpointercapture: I.onPressLostPointerCapture
63
+ }, S({
64
+ "bridge-field-adornment-button inline-flex min-h-0 min-w-8 flex-1 items-center justify-center": !0,
65
+ [P.value.decrement ?? ""]: !0
66
+ })));
67
+ return (e, t) => (g(), s(_(i), { field: _(A) }, {
68
+ end: b(() => [c("div", T, [c("button", h(d(R.value)), [l(_(r), m({
69
+ icon: _(w),
60
70
  size: L.value
61
- }, null, 8, ["icon", "size"])], 42, w), s("button", {
62
- type: "button",
63
- disabled: O.disabled,
64
- "aria-label": "Decrement value",
65
- onClick: t[5] ||= (...e) => h(I).onPressClick && h(I).onPressClick(...e),
66
- onPointerup: t[6] ||= (...e) => h(I).onPressPointerUp && h(I).onPressPointerUp(...e),
67
- onPointerdown: t[7] ||= (...e) => h(I).onPressPointerDown && h(I).onPressPointerDown(...e),
68
- onLostpointercapture: t[8] ||= (...e) => h(I).onPressLostPointerCapture && h(I).onPressLostPointerCapture(...e),
69
- class: p(h(b)({
70
- "bridge-field-adornment-button inline-flex min-h-0 min-w-8 flex-1 items-center justify-center": !0,
71
- [h(P).decrement ?? ""]: !0
72
- }))
73
- }, [c(h(n), {
74
- icon: h(x),
71
+ }, O.customProps?.incrementIcon), null, 16, ["icon", "size"])], 16), c("button", h(d(z.value)), [l(_(r), m({
72
+ icon: _(C),
75
73
  size: L.value
76
- }, null, 8, ["icon", "size"])], 42, T)])]),
77
- default: v(() => [y(s("input", f({ "onUpdate:modelValue": t[0] ||= (e) => u(N) ? N.value = e : null }, h(M)), null, 16), [[_, h(N)]])]),
74
+ }, O.customProps?.decrementIcon), null, 16, ["icon", "size"])], 16)])]),
75
+ default: b(() => [x(c("input", m({ "onUpdate:modelValue": t[0] ||= (e) => f(N) ? N.value = e : null }, _(M)), null, 16), [[y, _(N)]])]),
78
76
  _: 1
79
77
  }, 8, ["field"]));
80
78
  }
@@ -435,10 +435,9 @@ 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" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "description" | "errorMessage" | "readonly" | "required" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>;
438
+ }, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>;
439
439
  isNotched: import('vue').ComputedRef<boolean>;
440
440
  isStacked: import('vue').ComputedRef<boolean>;
441
- labelBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
442
441
  startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
443
442
  cornerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
444
443
  headerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
@@ -448,12 +447,12 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
448
447
  endIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
449
448
  endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
450
449
  invalidated: import('vue').ComputedRef<boolean>;
451
- requiredBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
452
450
  containerBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
453
451
  "data-bridge-rounded": NonNullable<keyof import('@bridge-ui/core').FormFieldRounded | undefined>;
454
452
  }>>;
455
453
  startIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
456
454
  startSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
455
+ fieldLabelProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
457
456
  ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
458
457
  descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
459
458
  stackedBodyBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
@@ -685,7 +684,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
685
684
  onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
686
685
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
687
686
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
688
- }, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "description" | "errorMessage" | "readonly" | "required" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>, {
687
+ }, Partial<Omit<Omit<import('../../FormField').FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "error" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>, {
689
688
  min: number | undefined;
690
689
  max: number | undefined;
691
690
  type: string;