@nubisco/ui 5.49.0 → 5.50.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 (134) hide show
  1. package/dist/{ActionGroup-48ZXZCsn.cjs → ActionGroup-CZWoWOYj.cjs} +1 -1
  2. package/dist/{ActionGroup-DzQjn3ir.js → ActionGroup-DEeOrkKF.js} +1 -1
  3. package/dist/{AiProvider-BrjUMTRk.cjs → AiProvider-C5ezIeiH.cjs} +1 -1
  4. package/dist/{AiProvider-Db47uagx.js → AiProvider-DHXJJRrw.js} +2 -2
  5. package/dist/{BatchActions-0P-b3qLI.js → BatchActions-CLCwxCoa.js} +3 -1
  6. package/dist/{BatchActions-FDPiGUNh.cjs → BatchActions-DfAPQSU6.cjs} +1 -1
  7. package/dist/{BlueprintCard-_FItugFc.js → BlueprintCard-CqlU0QFY.js} +10 -12
  8. package/dist/BlueprintCard-DGUNttWj.cjs +1 -0
  9. package/dist/{Board-CSVCzJ1s.js → Board-DEBP52eI.js} +1 -1
  10. package/dist/{Board-gUICo94e.cjs → Board-DIbzPDsD.cjs} +1 -1
  11. package/dist/{Breadcrumbs-BgMh5bfe.js → Breadcrumbs-BDsy1vNm.js} +1 -1
  12. package/dist/{Breadcrumbs-DN_2wxQS.cjs → Breadcrumbs-DMpa5j7m.cjs} +1 -1
  13. package/dist/{Confirm-DLhI3VVh.js → Confirm-CZNS6FNr.js} +1 -1
  14. package/dist/{Confirm-BQxQlmjs.cjs → Confirm-DbrEaYlJ.cjs} +1 -1
  15. package/dist/{ContainedListItem-DtTZOm-_.js → ContainedListItem-8z2bmoRG.js} +19 -17
  16. package/dist/ContainedListItem-BKvHedZO.cjs +1 -0
  17. package/dist/{DataTable-Dp3WZihu.js → DataTable-DDqMaOqP.js} +2 -2
  18. package/dist/{DataTable-CHztTxz1.cjs → DataTable-DQUX-6li.cjs} +1 -1
  19. package/dist/DatePicker-Du21bjhe.cjs +1 -0
  20. package/dist/DatePicker-fS84mRE6.js +761 -0
  21. package/dist/{InputGroup-DQxpFFlP.js → InputGroup-BYThVO5L.js} +1 -1
  22. package/dist/{InputGroup-DIAJy1Sv.cjs → InputGroup-BYoHNpY0.cjs} +1 -1
  23. package/dist/InputGroup.context-BHj-IvcT.cjs +1 -0
  24. package/dist/InputGroup.context-Dd4e6fGT.js +28 -0
  25. package/dist/{Menu-CcQpTOd3.js → Menu-7EgnchVu.js} +1 -1
  26. package/dist/Menu-Bs2Co1sl.cjs +1 -0
  27. package/dist/{MenuBarItem-BlT1hN-b.js → MenuBarItem-CQsy3y2I.js} +1 -1
  28. package/dist/{MenuBarItem-BIDXX-uX.cjs → MenuBarItem-Dd9hNBra.cjs} +1 -1
  29. package/dist/MenuItem-DFfE_k0L.cjs +1 -0
  30. package/dist/{MenuItem-BerQIsRQ.js → MenuItem-DMYDHaa0.js} +44 -28
  31. package/dist/{NumberInput-DfrhQayO.js → NumberInput-B-TvTlXI.js} +1 -1
  32. package/dist/{NumberInput-CcXqTINb.cjs → NumberInput-DaZI9hc3.cjs} +1 -1
  33. package/dist/{OverflowMenu-CaC5E0Oy.cjs → OverflowMenu-DFOJSaS7.cjs} +1 -1
  34. package/dist/{OverflowMenu-BlZ_wEja.js → OverflowMenu-OCAeE3W0.js} +4 -2
  35. package/dist/{PageHeader-DgjItuag.js → PageHeader-1wou3Him.js} +1 -1
  36. package/dist/{PageHeader-2jBgITYE.cjs → PageHeader-BfUlrscM.cjs} +1 -1
  37. package/dist/{Pagination-DA1Nglqx.js → Pagination-CQJYl76w.js} +1 -1
  38. package/dist/{Pagination-B1km1o28.cjs → Pagination-Sm4rX7gH.cjs} +1 -1
  39. package/dist/{Search-BUgIh9TX.js → Search-BnGuTcHp.js} +1 -1
  40. package/dist/{Search-D4SG2q3c.cjs → Search-CfH1Q9GB.cjs} +1 -1
  41. package/dist/Select-C4s5Eek6.cjs +1 -0
  42. package/dist/{Select-Cf0T4gIu.js → Select-CuiJz35r.js} +169 -160
  43. package/dist/{Slider-D9hgB8GJ.js → Slider-BP-oEeJs.js} +1 -1
  44. package/dist/{Slider-D9glvyrU.cjs → Slider-D3YgGPcY.cjs} +1 -1
  45. package/dist/TextInput-BVTKUEey.cjs +2 -0
  46. package/dist/TextInput-DqaVhKud.js +438 -0
  47. package/dist/all.cjs +1 -1
  48. package/dist/all.mjs +23 -23
  49. package/dist/components/ActionGroup.cjs +1 -1
  50. package/dist/components/ActionGroup.mjs +1 -1
  51. package/dist/components/AiProvider.cjs +1 -1
  52. package/dist/components/AiProvider.mjs +1 -1
  53. package/dist/components/BatchActions.cjs +1 -1
  54. package/dist/components/BatchActions.mjs +1 -1
  55. package/dist/components/BatchActions.vue.d.ts.map +1 -1
  56. package/dist/components/BlueprintCard.cjs +1 -1
  57. package/dist/components/BlueprintCard.mjs +1 -1
  58. package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
  59. package/dist/components/Board.cjs +1 -1
  60. package/dist/components/Board.mjs +1 -1
  61. package/dist/components/Breadcrumbs.cjs +1 -1
  62. package/dist/components/Breadcrumbs.mjs +1 -1
  63. package/dist/components/Confirm.cjs +1 -1
  64. package/dist/components/Confirm.mjs +1 -1
  65. package/dist/components/ContainedList.d.ts +7 -0
  66. package/dist/components/ContainedListItem.cjs +1 -1
  67. package/dist/components/ContainedListItem.mjs +1 -1
  68. package/dist/components/ContainedListItem.vue.d.ts +1 -0
  69. package/dist/components/ContainedListItem.vue.d.ts.map +1 -1
  70. package/dist/components/DataTable.cjs +1 -1
  71. package/dist/components/DataTable.mjs +1 -1
  72. package/dist/components/DatePicker.cjs +1 -1
  73. package/dist/components/DatePicker.mjs +1 -1
  74. package/dist/components/DatePicker.vue.d.ts.map +1 -1
  75. package/dist/components/InputGroup.cjs +1 -1
  76. package/dist/components/InputGroup.context.d.ts +4 -0
  77. package/dist/components/InputGroup.context.d.ts.map +1 -1
  78. package/dist/components/InputGroup.mjs +1 -1
  79. package/dist/components/Menu.cjs +1 -1
  80. package/dist/components/Menu.d.ts +10 -0
  81. package/dist/components/Menu.mjs +1 -1
  82. package/dist/components/Menu.vue.d.ts.map +1 -1
  83. package/dist/components/MenuBarItem.cjs +1 -1
  84. package/dist/components/MenuBarItem.mjs +1 -1
  85. package/dist/components/MenuItem.cjs +1 -1
  86. package/dist/components/MenuItem.mjs +1 -1
  87. package/dist/components/MenuItem.vue.d.ts +1 -0
  88. package/dist/components/MenuItem.vue.d.ts.map +1 -1
  89. package/dist/components/NumberInput.cjs +1 -1
  90. package/dist/components/NumberInput.mjs +1 -1
  91. package/dist/components/OverflowMenu.cjs +1 -1
  92. package/dist/components/OverflowMenu.mjs +1 -1
  93. package/dist/components/OverflowMenu.vue.d.ts.map +1 -1
  94. package/dist/components/PageHeader.cjs +1 -1
  95. package/dist/components/PageHeader.mjs +1 -1
  96. package/dist/components/Pagination.cjs +1 -1
  97. package/dist/components/Pagination.mjs +1 -1
  98. package/dist/components/Search.cjs +1 -1
  99. package/dist/components/Search.mjs +1 -1
  100. package/dist/components/Select.cjs +1 -1
  101. package/dist/components/Select.mjs +1 -1
  102. package/dist/components/Select.vue.d.ts +1 -0
  103. package/dist/components/Select.vue.d.ts.map +1 -1
  104. package/dist/components/Slider.cjs +1 -1
  105. package/dist/components/Slider.mjs +1 -1
  106. package/dist/components/TextInput.cjs +1 -1
  107. package/dist/components/TextInput.mjs +1 -1
  108. package/dist/components/TextInput.vue.d.ts +2 -2
  109. package/dist/components/TextInput.vue.d.ts.map +1 -1
  110. package/dist/composables/useConfirm.composable.cjs +1 -1
  111. package/dist/composables/useConfirm.composable.mjs +1 -1
  112. package/dist/composables/useNbStrings.composable.cjs +1 -1
  113. package/dist/composables/useNbStrings.composable.d.ts +11 -0
  114. package/dist/composables/useNbStrings.composable.d.ts.map +1 -1
  115. package/dist/composables/useNbStrings.composable.mjs +7 -0
  116. package/dist/index.cjs +1 -1
  117. package/dist/index.mjs +23 -23
  118. package/dist/styles/BlueprintCard.css +1 -1
  119. package/dist/styles/ContainedListItem.css +1 -1
  120. package/dist/styles/MenuItem.css +1 -1
  121. package/dist/styles/TextInput.css +1 -1
  122. package/dist/ui.css +4 -4
  123. package/package.json +1 -1
  124. package/dist/BlueprintCard-D3h_rGhj.cjs +0 -1
  125. package/dist/ContainedListItem-DjHEyhf8.cjs +0 -1
  126. package/dist/DatePicker-BLRQEI-6.js +0 -755
  127. package/dist/DatePicker-CJlffHeM.cjs +0 -1
  128. package/dist/InputGroup.context-BTt6zUkj.cjs +0 -1
  129. package/dist/InputGroup.context-CJAWx5GI.js +0 -16
  130. package/dist/Menu-SlBztEy3.cjs +0 -1
  131. package/dist/MenuItem-CvpxnM4W.cjs +0 -1
  132. package/dist/Select-DhwcDMnf.cjs +0 -1
  133. package/dist/TextInput-BM2Zc2_R.cjs +0 -2
  134. package/dist/TextInput-DVpNJNwY.js +0 -406
