@bug-on/m3-expressive 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/buttons.d.mts +3 -3
  3. package/dist/buttons.d.ts +3 -3
  4. package/dist/buttons.js +110 -91
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +110 -91
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/{core-Cckt8qEm.d.ts → core-DamhB5Yd.d.ts} +1 -1
  9. package/dist/{core-DDfG4pym.d.mts → core-Wsfqn9_N.d.mts} +1 -1
  10. package/dist/core.d.mts +2 -2
  11. package/dist/core.d.ts +2 -2
  12. package/dist/core.js +1 -1
  13. package/dist/core.js.map +1 -1
  14. package/dist/core.mjs +1 -1
  15. package/dist/core.mjs.map +1 -1
  16. package/dist/{fading-blur-mask--uZbBKLj.d.ts → fading-blur-mask-CX-bwjNU.d.mts} +6 -1
  17. package/dist/{fading-blur-mask--uZbBKLj.d.mts → fading-blur-mask-D57UMguz.d.ts} +6 -1
  18. package/dist/feedback.d.mts +17 -5
  19. package/dist/feedback.d.ts +17 -5
  20. package/dist/feedback.js +1 -1
  21. package/dist/feedback.js.map +1 -1
  22. package/dist/feedback.mjs +1 -1
  23. package/dist/feedback.mjs.map +1 -1
  24. package/dist/forms.d.mts +3 -3
  25. package/dist/forms.d.ts +3 -3
  26. package/dist/{icon-button-CxyJv7UV.d.mts → icon-button-BpX9_fwZ.d.mts} +1 -1
  27. package/dist/{icon-button-Di8VX6ou.d.ts → icon-button-DFXp9hze.d.ts} +1 -1
  28. package/dist/index.d.mts +9 -8
  29. package/dist/index.d.ts +9 -8
  30. package/dist/index.js +1098 -976
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.mjs +924 -802
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/layout.d.mts +92 -23
  35. package/dist/layout.d.ts +92 -23
  36. package/dist/layout.js +118 -13
  37. package/dist/layout.js.map +1 -1
  38. package/dist/layout.mjs +118 -15
  39. package/dist/layout.mjs.map +1 -1
  40. package/dist/md3-xBl4wgND.d.mts +44 -0
  41. package/dist/md3-xBl4wgND.d.ts +44 -0
  42. package/dist/navigation.d.mts +4 -4
  43. package/dist/navigation.d.ts +4 -4
  44. package/dist/navigation.js +1 -1
  45. package/dist/navigation.js.map +1 -1
  46. package/dist/navigation.mjs +1 -1
  47. package/dist/navigation.mjs.map +1 -1
  48. package/dist/overlays.d.mts +4 -4
  49. package/dist/overlays.d.ts +4 -4
  50. package/dist/overlays.js +1 -1
  51. package/dist/overlays.js.map +1 -1
  52. package/dist/overlays.mjs +1 -1
  53. package/dist/overlays.mjs.map +1 -1
  54. package/dist/pickers.js +1 -1
  55. package/dist/pickers.js.map +1 -1
  56. package/dist/pickers.mjs +1 -1
  57. package/dist/pickers.mjs.map +1 -1
  58. package/dist/shapes.d.mts +9 -2
  59. package/dist/shapes.d.ts +9 -2
  60. package/dist/{side-sheet-modal-Cw4vemKx.d.ts → side-sheet-modal-BfdgYjd3.d.ts} +1 -1
  61. package/dist/{side-sheet-modal-BycxrabB.d.mts → side-sheet-modal-kLfHINFZ.d.mts} +1 -1
  62. package/dist/{split-button-trailing-uncheckable-CGzk7KcG.d.ts → split-button-trailing-uncheckable-BpyIlOdn.d.ts} +7 -3
  63. package/dist/{split-button-trailing-uncheckable-gAz6OAIi.d.mts → split-button-trailing-uncheckable-CpT8iPpr.d.mts} +7 -3
  64. package/dist/{text-field-C0VQLp8Y.d.ts → text-field-Ct-LT_2T.d.ts} +1 -1
  65. package/dist/{text-field-B1fLh5Sh.d.mts → text-field-D5xiGn-q.d.mts} +1 -1
  66. package/llms-full.txt +18 -3
  67. package/llms.txt +4 -1
  68. package/package.json +1 -1
  69. package/dist/md3-BQhRygSi.d.mts +0 -31
  70. package/dist/md3-BQhRygSi.d.ts +0 -31
