@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/dist/index.cjs ADDED
@@ -0,0 +1,3374 @@
1
+ 'use strict';
2
+
3
+ var $7jXr9$clsx = require('clsx');
4
+ var tailwindMerge = require('tailwind-merge');
5
+ var materialColorUtilities = require('@material/material-color-utilities');
6
+ var $3whtM$react = require('react');
7
+ var reactAria = require('react-aria');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ var classVarianceAuthority = require('class-variance-authority');
10
+
11
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
+
13
+ var $7jXr9$clsx__default = /*#__PURE__*/_interopDefault($7jXr9$clsx);
14
+ var $3whtM$react__default = /*#__PURE__*/_interopDefault($3whtM$react);
15
+
16
+ // src/utils/cn.ts
17
+ function cn(...inputs) {
18
+ return tailwindMerge.twMerge($7jXr9$clsx.clsx(inputs));
19
+ }
20
+ function getColorValue(variable, element = document.documentElement) {
21
+ const varName = variable.startsWith("--") ? variable : `--${variable}`;
22
+ return getComputedStyle(element).getPropertyValue(varName).trim();
23
+ }
24
+ function getMD3Color(role) {
25
+ return getColorValue(`--md-sys-color-${role}`);
26
+ }
27
+ function withOpacity(color, opacity) {
28
+ const hex = color.replace("#", "");
29
+ const alpha = Math.round(Math.max(0, Math.min(1, opacity)) * 255).toString(16).padStart(2, "0");
30
+ return `#${hex}${alpha}`;
31
+ }
32
+ function hexToRgb(hex) {
33
+ const h = hex.replace("#", "");
34
+ const r = parseInt(h.substring(0, 2), 16);
35
+ const g = parseInt(h.substring(2, 4), 16);
36
+ const b = parseInt(h.substring(4, 6), 16);
37
+ return { r, g, b };
38
+ }
39
+ function rgbToHex(r, g, b) {
40
+ const toHex = (n) => {
41
+ const hex = Math.max(0, Math.min(255, Math.round(n))).toString(16);
42
+ return hex.padStart(2, "0");
43
+ };
44
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
45
+ }
46
+ function generateMD3Theme(seedColor) {
47
+ const argb = materialColorUtilities.argbFromHex(seedColor);
48
+ return materialColorUtilities.themeFromSourceColor(argb);
49
+ }
50
+ var STATE_LAYER_OPACITY = {
51
+ hover: 0.08,
52
+ focus: 0.12,
53
+ press: 0.12,
54
+ drag: 0.16
55
+ };
56
+ function applyStateLayer(color, state) {
57
+ return withOpacity(color, STATE_LAYER_OPACITY[state]);
58
+ }
59
+
60
+ // src/utils/typography.ts
61
+ function getTypographyToken(style, property) {
62
+ return getColorValue(`--md-sys-typescale-${style}-${property}`);
63
+ }
64
+ function getTypographyStyle(style, includeFontFamily = false) {
65
+ const styleObject = {
66
+ fontSize: getTypographyToken(style, "size"),
67
+ lineHeight: getTypographyToken(style, "line-height"),
68
+ fontWeight: getTypographyToken(style, "weight"),
69
+ letterSpacing: getTypographyToken(style, "tracking")
70
+ };
71
+ if (includeFontFamily) {
72
+ styleObject.fontFamily = getColorValue("--md-sys-typescale-font-family-plain");
73
+ }
74
+ return styleObject;
75
+ }
76
+ function getFontFamily(variant = "plain") {
77
+ return getColorValue(`--md-sys-typescale-font-family-${variant}`);
78
+ }
79
+ var TYPOGRAPHY_ELEMENT_MAP = {
80
+ h1: "display-large",
81
+ h2: "display-medium",
82
+ h3: "headline-large",
83
+ h4: "headline-medium",
84
+ h5: "headline-small",
85
+ h6: "title-large",
86
+ p: "body-large",
87
+ span: "body-medium",
88
+ small: "body-small",
89
+ button: "label-large",
90
+ label: "label-medium",
91
+ caption: "label-small"
92
+ };
93
+ function getTypographyForElement(element) {
94
+ return TYPOGRAPHY_ELEMENT_MAP[element];
95
+ }
96
+ var TYPOGRAPHY_USAGE = {
97
+ display: "Large, expressive text for hero sections and marketing",
98
+ headline: "High-emphasis text for titles and important headings",
99
+ title: "Medium-emphasis text for section headers and card titles",
100
+ body: "Plain text for paragraphs, lists, and general content",
101
+ label: "UI labels, buttons, tabs, and form elements"
102
+ };
103
+ function getTypographyClassName(style) {
104
+ return `text-${style}`;
105
+ }
106
+ function getResponsiveTypography(mobile, tablet, desktop) {
107
+ return {
108
+ mobile: getTypographyStyle(mobile),
109
+ ...tablet && { tablet: getTypographyStyle(tablet) },
110
+ ...desktop && { desktop: getTypographyStyle(desktop) }
111
+ };
112
+ }
113
+ function remToPx(rem) {
114
+ const remValue = parseFloat(rem.replace("rem", ""));
115
+ return remValue * 16;
116
+ }
117
+ function pxToRem(px) {
118
+ const pxValue = typeof px === "string" ? parseFloat(px.replace("px", "")) : px;
119
+ return `${pxValue / 16}rem`;
120
+ }
121
+ function truncateText(lines = 1) {
122
+ if (lines === 1) {
123
+ return {
124
+ overflow: "hidden",
125
+ textOverflow: "ellipsis",
126
+ whiteSpace: "nowrap"
127
+ };
128
+ }
129
+ return {
130
+ display: "-webkit-box",
131
+ WebkitLineClamp: lines,
132
+ WebkitBoxOrient: "vertical",
133
+ overflow: "hidden",
134
+ textOverflow: "ellipsis"
135
+ };
136
+ }
137
+ var $bdb11010cef70236$export$d41a04c74483c6ef = /* @__PURE__ */ new Map();
138
+ if (typeof FinalizationRegistry !== "undefined") new FinalizationRegistry((heldValue) => {
139
+ $bdb11010cef70236$export$d41a04c74483c6ef.delete(heldValue);
140
+ });
141
+ function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
142
+ if (idA === idB) return idA;
143
+ let setIdsA = $bdb11010cef70236$export$d41a04c74483c6ef.get(idA);
144
+ if (setIdsA) {
145
+ setIdsA.forEach((ref) => ref.current = idB);
146
+ return idB;
147
+ }
148
+ let setIdsB = $bdb11010cef70236$export$d41a04c74483c6ef.get(idB);
149
+ if (setIdsB) {
150
+ setIdsB.forEach((ref) => ref.current = idA);
151
+ return idA;
152
+ }
153
+ return idB;
154
+ }
155
+
156
+ // ../../node_modules/.pnpm/@react-aria+utils@3.32.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/chain.mjs
157
+ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
158
+ return (...args) => {
159
+ for (let callback of callbacks) if (typeof callback === "function") callback(...args);
160
+ };
161
+ }
162
+ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
163
+ let result = {
164
+ ...args[0]
165
+ };
166
+ for (let i = 1; i < args.length; i++) {
167
+ let props = args[i];
168
+ for (let key in props) {
169
+ let a = result[key];
170
+ let b = props[key];
171
+ if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
172
+ key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
173
+ 65 && key.charCodeAt(2) <= /* 'Z' */
174
+ 90) result[key] = ($ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
175
+ else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = ($7jXr9$clsx__default.default)(a, b);
176
+ else if (key === "id" && a && b) result.id = ($bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
177
+ else result[key] = b !== void 0 ? b : a;
178
+ }
179
+ }
180
+ return result;
181
+ }
182
+
183
+ // ../../node_modules/.pnpm/@react-aria+utils@3.32.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@react-aria/utils/dist/filterDOMProps.mjs
184
+ var $65484d02dcb7eb3e$var$DOMPropNames = /* @__PURE__ */ new Set([
185
+ "id"
186
+ ]);
187
+ var $65484d02dcb7eb3e$var$labelablePropNames = /* @__PURE__ */ new Set([
188
+ "aria-label",
189
+ "aria-labelledby",
190
+ "aria-describedby",
191
+ "aria-details"
192
+ ]);
193
+ var $65484d02dcb7eb3e$var$linkPropNames = /* @__PURE__ */ new Set([
194
+ "href",
195
+ "hrefLang",
196
+ "target",
197
+ "rel",
198
+ "download",
199
+ "ping",
200
+ "referrerPolicy"
201
+ ]);
202
+ var $65484d02dcb7eb3e$var$globalAttrs = /* @__PURE__ */ new Set([
203
+ "dir",
204
+ "lang",
205
+ "hidden",
206
+ "inert",
207
+ "translate"
208
+ ]);
209
+ var $65484d02dcb7eb3e$var$globalEvents = /* @__PURE__ */ new Set([
210
+ "onClick",
211
+ "onAuxClick",
212
+ "onContextMenu",
213
+ "onDoubleClick",
214
+ "onMouseDown",
215
+ "onMouseEnter",
216
+ "onMouseLeave",
217
+ "onMouseMove",
218
+ "onMouseOut",
219
+ "onMouseOver",
220
+ "onMouseUp",
221
+ "onTouchCancel",
222
+ "onTouchEnd",
223
+ "onTouchMove",
224
+ "onTouchStart",
225
+ "onPointerDown",
226
+ "onPointerMove",
227
+ "onPointerUp",
228
+ "onPointerCancel",
229
+ "onPointerEnter",
230
+ "onPointerLeave",
231
+ "onPointerOver",
232
+ "onPointerOut",
233
+ "onGotPointerCapture",
234
+ "onLostPointerCapture",
235
+ "onScroll",
236
+ "onWheel",
237
+ "onAnimationStart",
238
+ "onAnimationEnd",
239
+ "onAnimationIteration",
240
+ "onTransitionCancel",
241
+ "onTransitionEnd",
242
+ "onTransitionRun",
243
+ "onTransitionStart"
244
+ ]);
245
+ var $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
246
+ function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
247
+ let { labelable, isLink, global, events = global, propNames } = opts;
248
+ let filteredProps = {};
249
+ for (const prop in props) if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
250
+ return filteredProps;
251
+ }
252
+ var $458b0a5536c1a7cf$var$_React_useInsertionEffect;
253
+ var $458b0a5536c1a7cf$var$useEarlyEffect = typeof document !== "undefined" ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = ($3whtM$react__default.default)["useInsertionEffect"]) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : ($3whtM$react__default.default).useLayoutEffect : () => {
254
+ };
255
+ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
256
+ let [stateValue, setStateValue] = ($3whtM$react.useState)(value || defaultValue);
257
+ let valueRef = ($3whtM$react.useRef)(stateValue);
258
+ let isControlledRef = ($3whtM$react.useRef)(value !== void 0);
259
+ let isControlled = value !== void 0;
260
+ ($3whtM$react.useEffect)(() => {
261
+ let wasControlled = isControlledRef.current;
262
+ if (wasControlled !== isControlled && process.env.NODE_ENV !== "production") console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
263
+ isControlledRef.current = isControlled;
264
+ }, [
265
+ isControlled
266
+ ]);
267
+ let currentValue = isControlled ? value : stateValue;
268
+ $458b0a5536c1a7cf$var$useEarlyEffect(() => {
269
+ valueRef.current = currentValue;
270
+ });
271
+ let [, forceUpdate] = ($3whtM$react.useReducer)(() => ({}), {});
272
+ let setValue = ($3whtM$react.useCallback)((value2, ...args) => {
273
+ let newValue = typeof value2 === "function" ? value2(valueRef.current) : value2;
274
+ if (!Object.is(valueRef.current, newValue)) {
275
+ valueRef.current = newValue;
276
+ setStateValue(newValue);
277
+ forceUpdate();
278
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, ...args);
279
+ }
280
+ }, [
281
+ onChange
282
+ ]);
283
+ return [
284
+ currentValue,
285
+ setValue
286
+ ];
287
+ }
288
+ var ButtonHeadless = $3whtM$react.forwardRef(
289
+ ({ className, children, tabIndex = 0, onMouseDown, type, ...restProps }, forwardedRef) => {
290
+ const internalRef = $3whtM$react.useRef(null);
291
+ const ref = forwardedRef ?? internalRef;
292
+ const { buttonProps } = reactAria.useButton(
293
+ {
294
+ ...restProps,
295
+ // Ensure element type is 'button' for proper semantics
296
+ elementType: "button"
297
+ },
298
+ ref
299
+ );
300
+ const {
301
+ isDisabled: _isDisabled,
302
+ onPress: _onPress,
303
+ onPressStart: _onPressStart,
304
+ onPressEnd: _onPressEnd,
305
+ onPressChange: _onPressChange,
306
+ onPressUp: _onPressUp,
307
+ ...htmlAttrs
308
+ } = restProps;
309
+ const mergedProps = $3ef42575df84b30b$export$9d1611c77c2fe928(
310
+ buttonProps,
311
+ {
312
+ tabIndex,
313
+ className,
314
+ onMouseDown
315
+ },
316
+ htmlAttrs
317
+ // Pass through only HTML attributes (title, data-*, etc.)
318
+ );
319
+ return (
320
+ // eslint-disable-next-line react/button-has-type -- type is dynamically passed from props
321
+ /* @__PURE__ */ jsxRuntime.jsx("button", { ...mergedProps, ref, type: type ?? "button", children })
322
+ );
323
+ }
324
+ );
325
+ ButtonHeadless.displayName = "ButtonHeadless";
326
+ var buttonVariants = classVarianceAuthority.cva(
327
+ [
328
+ // Base classes (always applied)
329
+ "relative inline-flex items-center justify-center cursor-pointer",
330
+ "overflow-hidden rounded-full font-medium",
331
+ "transition-all duration-200",
332
+ "tracking-[0.1px]",
333
+ // MD3 spec: +0.1px letter-spacing for label-large
334
+ "focus-visible:outline-primary focus-visible:outline-2 focus-visible:outline-offset-2",
335
+ // State layers (hover, focus, active) - MD3 spec: 8%/12%/12% opacity
336
+ "before:absolute before:inset-0 before:rounded-[inherit] before:transition-opacity before:duration-200",
337
+ "before:bg-current before:opacity-0",
338
+ "hover:before:opacity-8",
339
+ "focus-visible:before:opacity-12",
340
+ "active:before:opacity-12"
341
+ ],
342
+ {
343
+ variants: {
344
+ /**
345
+ * Button variant (MD3 specification)
346
+ */
347
+ variant: {
348
+ filled: "shadow-none hover:shadow-elevation-1",
349
+ // MD3: gains elevation on hover
350
+ outlined: "bg-transparent border border-outline",
351
+ tonal: "",
352
+ elevated: "shadow-elevation-1 hover:shadow-elevation-2",
353
+ // MD3: level 1 → level 2 on hover
354
+ text: "bg-transparent"
355
+ },
356
+ /**
357
+ * Color scheme (MD3 color roles)
358
+ */
359
+ color: {
360
+ primary: "",
361
+ secondary: "",
362
+ tertiary: "",
363
+ error: ""
364
+ },
365
+ /**
366
+ * Button size
367
+ */
368
+ size: {
369
+ small: "h-8 px-4 text-sm gap-2",
370
+ medium: "h-10 px-6 text-sm gap-2",
371
+ large: "h-12 px-8 text-base gap-3"
372
+ },
373
+ /**
374
+ * Full width variant
375
+ */
376
+ fullWidth: {
377
+ true: "w-full",
378
+ false: ""
379
+ },
380
+ /**
381
+ * Disabled state (MD3 spec: container 12% opacity, content 38% opacity)
382
+ */
383
+ disabled: {
384
+ true: [
385
+ "pointer-events-none cursor-not-allowed",
386
+ "bg-on-surface/12",
387
+ // MD3: disabled container uses on-surface at 12%
388
+ "text-on-surface/38",
389
+ // MD3: disabled text/icons use on-surface at 38%
390
+ "border-on-surface/12",
391
+ // For outlined variant
392
+ "shadow-none"
393
+ // Remove elevation when disabled
394
+ ],
395
+ false: ""
396
+ },
397
+ /**
398
+ * Loading state
399
+ */
400
+ loading: {
401
+ true: "cursor-wait",
402
+ false: ""
403
+ }
404
+ },
405
+ /**
406
+ * Compound variants - combinations of variant + color
407
+ */
408
+ compoundVariants: [
409
+ // ====================
410
+ // FILLED VARIANTS
411
+ // ====================
412
+ {
413
+ variant: "filled",
414
+ color: "primary",
415
+ className: "bg-primary text-on-primary"
416
+ },
417
+ {
418
+ variant: "filled",
419
+ color: "secondary",
420
+ className: "bg-secondary text-on-secondary"
421
+ },
422
+ {
423
+ variant: "filled",
424
+ color: "tertiary",
425
+ className: "bg-tertiary text-on-tertiary"
426
+ },
427
+ {
428
+ variant: "filled",
429
+ color: "error",
430
+ className: "bg-error text-on-error"
431
+ },
432
+ // ====================
433
+ // OUTLINED VARIANTS
434
+ // ====================
435
+ {
436
+ variant: "outlined",
437
+ color: "primary",
438
+ className: "text-primary"
439
+ },
440
+ {
441
+ variant: "outlined",
442
+ color: "secondary",
443
+ className: "text-secondary"
444
+ },
445
+ {
446
+ variant: "outlined",
447
+ color: "tertiary",
448
+ className: "text-tertiary"
449
+ },
450
+ {
451
+ variant: "outlined",
452
+ color: "error",
453
+ className: "text-error"
454
+ },
455
+ // ====================
456
+ // TONAL VARIANTS
457
+ // ====================
458
+ {
459
+ variant: "tonal",
460
+ color: "primary",
461
+ className: "bg-secondary-container text-on-secondary-container"
462
+ },
463
+ {
464
+ variant: "tonal",
465
+ color: "secondary",
466
+ className: "bg-secondary-container text-on-secondary-container"
467
+ },
468
+ {
469
+ variant: "tonal",
470
+ color: "tertiary",
471
+ className: "bg-tertiary-container text-on-tertiary-container"
472
+ },
473
+ {
474
+ variant: "tonal",
475
+ color: "error",
476
+ className: "bg-error-container text-on-error-container"
477
+ },
478
+ // ====================
479
+ // ELEVATED VARIANTS
480
+ // ====================
481
+ {
482
+ variant: "elevated",
483
+ color: "primary",
484
+ className: "bg-surface-container-low text-primary"
485
+ },
486
+ {
487
+ variant: "elevated",
488
+ color: "secondary",
489
+ className: "bg-surface-container-low text-secondary"
490
+ },
491
+ {
492
+ variant: "elevated",
493
+ color: "tertiary",
494
+ className: "bg-surface-container-low text-tertiary"
495
+ },
496
+ {
497
+ variant: "elevated",
498
+ color: "error",
499
+ className: "bg-surface-container-low text-error"
500
+ },
501
+ // ====================
502
+ // TEXT VARIANTS
503
+ // ====================
504
+ {
505
+ variant: "text",
506
+ color: "primary",
507
+ className: "text-primary"
508
+ },
509
+ {
510
+ variant: "text",
511
+ color: "secondary",
512
+ className: "text-secondary"
513
+ },
514
+ {
515
+ variant: "text",
516
+ color: "tertiary",
517
+ className: "text-tertiary"
518
+ },
519
+ {
520
+ variant: "text",
521
+ color: "error",
522
+ className: "text-error"
523
+ }
524
+ ],
525
+ /**
526
+ * Default variants
527
+ */
528
+ defaultVariants: {
529
+ variant: "filled",
530
+ color: "primary",
531
+ size: "medium",
532
+ fullWidth: false,
533
+ disabled: false,
534
+ loading: false
535
+ }
536
+ }
537
+ );
538
+ function useRipple(options = {}) {
539
+ const { disabled = false, color = "currentColor", duration = 450 } = options;
540
+ const [ripples, setRipples] = $3whtM$react.useState([]);
541
+ const rippleKeyCounter = $3whtM$react.useRef(0);
542
+ const onMouseDown = $3whtM$react.useCallback(
543
+ (event) => {
544
+ if (disabled) return;
545
+ const element = event.currentTarget;
546
+ const rect = element.getBoundingClientRect();
547
+ const x = event.clientX - rect.left;
548
+ const y = event.clientY - rect.top;
549
+ const sizeX = Math.max(x, rect.width - x);
550
+ const sizeY = Math.max(y, rect.height - y);
551
+ const size = Math.sqrt(sizeX ** 2 + sizeY ** 2) * 2;
552
+ const key = rippleKeyCounter.current++;
553
+ setRipples((prev) => [...prev, { key, x, y, size }]);
554
+ setTimeout(() => {
555
+ setRipples((prev) => prev.filter((r) => r.key !== key));
556
+ }, duration);
557
+ },
558
+ [disabled, duration]
559
+ );
560
+ const rippleElements = disabled ? null : /* @__PURE__ */ jsxRuntime.jsx(
561
+ "span",
562
+ {
563
+ "data-ripple-container": true,
564
+ className: "pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]",
565
+ children: ripples.map((ripple) => /* @__PURE__ */ jsxRuntime.jsx(
566
+ "span",
567
+ {
568
+ className: "animate-ripple absolute rounded-full opacity-12",
569
+ style: {
570
+ left: ripple.x,
571
+ top: ripple.y,
572
+ width: ripple.size,
573
+ height: ripple.size,
574
+ transform: "translate(-50%, -50%) scale(0)",
575
+ backgroundColor: color,
576
+ animationDuration: `${duration}ms`
577
+ }
578
+ },
579
+ ripple.key
580
+ ))
581
+ }
582
+ );
583
+ return {
584
+ onMouseDown,
585
+ ripples: rippleElements
586
+ };
587
+ }
588
+ var Spinner = () => /* @__PURE__ */ jsxRuntime.jsxs(
589
+ "svg",
590
+ {
591
+ role: "progressbar",
592
+ "aria-label": "Loading",
593
+ className: "h-4 w-4 animate-spin",
594
+ xmlns: "http://www.w3.org/2000/svg",
595
+ fill: "none",
596
+ viewBox: "0 0 24 24",
597
+ children: [
598
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
599
+ /* @__PURE__ */ jsxRuntime.jsx(
600
+ "path",
601
+ {
602
+ className: "opacity-75",
603
+ fill: "currentColor",
604
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
605
+ }
606
+ )
607
+ ]
608
+ }
609
+ );
610
+ var Button = $3whtM$react.forwardRef(
611
+ ({
612
+ // Variant props (CVA)
613
+ variant = "filled",
614
+ color = "primary",
615
+ size = "medium",
616
+ fullWidth = false,
617
+ // Content props
618
+ icon,
619
+ trailingIcon,
620
+ children,
621
+ // State props
622
+ loading = false,
623
+ disableRipple = false,
624
+ isDisabled = false,
625
+ // Styling
626
+ className,
627
+ // Other props
628
+ tabIndex = 0,
629
+ type = "button",
630
+ onPress,
631
+ ...props
632
+ }, ref) => {
633
+ if (process.env.NODE_ENV === "development") {
634
+ if (!children) {
635
+ console.warn(
636
+ "[Button] Button should have text content. Use IconButton for icon-only buttons."
637
+ );
638
+ }
639
+ if (icon && trailingIcon) {
640
+ console.warn("[Button] Button should have either icon or trailingIcon, not both.");
641
+ }
642
+ }
643
+ const isButtonDisabled = isDisabled || loading;
644
+ const { onMouseDown: handleRipple, ripples } = useRipple({
645
+ disabled: isButtonDisabled || disableRipple
646
+ });
647
+ return /* @__PURE__ */ jsxRuntime.jsxs(
648
+ ButtonHeadless,
649
+ {
650
+ ...props,
651
+ ref,
652
+ type,
653
+ isDisabled: isButtonDisabled,
654
+ ...onPress && { onPress },
655
+ tabIndex,
656
+ onMouseDown: handleRipple,
657
+ className: cn(
658
+ // Apply CVA variants
659
+ buttonVariants({
660
+ variant,
661
+ color,
662
+ size,
663
+ fullWidth,
664
+ disabled: isButtonDisabled,
665
+ loading
666
+ }),
667
+ // User custom classes
668
+ className
669
+ ),
670
+ children: [
671
+ ripples,
672
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative z-10 inline-flex shrink-0", loading && "invisible"), children: icon }),
673
+ loading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }),
674
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 inline-flex items-center", children }),
675
+ trailingIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative z-10 inline-flex shrink-0", loading && "invisible"), children: trailingIcon })
676
+ ]
677
+ }
678
+ );
679
+ }
680
+ );
681
+ Button.displayName = "Button";
682
+ var IconButtonHeadless = $3whtM$react.forwardRef(
683
+ ({
684
+ className,
685
+ children,
686
+ tabIndex = 0,
687
+ onMouseDown,
688
+ type,
689
+ selected,
690
+ "aria-label": ariaLabel,
691
+ title,
692
+ ...props
693
+ }, forwardedRef) => {
694
+ const internalRef = $3whtM$react.useRef(null);
695
+ const ref = forwardedRef ?? internalRef;
696
+ const { buttonProps } = reactAria.useButton(
697
+ {
698
+ ...props,
699
+ // Ensure element type is 'button' for proper semantics
700
+ elementType: "button",
701
+ // Pass aria-label
702
+ "aria-label": ariaLabel
703
+ },
704
+ ref
705
+ );
706
+ const domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
707
+ const mergedProps = $3ef42575df84b30b$export$9d1611c77c2fe928(
708
+ buttonProps,
709
+ domProps,
710
+ {
711
+ tabIndex,
712
+ className,
713
+ onMouseDown,
714
+ type: type ?? "button",
715
+ // Add aria-pressed for toggle buttons (only if selected is defined)
716
+ ...selected !== void 0 && { "aria-pressed": selected },
717
+ // Add title if provided
718
+ ...title && { title }
719
+ }
720
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
721
+ );
722
+ return (
723
+ // eslint-disable-next-line react/button-has-type
724
+ /* @__PURE__ */ jsxRuntime.jsx("button", { ...mergedProps, ref, type: type ?? "button", children })
725
+ );
726
+ }
727
+ );
728
+ IconButtonHeadless.displayName = "IconButtonHeadless";
729
+ var iconButtonVariants = classVarianceAuthority.cva(
730
+ [
731
+ // Base classes (always applied)
732
+ "relative inline-flex items-center justify-center",
733
+ "overflow-hidden rounded-full",
734
+ // Circular shape
735
+ "transition-all duration-200",
736
+ "focus-visible:outline-primary focus-visible:outline-2 focus-visible:outline-offset-2",
737
+ // State layers (hover, focus, active)
738
+ "before:absolute before:inset-0 before:rounded-[inherit] before:transition-opacity before:duration-200",
739
+ "before:bg-current before:opacity-0",
740
+ "hover:before:opacity-8",
741
+ "focus-visible:before:opacity-12",
742
+ "active:before:opacity-12"
743
+ ],
744
+ {
745
+ variants: {
746
+ /**
747
+ * Button variant (MD3 specification)
748
+ */
749
+ variant: {
750
+ standard: "bg-transparent",
751
+ // No background
752
+ filled: "shadow-none",
753
+ // Solid background
754
+ tonal: "",
755
+ // Container background
756
+ outlined: "bg-transparent border border-outline"
757
+ },
758
+ /**
759
+ * Color scheme (MD3 color roles)
760
+ */
761
+ color: {
762
+ primary: "",
763
+ secondary: "",
764
+ tertiary: "",
765
+ error: ""
766
+ },
767
+ /**
768
+ * Button size (square dimensions)
769
+ */
770
+ size: {
771
+ small: "h-8 w-8",
772
+ // 32×32px
773
+ medium: "h-10 w-10",
774
+ // 40×40px (default)
775
+ large: "h-12 w-12"
776
+ // 48×48px
777
+ },
778
+ /**
779
+ * Selected state (for toggle buttons)
780
+ */
781
+ selected: {
782
+ true: "",
783
+ false: ""
784
+ },
785
+ /**
786
+ * Disabled state
787
+ */
788
+ isDisabled: {
789
+ true: "pointer-events-none cursor-not-allowed opacity-38",
790
+ false: ""
791
+ }
792
+ },
793
+ /**
794
+ * Compound variants - combinations of variant + color + selected
795
+ */
796
+ compoundVariants: [
797
+ // ====================
798
+ // STANDARD VARIANTS
799
+ // ====================
800
+ {
801
+ variant: "standard",
802
+ selected: false,
803
+ className: "text-on-surface-variant"
804
+ },
805
+ {
806
+ variant: "standard",
807
+ selected: true,
808
+ className: "text-primary"
809
+ },
810
+ // ====================
811
+ // FILLED VARIANTS (UNSELECTED)
812
+ // ====================
813
+ {
814
+ variant: "filled",
815
+ color: "primary",
816
+ selected: false,
817
+ className: "bg-primary text-on-primary"
818
+ },
819
+ {
820
+ variant: "filled",
821
+ color: "secondary",
822
+ selected: false,
823
+ className: "bg-secondary text-on-secondary"
824
+ },
825
+ {
826
+ variant: "filled",
827
+ color: "tertiary",
828
+ selected: false,
829
+ className: "bg-tertiary text-on-tertiary"
830
+ },
831
+ {
832
+ variant: "filled",
833
+ color: "error",
834
+ selected: false,
835
+ className: "bg-error text-on-error"
836
+ },
837
+ // ====================
838
+ // FILLED VARIANTS (SELECTED - uses container colors)
839
+ // ====================
840
+ {
841
+ variant: "filled",
842
+ color: "primary",
843
+ selected: true,
844
+ className: "bg-primary-container text-on-primary-container"
845
+ },
846
+ {
847
+ variant: "filled",
848
+ color: "secondary",
849
+ selected: true,
850
+ className: "bg-secondary-container text-on-secondary-container"
851
+ },
852
+ {
853
+ variant: "filled",
854
+ color: "tertiary",
855
+ selected: true,
856
+ className: "bg-tertiary-container text-on-tertiary-container"
857
+ },
858
+ {
859
+ variant: "filled",
860
+ color: "error",
861
+ selected: true,
862
+ className: "bg-error-container text-on-error-container"
863
+ },
864
+ // ====================
865
+ // TONAL VARIANTS (UNSELECTED)
866
+ // ====================
867
+ {
868
+ variant: "tonal",
869
+ color: "primary",
870
+ selected: false,
871
+ className: "bg-secondary-container text-on-secondary-container"
872
+ },
873
+ {
874
+ variant: "tonal",
875
+ color: "secondary",
876
+ selected: false,
877
+ className: "bg-secondary-container text-on-secondary-container"
878
+ },
879
+ {
880
+ variant: "tonal",
881
+ color: "tertiary",
882
+ selected: false,
883
+ className: "bg-tertiary-container text-on-tertiary-container"
884
+ },
885
+ {
886
+ variant: "tonal",
887
+ color: "error",
888
+ selected: false,
889
+ className: "bg-error-container text-on-error-container"
890
+ },
891
+ // ====================
892
+ // TONAL VARIANTS (SELECTED - uses tertiary container)
893
+ // ====================
894
+ {
895
+ variant: "tonal",
896
+ selected: true,
897
+ className: "bg-tertiary-container text-on-tertiary-container"
898
+ },
899
+ // ====================
900
+ // OUTLINED VARIANTS (UNSELECTED)
901
+ // ====================
902
+ {
903
+ variant: "outlined",
904
+ selected: false,
905
+ className: "text-on-surface-variant"
906
+ },
907
+ // ====================
908
+ // OUTLINED VARIANTS (SELECTED - uses inverse colors)
909
+ // ====================
910
+ {
911
+ variant: "outlined",
912
+ selected: true,
913
+ className: "bg-inverse-surface text-inverse-on-surface border-transparent"
914
+ }
915
+ ],
916
+ /**
917
+ * Default variants
918
+ */
919
+ defaultVariants: {
920
+ variant: "standard",
921
+ color: "primary",
922
+ size: "medium",
923
+ selected: false,
924
+ isDisabled: false
925
+ }
926
+ }
927
+ );
928
+ var IconButton = $3whtM$react.forwardRef(
929
+ ({
930
+ // Variant props (CVA)
931
+ variant = "standard",
932
+ color = "primary",
933
+ size = "medium",
934
+ // IconButton specific props
935
+ children,
936
+ selected,
937
+ disableRipple = false,
938
+ className,
939
+ // React Aria props
940
+ isDisabled: propIsDisabled = false,
941
+ onPress,
942
+ onMouseDown,
943
+ "aria-label": ariaLabel,
944
+ title,
945
+ ...props
946
+ }, ref) => {
947
+ if (process.env.NODE_ENV === "development") {
948
+ if (!ariaLabel) {
949
+ console.error(
950
+ "[IconButton] aria-label is required for IconButton. Icon-only buttons need accessible labels for screen readers."
951
+ );
952
+ }
953
+ if (!children) {
954
+ console.warn("[IconButton] IconButton should have an icon as children.");
955
+ }
956
+ }
957
+ const isDisabled = propIsDisabled;
958
+ const { onMouseDown: handleRipple, ripples } = useRipple({
959
+ disabled: isDisabled || disableRipple
960
+ });
961
+ const mergedOnMouseDown = (e) => {
962
+ onMouseDown?.(e);
963
+ handleRipple(e);
964
+ };
965
+ const mergedPropsValue = $3ef42575df84b30b$export$9d1611c77c2fe928(props, {
966
+ ...onPress && { onPress },
967
+ onMouseDown: mergedOnMouseDown,
968
+ isDisabled
969
+ });
970
+ return /* @__PURE__ */ jsxRuntime.jsxs(
971
+ IconButtonHeadless,
972
+ {
973
+ ref,
974
+ className: cn(
975
+ // Base classes
976
+ "relative inline-flex items-center justify-center",
977
+ "overflow-hidden rounded-full",
978
+ // Circular shape
979
+ "transition-all duration-200",
980
+ "focus-visible:outline-primary focus-visible:outline-2 focus-visible:outline-offset-2",
981
+ // State layers (hover, focus, active)
982
+ "before:absolute before:inset-0 before:rounded-[inherit] before:transition-opacity before:duration-200",
983
+ "before:bg-current before:opacity-0",
984
+ "hover:before:opacity-8",
985
+ "focus-visible:before:opacity-12",
986
+ "active:before:opacity-12",
987
+ // CVA variants
988
+ iconButtonVariants({ variant, color, size, selected: selected ?? false, isDisabled }),
989
+ // User custom classes
990
+ className
991
+ ),
992
+ "aria-label": ariaLabel,
993
+ ...selected !== void 0 && { selected },
994
+ ...title && { title },
995
+ ...mergedPropsValue,
996
+ children: [
997
+ ripples,
998
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 inline-flex shrink-0", children })
999
+ ]
1000
+ }
1001
+ );
1002
+ }
1003
+ );
1004
+ IconButton.displayName = "IconButton";
1005
+ var FABHeadless = $3whtM$react.forwardRef(
1006
+ ({
1007
+ className,
1008
+ children,
1009
+ tabIndex = 0,
1010
+ onMouseDown,
1011
+ type,
1012
+ "aria-label": ariaLabel,
1013
+ title,
1014
+ ...props
1015
+ }, forwardedRef) => {
1016
+ const internalRef = $3whtM$react.useRef(null);
1017
+ const ref = forwardedRef ?? internalRef;
1018
+ const { buttonProps } = reactAria.useButton(
1019
+ {
1020
+ ...props,
1021
+ elementType: "button"
1022
+ },
1023
+ ref
1024
+ );
1025
+ const domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
1026
+ const mergedProps = $3ef42575df84b30b$export$9d1611c77c2fe928(buttonProps, domProps, {
1027
+ tabIndex,
1028
+ className,
1029
+ onMouseDown,
1030
+ type: type ?? "button",
1031
+ "aria-label": ariaLabel,
1032
+ // Add aria-label
1033
+ // Add title if provided
1034
+ ...title && { title }
1035
+ });
1036
+ return (
1037
+ // eslint-disable-next-line react/button-has-type
1038
+ /* @__PURE__ */ jsxRuntime.jsx("button", { ...mergedProps, ref, children })
1039
+ );
1040
+ }
1041
+ );
1042
+ FABHeadless.displayName = "FABHeadless";
1043
+ var fabVariants = classVarianceAuthority.cva(
1044
+ [
1045
+ // Base classes (always applied)
1046
+ "relative inline-flex items-center justify-center",
1047
+ "overflow-hidden",
1048
+ "transition-all duration-200",
1049
+ "focus-visible:outline-primary focus-visible:outline-2 focus-visible:outline-offset-2",
1050
+ "shrink-0",
1051
+ // Prevent shrinking in flex containers
1052
+ // State layers (hover, focus, active)
1053
+ "before:absolute before:inset-0 before:rounded-[inherit] before:transition-opacity before:duration-200",
1054
+ "before:bg-current before:opacity-0",
1055
+ "hover:before:opacity-8",
1056
+ "focus-visible:before:opacity-12",
1057
+ "active:before:opacity-12",
1058
+ // Elevation (floating appearance)
1059
+ "shadow-elevation-3",
1060
+ // Default elevation
1061
+ "hover:shadow-elevation-4"
1062
+ // Hover elevation
1063
+ ],
1064
+ {
1065
+ variants: {
1066
+ /**
1067
+ * FAB size (controls dimensions and icon size)
1068
+ */
1069
+ size: {
1070
+ small: [
1071
+ "h-10 w-10",
1072
+ // 40×40px
1073
+ "p-2",
1074
+ // 8px padding for 24px icon
1075
+ "rounded-xl",
1076
+ // 12px corner radius (not fully rounded!)
1077
+ "m-1"
1078
+ // 4px margin for 48×48px touch target
1079
+ ],
1080
+ medium: [
1081
+ "h-14 w-14",
1082
+ // 56×56px
1083
+ "p-4",
1084
+ // 16px padding for 24px icon
1085
+ "rounded-2xl"
1086
+ // 16px corner radius
1087
+ ],
1088
+ large: [
1089
+ "h-24 w-24",
1090
+ // 96×96px
1091
+ "p-[30px]",
1092
+ // 30px padding for 36px icon
1093
+ "rounded-[28px]"
1094
+ // 28px corner radius (custom value)
1095
+ ],
1096
+ extended: [
1097
+ "h-14",
1098
+ // 56px height (same as medium)
1099
+ "rounded-2xl",
1100
+ // 16px corner radius
1101
+ "pl-4 pr-5",
1102
+ // Asymmetric padding: 16px leading, 20px trailing
1103
+ "gap-2"
1104
+ // 8px gap between icon and text
1105
+ ]
1106
+ },
1107
+ /**
1108
+ * Color scheme (MD3 color roles)
1109
+ */
1110
+ color: {
1111
+ primary: "",
1112
+ secondary: "",
1113
+ tertiary: "",
1114
+ surface: ""
1115
+ },
1116
+ /**
1117
+ * Disabled state
1118
+ */
1119
+ isDisabled: {
1120
+ true: "pointer-events-none cursor-not-allowed !bg-on-surface/12 !text-on-surface/38 !shadow-none",
1121
+ false: ""
1122
+ }
1123
+ },
1124
+ /**
1125
+ * Compound variants - combinations of size + color
1126
+ */
1127
+ compoundVariants: [
1128
+ // ====================
1129
+ // PRIMARY COLOR
1130
+ // ====================
1131
+ {
1132
+ color: "primary",
1133
+ size: "small",
1134
+ className: "bg-primary-container text-on-primary-container"
1135
+ },
1136
+ {
1137
+ color: "primary",
1138
+ size: "medium",
1139
+ className: "bg-primary-container text-on-primary-container"
1140
+ },
1141
+ {
1142
+ color: "primary",
1143
+ size: "large",
1144
+ className: "bg-primary-container text-on-primary-container"
1145
+ },
1146
+ {
1147
+ color: "primary",
1148
+ size: "extended",
1149
+ className: "bg-primary-container text-on-primary-container"
1150
+ },
1151
+ // ====================
1152
+ // SECONDARY COLOR
1153
+ // ====================
1154
+ {
1155
+ color: "secondary",
1156
+ size: "small",
1157
+ className: "bg-secondary-container text-on-secondary-container"
1158
+ },
1159
+ {
1160
+ color: "secondary",
1161
+ size: "medium",
1162
+ className: "bg-secondary-container text-on-secondary-container"
1163
+ },
1164
+ {
1165
+ color: "secondary",
1166
+ size: "large",
1167
+ className: "bg-secondary-container text-on-secondary-container"
1168
+ },
1169
+ {
1170
+ color: "secondary",
1171
+ size: "extended",
1172
+ className: "bg-secondary-container text-on-secondary-container"
1173
+ },
1174
+ // ====================
1175
+ // TERTIARY COLOR
1176
+ // ====================
1177
+ {
1178
+ color: "tertiary",
1179
+ size: "small",
1180
+ className: "bg-tertiary-container text-on-tertiary-container"
1181
+ },
1182
+ {
1183
+ color: "tertiary",
1184
+ size: "medium",
1185
+ className: "bg-tertiary-container text-on-tertiary-container"
1186
+ },
1187
+ {
1188
+ color: "tertiary",
1189
+ size: "large",
1190
+ className: "bg-tertiary-container text-on-tertiary-container"
1191
+ },
1192
+ {
1193
+ color: "tertiary",
1194
+ size: "extended",
1195
+ className: "bg-tertiary-container text-on-tertiary-container"
1196
+ },
1197
+ // ====================
1198
+ // SURFACE COLOR
1199
+ // ====================
1200
+ {
1201
+ color: "surface",
1202
+ size: "small",
1203
+ className: "bg-surface text-primary"
1204
+ },
1205
+ {
1206
+ color: "surface",
1207
+ size: "medium",
1208
+ className: "bg-surface text-primary"
1209
+ },
1210
+ {
1211
+ color: "surface",
1212
+ size: "large",
1213
+ className: "bg-surface text-primary"
1214
+ },
1215
+ {
1216
+ color: "surface",
1217
+ size: "extended",
1218
+ className: "bg-surface text-primary"
1219
+ }
1220
+ ],
1221
+ /**
1222
+ * Default variants
1223
+ */
1224
+ defaultVariants: {
1225
+ size: "medium",
1226
+ color: "primary",
1227
+ isDisabled: false
1228
+ }
1229
+ }
1230
+ );
1231
+ var Spinner2 = () => /* @__PURE__ */ jsxRuntime.jsxs(
1232
+ "svg",
1233
+ {
1234
+ role: "progressbar",
1235
+ "aria-label": "Loading",
1236
+ className: "h-6 w-6 animate-spin",
1237
+ xmlns: "http://www.w3.org/2000/svg",
1238
+ fill: "none",
1239
+ viewBox: "0 0 24 24",
1240
+ children: [
1241
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
1242
+ /* @__PURE__ */ jsxRuntime.jsx(
1243
+ "path",
1244
+ {
1245
+ className: "opacity-75",
1246
+ fill: "currentColor",
1247
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
1248
+ }
1249
+ )
1250
+ ]
1251
+ }
1252
+ );
1253
+ var FAB = $3whtM$react.forwardRef(
1254
+ ({
1255
+ // Variant props (CVA)
1256
+ size = "medium",
1257
+ color = "primary",
1258
+ // FAB specific props
1259
+ icon,
1260
+ children,
1261
+ "aria-label": ariaLabel,
1262
+ loading = false,
1263
+ disableRipple = false,
1264
+ className,
1265
+ // React Aria props
1266
+ isDisabled: propIsDisabled = false,
1267
+ onPress,
1268
+ onMouseDown,
1269
+ title,
1270
+ ...props
1271
+ }, ref) => {
1272
+ if (process.env.NODE_ENV === "development") {
1273
+ if (!icon) {
1274
+ console.warn("[FAB] FAB must have an icon. Please provide the icon prop.");
1275
+ }
1276
+ if (size === "extended" && !children) {
1277
+ console.warn("[FAB] Extended FAB requires text label as children.");
1278
+ }
1279
+ if (size !== "extended" && children) {
1280
+ console.warn(
1281
+ "[FAB] Children (text) is only used for extended FAB. For icon-only FAB, use icon prop only."
1282
+ );
1283
+ }
1284
+ }
1285
+ const isDisabled = propIsDisabled || loading;
1286
+ const { onMouseDown: handleRipple, ripples } = useRipple({
1287
+ disabled: isDisabled || disableRipple
1288
+ });
1289
+ const mergedOnMouseDown = (e) => {
1290
+ onMouseDown?.(e);
1291
+ handleRipple(e);
1292
+ };
1293
+ const mergedPropsValue = $3ef42575df84b30b$export$9d1611c77c2fe928(props, {
1294
+ ...onPress && { onPress },
1295
+ onMouseDown: mergedOnMouseDown,
1296
+ isDisabled
1297
+ });
1298
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1299
+ FABHeadless,
1300
+ {
1301
+ ref,
1302
+ className: cn(
1303
+ // Base classes
1304
+ "relative inline-flex items-center justify-center",
1305
+ "overflow-hidden transition-all duration-200",
1306
+ "focus-visible:outline-primary focus-visible:outline-2 focus-visible:outline-offset-2",
1307
+ "shrink-0",
1308
+ // State layers (hover, focus, active)
1309
+ "before:absolute before:inset-0 before:rounded-[inherit] before:transition-opacity before:duration-200",
1310
+ "before:bg-current before:opacity-0",
1311
+ "hover:before:opacity-8",
1312
+ "focus-visible:before:opacity-12",
1313
+ "active:before:opacity-12",
1314
+ // Elevation
1315
+ "shadow-elevation-3 hover:shadow-elevation-4",
1316
+ // CVA variants
1317
+ fabVariants({ size, color, isDisabled }),
1318
+ // User custom classes
1319
+ className
1320
+ ),
1321
+ "aria-label": ariaLabel,
1322
+ ...title && { title },
1323
+ ...mergedPropsValue,
1324
+ children: [
1325
+ ripples,
1326
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative z-10 inline-flex shrink-0", loading && "invisible"), children: icon }),
1327
+ loading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner2, {}) }),
1328
+ size === "extended" && children && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 inline-flex items-center text-sm font-medium tracking-[0.1px]", children })
1329
+ ]
1330
+ }
1331
+ );
1332
+ }
1333
+ );
1334
+ FAB.displayName = "FAB";
1335
+ var textFieldContainerVariants = classVarianceAuthority.cva(
1336
+ [
1337
+ // Base container styles
1338
+ "relative inline-flex flex-col"
1339
+ ],
1340
+ {
1341
+ variants: {
1342
+ fullWidth: {
1343
+ true: "w-full",
1344
+ false: "w-auto"
1345
+ }
1346
+ },
1347
+ defaultVariants: {
1348
+ fullWidth: false
1349
+ }
1350
+ }
1351
+ );
1352
+ var textFieldWrapperVariants = classVarianceAuthority.cva(
1353
+ [
1354
+ // Base wrapper styles
1355
+ "relative inline-flex items-center w-full",
1356
+ "transition-all duration-200",
1357
+ "rounded-t"
1358
+ ],
1359
+ {
1360
+ variants: {
1361
+ variant: {
1362
+ filled: ["bg-surface-container-highest", "border-b-2 border-on-surface-variant"],
1363
+ outlined: ["bg-transparent", "border border-outline", "rounded-b"]
1364
+ },
1365
+ size: {
1366
+ small: "min-h-10",
1367
+ medium: "min-h-12",
1368
+ large: "min-h-14"
1369
+ },
1370
+ disabled: {
1371
+ true: ["cursor-not-allowed", "opacity-38"],
1372
+ false: ""
1373
+ },
1374
+ error: {
1375
+ true: "",
1376
+ false: ""
1377
+ },
1378
+ focused: {
1379
+ true: "",
1380
+ false: ""
1381
+ }
1382
+ },
1383
+ compoundVariants: [
1384
+ // FILLED VARIANT - Focused state
1385
+ {
1386
+ variant: "filled",
1387
+ focused: true,
1388
+ error: false,
1389
+ className: "border-primary"
1390
+ },
1391
+ // FILLED VARIANT - Error state
1392
+ {
1393
+ variant: "filled",
1394
+ error: true,
1395
+ className: "border-error"
1396
+ },
1397
+ // FILLED VARIANT - Hover state (handled via group-hover in parent)
1398
+ {
1399
+ variant: "filled",
1400
+ disabled: false,
1401
+ className: "hover:bg-on-surface/[0.08]"
1402
+ },
1403
+ // OUTLINED VARIANT - Focused state
1404
+ {
1405
+ variant: "outlined",
1406
+ focused: true,
1407
+ error: false,
1408
+ className: "border-2 border-primary"
1409
+ },
1410
+ // OUTLINED VARIANT - Error state
1411
+ {
1412
+ variant: "outlined",
1413
+ error: true,
1414
+ className: "border-2 border-error"
1415
+ },
1416
+ // OUTLINED VARIANT - Hover state
1417
+ {
1418
+ variant: "outlined",
1419
+ disabled: false,
1420
+ className: "hover:border-on-surface"
1421
+ }
1422
+ ],
1423
+ defaultVariants: {
1424
+ variant: "filled",
1425
+ size: "medium",
1426
+ disabled: false,
1427
+ error: false,
1428
+ focused: false
1429
+ }
1430
+ }
1431
+ );
1432
+ var textFieldInputVariants = classVarianceAuthority.cva(
1433
+ [
1434
+ // Base input styles
1435
+ "w-full bg-transparent outline-none",
1436
+ "text-on-surface text-base",
1437
+ "placeholder:text-on-surface-variant placeholder:opacity-60",
1438
+ "transition-colors duration-200"
1439
+ ],
1440
+ {
1441
+ variants: {
1442
+ variant: {
1443
+ filled: "px-4",
1444
+ outlined: "px-4"
1445
+ },
1446
+ size: {
1447
+ small: "h-10 py-2 text-sm",
1448
+ medium: "h-12 py-3 text-base",
1449
+ large: "h-14 py-4 text-lg"
1450
+ },
1451
+ disabled: {
1452
+ true: "cursor-not-allowed",
1453
+ false: ""
1454
+ },
1455
+ hasLeadingIcon: {
1456
+ true: "pl-12",
1457
+ false: ""
1458
+ },
1459
+ hasTrailingIcon: {
1460
+ true: "pr-12",
1461
+ false: ""
1462
+ },
1463
+ multiline: {
1464
+ true: "resize-y",
1465
+ false: ""
1466
+ }
1467
+ },
1468
+ defaultVariants: {
1469
+ variant: "filled",
1470
+ size: "medium",
1471
+ disabled: false,
1472
+ hasLeadingIcon: false,
1473
+ hasTrailingIcon: false,
1474
+ multiline: false
1475
+ }
1476
+ }
1477
+ );
1478
+ var textFieldLabelVariants = classVarianceAuthority.cva(
1479
+ [
1480
+ // Base label styles
1481
+ "absolute left-4 transition-all duration-200 pointer-events-none",
1482
+ "text-on-surface-variant origin-top-left"
1483
+ ],
1484
+ {
1485
+ variants: {
1486
+ variant: {
1487
+ filled: "top-4",
1488
+ outlined: "top-3 bg-surface px-1"
1489
+ },
1490
+ size: {
1491
+ small: "text-sm",
1492
+ medium: "text-base",
1493
+ large: "text-lg"
1494
+ },
1495
+ floating: {
1496
+ true: "-translate-y-6 scale-75",
1497
+ false: "scale-100"
1498
+ },
1499
+ focused: {
1500
+ true: "text-primary",
1501
+ false: ""
1502
+ },
1503
+ error: {
1504
+ true: "text-error",
1505
+ false: ""
1506
+ },
1507
+ disabled: {
1508
+ true: "text-on-surface/38",
1509
+ false: ""
1510
+ },
1511
+ hasLeadingIcon: {
1512
+ true: "left-12",
1513
+ false: ""
1514
+ }
1515
+ },
1516
+ compoundVariants: [
1517
+ // Outlined variant floating label positioning
1518
+ {
1519
+ variant: "outlined",
1520
+ floating: true,
1521
+ className: "-top-2"
1522
+ }
1523
+ ],
1524
+ defaultVariants: {
1525
+ variant: "filled",
1526
+ size: "medium",
1527
+ floating: false,
1528
+ focused: false,
1529
+ error: false,
1530
+ disabled: false,
1531
+ hasLeadingIcon: false
1532
+ }
1533
+ }
1534
+ );
1535
+ var textFieldIconVariants = classVarianceAuthority.cva(
1536
+ [
1537
+ // Base icon styles
1538
+ "absolute flex items-center justify-center",
1539
+ "text-on-surface-variant transition-colors duration-200",
1540
+ "pointer-events-none"
1541
+ ],
1542
+ {
1543
+ variants: {
1544
+ position: {
1545
+ leading: "left-3",
1546
+ trailing: "right-3"
1547
+ },
1548
+ size: {
1549
+ small: "w-5 h-5",
1550
+ medium: "w-6 h-6",
1551
+ large: "w-7 h-7"
1552
+ },
1553
+ disabled: {
1554
+ true: "opacity-38",
1555
+ false: ""
1556
+ }
1557
+ },
1558
+ defaultVariants: {
1559
+ position: "leading",
1560
+ size: "medium",
1561
+ disabled: false
1562
+ }
1563
+ }
1564
+ );
1565
+ var textFieldHelperTextVariants = classVarianceAuthority.cva(
1566
+ [
1567
+ // Base helper text styles
1568
+ "text-xs mt-1 px-4 transition-colors duration-200"
1569
+ ],
1570
+ {
1571
+ variants: {
1572
+ type: {
1573
+ description: "text-on-surface-variant",
1574
+ error: "text-error"
1575
+ },
1576
+ disabled: {
1577
+ true: "opacity-38",
1578
+ false: ""
1579
+ }
1580
+ },
1581
+ defaultVariants: {
1582
+ type: "description",
1583
+ disabled: false
1584
+ }
1585
+ }
1586
+ );
1587
+ var textFieldCharacterCountVariants = classVarianceAuthority.cva(
1588
+ [
1589
+ // Base character counter styles
1590
+ "text-xs mt-1 px-4 text-right text-on-surface-variant transition-colors duration-200"
1591
+ ],
1592
+ {
1593
+ variants: {
1594
+ exceeded: {
1595
+ true: "text-error",
1596
+ false: ""
1597
+ },
1598
+ disabled: {
1599
+ true: "opacity-38",
1600
+ false: ""
1601
+ }
1602
+ },
1603
+ defaultVariants: {
1604
+ exceeded: false,
1605
+ disabled: false
1606
+ }
1607
+ }
1608
+ );
1609
+ var TextFieldHeadless = $3whtM$react.forwardRef(
1610
+ ({
1611
+ label,
1612
+ description,
1613
+ errorMessage,
1614
+ fullWidth = false,
1615
+ multiline = false,
1616
+ rows = 3,
1617
+ className,
1618
+ inputClassName,
1619
+ labelClassName,
1620
+ descriptionClassName,
1621
+ errorClassName,
1622
+ isInvalid,
1623
+ children,
1624
+ ...restProps
1625
+ }, forwardedRef) => {
1626
+ const internalRef = $3whtM$react.useRef(null);
1627
+ const ref = forwardedRef ?? internalRef;
1628
+ const inputElementType = multiline ? "textarea" : "input";
1629
+ const {
1630
+ labelProps,
1631
+ inputProps,
1632
+ descriptionProps,
1633
+ errorMessageProps,
1634
+ isInvalid: ariaIsInvalid,
1635
+ validationErrors
1636
+ } = reactAria.useTextField(
1637
+ {
1638
+ label,
1639
+ description,
1640
+ errorMessage,
1641
+ isInvalid: isInvalid ?? false,
1642
+ inputElementType,
1643
+ ...restProps
1644
+ },
1645
+ ref
1646
+ );
1647
+ const { isFocused, isFocusVisible, focusProps } = reactAria.useFocusRing({ within: false });
1648
+ const invalid = isInvalid ?? ariaIsInvalid;
1649
+ const showErrorMessage = invalid && (errorMessage ?? validationErrors.length > 0);
1650
+ const displayErrorMessage = errorMessage ?? validationErrors.join(" ");
1651
+ const currentValue = typeof inputProps.value === "string" ? inputProps.value : typeof inputProps.defaultValue === "string" ? inputProps.defaultValue : "";
1652
+ if (typeof children === "function") {
1653
+ const mergedInputProps2 = $3ef42575df84b30b$export$9d1611c77c2fe928(
1654
+ inputProps,
1655
+ focusProps
1656
+ );
1657
+ return children({
1658
+ labelProps,
1659
+ inputProps: mergedInputProps2,
1660
+ descriptionProps,
1661
+ errorMessageProps,
1662
+ isInvalid: invalid,
1663
+ isFocused,
1664
+ isFocusVisible,
1665
+ currentValue,
1666
+ inputRef: ref
1667
+ });
1668
+ }
1669
+ const {
1670
+ isDisabled: _isDisabled,
1671
+ isRequired: _isRequired,
1672
+ isReadOnly: _isReadOnly,
1673
+ validationBehavior: _validationBehavior,
1674
+ validate: _validate,
1675
+ autoFocus: _autoFocus,
1676
+ value: _value,
1677
+ defaultValue: _defaultValue,
1678
+ onChange: _onChange,
1679
+ onFocus: _onFocus,
1680
+ onBlur: _onBlur,
1681
+ onKeyDown: _onKeyDown,
1682
+ onKeyUp: _onKeyUp,
1683
+ onCopy: _onCopy,
1684
+ onCut: _onCut,
1685
+ onPaste: _onPaste,
1686
+ onCompositionStart: _onCompositionStart,
1687
+ onCompositionEnd: _onCompositionEnd,
1688
+ onCompositionUpdate: _onCompositionUpdate,
1689
+ onSelect: _onSelect,
1690
+ onBeforeInput: _onBeforeInput,
1691
+ onInput: _onInput,
1692
+ onFocusChange: _onFocusChange,
1693
+ ...htmlAttrs
1694
+ } = restProps;
1695
+ const mergedInputProps = $3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, focusProps, htmlAttrs, {
1696
+ className: inputClassName
1697
+ });
1698
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: fullWidth ? { width: "100%" } : void 0, children: [
1699
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { ...labelProps, className: labelClassName, children: label }),
1700
+ multiline ? /* @__PURE__ */ jsxRuntime.jsx(
1701
+ "textarea",
1702
+ {
1703
+ ...mergedInputProps,
1704
+ ref,
1705
+ rows
1706
+ }
1707
+ ) : /* @__PURE__ */ jsxRuntime.jsx("input", { ...mergedInputProps, ref }),
1708
+ description && !showErrorMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { ...descriptionProps, className: descriptionClassName, children: description }),
1709
+ showErrorMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { ...errorMessageProps, className: errorClassName, children: displayErrorMessage })
1710
+ ] });
1711
+ }
1712
+ );
1713
+ TextFieldHeadless.displayName = "TextFieldHeadless";
1714
+ var TextField = $3whtM$react.forwardRef(
1715
+ ({
1716
+ variant = "filled",
1717
+ size = "medium",
1718
+ label,
1719
+ description,
1720
+ errorMessage,
1721
+ leadingIcon,
1722
+ trailingIcon,
1723
+ characterCount = false,
1724
+ maxLength,
1725
+ fullWidth = false,
1726
+ multiline = false,
1727
+ rows = 3,
1728
+ className,
1729
+ isDisabled = false,
1730
+ isInvalid = false,
1731
+ isRequired = false,
1732
+ isReadOnly = false,
1733
+ value,
1734
+ defaultValue,
1735
+ onChange,
1736
+ onFocus,
1737
+ onBlur,
1738
+ spellCheck,
1739
+ ...props
1740
+ }, ref) => {
1741
+ const spellCheckProp = spellCheck === void 0 ? void 0 : typeof spellCheck === "string" ? spellCheck === "true" : spellCheck;
1742
+ const headlessProps = {
1743
+ ...label !== void 0 ? { label } : {},
1744
+ ...description !== void 0 ? { description } : {},
1745
+ ...errorMessage !== void 0 ? { errorMessage } : {},
1746
+ ...value !== void 0 ? { value } : {},
1747
+ ...defaultValue !== void 0 ? { defaultValue } : {},
1748
+ ...onChange !== void 0 ? { onChange } : {},
1749
+ ...onFocus !== void 0 ? { onFocus } : {},
1750
+ ...onBlur !== void 0 ? { onBlur } : {},
1751
+ ...maxLength !== void 0 ? { maxLength } : {},
1752
+ fullWidth,
1753
+ multiline,
1754
+ rows,
1755
+ isDisabled,
1756
+ isInvalid,
1757
+ isRequired,
1758
+ isReadOnly,
1759
+ ...props
1760
+ };
1761
+ return /* @__PURE__ */ jsxRuntime.jsx(TextFieldHeadless, { ref, ...headlessProps, children: ({
1762
+ labelProps,
1763
+ inputProps,
1764
+ descriptionProps,
1765
+ errorMessageProps,
1766
+ isInvalid: fieldIsInvalid,
1767
+ isFocused,
1768
+ currentValue,
1769
+ inputRef
1770
+ }) => {
1771
+ const hasValue = currentValue.length > 0;
1772
+ const shouldFloatLabel = isFocused || hasValue;
1773
+ const characterLength = currentValue.length;
1774
+ const isCharacterLimitExceeded = maxLength ? characterLength > maxLength : false;
1775
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(textFieldContainerVariants({ fullWidth }), className), children: [
1776
+ /* @__PURE__ */ jsxRuntime.jsxs(
1777
+ "div",
1778
+ {
1779
+ className: cn(
1780
+ textFieldWrapperVariants({
1781
+ variant,
1782
+ size,
1783
+ disabled: isDisabled,
1784
+ error: fieldIsInvalid,
1785
+ focused: isFocused
1786
+ })
1787
+ ),
1788
+ children: [
1789
+ leadingIcon && /* @__PURE__ */ jsxRuntime.jsx(
1790
+ "span",
1791
+ {
1792
+ className: textFieldIconVariants({
1793
+ position: "leading",
1794
+ size,
1795
+ disabled: isDisabled
1796
+ }),
1797
+ children: leadingIcon
1798
+ }
1799
+ ),
1800
+ label && /* @__PURE__ */ jsxRuntime.jsxs(
1801
+ "label",
1802
+ {
1803
+ ...labelProps,
1804
+ className: cn(
1805
+ textFieldLabelVariants({
1806
+ variant,
1807
+ size,
1808
+ floating: shouldFloatLabel,
1809
+ focused: isFocused,
1810
+ error: fieldIsInvalid,
1811
+ disabled: isDisabled,
1812
+ hasLeadingIcon: !!leadingIcon
1813
+ })
1814
+ ),
1815
+ children: [
1816
+ label,
1817
+ isRequired && " *"
1818
+ ]
1819
+ }
1820
+ ),
1821
+ multiline ? /* @__PURE__ */ jsxRuntime.jsx(
1822
+ "textarea",
1823
+ {
1824
+ ...inputProps,
1825
+ ref: inputRef,
1826
+ className: cn(
1827
+ textFieldInputVariants({
1828
+ variant,
1829
+ size,
1830
+ disabled: isDisabled,
1831
+ hasLeadingIcon: !!leadingIcon,
1832
+ hasTrailingIcon: !!trailingIcon,
1833
+ multiline: true
1834
+ })
1835
+ ),
1836
+ rows,
1837
+ spellCheck: spellCheckProp
1838
+ }
1839
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1840
+ "input",
1841
+ {
1842
+ ...inputProps,
1843
+ ref: inputRef,
1844
+ className: cn(
1845
+ textFieldInputVariants({
1846
+ variant,
1847
+ size,
1848
+ disabled: isDisabled,
1849
+ hasLeadingIcon: !!leadingIcon,
1850
+ hasTrailingIcon: !!trailingIcon,
1851
+ multiline: false
1852
+ })
1853
+ ),
1854
+ spellCheck: spellCheckProp
1855
+ }
1856
+ ),
1857
+ trailingIcon && /* @__PURE__ */ jsxRuntime.jsx(
1858
+ "span",
1859
+ {
1860
+ className: textFieldIconVariants({
1861
+ position: "trailing",
1862
+ size,
1863
+ disabled: isDisabled
1864
+ }),
1865
+ children: trailingIcon
1866
+ }
1867
+ )
1868
+ ]
1869
+ }
1870
+ ),
1871
+ description && !fieldIsInvalid && /* @__PURE__ */ jsxRuntime.jsx(
1872
+ "div",
1873
+ {
1874
+ ...descriptionProps,
1875
+ className: textFieldHelperTextVariants({
1876
+ type: "description",
1877
+ disabled: isDisabled
1878
+ }),
1879
+ children: description
1880
+ }
1881
+ ),
1882
+ fieldIsInvalid && errorMessage && /* @__PURE__ */ jsxRuntime.jsx(
1883
+ "div",
1884
+ {
1885
+ ...errorMessageProps,
1886
+ className: textFieldHelperTextVariants({
1887
+ type: "error",
1888
+ disabled: isDisabled
1889
+ }),
1890
+ children: errorMessage
1891
+ }
1892
+ ),
1893
+ characterCount && maxLength && /* @__PURE__ */ jsxRuntime.jsxs(
1894
+ "div",
1895
+ {
1896
+ className: textFieldCharacterCountVariants({
1897
+ exceeded: isCharacterLimitExceeded,
1898
+ disabled: isDisabled
1899
+ }),
1900
+ children: [
1901
+ characterLength,
1902
+ " / ",
1903
+ maxLength
1904
+ ]
1905
+ }
1906
+ )
1907
+ ] });
1908
+ } });
1909
+ }
1910
+ );
1911
+ TextField.displayName = "TextField";
1912
+ var $e5be200c675c3b3a$export$aca958c65c314e6c = {
1913
+ badInput: false,
1914
+ customError: false,
1915
+ patternMismatch: false,
1916
+ rangeOverflow: false,
1917
+ rangeUnderflow: false,
1918
+ stepMismatch: false,
1919
+ tooLong: false,
1920
+ tooShort: false,
1921
+ typeMismatch: false,
1922
+ valueMissing: false,
1923
+ valid: true
1924
+ };
1925
+ var $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE = {
1926
+ ...$e5be200c675c3b3a$export$aca958c65c314e6c,
1927
+ customError: true,
1928
+ valid: false
1929
+ };
1930
+ var $e5be200c675c3b3a$export$dad6ae84456c676a = {
1931
+ isInvalid: false,
1932
+ validationDetails: $e5be200c675c3b3a$export$aca958c65c314e6c,
1933
+ validationErrors: []
1934
+ };
1935
+ var $e5be200c675c3b3a$export$571b5131b7e65c11 = ($3whtM$react.createContext)({});
1936
+ var $e5be200c675c3b3a$export$a763b9476acd3eb = "__formValidationState" + Date.now();
1937
+ function $e5be200c675c3b3a$export$fc1a364ae1f3ff10(props) {
1938
+ if (props[$e5be200c675c3b3a$export$a763b9476acd3eb]) {
1939
+ let { realtimeValidation, displayValidation, updateValidation, resetValidation, commitValidation } = props[$e5be200c675c3b3a$export$a763b9476acd3eb];
1940
+ return {
1941
+ realtimeValidation,
1942
+ displayValidation,
1943
+ updateValidation,
1944
+ resetValidation,
1945
+ commitValidation
1946
+ };
1947
+ }
1948
+ return $e5be200c675c3b3a$var$useFormValidationStateImpl(props);
1949
+ }
1950
+ function $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {
1951
+ let { isInvalid, validationState, name, value, builtinValidation, validate, validationBehavior = "aria" } = props;
1952
+ if (validationState) isInvalid || (isInvalid = validationState === "invalid");
1953
+ let controlledError = isInvalid !== void 0 ? {
1954
+ isInvalid,
1955
+ validationErrors: [],
1956
+ validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
1957
+ } : null;
1958
+ let clientError = ($3whtM$react.useMemo)(() => {
1959
+ if (!validate || value == null) return null;
1960
+ let validateErrors = $e5be200c675c3b3a$var$runValidate(validate, value);
1961
+ return $e5be200c675c3b3a$var$getValidationResult(validateErrors);
1962
+ }, [
1963
+ validate,
1964
+ value
1965
+ ]);
1966
+ if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = void 0;
1967
+ let serverErrors = ($3whtM$react.useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);
1968
+ let serverErrorMessages = ($3whtM$react.useMemo)(() => {
1969
+ if (name) return Array.isArray(name) ? name.flatMap((name2) => $e5be200c675c3b3a$var$asArray(serverErrors[name2])) : $e5be200c675c3b3a$var$asArray(serverErrors[name]);
1970
+ return [];
1971
+ }, [
1972
+ serverErrors,
1973
+ name
1974
+ ]);
1975
+ let [lastServerErrors, setLastServerErrors] = ($3whtM$react.useState)(serverErrors);
1976
+ let [isServerErrorCleared, setServerErrorCleared] = ($3whtM$react.useState)(false);
1977
+ if (serverErrors !== lastServerErrors) {
1978
+ setLastServerErrors(serverErrors);
1979
+ setServerErrorCleared(false);
1980
+ }
1981
+ let serverError = ($3whtM$react.useMemo)(() => $e5be200c675c3b3a$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [
1982
+ isServerErrorCleared,
1983
+ serverErrorMessages
1984
+ ]);
1985
+ let nextValidation = ($3whtM$react.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);
1986
+ let [currentValidity, setCurrentValidity] = ($3whtM$react.useState)($e5be200c675c3b3a$export$dad6ae84456c676a);
1987
+ let lastError = ($3whtM$react.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);
1988
+ let commitValidation = () => {
1989
+ if (!commitQueued) return;
1990
+ setCommitQueued(false);
1991
+ let error = clientError || builtinValidation || nextValidation.current;
1992
+ if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {
1993
+ lastError.current = error;
1994
+ setCurrentValidity(error);
1995
+ }
1996
+ };
1997
+ let [commitQueued, setCommitQueued] = ($3whtM$react.useState)(false);
1998
+ ($3whtM$react.useEffect)(commitValidation);
1999
+ let realtimeValidation = controlledError || serverError || clientError || builtinValidation || $e5be200c675c3b3a$export$dad6ae84456c676a;
2000
+ let displayValidation = validationBehavior === "native" ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity;
2001
+ return {
2002
+ realtimeValidation,
2003
+ displayValidation,
2004
+ updateValidation(value2) {
2005
+ if (validationBehavior === "aria" && !$e5be200c675c3b3a$var$isEqualValidation(currentValidity, value2)) setCurrentValidity(value2);
2006
+ else nextValidation.current = value2;
2007
+ },
2008
+ resetValidation() {
2009
+ let error = $e5be200c675c3b3a$export$dad6ae84456c676a;
2010
+ if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {
2011
+ lastError.current = error;
2012
+ setCurrentValidity(error);
2013
+ }
2014
+ if (validationBehavior === "native") setCommitQueued(false);
2015
+ setServerErrorCleared(true);
2016
+ },
2017
+ commitValidation() {
2018
+ if (validationBehavior === "native") setCommitQueued(true);
2019
+ setServerErrorCleared(true);
2020
+ }
2021
+ };
2022
+ }
2023
+ function $e5be200c675c3b3a$var$asArray(v) {
2024
+ if (!v) return [];
2025
+ return Array.isArray(v) ? v : [
2026
+ v
2027
+ ];
2028
+ }
2029
+ function $e5be200c675c3b3a$var$runValidate(validate, value) {
2030
+ if (typeof validate === "function") {
2031
+ let e = validate(value);
2032
+ if (e && typeof e !== "boolean") return $e5be200c675c3b3a$var$asArray(e);
2033
+ }
2034
+ return [];
2035
+ }
2036
+ function $e5be200c675c3b3a$var$getValidationResult(errors) {
2037
+ return errors.length ? {
2038
+ isInvalid: true,
2039
+ validationErrors: errors,
2040
+ validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
2041
+ } : null;
2042
+ }
2043
+ function $e5be200c675c3b3a$var$isEqualValidation(a, b) {
2044
+ if (a === b) return true;
2045
+ return !!a && !!b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a2, i) => a2 === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v]) => b.validationDetails[k] === v);
2046
+ }
2047
+ var $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 1e10);
2048
+ var $a54cdc5c1942b639$var$i = 0;
2049
+ function $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {
2050
+ let name = ($3whtM$react.useMemo)(() => props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [
2051
+ props.name
2052
+ ]);
2053
+ var _props_defaultValue;
2054
+ let [selectedValue, setSelected] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
2055
+ let [initialValue] = ($3whtM$react.useState)(selectedValue);
2056
+ let [lastFocusedValue, setLastFocusedValue] = ($3whtM$react.useState)(null);
2057
+ let validation = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
2058
+ ...props,
2059
+ value: selectedValue
2060
+ });
2061
+ let setSelectedValue = (value) => {
2062
+ if (!props.isReadOnly && !props.isDisabled) {
2063
+ setSelected(value);
2064
+ validation.commitValidation();
2065
+ }
2066
+ };
2067
+ let isInvalid = validation.displayValidation.isInvalid;
2068
+ var _props_defaultValue1;
2069
+ return {
2070
+ ...validation,
2071
+ name,
2072
+ selectedValue,
2073
+ defaultSelectedValue: props.value !== void 0 ? initialValue : (_props_defaultValue1 = props.defaultValue) !== null && _props_defaultValue1 !== void 0 ? _props_defaultValue1 : null,
2074
+ setSelectedValue,
2075
+ lastFocusedValue,
2076
+ setLastFocusedValue,
2077
+ isDisabled: props.isDisabled || false,
2078
+ isReadOnly: props.isReadOnly || false,
2079
+ isRequired: props.isRequired || false,
2080
+ validationState: props.validationState || (isInvalid ? "invalid" : null),
2081
+ isInvalid
2082
+ };
2083
+ }
2084
+ function $3017fa7ffdddec74$export$8042c6c013fd5226(props = {}) {
2085
+ let { isReadOnly } = props;
2086
+ let [isSelected, setSelected] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.isSelected, props.defaultSelected || false, props.onChange);
2087
+ let [initialValue] = ($3whtM$react.useState)(isSelected);
2088
+ function updateSelected(value) {
2089
+ if (!isReadOnly) setSelected(value);
2090
+ }
2091
+ function toggleState() {
2092
+ if (!isReadOnly) setSelected(!isSelected);
2093
+ }
2094
+ var _props_defaultSelected;
2095
+ return {
2096
+ isSelected,
2097
+ defaultSelected: (_props_defaultSelected = props.defaultSelected) !== null && _props_defaultSelected !== void 0 ? _props_defaultSelected : initialValue,
2098
+ setSelected: updateSelected,
2099
+ toggle: toggleState
2100
+ };
2101
+ }
2102
+ var checkboxVariants = classVarianceAuthority.cva(
2103
+ [
2104
+ // Base classes (always applied to label wrapper)
2105
+ "relative inline-flex items-center cursor-pointer select-none",
2106
+ "transition-opacity duration-200"
2107
+ ],
2108
+ {
2109
+ variants: {
2110
+ /**
2111
+ * Disabled state
2112
+ */
2113
+ disabled: {
2114
+ true: "opacity-38 cursor-not-allowed pointer-events-none",
2115
+ false: ""
2116
+ }
2117
+ },
2118
+ defaultVariants: {
2119
+ disabled: false
2120
+ }
2121
+ }
2122
+ );
2123
+ var checkboxContainerVariants = classVarianceAuthority.cva(
2124
+ [
2125
+ // Base classes for checkbox visual container
2126
+ "relative inline-flex items-center justify-center",
2127
+ "w-10 h-10",
2128
+ // 40x40dp touch target (MD3 spec)
2129
+ "flex-shrink-0",
2130
+ "transition-all duration-200",
2131
+ // State layer (hover, focus, active) - MD3 spec: 8%/12%/12% opacity
2132
+ "before:absolute before:inset-0 before:rounded-full before:transition-opacity before:duration-200",
2133
+ "before:bg-current before:opacity-0",
2134
+ "hover:before:opacity-8",
2135
+ "active:before:opacity-12"
2136
+ ],
2137
+ {
2138
+ variants: {
2139
+ /**
2140
+ * Checkbox state (determines visual appearance)
2141
+ */
2142
+ state: {
2143
+ unchecked: "text-on-surface-variant",
2144
+ checked: "text-primary",
2145
+ indeterminate: "text-primary"
2146
+ },
2147
+ /**
2148
+ * Error/invalid state
2149
+ */
2150
+ isInvalid: {
2151
+ true: "text-error",
2152
+ false: ""
2153
+ },
2154
+ /**
2155
+ * Disabled state
2156
+ */
2157
+ disabled: {
2158
+ true: "text-on-surface pointer-events-none",
2159
+ false: ""
2160
+ }
2161
+ },
2162
+ compoundVariants: [
2163
+ // Error state overrides normal colors for all states
2164
+ {
2165
+ state: "unchecked",
2166
+ isInvalid: true,
2167
+ disabled: false,
2168
+ className: "text-error"
2169
+ },
2170
+ {
2171
+ state: "checked",
2172
+ isInvalid: true,
2173
+ disabled: false,
2174
+ className: "text-error"
2175
+ },
2176
+ {
2177
+ state: "indeterminate",
2178
+ isInvalid: true,
2179
+ disabled: false,
2180
+ className: "text-error"
2181
+ }
2182
+ ],
2183
+ defaultVariants: {
2184
+ state: "unchecked",
2185
+ isInvalid: false,
2186
+ disabled: false
2187
+ }
2188
+ }
2189
+ );
2190
+ var checkboxIconBoxVariants = classVarianceAuthority.cva(
2191
+ [
2192
+ // Base classes for the checkbox box
2193
+ // Note: Border radius is applied via SVG rx/ry attributes (2dp) in the component
2194
+ "transition-all duration-200"
2195
+ ],
2196
+ {
2197
+ variants: {
2198
+ /**
2199
+ * Checkbox state
2200
+ */
2201
+ state: {
2202
+ unchecked: [
2203
+ "fill-transparent",
2204
+ "stroke-outline",
2205
+ // MD3: outline color for unchecked
2206
+ "stroke-2"
2207
+ // MD3: 2dp outline width
2208
+ ],
2209
+ checked: [
2210
+ "fill-current",
2211
+ // Uses parent text color (primary or error)
2212
+ "stroke-none"
2213
+ ],
2214
+ indeterminate: [
2215
+ "fill-current",
2216
+ // Uses parent text color (primary or error)
2217
+ "stroke-none"
2218
+ ]
2219
+ },
2220
+ /**
2221
+ * Disabled state
2222
+ */
2223
+ disabled: {
2224
+ true: ["fill-transparent", "stroke-current", "stroke-2"],
2225
+ false: ""
2226
+ }
2227
+ },
2228
+ compoundVariants: [
2229
+ // Disabled state overrides fill for checked/indeterminate
2230
+ {
2231
+ state: "checked",
2232
+ disabled: true,
2233
+ className: "fill-current stroke-none"
2234
+ },
2235
+ {
2236
+ state: "indeterminate",
2237
+ disabled: true,
2238
+ className: "fill-current stroke-none"
2239
+ }
2240
+ ],
2241
+ defaultVariants: {
2242
+ state: "unchecked",
2243
+ disabled: false
2244
+ }
2245
+ }
2246
+ );
2247
+ var checkboxIconVariants = classVarianceAuthority.cva(
2248
+ [
2249
+ "fill-current",
2250
+ // Inherits color from parent
2251
+ "transition-all duration-200"
2252
+ ],
2253
+ {
2254
+ variants: {
2255
+ /**
2256
+ * Icon type
2257
+ */
2258
+ type: {
2259
+ check: "",
2260
+ // Checkmark icon
2261
+ dash: ""
2262
+ // Dash/minus icon
2263
+ }
2264
+ },
2265
+ defaultVariants: {
2266
+ type: "check"
2267
+ }
2268
+ }
2269
+ );
2270
+ var checkboxLabelVariants = classVarianceAuthority.cva(
2271
+ [
2272
+ "text-sm",
2273
+ // MD3: Body Medium (14px)
2274
+ "text-on-surface",
2275
+ "select-none",
2276
+ "ml-4"
2277
+ // 16px spacing between checkbox and label (MD3 standard)
2278
+ ],
2279
+ {
2280
+ variants: {
2281
+ disabled: {
2282
+ true: "",
2283
+ false: ""
2284
+ }
2285
+ },
2286
+ defaultVariants: {
2287
+ disabled: false
2288
+ }
2289
+ }
2290
+ );
2291
+ var Checkbox = $3whtM$react.forwardRef(
2292
+ ({
2293
+ // Content props
2294
+ children,
2295
+ // State props
2296
+ isIndeterminate = false,
2297
+ isInvalid = false,
2298
+ disableRipple = false,
2299
+ isDisabled = false,
2300
+ // Styling
2301
+ className,
2302
+ // Other props
2303
+ ...props
2304
+ }, forwardedRef) => {
2305
+ const internalRef = $3whtM$react.useRef(null);
2306
+ const ref = forwardedRef ?? internalRef;
2307
+ const htmlAttrs = props;
2308
+ const dataTestId = htmlAttrs["data-testid"];
2309
+ const htmlId = htmlAttrs.id;
2310
+ const htmlTitle = htmlAttrs.title;
2311
+ const {
2312
+ "data-testid": _dataTestId,
2313
+ id: _htmlId,
2314
+ title: _htmlTitle,
2315
+ ...restPropsWithoutHtmlAttrs
2316
+ } = props;
2317
+ const state = $3017fa7ffdddec74$export$8042c6c013fd5226(restPropsWithoutHtmlAttrs);
2318
+ const { inputProps, labelProps } = reactAria.useCheckbox(
2319
+ restPropsWithoutHtmlAttrs,
2320
+ state,
2321
+ ref
2322
+ );
2323
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
2324
+ const isSelected = state.isSelected;
2325
+ const visualState = isIndeterminate ? "indeterminate" : isSelected ? "checked" : "unchecked";
2326
+ const { onMouseDown: handleRipple, ripples } = useRipple({
2327
+ disabled: isDisabled || disableRipple
2328
+ });
2329
+ $3whtM$react.useEffect(() => {
2330
+ if (ref.current) {
2331
+ ref.current.indeterminate = isIndeterminate;
2332
+ }
2333
+ }, [isIndeterminate, ref]);
2334
+ if (process.env.NODE_ENV === "development") {
2335
+ const ariaProps = restPropsWithoutHtmlAttrs;
2336
+ if (!children && !ariaProps["aria-label"] && !ariaProps["aria-labelledby"]) {
2337
+ console.warn(
2338
+ "[Checkbox] Checkbox should have a label (children) or aria-label for accessibility."
2339
+ );
2340
+ }
2341
+ }
2342
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2343
+ "label",
2344
+ {
2345
+ ...labelProps,
2346
+ className: cn(
2347
+ checkboxVariants({
2348
+ disabled: isDisabled
2349
+ }),
2350
+ className
2351
+ ),
2352
+ "data-testid": dataTestId,
2353
+ title: htmlTitle,
2354
+ children: [
2355
+ /* @__PURE__ */ jsxRuntime.jsx(reactAria.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx("input", { ...reactAria.mergeProps(inputProps, focusProps), ref, id: htmlId }) }),
2356
+ /* @__PURE__ */ jsxRuntime.jsxs(
2357
+ "div",
2358
+ {
2359
+ role: "presentation",
2360
+ className: cn(
2361
+ checkboxContainerVariants({
2362
+ state: visualState,
2363
+ isInvalid,
2364
+ disabled: isDisabled
2365
+ })
2366
+ ),
2367
+ onMouseDown: handleRipple,
2368
+ children: [
2369
+ ripples,
2370
+ /* @__PURE__ */ jsxRuntime.jsxs(
2371
+ "svg",
2372
+ {
2373
+ width: "18",
2374
+ height: "18",
2375
+ viewBox: "0 0 18 18",
2376
+ "aria-hidden": "true",
2377
+ className: "relative z-10",
2378
+ children: [
2379
+ /* @__PURE__ */ jsxRuntime.jsx(
2380
+ "rect",
2381
+ {
2382
+ x: "0",
2383
+ y: "0",
2384
+ width: "18",
2385
+ height: "18",
2386
+ rx: "2",
2387
+ ry: "2",
2388
+ className: cn(
2389
+ checkboxIconBoxVariants({
2390
+ state: visualState,
2391
+ disabled: isDisabled
2392
+ })
2393
+ )
2394
+ }
2395
+ ),
2396
+ isSelected && !isIndeterminate && /* @__PURE__ */ jsxRuntime.jsx(
2397
+ "path",
2398
+ {
2399
+ d: "M14.1 4.5L6.3 12.3l-3.4-3.4L1.5 10.3l4.8 4.8 9.2-9.2z",
2400
+ className: cn(checkboxIconVariants({ type: "check" }), "fill-on-primary")
2401
+ }
2402
+ ),
2403
+ isIndeterminate && /* @__PURE__ */ jsxRuntime.jsx(
2404
+ "rect",
2405
+ {
2406
+ x: "4",
2407
+ y: "8",
2408
+ width: "10",
2409
+ height: "2",
2410
+ className: cn(checkboxIconVariants({ type: "dash" }), "fill-on-primary")
2411
+ }
2412
+ ),
2413
+ isFocusVisible && /* @__PURE__ */ jsxRuntime.jsx(
2414
+ "rect",
2415
+ {
2416
+ x: "-3",
2417
+ y: "-3",
2418
+ width: "24",
2419
+ height: "24",
2420
+ rx: "12",
2421
+ fill: "none",
2422
+ stroke: "currentColor",
2423
+ strokeWidth: "2",
2424
+ className: "animate-pulse"
2425
+ }
2426
+ )
2427
+ ]
2428
+ }
2429
+ )
2430
+ ]
2431
+ }
2432
+ ),
2433
+ children && /* @__PURE__ */ jsxRuntime.jsx(
2434
+ "span",
2435
+ {
2436
+ className: cn(
2437
+ checkboxLabelVariants({
2438
+ disabled: isDisabled
2439
+ })
2440
+ ),
2441
+ children
2442
+ }
2443
+ )
2444
+ ]
2445
+ }
2446
+ );
2447
+ }
2448
+ );
2449
+ Checkbox.displayName = "Checkbox";
2450
+ var switchVariants = classVarianceAuthority.cva(
2451
+ [
2452
+ // Base classes (always applied to label wrapper)
2453
+ "relative inline-flex items-center cursor-pointer select-none",
2454
+ "transition-opacity duration-200"
2455
+ ],
2456
+ {
2457
+ variants: {
2458
+ /**
2459
+ * Disabled state
2460
+ */
2461
+ disabled: {
2462
+ true: "opacity-38 cursor-not-allowed pointer-events-none",
2463
+ false: ""
2464
+ }
2465
+ },
2466
+ defaultVariants: {
2467
+ disabled: false
2468
+ }
2469
+ }
2470
+ );
2471
+ var switchTrackVariants = classVarianceAuthority.cva(
2472
+ [
2473
+ // Base classes for track
2474
+ "relative flex items-center",
2475
+ "w-[52px] h-[32px]",
2476
+ // MD3 spec: 52x32dp
2477
+ "rounded-full",
2478
+ // MD3 spec: border-radius 16dp (full)
2479
+ "transition-all duration-200"
2480
+ ],
2481
+ {
2482
+ variants: {
2483
+ /**
2484
+ * Switch state (determines track color)
2485
+ */
2486
+ selected: {
2487
+ true: "bg-primary",
2488
+ // MD3: selected track
2489
+ false: "bg-surface-container-highest"
2490
+ // MD3: unselected track
2491
+ },
2492
+ /**
2493
+ * Disabled state
2494
+ */
2495
+ disabled: {
2496
+ true: "bg-on-surface/12",
2497
+ // MD3: 12% opacity for disabled
2498
+ false: ""
2499
+ }
2500
+ },
2501
+ compoundVariants: [
2502
+ // Disabled state overrides normal colors
2503
+ {
2504
+ selected: true,
2505
+ disabled: true,
2506
+ className: "bg-on-surface/12"
2507
+ },
2508
+ {
2509
+ selected: false,
2510
+ disabled: true,
2511
+ className: "bg-on-surface/12"
2512
+ }
2513
+ ],
2514
+ defaultVariants: {
2515
+ selected: false,
2516
+ disabled: false
2517
+ }
2518
+ }
2519
+ );
2520
+ var switchHandleContainerVariants = classVarianceAuthority.cva(
2521
+ [
2522
+ // Base classes for handle container (includes state layer)
2523
+ "absolute flex items-center justify-center",
2524
+ "rounded-full",
2525
+ "transition-all duration-200",
2526
+ // State layer (hover, focus, active) - MD3 spec: 8%/12%/12% opacity
2527
+ "before:absolute before:inset-0 before:rounded-full before:transition-opacity before:duration-200",
2528
+ "before:bg-current before:opacity-0",
2529
+ "hover:before:opacity-8",
2530
+ "active:before:opacity-12"
2531
+ ],
2532
+ {
2533
+ variants: {
2534
+ /**
2535
+ * Switch state (determines handle position and size)
2536
+ */
2537
+ selected: {
2538
+ true: [
2539
+ "left-[28px]",
2540
+ // Position when ON (52px - 24px = 28px)
2541
+ "text-primary"
2542
+ // State layer color
2543
+ ],
2544
+ false: [
2545
+ "left-[8px]",
2546
+ // Position when OFF (centered in left half)
2547
+ "text-on-surface-variant"
2548
+ // State layer color
2549
+ ]
2550
+ },
2551
+ /**
2552
+ * Pressed state (increases handle size)
2553
+ */
2554
+ pressed: {
2555
+ true: "w-[28px] h-[28px]",
2556
+ // MD3: 28dp when pressed
2557
+ false: ""
2558
+ },
2559
+ /**
2560
+ * Disabled state
2561
+ */
2562
+ disabled: {
2563
+ true: "pointer-events-none",
2564
+ false: ""
2565
+ }
2566
+ },
2567
+ compoundVariants: [
2568
+ // Size depends on selected + pressed state
2569
+ {
2570
+ selected: true,
2571
+ pressed: false,
2572
+ className: "w-[24px] h-[24px]"
2573
+ // MD3: 24dp when selected
2574
+ },
2575
+ {
2576
+ selected: false,
2577
+ pressed: false,
2578
+ className: "w-[16px] h-[16px]"
2579
+ // MD3: 16dp when unselected
2580
+ }
2581
+ ],
2582
+ defaultVariants: {
2583
+ selected: false,
2584
+ pressed: false,
2585
+ disabled: false
2586
+ }
2587
+ }
2588
+ );
2589
+ var switchHandleVariants = classVarianceAuthority.cva(
2590
+ [
2591
+ // Base classes for the handle
2592
+ "relative z-10 rounded-full",
2593
+ "transition-all duration-200",
2594
+ "flex items-center justify-center"
2595
+ ],
2596
+ {
2597
+ variants: {
2598
+ /**
2599
+ * Switch state (determines handle color and size)
2600
+ */
2601
+ selected: {
2602
+ true: "bg-on-primary",
2603
+ // MD3: on-primary when selected
2604
+ false: "bg-outline"
2605
+ // MD3: outline when unselected
2606
+ },
2607
+ /**
2608
+ * Pressed state
2609
+ */
2610
+ pressed: {
2611
+ true: "w-[28px] h-[28px]",
2612
+ // MD3: 28dp when pressed
2613
+ false: ""
2614
+ },
2615
+ /**
2616
+ * Disabled state
2617
+ */
2618
+ disabled: {
2619
+ true: "bg-on-surface/38",
2620
+ // MD3: 38% opacity for disabled
2621
+ false: ""
2622
+ }
2623
+ },
2624
+ compoundVariants: [
2625
+ // Size depends on selected + pressed state
2626
+ {
2627
+ selected: true,
2628
+ pressed: false,
2629
+ className: "w-[24px] h-[24px]"
2630
+ // MD3: 24dp when selected
2631
+ },
2632
+ {
2633
+ selected: false,
2634
+ pressed: false,
2635
+ className: "w-[16px] h-[16px]"
2636
+ // MD3: 16dp when unselected
2637
+ },
2638
+ // Disabled state overrides normal colors
2639
+ {
2640
+ selected: true,
2641
+ disabled: true,
2642
+ className: "bg-on-surface/38"
2643
+ },
2644
+ {
2645
+ selected: false,
2646
+ disabled: true,
2647
+ className: "bg-on-surface/38"
2648
+ }
2649
+ ],
2650
+ defaultVariants: {
2651
+ selected: false,
2652
+ pressed: false,
2653
+ disabled: false
2654
+ }
2655
+ }
2656
+ );
2657
+ var switchIconVariants = classVarianceAuthority.cva(
2658
+ [
2659
+ // Base classes for icons
2660
+ "w-4 h-4",
2661
+ // MD3: 16x16dp icon size
2662
+ "transition-all duration-200"
2663
+ ],
2664
+ {
2665
+ variants: {
2666
+ /**
2667
+ * Icon visibility based on state
2668
+ */
2669
+ visible: {
2670
+ true: "opacity-100",
2671
+ false: "opacity-0"
2672
+ },
2673
+ /**
2674
+ * Disabled state
2675
+ */
2676
+ disabled: {
2677
+ true: "opacity-38",
2678
+ false: ""
2679
+ }
2680
+ },
2681
+ defaultVariants: {
2682
+ visible: true,
2683
+ disabled: false
2684
+ }
2685
+ }
2686
+ );
2687
+ var switchLabelVariants = classVarianceAuthority.cva(
2688
+ [
2689
+ "text-sm",
2690
+ // MD3: Body Medium (14px)
2691
+ "text-on-surface",
2692
+ "select-none",
2693
+ "ml-4"
2694
+ // 16px spacing between switch and label (MD3 standard)
2695
+ ],
2696
+ {
2697
+ variants: {
2698
+ disabled: {
2699
+ true: "",
2700
+ false: ""
2701
+ }
2702
+ },
2703
+ defaultVariants: {
2704
+ disabled: false
2705
+ }
2706
+ }
2707
+ );
2708
+ var Switch = $3whtM$react.forwardRef(
2709
+ ({
2710
+ // Content props
2711
+ children,
2712
+ icon,
2713
+ selectedIcon,
2714
+ // State props
2715
+ disableRipple = false,
2716
+ isDisabled = false,
2717
+ // Styling
2718
+ className,
2719
+ // Other props
2720
+ ...props
2721
+ }, forwardedRef) => {
2722
+ const internalRef = $3whtM$react.useRef(null);
2723
+ const ref = forwardedRef ?? internalRef;
2724
+ const htmlAttrs = props;
2725
+ const dataTestId = htmlAttrs["data-testid"];
2726
+ const htmlId = htmlAttrs.id;
2727
+ const htmlTitle = htmlAttrs.title;
2728
+ const {
2729
+ "data-testid": _dataTestId,
2730
+ id: _htmlId,
2731
+ title: _htmlTitle,
2732
+ ...restPropsWithoutHtmlAttrs
2733
+ } = props;
2734
+ const state = $3017fa7ffdddec74$export$8042c6c013fd5226(restPropsWithoutHtmlAttrs);
2735
+ const { inputProps, labelProps, isPressed } = reactAria.useSwitch(
2736
+ restPropsWithoutHtmlAttrs,
2737
+ state,
2738
+ ref
2739
+ );
2740
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
2741
+ const isSelected = state.isSelected;
2742
+ const { onMouseDown: handleRipple, ripples } = useRipple({
2743
+ disabled: isDisabled || disableRipple
2744
+ });
2745
+ if (process.env.NODE_ENV === "development") {
2746
+ const ariaProps = restPropsWithoutHtmlAttrs;
2747
+ if (!children && !ariaProps["aria-label"] && !ariaProps["aria-labelledby"]) {
2748
+ console.warn(
2749
+ "[Switch] Switch should have a label (children) or aria-label for accessibility."
2750
+ );
2751
+ }
2752
+ }
2753
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2754
+ "label",
2755
+ {
2756
+ ...labelProps,
2757
+ className: cn(
2758
+ switchVariants({
2759
+ disabled: isDisabled
2760
+ }),
2761
+ className
2762
+ ),
2763
+ "data-testid": dataTestId,
2764
+ title: htmlTitle,
2765
+ children: [
2766
+ /* @__PURE__ */ jsxRuntime.jsx(reactAria.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx("input", { ...reactAria.mergeProps(inputProps, focusProps), ref, id: htmlId }) }),
2767
+ /* @__PURE__ */ jsxRuntime.jsxs(
2768
+ "div",
2769
+ {
2770
+ role: "presentation",
2771
+ className: cn(
2772
+ switchTrackVariants({
2773
+ selected: isSelected,
2774
+ disabled: isDisabled
2775
+ })
2776
+ ),
2777
+ children: [
2778
+ isFocusVisible && /* @__PURE__ */ jsxRuntime.jsx(
2779
+ "div",
2780
+ {
2781
+ className: "border-primary absolute inset-[-4px] animate-pulse rounded-full border-2",
2782
+ "aria-hidden": "true"
2783
+ }
2784
+ ),
2785
+ /* @__PURE__ */ jsxRuntime.jsxs(
2786
+ "div",
2787
+ {
2788
+ className: cn(
2789
+ switchHandleContainerVariants({
2790
+ selected: isSelected,
2791
+ pressed: isPressed,
2792
+ disabled: isDisabled
2793
+ })
2794
+ ),
2795
+ onMouseDown: handleRipple,
2796
+ role: "presentation",
2797
+ children: [
2798
+ ripples,
2799
+ /* @__PURE__ */ jsxRuntime.jsxs(
2800
+ "div",
2801
+ {
2802
+ className: cn(
2803
+ switchHandleVariants({
2804
+ selected: isSelected,
2805
+ pressed: isPressed,
2806
+ disabled: isDisabled
2807
+ })
2808
+ ),
2809
+ children: [
2810
+ !isSelected && icon && /* @__PURE__ */ jsxRuntime.jsx(
2811
+ "div",
2812
+ {
2813
+ className: cn(
2814
+ switchIconVariants({
2815
+ visible: !isSelected,
2816
+ disabled: isDisabled
2817
+ })
2818
+ ),
2819
+ children: icon
2820
+ }
2821
+ ),
2822
+ isSelected && selectedIcon && /* @__PURE__ */ jsxRuntime.jsx(
2823
+ "div",
2824
+ {
2825
+ className: cn(
2826
+ switchIconVariants({
2827
+ visible: isSelected,
2828
+ disabled: isDisabled
2829
+ })
2830
+ ),
2831
+ children: selectedIcon
2832
+ }
2833
+ )
2834
+ ]
2835
+ }
2836
+ )
2837
+ ]
2838
+ }
2839
+ )
2840
+ ]
2841
+ }
2842
+ ),
2843
+ children && /* @__PURE__ */ jsxRuntime.jsx(
2844
+ "span",
2845
+ {
2846
+ className: cn(
2847
+ switchLabelVariants({
2848
+ disabled: isDisabled
2849
+ })
2850
+ ),
2851
+ children
2852
+ }
2853
+ )
2854
+ ]
2855
+ }
2856
+ );
2857
+ }
2858
+ );
2859
+ Switch.displayName = "Switch";
2860
+ var RadioGroupContext = $3whtM$react.createContext(null);
2861
+ var RadioGroupHeadless = $3whtM$react.forwardRef(
2862
+ ({ className, children, renderLabel, ...props }, forwardedRef) => {
2863
+ const internalRef = $3whtM$react.useRef(null);
2864
+ const ref = forwardedRef ?? internalRef;
2865
+ const state = $a54cdc5c1942b639$export$bca9d026f8e704eb(props);
2866
+ const { radioGroupProps, labelProps } = reactAria.useRadioGroup(props, state);
2867
+ const dataTestId = props["data-testid"];
2868
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...radioGroupProps, ref, className, "data-testid": dataTestId, children: [
2869
+ props.label && (renderLabel ? renderLabel(labelProps) : /* @__PURE__ */ jsxRuntime.jsx("span", { ...labelProps, children: props.label })),
2870
+ /* @__PURE__ */ jsxRuntime.jsx(RadioGroupContext.Provider, { value: state, children })
2871
+ ] });
2872
+ }
2873
+ );
2874
+ RadioGroupHeadless.displayName = "RadioGroupHeadless";
2875
+ var radioGroupVariants = classVarianceAuthority.cva(
2876
+ [
2877
+ // Base classes (always applied to group wrapper)
2878
+ "flex",
2879
+ "gap-4"
2880
+ // 16px spacing between radios (MD3 standard)
2881
+ ],
2882
+ {
2883
+ variants: {
2884
+ /**
2885
+ * Layout orientation
2886
+ */
2887
+ orientation: {
2888
+ vertical: "flex-col",
2889
+ horizontal: "flex-row flex-wrap"
2890
+ },
2891
+ /**
2892
+ * Disabled state
2893
+ */
2894
+ disabled: {
2895
+ true: "",
2896
+ false: ""
2897
+ }
2898
+ },
2899
+ defaultVariants: {
2900
+ orientation: "vertical",
2901
+ disabled: false
2902
+ }
2903
+ }
2904
+ );
2905
+ var radioGroupLabelVariants = classVarianceAuthority.cva(
2906
+ [
2907
+ "text-sm font-medium",
2908
+ // MD3: Body Medium
2909
+ "text-on-surface",
2910
+ "mb-3"
2911
+ // Spacing below label (12px)
2912
+ ],
2913
+ {
2914
+ variants: {
2915
+ disabled: {
2916
+ true: "opacity-38",
2917
+ false: ""
2918
+ }
2919
+ },
2920
+ defaultVariants: {
2921
+ disabled: false
2922
+ }
2923
+ }
2924
+ );
2925
+ var radioVariants = classVarianceAuthority.cva(
2926
+ [
2927
+ // Base classes (always applied to label wrapper)
2928
+ "relative inline-flex items-center cursor-pointer select-none",
2929
+ "transition-opacity duration-200"
2930
+ ],
2931
+ {
2932
+ variants: {
2933
+ /**
2934
+ * Disabled state
2935
+ */
2936
+ disabled: {
2937
+ true: "opacity-38 cursor-not-allowed pointer-events-none",
2938
+ false: ""
2939
+ }
2940
+ },
2941
+ defaultVariants: {
2942
+ disabled: false
2943
+ }
2944
+ }
2945
+ );
2946
+ var radioContainerVariants = classVarianceAuthority.cva(
2947
+ [
2948
+ // Base classes for radio visual container
2949
+ "relative inline-flex items-center justify-center",
2950
+ "w-10 h-10",
2951
+ // 40x40dp touch target (MD3 spec)
2952
+ "flex-shrink-0",
2953
+ "transition-all duration-200",
2954
+ // State layer (hover, focus, active) - MD3 spec: 8%/12%/12% opacity
2955
+ "before:absolute before:inset-0 before:rounded-full before:transition-opacity before:duration-200",
2956
+ "before:bg-current before:opacity-0",
2957
+ "hover:before:opacity-8",
2958
+ "active:before:opacity-12"
2959
+ ],
2960
+ {
2961
+ variants: {
2962
+ /**
2963
+ * Radio state (determines visual appearance)
2964
+ */
2965
+ state: {
2966
+ unselected: "text-on-surface-variant",
2967
+ selected: "text-primary"
2968
+ },
2969
+ /**
2970
+ * Error/invalid state
2971
+ */
2972
+ isInvalid: {
2973
+ true: "text-error",
2974
+ false: ""
2975
+ },
2976
+ /**
2977
+ * Disabled state
2978
+ */
2979
+ disabled: {
2980
+ true: "text-on-surface pointer-events-none",
2981
+ false: ""
2982
+ }
2983
+ },
2984
+ compoundVariants: [
2985
+ // Error state overrides normal colors for all states
2986
+ {
2987
+ state: "unselected",
2988
+ isInvalid: true,
2989
+ disabled: false,
2990
+ className: "text-error"
2991
+ },
2992
+ {
2993
+ state: "selected",
2994
+ isInvalid: true,
2995
+ disabled: false,
2996
+ className: "text-error"
2997
+ }
2998
+ ],
2999
+ defaultVariants: {
3000
+ state: "unselected",
3001
+ isInvalid: false,
3002
+ disabled: false
3003
+ }
3004
+ }
3005
+ );
3006
+ var radioIconOuterVariants = classVarianceAuthority.cva(
3007
+ [
3008
+ // Base classes for the radio outer circle
3009
+ "transition-all duration-200"
3010
+ ],
3011
+ {
3012
+ variants: {
3013
+ /**
3014
+ * Radio state
3015
+ */
3016
+ state: {
3017
+ unselected: [
3018
+ "fill-transparent",
3019
+ "stroke-current",
3020
+ // Uses parent text color (on-surface-variant or error)
3021
+ "stroke-2"
3022
+ // MD3: 2dp outline width
3023
+ ],
3024
+ selected: [
3025
+ "fill-current",
3026
+ // Uses parent text color (primary or error)
3027
+ "stroke-none"
3028
+ ]
3029
+ },
3030
+ /**
3031
+ * Disabled state
3032
+ */
3033
+ disabled: {
3034
+ true: ["fill-transparent", "stroke-current", "stroke-2"],
3035
+ false: ""
3036
+ }
3037
+ },
3038
+ compoundVariants: [
3039
+ // Disabled + selected state overrides fill
3040
+ {
3041
+ state: "selected",
3042
+ disabled: true,
3043
+ className: "fill-current stroke-none"
3044
+ }
3045
+ ],
3046
+ defaultVariants: {
3047
+ state: "unselected",
3048
+ disabled: false
3049
+ }
3050
+ }
3051
+ );
3052
+ var radioIconInnerVariants = classVarianceAuthority.cva(
3053
+ [
3054
+ "fill-current",
3055
+ // Inherits color from parent (on-primary)
3056
+ "transition-all duration-200"
3057
+ ],
3058
+ {
3059
+ variants: {
3060
+ /**
3061
+ * Visibility based on state
3062
+ */
3063
+ visible: {
3064
+ true: "opacity-100 scale-100",
3065
+ false: "opacity-0 scale-0"
3066
+ }
3067
+ },
3068
+ defaultVariants: {
3069
+ visible: false
3070
+ }
3071
+ }
3072
+ );
3073
+ var radioLabelVariants = classVarianceAuthority.cva(
3074
+ [
3075
+ "text-sm",
3076
+ // MD3: Body Medium (14px)
3077
+ "text-on-surface",
3078
+ "select-none",
3079
+ "ml-4"
3080
+ // 16px spacing between radio and label (MD3 standard)
3081
+ ],
3082
+ {
3083
+ variants: {
3084
+ disabled: {
3085
+ true: "",
3086
+ false: ""
3087
+ }
3088
+ },
3089
+ defaultVariants: {
3090
+ disabled: false
3091
+ }
3092
+ }
3093
+ );
3094
+ var Radio = $3whtM$react.forwardRef(
3095
+ ({
3096
+ // Content props
3097
+ children,
3098
+ // State props
3099
+ disableRipple = false,
3100
+ isDisabled = false,
3101
+ // Styling
3102
+ className,
3103
+ // Other props
3104
+ ...props
3105
+ }, forwardedRef) => {
3106
+ const state = $3whtM$react.useContext(RadioGroupContext);
3107
+ if (!state) {
3108
+ throw new Error("Radio must be used within a RadioGroup");
3109
+ }
3110
+ const internalRef = $3whtM$react.useRef(null);
3111
+ const ref = forwardedRef ?? internalRef;
3112
+ const htmlAttrs = props;
3113
+ const dataTestId = htmlAttrs["data-testid"];
3114
+ const htmlId = htmlAttrs.id;
3115
+ const htmlTitle = htmlAttrs.title;
3116
+ const {
3117
+ "data-testid": _dataTestId,
3118
+ id: _htmlId,
3119
+ title: _htmlTitle,
3120
+ ...restPropsWithoutHtmlAttrs
3121
+ } = props;
3122
+ const {
3123
+ inputProps,
3124
+ isSelected,
3125
+ isDisabled: radioIsDisabled
3126
+ } = reactAria.useRadio(
3127
+ {
3128
+ ...restPropsWithoutHtmlAttrs,
3129
+ value: props.value
3130
+ },
3131
+ state,
3132
+ ref
3133
+ );
3134
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
3135
+ const finalIsDisabled = isDisabled || radioIsDisabled;
3136
+ const visualState = isSelected ? "selected" : "unselected";
3137
+ const { onMouseDown: handleRipple, ripples } = useRipple({
3138
+ disabled: finalIsDisabled || disableRipple
3139
+ });
3140
+ if (process.env.NODE_ENV === "development") {
3141
+ const ariaProps = restPropsWithoutHtmlAttrs;
3142
+ if (!children && !ariaProps["aria-label"] && !ariaProps["aria-labelledby"]) {
3143
+ console.warn(
3144
+ "[Radio] Radio should have a label (children) or aria-label for accessibility."
3145
+ );
3146
+ }
3147
+ }
3148
+ const isInvalid = state.validationState === "invalid";
3149
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3150
+ "label",
3151
+ {
3152
+ className: cn(
3153
+ radioVariants({
3154
+ disabled: finalIsDisabled
3155
+ }),
3156
+ className
3157
+ ),
3158
+ "data-testid": dataTestId,
3159
+ title: htmlTitle,
3160
+ children: [
3161
+ /* @__PURE__ */ jsxRuntime.jsx(reactAria.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx("input", { ...reactAria.mergeProps(inputProps, focusProps), ref, id: htmlId }) }),
3162
+ /* @__PURE__ */ jsxRuntime.jsxs(
3163
+ "div",
3164
+ {
3165
+ role: "presentation",
3166
+ className: cn(
3167
+ radioContainerVariants({
3168
+ state: visualState,
3169
+ isInvalid,
3170
+ disabled: finalIsDisabled
3171
+ })
3172
+ ),
3173
+ onMouseDown: handleRipple,
3174
+ children: [
3175
+ ripples,
3176
+ /* @__PURE__ */ jsxRuntime.jsxs(
3177
+ "svg",
3178
+ {
3179
+ width: "20",
3180
+ height: "20",
3181
+ viewBox: "0 0 20 20",
3182
+ "aria-hidden": "true",
3183
+ className: "relative z-10",
3184
+ children: [
3185
+ /* @__PURE__ */ jsxRuntime.jsx(
3186
+ "circle",
3187
+ {
3188
+ cx: "10",
3189
+ cy: "10",
3190
+ r: "9",
3191
+ className: cn(
3192
+ radioIconOuterVariants({
3193
+ state: visualState,
3194
+ disabled: finalIsDisabled
3195
+ })
3196
+ )
3197
+ }
3198
+ ),
3199
+ /* @__PURE__ */ jsxRuntime.jsx(
3200
+ "circle",
3201
+ {
3202
+ cx: "10",
3203
+ cy: "10",
3204
+ r: "5",
3205
+ className: cn(
3206
+ radioIconInnerVariants({
3207
+ visible: isSelected
3208
+ })
3209
+ ),
3210
+ style: { fill: "var(--color-on-primary)" }
3211
+ }
3212
+ ),
3213
+ isFocusVisible && /* @__PURE__ */ jsxRuntime.jsx(
3214
+ "circle",
3215
+ {
3216
+ cx: "10",
3217
+ cy: "10",
3218
+ r: "13",
3219
+ fill: "none",
3220
+ stroke: "currentColor",
3221
+ strokeWidth: "2",
3222
+ className: "animate-pulse"
3223
+ }
3224
+ )
3225
+ ]
3226
+ }
3227
+ )
3228
+ ]
3229
+ }
3230
+ ),
3231
+ children && /* @__PURE__ */ jsxRuntime.jsx(
3232
+ "span",
3233
+ {
3234
+ className: cn(
3235
+ radioLabelVariants({
3236
+ disabled: finalIsDisabled
3237
+ })
3238
+ ),
3239
+ children
3240
+ }
3241
+ )
3242
+ ]
3243
+ }
3244
+ );
3245
+ }
3246
+ );
3247
+ Radio.displayName = "Radio";
3248
+ var RadioGroup = $3whtM$react.forwardRef(
3249
+ ({
3250
+ // Content props
3251
+ children,
3252
+ // State props
3253
+ orientation = "vertical",
3254
+ isInvalid = false,
3255
+ isDisabled = false,
3256
+ // Styling
3257
+ className,
3258
+ // Other props
3259
+ ...props
3260
+ }, ref) => {
3261
+ const htmlAttrs = props;
3262
+ const dataTestId = htmlAttrs["data-testid"];
3263
+ const { "data-testid": _dataTestId, ...restPropsWithoutHtmlAttrs } = props;
3264
+ if (process.env.NODE_ENV === "development") {
3265
+ const ariaProps = restPropsWithoutHtmlAttrs;
3266
+ if (!ariaProps.label && !ariaProps["aria-label"] && !ariaProps["aria-labelledby"]) {
3267
+ console.warn(
3268
+ "[RadioGroup] RadioGroup should have a label or aria-label for accessibility."
3269
+ );
3270
+ }
3271
+ }
3272
+ return /* @__PURE__ */ jsxRuntime.jsx(
3273
+ RadioGroupHeadless,
3274
+ {
3275
+ ...restPropsWithoutHtmlAttrs,
3276
+ isDisabled,
3277
+ ref,
3278
+ className: cn("flex flex-col", className),
3279
+ "data-testid": dataTestId,
3280
+ renderLabel: (labelProps) => /* @__PURE__ */ jsxRuntime.jsx(
3281
+ "div",
3282
+ {
3283
+ ...labelProps,
3284
+ className: cn(
3285
+ radioGroupLabelVariants({
3286
+ disabled: isDisabled
3287
+ })
3288
+ ),
3289
+ children: props.label
3290
+ }
3291
+ ),
3292
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3293
+ "div",
3294
+ {
3295
+ className: cn(
3296
+ radioGroupVariants({
3297
+ orientation,
3298
+ disabled: isDisabled
3299
+ })
3300
+ ),
3301
+ children
3302
+ }
3303
+ )
3304
+ }
3305
+ );
3306
+ }
3307
+ );
3308
+ RadioGroup.displayName = "RadioGroup";
3309
+ var RadioHeadless = $3whtM$react.forwardRef(
3310
+ ({ className, children, renderRadio, ...props }, forwardedRef) => {
3311
+ const state = $3whtM$react.useContext(RadioGroupContext);
3312
+ if (!state) {
3313
+ throw new Error("RadioHeadless must be used within a RadioGroupHeadless");
3314
+ }
3315
+ const internalRef = $3whtM$react.useRef(null);
3316
+ const ref = forwardedRef ?? internalRef;
3317
+ const { inputProps, isSelected, isDisabled, isPressed } = reactAria.useRadio(props, state, ref);
3318
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
3319
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className, children: [
3320
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ...inputProps, ...focusProps, ref }),
3321
+ renderRadio?.({
3322
+ isSelected,
3323
+ isDisabled,
3324
+ isFocusVisible,
3325
+ isPressed
3326
+ }),
3327
+ children
3328
+ ] });
3329
+ }
3330
+ );
3331
+ RadioHeadless.displayName = "RadioHeadless";
3332
+
3333
+ Object.defineProperty(exports, "argbFromHex", {
3334
+ enumerable: true,
3335
+ get: function () { return materialColorUtilities.argbFromHex; }
3336
+ });
3337
+ Object.defineProperty(exports, "hexFromArgb", {
3338
+ enumerable: true,
3339
+ get: function () { return materialColorUtilities.hexFromArgb; }
3340
+ });
3341
+ exports.Button = Button;
3342
+ exports.Checkbox = Checkbox;
3343
+ exports.FAB = FAB;
3344
+ exports.FABHeadless = FABHeadless;
3345
+ exports.IconButton = IconButton;
3346
+ exports.IconButtonHeadless = IconButtonHeadless;
3347
+ exports.Radio = Radio;
3348
+ exports.RadioGroup = RadioGroup;
3349
+ exports.RadioGroupHeadless = RadioGroupHeadless;
3350
+ exports.RadioHeadless = RadioHeadless;
3351
+ exports.STATE_LAYER_OPACITY = STATE_LAYER_OPACITY;
3352
+ exports.Switch = Switch;
3353
+ exports.TYPOGRAPHY_ELEMENT_MAP = TYPOGRAPHY_ELEMENT_MAP;
3354
+ exports.TYPOGRAPHY_USAGE = TYPOGRAPHY_USAGE;
3355
+ exports.TextField = TextField;
3356
+ exports.applyStateLayer = applyStateLayer;
3357
+ exports.cn = cn;
3358
+ exports.generateMD3Theme = generateMD3Theme;
3359
+ exports.getColorValue = getColorValue;
3360
+ exports.getFontFamily = getFontFamily;
3361
+ exports.getMD3Color = getMD3Color;
3362
+ exports.getResponsiveTypography = getResponsiveTypography;
3363
+ exports.getTypographyClassName = getTypographyClassName;
3364
+ exports.getTypographyForElement = getTypographyForElement;
3365
+ exports.getTypographyStyle = getTypographyStyle;
3366
+ exports.getTypographyToken = getTypographyToken;
3367
+ exports.hexToRgb = hexToRgb;
3368
+ exports.pxToRem = pxToRem;
3369
+ exports.remToPx = remToPx;
3370
+ exports.rgbToHex = rgbToHex;
3371
+ exports.truncateText = truncateText;
3372
+ exports.withOpacity = withOpacity;
3373
+ //# sourceMappingURL=index.cjs.map
3374
+ //# sourceMappingURL=index.cjs.map