@serkonda7/solid-components 0.3.0 → 0.3.2
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 +1 -1
- package/dist/combobox.d.ts +5 -2
- package/dist/index.js +262 -252
- package/dist/styles.css +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ export default defineConfig({ plugins: [tablerIcons(), solid()] })
|
|
|
36
36
|
These components are available:
|
|
37
37
|
- `DataTable` - generic table with optional sorting, actions, loading, empty states, and column customizer.
|
|
38
38
|
- `FilterTable` - `DataTable` with filtering: quick search, a grouped filter form, and removable filter pills.
|
|
39
|
-
- `Combobox` - searchable, accessible dropdown with keyboard navigation, option icons, a detail column, and an optional "Add …" entry.
|
|
39
|
+
- `Combobox` - searchable, accessible dropdown with keyboard navigation, option icons and previews, a detail column, and an optional "Add …" entry.
|
|
40
40
|
- `SearchBar` - search input with clear button and a global Ctrl/Cmd+K focus shortcut.
|
|
41
41
|
|
|
42
42
|
For the full API, examples, and agent notes, see [docs.md](docs.md).
|
package/dist/combobox.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export interface ComboboxOption {
|
|
|
11
11
|
detail?: string;
|
|
12
12
|
/** Glyph shown before the label, in the list and in the closed input. */
|
|
13
13
|
icon?: ComboboxIcon;
|
|
14
|
+
/** Rendered in a panel beside the open list while this option is highlighted. */
|
|
15
|
+
preview?: Component;
|
|
14
16
|
}
|
|
15
17
|
export interface ComboboxProps {
|
|
16
18
|
/** Input id, for pairing with an external `<label for>`. Generated when omitted. */
|
|
@@ -44,7 +46,8 @@ export interface ComboboxProps {
|
|
|
44
46
|
/**
|
|
45
47
|
* Searchable dropdown of `options`, with an optional leading empty choice.
|
|
46
48
|
* A text combobox: typing filters the options by label and detail, arrow keys
|
|
47
|
-
* move the highlight (wrapping around), Enter picks it,
|
|
48
|
-
* input shows the selected label while closed;
|
|
49
|
+
* move the highlight (wrapping around), Enter picks it, Tab picks it and moves
|
|
50
|
+
* focus on, Escape closes. The input shows the selected label while closed;
|
|
51
|
+
* the value sits in `data-value`.
|
|
49
52
|
*/
|
|
50
53
|
export declare function Combobox(props: ComboboxProps): JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dynamic as e, className as t, createComponent as n, delegateEvents as r, effect as i, insert as a, memo as o, mergeProps as s, setAttribute as c, spread as l, style as u, template as d, use as f } from "solid-js/web";
|
|
2
|
-
import { For as p, Show as m, children as
|
|
2
|
+
import { For as p, Show as m, children as h, createEffect as g, createMemo as _, createSignal as v, createUniqueId as y, on as b, onCleanup as x, onMount as S, splitProps as C, untrack as w } from "solid-js";
|
|
3
3
|
//#region node_modules/@tabler/icons-solidjs/dist/source/defaultAttributes.js
|
|
4
|
-
var
|
|
4
|
+
var T = {
|
|
5
5
|
outline: {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: 24,
|
|
@@ -21,9 +21,9 @@ var w = {
|
|
|
21
21
|
fill: "currentColor",
|
|
22
22
|
stroke: "none"
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, E = /*#__PURE__*/ d("<svg>"), D = /*#__PURE__*/ d("<title>"), O = (t, r, i, c) => {
|
|
25
25
|
let u = (i) => {
|
|
26
|
-
let [u, d] =
|
|
26
|
+
let [u, d] = C(i, [
|
|
27
27
|
"color",
|
|
28
28
|
"size",
|
|
29
29
|
"stroke",
|
|
@@ -31,9 +31,9 @@ var w = {
|
|
|
31
31
|
"title",
|
|
32
32
|
"children",
|
|
33
33
|
"class"
|
|
34
|
-
]), f =
|
|
34
|
+
]), f = T[t], p = u.stroke ?? u.strokeWidth;
|
|
35
35
|
return (() => {
|
|
36
|
-
var i =
|
|
36
|
+
var i = E();
|
|
37
37
|
return l(i, s(f, d, {
|
|
38
38
|
get width() {
|
|
39
39
|
return o(() => u.size != null)() ? u.size : f.width;
|
|
@@ -50,58 +50,58 @@ var w = {
|
|
|
50
50
|
}), !0, !0), a(i, (() => {
|
|
51
51
|
var e = o(() => u.title != null);
|
|
52
52
|
return () => e() && (() => {
|
|
53
|
-
var e =
|
|
53
|
+
var e = D();
|
|
54
54
|
return a(e, () => u.title), e;
|
|
55
55
|
})();
|
|
56
56
|
})(), null), a(i, () => c.map(([t, r]) => n(e, s({ component: t }, r))), null), a(i, () => u.children, null), i;
|
|
57
57
|
})();
|
|
58
58
|
};
|
|
59
59
|
return u.displayName = `${i}`, u;
|
|
60
|
-
},
|
|
61
|
-
function
|
|
62
|
-
let s, l, u =
|
|
60
|
+
}, ee = O("outline", "chevron-down", "ChevronDown", [["path", { d: "M6 9l6 6l6 -6" }]]), k = O("outline", "plus", "Plus", [["path", { d: "M12 5l0 14" }], ["path", { d: "M5 12l14 0" }]]), te = /*#__PURE__*/ d("<span class=combobox-detail>"), A = /*#__PURE__*/ d("<div role=option class=combobox-option><span class=combobox-option-label>"), j = /*#__PURE__*/ d("<span class=combobox-option-icon aria-hidden=true>"), ne = /*#__PURE__*/ d("<div role=option class=\"combobox-option combobox-option-add\">"), M = /*#__PURE__*/ d("<div class=combobox-list role=listbox>"), N = /*#__PURE__*/ d("<div class=combobox-empty>"), P = /*#__PURE__*/ d("<span class=combobox-value aria-hidden=true><span class=combobox-option-label></span><span class=combobox-detail>"), F = /*#__PURE__*/ d("<div><input class=combobox-input role=combobox aria-autocomplete=list autocomplete=off>"), I = /*#__PURE__*/ d("<span class=combobox-icon aria-hidden=true>"), re = /*#__PURE__*/ d("<div class=combobox-preview aria-hidden=true>");
|
|
61
|
+
function L(r) {
|
|
62
|
+
let s, l, u = y(), d = () => r.id ?? u, h = () => `${d()}-listbox`, b = (e) => `${d()}-option-${e}`, [x, C] = v(!1), [w, T] = v(""), [E, D] = v(0), O = _(() => r.emptyLabel === void 0 ? r.options : [{
|
|
63
63
|
value: "",
|
|
64
64
|
label: r.emptyLabel
|
|
65
|
-
}, ...r.options]),
|
|
66
|
-
let e =
|
|
67
|
-
return e === "" ?
|
|
68
|
-
}), ie = () => r.options.some((e) => e.detail !== void 0),
|
|
69
|
-
|
|
65
|
+
}, ...r.options]), L = _(() => r.value === "" ? void 0 : O().find((e) => String(e.value) === r.value)), R = _(() => {
|
|
66
|
+
let e = w().trim().toLowerCase();
|
|
67
|
+
return e === "" ? O() : O().filter((t) => t.label.toLowerCase().includes(e) || (t.detail?.toLowerCase().includes(e) ?? !1));
|
|
68
|
+
}), ie = () => r.options.some((e) => e.detail !== void 0), z = () => R().length, ae = () => R().length + +!!r.onAdd, oe = () => !r.disabled && r.onChange !== void 0, B = () => R()[E()]?.preview;
|
|
69
|
+
S(() => {
|
|
70
70
|
r.autofocus === !0 && s?.focus();
|
|
71
|
-
}),
|
|
72
|
-
|
|
71
|
+
}), g(() => {
|
|
72
|
+
x() && l?.querySelector(`[data-index="${E()}"]`)?.scrollIntoView({ block: "nearest" });
|
|
73
73
|
});
|
|
74
|
-
function
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
let e =
|
|
78
|
-
|
|
74
|
+
function V() {
|
|
75
|
+
if (x() || !oe()) return;
|
|
76
|
+
T("");
|
|
77
|
+
let e = O().findIndex((e) => String(e.value) === r.value);
|
|
78
|
+
D(Math.max(e, 0)), C(!0), r.onOpen?.();
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
if (
|
|
82
|
-
r.onAdd(
|
|
80
|
+
function H(e) {
|
|
81
|
+
if (C(!1), r.onAdd && e === z()) {
|
|
82
|
+
r.onAdd(w().trim());
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
let t =
|
|
85
|
+
let t = R()[e];
|
|
86
86
|
t && String(t.value) !== r.value && r.onChange?.(String(t.value));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function se(e) {
|
|
89
89
|
let t = ae();
|
|
90
|
-
|
|
90
|
+
x() ? t > 0 && D((E() + e + t) % t) : V();
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
92
|
+
function U(e) {
|
|
93
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), se(e.key === "ArrowDown" ? 1 : -1)) : x() && (e.key === "Enter" ? (e.preventDefault(), H(E())) : e.key === "Tab" ? r.onAdd && E() === z() ? C(!1) : H(E()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), C(!1)));
|
|
94
94
|
}
|
|
95
|
-
let
|
|
96
|
-
function
|
|
95
|
+
let W = () => x() ? L()?.label ?? r.emptyLabel ?? r.searchLabel ?? "Search" : r.emptyLabel ?? r.placeholder;
|
|
96
|
+
function G(t, o) {
|
|
97
97
|
return (() => {
|
|
98
|
-
var s =
|
|
99
|
-
return s.$$click = () =>
|
|
98
|
+
var s = A(), l = s.firstChild;
|
|
99
|
+
return s.$$click = () => H(o()), s.$$mousemove = () => D(o()), s.$$mousedown = (e) => e.preventDefault(), a(l, n(m, {
|
|
100
100
|
get when() {
|
|
101
101
|
return t.icon;
|
|
102
102
|
},
|
|
103
103
|
children: (t) => (() => {
|
|
104
|
-
var r =
|
|
104
|
+
var r = j();
|
|
105
105
|
return a(r, n(e, {
|
|
106
106
|
get component() {
|
|
107
107
|
return t();
|
|
@@ -114,11 +114,11 @@ function I(r) {
|
|
|
114
114
|
return t.detail;
|
|
115
115
|
},
|
|
116
116
|
get children() {
|
|
117
|
-
var e =
|
|
117
|
+
var e = te();
|
|
118
118
|
return a(e, () => t.detail), e;
|
|
119
119
|
}
|
|
120
120
|
}), null), i((e) => {
|
|
121
|
-
var n =
|
|
121
|
+
var n = b(o()), i = o(), a = String(t.value) === r.value, l = o() === E(), u = t.value === "";
|
|
122
122
|
return n !== e.e && c(s, "id", e.e = n), i !== e.t && c(s, "data-index", e.t = i), a !== e.a && c(s, "aria-selected", e.a = a), l !== e.o && s.classList.toggle("combobox-option-active", e.o = l), u !== e.i && s.classList.toggle("combobox-option-empty", e.i = u), e;
|
|
123
123
|
}, {
|
|
124
124
|
e: void 0,
|
|
@@ -129,14 +129,14 @@ function I(r) {
|
|
|
129
129
|
}), s;
|
|
130
130
|
})();
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function K() {
|
|
133
133
|
return (() => {
|
|
134
|
-
var e =
|
|
135
|
-
return e.$$click = () =>
|
|
134
|
+
var e = ne();
|
|
135
|
+
return e.$$click = () => H(z()), e.$$mousemove = () => D(z()), e.$$mousedown = (e) => e.preventDefault(), c(e, "aria-selected", !1), a(e, n(k, {
|
|
136
136
|
size: 14,
|
|
137
137
|
"aria-hidden": "true"
|
|
138
138
|
}), null), a(e, () => r.addLabel ?? "Add", null), i((t) => {
|
|
139
|
-
var n =
|
|
139
|
+
var n = b(z()), r = z(), i = z() === E();
|
|
140
140
|
return n !== t.e && c(e, "id", t.e = n), r !== t.t && c(e, "data-index", t.t = r), i !== t.a && e.classList.toggle("combobox-option-active", t.a = i), t;
|
|
141
141
|
}, {
|
|
142
142
|
e: void 0,
|
|
@@ -145,29 +145,29 @@ function I(r) {
|
|
|
145
145
|
}), e;
|
|
146
146
|
})();
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function q() {
|
|
149
149
|
return (() => {
|
|
150
|
-
var e =
|
|
150
|
+
var e = M(), t = l;
|
|
151
151
|
return typeof t == "function" ? f(t, e) : l = e, a(e, n(p, {
|
|
152
152
|
get each() {
|
|
153
|
-
return
|
|
153
|
+
return R();
|
|
154
154
|
},
|
|
155
155
|
get fallback() {
|
|
156
156
|
return (() => {
|
|
157
|
-
var e =
|
|
157
|
+
var e = N();
|
|
158
158
|
return a(e, () => r.noMatchesLabel ?? "No matching objects"), e;
|
|
159
159
|
})();
|
|
160
160
|
},
|
|
161
|
-
children:
|
|
161
|
+
children: G
|
|
162
162
|
}), null), a(e, n(m, {
|
|
163
163
|
get when() {
|
|
164
164
|
return r.onAdd;
|
|
165
165
|
},
|
|
166
166
|
get children() {
|
|
167
|
-
return
|
|
167
|
+
return K();
|
|
168
168
|
}
|
|
169
169
|
}), null), i((t) => {
|
|
170
|
-
var n = !!ie(), r =
|
|
170
|
+
var n = !!ie(), r = h();
|
|
171
171
|
return n !== t.e && e.classList.toggle("combobox-list-detail", t.e = n), r !== t.t && c(e, "id", t.t = r), t;
|
|
172
172
|
}, {
|
|
173
173
|
e: void 0,
|
|
@@ -176,18 +176,18 @@ function I(r) {
|
|
|
176
176
|
})();
|
|
177
177
|
}
|
|
178
178
|
return (() => {
|
|
179
|
-
var l =
|
|
180
|
-
u.addEventListener("blur", () =>
|
|
179
|
+
var l = F(), u = l.firstChild;
|
|
180
|
+
u.addEventListener("blur", () => C(!1)), u.$$keydown = U, u.$$input = (e) => {
|
|
181
181
|
let t = e.currentTarget.value;
|
|
182
|
-
|
|
183
|
-
}, u.$$click =
|
|
182
|
+
V(), T(t), D(0);
|
|
183
|
+
}, u.$$click = V;
|
|
184
184
|
var p = s;
|
|
185
185
|
return typeof p == "function" ? f(p, u) : s = u, a(l, n(m, {
|
|
186
186
|
get when() {
|
|
187
|
-
return o(() => !
|
|
187
|
+
return o(() => !x())() && L()?.icon;
|
|
188
188
|
},
|
|
189
189
|
children: (t) => (() => {
|
|
190
|
-
var r =
|
|
190
|
+
var r = I();
|
|
191
191
|
return a(r, n(e, {
|
|
192
192
|
get component() {
|
|
193
193
|
return t();
|
|
@@ -197,26 +197,36 @@ function I(r) {
|
|
|
197
197
|
})()
|
|
198
198
|
}), null), a(l, n(m, {
|
|
199
199
|
get when() {
|
|
200
|
-
return o(() => !
|
|
200
|
+
return o(() => !x())() && L()?.detail;
|
|
201
201
|
},
|
|
202
202
|
get children() {
|
|
203
|
-
var e =
|
|
204
|
-
return a(t, () =>
|
|
203
|
+
var e = P(), t = e.firstChild, n = t.nextSibling;
|
|
204
|
+
return a(t, () => L()?.label), a(n, () => L()?.detail), e;
|
|
205
205
|
}
|
|
206
|
-
}), null), a(l, n(
|
|
206
|
+
}), null), a(l, n(ee, {
|
|
207
207
|
class: "combobox-chevron",
|
|
208
208
|
size: 16,
|
|
209
209
|
"aria-hidden": "true"
|
|
210
210
|
}), null), a(l, n(m, {
|
|
211
211
|
get when() {
|
|
212
|
-
return
|
|
212
|
+
return x();
|
|
213
213
|
},
|
|
214
214
|
get children() {
|
|
215
|
-
return
|
|
215
|
+
return q();
|
|
216
216
|
}
|
|
217
|
+
}), null), a(l, n(m, {
|
|
218
|
+
get when() {
|
|
219
|
+
return o(() => !!x())() && B();
|
|
220
|
+
},
|
|
221
|
+
children: (t) => (() => {
|
|
222
|
+
var r = re();
|
|
223
|
+
return a(r, n(e, { get component() {
|
|
224
|
+
return t();
|
|
225
|
+
} })), r;
|
|
226
|
+
})()
|
|
217
227
|
}), null), i((e) => {
|
|
218
|
-
var n = r.class ? `combobox ${r.class}` : "combobox", i = !!
|
|
219
|
-
return n !== e.e && t(l, e.e = n), i !== e.t && l.classList.toggle("combobox-open", e.t = i), a !== e.a && l.classList.toggle("combobox-with-detail", e.a = a), o !== e.o && l.classList.toggle("combobox-with-icon", e.o = o), s !== e.i && c(u, "id", e.i = s), f !== e.n && c(u, "aria-expanded", e.n = f), p !== e.s && c(u, "aria-controls", e.s = p), m !== e.h && c(u, "aria-activedescendant", e.h = m),
|
|
228
|
+
var n = r.class ? `combobox ${r.class}` : "combobox", i = !!x(), a = !(x() || !L()?.detail), o = !(x() || L()?.icon === void 0), s = d(), f = x(), p = h(), m = x() && ae() > 0 ? b(E()) : void 0, g = r.ariaLabel, _ = r.describedBy, v = r.required, y = r.disabled, S = r.onChange === void 0, C = r.value, w = W();
|
|
229
|
+
return n !== e.e && t(l, e.e = n), i !== e.t && l.classList.toggle("combobox-open", e.t = i), a !== e.a && l.classList.toggle("combobox-with-detail", e.a = a), o !== e.o && l.classList.toggle("combobox-with-icon", e.o = o), s !== e.i && c(u, "id", e.i = s), f !== e.n && c(u, "aria-expanded", e.n = f), p !== e.s && c(u, "aria-controls", e.s = p), m !== e.h && c(u, "aria-activedescendant", e.h = m), g !== e.r && c(u, "aria-label", e.r = g), _ !== e.d && c(u, "aria-describedby", e.d = _), v !== e.l && (u.required = e.l = v), y !== e.u && (u.disabled = e.u = y), S !== e.c && (u.readOnly = e.c = S), C !== e.w && c(u, "data-value", e.w = C), w !== e.m && c(u, "placeholder", e.m = w), e;
|
|
220
230
|
}, {
|
|
221
231
|
e: void 0,
|
|
222
232
|
t: void 0,
|
|
@@ -233,7 +243,7 @@ function I(r) {
|
|
|
233
243
|
c: void 0,
|
|
234
244
|
w: void 0,
|
|
235
245
|
m: void 0
|
|
236
|
-
}), i(() => u.value =
|
|
246
|
+
}), i(() => u.value = x() ? w() : L()?.label ?? ""), l;
|
|
237
247
|
})();
|
|
238
248
|
}
|
|
239
249
|
r([
|
|
@@ -245,11 +255,11 @@ r([
|
|
|
245
255
|
]);
|
|
246
256
|
//#endregion
|
|
247
257
|
//#region node_modules/@tabler/icons-solidjs/dist/source/icons/IconMenu.js
|
|
248
|
-
var
|
|
249
|
-
function
|
|
258
|
+
var R = O("outline", "menu", "Menu", [["path", { d: "M4 8l16 0" }], ["path", { d: "M4 16l16 0" }]]), ie = /*#__PURE__*/ d("<li class=data-table-customizer-item draggable=true><label class=data-table-customizer-option><input type=checkbox>"), z = /*#__PURE__*/ d("<div role=dialog class=data-table-customizer-panel><p class=data-table-customizer-title></p><ul class=data-table-customizer-list></ul><div class=data-table-customizer-actions><button type=button></button><button type=button>"), ae = /*#__PURE__*/ d("<div class=data-table-customizer><button type=button class=data-table-customizer-button aria-haspopup=dialog><span aria-hidden=true>⚙</span> "), oe = /*#__PURE__*/ d("<button type=button class=data-table-sort><span class=data-table-sort-indicator aria-hidden=true>"), B = /*#__PURE__*/ d("<span class=data-table-resize-handle role=separator aria-orientation=vertical tabindex=0>"), V = /*#__PURE__*/ d("<th>"), H = /*#__PURE__*/ d("<td>"), se = /*#__PURE__*/ d("<tr>"), U = /*#__PURE__*/ d("<div class=data-table-toolbar-start>"), W = /*#__PURE__*/ d("<div class=data-table-toolbar>"), G = /*#__PURE__*/ d("<th>Actions"), K = /*#__PURE__*/ d("<div><div class=data-table-scroll><table class=data-table><thead><tr></tr></thead><tbody>"), q = /*#__PURE__*/ d("<p class=data-table-status>Loading…"), ce = /*#__PURE__*/ d("<p class=data-table-status>No results.");
|
|
259
|
+
function J(e) {
|
|
250
260
|
return typeof e == "function" ? e() : e;
|
|
251
261
|
}
|
|
252
|
-
function
|
|
262
|
+
function le(e, t) {
|
|
253
263
|
if (t !== void 0) return {
|
|
254
264
|
width: `${t}px`,
|
|
255
265
|
"min-width": `${t}px`,
|
|
@@ -258,29 +268,29 @@ function J(e, t) {
|
|
|
258
268
|
let n = (e) => typeof e == "number" ? `${e}px` : e, r = {};
|
|
259
269
|
return e.width !== void 0 && (r.width = n(e.width)), e.minWidth !== void 0 && (r["min-width"] = n(e.minWidth)), e.maxWidth !== void 0 && (r["max-width"] = n(e.maxWidth)), Object.keys(r).length > 0 ? r : void 0;
|
|
260
270
|
}
|
|
261
|
-
function
|
|
262
|
-
let r =
|
|
263
|
-
function
|
|
271
|
+
function ue(e) {
|
|
272
|
+
let r = _(() => J(e.rows)), o = () => J(e.loading ?? !1), s = e.sortKey !== void 0 || e.sortDirection !== void 0, [l, d] = v(e.defaultSort), b = () => s ? J(e.sortKey ?? void 0) : l()?.key, S = () => s ? J(e.sortDirection ?? "asc") : l()?.direction ?? "asc", C = () => J(e.showColumnCustomizer ?? !1), T = h(() => e.toolbar), E = _(() => e.defaultVisibleColumns ?? e.columns.filter((e) => e.defaultVisible !== !1).map((e) => e.key)), [D, O] = v(void 0), ee = () => e.visibleColumns === void 0 ? D() ?? E() : J(e.visibleColumns), k = _(() => new Set(ee())), [te, A] = v(void 0);
|
|
273
|
+
function j(t) {
|
|
264
274
|
let n = new Map(e.columns.map((e) => [e.key, e])), r = [...new Set(t)].flatMap((e) => n.get(e) ?? []), i = new Set(r);
|
|
265
275
|
return [...r, ...e.columns.filter((e) => !i.has(e))];
|
|
266
276
|
}
|
|
267
|
-
let
|
|
268
|
-
function
|
|
277
|
+
let ne = _(() => j(e.columnOrder === void 0 ? te() ?? e.defaultColumnOrder ?? [] : J(e.columnOrder))), M = _(() => ne().filter((e) => e.toggleable === !1 || k().has(e.key))), N = _(() => e.columns.filter((e) => e.toggleable !== !1)), P = _(() => N().map((e) => e.key));
|
|
278
|
+
function F(e, t) {
|
|
269
279
|
return t.sortValue ? t.sortValue(e) : e[t.key];
|
|
270
280
|
}
|
|
271
|
-
function
|
|
281
|
+
function I(e, t) {
|
|
272
282
|
return e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t), void 0, { numeric: !0 });
|
|
273
283
|
}
|
|
274
|
-
let
|
|
275
|
-
let t = r(), n =
|
|
284
|
+
let re = _(() => {
|
|
285
|
+
let t = r(), n = b();
|
|
276
286
|
if (s || !n) return t;
|
|
277
287
|
let i = e.columns.find((e) => e.key === n);
|
|
278
288
|
if (!i) return t;
|
|
279
|
-
let a =
|
|
280
|
-
return [...t].sort((e, t) => a * F(
|
|
289
|
+
let a = S() === "asc" ? 1 : -1;
|
|
290
|
+
return [...t].sort((e, t) => a * I(F(e, i), F(t, i)));
|
|
281
291
|
});
|
|
282
|
-
function
|
|
283
|
-
let n =
|
|
292
|
+
function L(t) {
|
|
293
|
+
let n = b() === t, r = n && S() === "desc" ? void 0 : {
|
|
284
294
|
key: t,
|
|
285
295
|
direction: n ? "desc" : "asc"
|
|
286
296
|
};
|
|
@@ -292,30 +302,30 @@ function le(e) {
|
|
|
292
302
|
}
|
|
293
303
|
function Y(t) {
|
|
294
304
|
let n = ue(t);
|
|
295
|
-
e.visibleColumns === void 0 &&
|
|
305
|
+
e.visibleColumns === void 0 && O(n), e.onVisibleColumnsChange?.(n);
|
|
296
306
|
}
|
|
297
|
-
function
|
|
298
|
-
let n = new Set(
|
|
299
|
-
t ? n.add(e) : n.delete(e), Y(
|
|
307
|
+
function de(e, t) {
|
|
308
|
+
let n = new Set(ee());
|
|
309
|
+
t ? n.add(e) : n.delete(e), Y(P().filter((e) => n.has(e)));
|
|
300
310
|
}
|
|
301
|
-
function
|
|
302
|
-
Y(
|
|
311
|
+
function X() {
|
|
312
|
+
Y(P());
|
|
303
313
|
}
|
|
304
314
|
function fe(t) {
|
|
305
|
-
e.columnOrder === void 0 &&
|
|
315
|
+
e.columnOrder === void 0 && A(t), e.onColumnOrderChange?.(t);
|
|
306
316
|
}
|
|
307
317
|
function pe(e, t) {
|
|
308
|
-
let n =
|
|
318
|
+
let n = ne().map((e) => e.key), r = n.indexOf(e);
|
|
309
319
|
r === -1 || t < 0 || t >= n.length || t === r || (n.splice(r, 1), n.splice(t, 0, e), fe(n));
|
|
310
320
|
}
|
|
311
321
|
function me() {
|
|
312
|
-
Y(
|
|
322
|
+
Y(E()), fe(j(e.defaultColumnOrder ?? []).map((e) => e.key));
|
|
313
323
|
}
|
|
314
|
-
let [Z, he] =
|
|
315
|
-
|
|
316
|
-
let e =
|
|
317
|
-
if (!Q ||
|
|
318
|
-
let t =
|
|
324
|
+
let [Z, he] = v({}), [ge, _e] = v(), Q;
|
|
325
|
+
g(() => {
|
|
326
|
+
let e = M().map((e) => e.key);
|
|
327
|
+
if (!Q || w(ge) === void 0) return;
|
|
328
|
+
let t = w(Z);
|
|
319
329
|
if (e.every((e) => t[e] !== void 0)) return;
|
|
320
330
|
let n = { ...t };
|
|
321
331
|
for (let t of e) {
|
|
@@ -365,30 +375,30 @@ function le(e) {
|
|
|
365
375
|
[n]: o
|
|
366
376
|
}), e.onColumnWidthsChange?.(Z());
|
|
367
377
|
}
|
|
368
|
-
let [be, xe] =
|
|
369
|
-
|
|
370
|
-
if (!Ce() || !
|
|
378
|
+
let [be, xe] = v(), Se = `${y()}-panel`, [Ce, we] = v(!1), Te;
|
|
379
|
+
g(() => {
|
|
380
|
+
if (!Ce() || !C()) return;
|
|
371
381
|
function e(e) {
|
|
372
382
|
Te && !Te.contains(e.target) && we(!1);
|
|
373
383
|
}
|
|
374
384
|
function t(e) {
|
|
375
385
|
e.key === "Escape" && we(!1);
|
|
376
386
|
}
|
|
377
|
-
document.addEventListener("pointerdown", e), document.addEventListener("keydown", t),
|
|
387
|
+
document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), x(() => {
|
|
378
388
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
379
389
|
});
|
|
380
390
|
});
|
|
381
391
|
function Ee(e) {
|
|
382
|
-
return e.toggleable === !1 ||
|
|
392
|
+
return e.toggleable === !1 || k().has(e.key);
|
|
383
393
|
}
|
|
384
394
|
function De(t, n) {
|
|
385
395
|
return e.getCell?.(t, n) ?? n.getValue?.(t) ?? null;
|
|
386
396
|
}
|
|
387
397
|
function Oe(e) {
|
|
388
|
-
if (e.sortable) return
|
|
398
|
+
if (e.sortable) return b() === e.key ? S() === "asc" ? "ascending" : "descending" : "none";
|
|
389
399
|
}
|
|
390
400
|
function ke(e) {
|
|
391
|
-
return
|
|
401
|
+
return b() === e.key ? S() === "asc" ? "▲" : "▼" : "";
|
|
392
402
|
}
|
|
393
403
|
let Ae = (t) => !!t.sortable && (!s || !!(e.onSort || e.onSortChange));
|
|
394
404
|
function je(e, t) {
|
|
@@ -398,14 +408,14 @@ function le(e) {
|
|
|
398
408
|
let n = be();
|
|
399
409
|
n !== void 0 && (e.preventDefault(), pe(n, t));
|
|
400
410
|
}
|
|
401
|
-
function
|
|
411
|
+
function Ne(e, t) {
|
|
402
412
|
return (() => {
|
|
403
413
|
var r = ie(), o = r.firstChild, s = o.firstChild;
|
|
404
|
-
return r.addEventListener("dragend", () => xe(void 0)), r.addEventListener("drop", (e) => e.preventDefault()), r.addEventListener("dragover", (e) => Me(e, t())), r.addEventListener("dragstart", (t) => je(t, e)), a(r, n(
|
|
414
|
+
return r.addEventListener("dragend", () => xe(void 0)), r.addEventListener("drop", (e) => e.preventDefault()), r.addEventListener("dragover", (e) => Me(e, t())), r.addEventListener("dragstart", (t) => je(t, e)), a(r, n(R, {
|
|
405
415
|
class: "data-table-customizer-grip",
|
|
406
416
|
size: 14,
|
|
407
417
|
"aria-hidden": "true"
|
|
408
|
-
}), o), s.addEventListener("change", (t) =>
|
|
418
|
+
}), o), s.addEventListener("change", (t) => de(e.key, t.currentTarget.checked)), a(o, () => e.ariaLabel ?? e.label, null), i((t) => {
|
|
409
419
|
var n = be() === e.key, i = e.toggleable === !1;
|
|
410
420
|
return n !== t.e && r.classList.toggle("data-table-customizer-item-dragging", t.e = n), i !== t.t && (s.disabled = t.t = i), t;
|
|
411
421
|
}, {
|
|
@@ -414,15 +424,15 @@ function le(e) {
|
|
|
414
424
|
}), i(() => s.checked = Ee(e)), r;
|
|
415
425
|
})();
|
|
416
426
|
}
|
|
417
|
-
function
|
|
427
|
+
function $() {
|
|
418
428
|
return (() => {
|
|
419
|
-
var t =
|
|
429
|
+
var t = z(), r = t.firstChild, o = r.nextSibling, s = o.nextSibling.firstChild, l = s.nextSibling;
|
|
420
430
|
return c(t, "id", Se), a(r, () => e.columnCustomizerTitle ?? "Shown columns"), a(o, n(p, {
|
|
421
431
|
get each() {
|
|
422
|
-
return
|
|
432
|
+
return ne();
|
|
423
433
|
},
|
|
424
|
-
children: (e, t) =>
|
|
425
|
-
})), s.$$click =
|
|
434
|
+
children: (e, t) => Ne(e, t)
|
|
435
|
+
})), s.$$click = X, a(s, () => e.columnCustomizerShowAllLabel ?? "Show all"), l.$$click = me, a(l, () => e.columnCustomizerResetLabel ?? "Reset"), i(() => c(t, "aria-label", e.columnCustomizerTitle ?? "Customize columns")), t;
|
|
426
436
|
})();
|
|
427
437
|
}
|
|
428
438
|
function Pe() {
|
|
@@ -435,14 +445,14 @@ function le(e) {
|
|
|
435
445
|
return Ce();
|
|
436
446
|
},
|
|
437
447
|
get children() {
|
|
438
|
-
return
|
|
448
|
+
return $();
|
|
439
449
|
}
|
|
440
450
|
}), null), i(() => c(r, "aria-expanded", Ce())), t;
|
|
441
451
|
})();
|
|
442
452
|
}
|
|
443
453
|
function Fe(r) {
|
|
444
454
|
return (() => {
|
|
445
|
-
var o =
|
|
455
|
+
var o = V();
|
|
446
456
|
return a(o, n(m, {
|
|
447
457
|
get when() {
|
|
448
458
|
return Ae(r);
|
|
@@ -452,18 +462,18 @@ function le(e) {
|
|
|
452
462
|
},
|
|
453
463
|
get children() {
|
|
454
464
|
var e = oe(), t = e.firstChild;
|
|
455
|
-
return e.$$click = () =>
|
|
465
|
+
return e.$$click = () => L(r.key), a(e, () => r.label, t), a(t, () => ke(r)), e;
|
|
456
466
|
}
|
|
457
467
|
}), null), a(o, n(m, {
|
|
458
468
|
get when() {
|
|
459
469
|
return e.resizableColumns;
|
|
460
470
|
},
|
|
461
471
|
get children() {
|
|
462
|
-
var e =
|
|
472
|
+
var e = B();
|
|
463
473
|
return e.$$keydown = (e) => ye(e, r.key), e.$$pointerdown = (e) => ve(e, r.key), i(() => c(e, "aria-label", `Resize ${r.ariaLabel ?? r.label}`)), e;
|
|
464
474
|
}
|
|
465
475
|
}), null), i((e) => {
|
|
466
|
-
var n = r.class, i = r.key, a =
|
|
476
|
+
var n = r.class, i = r.key, a = le(r, Z()[r.key]), s = Oe(r);
|
|
467
477
|
return n !== e.e && t(o, e.e = n), i !== e.t && c(o, "data-column-key", e.t = i), e.a = u(o, a, e.a), s !== e.o && c(o, "aria-sort", e.o = s), e;
|
|
468
478
|
}, {
|
|
469
479
|
e: void 0,
|
|
@@ -475,15 +485,15 @@ function le(e) {
|
|
|
475
485
|
}
|
|
476
486
|
function Ie(r) {
|
|
477
487
|
return (() => {
|
|
478
|
-
var o =
|
|
488
|
+
var o = se();
|
|
479
489
|
return a(o, n(p, {
|
|
480
490
|
get each() {
|
|
481
|
-
return
|
|
491
|
+
return M();
|
|
482
492
|
},
|
|
483
493
|
children: (e) => (() => {
|
|
484
|
-
var n =
|
|
494
|
+
var n = H();
|
|
485
495
|
return a(n, () => De(r, e)), i((r) => {
|
|
486
|
-
var i = e.class, a =
|
|
496
|
+
var i = e.class, a = le(e, Z()[e.key]);
|
|
487
497
|
return i !== r.e && t(n, r.e = i), r.t = u(n, a, r.t), r;
|
|
488
498
|
}, {
|
|
489
499
|
e: void 0,
|
|
@@ -495,32 +505,32 @@ function le(e) {
|
|
|
495
505
|
return e.rowActions;
|
|
496
506
|
},
|
|
497
507
|
get children() {
|
|
498
|
-
var t =
|
|
508
|
+
var t = H();
|
|
499
509
|
return a(t, () => e.rowActions?.(r)), t;
|
|
500
510
|
}
|
|
501
511
|
}), null), o;
|
|
502
512
|
})();
|
|
503
513
|
}
|
|
504
|
-
let Le = () => !o() && (e.empty === void 0 ? r().length === 0 :
|
|
514
|
+
let Le = () => !o() && (e.empty === void 0 ? r().length === 0 : J(e.empty));
|
|
505
515
|
return (() => {
|
|
506
|
-
var r =
|
|
516
|
+
var r = K(), s = r.firstChild, c = s.firstChild, l = c.firstChild, d = l.firstChild, h = l.nextSibling;
|
|
507
517
|
a(r, n(m, {
|
|
508
518
|
get when() {
|
|
509
|
-
return
|
|
519
|
+
return C() || T.toArray().length > 0;
|
|
510
520
|
},
|
|
511
521
|
get children() {
|
|
512
|
-
var e =
|
|
522
|
+
var e = W();
|
|
513
523
|
return a(e, n(m, {
|
|
514
524
|
get when() {
|
|
515
|
-
return
|
|
525
|
+
return T.toArray().length > 0;
|
|
516
526
|
},
|
|
517
527
|
get children() {
|
|
518
|
-
var e =
|
|
519
|
-
return a(e,
|
|
528
|
+
var e = U();
|
|
529
|
+
return a(e, T), e;
|
|
520
530
|
}
|
|
521
531
|
}), null), a(e, n(m, {
|
|
522
532
|
get when() {
|
|
523
|
-
return
|
|
533
|
+
return C();
|
|
524
534
|
},
|
|
525
535
|
get children() {
|
|
526
536
|
return Pe();
|
|
@@ -528,10 +538,10 @@ function le(e) {
|
|
|
528
538
|
}), null), e;
|
|
529
539
|
}
|
|
530
540
|
}), s);
|
|
531
|
-
var
|
|
532
|
-
return typeof
|
|
541
|
+
var g = Q;
|
|
542
|
+
return typeof g == "function" ? f(g, c) : Q = c, a(d, n(p, {
|
|
533
543
|
get each() {
|
|
534
|
-
return
|
|
544
|
+
return M();
|
|
535
545
|
},
|
|
536
546
|
children: Fe
|
|
537
547
|
}), null), a(d, n(m, {
|
|
@@ -539,11 +549,11 @@ function le(e) {
|
|
|
539
549
|
return e.rowActions;
|
|
540
550
|
},
|
|
541
551
|
get children() {
|
|
542
|
-
return
|
|
552
|
+
return G();
|
|
543
553
|
}
|
|
544
|
-
}), null), a(
|
|
554
|
+
}), null), a(h, n(p, {
|
|
545
555
|
get each() {
|
|
546
|
-
return
|
|
556
|
+
return re();
|
|
547
557
|
},
|
|
548
558
|
children: Ie
|
|
549
559
|
})), a(r, n(m, {
|
|
@@ -551,14 +561,14 @@ function le(e) {
|
|
|
551
561
|
return o();
|
|
552
562
|
},
|
|
553
563
|
get children() {
|
|
554
|
-
return e.loadingContent ??
|
|
564
|
+
return e.loadingContent ?? q();
|
|
555
565
|
}
|
|
556
566
|
}), null), a(r, n(m, {
|
|
557
567
|
get when() {
|
|
558
568
|
return Le();
|
|
559
569
|
},
|
|
560
570
|
get children() {
|
|
561
|
-
return e.emptyContent ??
|
|
571
|
+
return e.emptyContent ?? ce();
|
|
562
572
|
}
|
|
563
573
|
}), null), i((n) => {
|
|
564
574
|
var i = `data-table-wrap${e.class ? ` ${e.class}` : ""}`, a = ge() !== void 0, o = ge() === void 0 ? void 0 : { width: `${ge()}px` };
|
|
@@ -577,23 +587,23 @@ r([
|
|
|
577
587
|
]);
|
|
578
588
|
//#endregion
|
|
579
589
|
//#region node_modules/@tabler/icons-solidjs/dist/source/icons/IconDeviceFloppy.js
|
|
580
|
-
var
|
|
590
|
+
var Y = O("outline", "device-floppy", "DeviceFloppy", [
|
|
581
591
|
["path", { d: "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2" }],
|
|
582
592
|
["path", { d: "M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }],
|
|
583
593
|
["path", { d: "M14 4l0 4l-6 0l0 -4" }]
|
|
584
|
-
]),
|
|
585
|
-
function
|
|
594
|
+
]), de = O("outline", "search", "Search", [["path", { d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }], ["path", { d: "M21 21l-6 -6" }]]), X = O("outline", "x", "X", [["path", { d: "M18 6l-12 12" }], ["path", { d: "M6 6l12 12" }]]), fe = /*#__PURE__*/ d("<li class=filter-table-chip><button type=button class=filter-table-chip-remove>"), pe = /*#__PURE__*/ d("<ul class=filter-table-chips>"), me = /*#__PURE__*/ d("<div class=filter-table-multi>"), Z = /*#__PURE__*/ d("<input class=filter-table-input type=text>"), he = /*#__PURE__*/ d("<div class=filter-table-search><input type=search class=filter-table-input>"), ge = /*#__PURE__*/ d("<div class=filter-table-saved>"), _e = /*#__PURE__*/ d("<button type=button class=filter-table-chip-remove>"), Q = /*#__PURE__*/ d("<li><button type=button class=filter-table-pill>"), ve = /*#__PURE__*/ d("<li><button type=button class=\"filter-table-pill filter-table-pill-save\">"), ye = /*#__PURE__*/ d("<ul class=filter-table-pills aria-label=\"Applied filters\"><li><button type=button class=\"filter-table-pill filter-table-pill-clear\">"), be = /*#__PURE__*/ d("<form class=filter-table-save><input type=text class=filter-table-input><button type=submit class=\"filter-table-button filter-table-button-primary\"></button><button type=button class=filter-table-button>"), xe = /*#__PURE__*/ d("<div class=filter-table-toolbar>"), Se = /*#__PURE__*/ d("<span class=filter-table-badge>"), Ce = /*#__PURE__*/ d("<button type=button role=tab class=filter-table-tab>"), we = /*#__PURE__*/ d("<div class=filter-table-field><label class=filter-table-label>"), Te = /*#__PURE__*/ d("<legend class=filter-table-legend>"), Ee = /*#__PURE__*/ d("<fieldset class=filter-table-fieldset>"), De = /*#__PURE__*/ d("<form class=filter-table-form><div class=filter-table-form-actions><button type=button class=filter-table-button></button><button type=submit class=\"filter-table-button filter-table-button-primary\">"), Oe = /*#__PURE__*/ d("<div><div class=filter-table-tabs role=tablist></div><div role=tabpanel></div><div role=tabpanel>"), ke = "q";
|
|
595
|
+
function Ae(e) {
|
|
586
596
|
return typeof e == "function" ? e() : e;
|
|
587
597
|
}
|
|
588
|
-
function
|
|
598
|
+
function je(e) {
|
|
589
599
|
return Array.isArray(e) ? e.length > 0 : (e ?? "").trim() !== "";
|
|
590
600
|
}
|
|
591
|
-
function
|
|
601
|
+
function Me(e) {
|
|
592
602
|
let t = {};
|
|
593
|
-
for (let [n, r] of Object.entries(e))
|
|
603
|
+
for (let [n, r] of Object.entries(e)) je(r) && (t[n] = Array.isArray(r) ? r : r.trim());
|
|
594
604
|
return t;
|
|
595
605
|
}
|
|
596
|
-
function
|
|
606
|
+
function Ne(e, t) {
|
|
597
607
|
let n = Object.keys(e);
|
|
598
608
|
return n.length === Object.keys(t).length && n.every((n) => {
|
|
599
609
|
let r = e[n], i = t[n];
|
|
@@ -603,8 +613,8 @@ function Me(e, t) {
|
|
|
603
613
|
function $(e) {
|
|
604
614
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
605
615
|
}
|
|
606
|
-
function
|
|
607
|
-
let [r, l] =
|
|
616
|
+
function Pe(e) {
|
|
617
|
+
let [r, l] = C(e, [
|
|
608
618
|
"rows",
|
|
609
619
|
"filters",
|
|
610
620
|
"filterValues",
|
|
@@ -630,43 +640,43 @@ function Ne(e) {
|
|
|
630
640
|
"cancelLabel",
|
|
631
641
|
"clearSavedFilterLabel",
|
|
632
642
|
"class"
|
|
633
|
-
]), u =
|
|
634
|
-
function
|
|
635
|
-
let t =
|
|
636
|
-
r.filterValues === void 0 &&
|
|
643
|
+
]), u = _(() => Ae(r.rows)), [d, h] = v(Me(r.defaultFilterValues ?? {})), x = _(() => r.filterValues === void 0 ? d() : Me(Ae(r.filterValues)));
|
|
644
|
+
function S(e) {
|
|
645
|
+
let t = Me(e);
|
|
646
|
+
r.filterValues === void 0 && h(t), r.onFilterValuesChange?.(t);
|
|
637
647
|
}
|
|
638
|
-
function
|
|
639
|
-
|
|
640
|
-
...
|
|
648
|
+
function w(e, t) {
|
|
649
|
+
S({
|
|
650
|
+
...x(),
|
|
641
651
|
[e]: t
|
|
642
652
|
});
|
|
643
653
|
}
|
|
644
|
-
let
|
|
645
|
-
function
|
|
654
|
+
let T = () => $(x()[ke]), E = _(() => r.filters.filter((e) => je(x()[e.key])));
|
|
655
|
+
function D(e, t) {
|
|
646
656
|
return t.getValue ? t.getValue(e) : e[t.key];
|
|
647
657
|
}
|
|
648
|
-
function
|
|
658
|
+
function O(e, t, n) {
|
|
649
659
|
if (t.match) return t.match(e, n);
|
|
650
|
-
let r =
|
|
660
|
+
let r = D(e, t);
|
|
651
661
|
if (t.type === "select") {
|
|
652
662
|
let e = Array.isArray(n) ? n : [n];
|
|
653
663
|
return (Array.isArray(r) ? r : [r]).some((t) => e.includes($(t)));
|
|
654
664
|
}
|
|
655
665
|
return t.type === "boolean" ? !!r == (n === "true") : $(r).toLowerCase().includes($(n).toLowerCase());
|
|
656
666
|
}
|
|
657
|
-
function
|
|
667
|
+
function ee(e) {
|
|
658
668
|
return r.getSearchText ? r.getSearchText(e) : l.columns.map((t) => $(t.sortValue?.(e) ?? e[t.key])).join(" ");
|
|
659
669
|
}
|
|
660
|
-
let
|
|
670
|
+
let k = _(() => {
|
|
661
671
|
if (r.manualFiltering) return u();
|
|
662
|
-
let e =
|
|
663
|
-
return u().filter((n) => (e === "" ||
|
|
672
|
+
let e = T().toLowerCase(), t = E();
|
|
673
|
+
return u().filter((n) => (e === "" || ee(n).toLowerCase().includes(e)) && t.every((e) => O(n, e, x()[e.key])));
|
|
664
674
|
});
|
|
665
|
-
function
|
|
675
|
+
function te(e) {
|
|
666
676
|
if (e.options) return e.options;
|
|
667
677
|
let t = /* @__PURE__ */ new Set();
|
|
668
678
|
for (let n of u()) {
|
|
669
|
-
let r =
|
|
679
|
+
let r = D(n, e);
|
|
670
680
|
for (let e of Array.isArray(r) ? r : [r]) {
|
|
671
681
|
let n = $(e);
|
|
672
682
|
n !== "" && t.add(n);
|
|
@@ -677,46 +687,46 @@ function Ne(e) {
|
|
|
677
687
|
label: e
|
|
678
688
|
}));
|
|
679
689
|
}
|
|
680
|
-
function
|
|
681
|
-
return e.type === "boolean" ? t === "true" ? r.yesLabel ?? "Yes" : r.noLabel ?? "No" : e.type === "select" ?
|
|
690
|
+
function A(e, t) {
|
|
691
|
+
return e.type === "boolean" ? t === "true" ? r.yesLabel ?? "Yes" : r.noLabel ?? "No" : e.type === "select" ? te(e).find((e) => String(e.value) === t)?.label ?? t : t;
|
|
682
692
|
}
|
|
683
|
-
let
|
|
684
|
-
let t =
|
|
693
|
+
let j = _(() => E().flatMap((e) => {
|
|
694
|
+
let t = x()[e.key];
|
|
685
695
|
return (Array.isArray(t) ? t : [t]).map((t) => ({
|
|
686
696
|
filter: e,
|
|
687
697
|
item: t,
|
|
688
|
-
text: `${e.label}: ${
|
|
698
|
+
text: `${e.label}: ${A(e, t)}`
|
|
689
699
|
}));
|
|
690
700
|
}));
|
|
691
|
-
function
|
|
692
|
-
let n =
|
|
693
|
-
|
|
701
|
+
function ne(e, t) {
|
|
702
|
+
let n = x()[e.key];
|
|
703
|
+
w(e.key, Array.isArray(n) ? n.filter((e) => e !== t) : "");
|
|
694
704
|
}
|
|
695
|
-
function
|
|
696
|
-
|
|
705
|
+
function M() {
|
|
706
|
+
S({ [ke]: T() });
|
|
697
707
|
}
|
|
698
|
-
let
|
|
699
|
-
function
|
|
700
|
-
let t =
|
|
701
|
-
t &&
|
|
708
|
+
let N = _(() => r.savedFilters === void 0 ? void 0 : Ae(r.savedFilters)), P = _(() => N()?.find((e) => Ne(Me(e.values), x()))), [F, I] = v(!1), [re, R] = v("");
|
|
709
|
+
function ie(e) {
|
|
710
|
+
let t = N()?.find((t) => t.name === e);
|
|
711
|
+
t && S(t.values);
|
|
702
712
|
}
|
|
703
|
-
function
|
|
704
|
-
|
|
713
|
+
function z() {
|
|
714
|
+
R(P()?.name ?? ""), I(!0);
|
|
705
715
|
}
|
|
706
|
-
function
|
|
716
|
+
function ae(e) {
|
|
707
717
|
e.preventDefault();
|
|
708
|
-
let t =
|
|
718
|
+
let t = re().trim();
|
|
709
719
|
if (t === "") return;
|
|
710
|
-
let n = (
|
|
720
|
+
let n = (N() ?? []).filter((e) => e.name !== t);
|
|
711
721
|
r.onSavedFiltersChange?.([...n, {
|
|
712
722
|
name: t,
|
|
713
|
-
values:
|
|
714
|
-
}]),
|
|
723
|
+
values: x()
|
|
724
|
+
}]), I(!1);
|
|
715
725
|
}
|
|
716
|
-
let [
|
|
717
|
-
|
|
726
|
+
let [oe, B] = v(x());
|
|
727
|
+
g(b(x, (e) => B(e)));
|
|
718
728
|
function V(e) {
|
|
719
|
-
return
|
|
729
|
+
return oe()[e];
|
|
720
730
|
}
|
|
721
731
|
function H(e, t) {
|
|
722
732
|
B((n) => ({
|
|
@@ -724,51 +734,51 @@ function Ne(e) {
|
|
|
724
734
|
[e]: t
|
|
725
735
|
}));
|
|
726
736
|
}
|
|
727
|
-
let se =
|
|
737
|
+
let se = _(() => {
|
|
728
738
|
let e = /* @__PURE__ */ new Map([[void 0, []]]);
|
|
729
739
|
for (let t of r.filters) e.set(t.group, [...e.get(t.group) ?? [], t]);
|
|
730
740
|
return [...e.entries()].filter(([, e]) => e.length > 0).map(([e, t]) => ({
|
|
731
741
|
name: e,
|
|
732
742
|
filters: t
|
|
733
743
|
}));
|
|
734
|
-
}), U =
|
|
735
|
-
function
|
|
736
|
-
e === "filters" && B(
|
|
744
|
+
}), U = y(), W = ["results", "filters"], [G, K] = v("results"), q = (e) => `${U}-tab-${e}`, ce = (e) => `${U}-panel-${e}`, J = (e) => `${U}-filter-${e}`;
|
|
745
|
+
function le(e) {
|
|
746
|
+
e === "filters" && B(x()), K(e);
|
|
737
747
|
}
|
|
738
748
|
function Pe(e) {
|
|
739
749
|
let t = e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0;
|
|
740
750
|
if (t === 0) return;
|
|
741
751
|
e.preventDefault();
|
|
742
752
|
let n = W[(W.indexOf(G()) + t + W.length) % W.length];
|
|
743
|
-
|
|
753
|
+
le(n), document.getElementById(q(n))?.focus();
|
|
744
754
|
}
|
|
745
755
|
function Fe(e) {
|
|
746
|
-
e.preventDefault(),
|
|
756
|
+
e.preventDefault(), S(oe()), K("results");
|
|
747
757
|
}
|
|
748
758
|
function Ie() {
|
|
749
|
-
|
|
759
|
+
M(), K("results");
|
|
750
760
|
}
|
|
751
761
|
function Le(e) {
|
|
752
762
|
let t = () => {
|
|
753
763
|
let t = V(e.key);
|
|
754
764
|
return Array.isArray(t) ? t : [];
|
|
755
765
|
}, o = (r) => (() => {
|
|
756
|
-
var o =
|
|
757
|
-
return a(o, () =>
|
|
766
|
+
var o = fe(), s = o.firstChild;
|
|
767
|
+
return a(o, () => A(e, r), s), s.$$click = () => H(e.key, t().filter((e) => e !== r)), a(s, n(X, {
|
|
758
768
|
size: 12,
|
|
759
769
|
"aria-hidden": "true"
|
|
760
|
-
})), i(() => c(s, "aria-label", `Remove ${
|
|
770
|
+
})), i(() => c(s, "aria-label", `Remove ${A(e, r)}`)), o;
|
|
761
771
|
})();
|
|
762
772
|
return (() => {
|
|
763
|
-
var i =
|
|
764
|
-
return a(i, n(
|
|
773
|
+
var i = me();
|
|
774
|
+
return a(i, n(L, {
|
|
765
775
|
get id() {
|
|
766
776
|
return J(e.key);
|
|
767
777
|
},
|
|
768
778
|
value: "",
|
|
769
779
|
onChange: (n) => H(e.key, [...t(), n]),
|
|
770
780
|
get options() {
|
|
771
|
-
return
|
|
781
|
+
return te(e).filter((e) => !t().includes(String(e.value)));
|
|
772
782
|
},
|
|
773
783
|
get placeholder() {
|
|
774
784
|
return e.placeholder ?? r.anyLabel ?? "Any";
|
|
@@ -778,7 +788,7 @@ function Ne(e) {
|
|
|
778
788
|
return t().length > 0;
|
|
779
789
|
},
|
|
780
790
|
get children() {
|
|
781
|
-
var e =
|
|
791
|
+
var e = pe();
|
|
782
792
|
return a(e, n(p, {
|
|
783
793
|
get each() {
|
|
784
794
|
return t();
|
|
@@ -791,7 +801,7 @@ function Ne(e) {
|
|
|
791
801
|
}
|
|
792
802
|
function Re(e) {
|
|
793
803
|
return e.type === "text" ? (() => {
|
|
794
|
-
var t =
|
|
804
|
+
var t = Z();
|
|
795
805
|
return t.$$input = (t) => H(e.key, t.currentTarget.value), i((n) => {
|
|
796
806
|
var r = J(e.key), i = e.placeholder;
|
|
797
807
|
return r !== n.e && c(t, "id", n.e = r), i !== n.t && c(t, "placeholder", n.t = i), n;
|
|
@@ -799,7 +809,7 @@ function Ne(e) {
|
|
|
799
809
|
e: void 0,
|
|
800
810
|
t: void 0
|
|
801
811
|
}), i(() => t.value = $(V(e.key))), t;
|
|
802
|
-
})() : e.type === "boolean" ? n(
|
|
812
|
+
})() : e.type === "boolean" ? n(L, {
|
|
803
813
|
get id() {
|
|
804
814
|
return J(e.key);
|
|
805
815
|
},
|
|
@@ -823,30 +833,30 @@ function Ne(e) {
|
|
|
823
833
|
}
|
|
824
834
|
function ze() {
|
|
825
835
|
return (() => {
|
|
826
|
-
var e =
|
|
827
|
-
return a(e, n(
|
|
836
|
+
var e = he(), t = e.firstChild;
|
|
837
|
+
return a(e, n(de, {
|
|
828
838
|
class: "filter-table-search-icon",
|
|
829
839
|
size: 16,
|
|
830
840
|
"aria-hidden": "true"
|
|
831
|
-
}), t), t.$$input = (e) =>
|
|
841
|
+
}), t), t.$$input = (e) => w(ke, e.currentTarget.value), i((e) => {
|
|
832
842
|
var n = r.quickSearchLabel ?? "Quick search", i = r.quickSearchLabel ?? "Quick search";
|
|
833
843
|
return n !== e.e && c(t, "aria-label", e.e = n), i !== e.t && c(t, "placeholder", e.t = i), e;
|
|
834
844
|
}, {
|
|
835
845
|
e: void 0,
|
|
836
846
|
t: void 0
|
|
837
|
-
}), i(() => t.value =
|
|
847
|
+
}), i(() => t.value = T()), e;
|
|
838
848
|
})();
|
|
839
849
|
}
|
|
840
850
|
function Be() {
|
|
841
851
|
return (() => {
|
|
842
|
-
var e =
|
|
843
|
-
return a(e, n(
|
|
852
|
+
var e = ge();
|
|
853
|
+
return a(e, n(L, {
|
|
844
854
|
get value() {
|
|
845
|
-
return
|
|
855
|
+
return P()?.name ?? "";
|
|
846
856
|
},
|
|
847
|
-
onChange:
|
|
857
|
+
onChange: ie,
|
|
848
858
|
get options() {
|
|
849
|
-
return (
|
|
859
|
+
return (N() ?? []).map((e) => ({
|
|
850
860
|
value: e.name,
|
|
851
861
|
label: e.name
|
|
852
862
|
}));
|
|
@@ -859,11 +869,11 @@ function Ne(e) {
|
|
|
859
869
|
}
|
|
860
870
|
}), null), a(e, n(m, {
|
|
861
871
|
get when() {
|
|
862
|
-
return
|
|
872
|
+
return P();
|
|
863
873
|
},
|
|
864
874
|
children: (e) => (() => {
|
|
865
|
-
var t =
|
|
866
|
-
return t.$$click =
|
|
875
|
+
var t = _e();
|
|
876
|
+
return t.$$click = M, a(t, n(X, {
|
|
867
877
|
size: 14,
|
|
868
878
|
"aria-hidden": "true"
|
|
869
879
|
})), i(() => c(t, "aria-label", `${r.clearSavedFilterLabel ?? "Clear saved filter"} ${e().name}`)), t;
|
|
@@ -873,8 +883,8 @@ function Ne(e) {
|
|
|
873
883
|
}
|
|
874
884
|
function Ve(e) {
|
|
875
885
|
return (() => {
|
|
876
|
-
var t =
|
|
877
|
-
return r.$$click = () =>
|
|
886
|
+
var t = Q(), r = t.firstChild;
|
|
887
|
+
return r.$$click = () => ne(e.filter, e.item), a(r, () => e.text, null), a(r, n(X, {
|
|
878
888
|
size: 12,
|
|
879
889
|
"aria-hidden": "true"
|
|
880
890
|
}), null), i(() => c(r, "aria-label", `Remove filter ${e.text}`)), t;
|
|
@@ -882,19 +892,19 @@ function Ne(e) {
|
|
|
882
892
|
}
|
|
883
893
|
function He() {
|
|
884
894
|
return (() => {
|
|
885
|
-
var e =
|
|
895
|
+
var e = ye(), t = e.firstChild, i = t.firstChild;
|
|
886
896
|
return a(e, n(p, {
|
|
887
897
|
get each() {
|
|
888
|
-
return
|
|
898
|
+
return j();
|
|
889
899
|
},
|
|
890
900
|
children: Ve
|
|
891
|
-
}), t), i.$$click =
|
|
901
|
+
}), t), i.$$click = M, a(i, () => r.clearAllLabel ?? "Clear all"), a(e, n(m, {
|
|
892
902
|
get when() {
|
|
893
|
-
return o(() =>
|
|
903
|
+
return o(() => N() !== void 0)() && !F();
|
|
894
904
|
},
|
|
895
905
|
get children() {
|
|
896
|
-
var e =
|
|
897
|
-
return t.$$click =
|
|
906
|
+
var e = ve(), t = e.firstChild;
|
|
907
|
+
return t.$$click = z, a(t, n(Y, {
|
|
898
908
|
size: 12,
|
|
899
909
|
"aria-hidden": "true"
|
|
900
910
|
}), null), a(t, () => r.saveLabel ?? "Save", null), e;
|
|
@@ -904,23 +914,23 @@ function Ne(e) {
|
|
|
904
914
|
}
|
|
905
915
|
function Ue() {
|
|
906
916
|
return (() => {
|
|
907
|
-
var e =
|
|
917
|
+
var e = be(), t = e.firstChild, o = t.nextSibling, s = o.nextSibling;
|
|
908
918
|
return e.$$keydown = (e) => {
|
|
909
|
-
e.key === "Escape" &&
|
|
910
|
-
}, e.addEventListener("submit",
|
|
919
|
+
e.key === "Escape" && I(!1);
|
|
920
|
+
}, e.addEventListener("submit", ae), t.$$input = (e) => R(e.currentTarget.value), f((e) => queueMicrotask(() => e.focus()), t), a(o, n(Y, {
|
|
911
921
|
size: 16,
|
|
912
922
|
"aria-hidden": "true"
|
|
913
|
-
}), null), a(o, () => r.saveLabel ?? "Save", null), s.$$click = () =>
|
|
923
|
+
}), null), a(o, () => r.saveLabel ?? "Save", null), s.$$click = () => I(!1), a(s, () => r.cancelLabel ?? "Cancel"), i((e) => {
|
|
914
924
|
var n = r.saveNameLabel ?? "Filter name", i = r.saveNameLabel ?? "Filter name";
|
|
915
925
|
return n !== e.e && c(t, "aria-label", e.e = n), i !== e.t && c(t, "placeholder", e.t = i), e;
|
|
916
926
|
}, {
|
|
917
927
|
e: void 0,
|
|
918
928
|
t: void 0
|
|
919
|
-
}), i(() => t.value =
|
|
929
|
+
}), i(() => t.value = re()), e;
|
|
920
930
|
})();
|
|
921
931
|
}
|
|
922
932
|
let We = (() => {
|
|
923
|
-
var e =
|
|
933
|
+
var e = xe();
|
|
924
934
|
return a(e, n(m, {
|
|
925
935
|
get when() {
|
|
926
936
|
return r.quickSearch !== !1;
|
|
@@ -930,21 +940,21 @@ function Ne(e) {
|
|
|
930
940
|
}
|
|
931
941
|
}), null), a(e, n(m, {
|
|
932
942
|
get when() {
|
|
933
|
-
return (
|
|
943
|
+
return (N()?.length ?? 0) > 0;
|
|
934
944
|
},
|
|
935
945
|
get children() {
|
|
936
946
|
return Be();
|
|
937
947
|
}
|
|
938
948
|
}), null), a(e, n(m, {
|
|
939
949
|
get when() {
|
|
940
|
-
return
|
|
950
|
+
return j().length > 0;
|
|
941
951
|
},
|
|
942
952
|
get children() {
|
|
943
953
|
return He();
|
|
944
954
|
}
|
|
945
955
|
}), null), a(e, n(m, {
|
|
946
956
|
get when() {
|
|
947
|
-
return o(() => !!
|
|
957
|
+
return o(() => !!F())() && j().length > 0;
|
|
948
958
|
},
|
|
949
959
|
get children() {
|
|
950
960
|
return Ue();
|
|
@@ -955,21 +965,21 @@ function Ne(e) {
|
|
|
955
965
|
return e === "results" ? r.resultsLabel ?? "Results" : r.filtersLabel ?? "Filters";
|
|
956
966
|
}
|
|
957
967
|
function Ke(e) {
|
|
958
|
-
return e === "results" ?
|
|
968
|
+
return e === "results" ? k().length : E().length;
|
|
959
969
|
}
|
|
960
970
|
function qe(e) {
|
|
961
971
|
return (() => {
|
|
962
|
-
var t =
|
|
963
|
-
return t.$$keydown = Pe, t.$$click = () =>
|
|
972
|
+
var t = Ce();
|
|
973
|
+
return t.$$keydown = Pe, t.$$click = () => le(e), a(t, () => Ge(e), null), a(t, n(m, {
|
|
964
974
|
get when() {
|
|
965
|
-
return e === "results" ||
|
|
975
|
+
return e === "results" || E().length > 0;
|
|
966
976
|
},
|
|
967
977
|
get children() {
|
|
968
|
-
var t =
|
|
978
|
+
var t = Se();
|
|
969
979
|
return a(t, () => Ke(e)), t;
|
|
970
980
|
}
|
|
971
981
|
}), null), i((n) => {
|
|
972
|
-
var r =
|
|
982
|
+
var r = q(e), i = G() === e, a = ce(e), o = G() === e ? 0 : -1;
|
|
973
983
|
return r !== n.e && c(t, "id", n.e = r), i !== n.t && c(t, "aria-selected", n.t = i), a !== n.a && c(t, "aria-controls", n.a = a), o !== n.o && c(t, "tabindex", n.o = o), n;
|
|
974
984
|
}, {
|
|
975
985
|
e: void 0,
|
|
@@ -981,19 +991,19 @@ function Ne(e) {
|
|
|
981
991
|
}
|
|
982
992
|
function Je(e) {
|
|
983
993
|
return (() => {
|
|
984
|
-
var t =
|
|
994
|
+
var t = we(), n = t.firstChild;
|
|
985
995
|
return a(n, () => e.label), a(t, () => Re(e), null), i(() => c(n, "for", J(e.key))), t;
|
|
986
996
|
})();
|
|
987
997
|
}
|
|
988
998
|
function Ye(e) {
|
|
989
999
|
return (() => {
|
|
990
|
-
var t =
|
|
1000
|
+
var t = Ee();
|
|
991
1001
|
return a(t, n(m, {
|
|
992
1002
|
get when() {
|
|
993
1003
|
return e.name;
|
|
994
1004
|
},
|
|
995
1005
|
get children() {
|
|
996
|
-
var t =
|
|
1006
|
+
var t = Te();
|
|
997
1007
|
return a(t, () => e.name), t;
|
|
998
1008
|
}
|
|
999
1009
|
}), null), a(t, n(p, {
|
|
@@ -1006,7 +1016,7 @@ function Ne(e) {
|
|
|
1006
1016
|
}
|
|
1007
1017
|
function Xe() {
|
|
1008
1018
|
return (() => {
|
|
1009
|
-
var e =
|
|
1019
|
+
var e = De(), t = e.firstChild, i = t.firstChild, o = i.nextSibling;
|
|
1010
1020
|
return e.addEventListener("submit", Fe), a(e, n(p, {
|
|
1011
1021
|
get each() {
|
|
1012
1022
|
return se();
|
|
@@ -1015,22 +1025,22 @@ function Ne(e) {
|
|
|
1015
1025
|
}), t), i.$$click = Ie, a(i, n(X, {
|
|
1016
1026
|
size: 16,
|
|
1017
1027
|
"aria-hidden": "true"
|
|
1018
|
-
}), null), a(i, () => r.resetLabel ?? "Reset", null), a(o, n(
|
|
1028
|
+
}), null), a(i, () => r.resetLabel ?? "Reset", null), a(o, n(de, {
|
|
1019
1029
|
size: 16,
|
|
1020
1030
|
"aria-hidden": "true"
|
|
1021
1031
|
}), null), a(o, () => r.applyLabel ?? "Search", null), e;
|
|
1022
1032
|
})();
|
|
1023
1033
|
}
|
|
1024
1034
|
return (() => {
|
|
1025
|
-
var e =
|
|
1035
|
+
var e = Oe(), o = e.firstChild, u = o.nextSibling, d = u.nextSibling;
|
|
1026
1036
|
return a(o, n(p, {
|
|
1027
1037
|
each: W,
|
|
1028
1038
|
children: qe
|
|
1029
|
-
})), a(u, n(
|
|
1030
|
-
rows:
|
|
1039
|
+
})), a(u, n(ue, s(l, {
|
|
1040
|
+
rows: k,
|
|
1031
1041
|
toolbar: We
|
|
1032
1042
|
}))), a(d, Xe), i((n) => {
|
|
1033
|
-
var i = `filter-table${r.class ? ` ${r.class}` : ""}`, a =
|
|
1043
|
+
var i = `filter-table${r.class ? ` ${r.class}` : ""}`, a = ce("results"), o = q("results"), s = G() !== "results", l = ce("filters"), f = q("filters"), p = G() !== "filters";
|
|
1034
1044
|
return i !== n.e && t(e, n.e = i), a !== n.t && c(u, "id", n.t = a), o !== n.a && c(u, "aria-labelledby", n.a = o), s !== n.o && (u.hidden = n.o = s), l !== n.i && c(d, "id", n.i = l), f !== n.n && c(d, "aria-labelledby", n.n = f), p !== n.s && (d.hidden = n.s = p), n;
|
|
1035
1045
|
}, {
|
|
1036
1046
|
e: void 0,
|
|
@@ -1050,18 +1060,18 @@ r([
|
|
|
1050
1060
|
]);
|
|
1051
1061
|
//#endregion
|
|
1052
1062
|
//#region src/search-bar.tsx
|
|
1053
|
-
var
|
|
1054
|
-
function
|
|
1063
|
+
var Fe = /*#__PURE__*/ d("<kbd class=search-bar-shortcut>"), Ie = /*#__PURE__*/ d("<button type=button class=search-bar-clear>"), Le = /*#__PURE__*/ d("<div><input class=search-bar-input>");
|
|
1064
|
+
function Re(e) {
|
|
1055
1065
|
let r, s = () => e.shortcutKey ?? "k", l = () => e.shortcutLabel ?? `Ctrl ${String(s()).toUpperCase()}`;
|
|
1056
|
-
return
|
|
1066
|
+
return S(() => {
|
|
1057
1067
|
let e = (e) => {
|
|
1058
1068
|
let t = s();
|
|
1059
1069
|
t !== !1 && r && (!(e.ctrlKey || e.metaKey) || e.altKey || e.shiftKey || e.key.toLowerCase() === t.toLowerCase() && (e.preventDefault(), r.focus(), r.select()));
|
|
1060
1070
|
};
|
|
1061
|
-
document.addEventListener("keydown", e),
|
|
1071
|
+
document.addEventListener("keydown", e), x(() => document.removeEventListener("keydown", e));
|
|
1062
1072
|
}), (() => {
|
|
1063
|
-
var u =
|
|
1064
|
-
a(u, n(
|
|
1073
|
+
var u = Le(), d = u.firstChild;
|
|
1074
|
+
a(u, n(de, {
|
|
1065
1075
|
size: 17,
|
|
1066
1076
|
class: "search-bar-icon",
|
|
1067
1077
|
"aria-hidden": "true"
|
|
@@ -1072,7 +1082,7 @@ function Le(e) {
|
|
|
1072
1082
|
return o(() => !e.value)() && s() !== !1;
|
|
1073
1083
|
},
|
|
1074
1084
|
get children() {
|
|
1075
|
-
var e =
|
|
1085
|
+
var e = Fe();
|
|
1076
1086
|
return a(e, l), e;
|
|
1077
1087
|
}
|
|
1078
1088
|
}), null), a(u, n(m, {
|
|
@@ -1080,7 +1090,7 @@ function Le(e) {
|
|
|
1080
1090
|
return e.value;
|
|
1081
1091
|
},
|
|
1082
1092
|
get children() {
|
|
1083
|
-
var t =
|
|
1093
|
+
var t = Ie();
|
|
1084
1094
|
return t.$$click = () => e.onInput(""), a(t, n(X, {
|
|
1085
1095
|
size: 15,
|
|
1086
1096
|
"aria-hidden": "true"
|
|
@@ -1099,4 +1109,4 @@ function Le(e) {
|
|
|
1099
1109
|
}
|
|
1100
1110
|
r(["input", "click"]);
|
|
1101
1111
|
//#endregion
|
|
1102
|
-
export {
|
|
1112
|
+
export { L as Combobox, ue as DataTable, Pe as FilterTable, Re as SearchBar };
|
package/dist/styles.css
CHANGED
|
@@ -300,6 +300,26 @@
|
|
|
300
300
|
box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
/* Preview of the highlighted option, beside the list (outside its scroll box). */
|
|
304
|
+
.combobox-preview {
|
|
305
|
+
position: absolute;
|
|
306
|
+
top: calc(100% + 0.2rem);
|
|
307
|
+
left: calc(100% + 0.4rem);
|
|
308
|
+
z-index: 20;
|
|
309
|
+
/* Positioned past the combobox's right edge, so it would shrink to min-content. */
|
|
310
|
+
width: max-content;
|
|
311
|
+
padding: 0.5rem;
|
|
312
|
+
border: 1px solid
|
|
313
|
+
var(--combobox-border, var(--border, light-dark(#d0d0d0, #3a3e45)));
|
|
314
|
+
border-radius: 0.375rem;
|
|
315
|
+
background: var(
|
|
316
|
+
--combobox-panel-bg,
|
|
317
|
+
var(--surface, light-dark(#ffffff, #1d2024))
|
|
318
|
+
);
|
|
319
|
+
box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
|
|
320
|
+
pointer-events: none;
|
|
321
|
+
}
|
|
322
|
+
|
|
303
323
|
.combobox-option,
|
|
304
324
|
.combobox-empty {
|
|
305
325
|
padding: 0.3rem 0.5rem;
|