@master/internal-site 0.2.5 → 0.2.7

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 (129) hide show
  1. package/README.md +1 -1
  2. package/dist/astro.mjs +9 -1
  3. package/package.json +9 -8
  4. package/src/benchmarks/BenchmarkChart.astro +8 -8
  5. package/src/benchmarks/BenchmarkDelta.astro +2 -3
  6. package/src/benchmarks/BenchmarkFigure.astro +1 -1
  7. package/src/benchmarks/BenchmarkMetricTable.astro +10 -10
  8. package/src/benchmarks/BenchmarkScrollRegion.svelte +2 -2
  9. package/src/benchmarks/BenchmarkStatus.astro +2 -3
  10. package/src/benchmarks/utils.ts +1 -9
  11. package/src/css/NamespaceUtilityTable.astro +11 -11
  12. package/src/css/ThemeNumberVariableTable.astro +14 -14
  13. package/src/demo/Demo.svelte +2 -2
  14. package/src/demo/DemoAsset.astro +3 -3
  15. package/src/demo/DemoBadge.svelte +3 -3
  16. package/src/demo/DemoContainer.svelte +2 -2
  17. package/src/demo/DemoControls.svelte +1 -1
  18. package/src/demo/DemoCopyButton.svelte +1 -1
  19. package/src/demo/DemoFeatureSupport.svelte +3 -4
  20. package/src/demo/DemoIndex.astro +1 -1
  21. package/src/demo/DemoMotion.svelte +2 -2
  22. package/src/demo/DemoSurface.svelte +2 -2
  23. package/src/demo/DemoTokenTable.astro +6 -6
  24. package/src/demo/DemoViewport.svelte +11 -11
  25. package/src/demo/foundations/FoundationDialog.astro +1 -1
  26. package/src/demo/foundations/FoundationMedia.astro +2 -2
  27. package/src/demo/foundations/FoundationShrink.astro +2 -2
  28. package/src/demo/foundations/Palette.svelte +1 -1
  29. package/src/demo/reference/document.ts +3 -2
  30. package/src/demo/specimens/background-attachment.json +3 -3
  31. package/src/demo/specimens/background-origin.json +9 -9
  32. package/src/demo/specimens/clip-path.json +3 -3
  33. package/src/demo/specimens/counter-set.json +8 -8
  34. package/src/demo/specimens/filter.json +6 -6
  35. package/src/demo/specimens/grid-auto-flow.json +3 -3
  36. package/src/demo/specimens/grid-template-areas.json +5 -5
  37. package/src/demo/specimens/grid-template-columns.json +6 -6
  38. package/src/demo/specimens/justify-content.json +8 -8
  39. package/src/demo/specimens/mask-image.json +3 -3
  40. package/src/demo/specimens/object-position.json +6 -6
  41. package/src/demo/specimens/place-content.json +4 -4
  42. package/src/demo/specimens/scroll-snap-stop.json +3 -3
  43. package/src/demo/specimens/shape-margin.json +5 -5
  44. package/src/demo/specimens/shape-outside.json +3 -3
  45. package/src/demo/specimens/transform-origin.json +3 -3
  46. package/src/docs-shell/common/locales.js +1 -1
  47. package/src/docs-shell/components/CodeCopyButton.astro +1 -1
  48. package/src/docs-shell/components/DocHeader.svelte +3 -3
  49. package/src/docs-shell/components/DocMenuButton.svelte +4 -5
  50. package/src/docs-shell/components/DocVersionSelect.svelte +2 -2
  51. package/src/docs-shell/components/DocumentCodeExampleView.astro +2 -2
  52. package/src/docs-shell/components/DocumentCodeTable.astro +5 -5
  53. package/src/docs-shell/components/DocumentCopyButton.svelte +1 -1
  54. package/src/docs-shell/components/DocumentFileTree.astro +2 -2
  55. package/src/docs-shell/components/DocumentFlow.astro +2 -2
  56. package/src/docs-shell/components/DocumentIllustration.astro +2 -2
  57. package/src/docs-shell/components/DocumentNamespaceTable.astro +6 -6
  58. package/src/docs-shell/components/DocumentParameters.astro +2 -2
  59. package/src/docs-shell/components/ExpandContent.svelte +1 -1
  60. package/src/docs-shell/components/LanguageButton.svelte +2 -2
  61. package/src/docs-shell/components/LanguageSelect.svelte +2 -2
  62. package/src/docs-shell/components/NotFound.astro +1 -1
  63. package/src/docs-shell/components/PageNavs.astro +4 -4
  64. package/src/docs-shell/components/SearchButton.svelte +1 -1
  65. package/src/docs-shell/components/SearchDialog.svelte +4 -1
  66. package/src/docs-shell/components/SearchDialogPanel.svelte +8 -8
  67. package/src/docs-shell/components/Segments.svelte +2 -1
  68. package/src/docs-shell/components/ThemeSelect.svelte +2 -2
  69. package/src/docs-shell/components/markdown/Table.astro +3 -3
  70. package/src/docs-shell/components/markdown/TableCell.astro +4 -0
  71. package/src/docs-shell/components/markdown/TableHead.astro +4 -0
  72. package/src/docs-shell/components/markdown/TableRow.astro +4 -0
  73. package/src/docs-shell/components/markdown-components.ts +6 -0
  74. package/src/docs-shell/contexts/search.ts +11 -1
  75. package/src/docs-shell/contexts/theme-mode.svelte.ts +1 -0
  76. package/src/docs-shell/data/legacy-design-routes.json +176 -0
  77. package/src/docs-shell/remark/markdown-components.js +2 -2
  78. package/src/docs-shell/utils/snackbar.ts +1 -1
  79. package/src/examples/article-transitions/page.astro +0 -1
  80. package/src/examples/components/ArticleTransitionScene.svelte +4 -4
  81. package/src/examples/components/ViewTransitionScene.svelte +1 -1
  82. package/src/examples/view-transitions/page.astro +0 -1
  83. package/src/layouts/Document.astro +1 -0
  84. package/src/scripts/atomic-class-authoring.ts +4 -1
  85. package/src/scripts/legacy-design-routes.ts +76 -0
  86. package/src/scripts/style-delivery.mjs +22 -2
  87. package/src/sections/document.astro +1 -1
  88. package/src/styles/docs-shell/documentation-search.css +6 -5
  89. package/src/styles/docs-shell/materials.css +10 -22
  90. package/src/styles/docs-shell/menu.css +8 -8
  91. package/src/styles/docs-shell/segments.css +2 -2
  92. package/src/styles/docs-shell/theme.css +2 -17
  93. package/src/styles/foundation.css +1 -0
  94. package/src/styles/site-contract.md +31 -0
  95. package/src/styles/system/badge-tones.css +4 -0
  96. package/src/styles/system/badge.ts +2 -0
  97. package/src/styles/system/browser.css +3 -6
  98. package/src/styles/system/button-feedback.css +6 -9
  99. package/src/styles/system/buttons.css +1 -51
  100. package/src/styles/system/checks.css +4 -18
  101. package/src/styles/system/controls.css +0 -1
  102. package/src/styles/system/dialog.css +3 -3
  103. package/src/styles/system/expand.css +3 -3
  104. package/src/styles/system/fields.css +7 -23
  105. package/src/styles/system/header-core.css +10 -10
  106. package/src/styles/system/kbd.css +1 -4
  107. package/src/styles/system/mixins.css +2 -2
  108. package/src/styles/system/pager.css +2 -13
  109. package/src/styles/system/range.css +1 -12
  110. package/src/styles/system/search-trigger.css +2 -2
  111. package/src/styles/system/segmented.css +1 -16
  112. package/src/styles/system/sheet.css +1 -8
  113. package/src/styles/system/sheet.ts +2 -0
  114. package/src/styles/system/sidebar.css +1 -1
  115. package/src/styles/system/specimens.css +5 -17
  116. package/src/styles/system/surfaces.css +0 -1
  117. package/src/styles/system/table-layout.css +12 -0
  118. package/src/styles/system/table.css +3 -23
  119. package/src/styles/system/table.ts +4 -0
  120. package/src/styles/system/tokens.css +48 -63
  121. package/src/styles/system/tooltip.css +2 -4
  122. package/src/styles/system/tray-layout.css +20 -0
  123. package/src/styles/system/tray.css +2 -20
  124. package/src/styles/system/tray.ts +3 -0
  125. package/src/demo/DemoScrollArea.svelte +0 -17
  126. package/src/examples/scene.css +0 -3
  127. package/src/styles/system/DESIGN.md +0 -128
  128. package/src/styles/system/menu.css +0 -14
  129. package/src/styles/system/scroll.css +0 -6
