@bug-on/m3-expressive 1.2.0 → 1.2.2

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 (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/buttons.d.mts +26 -5
  3. package/dist/buttons.d.ts +26 -5
  4. package/dist/buttons.js +1074 -765
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +1066 -765
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/core.js +133 -69
  9. package/dist/core.js.map +1 -1
  10. package/dist/core.mjs +133 -69
  11. package/dist/core.mjs.map +1 -1
  12. package/dist/feedback.js +132 -69
  13. package/dist/feedback.js.map +1 -1
  14. package/dist/feedback.mjs +132 -69
  15. package/dist/feedback.mjs.map +1 -1
  16. package/dist/forms.d.mts +2 -2
  17. package/dist/forms.d.ts +2 -2
  18. package/dist/forms.js +74 -9
  19. package/dist/forms.js.map +1 -1
  20. package/dist/forms.mjs +74 -9
  21. package/dist/forms.mjs.map +1 -1
  22. package/dist/{icon-button-D-gs0gfj.d.mts → icon-button-CSsDmuQC.d.mts} +19 -0
  23. package/dist/{icon-button-D-gs0gfj.d.ts → icon-button-CSsDmuQC.d.ts} +19 -0
  24. package/dist/index.d.mts +4 -4
  25. package/dist/index.d.ts +4 -4
  26. package/dist/index.js +2204 -1464
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +2056 -1324
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/layout.d.mts +18 -1
  31. package/dist/layout.d.ts +18 -1
  32. package/dist/layout.js +80 -15
  33. package/dist/layout.js.map +1 -1
  34. package/dist/layout.mjs +80 -15
  35. package/dist/layout.mjs.map +1 -1
  36. package/dist/navigation.d.mts +134 -9
  37. package/dist/navigation.d.ts +134 -9
  38. package/dist/navigation.js +461 -101
  39. package/dist/navigation.js.map +1 -1
  40. package/dist/navigation.mjs +455 -102
  41. package/dist/navigation.mjs.map +1 -1
  42. package/dist/overlays.js +261 -197
  43. package/dist/overlays.js.map +1 -1
  44. package/dist/overlays.mjs +223 -159
  45. package/dist/overlays.mjs.map +1 -1
  46. package/dist/pickers.js +392 -301
  47. package/dist/pickers.js.map +1 -1
  48. package/dist/pickers.mjs +361 -270
  49. package/dist/pickers.mjs.map +1 -1
  50. package/dist/{split-button-trailing-uncheckable-BkPbiBo3.d.ts → split-button-trailing-uncheckable-C-qQlyZx.d.ts} +118 -25
  51. package/dist/{split-button-trailing-uncheckable-D_PLPb-u.d.mts → split-button-trailing-uncheckable-DHJqNeq_.d.mts} +118 -25
  52. package/dist/{text-field-eAIpz9z1.d.mts → text-field-T4Rg-9Bw.d.mts} +7 -0
  53. package/dist/{text-field-eAIpz9z1.d.ts → text-field-T4Rg-9Bw.d.ts} +7 -0
  54. package/package.json +3 -3
@@ -37,6 +37,10 @@ interface BaseButtonProps extends MotionButtonProps$3 {
37
37
  * An optional icon to display alongside the label.
38
38
  */
39
39
  icon?: React.ReactNode;
40
+ /**
41
+ * An optional icon to display when the button is in a selected toggle state (`variant="toggle"` and `selected={true}`).
42
+ */
43
+ selectedIcon?: React.ReactNode;
40
44
  /**
41
45
  * Position of the icon relative to the label.
42
46
  * @default "leading"
@@ -200,7 +204,76 @@ declare const BUTTON_COLOR_TOKENS: {
200
204
  };
201
205
  };
202
206
 
203
- type ButtonGroupVariant = "standard" | "connected" | "navbar";
207
+ type DistributeMode = "fixed" | "dynamic" | "mixed";
208
+ interface ButtonDistributeProps extends React$1.HTMLAttributes<HTMLFieldSetElement> {
209
+ /**
210
+ * Distribution mode:
211
+ * - `fixed`: Buttons maintain fixed base size, morph and compress neighbors on press/interaction.
212
+ * - `dynamic`: Group fills 100% container width, expanding active button and shrinking neighbors proportionally.
213
+ * - `mixed`: Leading/trailing buttons remain fixed size, center button(s) flex: 1.
214
+ * @default "dynamic"
215
+ */
216
+ mode?: DistributeMode;
217
+ /**
218
+ * Custom weight ratios for children in `dynamic` mode (e.g. `[1, 2, 1]` for Prev:Play:Next).
219
+ * If omitted, defaults to `[1, 2, 1]` for 3 children, or equal weights `[1, 1, ..., 1]`.
220
+ */
221
+ weights?: number[];
222
+ /**
223
+ * Expansion factor added to active item weight in `dynamic` mode.
224
+ * @default 0.3
225
+ */
226
+ expandRatio?: number;
227
+ /**
228
+ * Controls whether hover state triggers button expansion in `dynamic` mode.
229
+ * Focus and Active/Press always trigger expansion regardless of this prop.
230
+ * @default false
231
+ */
232
+ expandOnHover?: boolean;
233
+ /**
234
+ * Fixed size (width in px or CSS string) for leading/trailing buttons in `mixed` mode,
235
+ * or base size override in `fixed` mode.
236
+ * @default 48
237
+ */
238
+ fixedSize?: number | string;
239
+ /**
240
+ * Explicit fixed size for leading button in `mixed` mode. Overrides `fixedSize` if set.
241
+ */
242
+ leadingSize?: number | string;
243
+ /**
244
+ * Explicit fixed size for trailing button in `mixed` mode. Overrides `fixedSize` if set.
245
+ */
246
+ trailingSize?: number | string;
247
+ /**
248
+ * Gap spacing between buttons in group.
249
+ * @default "0.5rem" (8px)
250
+ */
251
+ gap?: string | number;
252
+ /**
253
+ * Applied size token to all child buttons in group if not specified on child.
254
+ * @default "sm"
255
+ */
256
+ size?: MD3Size;
257
+ /**
258
+ * Custom CSS class applied to button wrappers inside the group.
259
+ */
260
+ itemClassName?: string;
261
+ /**
262
+ * Child button elements (Button, IconButton, etc.).
263
+ */
264
+ children: React$1.ReactNode;
265
+ }
266
+
267
+ /**
268
+ * @file button-distribute.tsx
269
+ *
270
+ * MD3 Expressive ButtonDistribute component.
271
+ * Flexible Button Group with Expressive Motion & Size Distribution (Fixed, Dynamic, Mixed).
272
+ */
273
+
274
+ declare const ButtonDistribute: React$1.ForwardRefExoticComponent<ButtonDistributeProps & React$1.RefAttributes<HTMLFieldSetElement>>;
275
+
276
+ type ButtonGroupVariant = "standard" | "connected";
204
277
  type ButtonGroupOrientation = "horizontal" | "vertical";
205
278
  /**
206
279
  * Props for ButtonGroup component.
@@ -210,7 +283,6 @@ interface ButtonGroupProps extends React$1.FieldsetHTMLAttributes<HTMLFieldSetEl
210
283
  * Display variant of the button group:
211
284
  * - `standard`: Independent buttons with gap spacing.
212
285
  * - `connected`: Connected buttons sharing borders (Segmented Button).
213
- * - `navbar`: Navigation bar variant with animated active sliding indicator pill.
214
286
  * @default "standard"
215
287
  */
216
288
  variant?: ButtonGroupVariant;
@@ -228,47 +300,28 @@ interface ButtonGroupProps extends React$1.FieldsetHTMLAttributes<HTMLFieldSetEl
228
300
  * Applies unified `size` to all child buttons in group (overrides individual button sizes).
229
301
  */
230
302
  size?: MD3Size;
231
- /**
232
- * Toggles width expansion/padding animation (Morphing Width) when buttons are pressed (`standard` group).
233
- * @default true
234
- */
235
- morphingWidth?: boolean;
236
- /**
237
- * Expansion ratio for button width on press (`standard` horizontal group).
238
- * Per MD3 Spec, default is 0.15 (15%).
239
- * @default 0.15
240
- */
241
- expandedRatio?: number;
242
303
  /**
243
304
  * Automatically displays Check icon when a child button has `selected={true}`.
244
305
  * @default false
245
306
  */
246
307
  showCheck?: boolean;
247
308
  /**
248
- * Controls icon display behavior (primarily for `navbar`).
309
+ * Controls icon display behavior.
249
310
  * - `selected`: Display icon only on selected item.
250
311
  * - `all`: Display on all items.
251
312
  * - `none`: Hide all icons.
252
313
  */
253
314
  iconBehavior?: "selected" | "all" | "none";
254
315
  /**
255
- * Controls label display behavior (primarily for `navbar`).
316
+ * Controls label display behavior.
256
317
  * - `selected`: Display label only on selected item.
257
318
  * - `all`: Display on all items.
258
319
  * - `none`: Hide all labels.
259
320
  */
260
321
  labelBehavior?: "selected" | "all" | "none";
261
- /**
262
- * Enable Active Morphing mode (selection-based).
263
- * When `true`, buttons automatically expand/contract based on selection state,
264
- * creating smooth size transitions.
265
- * When `false` or `undefined`, Group responds to `isPressed` by default.
266
- */
267
- activeMorphing?: boolean;
268
322
  /**
269
323
  * Custom CSS class applied to individual child buttons in group.
270
324
  * Useful for customizing padding, min-width, or other layout properties.
271
- * For `navbar` variant, overrides default padding styles.
272
325
  */
273
326
  itemClassName?: string;
274
327
  }
