@slotted/react 0.1.0-beta.26 → 0.1.0-beta.28
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/{action-bar-DckD0Sug.js → action-bar-CAtXzym2.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{cascader-47GYpojH.js → cascader-DUiUVxBt.js} +190 -190
- package/dist/cascader.js +1 -1
- package/dist/{checkbox-Dw9R1CGR.js → checkbox-D67PWyL0.js} +3 -3
- package/dist/{checkbox-group-DDlz-UF4.js → checkbox-group-DZZbowG-.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{color-picker-BbyW5ALf.js → color-picker-DP8MjvXk.js} +3 -3
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-Bz0bb4mq.js → column-manager-C3iL_I5T.js} +3 -3
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-BA2nvbnA.js → combobox-BIi7grOR.js} +87 -87
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-DEKWsUFR.js → command-palette-BxbhO044.js} +11 -11
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-CfEEqDKr.js → context-menu-BJyDD17g.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field-CTzBMH8g.js → currency-field-CAO2ZolW.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-WinSY-q3.js → dashboard-grid-De6al1Mj.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-BWWvixwB.js → data-grid-BKOFLdSD.js} +46 -46
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-iw9K_oiz.js → data-list-BDYbrO3V.js} +6 -6
- package/dist/data-list.js +1 -1
- package/dist/{date-field-B2WG_m4C.js → date-field-BEdt1xDF.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-B2wqU3Mw.js → date-picker-DJMET62H.js} +2 -2
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-BhQwOKkE.js → date-range-picker-CinTpTme.js} +2 -2
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-CvKPkvaE.js → datetime-field-2tsqzWVH.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-C-PwlBW5.js → datetime-picker-COew4Y_B.js} +2 -2
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-0xs12Cf1.js → datetime-range-picker-DTT_CvkE.js} +2 -2
- package/dist/datetime-range-picker.js +1 -1
- package/dist/docs/chart.json +2 -0
- package/dist/docs/chart.md +1 -1
- package/dist/docs/combobox.json +1 -0
- package/dist/docs/combobox.md +1 -1
- package/dist/docs/dialog.json +23 -4
- package/dist/docs/dialog.md +2 -60
- package/dist/docs/dialog.props.md +68 -0
- package/dist/docs/drawer.json +2 -0
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/field-group.json +8 -0
- package/dist/docs/field-group.md +1 -0
- package/dist/docs/guidelines/forms.md +1 -1
- package/dist/docs/menu.json +1 -0
- package/dist/docs/menu.md +1 -1
- package/dist/docs/multi-select.json +1 -0
- package/dist/docs/multi-select.md +1 -1
- package/dist/docs/select.json +1 -0
- package/dist/docs/select.md +1 -1
- package/dist/docs/skills/theme-app/SKILL.md +4 -1
- package/dist/{entity-picker-WkBLvR2T.js → entity-picker-DfoAxqaa.js} +26 -26
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-BaPllnNk.js → event-calendar-CFw9KKAm.js} +3 -3
- package/dist/event-calendar.js +1 -1
- package/dist/{field-CSSHwGq_.js → field-BjF0c0U9.js} +2 -2
- package/dist/{field-group-DeBTueJW.js → field-group-Ctwd3EUR.js} +38 -37
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-DRQEl4-J.js → filter-bar-BJGqeIKl.js} +9 -9
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-C1t2tkzg.js → import-export-center-yxNcKfQX.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +53 -53
- package/dist/{listbox-B9cBuitS.js → listbox-Df177k5C.js} +11 -11
- package/dist/listbox.js +1 -1
- package/dist/{markdown-DX-mBYVT.js → markdown-D2EB46zY.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/{menu-parts-7F8syoFE.js → menu-parts-DNQDoJnd.js} +203 -204
- package/dist/menu.js +1 -1
- package/dist/{menubar-DzVGFn_I.js → menubar-CY8oxV0V.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-DnOAXeuF.js → multi-select-DSSDlWVZ.js} +69 -69
- package/dist/multi-select.js +1 -1
- package/dist/{number-field-C20-8yda.js → number-field-DzOcs9uG.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-YI-Emc5k.js → otp-input-ult9fNdj.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{prompt-composer-DsnPcKa4.js → prompt-composer-D9oaFXDU.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-DA8_LbEz.js → radio-group-Dct1Kkuf.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-DSSqi85N.js → rating-Cjrwmxyw.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-CsVRZTwK.js → saved-views-BKOHI-Od.js} +3 -3
- package/dist/saved-views.js +1 -1
- package/dist/{segmented-control-Dae5wU9X.js → segmented-control-BINpaKhI.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/{select-De77allF.js → select-jdqT8lFi.js} +264 -264
- package/dist/select.js +1 -1
- package/dist/{slider-DNRphJot.js → slider-DuJGh0pf.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-DA1wcDJB.js → split-button-CgfY606Z.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/action-sheet.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/cascader.css +2 -2
- package/dist/styles/chart.css +1 -1
- package/dist/styles/checkbox-group.css +3 -3
- package/dist/styles/checkbox.css +3 -3
- package/dist/styles/color-picker.css +4 -4
- package/dist/styles/column-manager.css +6 -6
- package/dist/styles/combobox.css +3 -3
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/currency-field.css +2 -2
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +7 -7
- package/dist/styles/data-list.css +4 -4
- package/dist/styles/date-field.css +2 -2
- package/dist/styles/date-picker.css +2 -2
- package/dist/styles/date-range-picker.css +2 -2
- package/dist/styles/datetime-field.css +2 -2
- package/dist/styles/datetime-picker.css +2 -2
- package/dist/styles/datetime-range-picker.css +2 -2
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/entity-picker.css +3 -3
- package/dist/styles/event-calendar.css +6 -6
- package/dist/styles/field-group.css +3 -3
- package/dist/styles/field.css +2 -2
- package/dist/styles/filter-bar.css +8 -8
- package/dist/styles/hover-card.css +1 -1
- package/dist/styles/import-export-center.css +5 -5
- package/dist/styles/index.css +12 -12
- package/dist/styles/listbox.css +2 -2
- package/dist/styles/markdown.css +3 -3
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/multi-select.css +3 -3
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/number-field.css +2 -2
- package/dist/styles/otp-input.css +2 -2
- package/dist/styles/popover.css +1 -1
- package/dist/styles/prompt-composer.css +2 -2
- package/dist/styles/radio-group.css +3 -3
- package/dist/styles/rating.css +2 -2
- package/dist/styles/saved-views.css +4 -4
- package/dist/styles/segmented-control.css +3 -3
- package/dist/styles/select.css +3 -3
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/slider.css +2 -2
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +2 -2
- package/dist/styles/table.css +5 -5
- package/dist/styles/tags-input.css +2 -2
- package/dist/styles/text-field.css +2 -2
- package/dist/styles/textarea.css +2 -2
- package/dist/styles/time-field.css +2 -2
- package/dist/styles/time-picker.css +2 -2
- package/dist/styles/time-range-picker.css +2 -2
- package/dist/styles/toggle-group.css +2 -2
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles/transfer.css +3 -3
- package/dist/styles/upload.css +3 -3
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{switch-gR_OvGG8.js → switch-Tr3blHWc.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-C3cjkzps.js → table-b7Wt5A88.js} +217 -217
- package/dist/table.js +1 -1
- package/dist/{tags-input-DEhtpizX.js → tags-input-_cYR2JSK.js} +10 -10
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-RGXN7zNu.js → text-field-DEm3MEe2.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-AhpUmnMk.js → textarea-BRRn55L2.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-xkxX8JF6.js → time-field-C9dFaZOx.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-Da_UhP9X.js → time-picker-VJegeX4j.js} +2 -2
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-CfVzD53N.js → time-range-picker-DFOxymH_.js} +2 -2
- package/dist/time-range-picker.js +1 -1
- package/dist/{toggle-group-DoxPLYJ3.js → toggle-group-DiKxYOwh.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-CtSZ88HI.js → toolbar-CSiDqC8L.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{transfer-BMRyopEw.js → transfer-BrYBBjaG.js} +9 -9
- package/dist/transfer.js +1 -1
- package/dist/{tree-DBirM2v9.js → tree-D-y-0TrL.js} +14 -14
- package/dist/tree.js +1 -1
- package/dist/types/field/field-parts.d.ts.map +1 -1
- package/dist/types/field-group/field-group-parts.d.ts.map +1 -1
- package/dist/types/field-group/field-group.d.ts +1 -1
- package/dist/types/field-group/field-group.d.ts.map +1 -1
- package/dist/types/field-group/field-group.types.d.ts +9 -0
- package/dist/types/field-group/field-group.types.d.ts.map +1 -1
- package/dist/types/field-group/index.d.ts +1 -1
- package/dist/types/field-group/index.d.ts.map +1 -1
- package/dist/types/menu/menu-parts.d.ts.map +1 -1
- package/dist/{upload-BqVBpYaZ.js → upload-BmRZHySQ.js} +1 -1
- package/dist/upload.js +1 -1
- package/package.json +6 -6
|
@@ -2,41 +2,41 @@ import { r as e } from "./i18n-D7xXDd8-.js";
|
|
|
2
2
|
import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
3
3
|
import { n as r } from "./icon-button-DERKFHX1.js";
|
|
4
4
|
import { a as i, i as a, n as o, r as s } from "./tooltip-DrFiRlH8.js";
|
|
5
|
-
import { t as c } from "./checkbox-
|
|
5
|
+
import { t as c } from "./checkbox-D67PWyL0.js";
|
|
6
6
|
import { i as l } from "./skeleton-DeEOmm1y.js";
|
|
7
|
-
import { t as u } from "./text-field-
|
|
7
|
+
import { t as u } from "./text-field-DEm3MEe2.js";
|
|
8
8
|
import { a as d, d as f, f as p, l as m } from "./popover-BfEn2wdZ.js";
|
|
9
9
|
import { t as h } from "./visually-hidden-BUSrFZ1_.js";
|
|
10
|
-
import { t as g } from "./date-picker-
|
|
11
|
-
import { t as _ } from "./date-range-picker-
|
|
12
|
-
import { t as ee } from "./datetime-picker-
|
|
13
|
-
import { t as te } from "./datetime-range-picker-
|
|
14
|
-
import { t as ne } from "./number-field-
|
|
15
|
-
import { c as re, i as ie, n as ae, o as oe, s as se } from "./select-
|
|
16
|
-
import { t as v } from "./time-picker-
|
|
17
|
-
import { t as y } from "./time-range-picker-
|
|
18
|
-
import { n as ce, t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { keyedProps as
|
|
21
|
-
import { createFocusOrigin as
|
|
22
|
-
import { createControllable as
|
|
23
|
-
import { createContext as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { createScrollAffordance as
|
|
26
|
-
import { tableMessages as
|
|
10
|
+
import { t as g } from "./date-picker-DJMET62H.js";
|
|
11
|
+
import { t as _ } from "./date-range-picker-CinTpTme.js";
|
|
12
|
+
import { t as ee } from "./datetime-picker-COew4Y_B.js";
|
|
13
|
+
import { t as te } from "./datetime-range-picker-DTT_CvkE.js";
|
|
14
|
+
import { t as ne } from "./number-field-DzOcs9uG.js";
|
|
15
|
+
import { c as re, i as ie, n as ae, o as oe, s as se } from "./select-jdqT8lFi.js";
|
|
16
|
+
import { t as v } from "./time-picker-VJegeX4j.js";
|
|
17
|
+
import { t as y } from "./time-range-picker-DFOxymH_.js";
|
|
18
|
+
import { n as ce, t as le } from "./radio-group-Dct1Kkuf.js";
|
|
19
|
+
import { t as b } from "./tags-input-_cYR2JSK.js";
|
|
20
|
+
import { keyedProps as x, withSelectorKey as S } from "@slotted/core/selector-key";
|
|
21
|
+
import { createFocusOrigin as C } from "@slotted/core/focus";
|
|
22
|
+
import { createControllable as ue } from "@slotted/core/state";
|
|
23
|
+
import { createContext as w, useCallback as T, useContext as E, useEffect as D, useId as de, useImperativeHandle as fe, useMemo as O, useRef as pe, useState as k } from "react";
|
|
24
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
25
|
+
import { createScrollAffordance as me } from "@slotted/core/overflow";
|
|
26
|
+
import { tableMessages as he } from "@slotted/core/i18n";
|
|
27
|
+
import { createFilter as N, nextSelection as ge } from "@slotted/core/collection";
|
|
27
28
|
import { isRowAction as P } from "@slotted/core/pointer-intent";
|
|
28
|
-
import { getLiveAnnouncer as
|
|
29
|
-
import { isPlainDate as
|
|
30
|
-
import { createFilter as z, nextSelection as B } from "@slotted/core/collection";
|
|
29
|
+
import { getLiveAnnouncer as _e } from "@slotted/core/live-announcer";
|
|
30
|
+
import { isPlainDate as F, isPlainDateTime as I, isPlainTime as ve, parseISODate as L, parseISODateTime as R, parseISOTime as ye, toISODate as z, toISOTime as B } from "@slotted/core/date";
|
|
31
31
|
import { defaultOperator as be, describeFilter as xe, emptyFilter as Se, isConditionActive as V, isFilterActive as Ce, normalizeFilter as we, operandCount as H, operatorsFor as Te, serializeFilter as Ee, withCondition as De, withJoin as Oe } from "@slotted/core/filter";
|
|
32
32
|
//#region src/table/table-defaults.tsx
|
|
33
|
-
var U =
|
|
33
|
+
var U = w({});
|
|
34
34
|
function W() {
|
|
35
|
-
return
|
|
35
|
+
return E(U);
|
|
36
36
|
}
|
|
37
37
|
function ke({ children: e, ...t }) {
|
|
38
38
|
let n = W();
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ j(U.Provider, {
|
|
40
40
|
value: {
|
|
41
41
|
cellAlign: t.cellAlign ?? n.cellAlign,
|
|
42
42
|
columns: t.columns ?? n.columns,
|
|
@@ -54,123 +54,123 @@ function ke({ children: e, ...t }) {
|
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
56
|
//#region src/table/table.tsx
|
|
57
|
-
var Ae = "[data-part=\"body\"] > [data-part=\"row\"][data-value]", G =
|
|
57
|
+
var Ae = "[data-part=\"body\"] > [data-part=\"row\"][data-value]", G = w(void 0);
|
|
58
58
|
function K() {
|
|
59
|
-
let e =
|
|
59
|
+
let e = E(G);
|
|
60
60
|
if (e === void 0) throw Error("Every Table part must be rendered inside Table.");
|
|
61
61
|
return e;
|
|
62
62
|
}
|
|
63
63
|
function je() {
|
|
64
|
-
return
|
|
64
|
+
return E(G);
|
|
65
65
|
}
|
|
66
66
|
function Me({ children: t, columns: n, defaultExpanded: r, defaultSort: i, defaultValue: a, edges: o, expanded: s, layout: c, loading: l, messages: u, onExpandedChange: d, onSortChange: f, onValueChange: p, ref: m, render: h, selectionMode: g, sort: _, cellAlign: ee, stickyFooter: te, stickyHeader: ne, stickyTo: re, striped: ie, value: ae, variant: oe, ...se }) {
|
|
67
|
-
let v = W(), y = e(
|
|
68
|
-
|
|
69
|
-
}, [m]), be =
|
|
67
|
+
let v = W(), y = e(he, u), ce = de(), [le, b] = k(i ?? null), [S, C] = k(a ?? []), [w, E] = k(r ?? []), D = pe(null), fe = pe(void 0), O = _ === void 0 ? le : _, A = ae ?? S, M = s ?? w, me = n ?? v.columns ?? 1, N = o ?? v.edges ?? "inset", P = c ?? v.layout ?? "auto", F = g ?? v.selectionMode ?? "none", I = (ne ?? v.stickyHeader ?? !1) === !0, ve = (te ?? v.stickyFooter ?? !1) === !0, L = ee ?? v.cellAlign ?? "center", R = re ?? v.stickyTo ?? "scroll", ye = (ie ?? v.striped ?? !1) === !0, z = oe ?? v.variant ?? "ruled", B = T((e) => {
|
|
68
|
+
D.current = e, typeof m == "function" ? m(e) : m != null && (m.current = e);
|
|
69
|
+
}, [m]), be = T(() => [...D.current?.querySelectorAll("[data-part=\"body\"] > [data-part=\"row\"][data-value]") ?? []].filter((e) => !e.hasAttribute("data-disabled")).map((e) => e.getAttribute("data-value") ?? ""), []);
|
|
70
70
|
function xe(e, t, n) {
|
|
71
|
-
|
|
71
|
+
ue({
|
|
72
72
|
controlled: ae,
|
|
73
|
-
initial:
|
|
73
|
+
initial: A,
|
|
74
74
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
75
75
|
onRequest: (e) => p?.(e.value, e)
|
|
76
|
-
}).request(e, t, n) &&
|
|
76
|
+
}).request(e, t, n) && C(e);
|
|
77
77
|
}
|
|
78
78
|
let Se = {
|
|
79
|
-
columns:
|
|
80
|
-
expanded:
|
|
79
|
+
columns: me,
|
|
80
|
+
expanded: M,
|
|
81
81
|
id: ce,
|
|
82
|
-
isExpanded: (e) =>
|
|
83
|
-
isSelected: (e) =>
|
|
82
|
+
isExpanded: (e) => M.includes(e),
|
|
83
|
+
isSelected: (e) => A.includes(e),
|
|
84
84
|
loading: l === !0,
|
|
85
85
|
rows: be,
|
|
86
86
|
requestSort(e, t) {
|
|
87
|
-
let n =
|
|
87
|
+
let n = O?.column === e ? O.direction === "ascending" ? {
|
|
88
88
|
column: e,
|
|
89
89
|
direction: "descending"
|
|
90
90
|
} : null : {
|
|
91
91
|
column: e,
|
|
92
92
|
direction: "ascending"
|
|
93
|
-
}, r =
|
|
93
|
+
}, r = ue({
|
|
94
94
|
controlled: _,
|
|
95
|
-
initial:
|
|
95
|
+
initial: O,
|
|
96
96
|
equals: (e, t) => e?.column === t?.column && e?.direction === t?.direction,
|
|
97
97
|
onRequest: (e) => f?.(e.value, e)
|
|
98
98
|
}), i = n === null ? "clear" : "pointer", a = r.request(n, i, t), o = t?.currentTarget?.textContent?.trim() ?? e, s = n === null ? y("sortCleared", { column: o }) : n.direction === "ascending" ? y("sortedAscending", { column: o }) : y("sortedDescending", { column: o });
|
|
99
|
-
|
|
99
|
+
_e(D.current?.ownerDocument).announce(s), a && b(n);
|
|
100
100
|
},
|
|
101
101
|
selectionMode: F,
|
|
102
|
-
sort:
|
|
102
|
+
sort: O,
|
|
103
103
|
stickyTo: R,
|
|
104
104
|
toggleExpanded(e, t) {
|
|
105
|
-
let n =
|
|
106
|
-
|
|
105
|
+
let n = M.includes(e) ? M.filter((t) => t !== e) : [...M, e];
|
|
106
|
+
ue({
|
|
107
107
|
controlled: s,
|
|
108
|
-
initial:
|
|
108
|
+
initial: M,
|
|
109
109
|
equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
|
|
110
110
|
onRequest: (e) => d?.(e.value, e)
|
|
111
|
-
}).request(n, "pointer", t) &&
|
|
111
|
+
}).request(n, "pointer", t) && E(n);
|
|
112
112
|
},
|
|
113
113
|
toggleSelected(e, { range: t, source: n }) {
|
|
114
|
-
let r =
|
|
114
|
+
let r = ge({
|
|
115
115
|
action: t && F === "multiple" ? "range" : "toggle",
|
|
116
|
-
anchor:
|
|
116
|
+
anchor: fe.current,
|
|
117
117
|
behavior: "toggle",
|
|
118
118
|
key: e,
|
|
119
119
|
keys: be(),
|
|
120
120
|
mode: F,
|
|
121
|
-
selected:
|
|
121
|
+
selected: A
|
|
122
122
|
});
|
|
123
|
-
t || (
|
|
123
|
+
t || (fe.current = e), xe(r.selected, t ? "select" : "pointer", n);
|
|
124
124
|
},
|
|
125
125
|
toggleSelectAll(e) {
|
|
126
|
-
let t =
|
|
126
|
+
let t = ge({
|
|
127
127
|
action: "all",
|
|
128
128
|
keys: be(),
|
|
129
129
|
mode: F,
|
|
130
|
-
selected:
|
|
130
|
+
selected: A
|
|
131
131
|
});
|
|
132
132
|
xe(t.selected, t.selected.length === 0 ? "clear" : "select", e);
|
|
133
133
|
},
|
|
134
134
|
t: y,
|
|
135
|
-
value:
|
|
136
|
-
}, V =
|
|
135
|
+
value: A
|
|
136
|
+
}, V = x({
|
|
137
137
|
...se,
|
|
138
138
|
children: t,
|
|
139
|
-
"data-cell-align":
|
|
140
|
-
"data-edges":
|
|
141
|
-
"data-layout":
|
|
139
|
+
"data-cell-align": L,
|
|
140
|
+
"data-edges": N,
|
|
141
|
+
"data-layout": P,
|
|
142
142
|
...l === !0 ? { "data-loading": "" } : {},
|
|
143
143
|
"data-part": "root",
|
|
144
144
|
...I ? { "data-sticky-header": "" } : {},
|
|
145
|
-
...
|
|
145
|
+
...ve ? { "data-sticky-footer": "" } : {},
|
|
146
146
|
"data-sticky-to": R,
|
|
147
|
-
...
|
|
147
|
+
...ye ? { "data-striped": "" } : {},
|
|
148
148
|
"data-ui": "table",
|
|
149
|
-
"data-variant":
|
|
150
|
-
ref:
|
|
149
|
+
"data-variant": z,
|
|
150
|
+
ref: B
|
|
151
151
|
});
|
|
152
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ j(G.Provider, {
|
|
153
153
|
value: Se,
|
|
154
|
-
children: h === void 0 ? /* @__PURE__ */
|
|
154
|
+
children: h === void 0 ? /* @__PURE__ */ j("div", { ...V }) : h(V)
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
//#endregion
|
|
158
158
|
//#region src/table/table-content.tsx
|
|
159
159
|
function Ne({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps: i, totalRowCount: a, ...o }) {
|
|
160
|
-
let s = K(), [c, l] =
|
|
160
|
+
let s = K(), [c, l] = k(null), [u, d] = k({
|
|
161
161
|
overflowing: !1,
|
|
162
162
|
atStart: !0,
|
|
163
163
|
atEnd: !0
|
|
164
|
-
}), f =
|
|
164
|
+
}), f = pe(null), { ref: p, ...m } = i ?? {}, h = T((e) => {
|
|
165
165
|
l(e), typeof p == "function" ? p(e) : p != null && (p.current = e);
|
|
166
166
|
}, [p]);
|
|
167
|
-
|
|
167
|
+
D(() => {
|
|
168
168
|
if (c === null || s.stickyTo === "page") return;
|
|
169
|
-
let e =
|
|
169
|
+
let e = me(c, { onChange: d });
|
|
170
170
|
return f.current = e, d(e.state()), () => {
|
|
171
171
|
e.destroy(), f.current = null;
|
|
172
172
|
};
|
|
173
|
-
}, [c, s.stickyTo]),
|
|
173
|
+
}, [c, s.stickyTo]), D(() => c === null ? void 0 : C(c).destroy, [c]), fe(t, () => ({
|
|
174
174
|
overflowing: () => f.current?.state().overflowing ?? !1,
|
|
175
175
|
refresh: () => f.current?.refresh(),
|
|
176
176
|
scrollToRow: (e) => {
|
|
@@ -178,17 +178,17 @@ function Ne({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
178
178
|
t != null && f.current?.reveal(t);
|
|
179
179
|
}
|
|
180
180
|
}), [c]);
|
|
181
|
-
let g =
|
|
181
|
+
let g = x({
|
|
182
182
|
...m,
|
|
183
183
|
"data-part": "scroll",
|
|
184
184
|
ref: h
|
|
185
185
|
});
|
|
186
|
-
return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */
|
|
186
|
+
return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */ j("div", {
|
|
187
187
|
...g,
|
|
188
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ j("table", {
|
|
189
189
|
...o,
|
|
190
190
|
...a === void 0 ? {} : { "aria-rowcount": a },
|
|
191
|
-
...
|
|
191
|
+
...S(s.loading ? { "aria-busy": !0 } : {}, "part", "table"),
|
|
192
192
|
ref: n,
|
|
193
193
|
children: e
|
|
194
194
|
})
|
|
@@ -196,12 +196,12 @@ function Ne({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
|
|
|
196
196
|
}
|
|
197
197
|
//#endregion
|
|
198
198
|
//#region src/table/table-parts.tsx
|
|
199
|
-
var Pe =
|
|
199
|
+
var Pe = w(void 0), Fe = w(void 0);
|
|
200
200
|
function Ie() {
|
|
201
|
-
return
|
|
201
|
+
return E(Fe);
|
|
202
202
|
}
|
|
203
203
|
function q() {
|
|
204
|
-
let e =
|
|
204
|
+
let e = E(Pe);
|
|
205
205
|
if (e === void 0) throw Error("TableSelect, TableExpander and TableRowHeader belong inside TableRow.");
|
|
206
206
|
return e;
|
|
207
207
|
}
|
|
@@ -219,39 +219,39 @@ function J({ align: e, blockAlign: t, numeric: n, sticky: r, stickyOffset: i, te
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
function Le({ ref: e, ...t }) {
|
|
222
|
-
return /* @__PURE__ */
|
|
223
|
-
...
|
|
222
|
+
return /* @__PURE__ */ j("caption", {
|
|
223
|
+
...S(t, "part", "caption"),
|
|
224
224
|
ref: e
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
function Re({ ref: e, ...t }) {
|
|
228
|
-
return /* @__PURE__ */
|
|
229
|
-
...
|
|
228
|
+
return /* @__PURE__ */ j("thead", {
|
|
229
|
+
...S(t, "part", "head"),
|
|
230
230
|
ref: e
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
function ze({ ref: e, ...t }) {
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
...
|
|
234
|
+
return /* @__PURE__ */ j("tbody", {
|
|
235
|
+
...S(t, "part", "body"),
|
|
236
236
|
ref: e
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
function Be({ ref: e, ...t }) {
|
|
240
|
-
return /* @__PURE__ */
|
|
241
|
-
...
|
|
240
|
+
return /* @__PURE__ */ j("tfoot", {
|
|
241
|
+
...S(t, "part", "summary"),
|
|
242
242
|
ref: e
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
function Ve({ ref: e, ...t }) {
|
|
246
|
-
return /* @__PURE__ */
|
|
247
|
-
...
|
|
246
|
+
return /* @__PURE__ */ j("div", {
|
|
247
|
+
...S(t, "part", "footer"),
|
|
248
248
|
ref: e
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
function He({ children: e, current: t, disabled: n, interactive: r, onAction: i, onClick: a, ref: o, render: s, rowIndex: c, value: l, ...u }) {
|
|
252
252
|
let d = K(), f = l !== void 0 && d.isSelected(l), p = l !== void 0 && d.isExpanded(l), m = r ?? i !== void 0, h = i === void 0 ? a : (e) => {
|
|
253
253
|
a?.(e), !(e.defaultPrevented || n === !0) && P(e.currentTarget, e.target) && i(e);
|
|
254
|
-
}, g =
|
|
254
|
+
}, g = x({
|
|
255
255
|
...u,
|
|
256
256
|
children: e,
|
|
257
257
|
...t === !0 ? {
|
|
@@ -273,9 +273,9 @@ function He({ children: e, current: t, disabled: n, interactive: r, onAction: i,
|
|
|
273
273
|
selected: f,
|
|
274
274
|
value: l
|
|
275
275
|
};
|
|
276
|
-
return /* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */ j(Pe.Provider, {
|
|
277
277
|
value: _,
|
|
278
|
-
children: s === void 0 ? /* @__PURE__ */
|
|
278
|
+
children: s === void 0 ? /* @__PURE__ */ j("tr", {
|
|
279
279
|
...g,
|
|
280
280
|
ref: o
|
|
281
281
|
}) : s(g)
|
|
@@ -285,10 +285,10 @@ function Ue(e, ...t) {
|
|
|
285
285
|
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
286
286
|
}
|
|
287
287
|
function We({ header: e }) {
|
|
288
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ j(A, { children: (e.current?.textContent ?? "").trim() });
|
|
289
289
|
}
|
|
290
290
|
function Ge({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref: l, scope: u, sticky: d, stickyOffset: f, style: p, text: m, ...h }) {
|
|
291
|
-
let g = K(), _ =
|
|
291
|
+
let g = K(), _ = pe(null), ee = r !== void 0 && g.sort?.column === r, te = x({
|
|
292
292
|
...h,
|
|
293
293
|
...J({
|
|
294
294
|
align: e,
|
|
@@ -303,27 +303,27 @@ function Ge({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref:
|
|
|
303
303
|
"data-part": "column-header",
|
|
304
304
|
scope: u ?? "col"
|
|
305
305
|
});
|
|
306
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ j(Fe.Provider, {
|
|
307
307
|
value: r,
|
|
308
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ M(i, {
|
|
309
309
|
describes: "none",
|
|
310
310
|
openOn: "hover",
|
|
311
311
|
side: "bottom",
|
|
312
312
|
whenClipped: !0,
|
|
313
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ j(a, {
|
|
314
314
|
...te,
|
|
315
|
-
render: (e) => /* @__PURE__ */
|
|
315
|
+
render: (e) => /* @__PURE__ */ j("th", {
|
|
316
316
|
...e,
|
|
317
317
|
ref: (t) => {
|
|
318
318
|
e.ref?.(t), _.current = t, Ue(t, l);
|
|
319
319
|
}
|
|
320
320
|
})
|
|
321
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ j(s, { children: /* @__PURE__ */ j(o, { children: /* @__PURE__ */ j(We, { header: _ }) }) })]
|
|
322
322
|
})
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
function Ke({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a, stickyOffset: o, style: s, text: c, ...l }) {
|
|
326
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ j("th", {
|
|
327
327
|
...l,
|
|
328
328
|
...J({
|
|
329
329
|
align: e,
|
|
@@ -340,7 +340,7 @@ function Ke({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a,
|
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
342
|
function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...c }) {
|
|
343
|
-
return /* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */ j("td", {
|
|
344
344
|
...c,
|
|
345
345
|
...J({
|
|
346
346
|
align: e,
|
|
@@ -356,31 +356,31 @@ function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
358
|
function Je({ children: e, column: r, onClick: i, ref: a, render: o, ...s }) {
|
|
359
|
-
let c = K(), l =
|
|
359
|
+
let c = K(), l = E(Fe), u = r ?? l;
|
|
360
360
|
function d(e) {
|
|
361
361
|
i?.(e), !(e.defaultPrevented || u === void 0) && c.requestSort(u, e);
|
|
362
362
|
}
|
|
363
|
-
let f =
|
|
363
|
+
let f = x({
|
|
364
364
|
...s,
|
|
365
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ M(A, { children: [e, /* @__PURE__ */ j(n, { children: /* @__PURE__ */ j(t, { name: "chevron-down" }) })] }),
|
|
366
366
|
"data-part": "sort",
|
|
367
367
|
onClick: d,
|
|
368
368
|
type: "button"
|
|
369
369
|
});
|
|
370
|
-
return o === void 0 ? /* @__PURE__ */
|
|
370
|
+
return o === void 0 ? /* @__PURE__ */ j("button", {
|
|
371
371
|
...f,
|
|
372
372
|
ref: a
|
|
373
373
|
}) : o(f);
|
|
374
374
|
}
|
|
375
375
|
function Ye({ ref: e, ...t }) {
|
|
376
|
-
return /* @__PURE__ */
|
|
377
|
-
...
|
|
376
|
+
return /* @__PURE__ */ j("span", {
|
|
377
|
+
...S(t, "part", "column-actions"),
|
|
378
378
|
ref: e
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
function Xe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, value: l, ...u }) {
|
|
382
382
|
let d = K(), f = q(), p = l ?? f.value;
|
|
383
|
-
return /* @__PURE__ */
|
|
383
|
+
return /* @__PURE__ */ j("td", {
|
|
384
384
|
...u,
|
|
385
385
|
...J({
|
|
386
386
|
align: e,
|
|
@@ -393,7 +393,7 @@ function Xe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
393
393
|
"data-part": "selection",
|
|
394
394
|
"data-part-selection": "",
|
|
395
395
|
ref: r,
|
|
396
|
-
children: /* @__PURE__ */
|
|
396
|
+
children: /* @__PURE__ */ j(c, {
|
|
397
397
|
checked: p !== void 0 && d.isSelected(p),
|
|
398
398
|
disabled: f.disabled,
|
|
399
399
|
onCheckedChange: (e, t) => {
|
|
@@ -404,13 +404,13 @@ function Xe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
404
404
|
source: t.source
|
|
405
405
|
});
|
|
406
406
|
},
|
|
407
|
-
children: /* @__PURE__ */
|
|
407
|
+
children: /* @__PURE__ */ j(h, { children: d.t("selectRow", { row: p ?? "" }).trim() })
|
|
408
408
|
})
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
function Ze({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...l }) {
|
|
412
412
|
let u = K(), d = u.value.length;
|
|
413
|
-
return /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ j("th", {
|
|
414
414
|
...l,
|
|
415
415
|
...J({
|
|
416
416
|
align: e,
|
|
@@ -424,11 +424,11 @@ function Ze({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
|
|
|
424
424
|
"data-part-selection": "",
|
|
425
425
|
ref: r,
|
|
426
426
|
scope: "col",
|
|
427
|
-
children: /* @__PURE__ */
|
|
427
|
+
children: /* @__PURE__ */ j(c, {
|
|
428
428
|
checked: d > 0 && d === u.rows().length,
|
|
429
429
|
indeterminate: d > 0 && d < u.rows().length,
|
|
430
430
|
onCheckedChange: (e, t) => u.toggleSelectAll(t.source),
|
|
431
|
-
children: /* @__PURE__ */
|
|
431
|
+
children: /* @__PURE__ */ j(h, { children: u.t("selectAll", { count: d }) })
|
|
432
432
|
})
|
|
433
433
|
});
|
|
434
434
|
}
|
|
@@ -437,12 +437,12 @@ function Qe({ onClick: e, ref: r, value: i, ...a }) {
|
|
|
437
437
|
function u(t) {
|
|
438
438
|
e?.(t), !(t.defaultPrevented || c === void 0) && o.toggleExpanded(c, t);
|
|
439
439
|
}
|
|
440
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ j("button", {
|
|
441
441
|
...a,
|
|
442
442
|
"aria-controls": l ? s.detailId : void 0,
|
|
443
443
|
"aria-expanded": l,
|
|
444
444
|
"aria-label": a["aria-label"] ?? (l ? o.t("collapse") : o.t("expand")),
|
|
445
|
-
children: a.children ?? /* @__PURE__ */
|
|
445
|
+
children: a.children ?? /* @__PURE__ */ j(n, { children: /* @__PURE__ */ j(t, { name: "chevron-right" }) }),
|
|
446
446
|
"data-part": "expander",
|
|
447
447
|
"data-part-expander": "",
|
|
448
448
|
onClick: u,
|
|
@@ -452,11 +452,11 @@ function Qe({ onClick: e, ref: r, value: i, ...a }) {
|
|
|
452
452
|
}
|
|
453
453
|
function $e({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
454
454
|
let a = K();
|
|
455
|
-
return a.isExpanded(r) ? /* @__PURE__ */
|
|
456
|
-
...
|
|
455
|
+
return a.isExpanded(r) ? /* @__PURE__ */ j("tr", {
|
|
456
|
+
...S(i, "part", "detail"),
|
|
457
457
|
id: `${a.id}detail${r}`,
|
|
458
458
|
ref: n,
|
|
459
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ j("td", {
|
|
460
460
|
colSpan: t ?? a.columns,
|
|
461
461
|
"data-part": "cell",
|
|
462
462
|
"data-part-cell": "",
|
|
@@ -466,23 +466,23 @@ function $e({ children: e, colSpan: t, ref: n, value: r, ...i }) {
|
|
|
466
466
|
}
|
|
467
467
|
function et({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
468
468
|
let o = K();
|
|
469
|
-
return /* @__PURE__ */
|
|
470
|
-
...
|
|
469
|
+
return /* @__PURE__ */ j("tr", {
|
|
470
|
+
...S(a, "part", "group-row"),
|
|
471
471
|
...i === !0 ? { "data-sticky": "" } : {},
|
|
472
472
|
ref: r,
|
|
473
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ j("th", {
|
|
474
474
|
colSpan: t ?? o.columns,
|
|
475
475
|
"data-part": "group-header",
|
|
476
476
|
"data-part-group-header": "",
|
|
477
477
|
scope: "rowgroup",
|
|
478
|
-
children: /* @__PURE__ */
|
|
478
|
+
children: /* @__PURE__ */ M("div", {
|
|
479
479
|
"data-part": "group-content",
|
|
480
480
|
"data-part-group-content": "",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ j("span", {
|
|
482
482
|
"data-part": "group-start",
|
|
483
483
|
"data-part-group-start": "",
|
|
484
484
|
children: e
|
|
485
|
-
}), n == null ? null : /* @__PURE__ */
|
|
485
|
+
}), n == null ? null : /* @__PURE__ */ j("span", {
|
|
486
486
|
"data-part": "group-end",
|
|
487
487
|
"data-part-group-end": "",
|
|
488
488
|
children: n
|
|
@@ -493,25 +493,25 @@ function et({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
|
|
|
493
493
|
}
|
|
494
494
|
function tt({ colSpan: e, ref: t, ...n }) {
|
|
495
495
|
let r = K();
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
-
...
|
|
496
|
+
return /* @__PURE__ */ j("tr", { children: /* @__PURE__ */ j("td", {
|
|
497
|
+
...S(n, "part", "empty"),
|
|
498
498
|
colSpan: e ?? r.columns,
|
|
499
499
|
ref: t
|
|
500
500
|
}) });
|
|
501
501
|
}
|
|
502
502
|
function nt({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
503
503
|
let i = K();
|
|
504
|
-
return /* @__PURE__ */
|
|
505
|
-
...
|
|
504
|
+
return /* @__PURE__ */ j("tbody", {
|
|
505
|
+
...S(r, "part", "loader"),
|
|
506
506
|
"aria-hidden": !0,
|
|
507
507
|
ref: t,
|
|
508
|
-
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */
|
|
508
|
+
children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */ j("tr", {
|
|
509
509
|
"data-part": "row",
|
|
510
510
|
"data-part-row": "",
|
|
511
|
-
children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */
|
|
511
|
+
children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */ j("td", {
|
|
512
512
|
"data-part": "cell",
|
|
513
513
|
"data-part-cell": "",
|
|
514
|
-
children: /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ j(l, {
|
|
515
515
|
inlineSize: "100%",
|
|
516
516
|
loading: !0
|
|
517
517
|
})
|
|
@@ -522,7 +522,7 @@ function nt({ children: e, ref: t, skeletonRows: n, ...r }) {
|
|
|
522
522
|
//#endregion
|
|
523
523
|
//#region src/table/table-filter.tsx
|
|
524
524
|
function rt() {
|
|
525
|
-
return /* @__PURE__ */
|
|
525
|
+
return /* @__PURE__ */ j("svg", {
|
|
526
526
|
"aria-hidden": "true",
|
|
527
527
|
fill: "none",
|
|
528
528
|
stroke: "currentColor",
|
|
@@ -530,40 +530,40 @@ function rt() {
|
|
|
530
530
|
strokeLinejoin: "round",
|
|
531
531
|
strokeWidth: "2",
|
|
532
532
|
viewBox: "0 0 24 24",
|
|
533
|
-
children: /* @__PURE__ */
|
|
533
|
+
children: /* @__PURE__ */ j("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" })
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
536
|
function it(e, t) {
|
|
537
537
|
return Ee(e) === Ee(t);
|
|
538
538
|
}
|
|
539
539
|
function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOperand: o, singleCondition: s }) {
|
|
540
|
-
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange: v, onValueChange: y, open:
|
|
540
|
+
let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange: v, onValueChange: y, open: b, portal: x, renderOperand: C, side: w, sideOffset: T, value: E } = a, D = K(), fe = Ie(), O = de(), [me, he] = k(ee ?? null), N = E === void 0 ? me : E, ge = _ ?? be(t), P = () => Se(t, ge), [F, I] = k(N ?? P()), [ve, L] = k(!1), R = b ?? ve, ye = pe(null), z = D.t, B = u ?? fe ?? "", Te = Ce(N), Ee = s ? 1 : h;
|
|
541
541
|
function U(e) {
|
|
542
|
-
|
|
542
|
+
_e(ye.current?.ownerDocument).announce(e);
|
|
543
543
|
}
|
|
544
544
|
let W = {
|
|
545
545
|
join: (e) => z(`filterJoins.${e}`),
|
|
546
546
|
operator: (e) => z(`filterOperators.${e}`)
|
|
547
547
|
};
|
|
548
548
|
function ke(e, t, n) {
|
|
549
|
-
|
|
550
|
-
controlled:
|
|
551
|
-
initial:
|
|
549
|
+
ue({
|
|
550
|
+
controlled: E,
|
|
551
|
+
initial: N,
|
|
552
552
|
equals: it,
|
|
553
553
|
onRequest: (e) => y?.(e.value, e)
|
|
554
|
-
}).request(e, t, n) &&
|
|
554
|
+
}).request(e, t, n) && he(e);
|
|
555
555
|
}
|
|
556
556
|
function Ae(e, t) {
|
|
557
|
-
|
|
557
|
+
b === void 0 && L(e), v?.(e, t), I(N ?? P());
|
|
558
558
|
}
|
|
559
|
-
let G = (e) =>
|
|
559
|
+
let G = (e) => F.conditions[e] ?? { operator: ge }, je = G(0), Me = Ee === 2 && V(t, je);
|
|
560
560
|
function Ne(e, t) {
|
|
561
561
|
let n = G(e), r = H(n.operator), i = H(t), a = {
|
|
562
562
|
operator: t,
|
|
563
563
|
...i >= 1 && r >= 1 ? { value: n.value } : {},
|
|
564
564
|
...i === 2 && r === 2 ? { end: n.end } : {}
|
|
565
565
|
};
|
|
566
|
-
|
|
566
|
+
I(De(F, e, a)), i !== r && U(z("filterOperands", {
|
|
567
567
|
operator: W.operator(t),
|
|
568
568
|
count: i
|
|
569
569
|
}));
|
|
@@ -576,7 +576,7 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
576
576
|
...i,
|
|
577
577
|
end: r
|
|
578
578
|
};
|
|
579
|
-
|
|
579
|
+
I(De(F, e, o)), e === 0 && Ee === 2 && !a && V(t, o) && U(z("filterConditionAdded"));
|
|
580
580
|
}
|
|
581
581
|
function Fe(e, n, r) {
|
|
582
582
|
let i = G(e), a = V(t, i), o = {
|
|
@@ -584,21 +584,21 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
584
584
|
value: n,
|
|
585
585
|
end: r
|
|
586
586
|
};
|
|
587
|
-
|
|
587
|
+
I(De(F, e, o)), e === 0 && Ee === 2 && !a && V(t, o) && U(z("filterConditionAdded"));
|
|
588
588
|
}
|
|
589
589
|
function q(e, t) {
|
|
590
|
-
let n = we(
|
|
590
|
+
let n = we(F);
|
|
591
591
|
ke(n, t, e), U(n ? z("filterApplied", {
|
|
592
592
|
column: B,
|
|
593
593
|
filter: xe(n, W)
|
|
594
|
-
}) : z("filterCleared", { column: B })),
|
|
594
|
+
}) : z("filterCleared", { column: B })), b === void 0 && L(!1), v?.(!1, e);
|
|
595
595
|
}
|
|
596
596
|
function J(e) {
|
|
597
|
-
|
|
597
|
+
I(P()), U(z("filterCleared", { column: B })), ke(null, "clear", e), b === void 0 && L(!1), v?.(!1, e);
|
|
598
598
|
}
|
|
599
599
|
let Le = te ?? (Te ? z("filterApplied", {
|
|
600
600
|
column: B,
|
|
601
|
-
filter: xe(
|
|
601
|
+
filter: xe(N, W)
|
|
602
602
|
}) : z("filterColumn", { column: B }).trim());
|
|
603
603
|
function Re(r) {
|
|
604
604
|
let a = G(r), s = H(a.operator), c = (e) => ({
|
|
@@ -609,14 +609,14 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
609
609
|
operator: a.operator,
|
|
610
610
|
value: (e === 0 ? a.value : a.end) ?? null
|
|
611
611
|
});
|
|
612
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ M("div", {
|
|
613
613
|
"data-operands": s,
|
|
614
614
|
"data-part": "filter-condition",
|
|
615
615
|
"data-part-filter-condition": "",
|
|
616
|
-
children: [/* @__PURE__ */
|
|
616
|
+
children: [/* @__PURE__ */ j("div", {
|
|
617
617
|
"data-part": "filter-operator",
|
|
618
618
|
"data-part-filter-operator": "",
|
|
619
|
-
children: /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ M(re, {
|
|
620
620
|
fullWidth: !0,
|
|
621
621
|
items: i.map((e) => ({
|
|
622
622
|
label: W.operator(e),
|
|
@@ -625,21 +625,21 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
625
625
|
onValueChange: (e) => Ne(r, e),
|
|
626
626
|
size: "sm",
|
|
627
627
|
value: a.operator,
|
|
628
|
-
children: [/* @__PURE__ */
|
|
628
|
+
children: [/* @__PURE__ */ j(oe, {
|
|
629
629
|
"aria-label": z("filterOperator"),
|
|
630
|
-
children: /* @__PURE__ */
|
|
631
|
-
}), /* @__PURE__ */
|
|
630
|
+
children: /* @__PURE__ */ j(se, {})
|
|
631
|
+
}), /* @__PURE__ */ j(ie, { children: i.map((e) => /* @__PURE__ */ j(ae, {
|
|
632
632
|
value: e,
|
|
633
633
|
children: W.operator(e)
|
|
634
634
|
}, e)) })]
|
|
635
635
|
})
|
|
636
|
-
}), s === 0 ? null : /* @__PURE__ */
|
|
636
|
+
}), s === 0 ? null : /* @__PURE__ */ j("div", {
|
|
637
637
|
"data-kind": t,
|
|
638
638
|
"data-part": "filter-operand",
|
|
639
639
|
"data-part-filter-operand": "",
|
|
640
|
-
...n === void 0 ||
|
|
641
|
-
...o && s === 2 && !
|
|
642
|
-
children:
|
|
640
|
+
...n === void 0 || C ? {} : { "data-operand": n },
|
|
641
|
+
...o && s === 2 && !C ? { "data-range": "" } : {},
|
|
642
|
+
children: C ? Array.from({ length: s }, (e, t) => C(c(t))) : e({
|
|
643
643
|
announce: U,
|
|
644
644
|
apply: () => q(null, "keyboard"),
|
|
645
645
|
condition: a,
|
|
@@ -650,66 +650,66 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
|
|
|
650
650
|
})]
|
|
651
651
|
}, r);
|
|
652
652
|
}
|
|
653
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ M(p, {
|
|
654
654
|
onOpenChange: (e, t) => Ae(e, t),
|
|
655
|
-
open:
|
|
655
|
+
open: R,
|
|
656
656
|
...c === void 0 ? {} : { align: c },
|
|
657
657
|
...l === void 0 ? {} : { collisionPadding: l },
|
|
658
658
|
...g === void 0 ? {} : { defaultOpen: g },
|
|
659
659
|
...ne === void 0 ? {} : { mount: ne },
|
|
660
|
-
...
|
|
661
|
-
...
|
|
662
|
-
...
|
|
663
|
-
children: [/* @__PURE__ */
|
|
664
|
-
...
|
|
660
|
+
...x === void 0 ? {} : { portal: x },
|
|
661
|
+
...w === void 0 ? {} : { side: w },
|
|
662
|
+
...T === void 0 ? {} : { sideOffset: T },
|
|
663
|
+
children: [/* @__PURE__ */ j(f, { render: (e) => /* @__PURE__ */ j("button", {
|
|
664
|
+
...S(e, "part", "filter"),
|
|
665
665
|
"aria-label": Le,
|
|
666
666
|
...Te ? { "data-filtered": "" } : {},
|
|
667
667
|
type: "button",
|
|
668
|
-
children: /* @__PURE__ */
|
|
669
|
-
}) }), /* @__PURE__ */
|
|
668
|
+
children: /* @__PURE__ */ j(rt, {})
|
|
669
|
+
}) }), /* @__PURE__ */ j(m, { children: /* @__PURE__ */ j(d, {
|
|
670
670
|
"aria-label": Le,
|
|
671
|
-
children: /* @__PURE__ */
|
|
671
|
+
children: /* @__PURE__ */ M("div", {
|
|
672
672
|
"data-kind": t,
|
|
673
673
|
"data-part": "filter-panel",
|
|
674
674
|
"data-part-filter-panel": "",
|
|
675
675
|
"data-ui": "table",
|
|
676
676
|
"data-ui-table": "",
|
|
677
|
-
id:
|
|
677
|
+
id: O,
|
|
678
678
|
ref: ye,
|
|
679
679
|
children: [
|
|
680
680
|
Re(0),
|
|
681
|
-
Me ? /* @__PURE__ */
|
|
681
|
+
Me ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("div", {
|
|
682
682
|
"data-part": "filter-join",
|
|
683
683
|
"data-part-filter-join": "",
|
|
684
|
-
children: [/* @__PURE__ */
|
|
684
|
+
children: [/* @__PURE__ */ j("span", {
|
|
685
685
|
"data-label": "",
|
|
686
686
|
children: z("filterJoin")
|
|
687
|
-
}), /* @__PURE__ */
|
|
687
|
+
}), /* @__PURE__ */ M(ce, {
|
|
688
688
|
"aria-label": z("filterJoin"),
|
|
689
|
-
onValueChange: (e) =>
|
|
689
|
+
onValueChange: (e) => I(Oe(F, e)),
|
|
690
690
|
orientation: "horizontal",
|
|
691
691
|
size: "sm",
|
|
692
|
-
value:
|
|
693
|
-
children: [/* @__PURE__ */
|
|
692
|
+
value: F.join,
|
|
693
|
+
children: [/* @__PURE__ */ j(le, {
|
|
694
694
|
value: "and",
|
|
695
695
|
children: W.join("and")
|
|
696
|
-
}), /* @__PURE__ */
|
|
696
|
+
}), /* @__PURE__ */ j(le, {
|
|
697
697
|
value: "or",
|
|
698
698
|
children: W.join("or")
|
|
699
699
|
})]
|
|
700
700
|
})]
|
|
701
701
|
}), Re(1)] }) : null,
|
|
702
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ M("div", {
|
|
703
703
|
"data-part": "filter-actions",
|
|
704
704
|
"data-part-filter-actions": "",
|
|
705
|
-
children: [/* @__PURE__ */
|
|
706
|
-
disabled: !Ce(
|
|
705
|
+
children: [/* @__PURE__ */ j(r, {
|
|
706
|
+
disabled: !Ce(F),
|
|
707
707
|
onClick: (e) => J(e),
|
|
708
708
|
size: "sm",
|
|
709
709
|
tone: "secondary",
|
|
710
710
|
variant: "ghost",
|
|
711
711
|
children: z("filterClear")
|
|
712
|
-
}), /* @__PURE__ */
|
|
712
|
+
}), /* @__PURE__ */ j(r, {
|
|
713
713
|
onClick: (e) => q(e, "pointer"),
|
|
714
714
|
size: "sm",
|
|
715
715
|
children: z("filterApply")
|
|
@@ -729,8 +729,8 @@ function Z(e, t) {
|
|
|
729
729
|
return t ?? Te(e);
|
|
730
730
|
}
|
|
731
731
|
function at(e) {
|
|
732
|
-
return /* @__PURE__ */
|
|
733
|
-
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ j(Y, {
|
|
733
|
+
body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */ j(u, {
|
|
734
734
|
"aria-label": r("filterValue"),
|
|
735
735
|
onChange: (e) => n(0, e.target.value),
|
|
736
736
|
onKeyDown: X(e),
|
|
@@ -746,8 +746,8 @@ function at(e) {
|
|
|
746
746
|
}
|
|
747
747
|
function ot(e) {
|
|
748
748
|
let { format: t, locale: n, step: r } = e;
|
|
749
|
-
return /* @__PURE__ */
|
|
750
|
-
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */
|
|
749
|
+
return /* @__PURE__ */ j(Y, {
|
|
750
|
+
body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ j(A, { children: [0, 1].slice(0, H(i.operator)).map((s) => /* @__PURE__ */ j(ne, {
|
|
751
751
|
"aria-label": H(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
|
|
752
752
|
onKeyDown: X(e),
|
|
753
753
|
onValueChange: (e) => a(s, e),
|
|
@@ -765,9 +765,9 @@ function ot(e) {
|
|
|
765
765
|
});
|
|
766
766
|
}
|
|
767
767
|
function st(e) {
|
|
768
|
-
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ? L(String(e)) : null, o = (e) =>
|
|
769
|
-
return /* @__PURE__ */
|
|
770
|
-
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => H(s.operator) === 2 ? /* @__PURE__ */
|
|
768
|
+
let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ? L(String(e)) : null, o = (e) => F(e) ? z(e) : null;
|
|
769
|
+
return /* @__PURE__ */ j(Y, {
|
|
770
|
+
body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => H(s.operator) === 2 ? /* @__PURE__ */ j(_, {
|
|
771
771
|
messages: {
|
|
772
772
|
end: u("filterTo"),
|
|
773
773
|
start: u("filterFrom")
|
|
@@ -783,7 +783,7 @@ function st(e) {
|
|
|
783
783
|
...a(r) ? { min: a(r) } : {},
|
|
784
784
|
...a(n) ? { max: a(n) } : {},
|
|
785
785
|
...i === void 0 ? {} : { presets: i }
|
|
786
|
-
}) : /* @__PURE__ */
|
|
786
|
+
}) : /* @__PURE__ */ j(g, {
|
|
787
787
|
"aria-label": u("filterValue"),
|
|
788
788
|
onKeyDown: X(e),
|
|
789
789
|
onValueChange: (e) => c(0, o(e)),
|
|
@@ -803,15 +803,15 @@ function st(e) {
|
|
|
803
803
|
function Q(e) {
|
|
804
804
|
if (!e) return null;
|
|
805
805
|
let t = String(e);
|
|
806
|
-
return
|
|
806
|
+
return ye(/^\d{2}$/.test(t) ? `${t}:00` : t);
|
|
807
807
|
}
|
|
808
808
|
function $(e) {
|
|
809
809
|
if (!e) return null;
|
|
810
810
|
let t = String(e);
|
|
811
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(t) ?
|
|
811
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(t) ? R(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? R(`${t}:00`) : R(t);
|
|
812
812
|
}
|
|
813
813
|
function ct(e) {
|
|
814
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) =>
|
|
814
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) => ve(e) ? B(e, t ?? "minute") : null, u = {
|
|
815
815
|
...t === void 0 ? {} : { granularity: t },
|
|
816
816
|
...n === void 0 ? {} : { hourCycle: n },
|
|
817
817
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -820,8 +820,8 @@ function ct(e) {
|
|
|
820
820
|
...Q(a) ? { min: Q(a) } : {},
|
|
821
821
|
...Q(i) ? { max: Q(i) } : {}
|
|
822
822
|
};
|
|
823
|
-
return /* @__PURE__ */
|
|
824
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => H(t.operator) === 2 ? /* @__PURE__ */
|
|
823
|
+
return /* @__PURE__ */ j(Y, {
|
|
824
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => H(t.operator) === 2 ? /* @__PURE__ */ j(y, {
|
|
825
825
|
messages: {
|
|
826
826
|
start: i("filterFrom"),
|
|
827
827
|
end: i("filterTo")
|
|
@@ -834,7 +834,7 @@ function ct(e) {
|
|
|
834
834
|
},
|
|
835
835
|
...u,
|
|
836
836
|
...s === void 0 ? {} : { presets: s }
|
|
837
|
-
}) : /* @__PURE__ */
|
|
837
|
+
}) : /* @__PURE__ */ j(v, {
|
|
838
838
|
"aria-label": i("filterValue"),
|
|
839
839
|
onKeyDown: X(e),
|
|
840
840
|
onValueChange: (e) => n(0, l(e)),
|
|
@@ -850,7 +850,7 @@ function ct(e) {
|
|
|
850
850
|
});
|
|
851
851
|
}
|
|
852
852
|
function lt(e) {
|
|
853
|
-
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) =>
|
|
853
|
+
let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) => I(e) ? `${z(e.date)}T${B(e.time, t ?? "minute")}` : null, u = {
|
|
854
854
|
...t === void 0 ? {} : { granularity: t },
|
|
855
855
|
...n === void 0 ? {} : { hourCycle: n },
|
|
856
856
|
...r === void 0 ? {} : { locale: r },
|
|
@@ -859,8 +859,8 @@ function lt(e) {
|
|
|
859
859
|
...$(a) ? { min: $(a) } : {},
|
|
860
860
|
...$(i) ? { max: $(i) } : {}
|
|
861
861
|
};
|
|
862
|
-
return /* @__PURE__ */
|
|
863
|
-
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => H(t.operator) === 2 ? /* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ j(Y, {
|
|
863
|
+
body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => H(t.operator) === 2 ? /* @__PURE__ */ j(te, {
|
|
864
864
|
messages: {
|
|
865
865
|
start: i("filterFrom"),
|
|
866
866
|
end: i("filterTo")
|
|
@@ -873,7 +873,7 @@ function lt(e) {
|
|
|
873
873
|
},
|
|
874
874
|
...u,
|
|
875
875
|
...o === void 0 ? {} : { presets: o }
|
|
876
|
-
}) : /* @__PURE__ */
|
|
876
|
+
}) : /* @__PURE__ */ j(ee, {
|
|
877
877
|
"aria-label": i("filterValue"),
|
|
878
878
|
onKeyDown: X(e),
|
|
879
879
|
onValueChange: (e) => n(0, l(e)),
|
|
@@ -889,17 +889,17 @@ function lt(e) {
|
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
891
|
function ut(e) {
|
|
892
|
-
return /* @__PURE__ */
|
|
893
|
-
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ j(Y, {
|
|
893
|
+
body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */ M(ce, {
|
|
894
894
|
"aria-label": n("filterValue"),
|
|
895
895
|
onValueChange: (e) => t(0, e === "true"),
|
|
896
896
|
orientation: "horizontal",
|
|
897
897
|
size: "sm",
|
|
898
898
|
value: e.value === void 0 || e.value === null ? "" : String(e.value),
|
|
899
|
-
children: [/* @__PURE__ */
|
|
899
|
+
children: [/* @__PURE__ */ j(le, {
|
|
900
900
|
value: "true",
|
|
901
901
|
children: n("true")
|
|
902
|
-
}), /* @__PURE__ */
|
|
902
|
+
}), /* @__PURE__ */ j(le, {
|
|
903
903
|
value: "false",
|
|
904
904
|
children: n("false")
|
|
905
905
|
})]
|
|
@@ -912,14 +912,14 @@ function ut(e) {
|
|
|
912
912
|
}
|
|
913
913
|
function dt(e) {
|
|
914
914
|
let { operand: t = "list", options: n = [], searchThreshold: r = 8, searchable: i } = e;
|
|
915
|
-
return /* @__PURE__ */
|
|
916
|
-
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */
|
|
915
|
+
return /* @__PURE__ */ j(Y, {
|
|
916
|
+
body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ j(ft, {
|
|
917
917
|
apply: a,
|
|
918
918
|
chosen: o.value ?? [],
|
|
919
919
|
onChange: (e) => s(0, e),
|
|
920
920
|
options: n,
|
|
921
921
|
t: c
|
|
922
|
-
}) : /* @__PURE__ */
|
|
922
|
+
}) : /* @__PURE__ */ j(pt, {
|
|
923
923
|
announce: e,
|
|
924
924
|
chosen: o.value ?? [],
|
|
925
925
|
onChange: (e) => s(0, e),
|
|
@@ -936,8 +936,8 @@ function dt(e) {
|
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
function ft({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
939
|
-
let a =
|
|
940
|
-
return /* @__PURE__ */
|
|
939
|
+
let a = de(), o = O(() => new Map(r.map((e) => [e.value, e])), [r]), s = r.length > 0;
|
|
940
|
+
return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(b, {
|
|
941
941
|
"aria-label": i("filterValue"),
|
|
942
942
|
formatLabel: (e) => o.get(e)?.label ?? e,
|
|
943
943
|
fullWidth: !0,
|
|
@@ -952,20 +952,20 @@ function ft({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
|
|
|
952
952
|
list: `${a}-options`,
|
|
953
953
|
validate: (e) => o.has(e)
|
|
954
954
|
} : {}
|
|
955
|
-
}), s ? /* @__PURE__ */
|
|
955
|
+
}), s ? /* @__PURE__ */ j("datalist", {
|
|
956
956
|
id: `${a}-options`,
|
|
957
|
-
children: r.map((e) => /* @__PURE__ */
|
|
957
|
+
children: r.map((e) => /* @__PURE__ */ j("option", {
|
|
958
958
|
value: e.value,
|
|
959
959
|
children: e.label ?? e.value
|
|
960
960
|
}, e.value))
|
|
961
961
|
}) : null] });
|
|
962
962
|
}
|
|
963
963
|
function pt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold: i, searchable: a, t: o }) {
|
|
964
|
-
let s =
|
|
965
|
-
return /* @__PURE__ */
|
|
964
|
+
let s = de(), [l, d] = k(""), f = O(() => N({ sensitivity: "base" }), []), p = (e) => e === "" ? r : r.filter((t) => f.contains(t.label ?? t.value, e)), m = p(l), h = m.filter((e) => t.includes(e.value)), g = a ?? r.length >= i;
|
|
965
|
+
return /* @__PURE__ */ M(A, { children: [g ? /* @__PURE__ */ j("div", {
|
|
966
966
|
"data-part": "filter-search",
|
|
967
967
|
"data-part-filter-search": "",
|
|
968
|
-
children: /* @__PURE__ */
|
|
968
|
+
children: /* @__PURE__ */ j(u, {
|
|
969
969
|
"aria-controls": `${s}-list`,
|
|
970
970
|
"aria-label": o("filterSearch"),
|
|
971
971
|
clearable: !0,
|
|
@@ -977,19 +977,19 @@ function pt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
977
977
|
size: "sm",
|
|
978
978
|
value: l
|
|
979
979
|
})
|
|
980
|
-
}) : null, m.length === 0 ? /* @__PURE__ */
|
|
980
|
+
}) : null, m.length === 0 ? /* @__PURE__ */ j("p", {
|
|
981
981
|
"data-part": "filter-empty",
|
|
982
982
|
"data-part-filter-empty": "",
|
|
983
983
|
children: o("filterEmpty")
|
|
984
|
-
}) : /* @__PURE__ */
|
|
984
|
+
}) : /* @__PURE__ */ M("div", {
|
|
985
985
|
"data-part": "filter-list",
|
|
986
986
|
"data-part-filter-list": "",
|
|
987
987
|
id: `${s}-list`,
|
|
988
|
-
children: [/* @__PURE__ */
|
|
988
|
+
children: [/* @__PURE__ */ M("div", {
|
|
989
989
|
"data-covering": "",
|
|
990
990
|
"data-part": "filter-option",
|
|
991
991
|
"data-part-filter-option": "",
|
|
992
|
-
children: [/* @__PURE__ */
|
|
992
|
+
children: [/* @__PURE__ */ j(c, {
|
|
993
993
|
checked: h.length > 0 && h.length === m.length,
|
|
994
994
|
indeterminate: h.length > 0 && h.length < m.length,
|
|
995
995
|
onCheckedChange: (e) => {
|
|
@@ -997,18 +997,18 @@ function pt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
|
|
|
997
997
|
n(e ? [.../* @__PURE__ */ new Set([...t, ...r])] : t.filter((e) => !r.includes(e)));
|
|
998
998
|
},
|
|
999
999
|
children: o("filterSelectAll")
|
|
1000
|
-
}), /* @__PURE__ */
|
|
1000
|
+
}), /* @__PURE__ */ j("span", {
|
|
1001
1001
|
"data-count": "",
|
|
1002
1002
|
children: m.length
|
|
1003
1003
|
})]
|
|
1004
|
-
}), m.map((e) => /* @__PURE__ */
|
|
1004
|
+
}), m.map((e) => /* @__PURE__ */ M("div", {
|
|
1005
1005
|
"data-part": "filter-option",
|
|
1006
1006
|
"data-part-filter-option": "",
|
|
1007
|
-
children: [/* @__PURE__ */
|
|
1007
|
+
children: [/* @__PURE__ */ j(c, {
|
|
1008
1008
|
checked: t.includes(e.value),
|
|
1009
1009
|
onCheckedChange: (r) => n(r ? [...t, e.value] : t.filter((t) => t !== e.value)),
|
|
1010
1010
|
children: e.label ?? e.value
|
|
1011
|
-
}), e.count === void 0 ? null : /* @__PURE__ */
|
|
1011
|
+
}), e.count === void 0 ? null : /* @__PURE__ */ j("span", {
|
|
1012
1012
|
"data-count": "",
|
|
1013
1013
|
children: e.count
|
|
1014
1014
|
})]
|