@espressif/dashboard-ui-components 1.13.0 → 1.14.1

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 (178) hide show
  1. package/.claude/rules/dashboard-ui-consumption.md +42 -0
  2. package/.cursor/rules/dashboard-ui-consumption.mdc +40 -1
  3. package/CHANGELOG.md +272 -0
  4. package/README.md +68 -6
  5. package/dist/{alert.props-CcKo49Rb.d.ts → alert.props-BuLuWmXA.d.ts} +3 -3
  6. package/dist/common/copyright-card/copyright-card.js +1 -1
  7. package/dist/common/footer-card/footer-card.js +2 -2
  8. package/dist/common/index.d.ts +3 -0
  9. package/dist/common/my-account-menu/my-account-menu.js +2 -2
  10. package/dist/common/page-loader/page-loader.js +4 -1
  11. package/dist/common/profile-card/profile-card.js +2 -2
  12. package/dist/components/accordion/accordion.js +6 -11
  13. package/dist/components/alert/index.d.ts +5 -5
  14. package/dist/components/anchored-panel/anchored-panel.js +4 -4
  15. package/dist/components/async-multi-select/async-multi-select.js +8 -8
  16. package/dist/components/avatar/avatar.js +1 -1
  17. package/dist/components/badge/index.d.ts +1 -1
  18. package/dist/components/bottom-sheet/_hooks/use-sheet-drag.js +112 -0
  19. package/dist/components/bottom-sheet/bottom-sheet.js +84 -0
  20. package/dist/components/bottom-sheet/index.d.ts +50 -0
  21. package/dist/components/bottom-sheet/index.js +3 -0
  22. package/dist/components/bubble/bubble.js +1 -1
  23. package/dist/components/button/button.js +2 -2
  24. package/dist/components/button/flash-button.js +4 -4
  25. package/dist/components/calendar/calendar.js +5 -5
  26. package/dist/components/cards/animated-card/animated-card.js +1 -1
  27. package/dist/components/cards/basic-details-card.js +2 -2
  28. package/dist/components/cards/collapsible-card.js +1 -1
  29. package/dist/components/cards/index.d.ts +2 -2
  30. package/dist/components/cards/no-data-card/no-data-card.js +2 -2
  31. package/dist/components/cards/section-card.js +12 -12
  32. package/dist/components/cards/simple-card.js +2 -5
  33. package/dist/components/category-card/category-card.js +2 -2
  34. package/dist/components/chart/chart.js +4 -4
  35. package/dist/components/chart/donut-chart.js +1 -1
  36. package/dist/components/chart/treemap-chart.js +1 -1
  37. package/dist/components/choice-card/choice-card.js +3 -3
  38. package/dist/components/code-editor/code-editor.js +4 -3
  39. package/dist/components/data-table/table-header.js +1 -1
  40. package/dist/components/date-range-picker/date-range-picker.js +3 -3
  41. package/dist/components/dynamic-list/dynamic-list.js +14 -13
  42. package/dist/components/dynamic-list/index.d.ts +1 -1
  43. package/dist/components/error-display/full-size-error/full-size-error.js +2 -2
  44. package/dist/components/expandable-text/expandable-text-overlay.js +1 -1
  45. package/dist/components/facet-filters/filter-group.js +2 -2
  46. package/dist/components/feature-grid/feature-grid.js +3 -3
  47. package/dist/components/file-input/file-input.js +8 -8
  48. package/dist/components/file-upload/file-upload.js +4 -4
  49. package/dist/components/fullscreen-dialog/fullscreen-dialog.js +1 -1
  50. package/dist/components/gradient-ring-button/_hooks/use-ring-geometry.js +116 -0
  51. package/dist/components/gradient-ring-button/gradient-ring-button.js +44 -0
  52. package/dist/components/gradient-ring-button/gradient-ring.js +77 -0
  53. package/dist/components/gradient-ring-button/index.d.ts +66 -0
  54. package/dist/components/gradient-ring-button/index.js +3 -0
  55. package/dist/components/horizontal-stepper/horizontal-stepper.js +4 -8
  56. package/dist/components/horizontal-stepper/index.d.ts +1 -1
  57. package/dist/components/icon-avatar/index.d.ts +3 -3
  58. package/dist/components/icon-text-action-card/index.d.ts +4 -4
  59. package/dist/components/index.d.ts +9 -7
  60. package/dist/components/index.js +5 -1
  61. package/dist/components/key-value-manager/key-value-manager-add-popover.js +1 -1
  62. package/dist/components/key-value-manager/key-value-manager-table.js +1 -1
  63. package/dist/components/link/link.js +7 -7
  64. package/dist/components/list/list-item.utils.js +5 -4
  65. package/dist/components/list/list.js +1 -1
  66. package/dist/components/list-details/index.d.ts +2 -2
  67. package/dist/components/markdown-content/markdown-content.components.js +2 -2
  68. package/dist/components/media-card/media-card-reveal.js +2 -2
  69. package/dist/components/media-card/media-card.js +2 -2
  70. package/dist/components/monospace-content/index.d.ts +4 -4
  71. package/dist/components/monospace-content/monospace-content.js +9 -11
  72. package/dist/components/nav-bar/nav-bar-mobile-menu.js +3 -3
  73. package/dist/components/nav-bar/nav-bar.js +4 -4
  74. package/dist/components/notice-strip/notice-strip.js +1 -1
  75. package/dist/components/option-card-group/option-card-group.js +2 -2
  76. package/dist/components/overflow-badge-list/index.d.ts +2 -2
  77. package/dist/components/overflow-badge-list/overflow-badge-list.js +3 -3
  78. package/dist/components/page-banner/page-banner.js +1 -1
  79. package/dist/components/page-container/page-container.js +1 -1
  80. package/dist/components/pagination/pagination.js +1 -1
  81. package/dist/components/progress-bar/progress-bar.js +2 -2
  82. package/dist/components/qr-code/qr-code.js +2 -2
  83. package/dist/components/radio-group/radio-group.js +3 -3
  84. package/dist/components/range-field/range-field.js +9 -12
  85. package/dist/components/readout/readout.js +1 -1
  86. package/dist/components/requirement-list/requirement-list.js +5 -10
  87. package/dist/components/scrollable-sections/scrollable-sections.js +1 -1
  88. package/dist/components/search-field-shell.js +8 -8
  89. package/dist/components/selectable-card-list/selectable-card-list-shared.js +6 -6
  90. package/dist/components/showcase-card/showcase-card.js +2 -2
  91. package/dist/components/sidebar/sidebar.js +13 -15
  92. package/dist/components/simple-clickable-card/index.d.ts +4 -4
  93. package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +17 -23
  94. package/dist/components/simple-info-card/index.d.ts +3 -3
  95. package/dist/components/simple-list/index.d.ts +1 -1
  96. package/dist/components/simple-list/simple-list.js +8 -8
  97. package/dist/components/simple-paginated-list/simple-paginated-list.js +1 -4
  98. package/dist/components/stat-card/stat-card.js +7 -13
  99. package/dist/components/status-badge/index.d.ts +3 -3
  100. package/dist/components/status-badge/status-badge.js +4 -4
  101. package/dist/components/status-card-list/status-card-list.js +6 -6
  102. package/dist/components/tag/index.d.ts +1 -1
  103. package/dist/components/tag/tag.js +4 -4
  104. package/dist/components/tag-input/tag-input.js +12 -12
  105. package/dist/components/timeline/timeline.js +2 -2
  106. package/dist/components/toast/index.d.ts +1 -1
  107. package/dist/components/toast/toast.js +2 -2
  108. package/dist/components/toolbar/index.d.ts +5 -2
  109. package/dist/components/toolbar/toolbar-button.js +1 -1
  110. package/dist/components/toolbar/toolbar.js +9 -3
  111. package/dist/components/trace/trace.js +1 -1
  112. package/dist/components/transfer-list/transfer-list.js +2 -2
  113. package/dist/components/typography/index.d.ts +12 -3
  114. package/dist/components/typography/typography-variants.js +98 -13
  115. package/dist/components/typography/typography.js +4 -2
  116. package/dist/components/user-type-badge/user-type-badge.js +4 -4
  117. package/dist/components/vertical-stepper/vertical-stepper.js +11 -7
  118. package/dist/core/alert.js +3 -3
  119. package/dist/core/animate-ui/components/animate/code-header.js +1 -1
  120. package/dist/core/animate-ui/components/animate/code.js +1 -1
  121. package/dist/core/animate-ui/components/animate/tabs.js +6 -6
  122. package/dist/core/animate-ui/components/animate/tooltip.js +1 -1
  123. package/dist/core/animate-ui/components/base/progress.js +2 -2
  124. package/dist/core/animate-ui/components/radix/accordion.js +2 -2
  125. package/dist/core/animate-ui/components/radix/dialog.js +2 -2
  126. package/dist/core/animate-ui/components/radix/dropdown-menu.js +6 -6
  127. package/dist/core/animate-ui/components/radix/sheet.js +2 -2
  128. package/dist/core/animate-ui/components/radix/sidebar.js +8 -8
  129. package/dist/core/animate-ui/components/radix/toggle-group.js +4 -4
  130. package/dist/core/animate-ui/components/radix/toggle.js +1 -1
  131. package/dist/core/animate-ui/primitives/animate/tooltip.js +3 -0
  132. package/dist/core/badge.js +1 -1
  133. package/dist/core/breadcrumb.js +1 -1
  134. package/dist/core/button/button.js +2 -2
  135. package/dist/core/button/craft-button.js +4 -4
  136. package/dist/core/button-group.js +1 -1
  137. package/dist/core/button.js +2 -2
  138. package/dist/core/card.js +2 -2
  139. package/dist/core/combobox/combobox.js +3 -3
  140. package/dist/core/command.js +5 -5
  141. package/dist/core/field-label-row.js +4 -4
  142. package/dist/core/form.js +2 -2
  143. package/dist/core/index.d.ts +1 -1
  144. package/dist/core/input/input.js +11 -11
  145. package/dist/core/input-otp/input-otp.js +12 -12
  146. package/dist/core/label.js +1 -1
  147. package/dist/core/select.js +6 -6
  148. package/dist/core/separator.js +1 -1
  149. package/dist/core/table.js +2 -2
  150. package/dist/core/textarea/textarea.js +9 -9
  151. package/dist/{icon-avatar.props-RYtw2eSW.d.ts → icon-avatar.props-BJe0-vva.d.ts} +1 -1
  152. package/dist/{icon-text-action-card.props-B2ggncUK.d.ts → icon-text-action-card.props-BU7yFi2Q.d.ts} +2 -2
  153. package/dist/index.d.ts +9 -7
  154. package/dist/index.js +6 -2
  155. package/dist/layouts/entry-layout/entry-layout.js +1 -1
  156. package/dist/layouts/index.d.ts +21 -6
  157. package/dist/layouts/index.js +1 -1
  158. package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +10 -18
  159. package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +35 -7
  160. package/dist/layouts/workspace-layout/footer/footer.js +1 -1
  161. package/dist/markdown/index.d.ts +4 -4
  162. package/dist/{section-card-B7c5uc08.d.ts → section-card-DqQeQkzU.d.ts} +1 -1
  163. package/dist/{simple-clickable-card.props-BrPCw7CR.d.ts → simple-clickable-card.props-BhhotZMp.d.ts} +2 -2
  164. package/dist/{status-badge.props-lKlEOfRt.d.ts → status-badge.props-BVe8CmQZ.d.ts} +1 -1
  165. package/dist/styles/type-scale.js +153 -0
  166. package/dist/tailwind-preset.js +120 -1
  167. package/dist/toast/index.d.ts +1 -1
  168. package/dist/utils/cn.js +16 -5
  169. package/dist/utils/color.js +10 -1
  170. package/dist/utils/index.d.ts +37 -3
  171. package/dist/utils/index.js +2 -1
  172. package/dist/utils/variant.js +76 -76
  173. package/dist/{variant-D81RhpbR.d.ts → variant-DjdaxfIA.d.ts} +6 -1
  174. package/package.json +6 -2
  175. package/src/styles/colors.css +23 -2
  176. package/src/styles/theme.css +8 -3
  177. package/src/styles/type-scale.css +152 -0
  178. package/tailwind.preset.ts +23 -0
