@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.
Files changed (192) hide show
  1. package/.claude/rules/dashboard-ui-consumption.md +63 -2
  2. package/.cursor/rules/dashboard-ui-consumption.mdc +61 -3
  3. package/CHANGELOG.md +265 -0
  4. package/README.md +59 -8
  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/badge/index.d.ts +1 -1
  17. package/dist/components/bottom-sheet/_hooks/use-sheet-drag.js +112 -0
  18. package/dist/components/bottom-sheet/bottom-sheet.js +84 -0
  19. package/dist/components/bottom-sheet/index.d.ts +50 -0
  20. package/dist/components/bottom-sheet/index.js +3 -0
  21. package/dist/components/bubble/bubble.js +1 -1
  22. package/dist/components/calendar/calendar.js +5 -5
  23. package/dist/components/cards/animated-card/animated-card.js +1 -1
  24. package/dist/components/cards/basic-details-card.js +2 -2
  25. package/dist/components/cards/collapsible-card.js +1 -1
  26. package/dist/components/cards/index.d.ts +2 -2
  27. package/dist/components/cards/no-data-card/no-data-card.js +2 -2
  28. package/dist/components/cards/section-card.js +49 -41
  29. package/dist/components/cards/simple-card.js +2 -5
  30. package/dist/components/category-card/category-card.js +2 -2
  31. package/dist/components/chart/chart.js +4 -4
  32. package/dist/components/chart/donut-chart.js +1 -1
  33. package/dist/components/chart/treemap-chart.js +1 -1
  34. package/dist/components/choice-card/choice-card.js +3 -3
  35. package/dist/components/code-editor/code-editor.js +4 -3
  36. package/dist/components/data-table/table-header.js +1 -1
  37. package/dist/components/date-range-picker/date-range-picker.js +3 -3
  38. package/dist/components/dynamic-list/dynamic-list.js +14 -13
  39. package/dist/components/dynamic-list/index.d.ts +1 -1
  40. package/dist/components/error-display/full-size-error/full-size-error.js +2 -2
  41. package/dist/components/expandable-text/expandable-text-overlay.js +1 -1
  42. package/dist/components/facet-filters/filter-group.js +2 -2
  43. package/dist/components/feature-grid/feature-grid.js +3 -3
  44. package/dist/components/file-input/file-input.js +8 -8
  45. package/dist/components/file-upload/file-upload.js +4 -4
  46. package/dist/components/floating-window/_hooks/use-drag-move.js +1 -0
  47. package/dist/components/floating-window/_hooks/use-resize.js +133 -0
  48. package/dist/components/floating-window/floating-window.js +67 -40
  49. package/dist/components/floating-window/index.d.ts +21 -2
  50. package/dist/components/fullscreen-dialog/fullscreen-dialog.js +1 -1
  51. package/dist/components/gradient-ring-button/_hooks/use-ring-geometry.js +116 -0
  52. package/dist/components/gradient-ring-button/gradient-ring-button.js +44 -0
  53. package/dist/components/gradient-ring-button/gradient-ring.js +77 -0
  54. package/dist/components/gradient-ring-button/index.d.ts +66 -0
  55. package/dist/components/gradient-ring-button/index.js +3 -0
  56. package/dist/components/horizontal-stepper/horizontal-stepper.js +2 -6
  57. package/dist/components/horizontal-stepper/index.d.ts +2 -2
  58. package/dist/components/icon-avatar/index.d.ts +3 -3
  59. package/dist/components/icon-text-action-card/index.d.ts +4 -4
  60. package/dist/components/index.d.ts +14 -8
  61. package/dist/components/index.js +15 -6
  62. package/dist/components/key-value-manager/key-value-manager-add-popover.js +1 -1
  63. package/dist/components/key-value-manager/key-value-manager-table.js +1 -1
  64. package/dist/components/keyframes/index.d.ts +53 -0
  65. package/dist/components/keyframes/index.js +3 -0
  66. package/dist/components/keyframes/keyframes-motion.js +23 -0
  67. package/dist/components/keyframes/keyframes.js +37 -0
  68. package/dist/components/link/link.js +7 -7
  69. package/dist/components/list/list-item.utils.js +5 -4
  70. package/dist/components/list/list.js +1 -1
  71. package/dist/components/list-details/index.d.ts +2 -2
  72. package/dist/components/markdown-content/markdown-content.components.js +2 -2
  73. package/dist/components/media-card/media-card-reveal.js +2 -2
  74. package/dist/components/media-card/media-card.js +2 -2
  75. package/dist/components/monospace-content/index.d.ts +4 -4
  76. package/dist/components/monospace-content/monospace-content.js +9 -11
  77. package/dist/components/nav-bar/nav-bar-mobile-menu.js +3 -3
  78. package/dist/components/nav-bar/nav-bar.js +4 -4
  79. package/dist/components/notice-strip/notice-strip.js +1 -1
  80. package/dist/components/option-card-group/option-card-group.js +2 -2
  81. package/dist/components/overflow-badge-list/index.d.ts +2 -2
  82. package/dist/components/overflow-badge-list/overflow-badge-list.js +3 -3
  83. package/dist/components/page-banner/page-banner.js +1 -1
  84. package/dist/components/page-container/page-container.js +1 -1
  85. package/dist/components/pagination/pagination.js +1 -1
  86. package/dist/components/progress-bar/progress-bar.js +2 -2
  87. package/dist/components/qr-code/index.d.ts +26 -0
  88. package/dist/components/qr-code/index.js +2 -0
  89. package/dist/components/qr-code/qr-code.js +69 -0
  90. package/dist/components/radio-group/radio-group.js +3 -3
  91. package/dist/components/range-field/index.d.ts +45 -0
  92. package/dist/components/range-field/index.js +2 -0
  93. package/dist/components/range-field/range-field.js +161 -0
  94. package/dist/components/readout/readout.js +1 -1
  95. package/dist/components/requirement-list/requirement-list.js +5 -10
  96. package/dist/components/reveal/index.d.ts +6 -3
  97. package/dist/components/reveal/reveal.js +7 -4
  98. package/dist/components/scrollable-sections/scrollable-sections.js +1 -1
  99. package/dist/components/search-box/index.d.ts +3 -1
  100. package/dist/components/search-box/search-box.js +7 -12
  101. package/dist/components/search-field-shell.js +8 -8
  102. package/dist/components/selectable-card-list/selectable-card-list-shared.js +6 -6
  103. package/dist/components/showcase-card/index.d.ts +14 -3
  104. package/dist/components/showcase-card/showcase-card.js +43 -2
  105. package/dist/components/sidebar/sidebar.js +13 -15
  106. package/dist/components/simple-clickable-card/index.d.ts +4 -4
  107. package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +19 -23
  108. package/dist/components/simple-info-card/index.d.ts +3 -3
  109. package/dist/components/simple-list/index.d.ts +1 -1
  110. package/dist/components/simple-list/simple-list.js +8 -8
  111. package/dist/components/simple-paginated-list/simple-paginated-list.js +1 -4
  112. package/dist/components/stat-card/stat-card.js +7 -13
  113. package/dist/components/status-badge/index.d.ts +3 -3
  114. package/dist/components/status-badge/status-badge.js +4 -4
  115. package/dist/components/status-card-list/status-card-list.js +6 -6
  116. package/dist/components/step-tabs/index.d.ts +1 -1
  117. package/dist/components/tag/index.d.ts +1 -1
  118. package/dist/components/tag/tag.js +4 -4
  119. package/dist/components/tag-input/tag-input.js +12 -12
  120. package/dist/components/timeline/timeline.js +2 -2
  121. package/dist/components/toast/index.d.ts +1 -1
  122. package/dist/components/toast/toast.js +2 -2
  123. package/dist/components/toolbar/index.d.ts +5 -2
  124. package/dist/components/toolbar/toolbar-button.js +1 -1
  125. package/dist/components/toolbar/toolbar.js +9 -3
  126. package/dist/components/trace/index.d.ts +49 -0
  127. package/dist/components/trace/index.js +2 -0
  128. package/dist/components/trace/trace.js +109 -0
  129. package/dist/components/transfer-list/transfer-list.js +2 -2
  130. package/dist/components/typography/index.d.ts +12 -3
  131. package/dist/components/typography/typography-variants.js +98 -13
  132. package/dist/components/typography/typography.js +4 -2
  133. package/dist/components/user-type-badge/user-type-badge.js +4 -4
  134. package/dist/components/vertical-stepper/index.d.ts +2 -2
  135. package/dist/components/vertical-stepper/vertical-stepper.js +18 -11
  136. package/dist/core/alert.js +3 -3
  137. package/dist/core/animate-ui/components/animate/code-header.js +1 -1
  138. package/dist/core/animate-ui/components/animate/code.js +1 -1
  139. package/dist/core/animate-ui/components/animate/tabs.js +6 -6
  140. package/dist/core/animate-ui/components/animate/tooltip.js +1 -1
  141. package/dist/core/animate-ui/components/base/progress.js +2 -2
  142. package/dist/core/animate-ui/components/radix/accordion.js +2 -2
  143. package/dist/core/animate-ui/components/radix/dialog.js +2 -2
  144. package/dist/core/animate-ui/components/radix/dropdown-menu.js +6 -6
  145. package/dist/core/animate-ui/components/radix/sheet.js +2 -2
  146. package/dist/core/animate-ui/components/radix/sidebar.js +8 -8
  147. package/dist/core/animate-ui/components/radix/toggle.js +1 -1
  148. package/dist/core/badge.js +1 -1
  149. package/dist/core/breadcrumb.js +1 -1
  150. package/dist/core/button/button.js +2 -2
  151. package/dist/core/button-group.js +1 -1
  152. package/dist/core/button.js +2 -2
  153. package/dist/core/card.js +2 -2
  154. package/dist/core/combobox/combobox.js +3 -3
  155. package/dist/core/command.js +5 -5
  156. package/dist/core/field-label-row.js +4 -4
  157. package/dist/core/form.js +2 -2
  158. package/dist/core/index.d.ts +1 -1
  159. package/dist/core/input/input.js +11 -11
  160. package/dist/core/input-otp/input-otp.js +12 -12
  161. package/dist/core/label.js +1 -1
  162. package/dist/core/select.js +6 -6
  163. package/dist/core/separator.js +1 -1
  164. package/dist/core/table.js +2 -2
  165. package/dist/core/textarea/textarea.js +9 -9
  166. package/dist/{icon-avatar.props-RYtw2eSW.d.ts → icon-avatar.props-BJe0-vva.d.ts} +1 -1
  167. package/dist/{icon-text-action-card.props-B2ggncUK.d.ts → icon-text-action-card.props-BU7yFi2Q.d.ts} +2 -2
  168. package/dist/index.d.ts +14 -8
  169. package/dist/index.js +16 -7
  170. package/dist/layouts/entry-layout/entry-layout.js +1 -1
  171. package/dist/layouts/index.d.ts +21 -6
  172. package/dist/layouts/index.js +1 -1
  173. package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +10 -18
  174. package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +35 -7
  175. package/dist/layouts/workspace-layout/footer/footer.js +1 -1
  176. package/dist/markdown/index.d.ts +4 -4
  177. package/dist/{section-card-B7c5uc08.d.ts → section-card-DqQeQkzU.d.ts} +1 -1
  178. package/dist/{simple-clickable-card.props-BrPCw7CR.d.ts → simple-clickable-card.props-BhhotZMp.d.ts} +2 -2
  179. package/dist/{status-badge.props-lKlEOfRt.d.ts → status-badge.props-BVe8CmQZ.d.ts} +1 -1
  180. package/dist/styles/type-scale.js +153 -0
  181. package/dist/tailwind-preset.js +120 -1
  182. package/dist/toast/index.d.ts +1 -1
  183. package/dist/utils/cn.js +16 -5
  184. package/dist/utils/index.d.ts +31 -2
  185. package/dist/utils/index.js +2 -1
  186. package/dist/utils/variant.js +47 -47
  187. package/dist/{variant-D81RhpbR.d.ts → variant-DjdaxfIA.d.ts} +6 -1
  188. package/dist/{vertical-stepper.props-BXYcbW70.d.ts → vertical-stepper.props-DONJJXIy.d.ts} +1 -0
  189. package/package.json +9 -1
  190. package/src/styles/theme.css +23 -3
  191. package/src/styles/type-scale.css +152 -0
  192. package/tailwind.preset.ts +23 -0