@@ -310,6 +363,13 @@ interface ExtendedFABProps extends MotionButtonProps$2 {
310
363
  onCollapsedChange?: (collapsed: boolean) => void;
311
364
  /** Layout ID for Framer Motion Container Transform transitions. */
312
365
  layoutId?: string;
366
+ /**
367
+ * Change the component to the underlying child element and merge props/behavior.
368
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
369
+ * @default false
370
+ */
371
+ asChild?: boolean;
372
+ children?: React$1.ReactNode;
313
373
  }
314
374
  declare const ExtendedFAB: React$1.NamedExoticComponent<Omit<ExtendedFABProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
315
375
 
@@ -376,6 +436,12 @@ interface FABProps extends MotionButtonProps$1 {
376
436
  * @default true
377
437
  */
378
438
  visible?: boolean;
439
+ /**
440
+ * Change the component to the underlying child element and merge props/behavior.
441
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
442
+ * @default false
443
+ */
444
+ asChild?: boolean;
379
445
  }
380
446
  /**
381
447
  * Props for `FABPosition` layout wrapper component.
@@ -576,6 +642,13 @@ interface FABMenuItemProps {
576
642
  totalItems?: number;
577
643
  /** Logic `tabIndex` value for manual keyboard navigation. */
578
644
  tabIndex?: number;
