@wirecore/wirelayer-react 0.4.0 → 0.6.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/README.md +3 -1
- package/dist/Button-Cd7lufvJ.js +60 -0
- package/dist/{ContextMenu-qh-bB9Lw.js → ContextMenu-CjDI7Jy5.js} +459 -451
- package/dist/{Field-hc416yJx.js → Field-DkYxlVar.js} +5 -2
- package/dist/{Highlight-DdTridk2.js → Highlight-CX30-nP7.js} +22 -18
- package/dist/{Input-OPRvjIYt.js → Input-D8U-Auys.js} +20 -19
- package/dist/{InputStatus-DS38XEkX.js → InputStatus-hVzkU_4q.js} +4 -1
- package/dist/{PasswordInput-B9k0GuSx.js → PasswordInput-DivSjtN8.js} +1 -1
- package/dist/{Select-PbxrUYi1.js → Select-Cx3KwSzU.js} +84 -83
- package/dist/{Tree-eqv4DIQn.js → Tree-BiPIkmwT.js} +2 -2
- package/dist/chart/Chart.d.ts +11 -5
- package/dist/chart/Chart.d.ts.map +1 -1
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart.js +43 -36
- package/dist/code.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +3 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +6 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.d.ts +7 -2
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerBase.d.ts +3 -1
- package/dist/components/DatePicker/DatePickerBase.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +5 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Field/context.d.ts +3 -1
- package/dist/components/Field/context.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +9 -2
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +3 -1
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.d.ts +2 -0
- package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +3 -3
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +9 -2
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Toast/Toaster.d.ts +10 -2
- package/dist/components/Toast/Toaster.d.ts.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.d.ts +7 -1
- package/dist/components/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/components/YearPicker/YearPicker.d.ts +2 -0
- package/dist/components/YearPicker/YearPicker.d.ts.map +1 -1
- package/dist/data-table/DataTable.d.ts +20 -2
- package/dist/data-table/DataTable.d.ts.map +1 -1
- package/dist/data-table/FilterMenu.d.ts +7 -1
- package/dist/data-table/FilterMenu.d.ts.map +1 -1
- package/dist/data-table/ValueInput.d.ts +8 -1
- package/dist/data-table/ValueInput.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/types.d.ts +29 -1
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1214 -1139
- package/dist/editor.js +1 -1
- package/dist/form.js +3 -3
- package/dist/index.js +2606 -2578
- package/dist/pdf.js +5 -5
- package/dist/virtual.js +2 -2
- package/llms-full.txt +6239 -0
- package/llms.txt +311 -0
- package/package.json +6 -4
- package/dist/Button-DFVVqBuY.js +0 -58
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as e, i as t, n } from "./RecipesProvider-0idafuGm.js";
|
|
3
|
-
import { r, t as i } from "./InputStatus-
|
|
4
|
-
import { t as a } from "./Input-
|
|
5
|
-
import { t as o } from "./Select-
|
|
6
|
-
import { a as s, c, n as l, o as u } from "./Highlight-
|
|
7
|
-
import { SUBMENU_GUTTER as d, allListOptionsState as f, anchorBox as p, createLongPress as m, datePicker as h, defaultNumberFormat as g, filterMenuEntries as _, fromWallIso as v, highlightFirstMenuItem as
|
|
8
|
-
import { CalendarDays as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { useFilter as
|
|
3
|
+
import { r, t as i } from "./InputStatus-hVzkU_4q.js";
|
|
4
|
+
import { t as a } from "./Input-D8U-Auys.js";
|
|
5
|
+
import { t as o } from "./Select-Cx3KwSzU.js";
|
|
6
|
+
import { a as s, c, n as l, o as u } from "./Highlight-CX30-nP7.js";
|
|
7
|
+
import { SUBMENU_GUTTER as d, allListOptionsState as f, anchorBox as p, createLongPress as m, datePicker as h, defaultNumberFormat as g, filterMenuEntries as _, fromWallIso as v, highlightFirstMenuItem as ee, indexListOptions as y, insertIntoTextControl as b, isoWeekday as x, linkTarget as S, localeWeekInfo as C, menu as w, menuSearchKey as T, multiSelect as E, numberInput as te, numberInputKey as D, pageForSize as O, pagination as k, parseLocaleNumber as A, parsePastedDate as ne, parsePastedRange as j, pluralText as M, rowWeekNumber as N, setTextControlValue as P, skeleton as re, textarea as F, textareaParts as ie, timeSlots as I, timeZoneLabel as ae, timeZoneLongLabel as oe, toNumberInputValue as se, toOverlayAnchor as L, toWallIso as ce, todayIso as le, toggleAllListOptions as R, zonedToInstant as z } from "@wirecore/wirelayer-recipes";
|
|
8
|
+
import { CalendarDays as ue, Check as de, ChevronDown as fe, ChevronLeft as pe, ChevronRight as B, ChevronUp as V, ChevronsLeft as H, ChevronsRight as U, Circle as W, LoaderCircle as me, Minus as he, Plus as ge, X as _e } from "lucide-react";
|
|
9
|
+
import { Fragment as ve, createContext as G, createElement as ye, useContext as be, useEffect as xe, useId as Se, useImperativeHandle as Ce, useLayoutEffect as we, useMemo as Te, useRef as Ee, useState as K } from "react";
|
|
10
|
+
import { useFilter as De } from "@ark-ui/react/locale";
|
|
11
11
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
12
12
|
import { Menu as X } from "@ark-ui/react/menu";
|
|
13
13
|
import { Portal as Oe } from "@ark-ui/react/portal";
|
|
14
14
|
import { Field as ke, useFieldContext as Ae } from "@ark-ui/react/field";
|
|
15
|
-
import { Pagination as
|
|
16
|
-
import { createListCollection as
|
|
17
|
-
import { Select as
|
|
18
|
-
import { DatePicker as
|
|
19
|
-
import { DateInput as
|
|
15
|
+
import { Pagination as je } from "@ark-ui/react/pagination";
|
|
16
|
+
import { createListCollection as Me } from "@ark-ui/react/collection";
|
|
17
|
+
import { Select as Z } from "@ark-ui/react/select";
|
|
18
|
+
import { DatePicker as Q, useDatePickerContext as Ne } from "@ark-ui/react/date-picker";
|
|
19
|
+
import { DateInput as $ } from "@ark-ui/react/date-input";
|
|
20
20
|
import { CalendarDateTime as Pe, DateFormatter as Fe, Time as Ie, parseDate as Le, parseDateTime as Re, toCalendarDateTime as ze } from "@internationalized/date";
|
|
21
21
|
import { NumberInput as Be } from "@ark-ui/react/number-input";
|
|
22
22
|
//#region src/overlay.ts
|
|
23
|
-
var Ve = (e) => e && "current" in e ? e.current : e ?? null, He = typeof document > "u" ?
|
|
23
|
+
var Ve = (e) => e && "current" in e ? e.current : e ?? null, He = typeof document > "u" ? xe : we;
|
|
24
24
|
function Ue(e) {
|
|
25
|
-
let [t, n] =
|
|
25
|
+
let [t, n] = K(e.defaultOpen ?? !1), [r, i] = K(null), a = e.open ?? t, o = r ?? Ve(e.anchor), s = Ee(null), c = Ee(!1);
|
|
26
26
|
c.current = !!o;
|
|
27
|
-
let l =
|
|
27
|
+
let l = Ee(a);
|
|
28
28
|
He(() => {
|
|
29
29
|
if (l.current !== a) {
|
|
30
30
|
if (l.current = a, a) s.current = document.activeElement;
|
|
@@ -46,14 +46,14 @@ function Ue(e) {
|
|
|
46
46
|
e && i(null), u(e);
|
|
47
47
|
}, f = {
|
|
48
48
|
open(e) {
|
|
49
|
-
i(
|
|
49
|
+
i(L(e)), u(!0);
|
|
50
50
|
},
|
|
51
51
|
close: () => u(!1),
|
|
52
52
|
toggle(e) {
|
|
53
53
|
a ? f.close() : f.open(e);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
return
|
|
56
|
+
return Ce(e.ref, () => f), {
|
|
57
57
|
isOpen: a,
|
|
58
58
|
anchor: o,
|
|
59
59
|
anchorPoint: o && !("getBoundingClientRect" in o) ? o : void 0,
|
|
@@ -71,9 +71,9 @@ function Ue(e) {
|
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/components/Menu/Menu.tsx
|
|
74
|
-
var We =
|
|
74
|
+
var We = G(null);
|
|
75
75
|
function Ge(e) {
|
|
76
|
-
let [t, n] =
|
|
76
|
+
let [t, n] = K({
|
|
77
77
|
items: e.items,
|
|
78
78
|
checked: {},
|
|
79
79
|
radio: {}
|
|
@@ -113,26 +113,26 @@ function Ke({ children: e, ...t }) {
|
|
|
113
113
|
children: e
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
function qe({ classes: t, 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, ref: v, children:
|
|
117
|
-
let
|
|
116
|
+
function qe({ classes: t, 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, ref: v, children: y }) {
|
|
117
|
+
let b = n("menu", w, t)(), x = e(), S = Ue({
|
|
118
118
|
open: l,
|
|
119
119
|
defaultOpen: u,
|
|
120
120
|
anchor: f,
|
|
121
121
|
onOpenChange: d,
|
|
122
122
|
ref: v,
|
|
123
123
|
restoreFocus: !0
|
|
124
|
-
}), [
|
|
124
|
+
}), [C, E] = K(""), [te, D] = K(), O = De({
|
|
125
125
|
sensitivity: "base",
|
|
126
126
|
usage: "sort"
|
|
127
|
-
}),
|
|
128
|
-
|
|
129
|
-
if (!
|
|
127
|
+
}), k = p && C ? _(r, (e) => O.contains(e, C)) : r, A = Ee(null), [ne, j] = K(S.isOpen);
|
|
128
|
+
ne !== S.isOpen && (j(S.isOpen), E(""), D(void 0)), xe(() => {
|
|
129
|
+
if (!S.isOpen || !p) return;
|
|
130
130
|
let e = requestAnimationFrame(() => {
|
|
131
|
-
e = requestAnimationFrame(() =>
|
|
131
|
+
e = requestAnimationFrame(() => A.current?.focus());
|
|
132
132
|
});
|
|
133
133
|
return () => cancelAnimationFrame(e);
|
|
134
|
-
}, [
|
|
135
|
-
let
|
|
134
|
+
}, [S.isOpen, p]);
|
|
135
|
+
let M = m ?? x.menu.search;
|
|
136
136
|
return /* @__PURE__ */ J(Ke, {
|
|
137
137
|
items: r,
|
|
138
138
|
linkAs: s,
|
|
@@ -140,58 +140,58 @@ function qe({ classes: t, items: r, onSelect: i, onCheckedChange: a, onValueChan
|
|
|
140
140
|
onCheckedChange: a,
|
|
141
141
|
onValueChange: o,
|
|
142
142
|
children: /* @__PURE__ */ Y(X.Root, {
|
|
143
|
-
open:
|
|
144
|
-
onOpenChange: (e) =>
|
|
145
|
-
positioning:
|
|
143
|
+
open: S.isOpen,
|
|
144
|
+
onOpenChange: (e) => S.onOpenChange(e.open),
|
|
145
|
+
positioning: S.positioning({
|
|
146
146
|
placement: h,
|
|
147
147
|
gutter: g ? 10 : 8
|
|
148
148
|
}),
|
|
149
|
-
anchorPoint:
|
|
149
|
+
anchorPoint: S.anchorPoint,
|
|
150
150
|
lazyMount: !0,
|
|
151
151
|
unmountOnExit: !0,
|
|
152
152
|
onSelect: (e) => i?.(e.value),
|
|
153
|
-
children: [
|
|
153
|
+
children: [y && /* @__PURE__ */ J(X.Trigger, {
|
|
154
154
|
asChild: !0,
|
|
155
|
-
children:
|
|
155
|
+
children: y
|
|
156
156
|
}), /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(X.Positioner, { children: /* @__PURE__ */ Y(X.Content, {
|
|
157
|
-
className:
|
|
157
|
+
className: b.content(),
|
|
158
158
|
children: [
|
|
159
159
|
g && /* @__PURE__ */ J(X.Arrow, {
|
|
160
|
-
className:
|
|
161
|
-
children: /* @__PURE__ */ J(X.ArrowTip, { className:
|
|
160
|
+
className: b.arrow(),
|
|
161
|
+
children: /* @__PURE__ */ J(X.ArrowTip, { className: b.arrowTip() })
|
|
162
162
|
}),
|
|
163
163
|
p && /* @__PURE__ */ J(X.Context, { children: (e) => /* @__PURE__ */ J("div", {
|
|
164
164
|
role: "group",
|
|
165
|
-
"aria-label":
|
|
166
|
-
className:
|
|
165
|
+
"aria-label": M,
|
|
166
|
+
className: b.search(),
|
|
167
167
|
children: /* @__PURE__ */ J("input", {
|
|
168
|
-
ref:
|
|
168
|
+
ref: A,
|
|
169
169
|
type: "text",
|
|
170
170
|
autoComplete: "off",
|
|
171
|
-
className:
|
|
172
|
-
placeholder:
|
|
173
|
-
"aria-label":
|
|
174
|
-
"aria-activedescendant":
|
|
171
|
+
className: b.searchInput(),
|
|
172
|
+
placeholder: M,
|
|
173
|
+
"aria-label": M,
|
|
174
|
+
"aria-activedescendant": te,
|
|
175
175
|
onChange: (t) => {
|
|
176
176
|
let n = t.currentTarget;
|
|
177
|
-
|
|
177
|
+
E(n.value), requestAnimationFrame(() => D(ee(n, e)));
|
|
178
178
|
},
|
|
179
179
|
onKeyDown: (t) => {
|
|
180
|
-
let n =
|
|
181
|
-
n &&
|
|
180
|
+
let n = T(t.nativeEvent, e);
|
|
181
|
+
n && D(n);
|
|
182
182
|
}
|
|
183
183
|
})
|
|
184
184
|
}) }),
|
|
185
185
|
/* @__PURE__ */ J(Ye, {
|
|
186
|
-
entries:
|
|
186
|
+
entries: k,
|
|
187
187
|
onSelect: i
|
|
188
188
|
}),
|
|
189
|
-
p && !
|
|
189
|
+
p && !k.length && /* @__PURE__ */ J("div", {
|
|
190
190
|
role: "group",
|
|
191
|
-
className:
|
|
191
|
+
className: b.empty(),
|
|
192
192
|
children: /* @__PURE__ */ J("span", {
|
|
193
193
|
role: "status",
|
|
194
|
-
children:
|
|
194
|
+
children: x.common.noResults
|
|
195
195
|
})
|
|
196
196
|
})
|
|
197
197
|
]
|
|
@@ -200,7 +200,7 @@ function qe({ classes: t, items: r, onSelect: i, onCheckedChange: a, onValueChan
|
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
202
|
function Je({ item: e, shortcut: t }) {
|
|
203
|
-
let r =
|
|
203
|
+
let r = be(We), i = n("menu", w)();
|
|
204
204
|
if (r?.renderItem) return r.renderItem(e);
|
|
205
205
|
let a = e.icon;
|
|
206
206
|
return /* @__PURE__ */ Y(q, { children: [
|
|
@@ -220,7 +220,7 @@ function Je({ item: e, shortcut: t }) {
|
|
|
220
220
|
] });
|
|
221
221
|
}
|
|
222
222
|
function Ye({ entries: e, onSelect: t }) {
|
|
223
|
-
let r = n("menu",
|
|
223
|
+
let r = n("menu", w), i = r(), a = be(We);
|
|
224
224
|
return e.map((e, n) => {
|
|
225
225
|
if ("type" in e) return e.type === "separator" ? /* @__PURE__ */ J(X.Separator, { className: i.separator() }, `separator-${n}`) : e.type === "checkbox" ? /* @__PURE__ */ Y(X.CheckboxItem, {
|
|
226
226
|
value: e.value,
|
|
@@ -231,7 +231,7 @@ function Ye({ entries: e, onSelect: t }) {
|
|
|
231
231
|
className: i.item(),
|
|
232
232
|
children: [/* @__PURE__ */ J("span", {
|
|
233
233
|
className: i.indicator(),
|
|
234
|
-
children: /* @__PURE__ */ J(X.ItemIndicator, { children: /* @__PURE__ */ J(
|
|
234
|
+
children: /* @__PURE__ */ J(X.ItemIndicator, { children: /* @__PURE__ */ J(de, {
|
|
235
235
|
className: i.indicatorIcon(),
|
|
236
236
|
"aria-hidden": "true"
|
|
237
237
|
}) })
|
|
@@ -249,7 +249,7 @@ function Ye({ entries: e, onSelect: t }) {
|
|
|
249
249
|
className: i.item(),
|
|
250
250
|
children: [/* @__PURE__ */ J("span", {
|
|
251
251
|
className: i.indicator(),
|
|
252
|
-
children: /* @__PURE__ */ J(X.ItemIndicator, { children: /* @__PURE__ */ J(
|
|
252
|
+
children: /* @__PURE__ */ J(X.ItemIndicator, { children: /* @__PURE__ */ J(W, {
|
|
253
253
|
className: i.indicatorDot(),
|
|
254
254
|
"aria-hidden": "true"
|
|
255
255
|
}) })
|
|
@@ -301,7 +301,7 @@ function Ye({ entries: e, onSelect: t }) {
|
|
|
301
301
|
closeOnSelect: e.closeOnSelect,
|
|
302
302
|
asChild: !0,
|
|
303
303
|
children: /* @__PURE__ */ J(t, {
|
|
304
|
-
...
|
|
304
|
+
...S(e.href, e.to),
|
|
305
305
|
className: r({ danger: e.danger }).item(),
|
|
306
306
|
children: /* @__PURE__ */ J(Je, {
|
|
307
307
|
item: e,
|
|
@@ -310,7 +310,7 @@ function Ye({ entries: e, onSelect: t }) {
|
|
|
310
310
|
})
|
|
311
311
|
}, e.value);
|
|
312
312
|
}
|
|
313
|
-
return /* @__PURE__ */ J(
|
|
313
|
+
return /* @__PURE__ */ J(ve, { children: /* @__PURE__ */ J(X.Item, {
|
|
314
314
|
value: e.value,
|
|
315
315
|
disabled: e.disabled,
|
|
316
316
|
closeOnSelect: e.closeOnSelect,
|
|
@@ -324,9 +324,9 @@ function Ye({ entries: e, onSelect: t }) {
|
|
|
324
324
|
}
|
|
325
325
|
//#endregion
|
|
326
326
|
//#region src/components/Textarea/Textarea.tsx
|
|
327
|
-
function Xe({ classes: t, 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, className: g, style: _, onInput: v, onChange:
|
|
328
|
-
let
|
|
329
|
-
let e =
|
|
327
|
+
function Xe({ classes: t, 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, className: g, style: _, onInput: v, onChange: ee, ...y }) {
|
|
328
|
+
let b = n("textarea", F, t), x = n("textareaParts", ie, t), S = e(), C = Ae(), w = r(), T = o || !!C?.invalid, E = !T && (s || w.success), te = c || !!C?.disabled, D = !!y.readOnly || !!C?.readOnly, O = Ee(null), k = y.maxLength && y.maxLength > 0 ? y.maxLength : void 0, A = f && k !== void 0, ne = p || m || E, j = A || p || m, [M, N] = K(() => String(y.defaultValue ?? "").length), re = y.value === void 0 ? M : String(y.value ?? "").length, I = () => {
|
|
329
|
+
let e = O.current;
|
|
330
330
|
if (!l || !e) return;
|
|
331
331
|
e.style.height = "auto";
|
|
332
332
|
let t = e.offsetHeight - e.clientHeight, n = e.scrollHeight + t;
|
|
@@ -336,75 +336,75 @@ function Xe({ classes: t, size: a, invalid: o = !1, success: s = !1, disabled: c
|
|
|
336
336
|
}
|
|
337
337
|
e.style.height = `${n}px`;
|
|
338
338
|
};
|
|
339
|
-
|
|
340
|
-
let ae =
|
|
341
|
-
|
|
342
|
-
let
|
|
343
|
-
|
|
344
|
-
},
|
|
345
|
-
let e =
|
|
346
|
-
e && (
|
|
347
|
-
},
|
|
348
|
-
...
|
|
349
|
-
ref:
|
|
350
|
-
rows:
|
|
351
|
-
className:
|
|
339
|
+
we(I);
|
|
340
|
+
let ae = Se(), [oe, se] = K(""), L = Ee(void 0);
|
|
341
|
+
xe(() => () => clearTimeout(L.current), []);
|
|
342
|
+
let ce = (e) => {
|
|
343
|
+
A && (clearTimeout(L.current), L.current = setTimeout(() => se(S.textarea.remaining(k - e, k)), 1e3));
|
|
344
|
+
}, le = () => {
|
|
345
|
+
let e = O.current;
|
|
346
|
+
e && (P(e), e.focus());
|
|
347
|
+
}, R = /* @__PURE__ */ J(ke.Textarea, {
|
|
348
|
+
...y,
|
|
349
|
+
ref: O,
|
|
350
|
+
rows: y.rows ?? u,
|
|
351
|
+
className: b({
|
|
352
352
|
size: a,
|
|
353
|
-
invalid:
|
|
354
|
-
success:
|
|
355
|
-
disabled:
|
|
353
|
+
invalid: T,
|
|
354
|
+
success: E,
|
|
355
|
+
disabled: te,
|
|
356
356
|
autoResize: l,
|
|
357
|
-
hasTrailing:
|
|
358
|
-
class:
|
|
357
|
+
hasTrailing: j ? ne : void 0,
|
|
358
|
+
class: j ? void 0 : g
|
|
359
359
|
}),
|
|
360
|
-
style:
|
|
361
|
-
disabled:
|
|
362
|
-
"aria-invalid":
|
|
363
|
-
...
|
|
360
|
+
style: j ? void 0 : _,
|
|
361
|
+
disabled: te || void 0,
|
|
362
|
+
"aria-invalid": T || void 0,
|
|
363
|
+
...j ? {
|
|
364
364
|
"aria-describedby": [
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
365
|
+
C?.ariaDescribedby,
|
|
366
|
+
A && ae,
|
|
367
|
+
y["aria-describedby"]
|
|
368
368
|
].filter(Boolean).join(" ") || void 0,
|
|
369
369
|
"aria-busy": p || void 0
|
|
370
370
|
} : {},
|
|
371
371
|
onInput: (e) => {
|
|
372
|
-
|
|
372
|
+
I(), v?.(e);
|
|
373
373
|
},
|
|
374
374
|
onChange: (e) => {
|
|
375
|
-
|
|
375
|
+
N(e.currentTarget.value.length), ce(e.currentTarget.value.length), ee?.(e);
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
|
-
if (!
|
|
379
|
-
let
|
|
378
|
+
if (!j) return R;
|
|
379
|
+
let z = x();
|
|
380
380
|
return /* @__PURE__ */ Y("div", {
|
|
381
|
-
className:
|
|
381
|
+
className: z.base({ class: g }),
|
|
382
382
|
style: _,
|
|
383
383
|
children: [
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
className:
|
|
384
|
+
R,
|
|
385
|
+
ne && /* @__PURE__ */ J("div", {
|
|
386
|
+
className: z.trailing(),
|
|
387
387
|
children: /* @__PURE__ */ J(i, {
|
|
388
388
|
loading: p,
|
|
389
|
-
clear: m &&
|
|
390
|
-
clearLabel: h ??
|
|
391
|
-
onClear:
|
|
392
|
-
success:
|
|
389
|
+
clear: m && re > 0 && !te && !D,
|
|
390
|
+
clearLabel: h ?? S.field.clear,
|
|
391
|
+
onClear: le,
|
|
392
|
+
success: E,
|
|
393
393
|
classes: {
|
|
394
|
-
spinner:
|
|
395
|
-
clear:
|
|
396
|
-
clearIcon:
|
|
397
|
-
statusIcon:
|
|
394
|
+
spinner: z.spinner(),
|
|
395
|
+
clear: z.clear(),
|
|
396
|
+
clearIcon: z.clearIcon(),
|
|
397
|
+
statusIcon: z.statusIcon()
|
|
398
398
|
}
|
|
399
399
|
})
|
|
400
400
|
}),
|
|
401
|
-
|
|
401
|
+
A && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
|
|
402
402
|
id: ae,
|
|
403
|
-
className:
|
|
403
|
+
className: z.counter(),
|
|
404
404
|
"aria-hidden": "true",
|
|
405
|
-
children:
|
|
405
|
+
children: S.textarea.counter(re, k)
|
|
406
406
|
}), /* @__PURE__ */ J("span", {
|
|
407
|
-
className:
|
|
407
|
+
className: z.status(),
|
|
408
408
|
role: "status",
|
|
409
409
|
children: oe
|
|
410
410
|
})] })
|
|
@@ -413,128 +413,128 @@ function Xe({ classes: t, size: a, invalid: o = !1, success: s = !1, disabled: c
|
|
|
413
413
|
}
|
|
414
414
|
//#endregion
|
|
415
415
|
//#region src/components/Pagination/Pagination.tsx
|
|
416
|
-
function Ze({ classes: t, 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:
|
|
417
|
-
let
|
|
418
|
-
|
|
419
|
-
let
|
|
420
|
-
start: Math.min((e - 1) *
|
|
421
|
-
end: Math.min(e *
|
|
416
|
+
function Ze({ classes: t, 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: ee, getPageHref: y, translations: b, className: x, ...S }) {
|
|
417
|
+
let C = n("pagination", k, t)({ responsive: _ === "auto" }), w = e(), [T, E] = K(i), [te, D] = K(i);
|
|
418
|
+
te !== i && (D(i), E(i));
|
|
419
|
+
let A = (e) => ({
|
|
420
|
+
start: Math.min((e - 1) * T + 1, r),
|
|
421
|
+
end: Math.min(e * T, r),
|
|
422
422
|
count: r
|
|
423
423
|
});
|
|
424
|
-
if (
|
|
425
|
-
let
|
|
424
|
+
if (ee && r <= T) return null;
|
|
425
|
+
let ne = y ? "a" : "button", j = (e, t, n = !1) => ye(ne, {
|
|
426
426
|
className: e,
|
|
427
|
-
...
|
|
427
|
+
...y && n ? {
|
|
428
428
|
role: "link",
|
|
429
429
|
"aria-disabled": "true"
|
|
430
430
|
} : {}
|
|
431
|
-
}, t),
|
|
432
|
-
if (!t || t ===
|
|
433
|
-
let n =
|
|
434
|
-
|
|
435
|
-
},
|
|
431
|
+
}, t), M = (e, t) => {
|
|
432
|
+
if (!t || t === T) return;
|
|
433
|
+
let n = O(e.page, T, t);
|
|
434
|
+
E(t), s?.(t), requestAnimationFrame(() => e.setPage(n));
|
|
435
|
+
}, N = (e, t) => {
|
|
436
436
|
if (e.key !== "Enter") return;
|
|
437
437
|
let n = e.currentTarget, r = Number.parseInt(n.value, 10);
|
|
438
438
|
Number.isNaN(r) || (e.preventDefault(), t.setPage(Math.min(Math.max(r, 1), t.totalPages)), n.value = "");
|
|
439
439
|
};
|
|
440
|
-
return /* @__PURE__ */ J(
|
|
441
|
-
...
|
|
442
|
-
className:
|
|
440
|
+
return /* @__PURE__ */ J(je.Root, {
|
|
441
|
+
...S,
|
|
442
|
+
className: C.base({ class: x }),
|
|
443
443
|
count: r,
|
|
444
|
-
pageSize:
|
|
444
|
+
pageSize: T,
|
|
445
445
|
page: c,
|
|
446
446
|
defaultPage: l,
|
|
447
447
|
onPageChange: (e) => u?.(e.page),
|
|
448
448
|
siblingCount: d,
|
|
449
449
|
boundaryCount: f,
|
|
450
|
-
type:
|
|
451
|
-
getPageUrl:
|
|
450
|
+
type: y ? "link" : "button",
|
|
451
|
+
getPageUrl: y ? (e) => y(e.page) : void 0,
|
|
452
452
|
translations: {
|
|
453
|
-
...
|
|
454
|
-
...
|
|
453
|
+
...w.pagination,
|
|
454
|
+
...b
|
|
455
455
|
},
|
|
456
|
-
children: /* @__PURE__ */ J(
|
|
456
|
+
children: /* @__PURE__ */ J(je.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [
|
|
457
457
|
p && /* @__PURE__ */ J("span", {
|
|
458
|
-
className:
|
|
458
|
+
className: C.summary(),
|
|
459
459
|
"aria-live": "polite",
|
|
460
|
-
children: (m ??
|
|
460
|
+
children: (m ?? w.pagination.summary)(A(e.page))
|
|
461
461
|
}),
|
|
462
462
|
!!h?.length && /* @__PURE__ */ Y("div", {
|
|
463
|
-
className:
|
|
463
|
+
className: C.pageSize(),
|
|
464
464
|
children: [/* @__PURE__ */ J("span", {
|
|
465
465
|
"aria-hidden": "true",
|
|
466
|
-
children:
|
|
466
|
+
children: w.pagination.pageSize
|
|
467
467
|
}), /* @__PURE__ */ J(o, {
|
|
468
|
-
className:
|
|
468
|
+
className: C.pageSizeSelect(),
|
|
469
469
|
size: "sm",
|
|
470
470
|
items: h.map((e) => ({
|
|
471
471
|
value: e,
|
|
472
472
|
label: String(e)
|
|
473
473
|
})),
|
|
474
|
-
value:
|
|
475
|
-
"aria-label":
|
|
476
|
-
onValueChange: (t) =>
|
|
474
|
+
value: T,
|
|
475
|
+
"aria-label": w.pagination.pageSize,
|
|
476
|
+
onValueChange: (t) => M(e, t)
|
|
477
477
|
})]
|
|
478
478
|
}),
|
|
479
479
|
/* @__PURE__ */ Y("div", {
|
|
480
|
-
className:
|
|
480
|
+
className: C.list(),
|
|
481
481
|
children: [
|
|
482
|
-
v && /* @__PURE__ */ J(
|
|
482
|
+
v && /* @__PURE__ */ J(je.FirstTrigger, {
|
|
483
483
|
asChild: !0,
|
|
484
|
-
children:
|
|
485
|
-
className:
|
|
484
|
+
children: j(C.trigger(), /* @__PURE__ */ J(H, {
|
|
485
|
+
className: C.triggerIcon(),
|
|
486
486
|
"aria-hidden": "true"
|
|
487
487
|
}), e.page === 1)
|
|
488
488
|
}),
|
|
489
|
-
/* @__PURE__ */ J(
|
|
489
|
+
/* @__PURE__ */ J(je.PrevTrigger, {
|
|
490
490
|
asChild: !0,
|
|
491
|
-
children:
|
|
492
|
-
className:
|
|
491
|
+
children: j(C.trigger(), /* @__PURE__ */ J(pe, {
|
|
492
|
+
className: C.triggerIcon(),
|
|
493
493
|
"aria-hidden": "true"
|
|
494
494
|
}), e.page === 1)
|
|
495
495
|
}),
|
|
496
496
|
_ !== "full" && /* @__PURE__ */ J("span", {
|
|
497
|
-
className:
|
|
498
|
-
children:
|
|
497
|
+
className: C.compact(),
|
|
498
|
+
children: w.pagination.compact(e.page, e.totalPages)
|
|
499
499
|
}),
|
|
500
|
-
_ !== "compact" && e.pages.map((e, t) => e.type === "page" ? /* @__PURE__ */ J(
|
|
500
|
+
_ !== "compact" && e.pages.map((e, t) => e.type === "page" ? /* @__PURE__ */ J(je.Item, {
|
|
501
501
|
...e,
|
|
502
502
|
asChild: !0,
|
|
503
|
-
children:
|
|
504
|
-
}, t) : /* @__PURE__ */ J(
|
|
503
|
+
children: j(C.item(), e.value)
|
|
504
|
+
}, t) : /* @__PURE__ */ J(je.Ellipsis, {
|
|
505
505
|
index: t,
|
|
506
|
-
className:
|
|
506
|
+
className: C.ellipsis(),
|
|
507
507
|
"aria-hidden": "true",
|
|
508
508
|
children: "…"
|
|
509
509
|
}, t)),
|
|
510
|
-
/* @__PURE__ */ J(
|
|
510
|
+
/* @__PURE__ */ J(je.NextTrigger, {
|
|
511
511
|
asChild: !0,
|
|
512
|
-
children:
|
|
513
|
-
className:
|
|
512
|
+
children: j(C.trigger(), /* @__PURE__ */ J(B, {
|
|
513
|
+
className: C.triggerIcon(),
|
|
514
514
|
"aria-hidden": "true"
|
|
515
515
|
}), e.page === e.totalPages)
|
|
516
516
|
}),
|
|
517
|
-
v && /* @__PURE__ */ J(
|
|
517
|
+
v && /* @__PURE__ */ J(je.LastTrigger, {
|
|
518
518
|
asChild: !0,
|
|
519
|
-
children:
|
|
520
|
-
className:
|
|
519
|
+
children: j(C.trigger(), /* @__PURE__ */ J(U, {
|
|
520
|
+
className: C.triggerIcon(),
|
|
521
521
|
"aria-hidden": "true"
|
|
522
522
|
}), e.page === e.totalPages)
|
|
523
523
|
})
|
|
524
524
|
]
|
|
525
525
|
}),
|
|
526
526
|
g && /* @__PURE__ */ Y("div", {
|
|
527
|
-
className:
|
|
527
|
+
className: C.jumper(),
|
|
528
528
|
children: [/* @__PURE__ */ J("span", {
|
|
529
529
|
"aria-hidden": "true",
|
|
530
|
-
children:
|
|
530
|
+
children: w.pagination.jumper
|
|
531
531
|
}), /* @__PURE__ */ J(a, {
|
|
532
|
-
className:
|
|
532
|
+
className: C.jumperInput(),
|
|
533
533
|
size: "sm",
|
|
534
534
|
inputMode: "numeric",
|
|
535
535
|
autoComplete: "off",
|
|
536
|
-
"aria-label":
|
|
537
|
-
onKeyDown: (t) =>
|
|
536
|
+
"aria-label": w.pagination.jumper,
|
|
537
|
+
onKeyDown: (t) => N(t, e)
|
|
538
538
|
})]
|
|
539
539
|
})
|
|
540
540
|
] }) })
|
|
@@ -543,7 +543,7 @@ function Ze({ classes: t, count: r, pageSize: i = 10, onPageSizeChange: s, page:
|
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region src/components/Skeleton/Skeleton.tsx
|
|
545
545
|
function Qe({ classes: e, shape: t, width: r, height: i, className: a, style: o, ...s }) {
|
|
546
|
-
let c = n("skeleton",
|
|
546
|
+
let c = n("skeleton", re, e);
|
|
547
547
|
return /* @__PURE__ */ J("span", {
|
|
548
548
|
"aria-hidden": "true",
|
|
549
549
|
...s,
|
|
@@ -565,17 +565,17 @@ function et(e, t, n) {
|
|
|
565
565
|
return t ? e.includes("T") ? Re(e.slice(0, 16)) : Re(`${e}T${n === "max" ? "23:59" : "00:00"}`) : Le(e.slice(0, 10));
|
|
566
566
|
}
|
|
567
567
|
function tt(e, t, n, r) {
|
|
568
|
-
let i = typeof e == "string" && !e.includes("T"), a =
|
|
568
|
+
let i = typeof e == "string" && !e.includes("T"), a = ce(e, t && !i, n);
|
|
569
569
|
return a ? et(a, t, r) : void 0;
|
|
570
570
|
}
|
|
571
571
|
var nt = (e, t, n, r) => v($e(e, t), {
|
|
572
572
|
valueType: n,
|
|
573
573
|
timeZone: r,
|
|
574
574
|
withTime: t
|
|
575
|
-
}), rt = (e, t, n) =>
|
|
575
|
+
}), rt = (e, t, n) => ce(e, t, n);
|
|
576
576
|
function it(e, t) {
|
|
577
577
|
if (!e && !t?.length) return;
|
|
578
|
-
let n = new Set(t?.map((e) =>
|
|
578
|
+
let n = new Set(t?.map((e) => ce(e, !1)));
|
|
579
579
|
return (t) => {
|
|
580
580
|
let r = $e(t, !1);
|
|
581
581
|
return n.has(r) || !!e?.(r);
|
|
@@ -595,61 +595,61 @@ function st(e) {
|
|
|
595
595
|
let [t = 0, n = 0, r = 0] = e.split(":").map(Number);
|
|
596
596
|
return new Pe(ot.year, ot.month, ot.day, t, n, r);
|
|
597
597
|
}
|
|
598
|
-
var ct = (e) => String(e).padStart(2, "0"), lt = (e, t = !1) => e && "hour" in e ? `${ct(e.hour)}:${ct(e.minute)}${t ? `:${ct(e.second)}` : ""}` : null, ut = (e, t, n, r = !1) =>
|
|
598
|
+
var ct = (e) => String(e).padStart(2, "0"), lt = (e, t = !1) => e && "hour" in e ? `${ct(e.hour)}:${ct(e.minute)}${t ? `:${ct(e.second)}` : ""}` : null, ut = (e, t, n, r = !1) => I(e, t, n, r);
|
|
599
599
|
//#endregion
|
|
600
600
|
//#region src/components/DatePicker/DatePickerBase.tsx
|
|
601
|
-
function dt({ mode: t, 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: g,
|
|
602
|
-
let k = n("datePicker", h, b)({ size: S }), A = e(),
|
|
601
|
+
function dt({ mode: t, 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: g, placeholder: _, className: v, style: ee, period: y, classes: b, presets: x, size: S, hideClear: w, firstDayOfWeek: T, timeZone: E, showTimeZone: te, responsive: D, ...O }) {
|
|
602
|
+
let k = n("datePicker", h, b)({ size: S }), A = e(), N = Se(), P = Ae(), re = {
|
|
603
603
|
disabled: u ?? P?.disabled,
|
|
604
604
|
readOnly: d ?? P?.readOnly,
|
|
605
605
|
invalid: f ?? P?.invalid,
|
|
606
606
|
required: p ?? P?.required
|
|
607
|
-
}, F = t === "range",
|
|
607
|
+
}, F = t === "range", ie = t === "multiple", I = F ? [0, 1] : [0], se = [A.dateRange.start, A.dateRange.end], L = P ? { label: (e) => F ? `${P.ids.label} ${N}r${e}` : P.ids.label } : void 0, ce = (e) => P ? void 0 : F ? [g, se[e]].filter(Boolean).join(", ") : g, le = F ? {
|
|
608
608
|
...A.datePicker,
|
|
609
609
|
clearTrigger: A.dateRange.clearTrigger
|
|
610
|
-
} : A.datePicker,
|
|
610
|
+
} : A.datePicker, R = y ? new Fe(l, y === "month" ? {
|
|
611
611
|
month: "2-digit",
|
|
612
612
|
year: "numeric"
|
|
613
|
-
} : { year: "numeric" }) : void 0,
|
|
614
|
-
if (
|
|
615
|
-
let e = r[0], t = e ?
|
|
613
|
+
} : { year: "numeric" }) : void 0, de = T ?? C(l).firstDay, fe;
|
|
614
|
+
if (te && E) {
|
|
615
|
+
let e = r[0], t = e ? z(e.toString().slice(0, 16), E) : /* @__PURE__ */ new Date();
|
|
616
616
|
fe = {
|
|
617
617
|
short: ae(E, l, t),
|
|
618
618
|
long: A.calendar.timeZone(oe(E, l, t))
|
|
619
619
|
};
|
|
620
620
|
}
|
|
621
|
-
let pe = [P?.ariaDescribedby, fe ? `${
|
|
621
|
+
let pe = [P?.ariaDescribedby, fe ? `${N}tz` : void 0].filter(Boolean).join(" ") || void 0, B = (e) => I.every((t) => e.getSegments({ index: t }).every((e) => e.type === "literal" || e.isPlaceholder)), V = (e) => !!_ && B(e) && !e.focused, H = (e) => _ && B(e) ? [pe, `${N}ph`].filter(Boolean).join(" ") : pe, U = (e) => i(a ? e.map((e, t) => at(e, r[t])) : e), W = (e, t) => {
|
|
622
622
|
if (y) return !1;
|
|
623
623
|
if (F) {
|
|
624
|
-
let t =
|
|
624
|
+
let t = j(e, l, a);
|
|
625
625
|
if (t) return i([et(t.start, a), et(t.end, a)]), !0;
|
|
626
626
|
}
|
|
627
|
-
let n =
|
|
627
|
+
let n = ne(e, l, a);
|
|
628
628
|
if (!n) return !1;
|
|
629
629
|
let o = [...r];
|
|
630
630
|
return o[t] = et(n, a), i(o.filter(Boolean)), !0;
|
|
631
|
-
},
|
|
631
|
+
}, me = r.length ? r.length > 3 ? M(A.calendar.datesSelected, r.length, l) : r.map((e) => new Fe(l, {
|
|
632
632
|
day: "2-digit",
|
|
633
633
|
month: "2-digit",
|
|
634
634
|
year: "numeric",
|
|
635
635
|
timeZone: "UTC"
|
|
636
|
-
}).format(e.toDate("UTC"))).join(", ") : A.calendar.noDates;
|
|
637
|
-
return /* @__PURE__ */ Y(
|
|
638
|
-
className: k.base({ class:
|
|
639
|
-
style:
|
|
636
|
+
}).format(e.toDate("UTC"))).join(", ") : _ ?? A.calendar.noDates;
|
|
637
|
+
return /* @__PURE__ */ Y(Q.Root, {
|
|
638
|
+
className: k.base({ class: v }),
|
|
639
|
+
style: ee,
|
|
640
640
|
value: r,
|
|
641
|
-
onValueChange: (e) =>
|
|
641
|
+
onValueChange: (e) => U(e.value),
|
|
642
642
|
selectionMode: t,
|
|
643
643
|
min: o,
|
|
644
644
|
max: s,
|
|
645
645
|
isDateUnavailable: c,
|
|
646
646
|
locale: l,
|
|
647
|
-
startOfWeek:
|
|
647
|
+
startOfWeek: de,
|
|
648
648
|
minView: y,
|
|
649
649
|
defaultView: y,
|
|
650
650
|
numOfMonths: O.numberOfMonths,
|
|
651
651
|
timeZone: E,
|
|
652
|
-
...
|
|
652
|
+
...re,
|
|
653
653
|
positioning: {
|
|
654
654
|
placement: "bottom-start",
|
|
655
655
|
gutter: 4
|
|
@@ -657,77 +657,84 @@ function dt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
657
657
|
translations: le,
|
|
658
658
|
lazyMount: !0,
|
|
659
659
|
unmountOnExit: !0,
|
|
660
|
-
children: [/* @__PURE__ */ Y(
|
|
660
|
+
children: [/* @__PURE__ */ Y(Q.Control, {
|
|
661
661
|
className: k.control(),
|
|
662
662
|
children: [
|
|
663
|
-
|
|
664
|
-
id: `${
|
|
663
|
+
ie ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
|
|
664
|
+
id: `${N}v`,
|
|
665
665
|
className: k.multiValue(),
|
|
666
666
|
"data-placeholder": r.length ? void 0 : "",
|
|
667
|
-
children:
|
|
667
|
+
children: me
|
|
668
668
|
}), m && r.map((e, t) => /* @__PURE__ */ J("input", {
|
|
669
669
|
type: "hidden",
|
|
670
670
|
name: `${m}[${t}]`,
|
|
671
671
|
value: e.toString()
|
|
672
|
-
}, e.toString()))] }) : /* @__PURE__ */ Y(
|
|
672
|
+
}, e.toString()))] }) : /* @__PURE__ */ Y($.Root, {
|
|
673
673
|
className: k.dateInput(),
|
|
674
|
-
ids:
|
|
674
|
+
ids: L,
|
|
675
675
|
value: r,
|
|
676
676
|
onValueChange: (e) => i(e.value),
|
|
677
677
|
selectionMode: F ? "range" : "single",
|
|
678
678
|
granularity: a ? "minute" : "day",
|
|
679
|
-
formatter:
|
|
679
|
+
formatter: R,
|
|
680
680
|
min: o,
|
|
681
681
|
max: s,
|
|
682
682
|
isDateUnavailable: c,
|
|
683
683
|
locale: l,
|
|
684
684
|
shouldForceLeadingZeros: !0,
|
|
685
685
|
name: m,
|
|
686
|
-
...
|
|
686
|
+
...re,
|
|
687
687
|
translations: A.dateInput,
|
|
688
|
-
children: [/* @__PURE__ */ J(
|
|
688
|
+
children: [/* @__PURE__ */ J($.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J($.Control, {
|
|
689
689
|
className: k.dateControl(),
|
|
690
|
-
|
|
691
|
-
|
|
690
|
+
"data-placeholder-shown": V(e) || void 0,
|
|
691
|
+
children: I.map((t) => /* @__PURE__ */ Y(ve, { children: [
|
|
692
|
+
t === 1 && /* @__PURE__ */ J("span", {
|
|
692
693
|
className: k.rangeSeparator(),
|
|
693
694
|
"aria-hidden": "true",
|
|
694
695
|
children: "–"
|
|
695
696
|
}),
|
|
696
697
|
F && P && /* @__PURE__ */ J("span", {
|
|
697
|
-
id: `${
|
|
698
|
+
id: `${N}r${t}`,
|
|
698
699
|
className: k.rangeLabel(),
|
|
699
|
-
children:
|
|
700
|
+
children: se[t]
|
|
700
701
|
}),
|
|
701
702
|
/* @__PURE__ */ J(ft, {
|
|
702
|
-
index:
|
|
703
|
-
label: ce(
|
|
704
|
-
describedby:
|
|
705
|
-
paste: y ? void 0 :
|
|
703
|
+
index: t,
|
|
704
|
+
label: ce(t),
|
|
705
|
+
describedby: H(e),
|
|
706
|
+
paste: y ? void 0 : W,
|
|
706
707
|
size: S
|
|
707
708
|
})
|
|
708
|
-
] },
|
|
709
|
-
}),
|
|
709
|
+
] }, t))
|
|
710
|
+
}), _ && B(e) && /* @__PURE__ */ J("span", {
|
|
711
|
+
id: `${N}ph`,
|
|
712
|
+
className: k.placeholder(),
|
|
713
|
+
"data-hidden": V(e) ? void 0 : "",
|
|
714
|
+
onClick: () => e.focus(),
|
|
715
|
+
children: _
|
|
716
|
+
})] }) }), I.map((e) => /* @__PURE__ */ J($.HiddenInput, { index: e }, e))]
|
|
710
717
|
}),
|
|
711
718
|
fe && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
|
|
712
719
|
className: k.timeZone(),
|
|
713
720
|
"aria-hidden": "true",
|
|
714
721
|
children: fe.short
|
|
715
722
|
}), /* @__PURE__ */ J("span", {
|
|
716
|
-
id: `${
|
|
723
|
+
id: `${N}tz`,
|
|
717
724
|
hidden: !0,
|
|
718
725
|
children: fe.long
|
|
719
726
|
})] }),
|
|
720
|
-
!
|
|
727
|
+
!w && /* @__PURE__ */ J(Q.ClearTrigger, {
|
|
721
728
|
className: k.clear(),
|
|
722
|
-
children: /* @__PURE__ */ J(
|
|
729
|
+
children: /* @__PURE__ */ J(_e, {
|
|
723
730
|
className: k.clearIcon(),
|
|
724
731
|
"aria-hidden": "true"
|
|
725
732
|
})
|
|
726
733
|
}),
|
|
727
|
-
/* @__PURE__ */ J(
|
|
734
|
+
/* @__PURE__ */ J(Q.Trigger, {
|
|
728
735
|
className: k.trigger(),
|
|
729
|
-
...
|
|
730
|
-
children: /* @__PURE__ */ J(
|
|
736
|
+
...ie ? { "aria-describedby": `${N}v` } : {},
|
|
737
|
+
children: /* @__PURE__ */ J(ue, {
|
|
731
738
|
className: k.triggerIcon(),
|
|
732
739
|
"aria-hidden": "true"
|
|
733
740
|
})
|
|
@@ -735,7 +742,7 @@ function dt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
735
742
|
]
|
|
736
743
|
}), /* @__PURE__ */ J(mt, {
|
|
737
744
|
presets: x,
|
|
738
|
-
responsive:
|
|
745
|
+
responsive: D,
|
|
739
746
|
timeZone: E,
|
|
740
747
|
...O
|
|
741
748
|
})]
|
|
@@ -743,7 +750,7 @@ function dt({ mode: t, dates: r, onChange: i, withTime: a, min: o, max: s, isDat
|
|
|
743
750
|
}
|
|
744
751
|
function ft({ index: t, label: r, describedby: i, paste: a, size: o }) {
|
|
745
752
|
let s = n("datePicker", h)({ size: o }), c = e();
|
|
746
|
-
return /* @__PURE__ */ J(
|
|
753
|
+
return /* @__PURE__ */ J($.SegmentGroup, {
|
|
747
754
|
index: t,
|
|
748
755
|
className: s.segments(),
|
|
749
756
|
"aria-label": r,
|
|
@@ -751,7 +758,7 @@ function ft({ index: t, label: r, describedby: i, paste: a, size: o }) {
|
|
|
751
758
|
...a ? { onPasteCapture: (e) => {
|
|
752
759
|
a?.(e.clipboardData.getData("text/plain"), t) && (e.preventDefault(), e.stopPropagation());
|
|
753
760
|
} } : {},
|
|
754
|
-
children: /* @__PURE__ */ J(
|
|
761
|
+
children: /* @__PURE__ */ J($.Context, { children: (e) => e.getSegments({ index: t }).map((e, t) => /* @__PURE__ */ J($.Segment, {
|
|
755
762
|
segment: e,
|
|
756
763
|
className: s.segment(),
|
|
757
764
|
"aria-label": c.dateSegments[e.type]
|
|
@@ -759,8 +766,8 @@ function ft({ index: t, label: r, describedby: i, paste: a, size: o }) {
|
|
|
759
766
|
});
|
|
760
767
|
}
|
|
761
768
|
function pt(e) {
|
|
762
|
-
let [t, n] =
|
|
763
|
-
return
|
|
769
|
+
let [t, n] = K(!1);
|
|
770
|
+
return xe(() => {
|
|
764
771
|
if (!e || typeof window.matchMedia != "function") return;
|
|
765
772
|
let t = window.matchMedia("(max-width: 639.98px)"), r = () => n(t.matches);
|
|
766
773
|
return r(), t.addEventListener("change", r), () => t.removeEventListener("change", r);
|
|
@@ -768,12 +775,12 @@ function pt(e) {
|
|
|
768
775
|
}
|
|
769
776
|
function mt({ presets: e, responsive: t, ...r }) {
|
|
770
777
|
let i = n("datePicker", h), a = i(), o = pt(t), s = (r.numberOfMonths ?? 1) > 1;
|
|
771
|
-
return o ? /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J(
|
|
778
|
+
return o ? /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J(Q.Context, { children: (e) => e.open ? /* @__PURE__ */ J("div", {
|
|
772
779
|
className: a.backdrop(),
|
|
773
780
|
"aria-hidden": "true"
|
|
774
781
|
}) : null }), /* @__PURE__ */ J("div", {
|
|
775
782
|
className: a.sheet(),
|
|
776
|
-
children: /* @__PURE__ */ J(
|
|
783
|
+
children: /* @__PURE__ */ J(Q.Content, {
|
|
777
784
|
className: i({
|
|
778
785
|
multiMonth: s,
|
|
779
786
|
bottomSheet: !0
|
|
@@ -783,7 +790,7 @@ function mt({ presets: e, responsive: t, ...r }) {
|
|
|
783
790
|
...r
|
|
784
791
|
})
|
|
785
792
|
})
|
|
786
|
-
})] }) : /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(
|
|
793
|
+
})] }) : /* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(Q.Positioner, { children: /* @__PURE__ */ J(Q.Content, {
|
|
787
794
|
className: s ? i({ multiMonth: s }).content() : a.content(),
|
|
788
795
|
children: /* @__PURE__ */ J(gt, {
|
|
789
796
|
presets: e,
|
|
@@ -812,7 +819,7 @@ function gt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
812
819
|
};
|
|
813
820
|
}), v = (e) => {
|
|
814
821
|
if (e.selectionMode === "single") return e.selectToday();
|
|
815
|
-
let [t = 0, n = 1, r = 1] =
|
|
822
|
+
let [t = 0, n = 1, r = 1] = le(u).split("-").map(Number);
|
|
816
823
|
e.setFocusedValue(e.focusedValue.set({
|
|
817
824
|
year: t,
|
|
818
825
|
month: n,
|
|
@@ -820,9 +827,9 @@ function gt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
820
827
|
}));
|
|
821
828
|
};
|
|
822
829
|
return /* @__PURE__ */ Y(q, { children: [
|
|
823
|
-
/* @__PURE__ */ J(
|
|
830
|
+
/* @__PURE__ */ J(Q.View, {
|
|
824
831
|
view: "day",
|
|
825
|
-
children: /* @__PURE__ */ J(
|
|
832
|
+
children: /* @__PURE__ */ J(Q.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xt, {}), m > 1 ? /* @__PURE__ */ J("div", {
|
|
826
833
|
className: f.months(),
|
|
827
834
|
children: _(e).map((e) => /* @__PURE__ */ Y("div", {
|
|
828
835
|
className: f.month(),
|
|
@@ -840,31 +847,31 @@ function gt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
840
847
|
...g
|
|
841
848
|
})] }) })
|
|
842
849
|
}),
|
|
843
|
-
/* @__PURE__ */ J(
|
|
850
|
+
/* @__PURE__ */ J(Q.View, {
|
|
844
851
|
view: "month",
|
|
845
|
-
children: /* @__PURE__ */ J(
|
|
852
|
+
children: /* @__PURE__ */ J(Q.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xt, {}), /* @__PURE__ */ J(Q.Table, {
|
|
846
853
|
className: f.table(),
|
|
847
|
-
children: /* @__PURE__ */ J(
|
|
854
|
+
children: /* @__PURE__ */ J(Q.TableBody, { children: e.getMonthsGrid({
|
|
848
855
|
columns: 4,
|
|
849
856
|
format: "short"
|
|
850
|
-
}).map((e) => /* @__PURE__ */ J(
|
|
857
|
+
}).map((e) => /* @__PURE__ */ J(Q.TableRow, { children: e.map((e) => /* @__PURE__ */ J(Q.TableCell, {
|
|
851
858
|
value: e.value,
|
|
852
859
|
className: f.cell(),
|
|
853
|
-
children: /* @__PURE__ */ J(
|
|
860
|
+
children: /* @__PURE__ */ J(Q.TableCellTrigger, {
|
|
854
861
|
className: f.period(),
|
|
855
862
|
children: e.label
|
|
856
863
|
})
|
|
857
864
|
}, e.value)) }, e[0]?.value)) })
|
|
858
865
|
})] }) })
|
|
859
866
|
}),
|
|
860
|
-
/* @__PURE__ */ J(
|
|
867
|
+
/* @__PURE__ */ J(Q.View, {
|
|
861
868
|
view: "year",
|
|
862
|
-
children: /* @__PURE__ */ J(
|
|
869
|
+
children: /* @__PURE__ */ J(Q.Context, { children: (e) => /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(xt, {}), /* @__PURE__ */ J(Q.Table, {
|
|
863
870
|
className: f.table(),
|
|
864
|
-
children: /* @__PURE__ */ J(
|
|
871
|
+
children: /* @__PURE__ */ J(Q.TableBody, { children: e.getYearsGrid({ columns: 4 }).map((e) => /* @__PURE__ */ J(Q.TableRow, { children: e.map((e) => /* @__PURE__ */ J(Q.TableCell, {
|
|
865
872
|
value: e.value,
|
|
866
873
|
className: f.cell(),
|
|
867
|
-
children: /* @__PURE__ */ J(
|
|
874
|
+
children: /* @__PURE__ */ J(Q.TableCellTrigger, {
|
|
868
875
|
className: f.period(),
|
|
869
876
|
children: e.label
|
|
870
877
|
})
|
|
@@ -873,14 +880,14 @@ function gt({ presets: t, showWeekNumbers: r, numberOfMonths: i, showButtonBar:
|
|
|
873
880
|
}),
|
|
874
881
|
t?.length ? /* @__PURE__ */ J("div", {
|
|
875
882
|
className: f.presets(),
|
|
876
|
-
children: t.map((e) => /* @__PURE__ */ J(
|
|
883
|
+
children: t.map((e) => /* @__PURE__ */ J(Q.PresetTrigger, {
|
|
877
884
|
value: typeof e == "string" ? e : e.value,
|
|
878
885
|
className: f.preset(),
|
|
879
886
|
"aria-label": ht(e, p),
|
|
880
887
|
children: ht(e, p)
|
|
881
888
|
}, ht(e, p)))
|
|
882
889
|
}) : null,
|
|
883
|
-
a && /* @__PURE__ */ J(
|
|
890
|
+
a && /* @__PURE__ */ J(Q.Context, { children: (e) => /* @__PURE__ */ Y("div", {
|
|
884
891
|
className: f.buttonBar(),
|
|
885
892
|
children: [/* @__PURE__ */ J("button", {
|
|
886
893
|
type: "button",
|
|
@@ -902,7 +909,7 @@ function vt({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hide
|
|
|
902
909
|
let u = n("datePicker", h)({
|
|
903
910
|
plainToday: a,
|
|
904
911
|
hideOutsideDays: o
|
|
905
|
-
}), d = e(), f =
|
|
912
|
+
}), d = e(), f = Ne(), p = (e) => N(e.map(_t)), m = (e) => !!r && (e.month !== r.start.month || e.year !== r.start.year), g = (e) => {
|
|
906
913
|
let t = f.getDayTableCellState({
|
|
907
914
|
value: e,
|
|
908
915
|
visibleRange: r
|
|
@@ -913,7 +920,7 @@ function vt({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hide
|
|
|
913
920
|
selected: t.selected,
|
|
914
921
|
outside: t.outsideRange,
|
|
915
922
|
unavailable: t.unavailable || !!t.disabled,
|
|
916
|
-
weekend: s ? s.includes(
|
|
923
|
+
weekend: s ? s.includes(x(_t(e))) : t.weekend
|
|
917
924
|
};
|
|
918
925
|
}, _ = (e, t) => {
|
|
919
926
|
"key" in e && e.key !== "Enter" && e.key !== " " || f.selectionMode === "single" && f.getDayTableCellState({
|
|
@@ -921,38 +928,38 @@ function vt({ weeks: t, visibleRange: r, showWeekNumbers: i, plainToday: a, hide
|
|
|
921
928
|
visibleRange: r
|
|
922
929
|
}).selected && (e.preventDefault(), f.clearValue({ focus: !1 }));
|
|
923
930
|
}, v = (e) => ({
|
|
924
|
-
...s?.includes(
|
|
931
|
+
...s?.includes(x(_t(e))) ? { "data-weekend": "" } : {},
|
|
925
932
|
...c ? {
|
|
926
933
|
onClickCapture: (t) => _(t, e),
|
|
927
934
|
onKeyDownCapture: (t) => _(t, e)
|
|
928
935
|
} : {}
|
|
929
936
|
});
|
|
930
|
-
return /* @__PURE__ */ Y(
|
|
937
|
+
return /* @__PURE__ */ Y(Q.Table, {
|
|
931
938
|
className: u.table(),
|
|
932
|
-
children: [/* @__PURE__ */ J(
|
|
939
|
+
children: [/* @__PURE__ */ J(Q.TableHead, { children: /* @__PURE__ */ Y(Q.TableRow, { children: [i && /* @__PURE__ */ J("th", {
|
|
933
940
|
scope: "col",
|
|
934
941
|
className: u.weekNumberHeader(),
|
|
935
942
|
children: /* @__PURE__ */ J("abbr", {
|
|
936
943
|
title: d.datePicker.weekColumnHeader,
|
|
937
944
|
children: d.datePicker.weekColumnShort
|
|
938
945
|
})
|
|
939
|
-
}), f.weekDays.map((e) => /* @__PURE__ */ J(
|
|
946
|
+
}), f.weekDays.map((e) => /* @__PURE__ */ J(Q.TableHeader, {
|
|
940
947
|
className: u.columnHeader(),
|
|
941
948
|
children: /* @__PURE__ */ J("abbr", {
|
|
942
949
|
title: e.long,
|
|
943
950
|
children: e.short
|
|
944
951
|
})
|
|
945
|
-
}, e.long))] }) }), /* @__PURE__ */ J(
|
|
952
|
+
}, e.long))] }) }), /* @__PURE__ */ J(Q.TableBody, { children: t.map((e) => /* @__PURE__ */ Y(Q.TableRow, { children: [i && /* @__PURE__ */ J("th", {
|
|
946
953
|
scope: "row",
|
|
947
954
|
className: u.weekNumber(),
|
|
948
955
|
"aria-label": d.datePicker.weekNumberCell(p(e)),
|
|
949
956
|
children: p(e)
|
|
950
|
-
}), e.map((e) => m(e) ? /* @__PURE__ */ J("td", { className: u.cell() }, e.toString()) : /* @__PURE__ */ J(
|
|
957
|
+
}), e.map((e) => m(e) ? /* @__PURE__ */ J("td", { className: u.cell() }, e.toString()) : /* @__PURE__ */ J(Q.TableCell, {
|
|
951
958
|
value: e,
|
|
952
959
|
visibleRange: r,
|
|
953
960
|
className: u.cell(),
|
|
954
961
|
...v(e),
|
|
955
|
-
children: /* @__PURE__ */ J(
|
|
962
|
+
children: /* @__PURE__ */ J(Q.TableCellTrigger, {
|
|
956
963
|
className: u.day(),
|
|
957
964
|
children: l ? /* @__PURE__ */ J("span", {
|
|
958
965
|
className: u.dayContent(),
|
|
@@ -969,22 +976,22 @@ var yt = {
|
|
|
969
976
|
}, bt = (e, t, n) => `${e}, ${n.datePicker.viewTrigger(t, yt[t])}`;
|
|
970
977
|
function xt() {
|
|
971
978
|
let t = n("datePicker", h)(), r = e();
|
|
972
|
-
return /* @__PURE__ */ Y(
|
|
979
|
+
return /* @__PURE__ */ Y(Q.ViewControl, {
|
|
973
980
|
className: t.header(),
|
|
974
981
|
children: [
|
|
975
|
-
/* @__PURE__ */ J(
|
|
982
|
+
/* @__PURE__ */ J(Q.PrevTrigger, {
|
|
976
983
|
className: t.nav(),
|
|
977
|
-
children: /* @__PURE__ */ J(
|
|
984
|
+
children: /* @__PURE__ */ J(pe, {
|
|
978
985
|
className: t.navIcon(),
|
|
979
986
|
"aria-hidden": "true"
|
|
980
987
|
})
|
|
981
988
|
}),
|
|
982
|
-
/* @__PURE__ */ J(
|
|
989
|
+
/* @__PURE__ */ J(Q.Context, { children: (e) => /* @__PURE__ */ J(Q.ViewTrigger, {
|
|
983
990
|
className: t.viewTrigger(),
|
|
984
991
|
"aria-label": bt(e.numOfMonths > 1 && e.view === "day" ? e.visibleRangeText.formatted : e.visibleRangeText.start, e.view, r),
|
|
985
|
-
children: /* @__PURE__ */ J(
|
|
992
|
+
children: /* @__PURE__ */ J(Q.RangeText, {})
|
|
986
993
|
}) }),
|
|
987
|
-
/* @__PURE__ */ J(
|
|
994
|
+
/* @__PURE__ */ J(Q.NextTrigger, {
|
|
988
995
|
className: t.nav(),
|
|
989
996
|
children: /* @__PURE__ */ J(B, {
|
|
990
997
|
className: t.navIcon(),
|
|
@@ -997,20 +1004,20 @@ function xt() {
|
|
|
997
1004
|
//#endregion
|
|
998
1005
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
999
1006
|
function St({ value: e, defaultValue: n, onValueChange: r, selectionMode: i = "single", valueType: a = "string", withTime: o = !1, min: s, max: c, isDateUnavailable: l, excludeDates: u, locale: d, "aria-label": f, clearable: p = !0, highlightToday: m = !0, ...h }) {
|
|
1000
|
-
let g = t(), _ = d ?? g.locale, [v,
|
|
1001
|
-
let t = e.map((e) => nt(e, o, a,
|
|
1002
|
-
if (
|
|
1007
|
+
let g = t(), _ = d ?? g.locale, [v, ee] = K(n ?? null), y = e === void 0 ? v : e, b = Array.isArray(y) ? y : y ? [y] : [], x = h.timeZone, S = (e) => e.map((e) => rt(e, o, x)).join(), C = (e) => {
|
|
1008
|
+
let t = e.map((e) => nt(e, o, a, x));
|
|
1009
|
+
if (S(t) === S(b)) return;
|
|
1003
1010
|
let n = i === "multiple" ? t : t[0] ?? null;
|
|
1004
|
-
|
|
1011
|
+
ee(n), r?.(n);
|
|
1005
1012
|
};
|
|
1006
1013
|
return /* @__PURE__ */ J(dt, {
|
|
1007
1014
|
...h,
|
|
1008
1015
|
mode: i,
|
|
1009
|
-
dates:
|
|
1010
|
-
onChange:
|
|
1016
|
+
dates: b.map((e) => tt(e, o, x)).filter((e) => !!e),
|
|
1017
|
+
onChange: C,
|
|
1011
1018
|
withTime: o,
|
|
1012
|
-
min: tt(s, o,
|
|
1013
|
-
max: tt(c, o,
|
|
1019
|
+
min: tt(s, o, x, "min"),
|
|
1020
|
+
max: tt(c, o, x, "max"),
|
|
1014
1021
|
isDateUnavailable: it(l, u),
|
|
1015
1022
|
locale: _,
|
|
1016
1023
|
label: f,
|
|
@@ -1020,103 +1027,104 @@ function St({ value: e, defaultValue: n, onValueChange: r, selectionMode: i = "s
|
|
|
1020
1027
|
}
|
|
1021
1028
|
//#endregion
|
|
1022
1029
|
//#region src/components/MultiSelect/MultiSelect.tsx
|
|
1023
|
-
function Ct({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o, placeholder: d, summary: p, maxShown: m = 2, disabled: h, invalid: g, required: _, name: v, itemValue:
|
|
1024
|
-
let
|
|
1025
|
-
size:
|
|
1026
|
-
clearable: k && !
|
|
1027
|
-
}),
|
|
1028
|
-
itemValue:
|
|
1029
|
-
itemLabel:
|
|
1030
|
-
itemDisabled:
|
|
1031
|
-
itemGroup:
|
|
1030
|
+
function Ct({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o, placeholder: d, summary: p, maxShown: m = 2, disabled: h, invalid: g, required: _, name: v, itemValue: ee, itemLabel: b, itemDisabled: x, itemGroup: S, itemKeywords: C, valueKey: w, display: T = "text", checkboxes: te = !0, selectAll: D, max: O, clearable: k, loading: A, loadingText: ne, size: j, filter: M, manualFilter: N, onFilterChange: P, emptyText: re, hasMore: F, onLoadMore: ie, dataSource: I, minSearchLength: ae, pageSize: oe, renderItem: se, renderValue: L, className: ce, style: le, onKeyDown: z, ...ue }) {
|
|
1031
|
+
let pe = n("multiSelect", E, t), B = T === "chips", V = pe({
|
|
1032
|
+
size: j,
|
|
1033
|
+
clearable: k && !B
|
|
1034
|
+
}), H = e(), U = H.select, W = {
|
|
1035
|
+
itemValue: ee,
|
|
1036
|
+
itemLabel: b,
|
|
1037
|
+
itemDisabled: x,
|
|
1038
|
+
itemGroup: S,
|
|
1039
|
+
itemKeywords: C,
|
|
1032
1040
|
valueKey: w
|
|
1033
|
-
}, [
|
|
1041
|
+
}, [ge, ve] = K(""), G = c({
|
|
1034
1042
|
items: r,
|
|
1035
1043
|
source: I,
|
|
1036
|
-
accessors:
|
|
1037
|
-
pageSize:
|
|
1038
|
-
minSearchLength:
|
|
1039
|
-
}), { options:
|
|
1044
|
+
accessors: W,
|
|
1045
|
+
pageSize: oe,
|
|
1046
|
+
minSearchLength: ae
|
|
1047
|
+
}), { options: ye, visible: be, groups: Ce, ordered: we, firstFor: Ee } = s(G.items, W, M && !N && !I ? ge : ""), De = Te(() => [...ye, ...G.resolvedOptions], [ye, G.resolvedOptions]), { selected: X, keys: ke, commit: Ae } = u({
|
|
1040
1048
|
multiple: !0,
|
|
1041
1049
|
value: i,
|
|
1042
1050
|
defaultValue: a,
|
|
1043
|
-
accessors:
|
|
1044
|
-
items:
|
|
1051
|
+
accessors: W,
|
|
1052
|
+
items: De,
|
|
1045
1053
|
onChange: o
|
|
1046
|
-
}),
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
}, [
|
|
1050
|
-
let
|
|
1051
|
-
let e = new Set(
|
|
1052
|
-
return
|
|
1053
|
-
items:
|
|
1054
|
+
}), je = ke.join("\0");
|
|
1055
|
+
xe(() => {
|
|
1056
|
+
G.resolve(ke, De);
|
|
1057
|
+
}, [je, I]);
|
|
1058
|
+
let Q = A || G.loading, Ne = O !== void 0 && X.length >= O, $ = ke.join("\n"), Pe = Te(() => {
|
|
1059
|
+
let e = new Set($.split("\n"));
|
|
1060
|
+
return Me({
|
|
1061
|
+
items: we,
|
|
1054
1062
|
itemToString: (e) => e.label,
|
|
1055
1063
|
itemToValue: (e) => e.key,
|
|
1056
|
-
isItemDisabled: (t) => t.disabled ||
|
|
1064
|
+
isItemDisabled: (t) => t.disabled || Ne && !e.has(t.key)
|
|
1057
1065
|
});
|
|
1058
1066
|
}, [
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
]),
|
|
1063
|
-
function Be(e) {
|
|
1064
|
-
let t = O !== void 0 && e.length >= O && K.length < O;
|
|
1065
|
-
ke(e), t && ze(H.maxReached(O));
|
|
1066
|
-
}
|
|
1067
|
+
we,
|
|
1068
|
+
Ne,
|
|
1069
|
+
$
|
|
1070
|
+
]), Fe = M || D, Ie = Se(), Le = be.filter((e) => !e.disabled), Re = f(X, Le), [ze, Be] = K("");
|
|
1067
1071
|
function Ve(e) {
|
|
1068
|
-
|
|
1072
|
+
let t = O !== void 0 && e.length >= O && X.length < O;
|
|
1073
|
+
Ae(e), t && Be(U.maxReached(O));
|
|
1069
1074
|
}
|
|
1070
1075
|
function He(e) {
|
|
1071
|
-
|
|
1072
|
-
let t = K.at(-1);
|
|
1073
|
-
t && (z && e.key === "Backspace" ? (e.preventDefault(), Ve(t)) : k && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), ke([])));
|
|
1076
|
+
Ae(X.filter((t) => t.key !== e.key)), Be(U.removed(e.label));
|
|
1074
1077
|
}
|
|
1075
|
-
function Ue(e
|
|
1076
|
-
|
|
1078
|
+
function Ue(e) {
|
|
1079
|
+
z?.(e);
|
|
1080
|
+
let t = X.at(-1);
|
|
1081
|
+
t && (B && e.key === "Backspace" ? (e.preventDefault(), He(t)) : k && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), Ae([])));
|
|
1082
|
+
}
|
|
1083
|
+
function We(e, t) {
|
|
1084
|
+
ve(t), P?.(t), I && G.search(t);
|
|
1077
1085
|
let n = N || I ? void 0 : Ee(t);
|
|
1078
1086
|
n && requestAnimationFrame(() => e.setHighlightValue(n.key));
|
|
1079
1087
|
}
|
|
1080
|
-
let
|
|
1081
|
-
item:
|
|
1082
|
-
itemText:
|
|
1083
|
-
icon:
|
|
1084
|
-
itemIndicator:
|
|
1085
|
-
itemBody:
|
|
1086
|
-
itemDescription:
|
|
1087
|
-
group:
|
|
1088
|
-
groupLabel:
|
|
1089
|
-
loading:
|
|
1090
|
-
loadingIcon:
|
|
1091
|
-
sentinel:
|
|
1092
|
-
empty:
|
|
1093
|
-
check:
|
|
1094
|
-
checkIcon:
|
|
1095
|
-
},
|
|
1096
|
-
parts:
|
|
1097
|
-
groups:
|
|
1098
|
-
classes:
|
|
1099
|
-
checkbox:
|
|
1100
|
-
loading:
|
|
1101
|
-
loadingText:
|
|
1102
|
-
hasMore: F ||
|
|
1103
|
-
onLoadMore: () => I ?
|
|
1104
|
-
emptyText:
|
|
1105
|
-
renderItem:
|
|
1106
|
-
}),
|
|
1107
|
-
return /* @__PURE__ */ Y(
|
|
1108
|
-
className:
|
|
1088
|
+
let Ge = {
|
|
1089
|
+
item: V.item(),
|
|
1090
|
+
itemText: V.itemText(),
|
|
1091
|
+
icon: V.icon(),
|
|
1092
|
+
itemIndicator: V.itemIndicator(),
|
|
1093
|
+
itemBody: V.itemBody(),
|
|
1094
|
+
itemDescription: V.itemDescription(),
|
|
1095
|
+
group: V.group(),
|
|
1096
|
+
groupLabel: V.groupLabel(),
|
|
1097
|
+
loading: V.loading(),
|
|
1098
|
+
loadingIcon: V.loadingIcon(),
|
|
1099
|
+
sentinel: V.sentinel(),
|
|
1100
|
+
empty: V.empty(),
|
|
1101
|
+
check: V.check(),
|
|
1102
|
+
checkIcon: V.checkIcon()
|
|
1103
|
+
}, Ke = /* @__PURE__ */ J(l, {
|
|
1104
|
+
parts: Z,
|
|
1105
|
+
groups: Ce,
|
|
1106
|
+
classes: Ge,
|
|
1107
|
+
checkbox: te,
|
|
1108
|
+
loading: Q,
|
|
1109
|
+
loadingText: ne ?? H.common.loading,
|
|
1110
|
+
hasMore: F || G.hasMore,
|
|
1111
|
+
onLoadMore: () => I ? G.loadMore() : ie?.(),
|
|
1112
|
+
emptyText: re ?? G.emptyText ?? (ge ? H.common.noResults : H.common.empty),
|
|
1113
|
+
renderItem: se
|
|
1114
|
+
}), qe = X.length ? X.length > m ? (p ?? H.common.selectedCount)(X.length) : X.map((e) => e.label).join(", ") : d ?? H.common.placeholder;
|
|
1115
|
+
return /* @__PURE__ */ Y(Z.Root, {
|
|
1116
|
+
className: V.base({ class: ce }),
|
|
1109
1117
|
style: le,
|
|
1110
|
-
collection:
|
|
1118
|
+
collection: Pe,
|
|
1111
1119
|
multiple: !0,
|
|
1112
1120
|
closeOnSelect: !1,
|
|
1113
|
-
value:
|
|
1121
|
+
value: ke,
|
|
1114
1122
|
onValueChange: (e) => {
|
|
1115
|
-
let t =
|
|
1116
|
-
|
|
1123
|
+
let t = y(De, e.items, X);
|
|
1124
|
+
Ve(e.value.map((e) => t.get(e)).filter((e) => e !== void 0));
|
|
1117
1125
|
},
|
|
1118
1126
|
onOpenChange: (e) => {
|
|
1119
|
-
e.open &&
|
|
1127
|
+
e.open && G.open(), !e.open && ge && (ve(""), P?.(""), I && G.search(""));
|
|
1120
1128
|
},
|
|
1121
1129
|
disabled: h,
|
|
1122
1130
|
invalid: g,
|
|
@@ -1126,93 +1134,93 @@ function Ct({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o,
|
|
|
1126
1134
|
sameWidth: !0,
|
|
1127
1135
|
gutter: 4
|
|
1128
1136
|
},
|
|
1129
|
-
composite: !
|
|
1137
|
+
composite: !Fe,
|
|
1130
1138
|
lazyMount: !0,
|
|
1131
1139
|
unmountOnExit: !0,
|
|
1132
1140
|
children: [
|
|
1133
|
-
/* @__PURE__ */ J(
|
|
1134
|
-
...
|
|
1141
|
+
/* @__PURE__ */ J(Z.Context, { children: (e) => /* @__PURE__ */ Y(Z.Control, {
|
|
1142
|
+
...B || k ? { className: B ? V.chipsControl() : V.control() } : {},
|
|
1135
1143
|
children: [
|
|
1136
|
-
|
|
1137
|
-
className:
|
|
1144
|
+
B && X.map((t) => /* @__PURE__ */ Y("span", {
|
|
1145
|
+
className: V.chip(),
|
|
1138
1146
|
children: [/* @__PURE__ */ J("span", {
|
|
1139
|
-
className:
|
|
1147
|
+
className: V.chipText(),
|
|
1140
1148
|
children: t.label
|
|
1141
1149
|
}), !e.disabled && /* @__PURE__ */ J("button", {
|
|
1142
1150
|
type: "button",
|
|
1143
1151
|
tabIndex: -1,
|
|
1144
|
-
className:
|
|
1145
|
-
"aria-label":
|
|
1146
|
-
onClick: () =>
|
|
1147
|
-
children: /* @__PURE__ */ J(
|
|
1148
|
-
className:
|
|
1152
|
+
className: V.chipRemove(),
|
|
1153
|
+
"aria-label": U.removeItem(t.label),
|
|
1154
|
+
onClick: () => He(t),
|
|
1155
|
+
children: /* @__PURE__ */ J(_e, {
|
|
1156
|
+
className: V.chipRemoveIcon(),
|
|
1149
1157
|
"aria-hidden": "true"
|
|
1150
1158
|
})
|
|
1151
1159
|
})]
|
|
1152
1160
|
}, t.key)),
|
|
1153
|
-
/* @__PURE__ */ Y(
|
|
1154
|
-
...
|
|
1155
|
-
className:
|
|
1161
|
+
/* @__PURE__ */ Y(Z.Trigger, {
|
|
1162
|
+
...ue,
|
|
1163
|
+
className: B ? V.chipsTrigger() : V.trigger(),
|
|
1156
1164
|
"aria-busy": A || void 0,
|
|
1157
|
-
onKeyDown:
|
|
1165
|
+
onKeyDown: Ue,
|
|
1158
1166
|
children: [/* @__PURE__ */ J("span", {
|
|
1159
|
-
className:
|
|
1160
|
-
"data-placeholder-shown": !
|
|
1161
|
-
children:
|
|
1162
|
-
className:
|
|
1163
|
-
children:
|
|
1164
|
-
}) : d ??
|
|
1165
|
-
}), /* @__PURE__ */ J(
|
|
1166
|
-
className:
|
|
1167
|
-
children: A ? /* @__PURE__ */ J(
|
|
1168
|
-
className:
|
|
1167
|
+
className: V.value(),
|
|
1168
|
+
"data-placeholder-shown": !X.length || void 0,
|
|
1169
|
+
children: B ? X.length ? /* @__PURE__ */ J("span", {
|
|
1170
|
+
className: V.hiddenValue(),
|
|
1171
|
+
children: X.map((e) => e.label).join(", ")
|
|
1172
|
+
}) : d ?? H.common.placeholder : L && X.length ? L(X.map((e) => e.item)) : qe
|
|
1173
|
+
}), /* @__PURE__ */ J(Z.Indicator, {
|
|
1174
|
+
className: V.indicator(),
|
|
1175
|
+
children: A ? /* @__PURE__ */ J(me, {
|
|
1176
|
+
className: V.spinner(),
|
|
1169
1177
|
"aria-hidden": "true"
|
|
1170
|
-
}) : /* @__PURE__ */ J(
|
|
1171
|
-
className:
|
|
1178
|
+
}) : /* @__PURE__ */ J(fe, {
|
|
1179
|
+
className: V.indicatorIcon(),
|
|
1172
1180
|
"aria-hidden": "true"
|
|
1173
1181
|
})
|
|
1174
1182
|
})]
|
|
1175
1183
|
}),
|
|
1176
|
-
k &&
|
|
1184
|
+
k && X.length > 0 && !e.disabled && /* @__PURE__ */ J("button", {
|
|
1177
1185
|
type: "button",
|
|
1178
1186
|
tabIndex: -1,
|
|
1179
|
-
className:
|
|
1180
|
-
"aria-label":
|
|
1187
|
+
className: B ? V.chipsClear() : V.clear(),
|
|
1188
|
+
"aria-label": U.clear,
|
|
1181
1189
|
onClick: () => {
|
|
1182
|
-
|
|
1190
|
+
Ae([]), e.focus();
|
|
1183
1191
|
},
|
|
1184
|
-
children: /* @__PURE__ */ J(
|
|
1185
|
-
className:
|
|
1192
|
+
children: /* @__PURE__ */ J(_e, {
|
|
1193
|
+
className: V.clearIcon(),
|
|
1186
1194
|
"aria-hidden": "true"
|
|
1187
1195
|
})
|
|
1188
1196
|
})
|
|
1189
1197
|
]
|
|
1190
1198
|
}) }),
|
|
1191
|
-
(
|
|
1199
|
+
(B || O !== void 0 || I) && /* @__PURE__ */ J("span", {
|
|
1192
1200
|
role: "status",
|
|
1193
|
-
className:
|
|
1194
|
-
children:
|
|
1201
|
+
className: V.status(),
|
|
1202
|
+
children: ze || G.announcement
|
|
1195
1203
|
}),
|
|
1196
|
-
/* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(
|
|
1197
|
-
className:
|
|
1198
|
-
"aria-busy":
|
|
1199
|
-
"aria-label":
|
|
1200
|
-
children:
|
|
1201
|
-
className:
|
|
1202
|
-
children: [M && /* @__PURE__ */ J(
|
|
1204
|
+
/* @__PURE__ */ J(Oe, { children: /* @__PURE__ */ J(Z.Positioner, { children: /* @__PURE__ */ J(Z.Content, {
|
|
1205
|
+
className: V.content(),
|
|
1206
|
+
"aria-busy": Q || void 0,
|
|
1207
|
+
"aria-label": Fe ? ue["aria-label"] : void 0,
|
|
1208
|
+
children: Fe ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y("div", {
|
|
1209
|
+
className: V.header(),
|
|
1210
|
+
children: [M && /* @__PURE__ */ J(Z.Context, { children: (e) => /* @__PURE__ */ J("input", {
|
|
1203
1211
|
type: "text",
|
|
1204
1212
|
role: "combobox",
|
|
1205
1213
|
autoComplete: "off",
|
|
1206
1214
|
"aria-autocomplete": "list",
|
|
1207
1215
|
"aria-expanded": "true",
|
|
1208
1216
|
"data-autofocus": "",
|
|
1209
|
-
"aria-controls":
|
|
1217
|
+
"aria-controls": Ie,
|
|
1210
1218
|
"aria-activedescendant": e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0,
|
|
1211
|
-
"aria-label":
|
|
1212
|
-
placeholder:
|
|
1213
|
-
value:
|
|
1214
|
-
className:
|
|
1215
|
-
onChange: (t) =>
|
|
1219
|
+
"aria-label": U.filter,
|
|
1220
|
+
placeholder: H.combobox.search,
|
|
1221
|
+
value: ge,
|
|
1222
|
+
className: V.search(),
|
|
1223
|
+
onChange: (t) => We(e, t.target.value),
|
|
1216
1224
|
onKeyDown: (e) => {
|
|
1217
1225
|
[
|
|
1218
1226
|
" ",
|
|
@@ -1220,120 +1228,120 @@ function Ct({ classes: t, items: r, value: i, defaultValue: a, onValueChange: o,
|
|
|
1220
1228
|
"End"
|
|
1221
1229
|
].includes(e.key) && e.stopPropagation();
|
|
1222
1230
|
}
|
|
1223
|
-
}) }),
|
|
1231
|
+
}) }), D && Le.length > 0 && /* @__PURE__ */ Y("button", {
|
|
1224
1232
|
type: "button",
|
|
1225
1233
|
role: "checkbox",
|
|
1226
|
-
"aria-checked":
|
|
1227
|
-
className:
|
|
1228
|
-
onClick: () =>
|
|
1234
|
+
"aria-checked": Re,
|
|
1235
|
+
className: V.selectAll(),
|
|
1236
|
+
onClick: () => Ve(R(X, be, O)),
|
|
1229
1237
|
onKeyDown: (e) => {
|
|
1230
1238
|
(e.key === " " || e.key === "Enter") && e.stopPropagation();
|
|
1231
1239
|
},
|
|
1232
1240
|
children: [/* @__PURE__ */ J("span", {
|
|
1233
|
-
className:
|
|
1234
|
-
"data-state":
|
|
1241
|
+
className: V.check(),
|
|
1242
|
+
"data-state": Re === "mixed" ? "indeterminate" : Re ? "checked" : "unchecked",
|
|
1235
1243
|
"aria-hidden": "true",
|
|
1236
|
-
children:
|
|
1237
|
-
}),
|
|
1244
|
+
children: Re === "mixed" ? /* @__PURE__ */ J(he, { className: V.checkIcon() }) : Re && /* @__PURE__ */ J(de, { className: V.checkIcon() })
|
|
1245
|
+
}), U.selectAll]
|
|
1238
1246
|
})]
|
|
1239
|
-
}), /* @__PURE__ */ J(
|
|
1240
|
-
id:
|
|
1241
|
-
className:
|
|
1247
|
+
}), /* @__PURE__ */ J(Z.List, {
|
|
1248
|
+
id: Ie,
|
|
1249
|
+
className: V.list(),
|
|
1242
1250
|
"data-autofocus": M ? void 0 : "",
|
|
1243
|
-
children:
|
|
1244
|
-
})] }) :
|
|
1251
|
+
children: Ke
|
|
1252
|
+
})] }) : Ke
|
|
1245
1253
|
}) }) }),
|
|
1246
|
-
/* @__PURE__ */ J(
|
|
1254
|
+
/* @__PURE__ */ J(Z.HiddenSelect, {})
|
|
1247
1255
|
]
|
|
1248
1256
|
});
|
|
1249
1257
|
}
|
|
1250
1258
|
//#endregion
|
|
1251
1259
|
//#region src/components/NumberInput/NumberInput.tsx
|
|
1252
|
-
function wt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, max: u, step: d, formatOptions: f = g, locale: p, size: m, invalid: h, success: _, disabled: v, readOnly:
|
|
1253
|
-
let
|
|
1260
|
+
function wt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, max: u, step: d, formatOptions: f = g, locale: p, size: m, invalid: h, success: _, disabled: v, readOnly: ee, required: y, name: x, stepper: S = !0, stepperLayout: C = "inline", prefix: w, suffix: T, allowNegative: E = !0, allowDecimal: O = !0, decimals: k, clampBehavior: ne = "blur", selectOnFocus: j = !1, loading: M = !1, clearable: N = !1, clearLabel: re, className: F, style: ie, onKeyDown: I, onPaste: ae, onFocus: oe, ...L }) {
|
|
1261
|
+
let ce = n("numberInput", te, a), le = t(), R = p ?? le.locale, z = e(), ue = Ae(), de = r(), pe = !(h || ue?.invalid) && (!!_ || de.success), B = ce({
|
|
1254
1262
|
size: m,
|
|
1255
|
-
stacked:
|
|
1256
|
-
success:
|
|
1257
|
-
}), H =
|
|
1263
|
+
stacked: C === "stacked",
|
|
1264
|
+
success: pe
|
|
1265
|
+
}), H = k === void 0 ? O ? f : {
|
|
1258
1266
|
...f,
|
|
1259
1267
|
maximumFractionDigits: 0
|
|
1260
1268
|
} : {
|
|
1261
1269
|
...f,
|
|
1262
|
-
minimumFractionDigits:
|
|
1263
|
-
maximumFractionDigits:
|
|
1264
|
-
},
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
].filter(Boolean).join(" ") : void 0,
|
|
1270
|
-
let e =
|
|
1271
|
-
e && (
|
|
1272
|
-
},
|
|
1270
|
+
minimumFractionDigits: k,
|
|
1271
|
+
maximumFractionDigits: k
|
|
1272
|
+
}, U = E ? l : Math.max(l ?? 0, 0), [W, me] = K(null), _e = o === void 0 ? void 0 : W && W.number === o ? W.text : se(o, R, H), ve = _e ?? W?.text ?? se(s, R, H) ?? "", G = Se(), ye = Se(), be = w || T ? [
|
|
1273
|
+
ue?.ariaDescribedby,
|
|
1274
|
+
w && G,
|
|
1275
|
+
T && ye,
|
|
1276
|
+
L["aria-describedby"]
|
|
1277
|
+
].filter(Boolean).join(" ") : void 0, xe = Ee(null), Ce = () => {
|
|
1278
|
+
let e = xe.current?.querySelector("input");
|
|
1279
|
+
e && (P(e), e.focus());
|
|
1280
|
+
}, we = !!v || !!ee || !!ue?.disabled || !!ue?.readOnly;
|
|
1273
1281
|
return /* @__PURE__ */ J(Be.Root, {
|
|
1274
|
-
className: B.base({ class:
|
|
1275
|
-
style:
|
|
1276
|
-
value:
|
|
1277
|
-
defaultValue: se(s,
|
|
1282
|
+
className: B.base({ class: F }),
|
|
1283
|
+
style: ie,
|
|
1284
|
+
value: _e,
|
|
1285
|
+
defaultValue: se(s, R, H),
|
|
1278
1286
|
onValueChange: (e) => {
|
|
1279
1287
|
let t = Number.isNaN(e.valueAsNumber) ? null : e.valueAsNumber;
|
|
1280
|
-
|
|
1288
|
+
me({
|
|
1281
1289
|
text: e.value,
|
|
1282
1290
|
number: t
|
|
1283
1291
|
}), c?.(t);
|
|
1284
1292
|
},
|
|
1285
|
-
min:
|
|
1293
|
+
min: U,
|
|
1286
1294
|
max: u,
|
|
1287
1295
|
step: d,
|
|
1288
1296
|
formatOptions: H,
|
|
1289
|
-
locale:
|
|
1297
|
+
locale: R,
|
|
1290
1298
|
invalid: h,
|
|
1291
1299
|
disabled: v,
|
|
1292
|
-
readOnly:
|
|
1293
|
-
required:
|
|
1294
|
-
name:
|
|
1295
|
-
clampValueOnBlur:
|
|
1296
|
-
allowOverflow:
|
|
1297
|
-
translations:
|
|
1300
|
+
readOnly: ee,
|
|
1301
|
+
required: y,
|
|
1302
|
+
name: x,
|
|
1303
|
+
clampValueOnBlur: ne !== "none",
|
|
1304
|
+
allowOverflow: ne !== "strict",
|
|
1305
|
+
translations: z.numberInput,
|
|
1298
1306
|
children: /* @__PURE__ */ Y(Be.Control, {
|
|
1299
|
-
ref:
|
|
1307
|
+
ref: xe,
|
|
1300
1308
|
className: B.control(),
|
|
1301
1309
|
children: [
|
|
1302
|
-
|
|
1303
|
-
id:
|
|
1310
|
+
w && /* @__PURE__ */ J("span", {
|
|
1311
|
+
id: G,
|
|
1304
1312
|
className: B.prefix(),
|
|
1305
|
-
children:
|
|
1313
|
+
children: w
|
|
1306
1314
|
}),
|
|
1307
1315
|
/* @__PURE__ */ J(Be.Input, {
|
|
1308
|
-
...
|
|
1309
|
-
...
|
|
1316
|
+
...L,
|
|
1317
|
+
...be ? { "aria-describedby": be } : {},
|
|
1310
1318
|
className: B.input(),
|
|
1311
|
-
"aria-busy":
|
|
1319
|
+
"aria-busy": M || void 0,
|
|
1312
1320
|
onKeyDown: (e) => {
|
|
1313
|
-
if (
|
|
1314
|
-
let t = e.currentTarget, n = t.selectionStart ?? t.value.length, r = t.value.slice(0, n) + t.value.slice(t.selectionEnd ?? n), i =
|
|
1315
|
-
allowDecimal:
|
|
1316
|
-
allowNegative:
|
|
1321
|
+
if (I?.(e), e.defaultPrevented || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
1322
|
+
let t = e.currentTarget, n = t.selectionStart ?? t.value.length, r = t.value.slice(0, n) + t.value.slice(t.selectionEnd ?? n), i = D(e.key, r, R, {
|
|
1323
|
+
allowDecimal: O && k !== 0,
|
|
1324
|
+
allowNegative: E
|
|
1317
1325
|
});
|
|
1318
|
-
i && (e.preventDefault(), i !== "block" &&
|
|
1326
|
+
i && (e.preventDefault(), i !== "block" && b(t, i.insert));
|
|
1319
1327
|
},
|
|
1320
1328
|
onPaste: (e) => {
|
|
1321
1329
|
ae?.(e);
|
|
1322
|
-
let t = e.currentTarget, n = (t.selectionStart ?? 0) === 0 && (t.selectionEnd ?? 0) === t.value.length, r =
|
|
1323
|
-
!e.defaultPrevented && n && r !== null && (e.preventDefault(),
|
|
1330
|
+
let t = e.currentTarget, n = (t.selectionStart ?? 0) === 0 && (t.selectionEnd ?? 0) === t.value.length, r = A(e.clipboardData.getData("text"), R);
|
|
1331
|
+
!e.defaultPrevented && n && r !== null && (e.preventDefault(), P(t, se(r, R, H)));
|
|
1324
1332
|
},
|
|
1325
1333
|
onFocus: (e) => {
|
|
1326
1334
|
oe?.(e);
|
|
1327
1335
|
let t = e.currentTarget;
|
|
1328
|
-
|
|
1336
|
+
j && requestAnimationFrame(() => t.select());
|
|
1329
1337
|
}
|
|
1330
1338
|
}),
|
|
1331
|
-
(
|
|
1332
|
-
loading:
|
|
1333
|
-
clear:
|
|
1334
|
-
clearLabel:
|
|
1335
|
-
onClear:
|
|
1336
|
-
success:
|
|
1339
|
+
(M || N || pe) && /* @__PURE__ */ J(i, {
|
|
1340
|
+
loading: M,
|
|
1341
|
+
clear: N && !!ve && !we,
|
|
1342
|
+
clearLabel: re ?? z.field.clear,
|
|
1343
|
+
onClear: Ce,
|
|
1344
|
+
success: pe,
|
|
1337
1345
|
classes: {
|
|
1338
1346
|
spinner: B.spinner(),
|
|
1339
1347
|
clear: B.clear(),
|
|
@@ -1341,12 +1349,12 @@ function wt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, m
|
|
|
1341
1349
|
statusIcon: B.statusIcon()
|
|
1342
1350
|
}
|
|
1343
1351
|
}),
|
|
1344
|
-
|
|
1345
|
-
id:
|
|
1352
|
+
T && /* @__PURE__ */ J("span", {
|
|
1353
|
+
id: ye,
|
|
1346
1354
|
className: B.suffix(),
|
|
1347
|
-
children:
|
|
1355
|
+
children: T
|
|
1348
1356
|
}),
|
|
1349
|
-
|
|
1357
|
+
S && C === "stacked" ? /* @__PURE__ */ Y("div", {
|
|
1350
1358
|
className: B.stepper(),
|
|
1351
1359
|
children: [/* @__PURE__ */ J(Be.IncrementTrigger, {
|
|
1352
1360
|
className: B.button(),
|
|
@@ -1356,20 +1364,20 @@ function wt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, m
|
|
|
1356
1364
|
})
|
|
1357
1365
|
}), /* @__PURE__ */ J(Be.DecrementTrigger, {
|
|
1358
1366
|
className: B.button(),
|
|
1359
|
-
children: /* @__PURE__ */ J(
|
|
1367
|
+
children: /* @__PURE__ */ J(fe, {
|
|
1360
1368
|
className: B.buttonIcon(),
|
|
1361
1369
|
"aria-hidden": "true"
|
|
1362
1370
|
})
|
|
1363
1371
|
})]
|
|
1364
|
-
}) :
|
|
1372
|
+
}) : S && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Be.DecrementTrigger, {
|
|
1365
1373
|
className: B.button(),
|
|
1366
|
-
children: /* @__PURE__ */ J(
|
|
1374
|
+
children: /* @__PURE__ */ J(he, {
|
|
1367
1375
|
className: B.buttonIcon(),
|
|
1368
1376
|
"aria-hidden": "true"
|
|
1369
1377
|
})
|
|
1370
1378
|
}), /* @__PURE__ */ J(Be.IncrementTrigger, {
|
|
1371
1379
|
className: B.button(),
|
|
1372
|
-
children: /* @__PURE__ */ J(
|
|
1380
|
+
children: /* @__PURE__ */ J(ge, {
|
|
1373
1381
|
className: B.buttonIcon(),
|
|
1374
1382
|
"aria-hidden": "true"
|
|
1375
1383
|
})
|
|
@@ -1381,13 +1389,13 @@ function wt({ classes: a, value: o, defaultValue: s, onValueChange: c, min: l, m
|
|
|
1381
1389
|
//#endregion
|
|
1382
1390
|
//#region src/components/ContextMenu/ContextMenu.tsx
|
|
1383
1391
|
function Tt({ classes: e, items: t, label: r, onSelect: i, onCheckedChange: a, onValueChange: o, linkAs: s, renderItem: c, ref: l, children: u }) {
|
|
1384
|
-
let d = n("menu",
|
|
1392
|
+
let d = n("menu", w, e)(), f = Ue({
|
|
1385
1393
|
open: void 0,
|
|
1386
1394
|
anchor: void 0,
|
|
1387
1395
|
ref: l,
|
|
1388
1396
|
restoreFocus: !0
|
|
1389
|
-
}), [p] =
|
|
1390
|
-
return
|
|
1397
|
+
}), [p] = K(() => m((e) => f.handle.open(e)));
|
|
1398
|
+
return xe(() => p.cancel, [p]), /* @__PURE__ */ J(Ke, {
|
|
1391
1399
|
items: t,
|
|
1392
1400
|
linkAs: s,
|
|
1393
1401
|
renderItem: c,
|