viewkitjs 0.20.0 → 0.21.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/MIGRATION.md +2 -1
  3. package/fields/docs/reference/design-category-colors.md +1 -1
  4. package/fields/docs/reference/design-status-slots.md +1 -1
  5. package/package.json +5 -1
  6. package/views/README.md +2 -1
  7. package/views/dist/atoms/StatusBadge.js +1 -1
  8. package/views/dist/atoms/tones.js +7 -7
  9. package/views/dist/atoms/types.d.ts +3 -2
  10. package/views/dist/contract.d.ts +7 -2
  11. package/views/dist/contract.js +33 -0
  12. package/views/dist/display/fit-values.d.ts +3 -2
  13. package/views/dist/display/link.d.ts +1 -1
  14. package/views/dist/display/location.js +2 -1
  15. package/views/dist/display/multi-value.js +1 -1
  16. package/views/dist/display/name.js +3 -1
  17. package/views/dist/display/select.js +1 -1
  18. package/views/dist/display/value-list.d.ts +1 -1
  19. package/views/dist/grid/chrome/GridStructure.js +2 -1
  20. package/views/dist/grid/looks.d.ts +45 -0
  21. package/views/dist/grid/looks.js +74 -0
  22. package/views/dist/looks/index.d.ts +7 -0
  23. package/views/dist/looks/index.js +3 -0
  24. package/views/dist/looks/looks.d.ts +46 -0
  25. package/views/dist/looks/looks.js +25 -0
  26. package/views/dist/looks/pieces.d.ts +3 -0
  27. package/views/dist/looks/pieces.js +2 -0
  28. package/views/dist/provider/ViewsProvider.d.ts +3 -3
  29. package/views/dist/provider/ViewsProvider.js +1 -1
  30. package/views/dist/provider/context.d.ts +1 -1
  31. package/views/dist/styles.css +192 -80
  32. package/views/dist/styles.unlayered.css +192 -80
  33. package/views/docs/contract.md +49 -7
  34. package/views/docs/guides/display.md +11 -7
  35. package/views/docs/guides/looks.md +29 -0
  36. package/views/docs/guides/the-provider.md +1 -1
  37. package/views/docs/index.md +2 -0
  38. package/views/docs/install.md +5 -5
  39. package/views/docs/reference/display.md +2 -2
  40. package/views/docs/reference/looks.md +31 -0
  41. package/views/docs/reference/react.md +2 -2
  42. package/views/docs/reference/views.md +1 -1
  43. package/views/skills/views/SKILL.md +2 -2
@@ -1,4 +1,4 @@
1
- /*! viewkitjs 0.20.0 · viewkitjs/views/styles.unlayered.css: ViewKit's look, its defaults the Outright look */
1
+ /*! viewkitjs 0.21.0 · viewkitjs/views/styles.unlayered.css: ViewKit's look, its defaults the Outright look */
2
2
  @layer base {
3
3
  @layer viewkit {:where(*):where([data-slot^="vk-"], [data-vk-body], [data-slot^="vk-"] *, [data-vk-body] *),
4
4
  :where(*):where([data-slot^="vk-"], [data-vk-body], [data-slot^="vk-"] *, [data-vk-body] *)::after,
@@ -1323,51 +1323,51 @@
1323
1323
  background-color: color-mix(in oklab, var(--vk-ground) calc(var(--vk-scrolled,0) * 100%), transparent);
1324
1324
  }
1325
1325
  }
