@wirecore/wirelayer-react 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-Cd7lufvJ.js → Button-D_ctSYR-.js} +1 -1
- package/dist/{Checkbox-BMRax6m4.js → Checkbox-DXiff9X7.js} +1 -1
- package/dist/{ContextMenu-Bz723GfL.js → ContextMenu-Z23QyLFn.js} +408 -370
- package/dist/{CopyButton-C_LAuCkR.js → CopyButton-Dr_QrMYf.js} +2 -2
- package/dist/{Field-DkYxlVar.js → Field-DFh-zcjr.js} +3 -3
- package/dist/{Highlight-43-H9459.js → Highlight-CpYN310r.js} +1 -1
- package/dist/{Input-CtYSQznO.js → Input-D8lXkJcv.js} +4 -4
- package/dist/PasswordInput-DQIzdTGq.js +452 -0
- package/dist/{RecipesProvider-0idafuGm.js → RecipesProvider-COODXvxz.js} +8 -1
- package/dist/{Select-CGyqfOm3.js → Select-E_geb3hU.js} +5 -5
- package/dist/{Slider-Bfm_jjYE.js → Slider-BFGCHR5_.js} +3 -3
- package/dist/{Tree-DLHbcH3-.js → Tree-BDYg4j6i.js} +128 -128
- package/dist/chart.js +2 -2
- package/dist/code.js +14 -14
- package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/Confirm/confirm.d.ts +5 -0
- package/dist/components/Confirm/confirm.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +12 -3
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/DialogService/DialogHost.d.ts.map +1 -1
- package/dist/components/DialogService/dialogs.d.ts +5 -0
- package/dist/components/DialogService/dialogs.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +10 -2
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +8 -2
- package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/RecipesProvider/RecipesProvider.d.ts +6 -0
- package/dist/components/RecipesProvider/RecipesProvider.d.ts.map +1 -1
- package/dist/data-table/DataTable.d.ts +26 -7
- package/dist/data-table/DataTable.d.ts.map +1 -1
- package/dist/data-table/FilterMenu.d.ts.map +1 -1
- package/dist/data-table/ValueInput.d.ts +5 -1
- package/dist/data-table/ValueInput.d.ts.map +1 -1
- package/dist/data-table/features.d.ts +10 -0
- package/dist/data-table/features.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/inputs.d.ts +5 -0
- package/dist/data-table/inputs.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +3 -0
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1150 -1083
- package/dist/editor.js +4 -4
- package/dist/form.js +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2088 -2111
- package/dist/pdf.js +7 -7
- package/dist/sources/dateRangeInput.css +3 -0
- package/dist/virtual.js +7 -7
- package/llms-full.txt +76 -15
- package/llms.txt +1 -0
- package/package.json +3 -3
- package/dist/PasswordInput-CxZXGV2m.js +0 -449
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as e,
|
|
2
|
+
import { a as e, n as t, o as n } from "./RecipesProvider-COODXvxz.js";
|
|
3
3
|
import { r, t as i } from "./InputStatus-hVzkU_4q.js";
|
|
4
|
-
import { t as a } from "./Input-
|
|
5
|
-
import { t as o } from "./Select-
|
|
4
|
+
import { t as a } from "./Input-D8lXkJcv.js";
|
|
5
|
+
import { t as o } from "./Select-E_geb3hU.js";
|
|
6
6
|
import { t as s } from "./label-for-DYgV5EwH.js";
|
|
7
|
-
import { a as c, c as l, n as u, o as d } from "./Highlight-
|
|
8
|
-
import { SUBMENU_GUTTER as f, allListOptionsState as p, anchorBox as m, closeMenuOnPageEvents as h, controlIds as g, createContextMenuSource as _, createLongPress as v, datePicker as y, defaultNumberFormat as b, filterMenuEntries as x, fromWallIso as S, highlightFirstMenuItem as C, indexListOptions as w, insertIntoTextControl as T, isoWeekday as E, linkTarget as D, localeWeekInfo as O, menu as k, menuSearchKey as A, multiSelect as ee, numberInput as j, numberInputKey as M, pageForSize as N, pagination as P, parseLocaleNumber as F, parsePastedDate as te, parsePastedRange as ne, pluralText as re,
|
|
9
|
-
import { CalendarDays as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { useFilter as
|
|
7
|
+
import { a as c, c as l, n as u, o as d } from "./Highlight-CpYN310r.js";
|
|
8
|
+
import { SUBMENU_GUTTER as f, allListOptionsState as p, anchorBox as m, closeMenuOnPageEvents as h, controlIds as g, createContextMenuSource as _, createLongPress as v, datePicker as y, defaultNumberFormat as b, filterMenuEntries as x, fromWallIso as S, highlightFirstMenuItem as C, indexListOptions as w, insertIntoTextControl as T, isoWeekday as E, linkTarget as D, localeWeekInfo as O, menu as k, menuSearchKey as A, multiSelect as ee, numberInput as j, numberInputKey as M, pageForSize as N, pagination as P, parseLocaleNumber as F, parsePastedDate as te, parsePastedRange as ne, pluralText as re, presetDateRange as I, rowWeekNumber as ie, setTextControlValue as L, skeleton as ae, textarea as oe, textareaParts as se, timeSlots as ce, timeZoneLabel as le, timeZoneLongLabel as ue, toNumberInputValue as de, toOverlayAnchor as fe, toWallIso as R, todayIso as pe, toggleAllListOptions as z, zonedToInstant as B } from "@wirecore/wirelayer-recipes";
|
|
9
|
+
import { CalendarDays as V, Check as H, ChevronDown as me, ChevronLeft as U, ChevronRight as W, ChevronUp as he, ChevronsLeft as ge, ChevronsRight as _e, Circle as ve, LoaderCircle as ye, Minus as be, Plus as G, X as xe } from "lucide-react";
|
|
10
|
+
import { Fragment as Se, createContext as Ce, createElement as we, useContext as Te, useEffect as Ee, useId as De, useImperativeHandle as Oe, useLayoutEffect as ke, useMemo as Ae, useRef as K, useState as q } from "react";
|
|
11
|
+
import { useFilter as je } from "@ark-ui/react/locale";
|
|
12
12
|
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
13
13
|
import { Menu as Z } from "@ark-ui/react/menu";
|
|
14
|
-
import { Portal as
|
|
15
|
-
import { Field as
|
|
16
|
-
import { Pagination as
|
|
17
|
-
import { createListCollection as
|
|
14
|
+
import { Portal as Me } from "@ark-ui/react/portal";
|
|
15
|
+
import { Field as Ne, useFieldContext as Pe } from "@ark-ui/react/field";
|
|
16
|
+
import { Pagination as Fe } from "@ark-ui/react/pagination";
|
|
17
|
+
import { createListCollection as Ie } from "@ark-ui/react/collection";
|
|
18
18
|
import { Select as Q } from "@ark-ui/react/select";
|
|
19
|
-
import { DatePicker as $, useDatePickerContext as
|
|
20
|
-
import { DateInput as
|
|
21
|
-
import { CalendarDateTime as
|
|
22
|
-
import { NumberInput as
|
|
19
|
+
import { DatePicker as $, useDatePickerContext as Le } from "@ark-ui/react/date-picker";
|
|
20
|
+
import { DateInput as Re } from "@ark-ui/react/date-input";
|
|
21
|
+
import { CalendarDateTime as ze, DateFormatter as Be, Time as Ve, parseDate as He, parseDateTime as Ue, toCalendarDateTime as We } from "@internationalized/date";
|
|
22
|
+
import { NumberInput as Ge } from "@ark-ui/react/number-input";
|
|
23
23
|
//#region src/overlay.ts
|
|
24
|
-
var
|
|
25
|
-
function
|
|
26
|
-
let [t, n] =
|
|
24
|
+
var Ke = (e) => e && "current" in e ? e.current : e ?? null, qe = typeof document > "u" ? Ee : ke;
|
|
25
|
+
function Je(e) {
|
|
26
|
+
let [t, n] = q(e.defaultOpen ?? !1), [r, i] = q(null), a = e.open ?? t, o = r ?? Ke(e.anchor), s = K(null), c = K(!1);
|
|
27
27
|
c.current = !!o;
|
|
28
|
-
let l =
|
|
29
|
-
|
|
28
|
+
let l = K(a);
|
|
29
|
+
qe(() => {
|
|
30
30
|
if (l.current !== a) {
|
|
31
31
|
if (l.current = a, a) s.current = document.activeElement;
|
|
32
32
|
else if (e.restoreFocus) {
|
|
@@ -47,7 +47,7 @@ function qe(e) {
|
|
|
47
47
|
e && i(null), u(e);
|
|
48
48
|
}, f = {
|
|
49
49
|
open(e) {
|
|
50
|
-
i(
|
|
50
|
+
i(fe(e)), u(!0);
|
|
51
51
|
},
|
|
52
52
|
close: () => u(!1),
|
|
53
53
|
toggle(e) {
|
|
@@ -72,9 +72,9 @@ function qe(e) {
|
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/components/Menu/Menu.tsx
|
|
75
|
-
var
|
|
76
|
-
function
|
|
77
|
-
let [t, n] =
|
|
75
|
+
var Ye = Ce(null);
|
|
76
|
+
function Xe(e) {
|
|
77
|
+
let [t, n] = q({
|
|
78
78
|
items: e.items,
|
|
79
79
|
checked: {},
|
|
80
80
|
radio: {}
|
|
@@ -108,17 +108,17 @@ function Ye(e) {
|
|
|
108
108
|
renderItem: e.renderItem
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
return /* @__PURE__ */ Y(
|
|
113
|
-
value:
|
|
111
|
+
function Ze({ children: e, ...t }) {
|
|
112
|
+
return /* @__PURE__ */ Y(Ye.Provider, {
|
|
113
|
+
value: Xe(t),
|
|
114
114
|
children: e
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
let s =
|
|
119
|
-
|
|
117
|
+
function Qe(e, t, n, { closeOnScroll: r = !1, closeOnResize: i = !1, closeOnBlur: a = !1, highlightFirst: o = !1 }) {
|
|
118
|
+
let s = K(t);
|
|
119
|
+
Ee(() => {
|
|
120
120
|
s.current = t;
|
|
121
|
-
}),
|
|
121
|
+
}), Ee(() => {
|
|
122
122
|
if (e && (r || i || a)) return h(() => s.current(), {
|
|
123
123
|
scroll: r,
|
|
124
124
|
resize: i,
|
|
@@ -130,8 +130,8 @@ function Ze(e, t, n, { closeOnScroll: r = !1, closeOnResize: i = !1, closeOnBlur
|
|
|
130
130
|
i,
|
|
131
131
|
a
|
|
132
132
|
]);
|
|
133
|
-
let [c, l] =
|
|
134
|
-
return u !== e && (d(e), l(null)),
|
|
133
|
+
let [c, l] = q(null), [u, d] = q(e);
|
|
134
|
+
return u !== e && (d(e), l(null)), Ee(() => {
|
|
135
135
|
if (!e || !o) return;
|
|
136
136
|
let t = requestAnimationFrame(() => {
|
|
137
137
|
n.current && C(n.current, { setHighlightedValue: (e) => l((t) => t ?? e) });
|
|
@@ -146,32 +146,32 @@ function Ze(e, t, n, { closeOnScroll: r = !1, closeOnResize: i = !1, closeOnBlur
|
|
|
146
146
|
onHighlightChange: (e) => l(e.highlightedValue)
|
|
147
147
|
} : {};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
let T =
|
|
149
|
+
function $e({ classes: e, items: r, onSelect: i, onCheckedChange: a, onValueChange: o, linkAs: s, renderItem: c, open: l, defaultOpen: u, onOpenChange: d, anchor: f, searchable: p, searchLabel: m, placement: h = "bottom-start", arrow: g, closeOnScroll: _, closeOnResize: v, closeOnBlur: y, highlightFirst: b, ref: S, children: w }) {
|
|
150
|
+
let T = t("menu", k, e)(), E = n(), D = Je({
|
|
151
151
|
open: l,
|
|
152
152
|
defaultOpen: u,
|
|
153
153
|
anchor: f,
|
|
154
154
|
onOpenChange: d,
|
|
155
155
|
ref: S,
|
|
156
156
|
restoreFocus: !0
|
|
157
|
-
}), [O, ee] =
|
|
157
|
+
}), [O, ee] = q(""), [j, M] = q(), N = je({
|
|
158
158
|
sensitivity: "base",
|
|
159
159
|
usage: "sort"
|
|
160
|
-
}), P = p && O ? x(r, (e) => N.contains(e, O)) : r, F =
|
|
161
|
-
te !== D.isOpen && (ne(D.isOpen), ee(""), M(void 0)),
|
|
160
|
+
}), P = p && O ? x(r, (e) => N.contains(e, O)) : r, F = K(null), [te, ne] = q(D.isOpen);
|
|
161
|
+
te !== D.isOpen && (ne(D.isOpen), ee(""), M(void 0)), Ee(() => {
|
|
162
162
|
if (!D.isOpen || !p) return;
|
|
163
163
|
let e = requestAnimationFrame(() => {
|
|
164
164
|
e = requestAnimationFrame(() => F.current?.focus());
|
|
165
165
|
});
|
|
166
166
|
return () => cancelAnimationFrame(e);
|
|
167
167
|
}, [D.isOpen, p]);
|
|
168
|
-
let re = m ?? E.menu.search, I =
|
|
168
|
+
let re = m ?? E.menu.search, I = K(null), ie = Qe(D.isOpen, D.handle.close, I, {
|
|
169
169
|
closeOnScroll: _,
|
|
170
170
|
closeOnResize: v,
|
|
171
171
|
closeOnBlur: y,
|
|
172
172
|
highlightFirst: b
|
|
173
173
|
});
|
|
174
|
-
return /* @__PURE__ */ Y(
|
|
174
|
+
return /* @__PURE__ */ Y(Ze, {
|
|
175
175
|
items: r,
|
|
176
176
|
linkAs: s,
|
|
177
177
|
renderItem: c,
|
|
@@ -192,7 +192,7 @@ function Qe({ classes: t, items: r, onSelect: i, onCheckedChange: a, onValueChan
|
|
|
192
192
|
children: [w && /* @__PURE__ */ Y(Z.Trigger, {
|
|
193
193
|
asChild: !0,
|
|
194
194
|
children: w
|
|
195
|
-
}), /* @__PURE__ */ Y(
|
|
195
|
+
}), /* @__PURE__ */ Y(Me, { children: /* @__PURE__ */ Y(Z.Positioner, { children: /* @__PURE__ */ X(Z.Content, {
|
|
196
196
|
ref: I,
|
|
197
197
|
className: T.content(),
|
|
198
198
|
children: [
|
|
@@ -222,7 +222,7 @@ function Qe({ classes: t, items: r, onSelect: i, onCheckedChange: a, onValueChan
|
|
|
222
222
|
}
|
|
223
223
|
})
|
|
224
224
|
}) }),
|
|
225
|
-
/* @__PURE__ */ Y(
|
|
225
|
+
/* @__PURE__ */ Y(tt, {
|
|
226
226
|
entries: P,
|
|
227
227
|
onSelect: i
|
|
228
228
|
}),
|
|
@@ -239,8 +239,8 @@ function Qe({ classes: t, items: r, onSelect: i, onCheckedChange: a, onValueChan
|
|
|
239
239
|
})
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
let r =
|
|
242
|
+
function et({ item: e, shortcut: n }) {
|
|
243
|
+
let r = Te(Ye), i = t("menu", k)();
|
|
244
244
|
if (r?.renderItem) return r.renderItem(e);
|
|
245
245
|
let a = e.icon;
|
|
246
246
|
return /* @__PURE__ */ X(J, { children: [
|
|
@@ -252,17 +252,17 @@ function $e({ item: e, shortcut: t }) {
|
|
|
252
252
|
className: i.label(),
|
|
253
253
|
children: e.label
|
|
254
254
|
}),
|
|
255
|
-
|
|
255
|
+
n && /* @__PURE__ */ Y("span", {
|
|
256
256
|
className: i.shortcut(),
|
|
257
257
|
"aria-hidden": "true",
|
|
258
|
-
children:
|
|
258
|
+
children: n
|
|
259
259
|
})
|
|
260
260
|
] });
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
let r =
|
|
264
|
-
return e.map((e,
|
|
265
|
-
if ("type" in e) return e.type === "separator" ? /* @__PURE__ */ Y(Z.Separator, { className: i.separator() }, `separator-${
|
|
262
|
+
function tt({ entries: e, onSelect: n }) {
|
|
263
|
+
let r = t("menu", k), i = r(), a = Te(Ye);
|
|
264
|
+
return e.map((e, t) => {
|
|
265
|
+
if ("type" in e) return e.type === "separator" ? /* @__PURE__ */ Y(Z.Separator, { className: i.separator() }, `separator-${t}`) : e.type === "checkbox" ? /* @__PURE__ */ X(Z.CheckboxItem, {
|
|
266
266
|
value: e.value,
|
|
267
267
|
checked: a?.checked(e) ?? !!e.checked,
|
|
268
268
|
onCheckedChange: (t) => a?.setChecked(e, t),
|
|
@@ -271,11 +271,11 @@ function et({ entries: e, onSelect: t }) {
|
|
|
271
271
|
className: i.item(),
|
|
272
272
|
children: [/* @__PURE__ */ Y("span", {
|
|
273
273
|
className: i.indicator(),
|
|
274
|
-
children: /* @__PURE__ */ Y(Z.ItemIndicator, { children: /* @__PURE__ */ Y(
|
|
274
|
+
children: /* @__PURE__ */ Y(Z.ItemIndicator, { children: /* @__PURE__ */ Y(H, {
|
|
275
275
|
className: i.indicatorIcon(),
|
|
276
276
|
"aria-hidden": "true"
|
|
277
277
|
}) })
|
|
278
|
-
}), /* @__PURE__ */ Y(
|
|
278
|
+
}), /* @__PURE__ */ Y(et, { item: e })]
|
|
279
279
|
}, e.value) : e.type === "radio" ? /* @__PURE__ */ X(Z.RadioItemGroup, {
|
|
280
280
|
value: a?.radio(e),
|
|
281
281
|
onValueChange: (t) => a?.setRadio(e, t.value),
|
|
@@ -289,26 +289,26 @@ function et({ entries: e, onSelect: t }) {
|
|
|
289
289
|
className: i.item(),
|
|
290
290
|
children: [/* @__PURE__ */ Y("span", {
|
|
291
291
|
className: i.indicator(),
|
|
292
|
-
children: /* @__PURE__ */ Y(Z.ItemIndicator, { children: /* @__PURE__ */ Y(
|
|
292
|
+
children: /* @__PURE__ */ Y(Z.ItemIndicator, { children: /* @__PURE__ */ Y(ve, {
|
|
293
293
|
className: i.indicatorDot(),
|
|
294
294
|
"aria-hidden": "true"
|
|
295
295
|
}) })
|
|
296
|
-
}), /* @__PURE__ */ Y(
|
|
296
|
+
}), /* @__PURE__ */ Y(et, { item: e })]
|
|
297
297
|
}, e.value))]
|
|
298
298
|
}, `radio-${e.name}`) : /* @__PURE__ */ X(Z.ItemGroup, { children: [/* @__PURE__ */ Y(Z.ItemGroupLabel, {
|
|
299
299
|
className: i.groupLabel(),
|
|
300
300
|
children: e.label
|
|
301
|
-
}), /* @__PURE__ */ Y(
|
|
301
|
+
}), /* @__PURE__ */ Y(tt, {
|
|
302
302
|
entries: e.items,
|
|
303
|
-
onSelect:
|
|
304
|
-
})] }, `group-${
|
|
303
|
+
onSelect: n
|
|
304
|
+
})] }, `group-${t}`);
|
|
305
305
|
let o = e.icon;
|
|
306
306
|
if (e.children) return /* @__PURE__ */ X(Z.Root, {
|
|
307
307
|
positioning: {
|
|
308
308
|
placement: "right-start",
|
|
309
309
|
offset: { mainAxis: f }
|
|
310
310
|
},
|
|
311
|
-
onSelect: (e) =>
|
|
311
|
+
onSelect: (e) => n?.(e.value),
|
|
312
312
|
children: [/* @__PURE__ */ X(Z.TriggerItem, {
|
|
313
313
|
className: i.item(),
|
|
314
314
|
children: [
|
|
@@ -320,16 +320,16 @@ function et({ entries: e, onSelect: t }) {
|
|
|
320
320
|
className: i.label(),
|
|
321
321
|
children: e.label
|
|
322
322
|
}),
|
|
323
|
-
/* @__PURE__ */ Y(
|
|
323
|
+
/* @__PURE__ */ Y(W, {
|
|
324
324
|
className: i.submenuIcon(),
|
|
325
325
|
"aria-hidden": "true"
|
|
326
326
|
})
|
|
327
327
|
]
|
|
328
|
-
}), /* @__PURE__ */ Y(
|
|
328
|
+
}), /* @__PURE__ */ Y(Me, { children: /* @__PURE__ */ Y(Z.Positioner, { children: /* @__PURE__ */ Y(Z.Content, {
|
|
329
329
|
className: i.content(),
|
|
330
|
-
children: /* @__PURE__ */ Y(
|
|
330
|
+
children: /* @__PURE__ */ Y(tt, {
|
|
331
331
|
entries: e.children,
|
|
332
|
-
onSelect:
|
|
332
|
+
onSelect: n
|
|
333
333
|
})
|
|
334
334
|
}) }) })]
|
|
335
335
|
}, e.value);
|
|
@@ -343,19 +343,19 @@ function et({ entries: e, onSelect: t }) {
|
|
|
343
343
|
children: /* @__PURE__ */ Y(t, {
|
|
344
344
|
...D(e.href, e.to),
|
|
345
345
|
className: r({ danger: e.danger }).item(),
|
|
346
|
-
children: /* @__PURE__ */ Y(
|
|
346
|
+
children: /* @__PURE__ */ Y(et, {
|
|
347
347
|
item: e,
|
|
348
348
|
shortcut: e.shortcut
|
|
349
349
|
})
|
|
350
350
|
})
|
|
351
351
|
}, e.value);
|
|
352
352
|
}
|
|
353
|
-
return /* @__PURE__ */ Y(
|
|
353
|
+
return /* @__PURE__ */ Y(Se, { children: /* @__PURE__ */ Y(Z.Item, {
|
|
354
354
|
value: e.value,
|
|
355
355
|
disabled: e.disabled,
|
|
356
356
|
closeOnSelect: e.closeOnSelect,
|
|
357
357
|
className: r({ danger: e.danger }).item(),
|
|
358
|
-
children: /* @__PURE__ */ Y(
|
|
358
|
+
children: /* @__PURE__ */ Y(et, {
|
|
359
359
|
item: e,
|
|
360
360
|
shortcut: e.shortcut
|
|
361
361
|
})
|
|
@@ -364,10 +364,10 @@ function et({ entries: e, onSelect: t }) {
|
|
|
364
364
|
}
|
|
365
365
|
//#endregion
|
|
366
366
|
//#region src/components/Textarea/Textarea.tsx
|
|
367
|
-
function
|
|
368
|
-
let C =
|
|
367
|
+
function nt({ classes: e, size: a, invalid: o = !1, success: s = !1, disabled: c = !1, autoResize: l = !1, minRows: u, maxRows: d, showCount: f = !1, loading: p = !1, clearable: m = !1, clearLabel: h, mono: g = !1, className: _, style: v, onInput: y, onChange: b, ref: x, ...S }) {
|
|
368
|
+
let C = t("textarea", oe, e), w = t("textareaParts", se, e), T = n(), E = Pe(), D = r(), O = o || !!E?.invalid, k = !O && (s || D.success), A = c || !!E?.disabled, ee = !!S.readOnly || !!E?.readOnly, j = K(null);
|
|
369
369
|
Oe(x, () => j.current, []);
|
|
370
|
-
let M = S.maxLength && S.maxLength > 0 ? S.maxLength : void 0, N = f && M !== void 0, P = p || m || k, F = N || p || m, [te, ne] =
|
|
370
|
+
let M = S.maxLength && S.maxLength > 0 ? S.maxLength : void 0, N = f && M !== void 0, P = p || m || k, F = N || p || m, [te, ne] = q(() => String(S.defaultValue ?? "").length), re = S.value === void 0 ? te : String(S.value ?? "").length, I = () => {
|
|
371
371
|
let e = j.current;
|
|
372
372
|
if (!l || !e) return;
|
|
373
373
|
e.style.height = "auto";
|
|
@@ -379,14 +379,14 @@ function tt({ classes: t, size: a, invalid: o = !1, success: s = !1, disabled: c
|
|
|
379
379
|
e.style.height = `${n}px`;
|
|
380
380
|
};
|
|
381
381
|
ke(I);
|
|
382
|
-
let
|
|
383
|
-
|
|
382
|
+
let ie = De(), [ae, ce] = q(""), le = K(void 0);
|
|
383
|
+
Ee(() => () => clearTimeout(le.current), []);
|
|
384
384
|
let ue = (e) => {
|
|
385
385
|
N && (clearTimeout(le.current), le.current = setTimeout(() => ce(T.textarea.remaining(M - e, M)), 1e3));
|
|
386
386
|
}, de = () => {
|
|
387
387
|
let e = j.current;
|
|
388
|
-
e && (
|
|
389
|
-
}, fe = /* @__PURE__ */ Y(
|
|
388
|
+
e && (L(e), e.focus());
|
|
389
|
+
}, fe = /* @__PURE__ */ Y(Ne.Textarea, {
|
|
390
390
|
...S,
|
|
391
391
|
ref: j,
|
|
392
392
|
rows: S.rows ?? u,
|
|
@@ -406,7 +406,7 @@ function tt({ classes: t, size: a, invalid: o = !1, success: s = !1, disabled: c
|
|
|
406
406
|
...F ? {
|
|
407
407
|
"aria-describedby": [
|
|
408
408
|
E?.ariaDescribedby,
|
|
409
|
-
N &&
|
|
409
|
+
N && ie,
|
|
410
410
|
S["aria-describedby"]
|
|
411
411
|
].filter(Boolean).join(" ") || void 0,
|
|
412
412
|
"aria-busy": p || void 0
|
|
@@ -442,22 +442,22 @@ function tt({ classes: t, size: a, invalid: o = !1, success: s = !1, disabled: c
|
|
|
442
442
|
})
|
|
443
443
|
}),
|
|
444
444
|
N && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
|
|
445
|
-
id:
|
|
445
|
+
id: ie,
|
|
446
446
|
className: R.counter(),
|
|
447
447
|
"aria-hidden": "true",
|
|
448
448
|
children: T.textarea.counter(re, M)
|
|
449
449
|
}), /* @__PURE__ */ Y("span", {
|
|
450
450
|
className: R.status(),
|
|
451
451
|
role: "status",
|
|
452
|
-
children:
|
|
452
|
+
children: ae
|
|
453
453
|
})] })
|
|
454
454
|
]
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
//#endregion
|
|
458
458
|
//#region src/components/Pagination/Pagination.tsx
|
|
459
|
-
function
|
|
460
|
-
let w =
|
|
459
|
+
function rt({ classes: e, count: r, pageSize: i = 10, onPageSizeChange: s, page: c, defaultPage: l, onPageChange: u, siblingCount: d = 1, boundaryCount: f, showSummary: p = !0, summary: m, pageSizes: h, jumper: g, variant: _ = "full", withEdges: v, hideSinglePage: y, getPageHref: b, translations: x, className: S, ...C }) {
|
|
460
|
+
let w = t("pagination", P, e)({ responsive: _ === "auto" }), T = n(), [E, D] = q(i), [O, k] = q(i);
|
|
461
461
|
O !== i && (k(i), D(i));
|
|
462
462
|
let A = (e) => ({
|
|
463
463
|
start: Math.min((e - 1) * E + 1, r),
|
|
@@ -465,7 +465,7 @@ function nt({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page:
|
|
|
465
465
|
count: r
|
|
466
466
|
});
|
|
467
467
|
if (y && r <= E) return null;
|
|
468
|
-
let ee = b ? "a" : "button", j = (e, t, n = !1) =>
|
|
468
|
+
let ee = b ? "a" : "button", j = (e, t, n = !1) => we(ee, {
|
|
469
469
|
className: e,
|
|
470
470
|
...b && n ? {
|
|
471
471
|
role: "link",
|
|
@@ -480,7 +480,7 @@ function nt({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page:
|
|
|
480
480
|
let n = e.currentTarget, r = Number.parseInt(n.value, 10);
|
|
481
481
|
Number.isNaN(r) || (e.preventDefault(), t.setPage(Math.min(Math.max(r, 1), t.totalPages)), n.value = "");
|
|
482
482
|
};
|
|
483
|
-
return /* @__PURE__ */ Y(
|
|
483
|
+
return /* @__PURE__ */ Y(Fe.Root, {
|
|
484
484
|
...C,
|
|
485
485
|
className: w.base({ class: S }),
|
|
486
486
|
count: r,
|
|
@@ -496,7 +496,7 @@ function nt({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page:
|
|
|
496
496
|
...T.pagination,
|
|
497
497
|
...x
|
|
498
498
|
},
|
|
499
|
-
children: /* @__PURE__ */ Y(
|
|
499
|
+
children: /* @__PURE__ */ Y(Fe.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [
|
|
500
500
|
p && /* @__PURE__ */ Y("span", {
|
|
501
501
|
className: w.summary(),
|
|
502
502
|
"aria-live": "polite",
|
|
@@ -522,16 +522,16 @@ function nt({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page:
|
|
|
522
522
|
/* @__PURE__ */ X("div", {
|
|
523
523
|
className: w.list(),
|
|
524
524
|
children: [
|
|
525
|
-
v && /* @__PURE__ */ Y(
|
|
525
|
+
v && /* @__PURE__ */ Y(Fe.FirstTrigger, {
|
|
526
526
|
asChild: !0,
|
|
527
|
-
children: j(w.trigger(), /* @__PURE__ */ Y(
|
|
527
|
+
children: j(w.trigger(), /* @__PURE__ */ Y(ge, {
|
|
528
528
|
className: w.triggerIcon(),
|
|
529
529
|
"aria-hidden": "true"
|
|
530
530
|
}), e.page === 1)
|
|
531
531
|
}),
|
|
532
|
-
/* @__PURE__ */ Y(
|
|
532
|
+
/* @__PURE__ */ Y(Fe.PrevTrigger, {
|
|
533
533
|
asChild: !0,
|
|
534
|
-
children: j(w.trigger(), /* @__PURE__ */ Y(
|
|
534
|
+
children: j(w.trigger(), /* @__PURE__ */ Y(U, {
|
|
535
535
|
className: w.triggerIcon(),
|
|
536
536
|
"aria-hidden": "true"
|
|
537
537
|
}), e.page === 1)
|
|
@@ -540,26 +540,26 @@ function nt({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page:
|
|
|
540
540
|
className: w.compact(),
|
|
541
541
|
children: T.pagination.compact(e.page, e.totalPages)
|
|
542
542
|
}),
|
|
543
|
-
_ !== "compact" && e.pages.map((e, t) => e.type === "page" ? /* @__PURE__ */ Y(
|
|
543
|
+
_ !== "compact" && e.pages.map((e, t) => e.type === "page" ? /* @__PURE__ */ Y(Fe.Item, {
|
|
544
544
|
...e,
|
|
545
545
|
asChild: !0,
|
|
546
546
|
children: j(w.item(), e.value)
|
|
547
|
-
}, t) : /* @__PURE__ */ Y(
|
|
547
|
+
}, t) : /* @__PURE__ */ Y(Fe.Ellipsis, {
|
|
548
548
|
index: t,
|
|
549
549
|
className: w.ellipsis(),
|
|
550
550
|
"aria-hidden": "true",
|
|
551
551
|
children: "…"
|
|
552
552
|
}, t)),
|
|
553
|
-
/* @__PURE__ */ Y(
|
|
553
|
+
/* @__PURE__ */ Y(Fe.NextTrigger, {
|
|
554
554
|
asChild: !0,
|
|
555
|
-
children: j(w.trigger(), /* @__PURE__ */ Y(
|
|
555
|
+
children: j(w.trigger(), /* @__PURE__ */ Y(W, {
|
|
556
556
|
className: w.triggerIcon(),
|
|
557
557
|
"aria-hidden": "true"
|
|
558
558
|
}), e.page === e.totalPages)
|
|
559
559
|
}),
|
|
560
|
-
v && /* @__PURE__ */ Y(
|
|
560
|
+
v && /* @__PURE__ */ Y(Fe.LastTrigger, {
|
|
561
561
|
asChild: !0,
|
|
562
|
-
children: j(w.trigger(), /* @__PURE__ */ Y(
|
|
562
|
+
children: j(w.trigger(), /* @__PURE__ */ Y(_e, {
|
|
563
563
|
className: w.triggerIcon(),
|
|
564
564
|
"aria-hidden": "true"
|
|
565
565
|
}), e.page === e.totalPages)
|
|
@@ -585,13 +585,13 @@ function nt({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page:
|
|
|
585
585
|
}
|
|
586
586
|
//#endregion
|
|
587
587
|
//#region src/components/Skeleton/Skeleton.tsx
|
|
588
|
-
function
|
|
589
|
-
let c =
|
|
588
|
+
function it({ classes: e, shape: n, width: r, height: i, className: a, style: o, ...s }) {
|
|
589
|
+
let c = t("skeleton", ae, e);
|
|
590
590
|
return /* @__PURE__ */ Y("span", {
|
|
591
591
|
"aria-hidden": "true",
|
|
592
592
|
...s,
|
|
593
593
|
className: c({
|
|
594
|
-
shape:
|
|
594
|
+
shape: n,
|
|
595
595
|
class: a
|
|
596
596
|
}),
|
|
597
597
|
style: {
|
|
@@ -603,78 +603,78 @@ function rt({ classes: e, shape: t, width: r, height: i, className: a, style: o,
|
|
|
603
603
|
}
|
|
604
604
|
//#endregion
|
|
605
605
|
//#region src/components/DatePicker/dates.ts
|
|
606
|
-
var
|
|
607
|
-
function
|
|
608
|
-
return t ? e.includes("T") ?
|
|
606
|
+
var at = (e, t) => e ? e.toString().slice(0, t ? 16 : 10) : null;
|
|
607
|
+
function ot(e, t, n) {
|
|
608
|
+
return t ? e.includes("T") ? Ue(e.slice(0, 16)) : Ue(`${e}T${n === "max" ? "23:59" : "00:00"}`) : He(e.slice(0, 10));
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
let i = typeof e == "string" && !e.includes("T"), a =
|
|
612
|
-
return a ?
|
|
610
|
+
function st(e, t, n, r) {
|
|
611
|
+
let i = typeof e == "string" && !e.includes("T"), a = R(e, t && !i, n);
|
|
612
|
+
return a ? ot(a, t, r) : void 0;
|
|
613
613
|
}
|
|
614
|
-
var
|
|
614
|
+
var ct = (e, t, n, r) => S(at(e, t), {
|
|
615
615
|
valueType: n,
|
|
616
616
|
timeZone: r,
|
|
617
617
|
withTime: t
|
|
618
|
-
}),
|
|
619
|
-
function
|
|
618
|
+
}), lt = (e, t, n) => R(e, t, n);
|
|
619
|
+
function ut(e, t) {
|
|
620
620
|
if (!e && !t?.length) return;
|
|
621
|
-
let n = new Set(t?.map((e) =>
|
|
621
|
+
let n = new Set(t?.map((e) => R(e, !1)));
|
|
622
622
|
return (t) => {
|
|
623
|
-
let r =
|
|
623
|
+
let r = at(t, !1);
|
|
624
624
|
return n.has(r) || !!e?.(r);
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function dt(e, t) {
|
|
628
628
|
if ("hour" in e) return e;
|
|
629
|
-
let n = t && "hour" in t ? new
|
|
630
|
-
return
|
|
629
|
+
let n = t && "hour" in t ? new Ve(t.hour, t.minute) : new Ve();
|
|
630
|
+
return We(e, n);
|
|
631
631
|
}
|
|
632
|
-
var
|
|
632
|
+
var ft = {
|
|
633
633
|
year: 2e3,
|
|
634
634
|
month: 1,
|
|
635
635
|
day: 1
|
|
636
636
|
};
|
|
637
|
-
function
|
|
637
|
+
function pt(e) {
|
|
638
638
|
let [t = 0, n = 0, r = 0] = e.split(":").map(Number);
|
|
639
|
-
return new
|
|
639
|
+
return new ze(ft.year, ft.month, ft.day, t, n, r);
|
|
640
640
|
}
|
|
641
|
-
var
|
|
641
|
+
var mt = (e) => String(e).padStart(2, "0"), ht = (e, t = !1) => e && "hour" in e ? `${mt(e.hour)}:${mt(e.minute)}${t ? `:${mt(e.second)}` : ""}` : null, gt = (e, t, n, r = !1) => ce(e, t, n, r);
|
|
642
642
|
//#endregion
|
|
643
643
|
//#region src/components/DatePicker/DatePickerBase.tsx
|
|
644
|
-
function
|
|
645
|
-
let j =
|
|
644
|
+
function _t({ mode: e, dates: r, onChange: i, withTime: a, min: o, max: s, isDateUnavailable: c, locale: l, disabled: u, readOnly: d, invalid: f, required: p, name: m, label: h, ownId: g, placeholder: _, className: v, style: b, period: x, classes: S, presets: C, size: w, hideClear: T, firstDayOfWeek: E, timeZone: D, showTimeZone: k, responsive: A, ...ee }) {
|
|
645
|
+
let j = t("datePicker", y, S)({ size: w }), M = n(), N = De(), P = Pe(), F = {
|
|
646
646
|
disabled: u ?? P?.disabled,
|
|
647
647
|
readOnly: d ?? P?.readOnly,
|
|
648
648
|
invalid: f ?? P?.invalid,
|
|
649
649
|
required: p ?? P?.required
|
|
650
|
-
}, I =
|
|
650
|
+
}, I = e === "range", ie = e === "multiple", L = I ? [0, 1] : [0], ae = [M.dateRange.start, M.dateRange.end], oe = P || g ? {
|
|
651
651
|
...P ? { label: (e) => I ? `${P.ids.label} ${N}r${e}` : P.ids.label } : {},
|
|
652
652
|
...g ? { segmentGroup: (e) => e === 0 ? g : void 0 } : {}
|
|
653
|
-
} : void 0, se = (e) => P ? void 0 : I ? [h, ae[e]].filter(Boolean).join(", ") : h,
|
|
653
|
+
} : void 0, se = (e) => P ? void 0 : I ? [h, ae[e]].filter(Boolean).join(", ") : h, ce = I ? {
|
|
654
654
|
...M.datePicker,
|
|
655
655
|
clearTrigger: M.dateRange.clearTrigger
|
|
656
|
-
} : M.datePicker, de = x ? new
|
|
656
|
+
} : M.datePicker, de = x ? new Be(l, x === "month" ? {
|
|
657
657
|
month: "2-digit",
|
|
658
658
|
year: "numeric"
|
|
659
659
|
} : { year: "numeric" }) : void 0, fe = E ?? O(l).firstDay, R;
|
|
660
660
|
if (k && D) {
|
|
661
|
-
let e = r[0], t = e ?
|
|
661
|
+
let e = r[0], t = e ? B(e.toString().slice(0, 16), D) : /* @__PURE__ */ new Date();
|
|
662
662
|
R = {
|
|
663
|
-
short:
|
|
664
|
-
long: M.calendar.timeZone(
|
|
663
|
+
short: le(D, l, t),
|
|
664
|
+
long: M.calendar.timeZone(ue(D, l, t))
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
let pe = [P?.ariaDescribedby, R ? `${N}tz` : void 0].filter(Boolean).join(" ") || void 0,
|
|
667
|
+
let pe = [P?.ariaDescribedby, R ? `${N}tz` : void 0].filter(Boolean).join(" ") || void 0, z = (e) => L.every((t) => e.getSegments({ index: t }).every((e) => e.type === "literal" || e.isPlaceholder)), H = (e) => !!_ && z(e) && !e.focused, me = (e) => _ && z(e) ? [pe, `${N}ph`].filter(Boolean).join(" ") : pe, U = (e) => i(a ? e.map((e, t) => dt(e, r[t])) : e), W = (e, t) => {
|
|
668
668
|
if (x) return !1;
|
|
669
669
|
if (I) {
|
|
670
670
|
let t = ne(e, l, a);
|
|
671
|
-
if (t) return i([
|
|
671
|
+
if (t) return i([ot(t.start, a), ot(t.end, a)]), !0;
|
|
672
672
|
}
|
|
673
673
|
let n = te(e, l, a);
|
|
674
674
|
if (!n) return !1;
|
|
675
675
|
let o = [...r];
|
|
676
|
-
return o[t] =
|
|
677
|
-
},
|
|
676
|
+
return o[t] = ot(n, a), i(o.filter(Boolean)), !0;
|
|
677
|
+
}, he = r.length ? r.length > 3 ? re(M.calendar.datesSelected, r.length, l) : r.map((e) => new Be(l, {
|
|
678
678
|
day: "2-digit",
|
|
679
679
|
month: "2-digit",
|
|
680
680
|
year: "numeric",
|
|
@@ -684,8 +684,8 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
684
684
|
className: j.base({ class: v }),
|
|
685
685
|
style: b,
|
|
686
686
|
value: r,
|
|
687
|
-
onValueChange: (e) =>
|
|
688
|
-
selectionMode:
|
|
687
|
+
onValueChange: (e) => U(e.value),
|
|
688
|
+
selectionMode: e,
|
|
689
689
|
min: o,
|
|
690
690
|
max: s,
|
|
691
691
|
isDateUnavailable: c,
|
|
@@ -700,7 +700,7 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
700
700
|
placement: "bottom-start",
|
|
701
701
|
gutter: 4
|
|
702
702
|
},
|
|
703
|
-
translations:
|
|
703
|
+
translations: ce,
|
|
704
704
|
lazyMount: !0,
|
|
705
705
|
unmountOnExit: !0,
|
|
706
706
|
children: [/* @__PURE__ */ X($.Control, {
|
|
@@ -710,12 +710,12 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
710
710
|
id: `${N}v`,
|
|
711
711
|
className: j.multiValue(),
|
|
712
712
|
"data-placeholder": r.length ? void 0 : "",
|
|
713
|
-
children:
|
|
713
|
+
children: he
|
|
714
714
|
}), m && r.map((e, t) => /* @__PURE__ */ Y("input", {
|
|
715
715
|
type: "hidden",
|
|
716
716
|
name: `${m}[${t}]`,
|
|
717
717
|
value: e.toString()
|
|
718
|
-
}, e.toString()))] }) : /* @__PURE__ */ X(
|
|
718
|
+
}, e.toString()))] }) : /* @__PURE__ */ X(Re.Root, {
|
|
719
719
|
className: j.dateInput(),
|
|
720
720
|
ids: oe,
|
|
721
721
|
value: r,
|
|
@@ -731,10 +731,10 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
731
731
|
name: m,
|
|
732
732
|
...F,
|
|
733
733
|
translations: M.dateInput,
|
|
734
|
-
children: [/* @__PURE__ */ Y(
|
|
734
|
+
children: [/* @__PURE__ */ Y(Re.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Re.Control, {
|
|
735
735
|
className: j.dateControl(),
|
|
736
|
-
"data-placeholder-shown":
|
|
737
|
-
children: L.map((t) => /* @__PURE__ */ X(
|
|
736
|
+
"data-placeholder-shown": H(e) || void 0,
|
|
737
|
+
children: L.map((t) => /* @__PURE__ */ X(Se, { children: [
|
|
738
738
|
t === 1 && /* @__PURE__ */ Y("span", {
|
|
739
739
|
className: j.rangeSeparator(),
|
|
740
740
|
"aria-hidden": "true",
|
|
@@ -745,21 +745,21 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
745
745
|
className: j.rangeLabel(),
|
|
746
746
|
children: ae[t]
|
|
747
747
|
}),
|
|
748
|
-
/* @__PURE__ */ Y(
|
|
748
|
+
/* @__PURE__ */ Y(vt, {
|
|
749
749
|
index: t,
|
|
750
750
|
label: se(t),
|
|
751
|
-
describedby:
|
|
752
|
-
paste: x ? void 0 :
|
|
751
|
+
describedby: me(e),
|
|
752
|
+
paste: x ? void 0 : W,
|
|
753
753
|
size: w
|
|
754
754
|
})
|
|
755
755
|
] }, t))
|
|
756
|
-
}), _ &&
|
|
756
|
+
}), _ && z(e) && /* @__PURE__ */ Y("span", {
|
|
757
757
|
id: `${N}ph`,
|
|
758
758
|
className: j.placeholder(),
|
|
759
|
-
"data-hidden":
|
|
759
|
+
"data-hidden": H(e) ? void 0 : "",
|
|
760
760
|
onClick: () => e.focus(),
|
|
761
761
|
children: _
|
|
762
|
-
})] }) }), L.map((e) => /* @__PURE__ */ Y(
|
|
762
|
+
})] }) }), L.map((e) => /* @__PURE__ */ Y(Re.HiddenInput, { index: e }, e))]
|
|
763
763
|
}),
|
|
764
764
|
R && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
|
|
765
765
|
className: j.timeZone(),
|
|
@@ -772,7 +772,7 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
772
772
|
})] }),
|
|
773
773
|
!T && /* @__PURE__ */ Y($.ClearTrigger, {
|
|
774
774
|
className: j.clear(),
|
|
775
|
-
children: /* @__PURE__ */ Y(
|
|
775
|
+
children: /* @__PURE__ */ Y(xe, {
|
|
776
776
|
className: j.clearIcon(),
|
|
777
777
|
"aria-hidden": "true"
|
|
778
778
|
})
|
|
@@ -780,13 +780,13 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
780
780
|
/* @__PURE__ */ Y($.Trigger, {
|
|
781
781
|
className: j.trigger(),
|
|
782
782
|
...ie ? { "aria-describedby": `${N}v` } : {},
|
|
783
|
-
children: /* @__PURE__ */ Y(
|
|
783
|
+
children: /* @__PURE__ */ Y(V, {
|
|
784
784
|
className: j.triggerIcon(),
|
|
785
785
|
"aria-hidden": "true"
|
|
786
786
|
})
|
|
787
787
|
})
|
|
788
788
|
]
|
|
789
|
-
}), /* @__PURE__ */ Y(
|
|
789
|
+
}), /* @__PURE__ */ Y(bt, {
|
|
790
790
|
presets: C,
|
|
791
791
|
responsive: A,
|
|
792
792
|
timeZone: D,
|
|
@@ -794,34 +794,34 @@ function gt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
794
794
|
})]
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
let s =
|
|
799
|
-
return /* @__PURE__ */ Y(
|
|
800
|
-
index:
|
|
797
|
+
function vt({ index: e, label: r, describedby: i, paste: a, size: o }) {
|
|
798
|
+
let s = t("datePicker", y)({ size: o }), c = n();
|
|
799
|
+
return /* @__PURE__ */ Y(Re.SegmentGroup, {
|
|
800
|
+
index: e,
|
|
801
801
|
className: s.segments(),
|
|
802
802
|
"aria-label": r,
|
|
803
803
|
"aria-describedby": i,
|
|
804
|
-
...a ? { onPasteCapture: (
|
|
805
|
-
a?.(
|
|
804
|
+
...a ? { onPasteCapture: (t) => {
|
|
805
|
+
a?.(t.clipboardData.getData("text/plain"), e) && (t.preventDefault(), t.stopPropagation());
|
|
806
806
|
} } : {},
|
|
807
|
-
children: /* @__PURE__ */ Y(
|
|
807
|
+
children: /* @__PURE__ */ Y(Re.Context, { children: (t) => t.getSegments({ index: e }).map((e, t) => /* @__PURE__ */ Y(Re.Segment, {
|
|
808
808
|
segment: e,
|
|
809
809
|
className: s.segment(),
|
|
810
810
|
"aria-label": c.dateSegments[e.type]
|
|
811
811
|
}, t)) })
|
|
812
812
|
});
|
|
813
813
|
}
|
|
814
|
-
function
|
|
815
|
-
let [t, n] =
|
|
816
|
-
return
|
|
814
|
+
function yt(e) {
|
|
815
|
+
let [t, n] = q(!1);
|
|
816
|
+
return Ee(() => {
|
|
817
817
|
if (!e || typeof window.matchMedia != "function") return;
|
|
818
818
|
let t = window.matchMedia("(max-width: 639.98px)"), r = () => n(t.matches);
|
|
819
819
|
return r(), t.addEventListener("change", r), () => t.removeEventListener("change", r);
|
|
820
820
|
}, [e]), t;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
let i =
|
|
824
|
-
return o ? /* @__PURE__ */ X(
|
|
822
|
+
function bt({ presets: e, responsive: n, ...r }) {
|
|
823
|
+
let i = t("datePicker", y), a = i(), o = yt(n), s = (r.numberOfMonths ?? 1) > 1;
|
|
824
|
+
return o ? /* @__PURE__ */ X(Me, { children: [/* @__PURE__ */ Y($.Context, { children: (e) => e.open ? /* @__PURE__ */ Y("div", {
|
|
825
825
|
className: a.backdrop(),
|
|
826
826
|
"aria-hidden": "true"
|
|
827
827
|
}) : null }), /* @__PURE__ */ Y("div", {
|
|
@@ -831,22 +831,22 @@ function yt({ presets: e, responsive: t, ...r }) {
|
|
|
831
831
|
multiMonth: s,
|
|
832
832
|
bottomSheet: !0
|
|
833
833
|
}).content(),
|
|
834
|
-
children: /* @__PURE__ */ Y(
|
|
834
|
+
children: /* @__PURE__ */ Y(St, {
|
|
835
835
|
presets: e,
|
|
836
836
|
...r
|
|
837
837
|
})
|
|
838
838
|
})
|
|
839
|
-
})] }) : /* @__PURE__ */ Y(
|
|
839
|
+
})] }) : /* @__PURE__ */ Y(Me, { children: /* @__PURE__ */ Y($.Positioner, { children: /* @__PURE__ */ Y($.Content, {
|
|
840
840
|
className: s ? i({ multiMonth: s }).content() : a.content(),
|
|
841
|
-
children: /* @__PURE__ */ Y(
|
|
841
|
+
children: /* @__PURE__ */ Y(St, {
|
|
842
842
|
presets: e,
|
|
843
843
|
...r
|
|
844
844
|
})
|
|
845
845
|
}) }) });
|
|
846
846
|
}
|
|
847
|
-
var
|
|
848
|
-
function
|
|
849
|
-
let f =
|
|
847
|
+
var xt = (e, t) => typeof e == "string" ? t.rangePresets[e] ?? e : e.label;
|
|
848
|
+
function St({ presets: e, showWeekNumbers: r, numberOfMonths: i, showButtonBar: a, plainToday: o, hideOutsideDays: s, weekendDays: c, allowDeselect: l, timeZone: u, renderDay: d }) {
|
|
849
|
+
let f = t("datePicker", y)(), p = n(), m = Math.max(1, Math.floor(i ?? 1)), h = {
|
|
850
850
|
showWeekNumbers: r,
|
|
851
851
|
plainToday: o,
|
|
852
852
|
hideOutsideDays: s || m > 1,
|
|
@@ -865,7 +865,7 @@ function xt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
865
865
|
};
|
|
866
866
|
}), _ = (e) => {
|
|
867
867
|
if (e.selectionMode === "single") return e.selectToday();
|
|
868
|
-
let [t = 0, n = 1, r = 1] =
|
|
868
|
+
let [t = 0, n = 1, r = 1] = pe(u).split("-").map(Number);
|
|
869
869
|
e.setFocusedValue(e.focusedValue.set({
|
|
870
870
|
year: t,
|
|
871
871
|
month: n,
|
|
@@ -875,27 +875,27 @@ function xt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
875
875
|
return /* @__PURE__ */ X(J, { children: [
|
|
876
876
|
/* @__PURE__ */ Y($.View, {
|
|
877
877
|
view: "day",
|
|
878
|
-
children: /* @__PURE__ */ Y($.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
878
|
+
children: /* @__PURE__ */ Y($.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Dt, {}), m > 1 ? /* @__PURE__ */ Y("div", {
|
|
879
879
|
className: f.months(),
|
|
880
880
|
children: g(e).map((e) => /* @__PURE__ */ X("div", {
|
|
881
881
|
className: f.month(),
|
|
882
882
|
children: [/* @__PURE__ */ Y("div", {
|
|
883
883
|
className: f.monthTitle(),
|
|
884
884
|
children: e.title
|
|
885
|
-
}), /* @__PURE__ */ Y(
|
|
885
|
+
}), /* @__PURE__ */ Y(wt, {
|
|
886
886
|
weeks: e.weeks,
|
|
887
887
|
visibleRange: e.visibleRange,
|
|
888
888
|
...h
|
|
889
889
|
})]
|
|
890
890
|
}, e.title))
|
|
891
|
-
}) : /* @__PURE__ */ Y(
|
|
891
|
+
}) : /* @__PURE__ */ Y(wt, {
|
|
892
892
|
weeks: e.weeks,
|
|
893
893
|
...h
|
|
894
894
|
})] }) })
|
|
895
895
|
}),
|
|
896
896
|
/* @__PURE__ */ Y($.View, {
|
|
897
897
|
view: "month",
|
|
898
|
-
children: /* @__PURE__ */ Y($.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
898
|
+
children: /* @__PURE__ */ Y($.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Dt, {}), /* @__PURE__ */ Y($.Table, {
|
|
899
899
|
className: f.table(),
|
|
900
900
|
children: /* @__PURE__ */ Y($.TableBody, { children: e.getMonthsGrid({
|
|
901
901
|
columns: 4,
|
|
@@ -912,7 +912,7 @@ function xt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
912
912
|
}),
|
|
913
913
|
/* @__PURE__ */ Y($.View, {
|
|
914
914
|
view: "year",
|
|
915
|
-
children: /* @__PURE__ */ Y($.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
915
|
+
children: /* @__PURE__ */ Y($.Context, { children: (e) => /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Dt, {}), /* @__PURE__ */ Y($.Table, {
|
|
916
916
|
className: f.table(),
|
|
917
917
|
children: /* @__PURE__ */ Y($.TableBody, { children: e.getYearsGrid({ columns: 4 }).map((e) => /* @__PURE__ */ Y($.TableRow, { children: e.map((e) => /* @__PURE__ */ Y($.TableCell, {
|
|
918
918
|
value: e.value,
|
|
@@ -924,14 +924,14 @@ function xt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
924
924
|
}, e.value)) }, e[0]?.value)) })
|
|
925
925
|
})] }) })
|
|
926
926
|
}),
|
|
927
|
-
|
|
927
|
+
e?.length ? /* @__PURE__ */ Y("div", {
|
|
928
928
|
className: f.presets(),
|
|
929
|
-
children:
|
|
929
|
+
children: e.map((e) => /* @__PURE__ */ Y($.PresetTrigger, {
|
|
930
930
|
value: typeof e == "string" ? e : e.value,
|
|
931
931
|
className: f.preset(),
|
|
932
|
-
"aria-label":
|
|
933
|
-
children:
|
|
934
|
-
},
|
|
932
|
+
"aria-label": xt(e, p),
|
|
933
|
+
children: xt(e, p)
|
|
934
|
+
}, xt(e, p)))
|
|
935
935
|
}) : null,
|
|
936
936
|
a && /* @__PURE__ */ Y($.Context, { children: (e) => /* @__PURE__ */ X("div", {
|
|
937
937
|
className: f.buttonBar(),
|
|
@@ -950,12 +950,12 @@ function xt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
950
950
|
}) })
|
|
951
951
|
] });
|
|
952
952
|
}
|
|
953
|
-
var
|
|
954
|
-
function
|
|
955
|
-
let u =
|
|
953
|
+
var Ct = (e) => e.toString().slice(0, 10);
|
|
954
|
+
function wt({ weeks: e, visibleRange: r, showWeekNumbers: i, plainToday: a, hideOutsideDays: o, weekendDays: s, allowDeselect: c, renderDay: l }) {
|
|
955
|
+
let u = t("datePicker", y)({
|
|
956
956
|
plainToday: a,
|
|
957
957
|
hideOutsideDays: o
|
|
958
|
-
}), d =
|
|
958
|
+
}), d = n(), f = Le(), p = (e) => ie(e.map(Ct)), m = (e) => !!r && (e.month !== r.start.month || e.year !== r.start.year), h = (e) => {
|
|
959
959
|
let t = f.getDayTableCellState({
|
|
960
960
|
value: e,
|
|
961
961
|
visibleRange: r
|
|
@@ -966,7 +966,7 @@ function Ct({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hide
|
|
|
966
966
|
selected: t.selected,
|
|
967
967
|
outside: t.outsideRange,
|
|
968
968
|
unavailable: t.unavailable || !!t.disabled,
|
|
969
|
-
weekend: s ? s.includes(E(
|
|
969
|
+
weekend: s ? s.includes(E(Ct(e))) : t.weekend
|
|
970
970
|
};
|
|
971
971
|
}, g = (e, t) => {
|
|
972
972
|
"key" in e && e.key !== "Enter" && e.key !== " " || f.selectionMode === "single" && f.getDayTableCellState({
|
|
@@ -974,7 +974,7 @@ function Ct({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hide
|
|
|
974
974
|
visibleRange: r
|
|
975
975
|
}).selected && (e.preventDefault(), f.clearValue({ focus: !1 }), f.setFocusedValue(t));
|
|
976
976
|
}, _ = (e) => ({
|
|
977
|
-
...s?.includes(E(
|
|
977
|
+
...s?.includes(E(Ct(e))) ? { "data-weekend": "" } : {},
|
|
978
978
|
...c ? {
|
|
979
979
|
onClickCapture: (t) => g(t, e),
|
|
980
980
|
onKeyDownCapture: (t) => g(t, e)
|
|
@@ -995,7 +995,7 @@ function Ct({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hide
|
|
|
995
995
|
title: e.long,
|
|
996
996
|
children: e.short
|
|
997
997
|
})
|
|
998
|
-
}, e.long))] }) }), /* @__PURE__ */ Y($.TableBody, { children:
|
|
998
|
+
}, e.long))] }) }), /* @__PURE__ */ Y($.TableBody, { children: e.map((e) => /* @__PURE__ */ X($.TableRow, { children: [i && /* @__PURE__ */ Y("th", {
|
|
999
999
|
scope: "row",
|
|
1000
1000
|
className: u.weekNumber(),
|
|
1001
1001
|
"aria-label": d.datePicker.weekNumberCell(p(e)),
|
|
@@ -1009,38 +1009,38 @@ function Ct({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hide
|
|
|
1009
1009
|
className: u.day(),
|
|
1010
1010
|
children: l ? /* @__PURE__ */ Y("span", {
|
|
1011
1011
|
className: u.dayContent(),
|
|
1012
|
-
children: l(
|
|
1012
|
+
children: l(Ct(e), h(e))
|
|
1013
1013
|
}) : e.day
|
|
1014
1014
|
})
|
|
1015
1015
|
}, e.toString()))] }, e[0]?.toString())) })]
|
|
1016
1016
|
});
|
|
1017
1017
|
}
|
|
1018
|
-
var
|
|
1018
|
+
var Tt = {
|
|
1019
1019
|
day: "month",
|
|
1020
1020
|
month: "year",
|
|
1021
1021
|
year: void 0
|
|
1022
|
-
},
|
|
1023
|
-
function
|
|
1024
|
-
let
|
|
1022
|
+
}, Et = (e, t, n) => `${e}, ${n.datePicker.viewTrigger(t, Tt[t])}`;
|
|
1023
|
+
function Dt() {
|
|
1024
|
+
let e = t("datePicker", y)(), r = n();
|
|
1025
1025
|
return /* @__PURE__ */ X($.ViewControl, {
|
|
1026
|
-
className:
|
|
1026
|
+
className: e.header(),
|
|
1027
1027
|
children: [
|
|
1028
1028
|
/* @__PURE__ */ Y($.PrevTrigger, {
|
|
1029
|
-
className:
|
|
1030
|
-
children: /* @__PURE__ */ Y(
|
|
1031
|
-
className:
|
|
1029
|
+
className: e.nav(),
|
|
1030
|
+
children: /* @__PURE__ */ Y(U, {
|
|
1031
|
+
className: e.navIcon(),
|
|
1032
1032
|
"aria-hidden": "true"
|
|
1033
1033
|
})
|
|
1034
1034
|
}),
|
|
1035
|
-
/* @__PURE__ */ Y($.Context, { children: (
|
|
1036
|
-
className:
|
|
1037
|
-
"aria-label":
|
|
1035
|
+
/* @__PURE__ */ Y($.Context, { children: (t) => /* @__PURE__ */ Y($.ViewTrigger, {
|
|
1036
|
+
className: e.viewTrigger(),
|
|
1037
|
+
"aria-label": Et(t.numOfMonths > 1 && t.view === "day" ? t.visibleRangeText.formatted : t.visibleRangeText.start, t.view, r),
|
|
1038
1038
|
children: /* @__PURE__ */ Y($.RangeText, {})
|
|
1039
1039
|
}) }),
|
|
1040
1040
|
/* @__PURE__ */ Y($.NextTrigger, {
|
|
1041
|
-
className:
|
|
1042
|
-
children: /* @__PURE__ */ Y(
|
|
1043
|
-
className:
|
|
1041
|
+
className: e.nav(),
|
|
1042
|
+
children: /* @__PURE__ */ Y(W, {
|
|
1043
|
+
className: e.navIcon(),
|
|
1044
1044
|
"aria-hidden": "true"
|
|
1045
1045
|
})
|
|
1046
1046
|
})
|
|
@@ -1049,23 +1049,23 @@ function Et() {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
//#endregion
|
|
1051
1051
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
1052
|
-
function
|
|
1052
|
+
function Ot({ value: t, defaultValue: n, onValueChange: r, selectionMode: i = "single", valueType: a = "string", withTime: o = !1, min: c, max: l, isDateUnavailable: u, excludeDates: d, locale: f, "aria-label": p, id: m, clearable: h = !0, highlightToday: g = !0, ..._ }) {
|
|
1053
1053
|
s("DatePicker", m);
|
|
1054
|
-
let v =
|
|
1055
|
-
let t = e.map((e) =>
|
|
1054
|
+
let v = e(), y = f ?? v.locale, [b, x] = q(n ?? null), S = t === void 0 ? b : t, C = Array.isArray(S) ? S : S ? [S] : [], w = _.timeZone, T = (e) => e.map((e) => lt(e, o, w)).join(), E = (e) => {
|
|
1055
|
+
let t = e.map((e) => ct(e, o, a, w));
|
|
1056
1056
|
if (T(t) === T(C)) return;
|
|
1057
1057
|
let n = i === "multiple" ? t : t[0] ?? null;
|
|
1058
1058
|
x(n), r?.(n);
|
|
1059
1059
|
};
|
|
1060
|
-
return /* @__PURE__ */ Y(
|
|
1060
|
+
return /* @__PURE__ */ Y(_t, {
|
|
1061
1061
|
..._,
|
|
1062
1062
|
mode: i,
|
|
1063
|
-
dates: C.map((e) =>
|
|
1063
|
+
dates: C.map((e) => st(e, o, w)).filter((e) => !!e),
|
|
1064
1064
|
onChange: E,
|
|
1065
1065
|
withTime: o,
|
|
1066
|
-
min:
|
|
1067
|
-
max:
|
|
1068
|
-
isDateUnavailable:
|
|
1066
|
+
min: st(c, o, w, "min"),
|
|
1067
|
+
max: st(l, o, w, "max"),
|
|
1068
|
+
isDateUnavailable: ut(u, d),
|
|
1069
1069
|
locale: y,
|
|
1070
1070
|
label: p,
|
|
1071
1071
|
ownId: m,
|
|
@@ -1075,108 +1075,108 @@ function Dt({ value: e, defaultValue: n, onValueChange: r, selectionMode: i = "s
|
|
|
1075
1075
|
}
|
|
1076
1076
|
//#endregion
|
|
1077
1077
|
//#region src/components/MultiSelect/MultiSelect.tsx
|
|
1078
|
-
function
|
|
1079
|
-
let
|
|
1078
|
+
function kt({ classes: e, items: r, value: i, defaultValue: a, onValueChange: o, placeholder: s, summary: f, maxShown: m = 2, disabled: h, invalid: _, required: v, name: y, itemValue: b, itemLabel: x, itemDisabled: S, itemGroup: C, itemKeywords: T, valueKey: E, display: D = "text", checkboxes: O = !0, selectAll: k, max: A, clearable: j, loading: M, loadingText: N, size: P, filter: F, manualFilter: te, onFilterChange: ne, emptyText: re, hasMore: I, onLoadMore: ie, dataSource: L, minSearchLength: ae, pageSize: oe, renderItem: se, renderValue: ce, id: le, className: ue, style: de, onKeyDown: fe, ...R }) {
|
|
1079
|
+
let pe = t("multiSelect", ee, e), B = D === "chips", V = pe({
|
|
1080
1080
|
size: P,
|
|
1081
|
-
clearable: j && !
|
|
1082
|
-
}),
|
|
1081
|
+
clearable: j && !B
|
|
1082
|
+
}), U = Pe(), W = n(), he = W.select, ge = {
|
|
1083
1083
|
itemValue: b,
|
|
1084
1084
|
itemLabel: x,
|
|
1085
1085
|
itemDisabled: S,
|
|
1086
1086
|
itemGroup: C,
|
|
1087
1087
|
itemKeywords: T,
|
|
1088
1088
|
valueKey: E
|
|
1089
|
-
}, [
|
|
1089
|
+
}, [_e, ve] = q(""), G = l({
|
|
1090
1090
|
items: r,
|
|
1091
1091
|
source: L,
|
|
1092
|
-
accessors:
|
|
1092
|
+
accessors: ge,
|
|
1093
1093
|
pageSize: oe,
|
|
1094
1094
|
minSearchLength: ae
|
|
1095
|
-
}), { options:
|
|
1095
|
+
}), { options: Se, visible: Ce, groups: we, ordered: Te, firstFor: Oe } = c(G.items, ge, F && !te && !L ? _e : ""), ke = Ae(() => [...Se, ...G.resolvedOptions], [Se, G.resolvedOptions]), { selected: K, keys: je, commit: Z } = d({
|
|
1096
1096
|
multiple: !0,
|
|
1097
1097
|
value: i,
|
|
1098
1098
|
defaultValue: a,
|
|
1099
|
-
accessors:
|
|
1100
|
-
items:
|
|
1099
|
+
accessors: ge,
|
|
1100
|
+
items: ke,
|
|
1101
1101
|
onChange: o,
|
|
1102
1102
|
check: {
|
|
1103
1103
|
component: "MultiSelect",
|
|
1104
1104
|
ready: !L && !M && r.length > 0
|
|
1105
1105
|
}
|
|
1106
|
-
}),
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
}, [
|
|
1110
|
-
let
|
|
1106
|
+
}), Ne = je.join("\0");
|
|
1107
|
+
Ee(() => {
|
|
1108
|
+
G.resolve(je, ke);
|
|
1109
|
+
}, [Ne, L]);
|
|
1110
|
+
let Fe = M || G.loading, $ = A !== void 0 && K.length >= A, Le = je.join("\n"), Re = Ae(() => {
|
|
1111
1111
|
let e = new Set(Le.split("\n"));
|
|
1112
|
-
return
|
|
1113
|
-
items:
|
|
1112
|
+
return Ie({
|
|
1113
|
+
items: Te,
|
|
1114
1114
|
itemToString: (e) => e.label,
|
|
1115
1115
|
itemToValue: (e) => e.key,
|
|
1116
|
-
isItemDisabled: (t) => t.disabled ||
|
|
1116
|
+
isItemDisabled: (t) => t.disabled || $ && !e.has(t.key)
|
|
1117
1117
|
});
|
|
1118
1118
|
}, [
|
|
1119
|
-
|
|
1120
|
-
|
|
1119
|
+
Te,
|
|
1120
|
+
$,
|
|
1121
1121
|
Le
|
|
1122
|
-
]), ze = F || k, Be = De(), Ve =
|
|
1122
|
+
]), ze = F || k, Be = De(), Ve = Ce.filter((e) => !e.disabled), He = p(K, Ve), [Ue, We] = q("");
|
|
1123
1123
|
function Ge(e) {
|
|
1124
|
-
let t = A !== void 0 && e.length >= A &&
|
|
1125
|
-
|
|
1124
|
+
let t = A !== void 0 && e.length >= A && K.length < A;
|
|
1125
|
+
Z(e), t && We(he.maxReached(A));
|
|
1126
1126
|
}
|
|
1127
1127
|
function Ke(e) {
|
|
1128
|
-
|
|
1128
|
+
Z(K.filter((t) => t.key !== e.key)), We(he.removed(e.label));
|
|
1129
1129
|
}
|
|
1130
1130
|
function qe(e) {
|
|
1131
1131
|
fe?.(e);
|
|
1132
|
-
let t =
|
|
1133
|
-
t && (
|
|
1132
|
+
let t = K.at(-1);
|
|
1133
|
+
t && (B && e.key === "Backspace" ? (e.preventDefault(), Ke(t)) : j && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), Z([])));
|
|
1134
1134
|
}
|
|
1135
1135
|
function Je(e, t) {
|
|
1136
|
-
|
|
1137
|
-
let n = te || L ? void 0 :
|
|
1136
|
+
ve(t), ne?.(t), L && G.search(t);
|
|
1137
|
+
let n = te || L ? void 0 : Oe(t);
|
|
1138
1138
|
n && requestAnimationFrame(() => e.setHighlightValue(n.key));
|
|
1139
1139
|
}
|
|
1140
1140
|
let Ye = {
|
|
1141
|
-
item:
|
|
1142
|
-
itemText:
|
|
1143
|
-
icon:
|
|
1144
|
-
itemIndicator:
|
|
1145
|
-
itemBody:
|
|
1146
|
-
itemDescription:
|
|
1147
|
-
group:
|
|
1148
|
-
groupLabel:
|
|
1149
|
-
loading:
|
|
1150
|
-
loadingIcon:
|
|
1151
|
-
sentinel:
|
|
1152
|
-
empty:
|
|
1153
|
-
check:
|
|
1154
|
-
checkIcon:
|
|
1141
|
+
item: V.item(),
|
|
1142
|
+
itemText: V.itemText(),
|
|
1143
|
+
icon: V.icon(),
|
|
1144
|
+
itemIndicator: V.itemIndicator(),
|
|
1145
|
+
itemBody: V.itemBody(),
|
|
1146
|
+
itemDescription: V.itemDescription(),
|
|
1147
|
+
group: V.group(),
|
|
1148
|
+
groupLabel: V.groupLabel(),
|
|
1149
|
+
loading: V.loading(),
|
|
1150
|
+
loadingIcon: V.loadingIcon(),
|
|
1151
|
+
sentinel: V.sentinel(),
|
|
1152
|
+
empty: V.empty(),
|
|
1153
|
+
check: V.check(),
|
|
1154
|
+
checkIcon: V.checkIcon()
|
|
1155
1155
|
}, Xe = /* @__PURE__ */ Y(u, {
|
|
1156
1156
|
parts: Q,
|
|
1157
|
-
groups:
|
|
1157
|
+
groups: we,
|
|
1158
1158
|
classes: Ye,
|
|
1159
1159
|
checkbox: O,
|
|
1160
|
-
loading:
|
|
1161
|
-
loadingText: N ??
|
|
1162
|
-
hasMore: I ||
|
|
1163
|
-
onLoadMore: () => L ?
|
|
1164
|
-
emptyText: re ??
|
|
1160
|
+
loading: Fe,
|
|
1161
|
+
loadingText: N ?? W.common.loading,
|
|
1162
|
+
hasMore: I || G.hasMore,
|
|
1163
|
+
onLoadMore: () => L ? G.loadMore() : ie?.(),
|
|
1164
|
+
emptyText: re ?? G.emptyText ?? (_e ? W.common.noResults : W.common.empty),
|
|
1165
1165
|
renderItem: se
|
|
1166
|
-
}), Ze =
|
|
1166
|
+
}), Ze = K.length ? K.length > m ? (f ?? W.common.selectedCount)(K.length) : K.map((e) => e.label).join(", ") : s ?? W.common.placeholder;
|
|
1167
1167
|
return /* @__PURE__ */ X(Q.Root, {
|
|
1168
|
-
className:
|
|
1168
|
+
className: V.base({ class: ue }),
|
|
1169
1169
|
style: de,
|
|
1170
1170
|
collection: Re,
|
|
1171
1171
|
multiple: !0,
|
|
1172
1172
|
closeOnSelect: !1,
|
|
1173
|
-
value:
|
|
1173
|
+
value: je,
|
|
1174
1174
|
onValueChange: (e) => {
|
|
1175
|
-
let t = w(
|
|
1175
|
+
let t = w(ke, e.items, K);
|
|
1176
1176
|
Ge(e.value.map((e) => t.get(e)).filter((e) => e !== void 0));
|
|
1177
1177
|
},
|
|
1178
1178
|
onOpenChange: (e) => {
|
|
1179
|
-
e.open &&
|
|
1179
|
+
e.open && G.open(), !e.open && _e && (ve(""), ne?.(""), L && G.search(""));
|
|
1180
1180
|
},
|
|
1181
1181
|
disabled: h,
|
|
1182
1182
|
invalid: _,
|
|
@@ -1188,81 +1188,81 @@ function Ot({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o,
|
|
|
1188
1188
|
},
|
|
1189
1189
|
composite: !ze,
|
|
1190
1190
|
...g(le, "trigger", {
|
|
1191
|
-
label:
|
|
1192
|
-
hiddenSelect:
|
|
1191
|
+
label: U?.ids.label,
|
|
1192
|
+
hiddenSelect: U?.ids.control
|
|
1193
1193
|
}),
|
|
1194
1194
|
lazyMount: !0,
|
|
1195
1195
|
unmountOnExit: !0,
|
|
1196
1196
|
children: [
|
|
1197
1197
|
/* @__PURE__ */ Y(Q.Context, { children: (e) => /* @__PURE__ */ X(Q.Control, {
|
|
1198
|
-
...
|
|
1198
|
+
...B || j ? { className: B ? V.chipsControl() : V.control() } : {},
|
|
1199
1199
|
children: [
|
|
1200
|
-
|
|
1201
|
-
className:
|
|
1200
|
+
B && K.map((t) => /* @__PURE__ */ X("span", {
|
|
1201
|
+
className: V.chip(),
|
|
1202
1202
|
children: [/* @__PURE__ */ Y("span", {
|
|
1203
|
-
className:
|
|
1203
|
+
className: V.chipText(),
|
|
1204
1204
|
children: t.label
|
|
1205
1205
|
}), !e.disabled && /* @__PURE__ */ Y("button", {
|
|
1206
1206
|
type: "button",
|
|
1207
1207
|
tabIndex: -1,
|
|
1208
|
-
className:
|
|
1209
|
-
"aria-label":
|
|
1208
|
+
className: V.chipRemove(),
|
|
1209
|
+
"aria-label": he.removeItem(t.label),
|
|
1210
1210
|
onClick: () => Ke(t),
|
|
1211
|
-
children: /* @__PURE__ */ Y(
|
|
1212
|
-
className:
|
|
1211
|
+
children: /* @__PURE__ */ Y(xe, {
|
|
1212
|
+
className: V.chipRemoveIcon(),
|
|
1213
1213
|
"aria-hidden": "true"
|
|
1214
1214
|
})
|
|
1215
1215
|
})]
|
|
1216
1216
|
}, t.key)),
|
|
1217
1217
|
/* @__PURE__ */ X(Q.Trigger, {
|
|
1218
1218
|
...R,
|
|
1219
|
-
className:
|
|
1219
|
+
className: B ? V.chipsTrigger() : V.trigger(),
|
|
1220
1220
|
"aria-busy": M || void 0,
|
|
1221
1221
|
onKeyDown: qe,
|
|
1222
1222
|
children: [/* @__PURE__ */ Y("span", {
|
|
1223
|
-
className:
|
|
1224
|
-
"data-placeholder-shown": !
|
|
1225
|
-
children:
|
|
1226
|
-
className:
|
|
1227
|
-
children:
|
|
1228
|
-
}) : s ??
|
|
1223
|
+
className: V.value(),
|
|
1224
|
+
"data-placeholder-shown": !K.length || void 0,
|
|
1225
|
+
children: B ? K.length ? /* @__PURE__ */ Y("span", {
|
|
1226
|
+
className: V.hiddenValue(),
|
|
1227
|
+
children: K.map((e) => e.label).join(", ")
|
|
1228
|
+
}) : s ?? W.common.placeholder : ce && K.length ? ce(K.map((e) => e.item)) : Ze
|
|
1229
1229
|
}), /* @__PURE__ */ Y(Q.Indicator, {
|
|
1230
|
-
className:
|
|
1231
|
-
children: M ? /* @__PURE__ */ Y(
|
|
1232
|
-
className:
|
|
1230
|
+
className: V.indicator(),
|
|
1231
|
+
children: M ? /* @__PURE__ */ Y(ye, {
|
|
1232
|
+
className: V.spinner(),
|
|
1233
1233
|
"aria-hidden": "true"
|
|
1234
|
-
}) : /* @__PURE__ */ Y(
|
|
1235
|
-
className:
|
|
1234
|
+
}) : /* @__PURE__ */ Y(me, {
|
|
1235
|
+
className: V.indicatorIcon(),
|
|
1236
1236
|
"aria-hidden": "true"
|
|
1237
1237
|
})
|
|
1238
1238
|
})]
|
|
1239
1239
|
}),
|
|
1240
|
-
j &&
|
|
1240
|
+
j && K.length > 0 && !e.disabled && /* @__PURE__ */ Y("button", {
|
|
1241
1241
|
type: "button",
|
|
1242
1242
|
tabIndex: -1,
|
|
1243
|
-
className:
|
|
1244
|
-
"aria-label":
|
|
1243
|
+
className: B ? V.chipsClear() : V.clear(),
|
|
1244
|
+
"aria-label": he.clear,
|
|
1245
1245
|
onClick: () => {
|
|
1246
|
-
|
|
1246
|
+
Z([]), e.focus();
|
|
1247
1247
|
},
|
|
1248
|
-
children: /* @__PURE__ */ Y(
|
|
1249
|
-
className:
|
|
1248
|
+
children: /* @__PURE__ */ Y(xe, {
|
|
1249
|
+
className: V.clearIcon(),
|
|
1250
1250
|
"aria-hidden": "true"
|
|
1251
1251
|
})
|
|
1252
1252
|
})
|
|
1253
1253
|
]
|
|
1254
1254
|
}) }),
|
|
1255
|
-
(
|
|
1255
|
+
(B || A !== void 0 || L) && /* @__PURE__ */ Y("span", {
|
|
1256
1256
|
role: "status",
|
|
1257
|
-
className:
|
|
1258
|
-
children: Ue ||
|
|
1257
|
+
className: V.status(),
|
|
1258
|
+
children: Ue || G.announcement
|
|
1259
1259
|
}),
|
|
1260
|
-
/* @__PURE__ */ Y(
|
|
1261
|
-
className:
|
|
1262
|
-
"aria-busy":
|
|
1260
|
+
/* @__PURE__ */ Y(Me, { children: /* @__PURE__ */ Y(Q.Positioner, { children: /* @__PURE__ */ Y(Q.Content, {
|
|
1261
|
+
className: V.content(),
|
|
1262
|
+
"aria-busy": Fe || void 0,
|
|
1263
1263
|
"aria-label": ze ? R["aria-label"] : void 0,
|
|
1264
1264
|
children: ze ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
|
|
1265
|
-
className:
|
|
1265
|
+
className: V.header(),
|
|
1266
1266
|
children: [F && /* @__PURE__ */ Y(Q.Context, { children: (e) => /* @__PURE__ */ Y("input", {
|
|
1267
1267
|
type: "text",
|
|
1268
1268
|
role: "combobox",
|
|
@@ -1272,10 +1272,10 @@ function Ot({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o,
|
|
|
1272
1272
|
"data-autofocus": "",
|
|
1273
1273
|
"aria-controls": Be,
|
|
1274
1274
|
"aria-activedescendant": e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0,
|
|
1275
|
-
"aria-label":
|
|
1276
|
-
placeholder:
|
|
1277
|
-
value:
|
|
1278
|
-
className:
|
|
1275
|
+
"aria-label": he.filter,
|
|
1276
|
+
placeholder: W.combobox.search,
|
|
1277
|
+
value: _e,
|
|
1278
|
+
className: V.search(),
|
|
1279
1279
|
onChange: (t) => Je(e, t.target.value),
|
|
1280
1280
|
onKeyDown: (e) => {
|
|
1281
1281
|
[
|
|
@@ -1288,21 +1288,21 @@ function Ot({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o,
|
|
|
1288
1288
|
type: "button",
|
|
1289
1289
|
role: "checkbox",
|
|
1290
1290
|
"aria-checked": He,
|
|
1291
|
-
className:
|
|
1292
|
-
onClick: () => Ge(
|
|
1291
|
+
className: V.selectAll(),
|
|
1292
|
+
onClick: () => Ge(z(K, Ce, A)),
|
|
1293
1293
|
onKeyDown: (e) => {
|
|
1294
1294
|
(e.key === " " || e.key === "Enter") && e.stopPropagation();
|
|
1295
1295
|
},
|
|
1296
1296
|
children: [/* @__PURE__ */ Y("span", {
|
|
1297
|
-
className:
|
|
1297
|
+
className: V.check(),
|
|
1298
1298
|
"data-state": He === "mixed" ? "indeterminate" : He ? "checked" : "unchecked",
|
|
1299
1299
|
"aria-hidden": "true",
|
|
1300
|
-
children: He === "mixed" ? /* @__PURE__ */ Y(
|
|
1301
|
-
}),
|
|
1300
|
+
children: He === "mixed" ? /* @__PURE__ */ Y(be, { className: V.checkIcon() }) : He && /* @__PURE__ */ Y(H, { className: V.checkIcon() })
|
|
1301
|
+
}), he.selectAll]
|
|
1302
1302
|
})]
|
|
1303
1303
|
}), /* @__PURE__ */ Y(Q.List, {
|
|
1304
1304
|
id: Be,
|
|
1305
|
-
className:
|
|
1305
|
+
className: V.list(),
|
|
1306
1306
|
"data-autofocus": F ? void 0 : "",
|
|
1307
1307
|
children: Xe
|
|
1308
1308
|
})] }) : Xe
|
|
@@ -1313,55 +1313,55 @@ function Ot({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o,
|
|
|
1313
1313
|
}
|
|
1314
1314
|
//#endregion
|
|
1315
1315
|
//#region src/components/NumberInput/NumberInput.tsx
|
|
1316
|
-
function
|
|
1317
|
-
let
|
|
1316
|
+
function At({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, max: u, step: d, formatOptions: f = b, locale: p, size: m, invalid: h, success: _, disabled: v, readOnly: y, required: x, name: S, stepper: C = !0, stepperLayout: w = "inline", prefix: E, suffix: D, allowNegative: O = !0, allowDecimal: k = !0, decimals: A, clampBehavior: ee = "blur", emptyFallback: N, selectOnFocus: P = !1, loading: te = !1, clearable: ne = !1, clearLabel: re, id: I, className: ie, style: ae, onKeyDown: oe, onPaste: se, onFocus: ce, ...le }) {
|
|
1317
|
+
let ue = t("numberInput", j, a), fe = e(), R = p ?? fe.locale, pe = n(), z = Pe(), B = r(), V = !(h || z?.invalid) && (!!_ || B.success), H = ue({
|
|
1318
1318
|
size: m,
|
|
1319
1319
|
stacked: w === "stacked",
|
|
1320
|
-
success:
|
|
1321
|
-
}),
|
|
1320
|
+
success: V
|
|
1321
|
+
}), U = A === void 0 ? k ? f : {
|
|
1322
1322
|
...f,
|
|
1323
1323
|
maximumFractionDigits: 0
|
|
1324
1324
|
} : {
|
|
1325
1325
|
...f,
|
|
1326
1326
|
minimumFractionDigits: A,
|
|
1327
1327
|
maximumFractionDigits: A
|
|
1328
|
-
},
|
|
1329
|
-
|
|
1330
|
-
E &&
|
|
1331
|
-
D &&
|
|
1328
|
+
}, W = O ? l : Math.max(l ?? 0, 0), [ge, _e] = q(null), ve = K(s ?? null), ye = o === void 0 ? N ? ge?.text : void 0 : ge && (ge.number === o || N && ge.number === null) ? ge.text : de(o, R, U), xe = ye ?? ge?.text ?? de(s, R, U) ?? "", Se = De(), Ce = De(), we = E || D ? [
|
|
1329
|
+
z?.ariaDescribedby,
|
|
1330
|
+
E && Se,
|
|
1331
|
+
D && Ce,
|
|
1332
1332
|
le["aria-describedby"]
|
|
1333
|
-
].filter(Boolean).join(" ") : void 0,
|
|
1334
|
-
let e =
|
|
1335
|
-
e && (
|
|
1336
|
-
},
|
|
1337
|
-
return /* @__PURE__ */ Y(
|
|
1338
|
-
className:
|
|
1333
|
+
].filter(Boolean).join(" ") : void 0, Te = K(null), Ee = () => {
|
|
1334
|
+
let e = Te.current?.querySelector("input");
|
|
1335
|
+
e && (L(e), e.focus());
|
|
1336
|
+
}, Oe = !!v || !!y || !!z?.disabled || !!z?.readOnly;
|
|
1337
|
+
return /* @__PURE__ */ Y(Ge.Root, {
|
|
1338
|
+
className: H.base({ class: ie }),
|
|
1339
1339
|
style: ae,
|
|
1340
|
-
value:
|
|
1341
|
-
defaultValue:
|
|
1340
|
+
value: ye,
|
|
1341
|
+
defaultValue: de(s, R, U),
|
|
1342
1342
|
...g(I, "input", {
|
|
1343
|
-
label:
|
|
1344
|
-
input:
|
|
1343
|
+
label: z?.ids.label,
|
|
1344
|
+
input: z?.ids.control
|
|
1345
1345
|
}),
|
|
1346
1346
|
onValueChange: (e) => {
|
|
1347
1347
|
let t = Number.isNaN(e.valueAsNumber) ? null : e.valueAsNumber;
|
|
1348
|
-
|
|
1348
|
+
_e({
|
|
1349
1349
|
text: e.value,
|
|
1350
1350
|
number: t
|
|
1351
|
-
}), !(t === null && N) && (t !== null && (
|
|
1351
|
+
}), !(t === null && N) && (t !== null && (ve.current = t), c?.(t));
|
|
1352
1352
|
},
|
|
1353
1353
|
onValueCommit: (e) => {
|
|
1354
1354
|
if (!N || !Number.isNaN(e.valueAsNumber)) return;
|
|
1355
|
-
let t = o ??
|
|
1356
|
-
|
|
1357
|
-
text:
|
|
1355
|
+
let t = o ?? ve.current, n = N === "previous" && t !== null ? t : W ?? 0;
|
|
1356
|
+
_e({
|
|
1357
|
+
text: de(n, R, U) ?? "",
|
|
1358
1358
|
number: n
|
|
1359
1359
|
}), c?.(n);
|
|
1360
1360
|
},
|
|
1361
|
-
min:
|
|
1361
|
+
min: W,
|
|
1362
1362
|
max: u,
|
|
1363
1363
|
step: d,
|
|
1364
|
-
formatOptions:
|
|
1364
|
+
formatOptions: U,
|
|
1365
1365
|
locale: R,
|
|
1366
1366
|
invalid: h,
|
|
1367
1367
|
disabled: v,
|
|
@@ -1371,19 +1371,19 @@ function kt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, m
|
|
|
1371
1371
|
clampValueOnBlur: ee !== "none",
|
|
1372
1372
|
allowOverflow: ee !== "strict",
|
|
1373
1373
|
translations: pe.numberInput,
|
|
1374
|
-
children: /* @__PURE__ */ X(
|
|
1375
|
-
ref:
|
|
1376
|
-
className:
|
|
1374
|
+
children: /* @__PURE__ */ X(Ge.Control, {
|
|
1375
|
+
ref: Te,
|
|
1376
|
+
className: H.control(),
|
|
1377
1377
|
children: [
|
|
1378
1378
|
E && /* @__PURE__ */ Y("span", {
|
|
1379
|
-
id:
|
|
1380
|
-
className:
|
|
1379
|
+
id: Se,
|
|
1380
|
+
className: H.prefix(),
|
|
1381
1381
|
children: E
|
|
1382
1382
|
}),
|
|
1383
|
-
/* @__PURE__ */ Y(
|
|
1383
|
+
/* @__PURE__ */ Y(Ge.Input, {
|
|
1384
1384
|
...le,
|
|
1385
|
-
...
|
|
1386
|
-
className:
|
|
1385
|
+
...we ? { "aria-describedby": we } : {},
|
|
1386
|
+
className: H.input(),
|
|
1387
1387
|
"aria-busy": te || void 0,
|
|
1388
1388
|
onKeyDown: (e) => {
|
|
1389
1389
|
if (oe?.(e), e.defaultPrevented || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
@@ -1396,7 +1396,7 @@ function kt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, m
|
|
|
1396
1396
|
onPaste: (e) => {
|
|
1397
1397
|
se?.(e);
|
|
1398
1398
|
let t = e.currentTarget, n = (t.selectionStart ?? 0) === 0 && (t.selectionEnd ?? 0) === t.value.length, r = F(e.clipboardData.getData("text"), R);
|
|
1399
|
-
!e.defaultPrevented && n && r !== null && (e.preventDefault(),
|
|
1399
|
+
!e.defaultPrevented && n && r !== null && (e.preventDefault(), L(t, de(r, R, U)));
|
|
1400
1400
|
},
|
|
1401
1401
|
onFocus: (e) => {
|
|
1402
1402
|
ce?.(e);
|
|
@@ -1404,49 +1404,49 @@ function kt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, m
|
|
|
1404
1404
|
P && requestAnimationFrame(() => t.select());
|
|
1405
1405
|
}
|
|
1406
1406
|
}),
|
|
1407
|
-
(te || ne ||
|
|
1407
|
+
(te || ne || V) && /* @__PURE__ */ Y(i, {
|
|
1408
1408
|
loading: te,
|
|
1409
|
-
clear: ne && !!
|
|
1409
|
+
clear: ne && !!xe && !Oe,
|
|
1410
1410
|
clearLabel: re ?? pe.field.clear,
|
|
1411
|
-
onClear:
|
|
1412
|
-
success:
|
|
1411
|
+
onClear: Ee,
|
|
1412
|
+
success: V,
|
|
1413
1413
|
classes: {
|
|
1414
|
-
spinner:
|
|
1415
|
-
clear:
|
|
1416
|
-
clearIcon:
|
|
1417
|
-
statusIcon:
|
|
1414
|
+
spinner: H.spinner(),
|
|
1415
|
+
clear: H.clear(),
|
|
1416
|
+
clearIcon: H.clearIcon(),
|
|
1417
|
+
statusIcon: H.statusIcon()
|
|
1418
1418
|
}
|
|
1419
1419
|
}),
|
|
1420
1420
|
D && /* @__PURE__ */ Y("span", {
|
|
1421
|
-
id:
|
|
1422
|
-
className:
|
|
1421
|
+
id: Ce,
|
|
1422
|
+
className: H.suffix(),
|
|
1423
1423
|
children: D
|
|
1424
1424
|
}),
|
|
1425
1425
|
C && w === "stacked" ? /* @__PURE__ */ X("div", {
|
|
1426
|
-
className:
|
|
1427
|
-
children: [/* @__PURE__ */ Y(
|
|
1428
|
-
className:
|
|
1429
|
-
children: /* @__PURE__ */ Y(
|
|
1430
|
-
className:
|
|
1426
|
+
className: H.stepper(),
|
|
1427
|
+
children: [/* @__PURE__ */ Y(Ge.IncrementTrigger, {
|
|
1428
|
+
className: H.button(),
|
|
1429
|
+
children: /* @__PURE__ */ Y(he, {
|
|
1430
|
+
className: H.buttonIcon(),
|
|
1431
1431
|
"aria-hidden": "true"
|
|
1432
1432
|
})
|
|
1433
|
-
}), /* @__PURE__ */ Y(
|
|
1434
|
-
className:
|
|
1435
|
-
children: /* @__PURE__ */ Y(
|
|
1436
|
-
className:
|
|
1433
|
+
}), /* @__PURE__ */ Y(Ge.DecrementTrigger, {
|
|
1434
|
+
className: H.button(),
|
|
1435
|
+
children: /* @__PURE__ */ Y(me, {
|
|
1436
|
+
className: H.buttonIcon(),
|
|
1437
1437
|
"aria-hidden": "true"
|
|
1438
1438
|
})
|
|
1439
1439
|
})]
|
|
1440
|
-
}) : C && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
1441
|
-
className:
|
|
1442
|
-
children: /* @__PURE__ */ Y(
|
|
1443
|
-
className:
|
|
1440
|
+
}) : C && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Ge.DecrementTrigger, {
|
|
1441
|
+
className: H.button(),
|
|
1442
|
+
children: /* @__PURE__ */ Y(be, {
|
|
1443
|
+
className: H.buttonIcon(),
|
|
1444
1444
|
"aria-hidden": "true"
|
|
1445
1445
|
})
|
|
1446
|
-
}), /* @__PURE__ */ Y(
|
|
1447
|
-
className:
|
|
1448
|
-
children: /* @__PURE__ */ Y(
|
|
1449
|
-
className:
|
|
1446
|
+
}), /* @__PURE__ */ Y(Ge.IncrementTrigger, {
|
|
1447
|
+
className: H.button(),
|
|
1448
|
+
children: /* @__PURE__ */ Y(G, {
|
|
1449
|
+
className: H.buttonIcon(),
|
|
1450
1450
|
"aria-hidden": "true"
|
|
1451
1451
|
})
|
|
1452
1452
|
})] })
|
|
@@ -1455,25 +1455,63 @@ function kt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, m
|
|
|
1455
1455
|
});
|
|
1456
1456
|
}
|
|
1457
1457
|
//#endregion
|
|
1458
|
+
//#region src/components/DateRangePicker/DateRangePicker.tsx
|
|
1459
|
+
function jt({ value: t, defaultValue: r, onValueChange: i, valueType: a = "string", withTime: o = !1, min: c, max: l, isDateUnavailable: u, excludeDates: d, locale: f, presets: p, "aria-label": m, id: h, clearable: g = !0, highlightToday: _ = !0, ...v }) {
|
|
1460
|
+
s("DateRangePicker", h);
|
|
1461
|
+
let y = e(), b = f ?? y.locale, x = n(), S = v.timeZone, [C, w] = q(r ?? null), T = t === void 0 ? C : t, E = (e) => [e?.start, e?.end].map((e) => st(e, o, S)).filter((e) => !!e), D = (e) => lt(e, o, S), O = (e) => {
|
|
1462
|
+
let t = e.length ? {
|
|
1463
|
+
start: ct(e[0], o, a, S),
|
|
1464
|
+
end: ct(e[1], o, a, S)
|
|
1465
|
+
} : null;
|
|
1466
|
+
(D(t?.start) !== D(T?.start) || D(t?.end) !== D(T?.end)) && (w(t), i?.(t));
|
|
1467
|
+
}, k = p?.map((e) => {
|
|
1468
|
+
if (typeof e != "string") return {
|
|
1469
|
+
label: e.label,
|
|
1470
|
+
value: E(e.value)
|
|
1471
|
+
};
|
|
1472
|
+
let t = I(e);
|
|
1473
|
+
return t ? {
|
|
1474
|
+
label: x.rangePresets[e] ?? e,
|
|
1475
|
+
value: [ot(t.start, o), ot(t.end, o, "max")]
|
|
1476
|
+
} : e;
|
|
1477
|
+
});
|
|
1478
|
+
return /* @__PURE__ */ Y(_t, {
|
|
1479
|
+
...v,
|
|
1480
|
+
mode: "range",
|
|
1481
|
+
dates: E(T),
|
|
1482
|
+
onChange: O,
|
|
1483
|
+
withTime: o,
|
|
1484
|
+
min: st(c, o, S, "min"),
|
|
1485
|
+
max: st(l, o, S, "max"),
|
|
1486
|
+
isDateUnavailable: ut(u, d),
|
|
1487
|
+
locale: b,
|
|
1488
|
+
presets: k,
|
|
1489
|
+
label: m,
|
|
1490
|
+
ownId: h,
|
|
1491
|
+
hideClear: !g,
|
|
1492
|
+
plainToday: !_
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
//#endregion
|
|
1458
1496
|
//#region src/components/ContextMenu/ContextMenu.tsx
|
|
1459
|
-
function
|
|
1460
|
-
let b =
|
|
1497
|
+
function Mt({ classes: e, items: n, label: r, onSelect: i, onCheckedChange: a, onValueChange: o, linkAs: s, renderItem: c, open: l, onOpenChange: u, onBeforeOpen: d, closeOnScroll: f, closeOnResize: p, closeOnBlur: m, highlightFirst: h, ref: g, children: y }) {
|
|
1498
|
+
let b = t("menu", k, e)(), x = Je({
|
|
1461
1499
|
open: l,
|
|
1462
1500
|
anchor: void 0,
|
|
1463
1501
|
onOpenChange: u,
|
|
1464
1502
|
ref: g,
|
|
1465
1503
|
restoreFocus: !0
|
|
1466
|
-
}), S =
|
|
1504
|
+
}), S = K(null), C = Qe(x.isOpen, x.handle.close, S, {
|
|
1467
1505
|
closeOnScroll: f,
|
|
1468
1506
|
closeOnResize: p,
|
|
1469
1507
|
closeOnBlur: m,
|
|
1470
1508
|
highlightFirst: h
|
|
1471
|
-
}), w =
|
|
1472
|
-
return
|
|
1509
|
+
}), w = K(null), [T] = q(_);
|
|
1510
|
+
return Ee(() => {
|
|
1473
1511
|
let e = w;
|
|
1474
1512
|
return () => e.current?.cancel();
|
|
1475
|
-
}, []), /* @__PURE__ */ Y(
|
|
1476
|
-
items:
|
|
1513
|
+
}, []), /* @__PURE__ */ Y(Ze, {
|
|
1514
|
+
items: n,
|
|
1477
1515
|
linkAs: s,
|
|
1478
1516
|
renderItem: c,
|
|
1479
1517
|
onCheckedChange: a,
|
|
@@ -1504,15 +1542,15 @@ function At({ classes: e, items: t, label: r, onSelect: i, onCheckedChange: a, o
|
|
|
1504
1542
|
onPointerUp: () => w.current?.cancel(),
|
|
1505
1543
|
onPointerCancel: () => w.current?.cancel(),
|
|
1506
1544
|
children: y
|
|
1507
|
-
}), /* @__PURE__ */ Y(
|
|
1545
|
+
}), /* @__PURE__ */ Y(Me, { children: /* @__PURE__ */ Y(Z.Positioner, { children: /* @__PURE__ */ Y(Z.Content, {
|
|
1508
1546
|
ref: S,
|
|
1509
1547
|
className: b.content(),
|
|
1510
1548
|
...r ? {
|
|
1511
1549
|
"aria-label": r,
|
|
1512
1550
|
"aria-labelledby": void 0
|
|
1513
1551
|
} : {},
|
|
1514
|
-
children: /* @__PURE__ */ Y(
|
|
1515
|
-
entries:
|
|
1552
|
+
children: /* @__PURE__ */ Y(tt, {
|
|
1553
|
+
entries: n,
|
|
1516
1554
|
onSelect: i
|
|
1517
1555
|
})
|
|
1518
1556
|
}) }) })]
|
|
@@ -1520,4 +1558,4 @@ function At({ classes: e, items: t, label: r, onSelect: i, onCheckedChange: a, o
|
|
|
1520
1558
|
});
|
|
1521
1559
|
}
|
|
1522
1560
|
//#endregion
|
|
1523
|
-
export {
|
|
1561
|
+
export { Je as S, rt as _, Ot as a, tt as b, vt as c, gt as d, ct as f, it as g, lt as h, kt as i, st as l, ut as m, jt as n, St as o, ht as p, At as r, _t as s, Mt as t, pt as u, nt as v, Ze as x, $e as y };
|