@tinybigui/react 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +378 -0
- package/dist/index.cjs +3374 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1836 -0
- package/dist/index.d.ts +1836 -0
- package/dist/index.js +3329 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +213 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.d.cts +2 -0
- package/dist/styles.d.ts +2 -0
- package/package.json +118 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1836 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import { Theme } from '@material/material-color-utilities';
|
|
3
|
+
export { Theme, argbFromHex, hexFromArgb } from '@material/material-color-utilities';
|
|
4
|
+
import * as React$1 from 'react';
|
|
5
|
+
import React__default, { LabelHTMLAttributes, InputHTMLAttributes, HTMLAttributes, RefObject, ReactNode } from 'react';
|
|
6
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
|
+
import { VariantProps } from 'class-variance-authority';
|
|
8
|
+
import { AriaButtonProps, AriaTextFieldProps, AriaCheckboxProps, AriaSwitchProps, AriaRadioProps, AriaRadioGroupProps } from 'react-aria';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Combines and merges Tailwind CSS classes efficiently.
|
|
12
|
+
*
|
|
13
|
+
* This utility uses:
|
|
14
|
+
* - `clsx` for conditional class joining
|
|
15
|
+
* - `tailwind-merge` to properly merge/deduplicate Tailwind classes
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* cn('px-2 py-1', condition && 'bg-blue-500', { 'text-white': isActive })
|
|
20
|
+
* // => 'px-2 py-1 bg-blue-500 text-white'
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example Merging conflicting classes
|
|
24
|
+
* ```tsx
|
|
25
|
+
* cn('px-2', 'px-4')
|
|
26
|
+
* // => 'px-4' (later class wins)
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Color Utilities
|
|
33
|
+
*
|
|
34
|
+
* Utilities for working with Material Design 3 color system.
|
|
35
|
+
* Provides functions for color manipulation, CSS variable extraction,
|
|
36
|
+
* and integration with material-color-utilities.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Material Design 3 color roles
|
|
41
|
+
*/
|
|
42
|
+
type MD3ColorRole = "primary" | "on-primary" | "primary-container" | "on-primary-container" | "secondary" | "on-secondary" | "secondary-container" | "on-secondary-container" | "tertiary" | "on-tertiary" | "tertiary-container" | "on-tertiary-container" | "error" | "on-error" | "error-container" | "on-error-container" | "surface" | "on-surface" | "surface-variant" | "on-surface-variant" | "outline" | "outline-variant" | "background" | "on-background";
|
|
43
|
+
/**
|
|
44
|
+
* Get the computed value of a CSS variable
|
|
45
|
+
*
|
|
46
|
+
* @param variable - CSS variable name (with or without `--` prefix)
|
|
47
|
+
* @param element - Element to get computed style from (defaults to document root)
|
|
48
|
+
* @returns The computed value of the CSS variable
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const primaryColor = getColorValue('--md-sys-color-primary');
|
|
53
|
+
* // Returns: '#6750a4'
|
|
54
|
+
*
|
|
55
|
+
* const primaryColor = getColorValue('md-sys-color-primary');
|
|
56
|
+
* // Also returns: '#6750a4'
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
declare function getColorValue(variable: string, element?: HTMLElement): string;
|
|
60
|
+
/**
|
|
61
|
+
* Get a Material Design 3 color token value
|
|
62
|
+
*
|
|
63
|
+
* @param role - MD3 color role name
|
|
64
|
+
* @returns The hex color value
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const primary = getMD3Color('primary');
|
|
69
|
+
* // Returns: '#6750a4'
|
|
70
|
+
*
|
|
71
|
+
* const onPrimary = getMD3Color('on-primary');
|
|
72
|
+
* // Returns: '#ffffff'
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare function getMD3Color(role: MD3ColorRole): string;
|
|
76
|
+
/**
|
|
77
|
+
* Add opacity to a hex color
|
|
78
|
+
*
|
|
79
|
+
* @param color - Hex color string (with or without #)
|
|
80
|
+
* @param opacity - Opacity value (0-1)
|
|
81
|
+
* @returns Hex color with opacity (8-digit hex)
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* withOpacity('#6750a4', 0.5);
|
|
86
|
+
* // Returns: '#6750a480'
|
|
87
|
+
*
|
|
88
|
+
* withOpacity('6750a4', 0.12);
|
|
89
|
+
* // Returns: '#6750a41f'
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
declare function withOpacity(color: string, opacity: number): string;
|
|
93
|
+
/**
|
|
94
|
+
* Convert hex color to RGB object
|
|
95
|
+
*
|
|
96
|
+
* @param hex - Hex color string (with or without #)
|
|
97
|
+
* @returns RGB object with r, g, b values (0-255)
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* hexToRgb('#6750a4');
|
|
102
|
+
* // Returns: { r: 103, g: 80, b: 164 }
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
declare function hexToRgb(hex: string): {
|
|
106
|
+
r: number;
|
|
107
|
+
g: number;
|
|
108
|
+
b: number;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Convert RGB to hex color
|
|
112
|
+
*
|
|
113
|
+
* @param r - Red value (0-255)
|
|
114
|
+
* @param g - Green value (0-255)
|
|
115
|
+
* @param b - Blue value (0-255)
|
|
116
|
+
* @returns Hex color string
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* rgbToHex(103, 80, 164);
|
|
121
|
+
* // Returns: '#6750a4'
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
declare function rgbToHex(r: number, g: number, b: number): string;
|
|
125
|
+
/**
|
|
126
|
+
* Generate a complete Material Design 3 theme from a seed color
|
|
127
|
+
*
|
|
128
|
+
* @param seedColor - Hex color to generate theme from
|
|
129
|
+
* @returns Material Color Utilities Theme object
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* const theme = generateMD3Theme('#6750a4');
|
|
134
|
+
*
|
|
135
|
+
* // Access light mode colors
|
|
136
|
+
* const lightPrimary = hexFromArgb(theme.schemes.light.primary);
|
|
137
|
+
* // Returns: '#6750a4'
|
|
138
|
+
*
|
|
139
|
+
* // Access dark mode colors
|
|
140
|
+
* const darkPrimary = hexFromArgb(theme.schemes.dark.primary);
|
|
141
|
+
* // Returns: '#d0bcff'
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
declare function generateMD3Theme(seedColor: string): Theme;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* State layer opacity values (Material Design 3 spec)
|
|
148
|
+
*
|
|
149
|
+
* These values are used for hover, focus, press, and drag states
|
|
150
|
+
* in Material Design 3 components.
|
|
151
|
+
*
|
|
152
|
+
* @see https://m3.material.io/foundations/interaction/states/state-layers
|
|
153
|
+
*/
|
|
154
|
+
declare const STATE_LAYER_OPACITY: {
|
|
155
|
+
readonly hover: 0.08;
|
|
156
|
+
readonly focus: 0.12;
|
|
157
|
+
readonly press: 0.12;
|
|
158
|
+
readonly drag: 0.16;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Apply a state layer opacity to a color
|
|
162
|
+
*
|
|
163
|
+
* @param color - Base hex color
|
|
164
|
+
* @param state - State type ('hover' | 'focus' | 'press' | 'drag')
|
|
165
|
+
* @returns Color with state layer opacity applied
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```ts
|
|
169
|
+
* applyStateLayer('#6750a4', 'hover');
|
|
170
|
+
* // Returns: '#6750a414' (8% opacity)
|
|
171
|
+
*
|
|
172
|
+
* applyStateLayer('#6750a4', 'focus');
|
|
173
|
+
* // Returns: '#6750a41f' (12% opacity)
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
declare function applyStateLayer(color: string, state: keyof typeof STATE_LAYER_OPACITY): string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Typography Utilities
|
|
180
|
+
*
|
|
181
|
+
* Utilities for working with Material Design 3 typography system.
|
|
182
|
+
* Provides type-safe access to typography tokens and helper functions
|
|
183
|
+
* for applying complete text styles.
|
|
184
|
+
*/
|
|
185
|
+
/**
|
|
186
|
+
* Material Design 3 typography scales
|
|
187
|
+
*
|
|
188
|
+
* MD3 defines 5 categories of typography, each with 3 size variants.
|
|
189
|
+
*/
|
|
190
|
+
type MD3TypographyScale = "display" | "headline" | "title" | "body" | "label";
|
|
191
|
+
/**
|
|
192
|
+
* Typography size variants
|
|
193
|
+
*/
|
|
194
|
+
type MD3TypographySize = "large" | "medium" | "small";
|
|
195
|
+
/**
|
|
196
|
+
* Complete typography style name
|
|
197
|
+
* Combination of scale and size (e.g., 'display-large', 'body-medium')
|
|
198
|
+
*/
|
|
199
|
+
type MD3TypographyStyle = "display-large" | "display-medium" | "display-small" | "headline-large" | "headline-medium" | "headline-small" | "title-large" | "title-medium" | "title-small" | "body-large" | "body-medium" | "body-small" | "label-large" | "label-medium" | "label-small";
|
|
200
|
+
/**
|
|
201
|
+
* Typography token properties
|
|
202
|
+
*/
|
|
203
|
+
type TypographyProperty = "size" | "line-height" | "weight" | "tracking";
|
|
204
|
+
/**
|
|
205
|
+
* Typography style object returned by getTypographyStyle()
|
|
206
|
+
*/
|
|
207
|
+
interface TypographyStyleObject {
|
|
208
|
+
fontSize: string;
|
|
209
|
+
lineHeight: string;
|
|
210
|
+
fontWeight: string;
|
|
211
|
+
letterSpacing: string;
|
|
212
|
+
fontFamily?: string;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Get a typography token value
|
|
216
|
+
*
|
|
217
|
+
* @param style - Typography style name (e.g., 'display-large', 'body-medium')
|
|
218
|
+
* @param property - Property to retrieve ('size' | 'line-height' | 'weight' | 'tracking')
|
|
219
|
+
* @returns The token value as a string
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* getTypographyToken('display-large', 'size');
|
|
224
|
+
* // Returns: '3.5625rem' (57px)
|
|
225
|
+
*
|
|
226
|
+
* getTypographyToken('body-medium', 'weight');
|
|
227
|
+
* // Returns: '400'
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
declare function getTypographyToken(style: MD3TypographyStyle, property: TypographyProperty): string;
|
|
231
|
+
/**
|
|
232
|
+
* Get a complete typography style object
|
|
233
|
+
*
|
|
234
|
+
* Returns a style object with all typography properties that can be
|
|
235
|
+
* spread directly into a React component's style prop.
|
|
236
|
+
*
|
|
237
|
+
* @param style - Typography style name
|
|
238
|
+
* @param includeFontFamily - Whether to include font-family (default: false)
|
|
239
|
+
* @returns Typography style object for React inline styles
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```tsx
|
|
243
|
+
* const displayStyle = getTypographyStyle('display-large');
|
|
244
|
+
* // Returns: {
|
|
245
|
+
* // fontSize: '3.5625rem',
|
|
246
|
+
* // lineHeight: '4rem',
|
|
247
|
+
* // fontWeight: '400',
|
|
248
|
+
* // letterSpacing: '-0.25px'
|
|
249
|
+
* // }
|
|
250
|
+
*
|
|
251
|
+
* <h1 style={displayStyle}>Display Large Text</h1>
|
|
252
|
+
* ```
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```tsx
|
|
256
|
+
* // With font family
|
|
257
|
+
* const bodyStyle = getTypographyStyle('body-medium', true);
|
|
258
|
+
* // Returns: {
|
|
259
|
+
* // fontSize: '0.875rem',
|
|
260
|
+
* // lineHeight: '1.25rem',
|
|
261
|
+
* // fontWeight: '400',
|
|
262
|
+
* // letterSpacing: '0.25px',
|
|
263
|
+
* // fontFamily: 'system-ui, -apple-system, ...'
|
|
264
|
+
* // }
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
declare function getTypographyStyle(style: MD3TypographyStyle, includeFontFamily?: boolean): TypographyStyleObject;
|
|
268
|
+
/**
|
|
269
|
+
* Get font family token value
|
|
270
|
+
*
|
|
271
|
+
* @param variant - Font family variant ('plain' | 'brand')
|
|
272
|
+
* @returns Font family stack
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```ts
|
|
276
|
+
* getFontFamily('plain');
|
|
277
|
+
* // Returns: 'system-ui, -apple-system, Segoe UI, Roboto, ...'
|
|
278
|
+
*
|
|
279
|
+
* getFontFamily('brand');
|
|
280
|
+
* // Returns: Same as plain (can be customized via CSS variables)
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
declare function getFontFamily(variant?: "plain" | "brand"): string;
|
|
284
|
+
/**
|
|
285
|
+
* Typography scale recommendations for semantic HTML elements
|
|
286
|
+
*
|
|
287
|
+
* Maps HTML elements to recommended MD3 typography styles.
|
|
288
|
+
* Based on Material Design 3 guidelines.
|
|
289
|
+
*/
|
|
290
|
+
declare const TYPOGRAPHY_ELEMENT_MAP: {
|
|
291
|
+
readonly h1: "display-large";
|
|
292
|
+
readonly h2: "display-medium";
|
|
293
|
+
readonly h3: "headline-large";
|
|
294
|
+
readonly h4: "headline-medium";
|
|
295
|
+
readonly h5: "headline-small";
|
|
296
|
+
readonly h6: "title-large";
|
|
297
|
+
readonly p: "body-large";
|
|
298
|
+
readonly span: "body-medium";
|
|
299
|
+
readonly small: "body-small";
|
|
300
|
+
readonly button: "label-large";
|
|
301
|
+
readonly label: "label-medium";
|
|
302
|
+
readonly caption: "label-small";
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Get recommended typography style for an HTML element
|
|
306
|
+
*
|
|
307
|
+
* @param element - HTML element tag name
|
|
308
|
+
* @returns Recommended MD3 typography style
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```ts
|
|
312
|
+
* getTypographyForElement('h1');
|
|
313
|
+
* // Returns: 'display-large'
|
|
314
|
+
*
|
|
315
|
+
* getTypographyForElement('button');
|
|
316
|
+
* // Returns: 'label-large'
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
declare function getTypographyForElement(element: keyof typeof TYPOGRAPHY_ELEMENT_MAP): MD3TypographyStyle;
|
|
320
|
+
/**
|
|
321
|
+
* Typography scale usage guidelines
|
|
322
|
+
*
|
|
323
|
+
* Provides semantic context for when to use each typography scale.
|
|
324
|
+
*/
|
|
325
|
+
declare const TYPOGRAPHY_USAGE: {
|
|
326
|
+
readonly display: "Large, expressive text for hero sections and marketing";
|
|
327
|
+
readonly headline: "High-emphasis text for titles and important headings";
|
|
328
|
+
readonly title: "Medium-emphasis text for section headers and card titles";
|
|
329
|
+
readonly body: "Plain text for paragraphs, lists, and general content";
|
|
330
|
+
readonly label: "UI labels, buttons, tabs, and form elements";
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* Create a typography CSS class name
|
|
334
|
+
*
|
|
335
|
+
* Generates a consistent class name for typography styles.
|
|
336
|
+
* Useful for creating utility classes or component variants.
|
|
337
|
+
*
|
|
338
|
+
* @param style - Typography style name
|
|
339
|
+
* @returns CSS class name string
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* ```ts
|
|
343
|
+
* getTypographyClassName('display-large');
|
|
344
|
+
* // Returns: 'text-display-large'
|
|
345
|
+
*
|
|
346
|
+
* getTypographyClassName('body-medium');
|
|
347
|
+
* // Returns: 'text-body-medium'
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
declare function getTypographyClassName(style: MD3TypographyStyle): string;
|
|
351
|
+
/**
|
|
352
|
+
* Responsive typography helper
|
|
353
|
+
*
|
|
354
|
+
* Creates a style object that adapts typography across breakpoints.
|
|
355
|
+
*
|
|
356
|
+
* @param mobile - Typography style for mobile screens
|
|
357
|
+
* @param tablet - Typography style for tablet screens (optional)
|
|
358
|
+
* @param desktop - Typography style for desktop screens (optional)
|
|
359
|
+
* @returns Object with styles for different breakpoints
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```tsx
|
|
363
|
+
* const responsiveTitle = getResponsiveTypography(
|
|
364
|
+
* 'headline-small',
|
|
365
|
+
* 'headline-medium',
|
|
366
|
+
* 'headline-large'
|
|
367
|
+
* );
|
|
368
|
+
*
|
|
369
|
+
* // Use with CSS-in-JS or styled-components
|
|
370
|
+
* const Title = styled.h2`
|
|
371
|
+
* ${responsiveTitle.mobile}
|
|
372
|
+
*
|
|
373
|
+
* @media (min-width: 768px) {
|
|
374
|
+
* ${responsiveTitle.tablet}
|
|
375
|
+
* }
|
|
376
|
+
*
|
|
377
|
+
* @media (min-width: 1024px) {
|
|
378
|
+
* ${responsiveTitle.desktop}
|
|
379
|
+
* }
|
|
380
|
+
* `;
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
declare function getResponsiveTypography(mobile: MD3TypographyStyle, tablet?: MD3TypographyStyle, desktop?: MD3TypographyStyle): {
|
|
384
|
+
mobile: TypographyStyleObject;
|
|
385
|
+
tablet?: TypographyStyleObject;
|
|
386
|
+
desktop?: TypographyStyleObject;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Convert rem to pixels (assuming 16px base)
|
|
390
|
+
*
|
|
391
|
+
* @param rem - Rem value (with or without 'rem' suffix)
|
|
392
|
+
* @returns Pixel value
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
* ```ts
|
|
396
|
+
* remToPx('1.5rem');
|
|
397
|
+
* // Returns: 24
|
|
398
|
+
*
|
|
399
|
+
* remToPx('3.5625rem');
|
|
400
|
+
* // Returns: 57
|
|
401
|
+
* ```
|
|
402
|
+
*/
|
|
403
|
+
declare function remToPx(rem: string): number;
|
|
404
|
+
/**
|
|
405
|
+
* Convert pixels to rem (assuming 16px base)
|
|
406
|
+
*
|
|
407
|
+
* @param px - Pixel value (with or without 'px' suffix)
|
|
408
|
+
* @returns Rem value as string
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```ts
|
|
412
|
+
* pxToRem(24);
|
|
413
|
+
* // Returns: '1.5rem'
|
|
414
|
+
*
|
|
415
|
+
* pxToRem('57px');
|
|
416
|
+
* // Returns: '3.5625rem'
|
|
417
|
+
* ```
|
|
418
|
+
*/
|
|
419
|
+
declare function pxToRem(px: number | string): string;
|
|
420
|
+
/**
|
|
421
|
+
* Truncate text with ellipsis
|
|
422
|
+
*
|
|
423
|
+
* Returns CSS properties for single or multi-line text truncation.
|
|
424
|
+
*
|
|
425
|
+
* @param lines - Number of lines before truncation (1 for single-line)
|
|
426
|
+
* @returns CSS properties object
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```tsx
|
|
430
|
+
* // Single line truncation
|
|
431
|
+
* const singleLine = truncateText(1);
|
|
432
|
+
* <div style={singleLine}>Long text here...</div>
|
|
433
|
+
*
|
|
434
|
+
* // Multi-line truncation (3 lines)
|
|
435
|
+
* const multiLine = truncateText(3);
|
|
436
|
+
* <p style={multiLine}>Long paragraph text here...</p>
|
|
437
|
+
* ```
|
|
438
|
+
*/
|
|
439
|
+
declare function truncateText(lines?: number): React.CSSProperties;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Material Design 3 Button Variants (CVA)
|
|
443
|
+
*
|
|
444
|
+
* Type-safe variant management for Button component.
|
|
445
|
+
* Uses Tailwind CSS classes mapped to MD3 design tokens.
|
|
446
|
+
*/
|
|
447
|
+
declare const buttonVariants: (props?: ({
|
|
448
|
+
variant?: "text" | "filled" | "outlined" | "tonal" | "elevated" | null | undefined;
|
|
449
|
+
color?: "primary" | "secondary" | "tertiary" | "error" | null | undefined;
|
|
450
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
451
|
+
fullWidth?: boolean | null | undefined;
|
|
452
|
+
disabled?: boolean | null | undefined;
|
|
453
|
+
loading?: boolean | null | undefined;
|
|
454
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
455
|
+
/**
|
|
456
|
+
* Extract variant prop types from CVA
|
|
457
|
+
*/
|
|
458
|
+
type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Button variant types (Material Design 3)
|
|
462
|
+
*/
|
|
463
|
+
type ButtonVariant = "filled" | "outlined" | "tonal" | "elevated" | "text";
|
|
464
|
+
/**
|
|
465
|
+
* Button color schemes (Material Design 3 color roles)
|
|
466
|
+
*/
|
|
467
|
+
type ButtonColor = "primary" | "secondary" | "tertiary" | "error";
|
|
468
|
+
/**
|
|
469
|
+
* Button sizes
|
|
470
|
+
*/
|
|
471
|
+
type ButtonSize = "small" | "medium" | "large";
|
|
472
|
+
/**
|
|
473
|
+
* Material Design 3 Button Component Props
|
|
474
|
+
*
|
|
475
|
+
* Built on React Aria for world-class accessibility.
|
|
476
|
+
* Supports 5 variants: filled, outlined, tonal, elevated, text
|
|
477
|
+
* Implementation uses CVA + Tailwind CSS classes mapped to MD3 tokens.
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* ```tsx
|
|
481
|
+
* // Filled button (default)
|
|
482
|
+
* <Button variant="filled" color="primary">
|
|
483
|
+
* Click me
|
|
484
|
+
* </Button>
|
|
485
|
+
*
|
|
486
|
+
* // With icon
|
|
487
|
+
* <Button variant="tonal" icon={<IconAdd />}>
|
|
488
|
+
* Add Item
|
|
489
|
+
* </Button>
|
|
490
|
+
*
|
|
491
|
+
* // Loading state
|
|
492
|
+
* <Button variant="elevated" loading>
|
|
493
|
+
* Saving...
|
|
494
|
+
* </Button>
|
|
495
|
+
*
|
|
496
|
+
* // Disabled
|
|
497
|
+
* <Button variant="outlined" isDisabled>
|
|
498
|
+
* Disabled
|
|
499
|
+
* </Button>
|
|
500
|
+
*
|
|
501
|
+
* // Headless version (custom styling)
|
|
502
|
+
* <ButtonHeadless className="my-custom-styles">
|
|
503
|
+
* Click me
|
|
504
|
+
* </ButtonHeadless>
|
|
505
|
+
* ```
|
|
506
|
+
*/
|
|
507
|
+
interface ButtonProps extends AriaButtonProps, Omit<React__default.HTMLAttributes<HTMLButtonElement>, keyof AriaButtonProps | "children"> {
|
|
508
|
+
/**
|
|
509
|
+
* Button variant
|
|
510
|
+
* @default 'filled'
|
|
511
|
+
*/
|
|
512
|
+
variant?: ButtonVariant;
|
|
513
|
+
/**
|
|
514
|
+
* Color scheme
|
|
515
|
+
* @default 'primary'
|
|
516
|
+
*/
|
|
517
|
+
color?: ButtonColor;
|
|
518
|
+
/**
|
|
519
|
+
* Size variant
|
|
520
|
+
* @default 'medium'
|
|
521
|
+
*/
|
|
522
|
+
size?: ButtonSize;
|
|
523
|
+
/**
|
|
524
|
+
* Leading icon (before text)
|
|
525
|
+
*
|
|
526
|
+
* MD3 Specification: Icons should be 18px × 18px
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* ```tsx
|
|
530
|
+
* <Button icon={<IconAdd className="h-[18px] w-[18px]" />}>
|
|
531
|
+
* Add Item
|
|
532
|
+
* </Button>
|
|
533
|
+
* ```
|
|
534
|
+
*/
|
|
535
|
+
icon?: React__default.ReactNode;
|
|
536
|
+
/**
|
|
537
|
+
* Trailing icon (after text)
|
|
538
|
+
*
|
|
539
|
+
* MD3 Specification: Icons should be 18px × 18px
|
|
540
|
+
*
|
|
541
|
+
* @example
|
|
542
|
+
* ```tsx
|
|
543
|
+
* <Button trailingIcon={<IconArrow className="h-[18px] w-[18px]" />}>
|
|
544
|
+
* Continue
|
|
545
|
+
* </Button>
|
|
546
|
+
* ```
|
|
547
|
+
*/
|
|
548
|
+
trailingIcon?: React__default.ReactNode;
|
|
549
|
+
/**
|
|
550
|
+
* Button content (text)
|
|
551
|
+
*/
|
|
552
|
+
children: React__default.ReactNode;
|
|
553
|
+
/**
|
|
554
|
+
* Full width button (spans container)
|
|
555
|
+
* @default false
|
|
556
|
+
*/
|
|
557
|
+
fullWidth?: boolean;
|
|
558
|
+
/**
|
|
559
|
+
* Loading state - shows spinner, disables interaction
|
|
560
|
+
* @default false
|
|
561
|
+
*/
|
|
562
|
+
loading?: boolean;
|
|
563
|
+
/**
|
|
564
|
+
* Disable ripple effect
|
|
565
|
+
* @default false
|
|
566
|
+
*/
|
|
567
|
+
disableRipple?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Additional CSS classes (Tailwind)
|
|
570
|
+
*/
|
|
571
|
+
className?: string;
|
|
572
|
+
/**
|
|
573
|
+
* Tab index for keyboard navigation
|
|
574
|
+
* @default 0
|
|
575
|
+
*/
|
|
576
|
+
tabIndex?: number;
|
|
577
|
+
/**
|
|
578
|
+
* Button type attribute
|
|
579
|
+
* @default 'button'
|
|
580
|
+
*/
|
|
581
|
+
type?: "button" | "submit" | "reset";
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Material Design 3 Button Component (Layer 3: Styled)
|
|
586
|
+
*
|
|
587
|
+
* Built on React Aria for world-class accessibility.
|
|
588
|
+
* Uses CVA for type-safe variant management.
|
|
589
|
+
* Styled with Tailwind CSS using MD3 design tokens.
|
|
590
|
+
*
|
|
591
|
+
* Features:
|
|
592
|
+
* - ✅ 5 MD3 variants: filled, outlined, tonal, elevated, text
|
|
593
|
+
* - ✅ 4 color schemes: primary, secondary, tertiary, error
|
|
594
|
+
* - ✅ 3 sizes: small, medium, large
|
|
595
|
+
* - ✅ Loading state with spinner
|
|
596
|
+
* - ✅ Ripple effect (Material Design)
|
|
597
|
+
* - ✅ Full keyboard accessibility (via React Aria)
|
|
598
|
+
* - ✅ Screen reader support (via React Aria)
|
|
599
|
+
* - ✅ Focus management (via React Aria)
|
|
600
|
+
*
|
|
601
|
+
* MD3 Specifications:
|
|
602
|
+
* - Height: 40dp (medium), 32dp (small), 48dp (large)
|
|
603
|
+
* - Typography: Label Large (14px, 500 weight, +0.1px letter-spacing)
|
|
604
|
+
* - Icon size: 18px × 18px (per MD3 spec)
|
|
605
|
+
* - State layers: 8% hover, 12% focus/pressed
|
|
606
|
+
* - Elevation: Level 1 on hover (filled), Level 1→2 (elevated)
|
|
607
|
+
*
|
|
608
|
+
* @example
|
|
609
|
+
* ```tsx
|
|
610
|
+
* // Basic usage
|
|
611
|
+
* <Button>Click me</Button>
|
|
612
|
+
*
|
|
613
|
+
* // With variant and color
|
|
614
|
+
* <Button variant="outlined" color="secondary">
|
|
615
|
+
* Secondary Action
|
|
616
|
+
* </Button>
|
|
617
|
+
*
|
|
618
|
+
* // With icon (MD3 spec: icons should be 18px × 18px)
|
|
619
|
+
* <Button icon={<IconAdd className="h-[18px] w-[18px]" />}>
|
|
620
|
+
* Add Item
|
|
621
|
+
* </Button>
|
|
622
|
+
*
|
|
623
|
+
* // Loading state
|
|
624
|
+
* <Button loading>
|
|
625
|
+
* Saving...
|
|
626
|
+
* </Button>
|
|
627
|
+
*
|
|
628
|
+
* // Disabled
|
|
629
|
+
* <Button isDisabled>
|
|
630
|
+
* Disabled
|
|
631
|
+
* </Button>
|
|
632
|
+
*
|
|
633
|
+
* // Full width
|
|
634
|
+
* <Button fullWidth>
|
|
635
|
+
* Full Width Button
|
|
636
|
+
* </Button>
|
|
637
|
+
* ```
|
|
638
|
+
*/
|
|
639
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & Omit<ButtonVariants, "disabled"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Material Design 3 IconButton Variants (CVA)
|
|
643
|
+
*
|
|
644
|
+
* Type-safe variant management for IconButton component.
|
|
645
|
+
* Uses Tailwind CSS classes mapped to MD3 design tokens.
|
|
646
|
+
*
|
|
647
|
+
* Key differences from Button:
|
|
648
|
+
* - Circular shape (not pill-shaped)
|
|
649
|
+
* - Fixed square dimensions
|
|
650
|
+
* - No text content support
|
|
651
|
+
* - 'standard' variant instead of 'elevated'
|
|
652
|
+
*/
|
|
653
|
+
declare const iconButtonVariants: (props?: ({
|
|
654
|
+
variant?: "filled" | "outlined" | "tonal" | "standard" | null | undefined;
|
|
655
|
+
color?: "primary" | "secondary" | "tertiary" | "error" | null | undefined;
|
|
656
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
657
|
+
selected?: boolean | null | undefined;
|
|
658
|
+
isDisabled?: boolean | null | undefined;
|
|
659
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
660
|
+
/**
|
|
661
|
+
* Extract variant prop types from CVA
|
|
662
|
+
*/
|
|
663
|
+
type IconButtonVariants = VariantProps<typeof iconButtonVariants>;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* IconButton variant types (MD3 specification)
|
|
667
|
+
*/
|
|
668
|
+
type IconButtonVariant = "standard" | "filled" | "tonal" | "outlined";
|
|
669
|
+
/**
|
|
670
|
+
* Color scheme
|
|
671
|
+
*/
|
|
672
|
+
type IconButtonColor = "primary" | "secondary" | "tertiary" | "error";
|
|
673
|
+
/**
|
|
674
|
+
* IconButton sizes (square dimensions)
|
|
675
|
+
*/
|
|
676
|
+
type IconButtonSize = "small" | "medium" | "large";
|
|
677
|
+
/**
|
|
678
|
+
* Material Design 3 IconButton Component Props
|
|
679
|
+
*
|
|
680
|
+
* Icon-only button component with 4 variants and mandatory accessibility.
|
|
681
|
+
*
|
|
682
|
+
* **Key Features:**
|
|
683
|
+
* - 4 variants: standard, filled, tonal, outlined
|
|
684
|
+
* - Icon only (no text content)
|
|
685
|
+
* - Circular shape (MD3 specification)
|
|
686
|
+
* - Mandatory `aria-label` for accessibility
|
|
687
|
+
* - Toggle support with `selected` prop
|
|
688
|
+
* - 48×48px minimum touch target
|
|
689
|
+
*
|
|
690
|
+
* @example
|
|
691
|
+
* ```tsx
|
|
692
|
+
* // Standard icon button
|
|
693
|
+
* <IconButton aria-label="Delete" variant="standard">
|
|
694
|
+
* <IconDelete />
|
|
695
|
+
* </IconButton>
|
|
696
|
+
*
|
|
697
|
+
* // Filled with color
|
|
698
|
+
* <IconButton aria-label="Favorite" variant="filled" color="error">
|
|
699
|
+
* <IconHeart />
|
|
700
|
+
* </IconButton>
|
|
701
|
+
*
|
|
702
|
+
* // Toggle button
|
|
703
|
+
* <IconButton
|
|
704
|
+
* aria-label={isFavorite ? "Remove from favorites" : "Add to favorites"}
|
|
705
|
+
* selected={isFavorite}
|
|
706
|
+
* onPress={() => setIsFavorite(!isFavorite)}
|
|
707
|
+
* >
|
|
708
|
+
* {isFavorite ? <IconStarFilled /> : <IconStarOutline />}
|
|
709
|
+
* </IconButton>
|
|
710
|
+
*
|
|
711
|
+
* // Disabled
|
|
712
|
+
* <IconButton aria-label="Edit" isDisabled>
|
|
713
|
+
* <IconEdit />
|
|
714
|
+
* </IconButton>
|
|
715
|
+
* ```
|
|
716
|
+
*/
|
|
717
|
+
interface IconButtonProps extends AriaButtonProps {
|
|
718
|
+
/**
|
|
719
|
+
* Button variant
|
|
720
|
+
* @default 'standard'
|
|
721
|
+
*/
|
|
722
|
+
variant?: IconButtonVariant;
|
|
723
|
+
/**
|
|
724
|
+
* Color scheme
|
|
725
|
+
* @default 'primary'
|
|
726
|
+
*/
|
|
727
|
+
color?: IconButtonColor;
|
|
728
|
+
/**
|
|
729
|
+
* Size variant
|
|
730
|
+
* @default 'medium'
|
|
731
|
+
*/
|
|
732
|
+
size?: IconButtonSize;
|
|
733
|
+
/**
|
|
734
|
+
* Icon content (React node). Recommended size:
|
|
735
|
+
* - small: 20×20px
|
|
736
|
+
* - medium: 24×24px
|
|
737
|
+
* - large: 28×28px
|
|
738
|
+
*/
|
|
739
|
+
children: React__default.ReactNode;
|
|
740
|
+
/**
|
|
741
|
+
* Toggle state (for toggle buttons)
|
|
742
|
+
* When true, button shows selected state
|
|
743
|
+
* @default false
|
|
744
|
+
*/
|
|
745
|
+
selected?: boolean;
|
|
746
|
+
/**
|
|
747
|
+
* Disable ripple effect
|
|
748
|
+
* @default false
|
|
749
|
+
*/
|
|
750
|
+
disableRipple?: boolean;
|
|
751
|
+
/**
|
|
752
|
+
* Additional CSS classes (Tailwind)
|
|
753
|
+
*/
|
|
754
|
+
className?: string;
|
|
755
|
+
/**
|
|
756
|
+
* HTML title attribute for tooltip
|
|
757
|
+
* Recommended for better UX on desktop
|
|
758
|
+
*/
|
|
759
|
+
title?: string;
|
|
760
|
+
/**
|
|
761
|
+
* Mouse down handler (for ripple effect and custom handling)
|
|
762
|
+
*/
|
|
763
|
+
onMouseDown?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
764
|
+
/**
|
|
765
|
+
* REQUIRED: Accessible label for screen readers
|
|
766
|
+
* Since IconButton has no visible text, this is mandatory
|
|
767
|
+
*
|
|
768
|
+
* @example
|
|
769
|
+
* aria-label="Delete item"
|
|
770
|
+
* aria-label="Add to favorites"
|
|
771
|
+
* aria-label="Close dialog"
|
|
772
|
+
*/
|
|
773
|
+
"aria-label": string;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Material Design 3 IconButton Component
|
|
778
|
+
*
|
|
779
|
+
* Icon-only button component following MD3 specifications.
|
|
780
|
+
* Supports 4 variants, toggle mode, and enforces accessibility.
|
|
781
|
+
*
|
|
782
|
+
* **Key Features:**
|
|
783
|
+
* - 4 variants: standard, filled, tonal, outlined
|
|
784
|
+
* - Circular shape (MD3 specification)
|
|
785
|
+
* - Mandatory `aria-label` for accessibility
|
|
786
|
+
* - Toggle support with `selected` prop
|
|
787
|
+
* - Ripple effect on interaction
|
|
788
|
+
* - 48×48px minimum touch target
|
|
789
|
+
*
|
|
790
|
+
* @example
|
|
791
|
+
* ```tsx
|
|
792
|
+
* // Standard icon button
|
|
793
|
+
* <IconButton aria-label="Delete">
|
|
794
|
+
* <IconDelete />
|
|
795
|
+
* </IconButton>
|
|
796
|
+
*
|
|
797
|
+
* // Filled with color
|
|
798
|
+
* <IconButton aria-label="Favorite" variant="filled" color="error">
|
|
799
|
+
* <IconHeart />
|
|
800
|
+
* </IconButton>
|
|
801
|
+
*
|
|
802
|
+
* // Toggle button
|
|
803
|
+
* <IconButton
|
|
804
|
+
* aria-label={selected ? "Remove favorite" : "Add favorite"}
|
|
805
|
+
* selected={selected}
|
|
806
|
+
* onPress={() => setSelected(!selected)}
|
|
807
|
+
* >
|
|
808
|
+
* {selected ? <IconStarFilled /> : <IconStarOutline />}
|
|
809
|
+
* </IconButton>
|
|
810
|
+
* ```
|
|
811
|
+
*/
|
|
812
|
+
declare const IconButton: React__default.ForwardRefExoticComponent<IconButtonProps & Omit<IconButtonVariants, "isDisabled" | "selected"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Headless IconButton Component (Layer 2)
|
|
816
|
+
*
|
|
817
|
+
* Unstyled icon button primitive using React Aria for accessibility.
|
|
818
|
+
* Provides behavior only - bring your own styles.
|
|
819
|
+
*
|
|
820
|
+
* Features:
|
|
821
|
+
* - Full keyboard navigation (Enter, Space)
|
|
822
|
+
* - Screen reader support
|
|
823
|
+
* - Touch/pointer event handling
|
|
824
|
+
* - Focus management
|
|
825
|
+
* - Disabled state handling
|
|
826
|
+
* - Toggle button support (aria-pressed)
|
|
827
|
+
*
|
|
828
|
+
* @example
|
|
829
|
+
* ```tsx
|
|
830
|
+
* // Use for custom styling
|
|
831
|
+
* <IconButtonHeadless className="custom-icon-button-class" aria-label="Delete">
|
|
832
|
+
* <IconDelete />
|
|
833
|
+
* </IconButtonHeadless>
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
interface IconButtonHeadlessProps extends AriaButtonProps {
|
|
837
|
+
/**
|
|
838
|
+
* Additional CSS classes
|
|
839
|
+
*/
|
|
840
|
+
className?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Icon content (React node)
|
|
843
|
+
*/
|
|
844
|
+
children: React.ReactNode;
|
|
845
|
+
/**
|
|
846
|
+
* Tab index for keyboard navigation
|
|
847
|
+
* @default 0
|
|
848
|
+
*/
|
|
849
|
+
tabIndex?: number;
|
|
850
|
+
/**
|
|
851
|
+
* Mouse down handler (for ripple effect)
|
|
852
|
+
*/
|
|
853
|
+
onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
854
|
+
/**
|
|
855
|
+
* Button type attribute
|
|
856
|
+
* @default 'button'
|
|
857
|
+
*/
|
|
858
|
+
type?: "button" | "submit" | "reset";
|
|
859
|
+
/**
|
|
860
|
+
* Toggle state (for toggle buttons)
|
|
861
|
+
* Sets aria-pressed attribute
|
|
862
|
+
*/
|
|
863
|
+
selected?: boolean;
|
|
864
|
+
/**
|
|
865
|
+
* REQUIRED: Accessible label for screen readers
|
|
866
|
+
*/
|
|
867
|
+
"aria-label": string;
|
|
868
|
+
/**
|
|
869
|
+
* HTML title attribute for tooltip
|
|
870
|
+
*/
|
|
871
|
+
title?: string;
|
|
872
|
+
}
|
|
873
|
+
declare const IconButtonHeadless: React$1.ForwardRefExoticComponent<IconButtonHeadlessProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Material Design 3 FAB Variants (CVA)
|
|
877
|
+
*
|
|
878
|
+
* Type-safe variant management for FAB component.
|
|
879
|
+
* Uses Tailwind CSS classes mapped to MD3 design tokens.
|
|
880
|
+
*
|
|
881
|
+
* Key differences from Button/IconButton:
|
|
882
|
+
* - NOT fully rounded (uses specific corner radius: 12px/16px/28px)
|
|
883
|
+
* - Always has elevation (shadow-elevation-3)
|
|
884
|
+
* - Larger sizes (40px/56px/96px)
|
|
885
|
+
* - Extended variant with variable width
|
|
886
|
+
*/
|
|
887
|
+
declare const fabVariants: (props?: ({
|
|
888
|
+
size?: "large" | "medium" | "small" | "extended" | null | undefined;
|
|
889
|
+
color?: "primary" | "secondary" | "tertiary" | "surface" | null | undefined;
|
|
890
|
+
isDisabled?: boolean | null | undefined;
|
|
891
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
892
|
+
/**
|
|
893
|
+
* Extract variant prop types from CVA
|
|
894
|
+
*/
|
|
895
|
+
type FABVariants = VariantProps<typeof fabVariants>;
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* FAB size types
|
|
899
|
+
*/
|
|
900
|
+
type FABSize = "small" | "medium" | "large" | "extended";
|
|
901
|
+
/**
|
|
902
|
+
* FAB color scheme
|
|
903
|
+
*/
|
|
904
|
+
type FABColor = "primary" | "secondary" | "tertiary" | "surface";
|
|
905
|
+
/**
|
|
906
|
+
* Material Design 3 FAB (Floating Action Button) Component Props
|
|
907
|
+
*
|
|
908
|
+
* High-emphasis button for primary screen action.
|
|
909
|
+
* Supports 4 sizes: small (40px), medium (56px), large (96px), extended (variable width with text)
|
|
910
|
+
*
|
|
911
|
+
* ⚠️ IMPORTANT:
|
|
912
|
+
* - Only ONE FAB per screen
|
|
913
|
+
* - aria-label is REQUIRED (even for extended FAB with text)
|
|
914
|
+
* - Use for primary constructive actions only (create, add, compose)
|
|
915
|
+
* - NOT for destructive (delete), navigation (back), or secondary actions
|
|
916
|
+
*
|
|
917
|
+
* @example
|
|
918
|
+
* ```tsx
|
|
919
|
+
* // Standard FAB (medium)
|
|
920
|
+
* <FAB aria-label="Create new item" icon={<IconAdd />} />
|
|
921
|
+
*
|
|
922
|
+
* // Small FAB
|
|
923
|
+
* <FAB aria-label="Add photo" icon={<IconCamera />} size="small" />
|
|
924
|
+
*
|
|
925
|
+
* // Large FAB
|
|
926
|
+
* <FAB aria-label="Compose" icon={<IconEdit />} size="large" />
|
|
927
|
+
*
|
|
928
|
+
* // Extended FAB (with text)
|
|
929
|
+
* <FAB aria-label="Create new document" icon={<IconAdd />} size="extended">
|
|
930
|
+
* Create
|
|
931
|
+
* </FAB>
|
|
932
|
+
*
|
|
933
|
+
* // Loading state
|
|
934
|
+
* <FAB aria-label="Creating" icon={<IconAdd />} loading />
|
|
935
|
+
*
|
|
936
|
+
* // Secondary color
|
|
937
|
+
* <FAB aria-label="Edit" icon={<IconEdit />} color="secondary" />
|
|
938
|
+
* ```
|
|
939
|
+
*/
|
|
940
|
+
interface FABProps extends AriaButtonProps {
|
|
941
|
+
/**
|
|
942
|
+
* FAB size variant
|
|
943
|
+
* - small: 40×40px (24px icon)
|
|
944
|
+
* - medium: 56×56px (24px icon) - default
|
|
945
|
+
* - large: 96×96px (36px icon)
|
|
946
|
+
* - extended: Variable width with text (24px icon)
|
|
947
|
+
* @default 'medium'
|
|
948
|
+
*/
|
|
949
|
+
size?: FABSize;
|
|
950
|
+
/**
|
|
951
|
+
* Color scheme
|
|
952
|
+
* @default 'primary'
|
|
953
|
+
*/
|
|
954
|
+
color?: FABColor;
|
|
955
|
+
/**
|
|
956
|
+
* Icon content (required).
|
|
957
|
+
* Recommended sizes:
|
|
958
|
+
* - small/medium/extended: 24x24px
|
|
959
|
+
* - large: 36x36px
|
|
960
|
+
*/
|
|
961
|
+
icon: React__default.ReactNode;
|
|
962
|
+
/**
|
|
963
|
+
* Text label (required for extended FAB, ignored for other sizes)
|
|
964
|
+
*/
|
|
965
|
+
children?: React__default.ReactNode;
|
|
966
|
+
/**
|
|
967
|
+
* Mandatory accessible label for the FAB.
|
|
968
|
+
* This is crucial for screen readers as FAB is icon-based.
|
|
969
|
+
* Even extended FAB with text requires aria-label.
|
|
970
|
+
*/
|
|
971
|
+
"aria-label": string;
|
|
972
|
+
/**
|
|
973
|
+
* Loading state - shows spinner, disables interaction
|
|
974
|
+
* @default false
|
|
975
|
+
*/
|
|
976
|
+
loading?: boolean;
|
|
977
|
+
/**
|
|
978
|
+
* Disable ripple effect
|
|
979
|
+
* @default false
|
|
980
|
+
*/
|
|
981
|
+
disableRipple?: boolean;
|
|
982
|
+
/**
|
|
983
|
+
* Additional CSS classes (Tailwind)
|
|
984
|
+
* Can be used for positioning (e.g., "fixed bottom-4 right-4")
|
|
985
|
+
*/
|
|
986
|
+
className?: string;
|
|
987
|
+
/**
|
|
988
|
+
* HTML title attribute for tooltip
|
|
989
|
+
*/
|
|
990
|
+
title?: string;
|
|
991
|
+
/**
|
|
992
|
+
* Mouse down handler (for ripple effect and custom handling)
|
|
993
|
+
*/
|
|
994
|
+
onMouseDown?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Material Design 3 FAB (Floating Action Button) Component
|
|
999
|
+
*
|
|
1000
|
+
* High-emphasis button for primary screen action.
|
|
1001
|
+
* Supports 4 sizes: small, medium, large, extended
|
|
1002
|
+
* Implementation uses Tailwind CSS classes mapped to MD3 tokens.
|
|
1003
|
+
*/
|
|
1004
|
+
declare const FAB: React__default.ForwardRefExoticComponent<FABProps & Omit<FABVariants, "isDisabled"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Headless FAB Component (Layer 2)
|
|
1008
|
+
*
|
|
1009
|
+
* Unstyled FAB primitive using React Aria for accessibility.
|
|
1010
|
+
* Provides behavior only - bring your own styles.
|
|
1011
|
+
*
|
|
1012
|
+
* Features:
|
|
1013
|
+
* - Full keyboard navigation (Enter, Space)
|
|
1014
|
+
* - Screen reader support (requires aria-label)
|
|
1015
|
+
* - Touch/pointer event handling
|
|
1016
|
+
* - Focus management
|
|
1017
|
+
* - Disabled state handling
|
|
1018
|
+
*
|
|
1019
|
+
* @example
|
|
1020
|
+
* ```tsx
|
|
1021
|
+
* // Use for custom styling
|
|
1022
|
+
* <FABHeadless className="custom-fab-class" aria-label="Add">
|
|
1023
|
+
* <IconAdd />
|
|
1024
|
+
* </FABHeadless>
|
|
1025
|
+
* ```
|
|
1026
|
+
*/
|
|
1027
|
+
interface FABHeadlessProps extends AriaButtonProps {
|
|
1028
|
+
/**
|
|
1029
|
+
* Additional CSS classes
|
|
1030
|
+
*/
|
|
1031
|
+
className?: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* FAB content (icon and optional text)
|
|
1034
|
+
*/
|
|
1035
|
+
children: React.ReactNode;
|
|
1036
|
+
/**
|
|
1037
|
+
* Tab index for keyboard navigation
|
|
1038
|
+
* @default 0
|
|
1039
|
+
*/
|
|
1040
|
+
tabIndex?: number;
|
|
1041
|
+
/**
|
|
1042
|
+
* Mouse down handler (for ripple effect)
|
|
1043
|
+
*/
|
|
1044
|
+
onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
1045
|
+
/**
|
|
1046
|
+
* Button type attribute
|
|
1047
|
+
* @default 'button'
|
|
1048
|
+
*/
|
|
1049
|
+
type?: "button" | "submit" | "reset";
|
|
1050
|
+
/**
|
|
1051
|
+
* REQUIRED: Accessible label for screen readers
|
|
1052
|
+
*/
|
|
1053
|
+
"aria-label": string;
|
|
1054
|
+
/**
|
|
1055
|
+
* HTML title attribute for tooltip
|
|
1056
|
+
*/
|
|
1057
|
+
title?: string;
|
|
1058
|
+
}
|
|
1059
|
+
declare const FABHeadless: React$1.ForwardRefExoticComponent<FABHeadlessProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* TextField Type Definitions
|
|
1063
|
+
*
|
|
1064
|
+
* Type definitions for the Material Design 3 TextField component.
|
|
1065
|
+
* Supports both filled and outlined variants with full accessibility.
|
|
1066
|
+
*/
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* TextField visual variants
|
|
1070
|
+
*
|
|
1071
|
+
* - `filled`: Solid background with bottom border (default)
|
|
1072
|
+
* - `outlined`: Border around entire field
|
|
1073
|
+
*/
|
|
1074
|
+
type TextFieldVariant = "filled" | "outlined";
|
|
1075
|
+
/**
|
|
1076
|
+
* TextField size variants
|
|
1077
|
+
*
|
|
1078
|
+
* - `small`: Compact height
|
|
1079
|
+
* - `medium`: Standard height (default)
|
|
1080
|
+
* - `large`: Larger height
|
|
1081
|
+
*/
|
|
1082
|
+
type TextFieldSize = "small" | "medium" | "large";
|
|
1083
|
+
/**
|
|
1084
|
+
* Arguments passed to the TextFieldHeadless render-prop children function.
|
|
1085
|
+
*
|
|
1086
|
+
* The styled layer uses these to build its custom MD3 DOM while still
|
|
1087
|
+
* getting all ARIA props generated by React Aria's useTextField.
|
|
1088
|
+
*/
|
|
1089
|
+
interface TextFieldRenderProps {
|
|
1090
|
+
/** Spread onto the <label> element */
|
|
1091
|
+
labelProps: LabelHTMLAttributes<HTMLLabelElement>;
|
|
1092
|
+
/** Spread onto the <input> or <textarea> element */
|
|
1093
|
+
inputProps: InputHTMLAttributes<HTMLInputElement> & HTMLAttributes<HTMLTextAreaElement>;
|
|
1094
|
+
/** Spread onto the description helper-text element */
|
|
1095
|
+
descriptionProps: HTMLAttributes<HTMLElement>;
|
|
1096
|
+
/** Spread onto the error message element */
|
|
1097
|
+
errorMessageProps: HTMLAttributes<HTMLElement>;
|
|
1098
|
+
/** Whether the field is currently in an invalid state */
|
|
1099
|
+
isInvalid: boolean;
|
|
1100
|
+
/** Whether the input currently has focus (keyboard or pointer) */
|
|
1101
|
+
isFocused: boolean;
|
|
1102
|
+
/** Whether the input has keyboard-visible focus (for focus ring) */
|
|
1103
|
+
isFocusVisible: boolean;
|
|
1104
|
+
/** Current string value of the field (controlled or uncontrolled) */
|
|
1105
|
+
currentValue: string;
|
|
1106
|
+
/** Ref forwarded to the underlying input/textarea DOM element */
|
|
1107
|
+
inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement>;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Props for the headless TextField component (Layer 2)
|
|
1111
|
+
*
|
|
1112
|
+
* Extends React Aria's AriaTextFieldProps for accessibility.
|
|
1113
|
+
* Provides behavior without styling.
|
|
1114
|
+
*/
|
|
1115
|
+
interface TextFieldHeadlessProps extends Omit<AriaTextFieldProps, "children" | "onFocus" | "onBlur"> {
|
|
1116
|
+
/**
|
|
1117
|
+
* Label text for the input
|
|
1118
|
+
*/
|
|
1119
|
+
label?: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* Helper text displayed below the input
|
|
1122
|
+
* @example "Enter your email address"
|
|
1123
|
+
*/
|
|
1124
|
+
description?: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* Error message to display when input is invalid
|
|
1127
|
+
* @example "Email is required"
|
|
1128
|
+
*/
|
|
1129
|
+
errorMessage?: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Whether the input should expand to fill its container
|
|
1132
|
+
* @default false
|
|
1133
|
+
*/
|
|
1134
|
+
fullWidth?: boolean;
|
|
1135
|
+
/**
|
|
1136
|
+
* Enable multiline mode (textarea)
|
|
1137
|
+
* @default false
|
|
1138
|
+
*/
|
|
1139
|
+
multiline?: boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* Number of visible rows for multiline input
|
|
1142
|
+
* @default 3
|
|
1143
|
+
*/
|
|
1144
|
+
rows?: number;
|
|
1145
|
+
/**
|
|
1146
|
+
* Custom className for the container
|
|
1147
|
+
*/
|
|
1148
|
+
className?: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* Custom className for the input element
|
|
1151
|
+
*/
|
|
1152
|
+
inputClassName?: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* Custom className for the label element
|
|
1155
|
+
*/
|
|
1156
|
+
labelClassName?: string;
|
|
1157
|
+
/**
|
|
1158
|
+
* Custom className for the description element
|
|
1159
|
+
*/
|
|
1160
|
+
descriptionClassName?: string;
|
|
1161
|
+
/**
|
|
1162
|
+
* Custom className for the error message element
|
|
1163
|
+
*/
|
|
1164
|
+
errorClassName?: string;
|
|
1165
|
+
/**
|
|
1166
|
+
* Handler called when the input is focused
|
|
1167
|
+
*/
|
|
1168
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
1169
|
+
/**
|
|
1170
|
+
* Handler called when the input loses focus
|
|
1171
|
+
*/
|
|
1172
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
1173
|
+
/**
|
|
1174
|
+
* Optional render-prop children.
|
|
1175
|
+
*
|
|
1176
|
+
* When provided as a function, TextFieldHeadless invokes it with all
|
|
1177
|
+
* React Aria props and derived state so the styled layer can build its
|
|
1178
|
+
* own MD3 DOM without duplicating accessibility wiring.
|
|
1179
|
+
*
|
|
1180
|
+
* When omitted, the default accessible DOM (label + input + helper text) renders.
|
|
1181
|
+
*
|
|
1182
|
+
* @example
|
|
1183
|
+
* ```tsx
|
|
1184
|
+
* <TextFieldHeadless label="Email" value={value} onChange={onChange}>
|
|
1185
|
+
* {({ labelProps, inputProps, isFocused }) => (
|
|
1186
|
+
* <div>
|
|
1187
|
+
* <label {...labelProps} className={floating ? 'floating' : ''}>Email</label>
|
|
1188
|
+
* <input {...inputProps} className="md3-input" />
|
|
1189
|
+
* </div>
|
|
1190
|
+
* )}
|
|
1191
|
+
* </TextFieldHeadless>
|
|
1192
|
+
* ```
|
|
1193
|
+
*/
|
|
1194
|
+
children?: ((renderProps: TextFieldRenderProps) => ReactNode) | ReactNode;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Props for the styled TextField component (Layer 3)
|
|
1198
|
+
*
|
|
1199
|
+
* Extends TextFieldHeadlessProps with MD3 visual styling options.
|
|
1200
|
+
*/
|
|
1201
|
+
interface TextFieldProps extends TextFieldHeadlessProps {
|
|
1202
|
+
/**
|
|
1203
|
+
* Visual variant of the text field
|
|
1204
|
+
* @default 'filled'
|
|
1205
|
+
*/
|
|
1206
|
+
variant?: TextFieldVariant;
|
|
1207
|
+
/**
|
|
1208
|
+
* Size variant
|
|
1209
|
+
* @default 'medium'
|
|
1210
|
+
*/
|
|
1211
|
+
size?: TextFieldSize;
|
|
1212
|
+
/**
|
|
1213
|
+
* Leading icon (before input text)
|
|
1214
|
+
* MD3 Specification: Icons should be 18px × 18px
|
|
1215
|
+
*/
|
|
1216
|
+
leadingIcon?: React.ReactNode;
|
|
1217
|
+
/**
|
|
1218
|
+
* Trailing icon (after input text)
|
|
1219
|
+
* MD3 Specification: Icons should be 18px × 18px
|
|
1220
|
+
*/
|
|
1221
|
+
trailingIcon?: React.ReactNode;
|
|
1222
|
+
/**
|
|
1223
|
+
* Show character counter below the input
|
|
1224
|
+
* Requires maxLength to be set
|
|
1225
|
+
* @default false
|
|
1226
|
+
*/
|
|
1227
|
+
characterCount?: boolean;
|
|
1228
|
+
/**
|
|
1229
|
+
* Maximum number of characters allowed
|
|
1230
|
+
* Enables character counter if characterCount is true
|
|
1231
|
+
*/
|
|
1232
|
+
maxLength?: number;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* TextField - MD3 Text Input Component
|
|
1237
|
+
*
|
|
1238
|
+
* A text input field following Material Design 3 specifications.
|
|
1239
|
+
* Supports filled and outlined variants with comprehensive accessibility
|
|
1240
|
+
* provided by React Aria via the TextFieldHeadless layer.
|
|
1241
|
+
*
|
|
1242
|
+
* @example
|
|
1243
|
+
* ```tsx
|
|
1244
|
+
* // Basic usage
|
|
1245
|
+
* <TextField label="Email" />
|
|
1246
|
+
*
|
|
1247
|
+
* // With validation
|
|
1248
|
+
* <TextField
|
|
1249
|
+
* label="Email"
|
|
1250
|
+
* type="email"
|
|
1251
|
+
* isRequired
|
|
1252
|
+
* errorMessage="Please enter a valid email"
|
|
1253
|
+
* />
|
|
1254
|
+
*
|
|
1255
|
+
* // Multiline with character counter
|
|
1256
|
+
* <TextField
|
|
1257
|
+
* label="Bio"
|
|
1258
|
+
* multiline
|
|
1259
|
+
* rows={4}
|
|
1260
|
+
* maxLength={500}
|
|
1261
|
+
* characterCount
|
|
1262
|
+
* />
|
|
1263
|
+
* ```
|
|
1264
|
+
*/
|
|
1265
|
+
declare const TextField: React$1.ForwardRefExoticComponent<TextFieldProps & React$1.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Material Design 3 Checkbox Component Props
|
|
1269
|
+
*
|
|
1270
|
+
* Built on React Aria for world-class accessibility.
|
|
1271
|
+
* Supports checked, unchecked, and indeterminate states.
|
|
1272
|
+
* Implementation uses CVA + Tailwind CSS classes mapped to MD3 tokens.
|
|
1273
|
+
*
|
|
1274
|
+
* @example
|
|
1275
|
+
* ```tsx
|
|
1276
|
+
* // Controlled checkbox
|
|
1277
|
+
* <Checkbox isSelected={isChecked} onChange={setIsChecked}>
|
|
1278
|
+
* Accept terms
|
|
1279
|
+
* </Checkbox>
|
|
1280
|
+
*
|
|
1281
|
+
* // Uncontrolled with default value
|
|
1282
|
+
* <Checkbox defaultSelected>
|
|
1283
|
+
* Subscribe to newsletter
|
|
1284
|
+
* </Checkbox>
|
|
1285
|
+
*
|
|
1286
|
+
* // Indeterminate state (partial selection)
|
|
1287
|
+
* <Checkbox isIndeterminate>
|
|
1288
|
+
* Select all
|
|
1289
|
+
* </Checkbox>
|
|
1290
|
+
*
|
|
1291
|
+
* // Error state
|
|
1292
|
+
* <Checkbox isInvalid>
|
|
1293
|
+
* Required field
|
|
1294
|
+
* </Checkbox>
|
|
1295
|
+
*
|
|
1296
|
+
* // Disabled
|
|
1297
|
+
* <Checkbox isDisabled>
|
|
1298
|
+
* Disabled option
|
|
1299
|
+
* </Checkbox>
|
|
1300
|
+
*
|
|
1301
|
+
* // Headless version (custom styling)
|
|
1302
|
+
* <CheckboxHeadless className="my-custom-styles">
|
|
1303
|
+
* Custom checkbox
|
|
1304
|
+
* </CheckboxHeadless>
|
|
1305
|
+
* ```
|
|
1306
|
+
*/
|
|
1307
|
+
interface CheckboxProps extends AriaCheckboxProps, Omit<React__default.HTMLAttributes<HTMLLabelElement>, keyof AriaCheckboxProps | "children"> {
|
|
1308
|
+
/**
|
|
1309
|
+
* Checkbox label content
|
|
1310
|
+
*/
|
|
1311
|
+
children?: React__default.ReactNode;
|
|
1312
|
+
/**
|
|
1313
|
+
* Indeterminate state (partial selection)
|
|
1314
|
+
* Visually shows a dash instead of checkmark
|
|
1315
|
+
* @default false
|
|
1316
|
+
*/
|
|
1317
|
+
isIndeterminate?: boolean;
|
|
1318
|
+
/**
|
|
1319
|
+
* Error/invalid state
|
|
1320
|
+
* Shows error styling (typically red)
|
|
1321
|
+
* @default false
|
|
1322
|
+
*/
|
|
1323
|
+
isInvalid?: boolean;
|
|
1324
|
+
/**
|
|
1325
|
+
* Disable ripple effect
|
|
1326
|
+
* @default false
|
|
1327
|
+
*/
|
|
1328
|
+
disableRipple?: boolean;
|
|
1329
|
+
/**
|
|
1330
|
+
* Additional CSS classes (Tailwind)
|
|
1331
|
+
*/
|
|
1332
|
+
className?: string;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Material Design 3 Checkbox Component (Layer 3: Styled)
|
|
1337
|
+
*
|
|
1338
|
+
* Built on React Aria for world-class accessibility.
|
|
1339
|
+
* Uses CVA for type-safe variant management.
|
|
1340
|
+
* Styled with Tailwind CSS using MD3 design tokens.
|
|
1341
|
+
*
|
|
1342
|
+
* Features:
|
|
1343
|
+
* - ✅ 3 states: unchecked, checked, indeterminate
|
|
1344
|
+
* - ✅ Error/invalid state support
|
|
1345
|
+
* - ✅ Ripple effect (Material Design)
|
|
1346
|
+
* - ✅ Full keyboard accessibility (via React Aria)
|
|
1347
|
+
* - ✅ Screen reader support (via React Aria)
|
|
1348
|
+
* - ✅ Focus management (via React Aria)
|
|
1349
|
+
* - ✅ Form integration (name, value props)
|
|
1350
|
+
*
|
|
1351
|
+
* MD3 Specifications:
|
|
1352
|
+
* - Container: 18x18dp (within 40x40dp touch target)
|
|
1353
|
+
* - Corner radius: 2dp (applied via SVG rx/ry attributes)
|
|
1354
|
+
* - State layers: 8% hover, 12% focus/pressed
|
|
1355
|
+
* - Disabled: 38% opacity
|
|
1356
|
+
* - Label spacing: 16px (ml-4)
|
|
1357
|
+
*
|
|
1358
|
+
* @example
|
|
1359
|
+
* ```tsx
|
|
1360
|
+
* // Basic usage
|
|
1361
|
+
* <Checkbox>Accept terms</Checkbox>
|
|
1362
|
+
*
|
|
1363
|
+
* // Controlled
|
|
1364
|
+
* <Checkbox isSelected={checked} onChange={setChecked}>
|
|
1365
|
+
* Subscribe
|
|
1366
|
+
* </Checkbox>
|
|
1367
|
+
*
|
|
1368
|
+
* // Indeterminate (partial selection)
|
|
1369
|
+
* <Checkbox isIndeterminate>Select all</Checkbox>
|
|
1370
|
+
*
|
|
1371
|
+
* // Error state
|
|
1372
|
+
* <Checkbox isInvalid>Required field</Checkbox>
|
|
1373
|
+
*
|
|
1374
|
+
* // Disabled
|
|
1375
|
+
* <Checkbox isDisabled>Disabled option</Checkbox>
|
|
1376
|
+
*
|
|
1377
|
+
* // Without label (icon-only)
|
|
1378
|
+
* <Checkbox aria-label="Accept" />
|
|
1379
|
+
* ```
|
|
1380
|
+
*/
|
|
1381
|
+
declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* Material Design 3 Switch Component Props
|
|
1385
|
+
*
|
|
1386
|
+
* Built on React Aria for world-class accessibility.
|
|
1387
|
+
* Represents on/off states (not selection like checkbox).
|
|
1388
|
+
* Implementation uses CVA + Tailwind CSS classes mapped to MD3 tokens.
|
|
1389
|
+
*
|
|
1390
|
+
* @example
|
|
1391
|
+
* ```tsx
|
|
1392
|
+
* // Controlled switch
|
|
1393
|
+
* <Switch isSelected={isOn} onChange={setIsOn}>
|
|
1394
|
+
* Low power mode
|
|
1395
|
+
* </Switch>
|
|
1396
|
+
*
|
|
1397
|
+
* // Uncontrolled with default value
|
|
1398
|
+
* <Switch defaultSelected>
|
|
1399
|
+
* Enable notifications
|
|
1400
|
+
* </Switch>
|
|
1401
|
+
*
|
|
1402
|
+
* // With icons
|
|
1403
|
+
* <Switch icon={<IconClose />} selectedIcon={<IconCheck />}>
|
|
1404
|
+
* Airplane mode
|
|
1405
|
+
* </Switch>
|
|
1406
|
+
*
|
|
1407
|
+
* // Disabled
|
|
1408
|
+
* <Switch isDisabled>
|
|
1409
|
+
* Disabled option
|
|
1410
|
+
* </Switch>
|
|
1411
|
+
*
|
|
1412
|
+
* // Headless version (custom styling)
|
|
1413
|
+
* <SwitchHeadless className="my-custom-styles">
|
|
1414
|
+
* Custom switch
|
|
1415
|
+
* </SwitchHeadless>
|
|
1416
|
+
* ```
|
|
1417
|
+
*/
|
|
1418
|
+
interface SwitchProps extends AriaSwitchProps, Omit<React__default.HTMLAttributes<HTMLLabelElement>, keyof AriaSwitchProps | "children"> {
|
|
1419
|
+
/**
|
|
1420
|
+
* Switch label content
|
|
1421
|
+
*/
|
|
1422
|
+
children?: React__default.ReactNode;
|
|
1423
|
+
/**
|
|
1424
|
+
* Icon to display inside handle when switch is OFF
|
|
1425
|
+
* @default undefined
|
|
1426
|
+
*/
|
|
1427
|
+
icon?: React__default.ReactNode;
|
|
1428
|
+
/**
|
|
1429
|
+
* Icon to display inside handle when switch is ON
|
|
1430
|
+
* @default undefined
|
|
1431
|
+
*/
|
|
1432
|
+
selectedIcon?: React__default.ReactNode;
|
|
1433
|
+
/**
|
|
1434
|
+
* Disable ripple effect
|
|
1435
|
+
* @default false
|
|
1436
|
+
*/
|
|
1437
|
+
disableRipple?: boolean;
|
|
1438
|
+
/**
|
|
1439
|
+
* Additional CSS classes (Tailwind)
|
|
1440
|
+
*/
|
|
1441
|
+
className?: string;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* Material Design 3 Switch Component (Layer 3: Styled)
|
|
1446
|
+
*
|
|
1447
|
+
* Built on React Aria for world-class accessibility.
|
|
1448
|
+
* Uses CVA for type-safe variant management.
|
|
1449
|
+
* Styled with Tailwind CSS using MD3 design tokens.
|
|
1450
|
+
*
|
|
1451
|
+
* Features:
|
|
1452
|
+
* - ✅ 2 states: on/off (not selection like checkbox)
|
|
1453
|
+
* - ✅ Optional icons in handle
|
|
1454
|
+
* - ✅ Ripple effect (Material Design)
|
|
1455
|
+
* - ✅ Full keyboard accessibility (via React Aria)
|
|
1456
|
+
* - ✅ Screen reader support (via React Aria)
|
|
1457
|
+
* - ✅ Focus management (via React Aria)
|
|
1458
|
+
* - ✅ Form integration (name, value props)
|
|
1459
|
+
*
|
|
1460
|
+
* MD3 Specifications:
|
|
1461
|
+
* - Track: 52x32dp (border-radius 16dp)
|
|
1462
|
+
* - Handle: 16x16dp (unselected), 24x24dp (selected), 28x28dp (pressed)
|
|
1463
|
+
* - Touch target: 48x48dp minimum
|
|
1464
|
+
* - State layers: 8% hover, 12% focus/pressed
|
|
1465
|
+
* - Disabled: 12% container, 38% content opacity
|
|
1466
|
+
* - Label spacing: 16px (ml-4)
|
|
1467
|
+
*
|
|
1468
|
+
* @example
|
|
1469
|
+
* ```tsx
|
|
1470
|
+
* // Basic usage
|
|
1471
|
+
* <Switch>Low power mode</Switch>
|
|
1472
|
+
*
|
|
1473
|
+
* // Controlled
|
|
1474
|
+
* <Switch isSelected={isOn} onChange={setIsOn}>
|
|
1475
|
+
* Notifications
|
|
1476
|
+
* </Switch>
|
|
1477
|
+
*
|
|
1478
|
+
* // With icons
|
|
1479
|
+
* <Switch icon={<IconClose />} selectedIcon={<IconCheck />}>
|
|
1480
|
+
* Airplane mode
|
|
1481
|
+
* </Switch>
|
|
1482
|
+
*
|
|
1483
|
+
* // Disabled
|
|
1484
|
+
* <Switch isDisabled>Disabled option</Switch>
|
|
1485
|
+
*
|
|
1486
|
+
* // Without label (icon-only)
|
|
1487
|
+
* <Switch aria-label="Toggle feature" />
|
|
1488
|
+
* ```
|
|
1489
|
+
*/
|
|
1490
|
+
declare const Switch: React__default.ForwardRefExoticComponent<SwitchProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* Material Design 3 RadioGroup Component Props
|
|
1494
|
+
*
|
|
1495
|
+
* Built on React Aria for world-class accessibility.
|
|
1496
|
+
* Groups radio buttons together for single-selection behavior.
|
|
1497
|
+
* Implementation uses CVA + Tailwind CSS classes mapped to MD3 tokens.
|
|
1498
|
+
*
|
|
1499
|
+
* @example
|
|
1500
|
+
* ```tsx
|
|
1501
|
+
* // Vertical group (default)
|
|
1502
|
+
* <RadioGroup label="Favorite color">
|
|
1503
|
+
* <Radio value="red">Red</Radio>
|
|
1504
|
+
* <Radio value="blue">Blue</Radio>
|
|
1505
|
+
* <Radio value="green">Green</Radio>
|
|
1506
|
+
* </RadioGroup>
|
|
1507
|
+
*
|
|
1508
|
+
* // Horizontal group
|
|
1509
|
+
* <RadioGroup label="Size" orientation="horizontal">
|
|
1510
|
+
* <Radio value="small">Small</Radio>
|
|
1511
|
+
* <Radio value="medium">Medium</Radio>
|
|
1512
|
+
* <Radio value="large">Large</Radio>
|
|
1513
|
+
* </RadioGroup>
|
|
1514
|
+
*
|
|
1515
|
+
* // Controlled
|
|
1516
|
+
* <RadioGroup label="Choice" value={selected} onChange={setSelected}>
|
|
1517
|
+
* <Radio value="option1">Option 1</Radio>
|
|
1518
|
+
* <Radio value="option2">Option 2</Radio>
|
|
1519
|
+
* </RadioGroup>
|
|
1520
|
+
*
|
|
1521
|
+
* // Error state
|
|
1522
|
+
* <RadioGroup label="Required" isInvalid>
|
|
1523
|
+
* <Radio value="yes">Yes</Radio>
|
|
1524
|
+
* <Radio value="no">No</Radio>
|
|
1525
|
+
* </RadioGroup>
|
|
1526
|
+
*
|
|
1527
|
+
* // Disabled
|
|
1528
|
+
* <RadioGroup label="Options" isDisabled>
|
|
1529
|
+
* <Radio value="a">Option A</Radio>
|
|
1530
|
+
* <Radio value="b">Option B</Radio>
|
|
1531
|
+
* </RadioGroup>
|
|
1532
|
+
* ```
|
|
1533
|
+
*/
|
|
1534
|
+
interface RadioGroupProps extends AriaRadioGroupProps, Omit<React__default.HTMLAttributes<HTMLDivElement>, keyof AriaRadioGroupProps | "children"> {
|
|
1535
|
+
/**
|
|
1536
|
+
* Radio buttons to display in the group
|
|
1537
|
+
*/
|
|
1538
|
+
children: React__default.ReactNode;
|
|
1539
|
+
/**
|
|
1540
|
+
* Layout orientation of the radio group
|
|
1541
|
+
* @default "vertical"
|
|
1542
|
+
*/
|
|
1543
|
+
orientation?: "horizontal" | "vertical";
|
|
1544
|
+
/**
|
|
1545
|
+
* Error/invalid state
|
|
1546
|
+
* Shows error styling (typically red)
|
|
1547
|
+
* @default false
|
|
1548
|
+
*/
|
|
1549
|
+
isInvalid?: boolean;
|
|
1550
|
+
/**
|
|
1551
|
+
* Additional CSS classes (Tailwind)
|
|
1552
|
+
*/
|
|
1553
|
+
className?: string;
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* Material Design 3 Radio Component Props
|
|
1557
|
+
*
|
|
1558
|
+
* Built on React Aria for world-class accessibility.
|
|
1559
|
+
* Must be used within a RadioGroup for proper functionality.
|
|
1560
|
+
* Implementation uses CVA + Tailwind CSS classes mapped to MD3 tokens.
|
|
1561
|
+
*
|
|
1562
|
+
* @example
|
|
1563
|
+
* ```tsx
|
|
1564
|
+
* // Basic usage within RadioGroup
|
|
1565
|
+
* <RadioGroup label="Options">
|
|
1566
|
+
* <Radio value="option1">Option 1</Radio>
|
|
1567
|
+
* <Radio value="option2">Option 2</Radio>
|
|
1568
|
+
* </RadioGroup>
|
|
1569
|
+
*
|
|
1570
|
+
* // Without label (icon-only) - needs aria-label
|
|
1571
|
+
* <RadioGroup label="Options">
|
|
1572
|
+
* <Radio value="a" aria-label="Option A" />
|
|
1573
|
+
* <Radio value="b" aria-label="Option B" />
|
|
1574
|
+
* </RadioGroup>
|
|
1575
|
+
*
|
|
1576
|
+
* // Disabled individual radio
|
|
1577
|
+
* <RadioGroup label="Options">
|
|
1578
|
+
* <Radio value="enabled">Enabled</Radio>
|
|
1579
|
+
* <Radio value="disabled" isDisabled>Disabled</Radio>
|
|
1580
|
+
* </RadioGroup>
|
|
1581
|
+
*
|
|
1582
|
+
* // Custom styling
|
|
1583
|
+
* <Radio value="custom" className="my-custom-class">
|
|
1584
|
+
* Custom
|
|
1585
|
+
* </Radio>
|
|
1586
|
+
* ```
|
|
1587
|
+
*/
|
|
1588
|
+
interface RadioProps extends AriaRadioProps, Omit<React__default.HTMLAttributes<HTMLLabelElement>, keyof AriaRadioProps | "children"> {
|
|
1589
|
+
/**
|
|
1590
|
+
* Radio label content
|
|
1591
|
+
*/
|
|
1592
|
+
children?: React__default.ReactNode;
|
|
1593
|
+
/**
|
|
1594
|
+
* Disable ripple effect
|
|
1595
|
+
* @default false
|
|
1596
|
+
*/
|
|
1597
|
+
disableRipple?: boolean;
|
|
1598
|
+
/**
|
|
1599
|
+
* Additional CSS classes (Tailwind)
|
|
1600
|
+
*/
|
|
1601
|
+
className?: string;
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Props for the headless RadioGroup component
|
|
1605
|
+
* Extends AriaRadioGroupProps for accessibility
|
|
1606
|
+
*/
|
|
1607
|
+
interface RadioGroupHeadlessProps extends AriaRadioGroupProps {
|
|
1608
|
+
/**
|
|
1609
|
+
* Additional CSS classes for the group wrapper
|
|
1610
|
+
*/
|
|
1611
|
+
className?: string;
|
|
1612
|
+
/**
|
|
1613
|
+
* Radio buttons to display in the group
|
|
1614
|
+
*/
|
|
1615
|
+
children: React__default.ReactNode;
|
|
1616
|
+
/**
|
|
1617
|
+
* Render slot for the group label.
|
|
1618
|
+
* Receives React Aria's `labelProps` (contains the generated `id` for
|
|
1619
|
+
* `aria-labelledby` association) so the consumer can render a styled
|
|
1620
|
+
* label element while preserving correct ARIA semantics.
|
|
1621
|
+
*
|
|
1622
|
+
* When provided, the default `<span {...labelProps}>` is suppressed and
|
|
1623
|
+
* this callback is responsible for rendering the label.
|
|
1624
|
+
*
|
|
1625
|
+
* @example
|
|
1626
|
+
* ```tsx
|
|
1627
|
+
* <RadioGroupHeadless
|
|
1628
|
+
* label="Pick one"
|
|
1629
|
+
* renderLabel={(labelProps) => (
|
|
1630
|
+
* <div {...labelProps} className="my-label-style">Pick one</div>
|
|
1631
|
+
* )}
|
|
1632
|
+
* >
|
|
1633
|
+
* ...
|
|
1634
|
+
* </RadioGroupHeadless>
|
|
1635
|
+
* ```
|
|
1636
|
+
*/
|
|
1637
|
+
renderLabel?: (labelProps: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactNode;
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Props for the headless Radio component
|
|
1641
|
+
* Extends AriaRadioProps for accessibility
|
|
1642
|
+
*/
|
|
1643
|
+
interface RadioHeadlessProps extends AriaRadioProps {
|
|
1644
|
+
/**
|
|
1645
|
+
* Additional CSS classes for the label wrapper
|
|
1646
|
+
*/
|
|
1647
|
+
className?: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* Radio label content
|
|
1650
|
+
*/
|
|
1651
|
+
children?: React__default.ReactNode;
|
|
1652
|
+
/**
|
|
1653
|
+
* Render prop for custom radio visual
|
|
1654
|
+
* Receives state information
|
|
1655
|
+
*/
|
|
1656
|
+
renderRadio?: (state: {
|
|
1657
|
+
isSelected: boolean;
|
|
1658
|
+
isDisabled: boolean;
|
|
1659
|
+
isFocusVisible: boolean;
|
|
1660
|
+
isPressed: boolean;
|
|
1661
|
+
}) => React__default.ReactNode;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* Material Design 3 Radio Component (Layer 3: Styled)
|
|
1666
|
+
*
|
|
1667
|
+
* Built on React Aria for world-class accessibility.
|
|
1668
|
+
* Uses CVA for type-safe variant management.
|
|
1669
|
+
* Styled with Tailwind CSS using MD3 design tokens.
|
|
1670
|
+
* Must be used within a RadioGroup for proper functionality.
|
|
1671
|
+
*
|
|
1672
|
+
* Features:
|
|
1673
|
+
* - ✅ 2 states: unselected, selected
|
|
1674
|
+
* - ✅ Ripple effect (Material Design)
|
|
1675
|
+
* - ✅ Full keyboard accessibility (via React Aria)
|
|
1676
|
+
* - ✅ Screen reader support (via React Aria)
|
|
1677
|
+
* - ✅ Focus management (via React Aria)
|
|
1678
|
+
* - ✅ Form integration (name, value props from RadioGroup)
|
|
1679
|
+
*
|
|
1680
|
+
* MD3 Specifications:
|
|
1681
|
+
* - Radio icon: 20x20dp (within 40x40dp touch target)
|
|
1682
|
+
* - Outer circle: 20px
|
|
1683
|
+
* - Inner dot: 10px (selected state)
|
|
1684
|
+
* - Outline width: 2dp
|
|
1685
|
+
* - State layers: 8% hover, 12% focus/pressed
|
|
1686
|
+
* - Disabled: 38% opacity
|
|
1687
|
+
* - Label spacing: 16px (ml-4)
|
|
1688
|
+
*
|
|
1689
|
+
* @example
|
|
1690
|
+
* ```tsx
|
|
1691
|
+
* // Basic usage within RadioGroup
|
|
1692
|
+
* <RadioGroup label="Options">
|
|
1693
|
+
* <Radio value="a">Option A</Radio>
|
|
1694
|
+
* <Radio value="b">Option B</Radio>
|
|
1695
|
+
* </RadioGroup>
|
|
1696
|
+
*
|
|
1697
|
+
* // Without label (needs aria-label)
|
|
1698
|
+
* <RadioGroup label="Options">
|
|
1699
|
+
* <Radio value="a" aria-label="Option A" />
|
|
1700
|
+
* </RadioGroup>
|
|
1701
|
+
*
|
|
1702
|
+
* // Disabled individual radio
|
|
1703
|
+
* <RadioGroup label="Options">
|
|
1704
|
+
* <Radio value="a">Enabled</Radio>
|
|
1705
|
+
* <Radio value="b" isDisabled>Disabled</Radio>
|
|
1706
|
+
* </RadioGroup>
|
|
1707
|
+
*
|
|
1708
|
+
* // Custom styling
|
|
1709
|
+
* <Radio value="custom" className="my-custom-class">
|
|
1710
|
+
* Custom
|
|
1711
|
+
* </Radio>
|
|
1712
|
+
* ```
|
|
1713
|
+
*/
|
|
1714
|
+
declare const Radio: React__default.ForwardRefExoticComponent<RadioProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* Material Design 3 RadioGroup Component (Layer 3: Styled)
|
|
1718
|
+
*
|
|
1719
|
+
* Built on React Aria for world-class accessibility.
|
|
1720
|
+
* Uses CVA for type-safe variant management.
|
|
1721
|
+
* Styled with Tailwind CSS using MD3 design tokens.
|
|
1722
|
+
*
|
|
1723
|
+
* Features:
|
|
1724
|
+
* - ✅ Single-selection behavior
|
|
1725
|
+
* - ✅ Horizontal and vertical orientation
|
|
1726
|
+
* - ✅ Error/invalid state support
|
|
1727
|
+
* - ✅ Full keyboard accessibility (via React Aria)
|
|
1728
|
+
* - ✅ Screen reader support (via React Aria)
|
|
1729
|
+
* - ✅ Focus management (via React Aria)
|
|
1730
|
+
* - ✅ Form integration (name, value props)
|
|
1731
|
+
*
|
|
1732
|
+
* MD3 Specifications:
|
|
1733
|
+
* - Radio icon: 20x20dp (within 40x40dp touch target)
|
|
1734
|
+
* - State layers: 8% hover, 12% focus/pressed
|
|
1735
|
+
* - Disabled: 38% opacity
|
|
1736
|
+
* - Radio spacing: 16px gap
|
|
1737
|
+
*
|
|
1738
|
+
* @example
|
|
1739
|
+
* ```tsx
|
|
1740
|
+
* // Basic usage (vertical)
|
|
1741
|
+
* <RadioGroup label="Favorite color">
|
|
1742
|
+
* <Radio value="red">Red</Radio>
|
|
1743
|
+
* <Radio value="blue">Blue</Radio>
|
|
1744
|
+
* </RadioGroup>
|
|
1745
|
+
*
|
|
1746
|
+
* // Horizontal orientation
|
|
1747
|
+
* <RadioGroup label="Size" orientation="horizontal">
|
|
1748
|
+
* <Radio value="s">Small</Radio>
|
|
1749
|
+
* <Radio value="m">Medium</Radio>
|
|
1750
|
+
* <Radio value="l">Large</Radio>
|
|
1751
|
+
* </RadioGroup>
|
|
1752
|
+
*
|
|
1753
|
+
* // Controlled
|
|
1754
|
+
* <RadioGroup label="Choice" value={selected} onChange={setSelected}>
|
|
1755
|
+
* <Radio value="a">Option A</Radio>
|
|
1756
|
+
* <Radio value="b">Option B</Radio>
|
|
1757
|
+
* </RadioGroup>
|
|
1758
|
+
*
|
|
1759
|
+
* // Error state
|
|
1760
|
+
* <RadioGroup label="Required" isInvalid>
|
|
1761
|
+
* <Radio value="yes">Yes</Radio>
|
|
1762
|
+
* <Radio value="no">No</Radio>
|
|
1763
|
+
* </RadioGroup>
|
|
1764
|
+
*
|
|
1765
|
+
* // Disabled
|
|
1766
|
+
* <RadioGroup label="Options" isDisabled>
|
|
1767
|
+
* <Radio value="a">Option A</Radio>
|
|
1768
|
+
* <Radio value="b">Option B</Radio>
|
|
1769
|
+
* </RadioGroup>
|
|
1770
|
+
* ```
|
|
1771
|
+
*/
|
|
1772
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* Headless Radio Component (Layer 2)
|
|
1776
|
+
*
|
|
1777
|
+
* Unstyled radio primitive using React Aria for accessibility.
|
|
1778
|
+
* Provides behavior only - bring your own styles.
|
|
1779
|
+
* Must be used within a RadioGroup for proper functionality.
|
|
1780
|
+
*
|
|
1781
|
+
* Features:
|
|
1782
|
+
* - Full keyboard navigation (Space to select)
|
|
1783
|
+
* - Screen reader support
|
|
1784
|
+
* - Touch/pointer event handling
|
|
1785
|
+
* - Focus management
|
|
1786
|
+
* - Disabled state handling
|
|
1787
|
+
* - Form integration
|
|
1788
|
+
*
|
|
1789
|
+
* @example
|
|
1790
|
+
* ```tsx
|
|
1791
|
+
* // Use for custom styling
|
|
1792
|
+
* <RadioGroupHeadless label="Options">
|
|
1793
|
+
* <RadioHeadless value="a" className="custom-radio">
|
|
1794
|
+
* Option A
|
|
1795
|
+
* </RadioHeadless>
|
|
1796
|
+
* </RadioGroupHeadless>
|
|
1797
|
+
*
|
|
1798
|
+
* // With render prop for custom visual
|
|
1799
|
+
* <RadioHeadless
|
|
1800
|
+
* value="a"
|
|
1801
|
+
* renderRadio={({ isSelected }) => (
|
|
1802
|
+
* <CustomRadioIcon checked={isSelected} />
|
|
1803
|
+
* )}
|
|
1804
|
+
* >
|
|
1805
|
+
* Custom visual
|
|
1806
|
+
* </RadioHeadless>
|
|
1807
|
+
* ```
|
|
1808
|
+
*/
|
|
1809
|
+
declare const RadioHeadless: React$1.ForwardRefExoticComponent<RadioHeadlessProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* Headless RadioGroup Component (Layer 2)
|
|
1813
|
+
*
|
|
1814
|
+
* Unstyled radio group primitive using React Aria for accessibility.
|
|
1815
|
+
* Provides behavior only - bring your own styles.
|
|
1816
|
+
*
|
|
1817
|
+
* Features:
|
|
1818
|
+
* - Full keyboard navigation (Arrow keys, Tab)
|
|
1819
|
+
* - Screen reader support
|
|
1820
|
+
* - Single-selection enforcement
|
|
1821
|
+
* - Focus management
|
|
1822
|
+
* - Disabled state handling
|
|
1823
|
+
* - Form integration
|
|
1824
|
+
*
|
|
1825
|
+
* @example
|
|
1826
|
+
* ```tsx
|
|
1827
|
+
* // Use for custom styling
|
|
1828
|
+
* <RadioGroupHeadless label="Options" className="custom-group">
|
|
1829
|
+
* <RadioHeadless value="a">Option A</RadioHeadless>
|
|
1830
|
+
* <RadioHeadless value="b">Option B</RadioHeadless>
|
|
1831
|
+
* </RadioGroupHeadless>
|
|
1832
|
+
* ```
|
|
1833
|
+
*/
|
|
1834
|
+
declare const RadioGroupHeadless: React$1.ForwardRefExoticComponent<RadioGroupHeadlessProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1835
|
+
|
|
1836
|
+
export { Button, type ButtonColor, type ButtonProps, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxProps, FAB, type FABColor, FABHeadless, type FABHeadlessProps, type FABProps, type FABSize, IconButton, type IconButtonColor, IconButtonHeadless, type IconButtonHeadlessProps, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type MD3ColorRole, type MD3TypographyScale, type MD3TypographySize, type MD3TypographyStyle, Radio, RadioGroup, RadioGroupHeadless, type RadioGroupHeadlessProps, type RadioGroupProps, RadioHeadless, type RadioHeadlessProps, type RadioProps, STATE_LAYER_OPACITY, Switch, type SwitchProps, TYPOGRAPHY_ELEMENT_MAP, TYPOGRAPHY_USAGE, TextField, type TextFieldProps, type TextFieldSize, type TextFieldVariant, type TypographyProperty, type TypographyStyleObject, applyStateLayer, cn, generateMD3Theme, getColorValue, getFontFamily, getMD3Color, getResponsiveTypography, getTypographyClassName, getTypographyForElement, getTypographyStyle, getTypographyToken, hexToRgb, pxToRem, remToPx, rgbToHex, truncateText, withOpacity };
|