@espressif/dashboard-ui-components 1.13.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 (170) hide show
  1. package/.claude/rules/dashboard-ui-consumption.md +41 -0
  2. package/.cursor/rules/dashboard-ui-consumption.mdc +39 -1
  3. package/CHANGELOG.md +222 -0
  4. package/README.md +50 -4
  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 +12 -12
  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/fullscreen-dialog/fullscreen-dialog.js +1 -1
  47. package/dist/components/gradient-ring-button/_hooks/use-ring-geometry.js +116 -0
  48. package/dist/components/gradient-ring-button/gradient-ring-button.js +44 -0
  49. package/dist/components/gradient-ring-button/gradient-ring.js +77 -0
  50. package/dist/components/gradient-ring-button/index.d.ts +66 -0
  51. package/dist/components/gradient-ring-button/index.js +3 -0
  52. package/dist/components/horizontal-stepper/horizontal-stepper.js +2 -6
  53. package/dist/components/horizontal-stepper/index.d.ts +1 -1
  54. package/dist/components/icon-avatar/index.d.ts +3 -3
  55. package/dist/components/icon-text-action-card/index.d.ts +4 -4
  56. package/dist/components/index.d.ts +9 -7
  57. package/dist/components/index.js +5 -1
  58. package/dist/components/key-value-manager/key-value-manager-add-popover.js +1 -1
  59. package/dist/components/key-value-manager/key-value-manager-table.js +1 -1
  60. package/dist/components/link/link.js +7 -7
  61. package/dist/components/list/list-item.utils.js +5 -4
  62. package/dist/components/list/list.js +1 -1
  63. package/dist/components/list-details/index.d.ts +2 -2
  64. package/dist/components/markdown-content/markdown-content.components.js +2 -2
  65. package/dist/components/media-card/media-card-reveal.js +2 -2
  66. package/dist/components/media-card/media-card.js +2 -2
  67. package/dist/components/monospace-content/index.d.ts +4 -4
  68. package/dist/components/monospace-content/monospace-content.js +9 -11
  69. package/dist/components/nav-bar/nav-bar-mobile-menu.js +3 -3
  70. package/dist/components/nav-bar/nav-bar.js +4 -4
  71. package/dist/components/notice-strip/notice-strip.js +1 -1
  72. package/dist/components/option-card-group/option-card-group.js +2 -2
  73. package/dist/components/overflow-badge-list/index.d.ts +2 -2
  74. package/dist/components/overflow-badge-list/overflow-badge-list.js +3 -3
  75. package/dist/components/page-banner/page-banner.js +1 -1
  76. package/dist/components/page-container/page-container.js +1 -1
  77. package/dist/components/pagination/pagination.js +1 -1
  78. package/dist/components/progress-bar/progress-bar.js +2 -2
  79. package/dist/components/qr-code/qr-code.js +2 -2
  80. package/dist/components/radio-group/radio-group.js +3 -3
  81. package/dist/components/range-field/range-field.js +9 -12
  82. package/dist/components/readout/readout.js +1 -1
  83. package/dist/components/requirement-list/requirement-list.js +5 -10
  84. package/dist/components/scrollable-sections/scrollable-sections.js +1 -1
  85. package/dist/components/search-field-shell.js +8 -8
  86. package/dist/components/selectable-card-list/selectable-card-list-shared.js +6 -6
  87. package/dist/components/showcase-card/showcase-card.js +2 -2
  88. package/dist/components/sidebar/sidebar.js +13 -15
  89. package/dist/components/simple-clickable-card/index.d.ts +4 -4
  90. package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +17 -23
  91. package/dist/components/simple-info-card/index.d.ts +3 -3
  92. package/dist/components/simple-list/index.d.ts +1 -1
  93. package/dist/components/simple-list/simple-list.js +8 -8
  94. package/dist/components/simple-paginated-list/simple-paginated-list.js +1 -4
  95. package/dist/components/stat-card/stat-card.js +7 -13
  96. package/dist/components/status-badge/index.d.ts +3 -3
  97. package/dist/components/status-badge/status-badge.js +4 -4
  98. package/dist/components/status-card-list/status-card-list.js +6 -6
  99. package/dist/components/tag/index.d.ts +1 -1
  100. package/dist/components/tag/tag.js +4 -4
  101. package/dist/components/tag-input/tag-input.js +12 -12
  102. package/dist/components/timeline/timeline.js +2 -2
  103. package/dist/components/toast/index.d.ts +1 -1
  104. package/dist/components/toast/toast.js +2 -2
  105. package/dist/components/toolbar/index.d.ts +5 -2
  106. package/dist/components/toolbar/toolbar-button.js +1 -1
  107. package/dist/components/toolbar/toolbar.js +9 -3
  108. package/dist/components/trace/trace.js +1 -1
  109. package/dist/components/transfer-list/transfer-list.js +2 -2
  110. package/dist/components/typography/index.d.ts +12 -3
  111. package/dist/components/typography/typography-variants.js +98 -13
  112. package/dist/components/typography/typography.js +4 -2
  113. package/dist/components/user-type-badge/user-type-badge.js +4 -4
  114. package/dist/components/vertical-stepper/vertical-stepper.js +11 -7
  115. package/dist/core/alert.js +3 -3
  116. package/dist/core/animate-ui/components/animate/code-header.js +1 -1
  117. package/dist/core/animate-ui/components/animate/code.js +1 -1
  118. package/dist/core/animate-ui/components/animate/tabs.js +6 -6
  119. package/dist/core/animate-ui/components/animate/tooltip.js +1 -1
  120. package/dist/core/animate-ui/components/base/progress.js +2 -2
  121. package/dist/core/animate-ui/components/radix/accordion.js +2 -2
  122. package/dist/core/animate-ui/components/radix/dialog.js +2 -2
  123. package/dist/core/animate-ui/components/radix/dropdown-menu.js +6 -6
  124. package/dist/core/animate-ui/components/radix/sheet.js +2 -2
  125. package/dist/core/animate-ui/components/radix/sidebar.js +8 -8
  126. package/dist/core/animate-ui/components/radix/toggle.js +1 -1
  127. package/dist/core/badge.js +1 -1
  128. package/dist/core/breadcrumb.js +1 -1
  129. package/dist/core/button/button.js +2 -2
  130. package/dist/core/button-group.js +1 -1
  131. package/dist/core/button.js +2 -2
  132. package/dist/core/card.js +2 -2
  133. package/dist/core/combobox/combobox.js +3 -3
  134. package/dist/core/command.js +5 -5
  135. package/dist/core/field-label-row.js +4 -4
  136. package/dist/core/form.js +2 -2
  137. package/dist/core/index.d.ts +1 -1
  138. package/dist/core/input/input.js +11 -11
  139. package/dist/core/input-otp/input-otp.js +12 -12
  140. package/dist/core/label.js +1 -1
  141. package/dist/core/select.js +6 -6
  142. package/dist/core/separator.js +1 -1
  143. package/dist/core/table.js +2 -2
  144. package/dist/core/textarea/textarea.js +9 -9
  145. package/dist/{icon-avatar.props-RYtw2eSW.d.ts → icon-avatar.props-BJe0-vva.d.ts} +1 -1
  146. package/dist/{icon-text-action-card.props-B2ggncUK.d.ts → icon-text-action-card.props-BU7yFi2Q.d.ts} +2 -2
  147. package/dist/index.d.ts +9 -7
  148. package/dist/index.js +6 -2
  149. package/dist/layouts/entry-layout/entry-layout.js +1 -1
  150. package/dist/layouts/index.d.ts +21 -6
  151. package/dist/layouts/index.js +1 -1
  152. package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +10 -18
  153. package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +35 -7
  154. package/dist/layouts/workspace-layout/footer/footer.js +1 -1
  155. package/dist/markdown/index.d.ts +4 -4
  156. package/dist/{section-card-B7c5uc08.d.ts → section-card-DqQeQkzU.d.ts} +1 -1
  157. package/dist/{simple-clickable-card.props-BrPCw7CR.d.ts → simple-clickable-card.props-BhhotZMp.d.ts} +2 -2
  158. package/dist/{status-badge.props-lKlEOfRt.d.ts → status-badge.props-BVe8CmQZ.d.ts} +1 -1
  159. package/dist/styles/type-scale.js +153 -0
  160. package/dist/tailwind-preset.js +120 -1
  161. package/dist/toast/index.d.ts +1 -1
  162. package/dist/utils/cn.js +16 -5
  163. package/dist/utils/index.d.ts +31 -2
  164. package/dist/utils/index.js +2 -1
  165. package/dist/utils/variant.js +47 -47
  166. package/dist/{variant-D81RhpbR.d.ts → variant-DjdaxfIA.d.ts} +6 -1
  167. package/package.json +3 -1
  168. package/src/styles/theme.css +8 -3
  169. package/src/styles/type-scale.css +152 -0
  170. package/tailwind.preset.ts +23 -0