645
+ /**
646
+ * Change the component to the underlying child element and merge props/behavior.
647
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
648
+ * @default false
649
+ */
650
+ asChild?: boolean;
651
+ children?: React$1.ReactNode;
579
652
  }
580
653
  /**
581
654
  * Toggle FAB button (Morphing FAB) usable as standalone or trigger for `FABMenu`.
@@ -607,7 +680,7 @@ declare const ToggleFAB: React$1.NamedExoticComponent<ToggleFABProps & React$1.R
607
680
  * Disabled items use `aria-disabled="true"` rather than native HTML `disabled`
608
681
  * so they remain focusable in the tab sequence per MD3 specification.
609
682
  */
610
- declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, className, tabIndex, }: FABMenuItemProps): react_jsx_runtime.JSX.Element;
683
+ declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, className, tabIndex, asChild, children, }: FABMenuItemProps): react_jsx_runtime.JSX.Element;
611
684
  /**
612
685
  * MD3 Expressive FAB Menu.
613
686
  *
@@ -700,6 +773,12 @@ interface SplitButtonLeadingProps extends MotionButtonProps {
700
773
  children?: React.ReactNode;
701
774
  disabled?: boolean;
702
775
  className?: string;
776
+ /**
777
+ * Change the component to the underlying child element and merge props/behavior.
778
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
779
+ * @default false
780
+ */
781
+ asChild?: boolean;
703
782
  }
704
783
  interface SplitButtonTrailingProps extends Omit<MotionButtonProps, "onChange" | "color" | "children"> {
705
784
  variant?: SplitButtonVariant;
@@ -715,6 +794,13 @@ interface SplitButtonTrailingProps extends Omit<MotionButtonProps, "onChange" |
715
794
  /** ID of controlled menu element */
716
795
  "aria-controls"?: string;
717
796
  className?: string;
797
+ /**
798
+ * Change the component to the underlying child element and merge props/behavior.
799
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
800
+ * @default false
801
+ */
802
+ asChild?: boolean;
803
+ children?: React.ReactNode;
718
804
  }
