@juspay/svelte-ui-components 4.10.3 → 4.10.5
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 +16 -0
- package/dist/Card/properties.d.ts +12 -4
- package/dist/Chat/controller.svelte.js +1 -5
- package/dist/Pill/Pill.svelte +8 -1
- package/dist/Pill/properties.d.ts +13 -0
- package/dist/Sheet/Sheet.svelte +50 -1
- package/dist/Sheet/properties.d.ts +8 -0
- package/dist/TypewriterText/TypewriterText.svelte +30 -10
- package/dist/utils.d.ts +10 -0
- package/dist/utils.js +14 -0
- package/dist-wc/index.js +172 -106
- package/package.json +1 -1
|
@@ -83,6 +83,22 @@
|
|
|
83
83
|
display: grid;
|
|
84
84
|
grid-template-rows: 0fr;
|
|
85
85
|
overflow: hidden;
|
|
86
|
+
/* overflow: hidden drops this element's automatic minimum size to zero, so
|
|
87
|
+
when it is placed as an item of a consumer's own grid or flex container
|
|
88
|
+
it is otherwise free to be stretched down to whatever size that
|
|
89
|
+
container hands it -- as small as 0px -- independent of how tall its
|
|
90
|
+
own children actually are (issue #550). align-self: start opts the
|
|
91
|
+
panel out of that stretch so it always sizes from its own expanded
|
|
92
|
+
content instead. It is inert when the panel is not a grid or flex item,
|
|
93
|
+
and does not change the collapse animation: collapsed still resolves
|
|
94
|
+
to 0px either way.
|
|
95
|
+
|
|
96
|
+
Exposed as --accordion-align-self rather than hardcoded: Svelte's
|
|
97
|
+
scoped class raises .accordion's specificity above a plain utility
|
|
98
|
+
class passed through `classes`, so a consumer who legitimately wants
|
|
99
|
+
the panel stretched (or centered, etc.) could not otherwise override
|
|
100
|
+
this one declaration without reaching for :global() or !important. */
|
|
101
|
+
align-self: var(--accordion-align-self, start);
|
|
86
102
|
transition: grid-template-rows var(--accordion-transition, 0.2s ease-out);
|
|
87
103
|
}
|
|
88
104
|
|
|
@@ -97,10 +97,18 @@ export type OptionalCardProperties = {
|
|
|
97
97
|
attrs?: Record<string, string>;
|
|
98
98
|
/**
|
|
99
99
|
* Overrides the tag `svelte:element` renders for the card root — e.g.
|
|
100
|
-
* `'figure'` for a card
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
100
|
+
* `'figure'` for a card whose root needs real `<figure>` sectioning-content
|
|
101
|
+
* semantics, without a separate wrapper element around a `<div>`-rooted
|
|
102
|
+
* Card.
|
|
103
|
+
*
|
|
104
|
+
* This does NOT provide a place for a `<figcaption>`: `children` is always
|
|
105
|
+
* wrapped in an inner `.card-content` div (and `title`/`headerRight` in
|
|
106
|
+
* `.card-header`, `footer` in a `<footer>` element), so a `<figcaption>`
|
|
107
|
+
* passed through any of those slots is not a direct child of the `<figure>`
|
|
108
|
+
* root and per spec is not exposed as its caption by any browser or
|
|
109
|
+
* assistive technology — do not put one there. If a `<figure>` needs a real
|
|
110
|
+
* caption today, wrap a plain (non-`as="figure"`) Card in your own
|
|
111
|
+
* `<figure>`/`<figcaption>` pair instead; Card has no caption slot.
|
|
104
112
|
*
|
|
105
113
|
* When omitted, the root keeps its existing behaviour exactly: `'a'` when
|
|
106
114
|
* `href` is set, `'div'` otherwise. Setting `as` to anything other than
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { partyOf } from './roles';
|
|
2
|
+
import { prefersReducedMotion } from '../utils';
|
|
2
3
|
const REVEAL_CHARS_PER_TICK = 2;
|
|
3
4
|
const REVEAL_INTERVAL_MS = 22;
|
|
4
|
-
function prefersReducedMotion() {
|
|
5
|
-
return (typeof window !== 'undefined' &&
|
|
6
|
-
typeof window.matchMedia === 'function' &&
|
|
7
|
-
window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
8
|
-
}
|
|
9
5
|
let idCounter = 0;
|
|
10
6
|
function defaultId() {
|
|
11
7
|
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
|
package/dist/Pill/Pill.svelte
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
leadingIcon,
|
|
17
17
|
onclick,
|
|
18
18
|
ondismiss,
|
|
19
|
-
classes
|
|
19
|
+
classes,
|
|
20
|
+
attrs
|
|
20
21
|
}: PillProperties = $props();
|
|
21
22
|
|
|
22
23
|
let interactive = $derived(typeof onclick === 'function');
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
|
|
52
53
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
53
54
|
<div
|
|
55
|
+
{...attrs ?? {}}
|
|
54
56
|
class="pill {pillToneClass(tone)} {classes ?? ''}"
|
|
55
57
|
class:disabled
|
|
56
58
|
onclick={interactive ? handleClick : null}
|
|
@@ -122,6 +124,11 @@
|
|
|
122
124
|
cursor: var(--pill-cursor, pointer);
|
|
123
125
|
}
|
|
124
126
|
|
|
127
|
+
.pill[role='button']:focus-visible {
|
|
128
|
+
outline: var(--pill-focus-outline, 2px solid currentColor);
|
|
129
|
+
outline-offset: var(--pill-focus-outline-offset, 2px);
|
|
130
|
+
}
|
|
131
|
+
|
|
125
132
|
/* Tone defaults — an internal --_pill-tone-* layer, mirroring how Button's
|
|
126
133
|
variant classes set --_btn-*: a plain --pill-background/--pill-color
|
|
127
134
|
(explicit, or via `classes`) always wins over the tone's default. */
|
|
@@ -36,6 +36,19 @@ export type OptionalPillProperties = {
|
|
|
36
36
|
*/
|
|
37
37
|
leadingIcon?: Snippet;
|
|
38
38
|
classes?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Arbitrary attributes spread onto the pill root — `data-*`/`aria-*` (or any
|
|
41
|
+
* other) attribute names mapped to string values. For consumers that key off
|
|
42
|
+
* attribute-selector CSS (`[data-state="waiting"]`, `[data-density]`) the way
|
|
43
|
+
* the rest of their app does, instead of wrapping Pill in an extra element
|
|
44
|
+
* just to hold the attribute, or adding a second `classes` modifier for the
|
|
45
|
+
* same state. Applied before Pill's own `class`/`onclick`/`onkeydown`/
|
|
46
|
+
* `role`/`tabindex`/`aria-disabled`/`data-pw`/`title`/`testID` attributes, so
|
|
47
|
+
* an entry here can never override one of those — only add attributes Pill
|
|
48
|
+
* does not already manage. Omitted by default, so existing consumers render
|
|
49
|
+
* exactly the same attributes as before.
|
|
50
|
+
*/
|
|
51
|
+
attrs?: Record<string, string>;
|
|
39
52
|
};
|
|
40
53
|
export type PillEventProperties = {
|
|
41
54
|
onclick?: (event: MouseEvent) => void;
|
package/dist/Sheet/Sheet.svelte
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
title,
|
|
12
12
|
showOverlay = true,
|
|
13
13
|
dismissOnOutsideClick = showOverlay,
|
|
14
|
+
overlayAriaLabel,
|
|
14
15
|
showCloseButton = true,
|
|
15
16
|
headingLevel,
|
|
16
17
|
testId,
|
|
@@ -62,6 +63,23 @@
|
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
// The overlay only carries role="button" while it is dismissible, and a
|
|
67
|
+
// role="button" has to answer Enter/Space as well as click (WCAG 2.1
|
|
68
|
+
// SC 2.1.1) -- tabindex="-1" keeps it out of the Tab sequence, but the
|
|
69
|
+
// focus trap can still park focus here, and browse-mode AT reaches it.
|
|
70
|
+
// The target check is what stops an Enter pressed on a focusable
|
|
71
|
+
// descendant from bubbling up and reading as an activation of the overlay
|
|
72
|
+
// itself, exactly as handleOverlayClick already guards the click case.
|
|
73
|
+
if (
|
|
74
|
+
(event.key === 'Enter' || event.key === ' ') &&
|
|
75
|
+
dismissOnOutsideClick &&
|
|
76
|
+
event.target === overlayDiv
|
|
77
|
+
) {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
close();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
65
83
|
if (event.key === 'Tab' && sheetPanel !== null) {
|
|
66
84
|
const focusable = sheetPanel.querySelectorAll<HTMLElement>(
|
|
67
85
|
'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
@@ -123,6 +141,20 @@
|
|
|
123
141
|
</script>
|
|
124
142
|
|
|
125
143
|
{#if open}
|
|
144
|
+
<!-- The overlay only carries role="button" -- and therefore an accessible
|
|
145
|
+
name -- while it is actually dismissible (dismissOnOutsideClick):
|
|
146
|
+
clicking it is already a guarded no-op otherwise (see
|
|
147
|
+
handleOverlayClick), and announcing a no-op as a focusable "button" is
|
|
148
|
+
worse for assistive tech than leaving it out of the accessibility tree
|
|
149
|
+
entirely. Modal's overlay applies the same reasoning for the same
|
|
150
|
+
shape of problem. When it IS dismissible, a role="button" node with no
|
|
151
|
+
accessible name would be announced as an unlabelled button, so it gets
|
|
152
|
+
one -- "Close sheet" by default, overridable via `overlayAriaLabel`.
|
|
153
|
+
The fallback is `||` on a trimmed value rather than `??`: an empty or
|
|
154
|
+
whitespace-only override is a name a screen reader cannot announce, so
|
|
155
|
+
it has to fall back like an absent one. `??` would forward it and leave
|
|
156
|
+
the overlay silently unnamed, which is the defect this whole block
|
|
157
|
+
exists to prevent. -->
|
|
126
158
|
<div
|
|
127
159
|
bind:this={overlayDiv}
|
|
128
160
|
use:scrollLockAction
|
|
@@ -132,7 +164,8 @@
|
|
|
132
164
|
: 'overlay-noninteractive'} {classes ?? ''}"
|
|
133
165
|
onclick={handleOverlayClick}
|
|
134
166
|
onkeydown={handleKeyDown}
|
|
135
|
-
role=
|
|
167
|
+
role={dismissOnOutsideClick ? 'button' : null}
|
|
168
|
+
aria-label={dismissOnOutsideClick ? overlayAriaLabel?.trim() || 'Close sheet' : null}
|
|
136
169
|
tabindex="-1"
|
|
137
170
|
data-pw={typeof testId === 'string' ? testId : null}
|
|
138
171
|
testID={typeof testId === 'string' ? testId : null}
|
|
@@ -223,6 +256,22 @@
|
|
|
223
256
|
outline: none;
|
|
224
257
|
}
|
|
225
258
|
|
|
259
|
+
/* The panel itself is the initial focus target on open (scrollLockAction
|
|
260
|
+
focuses it directly, and it's the Tab-trap's own boundary), so removing
|
|
261
|
+
its outline unconditionally left a keyboard user with no visible sign
|
|
262
|
+
focus had moved into the sheet at all -- particularly visible on the
|
|
263
|
+
"Raw" variant, which has no focusable child for focus to land on
|
|
264
|
+
instead. :focus-visible restores a ring precisely when the browser
|
|
265
|
+
judges it's from keyboard/programmatic focus rather than a mouse click,
|
|
266
|
+
so clicking the trigger still shows nothing new. outline-offset is
|
|
267
|
+
negative (inset) rather than the usual positive offset other components
|
|
268
|
+
in this library use, because left/right/top/bottom panels sit flush
|
|
269
|
+
against a viewport edge -- a positive offset would clip there. */
|
|
270
|
+
.sheet-panel:focus-visible {
|
|
271
|
+
outline: var(--sheet-panel-focus-outline, 2px solid #2563eb);
|
|
272
|
+
outline-offset: var(--sheet-panel-focus-outline-offset, -2px);
|
|
273
|
+
}
|
|
274
|
+
|
|
226
275
|
/* --sheet-top/-right/-bottom/-left all default to the previous hardcoded
|
|
227
276
|
edge-to-edge values below, so an unconfigured Sheet renders unchanged.
|
|
228
277
|
Overriding one (e.g. --sheet-top to clear a fixed header, or --sheet-bottom:
|
|
@@ -17,6 +17,14 @@ export type OptionalSheetProperties = {
|
|
|
17
17
|
* dimming backdrop — e.g. an anchored dropdown-style panel.
|
|
18
18
|
*/
|
|
19
19
|
dismissOnOutsideClick?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Accessible name (rendered as `aria-label`) for the overlay's `role="button"`
|
|
22
|
+
* wrapper. Only meaningful when the overlay is dismissible
|
|
23
|
+
* (`dismissOnOutsideClick`) — that's the only state where the overlay is
|
|
24
|
+
* announced as a button at all (see Accessibility below). Defaults to
|
|
25
|
+
* `"Close sheet"`; override for a more specific or localized wording.
|
|
26
|
+
*/
|
|
27
|
+
overlayAriaLabel?: string;
|
|
20
28
|
showCloseButton?: boolean;
|
|
21
29
|
/**
|
|
22
30
|
* Renders `title` through a real `<h1>`-`<h6>` heading element instead of
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount, onDestroy, untrack } from 'svelte';
|
|
3
|
+
import { prefersReducedMotion } from '../utils';
|
|
3
4
|
import type { TypewriterTextProperties, TypewriterCharacterDelayRange } from './properties';
|
|
4
5
|
|
|
5
6
|
let {
|
|
@@ -75,7 +76,34 @@
|
|
|
75
76
|
return speed;
|
|
76
77
|
};
|
|
77
78
|
|
|
79
|
+
// Disclose everything still pending at once. The whitespace count has to be rebuilt
|
|
80
|
+
// from the text itself because the per-character path that normally maintains it is
|
|
81
|
+
// skipped entirely, and a later continuation would otherwise resume from a count that
|
|
82
|
+
// never saw the revealed suffix.
|
|
83
|
+
const revealRemainingText = (): void => {
|
|
84
|
+
if (timeoutId !== null) {
|
|
85
|
+
clearTimeout(timeoutId);
|
|
86
|
+
timeoutId = null;
|
|
87
|
+
}
|
|
88
|
+
const hadRemainingText = currentIndex < text.length;
|
|
89
|
+
displayedText = text;
|
|
90
|
+
currentIndex = text.length;
|
|
91
|
+
revealedWordCount = countWhitespace(text);
|
|
92
|
+
if (hadRemainingText) {
|
|
93
|
+
onprogress?.({ index: currentIndex, total: text.length, displayedText });
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
78
97
|
const typeNextCharacter = (): void => {
|
|
98
|
+
// Typing IS the animation here, so a reduced-motion request has to suppress the
|
|
99
|
+
// reveal itself rather than a transition around it: disclose the text instead.
|
|
100
|
+
// `ChatController` already bypasses its own drain loop on this setting, and the two
|
|
101
|
+
// reveal implementations have to answer it identically — a consumer composing this
|
|
102
|
+
// component through `Chat`'s `messageBody` snippet is running both at once.
|
|
103
|
+
if (prefersReducedMotion()) {
|
|
104
|
+
revealRemainingText();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
79
107
|
if (currentIndex < text.length) {
|
|
80
108
|
const revealedCharacter = text[currentIndex];
|
|
81
109
|
const revealedCharacterIndex = currentIndex;
|
|
@@ -122,6 +150,7 @@
|
|
|
122
150
|
if (currentIndex >= previousTextLength) {
|
|
123
151
|
if (timeoutId !== null) {
|
|
124
152
|
clearTimeout(timeoutId);
|
|
153
|
+
timeoutId = null;
|
|
125
154
|
}
|
|
126
155
|
typeNextCharacter();
|
|
127
156
|
}
|
|
@@ -133,16 +162,7 @@
|
|
|
133
162
|
// eslint-disable-next-line no-restricted-syntax
|
|
134
163
|
$effect(() => {
|
|
135
164
|
if (!isStreaming && text.length > 0) {
|
|
136
|
-
|
|
137
|
-
clearTimeout(timeoutId);
|
|
138
|
-
}
|
|
139
|
-
const hadRemainingText = currentIndex < text.length;
|
|
140
|
-
displayedText = text;
|
|
141
|
-
currentIndex = text.length;
|
|
142
|
-
revealedWordCount = countWhitespace(text);
|
|
143
|
-
if (hadRemainingText) {
|
|
144
|
-
onprogress?.({ index: currentIndex, total: text.length, displayedText });
|
|
145
|
-
}
|
|
165
|
+
revealRemainingText();
|
|
146
166
|
}
|
|
147
167
|
});
|
|
148
168
|
|
package/dist/utils.d.ts
CHANGED
|
@@ -25,6 +25,16 @@ export declare function hsvToHsl(h: number, s: number, v: number): Hsl;
|
|
|
25
25
|
export declare function hslToHsv(hDeg: number, sPct: number, lPct: number): Hsv;
|
|
26
26
|
export declare function isValidHex(hex: string): boolean;
|
|
27
27
|
export declare function clampInt(v: string, min: number, max: number): number;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the user has asked the OS to minimise animation.
|
|
30
|
+
*
|
|
31
|
+
* Shared rather than per-component: two independent character-reveal
|
|
32
|
+
* implementations ship in this library — `ChatController`'s buffered drain and
|
|
33
|
+
* `TypewriterText`'s typing loop — and a reveal that honours this setting in one
|
|
34
|
+
* but not the other means the same OS preference silences an animation in a chat
|
|
35
|
+
* bubble and leaves it running in the message body rendered inside it.
|
|
36
|
+
*/
|
|
37
|
+
export declare function prefersReducedMotion(): boolean;
|
|
28
38
|
export declare function createDebouncer(delay: number): <T extends unknown[]>(callback: (...args: T) => void, ...args: T) => void;
|
|
29
39
|
export declare function lockBodyScroll(): void;
|
|
30
40
|
export declare function unlockBodyScroll(): void;
|
package/dist/utils.js
CHANGED
|
@@ -282,6 +282,20 @@ export function clampInt(v, min, max) {
|
|
|
282
282
|
return Math.max(min, Math.min(max, n));
|
|
283
283
|
}
|
|
284
284
|
// ── Misc ────────────────────────────────────────────────────────
|
|
285
|
+
/**
|
|
286
|
+
* Whether the user has asked the OS to minimise animation.
|
|
287
|
+
*
|
|
288
|
+
* Shared rather than per-component: two independent character-reveal
|
|
289
|
+
* implementations ship in this library — `ChatController`'s buffered drain and
|
|
290
|
+
* `TypewriterText`'s typing loop — and a reveal that honours this setting in one
|
|
291
|
+
* but not the other means the same OS preference silences an animation in a chat
|
|
292
|
+
* bubble and leaves it running in the message body rendered inside it.
|
|
293
|
+
*/
|
|
294
|
+
export function prefersReducedMotion() {
|
|
295
|
+
return (typeof window !== 'undefined' &&
|
|
296
|
+
typeof window.matchMedia === 'function' &&
|
|
297
|
+
window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
298
|
+
}
|
|
285
299
|
export function createDebouncer(delay) {
|
|
286
300
|
let lastCallTime = 0;
|
|
287
301
|
return function (callback, ...args) {
|
package/dist-wc/index.js
CHANGED
|
@@ -6125,6 +6125,9 @@ function clampInt(e, t, n) {
|
|
|
6125
6125
|
let i = parseInt(e, 10);
|
|
6126
6126
|
return Number.isNaN(i) ? t : Math.max(t, Math.min(n, i));
|
|
6127
6127
|
}
|
|
6128
|
+
function prefersReducedMotion() {
|
|
6129
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
6130
|
+
}
|
|
6128
6131
|
function createDebouncer(e) {
|
|
6129
6132
|
let t = 0;
|
|
6130
6133
|
return function(n, ...i) {
|
|
@@ -6768,21 +6771,21 @@ function pillToneClass(e) {
|
|
|
6768
6771
|
//#region src/lib/Pill/Pill.svelte
|
|
6769
6772
|
var root$75 = /* @__PURE__ */ from_html("<span class=\"pill-leading-icon svelte-13eug5u\"><!></span>"), root_1$64 = /* @__PURE__ */ from_html("<div class=\"pill-dismiss svelte-13eug5u\"><!></div>"), root_2$48 = /* @__PURE__ */ from_html("<div><!> <span class=\"pill-text svelte-13eug5u\"> </span> <!></div>"), $$css$75 = {
|
|
6770
6773
|
hash: "svelte-13eug5u",
|
|
6771
|
-
code: ".pill.svelte-13eug5u {display:inline-flex;align-items:center;\n /* A pill is content-width by default. A caller stacking pills into a menu needs\n them to fill the column and align their labels left, which is a layout choice\n the call site owns — hence tokens rather than a variant. */width:var(--pill-width, auto);justify-content:var(--pill-justify-content, center);text-align:var(--pill-text-align, center);gap:var(--pill-gap, 4px);background-color:var(--pill-background, var(--_pill-tone-background, #e0e0e0));color:var(--pill-color, var(--_pill-tone-color, #333333));font-size:var(--pill-font-size, 13px);font-weight:var(--pill-font-weight, 500);font-family:var(--pill-font-family);letter-spacing:var(--pill-letter-spacing, normal);text-transform:var(--pill-text-transform, none);padding:var(--pill-padding, 6px 10px);border-radius:var(--pill-border-radius, 999px);border:var(--pill-border, none);\n /* Non-interactive by default: nothing is clickable, so nothing should look\n clickable. The pointer default below applies only once role=\"button\" is\n actually present (see handleClick / `interactive`) — an explicit\n --pill-cursor still wins in both cases. */cursor:var(--pill-cursor, default);max-width:var(--pill-max-width);line-height:var(--pill-line-height, 1);flex-shrink:var(--pill-flex-shrink);}.pill[role='button'].svelte-13eug5u {cursor:var(--pill-cursor, pointer);}\n\n /* Tone defaults — an internal --_pill-tone-* layer, mirroring how Button's\n variant classes set --_btn-*: a plain --pill-background/--pill-color\n (explicit, or via `classes`) always wins over the tone's default. */.tone-accent.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-accent-background, #d1ecf1);--_pill-tone-color: var(--pill-tone-accent-color, #0c5460);}.tone-ok.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-ok-background, #d4edda);--_pill-tone-color: var(--pill-tone-ok-color, #155724);}.tone-warn.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-warn-background, #fff3cd);--_pill-tone-color: var(--pill-tone-warn-color, #856404);}.tone-danger.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-danger-background, #f8d7da);--_pill-tone-color: var(--pill-tone-danger-color, #721c24);}.tone-muted.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-muted-background, #f1f1f1);--_pill-tone-color: var(--pill-tone-muted-color, #6b7280);}.pill.svelte-13eug5u:hover:not(.disabled) {background-color:var(\n --pill-hover-background,\n var(--pill-background, var(--_pill-tone-background, #d0d0d0))\n );color:var(--pill-hover-color, var(--pill-color, var(--_pill-tone-color, #333333)));}.pill.disabled.svelte-13eug5u {opacity:var(--pill-disabled-opacity, 0.4);cursor:var(--pill-disabled-cursor, not-allowed);}.pill-text.svelte-13eug5u {overflow:hidden;text-overflow:var(--pill-text-overflow, ellipsis);white-space:var(--pill-text-white-space, nowrap);}.pill-leading-icon.svelte-13eug5u {display:inline-flex;align-items:center;flex-shrink:0;}.pill-dismiss.svelte-13eug5u {--button-color: transparent;--button-border: none;--button-padding: 0;--button-text-color: var(--pill-dismiss-color, currentColor);--button-hover-color: transparent;--button-hover-text-color: var(\n --pill-dismiss-hover-color,\n var(--pill-dismiss-color, currentColor)\n );--cursor: inherit;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;}\n\n /* Consumer themes can set Button tokens on its container, beating inherited\n wrapper values. Pin the painting element too so the chip owns its enabled\n glyph; leave disabled colours and focus indicators to the consumer theme. */.pill-dismiss.svelte-13eug5u .button-container,\n .pill-dismiss.svelte-13eug5u .button-el {--button-color: transparent;--button-background: none;--button-active-background: transparent;--button-border: none;--button-padding: 0;--button-text-color: var(--pill-dismiss-color, currentColor);--button-hover-color: transparent;--button-hover-border: none;--button-hover-text-color: var(\n --pill-dismiss-hover-color,\n var(--pill-dismiss-color, currentColor)\n );}.pill-dismiss.svelte-13eug5u svg {width:var(--pill-dismiss-size, 14px);height:var(--pill-dismiss-size, 14px);}"
|
|
6774
|
+
code: ".pill.svelte-13eug5u {display:inline-flex;align-items:center;\n /* A pill is content-width by default. A caller stacking pills into a menu needs\n them to fill the column and align their labels left, which is a layout choice\n the call site owns — hence tokens rather than a variant. */width:var(--pill-width, auto);justify-content:var(--pill-justify-content, center);text-align:var(--pill-text-align, center);gap:var(--pill-gap, 4px);background-color:var(--pill-background, var(--_pill-tone-background, #e0e0e0));color:var(--pill-color, var(--_pill-tone-color, #333333));font-size:var(--pill-font-size, 13px);font-weight:var(--pill-font-weight, 500);font-family:var(--pill-font-family);letter-spacing:var(--pill-letter-spacing, normal);text-transform:var(--pill-text-transform, none);padding:var(--pill-padding, 6px 10px);border-radius:var(--pill-border-radius, 999px);border:var(--pill-border, none);\n /* Non-interactive by default: nothing is clickable, so nothing should look\n clickable. The pointer default below applies only once role=\"button\" is\n actually present (see handleClick / `interactive`) — an explicit\n --pill-cursor still wins in both cases. */cursor:var(--pill-cursor, default);max-width:var(--pill-max-width);line-height:var(--pill-line-height, 1);flex-shrink:var(--pill-flex-shrink);}.pill[role='button'].svelte-13eug5u {cursor:var(--pill-cursor, pointer);}.pill[role='button'].svelte-13eug5u:focus-visible {outline:var(--pill-focus-outline, 2px solid currentColor);outline-offset:var(--pill-focus-outline-offset, 2px);}\n\n /* Tone defaults — an internal --_pill-tone-* layer, mirroring how Button's\n variant classes set --_btn-*: a plain --pill-background/--pill-color\n (explicit, or via `classes`) always wins over the tone's default. */.tone-accent.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-accent-background, #d1ecf1);--_pill-tone-color: var(--pill-tone-accent-color, #0c5460);}.tone-ok.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-ok-background, #d4edda);--_pill-tone-color: var(--pill-tone-ok-color, #155724);}.tone-warn.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-warn-background, #fff3cd);--_pill-tone-color: var(--pill-tone-warn-color, #856404);}.tone-danger.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-danger-background, #f8d7da);--_pill-tone-color: var(--pill-tone-danger-color, #721c24);}.tone-muted.svelte-13eug5u {--_pill-tone-background: var(--pill-tone-muted-background, #f1f1f1);--_pill-tone-color: var(--pill-tone-muted-color, #6b7280);}.pill.svelte-13eug5u:hover:not(.disabled) {background-color:var(\n --pill-hover-background,\n var(--pill-background, var(--_pill-tone-background, #d0d0d0))\n );color:var(--pill-hover-color, var(--pill-color, var(--_pill-tone-color, #333333)));}.pill.disabled.svelte-13eug5u {opacity:var(--pill-disabled-opacity, 0.4);cursor:var(--pill-disabled-cursor, not-allowed);}.pill-text.svelte-13eug5u {overflow:hidden;text-overflow:var(--pill-text-overflow, ellipsis);white-space:var(--pill-text-white-space, nowrap);}.pill-leading-icon.svelte-13eug5u {display:inline-flex;align-items:center;flex-shrink:0;}.pill-dismiss.svelte-13eug5u {--button-color: transparent;--button-border: none;--button-padding: 0;--button-text-color: var(--pill-dismiss-color, currentColor);--button-hover-color: transparent;--button-hover-text-color: var(\n --pill-dismiss-hover-color,\n var(--pill-dismiss-color, currentColor)\n );--cursor: inherit;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;}\n\n /* Consumer themes can set Button tokens on its container, beating inherited\n wrapper values. Pin the painting element too so the chip owns its enabled\n glyph; leave disabled colours and focus indicators to the consumer theme. */.pill-dismiss.svelte-13eug5u .button-container,\n .pill-dismiss.svelte-13eug5u .button-el {--button-color: transparent;--button-background: none;--button-active-background: transparent;--button-border: none;--button-padding: 0;--button-text-color: var(--pill-dismiss-color, currentColor);--button-hover-color: transparent;--button-hover-border: none;--button-hover-text-color: var(\n --pill-dismiss-hover-color,\n var(--pill-dismiss-color, currentColor)\n );}.pill-dismiss.svelte-13eug5u svg {width:var(--pill-dismiss-size, 14px);height:var(--pill-dismiss-size, 14px);}"
|
|
6772
6775
|
};
|
|
6773
6776
|
function Pill(e, t) {
|
|
6774
6777
|
push(t, !0), append_styles$1(e, $$css$75);
|
|
6775
|
-
let n = prop(t, "text", 7), i = prop(t, "dismissible", 7, !1), a = prop(t, "disabled", 7, !1), o = prop(t, "tone", 7), s = prop(t, "testId", 7), c = prop(t, "title", 7), l = prop(t, "dismissIcon", 7), u = prop(t, "dismissLabel", 7), f = prop(t, "leadingIcon", 7), p = prop(t, "onclick", 7), h = prop(t, "ondismiss", 7), S = prop(t, "classes", 7), C = /* @__PURE__ */ user_derived(() => typeof p() == "function");
|
|
6776
|
-
function
|
|
6778
|
+
let n = prop(t, "text", 7), i = prop(t, "dismissible", 7, !1), a = prop(t, "disabled", 7, !1), o = prop(t, "tone", 7), s = prop(t, "testId", 7), c = prop(t, "title", 7), l = prop(t, "dismissIcon", 7), u = prop(t, "dismissLabel", 7), f = prop(t, "leadingIcon", 7), p = prop(t, "onclick", 7), h = prop(t, "ondismiss", 7), S = prop(t, "classes", 7), C = prop(t, "attrs", 7), k = /* @__PURE__ */ user_derived(() => typeof p() == "function");
|
|
6779
|
+
function R(e) {
|
|
6777
6780
|
a() || p()?.(e);
|
|
6778
6781
|
}
|
|
6779
|
-
function
|
|
6782
|
+
function G(e) {
|
|
6780
6783
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget instanceof HTMLElement && e.currentTarget.click());
|
|
6781
6784
|
}
|
|
6782
|
-
function
|
|
6785
|
+
function te(e) {
|
|
6783
6786
|
e.stopPropagation(), !a() && h()?.();
|
|
6784
6787
|
}
|
|
6785
|
-
var
|
|
6788
|
+
var ne = {
|
|
6786
6789
|
get text() {
|
|
6787
6790
|
return n();
|
|
6788
6791
|
},
|
|
@@ -6854,10 +6857,28 @@ function Pill(e, t) {
|
|
|
6854
6857
|
},
|
|
6855
6858
|
set classes(e) {
|
|
6856
6859
|
S(e), flushSync();
|
|
6860
|
+
},
|
|
6861
|
+
get attrs() {
|
|
6862
|
+
return C();
|
|
6863
|
+
},
|
|
6864
|
+
set attrs(e) {
|
|
6865
|
+
C(e), flushSync();
|
|
6857
6866
|
}
|
|
6858
|
-
},
|
|
6859
|
-
|
|
6860
|
-
|
|
6867
|
+
}, re = root_2$48();
|
|
6868
|
+
attribute_effect(re, (e) => ({
|
|
6869
|
+
...C() ?? {},
|
|
6870
|
+
class: `pill ${e ?? ""} ${S() ?? "" ?? ""}`,
|
|
6871
|
+
onclick: get(k) ? R : null,
|
|
6872
|
+
onkeydown: get(k) ? G : null,
|
|
6873
|
+
role: get(k) ? "button" : null,
|
|
6874
|
+
tabindex: get(k) ? 0 : null,
|
|
6875
|
+
"aria-disabled": get(k) && a() ? !0 : null,
|
|
6876
|
+
"data-pw": typeof s() == "string" ? s() : null,
|
|
6877
|
+
title: c() ?? null,
|
|
6878
|
+
testID: typeof s() == "string" ? s() : null,
|
|
6879
|
+
[CLASS]: { disabled: a() }
|
|
6880
|
+
}), [() => pillToneClass(o())], void 0, void 0, "svelte-13eug5u");
|
|
6881
|
+
var be = child(re), Me = (e) => {
|
|
6861
6882
|
var t = root$75();
|
|
6862
6883
|
snippet(child(t), f), reset(t), append(e, t);
|
|
6863
6884
|
};
|
|
@@ -6875,7 +6896,7 @@ function Pill(e, t) {
|
|
|
6875
6896
|
get disabled() {
|
|
6876
6897
|
return a();
|
|
6877
6898
|
},
|
|
6878
|
-
onclick:
|
|
6899
|
+
onclick: te,
|
|
6879
6900
|
get ariaLabel() {
|
|
6880
6901
|
return get(e);
|
|
6881
6902
|
}
|
|
@@ -6899,15 +6920,9 @@ function Pill(e, t) {
|
|
|
6899
6920
|
};
|
|
6900
6921
|
return if_block(it, (e) => {
|
|
6901
6922
|
i() && e(at);
|
|
6902
|
-
}), reset(
|
|
6903
|
-
re = set_class(ne, 1, `pill ${e ?? ""} ${S() ?? "" ?? ""}`, "svelte-13eug5u", re, { disabled: a() }), set_attribute(ne, "role", get(C) ? "button" : null), set_attribute(ne, "tabindex", get(C) ? 0 : null), set_attribute(ne, "aria-disabled", get(C) && a() ? !0 : null), set_attribute(ne, "data-pw", typeof s() == "string" ? s() : null), set_attribute(ne, "title", c() ?? null), set_attribute(ne, "testid", typeof s() == "string" ? s() : null), set_text(Ue, n());
|
|
6904
|
-
}, [() => pillToneClass(o())]), delegated("click", ne, function(...e) {
|
|
6905
|
-
(get(C) ? k : null)?.apply(this, e);
|
|
6906
|
-
}), delegated("keydown", ne, function(...e) {
|
|
6907
|
-
(get(C) ? R : null)?.apply(this, e);
|
|
6908
|
-
}), append(e, ne), pop(te);
|
|
6923
|
+
}), reset(re), template_effect(() => set_text(Ue, n())), append(e, re), pop(ne);
|
|
6909
6924
|
}
|
|
6910
|
-
|
|
6925
|
+
create_custom_element(Pill, {
|
|
6911
6926
|
text: {},
|
|
6912
6927
|
dismissible: {},
|
|
6913
6928
|
disabled: {},
|
|
@@ -6919,7 +6934,8 @@ delegate(["click", "keydown"]), create_custom_element(Pill, {
|
|
|
6919
6934
|
leadingIcon: {},
|
|
6920
6935
|
onclick: {},
|
|
6921
6936
|
ondismiss: {},
|
|
6922
|
-
classes: {}
|
|
6937
|
+
classes: {},
|
|
6938
|
+
attrs: {}
|
|
6923
6939
|
}, [], [], { mode: "open" });
|
|
6924
6940
|
//#endregion
|
|
6925
6941
|
//#region src/lib/ChipInput/ChipInput.svelte
|
|
@@ -10340,7 +10356,8 @@ customElements.define("sui-pill", create_custom_element(Pill_wc, {
|
|
|
10340
10356
|
},
|
|
10341
10357
|
classes: { type: "String" },
|
|
10342
10358
|
onclick: { type: "Object" },
|
|
10343
|
-
ondismiss: { type: "Object" }
|
|
10359
|
+
ondismiss: { type: "Object" },
|
|
10360
|
+
attrs: { type: "Object" }
|
|
10344
10361
|
}, ["leading-icon", "dismiss-icon"], [], { mode: "open" }));
|
|
10345
10362
|
//#endregion
|
|
10346
10363
|
//#region src/lib/Progress/Progress.svelte
|
|
@@ -12399,7 +12416,7 @@ customElements.define("sui-toggle", create_custom_element(Toggle_wc, {
|
|
|
12399
12416
|
//#region src/lib/Accordion/Accordion.svelte
|
|
12400
12417
|
var root$49 = /* @__PURE__ */ from_html("<div role=\"button\"><!></div>"), root_1$43 = /* @__PURE__ */ from_html("<!> <div><div class=\"accordion-content svelte-1p9ezsm\"><!></div></div>", 1), $$css$49 = {
|
|
12401
12418
|
hash: "svelte-1p9ezsm",
|
|
12402
|
-
code: ".accordion-trigger.svelte-1p9ezsm {cursor:var(--accordion-trigger-cursor, pointer);}.accordion-trigger.disabled.svelte-1p9ezsm {cursor:var(--accordion-trigger-disabled-cursor, not-allowed);}.accordion.svelte-1p9ezsm {display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--accordion-transition, 0.2s ease-out);}.accordion.expanded.svelte-1p9ezsm {grid-template-rows:1fr;}.accordion-content.svelte-1p9ezsm {min-height:0;}"
|
|
12419
|
+
code: ".accordion-trigger.svelte-1p9ezsm {cursor:var(--accordion-trigger-cursor, pointer);}.accordion-trigger.disabled.svelte-1p9ezsm {cursor:var(--accordion-trigger-disabled-cursor, not-allowed);}.accordion.svelte-1p9ezsm {display:grid;grid-template-rows:0fr;overflow:hidden;\n /* overflow: hidden drops this element's automatic minimum size to zero, so\n when it is placed as an item of a consumer's own grid or flex container\n it is otherwise free to be stretched down to whatever size that\n container hands it -- as small as 0px -- independent of how tall its\n own children actually are (issue #550). align-self: start opts the\n panel out of that stretch so it always sizes from its own expanded\n content instead. It is inert when the panel is not a grid or flex item,\n and does not change the collapse animation: collapsed still resolves\n to 0px either way.\n\n Exposed as --accordion-align-self rather than hardcoded: Svelte's\n scoped class raises .accordion's specificity above a plain utility\n class passed through `classes`, so a consumer who legitimately wants\n the panel stretched (or centered, etc.) could not otherwise override\n this one declaration without reaching for :global() or !important. */align-self:var(--accordion-align-self, start);transition:grid-template-rows var(--accordion-transition, 0.2s ease-out);}.accordion.expanded.svelte-1p9ezsm {grid-template-rows:1fr;}.accordion-content.svelte-1p9ezsm {min-height:0;}"
|
|
12403
12420
|
};
|
|
12404
12421
|
function Accordion(e, t) {
|
|
12405
12422
|
let n = props_id();
|
|
@@ -16274,12 +16291,20 @@ var rest_excludes$37 = new Set([
|
|
|
16274
16291
|
"$$slots",
|
|
16275
16292
|
"$$events",
|
|
16276
16293
|
"$$legacy",
|
|
16277
|
-
"$$host"
|
|
16294
|
+
"$$host",
|
|
16295
|
+
"modalAriaLabel",
|
|
16296
|
+
"modalRole"
|
|
16278
16297
|
]);
|
|
16279
16298
|
function Modal_wc(e, t) {
|
|
16280
16299
|
push(t, !0);
|
|
16281
|
-
let n = /* @__PURE__ */ rest_props(t, rest_excludes$37);
|
|
16282
|
-
Modal(e, spread_props(() =>
|
|
16300
|
+
let n = prop(t, "modalAriaLabel", 7), i = prop(t, "modalRole", 7), a = /* @__PURE__ */ rest_props(t, rest_excludes$37);
|
|
16301
|
+
return Modal(e, spread_props(() => a, {
|
|
16302
|
+
get ariaLabel() {
|
|
16303
|
+
return n();
|
|
16304
|
+
},
|
|
16305
|
+
get role() {
|
|
16306
|
+
return i();
|
|
16307
|
+
},
|
|
16283
16308
|
content: (e) => {
|
|
16284
16309
|
var n = comment(), i = first_child(n), a = (e) => {
|
|
16285
16310
|
var n = comment();
|
|
@@ -16308,7 +16333,20 @@ function Modal_wc(e, t) {
|
|
|
16308
16333
|
content: !0,
|
|
16309
16334
|
footerSnippet: !0
|
|
16310
16335
|
}
|
|
16311
|
-
})), pop(
|
|
16336
|
+
})), pop({
|
|
16337
|
+
get modalAriaLabel() {
|
|
16338
|
+
return n();
|
|
16339
|
+
},
|
|
16340
|
+
set modalAriaLabel(e) {
|
|
16341
|
+
n(e), flushSync();
|
|
16342
|
+
},
|
|
16343
|
+
get modalRole() {
|
|
16344
|
+
return i();
|
|
16345
|
+
},
|
|
16346
|
+
set modalRole(e) {
|
|
16347
|
+
i(e), flushSync();
|
|
16348
|
+
}
|
|
16349
|
+
});
|
|
16312
16350
|
}
|
|
16313
16351
|
customElements.define("sui-modal", create_custom_element(Modal_wc, {
|
|
16314
16352
|
size: {
|
|
@@ -16395,7 +16433,15 @@ customElements.define("sui-modal", create_custom_element(Modal_wc, {
|
|
|
16395
16433
|
onprimarybuttonclick: { type: "Object" },
|
|
16396
16434
|
onsecondarybuttonclick: { type: "Object" },
|
|
16397
16435
|
onoverlayclick: { type: "Object" },
|
|
16398
|
-
ondismiss: { type: "Object" }
|
|
16436
|
+
ondismiss: { type: "Object" },
|
|
16437
|
+
modalAriaLabel: {
|
|
16438
|
+
attribute: "modal-aria-label",
|
|
16439
|
+
type: "String"
|
|
16440
|
+
},
|
|
16441
|
+
modalRole: {
|
|
16442
|
+
attribute: "modal-role",
|
|
16443
|
+
type: "String"
|
|
16444
|
+
}
|
|
16399
16445
|
}, ["default", "footer"], [], { mode: "open" }));
|
|
16400
16446
|
//#endregion
|
|
16401
16447
|
//#region src/lib/assets/signal.svg?raw
|
|
@@ -17566,13 +17612,13 @@ customElements.define("sui-select", create_custom_element(Select_wc, {
|
|
|
17566
17612
|
}, ["bottom-content"], [], { mode: "open" }));
|
|
17567
17613
|
//#endregion
|
|
17568
17614
|
//#region src/lib/Sheet/Sheet.svelte
|
|
17569
|
-
var root$31 = /* @__PURE__ */ from_html("<span class=\"sheet-title svelte-1dln6bq\"> </span>"), root_1$28 = /* @__PURE__ */ from_html("<div class=\"sheet-close-button svelte-1dln6bq\"><!></div>"), root_2$22 = /* @__PURE__ */ from_html("<div class=\"sheet-header svelte-1dln6bq\"><!> <!></div>"), root_3$20 = /* @__PURE__ */ from_html("<div class=\"sheet-footer svelte-1dln6bq\"><!></div>"), root_4$16 = /* @__PURE__ */ from_html("<div
|
|
17615
|
+
var root$31 = /* @__PURE__ */ from_html("<span class=\"sheet-title svelte-1dln6bq\"> </span>"), root_1$28 = /* @__PURE__ */ from_html("<div class=\"sheet-close-button svelte-1dln6bq\"><!></div>"), root_2$22 = /* @__PURE__ */ from_html("<div class=\"sheet-header svelte-1dln6bq\"><!> <!></div>"), root_3$20 = /* @__PURE__ */ from_html("<div class=\"sheet-footer svelte-1dln6bq\"><!></div>"), root_4$16 = /* @__PURE__ */ from_html("<div tabindex=\"-1\"><div role=\"dialog\" aria-modal=\"true\" tabindex=\"-1\"><!> <div class=\"sheet-content svelte-1dln6bq\"><!></div> <!></div></div>"), $$css$33 = {
|
|
17570
17616
|
hash: "svelte-1dln6bq",
|
|
17571
|
-
code: ".sheet-overlay.svelte-1dln6bq {position:fixed;top:0;left:0;right:0;bottom:0;z-index:var(--sheet-overlay-z-index, 15);-webkit-tap-highlight-color:transparent;}.overlay-visible.svelte-1dln6bq {background-color:var(--sheet-overlay-background, #00000066);}.overlay-invisible.svelte-1dln6bq {background-color:transparent;}.overlay-interactive.svelte-1dln6bq {pointer-events:auto;}.overlay-noninteractive.svelte-1dln6bq {pointer-events:none;}.sheet-panel.svelte-1dln6bq {position:fixed;display:flex;flex-direction:column;background-color:var(--sheet-background, #ffffff);box-shadow:var(--sheet-box-shadow, -2px 0 8px rgba(0, 0, 0, 0.15));z-index:var(--sheet-z-index, 16);pointer-events:auto;outline:none;}\n\n /* --sheet-top/-right/-bottom/-left all default to the previous hardcoded\n edge-to-edge values below, so an unconfigured Sheet renders unchanged.\n Overriding one (e.g. --sheet-top to clear a fixed header, or --sheet-bottom:\n auto to size to content) turns the panel from an edge-to-edge slide-in into\n an anchored floating panel, without needing a different component. */.sheet-panel.left.svelte-1dln6bq,\n .sheet-panel.right.svelte-1dln6bq {top:var(--sheet-top, 0);bottom:var(--sheet-bottom, 0);width:var(--sheet-width, 400px);max-width:var(--sheet-max-width, 100vw);}.sheet-panel.left.svelte-1dln6bq {left:var(--sheet-left, 0);border-right:var(--sheet-border, none);}.sheet-panel.right.svelte-1dln6bq {right:var(--sheet-right, 0);border-left:var(--sheet-border, none);}.sheet-panel.top.svelte-1dln6bq,\n .sheet-panel.bottom.svelte-1dln6bq {left:var(--sheet-left, 0);right:var(--sheet-right, 0);height:var(--sheet-height, 300px);max-height:var(--sheet-max-height, 100vh);}.sheet-panel.top.svelte-1dln6bq {top:var(--sheet-top, 0);border-bottom:var(--sheet-border, none);}.sheet-panel.bottom.svelte-1dln6bq {bottom:var(--sheet-bottom, 0);border-top:var(--sheet-border, none);}\n\n /* `side=\"center\"` is a fixed-size floating dialog, not an edge-anchored\n panel: no top/bottom/left/right offset, sized by its own tokens rather\n than --sheet-width/--sheet-height (so an existing left/right/top/bottom\n theme is untouched by adding this variant), and centered with a\n transform instead of stretching to an edge. */.sheet-panel.center.svelte-1dln6bq {top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sheet-center-width, 480px);max-width:var(--sheet-center-max-width, calc(100vw - 32px));max-height:var(--sheet-center-max-height, 90vh);}.sheet-header.svelte-1dln6bq {display:flex;align-items:center;padding:var(--sheet-header-padding, 16px 20px);background-color:var(--sheet-header-background, inherit);border-bottom:var(--sheet-header-border-bottom, 1px solid #e0e0e0);flex-shrink:0;}.sheet-title.svelte-1dln6bq {flex:1;font-size:var(--sheet-title-font-size, 18px);font-weight:var(--sheet-title-font-weight, 600);font-family:var(--sheet-title-font-family, inherit);color:var(--sheet-title-color, #1a1a1a);line-height:var(--sheet-title-line-height, 1.4);}.sheet-close-button.svelte-1dln6bq {--button-width: var(--sheet-close-button-size, 32px);--button-height: var(--sheet-close-button-size, 32px);--button-border: none;--button-border-radius: var(--sheet-close-button-border-radius, var(--radius, 4px));--button-color: var(--sheet-close-button-background, transparent);--button-text-color: var(--sheet-close-button-color, #666666);--button-font-size: var(--sheet-close-button-font-size, 16px);--button-padding: 0;--button-hover-color: var(--sheet-close-button-hover-background, #f0f0f0);flex-shrink:0;display:flex;align-items:center;justify-content:center;}.sheet-content.svelte-1dln6bq {flex:1;overflow-y:var(--sheet-content-overflow-y, auto);padding:var(--sheet-content-padding, 20px);scrollbar-width:var(--sheet-scrollbar-width, none);}.sheet-content.svelte-1dln6bq::-webkit-scrollbar {display:none;}.sheet-footer.svelte-1dln6bq {padding:var(--sheet-footer-padding, 16px 20px);background-color:var(--sheet-footer-background, inherit);border-top:var(--sheet-footer-border-top, 1px solid #e0e0e0);flex-shrink:0;}"
|
|
17617
|
+
code: ".sheet-overlay.svelte-1dln6bq {position:fixed;top:0;left:0;right:0;bottom:0;z-index:var(--sheet-overlay-z-index, 15);-webkit-tap-highlight-color:transparent;}.overlay-visible.svelte-1dln6bq {background-color:var(--sheet-overlay-background, #00000066);}.overlay-invisible.svelte-1dln6bq {background-color:transparent;}.overlay-interactive.svelte-1dln6bq {pointer-events:auto;}.overlay-noninteractive.svelte-1dln6bq {pointer-events:none;}.sheet-panel.svelte-1dln6bq {position:fixed;display:flex;flex-direction:column;background-color:var(--sheet-background, #ffffff);box-shadow:var(--sheet-box-shadow, -2px 0 8px rgba(0, 0, 0, 0.15));z-index:var(--sheet-z-index, 16);pointer-events:auto;outline:none;}\n\n /* The panel itself is the initial focus target on open (scrollLockAction\n focuses it directly, and it's the Tab-trap's own boundary), so removing\n its outline unconditionally left a keyboard user with no visible sign\n focus had moved into the sheet at all -- particularly visible on the\n \"Raw\" variant, which has no focusable child for focus to land on\n instead. :focus-visible restores a ring precisely when the browser\n judges it's from keyboard/programmatic focus rather than a mouse click,\n so clicking the trigger still shows nothing new. outline-offset is\n negative (inset) rather than the usual positive offset other components\n in this library use, because left/right/top/bottom panels sit flush\n against a viewport edge -- a positive offset would clip there. */.sheet-panel.svelte-1dln6bq:focus-visible {outline:var(--sheet-panel-focus-outline, 2px solid #2563eb);outline-offset:var(--sheet-panel-focus-outline-offset, -2px);}\n\n /* --sheet-top/-right/-bottom/-left all default to the previous hardcoded\n edge-to-edge values below, so an unconfigured Sheet renders unchanged.\n Overriding one (e.g. --sheet-top to clear a fixed header, or --sheet-bottom:\n auto to size to content) turns the panel from an edge-to-edge slide-in into\n an anchored floating panel, without needing a different component. */.sheet-panel.left.svelte-1dln6bq,\n .sheet-panel.right.svelte-1dln6bq {top:var(--sheet-top, 0);bottom:var(--sheet-bottom, 0);width:var(--sheet-width, 400px);max-width:var(--sheet-max-width, 100vw);}.sheet-panel.left.svelte-1dln6bq {left:var(--sheet-left, 0);border-right:var(--sheet-border, none);}.sheet-panel.right.svelte-1dln6bq {right:var(--sheet-right, 0);border-left:var(--sheet-border, none);}.sheet-panel.top.svelte-1dln6bq,\n .sheet-panel.bottom.svelte-1dln6bq {left:var(--sheet-left, 0);right:var(--sheet-right, 0);height:var(--sheet-height, 300px);max-height:var(--sheet-max-height, 100vh);}.sheet-panel.top.svelte-1dln6bq {top:var(--sheet-top, 0);border-bottom:var(--sheet-border, none);}.sheet-panel.bottom.svelte-1dln6bq {bottom:var(--sheet-bottom, 0);border-top:var(--sheet-border, none);}\n\n /* `side=\"center\"` is a fixed-size floating dialog, not an edge-anchored\n panel: no top/bottom/left/right offset, sized by its own tokens rather\n than --sheet-width/--sheet-height (so an existing left/right/top/bottom\n theme is untouched by adding this variant), and centered with a\n transform instead of stretching to an edge. */.sheet-panel.center.svelte-1dln6bq {top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sheet-center-width, 480px);max-width:var(--sheet-center-max-width, calc(100vw - 32px));max-height:var(--sheet-center-max-height, 90vh);}.sheet-header.svelte-1dln6bq {display:flex;align-items:center;padding:var(--sheet-header-padding, 16px 20px);background-color:var(--sheet-header-background, inherit);border-bottom:var(--sheet-header-border-bottom, 1px solid #e0e0e0);flex-shrink:0;}.sheet-title.svelte-1dln6bq {flex:1;font-size:var(--sheet-title-font-size, 18px);font-weight:var(--sheet-title-font-weight, 600);font-family:var(--sheet-title-font-family, inherit);color:var(--sheet-title-color, #1a1a1a);line-height:var(--sheet-title-line-height, 1.4);}.sheet-close-button.svelte-1dln6bq {--button-width: var(--sheet-close-button-size, 32px);--button-height: var(--sheet-close-button-size, 32px);--button-border: none;--button-border-radius: var(--sheet-close-button-border-radius, var(--radius, 4px));--button-color: var(--sheet-close-button-background, transparent);--button-text-color: var(--sheet-close-button-color, #666666);--button-font-size: var(--sheet-close-button-font-size, 16px);--button-padding: 0;--button-hover-color: var(--sheet-close-button-hover-background, #f0f0f0);flex-shrink:0;display:flex;align-items:center;justify-content:center;}.sheet-content.svelte-1dln6bq {flex:1;overflow-y:var(--sheet-content-overflow-y, auto);padding:var(--sheet-content-padding, 20px);scrollbar-width:var(--sheet-scrollbar-width, none);}.sheet-content.svelte-1dln6bq::-webkit-scrollbar {display:none;}.sheet-footer.svelte-1dln6bq {padding:var(--sheet-footer-padding, 16px 20px);background-color:var(--sheet-footer-background, inherit);border-top:var(--sheet-footer-border-top, 1px solid #e0e0e0);flex-shrink:0;}"
|
|
17572
17618
|
};
|
|
17573
17619
|
function Sheet(e, t) {
|
|
17574
17620
|
push(t, !0), append_styles$1(e, $$css$33);
|
|
17575
|
-
let n = prop(t, "open", 15, !1), i = prop(t, "side", 7, "right"), a = prop(t, "title", 7), o = prop(t, "showOverlay", 7, !0), s = prop(t, "dismissOnOutsideClick", 23, o), c = prop(t, "showCloseButton", 7, !0),
|
|
17621
|
+
let n = prop(t, "open", 15, !1), i = prop(t, "side", 7, "right"), a = prop(t, "title", 7), o = prop(t, "showOverlay", 7, !0), s = prop(t, "dismissOnOutsideClick", 23, o), c = prop(t, "overlayAriaLabel", 7), l = prop(t, "showCloseButton", 7, !0), u = prop(t, "headingLevel", 7), f = prop(t, "testId", 7), p = prop(t, "content", 7), h = prop(t, "footer", 7), S = prop(t, "onclose", 7), C = prop(t, "onafteropen", 7), k = prop(t, "onafterclose", 7), R = prop(t, "classes", 7), G = /* @__PURE__ */ state(null), te = /* @__PURE__ */ state(null), ne = /* @__PURE__ */ user_derived(() => {
|
|
17576
17622
|
switch (i()) {
|
|
17577
17623
|
case "left": return {
|
|
17578
17624
|
x: -400,
|
|
@@ -17601,38 +17647,42 @@ function Sheet(e, t) {
|
|
|
17601
17647
|
};
|
|
17602
17648
|
}
|
|
17603
17649
|
});
|
|
17604
|
-
function
|
|
17605
|
-
n(!1),
|
|
17606
|
-
}
|
|
17607
|
-
function re(e) {
|
|
17608
|
-
e.target === get(R) && s() && ne();
|
|
17650
|
+
function re() {
|
|
17651
|
+
n(!1), S()?.();
|
|
17609
17652
|
}
|
|
17610
17653
|
function be(e) {
|
|
17654
|
+
e.target === get(G) && s() && re();
|
|
17655
|
+
}
|
|
17656
|
+
function Me(e) {
|
|
17611
17657
|
if (e.key === "Escape") {
|
|
17612
|
-
|
|
17658
|
+
re();
|
|
17613
17659
|
return;
|
|
17614
17660
|
}
|
|
17615
|
-
if (e.key === "
|
|
17616
|
-
|
|
17661
|
+
if ((e.key === "Enter" || e.key === " ") && s() && e.target === get(G)) {
|
|
17662
|
+
e.preventDefault(), re();
|
|
17663
|
+
return;
|
|
17664
|
+
}
|
|
17665
|
+
if (e.key === "Tab" && get(te) !== null) {
|
|
17666
|
+
let t = get(te).querySelectorAll("a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])"), n = t.item(0), i = t.item(t.length - 1);
|
|
17617
17667
|
if (n === null || i === null) return;
|
|
17618
17668
|
document.activeElement === (e.shiftKey ? n : i) && (e.preventDefault(), (e.shiftKey ? i : n).focus());
|
|
17619
17669
|
}
|
|
17620
17670
|
}
|
|
17621
|
-
function
|
|
17671
|
+
function Re(e) {
|
|
17622
17672
|
return lockBodyScroll(), tick().then(() => {
|
|
17623
|
-
get(
|
|
17673
|
+
get(te) !== null && get(te).focus();
|
|
17624
17674
|
}), { destroy() {
|
|
17625
17675
|
unlockBodyScroll();
|
|
17626
17676
|
} };
|
|
17627
17677
|
}
|
|
17628
|
-
function Re() {
|
|
17629
|
-
typeof S() == "function" && S()();
|
|
17630
|
-
}
|
|
17631
17678
|
function Ue() {
|
|
17632
17679
|
typeof C() == "function" && C()();
|
|
17633
17680
|
}
|
|
17634
|
-
|
|
17635
|
-
|
|
17681
|
+
function it() {
|
|
17682
|
+
typeof k() == "function" && k()();
|
|
17683
|
+
}
|
|
17684
|
+
let at = /* @__PURE__ */ user_derived(() => typeof u() == "number" && Number.isInteger(u()) && u() >= 1 && u() <= 6 ? `h${u()}` : null);
|
|
17685
|
+
var ot = {
|
|
17636
17686
|
get open() {
|
|
17637
17687
|
return n();
|
|
17638
17688
|
},
|
|
@@ -17663,66 +17713,72 @@ function Sheet(e, t) {
|
|
|
17663
17713
|
set dismissOnOutsideClick(e = o) {
|
|
17664
17714
|
s(e), flushSync();
|
|
17665
17715
|
},
|
|
17666
|
-
get
|
|
17716
|
+
get overlayAriaLabel() {
|
|
17667
17717
|
return c();
|
|
17668
17718
|
},
|
|
17669
|
-
set
|
|
17719
|
+
set overlayAriaLabel(e) {
|
|
17670
17720
|
c(e), flushSync();
|
|
17671
17721
|
},
|
|
17672
|
-
get
|
|
17722
|
+
get showCloseButton() {
|
|
17673
17723
|
return l();
|
|
17674
17724
|
},
|
|
17675
|
-
set
|
|
17725
|
+
set showCloseButton(e = !0) {
|
|
17676
17726
|
l(e), flushSync();
|
|
17677
17727
|
},
|
|
17678
|
-
get
|
|
17728
|
+
get headingLevel() {
|
|
17679
17729
|
return u();
|
|
17680
17730
|
},
|
|
17681
|
-
set
|
|
17731
|
+
set headingLevel(e) {
|
|
17682
17732
|
u(e), flushSync();
|
|
17683
17733
|
},
|
|
17684
|
-
get
|
|
17734
|
+
get testId() {
|
|
17685
17735
|
return f();
|
|
17686
17736
|
},
|
|
17687
|
-
set
|
|
17737
|
+
set testId(e) {
|
|
17688
17738
|
f(e), flushSync();
|
|
17689
17739
|
},
|
|
17690
|
-
get
|
|
17740
|
+
get content() {
|
|
17691
17741
|
return p();
|
|
17692
17742
|
},
|
|
17693
|
-
set
|
|
17743
|
+
set content(e) {
|
|
17694
17744
|
p(e), flushSync();
|
|
17695
17745
|
},
|
|
17696
|
-
get
|
|
17746
|
+
get footer() {
|
|
17697
17747
|
return h();
|
|
17698
17748
|
},
|
|
17699
|
-
set
|
|
17749
|
+
set footer(e) {
|
|
17700
17750
|
h(e), flushSync();
|
|
17701
17751
|
},
|
|
17702
|
-
get
|
|
17752
|
+
get onclose() {
|
|
17703
17753
|
return S();
|
|
17704
17754
|
},
|
|
17705
|
-
set
|
|
17755
|
+
set onclose(e) {
|
|
17706
17756
|
S(e), flushSync();
|
|
17707
17757
|
},
|
|
17708
|
-
get
|
|
17758
|
+
get onafteropen() {
|
|
17709
17759
|
return C();
|
|
17710
17760
|
},
|
|
17711
|
-
set
|
|
17761
|
+
set onafteropen(e) {
|
|
17712
17762
|
C(e), flushSync();
|
|
17713
17763
|
},
|
|
17714
|
-
get
|
|
17764
|
+
get onafterclose() {
|
|
17715
17765
|
return k();
|
|
17716
17766
|
},
|
|
17717
|
-
set
|
|
17767
|
+
set onafterclose(e) {
|
|
17718
17768
|
k(e), flushSync();
|
|
17769
|
+
},
|
|
17770
|
+
get classes() {
|
|
17771
|
+
return R();
|
|
17772
|
+
},
|
|
17773
|
+
set classes(e) {
|
|
17774
|
+
R(e), flushSync();
|
|
17719
17775
|
}
|
|
17720
|
-
},
|
|
17721
|
-
var t = root_4$16(), n = child(t),
|
|
17776
|
+
}, ct = comment(), lt = first_child(ct), ut = (e) => {
|
|
17777
|
+
var t = root_4$16(), n = child(t), u = child(n), S = (e) => {
|
|
17722
17778
|
var t = root_2$22(), n = child(t), i = (e) => {
|
|
17723
17779
|
var t = comment(), n = first_child(t), i = (e) => {
|
|
17724
17780
|
var t = comment();
|
|
17725
|
-
element(first_child(t), () => get(
|
|
17781
|
+
element(first_child(t), () => get(at), !1, (e, t) => {
|
|
17726
17782
|
set_class(e, 0, "sheet-title svelte-1dln6bq");
|
|
17727
17783
|
var n = text();
|
|
17728
17784
|
template_effect(() => set_text(n, a())), append(t, n);
|
|
@@ -17732,7 +17788,7 @@ function Sheet(e, t) {
|
|
|
17732
17788
|
reset(t), template_effect(() => set_text(n, a())), append(e, t);
|
|
17733
17789
|
};
|
|
17734
17790
|
if_block(n, (e) => {
|
|
17735
|
-
get(
|
|
17791
|
+
get(at) === null ? e(o, -1) : e(i);
|
|
17736
17792
|
}), append(e, t);
|
|
17737
17793
|
};
|
|
17738
17794
|
if_block(n, (e) => {
|
|
@@ -17741,9 +17797,9 @@ function Sheet(e, t) {
|
|
|
17741
17797
|
var o = sibling(n, 2), s = (e) => {
|
|
17742
17798
|
var t = root_1$28();
|
|
17743
17799
|
Button(child(t), spread_props({
|
|
17744
|
-
onclick:
|
|
17800
|
+
onclick: re,
|
|
17745
17801
|
ariaLabel: "Close"
|
|
17746
|
-
}, () => typeof
|
|
17802
|
+
}, () => typeof f() == "string" ? { testId: `${f()}-close` } : {}, {
|
|
17747
17803
|
children: (e, t) => {
|
|
17748
17804
|
next(), append(e, text("✕"));
|
|
17749
17805
|
},
|
|
@@ -17751,27 +17807,27 @@ function Sheet(e, t) {
|
|
|
17751
17807
|
})), reset(t), append(e, t);
|
|
17752
17808
|
};
|
|
17753
17809
|
if_block(o, (e) => {
|
|
17754
|
-
|
|
17810
|
+
l() && e(s);
|
|
17755
17811
|
}), reset(t), append(e, t);
|
|
17756
17812
|
};
|
|
17757
|
-
if_block(
|
|
17758
|
-
(typeof a() == "string" ||
|
|
17813
|
+
if_block(u, (e) => {
|
|
17814
|
+
(typeof a() == "string" || l()) && e(S);
|
|
17759
17815
|
});
|
|
17760
|
-
var
|
|
17761
|
-
snippet(child(
|
|
17762
|
-
var
|
|
17816
|
+
var C = sibling(u, 2);
|
|
17817
|
+
snippet(child(C), p), reset(C);
|
|
17818
|
+
var k = sibling(C, 2), ot = (e) => {
|
|
17763
17819
|
var t = root_3$20();
|
|
17764
|
-
snippet(child(t),
|
|
17820
|
+
snippet(child(t), h), reset(t), append(e, t);
|
|
17765
17821
|
};
|
|
17766
|
-
if_block(
|
|
17767
|
-
typeof
|
|
17768
|
-
}), reset(n), bind_this(n, (e) => set(
|
|
17769
|
-
set_class(t, 1, `sheet-overlay ${o() ? "overlay-visible" : "overlay-invisible"} ${o() || s() ? "overlay-interactive" : "overlay-noninteractive"} ${
|
|
17770
|
-
}), delegated("click", t,
|
|
17822
|
+
if_block(k, (e) => {
|
|
17823
|
+
typeof h() == "function" && e(ot);
|
|
17824
|
+
}), reset(n), bind_this(n, (e) => set(te, e), () => get(te)), reset(t), bind_this(t, (e) => set(G, e), () => get(G)), action(t, (e) => Re?.(e)), template_effect((e) => {
|
|
17825
|
+
set_class(t, 1, `sheet-overlay ${o() ? "overlay-visible" : "overlay-invisible"} ${o() || s() ? "overlay-interactive" : "overlay-noninteractive"} ${R() ?? "" ?? ""}`, "svelte-1dln6bq"), set_attribute(t, "role", s() ? "button" : null), set_attribute(t, "aria-label", e), set_attribute(t, "data-pw", typeof f() == "string" ? f() : null), set_attribute(t, "testid", typeof f() == "string" ? f() : null), set_class(n, 1, `sheet-panel ${i() ?? ""}`, "svelte-1dln6bq"), set_attribute(n, "aria-label", a() ?? "Sheet"), set_attribute(n, "data-pw", typeof f() == "string" ? `${f()}-panel` : null), set_attribute(n, "testid", typeof f() == "string" ? `${f()}-panel` : null);
|
|
17826
|
+
}, [() => s() ? c()?.trim() || "Close sheet" : null]), delegated("click", t, be), delegated("keydown", t, Me), event("introend", n, Ue), event("outroend", n, it), transition(7, n, () => fly, () => get(ne)), transition(3, t, () => fade, () => ({ duration: 200 })), append(e, t);
|
|
17771
17827
|
};
|
|
17772
|
-
return if_block(
|
|
17773
|
-
n() && e(
|
|
17774
|
-
}), append(e,
|
|
17828
|
+
return if_block(lt, (e) => {
|
|
17829
|
+
n() && e(ut);
|
|
17830
|
+
}), append(e, ct), pop(ot);
|
|
17775
17831
|
}
|
|
17776
17832
|
delegate(["click", "keydown"]), create_custom_element(Sheet, {
|
|
17777
17833
|
open: {},
|
|
@@ -17779,6 +17835,7 @@ delegate(["click", "keydown"]), create_custom_element(Sheet, {
|
|
|
17779
17835
|
title: {},
|
|
17780
17836
|
showOverlay: {},
|
|
17781
17837
|
dismissOnOutsideClick: {},
|
|
17838
|
+
overlayAriaLabel: {},
|
|
17782
17839
|
showCloseButton: {},
|
|
17783
17840
|
headingLevel: {},
|
|
17784
17841
|
testId: {},
|
|
@@ -17845,6 +17902,11 @@ customElements.define("sui-sheet", create_custom_element(Sheet_wc, {
|
|
|
17845
17902
|
reflect: !0,
|
|
17846
17903
|
type: "Boolean"
|
|
17847
17904
|
},
|
|
17905
|
+
overlayAriaLabel: {
|
|
17906
|
+
attribute: "overlay-aria-label",
|
|
17907
|
+
reflect: !0,
|
|
17908
|
+
type: "String"
|
|
17909
|
+
},
|
|
17848
17910
|
showCloseButton: {
|
|
17849
17911
|
attribute: "show-close-button",
|
|
17850
17912
|
reflect: !0,
|
|
@@ -32339,36 +32401,40 @@ function TypewriterText(e, t) {
|
|
|
32339
32401
|
index: t,
|
|
32340
32402
|
wordCount: get(R)
|
|
32341
32403
|
}) : s() ? re.test(e) && s().digit ? be(s().digit) : G.has(e) && s().whitespace ? be(s().whitespace) : ne.has(e) && s().punctuation ? be(s().punctuation) : s().default ? be(s().default) : i() : i(), Re = () => {
|
|
32404
|
+
get(C) !== null && (clearTimeout(get(C)), set(C, null));
|
|
32405
|
+
let e = get(S) < n().length;
|
|
32406
|
+
set(h, n(), !0), set(S, n().length, !0), set(R, te(n()), !0), e && l()?.({
|
|
32407
|
+
index: get(S),
|
|
32408
|
+
total: n().length,
|
|
32409
|
+
displayedText: get(h)
|
|
32410
|
+
});
|
|
32411
|
+
}, Ue = () => {
|
|
32412
|
+
if (prefersReducedMotion()) {
|
|
32413
|
+
Re();
|
|
32414
|
+
return;
|
|
32415
|
+
}
|
|
32342
32416
|
if (get(S) < n().length) {
|
|
32343
32417
|
let e = n()[get(S)], t = get(S);
|
|
32344
32418
|
G.has(e) && update(R), set(h, n().substring(0, get(S) + 1), !0), update(S), l()?.({
|
|
32345
32419
|
index: get(S),
|
|
32346
32420
|
total: n().length,
|
|
32347
32421
|
displayedText: get(h)
|
|
32348
|
-
}), set(C, setTimeout(
|
|
32422
|
+
}), set(C, setTimeout(Ue, Me(e, t)), !0);
|
|
32349
32423
|
}
|
|
32350
32424
|
};
|
|
32351
32425
|
user_effect(() => {
|
|
32352
32426
|
let e = n();
|
|
32353
32427
|
untrack(() => {
|
|
32354
|
-
e.length >= get(k) && e.startsWith(get(h)) || (get(C) !== null && (clearTimeout(get(C)), set(C, null)), set(h, ""), set(S, 0), set(k, 0), set(R, 0)), e.length > 0 && e.length > get(k) && (get(S) >= get(k) && (get(C) !== null && clearTimeout(get(C)),
|
|
32428
|
+
e.length >= get(k) && e.startsWith(get(h)) || (get(C) !== null && (clearTimeout(get(C)), set(C, null)), set(h, ""), set(S, 0), set(k, 0), set(R, 0)), e.length > 0 && e.length > get(k) && (get(S) >= get(k) && (get(C) !== null && (clearTimeout(get(C)), set(C, null)), Ue()), set(k, e.length, !0));
|
|
32355
32429
|
});
|
|
32356
32430
|
}), user_effect(() => {
|
|
32357
|
-
|
|
32358
|
-
get(C) !== null && clearTimeout(get(C));
|
|
32359
|
-
let e = get(S) < n().length;
|
|
32360
|
-
set(h, n(), !0), set(S, n().length, !0), set(R, te(n()), !0), e && l()?.({
|
|
32361
|
-
index: get(S),
|
|
32362
|
-
total: n().length,
|
|
32363
|
-
displayedText: get(h)
|
|
32364
|
-
});
|
|
32365
|
-
}
|
|
32431
|
+
!a() && n().length > 0 && Re();
|
|
32366
32432
|
}), onMount(() => {
|
|
32367
|
-
n().length > 0 && (set(k, n().length, !0),
|
|
32433
|
+
n().length > 0 && (set(k, n().length, !0), Ue());
|
|
32368
32434
|
}), onDestroy(() => {
|
|
32369
32435
|
get(C) !== null && clearTimeout(get(C));
|
|
32370
32436
|
});
|
|
32371
|
-
var
|
|
32437
|
+
var it = {
|
|
32372
32438
|
get text() {
|
|
32373
32439
|
return n();
|
|
32374
32440
|
},
|
|
@@ -32429,12 +32495,12 @@ function TypewriterText(e, t) {
|
|
|
32429
32495
|
set classes(e) {
|
|
32430
32496
|
p(e), flushSync();
|
|
32431
32497
|
}
|
|
32432
|
-
},
|
|
32433
|
-
let
|
|
32434
|
-
var
|
|
32498
|
+
}, at = root$12();
|
|
32499
|
+
let ot;
|
|
32500
|
+
var ct = child(at), lt = (e) => {
|
|
32435
32501
|
var t = comment();
|
|
32436
32502
|
html(first_child(t), () => o()(get(h))), append(e, t);
|
|
32437
|
-
},
|
|
32503
|
+
}, ut = (e) => {
|
|
32438
32504
|
var t = comment();
|
|
32439
32505
|
each(first_child(t), 17, () => get(h).split(""), index, (e, t, n) => {
|
|
32440
32506
|
var i = comment();
|
|
@@ -32443,15 +32509,15 @@ function TypewriterText(e, t) {
|
|
|
32443
32509
|
index: n
|
|
32444
32510
|
})), append(e, i);
|
|
32445
32511
|
}), append(e, t);
|
|
32446
|
-
},
|
|
32512
|
+
}, dt = (e) => {
|
|
32447
32513
|
var t = text();
|
|
32448
32514
|
template_effect(() => set_text(t, get(h))), append(e, t);
|
|
32449
32515
|
};
|
|
32450
|
-
return if_block(
|
|
32451
|
-
typeof o() == "function" ? e(
|
|
32452
|
-
}), reset(
|
|
32453
|
-
|
|
32454
|
-
}), append(e,
|
|
32516
|
+
return if_block(ct, (e) => {
|
|
32517
|
+
typeof o() == "function" ? e(lt) : u() ? e(ut, 1) : e(dt, -1);
|
|
32518
|
+
}), reset(at), template_effect(() => {
|
|
32519
|
+
ot = set_class(at, 1, `typewriter-text ${p() ?? "" ?? ""}`, "svelte-12jnsxo", ot, { plain: typeof o() != "function" }), set_attribute(at, "data-pw", typeof f() == "string" ? f() : null), set_attribute(at, "testid", typeof f() == "string" ? f() : null);
|
|
32520
|
+
}), append(e, at), pop(it);
|
|
32455
32521
|
}
|
|
32456
32522
|
create_custom_element(TypewriterText, {
|
|
32457
32523
|
text: {},
|