@@ -0,0 +1,4 @@
1
+ /* A comparison annotation keeps its teaching hue; Master UI owns the badge recipe. */
2
+ @layer components {
3
+ .demo-badge-violet { --badge-tone: var(--ui-tone-violet); }
4
+ }
@@ -0,0 +1,2 @@
1
+ import '@master/ui/components/badge.css'
2
+ import './badge-tones.css'
@@ -1,10 +1,7 @@
1
+ @import '@master/ui/components/window.css';
1
2
  /* browser: owned component styles; shared definitions come from the foundation. */
2
3
  @layer components {
3
- .ui-browser { position: relative; overflow: hidden; border-radius: var(--ui-radius-xl); background: var(--ui-surface-stage); box-shadow: 0 1px 0 var(--ui-lip); }
4
- .ui-browser::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--ui-line-contour); pointer-events: none; }
5
- .ui-browser-bar { display: flex; align-items: center; gap: var(--ui-space-sm); height: 2rem; padding: 0 var(--ui-space-sm); background: var(--ui-surface-tray); }
6
- .ui-browser-dots { display: flex; gap: 6px; }
7
- .ui-browser-dots > i { width: 9px; height: 9px; border-radius: 50%; background: var(--ui-line-divider); }
4
+ .ui-browser-bar { --window-bar-height: 2rem; }
8
5
  .ui-browser-body { position: relative; min-height: 12rem; }
9
6
  .ui-browser-body:has(> .ui-browser-viewport) { min-height: 0; overflow-x: auto; scrollbar-width: thin; }
10
7
  .ui-browser-viewport { position: relative; max-width: none; margin-inline: auto; }
@@ -12,7 +9,7 @@
12
9
  .ui-browser-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-xs) var(--ui-space-sm); padding: var(--ui-space-sm) var(--ui-space-sm) var(--ui-space-xs); }
13
10
  .ui-browser-tools > .ui-segmented > :is(button, a) { min-height: 1.625rem; }
14
11
  .ui-browser-range { display: flex; flex: 1 1 14rem; align-items: center; gap: var(--ui-space-sm); min-width: 0; }
15
- .ui-browser-range > .ui-range { flex: 1 1 6rem; min-width: 0; max-width: 12rem; }
12
+ .ui-browser-range > .slider { flex: 1 1 6rem; min-width: 0; max-width: 12rem; }
16
13
  .ui-browser-range > label { color: var(--ui-text-muted); @apply --ui-label-type; }
17
14
  .ui-browser-tools > output, .ui-browser-range > output { flex: 1 1 100%; color: var(--ui-text-muted); font: var(--ui-weight-regular) .6875rem/1.5 var(--font-family-mono); overflow-wrap: anywhere; }
18
15
  .ui-browser-range > .ui-browser-size { flex: none; font: var(--ui-weight-regular) .75rem/1.5 var(--font-family-sans); font-variant-numeric: tabular-nums; }
@@ -1,13 +1,10 @@
1
1
  /* button-feedback: owned component styles; shared definitions come from the foundation. */
2
2
  @layer components {
3
3
 
4
- @media (pointer: coarse) {
5
- .ui-button { min-height: 2.75rem; }
6
- }
7
- .ui-button[data-result] > svg:first-of-type { display: none; }
8
- .ui-button:not([data-result]) > .ui-result-icon { display: none; }
9
- .ui-button[data-result="success"] { color: var(--ui-status-success); }
10
- .ui-button[data-result="error"] { color: var(--ui-status-danger); }
11
- .ui-button[data-result="error"] > svg:first-of-type { display: block; }
12
- .ui-button[data-result="error"] > .ui-result-icon { display: none; }
4
+ .btn[data-result] > svg:first-of-type { display: none; }
5
+ .btn:not([data-result]) > .ui-result-icon { display: none; }
6
+ .btn[data-result="success"] { color: var(--ui-status-success); }
7
+ .btn[data-result="error"] { color: var(--ui-status-danger); }
8
+ .btn[data-result="error"] > svg:first-of-type { display: block; }
9
+ .btn[data-result="error"] > .ui-result-icon { display: none; }
13
10
  }
