@xds/svelte 1.0.0-rc.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccordionPanel.svelte +5 -1
- package/dist/AccordionPanel.svelte.d.ts +1 -1
- package/dist/Avatar.svelte +1 -0
- package/dist/Button.svelte +7 -3
- package/dist/Card.svelte +1 -1
- package/dist/DatePicker.svelte +23 -13
- package/dist/DateRangePicker.svelte +18 -12
- package/dist/Menu.svelte +8 -2
- package/dist/Portal.svelte +17 -7
- package/dist/Portal.svelte.d.ts +3 -4
- package/dist/SearchField.svelte +5 -1
- package/dist/Select.svelte +23 -14
- package/dist/Skeleton.svelte +11 -3
- package/dist/Slider.svelte +9 -3
- package/dist/TextField.svelte +6 -0
- package/dist/Thumbnail.svelte +1 -0
- package/dist/Toast.svelte +13 -13
- package/dist/TooltipOverlay.svelte +7 -3
- package/dist/picture.svelte.d.ts +2 -3
- package/dist/picture.svelte.js +7 -3
- package/package.json +3 -3
- package/styles.css +15 -11
- package/tailwind.css +21 -14
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
-->
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import { setPanelOpen } from "@xds/core";
|
|
9
|
-
import type
|
|
9
|
+
import { untrack, type Snippet } from "svelte";
|
|
10
10
|
import type { Attachment } from "svelte/attachments";
|
|
11
11
|
import type { HTMLAttributes } from "svelte/elements";
|
|
12
12
|
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
}: { open: boolean; attributes: HTMLAttributes<HTMLDivElement>; children: Snippet } = $props();
|
|
18
18
|
|
|
19
19
|
let rendered = false;
|
|
20
|
+
// A page rendered on the server shows the panel before the attachment can run, so a closed one
|
|
21
|
+
// starts hidden. Read once so setPanelOpen owns `hidden` from then on.
|
|
22
|
+
const closedAtFirst = untrack(() => !open);
|
|
20
23
|
// Again on each toggle; the next one takes over from this one.
|
|
21
24
|
const toggle: Attachment<HTMLDivElement> = (panel) => {
|
|
22
25
|
const stop = setPanelOpen(panel, open, rendered);
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
<div
|
|
33
36
|
{...attributes}
|
|
34
37
|
{@attach toggle}
|
|
38
|
+
hidden={closedAtFirst || undefined}
|
|
35
39
|
role="group"
|
|
36
40
|
aria-hidden={open ? undefined : "true"}
|
|
37
41
|
class="xds-accordion__panel"
|
package/dist/Avatar.svelte
CHANGED
package/dist/Button.svelte
CHANGED
|
@@ -69,9 +69,13 @@
|
|
|
69
69
|
"data-pending": loading ? "" : undefined,
|
|
70
70
|
"aria-pressed": selected === undefined ? undefined : selected ? "true" : "false",
|
|
71
71
|
"aria-label": ariaLabel,
|
|
72
|
-
onclick: () => {
|
|
73
|
-
// The press was taken already.
|
|
74
|
-
if (
|
|
72
|
+
onclick: (event) => {
|
|
73
|
+
// The press was taken already: block keyboard Enter/Space form submit or reset too.
|
|
74
|
+
if (loading) {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
onPress?.();
|
|
75
79
|
},
|
|
76
80
|
}),
|
|
77
81
|
() => loading === true,
|
package/dist/Card.svelte
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
{#if media}
|
|
55
55
|
<svelte:element this={tags.box} class={cardMediaClass(flush)}>{@render media()}</svelte:element>
|
|
56
56
|
{/if}
|
|
57
|
-
{#if title || (actions && !pressable)}
|
|
57
|
+
{#if title || description || (actions && !pressable)}
|
|
58
58
|
<svelte:element this={tags.header} class={CARD_PARTS.header}>
|
|
59
59
|
<svelte:element this={tags.box} class={CARD_PARTS.heading}>
|
|
60
60
|
{#if title}
|
package/dist/DatePicker.svelte
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<script lang="ts">
|
|
28
|
+
import { space } from "@xds/tokens";
|
|
28
29
|
import {
|
|
29
30
|
classes,
|
|
30
31
|
DATE_PICKER_NAV_CLASS,
|
|
@@ -37,6 +38,8 @@
|
|
|
37
38
|
formatDay,
|
|
38
39
|
keepCalendarFocus,
|
|
39
40
|
keepDayFocused,
|
|
41
|
+
readCssPx,
|
|
42
|
+
underlayLayerStyle,
|
|
40
43
|
} from "@xds/core";
|
|
41
44
|
import * as datePicker from "@zag-js/date-picker";
|
|
42
45
|
import { mergeProps, normalizeProps, useMachine } from "@zag-js/svelte";
|
|
@@ -51,9 +54,14 @@
|
|
|
51
54
|
|
|
52
55
|
const id = $props.id();
|
|
53
56
|
const ids = datePickerIds(id);
|
|
54
|
-
const locale = datePickerLocale();
|
|
57
|
+
const locale = $derived(datePickerLocale(props.locale));
|
|
55
58
|
const service = useMachine(datePicker.machine, () =>
|
|
56
|
-
datePickerMachineProps(props, {
|
|
59
|
+
datePickerMachineProps(props, {
|
|
60
|
+
id,
|
|
61
|
+
locale,
|
|
62
|
+
onChange,
|
|
63
|
+
gutter: readCssPx(null, "--xds-space-1", space[1]),
|
|
64
|
+
}),
|
|
57
65
|
);
|
|
58
66
|
const api = $derived(datePicker.connect(service, normalizeProps));
|
|
59
67
|
const trigger = $derived(api.getTriggerProps());
|
|
@@ -102,16 +110,14 @@
|
|
|
102
110
|
<Icon name="calendar" size="sm" class="text-xds-field-placeholder" />
|
|
103
111
|
</button>
|
|
104
112
|
</div>
|
|
105
|
-
<!-- One line under the box: the help, or the error in its place.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
</div>
|
|
114
|
-
{/if}
|
|
113
|
+
<!-- One line under the box: the help, or the error in its place. The error stays mounted as
|
|
114
|
+
a live region so assistive technology announces it when it appears. -->
|
|
115
|
+
<div class="xds-date-picker__footer">
|
|
116
|
+
{#if !invalid && props.description}
|
|
117
|
+
<span id={ids.description} class="xds-date-picker__description">{props.description}</span>
|
|
118
|
+
{/if}
|
|
119
|
+
<span id={ids.error} class="xds-date-picker__error" aria-live="polite">{props.error}</span>
|
|
120
|
+
</div>
|
|
115
121
|
<!-- What a form submits. Zag gives the name to its text input, which is not drawn. -->
|
|
116
122
|
{#if props.name !== undefined}
|
|
117
123
|
<input type="hidden" name={props.name} value={props.value ?? ""} />
|
|
@@ -121,7 +127,11 @@
|
|
|
121
127
|
<!-- Takes a press outside, which then only closes the calendar. The focus stays in the
|
|
122
128
|
calendar until it hands it back to the field. -->
|
|
123
129
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
124
|
-
<div
|
|
130
|
+
<div
|
|
131
|
+
class="xds-date-picker__underlay"
|
|
132
|
+
style:--layer-index={underlayLayerStyle(api.getPositionerProps().style)?.["--layer-index"]}
|
|
133
|
+
onmousedown={(event) => event.preventDefault()}
|
|
134
|
+
></div>
|
|
125
135
|
{/if}
|
|
126
136
|
<div {...api.getPositionerProps()} bind:this={positioner} class="xds-date-picker__positioner">
|
|
127
137
|
<!-- Shown until its exit animation ends; Zag would hide it as it closes. -->
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<script lang="ts">
|
|
31
|
+
import { space } from "@xds/tokens";
|
|
31
32
|
import {
|
|
32
33
|
classes,
|
|
33
34
|
DATE_PICKER_NAV_CLASS,
|
|
@@ -48,7 +49,9 @@
|
|
|
48
49
|
rangeMonths,
|
|
49
50
|
rangeMonthViews,
|
|
50
51
|
rangeSummary,
|
|
52
|
+
readCssPx,
|
|
51
53
|
shownRange,
|
|
54
|
+
underlayLayerStyle,
|
|
52
55
|
} from "@xds/core";
|
|
53
56
|
import * as datePicker from "@zag-js/date-picker";
|
|
54
57
|
import { mergeProps, normalizeProps, useMachine } from "@zag-js/svelte";
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
|
|
64
67
|
const id = $props.id();
|
|
65
68
|
const ids = datePickerIds(id);
|
|
66
|
-
const locale = datePickerLocale();
|
|
69
|
+
const locale = $derived(datePickerLocale(props.locale));
|
|
67
70
|
// A start alone while the end is chosen; null while the calendar shows the chosen range.
|
|
68
71
|
let draft = $state.raw<RangeDraft | null>(null);
|
|
69
72
|
let months = $state(1);
|
|
@@ -75,6 +78,7 @@
|
|
|
75
78
|
months,
|
|
76
79
|
onDraft: (next) => (draft = next),
|
|
77
80
|
onChange,
|
|
81
|
+
gutter: readCssPx(null, "--xds-space-1", space[1]),
|
|
78
82
|
}),
|
|
79
83
|
);
|
|
80
84
|
const api = $derived(datePicker.connect(service, normalizeProps));
|
|
@@ -141,16 +145,14 @@
|
|
|
141
145
|
<Icon name="calendar" size="sm" class="text-xds-field-placeholder" />
|
|
142
146
|
</button>
|
|
143
147
|
</div>
|
|
144
|
-
<!-- One line under the box: the help, or the error in its place.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
</div>
|
|
153
|
-
{/if}
|
|
148
|
+
<!-- One line under the box: the help, or the error in its place. The error stays mounted as
|
|
149
|
+
a live region so assistive technology announces it when it appears. -->
|
|
150
|
+
<div class="xds-date-picker__footer">
|
|
151
|
+
{#if !invalid && props.description}
|
|
152
|
+
<span id={ids.description} class="xds-date-picker__description">{props.description}</span>
|
|
153
|
+
{/if}
|
|
154
|
+
<span id={ids.error} class="xds-date-picker__error" aria-live="polite">{props.error}</span>
|
|
155
|
+
</div>
|
|
154
156
|
<!-- What a form submits. Zag gives the names to its text inputs, which are not drawn. -->
|
|
155
157
|
{#if props.startName !== undefined}
|
|
156
158
|
<input type="hidden" name={props.startName} value={props.value?.start ?? ""} />
|
|
@@ -163,7 +165,11 @@
|
|
|
163
165
|
<!-- Takes a press outside, which then only closes the calendar. The focus stays in the
|
|
164
166
|
calendar until it hands it back to the field. -->
|
|
165
167
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
166
|
-
<div
|
|
168
|
+
<div
|
|
169
|
+
class="xds-date-picker__underlay"
|
|
170
|
+
style:--layer-index={underlayLayerStyle(api.getPositionerProps().style)?.["--layer-index"]}
|
|
171
|
+
onmousedown={(event) => event.preventDefault()}
|
|
172
|
+
></div>
|
|
167
173
|
{/if}
|
|
168
174
|
<div {...api.getPositionerProps()} bind:this={positioner} class="xds-date-picker__positioner">
|
|
169
175
|
<!-- Shown until its exit animation ends; Zag would hide it as it closes. -->
|
package/dist/Menu.svelte
CHANGED
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
leaveEscapeToFields,
|
|
32
32
|
menuItemClass,
|
|
33
33
|
opensOnPress,
|
|
34
|
+
readCssPx,
|
|
35
|
+
underlayLayerStyle,
|
|
34
36
|
} from "@xds/core";
|
|
35
37
|
import * as menu from "@zag-js/menu";
|
|
36
38
|
import { mergeProps, normalizeProps, useMachine } from "@zag-js/svelte";
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
"aria-label": label,
|
|
49
51
|
positioning: {
|
|
50
52
|
placement: `bottom-${align}` as const,
|
|
51
|
-
gutter: space[1],
|
|
53
|
+
gutter: readCssPx(null, "--xds-space-1", space[1]),
|
|
52
54
|
getAnchorRect: (anchor) => (anchor instanceof HTMLElement ? layoutRect(anchor) : null),
|
|
53
55
|
},
|
|
54
56
|
onSelect: (details: menu.SelectionDetails) => {
|
|
@@ -127,7 +129,11 @@
|
|
|
127
129
|
<!-- Takes a press outside, which then only closes the menu. The focus stays in the menu until
|
|
128
130
|
the menu hands it back to the trigger. -->
|
|
129
131
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
130
|
-
<div
|
|
132
|
+
<div
|
|
133
|
+
class="xds-menu__underlay"
|
|
134
|
+
style:--layer-index={underlayLayerStyle(api.getPositionerProps().style)?.["--layer-index"]}
|
|
135
|
+
onmousedown={(event) => event.preventDefault()}
|
|
136
|
+
></div>
|
|
131
137
|
{/if}
|
|
132
138
|
<div {...api.getPositionerProps()} bind:this={positioner} class="xds-menu__positioner">
|
|
133
139
|
<!-- Shown until its exit animation ends; Zag would hide it as it closes. -->
|
package/dist/Portal.svelte
CHANGED
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
3
|
Draws its content at the end of the page's body, out of any box that would clip it or stack it
|
|
4
|
-
under the page, as the other web libraries' portals do,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for this package's own overlays: the index does not export it.
|
|
4
|
+
under the page, as the other web libraries' portals do, while mirroring any subtree
|
|
5
|
+
`[data-theme]` and `[data-xds-theme]` attributes from where the portal sits so scoped themes
|
|
6
|
+
reach portaled overlays. Only for this package's own overlays: the index does not export it.
|
|
8
7
|
-->
|
|
9
8
|
<script lang="ts">
|
|
9
|
+
import { syncThemeScope } from "@xds/core";
|
|
10
10
|
import { getAllContexts, mount, onMount, type Snippet, unmount } from "svelte";
|
|
11
11
|
import Self from "./Portal.svelte";
|
|
12
12
|
|
|
13
13
|
let { children, here = false }: { children: Snippet; here?: boolean } = $props();
|
|
14
14
|
|
|
15
|
+
let anchor = $state<HTMLSpanElement>();
|
|
15
16
|
const context = getAllContexts();
|
|
16
17
|
onMount(() => {
|
|
17
18
|
if (here) return;
|
|
19
|
+
const host = document.createElement("div");
|
|
20
|
+
host.style.display = "contents";
|
|
21
|
+
document.body.appendChild(host);
|
|
22
|
+
const stopTheme = syncThemeScope(anchor, host);
|
|
18
23
|
const content = mount(Self, {
|
|
19
|
-
target:
|
|
24
|
+
target: host,
|
|
20
25
|
props: { children, here: true },
|
|
21
26
|
context,
|
|
22
27
|
});
|
|
23
|
-
return () =>
|
|
28
|
+
return () => {
|
|
29
|
+
void unmount(content);
|
|
30
|
+
stopTheme();
|
|
31
|
+
host.remove();
|
|
32
|
+
};
|
|
24
33
|
});
|
|
25
34
|
</script>
|
|
26
35
|
|
|
27
|
-
{#if here}{@render children()}{
|
|
36
|
+
{#if here}{@render children()}{:else}<span bind:this={anchor} hidden style="display: none"
|
|
37
|
+
></span>{/if}
|
package/dist/Portal.svelte.d.ts
CHANGED
|
@@ -5,10 +5,9 @@ type $$ComponentProps = {
|
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* Draws its content at the end of the page's body, out of any box that would clip it or stack it
|
|
8
|
-
* under the page, as the other web libraries' portals do,
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* for this package's own overlays: the index does not export it.
|
|
8
|
+
* under the page, as the other web libraries' portals do, while mirroring any subtree
|
|
9
|
+
* `[data-theme]` and `[data-xds-theme]` attributes from where the portal sits so scoped themes
|
|
10
|
+
* reach portaled overlays. Only for this package's own overlays: the index does not export it.
|
|
12
11
|
*/
|
|
13
12
|
declare const Portal: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
13
|
type Portal = ReturnType<typeof Portal>;
|
package/dist/SearchField.svelte
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
<input
|
|
50
50
|
bind:this={input}
|
|
51
51
|
type="text"
|
|
52
|
+
role="searchbox"
|
|
52
53
|
class="xds-text-field__input"
|
|
53
54
|
aria-label={label}
|
|
54
55
|
enterkeyhint="search"
|
|
@@ -66,7 +67,10 @@
|
|
|
66
67
|
onkeydown={(event) => {
|
|
67
68
|
// While a composition is open, Enter and Escape belong to the input method.
|
|
68
69
|
if (event.isComposing) return;
|
|
69
|
-
if (event.key === "Enter"
|
|
70
|
+
if (event.key === "Enter" && onSubmit) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
onSubmit(value);
|
|
73
|
+
}
|
|
70
74
|
if (event.key === "Escape" && value !== "") {
|
|
71
75
|
event.stopPropagation();
|
|
72
76
|
onChange("");
|
package/dist/Select.svelte
CHANGED
|
@@ -23,7 +23,14 @@
|
|
|
23
23
|
|
|
24
24
|
<script lang="ts" generics="Value extends string = string">
|
|
25
25
|
import { space } from "@xds/tokens";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
classes,
|
|
28
|
+
keepListKeys,
|
|
29
|
+
readCssPx,
|
|
30
|
+
type SelectOption,
|
|
31
|
+
selectOptionIds,
|
|
32
|
+
underlayLayerStyle,
|
|
33
|
+
} from "@xds/core";
|
|
27
34
|
import * as select from "@zag-js/select";
|
|
28
35
|
import { mergeProps, normalizeProps, useMachine } from "@zag-js/svelte";
|
|
29
36
|
import type { HTMLAttributes, HTMLLabelAttributes } from "svelte/elements";
|
|
@@ -73,10 +80,10 @@
|
|
|
73
80
|
name,
|
|
74
81
|
positioning: {
|
|
75
82
|
placement: "bottom-start" as const,
|
|
76
|
-
gutter: space[1],
|
|
83
|
+
gutter: readCssPx(null, "--xds-space-1", space[1]),
|
|
77
84
|
sameWidth: true,
|
|
78
85
|
// The list keeps this far from the window's edges.
|
|
79
|
-
overflowPadding: space[3],
|
|
86
|
+
overflowPadding: readCssPx(null, "--xds-space-3", space[3]),
|
|
80
87
|
},
|
|
81
88
|
}));
|
|
82
89
|
const api = $derived(select.connect(service, normalizeProps));
|
|
@@ -151,16 +158,14 @@
|
|
|
151
158
|
>
|
|
152
159
|
<Icon name="chevrons-up-down" size="sm" class="text-xds-field-placeholder" />
|
|
153
160
|
</button>
|
|
154
|
-
<!-- One line under the box: the help, or the error in its place.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
</div>
|
|
163
|
-
{/if}
|
|
161
|
+
<!-- One line under the box: the help, or the error in its place. The error stays mounted as
|
|
162
|
+
a live region so assistive technology announces it when it appears. -->
|
|
163
|
+
<div class="xds-select__footer">
|
|
164
|
+
{#if !invalid && description}
|
|
165
|
+
<span id={descriptionId} class="xds-select__description">{description}</span>
|
|
166
|
+
{/if}
|
|
167
|
+
<span id={errorId} class="xds-select__error" aria-live="polite">{error}</span>
|
|
168
|
+
</div>
|
|
164
169
|
<!-- What a form submits; the first option stands for no choice. Zag's props hide the select
|
|
165
170
|
from assistive technology, which uses the trigger. -->
|
|
166
171
|
<select {...api.getHiddenSelectProps()}>
|
|
@@ -174,7 +179,11 @@
|
|
|
174
179
|
<!-- Takes a press outside, which then only closes the list. The focus stays in the list
|
|
175
180
|
until the list hands it back to the field. -->
|
|
176
181
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
177
|
-
<div
|
|
182
|
+
<div
|
|
183
|
+
class="xds-select__underlay"
|
|
184
|
+
style:--layer-index={underlayLayerStyle(api.getPositionerProps().style)?.["--layer-index"]}
|
|
185
|
+
onmousedown={(event) => event.preventDefault()}
|
|
186
|
+
></div>
|
|
178
187
|
{/if}
|
|
179
188
|
<div {...api.getPositionerProps()} bind:this={positioner} class="xds-select__positioner">
|
|
180
189
|
<!-- Shown until its exit animation ends; Zag would hide it as it closes. -->
|
package/dist/Skeleton.svelte
CHANGED
|
@@ -23,12 +23,20 @@
|
|
|
23
23
|
const shape = $derived(ownShape ?? defaults().shape);
|
|
24
24
|
|
|
25
25
|
const box = $derived(skeletonSize({ shape, width, height }));
|
|
26
|
+
// The app's `style` comes after the computed box dimensions so it wins when overriding width/height.
|
|
27
|
+
const combinedStyle = $derived(
|
|
28
|
+
[
|
|
29
|
+
box.width !== undefined ? `width:${box.width}` : "",
|
|
30
|
+
box.height !== undefined ? `height:${box.height}` : "",
|
|
31
|
+
style ?? "",
|
|
32
|
+
]
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(";"),
|
|
35
|
+
);
|
|
26
36
|
</script>
|
|
27
37
|
|
|
28
38
|
<span
|
|
29
39
|
aria-hidden="true"
|
|
30
40
|
class={classes(rootPart("Skeleton"), skeletonClass(shape), className)}
|
|
31
|
-
{
|
|
32
|
-
style:width={box.width}
|
|
33
|
-
style:height={box.height}
|
|
41
|
+
style={combinedStyle || undefined}
|
|
34
42
|
></span>
|
package/dist/Slider.svelte
CHANGED
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
step = 1,
|
|
36
36
|
disabled,
|
|
37
37
|
showValue,
|
|
38
|
+
name,
|
|
39
|
+
locale,
|
|
38
40
|
onChange,
|
|
39
41
|
class: className,
|
|
40
42
|
style,
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
const pageSize = $derived(sliderPageSize({ min, max, step }));
|
|
45
47
|
const service = useMachine(slider.machine, () => ({
|
|
46
48
|
id,
|
|
49
|
+
name,
|
|
47
50
|
value: [value],
|
|
48
51
|
// One thumb, so one number.
|
|
49
52
|
onValueChange: (details: slider.ValueChangeDetails) => onChange(details.value[0] ?? min),
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
disabled,
|
|
55
58
|
// The thumb's center is on the value, at the ends too; the band is inset to make room.
|
|
56
59
|
thumbAlignment: "center" as const,
|
|
57
|
-
getAriaValueText: (details: { value: number }) => sliderValueText(details.value),
|
|
60
|
+
getAriaValueText: (details: { value: number }) => sliderValueText(details.value, locale),
|
|
58
61
|
}));
|
|
59
62
|
const api = $derived(slider.connect(service, normalizeProps));
|
|
60
63
|
let thumbElement = $state<HTMLDivElement>();
|
|
@@ -70,7 +73,10 @@
|
|
|
70
73
|
step,
|
|
71
74
|
pageSize,
|
|
72
75
|
});
|
|
73
|
-
if (next !== undefined)
|
|
76
|
+
if (next !== undefined) {
|
|
77
|
+
event.preventDefault();
|
|
78
|
+
api.setThumbValue(0, next);
|
|
79
|
+
}
|
|
74
80
|
},
|
|
75
81
|
}),
|
|
76
82
|
);
|
|
@@ -97,7 +103,7 @@
|
|
|
97
103
|
{#if showValue}
|
|
98
104
|
<!-- Read when asked for, not at every step: the slider itself announces its value. -->
|
|
99
105
|
<output {...api.getValueTextProps()} aria-live="off" class="xds-slider__output"
|
|
100
|
-
>{sliderValueText(api.value[0] ?? value)}</output
|
|
106
|
+
>{sliderValueText(api.value[0] ?? value, locale)}</output
|
|
101
107
|
>
|
|
102
108
|
{/if}
|
|
103
109
|
<div {...control} class="xds-slider__control">
|
package/dist/TextField.svelte
CHANGED
|
@@ -68,6 +68,10 @@
|
|
|
68
68
|
if (untrack(() => autoFocus)) input.focus();
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
+
const syncValidity: Attachment<HTMLInputElement | HTMLTextAreaElement> = (input) => {
|
|
72
|
+
input.setCustomValidity(error ?? "");
|
|
73
|
+
};
|
|
74
|
+
|
|
71
75
|
function oninput(event: Event & { currentTarget: HTMLInputElement | HTMLTextAreaElement }) {
|
|
72
76
|
onChange(event.currentTarget.value);
|
|
73
77
|
// While a composition is open the text belongs to the input method; it ends with
|
|
@@ -88,6 +92,7 @@
|
|
|
88
92
|
{#if multiline}
|
|
89
93
|
<textarea
|
|
90
94
|
{@attach settle}
|
|
95
|
+
{@attach syncValidity}
|
|
91
96
|
{rows}
|
|
92
97
|
{id}
|
|
93
98
|
class={box ? "xds-text-field__input xds-text-field__control" : "xds-text-field__input"}
|
|
@@ -108,6 +113,7 @@
|
|
|
108
113
|
{:else}
|
|
109
114
|
<input
|
|
110
115
|
{@attach settle}
|
|
116
|
+
{@attach syncValidity}
|
|
111
117
|
{type}
|
|
112
118
|
{id}
|
|
113
119
|
class={box ? "xds-text-field__input xds-text-field__control" : "xds-text-field__input"}
|
package/dist/Thumbnail.svelte
CHANGED
package/dist/Toast.svelte
CHANGED
|
@@ -20,19 +20,12 @@
|
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import { motion } from "@xds/tokens";
|
|
23
|
-
import { classes, rootPart, TOAST_PARTS } from "@xds/core";
|
|
23
|
+
import { classes, readCssMs, rootPart, TOAST_PARTS } from "@xds/core";
|
|
24
24
|
import type { Attachment } from "svelte/attachments";
|
|
25
25
|
|
|
26
|
-
let {
|
|
27
|
-
open,
|
|
28
|
-
message,
|
|
29
|
-
action,
|
|
30
|
-
duration = motion.duration.toast,
|
|
31
|
-
onClose,
|
|
32
|
-
class: className,
|
|
33
|
-
style,
|
|
34
|
-
}: ToastProps = $props();
|
|
26
|
+
let { open, message, action, duration, onClose, class: className, style }: ToastProps = $props();
|
|
35
27
|
|
|
28
|
+
let regionElement = $state<HTMLDivElement>();
|
|
36
29
|
// The toast the pointer is over and the one focus is in. A toast that closed under the pointer
|
|
37
30
|
// gets no event to say that the pointer left, so only one still in the page counts.
|
|
38
31
|
let hovered = $state<Element>();
|
|
@@ -42,15 +35,22 @@
|
|
|
42
35
|
// The region is in the top layer for as long as the component is mounted, empty or not: a
|
|
43
36
|
// screen reader only announces what is added to a region it already knows.
|
|
44
37
|
const showRegion: Attachment<HTMLDivElement> = (region) => {
|
|
38
|
+
regionElement = region;
|
|
45
39
|
if (!region.showPopover) return;
|
|
46
40
|
region.showPopover();
|
|
47
|
-
return () =>
|
|
41
|
+
return () => {
|
|
42
|
+
if (region.isConnected && region.matches(":popover-open")) region.hidePopover();
|
|
43
|
+
};
|
|
48
44
|
};
|
|
49
45
|
|
|
50
46
|
$effect(() => {
|
|
51
|
-
|
|
47
|
+
// Touch `message` so a replacement toast restarts the timer.
|
|
48
|
+
void message;
|
|
49
|
+
const ms =
|
|
50
|
+
duration ?? readCssMs(regionElement, "--xds-motion-duration-toast", motion.duration.toast);
|
|
51
|
+
if (!open || inPage(hovered) || inPage(focused) || ms <= 0) return;
|
|
52
52
|
// `onClose` is read when the time is up, so a new function does not restart it.
|
|
53
|
-
const timer = setTimeout(() => onClose(),
|
|
53
|
+
const timer = setTimeout(() => onClose(), ms);
|
|
54
54
|
return () => clearTimeout(timer);
|
|
55
55
|
});
|
|
56
56
|
</script>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
-->
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import { motion, space } from "@xds/tokens";
|
|
9
|
-
import { classes } from "@xds/core";
|
|
9
|
+
import { classes, readCssMs, readCssPx } from "@xds/core";
|
|
10
10
|
import { mergeProps, normalizeProps, useMachine } from "@zag-js/svelte";
|
|
11
11
|
import * as tooltip from "@zag-js/tooltip";
|
|
12
12
|
import type { Snippet } from "svelte";
|
|
@@ -32,13 +32,17 @@
|
|
|
32
32
|
const id = $props.id();
|
|
33
33
|
const service = useMachine(tooltip.machine, () => ({
|
|
34
34
|
id,
|
|
35
|
-
openDelay:
|
|
35
|
+
openDelay: readCssMs(
|
|
36
|
+
null,
|
|
37
|
+
"--xds-motion-duration-tooltip-delay",
|
|
38
|
+
motion.duration.tooltipDelay,
|
|
39
|
+
),
|
|
36
40
|
closeDelay: 0,
|
|
37
41
|
// It stays and follows its control when the page scrolls, for as long as the control keeps
|
|
38
42
|
// focus or the pointer. Tabbing to a control out of view scrolls the page, and a tooltip
|
|
39
43
|
// closed by that scroll would never show for it.
|
|
40
44
|
closeOnScroll: false,
|
|
41
|
-
positioning: { placement: placement(), gutter: space[1] },
|
|
45
|
+
positioning: { placement: placement(), gutter: readCssPx(null, "--xds-space-1", space[1]) },
|
|
42
46
|
}));
|
|
43
47
|
const api = $derived(tooltip.connect(service, normalizeProps));
|
|
44
48
|
provideTrigger(() => api.getTriggerProps() as TriggerProps);
|
package/dist/picture.svelte.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import type { Attachment } from "svelte/attachments";
|
|
1
2
|
/**
|
|
2
3
|
* Follows the loading of the picture at `src()`. `loaded()` is undefined while it loads, then
|
|
3
4
|
* true or false. The result is remembered with the address it belongs to, so a new `src` starts
|
|
4
5
|
* over without an effect.
|
|
5
|
-
*
|
|
6
|
-
* A picture that is in the cache still reports its load in a later task, after the handlers
|
|
7
|
-
* are attached, so no check of `complete` is needed on a page rendered in the browser.
|
|
8
6
|
*/
|
|
9
7
|
export declare function createPicture(src: () => string | undefined): {
|
|
10
8
|
loaded: () => boolean | undefined;
|
|
9
|
+
sync: (address: string) => Attachment<HTMLImageElement>;
|
|
11
10
|
onLoad: (address: string) => {
|
|
12
11
|
src: string;
|
|
13
12
|
loaded: true;
|
package/dist/picture.svelte.js
CHANGED
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
* Follows the loading of the picture at `src()`. `loaded()` is undefined while it loads, then
|
|
4
4
|
* true or false. The result is remembered with the address it belongs to, so a new `src` starts
|
|
5
5
|
* over without an effect.
|
|
6
|
-
*
|
|
7
|
-
* A picture that is in the cache still reports its load in a later task, after the handlers
|
|
8
|
-
* are attached, so no check of `complete` is needed on a page rendered in the browser.
|
|
9
6
|
*/
|
|
10
7
|
export function createPicture(src) {
|
|
11
8
|
let picture = $state.raw();
|
|
12
9
|
const loaded = $derived(picture !== undefined && picture.src === src() ? picture.loaded : undefined);
|
|
13
10
|
return {
|
|
14
11
|
loaded: () => loaded,
|
|
12
|
+
// On a page rendered by a server the picture can finish loading or fail before Svelte listens.
|
|
13
|
+
sync: (address) => (image) => {
|
|
14
|
+
// An image without its `src` yet reports `complete` too.
|
|
15
|
+
if (image.getAttribute("src") === address && image.complete && loaded === undefined) {
|
|
16
|
+
picture = { src: address, loaded: image.naturalWidth > 0 };
|
|
17
|
+
}
|
|
18
|
+
},
|
|
15
19
|
onLoad: (address) => (picture = { src: address, loaded: true }),
|
|
16
20
|
onError: (address) => (picture = { src: address, loaded: false }),
|
|
17
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xds/svelte",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "The xds design system's components for Svelte.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"page.css"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@xds/tokens": "1.0.
|
|
47
|
-
"@xds/core": "1.0.
|
|
46
|
+
"@xds/tokens": "1.0.1",
|
|
47
|
+
"@xds/core": "1.0.1",
|
|
48
48
|
"@internationalized/date": "3.12.4",
|
|
49
49
|
"@zag-js/accordion": "2.0.0-next.4",
|
|
50
50
|
"@zag-js/aria-hidden": "2.0.0-next.4",
|
package/styles.css
CHANGED
|
@@ -153,6 +153,9 @@
|
|
|
153
153
|
.block {
|
|
154
154
|
display: block;
|
|
155
155
|
}
|
|
156
|
+
.contents {
|
|
157
|
+
display: contents;
|
|
158
|
+
}
|
|
156
159
|
.flex {
|
|
157
160
|
display: flex;
|
|
158
161
|
}
|
|
@@ -1855,11 +1858,11 @@
|
|
|
1855
1858
|
.xds-button:active {
|
|
1856
1859
|
background-color: var(--button-bg-pressed);
|
|
1857
1860
|
}
|
|
1858
|
-
.xds-button:active:not(:disabled) {
|
|
1861
|
+
.xds-button:active:not(:disabled):not([data-pending]) {
|
|
1859
1862
|
transform: scale(var(--xds-motion-press-scale));
|
|
1860
1863
|
}
|
|
1861
1864
|
@media (prefers-reduced-motion: reduce) {
|
|
1862
|
-
.xds-button:active:not(:disabled) {
|
|
1865
|
+
.xds-button:active:not(:disabled):not([data-pending]) {
|
|
1863
1866
|
transform: none;
|
|
1864
1867
|
}
|
|
1865
1868
|
}
|
|
@@ -1972,7 +1975,7 @@
|
|
|
1972
1975
|
.xds-date-picker__underlay {
|
|
1973
1976
|
position: fixed;
|
|
1974
1977
|
inset: 0;
|
|
1975
|
-
z-index: var(--xds-layer-overlay);
|
|
1978
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1976
1979
|
}
|
|
1977
1980
|
.xds-date-picker__positioner {
|
|
1978
1981
|
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
@@ -2294,7 +2297,7 @@
|
|
|
2294
2297
|
.xds-menu__underlay {
|
|
2295
2298
|
position: fixed;
|
|
2296
2299
|
inset: 0;
|
|
2297
|
-
z-index: var(--xds-layer-overlay);
|
|
2300
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
2298
2301
|
}
|
|
2299
2302
|
.xds-menu__positioner {
|
|
2300
2303
|
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
@@ -2585,6 +2588,9 @@
|
|
|
2585
2588
|
align-items: baseline;
|
|
2586
2589
|
gap: var(--xds-space-3);
|
|
2587
2590
|
}
|
|
2591
|
+
.xds-select__footer:not(:has(> :not(:empty))), .xds-date-picker__footer:not(:has(> :not(:empty))) {
|
|
2592
|
+
position: absolute;
|
|
2593
|
+
}
|
|
2588
2594
|
.xds-select__description, .xds-select__error, .xds-date-picker__description, .xds-date-picker__error {
|
|
2589
2595
|
font-size: var(--xds-typography-detail-size);
|
|
2590
2596
|
line-height: var(--xds-typography-detail-line-height);
|
|
@@ -2596,10 +2602,13 @@
|
|
|
2596
2602
|
.xds-select__error, .xds-date-picker__error {
|
|
2597
2603
|
color: var(--xds-color-status-danger);
|
|
2598
2604
|
}
|
|
2605
|
+
.xds-select__error:empty, .xds-date-picker__error:empty {
|
|
2606
|
+
position: absolute;
|
|
2607
|
+
}
|
|
2599
2608
|
.xds-select__underlay {
|
|
2600
2609
|
position: fixed;
|
|
2601
2610
|
inset: 0;
|
|
2602
|
-
z-index: var(--xds-layer-overlay);
|
|
2611
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
2603
2612
|
}
|
|
2604
2613
|
.xds-select__positioner {
|
|
2605
2614
|
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
@@ -2921,13 +2930,8 @@
|
|
|
2921
2930
|
box-shadow: inset 0 0 0 var(--xds-border-width-thin) var(--xds-color-field-border-invalid);
|
|
2922
2931
|
outline: var(--xds-border-width-thin) solid var(--xds-color-danger-default);
|
|
2923
2932
|
}
|
|
2924
|
-
.xds-text-field__control[aria-invalid="true"]:focus {
|
|
2925
|
-
box-shadow: none;
|
|
2926
|
-
}
|
|
2927
|
-
.xds-text-field__control:has(> .xds-text-field__input[aria-invalid="true"]:focus) {
|
|
2928
|
-
border-color: var(--xds-color-field-border-focus);
|
|
2933
|
+
.xds-text-field__control[aria-invalid="true"]:focus, .xds-text-field__control:has(> .xds-text-field__input[aria-invalid="true"]:focus) {
|
|
2929
2934
|
box-shadow: none;
|
|
2930
|
-
outline-style: none;
|
|
2931
2935
|
}
|
|
2932
2936
|
@media (hover: hover) {
|
|
2933
2937
|
.xds-text-field__control:hover:not(:focus, :has(:focus)) {
|
package/tailwind.css
CHANGED
|
@@ -907,12 +907,12 @@
|
|
|
907
907
|
}
|
|
908
908
|
|
|
909
909
|
/* A press shrinks the button a little: feedback that does not depend on color. */
|
|
910
|
-
.xds-button:active:not(:disabled) {
|
|
910
|
+
.xds-button:active:not(:disabled):not([data-pending]) {
|
|
911
911
|
transform: scale(var(--xds-motion-press-scale));
|
|
912
912
|
}
|
|
913
913
|
|
|
914
914
|
@media (prefers-reduced-motion: reduce) {
|
|
915
|
-
.xds-button:active:not(:disabled) {
|
|
915
|
+
.xds-button:active:not(:disabled):not([data-pending]) {
|
|
916
916
|
transform: none;
|
|
917
917
|
}
|
|
918
918
|
}
|
|
@@ -1094,7 +1094,7 @@
|
|
|
1094
1094
|
.xds-date-picker__underlay {
|
|
1095
1095
|
position: fixed;
|
|
1096
1096
|
inset: 0;
|
|
1097
|
-
z-index: var(--xds-layer-overlay);
|
|
1097
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
1100
|
.xds-date-picker__positioner {
|
|
@@ -1563,7 +1563,7 @@
|
|
|
1563
1563
|
.xds-menu__underlay {
|
|
1564
1564
|
position: fixed;
|
|
1565
1565
|
inset: 0;
|
|
1566
|
-
z-index: var(--xds-layer-overlay);
|
|
1566
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1567
1567
|
}
|
|
1568
1568
|
|
|
1569
1569
|
.xds-menu__positioner {
|
|
@@ -1956,7 +1956,8 @@
|
|
|
1956
1956
|
color: var(--xds-color-field-placeholder);
|
|
1957
1957
|
}
|
|
1958
1958
|
|
|
1959
|
-
/* One line under the box, as under a TextField: the help or the error.
|
|
1959
|
+
/* One line under the box, as under a TextField: the help or the error. When nothing is shown
|
|
1960
|
+
the line takes no room so the empty live error region stays mounted without shifting layout. */
|
|
1960
1961
|
.xds-select__footer,
|
|
1961
1962
|
.xds-date-picker__footer {
|
|
1962
1963
|
display: flex;
|
|
@@ -1964,6 +1965,11 @@
|
|
|
1964
1965
|
gap: var(--xds-space-3);
|
|
1965
1966
|
}
|
|
1966
1967
|
|
|
1968
|
+
.xds-select__footer:not(:has(> :not(:empty))),
|
|
1969
|
+
.xds-date-picker__footer:not(:has(> :not(:empty))) {
|
|
1970
|
+
position: absolute;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1967
1973
|
.xds-select__description,
|
|
1968
1974
|
.xds-select__error,
|
|
1969
1975
|
.xds-date-picker__description,
|
|
@@ -1983,6 +1989,11 @@
|
|
|
1983
1989
|
color: var(--xds-color-status-danger);
|
|
1984
1990
|
}
|
|
1985
1991
|
|
|
1992
|
+
.xds-select__error:empty,
|
|
1993
|
+
.xds-date-picker__error:empty {
|
|
1994
|
+
position: absolute;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1986
1997
|
/* ------------------------------------------------------------ the list */
|
|
1987
1998
|
|
|
1988
1999
|
/* Over the page and under the open list, as under a Menu: a press outside only closes the
|
|
@@ -1990,7 +2001,7 @@
|
|
|
1990
2001
|
.xds-select__underlay {
|
|
1991
2002
|
position: fixed;
|
|
1992
2003
|
inset: 0;
|
|
1993
|
-
z-index: var(--xds-layer-overlay);
|
|
2004
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1994
2005
|
}
|
|
1995
2006
|
|
|
1996
2007
|
/* Zag sets the position, and the width: exactly the field's, however short the options. */
|
|
@@ -2415,15 +2426,11 @@
|
|
|
2415
2426
|
outline: var(--xds-border-width-thin) solid var(--xds-color-danger-default);
|
|
2416
2427
|
}
|
|
2417
2428
|
|
|
2418
|
-
/* Focused, an invalid field keeps its red border
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2429
|
+
/* Focused, an invalid field keeps its red border and outline (dropping only the inset line),
|
|
2430
|
+
whether plain or grouped with leading/trailing slots. */
|
|
2431
|
+
.xds-text-field__control[aria-invalid="true"]:focus,
|
|
2423
2432
|
.xds-text-field__control:has(> .xds-text-field__input[aria-invalid="true"]:focus) {
|
|
2424
|
-
border-color: var(--xds-color-field-border-focus);
|
|
2425
2433
|
box-shadow: none;
|
|
2426
|
-
outline-style: none;
|
|
2427
2434
|
}
|
|
2428
2435
|
|
|
2429
2436
|
/* After the error, which it outranks. */
|
|
@@ -2662,4 +2669,4 @@
|
|
|
2662
2669
|
|
|
2663
2670
|
}
|
|
2664
2671
|
|
|
2665
|
-
@source inline("*:opacity-0 -m-1 -me-1 -mt-4 -mx-4 -mx-6 -my-2 [&::-webkit-scrollbar]:hidden [&:popover-open]:flex [scrollbar-width:none] absolute active:bg-xds-card-background-pressed active:bg-xds-list-row-background-pressed active:bg-xds-list-row-background-selected-hover after:-inset-(--xds-border-width-thin) after:absolute after:border-(length:--xds-border-width-thick) after:border-xds-card-border-selected after:pointer-events-none after:rounded-xds-lg animate-[xds-skeleton-pulse_var(--xds-motion-duration-pulse)_var(--xds-motion-easing-standard)_infinite] animate-[xds-toast-enter_var(--xds-motion-duration-normal)_var(--xds-motion-easing-enter)] animate-spin aspect-[4/3] aspect-[9/16] aspect-square aspect-video before:-translate-y-1/2 before:absolute before:h-[max(100%,var(--xds-size-target-min))] before:inset-x-0 before:top-1/2 bg-xds-accent-default bg-xds-avatar-background bg-xds-avatar-overflow-background bg-xds-background-base bg-xds-background-surface bg-xds-badge-accent-background bg-xds-badge-count-background bg-xds-badge-danger-background bg-xds-badge-neutral-background bg-xds-badge-overlay-background bg-xds-badge-success-background bg-xds-badge-warning-background bg-xds-banner-danger-background bg-xds-banner-info-background bg-xds-banner-success-background bg-xds-banner-warning-background bg-xds-border-default bg-xds-chip-background bg-xds-chip-selected-background bg-xds-list-row-background-selected bg-xds-overlay-accent bg-xds-overlay-background bg-xds-progress-fill bg-xds-progress-track bg-xds-segmented-track bg-xds-sidebar-background bg-xds-sidebar-border bg-xds-skeleton-background bg-xds-switch-thumb bg-xds-switch-track bg-xds-thumbnail-background bg-xds-toast-background bg-current bg-transparent block border border-0 border-2 border-xds-border-default border-xds-border-strong border-xds-card-border-selected border-xds-checkbox-border border-xds-chip-selected-border border-xds-sidebar-border border-b border-e border-transparent bottom-0 bottom-2 bottom-[calc(var(--xds-space-1)+var(--xds-space-2))] break-all container cursor-pointer disabled:bg-xds-chip-disabled-background disabled:border-transparent disabled:cursor-not-allowed disabled:hover:bg-xds-list-row-background-selected disabled:hover:bg-transparent disabled:text-xds-chip-disabled-text duration-(--xds-motion-duration-fast) duration-(--xds-motion-duration-normal) ease-(--xds-motion-easing-standard) enabled:active:bg-xds-chip-background-pressed enabled:active:bg-xds-chip-selected-background-pressed enabled:hover:bg-xds-chip-background-hover enabled:hover:bg-xds-chip-selected-background-hover end-2 end-[calc(var(--xds-size-count-badge)/-4)] filter fixed flex flex-1 flex-col flex-wrap focus-visible:-outline-offset-(--xds-focus-offset) focus-visible:outline-(length:--xds-focus-width) focus-visible:outline-xds-border-focus focus-visible:outline-current focus-visible:outline-offset-(--xds-focus-offset) focus-visible:outline-solid gap-0.5 gap-1 gap-1.5 gap-12 gap-2 gap-3 gap-4 gap-6 gap-8 gap-x-8 gap-y-6 grid grid-cols-2 grid-cols-[repeat(auto-fill,minmax(8rem,1fr))] group-aria-expanded:rotate-180 h-(--xds-border-width-thin) h-(--xds-space-1) h-(--xds-typography-body-size) h-24 h-28 h-[28rem] h-xds-badge h-xds-chip h-xds-control-md h-xds-count-badge h-xds-progress h-xds-switch-height h-full h-lh h-px has-disabled:cursor-not-allowed hidden hover:bg-xds-card-background-hover hover:bg-xds-control-default hover:bg-xds-list-row-background-hover hover:bg-xds-list-row-background-selected-hover hover:text-xds-field-text hover:text-xds-text-primary hover:underline inline-flex inset-0 inset-x-0 invisible items-center items-end items-start justify-between justify-center line-clamp-2 m-0 m-auto max-w-4xl max-w-xds-dialog max-w-xds-toast max-w-md max-w-none max-w-sm max-w-xs mb-2 mb-4 min-h-0 min-h-[calc(var(--xds-size-target-min)+var(--xds-space-2))] min-h-xds-list-row min-h-xds-list-row-compact min-h-xds-target-min min-w-0 min-w-xds-count-badge min-w-xds-target-min motion-reduce:animate-none motion-reduce:animate-pulse motion-reduce:transition-none ms-auto mt-0.5 mt-2 mt-4 mt-6 mx-2 mx-auto not-first:ms-[calc(var(--xds-size-avatar-lg)/-4)] not-first:ms-[calc(var(--xds-size-avatar-md)/-4)] not-first:ms-[calc(var(--xds-size-avatar-sm)/-4)] not-first:ms-[calc(var(--xds-size-avatar-xl)/-4)] object-cover outline outline-(length:--xds-border-width-thick) outline-xds-avatar-ring outline-solid overflow-hidden overflow-visible overflow-x-auto overflow-y-auto p-0.5 p-1 p-2 p-3 p-4 p-6 pb-1 pb-[calc(var(--xds-space-4)+env(safe-area-inset-bottom))] peer-checked:*:opacity-100 peer-checked:*:translate-x-[calc(var(--xds-size-switch-width)-var(--xds-size-switch-height))] peer-checked:bg-xds-checkbox-background-checked peer-checked:bg-xds-segmented-selected-background peer-checked:bg-xds-switch-track-on peer-checked:border-0 peer-checked:border-xds-segmented-selected-border peer-checked:shadow-xds-subtle peer-checked:text-xds-segmented-selected-text peer-disabled:*:bg-xds-switch-disabled-thumb peer-disabled:bg-xds-checkbox-disabled-background peer-disabled:bg-xds-switch-disabled-track peer-disabled:border-0 peer-disabled:text-xds-checkbox-disabled-mark peer-disabled:text-xds-text-secondary peer-focus-visible:outline-(length:--xds-focus-width) peer-focus-visible:outline-xds-border-focus peer-focus-visible:outline-offset-(--xds-focus-offset) peer-focus-visible:outline-solid pointer-events-auto pointer-events-none ps-3 px-1 px-2 px-2.5 px-3 px-4 px-6 py-1 py-2 py-3 py-8 relative ring rounded-[calc(var(--xds-radius-lg)-var(--xds-border-width-thin))] rounded-[calc(var(--xds-radius-md)-2px)] rounded-xds-full rounded-xds-lg rounded-xds-md rounded-xds-sm rounded-full rounded-t-[calc(var(--xds-radius-lg)-var(--xds-border-width-thin))] rtl:-scale-x-100 scroll-mt-20 select-none self-center shadow shadow-xds-raised shadow-xds-subtle shrink-0 size-1.5 size-12 size-3/4 size-8 size-xds-avatar-lg size-xds-avatar-md size-xds-avatar-sm size-xds-avatar-xl size-xds-checkbox size-xds-icon-lg size-xds-icon-md size-xds-icon-sm size-xds-icon-xl size-xds-icon-xs size-xds-spinner-lg size-xds-spinner-md size-xds-spinner-sm size-xds-target-min size-full sm:grid-cols-2 sm:grid-cols-3 sm:grid-cols-4 sm:grid-cols-5 sr-only start-2 sticky table tabular-nums text-xds-accordion-icon text-xds-avatar-overflow-text text-xds-avatar-text text-xds-badge-accent-text text-xds-badge-count-text text-xds-badge-danger-text text-xds-badge-neutral-text text-xds-badge-overlay-text text-xds-badge-success-text text-xds-badge-warning-text text-xds-banner-danger-accent text-xds-banner-info-accent text-xds-banner-success-accent text-xds-banner-text text-xds-banner-warning-accent text-xds-body text-xds-body-strong text-xds-checkbox-mark text-xds-chip-selected-text text-xds-chip-text text-xds-detail text-xds-display text-xds-empty-state-icon text-xds-field-placeholder text-xds-footnote text-xds-heading text-xds-label text-xds-segmented-text text-xds-sidebar-section-title text-xds-status-danger text-xds-status-success text-xds-status-warning text-xds-text-accent text-xds-text-on-accent text-xds-text-primary text-xds-text-secondary text-xds-text-tertiary text-xds-thumbnail-icon text-xds-title text-xds-toast-action text-xds-toast-text text-center text-start top-0 top-2 top-[calc(var(--xds-size-count-badge)/-4)] top-auto transition-[width] transition-colors transition-transform truncate underline visible w-16 w-2/5 w-24 w-28 w-36 w-48 w-xds-sidebar w-xds-sidebar-rail w-xds-switch-width w-fit w-full whitespace-nowrap z-10");
|
|
2672
|
+
@source inline("*:opacity-0 -m-1 -me-1 -mt-4 -mx-4 -mx-6 -my-2 [&::-webkit-scrollbar]:hidden [&:popover-open]:flex [scrollbar-width:none] absolute active:bg-xds-card-background-pressed active:bg-xds-list-row-background-pressed active:bg-xds-list-row-background-selected-hover after:-inset-(--xds-border-width-thin) after:absolute after:border-(length:--xds-border-width-thick) after:border-xds-card-border-selected after:pointer-events-none after:rounded-xds-lg animate-[xds-skeleton-pulse_var(--xds-motion-duration-pulse)_var(--xds-motion-easing-standard)_infinite] animate-[xds-toast-enter_var(--xds-motion-duration-normal)_var(--xds-motion-easing-enter)] animate-spin aspect-[4/3] aspect-[9/16] aspect-square aspect-video before:-translate-y-1/2 before:absolute before:h-[max(100%,var(--xds-size-target-min))] before:inset-x-0 before:top-1/2 bg-xds-accent-default bg-xds-avatar-background bg-xds-avatar-overflow-background bg-xds-background-base bg-xds-background-surface bg-xds-badge-accent-background bg-xds-badge-count-background bg-xds-badge-danger-background bg-xds-badge-neutral-background bg-xds-badge-overlay-background bg-xds-badge-success-background bg-xds-badge-warning-background bg-xds-banner-danger-background bg-xds-banner-info-background bg-xds-banner-success-background bg-xds-banner-warning-background bg-xds-border-default bg-xds-chip-background bg-xds-chip-selected-background bg-xds-list-row-background-selected bg-xds-overlay-accent bg-xds-overlay-background bg-xds-progress-fill bg-xds-progress-track bg-xds-segmented-track bg-xds-sidebar-background bg-xds-sidebar-border bg-xds-skeleton-background bg-xds-switch-thumb bg-xds-switch-track bg-xds-thumbnail-background bg-xds-toast-background bg-current bg-transparent block border border-0 border-2 border-xds-border-default border-xds-border-strong border-xds-card-border-selected border-xds-checkbox-border border-xds-chip-selected-border border-xds-sidebar-border border-b border-e border-transparent bottom-0 bottom-2 bottom-[calc(var(--xds-space-1)+var(--xds-space-2))] break-all container contents cursor-pointer disabled:bg-xds-chip-disabled-background disabled:border-transparent disabled:cursor-not-allowed disabled:hover:bg-xds-list-row-background-selected disabled:hover:bg-transparent disabled:text-xds-chip-disabled-text duration-(--xds-motion-duration-fast) duration-(--xds-motion-duration-normal) ease-(--xds-motion-easing-standard) enabled:active:bg-xds-chip-background-pressed enabled:active:bg-xds-chip-selected-background-pressed enabled:hover:bg-xds-chip-background-hover enabled:hover:bg-xds-chip-selected-background-hover end-2 end-[calc(var(--xds-size-count-badge)/-4)] filter fixed flex flex-1 flex-col flex-wrap focus-visible:-outline-offset-(--xds-focus-offset) focus-visible:outline-(length:--xds-focus-width) focus-visible:outline-xds-border-focus focus-visible:outline-current focus-visible:outline-offset-(--xds-focus-offset) focus-visible:outline-solid gap-0.5 gap-1 gap-1.5 gap-12 gap-2 gap-3 gap-4 gap-6 gap-8 gap-x-8 gap-y-6 grid grid-cols-2 grid-cols-[repeat(auto-fill,minmax(8rem,1fr))] group-aria-expanded:rotate-180 h-(--xds-border-width-thin) h-(--xds-space-1) h-(--xds-typography-body-size) h-24 h-28 h-[28rem] h-xds-badge h-xds-chip h-xds-control-md h-xds-count-badge h-xds-progress h-xds-switch-height h-full h-lh h-px has-disabled:cursor-not-allowed hidden hover:bg-xds-card-background-hover hover:bg-xds-control-default hover:bg-xds-list-row-background-hover hover:bg-xds-list-row-background-selected-hover hover:text-xds-field-text hover:text-xds-text-primary hover:underline inline-flex inset-0 inset-x-0 invisible items-center items-end items-start justify-between justify-center line-clamp-2 m-0 m-auto max-w-4xl max-w-xds-dialog max-w-xds-toast max-w-md max-w-none max-w-sm max-w-xs mb-2 mb-4 min-h-0 min-h-[calc(var(--xds-size-target-min)+var(--xds-space-2))] min-h-xds-list-row min-h-xds-list-row-compact min-h-xds-target-min min-w-0 min-w-xds-count-badge min-w-xds-target-min motion-reduce:animate-none motion-reduce:animate-pulse motion-reduce:transition-none ms-auto mt-0.5 mt-2 mt-4 mt-6 mx-2 mx-auto not-first:ms-[calc(var(--xds-size-avatar-lg)/-4)] not-first:ms-[calc(var(--xds-size-avatar-md)/-4)] not-first:ms-[calc(var(--xds-size-avatar-sm)/-4)] not-first:ms-[calc(var(--xds-size-avatar-xl)/-4)] object-cover outline outline-(length:--xds-border-width-thick) outline-xds-avatar-ring outline-solid overflow-hidden overflow-visible overflow-x-auto overflow-y-auto p-0.5 p-1 p-2 p-3 p-4 p-6 pb-1 pb-[calc(var(--xds-space-4)+env(safe-area-inset-bottom))] peer-checked:*:opacity-100 peer-checked:*:translate-x-[calc(var(--xds-size-switch-width)-var(--xds-size-switch-height))] peer-checked:bg-xds-checkbox-background-checked peer-checked:bg-xds-segmented-selected-background peer-checked:bg-xds-switch-track-on peer-checked:border-0 peer-checked:border-xds-segmented-selected-border peer-checked:shadow-xds-subtle peer-checked:text-xds-segmented-selected-text peer-disabled:*:bg-xds-switch-disabled-thumb peer-disabled:bg-xds-checkbox-disabled-background peer-disabled:bg-xds-switch-disabled-track peer-disabled:border-0 peer-disabled:text-xds-checkbox-disabled-mark peer-disabled:text-xds-text-secondary peer-focus-visible:outline-(length:--xds-focus-width) peer-focus-visible:outline-xds-border-focus peer-focus-visible:outline-offset-(--xds-focus-offset) peer-focus-visible:outline-solid pointer-events-auto pointer-events-none ps-3 px-1 px-2 px-2.5 px-3 px-4 px-6 py-1 py-2 py-3 py-8 relative ring rounded-[calc(var(--xds-radius-lg)-var(--xds-border-width-thin))] rounded-[calc(var(--xds-radius-md)-2px)] rounded-xds-full rounded-xds-lg rounded-xds-md rounded-xds-sm rounded-full rounded-t-[calc(var(--xds-radius-lg)-var(--xds-border-width-thin))] rtl:-scale-x-100 scroll-mt-20 select-none self-center shadow shadow-xds-raised shadow-xds-subtle shrink-0 size-1.5 size-12 size-3/4 size-8 size-xds-avatar-lg size-xds-avatar-md size-xds-avatar-sm size-xds-avatar-xl size-xds-checkbox size-xds-icon-lg size-xds-icon-md size-xds-icon-sm size-xds-icon-xl size-xds-icon-xs size-xds-spinner-lg size-xds-spinner-md size-xds-spinner-sm size-xds-target-min size-full sm:grid-cols-2 sm:grid-cols-3 sm:grid-cols-4 sm:grid-cols-5 sr-only start-2 sticky table tabular-nums text-xds-accordion-icon text-xds-avatar-overflow-text text-xds-avatar-text text-xds-badge-accent-text text-xds-badge-count-text text-xds-badge-danger-text text-xds-badge-neutral-text text-xds-badge-overlay-text text-xds-badge-success-text text-xds-badge-warning-text text-xds-banner-danger-accent text-xds-banner-info-accent text-xds-banner-success-accent text-xds-banner-text text-xds-banner-warning-accent text-xds-body text-xds-body-strong text-xds-checkbox-mark text-xds-chip-selected-text text-xds-chip-text text-xds-detail text-xds-display text-xds-empty-state-icon text-xds-field-placeholder text-xds-footnote text-xds-heading text-xds-label text-xds-segmented-text text-xds-sidebar-section-title text-xds-status-danger text-xds-status-success text-xds-status-warning text-xds-text-accent text-xds-text-on-accent text-xds-text-primary text-xds-text-secondary text-xds-text-tertiary text-xds-thumbnail-icon text-xds-title text-xds-toast-action text-xds-toast-text text-center text-start top-0 top-2 top-[calc(var(--xds-size-count-badge)/-4)] top-auto transition-[width] transition-colors transition-transform truncate underline visible w-16 w-2/5 w-24 w-28 w-36 w-48 w-xds-sidebar w-xds-sidebar-rail w-xds-switch-width w-fit w-full whitespace-nowrap z-10");
|