1326
- .bg-\[color-mix\(in_oklab\,var\(--vk-label-amber\,hsl\(38_92\%_50\%\)\)_12\%\,var\(--vk-ground\)\)\] {
1327
- background-color: var(--vk-label-amber,hsl(38 92% 50%));
1326
+ .bg-\[var\(--vk-info\,hsl\(199_89\%_48\%\)\)\] {
1327
+ background-color: var(--vk-info,hsl(199 89% 48%));
1328
+ }
1329
+ .bg-\[var\(--vk-label-amber-fill\,color-mix\(in_oklab\,var\(--vk-label-amber\,hsl\(38_92\%_50\%\)\)_15\%\,var\(--vk-ground\)\)\)\] {
1330
+ background-color: var(--vk-label-amber-fill,var(--vk-label-amber,hsl(38 92% 50%)));
1328
1331
  @supports (color: color-mix(in lab, red, red)) {
1329
- background-color: color-mix(in oklab,var(--vk-label-amber,hsl(38 92% 50%)) 12%,var(--vk-ground));
1332
+ background-color: var(--vk-label-amber-fill,color-mix(in oklab,var(--vk-label-amber,hsl(38 92% 50%)) 15%,var(--vk-ground)));
1330
1333
  }
1331
1334
  }
1332
- .bg-\[color-mix\(in_oklab\,var\(--vk-label-blue\,hsl\(199_89\%_48\%\)\)_12\%\,var\(--vk-ground\)\)\] {
1333
- background-color: var(--vk-label-blue,hsl(199 89% 48%));
1335
+ .bg-\[var\(--vk-label-blue-fill\,color-mix\(in_oklab\,var\(--vk-label-blue\,hsl\(199_89\%_48\%\)\)_15\%\,var\(--vk-ground\)\)\)\] {
1336
+ background-color: var(--vk-label-blue-fill,var(--vk-label-blue,hsl(199 89% 48%)));
1334
1337
  @supports (color: color-mix(in lab, red, red)) {
1335
- background-color: color-mix(in oklab,var(--vk-label-blue,hsl(199 89% 48%)) 12%,var(--vk-ground));
1338
+ background-color: var(--vk-label-blue-fill,color-mix(in oklab,var(--vk-label-blue,hsl(199 89% 48%)) 15%,var(--vk-ground)));
1336
1339
  }
1337
1340
  }
1338
- .bg-\[color-mix\(in_oklab\,var\(--vk-label-green\,hsl\(160_84\%_39\%\)\)_12\%\,var\(--vk-ground\)\)\] {
1339
- background-color: var(--vk-label-green,hsl(160 84% 39%));
1341
+ .bg-\[var\(--vk-label-green-fill\,color-mix\(in_oklab\,var\(--vk-label-green\,hsl\(160_84\%_39\%\)\)_15\%\,var\(--vk-ground\)\)\)\] {
1342
+ background-color: var(--vk-label-green-fill,var(--vk-label-green,hsl(160 84% 39%)));
1340
1343
  @supports (color: color-mix(in lab, red, red)) {
1341
- background-color: color-mix(in oklab,var(--vk-label-green,hsl(160 84% 39%)) 12%,var(--vk-ground));
1344
+ background-color: var(--vk-label-green-fill,color-mix(in oklab,var(--vk-label-green,hsl(160 84% 39%)) 15%,var(--vk-ground)));
1342
1345
  }
1343
1346
  }
1344
- .bg-\[color-mix\(in_oklab\,var\(--vk-label-pink\,hsl\(330_81\%_60\%\)\)_12\%\,var\(--vk-ground\)\)\] {
1345
- background-color: var(--vk-label-pink,hsl(330 81% 60%));
1347
+ .bg-\[var\(--vk-label-pink-fill\,color-mix\(in_oklab\,var\(--vk-label-pink\,hsl\(330_81\%_60\%\)\)_15\%\,var\(--vk-ground\)\)\)\] {
1348
+ background-color: var(--vk-label-pink-fill,var(--vk-label-pink,hsl(330 81% 60%)));
1346
1349
  @supports (color: color-mix(in lab, red, red)) {
1347
- background-color: color-mix(in oklab,var(--vk-label-pink,hsl(330 81% 60%)) 12%,var(--vk-ground));
1350
+ background-color: var(--vk-label-pink-fill,color-mix(in oklab,var(--vk-label-pink,hsl(330 81% 60%)) 15%,var(--vk-ground)));
1348
1351
  }
1349
1352
  }
1350
- .bg-\[color-mix\(in_oklab\,var\(--vk-label-purple\,hsl\(258_90\%_66\%\)\)_12\%\,var\(--vk-ground\)\)\] {
1351
- background-color: var(--vk-label-purple,hsl(258 90% 66%));
1353
+ .bg-\[var\(--vk-label-purple-fill\,color-mix\(in_oklab\,var\(--vk-label-purple\,hsl\(258_90\%_66\%\)\)_15\%\,var\(--vk-ground\)\)\)\] {
1354
+ background-color: var(--vk-label-purple-fill,var(--vk-label-purple,hsl(258 90% 66%)));
1352
1355
  @supports (color: color-mix(in lab, red, red)) {
1353
- background-color: color-mix(in oklab,var(--vk-label-purple,hsl(258 90% 66%)) 12%,var(--vk-ground));
1356
+ background-color: var(--vk-label-purple-fill,color-mix(in oklab,var(--vk-label-purple,hsl(258 90% 66%)) 15%,var(--vk-ground)));
1354
1357
  }
1355
1358
  }
1356
- .bg-\[color-mix\(in_oklab\,var\(--vk-label-red\,hsl\(0_84\%_60\%\)\)_12\%\,var\(--vk-ground\)\)\] {
1357
- background-color: var(--vk-label-red,hsl(0 84% 60%));
1359
+ .bg-\[var\(--vk-label-red-fill\,color-mix\(in_oklab\,var\(--vk-label-red\,hsl\(0_84\%_60\%\)\)_15\%\,var\(--vk-ground\)\)\)\] {
1360
+ background-color: var(--vk-label-red-fill,var(--vk-label-red,hsl(0 84% 60%)));
1358
1361
  @supports (color: color-mix(in lab, red, red)) {
1359
- background-color: color-mix(in oklab,var(--vk-label-red,hsl(0 84% 60%)) 12%,var(--vk-ground));
1362
+ background-color: var(--vk-label-red-fill,color-mix(in oklab,var(--vk-label-red,hsl(0 84% 60%)) 15%,var(--vk-ground)));
1360
1363
  }
1361
1364
  }
1362
- .bg-\[color-mix\(in_oklab\,var\(--vk-label-teal\,hsl\(173_80\%_40\%\)\)_12\%\,var\(--vk-ground\)\)\] {
1363
- background-color: var(--vk-label-teal,hsl(173 80% 40%));
1365
+ .bg-\[var\(--vk-label-teal-fill\,color-mix\(in_oklab\,var\(--vk-label-teal\,hsl\(173_80\%_40\%\)\)_15\%\,var\(--vk-ground\)\)\)\] {
1366
+ background-color: var(--vk-label-teal-fill,var(--vk-label-teal,hsl(173 80% 40%)));
1364
1367
  @supports (color: color-mix(in lab, red, red)) {
1365
- background-color: color-mix(in oklab,var(--vk-label-teal,hsl(173 80% 40%)) 12%,var(--vk-ground));
1368
+ background-color: var(--vk-label-teal-fill,color-mix(in oklab,var(--vk-label-teal,hsl(173 80% 40%)) 15%,var(--vk-ground)));
1366
1369
  }
1367
1370
  }
1368
- .bg-\[var\(--vk-info\,hsl\(199_89\%_48\%\)\)\] {
1369
- background-color: var(--vk-info,hsl(199 89% 48%));
1370
- }
1371
1371
  .bg-\[var\(--vk-success\,hsl\(160_84\%_39\%\)\)\] {
1372
1372
  background-color: var(--vk-success,hsl(160 84% 39%));
1373
1373
  }
@@ -1387,49 +1387,49 @@
1387
1387
  background-color: var(--vk-info);
1388
1388
  }
1389
1389
  .bg-info-soft {
1390
- background-color: var(--vk-t-background-information-subtlest);
1390
+ background-color: var(--vk-info-subtlest);
1391
1391
  }
1392
1392
  .bg-label-amber {
1393
1393
  background-color: var(--vk-label-amber);
1394
1394
  }
1395
1395
  .bg-label-amber-soft {
1396
- background-color: var(--vk-t-label-amber-soft);
1396
+ background-color: var(--vk-label-amber-soft);
1397
1397
  }
1398
1398
  .bg-label-blue {
1399
1399
  background-color: var(--vk-label-blue);
1400
1400
  }
1401
1401
  .bg-label-blue-soft {
1402
- background-color: var(--vk-t-label-blue-soft);
1402
+ background-color: var(--vk-label-blue-soft);
1403
1403
  }
1404
1404
  .bg-label-green {
1405
1405
  background-color: var(--vk-label-green);
1406
1406
  }
1407
1407
  .bg-label-green-soft {
1408
- background-color: var(--vk-t-label-green-soft);
1408
+ background-color: var(--vk-label-green-soft);
1409
1409
  }
1410
1410
  .bg-label-pink {
1411
1411
  background-color: var(--vk-label-pink);
1412
1412
  }
1413
1413
  .bg-label-pink-soft {
1414
- background-color: var(--vk-t-label-pink-soft);
1414
+ background-color: var(--vk-label-pink-soft);
1415
1415
  }
1416
1416
  .bg-label-purple {
1417
1417
  background-color: var(--vk-label-purple);
1418
1418
  }
1419
1419
  .bg-label-purple-soft {
1420
- background-color: var(--vk-t-label-purple-soft);
1420
+ background-color: var(--vk-label-purple-soft);
1421
1421
  }
1422
1422
  .bg-label-red {
1423
1423
  background-color: var(--vk-label-red);
1424
1424
  }
1425
1425
  .bg-label-red-soft {
1426
- background-color: var(--vk-t-label-red-soft);
1426
+ background-color: var(--vk-label-red-soft);
1427
1427
  }
1428
1428
  .bg-label-teal {
1429
1429
  background-color: var(--vk-label-teal);
1430
1430
  }
1431
1431
  .bg-label-teal-soft {
1432
- background-color: var(--vk-t-label-teal-soft);
1432
+ background-color: var(--vk-label-teal-soft);
1433
1433
  }
1434
1434
  .bg-muted {
1435
1435
  background-color: var(--vk-neutral);
@@ -1447,7 +1447,7 @@
1447
1447
  background-color: var(--vk-success);
1448
1448
  }
1449
1449
  .bg-success-soft {
1450
- background-color: var(--vk-t-background-success-subtlest);
1450
+ background-color: var(--vk-success-subtlest);
1451
1451
  }
1452
1452
  .bg-transparent {
1453
1453
  background-color: transparent;
@@ -1456,7 +1456,7 @@
1456
1456
  background-color: var(--vk-warning);
1457
1457
  }
1458
1458
  .bg-warning-soft {
1459
- background-color: var(--vk-t-background-warning-subtlest);
1459
+ background-color: var(--vk-warning-subtlest);
1460
1460
  }
1461
1461
  .bg-linear-to-r {
1462
1462
  --tw-gradient-position: to right;
@@ -1845,26 +1845,47 @@
1845
1845
  .text-\[var\(--vk-info\,hsl\(199_89\%_48\%\)\)\] {
1846
1846
  color: var(--vk-info,hsl(199 89% 48%));
1847
1847
  }
1848
- .text-\[var\(--vk-label-amber\,hsl\(38_92\%_50\%\)\)\] {
1849
- color: var(--vk-label-amber,hsl(38 92% 50%));
1848
+ .text-\[var\(--vk-label-amber-strong\,color-mix\(in_oklab\,var\(--vk-label-amber\,hsl\(38_92\%_50\%\)\)_60\%\,var\(--vk-fg\)\)\)\] {
1849
+ color: var(--vk-label-amber-strong,var(--vk-label-amber,hsl(38 92% 50%)));
1850
+ @supports (color: color-mix(in lab, red, red)) {
1851
+ color: var(--vk-label-amber-strong,color-mix(in oklab,var(--vk-label-amber,hsl(38 92% 50%)) 60%,var(--vk-fg)));
1852
+ }
1850
1853
  }
1851
- .text-\[var\(--vk-label-blue\,hsl\(199_89\%_48\%\)\)\] {
1852
- color: var(--vk-label-blue,hsl(199 89% 48%));
1854
+ .text-\[var\(--vk-label-blue-strong\,color-mix\(in_oklab\,var\(--vk-label-blue\,hsl\(199_89\%_48\%\)\)_60\%\,var\(--vk-fg\)\)\)\] {
1855
+ color: var(--vk-label-blue-strong,var(--vk-label-blue,hsl(199 89% 48%)));
1856
+ @supports (color: color-mix(in lab, red, red)) {
1857
+ color: var(--vk-label-blue-strong,color-mix(in oklab,var(--vk-label-blue,hsl(199 89% 48%)) 60%,var(--vk-fg)));
1858
+ }
1853
1859
  }
1854
- .text-\[var\(--vk-label-green\,hsl\(160_84\%_39\%\)\)\] {
1855
- color: var(--vk-label-green,hsl(160 84% 39%));
1860
+ .text-\[var\(--vk-label-green-strong\,color-mix\(in_oklab\,var\(--vk-label-green\,hsl\(160_84\%_39\%\)\)_60\%\,var\(--vk-fg\)\)\)\] {
1861
+ color: var(--vk-label-green-strong,var(--vk-label-green,hsl(160 84% 39%)));
1862
+ @supports (color: color-mix(in lab, red, red)) {
1863
+ color: var(--vk-label-green-strong,color-mix(in oklab,var(--vk-label-green,hsl(160 84% 39%)) 60%,var(--vk-fg)));
1864
+ }
1856
1865
  }
1857
- .text-\[var\(--vk-label-pink\,hsl\(330_81\%_60\%\)\)\] {
1858
- color: var(--vk-label-pink,hsl(330 81% 60%));
1866
+ .text-\[var\(--vk-label-pink-strong\,color-mix\(in_oklab\,var\(--vk-label-pink\,hsl\(330_81\%_60\%\)\)_60\%\,var\(--vk-fg\)\)\)\] {
1867
+ color: var(--vk-label-pink-strong,var(--vk-label-pink,hsl(330 81% 60%)));
1868
+ @supports (color: color-mix(in lab, red, red)) {
1869
+ color: var(--vk-label-pink-strong,color-mix(in oklab,var(--vk-label-pink,hsl(330 81% 60%)) 60%,var(--vk-fg)));
1870
+ }
1859
1871
  }
1860
- .text-\[var\(--vk-label-purple\,hsl\(258_90\%_66\%\)\)\] {
1861
- color: var(--vk-label-purple,hsl(258 90% 66%));
1872
+ .text-\[var\(--vk-label-purple-strong\,color-mix\(in_oklab\,var\(--vk-label-purple\,hsl\(258_90\%_66\%\)\)_60\%\,var\(--vk-fg\)\)\)\] {
1873
+ color: var(--vk-label-purple-strong,var(--vk-label-purple,hsl(258 90% 66%)));
1874
+ @supports (color: color-mix(in lab, red, red)) {
1875
+ color: var(--vk-label-purple-strong,color-mix(in oklab,var(--vk-label-purple,hsl(258 90% 66%)) 60%,var(--vk-fg)));
1876
+ }
1862
1877
  }
1863
- .text-\[var\(--vk-label-red\,hsl\(0_84\%_60\%\)\)\] {
1864
- color: var(--vk-label-red,hsl(0 84% 60%));
1878
+ .text-\[var\(--vk-label-red-strong\,color-mix\(in_oklab\,var\(--vk-label-red\,hsl\(0_84\%_60\%\)\)_60\%\,var\(--vk-fg\)\)\)\] {
1879
+ color: var(--vk-label-red-strong,var(--vk-label-red,hsl(0 84% 60%)));
1880
+ @supports (color: color-mix(in lab, red, red)) {
1881
+ color: var(--vk-label-red-strong,color-mix(in oklab,var(--vk-label-red,hsl(0 84% 60%)) 60%,var(--vk-fg)));
1882
+ }
1865
1883
  }
1866
- .text-\[var\(--vk-label-teal\,hsl\(173_80\%_40\%\)\)\] {
1867
- color: var(--vk-label-teal,hsl(173 80% 40%));
1884
+ .text-\[var\(--vk-label-teal-strong\,color-mix\(in_oklab\,var\(--vk-label-teal\,hsl\(173_80\%_40\%\)\)_60\%\,var\(--vk-fg\)\)\)\] {
1885
+ color: var(--vk-label-teal-strong,var(--vk-label-teal,hsl(173 80% 40%)));
1886
+ @supports (color: color-mix(in lab, red, red)) {
1887
+ color: var(--vk-label-teal-strong,color-mix(in oklab,var(--vk-label-teal,hsl(173 80% 40%)) 60%,var(--vk-fg)));
1888
+ }
1868
1889
  }
1869
1890
  .text-\[var\(--vk-success\,hsl\(160_84\%_39\%\)\)\] {
1870
1891
  color: var(--vk-success,hsl(160 84% 39%));
@@ -1879,13 +1900,13 @@
1879
1900
  color: var(--vk-danger);
1880
1901
  }
1881
1902
  .text-destructive-foreground {
1882
- color: var(--vk-t-text-inverse);
1903
+ color: var(--vk-fg-inverse);
1883
1904
  }
1884
1905
  .text-info {
1885
1906
  color: var(--vk-info);
1886
1907
  }
1887
1908
  .text-info-foreground {
1888
- color: var(--vk-t-text-inverse);
1909
+ color: var(--vk-fg-inverse);
1889
1910
  }
1890
1911
  .text-inherit {
1891
1912
  color: inherit;
@@ -1924,13 +1945,13 @@
1924
1945
  color: var(--vk-success);
1925
1946
  }
1926
1947
  .text-success-foreground {
1927
- color: var(--vk-t-text-inverse);
1948
+ color: var(--vk-fg-inverse);
1928
1949
  }
1929
1950
  .text-warning {
1930
1951
  color: var(--vk-warning);
1931
1952
  }
1932
1953
  .text-warning-foreground {
1933
- color: var(--vk-t-text-warning-inverse);
1954
+ color: var(--vk-fg-warning-inverse);
1934
1955
  }
1935
1956
  .lowercase {
1936
1957
  text-transform: lowercase;
@@ -1994,6 +2015,55 @@
1994
2015
  .opacity-\[calc\(var\(--vk-parked\,0\)\*var\(--vk-frozen-on\,0\)\)\] {
1995
2016
  opacity: calc(var(--vk-parked,0) * var(--vk-frozen-on,0));
1996
2017
  }
2018
+ .shadow-\[inset_0_0_0_1px_var\(--vk-label-amber-edge\,color-mix\(in_oklab\,var\(--vk-label-amber\,hsl\(38_92\%_50\%\)\)_40\%\,var\(--vk-ground\)\)\)\] {
2019
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-amber-edge,var(--vk-label-amber,hsl(38 92% 50%))));
2020
+ @supports (color: color-mix(in lab, red, red)) {
2021
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-amber-edge,color-mix(in oklab,var(--vk-label-amber,hsl(38 92% 50%)) 40%,var(--vk-ground))));
2022
+ }
2023
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2024
+ }
2025
+ .shadow-\[inset_0_0_0_1px_var\(--vk-label-blue-edge\,color-mix\(in_oklab\,var\(--vk-label-blue\,hsl\(199_89\%_48\%\)\)_40\%\,var\(--vk-ground\)\)\)\] {
2026
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-blue-edge,var(--vk-label-blue,hsl(199 89% 48%))));
2027
+ @supports (color: color-mix(in lab, red, red)) {
2028
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-blue-edge,color-mix(in oklab,var(--vk-label-blue,hsl(199 89% 48%)) 40%,var(--vk-ground))));
2029
+ }
2030
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2031
+ }
2032
+ .shadow-\[inset_0_0_0_1px_var\(--vk-label-green-edge\,color-mix\(in_oklab\,var\(--vk-label-green\,hsl\(160_84\%_39\%\)\)_40\%\,var\(--vk-ground\)\)\)\] {
2033
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-green-edge,var(--vk-label-green,hsl(160 84% 39%))));
2034
+ @supports (color: color-mix(in lab, red, red)) {
2035
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-green-edge,color-mix(in oklab,var(--vk-label-green,hsl(160 84% 39%)) 40%,var(--vk-ground))));
2036
+ }
2037
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2038
+ }
2039
+ .shadow-\[inset_0_0_0_1px_var\(--vk-label-pink-edge\,color-mix\(in_oklab\,var\(--vk-label-pink\,hsl\(330_81\%_60\%\)\)_40\%\,var\(--vk-ground\)\)\)\] {
2040
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-pink-edge,var(--vk-label-pink,hsl(330 81% 60%))));
2041
+ @supports (color: color-mix(in lab, red, red)) {
2042
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-pink-edge,color-mix(in oklab,var(--vk-label-pink,hsl(330 81% 60%)) 40%,var(--vk-ground))));
2043
+ }
2044
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2045
+ }
2046
+ .shadow-\[inset_0_0_0_1px_var\(--vk-label-purple-edge\,color-mix\(in_oklab\,var\(--vk-label-purple\,hsl\(258_90\%_66\%\)\)_40\%\,var\(--vk-ground\)\)\)\] {
2047
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-purple-edge,var(--vk-label-purple,hsl(258 90% 66%))));
2048
+ @supports (color: color-mix(in lab, red, red)) {
2049
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-purple-edge,color-mix(in oklab,var(--vk-label-purple,hsl(258 90% 66%)) 40%,var(--vk-ground))));
2050
+ }
2051
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2052
+ }
2053
+ .shadow-\[inset_0_0_0_1px_var\(--vk-label-red-edge\,color-mix\(in_oklab\,var\(--vk-label-red\,hsl\(0_84\%_60\%\)\)_40\%\,var\(--vk-ground\)\)\)\] {
2054
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-red-edge,var(--vk-label-red,hsl(0 84% 60%))));
2055
+ @supports (color: color-mix(in lab, red, red)) {
2056
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-red-edge,color-mix(in oklab,var(--vk-label-red,hsl(0 84% 60%)) 40%,var(--vk-ground))));
2057
+ }
2058
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2059
+ }
2060
+ .shadow-\[inset_0_0_0_1px_var\(--vk-label-teal-edge\,color-mix\(in_oklab\,var\(--vk-label-teal\,hsl\(173_80\%_40\%\)\)_40\%\,var\(--vk-ground\)\)\)\] {
2061
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-teal-edge,var(--vk-label-teal,hsl(173 80% 40%))));
2062
+ @supports (color: color-mix(in lab, red, red)) {
2063
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--vk-label-teal-edge,color-mix(in oklab,var(--vk-label-teal,hsl(173 80% 40%)) 40%,var(--vk-ground))));
2064
+ }
2065
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2066
+ }
1997
2067
  .shadow-\[var\(--vk-editing-shadow\,0_10px_15px_-3px_rgb\(0_0_0\/0\.2\)\,0_4px_6px_-4px_rgb\(0_0_0\/0\.2\)\)\] {
1998
2068
  --tw-shadow: var(--vk-editing-shadow,0 10px 15px -3px rgb(0 0 0/0.2),0 4px 6px -4px rgb(0 0 0/0.2));
1999
2069
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -2386,7 +2456,7 @@
2386
2456
  background-color: var(--vk-danger-subtlest);
2387
2457
  }