@@ -1,51 +1 @@
1
- /* Controls — one material, one state order: pressed (sink) < rest (rise-1) < hover (rise-1h, +0.5px) */
2
- @layer components {
3
- .ui-button {
4
- appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--ui-space-xs);
5
- min-height: 2.375rem; padding: 0 var(--ui-space-md); border: 0; border-radius: var(--ui-radius-md);
6
- @apply --ui-sheet-face; color: var(--ui-text-strong);
7
- box-shadow: var(--ui-elevation-rise-1);
8
- font: var(--ui-weight-medium) .84375rem/1 var(--font-family-sans); letter-spacing: 0; text-decoration: none; white-space: nowrap;
9
- cursor: pointer; user-select: none; -webkit-user-select: none;
10
- transition: box-shadow var(--ui-duration-quick) var(--ui-ease), background var(--ui-duration-quick) var(--ui-ease), translate var(--ui-duration-quick) var(--ui-ease), color var(--ui-duration-quick);
11
- }
12
- /* A label longer than its row (large text, narrow screens) wraps inside the button instead of overflowing. */
13
- .ui-button:not([data-shape="icon"]) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; text-align: center; }
14
- .ui-button > svg { flex: none; width: 1rem; height: 1rem; }
15
- .ui-button:where(:hover, [data-state="hover"]):not(:disabled) { translate: 0 -.5px; box-shadow: var(--ui-elevation-rise-1h); }
16
- .ui-button:where(:active, [data-state="pressed"]):not(:disabled) { translate: 0 .5px; background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); transition-duration: var(--ui-duration-press); }
17
- .ui-button:where(:focus-visible, [data-state="focus"]) { @apply --ui-focus-ring; outline-offset: 2px; }
18
- .ui-button:disabled { color: var(--ui-text-disabled); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-flat); cursor: not-allowed; }
19
- .ui-button[data-size="sm"] { min-height: 2rem; padding-inline: var(--ui-space-sm); border-radius: 5px; font-size: .78125rem; }
20
- .ui-button[data-size="lg"] { min-height: 2.75rem; padding-inline: 1.25rem; font-size: .9375rem; }
21
-
22
- /* Primary: ink on moonstone, pearl on obsidian */
23
- .ui-button[data-variant="primary"] {
24
- color: var(--ui-text-inverse);
25
- background: linear-gradient(180deg, light-dark(oklch(32% .0026 265), oklch(98.8% 0 none)), light-dark(oklch(19.5% .003 265), oklch(91.6% .0032 265)));
26
- box-shadow: inset 0 1px 0 light-dark(oklch(100% 0 none / .17), oklch(100% 0 none)), inset 0 -1px 0 light-dark(oklch(0% 0 none / .3), oklch(0% 0 none / .13)),
27
- 0 0 0 1px light-dark(oklch(14% .003 265), oklch(0% 0 none / .6)), 0 1px 1px -.5px var(--ui-shade-1), 0 3px 3px -1.5px var(--ui-shade-2), 0 6px 6px -3px var(--ui-shade-3);
28
- }
29
- .ui-button[data-variant="primary"]:where(:hover, [data-state="hover"]):not(:disabled) {
30
- background: linear-gradient(180deg, light-dark(oklch(36% .0028 265), oklch(100% 0 none)), light-dark(oklch(22% .0034 265), oklch(94% .003 265)));
31
- box-shadow: inset 0 1px 0 light-dark(oklch(100% 0 none / .19), oklch(100% 0 none)), inset 0 -1px 0 light-dark(oklch(0% 0 none / .3), oklch(0% 0 none / .13)),
32
- 0 0 0 1px light-dark(oklch(14% .003 265), oklch(0% 0 none / .6)), 0 1px 1px -.5px var(--ui-shade-1), 0 3px 3px -1.5px var(--ui-shade-2), 0 6px 6px -3px var(--ui-shade-3), 0 10px 10px -5px var(--ui-shade-4);
33
- }
34
- .ui-button[data-variant="primary"]:where(:active, [data-state="pressed"]):not(:disabled) {
35
- background: light-dark(oklch(18% .003 265), oklch(87.5% .0035 265));
36
- box-shadow: inset 0 1px 3px light-dark(oklch(0% 0 none / .55), oklch(0% 0 none / .3)), 0 0 0 1px light-dark(oklch(14% .003 265), oklch(0% 0 none / .6));
37
- }
38
- /* Quiet: no material until touched — toolbars, headers, dense rows */
39
- .ui-button[data-variant="quiet"] { background: transparent; color: var(--ui-text-muted); box-shadow: none; }
40
- .ui-button[data-variant="quiet"]:where(:hover, [data-state="hover"]):not(:disabled) { color: var(--ui-text-strong); @apply --ui-sheet-face; box-shadow: var(--ui-elevation-rise-1); translate: none; }
41
- .ui-button[data-variant="quiet"][aria-pressed="true"] { color: var(--ui-text-strong); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); }
42
- /* Gold: brand moments only (homepage hero, brand page) */
43
- .ui-button[data-variant="gold"] {
44
- color: var(--ui-gold-ink); background: var(--ui-gold-face); text-shadow: 0 1px 0 oklch(100% 0 none / .35);
45
- box-shadow: inset 0 1px 0 oklch(100% 0 none / .65), inset 0 -1px 0 oklch(52% .12 58 / .28), 0 0 0 1px light-dark(oklch(58% .12 66 / .7), oklch(82% .14 82 / .55)),
46
- 0 1px 1px -.5px var(--ui-shade-1), 0 3px 3px -1.5px var(--ui-shade-2), 0 10px 18px -8px light-dark(oklch(72% .16 72 / .42), oklch(82% .16 80 / .3));
47
- }
48
- .ui-button[data-shape="icon"] { width: 2.375rem; padding: 0; }
49
- .ui-button[data-shape="icon"][data-size="sm"] { width: 2rem; }
50
-
51
- }
1
+ @import '@master/ui/components/button.css';
@@ -1,18 +1,4 @@
1
- @prune native;
2
- /* checks: owned component styles; shared definitions come from the foundation. */
3
- @layer components {
4
- .ui-check { display: inline-flex; align-items: center; gap: var(--ui-space-xs); color: var(--ui-text-strong); font-size: var(--ui-text-small); cursor: pointer; }
5
- .ui-check > input:not(.ui-switch) { appearance: none; display: grid; place-items: center; flex: none; width: 1.125rem; height: 1.125rem; margin: 0; border-radius: var(--ui-radius-sm); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick); }
6
- .ui-check > input:not(.ui-switch):not(:checked) { box-shadow: var(--ui-elevation-sink), inset 0 0 0 1px var(--ui-line-divider); }
7
- .ui-check > input:not(.ui-switch)::after { content: ""; width: 10px; height: 10px; opacity: 0; background: var(--ui-text-inverse); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.1 7.3 8 2.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
8
- .ui-check > input:not(.ui-switch):checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 0 light-dark(oklch(100% 0 none / .16), oklch(100% 0 none)), 0 0 0 1px light-dark(oklch(14% .003 265), oklch(0% 0 none / .5)); }
9
- .ui-check > input:not(.ui-switch):checked::after { opacity: 1; }
10
- .ui-check > input[type="radio"] { border-radius: 50%; }
11
- .ui-check > input[type="radio"]::after { width: 6px; height: 6px; border-radius: 50%; mask: none; }
12
- .ui-check > input:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
13
- .ui-switch { position: relative; appearance: none; flex: none; width: 2.25rem; height: 1.375rem; margin: 0; border-radius: var(--ui-radius-pill); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); cursor: pointer; transition: background-color var(--ui-duration-base) var(--ui-ease); }
14
- .ui-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 1rem; height: 1rem; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-contour), 0 1px 1px var(--ui-shade-1), 0 2px 3px -1px var(--ui-shade-2); transition: translate var(--ui-duration-base) var(--ui-ease); }
15
- .ui-switch:checked { background: var(--ui-surface-ink); box-shadow: inset 0 1px 2px oklch(0% 0 none / .3); }
16
- .ui-switch:checked::before { translate: .875rem 0; background: light-dark(linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)), linear-gradient(180deg, oklch(26% .0024 265), oklch(20% .002 265))); }
17
- .ui-switch:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
18
- }
1
+ /* Native choice controls are owned by Master UI. */
2
+ @import '@master/ui/components/checkbox.css';
3
+ @import '@master/ui/components/radio.css';
4
+ @import '@master/ui/components/switch.css';
@@ -8,4 +8,3 @@
8
8
  @import './kbd.css';
