@liberation-data/desk 0.26.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/README.md CHANGED
@@ -301,6 +301,18 @@ keeps it for screen readers), and an `error` marks it invalid and replaces the h
301
301
  is the handful of cards a setup step turns on — an icon, a label, a line of why — with native radios
302
302
  underneath, so it is one tab stop and the arrow keys move the choice.
303
303
 
304
+ ```tsx
305
+ <Disclosure label="Filter" open={open} onOpenChange={setOpen}
306
+ summary={tag && <Chip onRemove={() => setTag('')} removeLabel="Clear the tag">tagged {tag}</Chip>}>
307
+ {the filter fields}
308
+ </Disclosure>
309
+ ```
310
+
311
+ A disclosure folds the settings most people leave alone behind one line, and its `summary` says what they
312
+ are set to: a chip for each one off its default, so the folded line is never a mystery. The body stays
313
+ mounted while folded, so a field keeps its value. A chip is one thing that is set or chosen; with `onRemove`
314
+ it ends in a × that takes it away, named by `removeLabel`.
315
+
304
316
  ## Waiting
305
317
 
306
318
  ```tsx
@@ -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 towards white, so the thumb is the lighter of the two on a dark ground and on a light one;
118
- * filled with the surface alone it was the DARKEST thing on a dark ground, and read as a hole.
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;
@@ -1238,3 +1256,116 @@
1238
1256
  animation: desk-spinner-breathe 1.8s ease-in-out infinite;
1239
1257
  }
1240
1258
  }
1259
+
1260
+ /*
1261
+ * A FOLDED SECTION (`Disclosure`) and what it is set to (`Chip`). The head wraps a whole chip at a
1262
+ * time, so a narrow window stacks chips rather than breaking one in two.
1263
+ */
1264
+ .desk-disclosure-head {
1265
+ display: flex;
1266
+ flex-wrap: wrap;
1267
+ align-items: center;
1268
+ gap: var(--desk-space-1) var(--desk-space-2);
1269
+ color: var(--desk-muted);
1270
+ font-size: var(--desk-text-small);
1271
+ }
1272
+
1273
+ .desk-disclosure-toggle {
1274
+ position: relative;
1275
+ display: inline-flex;
1276
+ align-items: center;
1277
+ gap: var(--desk-space-1);
1278
+ min-height: var(--desk-control-height-small);
1279
+ padding: 0 var(--desk-space-1);
1280
+ border: 0;
1281
+ border-radius: var(--desk-control-radius);
1282
+ background: none;
1283
+ color: inherit;
1284
+ font: inherit;
1285
+ font-weight: 500;
1286
+ cursor: pointer;
1287
+ }
1288
+
1289
+ .desk-disclosure-toggle:hover,
1290
+ .desk-disclosure-toggle[aria-expanded="true"] {
1291
+ color: var(--desk-ink);
1292
+ }
1293
+
1294
+ /* A chevron drawn from two borders, so it takes the text colour and turns to point at what opened. */
1295
+ .desk-disclosure-caret {
1296
+ width: 5px;
1297
+ height: 5px;
1298
+ margin: 0 3px 0 1px;
1299
+ border: solid currentColor;
1300
+ border-width: 0 1.5px 1.5px 0;
1301
+ transform: rotate(-45deg);
1302
+ transition: transform .12s var(--desk-ease);
1303
+ }
1304
+
1305
+ .desk-disclosure-toggle[aria-expanded="true"] .desk-disclosure-caret {
1306
+ transform: rotate(45deg);
1307
+ }
1308
+
1309
+ .desk-disclosure-body {
1310
+ margin-top: var(--desk-space-2);
1311
+ padding: var(--desk-space-3);
1312
+ border: 1px solid var(--desk-rule);
1313
+ border-radius: var(--desk-control-radius);
1314
+ background: color-mix(in srgb, var(--desk-ink) 3%, transparent);
1315
+ }
1316
+
1317
+ .desk-chip {
1318
+ display: inline-flex;
1319
+ align-items: center;
1320
+ max-width: 100%;
1321
+ min-height: var(--desk-control-height-small);
1322
+ padding: 0 var(--desk-space-2);
1323
+ border: 1px solid var(--desk-rule);
1324
+ border-radius: var(--desk-control-radius);
1325
+ background: var(--desk-surface);
1326
+ color: var(--desk-ink);
1327
+ font-size: var(--desk-text-small);
1328
+ overflow-wrap: anywhere;
1329
+ }
1330
+
1331
+ .desk-chip-remove {
1332
+ position: relative;
1333
+ margin: 0 calc(var(--desk-space-1) * -1) 0 var(--desk-space-1);
1334
+ padding: 0 var(--desk-space-1);
1335
+ border: 0;
1336
+ border-radius: var(--desk-control-radius);
1337
+ background: none;
1338
+ color: var(--desk-muted);
1339
+ font-size: var(--desk-text-lead);
1340
+ line-height: 1;
1341
+ cursor: pointer;
1342
+ }
1343
+
1344
+ .desk-chip-remove:hover {
1345
+ color: var(--desk-ink);
1346
+ }
1347
+
1348
+ .desk-disclosure-toggle:focus-visible,
1349
+ .desk-chip-remove:focus-visible {
1350
+ outline: 2px solid var(--desk-accent);
1351
+ outline-offset: 2px;
1352
+ }
1353
+
1354
+ @media (pointer: coarse) {
1355
+ .desk-disclosure-toggle::after,
1356
+ .desk-chip-remove::after {
1357
+ content: "";
1358
+ position: absolute;
1359
+ top: 50%;
1360
+ left: 50%;
1361
+ width: max(100%, 44px);
1362
+ height: max(100%, 44px);
1363
+ transform: translate(-50%, -50%);
1364
+ }
1365
+ }
1366
+
1367
+ @media (prefers-reduced-motion: reduce) {
1368
+ .desk-disclosure-caret {
1369
+ transition: none;
1370
+ }
1371
+ }
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 towards white, so the thumb is the lighter of the two on a dark ground and on a light one;
1404
- * filled with the surface alone it was the DARKEST thing on a dark ground, and read as a hole.
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;
@@ -2525,6 +2543,119 @@
2525
2543
  }
2526
2544
  }
2527
2545
 
2546
+ /*
2547
+ * A FOLDED SECTION (`Disclosure`) and what it is set to (`Chip`). The head wraps a whole chip at a
2548
+ * time, so a narrow window stacks chips rather than breaking one in two.
2549
+ */
2550
+ .desk-disclosure-head {
2551
+ display: flex;
2552
+ flex-wrap: wrap;
2553
+ align-items: center;
2554
+ gap: var(--desk-space-1) var(--desk-space-2);
2555
+ color: var(--desk-muted);
2556
+ font-size: var(--desk-text-small);
2557
+ }
2558
+
2559
+ .desk-disclosure-toggle {
2560
+ position: relative;
2561
+ display: inline-flex;
2562
+ align-items: center;
2563
+ gap: var(--desk-space-1);
2564
+ min-height: var(--desk-control-height-small);
2565
+ padding: 0 var(--desk-space-1);
2566
+ border: 0;
2567
+ border-radius: var(--desk-control-radius);
2568
+ background: none;
2569
+ color: inherit;
2570
+ font: inherit;
2571
+ font-weight: 500;
2572
+ cursor: pointer;
2573
+ }
2574
+
2575
+ .desk-disclosure-toggle:hover,
2576
+ .desk-disclosure-toggle[aria-expanded="true"] {
2577
+ color: var(--desk-ink);
2578
+ }
2579
+
2580
+ /* A chevron drawn from two borders, so it takes the text colour and turns to point at what opened. */
2581
+ .desk-disclosure-caret {
2582
+ width: 5px;
2583
+ height: 5px;
2584
+ margin: 0 3px 0 1px;
2585
+ border: solid currentColor;
2586
+ border-width: 0 1.5px 1.5px 0;
2587
+ transform: rotate(-45deg);
2588
+ transition: transform .12s var(--desk-ease);
2589
+ }
2590
+
2591
+ .desk-disclosure-toggle[aria-expanded="true"] .desk-disclosure-caret {
2592
+ transform: rotate(45deg);
2593
+ }
2594
+
2595
+ .desk-disclosure-body {
2596
+ margin-top: var(--desk-space-2);
2597
+ padding: var(--desk-space-3);
2598
+ border: 1px solid var(--desk-rule);
2599
+ border-radius: var(--desk-control-radius);
2600
+ background: color-mix(in srgb, var(--desk-ink) 3%, transparent);
2601
+ }
2602
+
2603
+ .desk-chip {
2604
+ display: inline-flex;
2605
+ align-items: center;
2606
+ max-width: 100%;
2607
+ min-height: var(--desk-control-height-small);
2608
+ padding: 0 var(--desk-space-2);
2609
+ border: 1px solid var(--desk-rule);
2610
+ border-radius: var(--desk-control-radius);
2611
+ background: var(--desk-surface);
2612
+ color: var(--desk-ink);
2613
+ font-size: var(--desk-text-small);
2614
+ overflow-wrap: anywhere;
2615
+ }
2616
+
2617
+ .desk-chip-remove {
2618
+ position: relative;
2619
+ margin: 0 calc(var(--desk-space-1) * -1) 0 var(--desk-space-1);
2620
+ padding: 0 var(--desk-space-1);
2621
+ border: 0;
2622
+ border-radius: var(--desk-control-radius);
2623
+ background: none;
2624
+ color: var(--desk-muted);
2625
+ font-size: var(--desk-text-lead);
2626
+ line-height: 1;
2627
+ cursor: pointer;
2628
+ }
2629
+
2630
+ .desk-chip-remove:hover {
2631
+ color: var(--desk-ink);
2632
+ }
2633
+
2634
+ .desk-disclosure-toggle:focus-visible,
2635
+ .desk-chip-remove:focus-visible {
2636
+ outline: 2px solid var(--desk-accent);
2637
+ outline-offset: 2px;
2638
+ }
2639
+
2640
+ @media (pointer: coarse) {
2641
+ .desk-disclosure-toggle::after,
2642
+ .desk-chip-remove::after {
2643
+ content: "";
2644
+ position: absolute;
2645
+ top: 50%;
2646
+ left: 50%;
2647
+ width: max(100%, 44px);
2648
+ height: max(100%, 44px);
2649
+ transform: translate(-50%, -50%);
2650
+ }
2651
+ }
2652
+
2653
+ @media (prefers-reduced-motion: reduce) {
2654
+ .desk-disclosure-caret {
2655
+ transition: none;
2656
+ }
2657
+ }
2658
+
2528
2659
  /* @liberation-data/desk — overlays.css */
2529
2660
  /* ── Overlays ── */
2530
2661
 
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface DisclosureProps {
3
+ /** What is folded away, as a noun: "Filter", "Advanced". It is the button's whole label. */
4
+ readonly label: string;
5
+ readonly open: boolean;
6
+ readonly onOpenChange: (open: boolean) => void;
7
+ /**
8
+ * Beside the label, folded or open: what the section is currently set to. Chips, usually — one
9
+ * per setting that is off its default — so the folded line is never a mystery.
10
+ */
11
+ readonly summary?: ReactNode;
12
+ readonly children: ReactNode;
13
+ readonly className?: string;
14
+ }
15
+ export declare function Disclosure({ label, open, onOpenChange, summary, children, className }: DisclosureProps): import("react").JSX.Element;
16
+ export interface ChipProps {
17
+ readonly children: ReactNode;
18
+ /** With it the chip ends in a × that calls this: the chip is then how the thing is taken away. */
19
+ readonly onRemove?: () => void;
20
+ /** The ×'s name, saying what goes: "Clear the tag", "Remove report.pdf". */
21
+ readonly removeLabel?: string;
22
+ readonly className?: string;
23
+ }
24
+ /** One thing that is set or chosen, said in a word or two: a filter in force, a tag, a staged file. */
25
+ export declare function Chip({ children, onRemove, removeLabel, className }: ChipProps): import("react").JSX.Element;
26
+ //# sourceMappingURL=disclosure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../src/react/disclosure.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AActC,MAAM,WAAW,eAAe;IAC9B,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,+BAsBtG;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,kGAAkG;IAClG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,uGAAuG;AACvG,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAsB,EAAE,SAAS,EAAE,EAAE,SAAS,+BAWxF"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId } from 'react';
3
+ export function Disclosure({ label, open, onOpenChange, summary, children, className }) {
4
+ const id = useId();
5
+ return (_jsxs("div", { className: ['desk-disclosure', className].filter(Boolean).join(' '), children: [_jsxs("div", { className: "desk-disclosure-head", children: [_jsxs("button", { type: "button", className: "desk-disclosure-toggle", "aria-expanded": open, "aria-controls": id, onClick: () => onOpenChange(!open), children: [_jsx("span", { className: "desk-disclosure-caret", "aria-hidden": "true" }), label] }), summary] }), _jsx("div", { id: id, className: "desk-disclosure-body", hidden: !open, children: children })] }));
6
+ }
7
+ /** One thing that is set or chosen, said in a word or two: a filter in force, a tag, a staged file. */
8
+ export function Chip({ children, onRemove, removeLabel = 'Remove', className }) {
9
+ return (_jsxs("span", { className: ['desk-chip', className].filter(Boolean).join(' '), children: [children, onRemove && (_jsx("button", { type: "button", className: "desk-chip-remove", "aria-label": removeLabel, onClick: onRemove, children: _jsx("span", { "aria-hidden": "true", children: "\u00D7" }) }))] }));
10
+ }
11
+ //# sourceMappingURL=disclosure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.js","sourceRoot":"","sources":["../../src/react/disclosure.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AA6B7B,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAmB;IACrG,MAAM,EAAE,GAAG,KAAK,EAAE,CAAA;IAClB,OAAO,CACL,eAAK,SAAS,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aACtE,eAAK,SAAS,EAAC,sBAAsB,aACnC,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,wBAAwB,mBACnB,IAAI,mBACJ,EAAE,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,aAElC,eAAM,SAAS,EAAC,uBAAuB,iBAAa,MAAM,GAAG,EAC5D,KAAK,IACC,EACR,OAAO,IACJ,EACN,cAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,sBAAsB,EAAC,MAAM,EAAE,CAAC,IAAI,YACxD,QAAQ,GACL,IACF,CACP,CAAA;AACH,CAAC;AAWD,uGAAuG;AACvG,MAAM,UAAU,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,GAAG,QAAQ,EAAE,SAAS,EAAa;IACvF,OAAO,CACL,gBAAM,SAAS,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAChE,QAAQ,EACR,QAAQ,IAAI,CACX,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,kBAAkB,gBAAa,WAAW,EAAE,OAAO,EAAE,QAAQ,YAC3F,8BAAkB,MAAM,uBAAS,GAC1B,CACV,IACI,CACR,CAAA;AACH,CAAC"}
@@ -35,6 +35,8 @@ export { localSetupStore, useSetupProgress } from './setupProgress.js';
35
35
  export type { SetupProgress, SetupProgressOptions, SetupRecord, SetupStore } from './setupProgress.js';
36
36
  export type { ChecklistProps, Task, TaskProgress, Tasks, TaskState } from './tasks.js';
37
37
  export { PopUpButton } from './popup.js';
38
+ export { Chip, Disclosure } from './disclosure.js';
39
+ export type { ChipProps, DisclosureProps } from './disclosure.js';
38
40
  export type { PopUpButtonProps, PopUpOption } from './popup.js';
39
41
  export { Tabs } from './tabs.js';
40
42
  export type { Tab, TabsProps } from './tabs.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC1E,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAChG,YAAY,EACV,OAAO,EACP,IAAI,EACJ,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,SAAS,EA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A;AAChE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC/E,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
@@ -17,6 +17,7 @@ export { InfoTip } from './infoTip.js';
17
17
  export { Checklist, useTasks } from './tasks.js';
18
18
  export { localSetupStore, useSetupProgress } from './setupProgress.js';
19
19
  export { PopUpButton } from './popup.js';
20
+ export { Chip, Disclosure } from './disclosure.js';
20
21
  export { Tabs } from './tabs.js';
21
22
  export { Table } from './table.js';
22
23
  export { Sidebar } from './sidebar.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE1E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAWhG,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAExF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEnF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;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eAAe,CAAA;AAExC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
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
@@ -396,6 +398,10 @@ SearchCommand = 'desk.search' // a menu item can open i
396
398
  // cards for a setup step; native radios, arrow keys move the choice
397
399
  <PopUpButton value={T|null} onChange options={{value,label,description?,icon?,disabled?}[]}
398
400
  label labelHidden? placeholder? disabled? size? />
401
+ <Disclosure label open onOpenChange summary?={ReactNode} className?>{folded controls}</Disclosure>
402
+ // one caret button; summary sits beside it folded or open;
403
+ // the body stays mounted while folded, so fields keep their values
404
+ <Chip onRemove? removeLabel? className?>{a word or two}</Chip> // one thing set or chosen; × only with onRemove
399
405
  ```