2388
2458
  .hover\:bg-info-soft:hover {
2389
- background-color: var(--vk-t-background-information-subtlest);
2459
+ background-color: var(--vk-info-subtlest);
2390
2460
  }
2391
2461
  .hover\:bg-primary-soft:hover {
2392
2462
  background-color: var(--vk-brand-subtlest);
@@ -2395,13 +2465,13 @@
2395
2465
  background-color: var(--vk-neutral);
2396
2466
  }
2397
2467
  .hover\:bg-success-soft:hover {
2398
- background-color: var(--vk-t-background-success-subtlest);
2468
+ background-color: var(--vk-success-subtlest);
2399
2469
  }
2400
2470
  .hover\:bg-transparent:hover {
2401
2471
  background-color: transparent;
2402
2472
  }
2403
2473
  .hover\:bg-warning-soft:hover {
2404
- background-color: var(--vk-t-background-warning-subtlest);
2474
+ background-color: var(--vk-warning-subtlest);
2405
2475
  }
2406
2476
  .hover\:bg-\[linear-gradient\(color-mix\(in_oklab\,_var\(--vk-brand\)_10\%\,_transparent\)\,color-mix\(in_oklab\,_var\(--vk-brand\)_10\%\,_transparent\)\)\]:hover {
2407
2477
  background-image: linear-gradient(var(--vk-brand),var(--vk-brand));
@@ -3054,18 +3124,39 @@
3054
3124
  --vk-label-purple: hsl(260 100% 64.5%);
3055
3125
  --vk-label-pink: hsl(335 73% 49.5%);
3056
3126
  --vk-label-teal: hsl(192 87% 32%);
3057
- --vk-t-text-inverse: hsl(0 0% 100%);
3058
- --vk-t-background-success-subtlest: hsl(142 41% 97%);
3059
- --vk-t-background-warning-subtlest: hsl(19 74% 97.5%);
3060
- --vk-t-text-warning-inverse: hsl(210 6% 7%);
3061
- --vk-t-background-information-subtlest: hsl(218 100% 98%);
3062
- --vk-t-label-blue-soft: hsl(218 100% 98%);
3063
- --vk-t-label-green-soft: hsl(142 41% 97%);
3064
- --vk-t-label-amber-soft: hsl(19 74% 97.5%);
3065
- --vk-t-label-red-soft: hsl(6 100% 98%);
3066
- --vk-t-label-purple-soft: hsl(248 100% 98.5%);
3067
- --vk-t-label-pink-soft: hsl(345 100% 98%);
3068
- --vk-t-label-teal-soft: hsl(196 52% 97%);
3127
+ --vk-success-subtlest: hsl(142 41% 97%);
3128
+ --vk-warning-subtlest: hsl(19 74% 97.5%);
3129
+ --vk-info-subtlest: hsl(218 100% 98%);
3130
+ --vk-fg-inverse: hsl(0 0% 100%);
3131
+ --vk-fg-warning-inverse: hsl(210 6% 7%);
3132
+ --vk-label-blue-soft: hsl(218 100% 98%);
3133
+ --vk-label-blue-fill: hsl(218 100% 94%);
3134
+ --vk-label-blue-edge: hsl(218 97% 82%);
3135
+ --vk-label-blue-strong: hsl(219 70% 38%);
3136
+ --vk-label-green-soft: hsl(142 41% 97%);
3137
+ --vk-label-green-fill: hsl(143 41% 91%);
3138
+ --vk-label-green-edge: hsl(145 41% 71.5%);
3139
+ --vk-label-green-strong: hsl(156 87% 21%);
3140
+ --vk-label-amber-soft: hsl(19 74% 97.5%);
3141
+ --vk-label-amber-fill: hsl(19 72% 92.5%);
3142
+ --vk-label-amber-edge: hsl(20 68% 77%);
3143
+ --vk-label-amber-strong: hsl(23 85% 29%);
3144
+ --vk-label-red-soft: hsl(6 100% 98%);
3145
+ --vk-label-red-fill: hsl(6 100% 94%);
3146
+ --vk-label-red-edge: hsl(5 99% 82%);
3147
+ --vk-label-red-strong: hsl(0 59% 39%);
3148
+ --vk-label-purple-soft: hsl(248 100% 98.5%);
3149
+ --vk-label-purple-fill: hsl(249 100% 95.5%);
3150
+ --vk-label-purple-edge: hsl(251 100% 86.5%);
3151
+ --vk-label-purple-strong: hsl(259 53% 44.5%);
3152
+ --vk-label-pink-soft: hsl(345 100% 98%);
3153
+ --vk-label-pink-fill: hsl(345 100% 94.5%);
3154
+ --vk-label-pink-edge: hsl(343 88% 82.5%);
3155
+ --vk-label-pink-strong: hsl(336 59% 37.5%);
3156
+ --vk-label-teal-soft: hsl(196 52% 97%);
3157
+ --vk-label-teal-fill: hsl(196 52% 91.5%);
3158
+ --vk-label-teal-edge: hsl(196 52% 74.5%);
3159
+ --vk-label-teal-strong: hsl(193 82% 26%);
3069
3160
  --vk-t-shadow-menu: 0 6px 18px hsl(0 0% 0% / 0.06), 0 3px 9px hsl(0 0% 0% / 0.05), 0 1px 1px hsl(0 0% 0% / 0.04);
3070
3161
  --vk-t-shadow-field: 0 1px 1px 0 rgb(16 17 26 / 0.08);
3071
3162
  --vk-t-shadow-field-hover: 0 1px 1px 0 rgb(16 17 26 / 0.16);
@@ -3123,18 +3214,39 @@
3123
3214
  --vk-label-purple: hsl(260 100% 69%);
3124
3215
  --vk-label-pink: hsl(335 73% 57.5%);
3125
3216
  --vk-label-teal: hsl(192 87% 40%);
3126
- --vk-t-text-inverse: hsl(210 8% 95%);
3127
- --vk-t-background-success-subtlest: hsl(143 7% 9.5%);
3128
- --vk-t-background-warning-subtlest: hsl(19 13% 10%);
3129
- --vk-t-text-warning-inverse: hsl(210 8% 5%);
3130
- --vk-t-background-information-subtlest: hsl(218 15% 10%);
3131
- --vk-t-label-blue-soft: hsl(218 15% 10%);
3132
- --vk-t-label-green-soft: hsl(143 7% 9.5%);
3133
- --vk-t-label-amber-soft: hsl(19 13% 10%);
3134
- --vk-t-label-red-soft: hsl(6 13% 10%);
3135
- --vk-t-label-purple-soft: hsl(249 11% 10.5%);
3136
- --vk-t-label-pink-soft: hsl(344 11% 10%);
3137
- --vk-t-label-teal-soft: hsl(196 8% 9.5%);
3217
+ --vk-success-subtlest: hsl(143 7% 9.5%);
3218
+ --vk-warning-subtlest: hsl(19 13% 10%);
3219
+ --vk-info-subtlest: hsl(218 15% 10%);
3220
+ --vk-fg-inverse: hsl(210 8% 95%);
3221
+ --vk-fg-warning-inverse: hsl(210 8% 5%);
3222
+ --vk-label-blue-soft: hsl(218 15% 10%);
3223
+ --vk-label-blue-fill: hsl(219 46% 21%);
3224
+ --vk-label-blue-edge: hsl(219 55% 29%);
3225
+ --vk-label-blue-strong: hsl(218 100% 81%);
3226
+ --vk-label-green-soft: hsl(143 7% 9.5%);
3227
+ --vk-label-green-fill: hsl(146 27% 16.5%);
3228
+ --vk-label-green-edge: hsl(148 37% 21%);
3229
+ --vk-label-green-strong: hsl(146 52% 73.5%);
3230
+ --vk-label-amber-soft: hsl(19 13% 10%);
3231
+ --vk-label-amber-fill: hsl(20 42% 18.5%);
3232
+ --vk-label-amber-edge: hsl(20 54% 24%);
3233
+ --vk-label-amber-strong: hsl(20 90% 76.5%);
3234
+ --vk-label-red-soft: hsl(6 13% 10%);
3235
+ --vk-label-red-fill: hsl(5 37% 20.5%);
3236
+ --vk-label-red-edge: hsl(4 45% 28%);
3237
+ --vk-label-red-strong: hsl(6 100% 83%);
3238
+ --vk-label-purple-soft: hsl(249 11% 10.5%);
3239
+ --vk-label-purple-fill: hsl(254 34% 23.5%);
3240
+ --vk-label-purple-edge: hsl(256 41% 32.5%);
3241
+ --vk-label-purple-strong: hsl(251 100% 86%);
3242
+ --vk-label-pink-soft: hsl(344 11% 10%);
3243
+ --vk-label-pink-fill: hsl(341 34% 20.5%);
3244
+ --vk-label-pink-edge: hsl(339 42% 28%);
3245
+ --vk-label-pink-strong: hsl(342 100% 83.5%);
3246
+ --vk-label-teal-soft: hsl(196 8% 9.5%);
3247
+ --vk-label-teal-fill: hsl(196 32% 17.5%);
3248
+ --vk-label-teal-edge: hsl(195 42% 22.5%);
3249
+ --vk-label-teal-strong: hsl(196 67% 75.5%);
3138
3250
  --vk-t-shadow-menu: 0 8px 24px hsl(0 0% 0% / 0.5), 0 0 0 1px hsl(0 0% 18%);
3139
3251
  --vk-t-shadow-field: 0 1px 1px 0 rgb(255 255 255 / 0.08);
3140
3252
  --vk-t-shadow-field-hover: 0 1px 1px 0 rgb(255 255 255 / 0.12);
@@ -66,7 +66,7 @@ use; the prefix keeps that selector from reaching an element of the app's own.
66
66
  | `data-slot="vk-grid-group-header"` | a group's name and figures |
67
67
  | `data-slot="vk-grid-group-count"` | a group's count, in its head |
68
68
  | `data-slot="vk-grid-group-figure"` | one of a group's figures, in its head |
69
- | `data-slot="vk-grid-group-dot"` | the · before a group's count or figure |
69
+ | `data-slot="vk-grid-group-dot"` | the · before a group's figure |
70
70
  | `data-slot="vk-grid-footer"` | the footer row |
71
71
  | `data-slot="vk-grid-footer-cell"` | one column's figure |
72
72
  | `data-slot="vk-grid-figure-label"` | a footer figure's kind ("Sum"), drawn before its value; none on a figure the app draws |
@@ -97,8 +97,8 @@ colours the name at rest also writes its own `:hover` rule, or the name keeps th
97
97
  Only the grid's titles carry the part; a title drawn on another surface names none.
98
98
 
99
99
  Each of a group head's three parts carries `data-part="<part>"`, an identifier like `data-group-key="<key>"` rather than a state: the summary part it shows or stands before (`count`,
100
- `total`, `total:<columnId>`), so an app hides one dot by it: a count in a chip with no dot is
101
- `[data-slot="vk-grid-group-dot"][data-part="count"] { display: none; }` and a rule on `vk-grid-group-count`.
100
+ `total`, `total:<columnId>`), so an app hides one dot by it. The count is a chip ViewKit draws itself, at the
101
+ row's text size, with no dot before it; each figure follows its dot.
102
102
 