9
9
  @import './button-feedback.css';
10
10
  @import './tooltip.css';
11
- @import './menu.css';
@@ -1,7 +1,7 @@
1
- /* dialog: owned component styles; shared definitions come from the foundation. */
1
+ @import '@master/ui/components/dialog.css';
2
+ /* Search composition. Master UI owns the modal surface, backdrop and states. */
2
3
  @layer components {
3
- .ui-dialog { width: min(40rem, calc(100vw - 2rem)); max-height: min(36rem, calc(100dvh - 4rem)); padding: 0; overflow: hidden; border: 0; border-radius: var(--ui-radius-2xl); background: var(--ui-surface-float); color: var(--ui-text-body); box-shadow: var(--ui-elevation-overlay); }
4
- .ui-dialog::backdrop { background: var(--ui-surface-scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
4
+ .ui-dialog { --dialog-padding: 0; gap: 0; }
5
5
  .ui-dialog-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-sm); min-height: 3.5rem; padding: 0 var(--ui-space-md); box-shadow: inset 0 -1px 0 var(--ui-line-hair); }
6
6
  .ui-dialog-search input { flex: 1 1 8rem; min-width: 0; border: 0; background: transparent; color: var(--ui-text-strong); font: var(--ui-weight-regular) 1rem/1 var(--font-family-sans); }
7
7
  .ui-dialog-search input:focus { outline: none; }
@@ -5,7 +5,7 @@
5
5
  .ui-expand-control { display: flex; justify-content: center; padding-top: var(--ui-space-sm); }
6
6
  .ui-expand[data-expanded="false"] > .ui-expand-control { position: absolute; inset-inline: 0; bottom: 0; padding-top: 6rem; background: linear-gradient(to bottom, transparent, var(--ui-surface-canvas) 72%); }
7
7
  .ui-expand[data-expanded="true"] > .ui-expand-control { position: sticky; bottom: var(--ui-space-sm); pointer-events: none; }
8
- .ui-expand-control > .ui-button { pointer-events: auto; }
9
- .ui-expand-control > .ui-button > svg { transition: rotate var(--ui-duration-quick) var(--ui-ease); }
10
- .ui-expand[data-expanded="true"] > .ui-expand-control > .ui-button > svg { rotate: 180deg; }
8
+ .ui-expand-control > .btn { pointer-events: auto; }
9
+ .ui-expand-control > .btn > svg { transition: rotate var(--ui-duration-quick) var(--ui-ease); }
10
+ .ui-expand[data-expanded="true"] > .ui-expand-control > .btn > svg { rotate: 180deg; }
11
11
  }
