@xds/react 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +19 -2
- package/dist/Accordion.d.ts +20 -0
- package/dist/Accordion.js +197 -0
- package/dist/Avatar.d.ts +9 -0
- package/dist/Avatar.js +69 -0
- package/dist/AvatarStack.d.ts +8 -0
- package/dist/AvatarStack.js +105 -0
- package/dist/Badge.d.ts +13 -0
- package/dist/Badge.js +66 -0
- package/dist/Banner.d.ts +23 -0
- package/dist/Banner.js +166 -0
- package/dist/Button.d.ts +14 -0
- package/dist/Button.js +159 -0
- package/dist/Card.d.ts +18 -0
- package/dist/Card.js +173 -0
- package/dist/Checkbox.d.ts +10 -0
- package/dist/Checkbox.js +140 -0
- package/dist/Chip.d.ts +12 -0
- package/dist/Chip.js +74 -0
- package/dist/ChipBar.d.ts +12 -0
- package/dist/ChipBar.js +38 -0
- package/dist/CountBadge.d.ts +12 -0
- package/dist/CountBadge.js +64 -0
- package/dist/DatePicker.d.ts +20 -0
- package/dist/DatePicker.js +429 -0
- package/dist/DateRangePicker.d.ts +24 -0
- package/dist/DateRangePicker.js +370 -0
- package/dist/Defaults.d.ts +17 -0
- package/dist/Defaults.js +48 -0
- package/dist/Dialog.d.ts +20 -0
- package/dist/Dialog.js +137 -0
- package/dist/Divider.d.ts +4 -0
- package/dist/Divider.js +31 -0
- package/dist/EmptyState.d.ts +12 -0
- package/dist/EmptyState.js +86 -0
- package/dist/Icon.d.ts +9 -0
- package/dist/Icon.js +79 -0
- package/dist/IconButton.d.ts +12 -0
- package/dist/IconButton.js +119 -0
- package/dist/ListRow.d.ts +21 -0
- package/dist/ListRow.js +185 -0
- package/dist/MediaCard.d.ts +20 -0
- package/dist/MediaCard.js +279 -0
- package/dist/Menu.d.ts +18 -0
- package/dist/Menu.js +244 -0
- package/dist/ProgressBar.d.ts +8 -0
- package/dist/ProgressBar.js +65 -0
- package/dist/RadioGroup.d.ts +15 -0
- package/dist/RadioGroup.js +176 -0
- package/dist/SearchField.d.ts +15 -0
- package/dist/SearchField.js +152 -0
- package/dist/SectionHeader.d.ts +14 -0
- package/dist/SectionHeader.js +124 -0
- package/dist/SegmentedControl.d.ts +12 -0
- package/dist/SegmentedControl.js +106 -0
- package/dist/Select.d.ts +18 -0
- package/dist/Select.js +318 -0
- package/dist/Sidebar.d.ts +21 -0
- package/dist/Sidebar.js +220 -0
- package/dist/Skeleton.d.ts +11 -0
- package/dist/Skeleton.js +64 -0
- package/dist/Slider.d.ts +13 -0
- package/dist/Slider.js +151 -0
- package/dist/Spinner.d.ts +9 -0
- package/dist/Spinner.js +97 -0
- package/dist/Switch.d.ts +13 -0
- package/dist/Switch.js +116 -0
- package/dist/Tabs.d.ts +14 -0
- package/dist/Tabs.js +137 -0
- package/dist/Text.d.ts +10 -0
- package/dist/Text.js +46 -0
- package/dist/TextField.d.ts +22 -0
- package/dist/TextField.js +213 -0
- package/dist/Thumbnail.d.ts +9 -0
- package/dist/Thumbnail.js +152 -0
- package/dist/Toast.d.ts +14 -0
- package/dist/Toast.js +121 -0
- package/dist/Tooltip.d.ts +26 -0
- package/dist/Tooltip.js +166 -0
- package/dist/base.d.ts +11 -0
- package/dist/base.js +10 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +39 -0
- package/dist/modal-popover.d.ts +7 -0
- package/dist/modal-popover.js +37 -0
- package/dist/picture.d.ts +13 -0
- package/dist/picture.js +76 -0
- package/dist/portal.d.ts +9 -0
- package/dist/portal.js +27 -0
- package/dist/presence.d.ts +6 -0
- package/dist/presence.js +34 -0
- package/dist/preview.d.ts +17 -0
- package/dist/preview.js +126 -0
- package/dist/root.d.ts +12 -0
- package/dist/root.js +1 -0
- package/dist/trigger.d.ts +24 -0
- package/dist/trigger.js +47 -0
- package/eject/files/Accordion.tsx +157 -0
- package/eject/files/Avatar.tsx +41 -0
- package/eject/files/AvatarStack.tsx +47 -0
- package/eject/files/Badge.tsx +33 -0
- package/eject/files/Banner.tsx +70 -0
- package/eject/files/Button.tsx +88 -0
- package/eject/files/Card.tsx +85 -0
- package/eject/files/Checkbox.tsx +59 -0
- package/eject/files/Chip.tsx +43 -0
- package/eject/files/ChipBar.tsx +31 -0
- package/eject/files/CountBadge.tsx +50 -0
- package/eject/files/DatePicker.tsx +192 -0
- package/eject/files/DateRangePicker.tsx +271 -0
- package/eject/files/Dialog.tsx +108 -0
- package/eject/files/Divider.tsx +13 -0
- package/eject/files/EmptyState.tsx +39 -0
- package/eject/files/Icon.tsx +38 -0
- package/eject/files/IconButton.tsx +62 -0
- package/eject/files/ListRow.tsx +86 -0
- package/eject/files/MediaCard.tsx +111 -0
- package/eject/files/Menu.tsx +168 -0
- package/eject/files/ProgressBar.tsx +34 -0
- package/eject/files/RadioGroup.tsx +112 -0
- package/eject/files/SearchField.tsx +88 -0
- package/eject/files/SectionHeader.tsx +56 -0
- package/eject/files/SegmentedControl.tsx +57 -0
- package/eject/files/Select.tsx +228 -0
- package/eject/files/Sidebar.tsx +149 -0
- package/eject/files/Skeleton.tsx +28 -0
- package/eject/files/Slider.tsx +109 -0
- package/eject/files/Spinner.tsx +36 -0
- package/eject/files/Switch.tsx +53 -0
- package/eject/files/Tabs.tsx +71 -0
- package/eject/files/Text.tsx +31 -0
- package/eject/files/TextField.tsx +122 -0
- package/eject/files/Thumbnail.tsx +66 -0
- package/eject/files/Toast.tsx +88 -0
- package/eject/files/Tooltip.tsx +120 -0
- package/eject/files/accordion.css +89 -0
- package/eject/files/accordion.ts +67 -0
- package/eject/files/avatar-stack.ts +57 -0
- package/eject/files/avatar.ts +42 -0
- package/eject/files/badge.ts +30 -0
- package/eject/files/banner.ts +68 -0
- package/eject/files/base.css +38 -0
- package/eject/files/button.css +241 -0
- package/eject/files/button.ts +106 -0
- package/eject/files/card.ts +58 -0
- package/eject/files/checkbox.ts +32 -0
- package/eject/files/chip-bar.ts +16 -0
- package/eject/files/chip.ts +35 -0
- package/eject/files/count-badge.ts +32 -0
- package/eject/files/date-picker.css +352 -0
- package/eject/files/date-picker.ts +250 -0
- package/eject/files/date-range-picker.ts +323 -0
- package/eject/files/dialog.css +139 -0
- package/eject/files/dialog.ts +15 -0
- package/eject/files/divider.ts +5 -0
- package/eject/files/empty-state.ts +22 -0
- package/eject/files/icon.ts +36 -0
- package/eject/files/list-row.ts +66 -0
- package/eject/files/media-card.ts +66 -0
- package/eject/files/menu.css +176 -0
- package/eject/files/menu.ts +84 -0
- package/eject/files/parts.ts +17 -0
- package/eject/files/progress-bar.ts +23 -0
- package/eject/files/radio-group.css +160 -0
- package/eject/files/radio-group.ts +24 -0
- package/eject/files/section-header.ts +32 -0
- package/eject/files/segmented-control.ts +30 -0
- package/eject/files/select.css +285 -0
- package/eject/files/select.ts +36 -0
- package/eject/files/sidebar.ts +75 -0
- package/eject/files/skeleton.ts +51 -0
- package/eject/files/slider.css +136 -0
- package/eject/files/slider.ts +65 -0
- package/eject/files/spinner.ts +22 -0
- package/eject/files/switch.ts +34 -0
- package/eject/files/tabs.css +112 -0
- package/eject/files/tabs.ts +35 -0
- package/eject/files/text-field.css +229 -0
- package/eject/files/text-field.ts +48 -0
- package/eject/files/text.ts +38 -0
- package/eject/files/thumbnail.ts +51 -0
- package/eject/files/toast.ts +31 -0
- package/eject/files/tooltip.css +104 -0
- package/eject/files/tooltip.ts +21 -0
- package/eject/manifest.json +814 -0
- package/package.json +66 -4
- package/page.css +20 -0
- package/styles.css +3252 -0
- package/tailwind.css +2665 -0
package/tailwind.css
ADDED
|
@@ -0,0 +1,2665 @@
|
|
|
1
|
+
/* The @xds/react stylesheet for an app that compiles it with Tailwind CSS 4.1
|
|
2
|
+
or later. Import it before Tailwind:
|
|
3
|
+
|
|
4
|
+
@import "@xds/react/tailwind.css";
|
|
5
|
+
@import "tailwindcss";
|
|
6
|
+
|
|
7
|
+
The library's layer sits between Tailwind's base and components, as its components do in
|
|
8
|
+
a scaffolded app, so the app's components and utilities win over it. */
|
|
9
|
+
@layer theme, base, xds, components, utilities;
|
|
10
|
+
@layer xds.theme, xds.base, xds.components;
|
|
11
|
+
|
|
12
|
+
@theme inline {
|
|
13
|
+
--color-xds-scrim: var(--xds-color-scrim);
|
|
14
|
+
--color-xds-background-base: var(--xds-color-background-base);
|
|
15
|
+
--color-xds-background-surface: var(--xds-color-background-surface);
|
|
16
|
+
--color-xds-background-raised: var(--xds-color-background-raised);
|
|
17
|
+
--color-xds-background-inverse: var(--xds-color-background-inverse);
|
|
18
|
+
--color-xds-background-disabled: var(--xds-color-background-disabled);
|
|
19
|
+
--color-xds-text-primary: var(--xds-color-text-primary);
|
|
20
|
+
--color-xds-text-secondary: var(--xds-color-text-secondary);
|
|
21
|
+
--color-xds-text-tertiary: var(--xds-color-text-tertiary);
|
|
22
|
+
--color-xds-text-disabled: var(--xds-color-text-disabled);
|
|
23
|
+
--color-xds-text-accent: var(--xds-color-text-accent);
|
|
24
|
+
--color-xds-text-on-accent: var(--xds-color-text-on-accent);
|
|
25
|
+
--color-xds-text-on-danger: var(--xds-color-text-on-danger);
|
|
26
|
+
--color-xds-text-on-inverse: var(--xds-color-text-on-inverse);
|
|
27
|
+
--color-xds-text-accent-on-inverse: var(--xds-color-text-accent-on-inverse);
|
|
28
|
+
--color-xds-border-default: var(--xds-color-border-default);
|
|
29
|
+
--color-xds-border-control: var(--xds-color-border-control);
|
|
30
|
+
--color-xds-border-strong: var(--xds-color-border-strong);
|
|
31
|
+
--color-xds-border-focus: var(--xds-color-border-focus);
|
|
32
|
+
--color-xds-accent-default: var(--xds-color-accent-default);
|
|
33
|
+
--color-xds-accent-hover: var(--xds-color-accent-hover);
|
|
34
|
+
--color-xds-accent-pressed: var(--xds-color-accent-pressed);
|
|
35
|
+
--color-xds-accent-subtle: var(--xds-color-accent-subtle);
|
|
36
|
+
--color-xds-accent-subtle-hover: var(--xds-color-accent-subtle-hover);
|
|
37
|
+
--color-xds-accent-subtle-pressed: var(--xds-color-accent-subtle-pressed);
|
|
38
|
+
--color-xds-control-default: var(--xds-color-control-default);
|
|
39
|
+
--color-xds-control-hover: var(--xds-color-control-hover);
|
|
40
|
+
--color-xds-control-pressed: var(--xds-color-control-pressed);
|
|
41
|
+
--color-xds-danger-default: var(--xds-color-danger-default);
|
|
42
|
+
--color-xds-danger-hover: var(--xds-color-danger-hover);
|
|
43
|
+
--color-xds-danger-pressed: var(--xds-color-danger-pressed);
|
|
44
|
+
--color-xds-status-danger: var(--xds-color-status-danger);
|
|
45
|
+
--color-xds-status-danger-subtle: var(--xds-color-status-danger-subtle);
|
|
46
|
+
--color-xds-status-success: var(--xds-color-status-success);
|
|
47
|
+
--color-xds-status-success-subtle: var(--xds-color-status-success-subtle);
|
|
48
|
+
--color-xds-status-warning: var(--xds-color-status-warning);
|
|
49
|
+
--color-xds-status-warning-subtle: var(--xds-color-status-warning-subtle);
|
|
50
|
+
--color-xds-status-info: var(--xds-color-status-info);
|
|
51
|
+
--color-xds-status-info-subtle: var(--xds-color-status-info-subtle);
|
|
52
|
+
--color-xds-overlay-background: var(--xds-color-overlay-background);
|
|
53
|
+
--color-xds-overlay-text: var(--xds-color-overlay-text);
|
|
54
|
+
--color-xds-overlay-accent: var(--xds-color-overlay-accent);
|
|
55
|
+
--color-xds-glass-tint: var(--xds-color-glass-tint);
|
|
56
|
+
--color-xds-glass-tint-strong: var(--xds-color-glass-tint-strong);
|
|
57
|
+
--color-xds-glass-highlight: var(--xds-color-glass-highlight);
|
|
58
|
+
--color-xds-glass-border: var(--xds-color-glass-border);
|
|
59
|
+
--color-xds-glass-shadow: var(--xds-color-glass-shadow);
|
|
60
|
+
--color-xds-glass-fallback: var(--xds-color-glass-fallback);
|
|
61
|
+
--color-xds-glass-foreground: var(--xds-color-glass-foreground);
|
|
62
|
+
--color-xds-button-primary-background: var(--xds-color-button-primary-background);
|
|
63
|
+
--color-xds-button-primary-background-hover: var(--xds-color-button-primary-background-hover);
|
|
64
|
+
--color-xds-button-primary-background-pressed: var(--xds-color-button-primary-background-pressed);
|
|
65
|
+
--color-xds-button-primary-text: var(--xds-color-button-primary-text);
|
|
66
|
+
--color-xds-button-secondary-background: var(--xds-color-button-secondary-background);
|
|
67
|
+
--color-xds-button-secondary-background-hover: var(--xds-color-button-secondary-background-hover);
|
|
68
|
+
--color-xds-button-secondary-background-pressed: var(--xds-color-button-secondary-background-pressed);
|
|
69
|
+
--color-xds-button-secondary-border: var(--xds-color-button-secondary-border);
|
|
70
|
+
--color-xds-button-secondary-text: var(--xds-color-button-secondary-text);
|
|
71
|
+
--color-xds-button-ghost-background-hover: var(--xds-color-button-ghost-background-hover);
|
|
72
|
+
--color-xds-button-ghost-background-pressed: var(--xds-color-button-ghost-background-pressed);
|
|
73
|
+
--color-xds-button-ghost-text: var(--xds-color-button-ghost-text);
|
|
74
|
+
--color-xds-button-danger-background: var(--xds-color-button-danger-background);
|
|
75
|
+
--color-xds-button-danger-background-hover: var(--xds-color-button-danger-background-hover);
|
|
76
|
+
--color-xds-button-danger-background-pressed: var(--xds-color-button-danger-background-pressed);
|
|
77
|
+
--color-xds-button-danger-text: var(--xds-color-button-danger-text);
|
|
78
|
+
--color-xds-button-selected-background: var(--xds-color-button-selected-background);
|
|
79
|
+
--color-xds-button-selected-background-hover: var(--xds-color-button-selected-background-hover);
|
|
80
|
+
--color-xds-button-selected-background-pressed: var(--xds-color-button-selected-background-pressed);
|
|
81
|
+
--color-xds-button-selected-border: var(--xds-color-button-selected-border);
|
|
82
|
+
--color-xds-button-selected-text: var(--xds-color-button-selected-text);
|
|
83
|
+
--color-xds-button-disabled-background: var(--xds-color-button-disabled-background);
|
|
84
|
+
--color-xds-button-disabled-text: var(--xds-color-button-disabled-text);
|
|
85
|
+
--color-xds-field-background: var(--xds-color-field-background);
|
|
86
|
+
--color-xds-field-border: var(--xds-color-field-border);
|
|
87
|
+
--color-xds-field-border-focus: var(--xds-color-field-border-focus);
|
|
88
|
+
--color-xds-field-border-invalid: var(--xds-color-field-border-invalid);
|
|
89
|
+
--color-xds-field-text: var(--xds-color-field-text);
|
|
90
|
+
--color-xds-field-placeholder: var(--xds-color-field-placeholder);
|
|
91
|
+
--color-xds-badge-neutral-background: var(--xds-color-badge-neutral-background);
|
|
92
|
+
--color-xds-badge-neutral-text: var(--xds-color-badge-neutral-text);
|
|
93
|
+
--color-xds-badge-accent-background: var(--xds-color-badge-accent-background);
|
|
94
|
+
--color-xds-badge-accent-text: var(--xds-color-badge-accent-text);
|
|
95
|
+
--color-xds-badge-success-background: var(--xds-color-badge-success-background);
|
|
96
|
+
--color-xds-badge-success-text: var(--xds-color-badge-success-text);
|
|
97
|
+
--color-xds-badge-warning-background: var(--xds-color-badge-warning-background);
|
|
98
|
+
--color-xds-badge-warning-text: var(--xds-color-badge-warning-text);
|
|
99
|
+
--color-xds-badge-danger-background: var(--xds-color-badge-danger-background);
|
|
100
|
+
--color-xds-badge-danger-text: var(--xds-color-badge-danger-text);
|
|
101
|
+
--color-xds-badge-overlay-background: var(--xds-color-badge-overlay-background);
|
|
102
|
+
--color-xds-badge-overlay-text: var(--xds-color-badge-overlay-text);
|
|
103
|
+
--color-xds-badge-count-background: var(--xds-color-badge-count-background);
|
|
104
|
+
--color-xds-badge-count-text: var(--xds-color-badge-count-text);
|
|
105
|
+
--color-xds-banner-success-background: var(--xds-color-banner-success-background);
|
|
106
|
+
--color-xds-banner-success-accent: var(--xds-color-banner-success-accent);
|
|
107
|
+
--color-xds-banner-warning-background: var(--xds-color-banner-warning-background);
|
|
108
|
+
--color-xds-banner-warning-accent: var(--xds-color-banner-warning-accent);
|
|
109
|
+
--color-xds-banner-danger-background: var(--xds-color-banner-danger-background);
|
|
110
|
+
--color-xds-banner-danger-accent: var(--xds-color-banner-danger-accent);
|
|
111
|
+
--color-xds-banner-info-background: var(--xds-color-banner-info-background);
|
|
112
|
+
--color-xds-banner-info-accent: var(--xds-color-banner-info-accent);
|
|
113
|
+
--color-xds-banner-text: var(--xds-color-banner-text);
|
|
114
|
+
--color-xds-card-background-hover: var(--xds-color-card-background-hover);
|
|
115
|
+
--color-xds-card-background-pressed: var(--xds-color-card-background-pressed);
|
|
116
|
+
--color-xds-card-border-selected: var(--xds-color-card-border-selected);
|
|
117
|
+
--color-xds-switch-track: var(--xds-color-switch-track);
|
|
118
|
+
--color-xds-switch-track-on: var(--xds-color-switch-track-on);
|
|
119
|
+
--color-xds-switch-thumb: var(--xds-color-switch-thumb);
|
|
120
|
+
--color-xds-switch-disabled-track: var(--xds-color-switch-disabled-track);
|
|
121
|
+
--color-xds-switch-disabled-thumb: var(--xds-color-switch-disabled-thumb);
|
|
122
|
+
--color-xds-checkbox-border: var(--xds-color-checkbox-border);
|
|
123
|
+
--color-xds-checkbox-background-checked: var(--xds-color-checkbox-background-checked);
|
|
124
|
+
--color-xds-checkbox-mark: var(--xds-color-checkbox-mark);
|
|
125
|
+
--color-xds-checkbox-disabled-background: var(--xds-color-checkbox-disabled-background);
|
|
126
|
+
--color-xds-checkbox-disabled-mark: var(--xds-color-checkbox-disabled-mark);
|
|
127
|
+
--color-xds-radio-border: var(--xds-color-radio-border);
|
|
128
|
+
--color-xds-radio-border-checked: var(--xds-color-radio-border-checked);
|
|
129
|
+
--color-xds-radio-dot: var(--xds-color-radio-dot);
|
|
130
|
+
--color-xds-radio-disabled-background: var(--xds-color-radio-disabled-background);
|
|
131
|
+
--color-xds-radio-disabled-dot: var(--xds-color-radio-disabled-dot);
|
|
132
|
+
--color-xds-segmented-track: var(--xds-color-segmented-track);
|
|
133
|
+
--color-xds-segmented-text: var(--xds-color-segmented-text);
|
|
134
|
+
--color-xds-segmented-selected-background: var(--xds-color-segmented-selected-background);
|
|
135
|
+
--color-xds-segmented-selected-border: var(--xds-color-segmented-selected-border);
|
|
136
|
+
--color-xds-segmented-selected-text: var(--xds-color-segmented-selected-text);
|
|
137
|
+
--color-xds-chip-background: var(--xds-color-chip-background);
|
|
138
|
+
--color-xds-chip-background-hover: var(--xds-color-chip-background-hover);
|
|
139
|
+
--color-xds-chip-background-pressed: var(--xds-color-chip-background-pressed);
|
|
140
|
+
--color-xds-chip-text: var(--xds-color-chip-text);
|
|
141
|
+
--color-xds-chip-selected-background: var(--xds-color-chip-selected-background);
|
|
142
|
+
--color-xds-chip-selected-background-hover: var(--xds-color-chip-selected-background-hover);
|
|
143
|
+
--color-xds-chip-selected-background-pressed: var(--xds-color-chip-selected-background-pressed);
|
|
144
|
+
--color-xds-chip-selected-border: var(--xds-color-chip-selected-border);
|
|
145
|
+
--color-xds-chip-selected-text: var(--xds-color-chip-selected-text);
|
|
146
|
+
--color-xds-chip-disabled-background: var(--xds-color-chip-disabled-background);
|
|
147
|
+
--color-xds-chip-disabled-text: var(--xds-color-chip-disabled-text);
|
|
148
|
+
--color-xds-tabs-border: var(--xds-color-tabs-border);
|
|
149
|
+
--color-xds-tabs-text: var(--xds-color-tabs-text);
|
|
150
|
+
--color-xds-tabs-text-hover: var(--xds-color-tabs-text-hover);
|
|
151
|
+
--color-xds-tabs-text-selected: var(--xds-color-tabs-text-selected);
|
|
152
|
+
--color-xds-tabs-indicator: var(--xds-color-tabs-indicator);
|
|
153
|
+
--color-xds-menu-background: var(--xds-color-menu-background);
|
|
154
|
+
--color-xds-menu-border: var(--xds-color-menu-border);
|
|
155
|
+
--color-xds-menu-text: var(--xds-color-menu-text);
|
|
156
|
+
--color-xds-menu-icon: var(--xds-color-menu-icon);
|
|
157
|
+
--color-xds-menu-text-disabled: var(--xds-color-menu-text-disabled);
|
|
158
|
+
--color-xds-menu-item-background-hover: var(--xds-color-menu-item-background-hover);
|
|
159
|
+
--color-xds-menu-item-background-pressed: var(--xds-color-menu-item-background-pressed);
|
|
160
|
+
--color-xds-menu-danger-text: var(--xds-color-menu-danger-text);
|
|
161
|
+
--color-xds-menu-danger-background-hover: var(--xds-color-menu-danger-background-hover);
|
|
162
|
+
--color-xds-date-picker-background: var(--xds-color-date-picker-background);
|
|
163
|
+
--color-xds-date-picker-heading: var(--xds-color-date-picker-heading);
|
|
164
|
+
--color-xds-date-picker-weekday: var(--xds-color-date-picker-weekday);
|
|
165
|
+
--color-xds-date-picker-day-text: var(--xds-color-date-picker-day-text);
|
|
166
|
+
--color-xds-date-picker-day-background-hover: var(--xds-color-date-picker-day-background-hover);
|
|
167
|
+
--color-xds-date-picker-day-background-pressed: var(--xds-color-date-picker-day-background-pressed);
|
|
168
|
+
--color-xds-date-picker-today-text: var(--xds-color-date-picker-today-text);
|
|
169
|
+
--color-xds-date-picker-today-border: var(--xds-color-date-picker-today-border);
|
|
170
|
+
--color-xds-date-picker-selected-background: var(--xds-color-date-picker-selected-background);
|
|
171
|
+
--color-xds-date-picker-selected-background-hover: var(--xds-color-date-picker-selected-background-hover);
|
|
172
|
+
--color-xds-date-picker-selected-background-pressed: var(--xds-color-date-picker-selected-background-pressed);
|
|
173
|
+
--color-xds-date-picker-selected-text: var(--xds-color-date-picker-selected-text);
|
|
174
|
+
--color-xds-date-picker-range-background: var(--xds-color-date-picker-range-background);
|
|
175
|
+
--color-xds-date-picker-range-background-hover: var(--xds-color-date-picker-range-background-hover);
|
|
176
|
+
--color-xds-date-picker-range-background-pressed: var(--xds-color-date-picker-range-background-pressed);
|
|
177
|
+
--color-xds-date-picker-range-text: var(--xds-color-date-picker-range-text);
|
|
178
|
+
--color-xds-date-picker-disabled-text: var(--xds-color-date-picker-disabled-text);
|
|
179
|
+
--color-xds-dialog-background: var(--xds-color-dialog-background);
|
|
180
|
+
--color-xds-dialog-border: var(--xds-color-dialog-border);
|
|
181
|
+
--color-xds-dialog-title: var(--xds-color-dialog-title);
|
|
182
|
+
--color-xds-dialog-text: var(--xds-color-dialog-text);
|
|
183
|
+
--color-xds-toast-background: var(--xds-color-toast-background);
|
|
184
|
+
--color-xds-toast-text: var(--xds-color-toast-text);
|
|
185
|
+
--color-xds-toast-action: var(--xds-color-toast-action);
|
|
186
|
+
--color-xds-tooltip-background: var(--xds-color-tooltip-background);
|
|
187
|
+
--color-xds-tooltip-text: var(--xds-color-tooltip-text);
|
|
188
|
+
--color-xds-skeleton-background: var(--xds-color-skeleton-background);
|
|
189
|
+
--color-xds-skeleton-highlight: var(--xds-color-skeleton-highlight);
|
|
190
|
+
--color-xds-thumbnail-background: var(--xds-color-thumbnail-background);
|
|
191
|
+
--color-xds-thumbnail-icon: var(--xds-color-thumbnail-icon);
|
|
192
|
+
--color-xds-sidebar-background: var(--xds-color-sidebar-background);
|
|
193
|
+
--color-xds-sidebar-border: var(--xds-color-sidebar-border);
|
|
194
|
+
--color-xds-sidebar-section-title: var(--xds-color-sidebar-section-title);
|
|
195
|
+
--color-xds-empty-state-icon: var(--xds-color-empty-state-icon);
|
|
196
|
+
--color-xds-accordion-border: var(--xds-color-accordion-border);
|
|
197
|
+
--color-xds-accordion-header-background-hover: var(--xds-color-accordion-header-background-hover);
|
|
198
|
+
--color-xds-accordion-header-background-pressed: var(--xds-color-accordion-header-background-pressed);
|
|
199
|
+
--color-xds-accordion-icon: var(--xds-color-accordion-icon);
|
|
200
|
+
--color-xds-avatar-background: var(--xds-color-avatar-background);
|
|
201
|
+
--color-xds-avatar-text: var(--xds-color-avatar-text);
|
|
202
|
+
--color-xds-avatar-ring: var(--xds-color-avatar-ring);
|
|
203
|
+
--color-xds-avatar-overflow-background: var(--xds-color-avatar-overflow-background);
|
|
204
|
+
--color-xds-avatar-overflow-text: var(--xds-color-avatar-overflow-text);
|
|
205
|
+
--color-xds-progress-track: var(--xds-color-progress-track);
|
|
206
|
+
--color-xds-progress-fill: var(--xds-color-progress-fill);
|
|
207
|
+
--color-xds-slider-track: var(--xds-color-slider-track);
|
|
208
|
+
--color-xds-slider-fill: var(--xds-color-slider-fill);
|
|
209
|
+
--color-xds-slider-thumb: var(--xds-color-slider-thumb);
|
|
210
|
+
--color-xds-slider-thumb-border: var(--xds-color-slider-thumb-border);
|
|
211
|
+
--color-xds-slider-disabled-fill: var(--xds-color-slider-disabled-fill);
|
|
212
|
+
--color-xds-list-row-background-hover: var(--xds-color-list-row-background-hover);
|
|
213
|
+
--color-xds-list-row-background-pressed: var(--xds-color-list-row-background-pressed);
|
|
214
|
+
--color-xds-list-row-background-selected: var(--xds-color-list-row-background-selected);
|
|
215
|
+
--color-xds-list-row-background-selected-hover: var(--xds-color-list-row-background-selected-hover);
|
|
216
|
+
--color-xds-top-bar-background: var(--xds-color-top-bar-background);
|
|
217
|
+
--color-xds-top-bar-text: var(--xds-color-top-bar-text);
|
|
218
|
+
--color-xds-top-bar-action: var(--xds-color-top-bar-action);
|
|
219
|
+
--color-xds-top-bar-action-background: var(--xds-color-top-bar-action-background);
|
|
220
|
+
--color-xds-tab-bar-background: var(--xds-color-tab-bar-background);
|
|
221
|
+
--color-xds-tab-bar-border: var(--xds-color-tab-bar-border);
|
|
222
|
+
--color-xds-tab-bar-text: var(--xds-color-tab-bar-text);
|
|
223
|
+
--color-xds-tab-bar-text-selected: var(--xds-color-tab-bar-text-selected);
|
|
224
|
+
--color-xds-tab-bar-selected-background: var(--xds-color-tab-bar-selected-background);
|
|
225
|
+
--color-xds-sheet-background: var(--xds-color-sheet-background);
|
|
226
|
+
--color-xds-sheet-handle: var(--xds-color-sheet-handle);
|
|
227
|
+
|
|
228
|
+
--radius-xds-sm: var(--xds-radius-sm);
|
|
229
|
+
--radius-xds-md: var(--xds-radius-md);
|
|
230
|
+
--radius-xds-lg: var(--xds-radius-lg);
|
|
231
|
+
--radius-xds-xl: var(--xds-radius-xl);
|
|
232
|
+
--radius-xds-full: var(--xds-radius-full);
|
|
233
|
+
|
|
234
|
+
--font-xds-sans: var(--xds-font-family-sans);
|
|
235
|
+
|
|
236
|
+
--font-weight-xds-regular: var(--xds-font-weight-regular);
|
|
237
|
+
--font-weight-xds-medium: var(--xds-font-weight-medium);
|
|
238
|
+
--font-weight-xds-semibold: var(--xds-font-weight-semibold);
|
|
239
|
+
--font-weight-xds-bold: var(--xds-font-weight-bold);
|
|
240
|
+
|
|
241
|
+
--leading-xds-tight: var(--xds-font-line-height-tight);
|
|
242
|
+
--leading-xds-snug: var(--xds-font-line-height-snug);
|
|
243
|
+
--leading-xds-normal: var(--xds-font-line-height-normal);
|
|
244
|
+
|
|
245
|
+
--ease-xds-standard: var(--xds-motion-easing-standard);
|
|
246
|
+
--ease-xds-enter: var(--xds-motion-easing-enter);
|
|
247
|
+
--ease-xds-exit: var(--xds-motion-easing-exit);
|
|
248
|
+
|
|
249
|
+
--shadow-xds-subtle: var(--xds-shadow-subtle);
|
|
250
|
+
--shadow-xds-raised: var(--xds-shadow-raised);
|
|
251
|
+
--shadow-xds-overlay: var(--xds-shadow-overlay);
|
|
252
|
+
|
|
253
|
+
--text-xds-display: var(--xds-typography-display-size);
|
|
254
|
+
--text-xds-display--line-height: var(--xds-typography-display-line-height);
|
|
255
|
+
--text-xds-display--font-weight: var(--xds-typography-display-weight);
|
|
256
|
+
--text-xds-display--letter-spacing: var(--xds-typography-display-letter-spacing);
|
|
257
|
+
--text-xds-title: var(--xds-typography-title-size);
|
|
258
|
+
--text-xds-title--line-height: var(--xds-typography-title-line-height);
|
|
259
|
+
--text-xds-title--font-weight: var(--xds-typography-title-weight);
|
|
260
|
+
--text-xds-title--letter-spacing: var(--xds-typography-title-letter-spacing);
|
|
261
|
+
--text-xds-heading: var(--xds-typography-heading-size);
|
|
262
|
+
--text-xds-heading--line-height: var(--xds-typography-heading-line-height);
|
|
263
|
+
--text-xds-heading--font-weight: var(--xds-typography-heading-weight);
|
|
264
|
+
--text-xds-heading--letter-spacing: var(--xds-typography-heading-letter-spacing);
|
|
265
|
+
--text-xds-body: var(--xds-typography-body-size);
|
|
266
|
+
--text-xds-body--line-height: var(--xds-typography-body-line-height);
|
|
267
|
+
--text-xds-body--font-weight: var(--xds-typography-body-weight);
|
|
268
|
+
--text-xds-body--letter-spacing: var(--xds-typography-body-letter-spacing);
|
|
269
|
+
--text-xds-body-strong: var(--xds-typography-body-strong-size);
|
|
270
|
+
--text-xds-body-strong--line-height: var(--xds-typography-body-strong-line-height);
|
|
271
|
+
--text-xds-body-strong--font-weight: var(--xds-typography-body-strong-weight);
|
|
272
|
+
--text-xds-body-strong--letter-spacing: var(--xds-typography-body-strong-letter-spacing);
|
|
273
|
+
--text-xds-label: var(--xds-typography-label-size);
|
|
274
|
+
--text-xds-label--line-height: var(--xds-typography-label-line-height);
|
|
275
|
+
--text-xds-label--font-weight: var(--xds-typography-label-weight);
|
|
276
|
+
--text-xds-label--letter-spacing: var(--xds-typography-label-letter-spacing);
|
|
277
|
+
--text-xds-detail: var(--xds-typography-detail-size);
|
|
278
|
+
--text-xds-detail--line-height: var(--xds-typography-detail-line-height);
|
|
279
|
+
--text-xds-detail--font-weight: var(--xds-typography-detail-weight);
|
|
280
|
+
--text-xds-detail--letter-spacing: var(--xds-typography-detail-letter-spacing);
|
|
281
|
+
--text-xds-footnote: var(--xds-typography-footnote-size);
|
|
282
|
+
--text-xds-footnote--line-height: var(--xds-typography-footnote-line-height);
|
|
283
|
+
--text-xds-footnote--font-weight: var(--xds-typography-footnote-weight);
|
|
284
|
+
--text-xds-footnote--letter-spacing: var(--xds-typography-footnote-letter-spacing);
|
|
285
|
+
|
|
286
|
+
--spacing-xds-control-sm: var(--xds-size-control-sm);
|
|
287
|
+
--spacing-xds-control-md: var(--xds-size-control-md);
|
|
288
|
+
--spacing-xds-control-lg: var(--xds-size-control-lg);
|
|
289
|
+
--spacing-xds-target-min: var(--xds-size-target-min);
|
|
290
|
+
--spacing-xds-switch-width: var(--xds-size-switch-width);
|
|
291
|
+
--spacing-xds-switch-height: var(--xds-size-switch-height);
|
|
292
|
+
--spacing-xds-checkbox: var(--xds-size-checkbox);
|
|
293
|
+
--spacing-xds-radio: var(--xds-size-radio);
|
|
294
|
+
--spacing-xds-list-row: var(--xds-size-list-row);
|
|
295
|
+
--spacing-xds-list-row-compact: var(--xds-size-list-row-compact);
|
|
296
|
+
--spacing-xds-bar: var(--xds-size-bar);
|
|
297
|
+
--spacing-xds-button-radius: var(--xds-size-button-radius);
|
|
298
|
+
--spacing-xds-icon-xs: var(--xds-size-icon-xs);
|
|
299
|
+
--spacing-xds-icon-sm: var(--xds-size-icon-sm);
|
|
300
|
+
--spacing-xds-icon-md: var(--xds-size-icon-md);
|
|
301
|
+
--spacing-xds-icon-lg: var(--xds-size-icon-lg);
|
|
302
|
+
--spacing-xds-icon-xl: var(--xds-size-icon-xl);
|
|
303
|
+
--spacing-xds-avatar-sm: var(--xds-size-avatar-sm);
|
|
304
|
+
--spacing-xds-avatar-md: var(--xds-size-avatar-md);
|
|
305
|
+
--spacing-xds-avatar-lg: var(--xds-size-avatar-lg);
|
|
306
|
+
--spacing-xds-avatar-xl: var(--xds-size-avatar-xl);
|
|
307
|
+
--spacing-xds-badge: var(--xds-size-badge);
|
|
308
|
+
--spacing-xds-chip: var(--xds-size-chip);
|
|
309
|
+
--spacing-xds-tab: var(--xds-size-tab);
|
|
310
|
+
--spacing-xds-count-badge: var(--xds-size-count-badge);
|
|
311
|
+
--spacing-xds-progress: var(--xds-size-progress);
|
|
312
|
+
--spacing-xds-slider-track: var(--xds-size-slider-track);
|
|
313
|
+
--spacing-xds-slider-thumb: var(--xds-size-slider-thumb);
|
|
314
|
+
--spacing-xds-spinner-sm: var(--xds-size-spinner-sm);
|
|
315
|
+
--spacing-xds-spinner-md: var(--xds-size-spinner-md);
|
|
316
|
+
--spacing-xds-spinner-lg: var(--xds-size-spinner-lg);
|
|
317
|
+
--spacing-xds-dialog: var(--xds-size-dialog);
|
|
318
|
+
--spacing-xds-toast: var(--xds-size-toast);
|
|
319
|
+
--spacing-xds-sidebar: var(--xds-size-sidebar);
|
|
320
|
+
--spacing-xds-sidebar-rail: var(--xds-size-sidebar-rail);
|
|
321
|
+
--spacing-xds-calendar-day: var(--xds-size-calendar-day);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@layer xds.theme {
|
|
325
|
+
:root {
|
|
326
|
+
color-scheme: light dark;
|
|
327
|
+
|
|
328
|
+
--xds-color-scrim: rgb(0 0 0 / 0.5);
|
|
329
|
+
--xds-color-background-base: light-dark(#f5f5f7, #0e0e11);
|
|
330
|
+
--xds-color-background-surface: light-dark(#ffffff, #18181c);
|
|
331
|
+
--xds-color-background-raised: light-dark(#ffffff, #222228);
|
|
332
|
+
--xds-color-background-inverse: light-dark(#18181c, #f5f5f7);
|
|
333
|
+
--xds-color-background-disabled: light-dark(#ececf0, #2c2c33);
|
|
334
|
+
--xds-color-text-primary: light-dark(#18181c, #f5f5f7);
|
|
335
|
+
--xds-color-text-secondary: light-dark(#5c5c66, #a9a9b4);
|
|
336
|
+
--xds-color-text-tertiary: light-dark(#6e6e79, #84848f);
|
|
337
|
+
--xds-color-text-disabled: light-dark(#a9a9b4, #5c5c66);
|
|
338
|
+
--xds-color-text-accent: light-dark(#4f46e5, #a5b4fc);
|
|
339
|
+
--xds-color-text-on-accent: #ffffff;
|
|
340
|
+
--xds-color-text-on-danger: #ffffff;
|
|
341
|
+
--xds-color-text-on-inverse: light-dark(#f5f5f7, #18181c);
|
|
342
|
+
--xds-color-text-accent-on-inverse: light-dark(#a5b4fc, #4f46e5);
|
|
343
|
+
--xds-color-border-default: light-dark(#e2e2e8, #2c2c33);
|
|
344
|
+
--xds-color-border-control: light-dark(#c9c9d1, #44444c);
|
|
345
|
+
--xds-color-border-strong: #84848f;
|
|
346
|
+
--xds-color-border-focus: light-dark(#4f46e5, #818cf8);
|
|
347
|
+
--xds-color-accent-default: light-dark(#4f46e5, #5b5ef0);
|
|
348
|
+
--xds-color-accent-hover: light-dark(#4338ca, #4f46e5);
|
|
349
|
+
--xds-color-accent-pressed: light-dark(#3730a3, #4338ca);
|
|
350
|
+
--xds-color-accent-subtle: light-dark(#eef2ff, #1e1b4b);
|
|
351
|
+
--xds-color-accent-subtle-hover: light-dark(#e0e7ff, #312e81);
|
|
352
|
+
--xds-color-accent-subtle-pressed: light-dark(#c7d2fe, #3730a3);
|
|
353
|
+
--xds-color-control-default: light-dark(#ececf0, #2c2c33);
|
|
354
|
+
--xds-color-control-hover: light-dark(#e2e2e8, #44444c);
|
|
355
|
+
--xds-color-control-pressed: light-dark(#c9c9d1, #5c5c66);
|
|
356
|
+
--xds-color-danger-default: #d92d20;
|
|
357
|
+
--xds-color-danger-hover: #b42318;
|
|
358
|
+
--xds-color-danger-pressed: #912018;
|
|
359
|
+
--xds-color-status-danger: light-dark(#b42318, #f97066);
|
|
360
|
+
--xds-color-status-danger-subtle: light-dark(#fef3f2, #55160c);
|
|
361
|
+
--xds-color-status-success: light-dark(#067647, #47cd89);
|
|
362
|
+
--xds-color-status-success-subtle: light-dark(#ecfdf3, #053321);
|
|
363
|
+
--xds-color-status-warning: light-dark(#b54708, #fdb022);
|
|
364
|
+
--xds-color-status-warning-subtle: light-dark(#fffaeb, #4e1d09);
|
|
365
|
+
--xds-color-status-info: light-dark(#175cd3, #53b1fd);
|
|
366
|
+
--xds-color-status-info-subtle: light-dark(#eff8ff, #102a56);
|
|
367
|
+
--xds-color-overlay-background: rgb(0 0 0 / 0.72);
|
|
368
|
+
--xds-color-overlay-text: #ffffff;
|
|
369
|
+
--xds-color-overlay-accent: #a5b4fc;
|
|
370
|
+
--xds-color-glass-tint: light-dark(rgb(255 255 255 / 0.72), rgb(34 34 40 / 0.72));
|
|
371
|
+
--xds-color-glass-tint-strong: light-dark(rgb(255 255 255 / 0.92), rgb(34 34 40 / 0.92));
|
|
372
|
+
--xds-color-glass-highlight: light-dark(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.08));
|
|
373
|
+
--xds-color-glass-border: light-dark(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.12));
|
|
374
|
+
--xds-color-glass-shadow: light-dark(rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.35));
|
|
375
|
+
--xds-color-glass-fallback: light-dark(#ffffff, #222228);
|
|
376
|
+
--xds-color-glass-foreground: light-dark(#18181c, #f5f5f7);
|
|
377
|
+
--xds-color-button-primary-background: light-dark(#4f46e5, #5b5ef0);
|
|
378
|
+
--xds-color-button-primary-background-hover: light-dark(#4338ca, #4f46e5);
|
|
379
|
+
--xds-color-button-primary-background-pressed: light-dark(#3730a3, #4338ca);
|
|
380
|
+
--xds-color-button-primary-text: #ffffff;
|
|
381
|
+
--xds-color-button-secondary-background: light-dark(#ffffff, #2c2c33);
|
|
382
|
+
--xds-color-button-secondary-background-hover: light-dark(#ececf0, #44444c);
|
|
383
|
+
--xds-color-button-secondary-background-pressed: light-dark(#e2e2e8, #5c5c66);
|
|
384
|
+
--xds-color-button-secondary-border: light-dark(#c9c9d1, #44444c);
|
|
385
|
+
--xds-color-button-secondary-text: light-dark(#18181c, #f5f5f7);
|
|
386
|
+
--xds-color-button-ghost-background-hover: light-dark(#ececf0, #2c2c33);
|
|
387
|
+
--xds-color-button-ghost-background-pressed: light-dark(#e2e2e8, #44444c);
|
|
388
|
+
--xds-color-button-ghost-text: light-dark(#18181c, #f5f5f7);
|
|
389
|
+
--xds-color-button-danger-background: #d92d20;
|
|
390
|
+
--xds-color-button-danger-background-hover: #b42318;
|
|
391
|
+
--xds-color-button-danger-background-pressed: #912018;
|
|
392
|
+
--xds-color-button-danger-text: #ffffff;
|
|
393
|
+
--xds-color-button-selected-background: light-dark(#eef2ff, #1e1b4b);
|
|
394
|
+
--xds-color-button-selected-background-hover: light-dark(#e0e7ff, #312e81);
|
|
395
|
+
--xds-color-button-selected-background-pressed: light-dark(#c7d2fe, #3730a3);
|
|
396
|
+
--xds-color-button-selected-border: light-dark(#4f46e5, #5b5ef0);
|
|
397
|
+
--xds-color-button-selected-text: light-dark(#18181c, #f5f5f7);
|
|
398
|
+
--xds-color-button-disabled-background: light-dark(#ececf0, #2c2c33);
|
|
399
|
+
--xds-color-button-disabled-text: light-dark(#a9a9b4, #5c5c66);
|
|
400
|
+
--xds-color-field-background: light-dark(#ffffff, #0e0e11);
|
|
401
|
+
--xds-color-field-border: #84848f;
|
|
402
|
+
--xds-color-field-border-focus: light-dark(#4f46e5, #818cf8);
|
|
403
|
+
--xds-color-field-border-invalid: light-dark(#b42318, #f97066);
|
|
404
|
+
--xds-color-field-text: light-dark(#18181c, #f5f5f7);
|
|
405
|
+
--xds-color-field-placeholder: light-dark(#6e6e79, #84848f);
|
|
406
|
+
--xds-color-badge-neutral-background: light-dark(#ececf0, #2c2c33);
|
|
407
|
+
--xds-color-badge-neutral-text: light-dark(#5c5c66, #a9a9b4);
|
|
408
|
+
--xds-color-badge-accent-background: light-dark(#eef2ff, #1e1b4b);
|
|
409
|
+
--xds-color-badge-accent-text: light-dark(#4f46e5, #a5b4fc);
|
|
410
|
+
--xds-color-badge-success-background: light-dark(#ecfdf3, #053321);
|
|
411
|
+
--xds-color-badge-success-text: light-dark(#067647, #47cd89);
|
|
412
|
+
--xds-color-badge-warning-background: light-dark(#fffaeb, #4e1d09);
|
|
413
|
+
--xds-color-badge-warning-text: light-dark(#b54708, #fdb022);
|
|
414
|
+
--xds-color-badge-danger-background: light-dark(#fef3f2, #55160c);
|
|
415
|
+
--xds-color-badge-danger-text: light-dark(#b42318, #f97066);
|
|
416
|
+
--xds-color-badge-overlay-background: rgb(0 0 0 / 0.72);
|
|
417
|
+
--xds-color-badge-overlay-text: #ffffff;
|
|
418
|
+
--xds-color-badge-count-background: #d92d20;
|
|
419
|
+
--xds-color-badge-count-text: #ffffff;
|
|
420
|
+
--xds-color-banner-success-background: light-dark(#ecfdf3, #053321);
|
|
421
|
+
--xds-color-banner-success-accent: light-dark(#067647, #47cd89);
|
|
422
|
+
--xds-color-banner-warning-background: light-dark(#fffaeb, #4e1d09);
|
|
423
|
+
--xds-color-banner-warning-accent: light-dark(#b54708, #fdb022);
|
|
424
|
+
--xds-color-banner-danger-background: light-dark(#fef3f2, #55160c);
|
|
425
|
+
--xds-color-banner-danger-accent: light-dark(#b42318, #f97066);
|
|
426
|
+
--xds-color-banner-info-background: light-dark(#eff8ff, #102a56);
|
|
427
|
+
--xds-color-banner-info-accent: light-dark(#175cd3, #53b1fd);
|
|
428
|
+
--xds-color-banner-text: light-dark(#18181c, #f5f5f7);
|
|
429
|
+
--xds-color-card-background-hover: light-dark(#ececf0, #222228);
|
|
430
|
+
--xds-color-card-background-pressed: light-dark(#e2e2e8, #2c2c33);
|
|
431
|
+
--xds-color-card-border-selected: light-dark(#4f46e5, #5b5ef0);
|
|
432
|
+
--xds-color-switch-track: #84848f;
|
|
433
|
+
--xds-color-switch-track-on: light-dark(#4f46e5, #5b5ef0);
|
|
434
|
+
--xds-color-switch-thumb: #ffffff;
|
|
435
|
+
--xds-color-switch-disabled-track: light-dark(#ececf0, #2c2c33);
|
|
436
|
+
--xds-color-switch-disabled-thumb: light-dark(#a9a9b4, #5c5c66);
|
|
437
|
+
--xds-color-checkbox-border: #84848f;
|
|
438
|
+
--xds-color-checkbox-background-checked: light-dark(#4f46e5, #5b5ef0);
|
|
439
|
+
--xds-color-checkbox-mark: #ffffff;
|
|
440
|
+
--xds-color-checkbox-disabled-background: light-dark(#ececf0, #2c2c33);
|
|
441
|
+
--xds-color-checkbox-disabled-mark: light-dark(#a9a9b4, #5c5c66);
|
|
442
|
+
--xds-color-radio-border: #84848f;
|
|
443
|
+
--xds-color-radio-border-checked: light-dark(#4f46e5, #5b5ef0);
|
|
444
|
+
--xds-color-radio-dot: light-dark(#4f46e5, #5b5ef0);
|
|
445
|
+
--xds-color-radio-disabled-background: light-dark(#ececf0, #2c2c33);
|
|
446
|
+
--xds-color-radio-disabled-dot: light-dark(#a9a9b4, #5c5c66);
|
|
447
|
+
--xds-color-segmented-track: light-dark(#ececf0, #2c2c33);
|
|
448
|
+
--xds-color-segmented-text: light-dark(#5c5c66, #a9a9b4);
|
|
449
|
+
--xds-color-segmented-selected-background: light-dark(#ffffff, #222228);
|
|
450
|
+
--xds-color-segmented-selected-border: light-dark(#c9c9d1, #44444c);
|
|
451
|
+
--xds-color-segmented-selected-text: light-dark(#18181c, #f5f5f7);
|
|
452
|
+
--xds-color-chip-background: light-dark(#ececf0, #2c2c33);
|
|
453
|
+
--xds-color-chip-background-hover: light-dark(#e2e2e8, #44444c);
|
|
454
|
+
--xds-color-chip-background-pressed: light-dark(#c9c9d1, #5c5c66);
|
|
455
|
+
--xds-color-chip-text: light-dark(#18181c, #f5f5f7);
|
|
456
|
+
--xds-color-chip-selected-background: light-dark(#eef2ff, #1e1b4b);
|
|
457
|
+
--xds-color-chip-selected-background-hover: light-dark(#e0e7ff, #312e81);
|
|
458
|
+
--xds-color-chip-selected-background-pressed: light-dark(#c7d2fe, #3730a3);
|
|
459
|
+
--xds-color-chip-selected-border: light-dark(#4f46e5, #5b5ef0);
|
|
460
|
+
--xds-color-chip-selected-text: light-dark(#18181c, #f5f5f7);
|
|
461
|
+
--xds-color-chip-disabled-background: light-dark(#ececf0, #2c2c33);
|
|
462
|
+
--xds-color-chip-disabled-text: light-dark(#a9a9b4, #5c5c66);
|
|
463
|
+
--xds-color-tabs-border: light-dark(#e2e2e8, #2c2c33);
|
|
464
|
+
--xds-color-tabs-text: light-dark(#5c5c66, #a9a9b4);
|
|
465
|
+
--xds-color-tabs-text-hover: light-dark(#18181c, #f5f5f7);
|
|
466
|
+
--xds-color-tabs-text-selected: light-dark(#18181c, #f5f5f7);
|
|
467
|
+
--xds-color-tabs-indicator: light-dark(#4f46e5, #5b5ef0);
|
|
468
|
+
--xds-color-menu-background: light-dark(#ffffff, #222228);
|
|
469
|
+
--xds-color-menu-border: light-dark(#e2e2e8, #2c2c33);
|
|
470
|
+
--xds-color-menu-text: light-dark(#18181c, #f5f5f7);
|
|
471
|
+
--xds-color-menu-icon: light-dark(#5c5c66, #a9a9b4);
|
|
472
|
+
--xds-color-menu-text-disabled: light-dark(#a9a9b4, #5c5c66);
|
|
473
|
+
--xds-color-menu-item-background-hover: light-dark(#ececf0, #2c2c33);
|
|
474
|
+
--xds-color-menu-item-background-pressed: light-dark(#e2e2e8, #2c2c33);
|
|
475
|
+
--xds-color-menu-danger-text: light-dark(#b42318, #f97066);
|
|
476
|
+
--xds-color-menu-danger-background-hover: light-dark(#fef3f2, #55160c);
|
|
477
|
+
--xds-color-date-picker-background: light-dark(#ffffff, #222228);
|
|
478
|
+
--xds-color-date-picker-heading: light-dark(#18181c, #f5f5f7);
|
|
479
|
+
--xds-color-date-picker-weekday: light-dark(#5c5c66, #a9a9b4);
|
|
480
|
+
--xds-color-date-picker-day-text: light-dark(#18181c, #f5f5f7);
|
|
481
|
+
--xds-color-date-picker-day-background-hover: light-dark(#ececf0, #2c2c33);
|
|
482
|
+
--xds-color-date-picker-day-background-pressed: light-dark(#e2e2e8, #44444c);
|
|
483
|
+
--xds-color-date-picker-today-text: light-dark(#4f46e5, #a5b4fc);
|
|
484
|
+
--xds-color-date-picker-today-border: light-dark(#4f46e5, #5b5ef0);
|
|
485
|
+
--xds-color-date-picker-selected-background: light-dark(#4f46e5, #5b5ef0);
|
|
486
|
+
--xds-color-date-picker-selected-background-hover: light-dark(#4338ca, #4f46e5);
|
|
487
|
+
--xds-color-date-picker-selected-background-pressed: light-dark(#3730a3, #4338ca);
|
|
488
|
+
--xds-color-date-picker-selected-text: #ffffff;
|
|
489
|
+
--xds-color-date-picker-range-background: light-dark(#eef2ff, #1e1b4b);
|
|
490
|
+
--xds-color-date-picker-range-background-hover: light-dark(#e0e7ff, #312e81);
|
|
491
|
+
--xds-color-date-picker-range-background-pressed: light-dark(#c7d2fe, #3730a3);
|
|
492
|
+
--xds-color-date-picker-range-text: light-dark(#18181c, #f5f5f7);
|
|
493
|
+
--xds-color-date-picker-disabled-text: light-dark(#a9a9b4, #5c5c66);
|
|
494
|
+
--xds-color-dialog-background: light-dark(#ffffff, #222228);
|
|
495
|
+
--xds-color-dialog-border: light-dark(#e2e2e8, #2c2c33);
|
|
496
|
+
--xds-color-dialog-title: light-dark(#18181c, #f5f5f7);
|
|
497
|
+
--xds-color-dialog-text: light-dark(#5c5c66, #a9a9b4);
|
|
498
|
+
--xds-color-toast-background: light-dark(#18181c, #f5f5f7);
|
|
499
|
+
--xds-color-toast-text: light-dark(#f5f5f7, #18181c);
|
|
500
|
+
--xds-color-toast-action: light-dark(#a5b4fc, #4f46e5);
|
|
501
|
+
--xds-color-tooltip-background: light-dark(#18181c, #f5f5f7);
|
|
502
|
+
--xds-color-tooltip-text: light-dark(#f5f5f7, #18181c);
|
|
503
|
+
--xds-color-skeleton-background: light-dark(#ececf0, #2c2c33);
|
|
504
|
+
--xds-color-skeleton-highlight: light-dark(#e2e2e8, #44444c);
|
|
505
|
+
--xds-color-thumbnail-background: light-dark(#ececf0, #2c2c33);
|
|
506
|
+
--xds-color-thumbnail-icon: light-dark(#6e6e79, #84848f);
|
|
507
|
+
--xds-color-sidebar-background: light-dark(#f5f5f7, #0e0e11);
|
|
508
|
+
--xds-color-sidebar-border: light-dark(#e2e2e8, #2c2c33);
|
|
509
|
+
--xds-color-sidebar-section-title: light-dark(#6e6e79, #84848f);
|
|
510
|
+
--xds-color-empty-state-icon: light-dark(#6e6e79, #84848f);
|
|
511
|
+
--xds-color-accordion-border: light-dark(#e2e2e8, #2c2c33);
|
|
512
|
+
--xds-color-accordion-header-background-hover: light-dark(#ececf0, #222228);
|
|
513
|
+
--xds-color-accordion-header-background-pressed: light-dark(#e2e2e8, #2c2c33);
|
|
514
|
+
--xds-color-accordion-icon: light-dark(#5c5c66, #a9a9b4);
|
|
515
|
+
--xds-color-avatar-background: light-dark(#eef2ff, #1e1b4b);
|
|
516
|
+
--xds-color-avatar-text: light-dark(#4f46e5, #a5b4fc);
|
|
517
|
+
--xds-color-avatar-ring: light-dark(#ffffff, #18181c);
|
|
518
|
+
--xds-color-avatar-overflow-background: light-dark(#ececf0, #2c2c33);
|
|
519
|
+
--xds-color-avatar-overflow-text: light-dark(#5c5c66, #a9a9b4);
|
|
520
|
+
--xds-color-progress-track: light-dark(#ececf0, #2c2c33);
|
|
521
|
+
--xds-color-progress-fill: light-dark(#4f46e5, #a5b4fc);
|
|
522
|
+
--xds-color-slider-track: light-dark(#ececf0, #2c2c33);
|
|
523
|
+
--xds-color-slider-fill: light-dark(#4f46e5, #a5b4fc);
|
|
524
|
+
--xds-color-slider-thumb: light-dark(#ffffff, #222228);
|
|
525
|
+
--xds-color-slider-thumb-border: light-dark(#4f46e5, #a5b4fc);
|
|
526
|
+
--xds-color-slider-disabled-fill: light-dark(#a9a9b4, #5c5c66);
|
|
527
|
+
--xds-color-list-row-background-hover: light-dark(#ececf0, #222228);
|
|
528
|
+
--xds-color-list-row-background-pressed: light-dark(#e2e2e8, #2c2c33);
|
|
529
|
+
--xds-color-list-row-background-selected: light-dark(#eef2ff, #1e1b4b);
|
|
530
|
+
--xds-color-list-row-background-selected-hover: light-dark(#e0e7ff, #312e81);
|
|
531
|
+
--xds-color-top-bar-background: light-dark(#f5f5f7, #0e0e11);
|
|
532
|
+
--xds-color-top-bar-text: light-dark(#18181c, #f5f5f7);
|
|
533
|
+
--xds-color-top-bar-action: light-dark(#4f46e5, #a5b4fc);
|
|
534
|
+
--xds-color-top-bar-action-background: light-dark(#ececf0, #2c2c33);
|
|
535
|
+
--xds-color-tab-bar-background: light-dark(#ffffff, #222228);
|
|
536
|
+
--xds-color-tab-bar-border: light-dark(#e2e2e8, #2c2c33);
|
|
537
|
+
--xds-color-tab-bar-text: light-dark(#5c5c66, #a9a9b4);
|
|
538
|
+
--xds-color-tab-bar-text-selected: light-dark(#4f46e5, #a5b4fc);
|
|
539
|
+
--xds-color-tab-bar-selected-background: light-dark(#eef2ff, #1e1b4b);
|
|
540
|
+
--xds-color-sheet-background: light-dark(#ffffff, #222228);
|
|
541
|
+
--xds-color-sheet-handle: #84848f;
|
|
542
|
+
|
|
543
|
+
--xds-space-1: 4px;
|
|
544
|
+
--xds-space-2: 8px;
|
|
545
|
+
--xds-space-3: 12px;
|
|
546
|
+
--xds-space-4: 16px;
|
|
547
|
+
--xds-space-5: 20px;
|
|
548
|
+
--xds-space-6: 24px;
|
|
549
|
+
--xds-space-8: 32px;
|
|
550
|
+
--xds-space-10: 40px;
|
|
551
|
+
--xds-space-12: 48px;
|
|
552
|
+
--xds-space-16: 64px;
|
|
553
|
+
--xds-space-0-5: 2px;
|
|
554
|
+
--xds-space-1-5: 6px;
|
|
555
|
+
--xds-space-2-5: 10px;
|
|
556
|
+
--xds-radius-sm: 6px;
|
|
557
|
+
--xds-radius-md: 10px;
|
|
558
|
+
--xds-radius-lg: 16px;
|
|
559
|
+
--xds-radius-xl: 24px;
|
|
560
|
+
--xds-radius-full: 9999px;
|
|
561
|
+
--xds-border-width-thin: 1px;
|
|
562
|
+
--xds-border-width-thick: 2px;
|
|
563
|
+
--xds-focus-width: 2px;
|
|
564
|
+
--xds-focus-offset: 2px;
|
|
565
|
+
--xds-font-family-sans: "Pretendard Variable", "Pretendard", "-apple-system", "BlinkMacSystemFont", system-ui, "Roboto", "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
|
|
566
|
+
--xds-font-size-xs: 12px;
|
|
567
|
+
--xds-font-size-sm: 14px;
|
|
568
|
+
--xds-font-size-md: 16px;
|
|
569
|
+
--xds-font-size-lg: 18px;
|
|
570
|
+
--xds-font-size-xl: 22px;
|
|
571
|
+
--xds-font-size-2xl: 28px;
|
|
572
|
+
--xds-font-weight-regular: 400;
|
|
573
|
+
--xds-font-weight-medium: 500;
|
|
574
|
+
--xds-font-weight-semibold: 600;
|
|
575
|
+
--xds-font-weight-bold: 700;
|
|
576
|
+
--xds-font-line-height-tight: 1.25;
|
|
577
|
+
--xds-font-line-height-snug: 1.4;
|
|
578
|
+
--xds-font-line-height-normal: 1.5;
|
|
579
|
+
--xds-typography-display-size: 28px;
|
|
580
|
+
--xds-typography-display-weight: 700;
|
|
581
|
+
--xds-typography-display-line-height: 1.25;
|
|
582
|
+
--xds-typography-display-letter-spacing: -0.3px;
|
|
583
|
+
--xds-typography-title-size: 22px;
|
|
584
|
+
--xds-typography-title-weight: 700;
|
|
585
|
+
--xds-typography-title-line-height: 1.25;
|
|
586
|
+
--xds-typography-title-letter-spacing: -0.2px;
|
|
587
|
+
--xds-typography-heading-size: 18px;
|
|
588
|
+
--xds-typography-heading-weight: 600;
|
|
589
|
+
--xds-typography-heading-line-height: 1.4;
|
|
590
|
+
--xds-typography-heading-letter-spacing: 0px;
|
|
591
|
+
--xds-typography-body-size: 16px;
|
|
592
|
+
--xds-typography-body-weight: 400;
|
|
593
|
+
--xds-typography-body-line-height: 1.5;
|
|
594
|
+
--xds-typography-body-letter-spacing: 0px;
|
|
595
|
+
--xds-typography-body-strong-size: 16px;
|
|
596
|
+
--xds-typography-body-strong-weight: 600;
|
|
597
|
+
--xds-typography-body-strong-line-height: 1.5;
|
|
598
|
+
--xds-typography-body-strong-letter-spacing: 0px;
|
|
599
|
+
--xds-typography-label-size: 14px;
|
|
600
|
+
--xds-typography-label-weight: 500;
|
|
601
|
+
--xds-typography-label-line-height: 1.4;
|
|
602
|
+
--xds-typography-label-letter-spacing: 0px;
|
|
603
|
+
--xds-typography-detail-size: 14px;
|
|
604
|
+
--xds-typography-detail-weight: 400;
|
|
605
|
+
--xds-typography-detail-line-height: 1.5;
|
|
606
|
+
--xds-typography-detail-letter-spacing: 0px;
|
|
607
|
+
--xds-typography-footnote-size: 12px;
|
|
608
|
+
--xds-typography-footnote-weight: 500;
|
|
609
|
+
--xds-typography-footnote-line-height: 1.4;
|
|
610
|
+
--xds-typography-footnote-letter-spacing: 0px;
|
|
611
|
+
--xds-motion-duration-fast: 120ms;
|
|
612
|
+
--xds-motion-duration-normal: 200ms;
|
|
613
|
+
--xds-motion-duration-slow: 320ms;
|
|
614
|
+
--xds-motion-duration-pulse: 1200ms;
|
|
615
|
+
--xds-motion-duration-tooltip-delay: 500ms;
|
|
616
|
+
--xds-motion-duration-toast: 5000ms;
|
|
617
|
+
--xds-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
618
|
+
--xds-motion-easing-enter: cubic-bezier(0, 0, 0, 1);
|
|
619
|
+
--xds-motion-easing-exit: cubic-bezier(0.3, 0, 1, 1);
|
|
620
|
+
--xds-motion-press-scale: 0.97;
|
|
621
|
+
--xds-motion-spring-default-stiffness: 700;
|
|
622
|
+
--xds-motion-spring-default-damping: 0.9;
|
|
623
|
+
--xds-motion-spring-fast-stiffness: 1400;
|
|
624
|
+
--xds-motion-spring-fast-damping: 0.9;
|
|
625
|
+
--xds-shadow-subtle: 0px 1px 2px 0px rgb(0 0 0 / 0.06);
|
|
626
|
+
--xds-shadow-raised: 0px 4px 16px 0px rgb(0 0 0 / 0.12);
|
|
627
|
+
--xds-shadow-overlay: 0px 12px 32px 0px rgb(0 0 0 / 0.35);
|
|
628
|
+
--xds-glass-blur: 12px;
|
|
629
|
+
--xds-glass-saturation: 1.8;
|
|
630
|
+
|
|
631
|
+
--xds-size-control-sm: 28px;
|
|
632
|
+
--xds-size-control-md: 36px;
|
|
633
|
+
--xds-size-control-lg: 44px;
|
|
634
|
+
--xds-size-target-min: 24px;
|
|
635
|
+
--xds-size-switch-width: 36px;
|
|
636
|
+
--xds-size-switch-height: 20px;
|
|
637
|
+
--xds-size-checkbox: 18px;
|
|
638
|
+
--xds-size-radio: 18px;
|
|
639
|
+
--xds-size-list-row: 40px;
|
|
640
|
+
--xds-size-list-row-compact: 32px;
|
|
641
|
+
--xds-size-bar: 48px;
|
|
642
|
+
--xds-size-button-radius: 10px;
|
|
643
|
+
--xds-size-icon-xs: 12px;
|
|
644
|
+
--xds-size-icon-sm: 16px;
|
|
645
|
+
--xds-size-icon-md: 20px;
|
|
646
|
+
--xds-size-icon-lg: 24px;
|
|
647
|
+
--xds-size-icon-xl: 32px;
|
|
648
|
+
--xds-size-avatar-sm: 24px;
|
|
649
|
+
--xds-size-avatar-md: 32px;
|
|
650
|
+
--xds-size-avatar-lg: 40px;
|
|
651
|
+
--xds-size-avatar-xl: 56px;
|
|
652
|
+
--xds-size-badge: 24px;
|
|
653
|
+
--xds-size-chip: 32px;
|
|
654
|
+
--xds-size-tab: 40px;
|
|
655
|
+
--xds-size-count-badge: 18px;
|
|
656
|
+
--xds-size-progress: 8px;
|
|
657
|
+
--xds-size-slider-track: 4px;
|
|
658
|
+
--xds-size-slider-thumb: 16px;
|
|
659
|
+
--xds-size-spinner-sm: 16px;
|
|
660
|
+
--xds-size-spinner-md: 24px;
|
|
661
|
+
--xds-size-spinner-lg: 32px;
|
|
662
|
+
--xds-size-dialog: 480px;
|
|
663
|
+
--xds-size-toast: 480px;
|
|
664
|
+
--xds-size-sidebar: 240px;
|
|
665
|
+
--xds-size-sidebar-rail: 72px;
|
|
666
|
+
--xds-size-calendar-day: 36px;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/* Fingers need larger controls than a mouse. This asks about the primary input, not the
|
|
670
|
+
screen width: a small window on a laptop keeps the pointer sizes. */
|
|
671
|
+
@media (pointer: coarse) {
|
|
672
|
+
:root {
|
|
673
|
+
--xds-size-control-sm: 40px;
|
|
674
|
+
--xds-size-control-md: 48px;
|
|
675
|
+
--xds-size-control-lg: 56px;
|
|
676
|
+
--xds-size-target-min: 48px;
|
|
677
|
+
--xds-size-switch-width: 52px;
|
|
678
|
+
--xds-size-switch-height: 32px;
|
|
679
|
+
--xds-size-checkbox: 24px;
|
|
680
|
+
--xds-size-radio: 24px;
|
|
681
|
+
--xds-size-list-row: 56px;
|
|
682
|
+
--xds-size-list-row-compact: 44px;
|
|
683
|
+
--xds-size-bar: 56px;
|
|
684
|
+
--xds-size-button-radius: 9999px;
|
|
685
|
+
--xds-size-icon-xs: 12px;
|
|
686
|
+
--xds-size-icon-sm: 16px;
|
|
687
|
+
--xds-size-icon-md: 20px;
|
|
688
|
+
--xds-size-icon-lg: 24px;
|
|
689
|
+
--xds-size-icon-xl: 32px;
|
|
690
|
+
--xds-size-avatar-sm: 24px;
|
|
691
|
+
--xds-size-avatar-md: 32px;
|
|
692
|
+
--xds-size-avatar-lg: 40px;
|
|
693
|
+
--xds-size-avatar-xl: 56px;
|
|
694
|
+
--xds-size-badge: 24px;
|
|
695
|
+
--xds-size-chip: 40px;
|
|
696
|
+
--xds-size-tab: 48px;
|
|
697
|
+
--xds-size-count-badge: 20px;
|
|
698
|
+
--xds-size-progress: 8px;
|
|
699
|
+
--xds-size-slider-track: 4px;
|
|
700
|
+
--xds-size-slider-thumb: 24px;
|
|
701
|
+
--xds-size-spinner-sm: 16px;
|
|
702
|
+
--xds-size-spinner-md: 24px;
|
|
703
|
+
--xds-size-spinner-lg: 32px;
|
|
704
|
+
--xds-size-dialog: 480px;
|
|
705
|
+
--xds-size-toast: 480px;
|
|
706
|
+
--xds-size-sidebar: 240px;
|
|
707
|
+
--xds-size-sidebar-rail: 72px;
|
|
708
|
+
--xds-size-calendar-day: 48px;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/* Set data-theme to override the system color scheme, on the root element for the whole
|
|
713
|
+
page or on any element for what is inside it. */
|
|
714
|
+
[data-theme="light"] {
|
|
715
|
+
color-scheme: light;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
[data-theme="dark"] {
|
|
719
|
+
color-scheme: dark;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
@layer xds {
|
|
725
|
+
@layer base {
|
|
726
|
+
/* The outermost component takes the page font of a scaffolded app, so it looks the same in any
|
|
727
|
+
page. The components inside it inherit it as they do there. */
|
|
728
|
+
:where([class^="xds-"], [class*=" xds-"]):not(:where([class^="xds-"], [class*=" xds-"]) *) {
|
|
729
|
+
font-family: var(--xds-font-family-sans);
|
|
730
|
+
/* Korean breaks between words, not between syllables. */
|
|
731
|
+
word-break: keep-all;
|
|
732
|
+
/* Long unbroken strings (URLs, email addresses) still wrap instead of overflowing. */
|
|
733
|
+
overflow-wrap: anywhere;
|
|
734
|
+
-webkit-text-size-adjust: 100%;
|
|
735
|
+
tab-size: 4;
|
|
736
|
+
font-feature-settings: normal;
|
|
737
|
+
font-variation-settings: normal;
|
|
738
|
+
-webkit-tap-highlight-color: transparent;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/* A border without a color of its own is a divider, not text-colored. */
|
|
742
|
+
:where([class^="xds-"], [class*=" xds-"]),
|
|
743
|
+
:where([class^="xds-"], [class*=" xds-"]) *,
|
|
744
|
+
:where([class^="xds-"], [class*=" xds-"])::after,
|
|
745
|
+
:where([class^="xds-"], [class*=" xds-"]) ::after,
|
|
746
|
+
:where([class^="xds-"], [class*=" xds-"])::before,
|
|
747
|
+
:where([class^="xds-"], [class*=" xds-"]) ::before,
|
|
748
|
+
:where([class^="xds-"], [class*=" xds-"])::backdrop,
|
|
749
|
+
:where([class^="xds-"], [class*=" xds-"]) ::backdrop,
|
|
750
|
+
:where([class^="xds-"], [class*=" xds-"])::file-selector-button,
|
|
751
|
+
:where([class^="xds-"], [class*=" xds-"]) ::file-selector-button {
|
|
752
|
+
border-color: var(--xds-color-border-default);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
:root {
|
|
757
|
+
--xds-layer-overlay: 100000;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/* How every overlay leaves: a menu, a select's list, a tooltip and a dialog fade and shrink a
|
|
761
|
+
little, a dialog's scrim fades. Each starts it on `[data-state="closed"]`, and its component
|
|
762
|
+
keeps it on the page until it ends. Each holds the last frame (`forwards`): a framework may
|
|
763
|
+
paint once more before it removes the overlay, which would otherwise show again for that
|
|
764
|
+
frame. Both ends are set: WebKit does not run a transform animation that starts from an
|
|
765
|
+
implicit `none`.
|
|
766
|
+
The scale is a literal because a custom property inside a keyframe keeps WebKit from running
|
|
767
|
+
the animation on the compositor. */
|
|
768
|
+
@keyframes xds-overlay-exit {
|
|
769
|
+
from {
|
|
770
|
+
opacity: 1;
|
|
771
|
+
transform: scale(1);
|
|
772
|
+
}
|
|
773
|
+
to {
|
|
774
|
+
opacity: 0;
|
|
775
|
+
transform: scale(0.95);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
@keyframes xds-fade-out {
|
|
780
|
+
to {
|
|
781
|
+
opacity: 0;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
@layer components {
|
|
786
|
+
/* A hairline above the first item and one under every item, the last included. */
|
|
787
|
+
.xds-accordion {
|
|
788
|
+
width: 100%;
|
|
789
|
+
border-top: var(--xds-border-width-thin) solid var(--xds-color-accordion-border);
|
|
790
|
+
contain: layout style;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.xds-accordion__item {
|
|
794
|
+
position: relative;
|
|
795
|
+
border-style: none;
|
|
796
|
+
border-bottom: var(--xds-border-width-thin) solid var(--xds-color-accordion-border);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.xds-accordion__heading {
|
|
800
|
+
display: flex;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.xds-accordion__trigger {
|
|
804
|
+
display: flex;
|
|
805
|
+
flex: 1;
|
|
806
|
+
align-items: center;
|
|
807
|
+
justify-content: space-between;
|
|
808
|
+
gap: var(--xds-space-3);
|
|
809
|
+
min-height: var(--xds-size-list-row);
|
|
810
|
+
padding: var(--xds-space-2) var(--xds-space-4);
|
|
811
|
+
font-size: var(--xds-typography-label-size);
|
|
812
|
+
font-weight: var(--xds-typography-label-weight);
|
|
813
|
+
line-height: var(--xds-typography-label-line-height);
|
|
814
|
+
text-align: start;
|
|
815
|
+
cursor: pointer;
|
|
816
|
+
touch-action: manipulation;
|
|
817
|
+
-webkit-tap-highlight-color: transparent;
|
|
818
|
+
transition: background-color var(--xds-motion-duration-fast) var(--xds-motion-easing-standard);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/* Open or closed, the row takes its own fills under the pointer and while pressed. */
|
|
822
|
+
@media (hover: hover) {
|
|
823
|
+
.xds-accordion__trigger:hover {
|
|
824
|
+
background: var(--xds-color-accordion-header-background-hover);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/* A press that drags does not select the title. */
|
|
829
|
+
.xds-accordion__trigger:active {
|
|
830
|
+
background: var(--xds-color-accordion-header-background-pressed);
|
|
831
|
+
user-select: none;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/* Inside the row, so the hairlines next to it do not cut through the ring. */
|
|
835
|
+
.xds-accordion__trigger:focus-visible {
|
|
836
|
+
outline: var(--xds-focus-width) solid var(--xds-color-border-focus);
|
|
837
|
+
outline-offset: calc(-1 * var(--xds-focus-offset));
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
/* Only the height moves. */
|
|
841
|
+
.xds-accordion__panel {
|
|
842
|
+
height: var(--accordion-panel-height, auto);
|
|
843
|
+
overflow: clip;
|
|
844
|
+
transition: height var(--xds-motion-duration-normal) var(--xds-motion-easing-standard);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
@media (prefers-reduced-motion: reduce) {
|
|
848
|
+
.xds-accordion__panel {
|
|
849
|
+
transition: none;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.xds-accordion__body {
|
|
854
|
+
padding: 0 var(--xds-space-4) var(--xds-space-4);
|
|
855
|
+
font-size: var(--xds-typography-body-size);
|
|
856
|
+
line-height: var(--xds-typography-body-line-height);
|
|
857
|
+
color: var(--xds-color-text-secondary);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
@layer components {
|
|
862
|
+
.xds-button {
|
|
863
|
+
/* The fill and the text color of the current state. Variants and states set these. */
|
|
864
|
+
--button-bg: transparent;
|
|
865
|
+
--button-bg-hover: var(--button-bg);
|
|
866
|
+
--button-bg-pressed: var(--button-bg-hover);
|
|
867
|
+
--button-fg: currentColor;
|
|
868
|
+
|
|
869
|
+
position: relative;
|
|
870
|
+
isolation: isolate;
|
|
871
|
+
display: inline-flex;
|
|
872
|
+
align-items: center;
|
|
873
|
+
justify-content: center;
|
|
874
|
+
gap: var(--xds-space-2);
|
|
875
|
+
width: fit-content;
|
|
876
|
+
height: var(--xds-size-control-md);
|
|
877
|
+
/* Never narrower than it is tall, and never smaller than the smallest pressable area. */
|
|
878
|
+
min-width: max(var(--xds-size-control-md), var(--xds-size-target-min));
|
|
879
|
+
padding-inline: var(--xds-space-4);
|
|
880
|
+
/* A rounded rectangle for a pointer, a capsule for fingers. */
|
|
881
|
+
border-radius: var(--xds-size-button-radius);
|
|
882
|
+
background-color: var(--button-bg);
|
|
883
|
+
color: var(--button-fg);
|
|
884
|
+
font-size: var(--xds-typography-label-size);
|
|
885
|
+
font-weight: var(--xds-typography-label-weight);
|
|
886
|
+
line-height: var(--xds-typography-label-line-height);
|
|
887
|
+
white-space: nowrap;
|
|
888
|
+
outline: none;
|
|
889
|
+
cursor: pointer;
|
|
890
|
+
user-select: none;
|
|
891
|
+
-webkit-tap-highlight-color: transparent;
|
|
892
|
+
transform-origin: center;
|
|
893
|
+
transition-property: background-color, border-color, color, transform;
|
|
894
|
+
transition-duration: var(--xds-motion-duration-fast);
|
|
895
|
+
transition-timing-function: var(--xds-motion-easing-standard);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/* Icons, and the spinner that stands in for one, are sized by their own classes. */
|
|
899
|
+
.xds-button svg {
|
|
900
|
+
flex-shrink: 0;
|
|
901
|
+
align-self: center;
|
|
902
|
+
pointer-events: none;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.xds-button:active {
|
|
906
|
+
background-color: var(--button-bg-pressed);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/* A press shrinks the button a little: feedback that does not depend on color. */
|
|
910
|
+
.xds-button:active:not(:disabled) {
|
|
911
|
+
transform: scale(var(--xds-motion-press-scale));
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
@media (prefers-reduced-motion: reduce) {
|
|
915
|
+
.xds-button:active:not(:disabled) {
|
|
916
|
+
transform: none;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
/* After the press and as specific: under a pointer a pressed button keeps its hover fill and
|
|
921
|
+
only shrinks; a finger, which does not hover, gets the pressed fill. */
|
|
922
|
+
@media (hover: hover) {
|
|
923
|
+
.xds-button:hover {
|
|
924
|
+
background-color: var(--button-bg-hover);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/* ------------------------------------------------------------ sizes */
|
|
929
|
+
|
|
930
|
+
.xds-button--sm {
|
|
931
|
+
height: var(--xds-size-control-sm);
|
|
932
|
+
min-width: max(var(--xds-size-control-sm), var(--xds-size-target-min));
|
|
933
|
+
padding-inline: var(--xds-space-3);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
.xds-button--lg {
|
|
937
|
+
height: var(--xds-size-control-lg);
|
|
938
|
+
min-width: var(--xds-size-control-lg);
|
|
939
|
+
padding-inline: var(--xds-space-6);
|
|
940
|
+
font-size: var(--xds-typography-body-strong-size);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.xds-button--full-width {
|
|
944
|
+
width: 100%;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/* ------------------------------------------------------------ variants */
|
|
948
|
+
|
|
949
|
+
.xds-button--primary {
|
|
950
|
+
--button-bg: var(--xds-color-button-primary-background);
|
|
951
|
+
--button-bg-hover: var(--xds-color-button-primary-background-hover);
|
|
952
|
+
--button-bg-pressed: var(--xds-color-button-primary-background-pressed);
|
|
953
|
+
--button-fg: var(--xds-color-button-primary-text);
|
|
954
|
+
/* The same trace of shadow as a secondary button, so the primary one never looks flatter. */
|
|
955
|
+
box-shadow: var(--xds-shadow-subtle);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.xds-button--secondary {
|
|
959
|
+
--button-bg: var(--xds-color-button-secondary-background);
|
|
960
|
+
--button-bg-hover: var(--xds-color-button-secondary-background-hover);
|
|
961
|
+
--button-bg-pressed: var(--xds-color-button-secondary-background-pressed);
|
|
962
|
+
--button-fg: var(--xds-color-button-secondary-text);
|
|
963
|
+
/* Outlined, with a trace of shadow, so it sits quietly beside a primary button. */
|
|
964
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-button-secondary-border);
|
|
965
|
+
box-shadow: var(--xds-shadow-subtle);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.xds-button--ghost {
|
|
969
|
+
--button-bg: transparent;
|
|
970
|
+
--button-bg-hover: var(--xds-color-button-ghost-background-hover);
|
|
971
|
+
--button-bg-pressed: var(--xds-color-button-ghost-background-pressed);
|
|
972
|
+
--button-fg: var(--xds-color-button-ghost-text);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.xds-button--danger {
|
|
976
|
+
--button-bg: var(--xds-color-button-danger-background);
|
|
977
|
+
--button-bg-hover: var(--xds-color-button-danger-background-hover);
|
|
978
|
+
--button-bg-pressed: var(--xds-color-button-danger-background-pressed);
|
|
979
|
+
--button-fg: var(--xds-color-button-danger-text);
|
|
980
|
+
box-shadow: var(--xds-shadow-subtle);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/* ------------------------------------------------------------ toggles */
|
|
984
|
+
|
|
985
|
+
/* A ghost toggle has its outline before it is selected, transparent, so that selecting it
|
|
986
|
+
does not change its width. */
|
|
987
|
+
.xds-button--ghost[aria-pressed] {
|
|
988
|
+
border: var(--xds-border-width-thin) solid transparent;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/* A toggle that is on. The outline, not only the tint, says so; primary and danger buttons
|
|
992
|
+
keep their look and only report the state. */
|
|
993
|
+
.xds-button--secondary[aria-pressed="true"],
|
|
994
|
+
.xds-button--ghost[aria-pressed="true"] {
|
|
995
|
+
--button-bg: var(--xds-color-button-selected-background);
|
|
996
|
+
--button-bg-hover: var(--xds-color-button-selected-background-hover);
|
|
997
|
+
--button-bg-pressed: var(--xds-color-button-selected-background-pressed);
|
|
998
|
+
--button-fg: var(--xds-color-button-selected-text);
|
|
999
|
+
border-color: var(--xds-color-button-selected-border);
|
|
1000
|
+
/* Held down, so nothing lifts it off the page. */
|
|
1001
|
+
box-shadow: none;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/* ------------------------------------------------------------ disabled and loading */
|
|
1005
|
+
|
|
1006
|
+
/* Neither takes the pointer: a disabled button is not there to press, and a loading one has
|
|
1007
|
+
already been pressed. */
|
|
1008
|
+
.xds-button:disabled,
|
|
1009
|
+
.xds-button[aria-disabled="true"] {
|
|
1010
|
+
cursor: not-allowed;
|
|
1011
|
+
pointer-events: none;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
/* A disabled button is recolored, not faded: fading a colored fill leaves a pale version of
|
|
1015
|
+
the same color that still looks pressable. */
|
|
1016
|
+
.xds-button:disabled:not([data-pending]),
|
|
1017
|
+
.xds-button[aria-disabled="true"]:not([data-pending]) {
|
|
1018
|
+
--button-bg: var(--xds-color-button-disabled-background);
|
|
1019
|
+
--button-fg: var(--xds-color-button-disabled-text);
|
|
1020
|
+
box-shadow: none;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.xds-button--secondary:disabled:not([data-pending]),
|
|
1024
|
+
.xds-button--secondary[aria-disabled="true"]:not([data-pending]) {
|
|
1025
|
+
border-color: transparent;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.xds-button--ghost:disabled:not([data-pending]),
|
|
1029
|
+
.xds-button--ghost[aria-disabled="true"]:not([data-pending]) {
|
|
1030
|
+
--button-bg: transparent;
|
|
1031
|
+
border-color: transparent;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
/* While loading the label stays, so the button keeps its width, and so do the colors: the
|
|
1035
|
+
action was accepted, which is the opposite of unavailable. */
|
|
1036
|
+
.xds-button[data-pending] {
|
|
1037
|
+
cursor: progress;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/* ------------------------------------------------------------ icon only */
|
|
1041
|
+
|
|
1042
|
+
/* A Button that holds only an icon is as wide as it is tall, which `min-width` already
|
|
1043
|
+
ensures once the padding is gone. A small one is shorter than a finger needs, so its
|
|
1044
|
+
height has the same floor as its width. */
|
|
1045
|
+
.xds-button.xds-button--icon-only {
|
|
1046
|
+
padding-inline: 0;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.xds-button.xds-button--icon-only.xds-button--sm {
|
|
1050
|
+
height: max(var(--xds-size-control-sm), var(--xds-size-target-min));
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/* IconButton: a square exactly as tall as a button of its size. Where that is smaller than
|
|
1054
|
+
a finger needs, the pressable area grows around it and the square stays what it is. */
|
|
1055
|
+
.xds-button.xds-icon-button {
|
|
1056
|
+
width: var(--xds-size-control-md);
|
|
1057
|
+
min-width: 0;
|
|
1058
|
+
padding-inline: 0;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.xds-button.xds-icon-button.xds-button--sm {
|
|
1062
|
+
width: var(--xds-size-control-sm);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.xds-button.xds-icon-button.xds-button--lg {
|
|
1066
|
+
width: var(--xds-size-control-lg);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
/* Centered with physical offsets, which need no mirroring in a right-to-left layout. */
|
|
1070
|
+
.xds-button.xds-icon-button::after {
|
|
1071
|
+
content: "";
|
|
1072
|
+
position: absolute;
|
|
1073
|
+
top: 50%;
|
|
1074
|
+
left: 50%;
|
|
1075
|
+
width: max(100%, var(--xds-size-target-min));
|
|
1076
|
+
height: max(100%, var(--xds-size-target-min));
|
|
1077
|
+
translate: -50% -50%;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/* ------------------------------------------------------------ focus */
|
|
1081
|
+
|
|
1082
|
+
/* A ring a gap away from the button, in the page's color, so it shows on any fill. It
|
|
1083
|
+
replaces the shadow of the variant and of a selected toggle, so it comes last. */
|
|
1084
|
+
.xds-button:focus-visible {
|
|
1085
|
+
box-shadow:
|
|
1086
|
+
0 0 0 var(--xds-focus-offset) var(--xds-color-background-base),
|
|
1087
|
+
0 0 0 calc(var(--xds-focus-width) + var(--xds-focus-offset)) var(--xds-color-border-focus);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
@layer components {
|
|
1092
|
+
/* Over the page and under the open calendar, as under a Select's list: a press outside only
|
|
1093
|
+
closes the calendar, and the field under the pointer keeps its own border meanwhile. */
|
|
1094
|
+
.xds-date-picker__underlay {
|
|
1095
|
+
position: fixed;
|
|
1096
|
+
inset: 0;
|
|
1097
|
+
z-index: var(--xds-layer-overlay);
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.xds-date-picker__positioner {
|
|
1101
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/* A raised surface, as wide as seven days and its inset. */
|
|
1105
|
+
.xds-date-picker__content {
|
|
1106
|
+
display: flex;
|
|
1107
|
+
flex-direction: column;
|
|
1108
|
+
gap: var(--xds-space-2);
|
|
1109
|
+
width: max-content;
|
|
1110
|
+
padding: var(--xds-space-3);
|
|
1111
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-border-default);
|
|
1112
|
+
border-radius: var(--xds-radius-lg);
|
|
1113
|
+
background: var(--xds-color-date-picker-background);
|
|
1114
|
+
box-shadow: var(--xds-shadow-raised);
|
|
1115
|
+
outline: none;
|
|
1116
|
+
transform-origin: var(--transform-origin);
|
|
1117
|
+
/* A Select's list's entrance, from select.css. */
|
|
1118
|
+
animation: xds-select-enter var(--xds-motion-duration-fast) var(--xds-motion-easing-enter);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.xds-date-picker__content[data-side="top"] {
|
|
1122
|
+
animation-name: xds-select-enter-above;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
/* After the rules above, which it replaces. A closing calendar takes no more presses. */
|
|
1126
|
+
.xds-date-picker__content[data-state="closed"] {
|
|
1127
|
+
animation: xds-overlay-exit var(--xds-motion-duration-fast) var(--xds-motion-easing-exit)
|
|
1128
|
+
forwards;
|
|
1129
|
+
pointer-events: none;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1133
|
+
.xds-date-picker__content,
|
|
1134
|
+
.xds-date-picker__content[data-state="closed"] {
|
|
1135
|
+
animation: none;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/* The month between its two buttons. */
|
|
1140
|
+
.xds-date-picker__header {
|
|
1141
|
+
display: flex;
|
|
1142
|
+
align-items: center;
|
|
1143
|
+
gap: var(--xds-space-2);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
.xds-date-picker__heading {
|
|
1147
|
+
flex: 1 1 0%;
|
|
1148
|
+
min-width: 0;
|
|
1149
|
+
text-align: center;
|
|
1150
|
+
font-size: var(--xds-typography-body-strong-size);
|
|
1151
|
+
font-weight: var(--xds-typography-body-strong-weight);
|
|
1152
|
+
line-height: var(--xds-typography-body-strong-line-height);
|
|
1153
|
+
letter-spacing: var(--xds-typography-body-strong-letter-spacing);
|
|
1154
|
+
color: var(--xds-color-date-picker-heading);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/* Seven columns of one day's side; the rows of days are as tall. */
|
|
1158
|
+
.xds-date-picker__grid {
|
|
1159
|
+
border-collapse: collapse;
|
|
1160
|
+
border-spacing: 0;
|
|
1161
|
+
table-layout: fixed;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.xds-date-picker__weekday,
|
|
1165
|
+
.xds-date-picker__cell {
|
|
1166
|
+
width: var(--xds-size-calendar-day);
|
|
1167
|
+
height: var(--xds-size-calendar-day);
|
|
1168
|
+
padding: 0;
|
|
1169
|
+
text-align: center;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
.xds-date-picker__weekday {
|
|
1173
|
+
font-size: var(--xds-typography-footnote-size);
|
|
1174
|
+
font-weight: var(--xds-typography-footnote-weight);
|
|
1175
|
+
line-height: var(--xds-typography-footnote-line-height);
|
|
1176
|
+
color: var(--xds-color-date-picker-weekday);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/* A circle inset a little into its cell, so that two marked days side by side stay apart. */
|
|
1180
|
+
.xds-date-picker__day {
|
|
1181
|
+
display: flex;
|
|
1182
|
+
align-items: center;
|
|
1183
|
+
justify-content: center;
|
|
1184
|
+
width: calc(var(--xds-size-calendar-day) - 2 * var(--xds-space-0-5));
|
|
1185
|
+
height: calc(var(--xds-size-calendar-day) - 2 * var(--xds-space-0-5));
|
|
1186
|
+
margin: var(--xds-space-0-5);
|
|
1187
|
+
border-radius: var(--xds-radius-full);
|
|
1188
|
+
font-size: var(--xds-typography-body-size);
|
|
1189
|
+
font-weight: var(--xds-typography-body-weight);
|
|
1190
|
+
line-height: var(--xds-typography-body-line-height);
|
|
1191
|
+
font-variant-numeric: tabular-nums;
|
|
1192
|
+
color: var(--xds-color-date-picker-day-text);
|
|
1193
|
+
outline: none;
|
|
1194
|
+
cursor: pointer;
|
|
1195
|
+
user-select: none;
|
|
1196
|
+
touch-action: manipulation;
|
|
1197
|
+
-webkit-tap-highlight-color: transparent;
|
|
1198
|
+
transition-property: background-color, color, box-shadow;
|
|
1199
|
+
transition-duration: var(--xds-motion-duration-fast);
|
|
1200
|
+
transition-timing-function: var(--xds-motion-easing-standard);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
/* The days of the months around this one are not drawn; their cells keep the grid's shape. */
|
|
1204
|
+
.xds-date-picker__day[data-outside-range] {
|
|
1205
|
+
visibility: hidden;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
/* Bolder as well as in the accent, so that today does not depend on telling colors apart,
|
|
1209
|
+
and ringed, as a phone's calendar marks it. */
|
|
1210
|
+
.xds-date-picker__day[data-today] {
|
|
1211
|
+
font-weight: var(--xds-typography-body-strong-weight);
|
|
1212
|
+
color: var(--xds-color-date-picker-today-text);
|
|
1213
|
+
box-shadow: inset 0 0 0 var(--xds-border-width-thin) var(--xds-color-date-picker-today-border);
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
@media (hover: hover) {
|
|
1217
|
+
.xds-date-picker__day:hover {
|
|
1218
|
+
background-color: var(--xds-color-date-picker-day-background-hover);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/* The keyboard's day: the pointer's fill, and the ring a gap away from the circle, in the
|
|
1223
|
+
surface's color, as around a Button. */
|
|
1224
|
+
.xds-date-picker__day:focus-visible {
|
|
1225
|
+
background-color: var(--xds-color-date-picker-day-background-hover);
|
|
1226
|
+
box-shadow:
|
|
1227
|
+
0 0 0 var(--xds-focus-offset) var(--xds-color-date-picker-background),
|
|
1228
|
+
0 0 0 calc(var(--xds-focus-width) + var(--xds-focus-offset)) var(--xds-color-border-focus);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
.xds-date-picker__day[data-today]:focus-visible {
|
|
1232
|
+
box-shadow:
|
|
1233
|
+
inset 0 0 0 var(--xds-border-width-thin) var(--xds-color-date-picker-today-border),
|
|
1234
|
+
0 0 0 var(--xds-focus-offset) var(--xds-color-date-picker-background),
|
|
1235
|
+
0 0 0 calc(var(--xds-focus-width) + var(--xds-focus-offset)) var(--xds-color-border-focus);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.xds-date-picker__day:active {
|
|
1239
|
+
background-color: var(--xds-color-date-picker-day-background-pressed);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/* The chosen day: a filled circle, which today's ring would only repeat. */
|
|
1243
|
+
.xds-date-picker__day[data-selected] {
|
|
1244
|
+
background-color: var(--xds-color-date-picker-selected-background);
|
|
1245
|
+
color: var(--xds-color-date-picker-selected-text);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.xds-date-picker__day[data-selected][data-today]:not(:focus-visible) {
|
|
1249
|
+
box-shadow: none;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
@media (hover: hover) {
|
|
1253
|
+
.xds-date-picker__day[data-selected]:hover {
|
|
1254
|
+
background-color: var(--xds-color-date-picker-selected-background-hover);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.xds-date-picker__day[data-selected]:active {
|
|
1259
|
+
background-color: var(--xds-color-date-picker-selected-background-pressed);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
/* DateRangePicker. A day in the band: its number in the band's text color, and the band's own
|
|
1263
|
+
fills under the pointer and the keyboard. The ends keep the chosen day's circle. */
|
|
1264
|
+
.xds-date-picker__day[data-in-range]:not(
|
|
1265
|
+
[data-selected],
|
|
1266
|
+
[data-hover-range-end],
|
|
1267
|
+
[data-disabled],
|
|
1268
|
+
[data-today]
|
|
1269
|
+
) {
|
|
1270
|
+
color: var(--xds-color-date-picker-range-text);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
@media (hover: hover) {
|
|
1274
|
+
.xds-date-picker__day[data-in-range]:not(
|
|
1275
|
+
[data-selected],
|
|
1276
|
+
[data-hover-range-end],
|
|
1277
|
+
[data-disabled]
|
|
1278
|
+
):hover {
|
|
1279
|
+
background-color: var(--xds-color-date-picker-range-background-hover);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
.xds-date-picker__day[data-in-range]:not(
|
|
1284
|
+
[data-selected],
|
|
1285
|
+
[data-hover-range-end],
|
|
1286
|
+
[data-disabled]
|
|
1287
|
+
):focus-visible {
|
|
1288
|
+
background-color: var(--xds-color-date-picker-range-background-hover);
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
.xds-date-picker__day[data-in-range]:not(
|
|
1292
|
+
[data-selected],
|
|
1293
|
+
[data-hover-range-end],
|
|
1294
|
+
[data-disabled]
|
|
1295
|
+
):active {
|
|
1296
|
+
background-color: var(--xds-color-date-picker-range-background-pressed);
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/* The day a preview runs to is drawn as the end it would be. */
|
|
1300
|
+
.xds-date-picker__day[data-hover-range-end] {
|
|
1301
|
+
background-color: var(--xds-color-date-picker-selected-background);
|
|
1302
|
+
color: var(--xds-color-date-picker-selected-text);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.xds-date-picker__day[data-hover-range-end][data-today]:not(:focus-visible) {
|
|
1306
|
+
box-shadow: none;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
@media (hover: hover) {
|
|
1310
|
+
.xds-date-picker__day[data-hover-range-end]:hover {
|
|
1311
|
+
background-color: var(--xds-color-date-picker-selected-background-hover);
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.xds-date-picker__day[data-hover-range-end]:active {
|
|
1316
|
+
background-color: var(--xds-color-date-picker-selected-background-pressed);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
/* Outside `min`..`max`: dimmed, and nothing under the pointer. Last, so it outranks the
|
|
1320
|
+
states above. A range's start alone is unavailable as its own end while the length rules
|
|
1321
|
+
it out, and stays the start's circle. */
|
|
1322
|
+
.xds-date-picker__day[data-disabled]:not([data-selected][data-unavailable]) {
|
|
1323
|
+
background-color: transparent;
|
|
1324
|
+
color: var(--xds-color-date-picker-disabled-text);
|
|
1325
|
+
cursor: default;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
.xds-date-picker__day[data-selected][data-unavailable] {
|
|
1329
|
+
background-color: var(--xds-color-date-picker-selected-background);
|
|
1330
|
+
cursor: default;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/*
|
|
1335
|
+
* DateRangePicker's surface and its band. The band is drawn under the days of each cell in the
|
|
1336
|
+
* range, as tall as a day's circle, and runs from the middle of the start's cell to the middle
|
|
1337
|
+
* of the end's: the ends are circles on it. It is rounded at the ends of each week, and runs to
|
|
1338
|
+
* the edge of a cell elsewhere, so that a range into the next month runs on across its grid.
|
|
1339
|
+
* The days of the months around are hidden, and so is the band under them. Logical insets and
|
|
1340
|
+
* corners, so that a right-to-left calendar mirrors it.
|
|
1341
|
+
*/
|
|
1342
|
+
@layer components {
|
|
1343
|
+
/* As wide as the months, which it does not widen: the two ends go on two lines over one. */
|
|
1344
|
+
.xds-date-range-picker__summary {
|
|
1345
|
+
display: flex;
|
|
1346
|
+
flex-wrap: wrap;
|
|
1347
|
+
justify-content: space-between;
|
|
1348
|
+
column-gap: var(--xds-space-3);
|
|
1349
|
+
contain: inline-size;
|
|
1350
|
+
font-size: var(--xds-typography-footnote-size);
|
|
1351
|
+
font-weight: var(--xds-typography-footnote-weight);
|
|
1352
|
+
line-height: var(--xds-typography-footnote-line-height);
|
|
1353
|
+
letter-spacing: var(--xds-typography-footnote-letter-spacing);
|
|
1354
|
+
color: var(--xds-color-date-picker-weekday);
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
.xds-date-range-picker__months {
|
|
1358
|
+
display: flex;
|
|
1359
|
+
gap: var(--xds-space-4);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
.xds-date-range-picker__month {
|
|
1363
|
+
display: flex;
|
|
1364
|
+
flex-direction: column;
|
|
1365
|
+
gap: var(--xds-space-2);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/* As wide as a month button, so that each heading is centered over its grid. */
|
|
1369
|
+
.xds-date-range-picker__nav-space {
|
|
1370
|
+
flex: none;
|
|
1371
|
+
width: var(--xds-size-control-sm);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/* Above the band, which is positioned. */
|
|
1375
|
+
.xds-date-range-picker__content .xds-date-picker__day {
|
|
1376
|
+
position: relative;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
.xds-date-range-picker__content .xds-date-picker__cell {
|
|
1380
|
+
position: relative;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
.xds-date-picker__cell:has(> [data-in-range]:not([data-outside-range]))::before {
|
|
1384
|
+
content: "";
|
|
1385
|
+
position: absolute;
|
|
1386
|
+
inset-block: var(--xds-space-0-5);
|
|
1387
|
+
inset-inline: 0;
|
|
1388
|
+
background: var(--xds-color-date-picker-range-background);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
/* A range of one day has both, and no band. */
|
|
1392
|
+
.xds-date-picker__cell:has(
|
|
1393
|
+
> [data-in-range]:is([data-range-start], [data-hover-range-start])
|
|
1394
|
+
)::before {
|
|
1395
|
+
inset-inline-start: 50%;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
.xds-date-picker__cell:has(
|
|
1399
|
+
> [data-in-range]:is([data-range-end], [data-hover-range-end])
|
|
1400
|
+
)::before {
|
|
1401
|
+
inset-inline-end: 50%;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
.xds-date-picker__cell:first-child::before {
|
|
1405
|
+
border-start-start-radius: var(--xds-radius-full);
|
|
1406
|
+
border-end-start-radius: var(--xds-radius-full);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
.xds-date-picker__cell:last-child::before {
|
|
1410
|
+
border-start-end-radius: var(--xds-radius-full);
|
|
1411
|
+
border-end-end-radius: var(--xds-radius-full);
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
@layer components {
|
|
1416
|
+
.xds-dialog__backdrop {
|
|
1417
|
+
position: fixed;
|
|
1418
|
+
inset: 0;
|
|
1419
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1420
|
+
background: var(--xds-color-scrim);
|
|
1421
|
+
/* Zag turns pointer events off on the body while the dialog is open, and the backdrop would
|
|
1422
|
+
inherit that. It takes a press beside the dialog itself, so the component can keep the
|
|
1423
|
+
focus in the dialog. */
|
|
1424
|
+
pointer-events: auto;
|
|
1425
|
+
animation: xds-fade-in var(--xds-motion-duration-normal) var(--xds-motion-easing-enter);
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/* As wide as the window, so the dialog inside can be `size.dialog` wide whatever it holds,
|
|
1429
|
+
and never closer to an edge than the padding. */
|
|
1430
|
+
.xds-dialog__positioner {
|
|
1431
|
+
position: fixed;
|
|
1432
|
+
inset: 0;
|
|
1433
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1434
|
+
display: flex;
|
|
1435
|
+
flex-direction: column;
|
|
1436
|
+
align-items: center;
|
|
1437
|
+
padding: var(--xds-space-4);
|
|
1438
|
+
/* A press beside the dialog reaches the backdrop, which is outside the dialog. */
|
|
1439
|
+
pointer-events: none;
|
|
1440
|
+
animation: xds-dialog-enter var(--xds-motion-duration-normal) var(--xds-motion-easing-enter);
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/* After the rules above, which they replace. The positioner follows the dialog's state, as
|
|
1444
|
+
Zag gives the positioner none; a closing dialog takes no more presses. */
|
|
1445
|
+
.xds-dialog__backdrop[data-state="closed"] {
|
|
1446
|
+
animation: xds-fade-out var(--xds-motion-duration-fast) var(--xds-motion-easing-exit)
|
|
1447
|
+
forwards;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
.xds-dialog__positioner:has(> .xds-dialog[data-state="closed"]) {
|
|
1451
|
+
animation: xds-overlay-exit var(--xds-motion-duration-fast) var(--xds-motion-easing-exit)
|
|
1452
|
+
forwards;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
.xds-dialog[data-state="closed"] {
|
|
1456
|
+
pointer-events: none;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1460
|
+
.xds-dialog__backdrop,
|
|
1461
|
+
.xds-dialog__positioner,
|
|
1462
|
+
.xds-dialog__backdrop[data-state="closed"],
|
|
1463
|
+
.xds-dialog__positioner:has(> .xds-dialog[data-state="closed"]) {
|
|
1464
|
+
animation: none;
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
.xds-dialog {
|
|
1469
|
+
position: relative;
|
|
1470
|
+
display: flex;
|
|
1471
|
+
flex-direction: column;
|
|
1472
|
+
gap: var(--xds-space-4);
|
|
1473
|
+
width: 100%;
|
|
1474
|
+
max-width: var(--xds-size-dialog);
|
|
1475
|
+
max-height: 100%;
|
|
1476
|
+
min-height: 0;
|
|
1477
|
+
margin-block: auto;
|
|
1478
|
+
padding: var(--xds-space-6);
|
|
1479
|
+
overflow: clip;
|
|
1480
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-dialog-border);
|
|
1481
|
+
border-radius: var(--xds-radius-lg);
|
|
1482
|
+
background: var(--xds-color-dialog-background);
|
|
1483
|
+
box-shadow: var(--xds-shadow-overlay);
|
|
1484
|
+
outline: none;
|
|
1485
|
+
pointer-events: auto;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
.xds-dialog__title {
|
|
1489
|
+
font-size: var(--xds-typography-title-size);
|
|
1490
|
+
font-weight: var(--xds-typography-title-weight);
|
|
1491
|
+
line-height: var(--xds-typography-title-line-height);
|
|
1492
|
+
letter-spacing: var(--xds-typography-title-letter-spacing);
|
|
1493
|
+
color: var(--xds-color-dialog-title);
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
.xds-dialog__description {
|
|
1497
|
+
font-size: var(--xds-typography-body-size);
|
|
1498
|
+
font-weight: var(--xds-typography-body-weight);
|
|
1499
|
+
line-height: var(--xds-typography-body-line-height);
|
|
1500
|
+
letter-spacing: var(--xds-typography-body-letter-spacing);
|
|
1501
|
+
color: var(--xds-color-dialog-text);
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/* The body scrolls, which clips whatever is drawn outside it. The inset leaves room for
|
|
1505
|
+
the focus ring of a field inside, and the negative margin takes it back, so the text
|
|
1506
|
+
still lines up with the title. */
|
|
1507
|
+
.xds-dialog__body {
|
|
1508
|
+
flex: 1;
|
|
1509
|
+
min-height: 0;
|
|
1510
|
+
margin: calc(-1 * (var(--xds-focus-width) + var(--xds-focus-offset)));
|
|
1511
|
+
padding: calc(var(--xds-focus-width) + var(--xds-focus-offset));
|
|
1512
|
+
overflow-y: auto;
|
|
1513
|
+
overscroll-behavior: contain;
|
|
1514
|
+
font-size: var(--xds-typography-body-size);
|
|
1515
|
+
line-height: var(--xds-typography-body-line-height);
|
|
1516
|
+
color: var(--xds-color-dialog-text);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/* Buttons, in a row at the end edge. */
|
|
1520
|
+
.xds-dialog__actions {
|
|
1521
|
+
display: flex;
|
|
1522
|
+
align-items: center;
|
|
1523
|
+
justify-content: flex-end;
|
|
1524
|
+
gap: var(--xds-space-2);
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
@keyframes xds-fade-in {
|
|
1529
|
+
from {
|
|
1530
|
+
opacity: 0;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/* A dialog grows a little as it fades in. The scale is a literal because a custom property
|
|
1535
|
+
inside a keyframe keeps WebKit from running the animation on the compositor. */
|
|
1536
|
+
@keyframes xds-dialog-enter {
|
|
1537
|
+
from {
|
|
1538
|
+
opacity: 0;
|
|
1539
|
+
transform: scale(0.96);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
@layer components {
|
|
1544
|
+
/* The trigger stays pressed while its menu is open, which ties the menu to the control it
|
|
1545
|
+
came from. The underlay is over it, so the pointer does not turn it back to its hover
|
|
1546
|
+
fill. */
|
|
1547
|
+
.xds-menu__trigger[aria-expanded="true"] {
|
|
1548
|
+
background-color: var(--button-bg-pressed);
|
|
1549
|
+
transform: scale(var(--xds-motion-press-scale));
|
|
1550
|
+
will-change: transform;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1554
|
+
.xds-menu__trigger[aria-expanded="true"] {
|
|
1555
|
+
transform: none;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/* Over the page and under the open menu: a press outside lands here and only closes the
|
|
1560
|
+
menu, and nothing on the page reacts to the pointer meanwhile. Rendered before the
|
|
1561
|
+
positioner, it is under it at the same level. Inside a dialog it is above the dialog,
|
|
1562
|
+
which was rendered earlier. */
|
|
1563
|
+
.xds-menu__underlay {
|
|
1564
|
+
position: fixed;
|
|
1565
|
+
inset: 0;
|
|
1566
|
+
z-index: var(--xds-layer-overlay);
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.xds-menu__positioner {
|
|
1570
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
.xds-menu {
|
|
1574
|
+
display: flex;
|
|
1575
|
+
flex-direction: column;
|
|
1576
|
+
/* Four times `space.12`: wide enough that a menu of short words does not look like a
|
|
1577
|
+
stack of chips. Beyond that it is as wide as its longest row. */
|
|
1578
|
+
min-width: calc(4 * var(--xds-space-12));
|
|
1579
|
+
max-width: calc(100svw - 2 * var(--xds-space-4));
|
|
1580
|
+
max-height: var(--available-height);
|
|
1581
|
+
padding: var(--xds-space-1);
|
|
1582
|
+
overflow-y: auto;
|
|
1583
|
+
overscroll-behavior: contain;
|
|
1584
|
+
scroll-padding-block: var(--xds-space-1);
|
|
1585
|
+
scrollbar-width: thin;
|
|
1586
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-menu-border);
|
|
1587
|
+
border-radius: var(--xds-radius-md);
|
|
1588
|
+
background: var(--xds-color-menu-background);
|
|
1589
|
+
box-shadow: var(--xds-shadow-raised);
|
|
1590
|
+
outline: none;
|
|
1591
|
+
transform-origin: var(--transform-origin);
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/* It grows in from the trigger's side. */
|
|
1595
|
+
.xds-menu[data-side="bottom"] {
|
|
1596
|
+
animation: xds-menu-enter-down var(--xds-motion-duration-fast) var(--xds-motion-easing-enter);
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
.xds-menu[data-side="top"] {
|
|
1600
|
+
animation: xds-menu-enter-up var(--xds-motion-duration-fast) var(--xds-motion-easing-enter);
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/* After the rules above, which it replaces. A closing menu takes no more presses. */
|
|
1604
|
+
.xds-menu[data-state="closed"] {
|
|
1605
|
+
animation: xds-overlay-exit var(--xds-motion-duration-fast) var(--xds-motion-easing-exit)
|
|
1606
|
+
forwards;
|
|
1607
|
+
pointer-events: none;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1611
|
+
.xds-menu[data-side],
|
|
1612
|
+
.xds-menu[data-state="closed"] {
|
|
1613
|
+
animation: none;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
/* A row of a menu looks like a compact list row. A compact row is shorter than a finger
|
|
1618
|
+
needs, so on a touch screen it grows to the smallest pressable size. The padding above and
|
|
1619
|
+
below only shows on a row of two lines. */
|
|
1620
|
+
.xds-menu__item {
|
|
1621
|
+
position: relative;
|
|
1622
|
+
display: flex;
|
|
1623
|
+
align-items: center;
|
|
1624
|
+
justify-content: flex-start;
|
|
1625
|
+
gap: var(--xds-space-2);
|
|
1626
|
+
width: 100%;
|
|
1627
|
+
min-height: max(var(--xds-size-list-row-compact), var(--xds-size-target-min));
|
|
1628
|
+
padding: var(--xds-space-1) var(--xds-space-2);
|
|
1629
|
+
border-radius: var(--xds-radius-sm);
|
|
1630
|
+
white-space: nowrap;
|
|
1631
|
+
font-size: var(--xds-typography-detail-size);
|
|
1632
|
+
font-weight: var(--xds-typography-detail-weight);
|
|
1633
|
+
line-height: var(--xds-typography-detail-line-height);
|
|
1634
|
+
color: var(--xds-color-menu-text);
|
|
1635
|
+
outline: none;
|
|
1636
|
+
cursor: pointer;
|
|
1637
|
+
touch-action: manipulation;
|
|
1638
|
+
-webkit-tap-highlight-color: transparent;
|
|
1639
|
+
transition: background-color var(--xds-motion-duration-fast) var(--xds-motion-easing-standard);
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
.xds-menu__item-icon {
|
|
1643
|
+
color: var(--xds-color-menu-icon);
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
/* The pointer moves the same highlight as the arrow keys, so one rule draws both. The
|
|
1647
|
+
highlight is a fill, which shows inside the menu where a focus ring would be clipped. */
|
|
1648
|
+
.xds-menu__item[data-highlighted] {
|
|
1649
|
+
background: var(--xds-color-menu-item-background-hover);
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
/* A press that drags does not select the row's text. */
|
|
1653
|
+
.xds-menu__item:active {
|
|
1654
|
+
background: var(--xds-color-menu-item-background-pressed);
|
|
1655
|
+
user-select: none;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
.xds-menu__item--danger,
|
|
1659
|
+
.xds-menu__item--danger .xds-menu__item-icon {
|
|
1660
|
+
color: var(--xds-color-menu-danger-text);
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
.xds-menu__item--danger[data-highlighted],
|
|
1664
|
+
.xds-menu__item--danger:active {
|
|
1665
|
+
background: var(--xds-color-menu-danger-background-hover);
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
/* Recolored, not faded, like a disabled button. */
|
|
1669
|
+
.xds-menu__item[data-disabled],
|
|
1670
|
+
.xds-menu__item[data-disabled] .xds-menu__item-icon {
|
|
1671
|
+
color: var(--xds-color-menu-text-disabled);
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
.xds-menu__item[data-disabled] {
|
|
1675
|
+
cursor: not-allowed;
|
|
1676
|
+
pointer-events: none;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
.xds-menu__separator {
|
|
1680
|
+
flex-shrink: 0;
|
|
1681
|
+
height: var(--xds-border-width-thin);
|
|
1682
|
+
margin-block: var(--xds-space-1);
|
|
1683
|
+
background: var(--xds-color-menu-border);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
/* Literal offsets and scales: a custom property inside a keyframe keeps WebKit from running the
|
|
1688
|
+
animation on the compositor. */
|
|
1689
|
+
@keyframes xds-menu-enter-down {
|
|
1690
|
+
from {
|
|
1691
|
+
opacity: 0;
|
|
1692
|
+
transform: translate3d(0, -0.25rem, 0) scale(0.9);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
@keyframes xds-menu-enter-up {
|
|
1697
|
+
from {
|
|
1698
|
+
opacity: 0;
|
|
1699
|
+
transform: translate3d(0, 0.25rem, 0) scale(0.9);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
@layer components {
|
|
1704
|
+
.xds-radio-group {
|
|
1705
|
+
display: flex;
|
|
1706
|
+
flex-direction: column;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
.xds-radio-group__label {
|
|
1710
|
+
margin-bottom: var(--xds-space-1);
|
|
1711
|
+
font-size: var(--xds-typography-label-size);
|
|
1712
|
+
font-weight: var(--xds-typography-label-weight);
|
|
1713
|
+
line-height: var(--xds-typography-label-line-height);
|
|
1714
|
+
color: var(--xds-color-text-primary);
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
.xds-radio-group__options {
|
|
1718
|
+
display: flex;
|
|
1719
|
+
flex-direction: column;
|
|
1720
|
+
gap: var(--xds-space-2);
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
.xds-radio-group__option {
|
|
1724
|
+
position: relative;
|
|
1725
|
+
display: flex;
|
|
1726
|
+
align-items: center;
|
|
1727
|
+
width: fit-content;
|
|
1728
|
+
min-height: var(--xds-size-target-min);
|
|
1729
|
+
cursor: pointer;
|
|
1730
|
+
user-select: none;
|
|
1731
|
+
touch-action: manipulation;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.xds-radio-group__row {
|
|
1735
|
+
display: flex;
|
|
1736
|
+
align-items: flex-start;
|
|
1737
|
+
gap: var(--xds-space-2);
|
|
1738
|
+
font-size: var(--xds-typography-body-size);
|
|
1739
|
+
font-weight: var(--xds-typography-body-weight);
|
|
1740
|
+
line-height: var(--xds-typography-body-line-height);
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
/* The circle sits on the first line of the label, however many lines the label wraps to.
|
|
1744
|
+
`1lh` is the height of that line; on a touch screen the circle may be the taller of the
|
|
1745
|
+
two. */
|
|
1746
|
+
.xds-radio-group__circle-line {
|
|
1747
|
+
display: flex;
|
|
1748
|
+
flex-shrink: 0;
|
|
1749
|
+
align-items: center;
|
|
1750
|
+
height: max(1lh, var(--xds-size-radio));
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
.xds-radio-group__circle {
|
|
1754
|
+
display: flex;
|
|
1755
|
+
align-items: center;
|
|
1756
|
+
justify-content: center;
|
|
1757
|
+
width: var(--xds-size-radio);
|
|
1758
|
+
height: var(--xds-size-radio);
|
|
1759
|
+
border-radius: calc(infinity * 1px);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
/* Half of the whole circle, ring included, not of the space inside it. */
|
|
1763
|
+
.xds-radio-group__dot {
|
|
1764
|
+
display: none;
|
|
1765
|
+
width: calc(var(--xds-size-radio) / 2);
|
|
1766
|
+
height: calc(var(--xds-size-radio) / 2);
|
|
1767
|
+
border-radius: calc(infinity * 1px);
|
|
1768
|
+
background-color: var(--xds-color-radio-dot);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:checked) .xds-radio-group__dot {
|
|
1772
|
+
display: block;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
/* Around the circle, as around a checkbox's box. */
|
|
1776
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:focus-visible)
|
|
1777
|
+
.xds-radio-group__circle {
|
|
1778
|
+
outline: var(--xds-focus-width) solid var(--xds-color-border-focus);
|
|
1779
|
+
outline-offset: var(--xds-focus-offset);
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
/* The whole group is enabled or disabled, so the circle has one look or the other. Enabled,
|
|
1783
|
+
a thin ring at rest and a thick one around a dot when chosen, so the choice does not
|
|
1784
|
+
depend on color; disabled, filled instead of outlined, like a disabled checkbox. */
|
|
1785
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:disabled) .xds-radio-group__circle {
|
|
1786
|
+
background-color: var(--xds-color-radio-disabled-background);
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:enabled) .xds-radio-group__circle {
|
|
1790
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-radio-border);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:enabled:checked)
|
|
1794
|
+
.xds-radio-group__circle {
|
|
1795
|
+
border-width: var(--xds-border-width-thick);
|
|
1796
|
+
border-color: var(--xds-color-radio-border-checked);
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/* The label and the description under it. */
|
|
1800
|
+
.xds-radio-group__words {
|
|
1801
|
+
display: flex;
|
|
1802
|
+
flex-direction: column;
|
|
1803
|
+
min-width: 0;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
.xds-radio-group__text {
|
|
1807
|
+
color: var(--xds-color-text-primary);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
.xds-radio-group__description {
|
|
1811
|
+
font-size: var(--xds-typography-detail-size);
|
|
1812
|
+
line-height: var(--xds-typography-detail-line-height);
|
|
1813
|
+
overflow-wrap: break-word;
|
|
1814
|
+
color: var(--xds-color-text-secondary);
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
/* An inline run in its live region, which is as tall as a line of the group's text. */
|
|
1818
|
+
.xds-radio-group__error {
|
|
1819
|
+
margin-top: var(--xds-space-1);
|
|
1820
|
+
font-size: var(--xds-typography-detail-size);
|
|
1821
|
+
line-height: var(--xds-typography-detail-line-height);
|
|
1822
|
+
overflow-wrap: break-word;
|
|
1823
|
+
color: var(--xds-color-status-danger);
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
/* ------------------------------------------------------------ disabled */
|
|
1827
|
+
|
|
1828
|
+
/* The text is recolored rather than faded. */
|
|
1829
|
+
.xds-radio-group:has(.xds-radio-group__input:disabled) .xds-radio-group__label {
|
|
1830
|
+
color: var(--xds-color-text-disabled);
|
|
1831
|
+
cursor: not-allowed;
|
|
1832
|
+
pointer-events: none;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:disabled) {
|
|
1836
|
+
cursor: not-allowed;
|
|
1837
|
+
pointer-events: none;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:disabled) .xds-radio-group__dot {
|
|
1841
|
+
background-color: var(--xds-color-radio-disabled-dot);
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:disabled) .xds-radio-group__text,
|
|
1845
|
+
.xds-radio-group__option:has(> .xds-radio-group__input:disabled)
|
|
1846
|
+
.xds-radio-group__description {
|
|
1847
|
+
color: var(--xds-color-text-disabled);
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
@layer components {
|
|
1852
|
+
.xds-select,
|
|
1853
|
+
.xds-date-picker {
|
|
1854
|
+
display: flex;
|
|
1855
|
+
flex-direction: column;
|
|
1856
|
+
gap: var(--xds-space-1);
|
|
1857
|
+
width: 100%;
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
.xds-select__label,
|
|
1861
|
+
.xds-date-picker__label {
|
|
1862
|
+
width: fit-content;
|
|
1863
|
+
font-size: var(--xds-typography-label-size);
|
|
1864
|
+
font-weight: var(--xds-typography-label-weight);
|
|
1865
|
+
line-height: var(--xds-typography-label-line-height);
|
|
1866
|
+
color: var(--xds-color-text-primary);
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
.xds-select:has(.xds-select__trigger:disabled) .xds-select__label,
|
|
1870
|
+
.xds-date-picker:has(.xds-date-picker__trigger:disabled) .xds-date-picker__label {
|
|
1871
|
+
opacity: 0.5;
|
|
1872
|
+
cursor: not-allowed;
|
|
1873
|
+
pointer-events: none;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
/* ------------------------------------------------------------ the field */
|
|
1877
|
+
|
|
1878
|
+
/* A text field's box: the same height, inset, corners and type, with the icon at the end
|
|
1879
|
+
(the chevrons, or a DatePicker's calendar) a gap away from the value. */
|
|
1880
|
+
.xds-select__trigger,
|
|
1881
|
+
.xds-date-picker__trigger {
|
|
1882
|
+
position: relative;
|
|
1883
|
+
isolation: isolate;
|
|
1884
|
+
display: flex;
|
|
1885
|
+
align-items: center;
|
|
1886
|
+
gap: var(--xds-space-2);
|
|
1887
|
+
width: 100%;
|
|
1888
|
+
min-height: var(--xds-size-control-md);
|
|
1889
|
+
padding-block: 0;
|
|
1890
|
+
padding-inline: var(--xds-space-3);
|
|
1891
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-field-border);
|
|
1892
|
+
border-radius: var(--xds-radius-md);
|
|
1893
|
+
background-color: var(--xds-color-field-background);
|
|
1894
|
+
color: var(--xds-color-field-text);
|
|
1895
|
+
text-align: start;
|
|
1896
|
+
outline-style: none;
|
|
1897
|
+
cursor: pointer;
|
|
1898
|
+
user-select: none;
|
|
1899
|
+
touch-action: manipulation;
|
|
1900
|
+
-webkit-tap-highlight-color: transparent;
|
|
1901
|
+
transition-property: background-color, border-color, box-shadow;
|
|
1902
|
+
transition-duration: var(--xds-motion-duration-fast);
|
|
1903
|
+
transition-timing-function: var(--xds-motion-easing-standard);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
/* A text field's ring sits on its border, not a gap away from it. */
|
|
1907
|
+
.xds-select__trigger:focus-visible,
|
|
1908
|
+
.xds-date-picker__trigger:focus-visible {
|
|
1909
|
+
border-color: var(--xds-color-field-border-focus);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
/* Invalid as a text field is: red, and thicker, so the state does not depend on telling
|
|
1913
|
+
colors apart. Focused, it stays red and the inner line goes. */
|
|
1914
|
+
.xds-select__trigger[data-invalid],
|
|
1915
|
+
.xds-date-picker__trigger[data-invalid] {
|
|
1916
|
+
border-color: var(--xds-color-field-border-invalid);
|
|
1917
|
+
box-shadow: inset 0 0 0 var(--xds-border-width-thin) var(--xds-color-field-border-invalid);
|
|
1918
|
+
outline: var(--xds-border-width-thin) solid var(--xds-color-danger-default);
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
.xds-select__trigger[data-invalid]:focus,
|
|
1922
|
+
.xds-date-picker__trigger[data-invalid]:focus {
|
|
1923
|
+
box-shadow: none;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
/* After focus and the error, which it outranks. */
|
|
1927
|
+
@media (hover: hover) {
|
|
1928
|
+
.xds-select__trigger:hover,
|
|
1929
|
+
.xds-date-picker__trigger:hover {
|
|
1930
|
+
border-color: var(--xds-color-text-primary);
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
.xds-select__trigger:disabled,
|
|
1935
|
+
.xds-date-picker__trigger:disabled {
|
|
1936
|
+
opacity: 0.5;
|
|
1937
|
+
cursor: not-allowed;
|
|
1938
|
+
pointer-events: none;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
/* One line, cut short with an ellipsis, so a long option does not make the field taller. */
|
|
1942
|
+
.xds-select__value,
|
|
1943
|
+
.xds-date-picker__value {
|
|
1944
|
+
flex: 1 1 0%;
|
|
1945
|
+
min-width: 0;
|
|
1946
|
+
overflow: hidden;
|
|
1947
|
+
text-overflow: ellipsis;
|
|
1948
|
+
white-space: nowrap;
|
|
1949
|
+
overflow-wrap: break-word;
|
|
1950
|
+
font-size: var(--xds-typography-body-size);
|
|
1951
|
+
line-height: var(--xds-typography-body-line-height);
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
.xds-select__trigger[data-placeholder-shown] .xds-select__value,
|
|
1955
|
+
.xds-date-picker__trigger[data-placeholder-shown] .xds-date-picker__value {
|
|
1956
|
+
color: var(--xds-color-field-placeholder);
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
/* One line under the box, as under a TextField: the help or the error. */
|
|
1960
|
+
.xds-select__footer,
|
|
1961
|
+
.xds-date-picker__footer {
|
|
1962
|
+
display: flex;
|
|
1963
|
+
align-items: baseline;
|
|
1964
|
+
gap: var(--xds-space-3);
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
.xds-select__description,
|
|
1968
|
+
.xds-select__error,
|
|
1969
|
+
.xds-date-picker__description,
|
|
1970
|
+
.xds-date-picker__error {
|
|
1971
|
+
font-size: var(--xds-typography-detail-size);
|
|
1972
|
+
line-height: var(--xds-typography-detail-line-height);
|
|
1973
|
+
overflow-wrap: break-word;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
.xds-select__description,
|
|
1977
|
+
.xds-date-picker__description {
|
|
1978
|
+
color: var(--xds-color-text-secondary);
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
.xds-select__error,
|
|
1982
|
+
.xds-date-picker__error {
|
|
1983
|
+
color: var(--xds-color-status-danger);
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
/* ------------------------------------------------------------ the list */
|
|
1987
|
+
|
|
1988
|
+
/* Over the page and under the open list, as under a Menu: a press outside only closes the
|
|
1989
|
+
list, and the field under the pointer keeps its own border meanwhile. */
|
|
1990
|
+
.xds-select__underlay {
|
|
1991
|
+
position: fixed;
|
|
1992
|
+
inset: 0;
|
|
1993
|
+
z-index: var(--xds-layer-overlay);
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
/* Zag sets the position, and the width: exactly the field's, however short the options. */
|
|
1997
|
+
.xds-select__positioner {
|
|
1998
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
/* A menu's surface. It scrolls when the window has no room for all of it. */
|
|
2002
|
+
.xds-select__content {
|
|
2003
|
+
max-height: var(--available-height);
|
|
2004
|
+
overflow-y: auto;
|
|
2005
|
+
overscroll-behavior: contain;
|
|
2006
|
+
scroll-padding-block: var(--xds-space-1);
|
|
2007
|
+
/* A thin scrollbar in the text's color, faint, which stays out of the way of the rows. */
|
|
2008
|
+
scrollbar-width: thin;
|
|
2009
|
+
scrollbar-color: color-mix(in oklab, var(--xds-color-text-primary) 15%, transparent)
|
|
2010
|
+
transparent;
|
|
2011
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-menu-border);
|
|
2012
|
+
border-radius: var(--xds-radius-md);
|
|
2013
|
+
background: var(--xds-color-menu-background);
|
|
2014
|
+
box-shadow: var(--xds-shadow-raised);
|
|
2015
|
+
transform-origin: var(--transform-origin);
|
|
2016
|
+
animation: xds-select-enter var(--xds-motion-duration-fast) var(--xds-motion-easing-enter);
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
.xds-select__content[data-side="top"] {
|
|
2020
|
+
animation-name: xds-select-enter-above;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/* After the rules above, which it replaces. A closing list takes no more presses. */
|
|
2024
|
+
.xds-select__content[data-state="closed"] {
|
|
2025
|
+
animation: xds-overlay-exit var(--xds-motion-duration-fast) var(--xds-motion-easing-exit)
|
|
2026
|
+
forwards;
|
|
2027
|
+
pointer-events: none;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2031
|
+
.xds-select__content,
|
|
2032
|
+
.xds-select__content[data-state="closed"] {
|
|
2033
|
+
animation: none;
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
/* Focus stays on the list while the arrow keys move the highlight, which is what shows. */
|
|
2038
|
+
.xds-select__list {
|
|
2039
|
+
position: relative;
|
|
2040
|
+
overflow: clip;
|
|
2041
|
+
padding: var(--xds-space-1);
|
|
2042
|
+
outline: none;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
/* A row looks like a compact list row. A compact row is shorter than a finger needs, so on
|
|
2046
|
+
a touch screen it grows to the smallest pressable size. The padding above and below only
|
|
2047
|
+
shows on a row of two lines, an option with a description. */
|
|
2048
|
+
.xds-select__item {
|
|
2049
|
+
position: relative;
|
|
2050
|
+
display: flex;
|
|
2051
|
+
align-items: center;
|
|
2052
|
+
justify-content: flex-start;
|
|
2053
|
+
gap: var(--xds-space-2);
|
|
2054
|
+
min-height: max(var(--xds-size-list-row-compact), var(--xds-size-target-min));
|
|
2055
|
+
padding: var(--xds-space-1) var(--xds-space-2);
|
|
2056
|
+
border-radius: var(--xds-radius-sm);
|
|
2057
|
+
white-space: nowrap;
|
|
2058
|
+
font-size: var(--xds-typography-detail-size);
|
|
2059
|
+
font-weight: var(--xds-typography-detail-weight);
|
|
2060
|
+
line-height: var(--xds-typography-detail-line-height);
|
|
2061
|
+
color: var(--xds-color-menu-text);
|
|
2062
|
+
cursor: pointer;
|
|
2063
|
+
touch-action: manipulation;
|
|
2064
|
+
transition: background-color var(--xds-motion-duration-fast) var(--xds-motion-easing-standard);
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
/* The pointer moves the same highlight as the arrow keys, so one rule draws both. The
|
|
2068
|
+
highlight is a fill, which shows inside the list where a focus ring would be clipped. */
|
|
2069
|
+
.xds-select__item[data-highlighted] {
|
|
2070
|
+
background: var(--xds-color-menu-item-background-hover);
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
.xds-select__item:active {
|
|
2074
|
+
background: var(--xds-color-menu-item-background-pressed);
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
.xds-select__item-words {
|
|
2078
|
+
display: flex;
|
|
2079
|
+
flex: 1 1 0%;
|
|
2080
|
+
flex-direction: column;
|
|
2081
|
+
min-width: 0;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
.xds-select__item-label,
|
|
2085
|
+
.xds-select__item-description {
|
|
2086
|
+
overflow: hidden;
|
|
2087
|
+
text-overflow: ellipsis;
|
|
2088
|
+
white-space: nowrap;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
.xds-select__item-description {
|
|
2092
|
+
font-size: var(--xds-typography-footnote-size);
|
|
2093
|
+
font-weight: var(--xds-typography-footnote-weight);
|
|
2094
|
+
line-height: var(--xds-typography-footnote-line-height);
|
|
2095
|
+
color: var(--xds-color-text-secondary);
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
/* The list grows a little as it fades in, from the side of the field it opens on. The scale
|
|
2100
|
+
and the distance are literals: a custom property inside a keyframe keeps WebKit from running
|
|
2101
|
+
the animation on the compositor. */
|
|
2102
|
+
@keyframes xds-select-enter {
|
|
2103
|
+
from {
|
|
2104
|
+
opacity: 0;
|
|
2105
|
+
transform: translate3d(0, -0.25rem, 0) scale(0.95);
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
@keyframes xds-select-enter-above {
|
|
2110
|
+
from {
|
|
2111
|
+
opacity: 0;
|
|
2112
|
+
transform: translate3d(0, 0.25rem, 0) scale(0.95);
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
@keyframes xds-skeleton-pulse {
|
|
2117
|
+
50% {
|
|
2118
|
+
background-color: var(--xds-color-skeleton-highlight);
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
@layer components {
|
|
2123
|
+
.xds-slider {
|
|
2124
|
+
display: grid;
|
|
2125
|
+
grid-template-areas:
|
|
2126
|
+
"label output"
|
|
2127
|
+
"track track";
|
|
2128
|
+
grid-template-columns: 1fr auto;
|
|
2129
|
+
row-gap: var(--xds-space-1);
|
|
2130
|
+
column-gap: var(--xds-space-2);
|
|
2131
|
+
width: 100%;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
.xds-slider__label {
|
|
2135
|
+
grid-area: label;
|
|
2136
|
+
width: fit-content;
|
|
2137
|
+
font-size: var(--xds-typography-label-size);
|
|
2138
|
+
font-weight: var(--xds-typography-label-weight);
|
|
2139
|
+
line-height: var(--xds-typography-label-line-height);
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
.xds-slider__output {
|
|
2143
|
+
grid-area: output;
|
|
2144
|
+
align-self: end;
|
|
2145
|
+
font-size: var(--xds-typography-detail-size);
|
|
2146
|
+
font-weight: var(--xds-typography-detail-weight);
|
|
2147
|
+
line-height: var(--xds-typography-detail-line-height);
|
|
2148
|
+
font-variant-numeric: tabular-nums;
|
|
2149
|
+
color: var(--xds-color-text-secondary);
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
/* The pressable band, as tall as the smallest pressable area, and inset by half a thumb at
|
|
2153
|
+
each end so the thumb is centered on the value. It is as wide as the slider besides, so
|
|
2154
|
+
the far end reaches half a thumb past the slider's edge. */
|
|
2155
|
+
.xds-slider__control {
|
|
2156
|
+
grid-area: track;
|
|
2157
|
+
width: 100%;
|
|
2158
|
+
height: max(var(--xds-size-target-min), var(--xds-size-slider-thumb));
|
|
2159
|
+
margin-inline: calc(var(--xds-size-slider-thumb) / 2);
|
|
2160
|
+
cursor: pointer;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
.xds-slider__track {
|
|
2164
|
+
height: 100%;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
/* The line runs past the band's insets, to where the thumb's edge is at either extreme. */
|
|
2168
|
+
.xds-slider__track::before {
|
|
2169
|
+
content: "";
|
|
2170
|
+
position: absolute;
|
|
2171
|
+
inset-inline: calc(var(--xds-size-slider-thumb) / -2);
|
|
2172
|
+
top: 50%;
|
|
2173
|
+
height: var(--xds-size-slider-track);
|
|
2174
|
+
translate: 0 -50%;
|
|
2175
|
+
border-radius: var(--xds-radius-full);
|
|
2176
|
+
background: var(--xds-color-slider-track);
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
/* Zag sizes the fill from the start of the inset band; the padding reaches back over the
|
|
2180
|
+
inset, so the fill starts where the line does. */
|
|
2181
|
+
.xds-slider__range {
|
|
2182
|
+
top: 50%;
|
|
2183
|
+
box-sizing: content-box;
|
|
2184
|
+
height: var(--xds-size-slider-track);
|
|
2185
|
+
margin-inline-start: calc(var(--xds-size-slider-thumb) / -2);
|
|
2186
|
+
padding-inline-start: calc(var(--xds-size-slider-thumb) / 2);
|
|
2187
|
+
translate: 0 -50%;
|
|
2188
|
+
border-radius: var(--xds-radius-full);
|
|
2189
|
+
background: var(--xds-color-slider-fill);
|
|
2190
|
+
pointer-events: none;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
/* Zag centers the thumb on the value across; this centers it on the line. */
|
|
2194
|
+
.xds-slider__thumb {
|
|
2195
|
+
top: 50%;
|
|
2196
|
+
z-index: 2;
|
|
2197
|
+
box-sizing: border-box;
|
|
2198
|
+
width: var(--xds-size-slider-thumb);
|
|
2199
|
+
height: var(--xds-size-slider-thumb);
|
|
2200
|
+
translate: 0 -50%;
|
|
2201
|
+
border: var(--xds-border-width-thick) solid var(--xds-color-slider-thumb-border);
|
|
2202
|
+
border-radius: var(--xds-radius-full);
|
|
2203
|
+
background: var(--xds-color-slider-thumb);
|
|
2204
|
+
outline: none;
|
|
2205
|
+
cursor: grab;
|
|
2206
|
+
transition: border-color var(--xds-motion-duration-fast) var(--xds-motion-easing-standard);
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
.xds-slider__thumb[data-dragging] {
|
|
2210
|
+
cursor: grabbing;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
.xds-slider__thumb:focus-visible {
|
|
2214
|
+
z-index: 10;
|
|
2215
|
+
outline: var(--xds-focus-width) solid var(--xds-color-border-focus);
|
|
2216
|
+
outline-offset: var(--xds-focus-offset);
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
/* Disabled is recolored, not faded: the fill and the thumb's ring turn grey, and so do the
|
|
2220
|
+
label and the value. */
|
|
2221
|
+
.xds-slider[data-disabled] {
|
|
2222
|
+
cursor: not-allowed;
|
|
2223
|
+
pointer-events: none;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
.xds-slider[data-disabled] .xds-slider__label,
|
|
2227
|
+
.xds-slider[data-disabled] .xds-slider__output {
|
|
2228
|
+
color: var(--xds-color-text-disabled);
|
|
2229
|
+
cursor: not-allowed;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
.xds-slider[data-disabled] .xds-slider__range {
|
|
2233
|
+
background: var(--xds-color-slider-disabled-fill);
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
.xds-slider[data-disabled] .xds-slider__thumb {
|
|
2237
|
+
border-color: var(--xds-color-slider-disabled-fill);
|
|
2238
|
+
cursor: default;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
.xds-slider[data-disabled] .xds-slider__control {
|
|
2242
|
+
cursor: default;
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
@layer components {
|
|
2247
|
+
/* The root is what scrolls, so the hairline under the row stays put while the tabs move.
|
|
2248
|
+
It is drawn as a shadow inside the box, which lets the selected tab's bar cover it. */
|
|
2249
|
+
.xds-tabs {
|
|
2250
|
+
display: flex;
|
|
2251
|
+
flex-direction: column;
|
|
2252
|
+
overflow-x: auto;
|
|
2253
|
+
scrollbar-width: none;
|
|
2254
|
+
box-shadow: inset 0 calc(-1 * var(--xds-border-width-thin)) 0 var(--xds-color-tabs-border);
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
.xds-tabs::-webkit-scrollbar {
|
|
2258
|
+
display: none;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
/* As wide as its tabs, and never narrower than the row. */
|
|
2262
|
+
.xds-tabs__list {
|
|
2263
|
+
position: relative;
|
|
2264
|
+
display: flex;
|
|
2265
|
+
width: max-content;
|
|
2266
|
+
min-width: 100%;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
.xds-tabs--full-width .xds-tabs__list {
|
|
2270
|
+
width: 100%;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
.xds-tabs__tab {
|
|
2274
|
+
position: relative;
|
|
2275
|
+
z-index: 1;
|
|
2276
|
+
display: flex;
|
|
2277
|
+
flex: none;
|
|
2278
|
+
align-items: center;
|
|
2279
|
+
justify-content: center;
|
|
2280
|
+
gap: var(--xds-space-2);
|
|
2281
|
+
height: var(--xds-size-tab);
|
|
2282
|
+
padding-inline: var(--xds-space-4);
|
|
2283
|
+
white-space: nowrap;
|
|
2284
|
+
text-align: center;
|
|
2285
|
+
font-size: var(--xds-typography-label-size);
|
|
2286
|
+
font-weight: var(--xds-typography-label-weight);
|
|
2287
|
+
line-height: var(--xds-typography-label-line-height);
|
|
2288
|
+
color: var(--xds-color-tabs-text);
|
|
2289
|
+
outline: none;
|
|
2290
|
+
cursor: pointer;
|
|
2291
|
+
touch-action: manipulation;
|
|
2292
|
+
-webkit-tap-highlight-color: transparent;
|
|
2293
|
+
transition: color var(--xds-motion-duration-fast) var(--xds-motion-easing-standard);
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
.xds-tabs--full-width .xds-tabs__tab {
|
|
2297
|
+
flex: 1 1 0;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
/* Under the pointer a tab takes a color of its own. */
|
|
2301
|
+
@media (hover: hover) {
|
|
2302
|
+
.xds-tabs__tab:not([aria-selected="true"]):hover {
|
|
2303
|
+
color: var(--xds-color-tabs-text-hover);
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
.xds-tabs__tab[aria-selected="true"] {
|
|
2308
|
+
color: var(--xds-color-tabs-text-selected);
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
/* Inside the tab, because the row clips whatever is drawn outside it. */
|
|
2312
|
+
.xds-tabs__tab:focus-visible {
|
|
2313
|
+
outline: var(--xds-focus-width) solid var(--xds-color-border-focus);
|
|
2314
|
+
outline-offset: calc(-1 * var(--xds-focus-offset));
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
/* A bar across the bottom edge of the selected tab, over the hairline and under the tabs'
|
|
2318
|
+
focus rings. It slides to the tab that is selected next; Zag marks the moves that should
|
|
2319
|
+
not slide, such as the first placing. */
|
|
2320
|
+
.xds-tabs__indicator {
|
|
2321
|
+
bottom: 0;
|
|
2322
|
+
width: var(--width);
|
|
2323
|
+
height: var(--xds-border-width-thick);
|
|
2324
|
+
background: var(--xds-color-tabs-indicator);
|
|
2325
|
+
transition-property: left, width;
|
|
2326
|
+
transition-duration: var(--xds-motion-duration-normal);
|
|
2327
|
+
transition-timing-function: var(--xds-motion-easing-standard);
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
.xds-tabs__indicator[data-instant] {
|
|
2331
|
+
transition: none;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
/* Zag hides the bar until it has measured the selected tab, which a page rendered on the
|
|
2335
|
+
server shows first: the tab draws the same bar inside itself until then. */
|
|
2336
|
+
.xds-tabs__list:has(> .xds-tabs__indicator[hidden]) > .xds-tabs__tab[aria-selected="true"] {
|
|
2337
|
+
box-shadow: inset 0 calc(-1 * var(--xds-border-width-thick)) 0 var(--xds-color-tabs-indicator);
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2341
|
+
.xds-tabs__indicator {
|
|
2342
|
+
transition: none;
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
@layer components {
|
|
2348
|
+
.xds-text-field {
|
|
2349
|
+
/* What a line of text has above and below it inside the box of a one-line field. A text
|
|
2350
|
+
area uses it too, so its first line sits where a one-line field has its text and one
|
|
2351
|
+
row is exactly as tall as a one-line field. */
|
|
2352
|
+
--text-field-inset-block: calc(
|
|
2353
|
+
(
|
|
2354
|
+
var(--xds-size-control-md) - var(--xds-typography-body-size) *
|
|
2355
|
+
var(--xds-typography-body-line-height)
|
|
2356
|
+
) /
|
|
2357
|
+
2 - var(--xds-border-width-thin)
|
|
2358
|
+
);
|
|
2359
|
+
|
|
2360
|
+
display: flex;
|
|
2361
|
+
flex-direction: column;
|
|
2362
|
+
gap: var(--xds-space-1);
|
|
2363
|
+
width: 100%;
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
.xds-text-field__label {
|
|
2367
|
+
font-size: var(--xds-typography-label-size);
|
|
2368
|
+
font-weight: var(--xds-typography-label-weight);
|
|
2369
|
+
line-height: var(--xds-typography-label-line-height);
|
|
2370
|
+
color: var(--xds-color-text-primary);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
.xds-text-field:has(.xds-text-field__input:required) .xds-text-field__label::after {
|
|
2374
|
+
content: "*";
|
|
2375
|
+
margin-inline-start: var(--xds-space-0-5);
|
|
2376
|
+
color: var(--xds-color-danger-default);
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
.xds-text-field:has(.xds-text-field__input:disabled) .xds-text-field__label {
|
|
2380
|
+
opacity: 0.5;
|
|
2381
|
+
cursor: not-allowed;
|
|
2382
|
+
pointer-events: none;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
/* ------------------------------------------------------------ the box */
|
|
2386
|
+
|
|
2387
|
+
/* Drawn by the input itself until something has to sit inside it beside the text; then a
|
|
2388
|
+
group draws it and the input inside has none. */
|
|
2389
|
+
.xds-text-field__control {
|
|
2390
|
+
min-height: var(--xds-size-control-md);
|
|
2391
|
+
border: var(--xds-border-width-thin) solid var(--xds-color-field-border);
|
|
2392
|
+
border-radius: var(--xds-radius-md);
|
|
2393
|
+
background-color: var(--xds-color-field-background);
|
|
2394
|
+
color: var(--xds-color-field-text);
|
|
2395
|
+
outline-style: none;
|
|
2396
|
+
transition-property: background-color, border-color, box-shadow;
|
|
2397
|
+
transition-duration: var(--xds-motion-duration-fast);
|
|
2398
|
+
transition-timing-function: var(--xds-motion-easing-standard);
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
.xds-text-field__control--pill {
|
|
2402
|
+
border-radius: var(--xds-radius-full);
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
.xds-text-field__control:focus,
|
|
2406
|
+
.xds-text-field__control:has(> .xds-text-field__input:focus) {
|
|
2407
|
+
border-color: var(--xds-color-field-border-focus);
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
/* Thicker as well as red, so the state does not depend on telling colors apart. */
|
|
2411
|
+
.xds-text-field__control[aria-invalid="true"],
|
|
2412
|
+
.xds-text-field__control:has(> .xds-text-field__input[aria-invalid="true"]) {
|
|
2413
|
+
border-color: var(--xds-color-field-border-invalid);
|
|
2414
|
+
box-shadow: inset 0 0 0 var(--xds-border-width-thin) var(--xds-color-field-border-invalid);
|
|
2415
|
+
outline: var(--xds-border-width-thin) solid var(--xds-color-danger-default);
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
/* Focused, an invalid field keeps its red border; a group shows focus instead. */
|
|
2419
|
+
.xds-text-field__control[aria-invalid="true"]:focus {
|
|
2420
|
+
box-shadow: none;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.xds-text-field__control:has(> .xds-text-field__input[aria-invalid="true"]:focus) {
|
|
2424
|
+
border-color: var(--xds-color-field-border-focus);
|
|
2425
|
+
box-shadow: none;
|
|
2426
|
+
outline-style: none;
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
/* After the error, which it outranks. */
|
|
2430
|
+
@media (hover: hover) {
|
|
2431
|
+
.xds-text-field__control:hover:not(:focus, :has(:focus)) {
|
|
2432
|
+
border-color: var(--xds-color-text-primary);
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
.xds-text-field__control:disabled,
|
|
2437
|
+
.xds-text-field__control:has(> .xds-text-field__input:disabled) {
|
|
2438
|
+
opacity: 0.5;
|
|
2439
|
+
cursor: not-allowed;
|
|
2440
|
+
pointer-events: none;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
/* ------------------------------------------------------------ the text */
|
|
2444
|
+
|
|
2445
|
+
.xds-text-field__input {
|
|
2446
|
+
width: 100%;
|
|
2447
|
+
padding-block: 0;
|
|
2448
|
+
padding-inline: var(--xds-space-3);
|
|
2449
|
+
/* 16px on every screen: below that, iOS zooms the page when the field takes focus. */
|
|
2450
|
+
font-size: var(--xds-typography-body-size);
|
|
2451
|
+
line-height: var(--xds-typography-body-line-height);
|
|
2452
|
+
outline-style: none;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
.xds-text-field__input::placeholder {
|
|
2456
|
+
color: var(--xds-color-field-placeholder);
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
/* `rows` is the height. Longer text scrolls; a handle would let the layout be dragged apart. */
|
|
2460
|
+
textarea.xds-text-field__input {
|
|
2461
|
+
min-height: 0;
|
|
2462
|
+
padding-block: var(--text-field-inset-block);
|
|
2463
|
+
resize: none;
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
.xds-text-field__group {
|
|
2467
|
+
display: flex;
|
|
2468
|
+
align-items: stretch;
|
|
2469
|
+
/* For text put straight into a slot. The input has its own size. */
|
|
2470
|
+
font-size: var(--xds-font-size-sm);
|
|
2471
|
+
line-height: var(--xds-font-line-height-snug);
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.xds-text-field__group:has(> textarea) {
|
|
2475
|
+
align-items: flex-start;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
/* Rounded where it meets the box, so the paint of an autofilled value stays inside it. */
|
|
2479
|
+
.xds-text-field__group > .xds-text-field__input {
|
|
2480
|
+
flex: 1;
|
|
2481
|
+
min-width: 0;
|
|
2482
|
+
border-width: 0;
|
|
2483
|
+
border-radius: var(--xds-radius-md);
|
|
2484
|
+
background-color: transparent;
|
|
2485
|
+
color: inherit;
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
.xds-text-field__slot--leading + .xds-text-field__input {
|
|
2489
|
+
border-start-start-radius: 0;
|
|
2490
|
+
border-end-start-radius: 0;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
.xds-text-field__input:has(+ .xds-text-field__slot--trailing) {
|
|
2494
|
+
border-start-end-radius: 0;
|
|
2495
|
+
border-end-end-radius: 0;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
/* A slot is a full inset away from the edge of the box and a smaller one from the text. */
|
|
2499
|
+
.xds-text-field__slot--leading + .xds-text-field__input {
|
|
2500
|
+
padding-inline-start: var(--xds-space-2);
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.xds-text-field__input:has(+ .xds-text-field__slot--trailing) {
|
|
2504
|
+
padding-inline-end: var(--xds-space-2);
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
/* As tall as the inside of a one-line field and at the top of the box, which centers a slot
|
|
2508
|
+
in a one-line field and lines it up with the first line of a text area. */
|
|
2509
|
+
.xds-text-field__slot {
|
|
2510
|
+
display: flex;
|
|
2511
|
+
align-self: flex-start;
|
|
2512
|
+
align-items: center;
|
|
2513
|
+
justify-content: center;
|
|
2514
|
+
height: calc(var(--xds-size-control-md) - 2 * var(--xds-border-width-thin));
|
|
2515
|
+
border: 0;
|
|
2516
|
+
color: var(--xds-color-field-placeholder);
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
.xds-text-field__slot--leading {
|
|
2520
|
+
padding-inline-start: var(--xds-space-3);
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
.xds-text-field__slot--trailing {
|
|
2524
|
+
padding-inline-end: var(--xds-space-3);
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
/* ------------------------------------------------------------ under the box */
|
|
2528
|
+
|
|
2529
|
+
/* The help or the error at the start edge, the count at the end. */
|
|
2530
|
+
.xds-text-field__footer {
|
|
2531
|
+
display: flex;
|
|
2532
|
+
align-items: baseline;
|
|
2533
|
+
gap: var(--xds-space-3);
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
/* With nothing to show, the line takes no room but stays in the page: the error inside it
|
|
2537
|
+
is a live region, which has to be there before a message is put in it for the message to
|
|
2538
|
+
be announced. */
|
|
2539
|
+
.xds-text-field__footer:not(:has(> :not(:empty))) {
|
|
2540
|
+
position: absolute;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
.xds-text-field__description,
|
|
2544
|
+
.xds-text-field__error {
|
|
2545
|
+
font-size: var(--xds-typography-detail-size);
|
|
2546
|
+
line-height: var(--xds-typography-detail-line-height);
|
|
2547
|
+
overflow-wrap: break-word;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
.xds-text-field__description {
|
|
2551
|
+
color: var(--xds-color-text-secondary);
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
.xds-text-field__error {
|
|
2555
|
+
color: var(--xds-color-status-danger);
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
.xds-text-field__error:empty {
|
|
2559
|
+
position: absolute;
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
@keyframes xds-toast-enter {
|
|
2564
|
+
from {
|
|
2565
|
+
opacity: 0;
|
|
2566
|
+
transform: translateY(0.5rem);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
@layer components {
|
|
2571
|
+
.xds-tooltip__positioner {
|
|
2572
|
+
z-index: calc(var(--xds-layer-overlay) + var(--layer-index, 0));
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
.xds-tooltip {
|
|
2576
|
+
/* The widest a tooltip gets; a longer label wraps. */
|
|
2577
|
+
max-width: 20rem;
|
|
2578
|
+
padding: var(--xds-space-1) var(--xds-space-2);
|
|
2579
|
+
border-radius: var(--xds-radius-sm);
|
|
2580
|
+
background: var(--xds-color-tooltip-background);
|
|
2581
|
+
font-size: var(--xds-typography-footnote-size);
|
|
2582
|
+
font-weight: var(--xds-typography-footnote-weight);
|
|
2583
|
+
line-height: var(--xds-typography-footnote-line-height);
|
|
2584
|
+
color: var(--xds-color-tooltip-text);
|
|
2585
|
+
transform-origin: var(--transform-origin);
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
/* It grows in from the control's side. */
|
|
2589
|
+
.xds-tooltip[data-side="top"] {
|
|
2590
|
+
animation: xds-tooltip-enter-up var(--xds-motion-duration-fast)
|
|
2591
|
+
var(--xds-motion-easing-enter);
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
.xds-tooltip[data-side="bottom"] {
|
|
2595
|
+
animation: xds-tooltip-enter-down var(--xds-motion-duration-fast)
|
|
2596
|
+
var(--xds-motion-easing-enter);
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
.xds-tooltip[data-side="left"] {
|
|
2600
|
+
animation: xds-tooltip-enter-left var(--xds-motion-duration-fast)
|
|
2601
|
+
var(--xds-motion-easing-enter);
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
.xds-tooltip[data-side="right"] {
|
|
2605
|
+
animation: xds-tooltip-enter-right var(--xds-motion-duration-fast)
|
|
2606
|
+
var(--xds-motion-easing-enter);
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
/* After the rules above, which it replaces. */
|
|
2610
|
+
.xds-tooltip[data-state="closed"] {
|
|
2611
|
+
animation: xds-overlay-exit var(--xds-motion-duration-fast) var(--xds-motion-easing-exit)
|
|
2612
|
+
forwards;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2616
|
+
.xds-tooltip[data-side],
|
|
2617
|
+
.xds-tooltip[data-state="closed"] {
|
|
2618
|
+
animation: none;
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
/* A key hint: the same text in a hairline box of its own, in the text's color, which is
|
|
2623
|
+
the one color known to stand out from the tooltip. */
|
|
2624
|
+
.xds-tooltip__shortcut {
|
|
2625
|
+
margin-inline-start: var(--xds-space-2);
|
|
2626
|
+
padding-inline: var(--xds-space-1);
|
|
2627
|
+
border: var(--xds-border-width-thin) solid currentColor;
|
|
2628
|
+
border-radius: calc(var(--xds-radius-sm) - var(--xds-space-0-5));
|
|
2629
|
+
font: inherit;
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
/* Literal offsets and scales: a custom property inside a keyframe keeps WebKit from running the
|
|
2634
|
+
animation on the compositor. */
|
|
2635
|
+
@keyframes xds-tooltip-enter-up {
|
|
2636
|
+
from {
|
|
2637
|
+
opacity: 0;
|
|
2638
|
+
transform: translate3d(0, 0.25rem, 0) scale(0.9);
|
|
2639
|
+
}
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
@keyframes xds-tooltip-enter-down {
|
|
2643
|
+
from {
|
|
2644
|
+
opacity: 0;
|
|
2645
|
+
transform: translate3d(0, -0.25rem, 0) scale(0.9);
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2649
|
+
@keyframes xds-tooltip-enter-left {
|
|
2650
|
+
from {
|
|
2651
|
+
opacity: 0;
|
|
2652
|
+
transform: translate3d(0.25rem, 0, 0) scale(0.9);
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
@keyframes xds-tooltip-enter-right {
|
|
2657
|
+
from {
|
|
2658
|
+
opacity: 0;
|
|
2659
|
+
transform: translate3d(-0.25rem, 0, 0) scale(0.9);
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
}
|
|
2664
|
+
|
|
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 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)] 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-(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 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-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 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");
|