@awarebydefault/display-case 1.0.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 (254) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +309 -0
  3. package/display-case.prompt.md +64 -0
  4. package/docs/ai-agents.md +126 -0
  5. package/docs/cli.md +99 -0
  6. package/docs/configuration.md +410 -0
  7. package/docs/documentation-panel.md +50 -0
  8. package/docs/examples/README.md +14 -0
  9. package/docs/examples/multi-variant.case.tsx +30 -0
  10. package/docs/examples/plain.case.tsx +22 -0
  11. package/docs/examples/tweak-control.placard.md +80 -0
  12. package/docs/examples/tweaks.case.tsx +39 -0
  13. package/docs/hierarchy.md +59 -0
  14. package/docs/quick-start.md +78 -0
  15. package/docs/style-engines.md +180 -0
  16. package/docs/testing.md +245 -0
  17. package/docs/theming.md +97 -0
  18. package/docs/tweaks.md +75 -0
  19. package/docs/writing-cases.md +144 -0
  20. package/docs/writing-placard-docs.md +194 -0
  21. package/package.json +113 -0
  22. package/skills/display-case-author-case/README.md +20 -0
  23. package/skills/display-case-author-case/SKILL.md +40 -0
  24. package/skills/display-case-author-placard-doc/README.md +24 -0
  25. package/skills/display-case-author-placard-doc/SKILL.md +65 -0
  26. package/skills/display-case-review/README.md +19 -0
  27. package/skills/display-case-review/SKILL.md +30 -0
  28. package/skills/display-case-snapshot/README.md +20 -0
  29. package/skills/display-case-snapshot/SKILL.md +29 -0
  30. package/src/checks/a11y-scanner.test.ts +240 -0
  31. package/src/checks/a11y-scanner.ts +410 -0
  32. package/src/checks/check-text.test.ts +53 -0
  33. package/src/checks/check-text.ts +78 -0
  34. package/src/checks/check.test.ts +194 -0
  35. package/src/checks/check.ts +473 -0
  36. package/src/checks/providers/pixelmatch-diff.test.ts +79 -0
  37. package/src/checks/providers/pixelmatch-diff.ts +30 -0
  38. package/src/checks/providers/playwright-driver.ts +104 -0
  39. package/src/checks/ssr-check.test.ts +73 -0
  40. package/src/checks/ssr-check.ts +96 -0
  41. package/src/checks/structure-check.cross-package.test.ts +165 -0
  42. package/src/checks/structure-check.test.ts +651 -0
  43. package/src/checks/structure-check.ts +988 -0
  44. package/src/checks/tokens-check.test.ts +159 -0
  45. package/src/checks/tokens-check.ts +162 -0
  46. package/src/cli.ts +218 -0
  47. package/src/commands/agents.test.ts +24 -0
  48. package/src/commands/agents.ts +28 -0
  49. package/src/commands/init-run.test.ts +123 -0
  50. package/src/commands/init.test.ts +63 -0
  51. package/src/commands/init.ts +412 -0
  52. package/src/commands/publish.test.ts +210 -0
  53. package/src/commands/publish.ts +292 -0
  54. package/src/core/affected.test.ts +99 -0
  55. package/src/core/affected.ts +144 -0
  56. package/src/core/catalog.test.ts +152 -0
  57. package/src/core/catalog.ts +92 -0
  58. package/src/core/discovery.test.ts +184 -0
  59. package/src/core/discovery.ts +250 -0
  60. package/src/core/manifest.ts +41 -0
  61. package/src/core/mdx-lite/__fixtures__/box-stub.tsx +7 -0
  62. package/src/core/mdx-lite/index.ts +393 -0
  63. package/src/core/mdx-lite/mdx-lite.test.ts +345 -0
  64. package/src/core/mdx-plugin.test.ts +60 -0
  65. package/src/core/mdx-plugin.ts +30 -0
  66. package/src/flow-step.test-d.ts +39 -0
  67. package/src/index.test.ts +100 -0
  68. package/src/index.ts +564 -0
  69. package/src/render/collect-styles.emotion.test.tsx +114 -0
  70. package/src/render/collect-styles.test.tsx +72 -0
  71. package/src/render/collect-styles.ts +33 -0
  72. package/src/render/documents.test.ts +184 -0
  73. package/src/render/documents.ts +88 -0
  74. package/src/render/render-node.test.tsx +160 -0
  75. package/src/render/render-node.tsx +133 -0
  76. package/src/render/ssr-primer.test.tsx +25 -0
  77. package/src/render/ssr-primer.tsx +54 -0
  78. package/src/render/ssr-render.test.tsx +142 -0
  79. package/src/render/ssr-render.tsx +63 -0
  80. package/src/render/ssr-shell.test.tsx +57 -0
  81. package/src/render/ssr-shell.tsx +54 -0
  82. package/src/server/prod-server.ts +237 -0
  83. package/src/server/server.test.ts +117 -0
  84. package/src/server/server.ts +1039 -0
  85. package/src/style-engine.test-d.ts +37 -0
  86. package/src/testing/test-helpers.ts +27 -0
  87. package/src/types/pixelmatch.d.ts +12 -0
  88. package/src/ui/browser-entry.tsx +51 -0
  89. package/src/ui/chrome.css +485 -0
  90. package/src/ui/design-system/README.md +88 -0
  91. package/src/ui/design-system/components/controls/Button.case.tsx +52 -0
  92. package/src/ui/design-system/components/controls/Button.css +89 -0
  93. package/src/ui/design-system/components/controls/Button.placard.md +14 -0
  94. package/src/ui/design-system/components/controls/Button.test.tsx +45 -0
  95. package/src/ui/design-system/components/controls/Button.tsx +41 -0
  96. package/src/ui/design-system/components/controls/IconButton.case.tsx +52 -0
  97. package/src/ui/design-system/components/controls/IconButton.css +67 -0
  98. package/src/ui/design-system/components/controls/IconButton.placard.md +13 -0
  99. package/src/ui/design-system/components/controls/IconButton.test.tsx +39 -0
  100. package/src/ui/design-system/components/controls/IconButton.tsx +47 -0
  101. package/src/ui/design-system/components/controls/Input.case.tsx +50 -0
  102. package/src/ui/design-system/components/controls/Input.css +52 -0
  103. package/src/ui/design-system/components/controls/Input.placard.md +12 -0
  104. package/src/ui/design-system/components/controls/Input.test.tsx +43 -0
  105. package/src/ui/design-system/components/controls/Input.tsx +45 -0
  106. package/src/ui/design-system/components/controls/Select.case.tsx +48 -0
  107. package/src/ui/design-system/components/controls/Select.css +44 -0
  108. package/src/ui/design-system/components/controls/Select.placard.md +15 -0
  109. package/src/ui/design-system/components/controls/Select.test.tsx +57 -0
  110. package/src/ui/design-system/components/controls/Select.tsx +58 -0
  111. package/src/ui/design-system/components/controls/SelectMenu.case.tsx +100 -0
  112. package/src/ui/design-system/components/controls/SelectMenu.css +72 -0
  113. package/src/ui/design-system/components/controls/SelectMenu.placard.md +18 -0
  114. package/src/ui/design-system/components/controls/SelectMenu.test.tsx +66 -0
  115. package/src/ui/design-system/components/controls/SelectMenu.tsx +377 -0
  116. package/src/ui/design-system/components/index.ts +66 -0
  117. package/src/ui/design-system/components/primer-specimen/ColorRamp.case.tsx +44 -0
  118. package/src/ui/design-system/components/primer-specimen/ColorRamp.placard.md +15 -0
  119. package/src/ui/design-system/components/primer-specimen/ColorRamp.tsx +51 -0
  120. package/src/ui/design-system/components/primer-specimen/DefinitionList.case.tsx +38 -0
  121. package/src/ui/design-system/components/primer-specimen/DefinitionList.placard.md +15 -0
  122. package/src/ui/design-system/components/primer-specimen/DefinitionList.tsx +41 -0
  123. package/src/ui/design-system/components/primer-specimen/FontFamilies.case.tsx +24 -0
  124. package/src/ui/design-system/components/primer-specimen/FontFamilies.placard.md +12 -0
  125. package/src/ui/design-system/components/primer-specimen/FontFamilies.tsx +41 -0
  126. package/src/ui/design-system/components/primer-specimen/GlyphGrid.case.tsx +27 -0
  127. package/src/ui/design-system/components/primer-specimen/GlyphGrid.placard.md +13 -0
  128. package/src/ui/design-system/components/primer-specimen/GlyphGrid.tsx +34 -0
  129. package/src/ui/design-system/components/primer-specimen/LayoutMock.case.tsx +36 -0
  130. package/src/ui/design-system/components/primer-specimen/LayoutMock.placard.md +7 -0
  131. package/src/ui/design-system/components/primer-specimen/LayoutMock.tsx +36 -0
  132. package/src/ui/design-system/components/primer-specimen/SpacingScale.case.tsx +20 -0
  133. package/src/ui/design-system/components/primer-specimen/SpacingScale.placard.md +12 -0
  134. package/src/ui/design-system/components/primer-specimen/SpacingScale.tsx +33 -0
  135. package/src/ui/design-system/components/primer-specimen/SpecimenBoxRow.case.tsx +56 -0
  136. package/src/ui/design-system/components/primer-specimen/SpecimenBoxRow.placard.md +17 -0
  137. package/src/ui/design-system/components/primer-specimen/SpecimenBoxRow.tsx +45 -0
  138. package/src/ui/design-system/components/primer-specimen/StatusList.case.tsx +17 -0
  139. package/src/ui/design-system/components/primer-specimen/StatusList.placard.md +16 -0
  140. package/src/ui/design-system/components/primer-specimen/StatusList.tsx +39 -0
  141. package/src/ui/design-system/components/primer-specimen/SwatchGrid.case.tsx +26 -0
  142. package/src/ui/design-system/components/primer-specimen/SwatchGrid.placard.md +15 -0
  143. package/src/ui/design-system/components/primer-specimen/SwatchGrid.tsx +42 -0
  144. package/src/ui/design-system/components/primer-specimen/TypeScale.case.tsx +23 -0
  145. package/src/ui/design-system/components/primer-specimen/TypeScale.placard.md +14 -0
  146. package/src/ui/design-system/components/primer-specimen/TypeScale.tsx +34 -0
  147. package/src/ui/design-system/components/primer-specimen/WeightSpecimen.case.tsx +28 -0
  148. package/src/ui/design-system/components/primer-specimen/WeightSpecimen.placard.md +15 -0
  149. package/src/ui/design-system/components/primer-specimen/WeightSpecimen.tsx +46 -0
  150. package/src/ui/design-system/components/primer-specimen/index.ts +31 -0
  151. package/src/ui/design-system/components/primer-specimen/styles.css +476 -0
  152. package/src/ui/design-system/components/shell/A11yPage.case.tsx +237 -0
  153. package/src/ui/design-system/components/shell/A11yPage.placard.md +15 -0
  154. package/src/ui/design-system/components/shell/CaseTemplate.case.tsx +32 -0
  155. package/src/ui/design-system/components/shell/CaseTemplate.placard.md +5 -0
  156. package/src/ui/design-system/components/shell/CasesPage.case.tsx +141 -0
  157. package/src/ui/design-system/components/shell/CasesPage.placard.md +12 -0
  158. package/src/ui/design-system/components/shell/PrimerPage.case.tsx +22 -0
  159. package/src/ui/design-system/components/shell/PrimerPage.placard.md +3 -0
  160. package/src/ui/design-system/components/shell/PrimerTemplate.case.tsx +22 -0
  161. package/src/ui/design-system/components/shell/PrimerTemplate.placard.md +5 -0
  162. package/src/ui/design-system/components/shell/ShellView.case.tsx +57 -0
  163. package/src/ui/design-system/components/shell/ShellView.placard.md +5 -0
  164. package/src/ui/design-system/components/shell/ShellView.tsx +678 -0
  165. package/src/ui/design-system/components/shell/shell-fixtures.tsx +727 -0
  166. package/src/ui/design-system/components/showcase/A11yBadge.case.tsx +46 -0
  167. package/src/ui/design-system/components/showcase/A11yBadge.css +27 -0
  168. package/src/ui/design-system/components/showcase/A11yBadge.placard.md +11 -0
  169. package/src/ui/design-system/components/showcase/A11yBadge.test.tsx +31 -0
  170. package/src/ui/design-system/components/showcase/A11yBadge.tsx +41 -0
  171. package/src/ui/design-system/components/showcase/A11yPanel.case.tsx +121 -0
  172. package/src/ui/design-system/components/showcase/A11yPanel.css +198 -0
  173. package/src/ui/design-system/components/showcase/A11yPanel.placard.md +19 -0
  174. package/src/ui/design-system/components/showcase/A11yPanel.test.tsx +81 -0
  175. package/src/ui/design-system/components/showcase/A11yPanel.tsx +144 -0
  176. package/src/ui/design-system/components/showcase/Chip.case.tsx +48 -0
  177. package/src/ui/design-system/components/showcase/Chip.css +51 -0
  178. package/src/ui/design-system/components/showcase/Chip.placard.md +13 -0
  179. package/src/ui/design-system/components/showcase/Chip.test.tsx +46 -0
  180. package/src/ui/design-system/components/showcase/Chip.tsx +54 -0
  181. package/src/ui/design-system/components/showcase/Eyebrow.case.tsx +30 -0
  182. package/src/ui/design-system/components/showcase/Eyebrow.css +16 -0
  183. package/src/ui/design-system/components/showcase/Eyebrow.placard.md +10 -0
  184. package/src/ui/design-system/components/showcase/Eyebrow.test.tsx +38 -0
  185. package/src/ui/design-system/components/showcase/Eyebrow.tsx +29 -0
  186. package/src/ui/design-system/components/showcase/FlowNav.case.tsx +35 -0
  187. package/src/ui/design-system/components/showcase/FlowNav.css +29 -0
  188. package/src/ui/design-system/components/showcase/FlowNav.placard.md +13 -0
  189. package/src/ui/design-system/components/showcase/FlowNav.test.tsx +48 -0
  190. package/src/ui/design-system/components/showcase/FlowNav.tsx +58 -0
  191. package/src/ui/design-system/components/showcase/ImpactTag.case.tsx +19 -0
  192. package/src/ui/design-system/components/showcase/ImpactTag.css +36 -0
  193. package/src/ui/design-system/components/showcase/ImpactTag.placard.md +14 -0
  194. package/src/ui/design-system/components/showcase/ImpactTag.test.tsx +40 -0
  195. package/src/ui/design-system/components/showcase/ImpactTag.tsx +35 -0
  196. package/src/ui/design-system/components/showcase/NavItem.case.tsx +86 -0
  197. package/src/ui/design-system/components/showcase/NavItem.css +111 -0
  198. package/src/ui/design-system/components/showcase/NavItem.placard.md +13 -0
  199. package/src/ui/design-system/components/showcase/NavItem.test.tsx +65 -0
  200. package/src/ui/design-system/components/showcase/NavItem.tsx +95 -0
  201. package/src/ui/design-system/components/showcase/RenderAddress.case.tsx +21 -0
  202. package/src/ui/design-system/components/showcase/RenderAddress.css +35 -0
  203. package/src/ui/design-system/components/showcase/RenderAddress.placard.md +7 -0
  204. package/src/ui/design-system/components/showcase/RenderAddress.test.tsx +26 -0
  205. package/src/ui/design-system/components/showcase/RenderAddress.tsx +43 -0
  206. package/src/ui/design-system/components/showcase/SegmentedToggle.case.tsx +84 -0
  207. package/src/ui/design-system/components/showcase/SegmentedToggle.css +61 -0
  208. package/src/ui/design-system/components/showcase/SegmentedToggle.placard.md +21 -0
  209. package/src/ui/design-system/components/showcase/SegmentedToggle.test.tsx +81 -0
  210. package/src/ui/design-system/components/showcase/SegmentedToggle.tsx +75 -0
  211. package/src/ui/design-system/components/showcase/Sidebar.case.tsx +67 -0
  212. package/src/ui/design-system/components/showcase/Sidebar.css +6 -0
  213. package/src/ui/design-system/components/showcase/Sidebar.placard.md +14 -0
  214. package/src/ui/design-system/components/showcase/Sidebar.test.tsx +32 -0
  215. package/src/ui/design-system/components/showcase/Sidebar.tsx +30 -0
  216. package/src/ui/design-system/components/showcase/Stage.case.tsx +51 -0
  217. package/src/ui/design-system/components/showcase/Stage.css +91 -0
  218. package/src/ui/design-system/components/showcase/Stage.placard.md +15 -0
  219. package/src/ui/design-system/components/showcase/Stage.test.tsx +84 -0
  220. package/src/ui/design-system/components/showcase/Stage.tsx +97 -0
  221. package/src/ui/design-system/components/showcase/TweaksPanel.case.tsx +81 -0
  222. package/src/ui/design-system/components/showcase/TweaksPanel.css +169 -0
  223. package/src/ui/design-system/components/showcase/TweaksPanel.placard.md +20 -0
  224. package/src/ui/design-system/components/showcase/TweaksPanel.tsx +230 -0
  225. package/src/ui/design-system/components/showcase/Wordmark.case.tsx +42 -0
  226. package/src/ui/design-system/components/showcase/Wordmark.css +31 -0
  227. package/src/ui/design-system/components/showcase/Wordmark.placard.md +10 -0
  228. package/src/ui/design-system/components/showcase/Wordmark.test.tsx +22 -0
  229. package/src/ui/design-system/components/showcase/Wordmark.tsx +22 -0
  230. package/src/ui/design-system/primer-specimens/brand.tsx +26 -0
  231. package/src/ui/design-system/primer-specimens/colors.tsx +83 -0
  232. package/src/ui/design-system/primer-specimens/components.tsx +308 -0
  233. package/src/ui/design-system/primer-specimens/foundations.tsx +71 -0
  234. package/src/ui/design-system/primer-specimens/index.ts +25 -0
  235. package/src/ui/design-system/primer-specimens/showcase.tsx +68 -0
  236. package/src/ui/design-system/primer-specimens/spacing.tsx +101 -0
  237. package/src/ui/design-system/primer-specimens/type.tsx +75 -0
  238. package/src/ui/design-system/primer.mdx +236 -0
  239. package/src/ui/design-system/styles.css +14 -0
  240. package/src/ui/design-system/tokens/colors.css +172 -0
  241. package/src/ui/design-system/tokens/fonts.css +18 -0
  242. package/src/ui/design-system/tokens/spacing.css +48 -0
  243. package/src/ui/design-system/tokens/typography.css +49 -0
  244. package/src/ui/markdown.test.tsx +54 -0
  245. package/src/ui/markdown.tsx +19 -0
  246. package/src/ui/primer-mount.tsx +76 -0
  247. package/src/ui/primer.css +175 -0
  248. package/src/ui/primer.tsx +277 -0
  249. package/src/ui/render-mount.tsx +284 -0
  250. package/src/ui/shell-core.test.ts +340 -0
  251. package/src/ui/shell-core.ts +295 -0
  252. package/src/ui/shell.tsx +60 -0
  253. package/src/ui/test-ids.ts +53 -0
  254. package/src/ui/use-shell.ts +1230 -0