103
103
  Board's slots (`vk-board`, `vk-board-lane`, `vk-board-lane-header`, `vk-board-card`,
104
104
  `vk-board-add-card`) join this table when the board arrives.
@@ -250,7 +250,27 @@ declares both wherever a ground declares its own, so a part takes the states of
250
250
  The default atoms and the display also read `--vk-success`, `--vk-warning`, `--vk-info`,
251
251
  `--vk-label-blue`, `--vk-label-green`, `--vk-label-amber`, `--vk-label-red`, `--vk-label-purple`,
252
252
  `--vk-label-pink` and `--vk-label-teal` when the app declares them, each with a built-in fallback. The
253
- selection bar reads `--vk-float-shadow`, a whole `box-shadow` value for what floats over a list, with a
253
+ default Tag draws each hue as a pill, and the stylesheet draws fields' soft fills and the words on a filled
254
+ status, through the optional colours below (`<hue>` is each of the seven: blue, green, amber, red, purple,
255
+ pink, teal). Each is optional: the stylesheet declares the Outright look's, and with `@source` the Tag's
256
+ rungs fall back to the hue itself, so an app that declares only `--vk-label-<hue>` keeps its hue, and
257
+ fields' names draw on the app's own theme.
258
+
259
+ | optional colour | what it paints |
260
+ | -------------------------- | ------------------------------------------------------------------------------ |
261
+ | `--vk-success-subtlest` | a success wash: a status's soft fill (`bg-success-soft`) |
262
+ | `--vk-warning-subtlest` | a warning wash (`bg-warning-soft`) |
263
+ | `--vk-info-subtlest` | an information wash (`bg-info-soft`) |
264
+ | `--vk-fg-inverse` | words on a filled success, information or error |
265
+ | `--vk-fg-warning-inverse` | words on a filled warning |
266
+ | `--vk-label-<hue>-soft` | the hue's pale ground: a category chip's fill (`bg-label-<hue>-soft`) |
267
+ | `--vk-label-<hue>-fill` | the Tag's fill; undeclared, the hue 15% into `--vk-ground` |
268
+ | `--vk-label-<hue>-edge` | the Tag's edge, drawn inside; undeclared, the hue 40% into `--vk-ground` |
269
+ | `--vk-label-<hue>-strong` | the Tag's words; undeclared, the hue 60% into `--vk-fg` |
270
+
271
+ By name: `--vk-label-blue-soft`, `--vk-label-green-soft`, `--vk-label-amber-soft`, `--vk-label-red-soft`, `--vk-label-purple-soft`, `--vk-label-pink-soft`, `--vk-label-teal-soft`; `--vk-label-blue-fill`, `--vk-label-green-fill`, `--vk-label-amber-fill`, `--vk-label-red-fill`, `--vk-label-purple-fill`, `--vk-label-pink-fill`, `--vk-label-teal-fill`; `--vk-label-blue-edge`, `--vk-label-green-edge`, `--vk-label-amber-edge`, `--vk-label-red-edge`, `--vk-label-purple-edge`, `--vk-label-pink-edge`, `--vk-label-teal-edge`; `--vk-label-blue-strong`, `--vk-label-green-strong`, `--vk-label-amber-strong`, `--vk-label-red-strong`, `--vk-label-purple-strong`, `--vk-label-pink-strong`, `--vk-label-teal-strong`.
272
+
273
+ The selection bar reads `--vk-float-shadow`, a whole `box-shadow` value for what floats over a list, with a
254
274
  built-in fallback. The grid's chrome (its header and footer cells, a group's name and its own buttons) draws keyboard focus as