719
805
  interface SplitButtonTrailingUncheckableProps extends Omit<MotionButtonProps, "color" | "children"> {
720
806
  variant?: SplitButtonVariant;
@@ -723,6 +809,13 @@ interface SplitButtonTrailingUncheckableProps extends Omit<MotionButtonProps, "c
723
809
  disabled?: boolean;
724
810
  "aria-label": string;
725
811
  className?: string;
812
+ /**
813
+ * Change the component to the underlying child element and merge props/behavior.
814
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
815
+ * @default false
816
+ */
817
+ asChild?: boolean;
818
+ children?: React.ReactNode;
726
819
  }
727
820
 
728
821
  declare const SplitButtonLayout: React$1.NamedExoticComponent<SplitButtonLayoutProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -745,4 +838,4 @@ declare const TonalSplitButtonTrailingUncheckable: React$1.ForwardRefExoticCompo
745
838
  declare const ElevatedSplitButtonTrailingUncheckable: React$1.ForwardRefExoticComponent<Omit<Omit<SplitButtonTrailingUncheckableProps, "variant">, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
746
839
  declare const OutlinedSplitButtonTrailingUncheckable: React$1.ForwardRefExoticComponent<Omit<Omit<SplitButtonTrailingUncheckableProps, "variant">, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
747
840
 
