@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.
- package/dist/{ActionGroup-48ZXZCsn.cjs → ActionGroup-CZWoWOYj.cjs} +1 -1
- package/dist/{ActionGroup-DzQjn3ir.js → ActionGroup-DEeOrkKF.js} +1 -1
- package/dist/{AiProvider-BrjUMTRk.cjs → AiProvider-C5ezIeiH.cjs} +1 -1
- package/dist/{AiProvider-Db47uagx.js → AiProvider-DHXJJRrw.js} +2 -2
- package/dist/{BatchActions-0P-b3qLI.js → BatchActions-CLCwxCoa.js} +3 -1
- package/dist/{BatchActions-FDPiGUNh.cjs → BatchActions-DfAPQSU6.cjs} +1 -1
- package/dist/{BlueprintCard-_FItugFc.js → BlueprintCard-CqlU0QFY.js} +10 -12
- package/dist/BlueprintCard-DGUNttWj.cjs +1 -0
- package/dist/{Board-CSVCzJ1s.js → Board-DEBP52eI.js} +1 -1
- package/dist/{Board-gUICo94e.cjs → Board-DIbzPDsD.cjs} +1 -1
- package/dist/{Breadcrumbs-BgMh5bfe.js → Breadcrumbs-BDsy1vNm.js} +1 -1
- package/dist/{Breadcrumbs-DN_2wxQS.cjs → Breadcrumbs-DMpa5j7m.cjs} +1 -1
- package/dist/{Confirm-DLhI3VVh.js → Confirm-CZNS6FNr.js} +1 -1
- package/dist/{Confirm-BQxQlmjs.cjs → Confirm-DbrEaYlJ.cjs} +1 -1
- package/dist/{ContainedListItem-DtTZOm-_.js → ContainedListItem-8z2bmoRG.js} +19 -17
- package/dist/ContainedListItem-BKvHedZO.cjs +1 -0
- package/dist/{DataTable-Dp3WZihu.js → DataTable-DDqMaOqP.js} +2 -2
- package/dist/{DataTable-CHztTxz1.cjs → DataTable-DQUX-6li.cjs} +1 -1
- package/dist/DatePicker-Du21bjhe.cjs +1 -0
- package/dist/DatePicker-fS84mRE6.js +761 -0
- package/dist/{InputGroup-DQxpFFlP.js → InputGroup-BYThVO5L.js} +1 -1
- package/dist/{InputGroup-DIAJy1Sv.cjs → InputGroup-BYoHNpY0.cjs} +1 -1
- package/dist/InputGroup.context-BHj-IvcT.cjs +1 -0
- package/dist/InputGroup.context-Dd4e6fGT.js +28 -0
- package/dist/{Menu-CcQpTOd3.js → Menu-7EgnchVu.js} +1 -1
- package/dist/Menu-Bs2Co1sl.cjs +1 -0
- package/dist/{MenuBarItem-BlT1hN-b.js → MenuBarItem-CQsy3y2I.js} +1 -1
- package/dist/{MenuBarItem-BIDXX-uX.cjs → MenuBarItem-Dd9hNBra.cjs} +1 -1
- package/dist/MenuItem-DFfE_k0L.cjs +1 -0
- package/dist/{MenuItem-BerQIsRQ.js → MenuItem-DMYDHaa0.js} +44 -28
- package/dist/{NumberInput-DfrhQayO.js → NumberInput-B-TvTlXI.js} +1 -1
- package/dist/{NumberInput-CcXqTINb.cjs → NumberInput-DaZI9hc3.cjs} +1 -1
- package/dist/{OverflowMenu-CaC5E0Oy.cjs → OverflowMenu-DFOJSaS7.cjs} +1 -1
- package/dist/{OverflowMenu-BlZ_wEja.js → OverflowMenu-OCAeE3W0.js} +4 -2
- package/dist/{PageHeader-DgjItuag.js → PageHeader-1wou3Him.js} +1 -1
- package/dist/{PageHeader-2jBgITYE.cjs → PageHeader-BfUlrscM.cjs} +1 -1
- package/dist/{Pagination-DA1Nglqx.js → Pagination-CQJYl76w.js} +1 -1
- package/dist/{Pagination-B1km1o28.cjs → Pagination-Sm4rX7gH.cjs} +1 -1
- package/dist/{Search-BUgIh9TX.js → Search-BnGuTcHp.js} +1 -1
- package/dist/{Search-D4SG2q3c.cjs → Search-CfH1Q9GB.cjs} +1 -1
- package/dist/Select-C4s5Eek6.cjs +1 -0
- package/dist/{Select-Cf0T4gIu.js → Select-CuiJz35r.js} +169 -160
- package/dist/{Slider-D9hgB8GJ.js → Slider-BP-oEeJs.js} +1 -1
- package/dist/{Slider-D9glvyrU.cjs → Slider-D3YgGPcY.cjs} +1 -1
- package/dist/TextInput-BVTKUEey.cjs +2 -0
- package/dist/TextInput-DqaVhKud.js +438 -0
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +23 -23
- package/dist/components/ActionGroup.cjs +1 -1
- package/dist/components/ActionGroup.mjs +1 -1
- package/dist/components/AiProvider.cjs +1 -1
- package/dist/components/AiProvider.mjs +1 -1
- package/dist/components/BatchActions.cjs +1 -1
- package/dist/components/BatchActions.mjs +1 -1
- package/dist/components/BatchActions.vue.d.ts.map +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.mjs +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.mjs +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.mjs +1 -1
- package/dist/components/ContainedList.d.ts +7 -0
- package/dist/components/ContainedListItem.cjs +1 -1
- package/dist/components/ContainedListItem.mjs +1 -1
- package/dist/components/ContainedListItem.vue.d.ts +1 -0
- package/dist/components/ContainedListItem.vue.d.ts.map +1 -1
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/InputGroup.cjs +1 -1
- package/dist/components/InputGroup.context.d.ts +4 -0
- package/dist/components/InputGroup.context.d.ts.map +1 -1
- package/dist/components/InputGroup.mjs +1 -1
- package/dist/components/Menu.cjs +1 -1
- package/dist/components/Menu.d.ts +10 -0
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/Menu.vue.d.ts.map +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/MenuItem.cjs +1 -1
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItem.vue.d.ts +1 -0
- package/dist/components/MenuItem.vue.d.ts.map +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/OverflowMenu.cjs +1 -1
- package/dist/components/OverflowMenu.mjs +1 -1
- package/dist/components/OverflowMenu.vue.d.ts.map +1 -1
- package/dist/components/PageHeader.cjs +1 -1
- package/dist/components/PageHeader.mjs +1 -1
- package/dist/components/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Search.cjs +1 -1
- package/dist/components/Search.mjs +1 -1
- package/dist/components/Select.cjs +1 -1
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts +1 -0
- package/dist/components/Select.vue.d.ts.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +1 -1
- package/dist/components/TextInput.vue.d.ts +2 -2
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +1 -1
- package/dist/composables/useNbStrings.composable.cjs +1 -1
- package/dist/composables/useNbStrings.composable.d.ts +11 -0
- package/dist/composables/useNbStrings.composable.d.ts.map +1 -1
- package/dist/composables/useNbStrings.composable.mjs +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +23 -23
- package/dist/styles/BlueprintCard.css +1 -1
- package/dist/styles/ContainedListItem.css +1 -1
- package/dist/styles/MenuItem.css +1 -1
- package/dist/styles/TextInput.css +1 -1
- package/dist/ui.css +4 -4
- package/package.json +1 -1
- package/dist/BlueprintCard-D3h_rGhj.cjs +0 -1
- package/dist/ContainedListItem-DjHEyhf8.cjs +0 -1
- package/dist/DatePicker-BLRQEI-6.js +0 -755
- package/dist/DatePicker-CJlffHeM.cjs +0 -1
- package/dist/InputGroup.context-BTt6zUkj.cjs +0 -1
- package/dist/InputGroup.context-CJAWx5GI.js +0 -16
- package/dist/Menu-SlBztEy3.cjs +0 -1
- package/dist/MenuItem-CvpxnM4W.cjs +0 -1
- package/dist/Select-DhwcDMnf.cjs +0 -1
- package/dist/TextInput-BM2Zc2_R.cjs +0 -2
- 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-
|
|
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,
|
|
132
|
-
|
|
133
|
-
let
|
|
134
|
-
function
|
|
135
|
-
let e =
|
|
136
|
-
e && (E("create", e),
|
|
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
|
|
139
|
-
function
|
|
140
|
-
(
|
|
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
|
|
143
|
-
ne(
|
|
144
|
-
let
|
|
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
|
-
}),
|
|
151
|
-
if (!(T.multiple ||
|
|
152
|
-
}),
|
|
153
|
-
if (
|
|
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 ?
|
|
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
|
|
158
|
-
return
|
|
161
|
+
function Qe(e) {
|
|
162
|
+
return G.value.includes(e);
|
|
159
163
|
}
|
|
160
|
-
let
|
|
161
|
-
let e = T.options ?? [], t = T.searchable ?
|
|
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 ||
|
|
167
|
+
(!t || $e(e.label).includes(t)) && n.add(r);
|
|
164
168
|
}), n;
|
|
165
|
-
}),
|
|
169
|
+
}), tt = c(() => {
|
|
166
170
|
let e = [];
|
|
167
171
|
return (T.options ?? []).forEach((t, n) => {
|
|
168
|
-
if (
|
|
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: `${
|
|
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
|
|
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 &&
|
|
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
|
|
190
|
+
function rt(e) {
|
|
187
191
|
if (e.disabled) return;
|
|
188
192
|
let t;
|
|
189
193
|
if (T.multiple) {
|
|
190
|
-
let n = [...
|
|
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
|
|
196
|
-
let e =
|
|
199
|
+
function it() {
|
|
200
|
+
let e = We();
|
|
197
201
|
if (!e) return;
|
|
198
|
-
let t = e.getBoundingClientRect(), n =
|
|
199
|
-
|
|
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 (
|
|
209
|
-
|
|
212
|
+
if (L.value) return;
|
|
213
|
+
k.value = !0, it();
|
|
210
214
|
let e = T.options ?? [];
|
|
211
|
-
|
|
212
|
-
|
|
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 = !!
|
|
217
|
-
|
|
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
|
-
|
|
224
|
+
k.value ? Y() : J();
|
|
221
225
|
}
|
|
222
|
-
function
|
|
223
|
-
let t = e.target, n =
|
|
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
|
-
|
|
231
|
+
k.value && it();
|
|
228
232
|
}
|
|
229
|
-
he(
|
|
230
|
-
e ? (document.addEventListener("mousedown",
|
|
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",
|
|
236
|
+
document.removeEventListener("mousedown", at), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z);
|
|
233
237
|
});
|
|
234
|
-
function
|
|
238
|
+
function ot(e) {
|
|
235
239
|
let t = T.options ?? [];
|
|
236
|
-
if (!
|
|
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(),
|
|
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
|
-
!
|
|
248
|
+
!P.value || j.value < 0 || P.value.querySelector(`[data-index="${j.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
245
249
|
});
|
|
246
250
|
}
|
|
247
|
-
he(
|
|
248
|
-
if (!
|
|
249
|
-
let e =
|
|
250
|
-
|
|
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
|
|
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
|
-
|
|
265
|
+
ot(e);
|
|
262
266
|
}
|
|
263
|
-
let
|
|
264
|
-
isOpen:
|
|
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":
|
|
273
|
+
"aria-expanded": k.value,
|
|
270
274
|
"aria-haspopup": "listbox",
|
|
271
|
-
"aria-controls":
|
|
272
|
-
"aria-
|
|
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
|
-
})),
|
|
276
|
-
function
|
|
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),
|
|
283
|
+
Y(), E("update:modelValue", e), E("change", e), Ge();
|
|
279
284
|
}
|
|
280
|
-
let
|
|
285
|
+
let ft = c(() => [
|
|
281
286
|
"nb-select",
|
|
282
287
|
`nb-select--${T.variant}`,
|
|
283
|
-
`nb-select--${
|
|
288
|
+
`nb-select--${F.size.value}`,
|
|
284
289
|
{
|
|
285
|
-
"nb-select--open":
|
|
286
|
-
"nb-select--focused":
|
|
287
|
-
"nb-select--error":
|
|
288
|
-
"nb-select--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": !!
|
|
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:
|
|
299
|
-
class: g(
|
|
300
|
-
onKeydown:
|
|
301
|
-
}, [n.$slots.trigger ? y(n.$slots, "trigger", ce(oe({ key: 0 },
|
|
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(
|
|
309
|
+
for: x(I),
|
|
305
310
|
required: h.required,
|
|
306
|
-
disabled: x(
|
|
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(
|
|
320
|
+
m(Be, { wrap: h.clearable }, {
|
|
316
321
|
default: S(() => [f("button", {
|
|
317
|
-
id: x(
|
|
322
|
+
id: x(I),
|
|
318
323
|
ref_key: "triggerRef",
|
|
319
|
-
ref:
|
|
324
|
+
ref: N,
|
|
320
325
|
type: "button",
|
|
321
326
|
class: "nb-select__trigger",
|
|
322
327
|
role: "combobox",
|
|
323
|
-
"aria-expanded":
|
|
328
|
+
"aria-expanded": k.value,
|
|
324
329
|
"aria-haspopup": "listbox",
|
|
325
|
-
"aria-
|
|
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":
|
|
328
|
-
"aria-describedby":
|
|
329
|
-
disabled: x(
|
|
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) =>
|
|
332
|
-
onBlur: o[1] ||= (e) =>
|
|
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": !
|
|
336
|
-
"nb-select__value--with-icon": !!
|
|
337
|
-
}]) }, [
|
|
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:
|
|
347
|
+
name: K.value,
|
|
341
348
|
size: 16
|
|
342
|
-
}, null, 8, ["name"])) : u("", !0),
|
|
349
|
+
}, null, 8, ["name"])) : u("", !0), q.value ? y(n.$slots, "value", {
|
|
343
350
|
key: 1,
|
|
344
|
-
values:
|
|
345
|
-
}, () => [p(b(
|
|
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:
|
|
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:
|
|
391
|
+
label: ut.value,
|
|
385
392
|
class: "nb-select__clear",
|
|
386
|
-
onClick:
|
|
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(
|
|
393
|
-
key: x(
|
|
398
|
+
h.error && !x(R) ? (_(), l(i, {
|
|
399
|
+
id: x(z).error,
|
|
400
|
+
key: x(V),
|
|
394
401
|
variant: "error",
|
|
395
|
-
live: x(
|
|
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(
|
|
402
|
-
key: x(
|
|
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(
|
|
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(
|
|
411
|
-
key: x(
|
|
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(
|
|
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(
|
|
426
|
+
], 64)) : h.variant === "fluid" ? (_(), d(s, { key: 2 }, [m(Be, { wrap: h.clearable }, {
|
|
420
427
|
default: S(() => [f("button", {
|
|
421
|
-
id: x(
|
|
428
|
+
id: x(I),
|
|
422
429
|
ref_key: "triggerRef",
|
|
423
|
-
ref:
|
|
430
|
+
ref: N,
|
|
424
431
|
type: "button",
|
|
425
432
|
class: "nb-select__trigger",
|
|
426
433
|
role: "combobox",
|
|
427
|
-
"aria-expanded":
|
|
434
|
+
"aria-expanded": k.value,
|
|
428
435
|
"aria-haspopup": "listbox",
|
|
429
|
-
"aria-
|
|
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":
|
|
432
|
-
"aria-describedby":
|
|
433
|
-
disabled: x(
|
|
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) =>
|
|
436
|
-
onBlur: o[5] ||= (e) =>
|
|
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(
|
|
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": !
|
|
466
|
-
"nb-select__value--with-icon": !!
|
|
467
|
-
}]) }, [
|
|
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:
|
|
479
|
+
name: K.value,
|
|
471
480
|
size: 16
|
|
472
|
-
}, null, 8, ["name"])) : u("", !0),
|
|
481
|
+
}, null, 8, ["name"])) : u("", !0), q.value ? y(n.$slots, "value", {
|
|
473
482
|
key: 1,
|
|
474
|
-
values:
|
|
475
|
-
}, () => [p(b(
|
|
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:
|
|
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:
|
|
504
|
+
label: ut.value,
|
|
496
505
|
class: "nb-select__clear",
|
|
497
|
-
onClick:
|
|
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(
|
|
503
|
-
key: x(
|
|
511
|
+
id: x(z).error,
|
|
512
|
+
key: x(V),
|
|
504
513
|
variant: "error",
|
|
505
|
-
live: x(
|
|
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(
|
|
512
|
-
key: x(
|
|
520
|
+
id: x(z).warning,
|
|
521
|
+
key: x(V),
|
|
513
522
|
variant: "warning",
|
|
514
|
-
live: x(
|
|
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(() => [
|
|
529
|
+
default: S(() => [k.value ? (_(), d("div", {
|
|
521
530
|
key: 0,
|
|
522
|
-
id:
|
|
531
|
+
id: H.value,
|
|
523
532
|
ref_key: "dropdownRef",
|
|
524
|
-
ref:
|
|
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(
|
|
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:
|
|
536
|
-
"onUpdate:modelValue": o[8] ||= (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":
|
|
544
|
-
"aria-activedescendant":
|
|
545
|
-
onKeydown:
|
|
546
|
-
}, null, 40, Oe), [[me,
|
|
547
|
-
(_(!0), d(s, null, de(
|
|
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:
|
|
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":
|
|
562
|
-
"nb-select__option--highlighted":
|
|
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":
|
|
575
|
+
"aria-selected": Qe(e.option.value),
|
|
567
576
|
"aria-disabled": e.option.disabled || void 0,
|
|
568
|
-
onMouseenter: (t) =>
|
|
569
|
-
onClick: (t) =>
|
|
577
|
+
onMouseenter: (t) => j.value = e.index,
|
|
578
|
+
onClick: (t) => rt(e.option)
|
|
570
579
|
}, [
|
|
571
|
-
h.multiple || h.selectedMark === "check" ? (_(), d("span", Me, [
|
|
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 &&
|
|
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) =>
|
|
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(
|
|
597
|
-
}, null, 40, Le), [[me,
|
|
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-
|
|
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 = {
|