@espressif/dashboard-ui-components 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/rules/dashboard-ui-consumption.md +63 -2
- package/.cursor/rules/dashboard-ui-consumption.mdc +61 -3
- package/CHANGELOG.md +265 -0
- package/README.md +59 -8
- package/dist/{alert.props-CcKo49Rb.d.ts → alert.props-BuLuWmXA.d.ts} +3 -3
- package/dist/common/copyright-card/copyright-card.js +1 -1
- package/dist/common/footer-card/footer-card.js +2 -2
- package/dist/common/index.d.ts +3 -0
- package/dist/common/my-account-menu/my-account-menu.js +2 -2
- package/dist/common/page-loader/page-loader.js +4 -1
- package/dist/common/profile-card/profile-card.js +2 -2
- package/dist/components/accordion/accordion.js +6 -11
- package/dist/components/alert/index.d.ts +5 -5
- package/dist/components/anchored-panel/anchored-panel.js +4 -4
- package/dist/components/async-multi-select/async-multi-select.js +8 -8
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/bottom-sheet/_hooks/use-sheet-drag.js +112 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +84 -0
- package/dist/components/bottom-sheet/index.d.ts +50 -0
- package/dist/components/bottom-sheet/index.js +3 -0
- package/dist/components/bubble/bubble.js +1 -1
- package/dist/components/calendar/calendar.js +5 -5
- package/dist/components/cards/animated-card/animated-card.js +1 -1
- package/dist/components/cards/basic-details-card.js +2 -2
- package/dist/components/cards/collapsible-card.js +1 -1
- package/dist/components/cards/index.d.ts +2 -2
- package/dist/components/cards/no-data-card/no-data-card.js +2 -2
- package/dist/components/cards/section-card.js +49 -41
- package/dist/components/cards/simple-card.js +2 -5
- package/dist/components/category-card/category-card.js +2 -2
- package/dist/components/chart/chart.js +4 -4
- package/dist/components/chart/donut-chart.js +1 -1
- package/dist/components/chart/treemap-chart.js +1 -1
- package/dist/components/choice-card/choice-card.js +3 -3
- package/dist/components/code-editor/code-editor.js +4 -3
- package/dist/components/data-table/table-header.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +3 -3
- package/dist/components/dynamic-list/dynamic-list.js +14 -13
- package/dist/components/dynamic-list/index.d.ts +1 -1
- package/dist/components/error-display/full-size-error/full-size-error.js +2 -2
- package/dist/components/expandable-text/expandable-text-overlay.js +1 -1
- package/dist/components/facet-filters/filter-group.js +2 -2
- package/dist/components/feature-grid/feature-grid.js +3 -3
- package/dist/components/file-input/file-input.js +8 -8
- package/dist/components/file-upload/file-upload.js +4 -4
- package/dist/components/floating-window/_hooks/use-drag-move.js +1 -0
- package/dist/components/floating-window/_hooks/use-resize.js +133 -0
- package/dist/components/floating-window/floating-window.js +67 -40
- package/dist/components/floating-window/index.d.ts +21 -2
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +1 -1
- package/dist/components/gradient-ring-button/_hooks/use-ring-geometry.js +116 -0
- package/dist/components/gradient-ring-button/gradient-ring-button.js +44 -0
- package/dist/components/gradient-ring-button/gradient-ring.js +77 -0
- package/dist/components/gradient-ring-button/index.d.ts +66 -0
- package/dist/components/gradient-ring-button/index.js +3 -0
- package/dist/components/horizontal-stepper/horizontal-stepper.js +2 -6
- package/dist/components/horizontal-stepper/index.d.ts +2 -2
- package/dist/components/icon-avatar/index.d.ts +3 -3
- package/dist/components/icon-text-action-card/index.d.ts +4 -4
- package/dist/components/index.d.ts +14 -8
- package/dist/components/index.js +15 -6
- package/dist/components/key-value-manager/key-value-manager-add-popover.js +1 -1
- package/dist/components/key-value-manager/key-value-manager-table.js +1 -1
- package/dist/components/keyframes/index.d.ts +53 -0
- package/dist/components/keyframes/index.js +3 -0
- package/dist/components/keyframes/keyframes-motion.js +23 -0
- package/dist/components/keyframes/keyframes.js +37 -0
- package/dist/components/link/link.js +7 -7
- package/dist/components/list/list-item.utils.js +5 -4
- package/dist/components/list/list.js +1 -1
- package/dist/components/list-details/index.d.ts +2 -2
- package/dist/components/markdown-content/markdown-content.components.js +2 -2
- package/dist/components/media-card/media-card-reveal.js +2 -2
- package/dist/components/media-card/media-card.js +2 -2
- package/dist/components/monospace-content/index.d.ts +4 -4
- package/dist/components/monospace-content/monospace-content.js +9 -11
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +3 -3
- package/dist/components/nav-bar/nav-bar.js +4 -4
- package/dist/components/notice-strip/notice-strip.js +1 -1
- package/dist/components/option-card-group/option-card-group.js +2 -2
- package/dist/components/overflow-badge-list/index.d.ts +2 -2
- package/dist/components/overflow-badge-list/overflow-badge-list.js +3 -3
- package/dist/components/page-banner/page-banner.js +1 -1
- package/dist/components/page-container/page-container.js +1 -1
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/qr-code/index.d.ts +26 -0
- package/dist/components/qr-code/index.js +2 -0
- package/dist/components/qr-code/qr-code.js +69 -0
- package/dist/components/radio-group/radio-group.js +3 -3
- package/dist/components/range-field/index.d.ts +45 -0
- package/dist/components/range-field/index.js +2 -0
- package/dist/components/range-field/range-field.js +161 -0
- package/dist/components/readout/readout.js +1 -1
- package/dist/components/requirement-list/requirement-list.js +5 -10
- package/dist/components/reveal/index.d.ts +6 -3
- package/dist/components/reveal/reveal.js +7 -4
- package/dist/components/scrollable-sections/scrollable-sections.js +1 -1
- package/dist/components/search-box/index.d.ts +3 -1
- package/dist/components/search-box/search-box.js +7 -12
- package/dist/components/search-field-shell.js +8 -8
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +6 -6
- package/dist/components/showcase-card/index.d.ts +14 -3
- package/dist/components/showcase-card/showcase-card.js +43 -2
- package/dist/components/sidebar/sidebar.js +13 -15
- package/dist/components/simple-clickable-card/index.d.ts +4 -4
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +19 -23
- package/dist/components/simple-info-card/index.d.ts +3 -3
- package/dist/components/simple-list/index.d.ts +1 -1
- package/dist/components/simple-list/simple-list.js +8 -8
- package/dist/components/simple-paginated-list/simple-paginated-list.js +1 -4
- package/dist/components/stat-card/stat-card.js +7 -13
- package/dist/components/status-badge/index.d.ts +3 -3
- package/dist/components/status-badge/status-badge.js +4 -4
- package/dist/components/status-card-list/status-card-list.js +6 -6
- package/dist/components/step-tabs/index.d.ts +1 -1
- package/dist/components/tag/index.d.ts +1 -1
- package/dist/components/tag/tag.js +4 -4
- package/dist/components/tag-input/tag-input.js +12 -12
- package/dist/components/timeline/timeline.js +2 -2
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/toast.js +2 -2
- package/dist/components/toolbar/index.d.ts +5 -2
- package/dist/components/toolbar/toolbar-button.js +1 -1
- package/dist/components/toolbar/toolbar.js +9 -3
- package/dist/components/trace/index.d.ts +49 -0
- package/dist/components/trace/index.js +2 -0
- package/dist/components/trace/trace.js +109 -0
- package/dist/components/transfer-list/transfer-list.js +2 -2
- package/dist/components/typography/index.d.ts +12 -3
- package/dist/components/typography/typography-variants.js +98 -13
- package/dist/components/typography/typography.js +4 -2
- package/dist/components/user-type-badge/user-type-badge.js +4 -4
- package/dist/components/vertical-stepper/index.d.ts +2 -2
- package/dist/components/vertical-stepper/vertical-stepper.js +18 -11
- package/dist/core/alert.js +3 -3
- package/dist/core/animate-ui/components/animate/code-header.js +1 -1
- package/dist/core/animate-ui/components/animate/code.js +1 -1
- package/dist/core/animate-ui/components/animate/tabs.js +6 -6
- package/dist/core/animate-ui/components/animate/tooltip.js +1 -1
- package/dist/core/animate-ui/components/base/progress.js +2 -2
- package/dist/core/animate-ui/components/radix/accordion.js +2 -2
- package/dist/core/animate-ui/components/radix/dialog.js +2 -2
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +6 -6
- package/dist/core/animate-ui/components/radix/sheet.js +2 -2
- package/dist/core/animate-ui/components/radix/sidebar.js +8 -8
- package/dist/core/animate-ui/components/radix/toggle.js +1 -1
- package/dist/core/badge.js +1 -1
- package/dist/core/breadcrumb.js +1 -1
- package/dist/core/button/button.js +2 -2
- package/dist/core/button-group.js +1 -1
- package/dist/core/button.js +2 -2
- package/dist/core/card.js +2 -2
- package/dist/core/combobox/combobox.js +3 -3
- package/dist/core/command.js +5 -5
- package/dist/core/field-label-row.js +4 -4
- package/dist/core/form.js +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/input/input.js +11 -11
- package/dist/core/input-otp/input-otp.js +12 -12
- package/dist/core/label.js +1 -1
- package/dist/core/select.js +6 -6
- package/dist/core/separator.js +1 -1
- package/dist/core/table.js +2 -2
- package/dist/core/textarea/textarea.js +9 -9
- package/dist/{icon-avatar.props-RYtw2eSW.d.ts → icon-avatar.props-BJe0-vva.d.ts} +1 -1
- package/dist/{icon-text-action-card.props-B2ggncUK.d.ts → icon-text-action-card.props-BU7yFi2Q.d.ts} +2 -2
- package/dist/index.d.ts +14 -8
- package/dist/index.js +16 -7
- package/dist/layouts/entry-layout/entry-layout.js +1 -1
- package/dist/layouts/index.d.ts +21 -6
- package/dist/layouts/index.js +1 -1
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +10 -18
- package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +35 -7
- package/dist/layouts/workspace-layout/footer/footer.js +1 -1
- package/dist/markdown/index.d.ts +4 -4
- package/dist/{section-card-B7c5uc08.d.ts → section-card-DqQeQkzU.d.ts} +1 -1
- package/dist/{simple-clickable-card.props-BrPCw7CR.d.ts → simple-clickable-card.props-BhhotZMp.d.ts} +2 -2
- package/dist/{status-badge.props-lKlEOfRt.d.ts → status-badge.props-BVe8CmQZ.d.ts} +1 -1
- package/dist/styles/type-scale.js +153 -0
- package/dist/tailwind-preset.js +120 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/utils/cn.js +16 -5
- package/dist/utils/index.d.ts +31 -2
- package/dist/utils/index.js +2 -1
- package/dist/utils/variant.js +47 -47
- package/dist/{variant-D81RhpbR.d.ts → variant-DjdaxfIA.d.ts} +6 -1
- package/dist/{vertical-stepper.props-BXYcbW70.d.ts → vertical-stepper.props-DONJJXIy.d.ts} +1 -0
- package/package.json +9 -1
- package/src/styles/theme.css +23 -3
- package/src/styles/type-scale.css +152 -0
- package/tailwind.preset.ts +23 -0
|
@@ -91,6 +91,9 @@ export function Example() {
|
|
|
91
91
|
`MinimalWorkspaceSidebarTrigger` (from `/layouts`, placed in `topRightContent`) opens it inline;
|
|
92
92
|
a peek never reaches `onSidebarOpenChange`. Do not build an edge or trigger in the app. The edge
|
|
93
93
|
strip and the peek shadow are `-edge-color`, `-edge-width` and `-sidebar-overlay-elevation`.
|
|
94
|
+
A page with a toolbar of its own passes `hideMobileTopBar`: the layout then draws no phone top
|
|
95
|
+
bar, and a `MinimalWorkspaceSidebarTrigger` in that toolbar is the phone's menu button (it
|
|
96
|
+
renders nothing on a phone otherwise). Do not build a phone menu button in the app.
|
|
94
97
|
- The library ships **no fonts**; the app supplies its own typeface via `--font-sans`.
|
|
95
98
|
- 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
99
|
- 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 +136,36 @@ Things agents get wrong:
|
|
|
133
136
|
and call `registerStyleValue(axis, name, css)` or `registerDensity(name, tokens)` once at
|
|
134
137
|
start-up. Built-ins cannot be replaced.
|
|
135
138
|
|
|
139
|
+
## Text sizes (type roles, 1.14)
|
|
140
|
+
|
|
141
|
+
- Library components size text by **role** (what the text is); the same role is
|
|
142
|
+
the same size in every component. Roles: `display`, `lead`, `title`,
|
|
143
|
+
`headline`, `heading`, `subheading`, `prose`, `body`, `secondary`, `caption`,
|
|
144
|
+
`label`, `input`, `code`. The table (phone and ≥768px values) is
|
|
145
|
+
`TYPE_SCALE` from `/utils`; do not copy pixel values from memory.
|
|
146
|
+
- In app markup use the role utility, `type-<role>` (`type-body`,
|
|
147
|
+
`type-caption`, …), or a `Typography` variant of the same name, not a raw
|
|
148
|
+
`text-sm` / `text-xs`. Pick by what the text is: running text `body`; a meta
|
|
149
|
+
line under a title `secondary`; timestamps, counts, hints, badges `caption`;
|
|
150
|
+
button, tab, menu text and form labels `label`; typed text `input`; a page's
|
|
151
|
+
heading `title`, a page section's `headline`, a card, panel or dialog title
|
|
152
|
+
`heading`, an alert title or list group label `subheading`; code `code` + `font-mono`.
|
|
153
|
+
- Not `text-body` / `text-secondary`: `text-secondary` and `text-input` are
|
|
154
|
+
colour utilities. Role classes are `type-*`.
|
|
155
|
+
- Change a role app-wide by setting `--espd-type-<role>-size` / `-line` /
|
|
156
|
+
`-weight` after the `@import`: on `:root`, and for roles that change from 768px
|
|
157
|
+
(`title`, `headline`, `prose`, `input`, `code`) also inside
|
|
158
|
+
`@media (width >= 48rem) { :root { … } }`. Do not add new `--espd-type-*`
|
|
159
|
+
names.
|
|
160
|
+
- `leading-*` and `font-*` beside a role win over its line height and weight.
|
|
161
|
+
Through `cn()`, a raw `text-lg` in `className` replaces a component's role.
|
|
162
|
+
- A component's `size` prop changes height, padding and icons, not its text
|
|
163
|
+
role (descriptions are the one exception: `secondary` at `size="sm"`).
|
|
164
|
+
- `Typography`'s earlier variants still work and follow the scale: `h1`/`h2` →
|
|
165
|
+
`title`, `h3` → `headline`, `h4`/`h5` → `heading`, `h6` → `subheading`,
|
|
166
|
+
`body1` → `prose`, `body2` → `body`, `subtitle1` → `label`, `subtitle2` →
|
|
167
|
+
`caption`.
|
|
168
|
+
|
|
136
169
|
## Buttons
|
|
137
170
|
|
|
138
171
|
- Use the styled `Button` from `/components` (or `/components/button`). `/core` has an uncoloured base `Button` with the same name: not for apps.
|
|
@@ -148,6 +181,7 @@ Install only when the feature is used:
|
|
|
148
181
|
|---------|-------------|
|
|
149
182
|
| `@tanstack/react-table` | DataTable |
|
|
150
183
|
| `react-hook-form` | Form-related components |
|
|
184
|
+
| `qrcode` | QrCode |
|
|
151
185
|
| `shiki` | `Code` / syntax highlighting |
|
|
152
186
|
| `recharts` | Chart components |
|
|
153
187
|
|
|
@@ -280,11 +314,36 @@ Things agents get wrong about it:
|
|
|
280
314
|
- A panel that is shown and hidden by a flag is `ColumnPanel` (`open`, `openSize`), not a
|
|
281
315
|
conditional render: it stays mounted (state survives) and goes `inert` when hidden. For your
|
|
282
316
|
own collapsible `ResizablePanel`, pass `usePanelFlag(open, openSize)` as its `panelRef`.
|
|
283
|
-
- `FloatingWindow` does not keep its own position: hold `position`
|
|
284
|
-
spot) and
|
|
317
|
+
- `FloatingWindow` does not keep its own position or size: hold `position` (null = default
|
|
318
|
+
spot) and, for a resizable window, `size` (null = default size) in the app, and store what
|
|
319
|
+
`onMove` / `onResize` hand back. Passing `onResize` (with `resizeLabel`) is what adds the
|
|
320
|
+
corner handle; without it the window keeps its default size. Minimized it renders only its pill.
|
|
285
321
|
- `AnchoredPanel` is non-modal and positioned by a zero-size anchor element the app keeps at
|
|
286
322
|
the point (`anchorRef`); pass `keepOpenFor` for the control that toggles it, or that
|
|
287
323
|
control's own click closes and reopens it.
|
|
324
|
+
- `BottomSheet` is non-modal and has no `open` prop: render it to open it, stop rendering it in
|
|
325
|
+
`onClose`. It keeps its own height (half or tall). `labels` (`expand`, `collapse`, `close`)
|
|
326
|
+
are required and not translated. It is `fixed` to the viewport; inside a framed preview pass
|
|
327
|
+
`className="absolute"` and give the frame `relative overflow-hidden`. Use `Sheet` when the
|
|
328
|
+
page behind must not be used.
|
|
329
|
+
- `GradientRingButton` is the styled `Button` without `variant` / `color`, and `fullWidth`
|
|
330
|
+
defaults to `false`. Do not add hover or focus rings through `className`: the turning ring is
|
|
331
|
+
the indicator. Wrap another pill-shaped control in `GradientRing` instead of copying the ring.
|
|
332
|
+
- `Trace` lists an agent's steps; it holds nothing itself. Put each step in a `TraceLine`
|
|
333
|
+
(status `running` / `error` / `pending`, unset = done) and say the status in the title as
|
|
334
|
+
well ("Build failed"): colour and shimmer alone do not reach everyone. A line that opens is
|
|
335
|
+
`TraceCollapsible` > `TraceCollapsibleTrigger` (wrapping the `TraceLine`) +
|
|
336
|
+
`TraceCollapsibleContent`; a line with nothing to show stays a plain `TraceLine`, no trigger.
|
|
337
|
+
- `QrCode` needs the optional peer `qrcode` (`npm install qrcode`), loaded only when a code
|
|
338
|
+
shows; without it the `fallback` text shows in its place. Keep it dark on light (`ink` /
|
|
339
|
+
`paper`) in every theme: cameras read that. `label` names it for a screen reader.
|
|
340
|
+
- `RangeField` is controlled (`value` + `onChange`) and translates nothing: pass `labels`
|
|
341
|
+
(the −, + and slider names) in the page's language. `wrap` makes − and + go round (a
|
|
342
|
+
compass). It clamps a typed value on Enter or blur, not on every keystroke.
|
|
343
|
+
- `Keyframes` animates its parent SVG element and renders nothing unless a
|
|
344
|
+
`KeyframesMotion` provider around the scene says it may: provide `false` when the
|
|
345
|
+
person prefers reduced motion. Write the element's own attributes as the LAST value,
|
|
346
|
+
its resting frame.
|
|
288
347
|
- `MessageScroller` scrolls itself: give it a height or a flex parent; do not wrap it in
|
|
289
348
|
another `ScrollArea`. Put messages (`Bubble`s) directly inside.
|
|
290
349
|
|
|
@@ -293,6 +352,8 @@ Things agents get wrong about it:
|
|
|
293
352
|
- `ShowcaseCard` opens something; `ChoiceCard` chooses something (a toggle button with
|
|
294
353
|
`aria-pressed`). For a router link pass `open={{ link: (title) => <Link to=…>{title}</Link> }}`,
|
|
295
354
|
not `href` (which reloads the page).
|
|
355
|
+
- `ShowcaseCard layout="row"` lays the picture at the card's left (a wide list, a few
|
|
356
|
+
big choices); `reveal`, `mediaOverlay` and `titleAction` are for the column card only.
|
|
296
357
|
- The facet filters (`FiltersPanel`, `FiltersPill`, `ActiveFilters`) count nothing and
|
|
297
358
|
translate nothing: the app passes groups with counts, the selection and every label.
|
|
298
359
|
Use `useFiltersCollapsed()` for the panel/pill state and pass
|
|
@@ -69,7 +69,7 @@ export function Example() {
|
|
|
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
70
|
- 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
71
|
- 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`.
|
|
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`. 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
73
|
- 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
74
|
- 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
75
|
|
|
@@ -118,6 +118,36 @@ Things agents get wrong:
|
|
|
118
118
|
and call `registerStyleValue(axis, name, css)` or `registerDensity(name, tokens)` once at
|
|
119
119
|
start-up. Built-ins cannot be replaced.
|
|
120
120
|
|
|
121
|
+
## Text sizes (type roles, 1.14)
|
|
122
|
+
|
|
123
|
+
- Library components size text by **role** (what the text is); the same role is
|
|
124
|
+
the same size in every component. Roles: `display`, `lead`, `title`,
|
|
125
|
+
`headline`, `heading`, `subheading`, `prose`, `body`, `secondary`, `caption`,
|
|
126
|
+
`label`, `input`, `code`. The table (phone and ≥768px values) is
|
|
127
|
+
`TYPE_SCALE` from `/utils`; do not copy pixel values from memory.
|
|
128
|
+
- In app markup use the role utility, `type-<role>` (`type-body`,
|
|
129
|
+
`type-caption`, …), or a `Typography` variant of the same name, not a raw
|
|
130
|
+
`text-sm` / `text-xs`. Pick by what the text is: running text `body`; a meta
|
|
131
|
+
line under a title `secondary`; timestamps, counts, hints, badges `caption`;
|
|
132
|
+
button, tab, menu text and form labels `label`; typed text `input`; a page's
|
|
133
|
+
heading `title`, a page section's `headline`, a card, panel or dialog title
|
|
134
|
+
`heading`, an alert title or list group label `subheading`; code `code` + `font-mono`.
|
|
135
|
+
- Not `text-body` / `text-secondary`: `text-secondary` and `text-input` are
|
|
136
|
+
colour utilities. Role classes are `type-*`.
|
|
137
|
+
- Change a role app-wide by setting `--espd-type-<role>-size` / `-line` /
|
|
138
|
+
`-weight` after the `@import`: on `:root`, and for roles that change from 768px
|
|
139
|
+
(`title`, `headline`, `prose`, `input`, `code`) also inside
|
|
140
|
+
`@media (width >= 48rem) { :root { … } }`. Do not add new `--espd-type-*`
|
|
141
|
+
names.
|
|
142
|
+
- `leading-*` and `font-*` beside a role win over its line height and weight.
|
|
143
|
+
Through `cn()`, a raw `text-lg` in `className` replaces a component's role.
|
|
144
|
+
- A component's `size` prop changes height, padding and icons, not its text
|
|
145
|
+
role (descriptions are the one exception: `secondary` at `size="sm"`).
|
|
146
|
+
- `Typography`'s earlier variants still work and follow the scale: `h1`/`h2` →
|
|
147
|
+
`title`, `h3` → `headline`, `h4`/`h5` → `heading`, `h6` → `subheading`,
|
|
148
|
+
`body1` → `prose`, `body2` → `body`, `subtitle1` → `label`, `subtitle2` →
|
|
149
|
+
`caption`.
|
|
150
|
+
|
|
121
151
|
## Buttons
|
|
122
152
|
|
|
123
153
|
- Use the styled `Button` from `/components` (or `/components/button`). `/core` has an uncoloured base `Button` with the same name: not for apps.
|
|
@@ -133,6 +163,7 @@ Install only when the feature is used:
|
|
|
133
163
|
|---------|-------------|
|
|
134
164
|
| `@tanstack/react-table` | DataTable |
|
|
135
165
|
| `react-hook-form` | Form-related components |
|
|
166
|
+
| `qrcode` | QrCode |
|
|
136
167
|
| `shiki` | `Code` / syntax highlighting |
|
|
137
168
|
| `recharts` | Chart components |
|
|
138
169
|
|
|
@@ -265,11 +296,36 @@ Things agents get wrong about it:
|
|
|
265
296
|
- A panel that is shown and hidden by a flag is `ColumnPanel` (`open`, `openSize`), not a
|
|
266
297
|
conditional render: it stays mounted (state survives) and goes `inert` when hidden. For your
|
|
267
298
|
own collapsible `ResizablePanel`, pass `usePanelFlag(open, openSize)` as its `panelRef`.
|
|
268
|
-
- `FloatingWindow` does not keep its own position: hold `position`
|
|
269
|
-
spot) and
|
|
299
|
+
- `FloatingWindow` does not keep its own position or size: hold `position` (null = default
|
|
300
|
+
spot) and, for a resizable window, `size` (null = default size) in the app, and store what
|
|
301
|
+
`onMove` / `onResize` hand back. Passing `onResize` (with `resizeLabel`) is what adds the
|
|
302
|
+
corner handle; without it the window keeps its default size. Minimized it renders only its pill.
|
|
270
303
|
- `AnchoredPanel` is non-modal and positioned by a zero-size anchor element the app keeps at
|
|
271
304
|
the point (`anchorRef`); pass `keepOpenFor` for the control that toggles it, or that
|
|
272
305
|
control's own click closes and reopens it.
|
|
306
|
+
- `BottomSheet` is non-modal and has no `open` prop: render it to open it, stop rendering it in
|
|
307
|
+
`onClose`. It keeps its own height (half or tall). `labels` (`expand`, `collapse`, `close`)
|
|
308
|
+
are required and not translated. It is `fixed` to the viewport; inside a framed preview pass
|
|
309
|
+
`className="absolute"` and give the frame `relative overflow-hidden`. Use `Sheet` when the
|
|
310
|
+
page behind must not be used.
|
|
311
|
+
- `GradientRingButton` is the styled `Button` without `variant` / `color`, and `fullWidth`
|
|
312
|
+
defaults to `false`. Do not add hover or focus rings through `className`: the turning ring is
|
|
313
|
+
the indicator. Wrap another pill-shaped control in `GradientRing` instead of copying the ring.
|
|
314
|
+
- `Trace` lists an agent's steps; it holds nothing itself. Put each step in a `TraceLine`
|
|
315
|
+
(status `running` / `error` / `pending`, unset = done) and say the status in the title as
|
|
316
|
+
well ("Build failed"): colour and shimmer alone do not reach everyone. A line that opens is
|
|
317
|
+
`TraceCollapsible` > `TraceCollapsibleTrigger` (wrapping the `TraceLine`) +
|
|
318
|
+
`TraceCollapsibleContent`; a line with nothing to show stays a plain `TraceLine`, no trigger.
|
|
319
|
+
- `QrCode` needs the optional peer `qrcode` (`npm install qrcode`), loaded only when a code
|
|
320
|
+
shows; without it the `fallback` text shows in its place. Keep it dark on light (`ink` /
|
|
321
|
+
`paper`) in every theme: cameras read that. `label` names it for a screen reader.
|
|
322
|
+
- `RangeField` is controlled (`value` + `onChange`) and translates nothing: pass `labels`
|
|
323
|
+
(the −, + and slider names) in the page's language. `wrap` makes − and + go round (a
|
|
324
|
+
compass). It clamps a typed value on Enter or blur, not on every keystroke.
|
|
325
|
+
- `Keyframes` animates its parent SVG element and renders nothing unless a
|
|
326
|
+
`KeyframesMotion` provider around the scene says it may: provide `false` when the
|
|
327
|
+
person prefers reduced motion. Write the element's own attributes as the LAST value,
|
|
328
|
+
its resting frame.
|
|
273
329
|
- `MessageScroller` scrolls itself: give it a height or a flex parent; do not wrap it in
|
|
274
330
|
another `ScrollArea`. Put messages (`Bubble`s) directly inside.
|
|
275
331
|
|
|
@@ -278,6 +334,8 @@ Things agents get wrong about it:
|
|
|
278
334
|
- `ShowcaseCard` opens something; `ChoiceCard` chooses something (a toggle button with
|
|
279
335
|
`aria-pressed`). For a router link pass `open={{ link: (title) => <Link to=…>{title}</Link> }}`,
|
|
280
336
|
not `href` (which reloads the page).
|
|
337
|
+
- `ShowcaseCard layout="row"` lays the picture at the card's left (a wide list, a few
|
|
338
|
+
big choices); `reveal`, `mediaOverlay` and `titleAction` are for the column card only.
|
|
281
339
|
- The facet filters (`FiltersPanel`, `FiltersPill`, `ActiveFilters`) count nothing and
|
|
282
340
|
translate nothing: the app passes groups with counts, the selection and every label.
|
|
283
341
|
Use `useFiltersCollapsed()` for the panel/pill state and pass
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,271 @@ 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.0] - 2026-11-22
|
|
8
|
+
|
|
9
|
+
**Text sizes now come from roles, and the defaults change some sizes.** Nothing
|
|
10
|
+
is removed or renamed, so existing code keeps working and typechecks. But
|
|
11
|
+
library components look different on upgrade: that is the point of this
|
|
12
|
+
release. Your own page text, sized with your own raw `text-*` classes, does not
|
|
13
|
+
move. Stay on 1.13.x until you are ready.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **The type scale.** A role is what a piece of text is, and the same role is
|
|
17
|
+
the same size in every component. There are 13 roles. Each has a phone value
|
|
18
|
+
and, for five of them, a value from 768px up:
|
|
19
|
+
|
|
20
|
+
| Role | Used for | Phone (px, size / line) | From 768px | Weight |
|
|
21
|
+
|---|---|---|---|---|
|
|
22
|
+
| `display` | Marketing headline | fluid 40→88 / 1.04 | same | 800 |
|
|
23
|
+
| `lead` | The paragraph under a display headline | fluid 17→21 / 1.6 | same | 400 |
|
|
24
|
+
| `title` | A page's heading | 22 / 28 | 26 / 32 | 700 |
|
|
25
|
+
| `headline` | A section of a page | 18 / 24 | 20 / 28 | 600 |
|
|
26
|
+
| `heading` | A card, panel or dialog title | 16 / 22 | same | 600 |
|
|
27
|
+
| `subheading` | An alert's or list group's title | 14 / 20 | same | 600 |
|
|
28
|
+
| `prose` | Long reading text | 16 / 24 | 16 / 26 | 400 |
|
|
29
|
+
| `body` | Running text in an interface | 14 / 21 | same | 400 |
|
|
30
|
+
| `secondary` | A supporting line, card meta | 13 / 18 | same | 400 |
|
|
31
|
+
| `caption` | Timestamps, counts, hints, badges | 12 / 16 | same | 400 |
|
|
32
|
+
| `label` | Form labels, tab, menu and button text | 14 / 20 | same | 500 |
|
|
33
|
+
| `input` | What a person types, and its placeholder | 16 / 24 | 14 / 20 | 400 |
|
|
34
|
+
| `code` | Code, logs, file paths (with `font-mono`) | 12 / 18 | 13 / 20 | 400 |
|
|
35
|
+
|
|
36
|
+
- **Tokens** `--espd-type-<role>-size`, `-line` and `-weight` (in the new
|
|
37
|
+
`type-scale.css`, which `theme.css` imports), and **utilities**
|
|
38
|
+
`type-<role>` (`type-body`, `type-caption`, …) for your own markup. A
|
|
39
|
+
`leading-*` or `font-*` class next to a role wins over its line height or
|
|
40
|
+
weight, in any class order. Through `cn()`, a raw `text-lg` replaces a role,
|
|
41
|
+
and a role replaces a raw size.
|
|
42
|
+
- **`Typography` variants for each role** (all but `input`): `display`, `lead`,
|
|
43
|
+
`title`, `headline`, `heading`, `subheading`, `prose`, `body`, `secondary`,
|
|
44
|
+
`caption`, `label`, `code`.
|
|
45
|
+
- **`/utils` exports the table:** `TYPE_ROLES`, `TYPE_SCALE`, `TYPE_SCALE_MD`,
|
|
46
|
+
and the types `TypeRole`, `TypeRoleSpec` and `TypeRoleValue`.
|
|
47
|
+
- **The Tailwind preset** adds the same tokens and utilities, so an app that
|
|
48
|
+
uses only `tailwind-preset` gets the roles too.
|
|
49
|
+
- **A "Type scale" demo page.**
|
|
50
|
+
- **`MinimalWorkspaceLayout` `hideMobileTopBar`**: on a phone the layout draws
|
|
51
|
+
a 48px top bar (menu button, logo, `topRightContent`). A page with a toolbar
|
|
52
|
+
of its own, such as an editor, showed two bars stacked. With
|
|
53
|
+
`hideMobileTopBar` the layout draws no top bar on a phone, and a
|
|
54
|
+
`MinimalWorkspaceSidebarTrigger` in the page's toolbar becomes the menu
|
|
55
|
+
button there (menu icon, `labels.openMenu`, opens the menu sheet).
|
|
56
|
+
`topRightContent` floats over the content, as on desktop. Off by default:
|
|
57
|
+
nothing changes unless you set it. On desktop the trigger works as before.
|
|
58
|
+
- Demo: a "Page toolbar on a phone" example for `MinimalWorkspaceLayout`.
|
|
59
|
+
- **`BottomSheet`:** a phone panel from the bottom edge, at half the screen so
|
|
60
|
+
the page above stays in view and responds. Drag its grip up to nearly full
|
|
61
|
+
height, back to half, or down to close; tap the handle to switch heights;
|
|
62
|
+
Escape or ✕ closes it. Unlike `Sheet`, it is not modal. Its `labels`
|
|
63
|
+
(`expand`, `collapse`, `close`) are required, with no English defaults. Its
|
|
64
|
+
top corners follow `--espd-radius-surface`. Exports `settleSheet` (the rule a
|
|
65
|
+
released sheet settles by) and the `SheetRest` type.
|
|
66
|
+
- **`GradientRingButton` and `GradientRing`:** a clear pill button with a 2px
|
|
67
|
+
ring in the theme's gradient (`--color-gradient-start` → `middle` → `end`)
|
|
68
|
+
that turns while the button is pointed at or keyboard-focused, and settles
|
|
69
|
+
back when let go. Optionally it turns once as it appears (`cue`, read on
|
|
70
|
+
mount). Disabled, it fades and holds still. Under reduced motion it only
|
|
71
|
+
brightens, and keyboard focus gets the usual outline. `fullWidth` defaults
|
|
72
|
+
to `false`, unlike `Button`. `GradientRing` puts the same ring around any
|
|
73
|
+
pill-shaped control (an `InvertButton`, a link drawn as a pill).
|
|
74
|
+
- Demo: `BottomSheet` (Overlays) and `GradientRingButton` (Buttons) pages.
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
- **`Typography`'s earlier variants now alias roles** and follow the scale:
|
|
78
|
+
|
|
79
|
+
| Variant | Before (px) | Now | What moves |
|
|
80
|
+
|---|---|---|---|
|
|
81
|
+
| `h1` | 30 / 36, 700 | `title` | 22 on a phone, 26 from 768px |
|
|
82
|
+
| `h2` | 24 / 32, 700 | `title` | 22 on a phone, 26 from 768px |
|
|
83
|
+
| `h3` | 20 / 28, 600 | `headline` | 18 / 24 on a phone; unchanged from 768px |
|
|
84
|
+
| `h4` | 18 / 28, 600 | `heading` | 16 / 22 |
|
|
85
|
+
| `h5` | 16 / 24, 600 | `heading` | line 24 → 22 |
|
|
86
|
+
| `h6` | 14 / 20, 600 | `subheading` | nothing |
|
|
87
|
+
| `body1` (default) | 16 / 26 | `prose` | line 26 → 24 on a phone |
|
|
88
|
+
| `body2` | 14 / 21 | `body` | nothing |
|
|
89
|
+
| `subtitle1` | 14 / 20, 500, muted | `label` | nothing |
|
|
90
|
+
| `subtitle2` | 12 / 16, 500, muted | `caption` | nothing |
|
|
91
|
+
|
|
92
|
+
When a raw size in `className` overrides a variant (`<Typography variant="h6"
|
|
93
|
+
className="text-xs">`), the variant's weight is kept, as before.
|
|
94
|
+
- **Every component's text is on a role.** `node_modules/@espressif/dashboard-ui-components`
|
|
95
|
+
ships no raw `text-xs`…`text-9xl` except graphic sizes: avatar initials,
|
|
96
|
+
`RankNumeral`, and the big values of `StatCard` and `CategoryCard`.
|
|
97
|
+
`EntryLayout`'s hero also keeps its own size.
|
|
98
|
+
- **A `size` prop no longer changes text size.** `sm`, `md` and `lg` change
|
|
99
|
+
height, padding, gaps and icons. The text keeps its role at every size.
|
|
100
|
+
The one exception: descriptions are `secondary` (13px) at `size="sm"` and
|
|
101
|
+
`body` (14px) otherwise.
|
|
102
|
+
- **What moves, by component** (default size, px; phone / from 768px where they
|
|
103
|
+
differ). The full list, one row per class, is in
|
|
104
|
+
`docs/plans/2026-11-22-type-scale-inventory.md` in the repository, and
|
|
105
|
+
before/after screenshots of eight demo pages (Typography, Alert, Input,
|
|
106
|
+
Button, Card, Dialog, Badge, List) at 360px and 1280px are in
|
|
107
|
+
`docs/plans/type-scale-screenshots/`.
|
|
108
|
+
- **Inputs:**
|
|
109
|
+
- `Input`, `Textarea`, `Select` trigger, `Combobox`, `InputOTP`, `TagInput`,
|
|
110
|
+
`AsyncMultiSelect`, `FileInput`, search boxes, `Command` input: typed text
|
|
111
|
+
is `input` at every size: 16 on a phone, 14 from 768px. `sm` fields grow
|
|
112
|
+
from 12 to 16 / 14, so iOS no longer zooms the page when one is focused.
|
|
113
|
+
`lg` fields drop from 18 to 16 / 14.
|
|
114
|
+
- `CodeEditor`: 16 / 13 → 16 / 14.
|
|
115
|
+
- Field labels are `label` (14, 500). Hints, descriptions and errors are
|
|
116
|
+
`caption` (14 → 12).
|
|
117
|
+
- `RadioGroup` option labels 16 → 14. `RangeField` label 12 → 14.
|
|
118
|
+
- **Menus and navigation:**
|
|
119
|
+
- `SelectItem`, `DropdownMenu` items, `Command` items, breadcrumb links,
|
|
120
|
+
inactive `Sidebar` rows, and `Combobox`'s "Load more": 14, weight 400 → 500
|
|
121
|
+
(`label`).
|
|
122
|
+
- `DropdownMenu` labels 500 → 600 (`subheading`).
|
|
123
|
+
- Stepper labels at `sm`: 11 / 12 → 14. `HorizontalStepper` labels at the
|
|
124
|
+
default size: 12 → 14.
|
|
125
|
+
- `Accordion` content is `body` (`lg` content 18 → 14), and its title is
|
|
126
|
+
`heading`.
|
|
127
|
+
- The sidebar font-size tokens stay and default to the `label` size (14,
|
|
128
|
+
unchanged).
|
|
129
|
+
- **Buttons, tabs and toggles:** `label` at every size. `sm` grows from 12 to
|
|
130
|
+
14; `lg` tabs drop from 16 to 14.
|
|
131
|
+
- **Overlays:**
|
|
132
|
+
- `Dialog` titles 18 → 16 (`heading`, like a card's title). `Sheet` titles,
|
|
133
|
+
which had no size of their own, are `heading` (16).
|
|
134
|
+
- `Toast` title is `subheading` with its own medium weight (14, unchanged).
|
|
135
|
+
- `FullscreenDialog` heading 24 → 22 / 26 (`title`).
|
|
136
|
+
- `Tooltip` text is `caption`.
|
|
137
|
+
- **Cards and alerts:**
|
|
138
|
+
- Card titles are `heading` (16). `SectionCard`, `SelectableCardList`,
|
|
139
|
+
`StatusCardList`, `ChoiceCard`, `FeatureGrid` and `BasicDetailsCard` titles
|
|
140
|
+
go 14 → 16. `SimpleCard` title 24 → 16. `NoDataCard` heading 18 → 16.
|
|
141
|
+
`StatCard` heading 20 → 16.
|
|
142
|
+
- `Alert`, `IconTextActionCard`, `SimpleClickableCard` and `SimpleInfoCard`
|
|
143
|
+
titles are `subheading` (14). `Alert`'s title at its default size, `sm`,
|
|
144
|
+
goes 12 → 14.
|
|
145
|
+
- Meta lines are `secondary` (14 → 13).
|
|
146
|
+
- `AnimatedCard` text 16 → 14.
|
|
147
|
+
- **Badges:** `Badge`, `StatusBadge`, `Tag`, `UserTypeBadge` and the
|
|
148
|
+
`OverflowBadgeList` count are `caption` (12) at every size. `Tag` and
|
|
149
|
+
`UserTypeBadge` go 14 → 12 at their default size, 16 → 12 at `lg`.
|
|
150
|
+
- **Lists and data:**
|
|
151
|
+
- List rows are `body` (14) at every size; `lg` goes 16 → 14.
|
|
152
|
+
- `DynamicList` and `SimpleList` keys are `label`.
|
|
153
|
+
- Table headers are `label`; cells are `body`.
|
|
154
|
+
- Chart legends 14 → 12 (`caption`).
|
|
155
|
+
- `MarkdownContent` list items match its paragraphs (`prose`). Its inline
|
|
156
|
+
code goes 14 → 12 / 13 (`code`).
|
|
157
|
+
- `MonospaceContent` values are `code`.
|
|
158
|
+
- **Pages:**
|
|
159
|
+
- `PageContainer` title 24 → 22 / 26 (`title`).
|
|
160
|
+
- `FullSizeError` title 18 → 18 / 20 (`headline`).
|
|
161
|
+
- `NoticeStrip` description 12 → 14.
|
|
162
|
+
- `Bubble` 16 → 14 (13 at `sm`).
|
|
163
|
+
- Account menu and profile card emails 12 → 13 (`secondary`).
|
|
164
|
+
- The workspace footer 10 → 12 (`caption`).
|
|
165
|
+
- **Descriptions** in `Alert`, `IconTextActionCard`, `SimpleClickableCard` and
|
|
166
|
+
`SimpleInfoCard` are regular weight when they stand alone and medium under a
|
|
167
|
+
title. They also **draw at the full strength of their colour** in every
|
|
168
|
+
variant. `gradient` drew them at 60%, and `soft`, `outline`, `glow` and
|
|
169
|
+
`solid` at 80%. That put them under WCAG AA's 4.5:1 for body text on 36 of the
|
|
170
|
+
100 colour, variant and theme pairs: an info `gradient` alert's description
|
|
171
|
+
measured 2.8:1 in light mode, and 4.1:1 at full strength. The change reaches
|
|
172
|
+
`Toast` and `SectionCard` descriptions too.
|
|
173
|
+
Some pairs still miss 4.5:1, because the colour itself is too light for text
|
|
174
|
+
there:
|
|
175
|
+
- light mode: `warning`, `disabled`, and `mist`'s secondary text;
|
|
176
|
+
- dark mode: `disabled`;
|
|
177
|
+
- `primary` on the `soft`, `gradient` and `glow` tints.
|
|
178
|
+
Those need token changes and are left for a later release.
|
|
179
|
+
|
|
180
|
+
### Changing a role, or keeping today's look
|
|
181
|
+
- **Change a role app-wide** by setting its tokens after the library's
|
|
182
|
+
`@import`: on `:root`, and for a role whose value changes from 768px (`title`,
|
|
183
|
+
`headline`, `prose`, `input`, `code`), inside the same media query too:
|
|
184
|
+
|
|
185
|
+
```css
|
|
186
|
+
:root {
|
|
187
|
+
--espd-type-body-size: 0.9375rem;
|
|
188
|
+
--espd-type-body-line: 1.375rem;
|
|
189
|
+
}
|
|
190
|
+
@media (width >= 48rem) {
|
|
191
|
+
:root { --espd-type-title-size: 1.75rem; }
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
- **Undo the larger moves while you migrate:** a role sets every component on
|
|
196
|
+
it, so tokens cannot bring back each component's 1.13 size one by one. These
|
|
197
|
+
settings undo most of the visible moves:
|
|
198
|
+
- `--espd-type-label-weight: 400` puts menu items, breadcrumbs and sidebar
|
|
199
|
+
rows back at their old weight. It also lightens buttons, tabs and form
|
|
200
|
+
labels.
|
|
201
|
+
- `--espd-type-caption-size: 0.875rem` and `--espd-type-caption-line:
|
|
202
|
+
1.25rem` put badges, tags, hints and form messages back at 14px.
|
|
203
|
+
- `--espd-type-input-size: 0.875rem` on `:root` (no media query) keeps fields
|
|
204
|
+
at 14px on phones, but iOS then zooms the page when a field is focused.
|
|
205
|
+
- `--espd-type-title-size: 1.5rem` and `--espd-type-title-line: 2rem`, in
|
|
206
|
+
both places, bring page titles, `h1` and `h2` close to the old `h2`.
|
|
207
|
+
|
|
208
|
+
To keep every size exactly, stay on 1.13.x.
|
|
209
|
+
|
|
210
|
+
### Fixed
|
|
211
|
+
- **`PageLoader`** keeps its bar 1.5rem off the screen's edges. On a phone
|
|
212
|
+
narrower than 24rem the bar ran from edge to edge. Wider screens look as
|
|
213
|
+
before.
|
|
214
|
+
- **`Toolbar`** without a `center` no longer caps the start slot at half the
|
|
215
|
+
bar. The start and end split the width so a centre stays centred; with no
|
|
216
|
+
centre the end now takes only its controls' width and the start the rest.
|
|
217
|
+
On a 360px phone a title at the start (menu, Back, a product name) had
|
|
218
|
+
96px and truncated while the end sat mostly empty. With a `center` the
|
|
219
|
+
split is as before. The slots carry `data-slot` (`toolbar-start`,
|
|
220
|
+
`toolbar-center`, `toolbar-end`).
|
|
221
|
+
- **`NavBar`** sets its own text colour (`text-foreground`), so a theme scope
|
|
222
|
+
from `topClassName` (such as `"dark border-transparent"` over a dark hero)
|
|
223
|
+
reaches what inherits it. The phone's menu button stayed near-black on the
|
|
224
|
+
dark bar: `dark` swapped the tokens on the bar, but the button kept the
|
|
225
|
+
colour inherited from the page above it. A text colour the app passes in
|
|
226
|
+
`className` or `topClassName` still wins. Apps that added `text-foreground`
|
|
227
|
+
to `topClassName` as a workaround can drop it.
|
|
228
|
+
|
|
229
|
+
## [1.13.0] - 2026-11-19
|
|
230
|
+
|
|
231
|
+
New components and fixes. Nothing is removed or renamed, so existing code keeps
|
|
232
|
+
working. One component looks different: `Reveal` (see Changed).
|
|
233
|
+
|
|
234
|
+
### Added
|
|
235
|
+
- **`Trace`**: a list of an agent's steps, one line each. A line can show its
|
|
236
|
+
status (running, failed, waiting) and open to show more.
|
|
237
|
+
- **`QrCode`**: draws a QR code as an SVG, dark on light in every theme. Needs
|
|
238
|
+
the new optional peer dependency `qrcode` (`npm install qrcode`).
|
|
239
|
+
- **`RangeField`**: a number in a range, with a slider, a box to type the exact
|
|
240
|
+
value, and − / + buttons. With `wrap`, − and + go round (like a compass).
|
|
241
|
+
- **`Keyframes`** and **`KeyframesMotion`**: simple SMIL animations on SVG
|
|
242
|
+
elements, which stay still when the person prefers reduced motion.
|
|
243
|
+
- **`FloatingWindow` can be resized**: pass `onResize` (with `resizeLabel`) to
|
|
244
|
+
get a handle in its corner. The app keeps the size, like the position (`size`,
|
|
245
|
+
`minSize`).
|
|
246
|
+
- **`ShowcaseCard` `layout="row"`**: the picture on the left and the text on the
|
|
247
|
+
right. A new `engage` prop passes pointer and focus handlers to the card.
|
|
248
|
+
- **`SearchBox` `clearLabel`**: the clear button's name for screen readers, in
|
|
249
|
+
the page's language (default "Clear search").
|
|
250
|
+
- **`animate-highlight`**: a short tint that fades out, to point at what just
|
|
251
|
+
opened.
|
|
252
|
+
- Demo pages for `Trace`, `QrCode`, `RangeField` and `Keyframes`, and a row
|
|
253
|
+
example for `ShowcaseCard`.
|
|
254
|
+
|
|
255
|
+
### Changed
|
|
256
|
+
- **`Reveal` no longer hides its content while it waits.** It used to wait
|
|
257
|
+
invisible and fade in, so a section could stay blank in a screenshot, in a
|
|
258
|
+
background tab or with reduced motion. It now waits slightly lower and rises
|
|
259
|
+
into place.
|
|
260
|
+
|
|
261
|
+
### Fixed
|
|
262
|
+
- **`SearchBox`**: when empty, it showed a disabled button with no name, which
|
|
263
|
+
screen readers announced. It now shows a plain magnifier icon.
|
|
264
|
+
- **`Alert`, `IconTextActionCard` and `SimpleClickableCard`**: a description
|
|
265
|
+
passed as elements (several lines, a link) was drawn larger than a text
|
|
266
|
+
description. Both now look the same.
|
|
267
|
+
- **`VerticalStepper`**: a step with only a title now lines up with its icon,
|
|
268
|
+
and an empty description no longer adds a blank line.
|
|
269
|
+
- **`SectionCard`**: in a narrow card, the collapse chevron no longer drops to a
|
|
270
|
+
line of its own.
|
|
271
|
+
|
|
7
272
|
## [1.12.0] - 2026-11-13
|
|
8
273
|
|
|
9
274
|
Everything in this release is additive except the visual changes under
|
package/README.md
CHANGED
|
@@ -117,6 +117,7 @@ npm install @tanstack/react-table # DataTable component
|
|
|
117
117
|
npm install react-hook-form # Form component
|
|
118
118
|
npm install shiki # Code component
|
|
119
119
|
npm install recharts # Chart components
|
|
120
|
+
npm install qrcode # QrCode component
|
|
120
121
|
```
|
|
121
122
|
|
|
122
123
|
### Optional: JS-config projects (`tailwind.config.ts`)
|
|
@@ -209,7 +210,7 @@ All tokens live in the library's [`src/styles/colors.css`](./src/styles/colors.c
|
|
|
209
210
|
|
|
210
211
|
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).
|
|
211
212
|
|
|
212
|
-
**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`)
|
|
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`). Text **sizes** are the type-scale role tokens `--espd-type-<role>-size|line|weight`: see [Type scale (text sizes)](#type-scale-text-sizes).
|
|
213
214
|
|
|
214
215
|
**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)):
|
|
215
216
|
`--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)
|
|
@@ -356,6 +357,50 @@ registerDensity('kiosk', { '--espd-control-height-lg': '3.5rem', '--espd-item-he
|
|
|
356
357
|
|
|
357
358
|
`listStyleValues(axis)` returns the built-ins plus registered values; built-ins cannot be replaced.
|
|
358
359
|
|
|
360
|
+
### Type scale (text sizes)
|
|
361
|
+
|
|
362
|
+
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:
|
|
363
|
+
|
|
364
|
+
| Role | Used for | Phone (px, size / line) | From 768px | Weight |
|
|
365
|
+
|---|---|---|---|---|
|
|
366
|
+
| `display` | Marketing headline | fluid 40→88 / 1.04 | same | 800 |
|
|
367
|
+
| `lead` | The paragraph under a display headline | fluid 17→21 / 1.6 | same | 400 |
|
|
368
|
+
| `title` | A page's heading | 22 / 28 | 26 / 32 | 700 |
|
|
369
|
+
| `headline` | A section of a page | 18 / 24 | 20 / 28 | 600 |
|
|
370
|
+
| `heading` | A card, panel or dialog title | 16 / 22 | same | 600 |
|
|
371
|
+
| `subheading` | A smaller title (an alert's, a list group's) | 14 / 20 | same | 600 |
|
|
372
|
+
| `prose` | Long reading text | 16 / 24 | 16 / 26 | 400 |
|
|
373
|
+
| `body` | Running text in an interface | 14 / 21 | same | 400 |
|
|
374
|
+
| `secondary` | A supporting line under a title, card meta | 13 / 18 | same | 400 |
|
|
375
|
+
| `caption` | Timestamps, counts, hints, badges | 12 / 16 | same | 400 |
|
|
376
|
+
| `label` | Form labels, tab, menu and button text | 14 / 20 | same | 500 |
|
|
377
|
+
| `input` | What a person types, and its placeholder | 16 / 24 | 14 / 20 | 400 |
|
|
378
|
+
| `code` | Code, logs, file paths (with `font-mono`) | 12 / 18 | 13 / 20 | 400 |
|
|
379
|
+
|
|
380
|
+
Use a role in your own markup with its utility, `type-<role>`, or a `Typography` variant of the same name:
|
|
381
|
+
|
|
382
|
+
```tsx
|
|
383
|
+
<p className="type-body">The update finished.</p>
|
|
384
|
+
<span className="type-caption text-muted-foreground">Updated 2 min ago</span>
|
|
385
|
+
<Typography variant="heading">Firmware</Typography>
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
`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`).
|
|
389
|
+
|
|
390
|
+
**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:
|
|
391
|
+
|
|
392
|
+
```css
|
|
393
|
+
:root {
|
|
394
|
+
--espd-type-body-size: 0.9375rem; /* 15px running text */
|
|
395
|
+
--espd-type-body-line: 1.375rem;
|
|
396
|
+
}
|
|
397
|
+
@media (width >= 48rem) {
|
|
398
|
+
:root { --espd-type-title-size: 1.75rem; }
|
|
399
|
+
}
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
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"`.
|
|
403
|
+
|
|
359
404
|
### Tips
|
|
360
405
|
|
|
361
406
|
- Put your overrides **after** the `@import` line; CSS cascade order is what makes the override win.
|
|
@@ -569,7 +614,7 @@ This library is shipped as **pre-built ESM**, one module per source file (Vite).
|
|
|
569
614
|
### How to keep consumer builds sensible
|
|
570
615
|
|
|
571
616
|
1. Import from the narrowest [entry point](#entry-points): a single component (`/components/button`), a heavy family (`/charts`, `/date`, …), or a surface (`/components`, `/layouts`, …) rather than the root package.
|
|
572
|
-
2. Install **optional peer dependencies** only for features you use (`@tanstack/react-table`, `react-hook-form`, `shiki`, `recharts`).
|
|
617
|
+
2. Install **optional peer dependencies** only for features you use (`@tanstack/react-table`, `react-hook-form`, `shiki`, `recharts`, `qrcode`).
|
|
573
618
|
3. Prefer **production builds** when measuring size; dev servers and Babel-on-vendor paths often look worse than optimized output.
|
|
574
619
|
4. For web apps, use a **bundle analyzer** on your app if you need to chase kilobytes; expect a sizable vendor chunk for a full-featured UI kit.
|
|
575
620
|
|
|
@@ -649,6 +694,7 @@ version you have installed is the shipped type declarations:
|
|
|
649
694
|
| ScrollArea | Custom scrollable container |
|
|
650
695
|
| Form / Label / Checkbox | Form controls |
|
|
651
696
|
| Button / ButtonGroup / InvertButton / FlashButton | Standard and grouped buttons, plus the invert-on-hover and random-flash pill variants |
|
|
697
|
+
| 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 |
|
|
652
698
|
| Card | Content card container |
|
|
653
699
|
| Input / InputPassword / Textarea | Text input fields |
|
|
654
700
|
| InputOTP | One-time-code input — grouped slots, numeric or alphanumeric, custom regex |
|
|
@@ -680,12 +726,13 @@ version you have installed is the shipped type declarations:
|
|
|
680
726
|
| PreviewCard | Content preview card |
|
|
681
727
|
| Carousel | Slide carousel — horizontal/vertical, dots, arrows or custom navigation, optional autoplay |
|
|
682
728
|
| Coverflow | 3D ring of image cards on a glass reflection, with a caption under the front item; endless, optional autoplay |
|
|
683
|
-
| ShowcaseCard | Catalogue card on `MediaCard`: picture with a slide-up actions strip, a title that opens a page, an app route or an action, meta and footer rows |
|
|
729
|
+
| ShowcaseCard | Catalogue card on `MediaCard`: picture with a slide-up actions strip, a title that opens a page, an app route or an action, meta and footer rows; `layout="row"` puts the picture at the left |
|
|
684
730
|
| ChoiceCard | A card you click to choose something: one toggle button, picture on a mist, ring and tick when selected, greyed with its reason when disabled; `stack` or `row` layout |
|
|
685
731
|
| Toolbar / ToolbarButton | Thin bar of small controls with start, centre and end slots and arrow-key focus movement; 28px icon-only buttons with tooltip, toggle state, count or attention dot |
|
|
686
732
|
| ResizableGroup / ResizablePanel / ResizableSeparator | Panels resized by dragging or the keyboard (react-resizable-panels), with a remembered layout and collapsible panels |
|
|
687
733
|
| ColumnPanel | A resizable panel shown and hidden by a flag, staying mounted (and inert) while hidden; `usePanelFlag` drives any collapsible panel the same way |
|
|
688
|
-
| FloatingWindow | Small draggable non-modal window with minimize-to-pill, dock and close |
|
|
734
|
+
| FloatingWindow | Small draggable, optionally resizable non-modal window with minimize-to-pill, dock and close |
|
|
735
|
+
| 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 |
|
|
689
736
|
| AnchoredPanel | Small non-modal panel attached to a point by a leader line, beside the thing it edits |
|
|
690
737
|
| NoticeStrip | Full-width line of news (info, warning, error) across the top of a canvas, with actions and an optional dismiss |
|
|
691
738
|
| Readout | Instrument display: monospace values and units on a dark plate, optionally a toggle button |
|
|
@@ -693,7 +740,11 @@ version you have installed is the shipped type declarations:
|
|
|
693
740
|
| FiltersPanel / FilterGroup / FiltersPill / ActiveFilters | Catalogue filters: a side panel of counted groups with show-more and per-group search, folding into a floating pill, plus removable active-filter tags |
|
|
694
741
|
| InputGroup / InputGroupTextarea / InputGroupAddon | A field and its controls in one bordered box with a shared focus ring; an auto-growing text area |
|
|
695
742
|
| Bubble / MessageScroller | A conversation: one turn's text (tinted for the person's own words), and a scrolling log that follows new messages and offers a jump to the latest |
|
|
696
|
-
|
|
|
743
|
+
| Trace | An agent's steps, one line each (icon, title, description, status), each able to open to show more; a running title shimmers |
|
|
744
|
+
| Reveal | One part of a section's entrance, rising into place when revealed, staggered by order; fully drawn while it waits |
|
|
745
|
+
| QrCode | A QR code drawn as SVG, dark on light in every theme (optional peer `qrcode`) |
|
|
746
|
+
| RangeField | One number in a range: a slider, a box to type it, and − / + that can go round (a compass) |
|
|
747
|
+
| Keyframes | One SMIL animation on an SVG element as values at times; still under reduced motion (`KeyframesMotion`) |
|
|
697
748
|
| CheckBadge | Small success circle with a tick, for inside an SVG scene |
|
|
698
749
|
| PageContainer | Page wrapper with header |
|
|
699
750
|
| DynamicList | Dynamic item list |
|
|
@@ -708,7 +759,7 @@ version you have installed is the shipped type declarations:
|
|
|
708
759
|
| Component | Description |
|
|
709
760
|
|-----------|-------------|
|
|
710
761
|
| WorkspaceLayout | Full dashboard shell with sidebar, header, and footer |
|
|
711
|
-
| 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-*` |
|
|
762
|
+
| 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-*` |
|
|
712
763
|
| EntryLayout | Authentication and entry page layout — supports a custom right panel, and hiding the logo, footer, background image or right panel entirely |
|
|
713
764
|
|
|
714
765
|
### Common (`/common`)
|
|
@@ -958,8 +1009,8 @@ feature/add-date-picker
|
|
|
958
1009
|
The release and publishing flow is maintained internally by Espressif and is
|
|
959
1010
|
documented in [`RELEASING.md`](./RELEASING.md) (not included in the published npm
|
|
960
1011
|
package). In short: pushing a `vX.Y.Z` tag triggers CI, which builds, runs
|
|
961
|
-
typecheck
|
|
962
|
-
internal GitLab registry.
|
|
1012
|
+
typecheck, tests and the API/stylesheet checks on Node 24.18, packs the tarball,
|
|
1013
|
+
and publishes that tested tarball to public npm and the internal GitLab registry.
|
|
963
1014
|
|
|
964
1015
|
------------------------------------------------------------------------
|
|
965
1016
|
|
|
@@ -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-
|
|
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-
|
|
6
|
-
import { I as IconTextActionCardActionsPlacement } from './icon-text-action-card.props-
|
|
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
|
|
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, {
|