400
406
 
401
407
  ### Waiting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liberation-data/desk",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "description": "A desktop for the web, for React: windows, a dock, menus and commands, controls, tours and setup assistants.",
5
5
  "keywords": [
6
6
  "react",
@@ -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 towards white, so the thumb is the lighter of the two on a dark ground and on a light one;
117
- * filled with the surface alone it was the DARKEST thing on a dark ground, and read as a hole.
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;
@@ -1237,3 +1255,116 @@
1237
1255
  animation: desk-spinner-breathe 1.8s ease-in-out infinite;
1238
1256
  }
1239
1257
  }
1258
+
1259
+ /*
1260
+ * A FOLDED SECTION (`Disclosure`) and what it is set to (`Chip`). The head wraps a whole chip at a
1261
+ * time, so a narrow window stacks chips rather than breaking one in two.
1262
+ */
1263
+ .desk-disclosure-head {
1264
+ display: flex;
1265
+ flex-wrap: wrap;
1266
+ align-items: center;
1267
+ gap: var(--desk-space-1) var(--desk-space-2);
1268
+ color: var(--desk-muted);
1269
+ font-size: var(--desk-text-small);
1270
+ }
1271
+
1272
+ .desk-disclosure-toggle {
1273
+ position: relative;
1274
+ display: inline-flex;
1275
+ align-items: center;
1276
+ gap: var(--desk-space-1);
1277
+ min-height: var(--desk-control-height-small);
1278
+ padding: 0 var(--desk-space-1);
1279
+ border: 0;
1280
+ border-radius: var(--desk-control-radius);
1281
+ background: none;
1282
+ color: inherit;
1283
+ font: inherit;
1284
+ font-weight: 500;
1285
+ cursor: pointer;
1286
+ }
1287
+
1288
+ .desk-disclosure-toggle:hover,
1289
+ .desk-disclosure-toggle[aria-expanded="true"] {
1290
+ color: var(--desk-ink);
1291
+ }
1292
+
1293
+ /* A chevron drawn from two borders, so it takes the text colour and turns to point at what opened. */
1294
+ .desk-disclosure-caret {
1295
+ width: 5px;
1296
+ height: 5px;
1297
+ margin: 0 3px 0 1px;
1298
+ border: solid currentColor;
1299
+ border-width: 0 1.5px 1.5px 0;
1300
+ transform: rotate(-45deg);
1301
+ transition: transform .12s var(--desk-ease);
1302
+ }
1303
+
1304
+ .desk-disclosure-toggle[aria-expanded="true"] .desk-disclosure-caret {
1305
+ transform: rotate(45deg);
1306
+ }
1307
+
1308
+ .desk-disclosure-body {
1309
+ margin-top: var(--desk-space-2);
1310
+ padding: var(--desk-space-3);
1311
+ border: 1px solid var(--desk-rule);
1312
+ border-radius: var(--desk-control-radius);
1313
+ background: color-mix(in srgb, var(--desk-ink) 3%, transparent);
1314
+ }
1315
+
1316
+ .desk-chip {
1317
+ display: inline-flex;
1318
+ align-items: center;
1319
+ max-width: 100%;
1320
+ min-height: var(--desk-control-height-small);
1321
+ padding: 0 var(--desk-space-2);
1322
+ border: 1px solid var(--desk-rule);
1323
+ border-radius: var(--desk-control-radius);
1324
+ background: var(--desk-surface);
1325
+ color: var(--desk-ink);
1326
+ font-size: var(--desk-text-small);
1327
+ overflow-wrap: anywhere;
1328
+ }
1329
+
1330
+ .desk-chip-remove {
1331
+ position: relative;
1332
+ margin: 0 calc(var(--desk-space-1) * -1) 0 var(--desk-space-1);
1333
+ padding: 0 var(--desk-space-1);
1334
+ border: 0;
1335
+ border-radius: var(--desk-control-radius);
1336
+ background: none;
1337
+ color: var(--desk-muted);
1338
+ font-size: var(--desk-text-lead);
1339
+ line-height: 1;
1340
+ cursor: pointer;
1341
+ }
1342
+
1343
+ .desk-chip-remove:hover {
1344
+ color: var(--desk-ink);
1345
+ }
1346
+
1347
+ .desk-disclosure-toggle:focus-visible,
1348
+ .desk-chip-remove:focus-visible {
1349
+ outline: 2px solid var(--desk-accent);
1350
+ outline-offset: 2px;
1351
+ }
1352
+
1353
+ @media (pointer: coarse) {
1354
+ .desk-disclosure-toggle::after,
1355
+ .desk-chip-remove::after {
1356
+ content: "";
1357
+ position: absolute;
1358
+ top: 50%;
1359
+ left: 50%;
1360
+ width: max(100%, 44px);
1361
+ height: max(100%, 44px);
1362
+ transform: translate(-50%, -50%);
1363
+ }
1364
+ }
1365
+
1366
+ @media (prefers-reduced-motion: reduce) {
1367
+ .desk-disclosure-caret {
1368
+ transition: none;
1369
+ }
1370
+ }
@@ -0,0 +1,75 @@
1
+ import { useId } from 'react'
2
+ import type { ReactNode } from 'react'
3
+
4
+ /*
5
+ * SETTINGS MOST PEOPLE LEAVE ALONE, FOLDED BEHIND ONE LINE THAT SAYS WHAT THEY ARE SET TO.
6
+ *
7
+ * A row of five filters above a result is five things to read before the result, and four of them
8
+ * are at their defaults. Folded, the row is one button and a summary — a chip for each thing that is
9
+ * actually set — so the line costs nothing when nothing is narrowed and says exactly what is when
10
+ * something is. Unfolded, the controls sit under it with their labels. See HIG.md §6.
11
+ *
12
+ * THE BODY STAYS MOUNTED WHILE FOLDED. A field folded away keeps its value, so what it holds is
13
+ * still sent; unmounting it would make folding the section a way to lose input.
14
+ */
15
+
16
+ export interface DisclosureProps {
17
+ /** What is folded away, as a noun: "Filter", "Advanced". It is the button's whole label. */
18
+ readonly label: string
19
+ readonly open: boolean
20
+ readonly onOpenChange: (open: boolean) => void
21
+ /**
22
+ * Beside the label, folded or open: what the section is currently set to. Chips, usually — one
23
+ * per setting that is off its default — so the folded line is never a mystery.
24
+ */
25
+ readonly summary?: ReactNode
26
+ readonly children: ReactNode
27
+ readonly className?: string
28
+ }
29
+
30
+ export function Disclosure({ label, open, onOpenChange, summary, children, className }: DisclosureProps) {
31
+ const id = useId()
32
+ return (
33
+ <div className={['desk-disclosure', className].filter(Boolean).join(' ')}>
34
+ <div className="desk-disclosure-head">
35
+ <button
36
+ type="button"
37
+ className="desk-disclosure-toggle"
38
+ aria-expanded={open}
39
+ aria-controls={id}
40
+ onClick={() => onOpenChange(!open)}
41
+ >
42
+ <span className="desk-disclosure-caret" aria-hidden="true" />
43
+ {label}
44
+ </button>
45
+ {summary}
46
+ </div>
47
+ <div id={id} className="desk-disclosure-body" hidden={!open}>
48
+ {children}
49
+ </div>
50
+ </div>
51
+ )
52
+ }
53
+
54
+ export interface ChipProps {
55
+ readonly children: ReactNode
56
+ /** With it the chip ends in a × that calls this: the chip is then how the thing is taken away. */
57
+ readonly onRemove?: () => void
58
+ /** The ×'s name, saying what goes: "Clear the tag", "Remove report.pdf". */
59
+ readonly removeLabel?: string
60
+ readonly className?: string
61
+ }
62
+
63
+ /** One thing that is set or chosen, said in a word or two: a filter in force, a tag, a staged file. */
64
+ export function Chip({ children, onRemove, removeLabel = 'Remove', className }: ChipProps) {
65
+ return (
66
+ <span className={['desk-chip', className].filter(Boolean).join(' ')}>
67
+ {children}
68
+ {onRemove && (
69
+ <button type="button" className="desk-chip-remove" aria-label={removeLabel} onClick={onRemove}>
70
+ <span aria-hidden="true">×</span>
71
+ </button>
72
+ )}
73
+ </span>
74
+ )
75
+ }
@@ -57,6 +57,8 @@ export { localSetupStore, useSetupProgress } from './setupProgress.js'
57
57
  export type { SetupProgress, SetupProgressOptions, SetupRecord, SetupStore } from './setupProgress.js'
58
58
  export type { ChecklistProps, Task, TaskProgress, Tasks, TaskState } from './tasks.js'
59
59
  export { PopUpButton } from './popup.js'
60
+ export { Chip, Disclosure } from './disclosure.js'
61
+ export type { ChipProps, DisclosureProps } from './disclosure.js'
60
62
  export type { PopUpButtonProps, PopUpOption } from './popup.js'
61
63
  export { Tabs } from './tabs.js'
62
64
  export type { Tab, TabsProps } from './tabs.js'