@juspay/svelte-ui-components 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/Accordion.svelte +7 -0
- package/dist/Carousel/Carousel.svelte +2 -1
- package/dist/Input/Input.svelte +2 -2
- package/dist/ListItem/ListItem.svelte +1 -1
- package/dist/Status/Status.svelte +12 -2
- package/dist/TypewriterText/TypewriterText.svelte +14 -0
- package/dist/utils.js +6 -1
- package/dist-wc/index.js +37 -26
- package/package.json +1 -1
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
the panel from elsewhere too. */
|
|
21
21
|
const uid = $props.id();
|
|
22
22
|
const effectivePanelId = $derived(panelId ?? `accordion-panel-${uid}`);
|
|
23
|
+
/* The trigger id comes from the same per-instance uid, not from effectivePanelId: a caller
|
|
24
|
+
assigning `panelId` after mount must move the panel's id, not rename the trigger, so the
|
|
25
|
+
control's id stays stable for assistive technology and anything else referencing it. */
|
|
26
|
+
const triggerId = `accordion-trigger-${uid}`;
|
|
23
27
|
|
|
24
28
|
function handleTriggerClick(): void {
|
|
25
29
|
if (disabled) {
|
|
@@ -34,6 +38,7 @@
|
|
|
34
38
|
<div
|
|
35
39
|
class="accordion-trigger {triggerClasses ?? ''}"
|
|
36
40
|
class:disabled
|
|
41
|
+
id={triggerId}
|
|
37
42
|
role="button"
|
|
38
43
|
tabindex={disabled ? -1 : 0}
|
|
39
44
|
aria-expanded={expand}
|
|
@@ -53,6 +58,8 @@
|
|
|
53
58
|
|
|
54
59
|
<div
|
|
55
60
|
id={effectivePanelId}
|
|
61
|
+
role={trigger ? 'region' : null}
|
|
62
|
+
aria-labelledby={trigger ? triggerId : null}
|
|
56
63
|
class="accordion {classes ?? ''}"
|
|
57
64
|
class:expanded={expand}
|
|
58
65
|
data-pw={typeof testId === 'string' ? testId : null}
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
<!-- eslint-disable-next-line -->
|
|
181
181
|
{#each views as _, index}
|
|
182
182
|
<div
|
|
183
|
-
class={activeSlideIndex
|
|
183
|
+
class={activeSlideIndex === index ? 'active-dot' : 'dot'}
|
|
184
184
|
onclick={() => moveSlideToIndex(index)}
|
|
185
185
|
onkeydown={(event) => {
|
|
186
186
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
@@ -192,6 +192,7 @@
|
|
|
192
192
|
role="button"
|
|
193
193
|
tabindex="0"
|
|
194
194
|
aria-label={`Go to slide ${index + 1}`}
|
|
195
|
+
aria-current={activeSlideIndex === index ? 'true' : null}
|
|
195
196
|
data-pw={typeof dotTestId === 'string' ? `${dotTestId}-${index + 1}` : null}
|
|
196
197
|
testID={typeof dotTestId === 'string' ? `${dotTestId}-${index + 1}` : null}
|
|
197
198
|
></div>
|
package/dist/Input/Input.svelte
CHANGED
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
aria-controls={ariaControls}
|
|
322
322
|
aria-activedescendant={ariaActivedescendant}
|
|
323
323
|
aria-required={mandatory || null}
|
|
324
|
-
aria-invalid={showError ? 'true' : null}
|
|
324
|
+
aria-invalid={showError && !actionInput ? 'true' : null}
|
|
325
325
|
aria-describedby={describedBy || null}
|
|
326
326
|
required={mandatory || null}
|
|
327
327
|
onfocus={onFocus}
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
aria-controls={ariaControls}
|
|
360
360
|
aria-activedescendant={ariaActivedescendant}
|
|
361
361
|
aria-required={mandatory || null}
|
|
362
|
-
aria-invalid={showError ? 'true' : null}
|
|
362
|
+
aria-invalid={showError && !actionInput ? 'true' : null}
|
|
363
363
|
aria-describedby={describedBy || null}
|
|
364
364
|
required={mandatory || null}
|
|
365
365
|
onfocus={onFocus}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
{onkeydown}
|
|
73
73
|
role={suppressRoleAndTabindex ? null : (itemRole ?? 'button')}
|
|
74
74
|
tabindex={suppressRoleAndTabindex ? null : itemRole === 'option' ? -1 : 0}
|
|
75
|
-
aria-selected={ariaSelected}
|
|
75
|
+
aria-selected={suppressRoleAndTabindex ? null : ariaSelected}
|
|
76
76
|
{id}
|
|
77
77
|
data-pw={testId}
|
|
78
78
|
testID={testId}
|
|
@@ -31,7 +31,11 @@
|
|
|
31
31
|
<Img inlineSvg src={statusIcon} alt="status" />
|
|
32
32
|
{/if}
|
|
33
33
|
</div>
|
|
34
|
-
<svelte:element
|
|
34
|
+
<svelte:element
|
|
35
|
+
this={statusTextTag}
|
|
36
|
+
class="status-text"
|
|
37
|
+
class:status-text-default={statusTextTag === 'div'}>{statusText}</svelte:element
|
|
38
|
+
>
|
|
35
39
|
<div class="status-description">
|
|
36
40
|
{#if typeof descriptionSnippet === 'function'}
|
|
37
41
|
{@render descriptionSnippet()}
|
|
@@ -51,9 +55,15 @@
|
|
|
51
55
|
|
|
52
56
|
<style>
|
|
53
57
|
.status-text {
|
|
58
|
+
margin-bottom: 8px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* The weight and colour defaults belong to the plain div only. When a consumer asks for a
|
|
62
|
+
heading tag (statusTextTag h1-h6) the whole point is that the application's own heading
|
|
63
|
+
typography applies, so those two declarations must not sit on the element and win. */
|
|
64
|
+
.status-text-default {
|
|
54
65
|
font-weight: var(--status-font-weight, 600);
|
|
55
66
|
color: var(--status-description-font-color, #2f3841);
|
|
56
|
-
margin-bottom: 8px;
|
|
57
67
|
}
|
|
58
68
|
|
|
59
69
|
.status-description {
|
|
@@ -28,6 +28,19 @@
|
|
|
28
28
|
let revealedWordCount = $state(0);
|
|
29
29
|
|
|
30
30
|
const WHITESPACE_CHARACTERS = new Set([' ', '\n']);
|
|
31
|
+
|
|
32
|
+
// The bulk-reveal path below discloses text without typing it, so the running whitespace
|
|
33
|
+
// count has to be rebuilt from the text itself or a later continuation would resume from a
|
|
34
|
+
// count that never saw the revealed suffix.
|
|
35
|
+
const countWhitespace = (value: string): number => {
|
|
36
|
+
let count = 0;
|
|
37
|
+
for (const character of value) {
|
|
38
|
+
if (WHITESPACE_CHARACTERS.has(character)) {
|
|
39
|
+
count += 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return count;
|
|
43
|
+
};
|
|
31
44
|
const PUNCTUATION_CHARACTERS = new Set([',', '.', '?', '!']);
|
|
32
45
|
const DIGIT_PATTERN = /\d/;
|
|
33
46
|
|
|
@@ -126,6 +139,7 @@
|
|
|
126
139
|
const hadRemainingText = currentIndex < text.length;
|
|
127
140
|
displayedText = text;
|
|
128
141
|
currentIndex = text.length;
|
|
142
|
+
revealedWordCount = countWhitespace(text);
|
|
129
143
|
if (hadRemainingText) {
|
|
130
144
|
onProgress?.({ index: currentIndex, total: text.length, displayedText });
|
|
131
145
|
}
|
package/dist/utils.js
CHANGED
|
@@ -304,11 +304,15 @@ export function createDebouncer(delay) {
|
|
|
304
304
|
* Callers must pair every lock with exactly one unlock.
|
|
305
305
|
*/
|
|
306
306
|
let bodyScrollLockCount = 0;
|
|
307
|
+
// Whatever inline overflow the host page had set before the first lock, so the last unlock
|
|
308
|
+
// hands it back instead of clearing it: a host running `overflow: clip` on its body keeps it.
|
|
309
|
+
let bodyScrollPreviousOverflow = '';
|
|
307
310
|
export function lockBodyScroll() {
|
|
308
311
|
if (typeof document === 'undefined') {
|
|
309
312
|
return;
|
|
310
313
|
}
|
|
311
314
|
if (bodyScrollLockCount === 0) {
|
|
315
|
+
bodyScrollPreviousOverflow = document.body.style.overflow;
|
|
312
316
|
document.body.style.overflow = 'hidden';
|
|
313
317
|
}
|
|
314
318
|
bodyScrollLockCount += 1;
|
|
@@ -319,6 +323,7 @@ export function unlockBodyScroll() {
|
|
|
319
323
|
}
|
|
320
324
|
bodyScrollLockCount = Math.max(0, bodyScrollLockCount - 1);
|
|
321
325
|
if (bodyScrollLockCount === 0) {
|
|
322
|
-
document.body.style.overflow =
|
|
326
|
+
document.body.style.overflow = bodyScrollPreviousOverflow;
|
|
327
|
+
bodyScrollPreviousOverflow = '';
|
|
323
328
|
}
|
|
324
329
|
}
|
package/dist-wc/index.js
CHANGED
|
@@ -5553,7 +5553,7 @@ function Carousel(e, t) {
|
|
|
5553
5553
|
each(t, 21, n, index, (e, t, n) => {
|
|
5554
5554
|
var i = root_2$50();
|
|
5555
5555
|
set_attribute(i, "aria-label", `Go to slide ${n + 1}`), template_effect(() => {
|
|
5556
|
-
set_class(i, 1, clsx(get(re)
|
|
5556
|
+
set_class(i, 1, clsx(get(re) === n ? "active-dot" : "dot"), "svelte-vk4ljo"), set_attribute(i, "aria-current", get(re) === n ? "true" : null), set_attribute(i, "data-pw", typeof p() == "string" ? `${p()}-${n + 1}` : null), set_attribute(i, "testid", typeof p() == "string" ? `${p()}-${n + 1}` : null);
|
|
5557
5557
|
}), delegated("click", i, () => it(n)), delegated("keydown", i, (e) => {
|
|
5558
5558
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), it(n)), c()?.(e);
|
|
5559
5559
|
}), append(e, i);
|
|
@@ -5967,12 +5967,12 @@ function createDebouncer(e) {
|
|
|
5967
5967
|
a - t > e && (t = a, n(...i));
|
|
5968
5968
|
};
|
|
5969
5969
|
}
|
|
5970
|
-
var bodyScrollLockCount = 0;
|
|
5970
|
+
var bodyScrollLockCount = 0, bodyScrollPreviousOverflow = "";
|
|
5971
5971
|
function lockBodyScroll() {
|
|
5972
|
-
typeof document > "u" || (bodyScrollLockCount === 0 && (document.body.style.overflow = "hidden"), bodyScrollLockCount += 1);
|
|
5972
|
+
typeof document > "u" || (bodyScrollLockCount === 0 && (bodyScrollPreviousOverflow = document.body.style.overflow, document.body.style.overflow = "hidden"), bodyScrollLockCount += 1);
|
|
5973
5973
|
}
|
|
5974
5974
|
function unlockBodyScroll() {
|
|
5975
|
-
typeof document > "u" || (bodyScrollLockCount = Math.max(0, bodyScrollLockCount - 1), bodyScrollLockCount === 0 && (document.body.style.overflow = ""));
|
|
5975
|
+
typeof document > "u" || (bodyScrollLockCount = Math.max(0, bodyScrollLockCount - 1), bodyScrollLockCount === 0 && (document.body.style.overflow = bodyScrollPreviousOverflow, bodyScrollPreviousOverflow = ""));
|
|
5976
5976
|
}
|
|
5977
5977
|
//#endregion
|
|
5978
5978
|
//#region src/lib/Input/Input.svelte
|
|
@@ -6406,7 +6406,7 @@ function Input(e, t) {
|
|
|
6406
6406
|
remove_textarea_child(t);
|
|
6407
6407
|
let n, s;
|
|
6408
6408
|
bind_this(t, (e) => set(Zt, e), () => get(Zt)), template_effect(() => {
|
|
6409
|
-
set_attribute(t, "id", get(zt)), set_value(t, i()), set_attribute(t, "placeholder", a()), set_attribute(t, "aria-label", get(Bt) ? null : yt() ?? null), set_attribute(t, "autocomplete", Me()), set_attribute(t, "inputmode", Re()), set_attribute(t, "name", Ue()), set_attribute(t, "role", vt()), set_attribute(t, "aria-expanded", bt()), set_attribute(t, "aria-autocomplete", xt()), set_attribute(t, "aria-controls", St()), set_attribute(t, "aria-activedescendant", Ct()), set_attribute(t, "aria-required", At() || null), set_attribute(t, "aria-invalid", get(en) ? "true" : null), set_attribute(t, "aria-describedby", get(on) || null), t.required = At() || null, set_attribute(t, "data-pw", at()), set_attribute(t, "testid", at()), n = set_style(t, `--focus-border: ${+!!k()}px;`, n, { resize: get(dn) }), set_attribute(t, "rows", Mt() ?? null), t.disabled = f(), t.readOnly = p() || null, set_attribute(t, "spellcheck", h()), set_attribute(t, "maxlength", o() === "tel" ? null : R()), set_attribute(t, "minlength", G()), s = set_class(t, 1, "svelte-1h0c2oe", null, s, { "action-input": re() });
|
|
6409
|
+
set_attribute(t, "id", get(zt)), set_value(t, i()), set_attribute(t, "placeholder", a()), set_attribute(t, "aria-label", get(Bt) ? null : yt() ?? null), set_attribute(t, "autocomplete", Me()), set_attribute(t, "inputmode", Re()), set_attribute(t, "name", Ue()), set_attribute(t, "role", vt()), set_attribute(t, "aria-expanded", bt()), set_attribute(t, "aria-autocomplete", xt()), set_attribute(t, "aria-controls", St()), set_attribute(t, "aria-activedescendant", Ct()), set_attribute(t, "aria-required", At() || null), set_attribute(t, "aria-invalid", get(en) && !re() ? "true" : null), set_attribute(t, "aria-describedby", get(on) || null), t.required = At() || null, set_attribute(t, "data-pw", at()), set_attribute(t, "testid", at()), n = set_style(t, `--focus-border: ${+!!k()}px;`, n, { resize: get(dn) }), set_attribute(t, "rows", Mt() ?? null), t.disabled = f(), t.readOnly = p() || null, set_attribute(t, "spellcheck", h()), set_attribute(t, "maxlength", o() === "tel" ? null : R()), set_attribute(t, "minlength", G()), s = set_class(t, 1, "svelte-1h0c2oe", null, s, { "action-input": re() });
|
|
6410
6410
|
}), event("focus", t, function(...e) {
|
|
6411
6411
|
lt()?.apply(this, e);
|
|
6412
6412
|
}), delegated("focusout", t, gn), delegated("input", t, pn), event("paste", t, mn), delegated("click", t, function(...e) {
|
|
@@ -6419,7 +6419,7 @@ function Input(e, t) {
|
|
|
6419
6419
|
remove_input_defaults(t);
|
|
6420
6420
|
let n;
|
|
6421
6421
|
bind_this(t, (e) => set(Zt, e), () => get(Zt)), template_effect(() => {
|
|
6422
|
-
set_attribute(t, "id", get(zt)), set_attribute(t, "type", o()), set_value(t, i()), set_attribute(t, "placeholder", a()), set_attribute(t, "aria-label", get(Bt) ? null : yt() ?? null), set_attribute(t, "autocomplete", Me()), set_attribute(t, "inputmode", Re()), set_attribute(t, "name", Ue()), set_attribute(t, "role", vt()), set_attribute(t, "aria-expanded", bt()), set_attribute(t, "aria-autocomplete", xt()), set_attribute(t, "aria-controls", St()), set_attribute(t, "aria-activedescendant", Ct()), set_attribute(t, "aria-required", At() || null), set_attribute(t, "aria-invalid", get(en) ? "true" : null), set_attribute(t, "aria-describedby", get(on) || null), t.required = At() || null, set_attribute(t, "data-pw", at()), set_attribute(t, "testid", at()), t.disabled = f(), t.readOnly = p() || null, set_attribute(t, "spellcheck", h()), set_attribute(t, "maxlength", o() === "tel" ? null : R()), set_attribute(t, "minlength", G()), set_attribute(t, "min", te()), set_attribute(t, "max", ne()), n = set_class(t, 1, "svelte-1h0c2oe", null, n, { "action-input": re() });
|
|
6422
|
+
set_attribute(t, "id", get(zt)), set_attribute(t, "type", o()), set_value(t, i()), set_attribute(t, "placeholder", a()), set_attribute(t, "aria-label", get(Bt) ? null : yt() ?? null), set_attribute(t, "autocomplete", Me()), set_attribute(t, "inputmode", Re()), set_attribute(t, "name", Ue()), set_attribute(t, "role", vt()), set_attribute(t, "aria-expanded", bt()), set_attribute(t, "aria-autocomplete", xt()), set_attribute(t, "aria-controls", St()), set_attribute(t, "aria-activedescendant", Ct()), set_attribute(t, "aria-required", At() || null), set_attribute(t, "aria-invalid", get(en) && !re() ? "true" : null), set_attribute(t, "aria-describedby", get(on) || null), t.required = At() || null, set_attribute(t, "data-pw", at()), set_attribute(t, "testid", at()), t.disabled = f(), t.readOnly = p() || null, set_attribute(t, "spellcheck", h()), set_attribute(t, "maxlength", o() === "tel" ? null : R()), set_attribute(t, "minlength", G()), set_attribute(t, "min", te()), set_attribute(t, "max", ne()), n = set_class(t, 1, "svelte-1h0c2oe", null, n, { "action-input": re() });
|
|
6423
6423
|
}), event("focus", t, function(...e) {
|
|
6424
6424
|
lt()?.apply(this, e);
|
|
6425
6425
|
}), delegated("focusout", t, gn), delegated("input", t, pn), event("paste", t, mn), delegated("click", t, function(...e) {
|
|
@@ -6970,6 +6970,10 @@ customElements.define("sui-chip-input", create_custom_element(ChipInput_wc, {
|
|
|
6970
6970
|
reflect: !0,
|
|
6971
6971
|
type: "Boolean"
|
|
6972
6972
|
},
|
|
6973
|
+
editable: {
|
|
6974
|
+
reflect: !0,
|
|
6975
|
+
type: "Boolean"
|
|
6976
|
+
},
|
|
6973
6977
|
testId: {
|
|
6974
6978
|
attribute: "test-id",
|
|
6975
6979
|
type: "String"
|
|
@@ -6977,6 +6981,7 @@ customElements.define("sui-chip-input", create_custom_element(ChipInput_wc, {
|
|
|
6977
6981
|
classes: { type: "String" },
|
|
6978
6982
|
onadd: { type: "Object" },
|
|
6979
6983
|
ondismiss: { type: "Object" },
|
|
6984
|
+
onedit: { type: "Object" },
|
|
6980
6985
|
onchange: { type: "Object" }
|
|
6981
6986
|
}, [], [], { mode: "open" }));
|
|
6982
6987
|
//#endregion
|
|
@@ -10716,7 +10721,7 @@ customElements.define("sui-split-input", create_custom_element(SplitInput_wc, {
|
|
|
10716
10721
|
//#region src/lib/Status/Status.svelte
|
|
10717
10722
|
var root$55 = /* @__PURE__ */ from_html("<div><div class=\"order-status svelte-19qpx1s\"><div class=\"status-image svelte-19qpx1s\"><!></div> <!> <div class=\"status-description svelte-19qpx1s\"><!></div> <!> <!></div></div>"), $$css$53 = {
|
|
10718
10723
|
hash: "svelte-19qpx1s",
|
|
10719
|
-
code: ".status-text.svelte-19qpx1s {font-weight:var(--status-font-weight, 600);color:var(--status-description-font-color, #2f3841);
|
|
10724
|
+
code: ".status-text.svelte-19qpx1s {margin-bottom:8px;}\n\n /* The weight and colour defaults belong to the plain div only. When a consumer asks for a\n heading tag (statusTextTag h1-h6) the whole point is that the application's own heading\n typography applies, so those two declarations must not sit on the element and win. */.status-text-default.svelte-19qpx1s {font-weight:var(--status-font-weight, 600);color:var(--status-description-font-color, #2f3841);}.status-description.svelte-19qpx1s {font-weight:var(--status-font-weight, 400);color:var(--status-description-font-color, #436484cc);padding:0px 42px;margin-bottom:25px;}.status-image.svelte-19qpx1s {color:var(--status-icon-color, inherit);display:flex;margin-bottom:25px;}.background.svelte-19qpx1s {min-height:var(--status-min-height, 100vh);display:flex;justify-content:center;align-items:center;}.order-status.svelte-19qpx1s {flex-direction:column;display:flex;font-family:var(--order-font, inherit);font-size:var(--order-font-size, 14px);text-align:center;}\n @supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {.order-status.svelte-19qpx1s {background-color:var(--status-panel-background, rgba(255, 255, 255, 0.6));-webkit-backdrop-filter:var(--status-panel-backdrop-filter, blur(60px));backdrop-filter:var(--status-panel-backdrop-filter, blur(60px));}\n }"
|
|
10720
10725
|
};
|
|
10721
10726
|
function Status(e, t) {
|
|
10722
10727
|
push(t, !0), append_styles$1(e, $$css$53);
|
|
@@ -10805,9 +10810,10 @@ function Status(e, t) {
|
|
|
10805
10810
|
}), reset(R);
|
|
10806
10811
|
var re = sibling(R, 2);
|
|
10807
10812
|
element(re, a, !1, (e, t) => {
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10813
|
+
let n;
|
|
10814
|
+
template_effect(() => n = set_class(e, 0, "status-text svelte-19qpx1s", null, n, { "status-text-default": a() === "div" }));
|
|
10815
|
+
var o = text();
|
|
10816
|
+
template_effect(() => set_text(o, i())), append(t, o);
|
|
10811
10817
|
});
|
|
10812
10818
|
var be = sibling(re, 2), Me = child(be), Re = (e) => {
|
|
10813
10819
|
var t = comment();
|
|
@@ -10878,6 +10884,11 @@ customElements.define("sui-status", create_custom_element(Status_wc, {
|
|
|
10878
10884
|
reflect: !0,
|
|
10879
10885
|
type: "String"
|
|
10880
10886
|
},
|
|
10887
|
+
statusTextTag: {
|
|
10888
|
+
attribute: "status-text-tag",
|
|
10889
|
+
reflect: !0,
|
|
10890
|
+
type: "String"
|
|
10891
|
+
},
|
|
10881
10892
|
buttonProperties: { type: "Object" },
|
|
10882
10893
|
classes: { type: "String" },
|
|
10883
10894
|
onbuttonClick: { type: "Object" }
|
|
@@ -11825,11 +11836,11 @@ var root$49 = /* @__PURE__ */ from_html("<div role=\"button\"><!></div>"), root_
|
|
|
11825
11836
|
function Accordion(e, t) {
|
|
11826
11837
|
let n = props_id();
|
|
11827
11838
|
push(t, !0), append_styles$1(e, $$css$47);
|
|
11828
|
-
let i = prop(t, "expand", 15, !1), a = prop(t, "children", 7), o = prop(t, "trigger", 7), s = prop(t, "ontoggle", 7), c = prop(t, "triggerClasses", 7), l = prop(t, "classes", 7), u = prop(t, "testId", 7), f = prop(t, "disabled", 7, !1), p = prop(t, "panelId", 7), h = /* @__PURE__ */ user_derived(() => p() ?? `accordion-panel-${n}`)
|
|
11829
|
-
function
|
|
11839
|
+
let i = prop(t, "expand", 15, !1), a = prop(t, "children", 7), o = prop(t, "trigger", 7), s = prop(t, "ontoggle", 7), c = prop(t, "triggerClasses", 7), l = prop(t, "classes", 7), u = prop(t, "testId", 7), f = prop(t, "disabled", 7, !1), p = prop(t, "panelId", 7), h = /* @__PURE__ */ user_derived(() => p() ?? `accordion-panel-${n}`), S = `accordion-trigger-${n}`;
|
|
11840
|
+
function C() {
|
|
11830
11841
|
f() || (i(!i()), s()?.(i()));
|
|
11831
11842
|
}
|
|
11832
|
-
var
|
|
11843
|
+
var k = {
|
|
11833
11844
|
get expand() {
|
|
11834
11845
|
return i();
|
|
11835
11846
|
},
|
|
@@ -11884,24 +11895,24 @@ function Accordion(e, t) {
|
|
|
11884
11895
|
set panelId(e) {
|
|
11885
11896
|
p(e), flushSync();
|
|
11886
11897
|
}
|
|
11887
|
-
},
|
|
11898
|
+
}, R = root_1$42(), G = first_child(R), te = (e) => {
|
|
11888
11899
|
var t = root$49();
|
|
11889
11900
|
let n;
|
|
11890
11901
|
snippet(child(t), o, () => ({ expanded: i() })), reset(t), template_effect(() => {
|
|
11891
|
-
n = set_class(t, 1, `accordion-trigger ${c() ?? "" ?? ""}`, "svelte-1p9ezsm", n, { disabled: f() }), set_attribute(t, "tabindex", f() ? -1 : 0), set_attribute(t, "aria-expanded", i()), set_attribute(t, "aria-controls", get(h)), set_attribute(t, "aria-disabled", f());
|
|
11892
|
-
}), delegated("click", t,
|
|
11893
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
11902
|
+
n = set_class(t, 1, `accordion-trigger ${c() ?? "" ?? ""}`, "svelte-1p9ezsm", n, { disabled: f() }), set_attribute(t, "id", S), set_attribute(t, "tabindex", f() ? -1 : 0), set_attribute(t, "aria-expanded", i()), set_attribute(t, "aria-controls", get(h)), set_attribute(t, "aria-disabled", f());
|
|
11903
|
+
}), delegated("click", t, C), delegated("keydown", t, (e) => {
|
|
11904
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), C());
|
|
11894
11905
|
}), append(e, t);
|
|
11895
11906
|
};
|
|
11896
|
-
if_block(
|
|
11897
|
-
o() && e(
|
|
11907
|
+
if_block(G, (e) => {
|
|
11908
|
+
o() && e(te);
|
|
11898
11909
|
});
|
|
11899
|
-
var
|
|
11900
|
-
let
|
|
11901
|
-
var
|
|
11902
|
-
return snippet(child(
|
|
11903
|
-
set_attribute(
|
|
11904
|
-
}), append(e,
|
|
11910
|
+
var ne = sibling(G, 2);
|
|
11911
|
+
let re;
|
|
11912
|
+
var be = child(ne);
|
|
11913
|
+
return snippet(child(be), () => a() ?? noop), reset(be), reset(ne), template_effect(() => {
|
|
11914
|
+
set_attribute(ne, "id", get(h)), set_attribute(ne, "role", o() ? "region" : null), set_attribute(ne, "aria-labelledby", o() ? S : null), re = set_class(ne, 1, `accordion ${l() ?? "" ?? ""}`, "svelte-1p9ezsm", re, { expanded: i() }), set_attribute(ne, "data-pw", typeof u() == "string" ? u() : null), set_attribute(ne, "testid", typeof u() == "string" ? u() : null);
|
|
11915
|
+
}), append(e, R), pop(k);
|
|
11905
11916
|
}
|
|
11906
11917
|
delegate(["click", "keydown"]), create_custom_element(Accordion, {
|
|
11907
11918
|
expand: {},
|
|
@@ -14214,7 +14225,7 @@ function ListItem(e, t) {
|
|
|
14214
14225
|
if_block(Bt, (e) => {
|
|
14215
14226
|
typeof be() == "function" && s() && e(Ht);
|
|
14216
14227
|
}), reset(zt), reset(Ue), reset(t), template_effect(() => {
|
|
14217
|
-
set_class(t, 1, `item-container ${ct() ?? "" ?? ""}`, "svelte-d2pqbq"), it = set_class(Ue, 1, "item svelte-d2pqbq", null, it, { "prevent-focus": R() }), set_attribute(Ue, "role", G() ? null : ut() ?? "button"), set_attribute(Ue, "tabindex", G() ? null : ut() === "option" ? -1 : 0), set_attribute(Ue, "aria-selected", dt()), set_attribute(Ue, "id", ft()), set_attribute(Ue, "data-pw", l()), set_attribute(Ue, "testid", l()), vt = set_class(at, 1, "top-section svelte-d2pqbq", null, vt, { "prevent-focus": R() }), set_attribute(at, "role", G() ? null : "button"), set_attribute(at, "tabindex", G() ? null : 0), set_attribute(at, "data-pw", u()), set_attribute(at, "testid", u());
|
|
14228
|
+
set_class(t, 1, `item-container ${ct() ?? "" ?? ""}`, "svelte-d2pqbq"), it = set_class(Ue, 1, "item svelte-d2pqbq", null, it, { "prevent-focus": R() }), set_attribute(Ue, "role", G() ? null : ut() ?? "button"), set_attribute(Ue, "tabindex", G() ? null : ut() === "option" ? -1 : 0), set_attribute(Ue, "aria-selected", G() ? null : dt()), set_attribute(Ue, "id", ft()), set_attribute(Ue, "data-pw", l()), set_attribute(Ue, "testid", l()), vt = set_class(at, 1, "top-section svelte-d2pqbq", null, vt, { "prevent-focus": R() }), set_attribute(at, "role", G() ? null : "button"), set_attribute(at, "tabindex", G() ? null : 0), set_attribute(at, "data-pw", u()), set_attribute(at, "testid", u());
|
|
14218
14229
|
}), delegated("click", Ue, gt), delegated("keydown", Ue, function(...e) {
|
|
14219
14230
|
ot()?.apply(this, e);
|
|
14220
14231
|
}), delegated("click", at, _t), delegated("keydown", at, function(...e) {
|