255
275
  `--vk-focus-ring`, a whole `box-shadow` value;
256
276
  undeclared, `inset 0 0 0 2px var(--vk-brand)`. The views row (`/panels/react`) reads `--vk-selected`, the ground's selected state (the
@@ -340,9 +360,24 @@ reads, and through which `GridTable`'s `fillWidth` has the columns share the gri
340
360
  while rows are selected), and
341
361
  while the lab's lock is on `--vk-hold-x` and `--vk-sx` (the offsets that hold the frozen columns, the rail, a group's name and the empty message at the left while the table is scrolled
342
362
  sideways) for itself. The stylesheet declares `--vk-t-<name>`, its own theme values that differ in the
343
- dark (a shadow) and the kit colours no `--vk-*` name stands for. They carry the prefix because they share the global namespace;
363
+ dark (a shadow). They carry the prefix because they share the global namespace;
344
364
  an app neither sets nor reads them, and they may change in any release.
345
365
 
366
+ ## Looks
367
+
368
+ A piece's looks are declared beside the piece and listed in `LOOKS` (`viewkitjs/views/looks`). An option is a closed set
369
+ of values with a default; a look is a named set of picks, one value for every option, its first the piece's own. An app
370
+ wears a set of picks as data attributes on a frame round the piece, `data-<piece>-<option>="<value>"` (`lookAttrs`), which
371
+ the piece's look stylesheet reads, and the piece's code reads the same picks back (`lookWorn`, `lookWornOf`); a pick its
372
+ option doesn't have wears the default. **Public:** a piece's id, its options' ids, their values' ids and its looks' ids,
373
+ renamed only with a codemod, since apps save picks by them. Not public: the words (`name`), which a later version may
374
+ reword. Only options live in the shape: what a piece takes from an app's own design beyond its options stays outside it.
375
+
376
+ Today one piece declares looks, the grid (`GRID_LOOKS`): 25 options and two looks, `attio` and `portal`. Fourteen of its
377
+ options are read by the grid's code (`GRID_LOOK_READ`): eleven become the props it is handed (`gridLookProps`), and three
378
+ the app wires itself, `more` (pages under `GridTable`'s `pages`), `figures` (the footer's words, through the provider's
379
+ messages) and `wait` (`RowsWait` in the components map). The other eleven are its look stylesheet's, which ships later.
380
+
346
381
  ## The components map