@@ -1,25 +1,9 @@
1
- /* fields: owned component styles; shared definitions come from the foundation. */
1
+ @import '@master/ui/components/input.css';
2
+ @import '@master/ui/components/select.css';
2
3
  @layer components {
3
- .ui-field { display: grid; gap: var(--ui-space-xs); color: var(--ui-text-strong); font-size: var(--ui-text-small); font-weight: var(--ui-weight-medium); }
4
- .ui-field-hint { color: var(--ui-text-muted); font-size: .75rem; font-weight: var(--ui-weight-regular); }
5
- .ui-input, .ui-select {
6
- width: 100%; min-height: 2.5rem; padding: .5625rem .75rem; border: 0; border-radius: var(--ui-radius-md);
7
- background: var(--ui-surface-well); color: var(--ui-text-strong); box-shadow: var(--ui-elevation-sink);
8
- font: var(--ui-weight-regular) var(--ui-text-small)/1.45 var(--font-family-sans); resize: vertical;
9
- transition: box-shadow var(--ui-duration-quick), background-color var(--ui-duration-quick);
10
- }
11
- .ui-input::placeholder { color: var(--ui-text-muted); }
12
- .ui-input:hover:not(:focus, :disabled), .ui-select:hover:not(:focus, :disabled) { background: var(--ui-surface-well-hover); }
13
- .ui-input:focus, .ui-select:focus-visible { outline: none; background: var(--ui-surface-sheet); box-shadow: inset 0 0 0 1px var(--ui-line-mark), 0 0 0 3px light-dark(oklch(22% .002 265 / .1), oklch(100% 0 none / .12)); }
14
- .ui-input:disabled, .ui-select:disabled { color: var(--ui-text-disabled); cursor: not-allowed; }
15
- .ui-select { appearance: none; padding-right: 2rem; cursor: pointer;
16
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
17
- background-repeat: no-repeat; background-position: right .625rem center; background-size: 14px; }
18
- .ui-select[data-variant="raised"] { background-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E"), linear-gradient(180deg, var(--ui-surface-sheet), var(--ui-surface-sheet-lo)); background-position: right .625rem center, 0 0; background-size: 14px, auto; box-shadow: var(--ui-elevation-rise-1); font-weight: var(--ui-weight-medium); }
19
- .ui-select[data-variant="overlay"] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
20
- :has(> .ui-select[data-variant="overlay"]:focus-visible) { @apply --ui-focus-ring; outline-offset: 2px; }
21
-
22
- @media (pointer: coarse) {
23
- .ui-input, .ui-select { min-height: 2.75rem; }
24
- }
4
+ /* The site presents a native preference select through its existing label/icon. */
5
+ .site-select-overlay[data-variant="overlay"] { appearance: auto; position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
6
+ :has(> .site-select-overlay[data-variant="overlay"]:focus-visible) { @apply --focus-ring; outline-offset: 2px; }
7
+ .ui-field { display: grid; gap: var(--ui-space-xs); }
8
+ .ui-field-hint { color: var(--color-text-muted); font-size: .75rem; }
25
9
  }
@@ -27,12 +27,12 @@
27
27
  @layer components {
28
28
  /* A single rhythm for the page header and the modal's matching top bar. */
29
29
  .ui-header, .ui-mobile-menu-bar { --ui-header-target: 2.25rem; --ui-header-icon: 1.125rem; --ui-header-control-gap: .5rem; }
30
- .ui-header .ui-button.ui-header-control[data-shape="icon"], .ui-mobile-menu-bar .ui-button.ui-header-control[data-shape="icon"] {
30
+ .ui-header .btn.ui-header-control[data-shape="icon"], .ui-mobile-menu-bar .btn.ui-header-control[data-shape="icon"] {
31
31
  position: relative; box-sizing: border-box; flex: 0 0 var(--ui-header-target); width: var(--ui-header-target); min-width: var(--ui-header-target); height: var(--ui-header-target); min-height: var(--ui-header-target); margin: 0; padding: 0; align-items: center; justify-content: center; border-radius: var(--ui-radius-md); line-height: 1;
32
32
  }
33
- .ui-header-control.ui-button[data-variant="quiet"]:not(:disabled) { background: transparent; box-shadow: none; translate: none; color: var(--ui-text-muted); }
34
- .ui-header-control.ui-button[data-variant="quiet"]:where(:hover, :active, :focus-visible, :has(select:focus-visible)):not(:disabled) { color: var(--ui-text-strong); }
35
- .ui-header-control.ui-button > svg:not(.ui-header-external) { flex: none; width: var(--ui-header-icon); height: var(--ui-header-icon); }
33
+ .ui-header-control.btn[data-variant="quiet"]:not(:disabled) { background: transparent; box-shadow: none; translate: none; color: var(--ui-text-muted); }
34
+ .ui-header-control.btn[data-variant="quiet"]:where(:hover, :active, :focus-visible, :has(select:focus-visible)):not(:disabled) { color: var(--ui-text-strong); }
35
+ .ui-header-control.btn > svg:not(.ui-header-external) { flex: none; width: var(--ui-header-icon); height: var(--ui-header-icon); }
36
36
  .ui-header .ui-header-end, .ui-header .ui-header-nav { align-items: center; gap: var(--ui-header-control-gap); }
37
37
  .ui-header .ui-header-divider { flex: none; margin: 0 .25rem; height: var(--ui-header-icon); }
38
38
  .ui-header .ui-header-nav > a, .ui-header .ui-version { height: var(--ui-header-target); }
@@ -53,13 +53,13 @@
53
53
  .ui-header .ui-version { position: relative; cursor: pointer; }
54
54
  .ui-header .ui-version > svg { width: 12px; height: 12px; color: var(--ui-text-muted); }
55
55
  .ui-header .ui-version:hover { color: var(--ui-text-strong); }
56
- .ui-header-nav > a > .ui-badge { margin-left: var(--ui-space-2xs); }
56
+ .ui-header-nav > a > .badge { margin-left: var(--ui-space-2xs); }
57
57
  /* External destinations carry a small raised arrow beside the label or icon. */
58
58
  .ui-header-nav > a:has(.ui-header-external) { position: relative; padding-right: 1.125rem; }
59
- .ui-header-nav > a > .ui-header-external, .ui-header-end > .ui-button > .ui-header-external { position: absolute; top: .375rem; right: .125rem; width: .625rem; height: .625rem; pointer-events: none; }
59
+ .ui-header-nav > a > .ui-header-external, .ui-header-end > .btn > .ui-header-external { position: absolute; top: .375rem; right: .125rem; width: .625rem; height: .625rem; pointer-events: none; }
60
60
  /* Anchor the small external mark to the icon centre, independent of the 36/44px target. */
61
- .ui-header-end > .ui-button > .ui-header-external { top: calc(50% - .875rem); right: calc(50% - 1rem); }
62
- .ui-header-end > .ui-button[data-disabled] { color: var(--ui-text-disabled); pointer-events: none; }
61
+ .ui-header-end > .btn > .ui-header-external { top: calc(50% - .875rem); right: calc(50% - 1rem); }
62
+ .ui-header-end > .btn[data-disabled] { color: var(--ui-text-disabled); pointer-events: none; }
63
63
  /* Icon-only controls name themselves with an ink tooltip under the pointer or keyboard focus. */
64
64
  .ui-header-end > :is(a, button, label) { position: relative; }
65
65
  .ui-header-end > * > .ui-tooltip { top: calc(100% + 8px); left: 50%; translate: -50% 0; opacity: 0; visibility: hidden; transition: opacity var(--ui-duration-quick), visibility 0s linear var(--ui-duration-quick); }
@@ -75,7 +75,7 @@
75
75
  .ui-header-search:hover { color: var(--ui-text-strong); background: var(--ui-surface-chip); box-shadow: inset 0 0 0 1px var(--ui-line-strong); }
76
76
  .ui-header-search:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
77
77
  .ui-header-search > svg { flex: none; width: 1rem; height: 1rem; }
78
- .ui-header-search > .ui-kbd { min-width: 0; height: auto; padding: 0; background: none; color: inherit; box-shadow: none; font: var(--ui-weight-regular) .6875rem/1 var(--font-family-sans); letter-spacing: .04em; }
78
+ .ui-header-search > .kbd { min-width: 0; height: auto; padding: 0; background: none; color: inherit; box-shadow: none; font: var(--ui-weight-regular) .6875rem/1 var(--font-family-sans); letter-spacing: .04em; }
79
79
 
80
80
  /* The compact header: the menu at the start, the brand centred, search at the end. */
81
81
  .ui-header .ui-header-menu { display: none; }
@@ -89,7 +89,7 @@
89
89
  .ui-header-search { justify-content: center; width: var(--ui-header-target); height: var(--ui-header-target); padding: 0; border-radius: var(--ui-radius-md); box-shadow: none; }
90
90
  .ui-header-search:hover { background: transparent; box-shadow: none; }
91
91
  .ui-header-search > svg { width: var(--ui-header-icon); height: var(--ui-header-icon); }
92
- .ui-header-search > .ui-kbd { display: none; }
92
+ .ui-header-search > .kbd { display: none; }
93
93
  /* Search can be the last visible action while hidden siblings still follow it. */
94
94
  .ui-header-end > * > .ui-tooltip { left: auto; right: 0; translate: none; }
95
95
  .ui-header-end > * > .ui-tooltip::before { left: auto; right: calc(var(--ui-header-target) / 2 - 4px); translate: none; }
@@ -1,4 +1 @@
1
- /* kbd: owned component styles; shared definitions come from the foundation. */
2
- @layer components {
3
- .ui-kbd { display: inline-grid; place-items: center; min-width: 1.375rem; height: 1.375rem; padding: 0 .3125rem; border-radius: var(--ui-radius-xs); background: transparent; color: var(--ui-text-muted); box-shadow: inset 0 0 0 1px var(--ui-line-contour); font: var(--ui-weight-regular) .6875rem/1 var(--font-family-mono); }
4
- }
1
+ @import '@master/ui/components/kbd.css';
@@ -1,6 +1,6 @@
1
1
  /* Shared declarations of the system components, expanded in place by Master CSS (`@apply --name`). */
2
- @mixin --ui-sheet-face { background: linear-gradient(180deg, var(--ui-surface-sheet), var(--ui-surface-sheet-lo)); }
3
- @mixin --ui-focus-ring { outline: 2px solid var(--ui-focus); }
2
+ @mixin --ui-sheet-face { @apply --surface-sheet; }
3
+ @mixin --ui-focus-ring { @apply --focus-ring; }
4
4
  /* A caption over a group: small, quiet, in the reading face — never a mono capital eyebrow. */
5
5
  @mixin --ui-label-type { font: var(--ui-weight-regular) var(--ui-text-label)/1.5 var(--font-family-sans); letter-spacing: var(--ui-tracking-label); text-transform: none; }
6
6
  /* An eyebrow over a group or a page: small sans capitals, medium weight, tracked open so the capitals breathe. */
@@ -1,13 +1,2 @@
1
- /* pager: owned component styles; shared definitions come from the foundation. */
2
- @layer components {
3
- .ui-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ui-space-xl); margin-top: 5rem; padding-top: var(--ui-space-lg); box-shadow: inset 0 1px 0 var(--ui-line-hair); }
4
- .ui-pager > a { display: grid; align-content: start; gap: var(--ui-space-2xs); color: var(--ui-text-body); text-decoration: none; transition: color var(--ui-duration-quick); }
5
- .ui-pager > a:hover { color: var(--ui-text-strong); }
6
- .ui-pager > a:focus-visible { @apply --ui-focus-ring; outline-offset: 4px; border-radius: var(--ui-radius-xs); }
7
- .ui-pager > a[rel="next"] { justify-items: end; text-align: right; }
8
- .ui-pager small { color: var(--ui-text-muted); @apply --ui-eyebrow-type; }
9
- .ui-pager b { font-weight: var(--ui-weight-regular); font-size: var(--ui-text-base); line-height: 1.5; text-wrap: balance; }
10
- .ui-pager > a[rel="prev"] > b::before { content: "←"; margin-right: .5em; color: var(--ui-text-muted); }
11
- .ui-pager > a[rel="next"] > b::after { content: "→"; margin-left: .5em; color: var(--ui-text-muted); }
12
- .ui-pager > a:hover > b::before, .ui-pager > a:hover > b::after { color: var(--ui-text-strong); }
13
- }
1
+ @import '@master/ui/components/pager.css';
2
+ @layer components { .ui-pager { margin-top: 5rem; padding-top: var(--ui-space-lg); } }
@@ -1,12 +1 @@
1
- /* range: owned component styles; shared definitions come from the foundation. */
2
- @layer components {
3
- .ui-range { --value: 50%; appearance: none; width: 100%; min-width: 6rem; height: 1.75rem; margin: 0; background: transparent; cursor: ew-resize; }
4
- .ui-range::-webkit-slider-runnable-track { height: 4px; border-radius: var(--ui-radius-pill); background: linear-gradient(90deg, var(--ui-text-strong) var(--value), var(--ui-line-divider) var(--value)); }
5
- .ui-range::-moz-range-track { height: 4px; border-radius: var(--ui-radius-pill); background: var(--ui-line-divider); }
6
- .ui-range::-moz-range-progress { height: 4px; border-radius: var(--ui-radius-pill); background: var(--ui-text-strong); }
7
- .ui-range::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -6px; border: 0; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-strong), 0 1px 1px var(--ui-shade-1), 0 2px 4px -1px var(--ui-shade-2); }
8
- .ui-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: linear-gradient(180deg, oklch(100% 0 none), oklch(96.5% .0011 265)); box-shadow: 0 0 0 1px var(--ui-line-strong), 0 1px 1px var(--ui-shade-1), 0 2px 4px -1px var(--ui-shade-2); }
9
- .ui-range:focus-visible { outline: none; }
10
- .ui-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--ui-line-strong), 0 0 0 2px var(--ui-surface-stage), 0 0 0 4px var(--ui-focus); }
11
- .ui-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--ui-line-strong), 0 0 0 2px var(--ui-surface-stage), 0 0 0 4px var(--ui-focus); }
12
- }
1
+ @import '@master/ui/components/slider.css';
@@ -3,8 +3,8 @@
3
3
  .ui-search-trigger { appearance: none; display: flex; align-items: center; gap: .625rem; width: 100%; height: 2.5rem; padding: 0; border: 0; border-radius: 0;
4
4
  background: transparent; color: var(--ui-text-muted); box-shadow: inset 0 -1px 0 var(--ui-line-hair); font: var(--ui-weight-regular) var(--ui-text-small)/1 var(--font-family-sans); cursor: pointer; transition: color var(--ui-duration-quick), box-shadow var(--ui-duration-quick); }