748
- export { SplitButtonLeading as A, BUTTON_COLOR_TOKENS as B, type SplitButtonLeadingProps as C, type SplitButtonSize as D, ElevatedSplitButtonLeading as E, FAB as F, SplitButtonTrailing as G, type SplitButtonTrailingProps as H, SplitButtonTrailingUncheckable as I, type SplitButtonTrailingUncheckableProps as J, type SplitButtonVariant as K, type ToggleFABProps as L, TonalSplitButtonLeading as M, TonalSplitButtonTrailing as N, OutlinedSplitButtonLeading as O, TonalSplitButtonTrailingUncheckable as P, type SplitButtonSizeTokens as Q, SplitButtonLayout as S, ToggleFAB as T, BUTTON_SIZE_TOKENS as a, type BaseButtonProps as b, Button as c, ButtonGroup as d, type ButtonGroupOrientation as e, type ButtonGroupProps as f, type ButtonGroupVariant as g, type ButtonProps as h, ElevatedSplitButtonTrailing as i, ElevatedSplitButtonTrailingUncheckable as j, ExtendedFAB as k, type ExtendedFABProps as l, FABMenu as m, FABMenuItem as n, type FABMenuItemData as o, type FABMenuItemProps as p, type FABMenuProps as q, FABPosition as r, type FABPositionProps as s, type FABProps as t, FilledSplitButtonLeading as u, FilledSplitButtonTrailing as v, FilledSplitButtonTrailingUncheckable as w, OutlinedSplitButtonTrailing as x, OutlinedSplitButtonTrailingUncheckable as y, type SplitButtonLayoutProps as z };
841
+ export { OutlinedSplitButtonTrailingUncheckable as A, BUTTON_COLOR_TOKENS as B, type SplitButtonLayoutProps as C, type DistributeMode as D, ElevatedSplitButtonLeading as E, FAB as F, SplitButtonLeading as G, type SplitButtonLeadingProps as H, type SplitButtonSize as I, SplitButtonTrailing as J, type SplitButtonTrailingProps as K, SplitButtonTrailingUncheckable as L, type SplitButtonTrailingUncheckableProps as M, type SplitButtonVariant as N, OutlinedSplitButtonLeading as O, type ToggleFABProps as P, TonalSplitButtonLeading as Q, TonalSplitButtonTrailing as R, SplitButtonLayout as S, ToggleFAB as T, TonalSplitButtonTrailingUncheckable as U, type SplitButtonSizeTokens as V, BUTTON_SIZE_TOKENS as a, type BaseButtonProps as b, Button as c, ButtonDistribute as d, type ButtonDistributeProps as e, ButtonGroup as f, type ButtonGroupOrientation as g, type ButtonGroupProps as h, type ButtonGroupVariant as i, type ButtonProps as j, ElevatedSplitButtonTrailing as k, ElevatedSplitButtonTrailingUncheckable as l, ExtendedFAB as m, type ExtendedFABProps as n, FABMenu as o, FABMenuItem as p, type FABMenuItemData as q, type FABMenuItemProps as r, type FABMenuProps as s, FABPosition as t, type FABPositionProps as u, type FABProps as v, FilledSplitButtonLeading as w, FilledSplitButtonTrailing as x, FilledSplitButtonTrailingUncheckable as y, OutlinedSplitButtonTrailing as z };
@@ -37,6 +37,10 @@ interface BaseButtonProps extends MotionButtonProps$3 {
37
37
  * An optional icon to display alongside the label.
38
38
  */
39
39
  icon?: React.ReactNode;
40
+ /**
41
+ * An optional icon to display when the button is in a selected toggle state (`variant="toggle"` and `selected={true}`).
42
+ */
43
+ selectedIcon?: React.ReactNode;
40
44
  /**
41
45
  * Position of the icon relative to the label.
42
46
  * @default "leading"
@@ -200,7 +204,76 @@ declare const BUTTON_COLOR_TOKENS: {
200
204
  };
201
205
  };
202
206
 
203
- type ButtonGroupVariant = "standard" | "connected" | "navbar";
207
+ type DistributeMode = "fixed" | "dynamic" | "mixed";
208
+ interface ButtonDistributeProps extends React$1.HTMLAttributes<HTMLFieldSetElement> {
209
+ /**
210
+ * Distribution mode:
211
+ * - `fixed`: Buttons maintain fixed base size, morph and compress neighbors on press/interaction.
212
+ * - `dynamic`: Group fills 100% container width, expanding active button and shrinking neighbors proportionally.
213
+ * - `mixed`: Leading/trailing buttons remain fixed size, center button(s) flex: 1.
214
+ * @default "dynamic"
215
+ */
216
+ mode?: DistributeMode;
217
+ /**
218
+ * Custom weight ratios for children in `dynamic` mode (e.g. `[1, 2, 1]` for Prev:Play:Next).
219
+ * If omitted, defaults to `[1, 2, 1]` for 3 children, or equal weights `[1, 1, ..., 1]`.
220
+ */
221
+ weights?: number[];
222
+ /**
223
+ * Expansion factor added to active item weight in `dynamic` mode.
224
+ * @default 0.3
225
+ */
226
+ expandRatio?: number;
227
+ /**
228
+ * Controls whether hover state triggers button expansion in `dynamic` mode.
229
+ * Focus and Active/Press always trigger expansion regardless of this prop.
230
+ * @default false
231
+ */
232
+ expandOnHover?: boolean;
233
+ /**
234
+ * Fixed size (width in px or CSS string) for leading/trailing buttons in `mixed` mode,
235
+ * or base size override in `fixed` mode.
236
+ * @default 48
237
+ */
238
+ fixedSize?: number | string;
239
+ /**
240
+ * Explicit fixed size for leading button in `mixed` mode. Overrides `fixedSize` if set.
241
+ */
242
+ leadingSize?: number | string;
243
+ /**
244
+ * Explicit fixed size for trailing button in `mixed` mode. Overrides `fixedSize` if set.
245
+ */
246
+ trailingSize?: number | string;
247
+ /**
248
+ * Gap spacing between buttons in group.
249
+ * @default "0.5rem" (8px)
250
+ */
251
+ gap?: string | number;
252
+ /**
253
+ * Applied size token to all child buttons in group if not specified on child.
254
+ * @default "sm"
255
+ */
256
+ size?: MD3Size;
257
+ /**
258
+ * Custom CSS class applied to button wrappers inside the group.
259
+ */
260
+ itemClassName?: string;
261
+ /**
262
+ * Child button elements (Button, IconButton, etc.).
263
+ */
264
+ children: React$1.ReactNode;
265
+ }
266
+
267
+ /**
268
+ * @file button-distribute.tsx
269
+ *
270
+ * MD3 Expressive ButtonDistribute component.
271
+ * Flexible Button Group with Expressive Motion & Size Distribution (Fixed, Dynamic, Mixed).
272
+ */
273
+
274
+ declare const ButtonDistribute: React$1.ForwardRefExoticComponent<ButtonDistributeProps & React$1.RefAttributes<HTMLFieldSetElement>>;
275
+
276
+ type ButtonGroupVariant = "standard" | "connected";
204
277
  type ButtonGroupOrientation = "horizontal" | "vertical";