package/dist/shapes.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { M as MD3ShapeName, R as RoundedPolygon, a as CornerRounding, b as Cubic, e as MutableCubic } from './md3-expressive-shapes-wk_98LJh.mjs';
2
2
  export { A as ANGLE_EPSILON, C as CornerFeature, D as DISTANCE_EPSILON, E as EdgeFeature, F as FLOAT_PI, c as Feature, d as MD3Shapes, P as Point, f as PointTransformer, U as UNROUNDED, g as addPoints, h as clockwise, i as convex, j as cornerFeature, k as cornerRounding, l as directionVector, m as distance, n as distanceSquared, o as dividePoint, p as dotProduct, q as edgeFeature, r as formatCoordinate, s as getDirection, t as getDistance, u as getDistanceSquared, v as interpolate, w as lerpPoint, x as point, y as positiveModulo, z as radialToCartesian, B as rotate90, G as scalePoint, H as square, I as subtractPoints, J as transformFeature, K as transformPoint } from './md3-expressive-shapes-wk_98LJh.mjs';
3
3
  import { ReactNode, CSSProperties } from 'react';
4
+ import { a as MD3ColorToken } from './md3-xBl4wgND.mjs';
4
5
 
5
6
  /**
6
7
  * Material Design 3 Expressive — Shape Pairings & Families.
@@ -512,8 +513,14 @@ interface ShapeIconProps {
512
513
  className?: string;
513
514
  /** Inline styles. */
514
515
  style?: CSSProperties;
515
- /** Background color. Default: "currentColor". */
516
- color?: string;
516
+ /**
517
+ * Background color. Default: "currentColor".
518
+ *
519
+ * @example
520
+ * color="var(--md-sys-color-primary-container)"
521
+ * color="var(--md-sys-color-surface-container-high)"
522
+ */
523
+ color?: MD3ColorToken;
517
524
  /** ARIA label. */
518
525
  "aria-label"?: string;
519
526
  }
package/dist/shapes.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { M as MD3ShapeName, R as RoundedPolygon, a as CornerRounding, b as Cubic, e as MutableCubic } from './md3-expressive-shapes-wk_98LJh.js';
2
2
  export { A as ANGLE_EPSILON, C as CornerFeature, D as DISTANCE_EPSILON, E as EdgeFeature, F as FLOAT_PI, c as Feature, d as MD3Shapes, P as Point, f as PointTransformer, U as UNROUNDED, g as addPoints, h as clockwise, i as convex, j as cornerFeature, k as cornerRounding, l as directionVector, m as distance, n as distanceSquared, o as dividePoint, p as dotProduct, q as edgeFeature, r as formatCoordinate, s as getDirection, t as getDistance, u as getDistanceSquared, v as interpolate, w as lerpPoint, x as point, y as positiveModulo, z as radialToCartesian, B as rotate90, G as scalePoint, H as square, I as subtractPoints, J as transformFeature, K as transformPoint } from './md3-expressive-shapes-wk_98LJh.js';
3
3
  import { ReactNode, CSSProperties } from 'react';
4
+ import { a as MD3ColorToken } from './md3-xBl4wgND.js';
4
5
 
5
6
  /**
6
7
  * Material Design 3 Expressive — Shape Pairings & Families.
@@ -512,8 +513,14 @@ interface ShapeIconProps {
512
513
  className?: string;
513
514
  /** Inline styles. */
514
515
  style?: CSSProperties;
515
- /** Background color. Default: "currentColor". */
516
- color?: string;
516
+ /**
517
+ * Background color. Default: "currentColor".
518
+ *
519
+ * @example
520
+ * color="var(--md-sys-color-primary-container)"
521
+ * color="var(--md-sys-color-surface-container-high)"
522
+ */
523
+ color?: MD3ColorToken;
517
524
  /** ARIA label. */
518
525
  "aria-label"?: string;
519
526
  }
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as RadixDialog from '@radix-ui/react-dialog';
3
3
  import * as React$1 from 'react';
4
- import { B as BaseIconButtonProps } from './icon-button-Di8VX6ou.js';
4
+ import { B as BaseIconButtonProps } from './icon-button-DFXp9hze.js';
5
5
  import { MotionStyle, useMotionValue, useTransform } from 'motion/react';
6
6
  import { b as ScrollAreaProps } from './scroll-area-CVS6HyLl.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as RadixDialog from '@radix-ui/react-dialog';
3
3
  import * as React$1 from 'react';
