@bug-on/m3-expressive 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/README.md +110 -0
  3. package/dist/assets/fonts/GoogleSansFlex-VariableFont.woff2 +0 -0
  4. package/dist/assets/fonts/MaterialSymbolsOutlined-VariableFont_FILL,GRAD,opsz,wght.ttf +0 -0
  5. package/dist/assets/fonts/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.ttf +0 -0
  6. package/dist/assets/fonts/MaterialSymbolsSharp-VariableFont_FILL,GRAD,opsz,wght.ttf +0 -0
  7. package/dist/assets/loading-indicator.svg +19 -0
  8. package/dist/assets/material-symbols-cdn.css +65 -0
  9. package/dist/assets/material-symbols-self-hosted.css +94 -0
  10. package/dist/buttons.d.mts +180 -0
  11. package/dist/buttons.d.ts +180 -0
  12. package/dist/buttons.js +4282 -0
  13. package/dist/buttons.js.map +1 -0
  14. package/dist/buttons.mjs +4227 -0
  15. package/dist/buttons.mjs.map +1 -0
  16. package/dist/core.d.mts +422 -0
  17. package/dist/core.d.ts +422 -0
  18. package/dist/core.js +2581 -0
  19. package/dist/core.js.map +1 -0
  20. package/dist/core.mjs +2547 -0
  21. package/dist/core.mjs.map +1 -0
  22. package/dist/feedback.d.mts +600 -0
  23. package/dist/feedback.d.ts +600 -0
  24. package/dist/feedback.js +2357 -0
  25. package/dist/feedback.js.map +1 -0
  26. package/dist/feedback.mjs +2321 -0
  27. package/dist/feedback.mjs.map +1 -0
  28. package/dist/forms.d.mts +40 -0
  29. package/dist/forms.d.ts +40 -0
  30. package/dist/forms.js +4263 -0
  31. package/dist/forms.js.map +1 -0
  32. package/dist/forms.mjs +4228 -0
  33. package/dist/forms.mjs.map +1 -0
  34. package/dist/icon-button-D-gs0gfj.d.mts +136 -0
  35. package/dist/icon-button-D-gs0gfj.d.ts +136 -0
  36. package/dist/index.css +309 -0
  37. package/dist/index.css.d.ts +2 -0
  38. package/dist/index.d.mts +24 -0
  39. package/dist/index.d.ts +24 -0
  40. package/dist/index.js +23972 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/index.mjs +23668 -0
  43. package/dist/index.mjs.map +1 -0
  44. package/dist/layout.d.mts +610 -0
  45. package/dist/layout.d.ts +610 -0
  46. package/dist/layout.js +5091 -0
  47. package/dist/layout.js.map +1 -0
  48. package/dist/layout.mjs +5042 -0
  49. package/dist/layout.mjs.map +1 -0
  50. package/dist/material-symbols-cdn.css +65 -0
  51. package/dist/material-symbols-cdn.css.d.ts +2 -0
  52. package/dist/material-symbols-self-hosted.css +94 -0
  53. package/dist/material-symbols-self-hosted.css.d.ts +2 -0
  54. package/dist/md3-DFhj-NZj.d.mts +17 -0
  55. package/dist/md3-DFhj-NZj.d.ts +17 -0
  56. package/dist/navigation.d.mts +2766 -0
  57. package/dist/navigation.d.ts +2766 -0
  58. package/dist/navigation.js +6684 -0
  59. package/dist/navigation.js.map +1 -0
  60. package/dist/navigation.mjs +6573 -0
  61. package/dist/navigation.mjs.map +1 -0
  62. package/dist/overlays.d.mts +161 -0
  63. package/dist/overlays.d.ts +161 -0
  64. package/dist/overlays.js +3298 -0
  65. package/dist/overlays.js.map +1 -0
  66. package/dist/overlays.mjs +3244 -0
  67. package/dist/overlays.mjs.map +1 -0
  68. package/dist/pickers.d.mts +1074 -0
  69. package/dist/pickers.d.ts +1074 -0
  70. package/dist/pickers.js +4240 -0
  71. package/dist/pickers.js.map +1 -0
  72. package/dist/pickers.mjs +4200 -0
  73. package/dist/pickers.mjs.map +1 -0
  74. package/dist/plugin.d.mts +1 -0
  75. package/dist/plugin.d.ts +1 -0
  76. package/dist/plugin.js +13 -0
  77. package/dist/plugin.js.map +1 -0
  78. package/dist/plugin.mjs +3 -0
  79. package/dist/plugin.mjs.map +1 -0
  80. package/dist/scroll-area-CVS6HyLl.d.mts +33 -0
  81. package/dist/scroll-area-CVS6HyLl.d.ts +33 -0
  82. package/dist/shapes.d.mts +1119 -0
  83. package/dist/shapes.d.ts +1119 -0
  84. package/dist/shapes.js +2941 -0
  85. package/dist/shapes.js.map +1 -0
  86. package/dist/shapes.mjs +2889 -0
  87. package/dist/shapes.mjs.map +1 -0
  88. package/dist/side-sheet-modal-BY6VCC8p.d.mts +553 -0
  89. package/dist/side-sheet-modal-CglP6KYA.d.ts +553 -0
  90. package/dist/split-button-trailing-uncheckable-C5CLCIKP.d.ts +731 -0
  91. package/dist/split-button-trailing-uncheckable-MXj_kyNt.d.mts +731 -0
  92. package/dist/text-field-eAIpz9z1.d.mts +1038 -0
  93. package/dist/text-field-eAIpz9z1.d.ts +1038 -0
  94. package/dist/typography-339RV6v7.d.mts +486 -0
  95. package/dist/typography-339RV6v7.d.ts +486 -0
  96. package/dist/typography.css +22 -0
  97. package/dist/typography.css.d.ts +2 -0
  98. package/package.json +207 -0