205
278
  /**
206
279
  * Props for ButtonGroup component.
@@ -210,7 +283,6 @@ interface ButtonGroupProps extends React$1.FieldsetHTMLAttributes<HTMLFieldSetEl
210
283
  * Display variant of the button group:
211
284
  * - `standard`: Independent buttons with gap spacing.
212
285
  * - `connected`: Connected buttons sharing borders (Segmented Button).
213
- * - `navbar`: Navigation bar variant with animated active sliding indicator pill.
214
286
  * @default "standard"
215
287
  */
216
288
  variant?: ButtonGroupVariant;
@@ -228,47 +300,28 @@ interface ButtonGroupProps extends React$1.FieldsetHTMLAttributes<HTMLFieldSetEl
228
300
  * Applies unified `size` to all child buttons in group (overrides individual button sizes).
229
301
  */
230
302
  size?: MD3Size;
231
- /**
232
- * Toggles width expansion/padding animation (Morphing Width) when buttons are pressed (`standard` group).
233
- * @default true
234
- */
235
- morphingWidth?: boolean;
236
- /**
237
- * Expansion ratio for button width on press (`standard` horizontal group).
238
- * Per MD3 Spec, default is 0.15 (15%).
239
- * @default 0.15
240
- */
241
- expandedRatio?: number;
242
303
  /**
243
304
  * Automatically displays Check icon when a child button has `selected={true}`.
244
305
  * @default false
245
306
  */
246
307
  showCheck?: boolean;
247
308
  /**
248
- * Controls icon display behavior (primarily for `navbar`).
309
+ * Controls icon display behavior.
249
310
  * - `selected`: Display icon only on selected item.
250
311
  * - `all`: Display on all items.
251
312
  * - `none`: Hide all icons.
252
313
  */
253
314
  iconBehavior?: "selected" | "all" | "none";
254
315
  /**
255
- * Controls label display behavior (primarily for `navbar`).
316
+ * Controls label display behavior.
256
317
  * - `selected`: Display label only on selected item.
257
318
  * - `all`: Display on all items.
258
319
  * - `none`: Hide all labels.
259
320
  */
260
321
  labelBehavior?: "selected" | "all" | "none";
261
- /**
262
- * Enable Active Morphing mode (selection-based).
263
- * When `true`, buttons automatically expand/contract based on selection state,
264
- * creating smooth size transitions.
265
- * When `false` or `undefined`, Group responds to `isPressed` by default.
266
- */
267
- activeMorphing?: boolean;
268
322
  /**
269
323
  * Custom CSS class applied to individual child buttons in group.
270
324
  * Useful for customizing padding, min-width, or other layout properties.
271
- * For `navbar` variant, overrides default padding styles.
272
325
  */
273
326
  itemClassName?: string;
274
327
  }
@@ -310,6 +363,13 @@ interface ExtendedFABProps extends MotionButtonProps$2 {
310
363
  onCollapsedChange?: (collapsed: boolean) => void;
311
364
  /** Layout ID for Framer Motion Container Transform transitions. */
312
365
  layoutId?: string;
366
+ /**
367
+ * Change the component to the underlying child element and merge props/behavior.
368
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
369
+ * @default false
370
+ */
371
+ asChild?: boolean;
372
+ children?: React$1.ReactNode;
313
373
  }
314
374
  declare const ExtendedFAB: React$1.NamedExoticComponent<Omit<ExtendedFABProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
315
375
 
@@ -376,6 +436,12 @@ interface FABProps extends MotionButtonProps$1 {
376
436
  * @default true
377
437
  */
378
438
  visible?: boolean;
439
+ /**
440
+ * Change the component to the underlying child element and merge props/behavior.
441
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
442
+ * @default false
443
+ */
444
+ asChild?: boolean;
379
445
  }
380
446
  /**
381
447
  * Props for `FABPosition` layout wrapper component.
@@ -576,6 +642,13 @@ interface FABMenuItemProps {
576
642
  totalItems?: number;
577
643
  /** Logic `tabIndex` value for manual keyboard navigation. */
578
644
  tabIndex?: number;