347
382
 
348
383
  The primitives an app hands in through `ViewsProvider`, typed in `src/provider/components.ts`.
@@ -941,7 +976,7 @@ A field whose changes are transitions with rules of their own (a lost deal needs
941
976
 
942
977
  ## The doors
943
978
 
944
- Twenty-three doors in this version, and nothing else is importable but `./package.json`; the panels' two (`/panels` and `/panels/react`) are described last. What each holds is summarised here; each door's reference page names every export, one line each, starting at [`reference/views.md`](reference/views.md).
979
+ Twenty-four doors in this version, and nothing else is importable but `./package.json`; the panels' two (`/panels` and `/panels/react`) are described last. What each holds is summarised here; each door's reference page names every export, one line each, starting at [`reference/views.md`](reference/views.md).
945
980
 
946
981
  `viewkitjs/views`, no React at runtime, holds two things. The rendering contract, every name listed:
947
982
  the constants `VK_PREFIX`, `GRID_SLOTS`, `GRID_STATES`, `VK_TOKENS`, `VK_COLOURS`,
@@ -1014,7 +1049,7 @@ And `selectionBar`'s `chip` (`ViewsSelectionChip`, default `own`): who draws the
1014
1049
  on the desktop. `own` draws ViewKit's own, as on 0.5.0; `button` draws your `Button`, `variant` `outline`, `size` `sm`,
1015
1050
  its box in `className`, `data-slot="vk-selection-chip"`, `aria-label`, and `disabled` while a batch runs, inside the
1016
1051
  same `Tooltip`.
1017
- And an optional `severalValues` (`ViewsSeveralValues`, from `./react`, default `first`): how a cell of several values
1052
+ And an optional `severalValues` (`ViewsSeveralValues`, from `./react`, default `fit`): how a cell of several values
1018
1053
  draws on one line, wherever it draws (a grid cell, a board or calendar card, a field row that doesn't wrap). `first`
1019
1054
  draws its first value and a count at any width, as on 0.5.0. `fit` draws as many whole values as fit its width, then
1020
1055
  the count, and follows a column resize; the first shows cut when even it doesn't fit, and a wrapped row shows three
@@ -1129,6 +1164,13 @@ host's binding shares with the grid: `GridCommitContext` and `GridCommitOutcome`
1129
1164
  CSV export reuses), and `GRID_TITLE_LINK_CLASS`. The house menu rows, the group collapse and the type
1130
1165
  icons are the app's; the selection bar is `SelectionBar`, on the selection door, drawn with the app's verbs.
1131
1166
 
1167
+ `viewkitjs/views/looks`, no React at runtime: a piece's options and looks (see Looks above). The shape,
1168
+ `PieceLooks` with its `LookOption`s, `LookValue`s and `Look`s, `LookPicks` and `LookDevice`; its helpers, `lookAttrs` (the
1169
+ frame's `data-<piece>-<option>` attributes for a set of picks), `lookPicks` (a look's picks by its id), `lookWorn` and
1170
+ `lookWornOf` (the picks read back, from picks or from the closest frame); `LOOKS`, every piece that declares looks; and the
1171
+ grid's, `GRID_LOOKS` with `GridLookOptionId`, `GRID_LOOK_READ`, `GridLookWorn`, `gridLookWorn`, `gridLookWornOf`, and
1172
+ `gridLookProps` with `GridLookProps` (the `GridTable` props a look sets).
1173
+
1132
1174
  `viewkitjs/views/panels`, no client
1133
1175
  directive on the door, the one hook behind it (`useFilterOpened`) carrying
1134
1176
  its own: what a list's panels read and say. The settings they edit (`SortConfig`, `GroupConfig`, `ToggleConfig`,
@@ -30,10 +30,7 @@ assert.equal(renderFieldValue(DEAL_FIELDS.tags, []), null);
30
30
  // An unset boolean still draws: its empty box is the control.
31
31
  assert.notEqual(renderFieldValue(DEAL_FIELDS.archived, null), null);
32
32
 
33
- // A name reads as written: the full name, else the given and family names.
34
- assert.equal(renderFieldValue(DEAL_FIELDS.contact, { full: null, given: "Ada", family: "Lovelace" }), "Ada Lovelace");
35
- // An empty name draws the words you hand it, or nothing.
36
- assert.equal(renderFieldValue(DEAL_FIELDS.contact, null, { nameFallback: "ada@example.com" }), "ada@example.com");
33
+ // An empty name draws nothing, unless you hand it words to draw (below).
37
34
  assert.equal(renderFieldValue(DEAL_FIELDS.contact, { full: null, given: null, family: null }), null);
38
35
  ```
39
36
 
@@ -49,6 +46,13 @@ assert.ok(titleHtml.includes('title="Acme renewal"')); // a clipped value keeps
49
46
  const websiteHtml = renderToStaticMarkup(<>{renderFieldValue(DEAL_FIELDS.website, "https://acme.example")}</>);
50
47
  assert.ok(websiteHtml.includes('href="https://acme.example"'));
51
48
  assert.ok(websiteHtml.includes(">acme.example</a>"));
49
+
50
+ // A name reads as written: the full name, else the given and family names, in a box that ends in "…" when it
51
+ // doesn't fit. An empty name draws the words you hand it.
52
+ const nameHtml = renderToStaticMarkup(<>{renderFieldValue(DEAL_FIELDS.contact, { full: null, given: "Ada", family: "Lovelace" })}</>);
53
+ assert.ok(nameHtml.includes(">Ada Lovelace</span>"));
54
+ const fallbackHtml = renderToStaticMarkup(<>{renderFieldValue(DEAL_FIELDS.contact, null, { nameFallback: "ada@example.com" })}</>);
55
+ assert.ok(fallbackHtml.includes(">ada@example.com</span>"));
52
56
  ```
53
57
 
54
58
  ## One renderer per storage type
@@ -73,7 +77,7 @@ assert.equal(DISPLAY_CORES.date, DISPLAY_CORES.datetime);
73
77
  - **boolean**: four looks, the field's `format.style`. `checkbox` (the default) draws the `TickBox` atom, and `icon` your `booleanIcon(on)`; either becomes a real switch only when you hand `onToggle`, and is a plain glyph otherwise. `text` draws the option's label for the value, or the package's words. `marker` draws only when true, as the `StatusMarker` atom with your `marker` words, `markerReason` and `onResolve`.
74
78
  - **select**, **status** and **multiselect**: a select is a category and draws the `Tag` atom in its colour (a reader's `optionColors` first, then the option's declared colour, then one derived from the value). A status is a state and draws the `StatusBadge` atom in its option's slot. A multiselect draws a tag per value, through the several-values layout. A value no option names draws as the raw value, muted, with a hover saying it is not an option, unless you hand a `labelFallback`; an open (`custom-values`) vocabulary's values are their own labels. An option's `icon` is drawn through your `AppIcon`.
75
79
  - **relation** and **user**: a chip, the record's avatar when it has one, else your `entityIcon(kind)`, else the relation glyph, then its label, then, on a `many` relation that declares `links`, the link's roles, drawn by the `RelationRoles` atom ([atoms](atoms.md)). Where it goes is yours (`relationWrap`); without one the chip is inert. Several draw through the several-values layout, the lead link first. A user is drawn as a relation to a member, so the two never differ.
76
- - **url**, **domain**, **email** and **phone**: a url is a link with its scheme off the label, its platform's mark before it (the [`PlatformMark` atom](atoms.md)); a value that is no safe web address draws as text. A domain links to its site and reads no platform from it. An email is a `mailto:` link to the address alone: text stored after it (`?cc=…`, a second address) is never part of the link, and a value that holds no address draws as text. A phone is written in its international form, as its country writes it for a viewer in that country (the conventions' `region`) and internationally for anyone else, its extension after it, and dialled through a `tel:` link; a phone stored as typed draws as its text and is marked `data-as-typed`, still a link to its digits, and as text alone when it holds no digit to dial. Every phone's value is the part `data-slot="vk-phone"`, its link or its text. Several values of one of these draw as the main one and a count.
80
+ - **url**, **domain**, **email** and **phone**: a url is a link with its scheme off the label, its platform's mark before it (the [`PlatformMark` atom](atoms.md)); a value that is no safe web address draws as text. A domain links to its site and reads no platform from it. An email is a `mailto:` link to the address alone: text stored after it (`?cc=…`, a second address) is never part of the link, and a value that holds no address draws as text. A phone is written in its international form, as its country writes it for a viewer in that country (the conventions' `region`) and internationally for anyone else, its extension after it, and dialled through a `tel:` link; a phone stored as typed draws as its text and is marked `data-as-typed`, still a link to its digits, and as text alone when it holds no digit to dial. Every phone's value is the part `data-slot="vk-phone"`, its link or its text. Several values of one of these draw the main one first, as many as fit, then a count.
77
81
  - **location**: in a cell, its city and its country; with `wrap: "full"`, the whole place. The country is named in the viewer's language.