@@ -84,11 +84,11 @@ function getNameChipTint(variant, color) {
84
84
  if (color === "silver") return builtInRow(SILVER_NAME_CHIP_TINT, variant);
85
85
  return builtInRow(NAME_CHIP_TINT, variant)[color];
86
86
  }
87
- var tagSizeVariants = cva("inline-flex min-w-0 max-w-full items-center shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
87
+ var tagSizeVariants = cva("inline-flex min-w-0 max-w-full items-center type-caption shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
88
88
  variants: { size: {
89
- sm: "gap-1 px-1.5 py-0.5 text-xs [&_svg]:size-3",
90
- default: "gap-1.5 px-2 py-1 text-sm [&_svg]:size-3.5",
91
- lg: "gap-2 px-2.5 py-1.5 text-base [&_svg]:size-4"
89
+ sm: "gap-1 px-1.5 py-0.5 [&_svg]:size-3",
90
+ default: "gap-1.5 px-2 py-1 [&_svg]:size-3.5",
91
+ lg: "gap-2 px-2.5 py-1.5 [&_svg]:size-4"
92
92
  } },
93
93
  defaultVariants: { size: "default" }
94
94
  });
@@ -4,16 +4,16 @@ import { Tag } from "../tag/tag.js";
4
4
  import * as React$1 from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/tag-input/tag-input.tsx
