@bigpixelrocket/uiok 0.1.4 → 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/CHANGELOG.md +88 -1
- package/README.md +1 -1
- package/dist/activity/ActivityBar.d.ts +21 -8
- package/dist/activity/ActivityBar.js +15 -5
- package/dist/activity/activity.css +53 -6
- package/dist/button/Button.d.ts +10 -6
- package/dist/button/Button.js +6 -1
- package/dist/button/button.css +201 -33
- package/dist/charts/Line.logic.d.ts +6 -0
- package/dist/charts/Line.logic.js +9 -0
- package/dist/charts/LineChart.js +11 -4
- package/dist/charts/Pie.logic.d.ts +89 -1
- package/dist/charts/Pie.logic.js +272 -2
- package/dist/charts/PieChart.d.ts +2 -1
- package/dist/charts/PieChart.js +12 -5
- package/dist/charts/PieFill.d.ts +15 -0
- package/dist/charts/PieFill.js +33 -0
- package/dist/charts/ResultChart.d.ts +2 -2
- package/dist/charts/ResultChart.js +173 -47
- package/dist/charts/ResultChart.logic.d.ts +60 -4
- package/dist/charts/ResultChart.logic.js +105 -6
- package/dist/charts/Scatter.logic.d.ts +18 -4
- package/dist/charts/Scatter.logic.js +98 -22
- package/dist/charts/ScatterChart.js +19 -5
- package/dist/charts/charts.css +233 -116
- package/dist/charts/seriesColour.d.ts +2 -0
- package/dist/charts/seriesColour.js +1 -1
- package/dist/datetime/DateTimePicker.d.ts +12 -2
- package/dist/datetime/DateTimePicker.js +61 -16
- package/dist/datetime/DateTimePicker.logic.d.ts +29 -0
- package/dist/datetime/DateTimePicker.logic.js +25 -0
- package/dist/datetime/datetime.css +89 -49
- package/dist/dialog/ConfirmDialog.d.ts +69 -20
- package/dist/dialog/ConfirmDialog.js +39 -12
- package/dist/dialog/DialogLayer.d.ts +25 -0
- package/dist/dialog/DialogLayer.js +24 -0
- package/dist/dialog/DialogLegend.d.ts +2 -1
- package/dist/dialog/DialogLegend.js +10 -5
- package/dist/dialog/DialogLegend.logic.d.ts +15 -3
- package/dist/dialog/DialogLegend.logic.js +8 -4
- package/dist/dialog/DialogLists.d.ts +157 -0
- package/dist/dialog/DialogLists.js +137 -0
- package/dist/dialog/ModalDialog.d.ts +20 -15
- package/dist/dialog/ModalDialog.js +22 -7
- package/dist/dialog/dialog.css +570 -127
- package/dist/dialog/index.d.ts +7 -1
- package/dist/dialog/index.js +7 -1
- package/dist/field/Check.d.ts +15 -0
- package/dist/field/Check.js +23 -0
- package/dist/field/field.css +812 -0
- package/dist/field/index.d.ts +10 -0
- package/dist/field/index.js +10 -0
- package/dist/field/labelHelp.d.ts +33 -0
- package/dist/field/labelHelp.js +22 -0
- package/dist/filter/FilterIcon.js +2 -1
- package/dist/filter/filter.css +72 -20
- package/dist/grid/DataGrid.d.ts +8 -1
- package/dist/grid/DataGrid.js +115 -40
- package/dist/grid/DataGrid.logic.d.ts +15 -3
- package/dist/grid/DataGrid.logic.js +18 -5
- package/dist/grid/grid.css +481 -56
- package/dist/icon/Spinner.d.ts +16 -0
- package/dist/icon/Spinner.js +13 -0
- package/dist/icon/index.d.ts +5 -0
- package/dist/icon/index.js +5 -0
- package/dist/icon/sizes.d.ts +19 -0
- package/dist/icon/sizes.js +19 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/keychord/KeyChord.d.ts +12 -1
- package/dist/keychord/KeyChord.js +2 -2
- package/dist/keychord/index.d.ts +1 -1
- package/dist/keychord/keychord.css +87 -9
- package/dist/labels/dialog.d.ts +12 -1
- package/dist/labels/dialog.js +3 -1
- package/dist/labels/selectAll.d.ts +4 -4
- package/dist/labels/selectAll.js +1 -1
- package/dist/legend/KeyLegendStrip.js +1 -1
- package/dist/legend/legend.css +82 -57
- package/dist/listing/Listing.d.ts +17 -10
- package/dist/listing/Listing.js +33 -26
- package/dist/listing/listing.css +1665 -237
- package/dist/menu/menu.css +227 -67
- package/dist/menu/useBellBeat.js +2 -2
- package/dist/namecut/NameCut.d.ts +3 -1
- package/dist/namecut/NameCut.js +152 -5
- package/dist/namecut/NameCut.logic.d.ts +5 -3
- package/dist/namecut/NameCut.logic.js +20 -5
- package/dist/namecut/namecut.css +27 -7
- package/dist/pager/Pager.d.ts +12 -4
- package/dist/pager/Pager.js +21 -7
- package/dist/pager/pager.css +41 -30
- package/dist/palette/Palette.js +2 -1
- package/dist/palette/palette.css +121 -60
- package/dist/pane/PaneActions.d.ts +56 -14
- package/dist/pane/PaneActions.js +64 -16
- package/dist/pane/PaneFrame.d.ts +37 -5
- package/dist/pane/PaneFrame.js +246 -11
- package/dist/pane/index.d.ts +4 -2
- package/dist/pane/index.js +4 -2
- package/dist/pane/toolWords.d.ts +14 -0
- package/dist/pane/toolWords.js +26 -0
- package/dist/pane/useToolbarFit.d.ts +25 -0
- package/dist/pane/useToolbarFit.js +95 -0
- package/dist/run/RunHeader.d.ts +5 -3
- package/dist/run/RunHeader.js +11 -8
- package/dist/run/run.css +64 -79
- package/dist/segmented/SegmentedChoice.d.ts +18 -2
- package/dist/segmented/SegmentedChoice.js +18 -7
- package/dist/segmented/segmented.css +62 -22
- package/dist/selectall/SelectAllBar.d.ts +4 -3
- package/dist/selectall/SelectAllBar.js +4 -3
- package/dist/selectall/selectall.css +17 -12
- package/dist/shell/shell.css +1073 -0
- package/dist/styles.css +620 -22
- package/dist/surface/surface.css +154 -0
- package/dist/tabs/PageTabs.d.ts +10 -5
- package/dist/tabs/PageTabs.js +126 -37
- package/dist/tabs/tabs.css +131 -51
- package/dist/terminal/Terminal.js +3 -1
- package/dist/terminal/Terminal.logic.d.ts +5 -4
- package/dist/terminal/Terminal.logic.js +9 -4
- package/dist/terminal/TerminalMenu.d.ts +4 -1
- package/dist/terminal/TerminalMenu.js +12 -5
- package/dist/terminal/ghostty/contrast.logic.d.ts +45 -0
- package/dist/terminal/ghostty/contrast.logic.js +130 -0
- package/dist/terminal/ghostty/core.d.ts +6 -0
- package/dist/terminal/ghostty/renderer.d.ts +9 -2
- package/dist/terminal/ghostty/renderer.js +91 -14
- package/dist/terminal/ghostty/surface.d.ts +8 -0
- package/dist/terminal/ghostty/surface.js +27 -1
- package/dist/terminal/terminal.css +87 -61
- package/dist/text/text.css +16 -7
- package/dist/themes/catalog.js +4 -3
- package/dist/themes/themes.generated.css +1307 -264
- package/dist/themes/tokens.d.ts +69 -14
- package/dist/themes/tokens.js +920 -97
- package/dist/tokens.css +239 -0
- package/dist/tooltip/Tooltip.d.ts +6 -0
- package/dist/tooltip/Tooltip.js +48 -6
- package/dist/tooltip/Tooltip.logic.d.ts +89 -12
- package/dist/tooltip/Tooltip.logic.js +142 -20
- package/dist/tooltip/index.d.ts +1 -1
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/tooltip.css +39 -9
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
/* UIOK's base stylesheet: the theme tokens, the tokens no theme changes
|
|
1
|
+
/* UIOK's base stylesheet: the theme tokens, the tokens no theme changes
|
|
2
|
+
(tokens.css: sizes, spaces, corners, timings, heights, layers, focus), and
|
|
2
3
|
the utilities every component may rely on. It names no colour itself;
|
|
3
4
|
colours are theme tokens, which themes.generated.css defines (docs/themes.md).
|
|
4
5
|
Import it once, before any stylesheet of the app's own. */
|
|
5
6
|
@import './themes/themes.generated.css';
|
|
7
|
+
@import './tokens.css';
|
|
6
8
|
|
|
7
9
|
/* Component stylesheets, each beside its component. */
|
|
8
10
|
@import './button/button.css';
|
|
@@ -27,22 +29,607 @@
|
|
|
27
29
|
@import './charts/charts.css';
|
|
28
30
|
@import './terminal/terminal.css';
|
|
29
31
|
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
translucent layer blurs. */
|
|
34
|
-
--frost: blur(24px) saturate(160%);
|
|
35
|
-
--font-mono: 'SF Mono', ui-monospace, Menlo, monospace;
|
|
36
|
-
--font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
32
|
+
/* Shared looks a page puts on its own markup: form controls, notices, cards. */
|
|
33
|
+
@import './field/field.css';
|
|
34
|
+
@import './surface/surface.css';
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
/* The shell's shared surfaces: Settings dialog, theme picker, update card,
|
|
37
|
+
channel tag, sign-in prompts, load failure (docs/components/shell.md). */
|
|
38
|
+
@import './shell/shell.css';
|
|
39
|
+
|
|
40
|
+
/* ---- What the browser would otherwise draw in its own colours ---- */
|
|
41
|
+
|
|
42
|
+
/* Selected text, a field's placeholder, its caret, a native check or
|
|
43
|
+
slider, and every scrollbar take the theme's colours. On the root and on
|
|
44
|
+
a theme preview, so a preview scope's accent and grounds reach its own
|
|
45
|
+
scrollbars and fields. */
|
|
46
|
+
:where(:root, [data-theme-preview]) {
|
|
47
|
+
scrollbar-color: var(--scrollbar-thumb) transparent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(input, textarea, [contenteditable]:not([contenteditable='false'])) {
|
|
51
|
+
caret-color: var(--accent);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(input, progress, meter) {
|
|
55
|
+
accent-color: var(--accent);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* A text input, textarea, or select that carries no class of its own still
|
|
59
|
+
takes the theme: an outline in --control-border on the window ground,
|
|
60
|
+
the theme's text, the page's face. It weighs nothing, so .field and any
|
|
61
|
+
host rule win over every part of it. A checkbox or radio with no class
|
|
62
|
+
takes the .check look (field.css); a slider, or a box with a class of
|
|
63
|
+
its own, keeps the platform's drawing in the accent (above). */
|
|
64
|
+
:where(
|
|
65
|
+
input:not([type]),
|
|
66
|
+
input:is(
|
|
67
|
+
[type='text'],
|
|
68
|
+
[type='search'],
|
|
69
|
+
[type='number'],
|
|
70
|
+
[type='email'],
|
|
71
|
+
[type='url'],
|
|
72
|
+
[type='password'],
|
|
73
|
+
[type='tel']
|
|
74
|
+
),
|
|
75
|
+
textarea,
|
|
76
|
+
select
|
|
77
|
+
) {
|
|
78
|
+
border: var(--line) solid var(--control-border);
|
|
79
|
+
border-radius: var(--radius-sm);
|
|
80
|
+
background: var(--ground);
|
|
81
|
+
color: var(--text);
|
|
82
|
+
font-family: inherit;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* A meter (a password's strength, a quota): the slider's trough, a crisp
|
|
86
|
+
bar on --control-track inside the --control-border hairline, filled in
|
|
87
|
+
the tone of its value: success at the optimum, warning below it, danger
|
|
88
|
+
at the least good. */
|
|
89
|
+
meter {
|
|
90
|
+
height: var(--space-2);
|
|
91
|
+
appearance: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
meter::-webkit-meter-bar {
|
|
95
|
+
height: var(--space-2);
|
|
96
|
+
border: 0;
|
|
97
|
+
border-radius: var(--radius-pill);
|
|
98
|
+
box-shadow: inset 0 0 0 var(--line) var(--control-border);
|
|
99
|
+
background: var(--control-track);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
meter::-webkit-meter-optimum-value {
|
|
103
|
+
border-radius: var(--radius-pill);
|
|
104
|
+
background: var(--success);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
meter::-webkit-meter-suboptimum-value {
|
|
108
|
+
border-radius: var(--radius-pill);
|
|
109
|
+
background: var(--warning);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
meter::-webkit-meter-even-less-good-value {
|
|
113
|
+
border-radius: var(--radius-pill);
|
|
114
|
+
background: var(--danger);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
::placeholder {
|
|
118
|
+
color: var(--text-placeholder);
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Selected text takes the one colour the selection tint is floored for,
|
|
123
|
+
so dim, meta, and toned words stay legible while selected. */
|
|
124
|
+
::selection {
|
|
125
|
+
background: var(--text-selection-bg);
|
|
126
|
+
color: var(--text);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* In a window that is not in front, selected text greys to the quiet fill,
|
|
130
|
+
as the platform greys it. The host sets data-window-inactive on the root
|
|
131
|
+
from its window's blur and focus events; the listing reads the same
|
|
132
|
+
attribute for its selected rows and its active pane (docs/themes.md). */
|
|
133
|
+
:root[data-window-inactive] ::selection {
|
|
134
|
+
background: var(--fill);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ---- Chrome is not selectable ---- */
|
|
138
|
+
|
|
139
|
+
/* An application's chrome (labels, buttons, tabs, headings, menu items, a
|
|
140
|
+
row's parts) cannot be swept or double-clicked into a selection, so a
|
|
141
|
+
drag never smears a highlight across the window. Content opts back in:
|
|
142
|
+
what a user types, and what a user would copy (a value, a name, a path,
|
|
143
|
+
output). A host marks its own content with .selectable; a component's
|
|
144
|
+
content class sets user-select: text in its own rule. A code, pre, or
|
|
145
|
+
samp element is not content by its tag: a command named in a label or a
|
|
146
|
+
token in a menu is chrome, so a copyable value takes .selectable. Both weigh
|
|
147
|
+
nothing, so a host rule wins. Inside selectable content the cursor is the
|
|
148
|
+
I-beam, which the browser draws only over text that can be selected. */
|
|
149
|
+
:where(body) {
|
|
150
|
+
user-select: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:where(
|
|
154
|
+
input:not(
|
|
155
|
+
[type='checkbox'],
|
|
156
|
+
[type='radio'],
|
|
157
|
+
[type='range'],
|
|
158
|
+
[type='button'],
|
|
159
|
+
[type='submit'],
|
|
160
|
+
[type='reset']
|
|
161
|
+
),
|
|
162
|
+
textarea,
|
|
163
|
+
[contenteditable]:not([contenteditable='false']),
|
|
164
|
+
.selectable
|
|
165
|
+
) {
|
|
166
|
+
user-select: text;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* The arrow over every control, a link included, as a desktop
|
|
170
|
+
application draws it: no hand anywhere. Zero weight, so a host's own
|
|
171
|
+
control takes it with no class, and a resize or text cursor of its own
|
|
172
|
+
still wins. */
|
|
173
|
+
:where(
|
|
174
|
+
a[href],
|
|
175
|
+
button,
|
|
176
|
+
select,
|
|
177
|
+
summary,
|
|
178
|
+
label,
|
|
179
|
+
[role='button'],
|
|
180
|
+
[role='link'],
|
|
181
|
+
[role='tab'],
|
|
182
|
+
[role='radio'],
|
|
183
|
+
[role='switch'],
|
|
184
|
+
input:is([type='checkbox'], [type='radio'], [type='range'])
|
|
185
|
+
) {
|
|
186
|
+
cursor: default;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* ---- Shared recipes ---- */
|
|
190
|
+
|
|
191
|
+
/* The small uppercase heading over a group (a menu's section, a settings
|
|
192
|
+
group, a sidebar's set of pages). A menu's group heading wears it too. */
|
|
193
|
+
.overline,
|
|
194
|
+
.entry-menu-heading {
|
|
195
|
+
margin: 0;
|
|
196
|
+
color: var(--text-dim);
|
|
197
|
+
font: var(--font-weight-strong) var(--font-size-caption) / var(--line-height-compact)
|
|
198
|
+
var(--font-ui);
|
|
199
|
+
letter-spacing: var(--tracking-caps);
|
|
200
|
+
text-transform: uppercase;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* A translucent layer over content that scrolls under it: the one frost
|
|
204
|
+
recipe (--frost), with the layer's own translucent fill. */
|
|
205
|
+
.frost {
|
|
206
|
+
-webkit-backdrop-filter: var(--frost);
|
|
207
|
+
backdrop-filter: var(--frost);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* A scrolling box whose content runs past an edge fades over the last
|
|
211
|
+
--scroll-fade-size at that edge, so a clipped row reads as "more", not
|
|
212
|
+
as a cut. On the scrolling element itself: .scroll-fade for the block
|
|
213
|
+
edges, .scroll-fade-end for the block end only (a scroller whose sticky
|
|
214
|
+
strip sits at its start), .scroll-fade-x for the inline edges; combine
|
|
215
|
+
one block class with .scroll-fade-x for both axes. The lengths follow
|
|
216
|
+
the scroll position (a scroll-driven animation), so an edge with nothing
|
|
217
|
+
past it stays sharp, and a box that does not scroll never fades.
|
|
218
|
+
|
|
219
|
+
The fade covers the padding box only: the scroller's own border, corners,
|
|
220
|
+
and scrollbar stay solid, so a framed scroller keeps its frame (two
|
|
221
|
+
opaque layers cut the border ring out of the mask and the fade is added
|
|
222
|
+
back inside it). What scrolls inside fades, the box's own background
|
|
223
|
+
included, so a scroller whose ground differs from what is behind it
|
|
224
|
+
paints that ground on a wrapper. A sticky strip at a faded edge fades
|
|
225
|
+
too: use .scroll-fade-end under a sticky header. Engines without scroll
|
|
226
|
+
timelines draw no fade.
|
|
227
|
+
|
|
228
|
+
--scroll-fade-size is the fade's depth, 12px by default (enough for a
|
|
229
|
+
line of prose); a list of whole rows sets it to its row height
|
|
230
|
+
(var(--row-height)) on the scroller, so the last whole row fades through
|
|
231
|
+
its words instead of losing a sliver.
|
|
232
|
+
|
|
233
|
+
Hazard: a mask clips everything painted inside the masked box, a
|
|
234
|
+
position: fixed child included (a full-screen surface, a date picker's
|
|
235
|
+
or menu's panel), because the mask makes the box their containing block
|
|
236
|
+
for painting. A scroller that can hold a popover or a fixed surface
|
|
237
|
+
drops its fade class while one is open, or mounts the popover outside
|
|
238
|
+
the scroller. */
|
|
239
|
+
@supports (animation-timeline: scroll()) {
|
|
240
|
+
.scroll-fade,
|
|
241
|
+
.scroll-fade-end,
|
|
242
|
+
.scroll-fade-x {
|
|
243
|
+
--scroll-fade-size: var(--space-6);
|
|
244
|
+
|
|
245
|
+
mask-clip: padding-box, border-box, padding-box;
|
|
246
|
+
mask-origin: padding-box, border-box, padding-box;
|
|
247
|
+
mask-repeat: no-repeat;
|
|
248
|
+
mask-composite: exclude, exclude, add;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.scroll-fade {
|
|
252
|
+
mask-image:
|
|
253
|
+
linear-gradient(var(--ground), var(--ground)), linear-gradient(var(--ground), var(--ground)),
|
|
254
|
+
linear-gradient(
|
|
255
|
+
to bottom,
|
|
256
|
+
transparent,
|
|
257
|
+
var(--ground) var(--scroll-fade-start),
|
|
258
|
+
var(--ground) calc(100% - var(--scroll-fade-end)),
|
|
259
|
+
transparent
|
|
260
|
+
);
|
|
261
|
+
animation: uiok-scroll-fade-block linear both;
|
|
262
|
+
animation-timeline: scroll(self block);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.scroll-fade-end {
|
|
266
|
+
mask-image:
|
|
267
|
+
linear-gradient(var(--ground), var(--ground)), linear-gradient(var(--ground), var(--ground)),
|
|
268
|
+
linear-gradient(to bottom, var(--ground) calc(100% - var(--scroll-fade-end)), transparent);
|
|
269
|
+
animation: uiok-scroll-fade-block linear both;
|
|
270
|
+
animation-timeline: scroll(self block);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.scroll-fade-x {
|
|
274
|
+
mask-image:
|
|
275
|
+
linear-gradient(var(--ground), var(--ground)), linear-gradient(var(--ground), var(--ground)),
|
|
276
|
+
linear-gradient(
|
|
277
|
+
to right,
|
|
278
|
+
transparent,
|
|
279
|
+
var(--ground) var(--scroll-fade-inline-start),
|
|
280
|
+
var(--ground) calc(100% - var(--scroll-fade-inline-end)),
|
|
281
|
+
transparent
|
|
282
|
+
);
|
|
283
|
+
animation: uiok-scroll-fade-inline linear both;
|
|
284
|
+
animation-timeline: scroll(self inline);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Both axes: the two fades intersect inside the frame. */
|
|
288
|
+
:is(.scroll-fade, .scroll-fade-end).scroll-fade-x {
|
|
289
|
+
mask-clip: padding-box, border-box, padding-box, padding-box;
|
|
290
|
+
mask-origin: padding-box, border-box, padding-box, padding-box;
|
|
291
|
+
mask-composite: exclude, exclude, intersect, add;
|
|
292
|
+
animation:
|
|
293
|
+
uiok-scroll-fade-block linear both,
|
|
294
|
+
uiok-scroll-fade-inline linear both;
|
|
295
|
+
animation-timeline: scroll(self block), scroll(self inline);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.scroll-fade.scroll-fade-x {
|
|
299
|
+
mask-image:
|
|
300
|
+
linear-gradient(var(--ground), var(--ground)), linear-gradient(var(--ground), var(--ground)),
|
|
301
|
+
linear-gradient(
|
|
302
|
+
to bottom,
|
|
303
|
+
transparent,
|
|
304
|
+
var(--ground) var(--scroll-fade-start),
|
|
305
|
+
var(--ground) calc(100% - var(--scroll-fade-end)),
|
|
306
|
+
transparent
|
|
307
|
+
),
|
|
308
|
+
linear-gradient(
|
|
309
|
+
to right,
|
|
310
|
+
transparent,
|
|
311
|
+
var(--ground) var(--scroll-fade-inline-start),
|
|
312
|
+
var(--ground) calc(100% - var(--scroll-fade-inline-end)),
|
|
313
|
+
transparent
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.scroll-fade-end.scroll-fade-x {
|
|
318
|
+
mask-image:
|
|
319
|
+
linear-gradient(var(--ground), var(--ground)), linear-gradient(var(--ground), var(--ground)),
|
|
320
|
+
linear-gradient(to bottom, var(--ground) calc(100% - var(--scroll-fade-end)), transparent),
|
|
321
|
+
linear-gradient(
|
|
322
|
+
to right,
|
|
323
|
+
transparent,
|
|
324
|
+
var(--ground) var(--scroll-fade-inline-start),
|
|
325
|
+
var(--ground) calc(100% - var(--scroll-fade-inline-end)),
|
|
326
|
+
transparent
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/* The fade grows in over the first tenth of the scroll and out over the
|
|
332
|
+
last, so it is full whenever there is more past that edge. */
|
|
333
|
+
@keyframes uiok-scroll-fade-block {
|
|
334
|
+
0% {
|
|
335
|
+
--scroll-fade-start: 0px;
|
|
336
|
+
--scroll-fade-end: var(--scroll-fade-size);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
10% {
|
|
340
|
+
--scroll-fade-start: var(--scroll-fade-size);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
90% {
|
|
344
|
+
--scroll-fade-end: var(--scroll-fade-size);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
100% {
|
|
348
|
+
--scroll-fade-start: var(--scroll-fade-size);
|
|
349
|
+
--scroll-fade-end: 0px;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@keyframes uiok-scroll-fade-inline {
|
|
354
|
+
0% {
|
|
355
|
+
--scroll-fade-inline-start: 0px;
|
|
356
|
+
--scroll-fade-inline-end: var(--scroll-fade-size);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
10% {
|
|
360
|
+
--scroll-fade-inline-start: var(--scroll-fade-size);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
90% {
|
|
364
|
+
--scroll-fade-inline-end: var(--scroll-fade-size);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
100% {
|
|
368
|
+
--scroll-fade-inline-start: var(--scroll-fade-size);
|
|
369
|
+
--scroll-fade-inline-end: 0px;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* Hover and press for every quiet control: one look per kind, written once
|
|
374
|
+
here so no component restates it. Each rule weighs one pseudo-class
|
|
375
|
+
(every other part sits in :where()), so hover and press weigh the same
|
|
376
|
+
and press, written last, wins while the pointer is down; a component's
|
|
377
|
+
own state rule (current, checked, lit, the cursor row) still wins over
|
|
378
|
+
both, and they win over a component's rest rule by coming after it. A
|
|
379
|
+
component must not give its hover more weight than this, or its press
|
|
380
|
+
shows the hover look. Only a control that can act takes them: a button,
|
|
381
|
+
a link, or a role a control has, not disabled, and not the chosen item
|
|
382
|
+
(the selected tab, the checked segment, the current page), which a
|
|
383
|
+
press would not change. A control whose pop-up is up (aria-expanded
|
|
384
|
+
with aria-haspopup: a menu or listbox trigger, or an expanded crumb,
|
|
385
|
+
which only ever opens its menu) keeps its hovered face while the pop-up
|
|
386
|
+
is open. A fold or disclosure that is open is not
|
|
387
|
+
holding anything up; its glyph says it is open, so it keeps its rest
|
|
388
|
+
face.
|
|
389
|
+
|
|
390
|
+
- Quiet control (an outlined-on-hover action, a crumb, a
|
|
391
|
+
strip's action): the frosted wash
|
|
392
|
+
and ring, words to full text, as the neutral Button.
|
|
393
|
+
- Tab, segment, or sort label in a track or strip, and a source list's
|
|
394
|
+
row (the Settings sidebar): the wash alone, words to full text; no
|
|
395
|
+
ring, since the track or the list already draws the frame.
|
|
396
|
+
- Pressed (both kinds, and the text-like controls: grid sort
|
|
397
|
+
labels, palette levels): the face sinks, as Button's does, inside a
|
|
398
|
+
hairline in --border-strong (--press-frost), so the press holds by
|
|
399
|
+
shape where the wash is faint, with words in full text.
|
|
400
|
+
|
|
401
|
+
A host's own control joins a recipe by class instead of restating it,
|
|
402
|
+
so it follows every later change to the look: .quiet-control takes the
|
|
403
|
+
quiet control's hover and press, .quiet-track-item the track item's
|
|
404
|
+
(wash, then press), and .toggle-chip (below) both for an outlined toggle.
|
|
405
|
+
The class carries states only, never a rest face, so the host keeps its
|
|
406
|
+
own size and shape (docs/components/surface.md). */
|
|
407
|
+
|
|
408
|
+
/* An outlined toggle chip (a mode, a filter, a reading of a field): off, a
|
|
409
|
+
--control-border outline on a clear ground with words in --text-dim, so
|
|
410
|
+
an unpressed toggle still reads as a control; on (aria-pressed="true"),
|
|
411
|
+
the one look of "on" below, a filled segment inside its ring. Hover and
|
|
412
|
+
press are the quiet control's (above). Heights follow the place, as a field's do:
|
|
413
|
+
28px, .toggle-chip-sm 24px, .toggle-chip-xs 20px inside a row; the corner
|
|
414
|
+
follows the height. Before the recipes, so each of them wins over it. */
|
|
415
|
+
.toggle-chip {
|
|
416
|
+
display: inline-flex;
|
|
417
|
+
flex: none;
|
|
418
|
+
align-items: center;
|
|
419
|
+
justify-content: center;
|
|
420
|
+
gap: var(--space-2);
|
|
421
|
+
box-sizing: border-box;
|
|
422
|
+
height: var(--control-height);
|
|
423
|
+
margin: 0;
|
|
424
|
+
padding: 0 var(--space-4);
|
|
425
|
+
border: var(--line) solid var(--control-border);
|
|
426
|
+
border-radius: var(--radius-md);
|
|
427
|
+
background: transparent;
|
|
428
|
+
color: var(--text-dim);
|
|
429
|
+
font: var(--font-weight-regular) var(--font-size-small) / 1 var(--font-ui);
|
|
430
|
+
white-space: nowrap;
|
|
431
|
+
cursor: default;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.toggle-chip-sm {
|
|
435
|
+
height: var(--control-height-sm);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.toggle-chip-xs {
|
|
439
|
+
height: var(--control-height-xs);
|
|
440
|
+
padding: 0 var(--space-3);
|
|
441
|
+
border-radius: var(--radius-sm);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
:where(
|
|
445
|
+
.pager-step,
|
|
446
|
+
.legend-slot,
|
|
447
|
+
.keylegend-verbs button,
|
|
448
|
+
.pane-act,
|
|
449
|
+
.pane-icon-act,
|
|
450
|
+
.path-star,
|
|
451
|
+
.page-tab,
|
|
452
|
+
.segmented-choice-option,
|
|
453
|
+
.date-picker-day,
|
|
454
|
+
.crumb-label,
|
|
455
|
+
.pane-sort.sortable,
|
|
456
|
+
.pane-strip-link,
|
|
457
|
+
.data-grid-sort,
|
|
458
|
+
.palette-level,
|
|
459
|
+
.settings-sidebar-page,
|
|
460
|
+
.settings-sidebar-subsection,
|
|
461
|
+
.quiet-control,
|
|
462
|
+
.quiet-track-item,
|
|
463
|
+
.toggle-chip
|
|
464
|
+
):where(button, a[href], [role='button'], [role='tab'], [role='radio']) {
|
|
465
|
+
transition: var(--transition-control);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
:where(
|
|
469
|
+
.pager-step,
|
|
470
|
+
.legend-slot,
|
|
471
|
+
.keylegend-verbs button,
|
|
472
|
+
.pane-act,
|
|
473
|
+
.pane-icon-act,
|
|
474
|
+
.path-star,
|
|
475
|
+
.crumb-label,
|
|
476
|
+
.pane-strip-link,
|
|
477
|
+
.settings-sidebar-page,
|
|
478
|
+
.settings-sidebar-subsection,
|
|
479
|
+
.quiet-control,
|
|
480
|
+
.toggle-chip
|
|
481
|
+
):where(button, a[href], [role='button'], [role='tab'], [role='radio']):where(
|
|
482
|
+
:not(
|
|
483
|
+
:disabled,
|
|
484
|
+
[aria-disabled='true'],
|
|
485
|
+
[aria-selected='true'],
|
|
486
|
+
[aria-checked='true'],
|
|
487
|
+
[aria-pressed='true'],
|
|
488
|
+
[aria-current]:not([aria-current='false'], [aria-current='date'], [aria-current='time'])
|
|
489
|
+
)
|
|
490
|
+
):is(
|
|
491
|
+
:hover,
|
|
492
|
+
[aria-expanded='true']:where([aria-haspopup]:not([aria-haspopup='false']), .crumb-label)
|
|
493
|
+
) {
|
|
494
|
+
box-shadow: var(--hover-frost);
|
|
495
|
+
background: var(--hover-wash);
|
|
496
|
+
color: var(--text);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
:where(
|
|
500
|
+
.page-tab,
|
|
501
|
+
.segmented-choice-option,
|
|
502
|
+
.date-picker-day,
|
|
503
|
+
.pane-sort.sortable,
|
|
504
|
+
.quiet-track-item
|
|
505
|
+
):where(button, a[href], [role='button'], [role='tab'], [role='radio']):where(
|
|
506
|
+
:not(
|
|
507
|
+
:disabled,
|
|
508
|
+
[aria-disabled='true'],
|
|
509
|
+
[aria-selected='true'],
|
|
510
|
+
[aria-checked='true'],
|
|
511
|
+
[aria-pressed='true'],
|
|
512
|
+
[aria-current]:not([aria-current='false'], [aria-current='date'], [aria-current='time'])
|
|
513
|
+
)
|
|
514
|
+
):is(
|
|
515
|
+
:hover,
|
|
516
|
+
[aria-expanded='true']:where([aria-haspopup]:not([aria-haspopup='false']), .crumb-label)
|
|
517
|
+
) {
|
|
518
|
+
background: var(--hover-wash);
|
|
519
|
+
color: var(--text);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
:where(
|
|
523
|
+
.pager-step,
|
|
524
|
+
.legend-slot,
|
|
525
|
+
.keylegend-verbs button,
|
|
526
|
+
.pane-act,
|
|
527
|
+
.pane-icon-act,
|
|
528
|
+
.path-star,
|
|
529
|
+
.page-tab,
|
|
530
|
+
.segmented-choice-option,
|
|
531
|
+
.date-picker-day,
|
|
532
|
+
.crumb-label,
|
|
533
|
+
.pane-sort.sortable,
|
|
534
|
+
.pane-strip-link,
|
|
535
|
+
.data-grid-sort,
|
|
536
|
+
.palette-level,
|
|
537
|
+
.disclosure,
|
|
538
|
+
.settings-sidebar-page,
|
|
539
|
+
.settings-sidebar-subsection,
|
|
540
|
+
.quiet-control,
|
|
541
|
+
.quiet-track-item,
|
|
542
|
+
.toggle-chip
|
|
543
|
+
):where(button, a[href], [role='button'], [role='tab'], [role='radio']):where(
|
|
544
|
+
:not(
|
|
545
|
+
:disabled,
|
|
546
|
+
[aria-disabled='true'],
|
|
547
|
+
[aria-selected='true'],
|
|
548
|
+
[aria-checked='true'],
|
|
549
|
+
[aria-pressed='true'],
|
|
550
|
+
[aria-current]:not([aria-current='false'], [aria-current='date'], [aria-current='time'])
|
|
551
|
+
)
|
|
552
|
+
):active {
|
|
553
|
+
box-shadow: var(--press-frost);
|
|
554
|
+
background: var(--pressed-wash);
|
|
555
|
+
color: var(--text);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/* A toggle that is on (a button with aria-pressed="true": a mode, a
|
|
559
|
+
filter chip, an open menu's chip): the current item's tint, ring, and
|
|
560
|
+
words, the one look of "on" for a button. The hover and press recipes,
|
|
561
|
+
the shared ones above and each component's own, leave an on toggle out,
|
|
562
|
+
so it keeps its look under the pointer; a host rule that paints the
|
|
563
|
+
button's rest face with more weight leaves the on state to this rule
|
|
564
|
+
(:not([aria-pressed='true'])). A toggle that mirrors a held key keeps
|
|
565
|
+
its own solid accent. */
|
|
566
|
+
:where(button)[aria-pressed='true'] {
|
|
567
|
+
box-shadow: inset 0 0 0 var(--line) var(--current-ring);
|
|
568
|
+
background: var(--current-bg);
|
|
569
|
+
color: var(--current-text);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* No hover or press recipe touches an on toggle (each leaves
|
|
573
|
+
[aria-pressed='true'] out, as it leaves out the chosen item), so the on
|
|
574
|
+
look holds under the pointer. A press sinks the on face, as every press
|
|
575
|
+
does, inside the same ring: still on, visibly held. */
|
|
576
|
+
:where(button)[aria-pressed='true']:active:where(:not(:disabled, [aria-disabled='true'])) {
|
|
577
|
+
box-shadow:
|
|
578
|
+
var(--shadow-pressed),
|
|
579
|
+
inset 0 0 0 var(--line) var(--current-ring);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/* A focusable element that the keyboard reached: one ring from the focus
|
|
583
|
+
tokens. :where() leaves it the weight of :focus-visible alone, so a
|
|
584
|
+
component that must draw its ring inside a clipping parent changes only
|
|
585
|
+
outline-offset, and a host's class rule after it wins over it (a bare
|
|
586
|
+
element rule does not). A container focused by script (tabindex="-1")
|
|
587
|
+
draws no ring here. */
|
|
588
|
+
:where(
|
|
589
|
+
button,
|
|
590
|
+
a[href],
|
|
591
|
+
input,
|
|
592
|
+
select,
|
|
593
|
+
textarea,
|
|
594
|
+
summary,
|
|
595
|
+
[tabindex]:not([tabindex^='-'])
|
|
596
|
+
):focus-visible {
|
|
597
|
+
outline: var(--focus-ring-width) solid var(--accent);
|
|
598
|
+
outline-offset: var(--focus-offset);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/* A pointer target at least --hit-target square, whatever the drawn size:
|
|
602
|
+
the pseudo-element grows the hit area around a small control without
|
|
603
|
+
moving it. A control already that size gains nothing. Where neighbours
|
|
604
|
+
sit closer than the growth (pager steps 2px apart), a component limits
|
|
605
|
+
the growth to the block axis. */
|
|
606
|
+
.hit-target {
|
|
607
|
+
position: relative;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.hit-target::after {
|
|
611
|
+
position: absolute;
|
|
612
|
+
inset: min(0px, calc((100% - var(--hit-target)) / 2));
|
|
613
|
+
content: '';
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/* The Spinner (src/icon): one turn per --duration-spin, standing still
|
|
617
|
+
under reduced motion. */
|
|
618
|
+
.spinner {
|
|
619
|
+
flex: none;
|
|
620
|
+
animation: uiok-spin var(--duration-spin) linear infinite;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
@media (prefers-reduced-motion: reduce) {
|
|
624
|
+
.spinner {
|
|
625
|
+
animation: none;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
@keyframes uiok-spin {
|
|
630
|
+
to {
|
|
631
|
+
transform: rotate(1turn);
|
|
632
|
+
}
|
|
46
633
|
}
|
|
47
634
|
|
|
48
635
|
/* Kept in the accessibility tree but off screen, for text that only assistive
|
|
@@ -60,23 +647,34 @@
|
|
|
60
647
|
|
|
61
648
|
/* A control that cannot act right now: a disabled field or button, a menu
|
|
62
649
|
row or an option marked aria-disabled, a label whose checkbox or field is
|
|
63
|
-
disabled. It keeps its place and its words,
|
|
64
|
-
fill) to --disabled-opacity, and the pointer
|
|
65
|
-
one already faded it fades no further.
|
|
650
|
+
disabled, a field box whose input is. It keeps its place and its words,
|
|
651
|
+
faded whole (words, icon, and fill) to --disabled-opacity, and the pointer
|
|
652
|
+
stays an arrow over it. Inside one already faded it fades no further. A
|
|
653
|
+
checkbox or radio is left out: a .check draws its own disabled look
|
|
654
|
+
(field.css), and a box the platform draws already greys itself, so a
|
|
655
|
+
second fade would stack on the first. :root weighs it over a page's own
|
|
66
656
|
cursor and opacity for a control; a control that hides its native input (a
|
|
67
657
|
switch, a radio row) keeps the input hidden with a heavier rule and fades
|
|
68
658
|
what it draws instead. A hover or cursor-row highlight leaves out a
|
|
69
659
|
disabled control in its own rule (:enabled, :not([aria-disabled='true'])). */
|
|
70
660
|
:root
|
|
71
661
|
:is(
|
|
72
|
-
:is(
|
|
662
|
+
:is(
|
|
663
|
+
button,
|
|
664
|
+
input:not([type='checkbox'], [type='radio']),
|
|
665
|
+
input.switch,
|
|
666
|
+
select,
|
|
667
|
+
textarea
|
|
668
|
+
):disabled,
|
|
73
669
|
:is(button, [role^='menuitem'], [role='option'])[aria-disabled='true'],
|
|
74
|
-
label:is([data-disabled], :has(> :is(input, select, textarea):disabled))
|
|
670
|
+
label:is([data-disabled], :has(> :is(input, select, textarea):disabled)),
|
|
671
|
+
.field-box:has(> input:disabled)
|
|
75
672
|
):not(
|
|
76
673
|
:where(
|
|
77
674
|
:is(button, input, select, textarea):disabled,
|
|
78
675
|
[aria-disabled='true'],
|
|
79
|
-
label:is([data-disabled], :has(> :is(input, select, textarea):disabled))
|
|
676
|
+
label:is([data-disabled], :has(> :is(input, select, textarea):disabled)),
|
|
677
|
+
.field-box:has(> input:disabled)
|
|
80
678
|
)
|
|
81
679
|
*
|
|
82
680
|
) {
|