5
5
  .ui-search-trigger:hover { color: var(--ui-text-strong); box-shadow: inset 0 -1px 0 var(--ui-line-strong); }
6
- .ui-search-trigger > .ui-kbd { box-shadow: none; }
6
+ .ui-search-trigger > .kbd { box-shadow: none; }
7
7
  .ui-search-trigger:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; border-radius: var(--ui-radius-sm); }
8
8
  .ui-search-trigger > svg { flex: none; width: 15px; height: 15px; }
9
- .ui-search-trigger > .ui-kbd { margin-left: auto; }
9
+ .ui-search-trigger > .kbd { margin-left: auto; }
10
10
  }
@@ -1,22 +1,7 @@
1
- /* segmented: owned component styles; shared definitions come from the foundation. */
1
+ @import '@master/ui/components/segmented.css';
2
2
  @layer components {
3
- .ui-segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 100%; padding: 3px; border-radius: calc(var(--ui-radius-md) + 3px); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); }
4
- .ui-segmented > :is(button, a) {
5
- appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 1.875rem; min-width: 3.5rem; padding: 0 .75rem; border: 0; border-radius: var(--ui-radius-md); background: transparent;
6
- color: var(--ui-text-muted); font: var(--ui-weight-medium) .78125rem/1 var(--font-family-sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: color var(--ui-duration-quick), background-color var(--ui-duration-quick), box-shadow var(--ui-duration-quick);
7
- }
8
- .ui-segmented > :is(button, a):hover:not(:disabled) { color: var(--ui-text-strong); }
9
- .ui-segmented > :is(button, a):is([aria-pressed="true"], [aria-selected="true"], [aria-checked="true"], [aria-current="page"]) { color: var(--ui-text-strong); @apply --ui-sheet-face; box-shadow: var(--ui-elevation-rise-1); }
10
- .ui-segmented > :is(button, a):focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
11
- .ui-segmented > button:disabled { color: var(--ui-text-disabled); cursor: not-allowed; }
12
3
  .ui-segmented[data-variant="underline"] { display: flex; gap: 0 var(--ui-space-lg); padding: 0; border-radius: 0; background: none; box-shadow: inset 0 -1px 0 var(--ui-line-divider); }
13
4
  .ui-segmented[data-variant="underline"] > :is(button, a) { min-width: 0; min-height: 2.75rem; padding: 0; border-radius: 0; color: var(--ui-text-muted); font: var(--ui-weight-regular) var(--ui-text-small)/1.4 var(--font-family-sans); }
14
5
  .ui-segmented[data-variant="underline"] > :is(button, a):is([aria-pressed="true"], [aria-selected="true"], [aria-checked="true"], [aria-current="page"]) { color: var(--ui-text-strong); background: none; box-shadow: inset 0 -2px 0 var(--ui-text-strong); }
15
6
  .ui-segmented[data-variant="underline"] > :is(button, a):focus-visible { outline-offset: -2px; border-radius: var(--ui-radius-xs); }
16
- .ui-segmented[data-size="lg"] { padding: 4px; border-radius: calc(var(--ui-radius-md) + 4px); }
17
- .ui-segmented[data-size="lg"] > :is(button, a) { min-height: 2.25rem; border-radius: var(--ui-radius-md); font-size: .8125rem; }
18
-
19
- @media (pointer: coarse) {
20
- .ui-segmented > button { min-height: 2.5rem; }
21
- }
22
7
  }