7
- var labelClasses = "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
7
+ var labelClasses = "flex items-center gap-2 type-label leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
8
8
  var controlSizeClasses = {
9
- sm: "min-h-8 gap-1 px-2 py-1 text-xs",
10
- default: "min-h-10 gap-1.5 px-3 py-2 text-base md:text-sm",
11
- lg: "min-h-12 gap-2 px-4 py-2 text-lg"
9
+ sm: "min-h-8 gap-1 px-2 py-1 type-input",
10
+ default: "min-h-10 gap-1.5 px-3 py-2 type-input",
11
+ lg: "min-h-12 gap-2 px-4 py-2 type-input"
12
12
  };
13
13
  var inputTextSizeClasses = {
14
- sm: "text-xs",
15
- default: "text-base md:text-sm",
16
- lg: "text-lg"
14
+ sm: "type-input",
15
+ default: "type-input",
16
+ lg: "type-input"
17
17
  };
18
18
  function truncateDisplay(text, maxLen) {
19
19
  if (text.length <= maxLen) return text;
@@ -100,12 +100,12 @@ var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size,
100
100
  children: "*"
101
101
  }) : null]
102
102
  }), hintContent ? /* @__PURE__ */ jsx("span", {
103
- className: "text-sm text-muted-foreground",
103
+ className: "type-caption text-muted-foreground",
104
104
  children: hintContent
105
105
  }) : null]
106
106
  }) : null,
107
107
  !label && hintContent ? /* @__PURE__ */ jsx("span", {
108
- className: "text-sm text-muted-foreground",
108
+ className: "type-caption text-muted-foreground",
109
109
  children: hintContent
110
110
  }) : null,
111
111
  /* @__PURE__ */ jsxs("div", {
@@ -146,17 +146,17 @@ var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size,
146
146
  }),
147
147
  errorContent ? /* @__PURE__ */ jsx("div", {
148
148
  id: `${inputId}-error`,
149
- className: "text-sm text-destructive",
149
+ className: "type-caption text-destructive",
150
150
  children: errorContent
151
151
  }) : null,
152
152
  startHelperContent && !errorContent ? /* @__PURE__ */ jsx("div", {
153
153
  id: `${inputId}-helper`,
154
- className: "text-sm text-muted-foreground",
154
+ className: "type-caption text-muted-foreground",
155
155
  children: startHelperContent
156
156
  }) : null,
