@juspay/svelte-ui-components 4.10.0 → 4.10.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 +27 -0
- package/dist/Checkbox/Checkbox.svelte +18 -1
- package/dist/SplitButton/SplitButton.svelte +21 -1
- package/dist/SplitButton/properties.d.ts +7 -0
- package/dist/Table/BuiltinCell.svelte +10 -3
- package/dist/Table/Table.svelte +3 -1
- package/dist-wc/index.js +89 -72
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -243,6 +243,33 @@ import '@juspay/svelte-ui-components/wc';
|
|
|
243
243
|
Theming works identically to the Svelte components — the same `--{component}-{element}-{property}`
|
|
244
244
|
CSS custom properties apply across the shadow DOM boundary.
|
|
245
245
|
|
|
246
|
+
### Event handlers: use `addEventListener`, not `element.onclick`
|
|
247
|
+
|
|
248
|
+
Handlers are passed as **props**, and 91 of those props are named after event-handler
|
|
249
|
+
accessors that already exist on `HTMLElement` — `onclick`, `onchange`, `oninput`,
|
|
250
|
+
`onkeydown` and 21 others. On a custom element the component's prop wins, so assigning
|
|
251
|
+
the property does not register a DOM handler the way it would anywhere else:
|
|
252
|
+
|
|
253
|
+
```js
|
|
254
|
+
const checkbox = document.querySelector('sui-checkbox');
|
|
255
|
+
|
|
256
|
+
// Sets the component's prop. On sui-checkbox and sui-toggle that prop is called
|
|
257
|
+
// with a boolean, so `event` here is `true` / `false`, not a MouseEvent.
|
|
258
|
+
checkbox.onclick = (event) => console.log(event.clientX); // undefined
|
|
259
|
+
|
|
260
|
+
// Always does what you expect.
|
|
261
|
+
checkbox.addEventListener('click', (event) => console.log(event.clientX));
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Two things are **not** affected: the inline HTML attribute (`<sui-button onclick="...">`)
|
|
265
|
+
never used this accessor, and `addEventListener` is untouched. Only the JavaScript
|
|
266
|
+
property assignment differs.
|
|
267
|
+
|
|
268
|
+
Renaming these is a breaking change to every element's JavaScript API, so the whole set
|
|
269
|
+
has to move at once at a major — the same way the `aria*` collisions were renamed in
|
|
270
|
+
4.0.0. Until then the existing declarations are recorded in
|
|
271
|
+
`scripts/wc-parity/prop-parity.test.ts`, which fails the build on a new one.
|
|
272
|
+
|
|
246
273
|
---
|
|
247
274
|
|
|
248
275
|
## Theming
|
|
@@ -19,6 +19,23 @@
|
|
|
19
19
|
attributes
|
|
20
20
|
}: CheckboxProperties = $props();
|
|
21
21
|
|
|
22
|
+
// Visible text wins over `ariaLabel`, which is what `properties.ts` has always
|
|
23
|
+
// promised and what WCAG 2.5.3 requires: a control showing "Accept terms" must
|
|
24
|
+
// carry that text in its accessible name, so letting an explicit label replace
|
|
25
|
+
// it outright would swap the name a speech-input user says for one they cannot
|
|
26
|
+
// see. `ariaLabel` names the box only when there is no visible text to use —
|
|
27
|
+
// the icon-only and label-in-a-table-header cases it exists for.
|
|
28
|
+
//
|
|
29
|
+
// A blank `ariaLabel` is treated as absent rather than as an empty name, since
|
|
30
|
+
// `aria-label=""` leaves the box unnamed, which is the bug this fixes.
|
|
31
|
+
const accessibleName: string | null = $derived(
|
|
32
|
+
text.length > 0
|
|
33
|
+
? text
|
|
34
|
+
: typeof ariaLabel === 'string' && ariaLabel.trim() !== ''
|
|
35
|
+
? ariaLabel
|
|
36
|
+
: null
|
|
37
|
+
);
|
|
38
|
+
|
|
22
39
|
function handleClick(): void {
|
|
23
40
|
if (disabled) {
|
|
24
41
|
return;
|
|
@@ -82,7 +99,7 @@
|
|
|
82
99
|
aria-checked={indeterminate ? 'mixed' : checked}
|
|
83
100
|
aria-disabled={disabled}
|
|
84
101
|
aria-controls={ariaControls ?? null}
|
|
85
|
-
aria-label={
|
|
102
|
+
aria-label={accessibleName}
|
|
86
103
|
onkeydown={handleKeyDown}
|
|
87
104
|
data-pw={typeof testId === 'string' ? `${testId}-box` : null}
|
|
88
105
|
testID={typeof testId === 'string' ? `${testId}-box` : null}
|
|
@@ -12,12 +12,27 @@
|
|
|
12
12
|
testId,
|
|
13
13
|
dropdownIcon,
|
|
14
14
|
classes,
|
|
15
|
+
triggerAriaLabel,
|
|
15
16
|
onclick,
|
|
16
17
|
onselect
|
|
17
18
|
}: SplitButtonProperties = $props();
|
|
18
19
|
|
|
19
20
|
let menuOpen = $state(false);
|
|
20
21
|
|
|
22
|
+
// The dropdown trigger renders a chevron and nothing else, so without a name it is a
|
|
23
|
+
// focusable control that announces as an unnamed button.
|
|
24
|
+
// A blank `triggerAriaLabel` falls back rather than being honoured: `??` only
|
|
25
|
+
// rejects null and undefined, so an empty string would have been passed
|
|
26
|
+
// through as `aria-label=""` and left the trigger unnamed — the very thing
|
|
27
|
+
// this generated fallback exists to prevent.
|
|
28
|
+
let resolvedTriggerAriaLabel = $derived(
|
|
29
|
+
typeof triggerAriaLabel === 'string' && triggerAriaLabel.trim() !== ''
|
|
30
|
+
? triggerAriaLabel
|
|
31
|
+
: text.length > 0
|
|
32
|
+
? `More ${text} options`
|
|
33
|
+
: 'More options'
|
|
34
|
+
);
|
|
35
|
+
|
|
21
36
|
function handlePrimaryClick(event: MouseEvent): void {
|
|
22
37
|
if (disabled) {
|
|
23
38
|
return;
|
|
@@ -40,7 +55,12 @@
|
|
|
40
55
|
<Button {text} onclick={handlePrimaryClick} {disabled} />
|
|
41
56
|
</div>
|
|
42
57
|
<div class="split-button-trigger">
|
|
43
|
-
<Menu
|
|
58
|
+
<Menu
|
|
59
|
+
{items}
|
|
60
|
+
bind:open={menuOpen}
|
|
61
|
+
triggerAriaLabel={resolvedTriggerAriaLabel}
|
|
62
|
+
onselect={handleMenuSelect}
|
|
63
|
+
>
|
|
44
64
|
{#snippet trigger()}
|
|
45
65
|
<span class="split-button-arrow">
|
|
46
66
|
{#if typeof dropdownIcon === 'function'}
|
|
@@ -10,6 +10,13 @@ export type OptionalSplitButtonProperties = {
|
|
|
10
10
|
testId?: string;
|
|
11
11
|
dropdownIcon?: Snippet;
|
|
12
12
|
classes?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Accessible name for the dropdown trigger — the second control, which shows only a
|
|
15
|
+
* chevron and so has no text to be named by. Defaults to `More <text> options`, which
|
|
16
|
+
* distinguishes it from the primary button beside it. Named after Menu's own
|
|
17
|
+
* `triggerAriaLabel`, which is what it forwards to.
|
|
18
|
+
*/
|
|
19
|
+
triggerAriaLabel?: string;
|
|
13
20
|
};
|
|
14
21
|
export type SplitButtonEventProperties = {
|
|
15
22
|
onclick?: (event: MouseEvent) => void;
|
|
@@ -447,11 +447,16 @@
|
|
|
447
447
|
}))}
|
|
448
448
|
testId={generatedTestId('menu', rowIndex)}
|
|
449
449
|
{usePortal}
|
|
450
|
+
interactiveTrigger
|
|
450
451
|
onselect={(menuItem) => column.onMenuAction?.(rowIndex, menuItem.value, originalIndex)}
|
|
451
452
|
>
|
|
452
|
-
{#snippet trigger()}
|
|
453
|
+
{#snippet trigger(triggerProps)}
|
|
453
454
|
<span class="builtin-icon-button">
|
|
454
|
-
<Button
|
|
455
|
+
<Button
|
|
456
|
+
{...triggerProps}
|
|
457
|
+
ariaLabel="More actions"
|
|
458
|
+
testId={generatedTestId('menuTrigger', rowIndex)}
|
|
459
|
+
>
|
|
455
460
|
{#snippet icon()}
|
|
456
461
|
<!-- eslint-disable svelte/no-at-html-tags -->
|
|
457
462
|
<span class="builtin-menu-dots">{@html dotsSvg}</span>
|
|
@@ -483,11 +488,13 @@
|
|
|
483
488
|
}))}
|
|
484
489
|
testId={generatedTestId('popup', rowIndex)}
|
|
485
490
|
{usePortal}
|
|
491
|
+
interactiveTrigger
|
|
486
492
|
onselect={(menuItem) => column.onMenuAction?.(rowIndex, menuItem.value, originalIndex)}
|
|
487
493
|
>
|
|
488
|
-
{#snippet trigger()}
|
|
494
|
+
{#snippet trigger(triggerProps)}
|
|
489
495
|
<span class="builtin-icon-button">
|
|
490
496
|
<Button
|
|
497
|
+
{...triggerProps}
|
|
491
498
|
ariaLabel={popupData.ariaLabel ?? 'More actions'}
|
|
492
499
|
testId={generatedTestId('popupTrigger', rowIndex)}
|
|
493
500
|
>
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -758,19 +758,21 @@
|
|
|
758
758
|
}))}
|
|
759
759
|
selectedValue={filter.selectedValue ?? null}
|
|
760
760
|
role="listbox"
|
|
761
|
+
interactiveTrigger
|
|
761
762
|
testId={headerColumn.testId && `${headerColumn.testId}-filter`}
|
|
762
763
|
onselect={(menuItem) =>
|
|
763
764
|
filter.onFilterChange?.(
|
|
764
765
|
menuItem.value === filter.selectedValue ? null : menuItem.value
|
|
765
766
|
)}
|
|
766
767
|
>
|
|
767
|
-
{#snippet trigger()}
|
|
768
|
+
{#snippet trigger(triggerProps)}
|
|
768
769
|
<span
|
|
769
770
|
class="table-header-filter-trigger"
|
|
770
771
|
class:table-header-filter-active={typeof filter.selectedValue ===
|
|
771
772
|
'string'}
|
|
772
773
|
>
|
|
773
774
|
<Button
|
|
775
|
+
{...triggerProps}
|
|
774
776
|
ariaLabel="Filter by {header}"
|
|
775
777
|
testId={headerColumn.testId &&
|
|
776
778
|
`${headerColumn.testId}-filter-trigger`}
|
package/dist-wc/index.js
CHANGED
|
@@ -5745,8 +5745,8 @@ var checkmark_default = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"curre
|
|
|
5745
5745
|
};
|
|
5746
5746
|
function Checkbox(e, t) {
|
|
5747
5747
|
push(t, !0), append_styles$1(e, $$css$77);
|
|
5748
|
-
let n = prop(t, "text", 7), i = prop(t, "checked", 15, !1), a = prop(t, "disabled", 7, !1), o = prop(t, "indeterminate", 15, !1), s = prop(t, "testId", 7), c = prop(t, "checkedIcon", 7), l = prop(t, "indeterminateIcon", 7), u = prop(t, "onclick", 7), f = prop(t, "classes", 7), p = prop(t, "ariaControls", 7), h = prop(t, "ariaLabel", 7), S = prop(t, "controlled", 7, !1), C = prop(t, "attributes", 7);
|
|
5749
|
-
function
|
|
5748
|
+
let n = prop(t, "text", 7), i = prop(t, "checked", 15, !1), a = prop(t, "disabled", 7, !1), o = prop(t, "indeterminate", 15, !1), s = prop(t, "testId", 7), c = prop(t, "checkedIcon", 7), l = prop(t, "indeterminateIcon", 7), u = prop(t, "onclick", 7), f = prop(t, "classes", 7), p = prop(t, "ariaControls", 7), h = prop(t, "ariaLabel", 7), S = prop(t, "controlled", 7, !1), C = prop(t, "attributes", 7), k = /* @__PURE__ */ user_derived(() => n().length > 0 ? n() : typeof h() == "string" && h().trim() !== "" ? h() : null);
|
|
5749
|
+
function R() {
|
|
5750
5750
|
if (!a()) {
|
|
5751
5751
|
if (S()) {
|
|
5752
5752
|
u()?.(!i());
|
|
@@ -5755,10 +5755,10 @@ function Checkbox(e, t) {
|
|
|
5755
5755
|
i(!i()), o() && o(!1), u()?.(i());
|
|
5756
5756
|
}
|
|
5757
5757
|
}
|
|
5758
|
-
function
|
|
5759
|
-
(e.key === " " || e.key === "Enter") && (e.preventDefault(),
|
|
5758
|
+
function G(e) {
|
|
5759
|
+
(e.key === " " || e.key === "Enter") && (e.preventDefault(), R());
|
|
5760
5760
|
}
|
|
5761
|
-
var
|
|
5761
|
+
var te = {
|
|
5762
5762
|
get text() {
|
|
5763
5763
|
return n();
|
|
5764
5764
|
},
|
|
@@ -5837,20 +5837,20 @@ function Checkbox(e, t) {
|
|
|
5837
5837
|
set attributes(e) {
|
|
5838
5838
|
C(e), flushSync();
|
|
5839
5839
|
}
|
|
5840
|
-
},
|
|
5841
|
-
let
|
|
5842
|
-
var
|
|
5843
|
-
remove_input_defaults(
|
|
5844
|
-
var
|
|
5845
|
-
attribute_effect(
|
|
5840
|
+
}, ne = root_2$50();
|
|
5841
|
+
let re;
|
|
5842
|
+
var be = child(ne);
|
|
5843
|
+
remove_input_defaults(be), set_attribute(be, "tabindex", -1);
|
|
5844
|
+
var Me = sibling(be, 2);
|
|
5845
|
+
attribute_effect(Me, () => ({
|
|
5846
5846
|
class: "box",
|
|
5847
5847
|
role: "checkbox",
|
|
5848
5848
|
tabindex: a() ? -1 : 0,
|
|
5849
5849
|
"aria-checked": o() ? "mixed" : i(),
|
|
5850
5850
|
"aria-disabled": a(),
|
|
5851
5851
|
"aria-controls": p() ?? null,
|
|
5852
|
-
"aria-label":
|
|
5853
|
-
onkeydown:
|
|
5852
|
+
"aria-label": get(k),
|
|
5853
|
+
onkeydown: G,
|
|
5854
5854
|
"data-pw": typeof s() == "string" ? `${s()}-box` : null,
|
|
5855
5855
|
testID: typeof s() == "string" ? `${s()}-box` : null,
|
|
5856
5856
|
...C(),
|
|
@@ -5859,7 +5859,7 @@ function Checkbox(e, t) {
|
|
|
5859
5859
|
indeterminate: o()
|
|
5860
5860
|
}
|
|
5861
5861
|
}), void 0, void 0, void 0, "svelte-f1in4m");
|
|
5862
|
-
var
|
|
5862
|
+
var Re = child(Me), Ue = (e) => {
|
|
5863
5863
|
var t = comment(), n = first_child(t), i = (e) => {
|
|
5864
5864
|
var t = comment();
|
|
5865
5865
|
snippet(first_child(t), c), append(e, t);
|
|
@@ -5871,10 +5871,10 @@ function Checkbox(e, t) {
|
|
|
5871
5871
|
typeof c() == "function" ? e(i) : e(a, -1);
|
|
5872
5872
|
}), append(e, t);
|
|
5873
5873
|
};
|
|
5874
|
-
if_block(
|
|
5875
|
-
i() && !o() && e(
|
|
5874
|
+
if_block(Re, (e) => {
|
|
5875
|
+
i() && !o() && e(Ue);
|
|
5876
5876
|
});
|
|
5877
|
-
var
|
|
5877
|
+
var it = sibling(Re, 2), at = (e) => {
|
|
5878
5878
|
var t = comment(), n = first_child(t), i = (e) => {
|
|
5879
5879
|
var t = comment();
|
|
5880
5880
|
snippet(first_child(t), l), append(e, t);
|
|
@@ -5886,15 +5886,15 @@ function Checkbox(e, t) {
|
|
|
5886
5886
|
typeof l() == "function" ? e(i) : e(a, -1);
|
|
5887
5887
|
}), append(e, t);
|
|
5888
5888
|
};
|
|
5889
|
-
if_block(
|
|
5890
|
-
o() && e(
|
|
5891
|
-
}), reset(
|
|
5892
|
-
var
|
|
5893
|
-
return reset(
|
|
5894
|
-
|
|
5895
|
-
}), delegated("click",
|
|
5896
|
-
e.preventDefault(),
|
|
5897
|
-
}), delegated("click",
|
|
5889
|
+
if_block(it, (e) => {
|
|
5890
|
+
o() && e(at);
|
|
5891
|
+
}), reset(Me);
|
|
5892
|
+
var ot = sibling(Me, 2), ct = child(ot, !0);
|
|
5893
|
+
return reset(ot), reset(ne), template_effect(() => {
|
|
5894
|
+
re = set_class(ne, 1, `container ${f() ?? "" ?? ""}`, "svelte-f1in4m", re, { disabled: a() }), set_attribute(ne, "data-pw", s()), set_attribute(ne, "testid", s()), set_checked(be, i()), be.disabled = a(), set_attribute(be, "data-pw", typeof s() == "string" ? `${s()}-native-input` : null), set_attribute(be, "testid", typeof s() == "string" ? `${s()}-native-input` : null), set_attribute(ot, "hidden", n().length === 0), set_text(ct, n());
|
|
5895
|
+
}), delegated("click", ne, (e) => {
|
|
5896
|
+
e.preventDefault(), R();
|
|
5897
|
+
}), delegated("click", be, (e) => e.stopPropagation()), append(e, ne), pop(te);
|
|
5898
5898
|
}
|
|
5899
5899
|
delegate(["click"]), create_custom_element(Checkbox, {
|
|
5900
5900
|
text: {},
|
|
@@ -18062,14 +18062,14 @@ var chevron_down_sm_default = "<svg width=\"10\" height=\"6\" viewBox=\"0 0 10 6
|
|
|
18062
18062
|
};
|
|
18063
18063
|
function SplitButton(e, t) {
|
|
18064
18064
|
push(t, !0), append_styles$1(e, $$css$31);
|
|
18065
|
-
let n = prop(t, "text", 7), i = prop(t, "items", 7), a = prop(t, "disabled", 7, !1), o = prop(t, "testId", 7), s = prop(t, "dropdownIcon", 7), c = prop(t, "classes", 7), l = prop(t, "
|
|
18066
|
-
function
|
|
18067
|
-
a() ||
|
|
18065
|
+
let n = prop(t, "text", 7), i = prop(t, "items", 7), a = prop(t, "disabled", 7, !1), o = prop(t, "testId", 7), s = prop(t, "dropdownIcon", 7), c = prop(t, "classes", 7), l = prop(t, "triggerAriaLabel", 7), u = prop(t, "onclick", 7), f = prop(t, "onselect", 7), p = /* @__PURE__ */ state(!1), h = /* @__PURE__ */ user_derived(() => typeof l() == "string" && l().trim() !== "" ? l() : n().length > 0 ? `More ${n()} options` : "More options");
|
|
18066
|
+
function S(e) {
|
|
18067
|
+
a() || u()?.(e);
|
|
18068
18068
|
}
|
|
18069
|
-
function
|
|
18070
|
-
|
|
18069
|
+
function C(e) {
|
|
18070
|
+
f()?.(e);
|
|
18071
18071
|
}
|
|
18072
|
-
var
|
|
18072
|
+
var k = {
|
|
18073
18073
|
get text() {
|
|
18074
18074
|
return n();
|
|
18075
18075
|
},
|
|
@@ -18106,41 +18106,50 @@ function SplitButton(e, t) {
|
|
|
18106
18106
|
set classes(e) {
|
|
18107
18107
|
c(e), flushSync();
|
|
18108
18108
|
},
|
|
18109
|
-
get
|
|
18109
|
+
get triggerAriaLabel() {
|
|
18110
18110
|
return l();
|
|
18111
18111
|
},
|
|
18112
|
-
set
|
|
18112
|
+
set triggerAriaLabel(e) {
|
|
18113
18113
|
l(e), flushSync();
|
|
18114
18114
|
},
|
|
18115
|
-
get
|
|
18115
|
+
get onclick() {
|
|
18116
18116
|
return u();
|
|
18117
18117
|
},
|
|
18118
|
-
set
|
|
18118
|
+
set onclick(e) {
|
|
18119
18119
|
u(e), flushSync();
|
|
18120
|
+
},
|
|
18121
|
+
get onselect() {
|
|
18122
|
+
return f();
|
|
18123
|
+
},
|
|
18124
|
+
set onselect(e) {
|
|
18125
|
+
f(e), flushSync();
|
|
18120
18126
|
}
|
|
18121
|
-
},
|
|
18122
|
-
let
|
|
18123
|
-
var
|
|
18124
|
-
Button(child(
|
|
18127
|
+
}, R = root_1$26();
|
|
18128
|
+
let G;
|
|
18129
|
+
var te = child(R);
|
|
18130
|
+
Button(child(te), {
|
|
18125
18131
|
get text() {
|
|
18126
18132
|
return n();
|
|
18127
18133
|
},
|
|
18128
|
-
onclick:
|
|
18134
|
+
onclick: S,
|
|
18129
18135
|
get disabled() {
|
|
18130
18136
|
return a();
|
|
18131
18137
|
}
|
|
18132
|
-
}), reset(
|
|
18133
|
-
var
|
|
18134
|
-
return Menu(child(
|
|
18138
|
+
}), reset(te);
|
|
18139
|
+
var ne = sibling(te, 2);
|
|
18140
|
+
return Menu(child(ne), {
|
|
18135
18141
|
get items() {
|
|
18136
18142
|
return i();
|
|
18137
18143
|
},
|
|
18138
|
-
|
|
18144
|
+
get triggerAriaLabel() {
|
|
18145
|
+
return get(h);
|
|
18146
|
+
},
|
|
18147
|
+
onselect: C,
|
|
18139
18148
|
get open() {
|
|
18140
|
-
return get(
|
|
18149
|
+
return get(p);
|
|
18141
18150
|
},
|
|
18142
18151
|
set open(e) {
|
|
18143
|
-
set(
|
|
18152
|
+
set(p, e, !0);
|
|
18144
18153
|
},
|
|
18145
18154
|
trigger: (e) => {
|
|
18146
18155
|
var t = root$29(), n = child(t), i = (e) => {
|
|
@@ -18155,9 +18164,9 @@ function SplitButton(e, t) {
|
|
|
18155
18164
|
}), reset(t), append(e, t);
|
|
18156
18165
|
},
|
|
18157
18166
|
$$slots: { trigger: !0 }
|
|
18158
|
-
}), reset(
|
|
18159
|
-
|
|
18160
|
-
}), append(e,
|
|
18167
|
+
}), reset(ne), reset(R), template_effect(() => {
|
|
18168
|
+
G = set_class(R, 1, `split-button ${c() ?? "" ?? ""}`, "svelte-2cti", G, { disabled: a() }), set_attribute(R, "data-pw", typeof o() == "string" ? o() : null), set_attribute(R, "testid", typeof o() == "string" ? o() : null);
|
|
18169
|
+
}), append(e, R), pop(k);
|
|
18161
18170
|
}
|
|
18162
18171
|
create_custom_element(SplitButton, {
|
|
18163
18172
|
text: {},
|
|
@@ -18166,6 +18175,7 @@ create_custom_element(SplitButton, {
|
|
|
18166
18175
|
testId: {},
|
|
18167
18176
|
dropdownIcon: {},
|
|
18168
18177
|
classes: {},
|
|
18178
|
+
triggerAriaLabel: {},
|
|
18169
18179
|
onclick: {},
|
|
18170
18180
|
onselect: {}
|
|
18171
18181
|
}, [], [], { mode: "open" });
|
|
@@ -18202,6 +18212,10 @@ customElements.define("sui-split-button", create_custom_element(SplitButton_wc,
|
|
|
18202
18212
|
type: "String"
|
|
18203
18213
|
},
|
|
18204
18214
|
classes: { type: "String" },
|
|
18215
|
+
triggerAriaLabel: {
|
|
18216
|
+
attribute: "trigger-aria-label",
|
|
18217
|
+
type: "String"
|
|
18218
|
+
},
|
|
18205
18219
|
onclick: { type: "Object" },
|
|
18206
18220
|
onselect: { type: "Object" },
|
|
18207
18221
|
dropdownIcon: { type: "Object" }
|
|
@@ -18878,23 +18892,23 @@ function BuiltinCell(e, t) {
|
|
|
18878
18892
|
});
|
|
18879
18893
|
var f = sibling(c, 2), p = (e) => {
|
|
18880
18894
|
{
|
|
18881
|
-
let i = (e) => {
|
|
18882
|
-
var
|
|
18895
|
+
let i = (e, t = noop) => {
|
|
18896
|
+
var n = root_23$3(), i = child(n);
|
|
18883
18897
|
{
|
|
18884
18898
|
let e = (e) => {
|
|
18885
18899
|
var t = root_22$3();
|
|
18886
18900
|
html(t, () => dots_vertical_default, !0), reset(t), append(e, t);
|
|
18887
|
-
},
|
|
18888
|
-
Button(
|
|
18901
|
+
}, n = /* @__PURE__ */ user_derived(() => u("menuTrigger", a()));
|
|
18902
|
+
Button(i, spread_props(t, {
|
|
18889
18903
|
ariaLabel: "More actions",
|
|
18890
18904
|
get testId() {
|
|
18891
|
-
return get(
|
|
18905
|
+
return get(n);
|
|
18892
18906
|
},
|
|
18893
18907
|
icon: e,
|
|
18894
18908
|
$$slots: { icon: !0 }
|
|
18895
|
-
});
|
|
18909
|
+
}));
|
|
18896
18910
|
}
|
|
18897
|
-
reset(
|
|
18911
|
+
reset(n), append(e, n);
|
|
18898
18912
|
}, c = /* @__PURE__ */ user_derived(() => get(t).menuItems.map((e) => ({
|
|
18899
18913
|
value: e.id,
|
|
18900
18914
|
label: e.label ?? e.id,
|
|
@@ -18911,6 +18925,7 @@ function BuiltinCell(e, t) {
|
|
|
18911
18925
|
get usePortal() {
|
|
18912
18926
|
return s();
|
|
18913
18927
|
},
|
|
18928
|
+
interactiveTrigger: !0,
|
|
18914
18929
|
onselect: (e) => n().onMenuAction?.(a(), e.value, o()),
|
|
18915
18930
|
trigger: i,
|
|
18916
18931
|
$$slots: { trigger: !0 }
|
|
@@ -18932,25 +18947,25 @@ function BuiltinCell(e, t) {
|
|
|
18932
18947
|
var c = comment(), l = first_child(c), f = (e) => {
|
|
18933
18948
|
var i = root_18$4(), c = child(i);
|
|
18934
18949
|
{
|
|
18935
|
-
let e = (e) => {
|
|
18936
|
-
var
|
|
18950
|
+
let e = (e, n = noop) => {
|
|
18951
|
+
var i = root_23$3(), o = child(i);
|
|
18937
18952
|
{
|
|
18938
18953
|
let e = (e) => {
|
|
18939
18954
|
var t = root_22$3();
|
|
18940
18955
|
html(t, () => dots_vertical_default, !0), reset(t), append(e, t);
|
|
18941
|
-
},
|
|
18942
|
-
Button(
|
|
18956
|
+
}, i = /* @__PURE__ */ user_derived(() => get(t).ariaLabel ?? "More actions"), s = /* @__PURE__ */ user_derived(() => u("popupTrigger", a()));
|
|
18957
|
+
Button(o, spread_props(n, {
|
|
18943
18958
|
get ariaLabel() {
|
|
18944
|
-
return get(
|
|
18959
|
+
return get(i);
|
|
18945
18960
|
},
|
|
18946
18961
|
get testId() {
|
|
18947
|
-
return get(
|
|
18962
|
+
return get(s);
|
|
18948
18963
|
},
|
|
18949
18964
|
icon: e,
|
|
18950
18965
|
$$slots: { icon: !0 }
|
|
18951
|
-
});
|
|
18966
|
+
}));
|
|
18952
18967
|
}
|
|
18953
|
-
reset(
|
|
18968
|
+
reset(i), append(e, i);
|
|
18954
18969
|
}, i = /* @__PURE__ */ user_derived(() => get(t).items.map((e) => ({
|
|
18955
18970
|
value: e.id,
|
|
18956
18971
|
label: e.label ?? e.id,
|
|
@@ -18967,6 +18982,7 @@ function BuiltinCell(e, t) {
|
|
|
18967
18982
|
get usePortal() {
|
|
18968
18983
|
return s();
|
|
18969
18984
|
},
|
|
18985
|
+
interactiveTrigger: !0,
|
|
18970
18986
|
onselect: (e) => n().onMenuAction?.(a(), e.value, o()),
|
|
18971
18987
|
trigger: e,
|
|
18972
18988
|
$$slots: { trigger: !0 }
|
|
@@ -19510,16 +19526,16 @@ function Table(e, t) {
|
|
|
19510
19526
|
let n = /* @__PURE__ */ user_derived(() => get(i).filter);
|
|
19511
19527
|
var a = root_11$6(), o = child(a);
|
|
19512
19528
|
{
|
|
19513
|
-
let e = (e) => {
|
|
19514
|
-
var
|
|
19515
|
-
let
|
|
19516
|
-
var
|
|
19529
|
+
let e = (e, a = noop) => {
|
|
19530
|
+
var o = root_10$7();
|
|
19531
|
+
let s;
|
|
19532
|
+
var c = child(o);
|
|
19517
19533
|
{
|
|
19518
19534
|
let e = (e) => {
|
|
19519
19535
|
var t = root_9$8();
|
|
19520
19536
|
html(t, () => chevron_down_sm_default, !0), reset(t), append(e, t);
|
|
19521
19537
|
}, n = /* @__PURE__ */ user_derived(() => get(i).testId && `${get(i).testId}-filter-trigger`);
|
|
19522
|
-
Button(
|
|
19538
|
+
Button(c, spread_props(a, {
|
|
19523
19539
|
get ariaLabel() {
|
|
19524
19540
|
return `Filter by ${get(t) ?? ""}`;
|
|
19525
19541
|
},
|
|
@@ -19528,9 +19544,9 @@ function Table(e, t) {
|
|
|
19528
19544
|
},
|
|
19529
19545
|
icon: e,
|
|
19530
19546
|
$$slots: { icon: !0 }
|
|
19531
|
-
});
|
|
19547
|
+
}));
|
|
19532
19548
|
}
|
|
19533
|
-
reset(
|
|
19549
|
+
reset(o), template_effect(() => s = set_class(o, 1, "table-header-filter-trigger svelte-171ci2i", null, s, { "table-header-filter-active": typeof get(n).selectedValue == "string" })), append(e, o);
|
|
19534
19550
|
}, a = /* @__PURE__ */ user_derived(() => get(n).options.map((e) => ({
|
|
19535
19551
|
value: e.value,
|
|
19536
19552
|
label: e.label
|
|
@@ -19543,6 +19559,7 @@ function Table(e, t) {
|
|
|
19543
19559
|
return get(s);
|
|
19544
19560
|
},
|
|
19545
19561
|
role: "listbox",
|
|
19562
|
+
interactiveTrigger: !0,
|
|
19546
19563
|
get testId() {
|
|
19547
19564
|
return get(c);
|
|
19548
19565
|
},
|