@@ -1,8 +1 @@
1
- /* sheet: owned component styles; shared definitions come from the foundation. */
2
- @layer components {
3
- .ui-sheet { position: relative; border-radius: var(--ui-radius-xl); @apply --ui-sheet-face; color: var(--ui-text-body); box-shadow: var(--ui-elevation-rise-2); }
4
- .ui-sheet[data-elevation="1"] { box-shadow: var(--ui-elevation-rise-1); }
5
- .ui-sheet[data-elevation="3"] { box-shadow: var(--ui-elevation-rise-3); }
6
- .ui-sheet[data-elevation="flat"] { background: var(--ui-surface-sheet); box-shadow: var(--ui-elevation-flat); }
7
- .ui-well { border-radius: var(--ui-radius-md); background: var(--ui-surface-well); box-shadow: var(--ui-elevation-sink); }
8
- }
1
+ @import '@master/ui/components/surface.css';
@@ -0,0 +1,2 @@
1
+ // Share the canonical surface stylesheet with table and tray compositions.
2
+ import '@master/ui/components/surface.css'
@@ -10,5 +10,5 @@
10
10
  .ui-nav-link:is([aria-current="page"], [aria-current="true"]) { color: var(--ui-text-strong); font-weight: var(--ui-weight-medium); }
11
11
  .ui-nav-link:is([aria-current="page"], [aria-current="true"])::before { background: var(--ui-text-strong); }
12
12
  .ui-nav-link:focus-visible { @apply --ui-focus-ring; outline-offset: 1px; border-radius: var(--ui-radius-sm); }
13
- .ui-nav-link > .ui-badge { margin-left: auto; }
13
+ .ui-nav-link > .badge { margin-left: auto; }
14
14
  }
@@ -10,11 +10,11 @@
10
10
  border-radius: var(--ui-radius-md); @apply --ui-sheet-face;
11
11
  color: var(--ui-text-strong); box-shadow: var(--ui-elevation-rise-1); font: var(--ui-weight-medium) .8125rem/1.4 var(--font-family-mono);
12
12
  }
13
- .ui-item[data-tone="blue"], .ui-badge[data-tone="blue"], .ui-legend [data-tone="blue"] { --tone: var(--ui-tone-blue); }
14
- .ui-item[data-tone="violet"], .ui-badge[data-tone="violet"], .ui-legend [data-tone="violet"] { --tone: var(--ui-tone-violet); }
15
- .ui-item[data-tone="amber"], .ui-badge[data-tone="amber"], .ui-legend [data-tone="amber"] { --tone: var(--ui-tone-amber); }
16
- .ui-item[data-tone="green"], .ui-badge[data-tone="green"], .ui-legend [data-tone="green"] { --tone: var(--ui-tone-green); }
17
- .ui-item[data-tone="red"], .ui-badge[data-tone="red"], .ui-legend [data-tone="red"] { --tone: var(--ui-tone-red); }
13
+ .ui-item[data-tone="blue"], .ui-legend [data-tone="blue"] { --tone: var(--ui-tone-blue); }
14
+ .ui-item[data-tone="violet"], .ui-legend [data-tone="violet"] { --tone: var(--ui-tone-violet); }
15
+ .ui-item[data-tone="amber"], .ui-legend [data-tone="amber"] { --tone: var(--ui-tone-amber); }
16
+ .ui-item[data-tone="green"], .ui-legend [data-tone="green"] { --tone: var(--ui-tone-green); }
17
+ .ui-item[data-tone="red"], .ui-legend [data-tone="red"] { --tone: var(--ui-tone-red); }
18
18
  .ui-item:not([data-tone="neutral"], :not([data-tone])) {
19
19
  background: linear-gradient(180deg, color-mix(in oklab, var(--tone) 10%, var(--ui-surface-sheet)), color-mix(in oklab, var(--tone) 13%, var(--ui-surface-sheet-lo)));
20
20
  color: color-mix(in oklab, var(--tone) 72%, var(--ui-text-strong));
@@ -24,18 +24,6 @@
24
24
  .ui-item[data-variant="outline"] { background: transparent; color: var(--ui-text-strong); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 60%, transparent); }