78
82
  - **name**: the full name as written, else the given and family names, else `nameFallback`, else nothing.
79
83
  - **actor**: a chip like a relation's that opens nothing, since an actor records who did something rather than pointing at a record: a member's avatar when your value carries an `avatarUrl` beside it, and your glyph for an automation, an API key or the system.
@@ -81,8 +85,8 @@ assert.equal(DISPLAY_CORES.date, DISPLAY_CORES.datetime);
81
85
  - **range**: its two ends as text ("11–50", "10,001+", "up to 50"), then its unit (`%`, its currency code or its suffix) and its period ("/mo").
82
86
  - **lookup** and **formula**: as the field their result is. A **rollup** grouped by an option draws a segmented bar beside its headline, and one grouped by time a sparkline, the current bucket faded.
83
87
 
84
- A value that holds several, of any of these types, uses `MultiValueCell`: one value, or three when wrapped, then a `+N` count that opens all of them in a list. It is exported for your own cells; [the display reference](../reference/display.md) has its props.
85
- With the provider's `severalValues: "fit"`, a value on one line shows as many whole values as fit its width, then the count ([the provider](the-provider.md)). The count is the `CellMore` atom ([atoms](atoms.md)).
88
+ A value that holds several, of any of these types, uses `MultiValueCell`: as many as fit on one line, or three when wrapped, then a `+N` count that opens all of them in a list. It is exported for your own cells; [the display reference](../reference/display.md) has its props.
89
+ With the provider's `severalValues: "first"`, a value on one line shows its first value and the count at any width instead ([the provider](the-provider.md)). The count is the `CellMore` atom ([atoms](atoms.md)).
86
90
 