645
+ /**
646
+ * Change the component to the underlying child element and merge props/behavior.
647
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
648
+ * @default false
649
+ */
650
+ asChild?: boolean;
651
+ children?: React$1.ReactNode;
579
652
  }
580
653
  /**
581
654
  * Toggle FAB button (Morphing FAB) usable as standalone or trigger for `FABMenu`.
@@ -607,7 +680,7 @@ declare const ToggleFAB: React$1.NamedExoticComponent<ToggleFABProps & React$1.R
607
680
  * Disabled items use `aria-disabled="true"` rather than native HTML `disabled`
608
681
  * so they remain focusable in the tab sequence per MD3 specification.
609
682
  */
610
- declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, className, tabIndex, }: FABMenuItemProps): react_jsx_runtime.JSX.Element;
683
+ declare function FABMenuItem({ icon, label, onClick, disabled, colorVariant, className, tabIndex, asChild, children, }: FABMenuItemProps): react_jsx_runtime.JSX.Element;
611
684
  /**
612
685
  * MD3 Expressive FAB Menu.
613
686
  *
@@ -700,6 +773,12 @@ interface SplitButtonLeadingProps extends MotionButtonProps {
700
773
  children?: React.ReactNode;
701
774
  disabled?: boolean;
702
775
  className?: string;
776
+ /**
777
+ * Change the component to the underlying child element and merge props/behavior.
778
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
779
+ * @default false
780
+ */
781
+ asChild?: boolean;
703
782
  }
704
783
  interface SplitButtonTrailingProps extends Omit<MotionButtonProps, "onChange" | "color" | "children"> {
705
784
  variant?: SplitButtonVariant;
@@ -715,6 +794,13 @@ interface SplitButtonTrailingProps extends Omit<MotionButtonProps, "onChange" |
715
794
  /** ID of controlled menu element */
716
795
  "aria-controls"?: string;
717
796
  className?: string;
797
+ /**
798
+ * Change the component to the underlying child element and merge props/behavior.
799
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
800
+ * @default false
801
+ */
802
+ asChild?: boolean;
803
+ children?: React.ReactNode;
718
804
  }
719
805
  interface SplitButtonTrailingUncheckableProps extends Omit<MotionButtonProps, "color" | "children"> {
720
806
  variant?: SplitButtonVariant;
@@ -723,6 +809,13 @@ interface SplitButtonTrailingUncheckableProps extends Omit<MotionButtonProps, "c
723
809
  disabled?: boolean;
724
810
  "aria-label": string;
725
811
  className?: string;
812
+ /**
813
+ * Change the component to the underlying child element and merge props/behavior.
814
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
815
+ * @default false
816
+ */
817
+ asChild?: boolean;
818
+ children?: React.ReactNode;
726
819
  }
727
820
 
728
821
  declare const SplitButtonLayout: React$1.NamedExoticComponent<SplitButtonLayoutProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -745,4 +838,4 @@ declare const TonalSplitButtonTrailingUncheckable: React$1.ForwardRefExoticCompo
745
838
  declare const ElevatedSplitButtonTrailingUncheckable: React$1.ForwardRefExoticComponent<Omit<Omit<SplitButtonTrailingUncheckableProps, "variant">, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
746
839
  declare const OutlinedSplitButtonTrailingUncheckable: React$1.ForwardRefExoticComponent<Omit<Omit<SplitButtonTrailingUncheckableProps, "variant">, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
747
840
 