@@ -5,7 +5,7 @@ import { t as r } from "./Label-xwHw_UbN.js";
5
5
  import { t as i } from "./Message-DCeg8qsC.js";
6
6
  import { t as a } from "./Grid-B7d8x0tA.js";
7
7
  import { joinDescribedBy as o, useFieldMessage as ee } from "./composables/useFieldMessage.composable.mjs";
8
- import { n as te } from "./InputGroup.context-CJAWx5GI.js";
8
+ import { n as te } from "./InputGroup.context-Dd4e6fGT.js";
9
9
  import { useMenuSurface as ne } from "./composables/useMenuSurface.composable.mjs";
10
10
  import { Fragment as s, Teleport as re, Transition as ie, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, h as ae, mergeProps as oe, nextTick as se, normalizeClass as g, normalizeProps as ce, normalizeStyle as le, onBeforeUnmount as ue, openBlock as _, ref as v, renderList as de, renderSlot as y, toDisplayString as b, unref as x, useId as fe, useSlots as pe, vModelText as me, watch as he, withCtx as S, withDirectives as ge, withKeys as C, withModifiers as w } from "vue";
11
11
  import { regular as _e } from "@nubisco/ui/icons/caret-down";
@@ -15,6 +15,8 @@ import { regular as ye } from "@nubisco/ui/icons/x";
15
15
  var be = [
16
16
  "id",
17
17
  "aria-expanded",
18
+ "aria-controls",
19
+ "aria-activedescendant",
18
20
  "aria-disabled",
19
21
  "aria-required",
20
22
  "aria-invalid",
@@ -27,6 +29,8 @@ var be = [
27
29
  }, Se = [
28
30
  "id",
29
31
  "aria-expanded",
32
+ "aria-controls",
33
+ "aria-activedescendant",
30
34
  "aria-disabled",
31
35
  "aria-required",
32
36
  "aria-invalid",
@@ -128,49 +132,49 @@ var be = [
128
132
  "create"
129
133
  ],
130
134
  setup(h, { expose: Re, emit: ze }) {
131
- let T = h, E = ze, D = (e, { slots: t }) => e.wrap ? ae("div", { class: "nb-select__control" }, t.default?.()) : t.default?.();
132
- D.props = ["wrap"];
133
- let O = v(""), k = v(""), Be = v(null);
134
- function Ve() {
135
- let e = O.value.trim();
136
- e && (E("create", e), O.value = "");
135
+ let T = h, E = ze, Be = (e, { slots: t }) => e.wrap ? ae("div", { class: "nb-select__control" }, t.default?.()) : t.default?.();
136
+ Be.props = ["wrap"];
137
+ let D = v(""), O = v(""), Ve = v(null);
138
+ function He() {
139
+ let e = D.value.trim();
140
+ e && (E("create", e), D.value = "");
137
141
  }
138
- let A = v(!1), j = v(!1), M = v(-1), N = v(null), P = v(null), F = pe(), He = () => (typeof T.anchor == "function" ? T.anchor() : T.anchor) ?? P.value ?? N.value;
139
- function Ue() {
140
- (P.value ?? N.value?.querySelector("button, [tabindex]"))?.focus();
142
+ let k = v(!1), A = v(!1), j = v(-1), M = v(null), N = v(null), Ue = pe(), We = () => (typeof T.anchor == "function" ? T.anchor() : T.anchor) ?? N.value ?? M.value;
143
+ function Ge() {
144
+ (N.value ?? M.value?.querySelector("button, [tabindex]"))?.focus();
141
145
  }
142
- let I = v(null);
143
- ne(I);
144
- let We = v({
146
+ let P = v(null);
147
+ ne(P);
148
+ let Ke = v({
145
149
  position: "fixed",
146
150
  top: "0px",
147
151
  left: "0px",
148
152
  width: "0px",
149
153
  zIndex: "9999"
150
- }), L = te(T, `nb-select-${fe()}`), R = L.id, z = L.disabled, { ids: B, messageId: Ge, invalid: Ke, live: V, key: H } = ee(T, R), qe = c(() => o(Ge.value, L.describedBy.value)), Je = c(() => Ke.value ?? (L.status.value === "error" ? "true" : void 0)), Ye = c(() => !!T.error || L.status.value === "error"), U = c(() => `${R.value}-listbox`), Xe = (e) => `${R.value}-option-${e}`, W = c(() => T.modelValue == null ? [] : Array.isArray(T.modelValue) ? T.modelValue : [T.modelValue]), G = c(() => {
151
- if (!(T.multiple || W.value.length !== 1)) return (T.options ?? []).find((e) => e.value === W.value[0])?.icon;
152
- }), K = c(() => {
153
- if (W.value.length === 0) return "";
154
+ }), F = te(T, `nb-select-${fe()}`), I = F.id, L = F.disabled, R = F.grouped, { ids: z, messageId: qe, invalid: Je, live: B, key: V } = ee(T, I), Ye = c(() => o(R ? void 0 : qe.value, F.describedBy.value)), Xe = c(() => Je.value ?? (F.status.value === "error" ? "true" : void 0)), Ze = c(() => !R && !!T.error || F.status.value === "error"), H = c(() => `${I.value}-listbox`), U = (e) => `${I.value}-option-${e}`, W = c(() => k.value && !T.searchable && j.value >= 0 ? U(j.value) : void 0), G = c(() => T.modelValue == null ? [] : Array.isArray(T.modelValue) ? T.modelValue : [T.modelValue]), K = c(() => {
155
+ if (!(T.multiple || G.value.length !== 1)) return (T.options ?? []).find((e) => e.value === G.value[0])?.icon;
156
+ }), q = c(() => {
157
+ if (G.value.length === 0) return "";
154
158
  let e = T.options ?? [];
155
- return T.multiple ? W.value.length === 1 ? e.find((e) => e.value === W.value[0])?.label ?? String(W.value[0]) : W.value.length === 2 ? W.value.map((t) => e.find((e) => e.value === t)?.label ?? String(t)).join(", ") : `${W.value.length} selected` : e.find((e) => e.value === W.value[0])?.label ?? String(W.value[0]);
159
+ return T.multiple ? G.value.length === 1 ? e.find((e) => e.value === G.value[0])?.label ?? String(G.value[0]) : G.value.length === 2 ? G.value.map((t) => e.find((e) => e.value === t)?.label ?? String(t)).join(", ") : `${G.value.length} selected` : e.find((e) => e.value === G.value[0])?.label ?? String(G.value[0]);
156
160
  });
157
- function Ze(e) {
158
- return W.value.includes(e);
161
+ function Qe(e) {
162
+ return G.value.includes(e);
159
163
  }
160
- let Qe = (e) => e.normalize("NFD").replace(/\p{M}/gu, "").toLowerCase(), $e = c(() => {
161
- let e = T.options ?? [], t = T.searchable ? Qe(k.value.trim()) : "", n = /* @__PURE__ */ new Set();
164
+ let $e = (e) => e.normalize("NFD").replace(/\p{M}/gu, "").toLowerCase(), et = c(() => {
165
+ let e = T.options ?? [], t = T.searchable ? $e(O.value.trim()) : "", n = /* @__PURE__ */ new Set();
162
166
  return e.forEach((e, r) => {
163
- (!t || Qe(e.label).includes(t)) && n.add(r);
167
+ (!t || $e(e.label).includes(t)) && n.add(r);
164
168
  }), n;
165
- }), et = c(() => {
169
+ }), tt = c(() => {
166
170
  let e = [];
167
171
  return (T.options ?? []).forEach((t, n) => {
168
- if (!$e.value.has(n)) return;
172
+ if (!et.value.has(n)) return;
169
173
  let r = e[e.length - 1];
170
174
  (!r || r.name !== t.group) && e.push({
171
175
  key: `${e.length}:${t.group ?? ""}`,
172
176
  name: t.group,
173
- labelId: `${R.value}-group-${e.length}`,
177
+ labelId: `${I.value}-group-${e.length}`,
174
178
  entries: []
175
179
  }), e[e.length - 1].entries.push({
176
180
  option: t,
@@ -178,25 +182,25 @@ var be = [
178
182
  });
179
183
  }), e;
180
184
  });
181
- function q(e, t) {
185
+ function nt(e, t) {
182
186
  let n = T.options ?? [];
183
- for (let r = e + t; r >= 0 && r < n.length; r += t) if (!n[r].disabled && $e.value.has(r)) return r;
187
+ for (let r = e + t; r >= 0 && r < n.length; r += t) if (!n[r].disabled && et.value.has(r)) return r;
184
188
  return e;
185
189
  }
186
- function tt(e) {
190
+ function rt(e) {
187
191
  if (e.disabled) return;
188
192
  let t;
189
193
  if (T.multiple) {
190
- let n = [...W.value], r = n.indexOf(e.value);
194
+ let n = [...G.value], r = n.indexOf(e.value);
191
195
  r >= 0 ? n.splice(r, 1) : n.push(e.value), t = n;
192
196
  } else t = e.value, Y();
193
197
  E("update:modelValue", t), E("change", t);
194
198
  }
195
- function nt() {
196
- let e = He();
199
+ function it() {
200
+ let e = We();
197
201
  if (!e) return;
198
- let t = e.getBoundingClientRect(), n = I.value?.offsetHeight ?? 0, r = window.innerHeight - t.bottom, i = t.top, a = n > 0 && r < n && i > r, o = F.trigger ? Math.max(t.width, 240) : t.width, ee = F.trigger ? Math.max(8, Math.min(t.left, window.innerWidth - o - 8)) : t.left;
199
- We.value = {
202
+ let t = e.getBoundingClientRect(), n = P.value?.offsetHeight ?? 0, r = window.innerHeight - t.bottom, i = t.top, a = n > 0 && r < n && i > r, o = Ue.trigger ? Math.max(t.width, 240) : t.width, ee = Ue.trigger ? Math.max(8, Math.min(t.left, window.innerWidth - o - 8)) : t.left;
203
+ Ke.value = {
200
204
  position: "fixed",
201
205
  top: a ? `${t.top - n}px` : `${t.bottom}px`,
202
206
  left: `${ee}px`,
@@ -205,51 +209,51 @@ var be = [
205
209
  };
206
210
  }
207
211
  function J() {
208
- if (z.value) return;
209
- A.value = !0, nt();
212
+ if (L.value) return;
213
+ k.value = !0, it();
210
214
  let e = T.options ?? [];
211
- M.value = W.value.length > 0 ? Math.max(0, e.findIndex((e) => e.value === W.value[0])) : -1, se(() => {
212
- nt(), Q(), Be.value?.focus({ preventScroll: !0 });
215
+ j.value = G.value.length > 0 ? Math.max(0, e.findIndex((e) => e.value === G.value[0])) : -1, se(() => {
216
+ it(), Q(), Ve.value?.focus({ preventScroll: !0 });
213
217
  });
214
218
  }
215
219
  function Y() {
216
- let e = !!I.value?.contains(document.activeElement);
217
- A.value = !1, M.value = -1, k.value = "", e && Ue();
220
+ let e = !!P.value?.contains(document.activeElement);
221
+ k.value = !1, j.value = -1, O.value = "", e && Ge();
218
222
  }
219
223
  function X() {
220
- A.value ? Y() : J();
224
+ k.value ? Y() : J();
221
225
  }
222
- function rt(e) {
223
- let t = e.target, n = N.value?.contains(t) ?? !1, r = I.value?.contains(t) ?? !1;
226
+ function at(e) {
227
+ let t = e.target, n = M.value?.contains(t) ?? !1, r = P.value?.contains(t) ?? !1;
224
228
  !n && !r && Y();
225
229
  }
226
230
  function Z() {
227
- A.value && nt();
231
+ k.value && it();
228
232
  }
229
- he(A, (e) => {
230
- e ? (document.addEventListener("mousedown", rt), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z)) : (document.removeEventListener("mousedown", rt), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z));
233
+ he(k, (e) => {
234
+ e ? (document.addEventListener("mousedown", at), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z)) : (document.removeEventListener("mousedown", at), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z));
231
235
  }), ue(() => {
232
- document.removeEventListener("mousedown", rt), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z);
236
+ document.removeEventListener("mousedown", at), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z);
233
237
  });
234
- function it(e) {
238
+ function ot(e) {
235
239
  let t = T.options ?? [];
236
- if (!A.value) {
240
+ if (!k.value) {
237
241
  (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), J());
238
242
  return;
239
243
  }
240
- e.key === "Escape" ? (Y(), e.preventDefault()) : e.key === "Tab" ? Y() : e.key === "ArrowDown" ? (e.preventDefault(), M.value = q(M.value, 1), Q()) : e.key === "ArrowUp" ? (e.preventDefault(), M.value > 0 && (M.value = q(M.value, -1)), Q()) : (e.key === "Enter" || e.key === " ") && M.value >= 0 && (e.preventDefault(), tt(t[M.value]));
244
+ e.key === "Escape" ? (Y(), e.preventDefault()) : e.key === "Tab" ? Y() : e.key === "ArrowDown" ? (e.preventDefault(), j.value = nt(j.value, 1), Q()) : e.key === "ArrowUp" ? (e.preventDefault(), j.value > 0 && (j.value = nt(j.value, -1)), Q()) : (e.key === "Enter" || e.key === " ") && j.value >= 0 && (e.preventDefault(), rt(t[j.value]));
241
245
  }
242
246
  function Q() {
243
247
  se(() => {
244
- !I.value || M.value < 0 || I.value.querySelector(`[data-index="${M.value}"]`)?.scrollIntoView({ block: "nearest" });
248
+ !P.value || j.value < 0 || P.value.querySelector(`[data-index="${j.value}"]`)?.scrollIntoView({ block: "nearest" });
245
249
  });
246
250
  }
247
- he(k, () => {
248
- if (!A.value) return;
249
- let e = q(-1, 1);
250
- M.value = e === -1 ? -1 : e, Q();
251
+ he(O, () => {
252
+ if (!k.value) return;
253
+ let e = nt(-1, 1);
254
+ j.value = e === -1 ? -1 : e, Q();
251
255
  });
252
- function at(e) {
256
+ function st(e) {
253
257
  if (e.key === " ") {
254
258
  e.stopPropagation();
255
259
  return;
@@ -258,36 +262,37 @@ var be = [
258
262
  e.stopPropagation();
259
263
  return;
260
264
  }
261
- it(e);
265
+ ot(e);
262
266
  }
263
- let ot = c(() => ({
264
- isOpen: A.value,
267
+ let ct = c(() => ({
268
+ isOpen: k.value,
265
269
  toggle: X,
266
270
  open: J,
267
271
  close: Y,
268
272
  attrs: {
269
- "aria-expanded": A.value,
273
+ "aria-expanded": k.value,
270
274
  "aria-haspopup": "listbox",
271
- "aria-controls": A.value ? U.value : void 0,
272
- "aria-invalid": Ke.value,
275
+ "aria-controls": k.value ? H.value : void 0,
276
+ "aria-activedescendant": W.value,
277
+ "aria-invalid": Je.value,
273
278
  onClick: X
274
279
  }
275
- })), st = n(), ct = c(() => T.clearLabel ?? st.value.selectClear), $ = c(() => T.clearable && !z.value && W.value.length > 0);
276
- function lt() {
280
+ })), lt = n(), ut = c(() => T.clearLabel ?? lt.value.selectClear), $ = c(() => T.clearable && !L.value && G.value.length > 0);
281
+ function dt() {
277
282
  let e = T.multiple ? [] : null;
278
- Y(), E("update:modelValue", e), E("change", e), Ue();
283
+ Y(), E("update:modelValue", e), E("change", e), Ge();
279
284
  }
280
- let ut = c(() => [
285
+ let ft = c(() => [
281
286
  "nb-select",
282
287
  `nb-select--${T.variant}`,
283
- `nb-select--${L.size.value}`,
288
+ `nb-select--${F.size.value}`,
284
289
  {
285
- "nb-select--open": A.value,
286
- "nb-select--focused": j.value && !A.value,
287
- "nb-select--error": Ye.value,
288
- "nb-select--warning": !Ye.value && (!!T.warning || L.status.value === "warning"),
290
+ "nb-select--open": k.value,
291
+ "nb-select--focused": A.value && !k.value,
292
+ "nb-select--error": Ze.value,
293
+ "nb-select--warning": !Ze.value && (!R && !!T.warning || F.status.value === "warning"),
289
294
  "nb-select--multiple": T.multiple,
290
- "nb-select--bare": !!F.trigger
295
+ "nb-select--bare": !!Ue.trigger
291
296
  }
292
297
  ]);
293
298
  return Re({
@@ -295,15 +300,15 @@ var be = [
295
300
  close: Y
296
301
  }), (n, o) => (_(), d(s, null, [f("div", {
297
302
  ref_key: "rootRef",
298
- ref: N,
299
- class: g(ut.value),
300
- onKeydown: it
301
- }, [n.$slots.trigger ? y(n.$slots, "trigger", ce(oe({ key: 0 }, ot.value))) : h.variant === "default" ? (_(), d(s, { key: 1 }, [
302
- n.$slots.label ? y(n.$slots, "label", { key: 0 }) : h.label ? (_(), l(r, {
303
+ ref: M,
304
+ class: g(ft.value),
305
+ onKeydown: ot
306
+ }, [n.$slots.trigger ? y(n.$slots, "trigger", ce(oe({ key: 0 }, ct.value))) : h.variant === "default" ? (_(), d(s, { key: 1 }, [
307
+ n.$slots.label && !x(R) ? y(n.$slots, "label", { key: 0 }) : h.label && !x(R) ? (_(), l(r, {
303
308
  key: 1,
304
- for: x(R),
309
+ for: x(I),
305
310
  required: h.required,
306
- disabled: x(z)
311
+ disabled: x(L)
307
312
  }, {
308
313
  default: S(() => [p(b(h.label), 1)]),
309
314
  _: 1
@@ -312,37 +317,39 @@ var be = [
312
317
  "required",
313
318
  "disabled"
314
319
  ])) : u("", !0),
315
- m(D, { wrap: h.clearable }, {
320
+ m(Be, { wrap: h.clearable }, {
316
321
  default: S(() => [f("button", {
317
- id: x(R),
322
+ id: x(I),
318
323
  ref_key: "triggerRef",
319
- ref: P,
324
+ ref: N,
320
325
  type: "button",
321
326
  class: "nb-select__trigger",
322
327
  role: "combobox",
323
- "aria-expanded": A.value,
328
+ "aria-expanded": k.value,
324
329
  "aria-haspopup": "listbox",
325
- "aria-disabled": x(z) || void 0,
330
+ "aria-controls": k.value ? H.value : void 0,
331
+ "aria-activedescendant": W.value,
332
+ "aria-disabled": x(L) || void 0,
326
333
  "aria-required": h.required || void 0,
327
- "aria-invalid": Je.value,
328
- "aria-describedby": qe.value,
329
- disabled: x(z) || void 0,
334
+ "aria-invalid": Xe.value,
335
+ "aria-describedby": Ye.value,
336
+ disabled: x(L) || void 0,
330
337
  onClick: X,
331
- onFocus: o[0] ||= (e) => j.value = !0,
332
- onBlur: o[1] ||= (e) => j.value = !1
338
+ onFocus: o[0] ||= (e) => A.value = !0,
339
+ onBlur: o[1] ||= (e) => A.value = !1
333
340
  }, [
334
341
  f("span", { class: g(["nb-select__value", {
335
- "nb-select__value--placeholder": !K.value,
336
- "nb-select__value--with-icon": !!G.value
337
- }]) }, [G.value ? (_(), l(t, {
342
+ "nb-select__value--placeholder": !q.value,
343
+ "nb-select__value--with-icon": !!K.value
344
+ }]) }, [K.value ? (_(), l(t, {
338
345
  key: 0,
339
346
  class: "nb-select__value-icon",
340
- name: G.value,
347
+ name: K.value,
341
348
  size: 16
342
- }, null, 8, ["name"])) : u("", !0), K.value ? y(n.$slots, "value", {
349
+ }, null, 8, ["name"])) : u("", !0), q.value ? y(n.$slots, "value", {
343
350
  key: 1,
344
- values: W.value
345
- }, () => [p(b(K.value), 1)]) : (_(), d(s, { key: 2 }, [p(b(h.placeholder), 1)], 64))], 2),
351
+ values: G.value
352
+ }, () => [p(b(q.value), 1)]) : (_(), d(s, { key: 2 }, [p(b(h.placeholder), 1)], 64))], 2),
346
353
  h.error ? (_(), l(i, {
347
354
  key: 0,
348
355
  variant: "error",
@@ -371,7 +378,7 @@ var be = [
371
378
  class: "nb-select__caret"
372
379
  }, {
373
380
  default: S(() => [m(t, {
374
- name: A.value ? x(ve) : x(_e),
381
+ name: k.value ? x(ve) : x(_e),
375
382
  size: 16
376
383
  }, null, 8, ["name"])]),
377
384
  _: 1
@@ -381,59 +388,61 @@ var be = [
381
388
  variant: "ghost",
382
389
  icon: x(ye),
383
390
  size: "xs",
384
- label: ct.value,
391
+ label: ut.value,
385
392
  class: "nb-select__clear",
386
- onClick: lt,
393
+ onClick: dt,
387
394
  onKeydown: [o[2] ||= C(w(() => {}, ["stop"]), ["enter"]), o[3] ||= C(w(() => {}, ["stop"]), ["space"])]
388
395
  }, null, 8, ["icon", "label"])) : u("", !0)]),
389
396
  _: 3
390
397
  }, 8, ["wrap"]),
391
- h.error ? (_(), l(i, {
392
- id: x(B).error,
393
- key: x(H),
398
+ h.error && !x(R) ? (_(), l(i, {
399
+ id: x(z).error,
400
+ key: x(V),
394
401
  variant: "error",
395
- live: x(V),
402
+ live: x(B),
396
403
  class: "nb-select__message"
397
404
  }, {
398
405
  default: S(() => [p(b(h.error), 1)]),
399
406
  _: 1
400
- }, 8, ["id", "live"])) : h.warning ? (_(), l(i, {
401
- id: x(B).warning,
402
- key: x(H),
407
+ }, 8, ["id", "live"])) : h.warning && !x(R) ? (_(), l(i, {
408
+ id: x(z).warning,
409
+ key: x(V),
403
410
  variant: "warning",
404
- live: x(V),
411
+ live: x(B),
405
412
  class: "nb-select__message"
406
413
  }, {
407
414
  default: S(() => [p(b(h.warning), 1)]),
408
415
  _: 1
409
- }, 8, ["id", "live"])) : h.helper ? (_(), l(i, {
410
- id: x(B).helper,
411
- key: x(H),
416
+ }, 8, ["id", "live"])) : h.helper && !x(R) ? (_(), l(i, {
417
+ id: x(z).helper,
418
+ key: x(V),
412
419
  variant: "helper",
413
- live: x(V),
420
+ live: x(B),
414
421
  class: "nb-select__message"
415
422
  }, {
416
423
  default: S(() => [p(b(h.helper), 1)]),
417
424
  _: 1
418
425
  }, 8, ["id", "live"])) : u("", !0)
419
- ], 64)) : h.variant === "fluid" ? (_(), d(s, { key: 2 }, [m(D, { wrap: h.clearable }, {
426
+ ], 64)) : h.variant === "fluid" ? (_(), d(s, { key: 2 }, [m(Be, { wrap: h.clearable }, {
420
427
  default: S(() => [f("button", {
421
- id: x(R),
428
+ id: x(I),
422
429
  ref_key: "triggerRef",
423
- ref: P,
430
+ ref: N,
424
431
  type: "button",
425
432
  class: "nb-select__trigger",
426
433
  role: "combobox",
427
- "aria-expanded": A.value,
434
+ "aria-expanded": k.value,
428
435
  "aria-haspopup": "listbox",
429
- "aria-disabled": x(z) || void 0,
436
+ "aria-controls": k.value ? H.value : void 0,
437
+ "aria-activedescendant": W.value,
438
+ "aria-disabled": x(L) || void 0,
430
439
  "aria-required": h.required || void 0,
431
- "aria-invalid": Je.value,
432
- "aria-describedby": qe.value,
433
- disabled: x(z) || void 0,
440
+ "aria-invalid": Xe.value,
441
+ "aria-describedby": Ye.value,
442
+ disabled: x(L) || void 0,
434
443
  onClick: X,
435
- onFocus: o[4] ||= (e) => j.value = !0,
436
- onBlur: o[5] ||= (e) => j.value = !1
444
+ onFocus: o[4] ||= (e) => A.value = !0,
445
+ onBlur: o[5] ||= (e) => A.value = !1
437
446
  }, [h.label || n.$slots.label ? (_(), l(a, {
438
447
  key: 0,
439
448
  dir: "row",
@@ -443,7 +452,7 @@ var be = [
443
452
  }, {
444
453
  default: S(() => [n.$slots.label ? y(n.$slots, "label", { key: 0 }) : (_(), d("label", Ce, [p(b(h.label) + " ", 1), h.required ? (_(), d("span", we, "*")) : u("", !0)])), h.helper && !h.error && !h.warning ? (_(), l(i, {
445
454
  key: 2,
446
- id: x(B).helper,
455
+ id: x(z).helper,
447
456
  variant: "helper",
448
457
  "icon-only": !0,
449
458
  live: "off",
@@ -462,17 +471,17 @@ var be = [
462
471
  }, {
463
472
  default: S(() => [
464
473
  f("span", { class: g(["nb-select__value", {
465
- "nb-select__value--placeholder": !K.value,
466
- "nb-select__value--with-icon": !!G.value
467
- }]) }, [G.value ? (_(), l(t, {
474
+ "nb-select__value--placeholder": !q.value,
475
+ "nb-select__value--with-icon": !!K.value
476
+ }]) }, [K.value ? (_(), l(t, {
468
477
  key: 0,
469
478
  class: "nb-select__value-icon",
470
- name: G.value,
479
+ name: K.value,
471
480
  size: 16
472
- }, null, 8, ["name"])) : u("", !0), K.value ? y(n.$slots, "value", {
481
+ }, null, 8, ["name"])) : u("", !0), q.value ? y(n.$slots, "value", {
473
482
  key: 1,
474
- values: W.value
475
- }, () => [p(b(K.value), 1)]) : (_(), d(s, { key: 2 }, [p(b(h.placeholder), 1)], 64))], 2),
483
+ values: G.value
484
+ }, () => [p(b(q.value), 1)]) : (_(), d(s, { key: 2 }, [p(b(h.placeholder), 1)], 64))], 2),
476
485
  $.value ? (_(), d("span", Te)) : u("", !0),
477
486
  m(a, {
478
487
  align: "center",
@@ -480,7 +489,7 @@ var be = [
480
489
  class: "nb-select__caret"
481
490
  }, {
482
491
  default: S(() => [m(t, {
483
- name: A.value ? x(ve) : x(_e),
492
+ name: k.value ? x(ve) : x(_e),
484
493
  size: 16
485
494
  }, null, 8, ["name"])]),
486
495
  _: 1
@@ -492,59 +501,59 @@ var be = [
492
501
  variant: "ghost",
493
502
  icon: x(ye),
494
503
  size: "xs",
495
- label: ct.value,
504
+ label: ut.value,
496
505
  class: "nb-select__clear",
497
- onClick: lt,
506
+ onClick: dt,
498
507
  onKeydown: [o[6] ||= C(w(() => {}, ["stop"]), ["enter"]), o[7] ||= C(w(() => {}, ["stop"]), ["space"])]
499
508
  }, null, 8, ["icon", "label"])) : u("", !0)]),
500
509
  _: 3
501
510
  }, 8, ["wrap"]), h.error ? (_(), l(i, {
502
- id: x(B).error,
503
- key: x(H),
511
+ id: x(z).error,
512
+ key: x(V),
504
513
  variant: "error",
505
- live: x(V),
514
+ live: x(B),
506
515
  class: "nb-select__fluid-message"
507
516
  }, {
508
517
  default: S(() => [p(b(h.error), 1)]),
509
518
  _: 1
510
519
  }, 8, ["id", "live"])) : h.warning ? (_(), l(i, {
511
- id: x(B).warning,
512
- key: x(H),
520
+ id: x(z).warning,
521
+ key: x(V),
513
522
  variant: "warning",
514
- live: x(V),
523
+ live: x(B),
515
524
  class: "nb-select__fluid-message"
516
525
  }, {
517
526
  default: S(() => [p(b(h.warning), 1)]),
518
527
  _: 1
519
528
  }, 8, ["id", "live"])) : u("", !0)], 64)) : u("", !0)], 34), (_(), l(re, { to: "body" }, [m(ie, { name: "nb-select-pop" }, {
520
- default: S(() => [A.value ? (_(), d("div", {
529
+ default: S(() => [k.value ? (_(), d("div", {
521
530
  key: 0,
522
- id: U.value,
531
+ id: H.value,
523
532
  ref_key: "dropdownRef",
524
- ref: I,
533
+ ref: P,
525
534
  class: g(["nb-select__dropdown", {
526
535
  "nb-select__dropdown--check": h.selectedMark === "check",
527
536
  "nb-select__dropdown--anchored": !!n.$slots.trigger
528
537
  }]),
529
- style: le(We.value),
538
+ style: le(Ke.value),
530
539
  role: "listbox",
531
540
  "aria-multiselectable": h.multiple || void 0
532
541
  }, [
533
542
  h.searchable ? (_(), d("div", De, [ge(f("input", {
534
543
  ref_key: "searchRef",
535
- ref: Be,
536
- "onUpdate:modelValue": o[8] ||= (e) => k.value = e,
544
+ ref: Ve,
545
+ "onUpdate:modelValue": o[8] ||= (e) => O.value = e,
537
546
  type: "search",
538
547
  class: "nb-select__search-input",
539
548
  autocomplete: "off",
540
549
  spellcheck: "false",
541
550
  placeholder: h.searchPlaceholder,
542
551
  "aria-label": h.searchPlaceholder,
543
- "aria-controls": U.value,
544
- "aria-activedescendant": M.value >= 0 ? Xe(M.value) : void 0,
545
- onKeydown: at
546
- }, null, 40, Oe), [[me, k.value]])])) : u("", !0),
547
- (_(!0), d(s, null, de(et.value, (e) => (_(), d("div", {
552
+ "aria-controls": H.value,
553
+ "aria-activedescendant": j.value >= 0 ? U(j.value) : void 0,
554
+ onKeydown: st
555
+ }, null, 40, Oe), [[me, O.value]])])) : u("", !0),
556
+ (_(!0), d(s, null, de(tt.value, (e) => (_(), d("div", {
548
557
  key: e.key,
549
558
  class: "nb-select__group",
550
559
  role: "group",
@@ -554,21 +563,21 @@ var be = [
554
563
  id: e.labelId,
555
564
  class: "nb-select__group-label"
556
565
  }, b(e.name), 9, Ae)) : u("", !0), (_(!0), d(s, null, de(e.entries, (e) => (_(), d("div", {
557
- id: Xe(e.index),
566
+ id: U(e.index),
558
567
  key: e.option.value,
559
568
  "data-index": e.index,
560
569
  class: g(["nb-select__option", {
561
- "nb-select__option--selected": Ze(e.option.value),
562
- "nb-select__option--highlighted": M.value === e.index,
570
+ "nb-select__option--selected": Qe(e.option.value),
571
+ "nb-select__option--highlighted": j.value === e.index,
563
572
  "nb-select__option--disabled": e.option.disabled
564
573
  }]),
565
574
  role: "option",
566
- "aria-selected": Ze(e.option.value),
575
+ "aria-selected": Qe(e.option.value),
567
576
  "aria-disabled": e.option.disabled || void 0,
568
- onMouseenter: (t) => M.value = e.index,
569
- onClick: (t) => tt(e.option)
577
+ onMouseenter: (t) => j.value = e.index,
578
+ onClick: (t) => rt(e.option)
570
579
  }, [
571
- h.multiple || h.selectedMark === "check" ? (_(), d("span", Me, [Ze(e.option.value) ? (_(), d("svg", Ne, [...o[12] ||= [f("path", {
580
+ h.multiple || h.selectedMark === "check" ? (_(), d("span", Me, [Qe(e.option.value) ? (_(), d("svg", Ne, [...o[12] ||= [f("path", {
572
581
  d: "M1 4l3 3 5-6",
573
582
  stroke: "currentColor",
574
583
  "stroke-width": "1.5",
@@ -583,18 +592,18 @@ var be = [
583
592
  }, null, 8, ["name"])) : u("", !0),
584
593
  f("span", Pe, [y(n.$slots, "option", { option: e.option }, () => [p(b(e.option.label), 1)])])
585
594
  ], 42, je))), 128))], 8, ke))), 128)),
586
- !h.options || h.options.length === 0 ? (_(), d("div", Fe, " No options ")) : h.searchable && $e.value.size === 0 ? (_(), d("div", Ie, b(h.noResultsLabel), 1)) : u("", !0),
595
+ !h.options || h.options.length === 0 ? (_(), d("div", Fe, " No options ")) : h.searchable && et.value.size === 0 ? (_(), d("div", Ie, b(h.noResultsLabel), 1)) : u("", !0),
587
596
  h.creatable ? (_(), d("div", {
588
597
  key: 3,
589
598
  class: "nb-select__create",
590
599
  onMousedown: o[11] ||= w(() => {}, ["prevent"])
591
600
  }, [ge(f("input", {
592
- "onUpdate:modelValue": o[9] ||= (e) => O.value = e,
601
+ "onUpdate:modelValue": o[9] ||= (e) => D.value = e,
593
602
  type: "text",
594
603
  class: "nb-select__create-input",
595
604
  placeholder: h.createPlaceholder || "Add new…",
596
- onKeydown: [C(w(Ve, ["prevent"]), ["enter"]), o[10] ||= w(() => {}, ["stop"])]
597
- }, null, 40, Le), [[me, O.value]])], 32)) : u("", !0)
605
+ onKeydown: [C(w(He, ["prevent"]), ["enter"]), o[10] ||= w(() => {}, ["stop"])]
606
+ }, null, 40, Le), [[me, D.value]])], 32)) : u("", !0)
598
607
  ], 14, Ee)) : u("", !0)]),
599
608
  _: 3
600
609
  })]))], 64));
@@ -5,7 +5,7 @@ import { t as r } from "./Label-xwHw_UbN.js";
5
5
  import { t as i } from "./Message-DCeg8qsC.js";
6
6
  import { t as a } from "./Grid-B7d8x0tA.js";
7
7
  import { useFieldMessage as o } from "./composables/useFieldMessage.composable.mjs";
8
- import { t as s } from "./NumberInput-DfrhQayO.js";
8
+ import { t as s } from "./NumberInput-B-TvTlXI.js";
9
9
  import { Fragment as ee, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as te, openBlock as v, ref as y, toDisplayString as b, unref as x, withCtx as S, withModifiers as C } from "vue";
10
10
  //#region src/components/Slider.vue?vue&type=script&setup=true&lang.ts
11
11
  var ne = { class: "nb-slider__field-box" }, re = {