87
91
  ## What the field can't know
88
92
 
@@ -0,0 +1,29 @@
1
+ # Looks
2
+
3
+ A piece's look is what an app sets once for every copy of the piece it draws: the grid's column lines, its density, how a grouped grid draws its titles. ViewKit declares each piece's options and looks beside the piece, in `viewkitjs/views/looks`, and an app picks one by its name, or picks option by option, and saves the picks it made. Reference: [`viewkitjs/views/looks`](../reference/looks.md).
4
+
5
+ ## Options and looks
6
+
7
+ An option is a closed set of values with a default: the grid's `columns` is `all`, `none` or `pinned`. A look is a named set of picks, one value for every option: the grid's `attio` look, its first, is every option's default; its `portal` look is ViewKit's own grid as the portal draws it. The ids are public and stay as they are, since an app saves picks by them; the words beside them (`name`) may change.
8
+
9
+ ## Picking the grid's look
10
+
11
+ The picks go on the element round the grid as data attributes, which the grid's look stylesheet reads, and the options the grid's code reads go to `GridTable` as props:
12
+
13
+ ```ts
14
+ import { GRID_LOOKS, gridLookProps, gridLookWorn, lookAttrs, lookPicks } from "viewkitjs/views/looks";
15
+
16
+ // The portal's look, with the columns sharing the grid's whole width.
17
+ const picks = { ...lookPicks(GRID_LOOKS, "portal"), width: "fill" };
18
+ const frame = lookAttrs(GRID_LOOKS, picks); // spread on the element round the grid
19
+ const props = gridLookProps(gridLookWorn(picks), false); // spread on GridTable, false on a computer
20
+ console.log(frame["data-grid-columns"], props.verticalBorders, props.fillWidth); // all true true
21
+ ```
22
+
23
+ A pick its option doesn't have (one saved by an older version, say) wears the option's default, so saved picks never break a grid. Where the picks live on the page rather than in your state, `gridLookWornOf(element)` reads them back from the closest frame.
24
+
25
+ Fourteen of the grid's options are read by its code. Eleven become its props through `gridLookProps`; three you wire yourself, as the Showcase does: `more` (`"pages"`: hand `GridTable` its `pages`), `figures` (`"value"`: the footer's figure words through your provider's messages) and `wait` (`"kept"`: hand the components map a `RowsWait`). The other eleven (the header's words, the rows' lines, the pinned edge, picked rows and cells, the cells' frames, names and phones) are its look stylesheet's alone, and draw nothing until that stylesheet ships.
26
+
27
+ ## A piece of your own
28
+
29
+ A piece that comes into ViewKit declares its options and looks in its own folder, in the same shape (`PieceLooks`), and adds itself to `LOOKS`. Only options live in the shape: what a piece takes from an app's own design beyond its options (its own colours, its own sizes) stays outside it.