4
- import { B as BaseIconButtonProps } from './icon-button-CxyJv7UV.mjs';
4
+ import { B as BaseIconButtonProps } from './icon-button-BpX9_fwZ.mjs';
5
5
  import { MotionStyle, useMotionValue, useTransform } from 'motion/react';
6
6
  import { b as ScrollAreaProps } from './scroll-area-CVS6HyLl.mjs';
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { HTMLMotionProps } from 'motion/react';
2
- import { M as MD3ColorStyle, b as MD3Size, a as MD3Shape } from './md3-BQhRygSi.js';
2
+ import { M as MD3ColorStyle, d as MD3Size, c as MD3Shape } from './md3-xBl4wgND.js';
3
3
  import * as React$1 from 'react';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
@@ -583,7 +583,10 @@ interface FABMenuProps {
583
583
  /** Custom CSS className for root component. */
584
584
  className?: string;
585
585
  /**
586
- * When `true`, clicking backdrop overlay closes menu.
586
+ * When `true`, clicking or tapping anywhere outside the FABMenu container closes the menu.
587
+ * Implemented via document-level pointer listeners (`mousedown` and `touchstart`)
588
+ * without rendering a blocking full-screen overlay, preserving hover and scroll
589
+ * interactions on background elements.
587
590
  * @default true
588
591
  */
589
592
  closeOnBackdropClick?: boolean;
@@ -695,10 +698,12 @@ declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, cla
695
698
  * Floating Action Button expansion menu. Toggling trigger button reveals vertically stacked action items.
696
699
  *
697
700
  * Full MD3 Accessibility implementation:
701
+ * - `role="group"` assigned to outer container with non-blocking click-outside detection
698
702
  * - `role="menu"` assigned to container
699
703
  * - `role="menuitem"` assigned to child action items
700
704
  * - Focus lifecycle management: Open -> Focus first/last menu item; Close -> Restore focus to ToggleFAB
701
705
  * - Keyboard navigation: Escape key closes menu, ArrowUp/Down navigates items, Tab moves focus.
706
+ * - Click outside: Automatically closes the menu when clicking or tapping outside without blocking background interactions.
702
707
  *
703
708
  * @example
704
709
  * ```tsx
@@ -716,7 +721,6 @@ declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, cla
716
721
  * aria-label="Quick actions"
717
722
  * alignment="center"
718
723
  * colorVariant="tertiary"
719
-
720
724
  * items={items}
721
725
  * />
722
726
  * ```
@@ -1,5 +1,5 @@
1
1
  import { HTMLMotionProps } from 'motion/react';
2
- import { M as MD3ColorStyle, b as MD3Size, a as MD3Shape } from './md3-BQhRygSi.mjs';
2
+ import { M as MD3ColorStyle, d as MD3Size, c as MD3Shape } from './md3-xBl4wgND.mjs';
3
3
  import * as React$1 from 'react';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
@@ -583,7 +583,10 @@ interface FABMenuProps {
583
583
  /** Custom CSS className for root component. */
584
584
  className?: string;
585
585
  /**
586
- * When `true`, clicking backdrop overlay closes menu.
586
+ * When `true`, clicking or tapping anywhere outside the FABMenu container closes the menu.
587
+ * Implemented via document-level pointer listeners (`mousedown` and `touchstart`)
588
+ * without rendering a blocking full-screen overlay, preserving hover and scroll
589
+ * interactions on background elements.
587
590
  * @default true
588
591
  */
589
592
  closeOnBackdropClick?: boolean;
@@ -695,10 +698,12 @@ declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, cla
695
698
  * Floating Action Button expansion menu. Toggling trigger button reveals vertically stacked action items.
696
699
  *
697
700
  * Full MD3 Accessibility implementation:
701
+ * - `role="group"` assigned to outer container with non-blocking click-outside detection
698
702
  * - `role="menu"` assigned to container
699
703
  * - `role="menuitem"` assigned to child action items
700
704
  * - Focus lifecycle management: Open -> Focus first/last menu item; Close -> Restore focus to ToggleFAB
701
705
  * - Keyboard navigation: Escape key closes menu, ArrowUp/Down navigates items, Tab moves focus.
706
+ * - Click outside: Automatically closes the menu when clicking or tapping outside without blocking background interactions.
702
707
  *
703
708
  * @example
704
709
  * ```tsx
@@ -716,7 +721,6 @@ declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, cla
716
721
  * aria-label="Quick actions"
717
722
  * alignment="center"
718
723
  * colorVariant="tertiary"
719
-
720
724
  * items={items}
721
725
  * />
722
726
  * ```
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
  import { M as MenuColorVariant, l as MenuVariant, p as VerticalMenuSeparatorStyle } from './menu-types-rZNQFO7Y.js';
5
- import { b as MD3Size } from './md3-BQhRygSi.js';
5
+ import { d as MD3Size } from './md3-xBl4wgND.js';
6
6
 
7
7
  /**
8
8
  * @file checkbox.tsx
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
  import { M as MenuColorVariant, l as MenuVariant, p as VerticalMenuSeparatorStyle } from './menu-types-rZNQFO7Y.mjs';
5
- import { b as MD3Size } from './md3-BQhRygSi.mjs';
5
+ import { d as MD3Size } from './md3-xBl4wgND.mjs';
6
6
 
7
7
  /**
8
8
  * @file checkbox.tsx
package/llms-full.txt CHANGED
@@ -132,7 +132,12 @@ Complex components use a structured compound pattern:
132
132
  - **SplitButton**: `SplitButtonLayout`, `SplitButtonLeading`, `SplitButtonTrailing` (or `SplitButtonTrailingUncheckable`).
133
133
  - **ButtonDistribute**: `ButtonDistribute` (`mode="dynamic" | "fixed" | "mixed"`), spring-animated button layout container for responsive action bars.
134
134
  - **Menu Family**: `Menu`, `MenuTrigger`, `MenuContent`, `MenuGroup`, `MenuItem`, `MenuDivider`, `SubMenu`. Features shape morphing (`12dp` standalone corners), `variant="expressive" | "baseline"`, `colorVariant="standard" | "vibrant"`, and `matchTriggerWidth`. Includes `ContextMenu` and static `VerticalMenu`.
135
- - **Select**: `Select` (Exposed Dropdown Menu & Autocomplete). Wraps `TextField` + `Menu`. Supports `searchable` (real-time filtering), controlled/uncontrolled state, and `onChange={(value, option) => void}`.
135
+ - **TextField**: Supports `filled` (default) and `outlined` variants, floating animated labels, `prefixText`/`suffixText`, `leadingIcon`, `trailingIconMode` (`"none" | "clear" | "password-toggle" | "custom"`), and `type="textarea"` with `autoResize`.
136
+ - **CRITICAL `onChange` Signature**: `onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void`.
137
+ - The 1st argument is always the extracted `value: string` (e.g. `onChange={(val) => setValue(val)}`).
138
+ - The 2nd argument is the native `event` (optional, for accessing event metadata).
139
+ - ❌ NEVER write `onChange={e => setValue(e.target.value)}` — because `e` is already the `string`, accessing `e.target` causes `TypeError: Cannot read properties of undefined (reading 'value')`.
140
+ - **Select**: `Select` (Exposed Dropdown Menu & Autocomplete). Wraps `TextField` + `Menu`. Supports `searchable` (real-time filtering), controlled/uncontrolled state, and `onChange={(value: string, option?: SelectOption) => void}`.
136
141
 
137
142
  ### 7.2 Navigation Customization
138
143
  - **NavigationBar & NavigationRail**: Support customizable `itemShape` (`"pill" | "circle" | "rounded-rectangle"`), `labelVisibility` (`"labeled" | "auto" | "unlabeled"`), and `fabAlignment` (`"left" | "center"`).
@@ -163,6 +168,14 @@ const state = useDatePickerState({ initialSelectedDateMs: Date.now() });
163
168
  <DatePicker state={state} />
164
169
  ```
165
170
 
171
+ ### 7.5 Card Component & Morphing Border Radius
172
+ `Card` (`@bug-on/m3-expressive/layout`) supports static (`<div>`), link (`<m.a>`), and button (`<m.button>`) modes with ripple and elevation physics.
173
+ - **Morphing Border Radius (`morphRadius`)**: Dynamically animates `borderRadius` on hover/press using MD3 spatial spring physics (`framerSprings.fast.spatial`).
174
+ - `morphRadius={true}`: Default rest `large` (16px) -> hover `extraLarge` (28px).
175
+ - `morphRadius={{ rest: "medium", hover: "full", pressed: "small" }}`: Granular configuration with preset levels (`MorphRadiusLevel`) or raw numbers (px).
176
+ - Only active on interactive cards by default (`onClick`, `href`, `interactive`).
177
+ - Static cards can opt-in by setting `forceMotion={true}` alongside `morphRadius`.
178
+
166
179
  ---
167
180
 
168
181
  # PART 2: Styling & Design Tokens
@@ -249,8 +262,8 @@ import {
249
262
  | `<Button variant="toggle">` (without `selected`) | Must pass both `variant="toggle"` and `selected={boolean}` |
250
263
  | `<IconButton>` (without `aria-label`) | `aria-label` is required on icon buttons for accessibility |
251
264
  | Manually writing flex math for responsive action bars | Use `<ButtonDistribute mode="dynamic">` for spring-animated responsive width distribution |
252
- | `onChange={e => setValue(e.target.value)}` on TextField | `onChange={(value) => setValue(value)}` (first argument is a string) |
253
- | `Select` `onChange` assuming standard React `SyntheticEvent` | Signature is `onChange={(value: string, option?: SelectOption) => void}` |
265
+ | `onChange={e => setValue(e.target.value)}` on TextField | `onChange={(value) => setValue(value)}` 1st arg is pre-extracted `string`, 2nd arg is optional `event`. Accessing `e.target.value` throws TypeError! |
266
+ | `Select` `onChange` assuming standard React `SyntheticEvent` | Signature is `onChange={(value: string, option?: SelectOption) => void}` (1st arg is `value: string`) |
254
267
  | `<TabsList>` (without `variant`) | `variant` prop is required on `TabsList` (`"primary"` or `"secondary"`) |
255
268
  | Using `useSnackbar()` outside `MD3ThemeProvider` or `SnackbarProvider` | Ensure provider wraps the tree with `enableSnackbar` |
256
269
  | `<DatePicker />` or `<TimePicker />` without `state` prop | Always create state via `useDatePickerState()` or `useTimePickerState()` |
@@ -264,3 +277,5 @@ import {
264
277
  | `<DialogContent>` needing full custom close button | Use `closeButton={<YourNode />}` — library auto-wraps in `DialogClose asChild`. When provided, `hideCloseButton` and `closeButtonProps` are ignored |
265
278
  | `<DialogFullScreenContent>` action/close disabled during submit | Use `actionButtonProps={{ disabled: isSubmitting }}` and `closeButtonProps={{ disabled: isSubmitting }}` |
266
279
  | Building a custom header with `DialogContent` just to control close button style | Use `closeButtonProps={{ colorStyle: "standard" }}` (default) or `"filled"` to override. Only use `hideCloseButton` + custom header when layout positioning is the actual requirement |
280
+ | Expecting `morphRadius` to animate on static `<Card>` without interaction | Static cards render a plain `<div>`. Pass `forceMotion={true}` to promote it to `<m.div>` and enable morph radius animation |
281
+
package/llms.txt CHANGED
@@ -77,10 +77,13 @@ function Root({ children }: { children: React.ReactNode }) {
77
77
  - **Physics Springs**: Powered by `motion/react` (Framer Motion ≥12). Uses spatial (`FAST_SPATIAL_SPRING`, `DEFAULT_SPATIAL_SPRING`) and effects (`FAST_EFFECTS_SPRING`) springs.
78
78
  - **Polymorphism (`asChild`)**: Supported across buttons, cards, drawers, and dialog triggers for custom routing links.
79
79
  - **Hoisted State**: `DatePicker` and `TimePicker` are stateless and require `useDatePickerState()` / `useTimePickerState()`.
80
- - **TextField & Select onChange**: Parameter signature receives `(value: string)` — NOT a raw React SyntheticEvent. `Select` returns `(value: string, option?: SelectOption)`.
80
+ - **TextField & Select onChange**: Parameter signature receives `(value: string)` as the 1st argument — NOT a raw React SyntheticEvent!
81
+ - `TextField`: `onChange?: (value: string, event: React.ChangeEvent<...>) => void` (write `onChange={(val) => ...}`, NEVER `e.target.value` which throws `TypeError`).
82
+ - `Select`: `onChange?: (value: string, option?: SelectOption) => void`.
81
83
  - **Select & Exposed Dropdowns**: `Select` supports standard dropdown and `searchable` autocomplete mode with real-time option filtering and `matchTriggerWidth` (default `true`).
82
84
  - **Menu Family & Morphing**: `Menu`, `ContextMenu`, and `VerticalMenu` feature container shape morphing (`12dp` standalone corners). `MenuContent` `matchTriggerWidth` matches popover width to trigger.
83
85
  - **ProgressIndicator & Wavy Motion**: Supports `"linear"` and `"circular"` variants with dynamic `"wavy"` shapes (`shape="wavy"`, `trackShape`, `amplitude`, `wavelength`). `aria-label` is strictly **required**. Indeterminate mode is triggered by omitting the `value` prop (do not use `max` prop). Supports co-elastic animations (`determinateAnimation`, `indeterminateAnimation`) and track stop dots (`showStopIndicator`).
86
+ - **Card & Morphing Border Radius**: Interactive cards support spring-animated border radius morphing on hover/tap via `morphRadius` (default: `16px` rest -> `28px` hover). Static cards can opt-in using `forceMotion={true}`. Configurable via preset tokens (`"large"`, `"extraLarge"`, etc.) or custom numeric px.
84
87
 
85
88
  ---
86
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bug-on/m3-expressive",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Material Design 3 Expressive React components",
5
5
  "author": "Bug On",
6
6
  "license": "MIT",
@@ -1,31 +0,0 @@
1
- import { ElementType, ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef } from 'react';
2
-
3
- /** MD3 button color variants */
4
- type MD3ColorStyle = "elevated" | "filled" | "tonal" | "outlined" | "text"
5
- /** High-chroma tertiary tone — for hero accents, CTAs, expressive moments. */
6
- | "tertiary"
7
- /** Brand-stable primary fixed — same hue across light/dark, for badges/pills. */
8
- | "primary-fixed"
9
- /** Brand-stable tertiary fixed — same hue across light/dark, for special states. */
10
- | "tertiary-fixed";
11
- /** MD3 Expressive button sizes */
12
- type MD3Size = "xs" | "sm" | "md" | "lg" | "xl";
13
- /**
14
- * MD3 Expressive slot width ratio.
15
- * Used for icon buttons where width is independent from the size scale.
16
- * - `"narrow"` – compressed width for dense toolbars.
17
- * - `"default"` – 1:1 square/round aspect ratio.
18
- * - `"wide"` – extended width.
19
- */
20
- type MD3SlotWidth = "narrow" | "default" | "wide";
21
- /** MD3 shape families */
22
- type MD3Shape = "round" | "square";
23
- /** Helper: PolyMorphic component ref */
24
- type PolymorphicRef<C extends ElementType> = ComponentPropsWithRef<C>["ref"];
25
- /** Helper: Props cho polymorphic components */
26
- type PolymorphicProps<C extends ElementType, Props = object> = Props & Omit<ComponentPropsWithoutRef<C>, keyof Props> & {
27
- as?: C;
28
- children?: ReactNode;
29
- };
30
-
31
- export type { MD3ColorStyle as M, PolymorphicProps as P, MD3Shape as a, MD3Size as b, PolymorphicRef as c, MD3SlotWidth as d };
@@ -1,31 +0,0 @@
1
- import { ElementType, ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef } from 'react';
2
-
3
- /** MD3 button color variants */
4
- type MD3ColorStyle = "elevated" | "filled" | "tonal" | "outlined" | "text"
5
- /** High-chroma tertiary tone — for hero accents, CTAs, expressive moments. */
6
- | "tertiary"
7
- /** Brand-stable primary fixed — same hue across light/dark, for badges/pills. */
8
- | "primary-fixed"
9
- /** Brand-stable tertiary fixed — same hue across light/dark, for special states. */
10
- | "tertiary-fixed";
11
- /** MD3 Expressive button sizes */
12
- type MD3Size = "xs" | "sm" | "md" | "lg" | "xl";
13
- /**
14
- * MD3 Expressive slot width ratio.
15
- * Used for icon buttons where width is independent from the size scale.
16
- * - `"narrow"` – compressed width for dense toolbars.
17
- * - `"default"` – 1:1 square/round aspect ratio.
18
- * - `"wide"` – extended width.
19
- */
20
- type MD3SlotWidth = "narrow" | "default" | "wide";
21
- /** MD3 shape families */
22
- type MD3Shape = "round" | "square";
23
- /** Helper: PolyMorphic component ref */
24
- type PolymorphicRef<C extends ElementType> = ComponentPropsWithRef<C>["ref"];
25
- /** Helper: Props cho polymorphic components */
26
- type PolymorphicProps<C extends ElementType, Props = object> = Props & Omit<ComponentPropsWithoutRef<C>, keyof Props> & {
27
- as?: C;
28
- children?: ReactNode;
29
- };
30
-
31
- export type { MD3ColorStyle as M, PolymorphicProps as P, MD3Shape as a, MD3Size as b, PolymorphicRef as c, MD3SlotWidth as d };