@@ -73,6 +73,7 @@ export function Example() {
73
73
 
74
74
  - Add the library's styles once in your Tailwind v4 entry CSS: `@import "@espressif/dashboard-ui-components/styles";`. That file already declares the `@source` for the compiled `dist/`, so no extra `content`/`@source` entry is needed.
75
75
  - Retheme by redeclaring the CSS custom properties (design tokens) **after** the `@import`, in both `:root` and `.dark` (or `[data-theme="dark"]`). Override `--font-sans` / `--font-mono` inside an `@theme` block.
76
+ - `primary`, `warning` and `disabled` have a text token, `--color-{primary,warning,disabled}-text`: variants draw text and icons in it, fills keep the base colour. When an app re-colours one of those three, it sets the matching `-text` token too (light and dark), at 4.5:1 on the page and on the colour's `/5` and `/10` tints. For text in those colours in app markup use `text-warning-text` (etc.), not `text-warning`, which is the fill colour. Solid `warning` and `disabled` surfaces (white text) fill with `--color-{warning,disabled}-solid`, a shade deeper than the base colour; retheme those with the base colour too.
76
77
  - Layout heights: use `--espd-shell-header-height`, `--espd-workspace-layout-footer-height` and
77
78
  `--espd-workspace-layout-hidden-footer-height`. The old names (`--espd-header-height`,
78
79
  `--espd-footer-height`, `--espd-hidden-footer-height`) are deprecated fallbacks: do not use them
@@ -91,6 +92,9 @@ export function Example() {
91
92
  `MinimalWorkspaceSidebarTrigger` (from `/layouts`, placed in `topRightContent`) opens it inline;
92
93
  a peek never reaches `onSidebarOpenChange`. Do not build an edge or trigger in the app. The edge
93
94
  strip and the peek shadow are `-edge-color`, `-edge-width` and `-sidebar-overlay-elevation`.
95
+ A page with a toolbar of its own passes `hideMobileTopBar`: the layout then draws no phone top
96
+ bar, and a `MinimalWorkspaceSidebarTrigger` in that toolbar is the phone's menu button (it
97
+ renders nothing on a phone otherwise). Do not build a phone menu button in the app.
94
98
  - The library ships **no fonts**; the app supplies its own typeface via `--font-sans`.
95
99
  - Pick `./theme.css` instead of `./styles` only when the app has its own `@import "tailwindcss"` (or legacy CSS a reset would break); then the app styles `body` itself.
96
100
  - Dark mode applies under `.dark` **or** `[data-theme="dark"]` on an ancestor; override dark tokens under the selector the app uses. The library has no `prefers-color-scheme` handling.
@@ -133,6 +137,36 @@ Things agents get wrong:
133
137
  and call `registerStyleValue(axis, name, css)` or `registerDensity(name, tokens)` once at
134
138
  start-up. Built-ins cannot be replaced.
135
139
 
140
+ ## Text sizes (type roles, 1.14)
141
+
142
+ - Library components size text by **role** (what the text is); the same role is
143
+ the same size in every component. Roles: `display`, `lead`, `title`,
144
+ `headline`, `heading`, `subheading`, `prose`, `body`, `secondary`, `caption`,
145
+ `label`, `input`, `code`. The table (phone and ≥768px values) is
146
+ `TYPE_SCALE` from `/utils`; do not copy pixel values from memory.
147
+ - In app markup use the role utility, `type-<role>` (`type-body`,
148
+ `type-caption`, …), or a `Typography` variant of the same name, not a raw
149
+ `text-sm` / `text-xs`. Pick by what the text is: running text `body`; a meta
150
+ line under a title `secondary`; timestamps, counts, hints, badges `caption`;
151
+ button, tab, menu text and form labels `label`; typed text `input`; a page's
152
+ heading `title`, a page section's `headline`, a card, panel or dialog title
153
+ `heading`, an alert title or list group label `subheading`; code `code` + `font-mono`.
154
+ - Not `text-body` / `text-secondary`: `text-secondary` and `text-input` are
155
+ colour utilities. Role classes are `type-*`.
156
+ - Change a role app-wide by setting `--espd-type-<role>-size` / `-line` /
157
+ `-weight` after the `@import`: on `:root`, and for roles that change from 768px
158
+ (`title`, `headline`, `prose`, `input`, `code`) also inside
159
+ `@media (width >= 48rem) { :root { … } }`. Do not add new `--espd-type-*`
160
+ names.
161
+ - `leading-*` and `font-*` beside a role win over its line height and weight.
162
+ Through `cn()`, a raw `text-lg` in `className` replaces a component's role.
163
+ - A component's `size` prop changes height, padding and icons, not its text
164
+ role (descriptions are the one exception: `secondary` at `size="sm"`).
165
+ - `Typography`'s earlier variants still work and follow the scale: `h1`/`h2` →
166
+ `title`, `h3` → `headline`, `h4`/`h5` → `heading`, `h6` → `subheading`,
167
+ `body1` → `prose`, `body2` → `body`, `subtitle1` → `label`, `subtitle2` →
168
+ `caption`.
169
+
136
170
  ## Buttons
137
171
 
138
172
  - Use the styled `Button` from `/components` (or `/components/button`). `/core` has an uncoloured base `Button` with the same name: not for apps.
@@ -288,6 +322,14 @@ Things agents get wrong about it:
288
322
  - `AnchoredPanel` is non-modal and positioned by a zero-size anchor element the app keeps at
289
323
  the point (`anchorRef`); pass `keepOpenFor` for the control that toggles it, or that
290
324
  control's own click closes and reopens it.
325
+ - `BottomSheet` is non-modal and has no `open` prop: render it to open it, stop rendering it in
326
+ `onClose`. It keeps its own height (half or tall). `labels` (`expand`, `collapse`, `close`)
327
+ are required and not translated. It is `fixed` to the viewport; inside a framed preview pass
328
+ `className="absolute"` and give the frame `relative overflow-hidden`. Use `Sheet` when the
329
+ page behind must not be used.
330
+ - `GradientRingButton` is the styled `Button` without `variant` / `color`, and `fullWidth`
331
+ defaults to `false`. Do not add hover or focus rings through `className`: the turning ring is
332
+ the indicator. Wrap another pill-shaped control in `GradientRing` instead of copying the ring.
291
333
  - `Trace` lists an agent's steps; it holds nothing itself. Put each step in a `TraceLine`
292
334
  (status `running` / `error` / `pending`, unset = done) and say the status in the title as
293
335
  well ("Build failed"): colour and shimmer alone do not reach everyone. A line that opens is
@@ -67,9 +67,10 @@ export function Example() {
67
67
 
68
68
  - Add the library's styles once in your Tailwind v4 entry CSS: `@import "@espressif/dashboard-ui-components/styles";`. It already declares the `@source` for `dist/`.
69
69
  - Retheme by redeclaring the CSS custom properties (design tokens) **after** the `@import`, in both `:root` and `.dark` (or `[data-theme="dark"]`). Override `--font-sans` / `--font-mono` inside an `@theme` block.
70
+ - `primary`, `warning` and `disabled` have a text token, `--color-{primary,warning,disabled}-text`: variants draw text and icons in it, fills keep the base colour. When an app re-colours one of those three, it sets the matching `-text` token too (light and dark), at 4.5:1 on the page and on the colour's `/5` and `/10` tints. For text in those colours in app markup use `text-warning-text` (etc.), not `text-warning`, which is the fill colour. Solid `warning` and `disabled` surfaces (white text) fill with `--color-{warning,disabled}-solid`, a shade deeper than the base colour; retheme those with the base colour too.
70
71
  - Pick `./theme.css` instead of `./styles` only when the app has its own `@import "tailwindcss"` (or legacy CSS a reset would break); then the app styles `body` itself.
71
72
  - Dark mode applies under `.dark` **or** `[data-theme="dark"]` on an ancestor; override dark tokens under the selector the app uses. The library has no `prefers-color-scheme` handling.
72
- - `MinimalWorkspaceLayout` (from `/layouts`) is the header-less alternative to `WorkspaceLayout` with the same props: switch by renaming the component. It has no header bar or status footer (`footerConfig`, `hideBreadcrumbs`, `sidebarConfig.allowCollapsible` / `variant` do not exist on it), starts collapsed (`defaultSidebarOpen` defaults to `false`), and puts `topRightContent` (fallback `headerConfig.rightContent`) over the content. Theme it with the `--espd-minimal-workspace-layout-*` tokens, not `className` overrides on its parts: the sidebar surface defaults to the page background (`-sidebar-background`, `-sidebar-background-expanded`), and its border, shadow and row accent are derived from that surface unless `-sidebar-border-color`, `-sidebar-elevation` or `-sidebar-accent` are set. Keep `-sidebar-width-collapsed` within 48–56px. With `sidebarConfig.hideWhenCollapsed` the collapsed sidebar is hidden instead of a rail: a click on the content's left edge peeks it over the content until the pointer leaves it, and `MinimalWorkspaceSidebarTrigger` (from `/layouts`, placed in `topRightContent`) opens it inline; a peek never reaches `onSidebarOpenChange`. Do not build an edge or trigger in the app. The edge strip and the peek shadow are `-edge-color`, `-edge-width` and `-sidebar-overlay-elevation`.
73
+ - `MinimalWorkspaceLayout` (from `/layouts`) is the header-less alternative to `WorkspaceLayout` with the same props: switch by renaming the component. It has no header bar or status footer (`footerConfig`, `hideBreadcrumbs`, `sidebarConfig.allowCollapsible` / `variant` do not exist on it), starts collapsed (`defaultSidebarOpen` defaults to `false`), and puts `topRightContent` (fallback `headerConfig.rightContent`) over the content. Theme it with the `--espd-minimal-workspace-layout-*` tokens, not `className` overrides on its parts: the sidebar surface defaults to the page background (`-sidebar-background`, `-sidebar-background-expanded`), and its border, shadow and row accent are derived from that surface unless `-sidebar-border-color`, `-sidebar-elevation` or `-sidebar-accent` are set. Keep `-sidebar-width-collapsed` within 48–56px. With `sidebarConfig.hideWhenCollapsed` the collapsed sidebar is hidden instead of a rail: a click on the content's left edge peeks it over the content until the pointer leaves it, and `MinimalWorkspaceSidebarTrigger` (from `/layouts`, placed in `topRightContent`) opens it inline; a peek never reaches `onSidebarOpenChange`. Do not build an edge or trigger in the app. The edge strip and the peek shadow are `-edge-color`, `-edge-width` and `-sidebar-overlay-elevation`. A page with a toolbar of its own passes `hideMobileTopBar`: the layout then draws no phone top bar, and a `MinimalWorkspaceSidebarTrigger` in that toolbar is the phone's menu button (it renders nothing on a phone otherwise). Do not build a phone menu button in the app.
73
74
  - Beyond colour, retheme with the semantic tokens on `:root` (and the style-axis role tokens, next section): `--espd-control-height-sm|md|lg`, `--espd-button-padding-x-sm|md|lg`, `--espd-duration-fast|normal|slow`, `--espd-ring-width`, `--espd-ring-offset`, `--espd-on-solid-foreground` (plus Tailwind's `--radius-*`, `--shadow-*`, `--spacing`). Do not add new token names in app CSS.
74
75
  - New variants (e.g. `glow`) are registered, not forked: augment `interface VariantRegistry` in `declare module '@espressif/dashboard-ui-components/components'` (in a file that imports that entry) and call `registerVariant('glow', (color) => ({ container, foreground, description }))` once at start-up. Built-in variants cannot be replaced.
75
76
 
@@ -118,6 +119,36 @@ Things agents get wrong:
118
119
  and call `registerStyleValue(axis, name, css)` or `registerDensity(name, tokens)` once at
119
120
  start-up. Built-ins cannot be replaced.
120
121
 
122
+ ## Text sizes (type roles, 1.14)
123
+
124
+ - Library components size text by **role** (what the text is); the same role is
125
+ the same size in every component. Roles: `display`, `lead`, `title`,
126
+ `headline`, `heading`, `subheading`, `prose`, `body`, `secondary`, `caption`,
127
+ `label`, `input`, `code`. The table (phone and ≥768px values) is
128
+ `TYPE_SCALE` from `/utils`; do not copy pixel values from memory.
129
+ - In app markup use the role utility, `type-<role>` (`type-body`,
130
+ `type-caption`, …), or a `Typography` variant of the same name, not a raw
131
+ `text-sm` / `text-xs`. Pick by what the text is: running text `body`; a meta
132
+ line under a title `secondary`; timestamps, counts, hints, badges `caption`;
133
+ button, tab, menu text and form labels `label`; typed text `input`; a page's
134
+ heading `title`, a page section's `headline`, a card, panel or dialog title
135
+ `heading`, an alert title or list group label `subheading`; code `code` + `font-mono`.
136
+ - Not `text-body` / `text-secondary`: `text-secondary` and `text-input` are
137
+ colour utilities. Role classes are `type-*`.
138
+ - Change a role app-wide by setting `--espd-type-<role>-size` / `-line` /
139
+ `-weight` after the `@import`: on `:root`, and for roles that change from 768px
140
+ (`title`, `headline`, `prose`, `input`, `code`) also inside
141
+ `@media (width >= 48rem) { :root { … } }`. Do not add new `--espd-type-*`
142
+ names.
143
+ - `leading-*` and `font-*` beside a role win over its line height and weight.
144
+ Through `cn()`, a raw `text-lg` in `className` replaces a component's role.
145
+ - A component's `size` prop changes height, padding and icons, not its text
146
+ role (descriptions are the one exception: `secondary` at `size="sm"`).
147
+ - `Typography`'s earlier variants still work and follow the scale: `h1`/`h2` →
148
+ `title`, `h3` → `headline`, `h4`/`h5` → `heading`, `h6` → `subheading`,
149
+ `body1` → `prose`, `body2` → `body`, `subtitle1` → `label`, `subtitle2` →
150
+ `caption`.
151
+
121
152
  ## Buttons
122
153
 
123
154
  - Use the styled `Button` from `/components` (or `/components/button`). `/core` has an uncoloured base `Button` with the same name: not for apps.
@@ -273,6 +304,14 @@ Things agents get wrong about it:
273
304
  - `AnchoredPanel` is non-modal and positioned by a zero-size anchor element the app keeps at
274
305
  the point (`anchorRef`); pass `keepOpenFor` for the control that toggles it, or that
275
306
  control's own click closes and reopens it.
307
+ - `BottomSheet` is non-modal and has no `open` prop: render it to open it, stop rendering it in
308
+ `onClose`. It keeps its own height (half or tall). `labels` (`expand`, `collapse`, `close`)
309
+ are required and not translated. It is `fixed` to the viewport; inside a framed preview pass
310
+ `className="absolute"` and give the frame `relative overflow-hidden`. Use `Sheet` when the
311
+ page behind must not be used.
312
+ - `GradientRingButton` is the styled `Button` without `variant` / `color`, and `fullWidth`
313
+ defaults to `false`. Do not add hover or focus rings through `className`: the turning ring is
314
+ the indicator. Wrap another pill-shaped control in `GradientRing` instead of copying the ring.
276
315
  - `Trace` lists an agent's steps; it holds nothing itself. Put each step in a `TraceLine`
277
316
  (status `running` / `error` / `pending`, unset = done) and say the status in the title as
278
317
  well ("Build failed"): colour and shimmer alone do not reach everyone. A line that opens is
package/CHANGELOG.md CHANGED
@@ -4,6 +4,278 @@ All notable changes to this project are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres
5
5
  to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [1.14.1] - 2026-11-26
8
+
9
+ ### Added
10
+ - **Text tokens for colours too light to read as text:** `--color-primary-text`,
11
+ `--color-warning-text` and `--color-disabled-text`, with their `text-*-text`
12
+ utilities. They keep the colour's hue and only darken it (lighten in dark mode)
13
+ until text in it reaches WCAG AA's 4.5:1 on the page, a card and the colour's
14
+ own tints. In dark mode `primary` and `warning` already pass, so their text
15
+ tokens follow the base colour.
16
+ - **Solid fill tokens:** `--color-warning-solid` and `--color-disabled-solid`, the
17
+ fill under white text on a solid surface (see Changed), and a `"solid"` target
18
+ for `resolveColor`, which returns that fill (`"bg"` stays the colour itself).
19
+
20
+ ### Changed
21
+ - **Text in `primary`, `warning` and `disabled` is darker in the light theme**, in
22
+ every `soft`, `outline`, `gradient` and `glow` variant (Alert, Badge, Tag, Toast,
23
+ cards and anything else that takes `color` and `variant`). Fills, borders,
24
+ rings and glows keep their colours. Worst contrast before → after:
25
+
26
+ | Text | Light value | Before | After |
27
+ |------|-------------|--------|-------|
28
+ | `primary` | `#0071e3` → `#0065d6` | 4.0:1 | 4.7:1 |
29
+ | `warning` | `#c0993c` → `#8d6700` | 2.4:1 | 4.6:1 |
30
+ | `disabled` | `#9e9e9e` → `#6d6d6d` | 2.4:1 | 4.6:1 |
31
+ | `disabled` (dark) | `#616161` → `#7b7b7b` | 3.2:1 | 4.6:1 |
32
+
33
+ - **Solid `warning` and `disabled` fills are a shade deeper in the light theme**,
34
+ so their white text reads: `#956f00` (was `#c0993c`) and `#757575` (was
35
+ `#9e9e9e`), 4.6:1 (was 2.7:1). This shows wherever a solid warning or disabled
36
+ surface carries text or an icon: the `solid` variant (Badge, Alert's icon
37
+ circle, Tag, Toast), Button, CraftButton, FlashButton, ToggleGroup's selected
38
+ item, Avatar and HorizontalStepper. Tints, borders, progress bars, timeline
39
+ dots and charts keep the base colour. Dark mode is unchanged.
40
+ - **`--color-mist-secondary` is `#5a616f`** (was `#6B7280`) in the light theme,
41
+ so `mist` descriptions reach 4.5:1 (were 3.6:1) on the mist fill and border.
42
+ - An app that re-colours `primary`, `warning` or `disabled` should set the
43
+ matching `-text` (and, for warning and disabled, `-solid`) token too. To keep
44
+ the 1.14.0 look, set those tokens back to the base colour.
45
+ - Components that use `text-primary`, `text-warning` or `text-disabled` directly
46
+ (outside the variants) are not changed yet; that follows in a later release.
47
+
48
+ ### Fixed
49
+ - **Tooltips** no longer leave a timer running after their provider unmounts.
50
+ A tooltip that was opening or closing at that moment updated the state of an
51
+ unmounted component; in a test run the timer fired after the DOM environment
52
+ had been torn down and failed the run with `window is not defined`.
53
+ - **BottomSheet**: after a touch drag, the first tap on ✕ (or on the handle) no
54
+ longer gets swallowed. The sheet now swallows only the click a drag ends in,
55
+ which a mouse fires and a touch swipe does not.
56
+
57
+ ## [1.14.0] - 2026-11-22
58
+
59
+ **Text sizes now come from roles, and the defaults change some sizes.** Nothing
60
+ is removed or renamed, so existing code keeps working and typechecks. But
61
+ library components look different on upgrade: that is the point of this
62
+ release. Your own page text, sized with your own raw `text-*` classes, does not
63
+ move. Stay on 1.13.x until you are ready.
64
+
65
+ ### Added
66
+ - **The type scale.** A role is what a piece of text is, and the same role is
67
+ the same size in every component. There are 13 roles. Each has a phone value
68
+ and, for five of them, a value from 768px up:
69
+
70
+ | Role | Used for | Phone (px, size / line) | From 768px | Weight |
71
+ |---|---|---|---|---|
72
+ | `display` | Marketing headline | fluid 40→88 / 1.04 | same | 800 |
73
+ | `lead` | The paragraph under a display headline | fluid 17→21 / 1.6 | same | 400 |
74
+ | `title` | A page's heading | 22 / 28 | 26 / 32 | 700 |
75
+ | `headline` | A section of a page | 18 / 24 | 20 / 28 | 600 |
76
+ | `heading` | A card, panel or dialog title | 16 / 22 | same | 600 |
77
+ | `subheading` | An alert's or list group's title | 14 / 20 | same | 600 |
78
+ | `prose` | Long reading text | 16 / 24 | 16 / 26 | 400 |
79
+ | `body` | Running text in an interface | 14 / 21 | same | 400 |
80
+ | `secondary` | A supporting line, card meta | 13 / 18 | same | 400 |
81
+ | `caption` | Timestamps, counts, hints, badges | 12 / 16 | same | 400 |
82
+ | `label` | Form labels, tab, menu and button text | 14 / 20 | same | 500 |
83
+ | `input` | What a person types, and its placeholder | 16 / 24 | 14 / 20 | 400 |
84
+ | `code` | Code, logs, file paths (with `font-mono`) | 12 / 18 | 13 / 20 | 400 |
85
+
86
+ - **Tokens** `--espd-type-<role>-size`, `-line` and `-weight` (in the new
87
+ `type-scale.css`, which `theme.css` imports), and **utilities**
88
+ `type-<role>` (`type-body`, `type-caption`, …) for your own markup. A
89
+ `leading-*` or `font-*` class next to a role wins over its line height or
90
+ weight, in any class order. Through `cn()`, a raw `text-lg` replaces a role,
91
+ and a role replaces a raw size.
92
+ - **`Typography` variants for each role** (all but `input`): `display`, `lead`,
93
+ `title`, `headline`, `heading`, `subheading`, `prose`, `body`, `secondary`,
94
+ `caption`, `label`, `code`.
95
+ - **`/utils` exports the table:** `TYPE_ROLES`, `TYPE_SCALE`, `TYPE_SCALE_MD`,
96
+ and the types `TypeRole`, `TypeRoleSpec` and `TypeRoleValue`.
97
+ - **The Tailwind preset** adds the same tokens and utilities, so an app that
98
+ uses only `tailwind-preset` gets the roles too.
99
+ - **A "Type scale" demo page.**
100
+ - **`MinimalWorkspaceLayout` `hideMobileTopBar`**: on a phone the layout draws
101
+ a 48px top bar (menu button, logo, `topRightContent`). A page with a toolbar
102
+ of its own, such as an editor, showed two bars stacked. With
103
+ `hideMobileTopBar` the layout draws no top bar on a phone, and a
104
+ `MinimalWorkspaceSidebarTrigger` in the page's toolbar becomes the menu
105
+ button there (menu icon, `labels.openMenu`, opens the menu sheet).
106
+ `topRightContent` floats over the content, as on desktop. Off by default:
107
+ nothing changes unless you set it. On desktop the trigger works as before.
108
+ - Demo: a "Page toolbar on a phone" example for `MinimalWorkspaceLayout`.
109
+ - **`BottomSheet`:** a phone panel from the bottom edge, at half the screen so
110
+ the page above stays in view and responds. Drag its grip up to nearly full
111
+ height, back to half, or down to close; tap the handle to switch heights;
112
+ Escape or ✕ closes it. Unlike `Sheet`, it is not modal. Its `labels`
113
+ (`expand`, `collapse`, `close`) are required, with no English defaults. Its
114
+ top corners follow `--espd-radius-surface`. Exports `settleSheet` (the rule a
115
+ released sheet settles by) and the `SheetRest` type.
116
+ - **`GradientRingButton` and `GradientRing`:** a clear pill button with a 2px
117
+ ring in the theme's gradient (`--color-gradient-start` → `middle` → `end`)
118
+ that turns while the button is pointed at or keyboard-focused, and settles
119
+ back when let go. Optionally it turns once as it appears (`cue`, read on
120
+ mount). Disabled, it fades and holds still. Under reduced motion it only
121
+ brightens, and keyboard focus gets the usual outline. `fullWidth` defaults
122
+ to `false`, unlike `Button`. `GradientRing` puts the same ring around any
123
+ pill-shaped control (an `InvertButton`, a link drawn as a pill).
124
+ - Demo: `BottomSheet` (Overlays) and `GradientRingButton` (Buttons) pages.
125
+
126
+ ### Changed
127
+ - **`Typography`'s earlier variants now alias roles** and follow the scale:
128
+
129
+ | Variant | Before (px) | Now | What moves |
130
+ |---|---|---|---|
131
+ | `h1` | 30 / 36, 700 | `title` | 22 on a phone, 26 from 768px |
132
+ | `h2` | 24 / 32, 700 | `title` | 22 on a phone, 26 from 768px |
133
+ | `h3` | 20 / 28, 600 | `headline` | 18 / 24 on a phone; unchanged from 768px |
134
+ | `h4` | 18 / 28, 600 | `heading` | 16 / 22 |
135
+ | `h5` | 16 / 24, 600 | `heading` | line 24 → 22 |
136
+ | `h6` | 14 / 20, 600 | `subheading` | nothing |
137
+ | `body1` (default) | 16 / 26 | `prose` | line 26 → 24 on a phone |
138
+ | `body2` | 14 / 21 | `body` | nothing |
139
+ | `subtitle1` | 14 / 20, 500, muted | `label` | nothing |
140
+ | `subtitle2` | 12 / 16, 500, muted | `caption` | nothing |
141
+
142
+ When a raw size in `className` overrides a variant (`<Typography variant="h6"
143
+ className="text-xs">`), the variant's weight is kept, as before.
144
+ - **Every component's text is on a role.** `node_modules/@espressif/dashboard-ui-components`
145
+ ships no raw `text-xs`…`text-9xl` except graphic sizes: avatar initials,
146
+ `RankNumeral`, and the big values of `StatCard` and `CategoryCard`.
147
+ `EntryLayout`'s hero also keeps its own size.
148
+ - **A `size` prop no longer changes text size.** `sm`, `md` and `lg` change
149
+ height, padding, gaps and icons. The text keeps its role at every size.
150
+ The one exception: descriptions are `secondary` (13px) at `size="sm"` and
151
+ `body` (14px) otherwise.
152
+ - **What moves, by component** (default size, px; phone / from 768px where they
153
+ differ). The full list, one row per class, is in
154
+ `docs/plans/2026-11-22-type-scale-inventory__done.md` in the repository, and
155
+ before/after screenshots of eight demo pages (Typography, Alert, Input,
156
+ Button, Card, Dialog, Badge, List) at 360px and 1280px are in
157
+ `docs/plans/type-scale-screenshots/`.
158
+ - **Inputs:**
159
+ - `Input`, `Textarea`, `Select` trigger, `Combobox`, `InputOTP`, `TagInput`,
160
+ `AsyncMultiSelect`, `FileInput`, search boxes, `Command` input: typed text
161
+ is `input` at every size: 16 on a phone, 14 from 768px. `sm` fields grow
162
+ from 12 to 16 / 14, so iOS no longer zooms the page when one is focused.
163
+ `lg` fields drop from 18 to 16 / 14.
164
+ - `CodeEditor`: 16 / 13 → 16 / 14.
165
+ - Field labels are `label` (14, 500). Hints, descriptions and errors are
166
+ `caption` (14 → 12).
167
+ - `RadioGroup` option labels 16 → 14. `RangeField` label 12 → 14.
168
+ - **Menus and navigation:**
169
+ - `SelectItem`, `DropdownMenu` items, `Command` items, breadcrumb links,
170
+ inactive `Sidebar` rows, and `Combobox`'s "Load more": 14, weight 400 → 500
171
+ (`label`).
172
+ - `DropdownMenu` labels 500 → 600 (`subheading`).
173
+ - Stepper labels at `sm`: 11 / 12 → 14. `HorizontalStepper` labels at the
174
+ default size: 12 → 14.
175
+ - `Accordion` content is `body` (`lg` content 18 → 14), and its title is
176
+ `heading`.
177
+ - The sidebar font-size tokens stay and default to the `label` size (14,
178
+ unchanged).
179
+ - **Buttons, tabs and toggles:** `label` at every size. `sm` grows from 12 to
180
+ 14; `lg` tabs drop from 16 to 14.
181
+ - **Overlays:**
182
+ - `Dialog` titles 18 → 16 (`heading`, like a card's title). `Sheet` titles,
183
+ which had no size of their own, are `heading` (16).
184
+ - `Toast` title is `subheading` with its own medium weight (14, unchanged).
185
+ - `FullscreenDialog` heading 24 → 22 / 26 (`title`).
186
+ - `Tooltip` text is `caption`.
187
+ - **Cards and alerts:**
188
+ - Card titles are `heading` (16). `SectionCard`, `SelectableCardList`,
189
+ `StatusCardList`, `ChoiceCard`, `FeatureGrid` and `BasicDetailsCard` titles
190
+ go 14 → 16. `SimpleCard` title 24 → 16. `NoDataCard` heading 18 → 16.
191
+ `StatCard` heading 20 → 16.
192
+ - `Alert`, `IconTextActionCard`, `SimpleClickableCard` and `SimpleInfoCard`
193
+ titles are `subheading` (14). `Alert`'s title at its default size, `sm`,
194
+ goes 12 → 14.
195
+ - Meta lines are `secondary` (14 → 13).
196
+ - `AnimatedCard` text 16 → 14.
197
+ - **Badges:** `Badge`, `StatusBadge`, `Tag`, `UserTypeBadge` and the
198
+ `OverflowBadgeList` count are `caption` (12) at every size. `Tag` and
199
+ `UserTypeBadge` go 14 → 12 at their default size, 16 → 12 at `lg`.
200
+ - **Lists and data:**
201
+ - List rows are `body` (14) at every size; `lg` goes 16 → 14.
202
+ - `DynamicList` and `SimpleList` keys are `label`.
203
+ - Table headers are `label`; cells are `body`.
204
+ - Chart legends 14 → 12 (`caption`).
205
+ - `MarkdownContent` list items match its paragraphs (`prose`). Its inline
206
+ code goes 14 → 12 / 13 (`code`).
207
+ - `MonospaceContent` values are `code`.
208
+ - **Pages:**
209
+ - `PageContainer` title 24 → 22 / 26 (`title`).
210
+ - `FullSizeError` title 18 → 18 / 20 (`headline`).
211
+ - `NoticeStrip` description 12 → 14.
212
+ - `Bubble` 16 → 14 (13 at `sm`).
213
+ - Account menu and profile card emails 12 → 13 (`secondary`).
214
+ - The workspace footer 10 → 12 (`caption`).
215
+ - **Descriptions** in `Alert`, `IconTextActionCard`, `SimpleClickableCard` and
216
+ `SimpleInfoCard` are regular weight when they stand alone and medium under a
217
+ title. They also **draw at the full strength of their colour** in every
218
+ variant. `gradient` drew them at 60%, and `soft`, `outline`, `glow` and
219
+ `solid` at 80%. That put them under WCAG AA's 4.5:1 for body text on 36 of the
220
+ 100 colour, variant and theme pairs: an info `gradient` alert's description
221
+ measured 2.8:1 in light mode, and 4.1:1 at full strength. The change reaches
222
+ `Toast` and `SectionCard` descriptions too.
223
+ Some pairs still miss 4.5:1, because the colour itself is too light for text
224
+ there:
225
+ - light mode: `warning`, `disabled`, and `mist`'s secondary text;
226
+ - dark mode: `disabled`;
227
+ - `primary` on the `soft`, `gradient` and `glow` tints.
228
+ Those need token changes and are left for a later release.
229
+
230
+ ### Changing a role, or keeping today's look
231
+ - **Change a role app-wide** by setting its tokens after the library's
232
+ `@import`: on `:root`, and for a role whose value changes from 768px (`title`,
233
+ `headline`, `prose`, `input`, `code`), inside the same media query too:
234
+
235
+ ```css
236
+ :root {
237
+ --espd-type-body-size: 0.9375rem;
238
+ --espd-type-body-line: 1.375rem;
239
+ }
240
+ @media (width >= 48rem) {
241
+ :root { --espd-type-title-size: 1.75rem; }
242
+ }
243
+ ```
244
+
245
+ - **Undo the larger moves while you migrate:** a role sets every component on
246
+ it, so tokens cannot bring back each component's 1.13 size one by one. These
247
+ settings undo most of the visible moves:
248
+ - `--espd-type-label-weight: 400` puts menu items, breadcrumbs and sidebar
249
+ rows back at their old weight. It also lightens buttons, tabs and form
250
+ labels.
251
+ - `--espd-type-caption-size: 0.875rem` and `--espd-type-caption-line:
252
+ 1.25rem` put badges, tags, hints and form messages back at 14px.
253
+ - `--espd-type-input-size: 0.875rem` on `:root` (no media query) keeps fields
254
+ at 14px on phones, but iOS then zooms the page when a field is focused.
255
+ - `--espd-type-title-size: 1.5rem` and `--espd-type-title-line: 2rem`, in
256
+ both places, bring page titles, `h1` and `h2` close to the old `h2`.
257
+
258
+ To keep every size exactly, stay on 1.13.x.
259
+
260
+ ### Fixed
261
+ - **`PageLoader`** keeps its bar 1.5rem off the screen's edges. On a phone
262
+ narrower than 24rem the bar ran from edge to edge. Wider screens look as
263
+ before.
264
+ - **`Toolbar`** without a `center` no longer caps the start slot at half the
265
+ bar. The start and end split the width so a centre stays centred; with no
266
+ centre the end now takes only its controls' width and the start the rest.
267
+ On a 360px phone a title at the start (menu, Back, a product name) had
268
+ 96px and truncated while the end sat mostly empty. With a `center` the
269
+ split is as before. The slots carry `data-slot` (`toolbar-start`,
270
+ `toolbar-center`, `toolbar-end`).
271
+ - **`NavBar`** sets its own text colour (`text-foreground`), so a theme scope
272
+ from `topClassName` (such as `"dark border-transparent"` over a dark hero)
273
+ reaches what inherits it. The phone's menu button stayed near-black on the
274
+ dark bar: `dark` swapped the tokens on the bar, but the button kept the
275
+ colour inherited from the page above it. A text colour the app passes in
276
+ `className` or `topClassName` still wins. Apps that added `text-foreground`
277
+ to `topClassName` as a workaround can drop it.
278
+
7
279
  ## [1.13.0] - 2026-11-19
8
280
 
9
281
  New components and fixes. Nothing is removed or renamed, so existing code keeps
package/README.md CHANGED
@@ -193,10 +193,14 @@ Use Tailwind v4's `@theme` block to declare a new token. Tailwind will generate
193
193
 
194
194
  All tokens live in the library's [`src/styles/colors.css`](./src/styles/colors.css) and [`src/styles/globals.css`](./src/styles/globals.css). Grouped for reference:
195
195
 
196
- **Brand colours** — `--color-primary` + `-light` / `-dark` / `-foreground`, `--color-secondary` + `-foreground` / `-container` / `-container-foreground`, `--color-tertiary` (same shape as secondary)
196
+ **Brand colours** — `--color-primary` + `-light` / `-dark` / `-foreground` / `-text`, `--color-secondary` + `-foreground` / `-container` / `-container-foreground`, `--color-tertiary` (same shape as secondary)
197
197
 
198
198
  **Status colours** — `--color-error`, `--color-warning`, `--color-success`, `--color-info` (each with `-light` / `-dark` / `-foreground`), plus `--color-destructive` + `-foreground`, `--color-disabled` + `-foreground`
199
199
 
200
+ **Text in a colour** — `--color-primary-text`, `--color-warning-text`, `--color-disabled-text`: the colour as text on the page and on that colour's own tints, where the fill colour itself is too light to read (WCAG AA, 4.5:1). Variants (`soft`, `outline`, `gradient`, `glow`) draw their text and icons with them; fills, borders and glows keep the base colour. In dark mode the first two follow the base colour. When you retheme `--color-primary`, `--color-warning` or `--color-disabled`, set the matching `-text` token too, light and dark.
201
+
202
+ **Solid fills that carry text** — `--color-warning-solid` and `--color-disabled-solid`: the fill under white text on a solid `warning` or `disabled` surface (the `solid` variant, Button, Avatar, ToggleGroup, a solid IconAvatar). The base amber and grey are too light for white text (2.7:1), so these are a shade deeper (4.6:1). Tints, borders, progress bars and charts keep the base colour; `resolveColor(color, "solid")` returns this fill, `"bg"` the colour itself. In dark mode they follow the base colour and its dark ink.
203
+
200
204
  **Surface / neutral colours** — `--color-background`, `--color-foreground` (+ `-secondary`, `-muted`, `-disabled`), `--color-card`, `--color-popover`, `--color-muted`, `--color-accent` (each with `-foreground`), `--color-surface` (+ `-foreground`, `-variant`, `-variant-foreground`, `-container-lowest`, `-container-low`, `-container`, `-container-high`, `-container-highest`), `--color-border`, `--color-input`, `--color-ring`
201
205
 
202
206
  **Sidebar** — `--color-sidebar`, `-foreground`, `-primary`, `-primary-foreground`, `-accent`, `-accent-foreground`, `-border`, `-ring`
@@ -210,7 +214,7 @@ All tokens live in the library's [`src/styles/colors.css`](./src/styles/colors.c
210
214
 
211
215
  The 1.x names `--espd-header-height`, `--espd-footer-height` and `--espd-hidden-footer-height` still work as fallbacks and are removed in 2.0 (see the CHANGELOG).
212
216
 
213
- **Typography and radius** — `--font-sans` and `--font-mono` (whole font stacks; override in `@theme` to replace; `--font-mono` is what code, logs and `MonospaceContent` use), `--radius-lg` (drives `-md` and `-sm`)
217
+ **Typography and radius** — `--font-sans` and `--font-mono` (whole font stacks; override in `@theme` to replace; `--font-mono` is what code, logs and `MonospaceContent` use), `--radius-lg` (drives `-md` and `-sm`). Text **sizes** are the type-scale role tokens `--espd-type-<role>-size|line|weight`: see [Type scale (text sizes)](#type-scale-text-sizes).
214
218
 
215
219
  **Density, motion, focus and on-colour text** — set on `:root`; defaults reproduce the previous look exactly (details in [docs/token-audit.md](./docs/token-audit.md)):
216
220
  `--espd-control-height-sm|md|lg` (buttons, inputs, selects, toggles), `--espd-button-padding-x-sm|md|lg`, `--espd-duration-fast|normal|slow`, `--espd-ring-width`, `--espd-ring-offset`, `--espd-on-solid-foreground`, `--espd-table-head-height`, `--espd-table-cell-padding`, `--espd-sidebar-row-height` (+ `-sm`), `--espd-item-height` (List rows; falls back to `--menu-item-height`), `--espd-gap-field` (FormItem), `--espd-gap-stack` (DialogContent)
@@ -357,6 +361,50 @@ registerDensity('kiosk', { '--espd-control-height-lg': '3.5rem', '--espd-item-he
357
361
 
358
362
  `listStyleValues(axis)` returns the built-ins plus registered values; built-ins cannot be replaced.
359
363
 
364
+ ### Type scale (text sizes)
365
+
366
+ Since 1.14 every component sizes its text by **role**, what the text is, and the same role is the same size everywhere. Each role has a phone value and, for some, a value from 768px up:
367
+
368
+ | Role | Used for | Phone (px, size / line) | From 768px | Weight |
369
+ |---|---|---|---|---|
370
+ | `display` | Marketing headline | fluid 40→88 / 1.04 | same | 800 |
371
+ | `lead` | The paragraph under a display headline | fluid 17→21 / 1.6 | same | 400 |
372
+ | `title` | A page's heading | 22 / 28 | 26 / 32 | 700 |
373
+ | `headline` | A section of a page | 18 / 24 | 20 / 28 | 600 |
374
+ | `heading` | A card, panel or dialog title | 16 / 22 | same | 600 |
375
+ | `subheading` | A smaller title (an alert's, a list group's) | 14 / 20 | same | 600 |
376
+ | `prose` | Long reading text | 16 / 24 | 16 / 26 | 400 |
377
+ | `body` | Running text in an interface | 14 / 21 | same | 400 |
378
+ | `secondary` | A supporting line under a title, card meta | 13 / 18 | same | 400 |
379
+ | `caption` | Timestamps, counts, hints, badges | 12 / 16 | same | 400 |
380
+ | `label` | Form labels, tab, menu and button text | 14 / 20 | same | 500 |
381
+ | `input` | What a person types, and its placeholder | 16 / 24 | 14 / 20 | 400 |
382
+ | `code` | Code, logs, file paths (with `font-mono`) | 12 / 18 | 13 / 20 | 400 |
383
+
384
+ Use a role in your own markup with its utility, `type-<role>`, or a `Typography` variant of the same name:
385
+
386
+ ```tsx
387
+ <p className="type-body">The update finished.</p>
388
+ <span className="type-caption text-muted-foreground">Updated 2 min ago</span>
389
+ <Typography variant="heading">Firmware</Typography>
390
+ ```
391
+
392
+ `leading-*` and `font-*` still win over a role's line height and weight, in any class order. Through `cn()`, a raw `text-lg` replaces a role and a role replaces a raw size. `Typography`'s earlier variants still work and follow the scale: `h1`/`h2` → `title`, `h3` → `headline`, `h4`/`h5` → `heading`, `h6` → `subheading`, `body1` → `prose`, `body2` → `body`, `subtitle1` → `label`, `subtitle2` → `caption`. The role table is exported from `/utils` (`TYPE_ROLES`, `TYPE_SCALE`).
393
+
394
+ **Change a role** by setting its tokens after the library's `@import`: on `:root`, and for a role that changes from 768px, in the same media query too:
395
+
396
+ ```css
397
+ :root {
398
+ --espd-type-body-size: 0.9375rem; /* 15px running text */
399
+ --espd-type-body-line: 1.375rem;
400
+ }
401
+ @media (width >= 48rem) {
402
+ :root { --espd-type-title-size: 1.75rem; }
403
+ }
404
+ ```
405
+
406
+ A `size` prop (`sm`, `md`, `lg`) changes a component's height, padding and icons, not its text role. The one exception: descriptions use `secondary` at `size="sm"`.
407
+
360
408
  ### Tips
361
409
 
362
410
  - Put your overrides **after** the `@import` line; CSS cascade order is what makes the override win.
@@ -650,6 +698,7 @@ version you have installed is the shipped type declarations:
650
698
  | ScrollArea | Custom scrollable container |
651
699
  | Form / Label / Checkbox | Form controls |
652
700
  | Button / ButtonGroup / InvertButton / FlashButton | Standard and grouped buttons, plus the invert-on-hover and random-flash pill variants |
701
+ | GradientRingButton / GradientRing | Clear pill button with a 2px ring in the theme gradient that turns while pointed at or keyboard-focused (optionally once on arrival); `GradientRing` rings any pill control |
653
702
  | Card | Content card container |
654
703
  | Input / InputPassword / Textarea | Text input fields |
655
704
  | InputOTP | One-time-code input — grouped slots, numeric or alphanumeric, custom regex |
@@ -687,6 +736,7 @@ version you have installed is the shipped type declarations:
687
736
  | ResizableGroup / ResizablePanel / ResizableSeparator | Panels resized by dragging or the keyboard (react-resizable-panels), with a remembered layout and collapsible panels |
688
737
  | ColumnPanel | A resizable panel shown and hidden by a flag, staying mounted (and inert) while hidden; `usePanelFlag` drives any collapsible panel the same way |
689
738
  | FloatingWindow | Small draggable, optionally resizable non-modal window with minimize-to-pill, dock and close |
739
+ | BottomSheet | Non-modal phone panel from the bottom edge at half the screen: drag its grip to nearly full height, back to half or away; tap the handle to switch; Escape or ✕ closes |
690
740
  | AnchoredPanel | Small non-modal panel attached to a point by a leader line, beside the thing it edits |
691
741
  | NoticeStrip | Full-width line of news (info, warning, error) across the top of a canvas, with actions and an optional dismiss |
692
742
  | Readout | Instrument display: monospace values and units on a dark plate, optionally a toggle button |
@@ -713,7 +763,7 @@ version you have installed is the shipped type declarations:
713
763
  | Component | Description |
714
764
  |-----------|-------------|
715
765
  | WorkspaceLayout | Full dashboard shell with sidebar, header, and footer |
716
- | MinimalWorkspaceLayout | Header-less shell: a full-height icon rail on the page background that expands into an elevated sidebar, a floating top-right slot. With `sidebarConfig.hideWhenCollapsed` the sidebar is hidden instead: a click on the content's left edge peeks it over the content, `MinimalWorkspaceSidebarTrigger` opens it inline. Same props as WorkspaceLayout; themed with `--espd-minimal-workspace-layout-*` |
766
+ | MinimalWorkspaceLayout | Header-less shell: a full-height icon rail on the page background that expands into an elevated sidebar, a floating top-right slot. With `sidebarConfig.hideWhenCollapsed` the sidebar is hidden instead: a click on the content's left edge peeks it over the content, `MinimalWorkspaceSidebarTrigger` opens it inline. `hideMobileTopBar` drops the phone top bar for a page with its own toolbar, where the trigger becomes the menu button. Same props as WorkspaceLayout; themed with `--espd-minimal-workspace-layout-*` |
717
767
  | EntryLayout | Authentication and entry page layout — supports a custom right panel, and hiding the logo, footer, background image or right panel entirely |
718
768
 
719
769
  ### Common (`/common`)
@@ -896,7 +946,7 @@ optimizeDeps: {
896
946
  To deploy the demo to AWS (S3 + CloudFront):
897
947
 
898
948
  1. In `demo/`, copy `.env.example` to `.env` and set `S3_BUCKET` and `CLOUDFRONT_ID`.
899
- 2. Ensure AWS credentials are configured (default profile).
949
+ 2. Ensure AWS credentials are configured: the default profile, or `AWS_PROFILE` in `demo/.env`.
900
950
  3. From the repo root:
901
951
 
902
952
  ```bash
@@ -905,6 +955,18 @@ npm run deploy:demo
905
955
 
906
956
  This builds the demo, syncs `demo/dist` to the S3 bucket, and creates a CloudFront invalidation. The live demo is served from [https://dqsptdnp5qxr0.cloudfront.net](https://dqsptdnp5qxr0.cloudfront.net).
907
957
 
958
+ **Deep links.** The demo routes in the browser (`/components/bottom-sheet` has no file in the bucket). A CloudFront Function, `esp-ui-component-library-demo-spa-routing`, runs on every viewer request of the distribution: a path whose last segment has no dot gets `/index.html` with status 200, and a path with an extension goes to S3 unchanged, so a missing file still answers 404. Its source is [`demo/cloudfront/spa-routing.js`](demo/cloudfront/spa-routing.js). `deploy:demo` does not touch it. After changing the file, update and publish the function (the second `--if-match` is the ETag the first command prints):
959
+
960
+ ```bash
961
+ aws cloudfront update-function --name esp-ui-component-library-demo-spa-routing \
962
+ --if-match "$(aws cloudfront describe-function --name esp-ui-component-library-demo-spa-routing --query ETag --output text)" \
963
+ --function-config "Comment=esp-ui-component-library demo: serve index.html for client-side routes,Runtime=cloudfront-js-2.0" \
964
+ --function-code fileb://demo/cloudfront/spa-routing.js
965
+ aws cloudfront publish-function --name esp-ui-component-library-demo-spa-routing --if-match <ETag from update-function>
966
+ ```
967
+
968
+ Do not route deep links with a CloudFront custom error response (404 → `/index.html` as 200): it turns every missing file into a 200 as well.
969
+
908
970
  Build the library:
909
971
 
910
972
  ```bash
@@ -963,8 +1025,8 @@ feature/add-date-picker
963
1025
  The release and publishing flow is maintained internally by Espressif and is
964
1026
  documented in [`RELEASING.md`](./RELEASING.md) (not included in the published npm
965
1027
  package). In short: pushing a `vX.Y.Z` tag triggers CI, which builds, runs
966
- typecheck + tests on Node 24.18, and publishes the same tarball to public npm and the
967
- internal GitLab registry.
1028
+ typecheck, tests and the API/stylesheet checks on Node 24.18, packs the tarball,
1029
+ and publishes that tested tarball to public npm and the internal GitLab registry.
968
1030
 
969
1031
  ------------------------------------------------------------------------
970
1032
 
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { C as Color, S as Size } from './index-BQANnKs9.js';
3
- import { f as Variant } from './variant-D81RhpbR.js';
3
+ import { f as Variant } from './variant-DjdaxfIA.js';
4
4
  import { k as StyleAxisProps } from './style-axes-DSQ2DGc5.js';
5
- import { b as IconAvatarVariant } from './icon-avatar.props-RYtw2eSW.js';
6
- import { I as IconTextActionCardActionsPlacement } from './icon-text-action-card.props-B2ggncUK.js';
5
+ import { b as IconAvatarVariant } from './icon-avatar.props-BJe0-vva.js';
6
+ import { I as IconTextActionCardActionsPlacement } from './icon-text-action-card.props-BU7yFi2Q.js';
7
7
 
8
8
  type AlertColor = Color;
9
9
  type AlertVariant = Variant;
@@ -7,7 +7,7 @@ function CopyrightCard({ text, logoSrc, logoAlt = "Logo", href, logoOnly = false
7
7
  if (href) window.open(href, "_blank", "noopener,noreferrer");
8
8
  };
9
9
  const copyrightText = /* @__PURE__ */ jsx("div", {
10
- className: "flex items-center gap-1.5 text-sm text-muted-foreground",
10
+ className: "flex items-center gap-1.5 type-caption text-muted-foreground",
11
11
  children: /* @__PURE__ */ jsx("span", { children: text })
12
12
  });
13
13
  if (logoOnly && logoSrc) return /* @__PURE__ */ jsx(Tooltip, {
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  //#region src/common/footer-card/footer-card.tsx
4
4
  function FooterCard() {
5
5
  return /* @__PURE__ */ jsxs("div", {
6
- className: "text-xs",
6
+ className: "type-caption",
7
7
  children: [
8
8
  "© ",
9
9
  (/* @__PURE__ */ new Date()).getFullYear(),
@@ -11,7 +11,7 @@ function FooterCard() {
11
11
  /* @__PURE__ */ jsx(Link, {
12
12
  to: "https://www.espressif.com/",
13
13
  underline: true,
14
- className: "h-auto hover:bg-transparent p-0 text-xs",
14
+ className: "h-auto hover:bg-transparent p-0 type-caption",
15
15
  children: "Espressif Systems"
16
16
  }),
17
17
  ". All rights reserved."
@@ -30,6 +30,9 @@ declare function CopyrightCard({ text, logoSrc, logoAlt, href, logoOnly, }: Copy
30
30
  /**
31
31
  * Full-screen loading indicator
32
32
  * Used as defaultPendingComponent for route transitions
33
+ *
34
+ * The bar is at most 24rem wide and keeps 1.5rem off each edge of a narrower
35
+ * screen (the padding is outside the column, so a wide screen is unaffected).
33
36
  */
34
37
  declare function PageLoader(): React$1.JSX.Element;
35
38
 
@@ -26,10 +26,10 @@ function MyAccountMenu({ name, email, imageUrl, minWidth = "200px", menuItems, a
26
26
  /* @__PURE__ */ jsxs("span", {
27
27
  className: "grid min-w-0 flex-1 leading-tight",
28
28
  children: [name && /* @__PURE__ */ jsx("span", {
29
- className: "truncate text-sm font-medium",
29
+ className: "truncate type-label leading-tight",
30
30
  children: name
31
31
  }), email && /* @__PURE__ */ jsx("span", {
32
- className: "truncate text-xs text-muted-foreground",
32
+ className: "truncate type-secondary leading-tight text-muted-foreground",
33
33
  children: email
34
34
  })]
35
35
  }),