25
25
  .ui-item[data-variant="ghost"] { background: var(--ui-hatch); color: var(--ui-text-muted); box-shadow: inset 0 0 0 1px var(--ui-line-divider); }
26
26
 
27
- /* Badge: a small, legible category or state */
28
- .ui-badge {
29
- --tone: var(--ui-tone-neutral);
30
- display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 1.375rem; padding: 0 .5rem; border-radius: var(--ui-radius-sm);
31
- background: color-mix(in oklab, var(--tone) 10%, transparent); color: color-mix(in oklab, var(--tone) 75%, var(--ui-text-strong));
32
- box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 24%, transparent);
33
- font: var(--ui-weight-medium) .71875rem/1 var(--font-family-mono); letter-spacing: .01em; white-space: nowrap; vertical-align: middle;
34
- }
35
- .ui-badge[data-tone="neutral"], .ui-badge:not([data-tone]) { background: var(--ui-surface-well); color: var(--ui-text-body); box-shadow: inset 0 0 0 1px var(--ui-line-contour); }
36
- .ui-badge[data-variant="dot"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
37
- .ui-badge[data-size="sm"] { height: 1.125rem; padding: 0 .375rem; font-size: .65625rem; }
38
-
39
27
  /* Label: names a condition, outside the measured layout */
40
28
  .ui-label { display: inline-block; color: var(--ui-text-muted); @apply --ui-label-type; }
41
29
  .ui-label[data-case="as-is"] { text-transform: none; letter-spacing: 0; font-size: .75rem; }
@@ -4,5 +4,4 @@
4
4
  @import './stage.css';
5
5
  @import './compare.css';
6
6
  @import './browser.css';
7
- @import './scroll.css';
8
7
  @import './expand.css';
@@ -0,0 +1,12 @@
1
+ /* Document placement, scrolling and embedded source are site composition. Cell paint is Master UI. */
2
+ @layer components {
3
+ .ui-table { min-width: 0; overflow: auto; scrollbar-width: thin; }
4
+ .ui-table:focus-visible { @apply --focus-ring; }
5
+ .ui-table .table-cell { vertical-align: top; }
6
+ .ui-table [data-align="end"] { text-align: end; white-space: nowrap; }
7
+ .ui-table[data-variant="lookup"] tbody th { width: 1%; white-space: nowrap; }
8
+ .ui-table :is(td, th) code { overflow-wrap: anywhere; }
9
+ .ui-table :is(td, th) ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
10
+ .ui-table .ui-preview { display: inline-block; width: 1.25rem; height: 1.25rem; margin-right: var(--ui-space-xs); border-radius: var(--radius-chip); vertical-align: -.3em; }
11
+ .ui-table-caption { display: flex; justify-content: space-between; gap: var(--ui-space-md); padding: var(--ui-space-sm) var(--ui-space-md); color: var(--color-text-muted); font-size: .75rem; }
12
+ }
@@ -1,23 +1,3 @@
1
- /* table: owned component styles; shared definitions come from the foundation. */
2
- @layer components {
3
- .ui-table { min-width: 0; overflow: auto; border: 1px solid var(--ui-line-contour); border-radius: var(--ui-radius-xl); background: var(--ui-surface-sheet); scrollbar-width: thin; }
4
- .ui-table:focus-visible { @apply --ui-focus-ring; outline-offset: 2px; }
5
- .ui-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--ui-text-small); line-height: 1.5; }
6
- .ui-table thead th { position: sticky; top: 0; z-index: 1; padding: .625rem var(--ui-space-md); background: var(--ui-surface-sheet-lo); color: var(--ui-text-muted); @apply --ui-label-type; text-align: start; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--ui-line-divider); }
7
- .ui-table :is(td, tbody th) { padding: .6875rem var(--ui-space-md); color: var(--ui-text-body); font-weight: var(--ui-weight-regular); text-align: start; vertical-align: top; border-top: 1px solid var(--ui-line-hair); }
8
- .ui-table tr:first-child > :is(td, th) { border-top: 0; }
9
- .ui-table tbody tr { transition: background-color var(--ui-duration-quick); }
10
- .ui-table tbody tr:hover { background: light-dark(oklch(22% .002 265 / .022), oklch(100% 0 none / .025)); }
11
- .ui-table tbody tr > :first-child { color: var(--ui-text-strong); }
12
- .ui-table :is(td, th)[data-align="end"] { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
13
- .ui-table thead th code { padding: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; font: inherit; font-family: var(--font-family-mono); font-size: .75rem; letter-spacing: 0; }
14
- .ui-table :is(td, tbody th) code { padding: .125em .375em; border-radius: var(--ui-radius-xs); background: var(--ui-surface-chip); color: var(--ui-text-strong); box-shadow: none; font: var(--ui-weight-regular) .8125rem/1.6 var(--font-family-mono); overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
15
- .ui-table :is(td:first-child, tbody th) code { white-space: normal; overflow-wrap: normal; }
16
- .ui-table :is(td, tbody th) .ui-preview { display: inline-block; width: 1.25rem; height: 1.25rem; margin-right: var(--ui-space-xs); border-radius: var(--ui-radius-sm); vertical-align: -.3em; box-shadow: inset 0 0 0 1px var(--ui-line-contour); }
17
- .ui-table[data-density="compact"] :is(th, td) { padding-block: .4375rem; }
18
- .ui-table[data-variant="lookup"] tbody th { width: 1%; white-space: nowrap; }
19
- .ui-table[data-variant="lookup"] td code { white-space: normal; line-height: 1.5; }
20
- .ui-table :is(td, tbody th) ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
21
- .ui-table :is(td, tbody th) .ui-disclosure > summary { min-height: 2.25rem; }
22
- .ui-table-caption { display: flex; justify-content: space-between; gap: var(--ui-space-md); padding: var(--ui-space-sm) var(--ui-space-md); color: var(--ui-text-muted); font-size: .75rem; box-shadow: inset 0 1px 0 var(--ui-line-hair); }
23
- }
1
+ @import '@master/ui/components/table.css';
2
+ @import '@master/ui/components/surface.css';
3
+ @import './table-layout.css';
@@ -0,0 +1,4 @@
1
+ // Module imports share canonical UI styles across site compositions.
2
+ import '@master/ui/components/table.css'
3
+ import '@master/ui/components/surface.css'
4
+ import './table-layout.css'