@@ -9,9 +9,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Check, ChevronDown, X } from "lucide-react";
10
10
  //#region src/components/async-multi-select/async-multi-select.tsx
11
11
  var triggerSizeClasses = {
12
- sm: "min-h-8 px-3 text-xs",
13
- default: "min-h-10 px-3.5 py-2 text-base md:text-sm",
14
- lg: "min-h-12 px-5 text-lg"
12
+ sm: "min-h-8 px-3 type-input",
13
+ default: "min-h-10 px-3.5 py-2 type-input",
14
+ lg: "min-h-12 px-5 type-input"
15
15
  };
16
16
  var chevronSizeClasses = {
17
17
  sm: "size-3.5",
@@ -108,7 +108,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
108
108
  children: /* @__PURE__ */ jsx(X, { className: "size-3" })
109
109
  })]
110
110
  }, opt.value)), remaining > 0 && /* @__PURE__ */ jsxs("span", {
111
- className: "text-xs text-muted-foreground",
111
+ className: "type-caption text-muted-foreground",
112
112
  children: [
113
113
  "+",
114
114
  remaining,
@@ -133,7 +133,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
133
133
  className: "flex items-center justify-between",
134
134
  children: /* @__PURE__ */ jsxs("label", {
135
135
  htmlFor: triggerId,
136
- className: "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",
136
+ className: "flex items-center gap-2 type-label leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",
137
137
  children: [label, required && /* @__PURE__ */ jsx("span", {
138
138
  className: "text-destructive",
139
139
  children: "*"
@@ -169,7 +169,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
169
169
  className: "overscroll-contain",
170
170
  children: [
171
171
  action ? options.length === 0 && /* @__PURE__ */ jsx("div", {
172
- className: "py-6 text-center text-sm",
172
+ className: "py-6 text-center type-body",
173
173
  children: emptyContent
174
174
  }) : /* @__PURE__ */ jsx(CommandEmpty, { children: emptyContent }),
175
175
  /* @__PURE__ */ jsx(CommandGroup, {
@@ -190,7 +190,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
190
190
  className: "font-medium leading-relaxed",
191
191
  children: opt.label
192
192
  }), /* @__PURE__ */ jsx("span", {
193
- className: "truncate text-xs font-normal text-muted-foreground",
193
+ className: "truncate type-secondary text-muted-foreground",
194
194
  children: desc
195
195
  })]
196
196
  }) : opt.label]
@@ -223,7 +223,7 @@ function AsyncMultiSelect({ options, multiple = true, value, onValueChange, onSe
223
223
  className: "font-medium leading-relaxed",
224
224
  children: action.label
225
225
  }), action.description && /* @__PURE__ */ jsx("span", {
226
- className: "truncate text-xs font-normal text-muted-foreground",
226
+ className: "truncate type-secondary text-muted-foreground",
227
227
  children: action.description
228
228
  })]
229
229
  })]
@@ -1,7 +1,7 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as React from 'react';
3
3
  import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
4
- import { f as Variant } from '../../variant-D81RhpbR.js';
4
+ import { f as Variant } from '../../variant-DjdaxfIA.js';
5
5
  import { C as Color } from '../../index-BQANnKs9.js';
6
6
 
7
7
  declare const badgeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
@@ -0,0 +1,112 @@
1
+ import { useRef } from "react";
2
+ //#region src/components/bottom-sheet/_hooks/use-sheet-drag.ts
3
+ /** The sheet's two open heights, as a share of the viewport: the `h-1/2` and `h-5/6` the sheet draws with. */
4
+ var SHEET_HEIGHTS = {
5
+ half: .5,
6
+ tall: 5 / 6
7
+ };
8
+ /** Below this share of the viewport a let-go sheet is put away rather than kept open. */
9
+ var CLOSE_BELOW = .3;
10
+ /** A drag no longer than this (px) is a tap: the handle's own click toggles the height. */
11
+ var TAP_SLOP = 6;
12
+ /** A flick: px per ms past which the direction decides, whatever the height. */
13
+ var FLICK = .6;
14
+ /** The drag never makes the sheet smaller or taller than this share of the viewport. */
15
+ var MIN_SHARE = .12;
16
+ var MAX_SHARE = .92;
17
+ /**
18
+ * Where a sheet let go of comes to rest: a quick flick goes the way it was
19
+ * flicked (down from half puts it away), otherwise the nearest open height,
20
+ * or away once dragged low enough. `share` is the sheet's height as a share
21
+ * of the viewport; `velocity` is px per ms, down positive.
22
+ */
23
+ function settleSheet({ share, velocity, from }) {
24
+ if (velocity > FLICK) return from === "tall" && share > SHEET_HEIGHTS.half * .8 ? "half" : "closed";
25
+ if (velocity < -.6) return "tall";
26
+ if (share < CLOSE_BELOW) return "closed";
27
+ return Math.abs(share - SHEET_HEIGHTS.tall) < Math.abs(share - SHEET_HEIGHTS.half) ? "tall" : "half";
28
+ }
29
+ /**
30
+ * The height the sheet's `h-1/2` and `h-5/6` are shares of: the viewport for
31
+ * a `fixed` sheet, or the positioned box an `absolute` one sits in (a framed
32
+ * preview).
33
+ */
34
+ function viewportHeight(element) {
35
+ const box = element.offsetParent;
36
+ return box instanceof HTMLElement && box.clientHeight > 0 ? box.clientHeight : window.innerHeight;
37
+ }
38
+ /**
39
+ * A bottom sheet that follows the finger: dragged by its grip (the handle and
40
+ * the title bar; the sheet's content keeps its own scrolling), it takes the
41
+ * height the finger gives it, and let go it comes to rest (`settleSheet`).
42
+ * The height changes with every frame, so it is written to the sheet from
43
+ * here and dropped again when the sheet rests, the class taking over (the
44
+ * transition carries it there). The grip claims the gesture (`touch-none`
45
+ * on it), so dragging down never reaches the browser's pull-to-refresh.
46
+ */
47
+ function useSheetDrag(sheet, rest, onRest) {
48
+ const gesture = useRef(null);
49
+ const swallowClick = useRef(false);
50
+ function end(event, cancelled) {
51
+ const active = gesture.current;
52
+ if (!active || active.pointerId !== event.pointerId) return;
53
+ gesture.current = null;
54
+ event.currentTarget.releasePointerCapture?.(event.pointerId);
55
+ const element = sheet.current;
56
+ element?.removeAttribute("data-dragging");
57
+ if (!active.moved || !element) return;
58
+ swallowClick.current = true;
59
+ const share = element.getBoundingClientRect().height / viewportHeight(element);
60
+ onRest(cancelled ? rest : settleSheet({
61
+ share,
62
+ velocity: active.velocity,
63
+ from: rest
64
+ }));
65
+ requestAnimationFrame(() => element.style.removeProperty("height"));
66
+ }
67
+ return {
68
+ onPointerDown(event) {
69
+ const control = event.target.closest("button, a, input");
70
+ if (event.button !== 0 || !sheet.current || control && !control.hasAttribute("data-sheet-grip")) return;
71
+ swallowClick.current = false;
72
+ event.currentTarget.setPointerCapture?.(event.pointerId);
73
+ const startHeight = sheet.current.getBoundingClientRect().height;
74
+ gesture.current = {
75
+ pointerId: event.pointerId,
76
+ startY: event.clientY,
77
+ startHeight,
78
+ lastY: event.clientY,
79
+ lastAt: event.timeStamp,
80
+ velocity: 0,
81
+ moved: false
82
+ };
83
+ },
84
+ onPointerMove(event) {
85
+ const active = gesture.current;
86
+ const element = sheet.current;
87
+ if (!active || active.pointerId !== event.pointerId || !element) return;
88
+ const dy = event.clientY - active.startY;
89
+ if (!active.moved && Math.abs(dy) < TAP_SLOP) return;
90
+ active.moved = true;
91
+ const dt = Math.max(1, event.timeStamp - active.lastAt);
92
+ active.velocity = (event.clientY - active.lastY) / dt;
93
+ active.lastY = event.clientY;
94
+ active.lastAt = event.timeStamp;
95
+ const viewport = viewportHeight(element);
96
+ const height = Math.min(MAX_SHARE * viewport, Math.max(MIN_SHARE * viewport, active.startHeight - dy));
97
+ element.setAttribute("data-dragging", "");
98
+ element.style.height = `${height}px`;
99
+ },
100
+ onPointerUp: (event) => end(event, false),
101
+ onPointerCancel: (event) => end(event, true),
102
+ onClickCapture(event) {
103
+ if (swallowClick.current) {
104
+ swallowClick.current = false;
105
+ event.preventDefault();
106
+ event.stopPropagation();
107
+ }
108
+ }
109
+ };
110
+ }
111
+ //#endregion
112
+ export { SHEET_HEIGHTS, settleSheet, useSheetDrag };
@@ -0,0 +1,84 @@
1
+ import { cn } from "../../utils/cn.js";
2
+ import { Typography } from "../typography/typography.js";
3
+ import { ToolbarButton } from "../toolbar/toolbar-button.js";
4
+ import { useSheetDrag } from "./_hooks/use-sheet-drag.js";
5
+ import * as React$1 from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { X } from "lucide-react";
8
+ //#region src/components/bottom-sheet/bottom-sheet.tsx
9
+ /**
10
+ * A phone's panel: a sheet up from the bottom edge, half the screen, so what
11
+ * it works on stays in view above it. Its grip (the handle and the title bar)
12
+ * drags it: up to nearly all of the screen, back to half, or down and away. A
13
+ * tap on the handle toggles the two heights. Not modal: the page above still
14
+ * answers a tap. Escape or ✕ closes it.
15
+ */
16
+ var BottomSheet = React$1.forwardRef(({ title, icon, labels, onClose, children, className }, ref) => {
17
+ const titleId = React$1.useId();
18
+ const [tall, setTall] = React$1.useState(false);
19
+ const sheet = React$1.useRef(null);
20
+ const drag = useSheetDrag(sheet, tall ? "tall" : "half", (rest) => rest === "closed" ? onClose() : setTall(rest === "tall"));
21
+ const setRef = React$1.useCallback((node) => {
22
+ sheet.current = node;
23
+ if (typeof ref === "function") ref(node);
24
+ else if (ref) ref.current = node;
25
+ }, [ref]);
26
+ function onKeyDown(event) {
27
+ if (event.key === "Escape") {
28
+ event.stopPropagation();
29
+ onClose();
30
+ }
31
+ }
32
+ return /* @__PURE__ */ jsxs("section", {
33
+ ref: setRef,
34
+ role: "dialog",
35
+ "aria-modal": false,
36
+ "aria-labelledby": titleId,
37
+ onKeyDown,
38
+ "data-slot": "bottom-sheet",
39
+ className: cn("fixed inset-x-0 bottom-0 z-40 flex flex-col overflow-hidden rounded-t-[var(--espd-radius-surface,var(--radius-2xl))] border-t border-border bg-background shadow-float transition-all duration-200 starting:translate-y-full data-dragging:transition-none motion-reduce:transition-none", tall ? "h-5/6" : "h-1/2", className),
40
+ children: [/* @__PURE__ */ jsxs("div", {
41
+ className: "flex shrink-0 cursor-grab touch-none flex-col select-none active:cursor-grabbing",
42
+ ...drag,
43
+ children: [/* @__PURE__ */ jsx("button", {
44
+ type: "button",
45
+ "data-sheet-grip": true,
46
+ "aria-label": tall ? labels.collapse : labels.expand,
47
+ "aria-expanded": tall,
48
+ onClick: () => setTall(!tall),
49
+ className: "flex h-5 shrink-0 cursor-pointer items-center justify-center outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
50
+ children: /* @__PURE__ */ jsx("span", {
51
+ "aria-hidden": true,
52
+ className: "h-1 w-10 rounded-full bg-foreground-muted"
53
+ })
54
+ }), /* @__PURE__ */ jsxs("div", {
55
+ className: "flex shrink-0 items-center gap-2 border-b border-border px-4 pb-2",
56
+ children: [
57
+ icon && /* @__PURE__ */ jsx("span", {
58
+ "aria-hidden": true,
59
+ className: "flex shrink-0 text-foreground-secondary",
60
+ children: icon
61
+ }),
62
+ /* @__PURE__ */ jsx(Typography, {
63
+ id: titleId,
64
+ variant: "heading",
65
+ as: "h2",
66
+ className: "m-0 min-w-0 flex-1 truncate text-foreground",
67
+ children: title
68
+ }),
69
+ /* @__PURE__ */ jsx(ToolbarButton, {
70
+ label: labels.close,
71
+ icon: /* @__PURE__ */ jsx(X, {}),
72
+ onClick: onClose
73
+ })
74
+ ]
75
+ })]
76
+ }), /* @__PURE__ */ jsx("div", {
77
+ className: "min-h-0 flex-1 overflow-y-auto overscroll-contain",
78
+ children
79
+ })]
80
+ });
81
+ });
82
+ BottomSheet.displayName = "BottomSheet";
83
+ //#endregion
84
+ export { BottomSheet };
@@ -0,0 +1,50 @@
1
+ import * as React from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ /** The sheet's own controls, named in the page's language (no English defaults). */
5
+ interface BottomSheetLabels {
6
+ /** The handle's name while the sheet is at half height. */
7
+ expand: string;
8
+ /** The handle's name while the sheet is tall. */
9
+ collapse: string;
10
+ /** The ✕ button's name. */
11
+ close: string;
12
+ }
13
+ interface BottomSheetProps {
14
+ /** Names the sheet (its dialog role) and shows in its title bar. */
15
+ title: string;
16
+ /** Beside the title. */
17
+ icon?: ReactNode;
18
+ labels: BottomSheetLabels;
19
+ /** Escape, ✕, or a drag or flick down. Open and closed is the parent's: it renders the sheet or doesn't. */
20
+ onClose: () => void;
21
+ /** What the sheet holds; it scrolls on its own below the title bar. */
22
+ children: ReactNode;
23
+ /** Merged onto the sheet's `<section>` (e.g. `absolute` instead of `fixed` inside a framed preview). */
24
+ className?: string;
25
+ }
26
+
27
+ /**
28
+ * A phone's panel: a sheet up from the bottom edge, half the screen, so what
29
+ * it works on stays in view above it. Its grip (the handle and the title bar)
30
+ * drags it: up to nearly all of the screen, back to half, or down and away. A
31
+ * tap on the handle toggles the two heights. Not modal: the page above still
32
+ * answers a tap. Escape or ✕ closes it.
33
+ */
34
+ declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLElement>>;
35
+
36
+ /** Where a bottom sheet rests: half the screen, nearly all of it, or put away. */
37
+ type SheetRest = "half" | "tall" | "closed";
38
+ /**
39
+ * Where a sheet let go of comes to rest: a quick flick goes the way it was
40
+ * flicked (down from half puts it away), otherwise the nearest open height,
41
+ * or away once dragged low enough. `share` is the sheet's height as a share
42
+ * of the viewport; `velocity` is px per ms, down positive.
43
+ */
44
+ declare function settleSheet({ share, velocity, from }: {
45
+ share: number;
46
+ velocity: number;
47
+ from: Exclude<SheetRest, "closed">;
48
+ }): SheetRest;
49
+
50
+ export { BottomSheet, type BottomSheetLabels, type BottomSheetProps, type SheetRest, settleSheet };
@@ -0,0 +1,3 @@
1
+ import { settleSheet } from "./_hooks/use-sheet-drag.js";
2
+ import { BottomSheet } from "./bottom-sheet.js";
3
+ export { BottomSheet, settleSheet };
@@ -10,7 +10,7 @@ import { jsx } from "react/jsx-runtime";
10
10
  function Bubble({ variant = "plain", size = "base", className, ...props }) {
11
11
  return /* @__PURE__ */ jsx("div", {
12
12
  "data-slot": "bubble",
13
- className: cn("min-w-0 wrap-break-word whitespace-pre-line text-foreground", size === "sm" ? "text-sm leading-normal" : "text-base leading-relaxed", variant === "filled" && "rounded-2xl rounded-br-md bg-primary/7 dark:bg-primary/15", variant === "filled" && (size === "sm" ? "px-3.5 py-2" : "px-4 py-2.5"), className),
13
+ className: cn("min-w-0 wrap-break-word whitespace-pre-line text-foreground", size === "sm" ? "type-secondary" : "type-body", variant === "filled" && "rounded-2xl rounded-br-md bg-primary/7 dark:bg-primary/15", variant === "filled" && (size === "sm" ? "px-3.5 py-2" : "px-4 py-2.5"), className),
14
14
  ...props
15
15
  });
16
16
  }
@@ -23,16 +23,16 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
23
23
  button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-[var(--cell-size)] p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
24
24
  button_next: cn(buttonVariants({ variant: buttonVariant }), "size-[var(--cell-size)] p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
25
25
  month_caption: cn("flex h-[var(--cell-size)] w-full items-center justify-center px-[var(--cell-size)]", defaultClassNames.month_caption),
26
- dropdowns: cn("flex h-[var(--cell-size)] w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
26
+ dropdowns: cn("flex h-[var(--cell-size)] w-full items-center justify-center gap-1.5 type-label", defaultClassNames.dropdowns),
27
27
  dropdown_root: cn("relative rounded-md has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", defaultClassNames.dropdown_root),
28
28
  dropdown: cn("absolute inset-0 opacity-0", defaultClassNames.dropdown),
29
- caption_label: cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
29
+ caption_label: cn("type-label select-none", captionLayout !== "label" && "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
30
30
  table: "w-full border-collapse",
31
31
  weekdays: cn("flex", defaultClassNames.weekdays),
32
- weekday: cn("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
32
+ weekday: cn("flex-1 rounded-md type-caption text-muted-foreground select-none", defaultClassNames.weekday),
33
33
  week: cn("mt-2 flex w-full", defaultClassNames.week),
34
34
  week_number_header: cn("w-[var(--cell-size)] select-none", defaultClassNames.week_number_header),
35
- week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
35
+ week_number: cn("type-caption text-muted-foreground select-none", defaultClassNames.week_number),
36
36
  day: cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] [&:last-child[data-selected=true]_button]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", defaultClassNames.day),
37
37
  range_start: cn("rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] bg-accent", defaultClassNames.range_start),
38
38
  range_middle: cn("rounded-none", defaultClassNames.range_middle),
@@ -96,7 +96,7 @@ function CalendarDayButton({ className: dayClassName, day, modifiers, ...props }
96
96
  className: cn(buttonVariants({
97
97
  variant: "ghost",
98
98
  size: "icon"
99
- }), "flex aspect-square size-auto w-full min-w-[var(--cell-size)] flex-col gap-1 leading-none font-normal rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50", "data-[range-end=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground", "data-[range-start=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground", "[&>span]:text-xs [&>span]:opacity-70", dayClassName),
99
+ }), "flex aspect-square size-auto w-full min-w-[var(--cell-size)] flex-col gap-1 leading-none font-normal rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))]", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50", "data-[range-end=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:rounded-r-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground", "data-[range-start=true]:rounded-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:rounded-l-[var(--espd-own-radius,var(--espd-radius-item,var(--radius-md)))] data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground", "[&>span]:type-caption [&>span]:opacity-70", dayClassName),
100
100
  ...props
101
101
  });
102
102
  }
@@ -24,7 +24,7 @@ function AnimatedCard({ type, iconSize, transparent = true, children, actions, c
24
24
  width: iconSize
25
25
  }) : null,
26
26
  children != null && /* @__PURE__ */ jsx("div", {
27
- className: "text-base text-foreground w-full",
27
+ className: "type-body text-foreground w-full",
28
28
  children: typeof children === "string" ? /* @__PURE__ */ jsx("p", {
29
29
  className: "text-center font-medium",
30
30
  children
@@ -8,10 +8,10 @@ var content = (icon, primaryText, secondaryText) => /* @__PURE__ */ jsxs(Fragmen
8
8
  }) }), /* @__PURE__ */ jsxs("div", {
9
9
  className: "flex min-w-0 flex-1 flex-col gap-1",
10
10
  children: [primaryText != null && /* @__PURE__ */ jsx("span", {
11
- className: "text-sm font-semibold",
11
+ className: "type-heading",
12
12
  children: primaryText
13
13
  }), secondaryText != null && /* @__PURE__ */ jsx("span", {
14
- className: "truncate text-sm text-muted-foreground",
14
+ className: "truncate type-secondary text-muted-foreground",
15
15
  children: secondaryText
16
16
  })]
17
17
  })] });
