@liberation-data/desk 0.27.0 → 0.28.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/dist/css/controls.css +21 -3
- package/dist/desk.css +21 -3
- package/llms.txt +2 -0
- package/package.json +1 -1
- package/src/css/controls.css +21 -3
package/dist/css/controls.css
CHANGED
|
@@ -114,10 +114,15 @@
|
|
|
114
114
|
|
|
115
115
|
/*
|
|
116
116
|
* A track with one raised thumb on it. The track is a tint of the ink and the thumb is the surface
|
|
117
|
-
* lifted
|
|
118
|
-
*
|
|
117
|
+
* lifted, so the thumb is the lighter of the two on a dark ground and on a light one; filled with
|
|
118
|
+
* the surface alone it was the DARKEST thing on a dark ground, and read as a hole.
|
|
119
119
|
* No border on either: the shadow is what says raised, and it says it where the fills are close.
|
|
120
120
|
*
|
|
121
|
+
* On a light ground it is lifted towards white. On a dark one that mix took the hue out and left a
|
|
122
|
+
* grey in no theme, so there the surface's LIGHTNESS is raised in OKLCH, keeping its hue, and a
|
|
123
|
+
* share of the accent is mixed in. On the thumb, not a root token: a host sets --desk-surface on
|
|
124
|
+
* its own wrapper. `--desk-segment-thumb` replaces either fill.
|
|
125
|
+
*
|
|
121
126
|
* The thumb is as tall as a button and the track is its 2px inset around that.
|
|
122
127
|
*/
|
|
123
128
|
.desk-segmented {
|
|
@@ -134,12 +139,25 @@
|
|
|
134
139
|
top: 0;
|
|
135
140
|
left: 0;
|
|
136
141
|
border-radius: var(--desk-control-radius);
|
|
137
|
-
background: color-mix(in srgb, var(--desk-surface), white 24%);
|
|
142
|
+
background: var(--desk-segment-thumb, color-mix(in srgb, var(--desk-surface), white 24%));
|
|
138
143
|
box-shadow: 0 1px 3px rgb(0 0 0 / 22%), 0 0 0 .5px rgb(0 0 0 / 10%);
|
|
139
144
|
transition: transform .22s var(--desk-ease), width .22s var(--desk-ease);
|
|
140
145
|
pointer-events: none;
|
|
141
146
|
}
|
|
142
147
|
|
|
148
|
+
/* Relative colour is what raises lightness alone. A browser without it keeps the mix above. */
|
|
149
|
+
@supports (color: oklch(from white l c h)) {
|
|
150
|
+
@media (prefers-color-scheme: dark) {
|
|
151
|
+
:root:not([data-theme="light"]) .desk-segment-thumb {
|
|
152
|
+
background: var(--desk-segment-thumb, color-mix(in oklab, oklch(from var(--desk-surface) calc(l + .09) c h), var(--desk-accent) 14%));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:root[data-theme="dark"] .desk-segment-thumb {
|
|
157
|
+
background: var(--desk-segment-thumb, color-mix(in oklab, oklch(from var(--desk-surface) calc(l + .09) c h), var(--desk-accent) 14%));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
143
161
|
.desk-segment {
|
|
144
162
|
position: relative;
|
|
145
163
|
display: inline-flex;
|
package/dist/desk.css
CHANGED
|
@@ -1400,10 +1400,15 @@
|
|
|
1400
1400
|
|
|
1401
1401
|
/*
|
|
1402
1402
|
* A track with one raised thumb on it. The track is a tint of the ink and the thumb is the surface
|
|
1403
|
-
* lifted
|
|
1404
|
-
*
|
|
1403
|
+
* lifted, so the thumb is the lighter of the two on a dark ground and on a light one; filled with
|
|
1404
|
+
* the surface alone it was the DARKEST thing on a dark ground, and read as a hole.
|
|
1405
1405
|
* No border on either: the shadow is what says raised, and it says it where the fills are close.
|
|
1406
1406
|
*
|
|
1407
|
+
* On a light ground it is lifted towards white. On a dark one that mix took the hue out and left a
|
|
1408
|
+
* grey in no theme, so there the surface's LIGHTNESS is raised in OKLCH, keeping its hue, and a
|
|
1409
|
+
* share of the accent is mixed in. On the thumb, not a root token: a host sets --desk-surface on
|
|
1410
|
+
* its own wrapper. `--desk-segment-thumb` replaces either fill.
|
|
1411
|
+
*
|
|
1407
1412
|
* The thumb is as tall as a button and the track is its 2px inset around that.
|
|
1408
1413
|
*/
|
|
1409
1414
|
.desk-segmented {
|
|
@@ -1420,12 +1425,25 @@
|
|
|
1420
1425
|
top: 0;
|
|
1421
1426
|
left: 0;
|
|
1422
1427
|
border-radius: var(--desk-control-radius);
|
|
1423
|
-
background: color-mix(in srgb, var(--desk-surface), white 24%);
|
|
1428
|
+
background: var(--desk-segment-thumb, color-mix(in srgb, var(--desk-surface), white 24%));
|
|
1424
1429
|
box-shadow: 0 1px 3px rgb(0 0 0 / 22%), 0 0 0 .5px rgb(0 0 0 / 10%);
|
|
1425
1430
|
transition: transform .22s var(--desk-ease), width .22s var(--desk-ease);
|
|
1426
1431
|
pointer-events: none;
|
|
1427
1432
|
}
|
|
1428
1433
|
|
|
1434
|
+
/* Relative colour is what raises lightness alone. A browser without it keeps the mix above. */
|
|
1435
|
+
@supports (color: oklch(from white l c h)) {
|
|
1436
|
+
@media (prefers-color-scheme: dark) {
|
|
1437
|
+
:root:not([data-theme="light"]) .desk-segment-thumb {
|
|
1438
|
+
background: var(--desk-segment-thumb, color-mix(in oklab, oklch(from var(--desk-surface) calc(l + .09) c h), var(--desk-accent) 14%));
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
:root[data-theme="dark"] .desk-segment-thumb {
|
|
1443
|
+
background: var(--desk-segment-thumb, color-mix(in oklab, oklch(from var(--desk-surface) calc(l + .09) c h), var(--desk-accent) 14%));
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1429
1447
|
.desk-segment {
|
|
1430
1448
|
position: relative;
|
|
1431
1449
|
display: inline-flex;
|
package/llms.txt
CHANGED
|
@@ -384,6 +384,8 @@ SearchCommand = 'desk.search' // a menu item can open i
|
|
|
384
384
|
<Button intent?={'normal'|'default'|'quiet'|'destructive'} size?={'regular'|'small'} icon? … />
|
|
385
385
|
<SegmentedControl options={{value,label,icon?,disabled?}[]} value onChange label size? disabled? width?={fit|fill} />
|
|
386
386
|
// selection is one sliding `.desk-segment-thumb`, not a fill on the option;
|
|
387
|
+
// on dark it is the surface lightened and tinted 14% with the accent;
|
|
388
|
+
// --desk-segment-thumb replaces its fill
|
|
387
389
|
// track is 32px tall (26 small), 4 more than a button
|
|
388
390
|
<Tabs tabs={{value,label,badge?,disabled?}[]} value onChange label actions?>{selected view}</Tabs>
|
|
389
391
|
// switches the view below; a segmented control chooses
|
package/package.json
CHANGED
package/src/css/controls.css
CHANGED
|
@@ -113,10 +113,15 @@
|
|
|
113
113
|
|
|
114
114
|
/*
|
|
115
115
|
* A track with one raised thumb on it. The track is a tint of the ink and the thumb is the surface
|
|
116
|
-
* lifted
|
|
117
|
-
*
|
|
116
|
+
* lifted, so the thumb is the lighter of the two on a dark ground and on a light one; filled with
|
|
117
|
+
* the surface alone it was the DARKEST thing on a dark ground, and read as a hole.
|
|
118
118
|
* No border on either: the shadow is what says raised, and it says it where the fills are close.
|
|
119
119
|
*
|
|
120
|
+
* On a light ground it is lifted towards white. On a dark one that mix took the hue out and left a
|
|
121
|
+
* grey in no theme, so there the surface's LIGHTNESS is raised in OKLCH, keeping its hue, and a
|
|
122
|
+
* share of the accent is mixed in. On the thumb, not a root token: a host sets --desk-surface on
|
|
123
|
+
* its own wrapper. `--desk-segment-thumb` replaces either fill.
|
|
124
|
+
*
|
|
120
125
|
* The thumb is as tall as a button and the track is its 2px inset around that.
|
|
121
126
|
*/
|
|
122
127
|
.desk-segmented {
|
|
@@ -133,12 +138,25 @@
|
|
|
133
138
|
top: 0;
|
|
134
139
|
left: 0;
|
|
135
140
|
border-radius: var(--desk-control-radius);
|
|
136
|
-
background: color-mix(in srgb, var(--desk-surface), white 24%);
|
|
141
|
+
background: var(--desk-segment-thumb, color-mix(in srgb, var(--desk-surface), white 24%));
|
|
137
142
|
box-shadow: 0 1px 3px rgb(0 0 0 / 22%), 0 0 0 .5px rgb(0 0 0 / 10%);
|
|
138
143
|
transition: transform .22s var(--desk-ease), width .22s var(--desk-ease);
|
|
139
144
|
pointer-events: none;
|
|
140
145
|
}
|
|
141
146
|
|
|
147
|
+
/* Relative colour is what raises lightness alone. A browser without it keeps the mix above. */
|
|
148
|
+
@supports (color: oklch(from white l c h)) {
|
|
149
|
+
@media (prefers-color-scheme: dark) {
|
|
150
|
+
:root:not([data-theme="light"]) .desk-segment-thumb {
|
|
151
|
+
background: var(--desk-segment-thumb, color-mix(in oklab, oklch(from var(--desk-surface) calc(l + .09) c h), var(--desk-accent) 14%));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:root[data-theme="dark"] .desk-segment-thumb {
|
|
156
|
+
background: var(--desk-segment-thumb, color-mix(in oklab, oklch(from var(--desk-surface) calc(l + .09) c h), var(--desk-accent) 14%));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
142
160
|
.desk-segment {
|
|
143
161
|
position: relative;
|
|
144
162
|
display: inline-flex;
|