157
157
  endHelperContent && !errorContent ? /* @__PURE__ */ jsx("div", {
158
158
  id: `${inputId}-helper`,
159
- className: "text-end text-sm text-muted-foreground",
159
+ className: "text-end type-caption text-muted-foreground",
160
160
  children: endHelperContent
161
161
  }) : null
162
162
  ]
@@ -62,10 +62,10 @@ var Timeline = React$1.forwardRef(function Timeline({ items, pageSize = DEFAULT_
62
62
  /* @__PURE__ */ jsxs("div", {
63
63
  className: "flex min-w-0 flex-col gap-0.5",
64
64
  children: [/* @__PURE__ */ jsx("div", {
65
- className: "min-w-0 text-sm text-foreground [overflow-wrap:anywhere]",
65
+ className: "min-w-0 type-body text-foreground [overflow-wrap:anywhere]",
66
66
  children: item.title
67
67
  }), item.time != null ? /* @__PURE__ */ jsx("div", {
68
- className: "font-mono text-xs text-foreground-secondary",
68
+ className: "type-caption font-mono text-foreground-secondary",
69
69
  children: item.time
70
70
  }) : null]
71
71
  })
@@ -3,7 +3,7 @@ import { ToasterProps } from 'sonner';
3
3
  import * as React from 'react';
4
4
  import { C as Color } from '../../index-BQANnKs9.js';
5
5
  import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
6
- import { f as Variant } from '../../variant-D81RhpbR.js';
6
+ import { f as Variant } from '../../variant-DjdaxfIA.js';
7
7
 
8
8
  type ToastColor = Color;
9
9
  type ToastVariant = Variant;
@@ -83,10 +83,10 @@ var Toast = React$1.forwardRef(({ icon, title, children, type, color, variant, h
83
83
  /* @__PURE__ */ jsxs("div", {
84
84
  className: "flex min-w-0 flex-1 flex-col gap-1",
85
85
  children: [title && /* @__PURE__ */ jsx("div", {
86
- className: "font-medium leading-normal text-sm",
86
+ className: "type-subheading font-medium",
87
87
  children: title
88
88
  }), children && /* @__PURE__ */ jsx("div", {
89
- className: cn("text-sm leading-normal", styles.description),
89
+ className: cn("type-body", styles.description),
90
90
  style: styles.descriptionStyle,
91
91
  children
92
92
  })]
@@ -22,8 +22,11 @@ interface ToolbarProps {
22
22
  /**
23
23
  * A thin bar of small controls across the top of a work area — 44px, so
24
24
  * 28px controls (`ToolbarButton`) sit in it with air on both sides. Three
25
- * slots: the start and end share the width, so the centre is centred on the
26
- * bar, not between whatever the sides happen to hold. A bottom rule in the
25
+ * slots: with a centre, the start and end share the width, so the centre is
26
+ * centred on the bar, not between whatever the sides happen to hold. With no
27
+ * centre there is nothing to keep centred: the end takes only the width its
28
+ * controls need and the start the rest, so a title there truncates as late as
29
+ * possible (a narrow phone). A bottom rule in the
27
30
  * border colour every panel edge uses, so the bar and the columns under it
28
31
  * read as one grid. Left/Right arrows move between its controls.
29
32
  */
@@ -30,7 +30,7 @@ function ToolbarButton({ label, icon, onClick, pressed, tooltip, count = 0, atte
30
30
  }),
31
31
  count > 0 && /* @__PURE__ */ jsx("span", {
32
32
  "aria-hidden": true,
33
- className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-xs leading-none font-semibold text-primary-foreground",
33
+ className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 type-caption leading-none font-semibold text-primary-foreground",
34
34
  children: count
35
35
  })
36
36
  ]
@@ -24,8 +24,11 @@ function moveFocus(event) {
24
24
  /**
25
25
  * A thin bar of small controls across the top of a work area — 44px, so
26
26
  * 28px controls (`ToolbarButton`) sit in it with air on both sides. Three
27
- * slots: the start and end share the width, so the centre is centred on the
28
- * bar, not between whatever the sides happen to hold. A bottom rule in the
27
+ * slots: with a centre, the start and end share the width, so the centre is
28
+ * centred on the bar, not between whatever the sides happen to hold. With no
29
+ * centre there is nothing to keep centred: the end takes only the width its
30
+ * controls need and the start the rest, so a title there truncates as late as
31
+ * possible (a narrow phone). A bottom rule in the
29
32
  * border colour every panel edge uses, so the bar and the columns under it
30
33
  * read as one grid. Left/Right arrows move between its controls.
31
34
  */
@@ -38,15 +41,18 @@ function Toolbar({ label, start, center, end, tone = "page", className }) {
38
41
  className: cn("flex h-11 shrink-0 items-center gap-2 border-b border-border px-2", tone === "dark" ? "dark bg-sidebar text-foreground" : "bg-background", className),
39
42
  children: [
40
43
  /* @__PURE__ */ jsx("div", {
44
+ "data-slot": "toolbar-start",
41
45
  className: "flex min-w-0 flex-1 items-center gap-2",
42
46
  children: start
43
47
  }),
44
48
  center && /* @__PURE__ */ jsx("div", {
49
+ "data-slot": "toolbar-center",
45
50
  className: "flex min-w-0 shrink-0 items-center justify-center",
46
51
  children: center
47
52
  }),
48
53
  /* @__PURE__ */ jsx("div", {
49
- className: "flex min-w-0 flex-1 items-center justify-end gap-2",
54
+ "data-slot": "toolbar-end",
55
+ className: cn("flex min-w-0 items-center justify-end gap-2", center ? "flex-1" : "flex-none"),
50
56
  children: end
51
57
  })
52
58
  ]
@@ -0,0 +1,49 @@
1
+ import * as React from 'react';
2
+ import { Collapsible, CollapsibleContent } from '../collapsible/index.js';
3
+ import '@radix-ui/react-collapsible';
4
+
5
+ /** How a step stands: running (its title shimmers), failed, or waiting to start. Unset: done. */
6
+ type TraceStatus = "running" | "error" | "pending";
7
+ interface TraceProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ /** `sm` for a dense list beside a conversation (12px text), `md` (14px) on its own. Default `md`. */
9
+ size?: "sm" | "md";
10
+ }
11
+ interface TraceLineProps extends React.HTMLAttributes<HTMLSpanElement> {
12
+ status?: TraceStatus;
13
+ }
14
+ type TraceIconProps = React.HTMLAttributes<HTMLSpanElement>;
15
+ interface TraceTitleProps extends React.HTMLAttributes<HTMLSpanElement> {
16
+ /** A plain string shimmers while its line is running; anything else is drawn as it is. */
17
+ children?: React.ReactNode;
18
+ }
19
+ type TraceDescriptionProps = React.HTMLAttributes<HTMLSpanElement>;
20
+ type TraceCollapsibleProps = React.ComponentPropsWithoutRef<typeof Collapsible>;
21
+ type TraceCollapsibleTriggerProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
22
+ type TraceCollapsibleContentProps = React.ComponentPropsWithoutRef<typeof CollapsibleContent>;
23
+
24
+ /**
25
+ * An agent's steps, one line each: what it read, ran, changed or thought,
26
+ * in the order it did them. A line names the action with an icon and a title,
27
+ * may carry a short description (a diff stat, a duration, a count) and a
28
+ * status, and may open to show more (`TraceCollapsible`). The pattern of
29
+ * shadcn's AI Elements Trace, on this library's tokens.
30
+ *
31
+ * Status is colour and motion, so say it in the title too ("Build failed").
32
+ */
33
+ declare function Trace({ size, className, ...props }: TraceProps): React.JSX.Element;
34
+ /** One step: an icon, a title, an optional description. A span, so it is not a tab stop unless a trigger or link wraps it. */
35
+ declare function TraceLine({ status, className, ...props }: TraceLineProps): React.JSX.Element;
36
+ /** The icon naming the action (before the title) or showing a state (after it). Decorative: the title says it. */
37
+ declare function TraceIcon({ className, ...props }: TraceIconProps): React.JSX.Element;
38
+ /** The step in words, on one line (truncated). A string title shimmers while its line runs, unless the person asks for reduced motion. */
39
+ declare function TraceTitle({ children, className, ...props }: TraceTitleProps): React.JSX.Element;
40
+ /** Secondary text after the title: a diff stat, a duration, a count. Never truncated. */
41
+ declare function TraceDescription({ className, ...props }: TraceDescriptionProps): React.JSX.Element;
42
+ /** A line that opens to show more. Closed unless `defaultOpen` or `open` says otherwise. */
43
+ declare function TraceCollapsible({ className, ...props }: TraceCollapsibleProps): React.JSX.Element;
44
+ /** The button that opens and closes the line: wrap the `TraceLine` in it. A chevron follows the line. */
45
+ declare function TraceCollapsibleTrigger({ className, children, ...props }: TraceCollapsibleTriggerProps): React.JSX.Element;
46
+ /** What the line opens to, set in under its title. */
47
+ declare function TraceCollapsibleContent({ className, ...props }: TraceCollapsibleContentProps): React.JSX.Element;
48
+
49
+ export { Trace, TraceCollapsible, TraceCollapsibleContent, type TraceCollapsibleContentProps, type TraceCollapsibleProps, TraceCollapsibleTrigger, type TraceCollapsibleTriggerProps, TraceDescription, type TraceDescriptionProps, TraceIcon, type TraceIconProps, TraceLine, type TraceLineProps, type TraceProps, type TraceStatus, TraceTitle, type TraceTitleProps };
@@ -0,0 +1,2 @@
1
+ import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle } from "./trace.js";
2
+ export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
@@ -0,0 +1,109 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.js";
3
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../core/collapsible.js";
4
+ import { usePrefersReducedMotion } from "../../core/hooks/use-prefers-reduced-motion.js";
5
+ import { ShimmeringText } from "../text-effects/shimmer-text/shimmer-text.js";
6
+ import * as React$1 from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { ChevronRight } from "lucide-react";
9
+ //#region src/components/trace/trace.tsx
10
+ var SizeContext = React$1.createContext("md");
11
+ var StatusContext = React$1.createContext(void 0);
12
+ /**
13
+ * An agent's steps, one line each: what it read, ran, changed or thought,
14
+ * in the order it did them. A line names the action with an icon and a title,
15
+ * may carry a short description (a diff stat, a duration, a count) and a
16
+ * status, and may open to show more (`TraceCollapsible`). The pattern of
17
+ * shadcn's AI Elements Trace, on this library's tokens.
18
+ *
19
+ * Status is colour and motion, so say it in the title too ("Build failed").
20
+ */
21
+ function Trace({ size = "md", className, ...props }) {
22
+ return /* @__PURE__ */ jsx(SizeContext.Provider, {
23
+ value: size,
24
+ children: /* @__PURE__ */ jsx("div", {
25
+ "data-slot": "trace",
26
+ className: cn("flex min-w-0 flex-col gap-0.5 type-body", size === "sm" ? "leading-5" : "leading-6", className),
27
+ ...props
28
+ })
29
+ });
30
+ }
31
+ /** One step: an icon, a title, an optional description. A span, so it is not a tab stop unless a trigger or link wraps it. */
32
+ function TraceLine({ status, className, ...props }) {
33
+ return /* @__PURE__ */ jsx(StatusContext.Provider, {
34
+ value: status,
35
+ children: /* @__PURE__ */ jsx("span", {
36
+ "data-slot": "trace-line",
37
+ "data-status": status ?? "done",
38
+ className: cn("flex min-w-0 items-center gap-1.5 text-foreground-muted", status === "error" && "text-error", status === "pending" && "text-foreground-disabled", className),
39
+ ...props
40
+ })
41
+ });
42
+ }
43
+ /** The icon naming the action (before the title) or showing a state (after it). Decorative: the title says it. */
44
+ function TraceIcon({ className, ...props }) {
45
+ return /* @__PURE__ */ jsx("span", {
46
+ "aria-hidden": true,
47
+ "data-slot": "trace-icon",
48
+ className: cn("inline-flex shrink-0 items-center justify-center", React$1.useContext(SizeContext) === "sm" ? "[&_svg]:size-3.5" : "[&_svg]:size-4", className),
49
+ ...props
50
+ });
51
+ }
52
+ /** The step in words, on one line (truncated). A string title shimmers while its line runs, unless the person asks for reduced motion. */
53
+ function TraceTitle({ children, className, ...props }) {
54
+ const status = React$1.useContext(StatusContext);
55
+ const reduced = usePrefersReducedMotion();
56
+ const shimmer = status === "running" && !reduced && typeof children === "string";
57
+ return /* @__PURE__ */ jsx("span", {
58
+ "data-slot": "trace-title",
59
+ className: cn("min-w-0 truncate", status === "running" && "text-foreground-secondary", className),
60
+ ...props,
61
+ children: shimmer ? /* @__PURE__ */ jsx(ShimmeringText, {
62
+ text: children,
63
+ color: "var(--color-foreground-muted)",
64
+ shimmeringColor: "var(--color-foreground)"
65
+ }) : children
66
+ });
67
+ }
68
+ /** Secondary text after the title: a diff stat, a duration, a count. Never truncated. */
69
+ function TraceDescription({ className, ...props }) {
70
+ return /* @__PURE__ */ jsx("span", {
71
+ "data-slot": "trace-description",
72
+ className: cn("shrink-0 tabular-nums text-foreground-muted", className),
73
+ ...props
74
+ });
75
+ }
76
+ /** A line that opens to show more. Closed unless `defaultOpen` or `open` says otherwise. */
77
+ function TraceCollapsible({ className, ...props }) {
78
+ return /* @__PURE__ */ jsx(Collapsible, {
79
+ "data-slot": "trace-collapsible",
80
+ className: cn("group/trace min-w-0", className),
81
+ ...props
82
+ });
83
+ }
84
+ /** The button that opens and closes the line: wrap the `TraceLine` in it. A chevron follows the line. */
85
+ function TraceCollapsibleTrigger({ className, children, ...props }) {
86
+ return /* @__PURE__ */ jsx(CollapsibleTrigger, {
87
+ asChild: true,
88
+ children: /* @__PURE__ */ jsxs("button", {
89
+ type: "button",
90
+ "data-slot": "trace-collapsible-trigger",
91
+ className: cn("group/trigger flex w-full min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left outline-none", "hover:[&_[data-slot=trace-line][data-status=done]]:text-foreground focus-visible:ring-2 focus-visible:ring-ring", className),
92
+ ...props,
93
+ children: [children, /* @__PURE__ */ jsx(ChevronRight, {
94
+ "aria-hidden": true,
95
+ className: "size-3.5 shrink-0 text-foreground-muted transition-transform group-data-[state=open]/trigger:rotate-90 motion-reduce:transition-none"
96
+ })]
97
+ })
98
+ });
99
+ }
100
+ /** What the line opens to, set in under its title. */
101
+ function TraceCollapsibleContent({ className, ...props }) {
102
+ return /* @__PURE__ */ jsx(CollapsibleContent, {
103
+ "data-slot": "trace-collapsible-content",
104
+ className: cn("pt-1 pb-1.5 pl-5 text-foreground-muted", className),
105
+ ...props
106
+ });
107
+ }
108
+ //#endregion
109
+ export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
@@ -89,7 +89,7 @@ function filterItemsByQuery(items, query, getLabel) {
89
89
  }
90
90
  function TransferListItems({ filteredItems, items, selectedIds, getItemId, getItemLabel, isItemDisabled, renderItem, disabled, rowVariants, onChecked }) {
91
91
  if (filteredItems.length === 0) return /* @__PURE__ */ jsx("p", {
92
- className: "px-1 py-2 text-sm text-muted-foreground",
92
+ className: "px-1 py-2 type-body text-muted-foreground",
93
93
  children: items.length === 0 ? "No items" : "No matching items"
94
94
  });
95
95
  return /* @__PURE__ */ jsx(AnimatePresence, {
@@ -113,7 +113,7 @@ function TransferListItems({ filteredItems, items, selectedIds, getItemId, getIt
113
113
  onCheckedChange: (state) => onChecked(id, state),
114
114
  "aria-label": label
115
115
  }), /* @__PURE__ */ jsx("span", {
116
- className: "min-w-0 flex-1 text-sm text-foreground",
116
+ className: "min-w-0 flex-1 type-body text-foreground",
117
117
  children: renderItem?.(item) ?? label
118
118
  })]
119
119
  }, id);
@@ -1,14 +1,23 @@
1
1
  import * as React from 'react';
2
2
  import { JSX, HTMLAttributes } from 'react';
3
3
 
4
- declare const TYPOGRAPHY_VARIANTS: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "body1", "body2", "subtitle1", "subtitle2"];
4
+ declare const TYPOGRAPHY_VARIANTS: readonly ["display", "lead", "title", "headline", "heading", "subheading", "prose", "body", "secondary", "caption", "label", "code", "h1", "h2", "h3", "h4", "h5", "h6", "body1", "body2", "subtitle1", "subtitle2"];
5
5
  type TypographyVariant = (typeof TYPOGRAPHY_VARIANTS)[number];
6
- /** Tailwind classes per variant — edit here to tune the type scale. */
6
+ /**
7
+ * Classes per variant. Size, line height and weight come from the role's
8
+ * `type-*` utility only (the tokens in `type-scale.css`), so a theme that
9
+ * changes a role changes every variant on it. Tune the scale there, not here.
10
+ */
7
11
  declare const typographyVariantClasses: Record<TypographyVariant, string>;
8
- /** Default semantic tag per variant (Material UI–aligned). */
12
+ /** Default semantic tag per variant. */
9
13
  declare const typographyDefaultElement: Record<TypographyVariant, keyof JSX.IntrinsicElements>;
10
14
 
11
15
  interface TypographyProps extends HTMLAttributes<HTMLElement> {
16
+ /**
17
+ * A role of the type scale (`title`, `heading`, `body`, `caption`, …), or one
18
+ * of the variants before 1.14 (`h1`…`h6`, `body1`, `body2`, `subtitle1`,
19
+ * `subtitle2`), each an alias of a role. Default `body1` (the `prose` role).
20
+ */
12
21
  variant?: TypographyVariant;
13
22
  /** Override the rendered element while keeping variant styles (e.g. `as="span"` with `variant="h1"`). */
14
23
  as?: keyof JSX.IntrinsicElements;
@@ -1,5 +1,17 @@
1
1
  //#region src/components/typography/typography-variants.ts
2
2
  var TYPOGRAPHY_VARIANTS = [
3
+ "display",
4
+ "lead",
5
+ "title",
6
+ "headline",
7
+ "heading",
8
+ "subheading",
9
+ "prose",
10
+ "body",
11
+ "secondary",
12
+ "caption",
13
+ "label",
14
+ "code",
3
15
  "h1",
4
16
  "h2",
5
17
  "h3",
@@ -11,21 +23,94 @@ var TYPOGRAPHY_VARIANTS = [
11
23
  "subtitle1",
12
24
  "subtitle2"
13
25
  ];
14
- /** Tailwind classes per variant — edit here to tune the type scale. */
26
+ /**
27
+ * Classes per variant. Size, line height and weight come from the role's
28
+ * `type-*` utility only (the tokens in `type-scale.css`), so a theme that
29
+ * changes a role changes every variant on it. Tune the scale there, not here.
30
+ */
15
31
  var typographyVariantClasses = {
16
- h1: "text-3xl font-bold tracking-tight",
17
- h2: "text-2xl font-bold tracking-tight",
18
- h3: "text-xl font-semibold tracking-tight",
19
- h4: "text-lg font-semibold",
20
- h5: "text-base font-semibold",
21
- h6: "text-sm font-semibold",
22
- subtitle1: "text-sm font-medium text-muted-foreground",
23
- subtitle2: "text-xs font-medium text-muted-foreground",
24
- body1: "text-base leading-relaxed",
25
- body2: "text-sm leading-normal"
32
+ display: "type-display tracking-tight",
33
+ lead: "type-lead",
34
+ title: "type-title tracking-tight",
35
+ headline: "type-headline tracking-tight",
36
+ heading: "type-heading",
37
+ subheading: "type-subheading",
38
+ prose: "type-prose",
39
+ body: "type-body",
40
+ secondary: "type-secondary",
41
+ caption: "type-caption",
42
+ label: "type-label",
43
+ code: "type-code font-mono",
44
+ h1: "type-title tracking-tight",
45
+ h2: "type-title tracking-tight",
46
+ h3: "type-headline tracking-tight",
47
+ h4: "type-heading",
48
+ h5: "type-heading",
49
+ h6: "type-subheading",
50
+ subtitle1: "type-label text-muted-foreground",
51
+ subtitle2: "type-caption font-medium text-muted-foreground",
52
+ body1: "type-prose",
53
+ body2: "type-body"
26
54
  };
27
- /** Default semantic tag per variant (Material UI–aligned). */
55
+ /** The role each variant is, or aliases. */
56
+ var typographyVariantRole = {
57
+ display: "display",
58
+ lead: "lead",
59
+ title: "title",
60
+ headline: "headline",
61
+ heading: "heading",
62
+ subheading: "subheading",
63
+ prose: "prose",
64
+ body: "body",
65
+ secondary: "secondary",
66
+ caption: "caption",
67
+ label: "label",
68
+ code: "code",
69
+ h1: "title",
70
+ h2: "title",
71
+ h3: "headline",
72
+ h4: "heading",
73
+ h5: "heading",
74
+ h6: "subheading",
75
+ subtitle1: "label",
76
+ subtitle2: "caption",
77
+ body1: "prose",
78
+ body2: "body"
79
+ };
80
+ /**
81
+ * The role's weight on its own, for when a caller's raw text size
82
+ * (`className="text-xs"`) replaces the role: before 1.14 such an override
83
+ * replaced only the variant's size, so the variant's weight is kept. Written
84
+ * out in full so Tailwind finds every class in the built files.
85
+ */
86
+ var typographyRoleWeightClasses = {
87
+ display: "font-[weight:var(--espd-type-display-weight,800)]",
88
+ lead: "font-[weight:var(--espd-type-lead-weight,400)]",
89
+ title: "font-[weight:var(--espd-type-title-weight,700)]",
90
+ headline: "font-[weight:var(--espd-type-headline-weight,600)]",
91
+ heading: "font-[weight:var(--espd-type-heading-weight,600)]",
92
+ subheading: "font-[weight:var(--espd-type-subheading-weight,600)]",
93
+ prose: "font-[weight:var(--espd-type-prose-weight,400)]",
94
+ body: "font-[weight:var(--espd-type-body-weight,400)]",
95
+ secondary: "font-[weight:var(--espd-type-secondary-weight,400)]",
96
+ caption: "font-[weight:var(--espd-type-caption-weight,400)]",
97
+ label: "font-[weight:var(--espd-type-label-weight,500)]",
98
+ code: "font-[weight:var(--espd-type-code-weight,400)]"
99
+ };
100
+ /** Default semantic tag per variant. */
28
101
  var typographyDefaultElement = {
102
+ display: "h1",
103
+ lead: "p",
104
+ title: "h1",
105
+ headline: "h2",
106
+ heading: "h3",
107
+ subheading: "h4",
108
+ prose: "p",
109
+ body: "p",
110
+ secondary: "p",
111
+ caption: "span",
112
+ label: "span",
113
+ code: "code",
29
114
  h1: "h1",
30
115
  h2: "h2",
31
116
  h3: "h3",
@@ -38,4 +123,4 @@ var typographyDefaultElement = {
38
123
  body2: "p"
39
124
  };
40
125
  //#endregion
41
- export { TYPOGRAPHY_VARIANTS, typographyDefaultElement, typographyVariantClasses };
126
+ export { TYPOGRAPHY_VARIANTS, typographyDefaultElement, typographyRoleWeightClasses, typographyVariantClasses, typographyVariantRole };
@@ -1,12 +1,14 @@
1
1
  import { cn } from "../../utils/cn.js";
2
- import { typographyDefaultElement, typographyVariantClasses } from "./typography-variants.js";
2
+ import { typographyDefaultElement, typographyRoleWeightClasses, typographyVariantClasses, typographyVariantRole } from "./typography-variants.js";
3
3
  import * as React$1 from "react";
4
4
  //#region src/components/typography/typography.tsx
5
5
  var Typography = React$1.forwardRef(function Typography({ variant = "body1", as, className, children, ...rest }, ref) {
6
6
  const Component = as ?? typographyDefaultElement[variant];
7
+ const role = typographyVariantRole[variant];
8
+ const sizeOverridden = !!className && !cn(`type-${role}`, className).split(" ").includes(`type-${role}`);
7
9
  return React$1.createElement(Component, {
8
10
  ref,
9
- className: cn("text-foreground", typographyVariantClasses[variant], className),
11
+ className: cn("text-foreground", sizeOverridden && typographyRoleWeightClasses[role], typographyVariantClasses[variant], className),
10
12
  ...rest
11
13
  }, children);
12
14
  });
@@ -5,11 +5,11 @@ import * as React$1 from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { cva } from "class-variance-authority";
7
7
  //#region src/components/user-type-badge/user-type-badge.tsx
8
- var userTypeBadgeSizeVariants = cva("inline-flex font-medium tracking-tight shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
8
+ var userTypeBadgeSizeVariants = cva("inline-flex type-caption font-medium tracking-tight shadow-none transition-shadow duration-200 ease-out hover:shadow-sm [&_svg]:shrink-0", {
9
9
  variants: { size: {
10
- sm: "gap-1 px-1.5 py-0.5 text-xs [&_svg]:size-3",
11
- default: "gap-1.5 px-2 py-1 text-sm [&_svg]:size-3.5",
12
- lg: "gap-2 px-2.5 py-1.5 text-base [&_svg]:size-4"
10
+ sm: "gap-1 px-1.5 py-0.5 [&_svg]:size-3",
11
+ default: "gap-1.5 px-2 py-1 [&_svg]:size-3.5",
12
+ lg: "gap-2 px-2.5 py-1.5 [&_svg]:size-4"
13
13
  } },
14
14
  defaultVariants: { size: "default" }
15
15
  });
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { V as VerticalStepperProps } from '../../vertical-stepper.props-BXYcbW70.js';
3
- export { a as VerticalStepperSize, b as VerticalStepperStep, c as VerticalStepperStepStatus } from '../../vertical-stepper.props-BXYcbW70.js';
2
+ import { V as VerticalStepperProps } from '../../vertical-stepper.props-DONJJXIy.js';
3
+ export { a as VerticalStepperSize, b as VerticalStepperStep, c as VerticalStepperStepStatus } from '../../vertical-stepper.props-DONJJXIy.js';
4
4
 
5
5
  declare function VerticalStepper({ data, onStepClick, size, className, ariaLabel, }: VerticalStepperProps): React.JSX.Element;
6
6