@@ -35,7 +35,7 @@ function CollapsibleCard({ children, className, defaultOpen = false, radius, ele
35
35
  type: "button",
36
36
  className: "flex w-full min-w-0 items-center justify-between gap-2 rounded-md text-left outline-none ring-offset-background transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
37
37
  children: [/* @__PURE__ */ jsx("div", {
38
- className: "min-w-0 flex-1 [&>div]:font-medium [&>div]:text-sm",
38
+ className: "min-w-0 flex-1 [&>div]:type-heading [&>div]:font-medium",
39
39
  children: titleChild
40
40
  }), /* @__PURE__ */ jsxs("div", {
41
41
  className: "flex h-4 w-4 shrink-0 items-center justify-center",
@@ -1,9 +1,9 @@
1
1
  import * as React$1 from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { k as StyleAxisProps } from '../../style-axes-DSQ2DGc5.js';
4
- export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from '../../section-card-B7c5uc08.js';
4
+ export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from '../../section-card-DqQeQkzU.js';
5
5
  import '../../index-BQANnKs9.js';
6
- import '../../variant-D81RhpbR.js';
6
+ import '../../variant-DjdaxfIA.js';
7
7
 
8
8
  interface SimpleCardProps extends StyleAxisProps {
9
9
  /** No shadow. Same as `elevation="none"`; `elevation` wins when both are set. */
@@ -14,11 +14,11 @@ function NoDataCard({ illustration, hideIllustration = false, heading, descripti
14
14
  children: illustration ?? /* @__PURE__ */ jsx(Illustration, { type: "no-search-results" })
15
15
  }),
16
16
  heading != null && /* @__PURE__ */ jsx("div", {
17
- className: "text-lg font-semibold",
17
+ className: "type-heading",
18
18
  children: heading
19
19
  }),
20
20
  description != null && /* @__PURE__ */ jsx("p", {
21
- className: "text-sm text-muted-foreground",
21
+ className: "type-body text-muted-foreground",
22
22
  children: description
23
23
  }),
24
24
  action != null && /* @__PURE__ */ jsx("div", { children: action })
@@ -93,10 +93,10 @@ var sizeStyles = {
93
93
  headerTriggerPad: "-my-3 py-3 pl-3",
94
94
  headerRightPad: "pl-3 pr-3",
95
95
  gap: "gap-2",
96
- primaryTypography: "text-xs font-semibold",
97
- secondaryTypography: "text-xs",
98
- primary: "text-xs font-semibold text-foreground",
99
- secondary: "text-xs text-muted-foreground",
96
+ primaryTypography: "type-heading",
97
+ secondaryTypography: "type-secondary",
98
+ primary: "type-heading text-foreground",
99
+ secondary: "type-secondary text-muted-foreground",
100
100
  icon: "h-[18px] w-[18px] shrink-0",
101
101
  chevron: "h-[18px] w-[18px]",
102
102
  collapseTrigger: "h-[18px] w-[18px] min-h-[18px] min-w-[18px] !p-0 [&_svg]:!h-[18px] [&_svg]:!w-[18px] [&_svg]:!min-h-0 [&_svg]:!min-w-0"
@@ -108,10 +108,10 @@ var sizeStyles = {
108
108
  headerTriggerPad: "-my-4 py-4 pl-4",
109
109
  headerRightPad: "pl-3 pr-4",
110
110
  gap: "gap-3",
111
- primaryTypography: "text-sm font-semibold",
112
- secondaryTypography: "text-sm",
113
- primary: "text-sm font-semibold text-foreground",
114
- secondary: "text-sm text-muted-foreground",
111
+ primaryTypography: "type-heading",
112
+ secondaryTypography: "type-secondary",
113
+ primary: "type-heading text-foreground",
114
+ secondary: "type-secondary text-muted-foreground",
115
115
  icon: "h-6 w-6 shrink-0",
116
116
  chevron: "h-6 w-6",
117
117
  collapseTrigger: "h-6 w-6 min-h-6 min-w-6 !p-0 [&_svg]:!h-6 [&_svg]:!w-6 [&_svg]:!min-h-0 [&_svg]:!min-w-0"
@@ -123,10 +123,10 @@ var sizeStyles = {
123
123
  headerTriggerPad: "-my-6 py-6 pl-6",
124
124
  headerRightPad: "pl-3 pr-6",
125
125
  gap: "gap-4",
126
- primaryTypography: "text-base font-semibold",
127
- secondaryTypography: "text-sm",
128
- primary: "text-base font-semibold text-foreground",
129
- secondary: "text-sm text-muted-foreground",
126
+ primaryTypography: "type-heading",
127
+ secondaryTypography: "type-secondary",
128
+ primary: "type-heading text-foreground",
129
+ secondary: "type-secondary text-muted-foreground",
130
130
  icon: "h-8 w-8 shrink-0",
131
131
  chevron: "h-8 w-8",
132
132
  collapseTrigger: "h-8 w-8 min-h-8 min-w-8 !p-0 [&_svg]:!h-8 [&_svg]:!w-8 [&_svg]:!min-h-0 [&_svg]:!min-w-0"
@@ -12,11 +12,8 @@ var SimpleCard = React$1.forwardRef(({ noShadow, noBorder, transparent, title, d
12
12
  className: cn(noShadow && elevation === void 0 && "shadow-none", noBorder && border === void 0 && "border-0", transparent && "bg-transparent", className),
13
13
  children: [(title || description) && /* @__PURE__ */ jsxs(CardHeader, {
14
14
  className: "space-y-1",
15
- children: [title && /* @__PURE__ */ jsx(CardTitle, {
16
- className: "text-2xl",
17
- children: title
18
- }), description && /* @__PURE__ */ jsx(CardDescription, {
19
- className: "text-sm tracking-normal",
15
+ children: [title && /* @__PURE__ */ jsx(CardTitle, { children: title }), description && /* @__PURE__ */ jsx(CardDescription, {
16
+ className: "tracking-normal",
20
17
  children: description
21
18
  })]
22
19
  }), /* @__PURE__ */ jsx(CardContent, { children })]
@@ -65,13 +65,13 @@ var CategoryCard = React$1.forwardRef(({ icon, title, description, value, tags,
65
65
  /* @__PURE__ */ jsxs("span", {
66
66
  className: "flex min-w-0 flex-col gap-1",
67
67
  children: [/* @__PURE__ */ jsx("span", {
68
- className: "text-sm font-semibold text-foreground @[12rem]:text-base",
68
+ className: "type-heading text-foreground",
69
69
  children: truncateTitle ? /* @__PURE__ */ jsx(TruncatedLineWithTooltip, {
70
70
  tooltipContent: title,
71
71
  children: title
72
72
  }) : title
73
73
  }), description != null && /* @__PURE__ */ jsx("span", {
74
- className: cn("text-xs text-muted-foreground @[12rem]:text-sm", truncateDescription && "line-clamp-2"),
74
+ className: cn("type-body text-muted-foreground", truncateDescription && "line-clamp-2"),
75
75
  children: description
76
76
  })]
77
77
  }),
@@ -24,7 +24,7 @@ var ChartContainer = React$1.forwardRef(function ChartContainer({ id, className,
24
24
  ref,
25
25
  "data-slot": "chart",
26
26
  "data-chart": chartId,
27
- className: cn("flex w-full min-w-0 flex-col items-stretch aspect-video text-xs [&_.recharts-responsive-container]:min-h-0 [&_.recharts-responsive-container]:w-full [&_.recharts-responsive-container]:min-w-0 [&_.recharts-responsive-container]:flex-1 [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
27
+ className: cn("flex w-full min-w-0 flex-col items-stretch aspect-video type-caption [&_.recharts-responsive-container]:min-h-0 [&_.recharts-responsive-container]:w-full [&_.recharts-responsive-container]:min-w-0 [&_.recharts-responsive-container]:flex-1 [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
28
28
  ...props,
29
29
  children: [/* @__PURE__ */ jsx(ChartStyle, {
30
30
  id: chartId,
@@ -82,7 +82,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
82
82
  if (!active || !payload?.length) return null;
83
83
  const nestLabel = payload.length === 1 && indicator !== "dot";
84
84
  return /* @__PURE__ */ jsxs("div", {
85
- className: cn("grid min-w-[10rem] items-start gap-2.5 rounded-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-lg)))] border border-border/50 bg-background px-4 py-3 text-xs shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-xl)))]", className),
85
+ className: cn("grid min-w-[10rem] items-start gap-2.5 rounded-[var(--espd-own-radius,var(--espd-radius-overlay,var(--radius-lg)))] border border-border/50 bg-background px-4 py-3 type-caption shadow-[shadow:var(--espd-own-elevation,var(--espd-elevation-overlay,var(--shadow-xl)))]", className),
86
86
  style: axes.style,
87
87
  children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
88
88
  className: "grid gap-2.5",
@@ -134,7 +134,7 @@ function ChartLegendContent({ className, hideIcon = false, payload, verticalAlig
134
134
  className: "h-4 w-4 shrink-0 rounded-sm",
135
135
  style: { backgroundColor: item.color }
136
136
  }), /* @__PURE__ */ jsx("span", {
137
- className: "text-sm font-normal",
137
+ className: "type-caption",
138
138
  children: itemConfig?.label
139
139
  })]
140
140
  }, index);
@@ -169,7 +169,7 @@ function ChartLegendList({ items, layout = "rows", columns = 2, value = "value",
169
169
  return /* @__PURE__ */ jsx("div", {
170
170
  "data-slot": "chart-legend",
171
171
  "data-layout": layout,
172
- className: cn("@container w-full min-w-0 text-sm", className),
172
+ className: cn("@container w-full min-w-0 type-caption", className),
173
173
  style,
174
174
  ...props,
175
175
  children: /* @__PURE__ */ jsx("div", {
@@ -67,7 +67,7 @@ function DonutLegend({ config, order }) {
67
67
  }));
68
68
  if (items.length === 0) return null;
69
69
  return /* @__PURE__ */ jsx("div", {
70
- className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-2 pt-3 text-sm",
70
+ className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-2 pt-3 type-caption",
71
71
  children: items.map(({ key, entry }) => {
72
72
  return /* @__PURE__ */ jsxs("div", {
73
73
  className: "flex items-center gap-1.5",
@@ -170,7 +170,7 @@ function TreemapLegend({ config, order, colorByKey }) {
170
170
  }));
171
171
  if (items.length === 0) return null;
172
172
  return /* @__PURE__ */ jsx("div", {
173
- className: "flex flex-wrap items-center justify-start gap-x-4 gap-y-2 pt-3 text-sm",
173
+ className: "flex flex-wrap items-center justify-start gap-x-4 gap-y-2 pt-3 type-caption",
174
174
  children: items.map(({ key, entry }) => {
175
175
  return /* @__PURE__ */ jsxs("div", {
176
176
  className: "flex items-center gap-1.5",
@@ -24,7 +24,7 @@ function Tick() {
24
24
  /** The lines under (or beside) the title: the meta, then the note in the primary colour. */
25
25
  function Lines({ meta, note, wrap, disabled, className }) {
26
26
  return /* @__PURE__ */ jsxs("span", {
27
- className: cn("flex min-w-0 flex-col gap-0.5 text-xs text-foreground-secondary", !wrap && "*:truncate", className),
27
+ className: cn("flex min-w-0 flex-col gap-0.5 type-secondary text-foreground-secondary", !wrap && "*:truncate", className),
28
28
  children: [meta, note && /* @__PURE__ */ jsx("span", {
29
29
  className: cn("font-medium", disabled ? "text-foreground-secondary" : "text-primary"),
30
30
  children: note
@@ -60,7 +60,7 @@ function ChoiceCard(props) {
60
60
  }), /* @__PURE__ */ jsxs("span", {
61
61
  className: "flex min-w-0 flex-1 flex-col justify-center gap-0.5 py-2.5 pr-9 pl-1",
62
62
  children: [/* @__PURE__ */ jsx("span", {
63
- className: "line-clamp-2 text-sm font-semibold text-foreground",
63
+ className: "line-clamp-2 type-heading text-foreground",
64
64
  children: title
65
65
  }), /* @__PURE__ */ jsx(Lines, {
66
66
  meta,
@@ -76,7 +76,7 @@ function ChoiceCard(props) {
76
76
  }), /* @__PURE__ */ jsx("span", {
77
77
  className: "relative block px-3 pt-1",
78
78
  children: /* @__PURE__ */ jsx("span", {
79
- className: "line-clamp-2 text-sm font-semibold text-foreground",
79
+ className: "line-clamp-2 type-heading text-foreground",
80
80
  children: title
81
81
  })
82
82
  })]
@@ -16,9 +16,10 @@ import { Braces } from "lucide-react";
16
16
  * the same grid cell, so any difference in font, size, spacing, padding or
17
17
  * wrapping shows up as a caret that drifts from the characters. Ligatures are
18
18
  * off because Shiki's token spans break them in the highlight layer but not
19
- * in the textarea. 16px below `md` stops iOS Safari zooming on focus.
19
+ * in the textarea. `type-input` is 16px below `md`, which stops iOS Safari
20
+ * zooming on focus; `leading-normal` gives both layers the same line height.
20
21
  */
21
- var layerClassName = "col-start-1 row-start-1 m-0 box-border border-0 p-4 font-mono text-[16px] leading-normal tracking-normal [font-variant-ligatures:none] md:text-[13px]";
22
+ var layerClassName = "col-start-1 row-start-1 m-0 box-border border-0 p-4 font-mono type-input leading-normal tracking-normal [font-variant-ligatures:none]";
22
23
  /** Highlight layer: Shiki's `<pre>` / `<code>` take their metrics from the layer. */
23
24
  var highlightClassName = "[&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:[font:inherit] [&_pre]:[white-space:inherit] [&_pre]:[overflow-wrap:inherit] [&_code]:[font:inherit]";
24
25
  /**
@@ -230,7 +231,7 @@ var CodeEditor = React$1.forwardRef(({ className, style, radius, border, lang =
230
231
  editor,
231
232
  errorContent != null && /* @__PURE__ */ jsx("div", {
232
233
  id: errorId,
233
- className: "text-sm text-destructive",
234
+ className: "type-caption text-destructive",
234
235
  children: errorContent
235
236
  })
236
237
  ]
@@ -10,7 +10,7 @@ function DataTableHeader({ headerGroups, showBorder = false, stickyColumns }) {
10
10
  children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header, headerIndex) => {
11
11
  const sticky = stickyCellProps(stickyColumns, header.column.id, showBorder ? "headBordered" : "head");
12
12
  return /* @__PURE__ */ jsx(TableHead, {
13
- className: cn("text-sm text-gray-500 font-medium whitespace-nowrap", showBorder && headerIndex === 0 && "pl-4", sticky.className),
13
+ className: cn("type-label text-gray-500 whitespace-nowrap", showBorder && headerIndex === 0 && "pl-4", sticky.className),
14
14
  style: sticky.style,
15
15
  children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())
16
16
  }, header.id);