@@ -0,0 +1,15 @@
1
+ **WeightSpecimen** — a row of weight samples, each word set at its own font-weight over a mono
2
+ caption. A reusable Primer specimen for showing the weights a system uses and
3
+ what each is for. An optional `footer` slot hangs extra content (a divider, an
4
+ eyebrow sample) below the row.
5
+
6
+ ```tsx
7
+ <WeightSpecimen
8
+ weights={[
9
+ { weight: 400, name: 'Normal', role: 'body' },
10
+ { weight: 600, name: 'Semibold', role: 'titles' },
11
+ ]}
12
+ />
13
+ ```
14
+
15
+ Use this for weights. For size steps reach for `TypeScale`; for which families exist reach for `FontFamilies`.
@@ -0,0 +1,46 @@
1
+ import type { ReactNode } from 'react'
2
+
3
+ /**
4
+ * Display Case — WeightSpecimen
5
+ * A row of weight samples, each set at its own font-weight over a mono caption.
6
+ * Generic specimen primitive for a Primer — use it to show the weights a system
7
+ * uses and what each is for. An optional `footer` slot hangs extra content (a
8
+ * divider, an eyebrow sample) below the row.
9
+ */
10
+
11
+ export interface WeightSpec {
12
+ /** Numeric font-weight (also the React key). */
13
+ weight: number
14
+ /** Sample word shown at this weight. */
15
+ name: string
16
+ /** Mono role caption (e.g. `body`, `titles`). */
17
+ role?: string
18
+ }
19
+
20
+ export interface WeightSpecimenProps {
21
+ weights: WeightSpec[]
22
+ /** Optional content rendered below the weights (e.g. a divider + eyebrow). */
23
+ footer?: ReactNode
24
+ }
25
+
26
+ export function WeightSpecimen({ weights, footer }: WeightSpecimenProps) {
27
+ return (
28
+ <div className="dcpl-block">
29
+ <div className="dcpl-weights">
30
+ {weights.map((w) => (
31
+ <div
32
+ className="dcpl-weight"
33
+ key={w.weight}
34
+ style={{ fontWeight: w.weight }}>
35
+ {w.name}
36
+ <span>
37
+ {w.weight}
38
+ {w.role ? ` · ${w.role}` : null}
39
+ </span>
40
+ </div>
41
+ ))}
42
+ </div>
43
+ {footer}
44
+ </div>
45
+ )
46
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Primer-specimen components — reusable foundation specimens for building a
3
+ * Primer (a long-form design-system "wall text" page). Unlike the original
4
+ * document-specific specimens, these are generic and prop-driven: feed them your
5
+ * own ramps, swatches, type scale, spacing steps, glyphs, and so on. They live
6
+ * under `components/` so they're showcased and importable like any other
7
+ * design-system component.
8
+ */
9
+
10
+ export type { ColorRampProps, ColorStop } from './ColorRamp'
11
+ export { ColorRamp } from './ColorRamp'
12
+ export type { DefEntry, DefinitionListProps } from './DefinitionList'
13
+ export { DefinitionList } from './DefinitionList'
14
+ export type { FontFamiliesProps, FontFamily } from './FontFamilies'
15
+ export { FontFamilies } from './FontFamilies'
16
+ export type { GlyphGridProps, GlyphSpec } from './GlyphGrid'
17
+ export { GlyphGrid } from './GlyphGrid'
18
+ export type { LayoutMockProps } from './LayoutMock'
19
+ export { LayoutMock } from './LayoutMock'
20
+ export type { SpaceStep, SpacingScaleProps } from './SpacingScale'
21
+ export { SpacingScale } from './SpacingScale'
22
+ export type { BoxSpec, SpecimenBoxRowProps } from './SpecimenBoxRow'
23
+ export { SpecimenBoxRow } from './SpecimenBoxRow'
24
+ export type { StatusItem, StatusListProps } from './StatusList'
25
+ export { StatusList } from './StatusList'
26
+ export type { Swatch, SwatchGridProps } from './SwatchGrid'
27
+ export { SwatchGrid } from './SwatchGrid'
28
+ export type { TypeScaleProps, TypeStep } from './TypeScale'
29
+ export { TypeScale } from './TypeScale'
30
+ export type { WeightSpec, WeightSpecimenProps } from './WeightSpecimen'
31
+ export { WeightSpecimen } from './WeightSpecimen'
@@ -0,0 +1,476 @@
1
+ /* Full-width specimen block — stacks inside a flex body. */
2
+ .dcpl-block {
3
+ width: 100%;
4
+ }
5
+ .dcpl-row {
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ gap: var(--dc-space-8);
9
+ align-items: center;
10
+ width: 100%;
11
+ }
12
+
13
+ /* Colour ramp. */
14
+ .dcpl-ramp {
15
+ display: grid;
16
+ gap: var(--dc-space-3);
17
+ width: 100%;
18
+ }
19
+ .dcpl-sw {
20
+ min-width: 0;
21
+ }
22
+ .dcpl-sw-chip {
23
+ border-radius: var(--dc-radius-sm);
24
+ border: var(--dc-border-line);
25
+ }
26
+ .dcpl-sw-meta {
27
+ margin-top: var(--dc-space-2);
28
+ }
29
+ .dcpl-sw-name {
30
+ font-family: var(--dc-font-sans);
31
+ font-size: var(--dc-text-sm);
32
+ font-weight: var(--dc-weight-medium);
33
+ color: var(--dc-fg);
34
+ }
35
+ .dcpl-sw-star {
36
+ color: var(--dc-brand);
37
+ }
38
+ .dcpl-sw-hex {
39
+ font-family: var(--dc-font-mono);
40
+ font-size: var(--dc-text-xs);
41
+ color: var(--dc-fg-muted);
42
+ }
43
+
44
+ /* Semantic role swatch grid. */
45
+ .dcpl-swgrid {
46
+ display: grid;
47
+ gap: var(--dc-space-6);
48
+ width: 100%;
49
+ }
50
+ .dcpl-swrow {
51
+ display: flex;
52
+ align-items: center;
53
+ gap: var(--dc-space-4);
54
+ }
55
+ .dcpl-swchip {
56
+ width: 28px;
57
+ height: 28px;
58
+ flex: 0 0 auto;
59
+ border-radius: var(--dc-radius-sm);
60
+ border: var(--dc-border-line);
61
+ }
62
+ .dcpl-swtok {
63
+ font-family: var(--dc-font-mono);
64
+ font-size: var(--dc-text-xs);
65
+ min-width: 0;
66
+ }
67
+ .dcpl-swtok b {
68
+ display: block;
69
+ font-family: var(--dc-font-sans);
70
+ font-weight: var(--dc-weight-medium);
71
+ font-size: var(--dc-text-sm);
72
+ color: var(--dc-fg);
73
+ }
74
+ .dcpl-swtok span {
75
+ color: var(--dc-fg-muted);
76
+ }
77
+
78
+ /* Status list. */
79
+ .dcpl-status {
80
+ display: flex;
81
+ gap: var(--dc-space-6);
82
+ flex-wrap: wrap;
83
+ width: 100%;
84
+ }
85
+ .dcpl-statusitem {
86
+ flex: 1;
87
+ min-width: 9rem;
88
+ display: flex;
89
+ align-items: center;
90
+ gap: var(--dc-space-4);
91
+ border: var(--dc-border-line);
92
+ border-radius: var(--dc-radius-sm);
93
+ padding: var(--dc-space-6);
94
+ }
95
+ .dcpl-statusdot {
96
+ width: 14px;
97
+ height: 14px;
98
+ border-radius: var(--dc-radius-full);
99
+ flex: 0 0 auto;
100
+ }
101
+ .dcpl-statusitem b {
102
+ display: block;
103
+ font-size: var(--dc-text-sm);
104
+ font-weight: var(--dc-weight-medium);
105
+ color: var(--dc-fg);
106
+ }
107
+ .dcpl-statusitem span {
108
+ font-family: var(--dc-font-mono);
109
+ font-size: var(--dc-text-xs);
110
+ color: var(--dc-fg-muted);
111
+ }
112
+
113
+ /* Definition list. */
114
+ .dcpl-deflist {
115
+ border: var(--dc-border-line);
116
+ border-radius: var(--dc-radius-md);
117
+ /* border-box so width:100% includes the border — otherwise the right border
118
+ overflows its parent and is clipped when the list fills a flush Display. */
119
+ box-sizing: border-box;
120
+ overflow: hidden;
121
+ width: 100%;
122
+ }
123
+ .dcpl-defrow {
124
+ display: grid;
125
+ /* Column widths come from a custom property set per-row (see DefinitionList),
126
+ not an inline grid-template — so the responsive override below wins through
127
+ the normal cascade instead of needing !important to beat an inline style. */
128
+ grid-template-columns: var(--dcpl-term-width, 7.5rem) 1fr;
129
+ gap: var(--dc-space-8);
130
+ padding: var(--dc-space-6) var(--dc-space-8);
131
+ border-top: var(--dc-border-line);
132
+ }
133
+ .dcpl-defrow:first-child {
134
+ border-top: 0;
135
+ }
136
+ .dcpl-defterm {
137
+ font-family: var(--dc-font-mono);
138
+ font-size: var(--dc-text-xs);
139
+ font-weight: var(--dc-weight-medium);
140
+ letter-spacing: var(--dc-tracking-label);
141
+ text-transform: uppercase;
142
+ color: var(--dc-brand);
143
+ }
144
+ .dcpl-defdesc {
145
+ font-size: var(--dc-text-sm);
146
+ line-height: var(--dc-leading-normal);
147
+ color: var(--dc-fg-muted);
148
+ }
149
+ .dcpl-defdesc strong {
150
+ color: var(--dc-fg);
151
+ font-weight: var(--dc-weight-semibold);
152
+ }
153
+
154
+ /* Layout mock. */
155
+ .dcpl-layout {
156
+ width: 100%;
157
+ max-width: 26rem;
158
+ border: var(--dc-border-line);
159
+ border-radius: var(--dc-radius-md);
160
+ overflow: hidden;
161
+ font-family: var(--dc-font-mono);
162
+ font-size: var(--dc-text-xs);
163
+ color: var(--dc-fg-muted);
164
+ }
165
+ .dcpl-layout-head {
166
+ padding: var(--dc-space-4) var(--dc-space-5);
167
+ border-bottom: var(--dc-border-line);
168
+ background: var(--dc-bg);
169
+ }
170
+ .dcpl-layout-body {
171
+ display: flex;
172
+ min-height: 72px;
173
+ }
174
+ .dcpl-layout-side {
175
+ width: 32%;
176
+ padding: var(--dc-space-5);
177
+ border-right: var(--dc-border-line);
178
+ background: var(--dc-bg-subtle);
179
+ }
180
+ .dcpl-layout-main {
181
+ flex: 1;
182
+ padding: var(--dc-space-5);
183
+ background: var(--dc-surface);
184
+ }
185
+
186
+ /* Type families. */
187
+ .dcpl-fam {
188
+ display: flex;
189
+ flex-direction: column;
190
+ gap: var(--dc-space-8);
191
+ width: 100%;
192
+ }
193
+ .dcpl-famrow {
194
+ display: flex;
195
+ align-items: baseline;
196
+ gap: var(--dc-space-8);
197
+ flex-wrap: wrap;
198
+ }
199
+ .dcpl-famtag {
200
+ font-family: var(--dc-font-mono);
201
+ font-size: var(--dc-text-xs);
202
+ font-weight: var(--dc-weight-medium);
203
+ letter-spacing: var(--dc-tracking-label);
204
+ text-transform: uppercase;
205
+ color: var(--dc-fg-muted);
206
+ width: 6.5rem;
207
+ flex: 0 0 auto;
208
+ }
209
+ .dcpl-famsample {
210
+ font-size: 23px;
211
+ color: var(--dc-fg);
212
+ }
213
+ .dcpl-famsample[data-font="mono"] {
214
+ font-family: var(--dc-font-mono);
215
+ font-size: 21px;
216
+ }
217
+ .dcpl-famsample[data-font="sans"] {
218
+ font-family: var(--dc-font-sans);
219
+ }
220
+ .dcpl-famnote {
221
+ font-family: var(--dc-font-mono);
222
+ font-size: var(--dc-text-xs);
223
+ color: var(--dc-fg-subtle);
224
+ margin-top: var(--dc-space-1);
225
+ }
226
+
227
+ /* Type scale. */
228
+ .dcpl-scale {
229
+ display: flex;
230
+ flex-direction: column;
231
+ gap: var(--dc-space-6);
232
+ width: 100%;
233
+ }
234
+ .dcpl-scalerow {
235
+ display: flex;
236
+ align-items: baseline;
237
+ gap: var(--dc-space-8);
238
+ }
239
+ .dcpl-scaletag {
240
+ font-family: var(--dc-font-mono);
241
+ font-size: var(--dc-text-xs);
242
+ color: var(--dc-fg-muted);
243
+ width: 6rem;
244
+ flex: 0 0 auto;
245
+ }
246
+ .dcpl-scalespec {
247
+ line-height: var(--dc-leading-tight);
248
+ color: var(--dc-fg);
249
+ }
250
+
251
+ /* Weights. */
252
+ .dcpl-weights {
253
+ display: flex;
254
+ gap: var(--dc-space-16);
255
+ align-items: baseline;
256
+ flex-wrap: wrap;
257
+ width: 100%;
258
+ }
259
+ .dcpl-weight {
260
+ font-size: 22px;
261
+ color: var(--dc-fg);
262
+ }
263
+ .dcpl-weight span {
264
+ display: block;
265
+ font-size: var(--dc-text-xs);
266
+ color: var(--dc-fg-muted);
267
+ font-weight: var(--dc-weight-normal);
268
+ margin-top: var(--dc-space-1);
269
+ }
270
+ .dcpl-divider {
271
+ height: 1px;
272
+ background: var(--dc-border);
273
+ margin: var(--dc-space-8) 0;
274
+ width: 100%;
275
+ }
276
+
277
+ /* Spacing scale. */
278
+ .dcpl-spacescale {
279
+ display: flex;
280
+ flex-direction: column;
281
+ gap: var(--dc-space-4);
282
+ width: 100%;
283
+ }
284
+ .dcpl-spacerow {
285
+ display: flex;
286
+ align-items: center;
287
+ gap: var(--dc-space-6);
288
+ }
289
+ .dcpl-spacetag {
290
+ font-family: var(--dc-font-mono);
291
+ font-size: var(--dc-text-xs);
292
+ color: var(--dc-fg-muted);
293
+ width: 4.5rem;
294
+ flex: 0 0 auto;
295
+ }
296
+ .dcpl-spacepx {
297
+ font-family: var(--dc-font-mono);
298
+ font-size: var(--dc-text-xs);
299
+ color: var(--dc-fg-subtle);
300
+ width: 2.75rem;
301
+ flex: 0 0 auto;
302
+ }
303
+ .dcpl-spacebar {
304
+ height: 12px;
305
+ background: var(--dc-brand);
306
+ border-radius: var(--dc-radius-sm);
307
+ }
308
+
309
+ /* Box row (radius, elevation, any labelled box specimen). */
310
+ .dcpl-boxrow {
311
+ display: flex;
312
+ gap: var(--dc-space-10);
313
+ flex-wrap: wrap;
314
+ width: 100%;
315
+ }
316
+ .dcpl-boxitem {
317
+ display: flex;
318
+ flex-direction: column;
319
+ align-items: center;
320
+ gap: var(--dc-space-4);
321
+ }
322
+ .dcpl-box {
323
+ width: 64px;
324
+ height: 48px;
325
+ background: var(--dc-bg-subtle);
326
+ border: var(--dc-border-line);
327
+ display: flex;
328
+ align-items: center;
329
+ justify-content: center;
330
+ font-size: var(--dc-text-sm);
331
+ color: var(--dc-fg-muted);
332
+ }
333
+ .dcpl-boxlbl {
334
+ text-align: center;
335
+ }
336
+ .dcpl-boxlbl b {
337
+ display: block;
338
+ font-size: var(--dc-text-sm);
339
+ font-weight: var(--dc-weight-medium);
340
+ color: var(--dc-fg);
341
+ }
342
+ .dcpl-boxlbl span {
343
+ font-family: var(--dc-font-mono);
344
+ font-size: var(--dc-text-xs);
345
+ color: var(--dc-fg-muted);
346
+ }
347
+
348
+ /* Glyph grid. */
349
+ .dcpl-icongrid {
350
+ display: grid;
351
+ gap: var(--dc-space-6);
352
+ width: 100%;
353
+ }
354
+ .dcpl-iconitem {
355
+ display: flex;
356
+ flex-direction: column;
357
+ align-items: center;
358
+ gap: var(--dc-space-3);
359
+ border: var(--dc-border-line);
360
+ border-radius: var(--dc-radius-sm);
361
+ padding: var(--dc-space-6) var(--dc-space-3);
362
+ }
363
+ .dcpl-iconglyph {
364
+ font-size: var(--dc-text-lg);
365
+ line-height: 1;
366
+ color: var(--dc-fg);
367
+ }
368
+ .dcpl-iconuse {
369
+ font-size: var(--dc-text-xs);
370
+ color: var(--dc-fg-muted);
371
+ text-align: center;
372
+ }
373
+
374
+ /* Components overview — labelled rows grouping a whole component category
375
+ (one row per member: a mono tag on the left, live specimens on the right). */
376
+ .dcpl-overview {
377
+ display: flex;
378
+ flex-direction: column;
379
+ gap: var(--dc-space-10);
380
+ width: 100%;
381
+ }
382
+ .dcpl-ovrow {
383
+ display: grid;
384
+ grid-template-columns: 4.5rem 1fr;
385
+ gap: var(--dc-space-8);
386
+ align-items: center;
387
+ }
388
+ .dcpl-ovrow[data-align="start"] {
389
+ align-items: start;
390
+ }
391
+ .dcpl-ovlabel {
392
+ font-family: var(--dc-font-mono);
393
+ font-size: var(--dc-text-xs);
394
+ font-weight: var(--dc-weight-medium);
395
+ letter-spacing: var(--dc-tracking-label);
396
+ text-transform: uppercase;
397
+ color: var(--dc-fg-muted);
398
+ line-height: var(--dc-leading-tight);
399
+ }
400
+ .dcpl-ovitems {
401
+ display: flex;
402
+ flex-wrap: wrap;
403
+ gap: var(--dc-space-6);
404
+ align-items: center;
405
+ min-width: 0;
406
+ }
407
+
408
+ /* Showcase overview — labelled sections stacked vertically, each label sitting
409
+ above its specimen. The sidebar + stage pair share a two-column top row; the
410
+ docked + floating tweaks panels stack in one section. */
411
+ .dcpl-sc {
412
+ display: flex;
413
+ flex-direction: column;
414
+ gap: var(--dc-space-10);
415
+ width: 100%;
416
+ }
417
+ .dcpl-sc-block {
418
+ display: flex;
419
+ flex-direction: column;
420
+ gap: var(--dc-space-4);
421
+ min-width: 0;
422
+ min-height: 0;
423
+ }
424
+ .dcpl-sc-cols {
425
+ display: grid;
426
+ grid-template-columns: auto minmax(0, 1fr);
427
+ gap: var(--dc-space-10);
428
+ align-items: start;
429
+ }
430
+ /* Pair variant — the left column stacks two specimens (sidebar above eyebrow)
431
+ and the right specimen (stage) stretches to their combined height. */
432
+ .dcpl-sc-cols[data-pair] {
433
+ align-items: stretch;
434
+ }
435
+ .dcpl-sc-stack {
436
+ display: flex;
437
+ flex-direction: column;
438
+ gap: var(--dc-space-10);
439
+ min-width: 0;
440
+ }
441
+ .dcpl-sc-tweaks {
442
+ display: flex;
443
+ flex-direction: column;
444
+ gap: var(--dc-space-8);
445
+ width: 100%;
446
+ }
447
+ /* The floating panel uses position:fixed; the transform makes this surface its
448
+ containing block so it anchors to this corner instead of the viewport. */
449
+ .dcpl-sc-float {
450
+ position: relative;
451
+ transform: translateZ(0);
452
+ display: flex;
453
+ align-items: center;
454
+ justify-content: center;
455
+ min-height: 12rem;
456
+ width: 100%;
457
+ border: 1px dashed var(--dc-border);
458
+ border-radius: var(--dc-radius-md);
459
+ font-family: var(--dc-font-mono);
460
+ font-size: var(--dc-text-sm);
461
+ color: var(--dc-fg-subtle);
462
+ }
463
+
464
+ @media (max-width: 680px) {
465
+ .dcpl-defrow {
466
+ grid-template-columns: 1fr;
467
+ gap: var(--dc-space-2);
468
+ }
469
+ .dcpl-ovrow {
470
+ grid-template-columns: 1fr;
471
+ gap: var(--dc-space-3);
472
+ }
473
+ .dcpl-sc-cols {
474
+ grid-template-columns: 1fr;
475
+ }
476
+ }