748
- export { SplitButtonLeading as A, BUTTON_COLOR_TOKENS as B, type SplitButtonLeadingProps as C, type SplitButtonSize as D, ElevatedSplitButtonLeading as E, FAB as F, SplitButtonTrailing as G, type SplitButtonTrailingProps as H, SplitButtonTrailingUncheckable as I, type SplitButtonTrailingUncheckableProps as J, type SplitButtonVariant as K, type ToggleFABProps as L, TonalSplitButtonLeading as M, TonalSplitButtonTrailing as N, OutlinedSplitButtonLeading as O, TonalSplitButtonTrailingUncheckable as P, type SplitButtonSizeTokens as Q, SplitButtonLayout as S, ToggleFAB as T, BUTTON_SIZE_TOKENS as a, type BaseButtonProps as b, Button as c, ButtonGroup as d, type ButtonGroupOrientation as e, type ButtonGroupProps as f, type ButtonGroupVariant as g, type ButtonProps as h, ElevatedSplitButtonTrailing as i, ElevatedSplitButtonTrailingUncheckable as j, ExtendedFAB as k, type ExtendedFABProps as l, FABMenu as m, FABMenuItem as n, type FABMenuItemData as o, type FABMenuItemProps as p, type FABMenuProps as q, FABPosition as r, type FABPositionProps as s, type FABProps as t, FilledSplitButtonLeading as u, FilledSplitButtonTrailing as v, FilledSplitButtonTrailingUncheckable as w, OutlinedSplitButtonTrailing as x, OutlinedSplitButtonTrailingUncheckable as y, type SplitButtonLayoutProps as z };
841
+ export { OutlinedSplitButtonTrailingUncheckable as A, BUTTON_COLOR_TOKENS as B, type SplitButtonLayoutProps as C, type DistributeMode as D, ElevatedSplitButtonLeading as E, FAB as F, SplitButtonLeading as G, type SplitButtonLeadingProps as H, type SplitButtonSize as I, SplitButtonTrailing as J, type SplitButtonTrailingProps as K, SplitButtonTrailingUncheckable as L, type SplitButtonTrailingUncheckableProps as M, type SplitButtonVariant as N, OutlinedSplitButtonLeading as O, type ToggleFABProps as P, TonalSplitButtonLeading as Q, TonalSplitButtonTrailing as R, SplitButtonLayout as S, ToggleFAB as T, TonalSplitButtonTrailingUncheckable as U, type SplitButtonSizeTokens as V, BUTTON_SIZE_TOKENS as a, type BaseButtonProps as b, Button as c, ButtonDistribute as d, type ButtonDistributeProps as e, ButtonGroup as f, type ButtonGroupOrientation as g, type ButtonGroupProps as h, type ButtonGroupVariant as i, type ButtonProps as j, ElevatedSplitButtonTrailing as k, ElevatedSplitButtonTrailingUncheckable as l, ExtendedFAB as m, type ExtendedFABProps as n, FABMenu as o, FABMenuItem as p, type FABMenuItemData as q, type FABMenuItemProps as r, type FABMenuProps as s, FABPosition as t, type FABPositionProps as u, type FABProps as v, FilledSplitButtonLeading as w, FilledSplitButtonTrailing as x, FilledSplitButtonTrailingUncheckable as y, OutlinedSplitButtonTrailing as z };
@@ -145,6 +145,13 @@ interface ChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>,
145
145
  * When provided, a dedicated tabbable close button with `aria-label="Remove {label}"` is rendered.
146
146
  */
147
147
  onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;
148
+ /**
149
+ * Change the component to the underlying child element and merge props/behavior.
150
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
151
+ * @default false
152
+ */
153
+ asChild?: boolean;
154
+ children?: React.ReactNode;
148
155
  }
149
156
  /**
150
157
  * MD3 Expressive Chip — 4-variant interactive tag component.
@@ -145,6 +145,13 @@ interface ChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>,
145
145
  * When provided, a dedicated tabbable close button with `aria-label="Remove {label}"` is rendered.
146
146
  */
147
147
  onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;
148
+ /**
149
+ * Change the component to the underlying child element and merge props/behavior.
150
+ * Useful when wrapping in Next.js `<Link>` or custom anchor tags.
151
+ * @default false
152
+ */
153
+ asChild?: boolean;
154
+ children?: React.ReactNode;
148
155
  }
149
156
  /**
150
157
  * MD3 Expressive Chip — 4-variant interactive tag component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bug-on/m3-expressive",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Material Design 3 Expressive React components",
5
5
  "author": "Bug On",
6
6
  "license": "MIT",
@@ -179,8 +179,8 @@
179
179
  "class-variance-authority": "^0.7.1",
180
180
  "clsx": "^2.1.1",
181
181
  "tailwind-merge": "^3.3.1",
182
- "@bug-on/m3-tailwind": "1.2.0",
183
- "@bug-on/m3-tokens": "1.2.0"
182
+ "@bug-on/m3-tokens": "1.2.0",
183
+ "@bug-on/m3-tailwind": "1.2.0"
184
184
  },
185
185
  "devDependencies": {
186
186
  "@testing-library/jest-dom": "^6.9.1",