@optimum-intelligence/opti-ui 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/components/calendar/Calendar.js +29 -17
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +4 -1
- package/dist/components/data-table/DataTable.js +20 -16
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +3 -2
- package/dist/components/data-table/DataTableFilters.js +287 -171
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/DataTableRow.js +76 -72
- package/dist/components/data-table/DataTableRow.js.map +1 -1
- package/dist/components/data-table/layout.js +1 -1
- package/dist/components/data-table/layout.js.map +1 -1
- package/dist/components/data-table/types.d.ts +35 -3
- package/dist/components/data-table/useDataTable.d.ts +1 -1
- package/dist/components/data-table/useDataTable.js +312 -299
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/dialog/ConfirmDialog.d.ts +6 -1
- package/dist/components/dialog/ConfirmDialog.js +88 -85
- package/dist/components/dialog/ConfirmDialog.js.map +1 -1
- package/dist/components/table/Table.d.ts +5 -1
- package/dist/components/table/Table.js +2 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components.json +23 -4
- package/dist/fonts/JetBrainsMono-OFL.txt +93 -0
- package/dist/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/dist/fonts.css +22 -1
- package/dist/llms-full.txt +8 -4
- package/dist/opti-ui.css +135 -33
- package/dist/utils/scroll-fade.d.ts +5 -1
- package/dist/utils/scroll-fade.js +11 -1
- package/dist/utils/scroll-fade.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cx } from "../../utils/cx.js";
|
|
3
|
+
import { useDateConfig } from "../calendar/DateConfig.js";
|
|
3
4
|
import { ChevronDownIcon, FilterIcon, XIcon } from "../../icons/index.js";
|
|
4
5
|
import { Button } from "../button/Button.js";
|
|
5
6
|
import { Toggle, ToggleGroup } from "../toggle/Toggle.js";
|
|
@@ -16,88 +17,86 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
16
17
|
//#region src/components/data-table/DataTableFilters.tsx
|
|
17
18
|
/** The control of one filter: a dropdown, a toggle chip, a row of chips or a date range picker. */
|
|
18
19
|
function DataTableFilter(t0) {
|
|
19
|
-
const $ = c(
|
|
20
|
+
const $ = c(87);
|
|
20
21
|
const { id, size: t1, className } = t0;
|
|
21
22
|
const size = t1 === void 0 ? "md" : t1;
|
|
22
23
|
const table = useDataTableContext();
|
|
24
|
+
const dates = useDateConfig();
|
|
23
25
|
const t2 = table.filters;
|
|
24
|
-
let
|
|
25
|
-
let
|
|
26
|
+
let classes;
|
|
27
|
+
let filter;
|
|
28
|
+
let style;
|
|
26
29
|
let t3;
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let t7;
|
|
31
|
-
let t8;
|
|
32
|
-
let t9;
|
|
33
|
-
if ($[0] !== className || $[1] !== id || $[2] !== size || $[3] !== table) {
|
|
34
|
-
t9 = Symbol.for("react.early_return_sentinel");
|
|
30
|
+
let value;
|
|
31
|
+
if ($[0] !== className || $[1] !== dates || $[2] !== id || $[3] !== size || $[4] !== table) {
|
|
32
|
+
t3 = Symbol.for("react.early_return_sentinel");
|
|
35
33
|
bb0: {
|
|
36
|
-
let
|
|
37
|
-
if ($[
|
|
38
|
-
|
|
39
|
-
$[
|
|
40
|
-
$[
|
|
41
|
-
} else
|
|
42
|
-
|
|
34
|
+
let t4;
|
|
35
|
+
if ($[10] !== id) {
|
|
36
|
+
t4 = (candidate) => candidate.id === id;
|
|
37
|
+
$[10] = id;
|
|
38
|
+
$[11] = t4;
|
|
39
|
+
} else t4 = $[11];
|
|
40
|
+
filter = t2.find(t4);
|
|
43
41
|
if (!filter) {
|
|
44
|
-
|
|
42
|
+
t3 = null;
|
|
45
43
|
break bb0;
|
|
46
44
|
}
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
if ($[
|
|
50
|
-
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
} else
|
|
54
|
-
|
|
45
|
+
value = table.filterValues[id];
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[12] !== className) {
|
|
48
|
+
t5 = cx("oui-data-table__filter", className);
|
|
49
|
+
$[12] = className;
|
|
50
|
+
$[13] = t5;
|
|
51
|
+
} else t5 = $[13];
|
|
52
|
+
classes = t5;
|
|
53
|
+
style = filter.width ? { "--_filter-width": filter.width } : void 0;
|
|
55
54
|
if (filter.type === "toggle") {
|
|
56
|
-
let
|
|
57
|
-
if ($[
|
|
58
|
-
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
} else
|
|
63
|
-
|
|
55
|
+
let t6;
|
|
56
|
+
if ($[14] !== id || $[15] !== table) {
|
|
57
|
+
t6 = (pressed) => table.setFilterValue(id, pressed || void 0);
|
|
58
|
+
$[14] = id;
|
|
59
|
+
$[15] = table;
|
|
60
|
+
$[16] = t6;
|
|
61
|
+
} else t6 = $[16];
|
|
62
|
+
t3 = /* @__PURE__ */ jsx(Toggle, {
|
|
64
63
|
size,
|
|
65
64
|
className: classes,
|
|
66
65
|
pressed: value !== void 0,
|
|
67
|
-
onPressedChange:
|
|
66
|
+
onPressedChange: t6,
|
|
68
67
|
children: filter.label
|
|
69
68
|
});
|
|
70
69
|
break bb0;
|
|
71
70
|
}
|
|
72
71
|
if (filter.type === "chips") {
|
|
73
|
-
const
|
|
74
|
-
let
|
|
75
|
-
if ($[
|
|
76
|
-
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
} else
|
|
80
|
-
let
|
|
81
|
-
if ($[
|
|
82
|
-
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
} else
|
|
86
|
-
let
|
|
87
|
-
if ($[
|
|
88
|
-
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
} else
|
|
93
|
-
|
|
72
|
+
const t6 = filter.label;
|
|
73
|
+
let t7;
|
|
74
|
+
if ($[17] !== className) {
|
|
75
|
+
t7 = cx("oui-data-table__chips", className);
|
|
76
|
+
$[17] = className;
|
|
77
|
+
$[18] = t7;
|
|
78
|
+
} else t7 = $[18];
|
|
79
|
+
let t8;
|
|
80
|
+
if ($[19] !== value) {
|
|
81
|
+
t8 = value ?? [];
|
|
82
|
+
$[19] = value;
|
|
83
|
+
$[20] = t8;
|
|
84
|
+
} else t8 = $[20];
|
|
85
|
+
let t9;
|
|
86
|
+
if ($[21] !== id || $[22] !== table) {
|
|
87
|
+
t9 = (next) => table.setFilterValue(id, next.length ? next : void 0);
|
|
88
|
+
$[21] = id;
|
|
89
|
+
$[22] = table;
|
|
90
|
+
$[23] = t9;
|
|
91
|
+
} else t9 = $[23];
|
|
92
|
+
t3 = /* @__PURE__ */ jsx(ToggleGroup, {
|
|
94
93
|
multiple: true,
|
|
95
94
|
size,
|
|
96
95
|
variant: "outline",
|
|
97
|
-
"aria-label":
|
|
98
|
-
className:
|
|
99
|
-
value:
|
|
100
|
-
onValueChange:
|
|
96
|
+
"aria-label": t6,
|
|
97
|
+
className: t7,
|
|
98
|
+
value: t8,
|
|
99
|
+
onValueChange: t9,
|
|
101
100
|
children: filter.options.map((option) => {
|
|
102
101
|
const count = filter.counts && /* @__PURE__ */ jsx("span", {
|
|
103
102
|
className: "oui-data-table__filter-count",
|
|
@@ -117,136 +116,253 @@ function DataTableFilter(t0) {
|
|
|
117
116
|
}
|
|
118
117
|
if (filter.type === "dateRange") {
|
|
119
118
|
const range = value ?? null;
|
|
120
|
-
let
|
|
121
|
-
if ($[
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
let t6;
|
|
120
|
+
if ($[24] !== dates.formats || $[25] !== dates.locale || $[26] !== table.locale) {
|
|
121
|
+
const day = (date) => formatDate(date, {
|
|
122
|
+
formats: dates.formats,
|
|
123
|
+
granularity: "day",
|
|
124
|
+
locale: table.locale ?? dates.locale
|
|
125
|
+
});
|
|
126
|
+
t6 = (next_0) => `${day(next_0.start)} – ${day(next_0.end)}`;
|
|
127
|
+
$[24] = dates.formats;
|
|
128
|
+
$[25] = dates.locale;
|
|
129
|
+
$[26] = table.locale;
|
|
130
|
+
$[27] = t6;
|
|
131
|
+
} else t6 = $[27];
|
|
132
|
+
const text = t6;
|
|
133
|
+
const sized = (content) => filter.width ? content : /* @__PURE__ */ jsxs("span", {
|
|
134
|
+
className: "oui-data-table__range",
|
|
135
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
136
|
+
className: "oui-data-table__range-sizer",
|
|
137
|
+
"aria-hidden": true,
|
|
138
|
+
children: text({
|
|
139
|
+
start: "2000-12-28",
|
|
140
|
+
end: "2000-12-31"
|
|
141
|
+
})
|
|
142
|
+
}), /* @__PURE__ */ jsx("span", { children: content })]
|
|
143
|
+
});
|
|
144
|
+
let t7;
|
|
145
|
+
if ($[28] !== sized || $[29] !== text) {
|
|
146
|
+
t7 = (next_1) => sized(text(next_1));
|
|
147
|
+
$[28] = sized;
|
|
148
|
+
$[29] = text;
|
|
149
|
+
$[30] = t7;
|
|
150
|
+
} else t7 = $[30];
|
|
151
|
+
let t8;
|
|
152
|
+
if ($[31] !== id || $[32] !== table) {
|
|
153
|
+
t8 = (next_2) => table.setFilterValue(id, next_2 ?? void 0);
|
|
154
|
+
$[31] = id;
|
|
155
|
+
$[32] = table;
|
|
156
|
+
$[33] = t8;
|
|
157
|
+
} else t8 = $[33];
|
|
158
|
+
const t9 = range ? `${filter.label}: ${text(range)}` : filter.label;
|
|
159
|
+
let t10;
|
|
160
|
+
if ($[34] !== style || $[35] !== t9) {
|
|
161
|
+
t10 = {
|
|
162
|
+
"aria-label": t9,
|
|
163
|
+
style
|
|
164
|
+
};
|
|
165
|
+
$[34] = style;
|
|
166
|
+
$[35] = t9;
|
|
167
|
+
$[36] = t10;
|
|
168
|
+
} else t10 = $[36];
|
|
169
|
+
t3 = /* @__PURE__ */ jsx(DateRangePicker, {
|
|
128
170
|
size,
|
|
129
171
|
className: classes,
|
|
130
|
-
placeholder: filter.label,
|
|
172
|
+
placeholder: sized(filter.label),
|
|
173
|
+
formatValue: t7,
|
|
131
174
|
value: range,
|
|
132
|
-
onValueChange:
|
|
175
|
+
onValueChange: t8,
|
|
133
176
|
presets: filter.presets,
|
|
134
177
|
min: filter.min,
|
|
135
178
|
max: filter.max,
|
|
136
179
|
locale: table.locale,
|
|
137
|
-
triggerProps:
|
|
180
|
+
triggerProps: t10
|
|
138
181
|
});
|
|
139
182
|
break bb0;
|
|
140
183
|
}
|
|
141
|
-
T1 = Select.Root;
|
|
142
|
-
t5 = [{
|
|
143
|
-
value: null,
|
|
144
|
-
label: table.labels.filterAll
|
|
145
|
-
}, ...filter.options];
|
|
146
|
-
t6 = value ?? null;
|
|
147
|
-
if ($[30] !== id || $[31] !== table) {
|
|
148
|
-
t7 = (next_1) => table.setFilterValue(id, next_1 ?? void 0);
|
|
149
|
-
$[30] = id;
|
|
150
|
-
$[31] = table;
|
|
151
|
-
$[32] = t7;
|
|
152
|
-
} else t7 = $[32];
|
|
153
|
-
let t12;
|
|
154
|
-
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
155
|
-
t12 = /* @__PURE__ */ jsx(Select.Value, {});
|
|
156
|
-
$[33] = t12;
|
|
157
|
-
} else t12 = $[33];
|
|
158
|
-
let t13;
|
|
159
|
-
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
160
|
-
t13 = /* @__PURE__ */ jsx("span", {
|
|
161
|
-
className: "oui-select__icon",
|
|
162
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
163
|
-
});
|
|
164
|
-
$[34] = t13;
|
|
165
|
-
} else t13 = $[34];
|
|
166
|
-
t8 = /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
167
|
-
size,
|
|
168
|
-
className: classes,
|
|
169
|
-
"data-active": value !== void 0 ? "" : void 0,
|
|
170
|
-
children: [
|
|
171
|
-
/* @__PURE__ */ jsx("span", {
|
|
172
|
-
className: "oui-data-table__filter-label",
|
|
173
|
-
children: filter.label
|
|
174
|
-
}),
|
|
175
|
-
t12,
|
|
176
|
-
t13
|
|
177
|
-
]
|
|
178
|
-
});
|
|
179
|
-
T0 = Select.Content;
|
|
180
|
-
if ($[35] !== table.labels.filterAll) {
|
|
181
|
-
t3 = /* @__PURE__ */ jsx(Select.Item, {
|
|
182
|
-
value: null,
|
|
183
|
-
children: table.labels.filterAll
|
|
184
|
-
});
|
|
185
|
-
$[35] = table.labels.filterAll;
|
|
186
|
-
$[36] = t3;
|
|
187
|
-
} else t3 = $[36];
|
|
188
|
-
t4 = filter.options.map(_temp);
|
|
189
184
|
}
|
|
190
185
|
$[0] = className;
|
|
191
|
-
$[1] =
|
|
192
|
-
$[2] =
|
|
193
|
-
$[3] =
|
|
194
|
-
$[4] =
|
|
195
|
-
$[5] =
|
|
196
|
-
$[6] =
|
|
197
|
-
$[7] =
|
|
198
|
-
$[8] =
|
|
199
|
-
$[9] =
|
|
200
|
-
$[10] = t7;
|
|
201
|
-
$[11] = t8;
|
|
202
|
-
$[12] = t9;
|
|
186
|
+
$[1] = dates;
|
|
187
|
+
$[2] = id;
|
|
188
|
+
$[3] = size;
|
|
189
|
+
$[4] = table;
|
|
190
|
+
$[5] = classes;
|
|
191
|
+
$[6] = filter;
|
|
192
|
+
$[7] = style;
|
|
193
|
+
$[8] = t3;
|
|
194
|
+
$[9] = value;
|
|
203
195
|
} else {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
t6 = $[9];
|
|
210
|
-
t7 = $[10];
|
|
211
|
-
t8 = $[11];
|
|
212
|
-
t9 = $[12];
|
|
196
|
+
classes = $[5];
|
|
197
|
+
filter = $[6];
|
|
198
|
+
style = $[7];
|
|
199
|
+
t3 = $[8];
|
|
200
|
+
value = $[9];
|
|
213
201
|
}
|
|
214
|
-
if (
|
|
215
|
-
let
|
|
216
|
-
if ($[37] !==
|
|
217
|
-
|
|
218
|
-
$[37] =
|
|
219
|
-
$[38] =
|
|
202
|
+
if (t3 !== Symbol.for("react.early_return_sentinel")) return t3;
|
|
203
|
+
let t4;
|
|
204
|
+
if ($[37] !== filter.multiple || $[38] !== value) {
|
|
205
|
+
t4 = filter.multiple ? value ?? [] : [];
|
|
206
|
+
$[37] = filter.multiple;
|
|
207
|
+
$[38] = value;
|
|
220
208
|
$[39] = t4;
|
|
221
|
-
|
|
222
|
-
|
|
209
|
+
} else t4 = $[39];
|
|
210
|
+
const chosen = t4;
|
|
211
|
+
const t5 = value !== void 0 ? "" : void 0;
|
|
212
|
+
let t6;
|
|
213
|
+
if ($[40] !== filter.label) {
|
|
214
|
+
t6 = /* @__PURE__ */ jsx("span", {
|
|
215
|
+
className: "oui-data-table__filter-label",
|
|
216
|
+
children: filter.label
|
|
217
|
+
});
|
|
218
|
+
$[40] = filter.label;
|
|
219
|
+
$[41] = t6;
|
|
220
|
+
} else t6 = $[41];
|
|
221
|
+
let t7;
|
|
222
|
+
if ($[42] !== chosen || $[43] !== filter.multiple || $[44] !== filter.options || $[45] !== table.labels) {
|
|
223
|
+
t7 = filter.multiple ? /* @__PURE__ */ jsx(Select.Value, { children: () => chosen.length ? [optionText(filter.options.find((option_0) => option_0.value === chosen[0]), chosen[0]), chosen.length > 1 && ` +${chosen.length - 1}`] : table.labels.filterAll }) : /* @__PURE__ */ jsx(Select.Value, {});
|
|
224
|
+
$[42] = chosen;
|
|
225
|
+
$[43] = filter.multiple;
|
|
226
|
+
$[44] = filter.options;
|
|
227
|
+
$[45] = table.labels;
|
|
228
|
+
$[46] = t7;
|
|
229
|
+
} else t7 = $[46];
|
|
230
|
+
let t8;
|
|
231
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
232
|
+
t8 = /* @__PURE__ */ jsx("span", {
|
|
233
|
+
className: "oui-select__icon",
|
|
234
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
235
|
+
});
|
|
236
|
+
$[47] = t8;
|
|
237
|
+
} else t8 = $[47];
|
|
238
|
+
let t9;
|
|
239
|
+
if ($[48] !== classes || $[49] !== size || $[50] !== style || $[51] !== t5 || $[52] !== t6 || $[53] !== t7) {
|
|
240
|
+
t9 = /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
241
|
+
size,
|
|
242
|
+
className: classes,
|
|
243
|
+
style,
|
|
244
|
+
"data-active": t5,
|
|
245
|
+
children: [
|
|
246
|
+
t6,
|
|
247
|
+
t7,
|
|
248
|
+
t8
|
|
249
|
+
]
|
|
250
|
+
});
|
|
251
|
+
$[48] = classes;
|
|
252
|
+
$[49] = size;
|
|
253
|
+
$[50] = style;
|
|
254
|
+
$[51] = t5;
|
|
255
|
+
$[52] = t6;
|
|
256
|
+
$[53] = t7;
|
|
257
|
+
$[54] = t9;
|
|
258
|
+
} else t9 = $[54];
|
|
259
|
+
const trigger = t9;
|
|
260
|
+
let t10;
|
|
261
|
+
if ($[55] !== filter.options) {
|
|
262
|
+
t10 = filter.options.map(_temp);
|
|
263
|
+
$[55] = filter.options;
|
|
264
|
+
$[56] = t10;
|
|
265
|
+
} else t10 = $[56];
|
|
266
|
+
const items = t10;
|
|
267
|
+
if (filter.multiple) {
|
|
268
|
+
let t11;
|
|
269
|
+
if ($[57] !== id || $[58] !== table) {
|
|
270
|
+
t11 = (next_3) => table.setFilterValue(id, next_3.length ? next_3 : void 0);
|
|
271
|
+
$[57] = id;
|
|
272
|
+
$[58] = table;
|
|
273
|
+
$[59] = t11;
|
|
274
|
+
} else t11 = $[59];
|
|
275
|
+
let t12;
|
|
276
|
+
if ($[60] !== items) {
|
|
277
|
+
t12 = /* @__PURE__ */ jsx(Select.Content, { children: items });
|
|
278
|
+
$[60] = items;
|
|
279
|
+
$[61] = t12;
|
|
280
|
+
} else t12 = $[61];
|
|
281
|
+
let t13;
|
|
282
|
+
if ($[62] !== chosen || $[63] !== filter.options || $[64] !== t11 || $[65] !== t12 || $[66] !== trigger) {
|
|
283
|
+
t13 = /* @__PURE__ */ jsxs(Select.Root, {
|
|
284
|
+
multiple: true,
|
|
285
|
+
items: filter.options,
|
|
286
|
+
value: chosen,
|
|
287
|
+
onValueChange: t11,
|
|
288
|
+
children: [trigger, t12]
|
|
289
|
+
});
|
|
290
|
+
$[62] = chosen;
|
|
291
|
+
$[63] = filter.options;
|
|
292
|
+
$[64] = t11;
|
|
293
|
+
$[65] = t12;
|
|
294
|
+
$[66] = trigger;
|
|
295
|
+
$[67] = t13;
|
|
296
|
+
} else t13 = $[67];
|
|
297
|
+
return t13;
|
|
298
|
+
}
|
|
223
299
|
let t11;
|
|
224
|
-
if ($[
|
|
225
|
-
t11 =
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
300
|
+
if ($[68] !== table.labels.filterAll) {
|
|
301
|
+
t11 = {
|
|
302
|
+
value: null,
|
|
303
|
+
label: table.labels.filterAll
|
|
304
|
+
};
|
|
305
|
+
$[68] = table.labels.filterAll;
|
|
306
|
+
$[69] = t11;
|
|
307
|
+
} else t11 = $[69];
|
|
308
|
+
let t12;
|
|
309
|
+
if ($[70] !== filter.options || $[71] !== t11) {
|
|
310
|
+
t12 = [t11, ...filter.options];
|
|
311
|
+
$[70] = filter.options;
|
|
312
|
+
$[71] = t11;
|
|
313
|
+
$[72] = t12;
|
|
314
|
+
} else t12 = $[72];
|
|
315
|
+
const t13 = value ?? null;
|
|
316
|
+
let t14;
|
|
317
|
+
if ($[73] !== id || $[74] !== table) {
|
|
318
|
+
t14 = (next_4) => table.setFilterValue(id, next_4 ?? void 0);
|
|
319
|
+
$[73] = id;
|
|
320
|
+
$[74] = table;
|
|
321
|
+
$[75] = t14;
|
|
322
|
+
} else t14 = $[75];
|
|
323
|
+
let t15;
|
|
324
|
+
if ($[76] !== table.labels.filterAll) {
|
|
325
|
+
t15 = /* @__PURE__ */ jsx(Select.Item, {
|
|
326
|
+
value: null,
|
|
327
|
+
children: table.labels.filterAll
|
|
328
|
+
});
|
|
329
|
+
$[76] = table.labels.filterAll;
|
|
330
|
+
$[77] = t15;
|
|
331
|
+
} else t15 = $[77];
|
|
332
|
+
let t16;
|
|
333
|
+
if ($[78] !== items || $[79] !== t15) {
|
|
334
|
+
t16 = /* @__PURE__ */ jsxs(Select.Content, { children: [t15, items] });
|
|
335
|
+
$[78] = items;
|
|
336
|
+
$[79] = t15;
|
|
337
|
+
$[80] = t16;
|
|
338
|
+
} else t16 = $[80];
|
|
339
|
+
let t17;
|
|
340
|
+
if ($[81] !== t12 || $[82] !== t13 || $[83] !== t14 || $[84] !== t16 || $[85] !== trigger) {
|
|
341
|
+
t17 = /* @__PURE__ */ jsxs(Select.Root, {
|
|
342
|
+
items: t12,
|
|
343
|
+
value: t13,
|
|
344
|
+
onValueChange: t14,
|
|
345
|
+
children: [trigger, t16]
|
|
230
346
|
});
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return t11;
|
|
347
|
+
$[81] = t12;
|
|
348
|
+
$[82] = t13;
|
|
349
|
+
$[83] = t14;
|
|
350
|
+
$[84] = t16;
|
|
351
|
+
$[85] = trigger;
|
|
352
|
+
$[86] = t17;
|
|
353
|
+
} else t17 = $[86];
|
|
354
|
+
return t17;
|
|
240
355
|
}
|
|
241
|
-
function _temp(
|
|
356
|
+
function _temp(option_1) {
|
|
242
357
|
return /* @__PURE__ */ jsx(Select.Item, {
|
|
243
|
-
value:
|
|
244
|
-
children:
|
|
245
|
-
},
|
|
358
|
+
value: option_1.value,
|
|
359
|
+
children: option_1.label
|
|
360
|
+
}, option_1.value);
|
|
246
361
|
}
|
|
247
362
|
/**
|
|
248
|
-
* The filters of the table, in a wrapping row. Children are added after the filters. Selects
|
|
249
|
-
*
|
|
363
|
+
* The filters of the table, in a wrapping row. Children are added after the filters. Selects in the row have
|
|
364
|
+
* a fixed width (`--oui-data-table-filter-width`), and date ranges the width of a full range, so picking a
|
|
365
|
+
* value moves nothing. A filter's `width` overrides both.
|
|
250
366
|
*/
|
|
251
367
|
function DataTableFilters(t0) {
|
|
252
368
|
const $ = c(26);
|
|
@@ -629,7 +745,7 @@ function valueText(filter, value) {
|
|
|
629
745
|
const range = value;
|
|
630
746
|
return `${formatDate(range.start)} – ${formatDate(range.end)}`;
|
|
631
747
|
}
|
|
632
|
-
if (filter.type === "chips") {
|
|
748
|
+
if (filter.type === "chips" || filter.multiple) {
|
|
633
749
|
const items = value;
|
|
634
750
|
return /* @__PURE__ */ jsxs(Fragment, { children: [items.slice(0, 2).map((item, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [index > 0 && ", ", option(item)] }, item)), items.length > 2 && ` +${items.length - 2}`] });
|
|
635
751
|
}
|