@@ -0,0 +1,610 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { HTMLMotionProps } from 'motion/react';
4
+ import * as React from 'react';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+ import { b as ScrollAreaProps } from './scroll-area-CVS6HyLl.js';
7
+ export { S as ScrollArea, a as ScrollAreaOrientation, c as ScrollAreaScrollbar, d as ScrollAreaType } from './scroll-area-CVS6HyLl.js';
8
+ export { D as DEFAULT_FONT_VARIATION_AXES, F as FontVariationAxes, M as MD3_EXPRESSIVE_FONT_VARIATION, T as TextStyle, a as Typography, b as TypographyContext, c as TypographyKeyTokens, d as TypographyProvider, e as TypographyProviderProps, f as TypographyTokens, g as TypographyTokensOptions, s as serializeFontVariationAxes, u as useTypography } from './typography-339RV6v7.js';
9
+ import '@radix-ui/react-scroll-area';
10
+
11
+ declare const cardVariants: (props?: ({
12
+ variant?: "outlined" | "elevated" | "filled" | null | undefined;
13
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
14
+ type MotionDivProps = Omit<HTMLMotionProps<"button">, "children" | "color">;
15
+ interface CardProps extends MotionDivProps, VariantProps<typeof cardVariants> {
16
+ /** Vô hiệu hóa tương tác và giảm opacity (MD3 disabled state). */
17
+ disabled?: boolean;
18
+ /**
19
+ * Buộc card trở thành interactive dù không có `onClick`.
20
+ * Hữu ích khi card chứa các element con là interactive.
21
+ */
22
+ interactive?: boolean;
23
+ /**
24
+ * Nếu có, card render thành thẻ `<a>`. Tự động kích hoạt interactive mode.
25
+ * Ưu tiên dùng `href` thay vì `onClick` khi điều hướng trang.
26
+ */
27
+ href?: string;
28
+ /** Target cho thẻ `<a>` (chỉ có hiệu lực khi `href` được cung cấp). */
29
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
30
+ /** rel cho thẻ `<a>` (tự động thêm `noreferrer` khi `target="_blank"`). */
31
+ rel?: string;
32
+ children?: React.ReactNode;
33
+ }
34
+ declare const Card: React.NamedExoticComponent<Omit<CardProps, "ref"> & React.RefAttributes<HTMLElement>>;
35
+
36
+ interface CodeBlockProps {
37
+ /** Raw code string to display and copy. */
38
+ code: string;
39
+ /** Language label in the header (presentational only). @default "React" */
40
+ language?: string;
41
+ /** Additional CSS classes for the outer wrapper. */
42
+ className?: string;
43
+ /**
44
+ * Pre-highlighted HTML from Shiki SSR.
45
+ * Use `codeToHtml` with `themes: { light, dark }` for dual-theme support.
46
+ */
47
+ html?: string;
48
+ }
49
+ declare function CodeBlock({ code, language, className, html, }: CodeBlockProps): react_jsx_runtime.JSX.Element;
50
+
51
+ /**
52
+ * @file divider.tsx
53
+ *
54
+ * MD3 Expressive Divider component.
55
+ *
56
+ * - `Divider` → A thin line that groups content in lists and layouts.
57
+ *
58
+ * @remarks
59
+ * Token references (Kotlin source — DividerTokens.kt v0_117):
60
+ * Color = ColorSchemeKeyTokens.OutlineVariant → bg-m3-outline-variant / text-m3-outline-variant
61
+ * Thickness = 1.0.dp → h-px (flat horizontal) | w-px (flat vertical) | strokeWidth={1} (wavy SVG)
62
+ *
63
+ * Variants:
64
+ * - "full-bleed" → spans full width, no indent
65
+ * - "inset" → leading indent (16dp standard / 72dp after-icon via insetStart)
66
+ * - "middle-inset" → 16dp indent both sides
67
+ * - "subheader" → same as full-bleed (label provided externally)
68
+ *
69
+ * Shapes:
70
+ * - "flat" → straight 1px line rendered as <m.div> (default)
71
+ * - "wavy" → sinusoidal SVG wave via <m.svg> + buildWavePath helper (horizontal only)
72
+ *
73
+ * Architecture:
74
+ * - Styling: `cn` (clsx/tailwind-merge) + static Tailwind classes only
75
+ * - Animation: Framer Motion LazyMotion/domMax, scaleX/scaleY spring entrance
76
+ * - Wavy: SVG path generated by pure-JS `buildWavePath()` (cubic Bézier sine approx)
77
+ * Uses ResizeObserver (via useContainerWidth) to measure container width so
78
+ * the path has precise bounds and leading/trailing ends are properly rounded.
79
+ * - A11y: role="separator", aria-orientation, aria-hidden when decorative
80
+ *
81
+ * @see https://m3.material.io/components/divider/overview
82
+ */
83
+
84
+ type SafeHTMLDivAttrs = Omit<React.HTMLAttributes<HTMLDivElement>, "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop">;
85
+ interface DividerProps extends SafeHTMLDivAttrs {
86
+ /**
87
+ * Visual variant controlling indentation.
88
+ * - "full-bleed" → no indent, spans full container width/height (default)
89
+ * - "inset" → leading indent only (use `insetStart` to control amount)
90
+ * - "middle-inset" → 16px indent on both sides
91
+ * - "subheader" → alias for full-bleed, used before section labels
92
+ * @default "full-bleed"
93
+ */
94
+ variant?: "full-bleed" | "inset" | "middle-inset" | "subheader";
95
+ /**
96
+ * Orientation of the divider line.
97
+ * - "horizontal" → renders as `h-px w-full` bar (default)
98
+ * - "vertical" → renders as `w-px h-full` column
99
+ * Note: `shape="wavy"` is not supported with orientation="vertical".
100
+ * @default "horizontal"
101
+ */
102
+ orientation?: "horizontal" | "vertical";
103
+ /**
104
+ * Shape of the divider line.
105
+ * - "flat" → straight 1px line rendered as `<div>` (default)
106
+ * - "wavy" → sinusoidal SVG wave (horizontal orientation only)
107
+ *
108
+ * When `shape="wavy"` and `orientation="vertical"`, silently falls back to
109
+ * `shape="flat"` and emits a `console.warn`.
110
+ * @default "flat"
111
+ */
112
+ shape?: "flat" | "wavy";
113
+ /**
114
+ * Leading inset size for the "inset" variant.
115
+ * - "standard" → 16px (`ml-4`)
116
+ * - "icon" → 72px (`ml-[72px]`) — use when list items have leading icons/avatars
117
+ * Only applies when `variant="inset"`.
118
+ * @default "standard"
119
+ */
120
+ insetStart?: "standard" | "icon";
121
+ /**
122
+ * Wavy shape visual parameters. Only applies when `shape="wavy"`.
123
+ * All values are in pixels.
124
+ */
125
+ waveConfig?: {
126
+ /**
127
+ * Peak displacement from the center line.
128
+ * @default 2
129
+ */
130
+ amplitude?: number;
131
+ /**
132
+ * Pixels per full sine cycle.
133
+ * @default 32
134
+ */
135
+ wavelength?: number;
136
+ /**
137
+ * Thickness of the wave stroke in pixels.
138
+ * @default 1
139
+ */
140
+ strokeWidth?: number;
141
+ };
142
+ /**
143
+ * When true, marks the divider as decorative (`aria-hidden="true"`).
144
+ * Use when the divider is purely visual with no semantic meaning.
145
+ * @default false
146
+ */
147
+ decorative?: boolean;
148
+ /**
149
+ * When true, plays an entrance animation (scaleX/scaleY from 0→1).
150
+ * Automatically disabled when user prefers reduced motion.
151
+ * @default true
152
+ */
153
+ animate?: boolean;
154
+ }
155
+ /**
156
+ * Generates an SVG path `d` string for a sinusoidal wave between two X bounds.
157
+ * Uses cubic Bézier approximation of a sine curve for smooth rendering.
158
+ * The error vs. a true sine is < 0.2%.
159
+ *
160
+ * Each half-cycle alternates between crest (+amplitude) and trough (-amplitude).
161
+ * Control points are placed at 1/3 and 2/3 of each half-cycle for accuracy.
162
+ *
163
+ * @param startX - X coordinate where the path begins (e.g. capWidth = strokeWidth/2)
164
+ * @param endX - X coordinate where the path ends (e.g. containerWidth - capWidth)
165
+ * @param amplitude - Peak displacement from center line (px). Default: 2
166
+ * @param wavelength - Pixels per full sine cycle. Default: 32
167
+ * @param yCenter - Y coordinate of the wave center line. Default: 4
168
+ * @returns SVG path `d` attribute string, or "" when startX >= endX
169
+ *
170
+ * @example
171
+ * buildWavePath(0.5, 499.5, 2, 32, 4)
172
+ * // → "M 0.5,4 C 11.17,... 500,4 ..."
173
+ */
174
+ declare function buildWavePath(startX: number, endX: number, amplitude?: number, wavelength?: number, yCenter?: number): string;
175
+ /**
176
+ * MD3 Expressive Divider — a thin line that groups content in lists and layouts.
177
+ *
178
+ * Supports four layout variants (full-bleed, inset, middle-inset, subheader),
179
+ * two orientations (horizontal, vertical), and two shape modes (flat, wavy).
180
+ *
181
+ * The wavy shape renders a sinusoidal SVG wave and is only supported with
182
+ * `orientation="horizontal"`.
183
+ *
184
+ * @example
185
+ * ```tsx
186
+ * // Default flat full-bleed horizontal divider
187
+ * <Divider />
188
+ *
189
+ * // Inset after icon list items
190
+ * <Divider variant="inset" insetStart="icon" />
191
+ *
192
+ * // Vertical separator between panes
193
+ * <Divider orientation="vertical" />
194
+ *
195
+ * // Wavy expressive divider
196
+ * <Divider shape="wavy" />
197
+ *
198
+ * // Wavy with custom wave config
199
+ * <Divider shape="wavy" waveConfig={{ amplitude: 5, wavelength: 24 }} />
200
+ *
201
+ * // Decorative (no a11y semantics)
202
+ * <Divider decorative />
203
+ *
204
+ * // No entrance animation
205
+ * <Divider animate={false} />
206
+ *
207
+ * // Middle-inset wavy divider
208
+ * <Divider variant="middle-inset" shape="wavy" />
209
+ * ```
210
+ *
211
+ * @see https://m3.material.io/components/divider/overview
212
+ */
213
+ declare const Divider: React.NamedExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
214
+
215
+ type ListSelectionMode = "none" | "single-action" | "multi-action" | "single-select" | "multi-select";
216
+ type ListStyle = "standard" | "segmented";
217
+ type ListVariant = "baseline" | "expressive";
218
+ type ListItemPosition = "solo" | "leading" | "middle" | "trailing";
219
+ type ListItemLeadingType = "none" | "icon" | "avatar" | "image" | "video" | "checkbox" | "radio" | "custom";
220
+ type ListItemTrailingType = "none" | "icon" | "icon-button" | "text" | "checkbox" | "radio" | "switch" | "custom";
221
+ interface ListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, "onChange"> {
222
+ /** Variant của danh sách, hỗ trợ 'baseline' và 'expressive'. Default: 'baseline' */
223
+ variant?: ListVariant;
224
+ /** Kiểu hiển thị, hỗ trợ 'standard' (không khoảng cách) và 'segmented' (có gap 2px). Default: 'standard' */
225
+ listStyle?: ListStyle;
226
+ /** Chế độ chọn/tương tác của danh sách. Default: 'none' */
227
+ selectionMode?: ListSelectionMode;
228
+ /** Giá trị đang được chọn (dành cho controlled). String cho single, string[] cho multi */
229
+ value?: string | string[];
230
+ /** Giá trị được chọn mặc định ban đầu (dành cho uncontrolled) */
231
+ defaultValue?: string | string[];
232
+ /** Callback khi giá trị thay đổi */
233
+ onChange?: (value: string | string[]) => void;
234
+ /** Bật chế độ kéo thả sắp xếp danh sách */
235
+ reorderable?: boolean;
236
+ /** Mảng chứa dữ liệu các item khi sử dụng reorderable */
237
+ items?: unknown[];
238
+ /** Callback trả về danh sách sau khi đã được sắp xếp lại */
239
+ onReorder?: (newItems: unknown[]) => void;
240
+ /** Custom radius góc ngoài (cho leading/trailing list items). Default từ spec MD3 Expressive là 16px */
241
+ outerRadius?: number;
242
+ /** Custom radius góc trong (cho các list items kề nhau). Default từ spec MD3 Expressive là 4px */
243
+ innerRadius?: number;
244
+ children?: React.ReactNode;
245
+ }
246
+ type SafeHTMLLIAttrs = Omit<React.HTMLAttributes<HTMLLIElement>, "onClick" | "color" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop" | "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "onTransitionEnd">;
247
+ interface ListItemProps extends SafeHTMLLIAttrs {
248
+ /** Giá trị định danh duy nhất cho ListItem */
249
+ value: string;
250
+ /** Tiêu đề chính của item */
251
+ headline: React.ReactNode;
252
+ /** Văn bản hỗ trợ bên dưới tiêu đề */
253
+ supportingText?: React.ReactNode;
254
+ /** Số dòng hiển thị tối đa của supportingText (1 hoặc 2) để tính chiều cao tương ứng. Default: 1 */
255
+ supportingTextLines?: 1 | 2;
256
+ /** Văn bản nhỏ hiển thị phía trên tiêu đề chính */
257
+ overline?: React.ReactNode;
258
+ /** Loại thành phần hiển thị ở phần đầu dòng */
259
+ leadingType?: ListItemLeadingType;
260
+ /** Đường dẫn hình ảnh/video nếu leadingType là 'image' hoặc 'video' */
261
+ leadingSrc?: string;
262
+ /** Alt text cho hình ảnh */
263
+ leadingAlt?: string;
264
+ /** Custom content cho phần leading (sử dụng khi leadingType = 'custom') */
265
+ leadingContent?: React.ReactNode;
266
+ /** Loại thành phần hiển thị ở phần cuối dòng */
267
+ trailingType?: ListItemTrailingType;
268
+ /** Văn bản hiển thị ở phần cuối dòng */
269
+ trailingText?: string;
270
+ /** Custom content hoặc callback cho trailing element */
271
+ trailingContent?: React.ReactNode;
272
+ /** Vô hiệu hóa tương tác */
273
+ disabled?: boolean;
274
+ /** Trạng thái được chọn (áp dụng cho single-select / multi-select) */
275
+ selected?: boolean;
276
+ /** Địa chỉ liên kết nếu render ListItem dưới dạng thẻ Anchor <a> */
277
+ href?: string;
278
+ /** Callback khi click vào ListItem */
279
+ onClick?: (event: React.MouseEvent<HTMLElement>) => void;
280
+ /** Buộc item ở chế độ interactive (có hover/focus overlay, ripple) kể cả khi không truyền onClick/href */
281
+ interactive?: boolean;
282
+ /** Bật chế độ chỉ kéo qua handle icon thay vì kéo toàn bộ item */
283
+ dragHandle?: boolean;
284
+ /** Override vị trí của item trong danh sách (solo, leading, middle, trailing) */
285
+ position?: ListItemPosition;
286
+ /** Index nội bộ của item, được tự động truyền bởi List component */
287
+ _listIndex?: number;
288
+ }
289
+ interface ListDividerProps extends React.HTMLAttributes<HTMLLIElement> {
290
+ /** Thụt lề đầu dòng của divider */
291
+ inset?: boolean;
292
+ /** Kiểu thụt lề: 'icon' (thụt lề 56px), 'avatar' (thụt lề 72px) hoặc 'custom' */
293
+ insetType?: "icon" | "avatar" | "custom";
294
+ }
295
+
296
+ declare const List: React.NamedExoticComponent<ListProps & React.RefAttributes<HTMLUListElement>>;
297
+
298
+ interface ListContextValue {
299
+ selectionMode: ListSelectionMode;
300
+ variant: ListVariant;
301
+ listStyle: ListStyle;
302
+ selectedValues: Set<string>;
303
+ onItemChange: (value: string, selected: boolean) => void;
304
+ reorderable: boolean;
305
+ itemCount: number;
306
+ outerRadius: number;
307
+ innerRadius: number;
308
+ }
309
+ declare const ListContext: React.Context<ListContextValue | null>;
310
+ declare const useListContext: () => ListContextValue | null;
311
+
312
+ declare const ListDivider: React.NamedExoticComponent<ListDividerProps & React.RefAttributes<HTMLLIElement>>;
313
+
314
+ declare const ListItem: React.NamedExoticComponent<ListItemProps & React.RefAttributes<HTMLLIElement>>;
315
+
316
+ declare const LIST_TOKENS: {
317
+ readonly oneLineHeight: 56;
318
+ readonly twoLineHeight: 72;
319
+ readonly threeLineHeight: 88;
320
+ readonly leadingSpace: 16;
321
+ readonly trailingSpace: 16;
322
+ readonly topSpace: 8;
323
+ readonly bottomSpace: 8;
324
+ readonly betweenSpace: 16;
325
+ readonly segmentedGap: 2;
326
+ readonly shape: {
327
+ readonly containerShape: 16;
328
+ readonly itemOuterRadius: 16;
329
+ readonly itemInnerRadius: 4;
330
+ readonly resting: 4;
331
+ readonly hovered: 12;
332
+ readonly focused: 16;
333
+ readonly pressed: 16;
334
+ readonly selected: 16;
335
+ readonly dragged: 16;
336
+ readonly disabled: 4;
337
+ };
338
+ readonly stateLayer: {
339
+ readonly hover: 0.08;
340
+ readonly focus: 0.1;
341
+ readonly pressed: 0.1;
342
+ readonly dragged: 0.16;
343
+ readonly disabled: 0.1;
344
+ };
345
+ readonly leadingIconSize: 24;
346
+ readonly leadingIconExpressiveSize: 20;
347
+ readonly leadingAvatarSize: 40;
348
+ readonly leadingImageWidth: 56;
349
+ readonly leadingImageHeight: 56;
350
+ readonly leadingVideoSmallWidth: 100;
351
+ readonly leadingVideoSmallHeight: 56;
352
+ readonly leadingVideoLargeWidth: 114;
353
+ readonly leadingVideoLargeHeight: 64;
354
+ readonly trailingIconSize: 24;
355
+ readonly trailingIconExpressiveSize: 20;
356
+ readonly focusIndicatorThickness: 3;
357
+ readonly focusIndicatorOffset: -3;
358
+ readonly cssVars: {
359
+ readonly containerBg: "var(--md-sys-color-surface)";
360
+ readonly selectedContainerBg: "var(--md-sys-color-secondary-container)";
361
+ readonly labelText: "var(--md-sys-color-on-surface)";
362
+ readonly selectedLabelText: "var(--md-sys-color-on-secondary-container)";
363
+ readonly supportingText: "var(--md-sys-color-on-surface-variant)";
364
+ readonly overlineText: "var(--md-sys-color-on-surface-variant)";
365
+ readonly trailingText: "var(--md-sys-color-on-surface-variant)";
366
+ readonly leadingIcon: "var(--md-sys-color-on-surface-variant)";
367
+ readonly focusIndicator: "var(--md-sys-color-secondary)";
368
+ };
369
+ };
370
+
371
+ declare function getListItemHeight(hasOverline: boolean, supportingTextLines: 0 | 1 | 2): 56 | 72 | 88;
372
+ declare function shouldTopAlign(height: number): boolean;
373
+ declare function getExpressiveShape(state: "resting" | "hovered" | "focused" | "pressed" | "selected" | "dragged" | "disabled"): number;
374
+
375
+ declare const typographyVariants: (props?: ({
376
+ variant?: "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "label-lg" | "label-md" | "label-sm" | "body-lg" | "body-md" | "body-sm" | null | undefined;
377
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
378
+ interface TextProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
379
+ as?: React.ElementType;
380
+ }
381
+ declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
382
+
383
+ /**
384
+ * A single entry in the Table of Contents.
385
+ *
386
+ * @example
387
+ * ```ts
388
+ * const items: ToCItem[] = [
389
+ * { id: "installation", label: "Installation" },
390
+ * { id: "usage", label: "Usage" },
391
+ * ];
392
+ * ```
393
+ */
394
+ interface ToCItem {
395
+ /** The DOM `id` attribute of the corresponding section heading. */
396
+ id: string;
397
+ /** Human-readable label shown in the ToC. */
398
+ label: string;
399
+ }
400
+ /**
401
+ * Props for the `TableOfContents` component.
402
+ */
403
+ interface TableOfContentsProps {
404
+ /**
405
+ * Ordered list of section items to display.
406
+ * Each item must have a matching DOM element with the same `id`.
407
+ */
408
+ items: ToCItem[];
409
+ /**
410
+ * Additional CSS classes applied to the root `<nav>` element.
411
+ * Use this to control positioning (e.g. sticky, fixed) from the consumer.
412
+ */
413
+ className?: string;
414
+ /**
415
+ * Configuration for the internal ScrollArea.
416
+ * @default { type: "hover" }
417
+ */
418
+ scrollAreaProps?: Omit<ScrollAreaProps, "children">;
419
+ }
420
+ /**
421
+ * Table of Contents sidebar component.
422
+ *
423
+ * Renders a `<nav>` sidebar with links to page sections. Tracks the active
424
+ * section using `IntersectionObserver` and applies active styles to the
425
+ * current link.
426
+ *
427
+ * @remarks
428
+ * - Visible only on `xl` screens (`hidden xl:block` — sticky sidebar).
429
+ * - The `aria-current` attribute is set on the active link for screen readers.
430
+ * - Click scroll is smooth: `scrollIntoView({ behavior: "smooth" })`.
431
+ *
432
+ * @example
433
+ * ```tsx
434
+ * const toc: ToCItem[] = [
435
+ * { id: "overview", label: "Overview" },
436
+ * { id: "props", label: "Props" },
437
+ * { id: "examples", label: "Examples" },
438
+ * ];
439
+ *
440
+ * <TableOfContents items={toc} />
441
+ * ```
442
+ *
443
+ * @see https://m3.material.io/foundations/content-design/navigation
444
+ */
445
+ declare function TableOfContents({ items, className, scrollAreaProps, }: TableOfContentsProps): react_jsx_runtime.JSX.Element;
446
+
447
+ /**
448
+ * TypeScaleTokens - MD3 Expressive Typography Physical Tokens
449
+ *
450
+ * Port of androidx.compose.material3.tokens.TypeScaleTokens
451
+ * Adapted for Web with Google Sans Flex Variable Font (ROND axis = 100).
452
+ *
453
+ * All font sizes use rem units based on 14px root (project default).
454
+ * Reference: Material Design 3 Type Scale Tokens spec.
455
+ */
456
+ declare const TypeScaleTokens: {
457
+ readonly DisplayLargeFont: "'Google Sans Flex', system-ui, sans-serif";
458
+ readonly DisplayLargeWeight: 400;
459
+ readonly DisplayLargeSize: "3.571rem";
460
+ readonly DisplayLargeLineHeight: "4rem";
461
+ readonly DisplayLargeTracking: "-0.25px";
462
+ readonly DisplayMediumFont: "'Google Sans Flex', system-ui, sans-serif";
463
+ readonly DisplayMediumWeight: 400;
464
+ readonly DisplayMediumSize: "2.857rem";
465
+ readonly DisplayMediumLineHeight: "3.286rem";
466
+ readonly DisplayMediumTracking: "0px";
467
+ readonly DisplaySmallFont: "'Google Sans Flex', system-ui, sans-serif";
468
+ readonly DisplaySmallWeight: 400;
469
+ readonly DisplaySmallSize: "2.571rem";
470
+ readonly DisplaySmallLineHeight: "3.143rem";
471
+ readonly DisplaySmallTracking: "0px";
472
+ readonly HeadlineLargeFont: "'Google Sans Flex', system-ui, sans-serif";
473
+ readonly HeadlineLargeWeight: 400;
474
+ readonly HeadlineLargeSize: "2.286rem";
475
+ readonly HeadlineLargeLineHeight: "2.857rem";
476
+ readonly HeadlineLargeTracking: "0px";
477
+ readonly HeadlineMediumFont: "'Google Sans Flex', system-ui, sans-serif";
478
+ readonly HeadlineMediumWeight: 400;
479
+ readonly HeadlineMediumSize: "2rem";
480
+ readonly HeadlineMediumLineHeight: "2.571rem";
481
+ readonly HeadlineMediumTracking: "0px";
482
+ readonly HeadlineSmallFont: "'Google Sans Flex', system-ui, sans-serif";
483
+ readonly HeadlineSmallWeight: 400;
484
+ readonly HeadlineSmallSize: "1.714rem";
485
+ readonly HeadlineSmallLineHeight: "2.286rem";
486
+ readonly HeadlineSmallTracking: "0px";
487
+ readonly TitleLargeFont: "'Google Sans Flex', system-ui, sans-serif";
488
+ readonly TitleLargeWeight: 400;
489
+ readonly TitleLargeSize: "1.571rem";
490
+ readonly TitleLargeLineHeight: "2rem";
491
+ readonly TitleLargeTracking: "0px";
492
+ readonly TitleMediumFont: "'Google Sans Flex', system-ui, sans-serif";
493
+ readonly TitleMediumWeight: 500;
494
+ readonly TitleMediumSize: "1.143rem";
495
+ readonly TitleMediumLineHeight: "1.714rem";
496
+ readonly TitleMediumTracking: "0.15px";
497
+ readonly TitleSmallFont: "'Google Sans Flex', system-ui, sans-serif";
498
+ readonly TitleSmallWeight: 500;
499
+ readonly TitleSmallSize: "1rem";
500
+ readonly TitleSmallLineHeight: "1.429rem";
501
+ readonly TitleSmallTracking: "0.1px";
502
+ readonly BodyLargeFont: "'Google Sans Flex', system-ui, sans-serif";
503
+ readonly BodyLargeWeight: 400;
504
+ readonly BodyLargeSize: "1.143rem";
505
+ readonly BodyLargeLineHeight: "1.714rem";
506
+ readonly BodyLargeTracking: "0.5px";
507
+ readonly BodyMediumFont: "'Google Sans Flex', system-ui, sans-serif";
508
+ readonly BodyMediumWeight: 400;
509
+ readonly BodyMediumSize: "1rem";
510
+ readonly BodyMediumLineHeight: "1.429rem";
511
+ readonly BodyMediumTracking: "0.25px";
512
+ readonly BodySmallFont: "'Google Sans Flex', system-ui, sans-serif";
513
+ readonly BodySmallWeight: 400;
514
+ readonly BodySmallSize: "0.857rem";
515
+ readonly BodySmallLineHeight: "1.143rem";
516
+ readonly BodySmallTracking: "0.4px";
517
+ readonly LabelLargeFont: "'Google Sans Flex', system-ui, sans-serif";
518
+ readonly LabelLargeWeight: 500;
519
+ readonly LabelLargeSize: "1rem";
520
+ readonly LabelLargeLineHeight: "1.429rem";
521
+ readonly LabelLargeTracking: "0.1px";
522
+ readonly LabelMediumFont: "'Google Sans Flex', system-ui, sans-serif";
523
+ readonly LabelMediumWeight: 500;
524
+ readonly LabelMediumSize: "0.857rem";
525
+ readonly LabelMediumLineHeight: "1.143rem";
526
+ readonly LabelMediumTracking: "0.5px";
527
+ readonly LabelSmallFont: "'Google Sans Flex', system-ui, sans-serif";
528
+ readonly LabelSmallWeight: 500;
529
+ readonly LabelSmallSize: "0.786rem";
530
+ readonly LabelSmallLineHeight: "1.143rem";
531
+ readonly LabelSmallTracking: "0.5px";
532
+ readonly DisplayLargeEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
533
+ readonly DisplayLargeEmphasizedWeight: 800;
534
+ readonly DisplayLargeEmphasizedSize: "3.571rem";
535
+ readonly DisplayLargeEmphasizedLineHeight: "4rem";
536
+ readonly DisplayLargeEmphasizedTracking: "-0.25px";
537
+ readonly DisplayMediumEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
538
+ readonly DisplayMediumEmphasizedWeight: 800;
539
+ readonly DisplayMediumEmphasizedSize: "2.857rem";
540
+ readonly DisplayMediumEmphasizedLineHeight: "3.286rem";
541
+ readonly DisplayMediumEmphasizedTracking: "0px";
542
+ readonly DisplaySmallEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
543
+ readonly DisplaySmallEmphasizedWeight: 800;
544
+ readonly DisplaySmallEmphasizedSize: "2.571rem";
545
+ readonly DisplaySmallEmphasizedLineHeight: "3.143rem";
546
+ readonly DisplaySmallEmphasizedTracking: "0px";
547
+ readonly HeadlineLargeEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
548
+ readonly HeadlineLargeEmphasizedWeight: 800;
549
+ readonly HeadlineLargeEmphasizedSize: "2.286rem";
550
+ readonly HeadlineLargeEmphasizedLineHeight: "2.857rem";
551
+ readonly HeadlineLargeEmphasizedTracking: "0px";
552
+ readonly HeadlineMediumEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
553
+ readonly HeadlineMediumEmphasizedWeight: 800;
554
+ readonly HeadlineMediumEmphasizedSize: "2rem";
555
+ readonly HeadlineMediumEmphasizedLineHeight: "2.571rem";
556
+ readonly HeadlineMediumEmphasizedTracking: "0px";
557
+ readonly HeadlineSmallEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
558
+ readonly HeadlineSmallEmphasizedWeight: 800;
559
+ readonly HeadlineSmallEmphasizedSize: "1.714rem";
560
+ readonly HeadlineSmallEmphasizedLineHeight: "2.286rem";
561
+ readonly HeadlineSmallEmphasizedTracking: "0px";
562
+ readonly TitleLargeEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
563
+ readonly TitleLargeEmphasizedWeight: 700;
564
+ readonly TitleLargeEmphasizedSize: "1.571rem";
565
+ readonly TitleLargeEmphasizedLineHeight: "2rem";
566
+ readonly TitleLargeEmphasizedTracking: "0px";
567
+ readonly TitleMediumEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
568
+ readonly TitleMediumEmphasizedWeight: 700;
569
+ readonly TitleMediumEmphasizedSize: "1.143rem";
570
+ readonly TitleMediumEmphasizedLineHeight: "1.714rem";
571
+ readonly TitleMediumEmphasizedTracking: "0.15px";
572
+ readonly TitleSmallEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
573
+ readonly TitleSmallEmphasizedWeight: 700;
574
+ readonly TitleSmallEmphasizedSize: "1rem";
575
+ readonly TitleSmallEmphasizedLineHeight: "1.429rem";
576
+ readonly TitleSmallEmphasizedTracking: "0.1px";
577
+ readonly BodyLargeEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
578
+ readonly BodyLargeEmphasizedWeight: 700;
579
+ readonly BodyLargeEmphasizedSize: "1.143rem";
580
+ readonly BodyLargeEmphasizedLineHeight: "1.714rem";
581
+ readonly BodyLargeEmphasizedTracking: "0.5px";
582
+ readonly BodyMediumEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
583
+ readonly BodyMediumEmphasizedWeight: 700;
584
+ readonly BodyMediumEmphasizedSize: "1rem";
585
+ readonly BodyMediumEmphasizedLineHeight: "1.429rem";
586
+ readonly BodyMediumEmphasizedTracking: "0.25px";
587
+ readonly BodySmallEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
588
+ readonly BodySmallEmphasizedWeight: 700;
589
+ readonly BodySmallEmphasizedSize: "0.857rem";
590
+ readonly BodySmallEmphasizedLineHeight: "1.143rem";
591
+ readonly BodySmallEmphasizedTracking: "0.4px";
592
+ readonly LabelLargeEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
593
+ readonly LabelLargeEmphasizedWeight: 800;
594
+ readonly LabelLargeEmphasizedSize: "1rem";
595
+ readonly LabelLargeEmphasizedLineHeight: "1.429rem";
596
+ readonly LabelLargeEmphasizedTracking: "0.1px";
597
+ readonly LabelMediumEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
598
+ readonly LabelMediumEmphasizedWeight: 800;
599
+ readonly LabelMediumEmphasizedSize: "0.857rem";
600
+ readonly LabelMediumEmphasizedLineHeight: "1.143rem";
601
+ readonly LabelMediumEmphasizedTracking: "0.5px";
602
+ readonly LabelSmallEmphasizedFont: "'Google Sans Flex', system-ui, sans-serif";
603
+ readonly LabelSmallEmphasizedWeight: 800;
604
+ readonly LabelSmallEmphasizedSize: "0.786rem";
605
+ readonly LabelSmallEmphasizedLineHeight: "1.143rem";
606
+ readonly LabelSmallEmphasizedTracking: "0.5px";
607
+ };
608
+ type TypeScaleTokensType = typeof TypeScaleTokens;
609
+
610
+ export { Card, type CardProps, CodeBlock, type CodeBlockProps, Divider, type DividerProps, LIST_TOKENS, List, ListContext, ListDivider, type ListDividerProps, ListItem, type ListItemLeadingType, type ListItemProps, type ListItemTrailingType, type ListProps, type ListSelectionMode, type ListStyle, type ListVariant, ScrollAreaProps, TableOfContents, type TableOfContentsProps, Text, type TextProps, type ToCItem, TypeScaleTokens, type TypeScaleTokensType, buildWavePath, getExpressiveShape, getListItemHeight, shouldTopAlign, typographyVariants, useListContext };