@bug-on/m3-expressive 1.2.3 → 1.2.5
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/CHANGELOG.md +15 -0
- package/README.md +128 -41
- package/dist/buttons.d.mts +1 -1
- package/dist/buttons.d.ts +1 -1
- package/dist/buttons.js +33 -14
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +33 -14
- package/dist/buttons.mjs.map +1 -1
- package/dist/forms.d.mts +2 -2
- package/dist/forms.d.ts +2 -2
- package/dist/index.d.mts +79 -7
- package/dist/index.d.ts +79 -7
- package/dist/index.js +6071 -5547
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5964 -5441
- package/dist/index.mjs.map +1 -1
- package/dist/layout.js +10 -7
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +10 -7
- package/dist/layout.mjs.map +1 -1
- package/dist/md3-expressive-shapes-CPcfl_Hf.d.mts +498 -0
- package/dist/md3-expressive-shapes-CPcfl_Hf.d.ts +498 -0
- package/dist/navigation.d.mts +93 -20
- package/dist/navigation.d.ts +93 -20
- package/dist/navigation.js +2824 -561
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +2815 -554
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.d.mts +2 -2
- package/dist/overlays.d.ts +2 -2
- package/dist/shapes.d.mts +3 -498
- package/dist/shapes.d.ts +3 -498
- package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-DdEZR6Vl.d.ts} +1 -1
- package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-Dgjt739k.d.mts} +1 -1
- package/dist/{split-button-trailing-uncheckable-C-qQlyZx.d.ts → split-button-trailing-uncheckable--BhNTEJw.d.ts} +10 -5
- package/dist/{split-button-trailing-uncheckable-DHJqNeq_.d.mts → split-button-trailing-uncheckable-DPJL3bO6.d.mts} +10 -5
- package/dist/{text-field-T4Rg-9Bw.d.mts → text-field-DWC7qOvp.d.mts} +128 -128
- package/dist/{text-field-T4Rg-9Bw.d.ts → text-field-DWC7qOvp.d.ts} +128 -128
- package/package.json +3 -3
package/dist/navigation.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import * as RxContextMenu from '@radix-ui/react-context-menu';
|
|
6
6
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
7
7
|
import { Transition, Variants, HTMLMotionProps } from 'motion/react';
|
|
8
|
+
import { M as MD3ShapeName } from './md3-expressive-shapes-CPcfl_Hf.mjs';
|
|
8
9
|
import { B as BaseIconButtonProps } from './icon-button-CSsDmuQC.mjs';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -810,6 +811,8 @@ declare function SmallAppBar({ title, subtitle, titleAlignment, navigationIcon,
|
|
|
810
811
|
type MenuColorVariant = "standard" | "vibrant";
|
|
811
812
|
/** Visual variant of the menu. */
|
|
812
813
|
type MenuVariant = "baseline" | "expressive";
|
|
814
|
+
/** Layout density for menu items: 0 (default: 48dp), -2 (40dp), -4 (32dp). */
|
|
815
|
+
type MenuDensity = 0 | -2 | -4;
|
|
813
816
|
/**
|
|
814
817
|
* Which Radix primitive family drives this menu:
|
|
815
818
|
* - `dropdown` → @radix-ui/react-dropdown-menu (button, text field, icon trigger)
|
|
@@ -842,6 +845,11 @@ interface MenuProps {
|
|
|
842
845
|
* - `vibrant`: tertiary-container background (use sparingly, high emphasis)
|
|
843
846
|
*/
|
|
844
847
|
colorVariant?: MenuColorVariant;
|
|
848
|
+
/**
|
|
849
|
+
* Layout density of menu items: 0 (48dp), -2 (40dp), -4 (32dp).
|
|
850
|
+
* @default 0
|
|
851
|
+
*/
|
|
852
|
+
density?: MenuDensity;
|
|
845
853
|
/**
|
|
846
854
|
* Visual variant of the menu.
|
|
847
855
|
* - `baseline`: original M3 specs (4dp corners, no shape morphing)
|
|
@@ -894,6 +902,11 @@ interface MenuContentProps {
|
|
|
894
902
|
* Default: "gap"
|
|
895
903
|
*/
|
|
896
904
|
separatorStyle?: VerticalMenuSeparatorStyle;
|
|
905
|
+
/**
|
|
906
|
+
* When true, automatically sets the menu popover width to match the trigger width
|
|
907
|
+
* using Radix CSS variable `--radix-dropdown-menu-trigger-width`.
|
|
908
|
+
*/
|
|
909
|
+
matchTriggerWidth?: boolean;
|
|
897
910
|
className?: string;
|
|
898
911
|
}
|
|
899
912
|
interface MenuItemProps {
|
|
@@ -927,6 +940,8 @@ interface MenuItemProps {
|
|
|
927
940
|
itemPosition?: MenuItemPosition;
|
|
928
941
|
/** Override colorVariant from MenuContext */
|
|
929
942
|
colorVariant?: MenuColorVariant;
|
|
943
|
+
/** Layout density of this menu item: 0 (48dp), -2 (40dp), -4 (32dp). */
|
|
944
|
+
density?: MenuDensity;
|
|
930
945
|
/** If true, keeps the menu open after clicking (e.g. for multi-select items) */
|
|
931
946
|
keepOpen?: boolean;
|
|
932
947
|
className?: string;
|
|
@@ -936,6 +951,8 @@ interface MenuItemProps {
|
|
|
936
951
|
isSubTrigger?: boolean;
|
|
937
952
|
/** ARIA role override. Defaults to 'menuitem', 'menuitemcheckbox', or 'menuitemradio' based on selected prop. */
|
|
938
953
|
role?: string;
|
|
954
|
+
/** Internal flag: true if rendered inside a gap-variant expressive menu */
|
|
955
|
+
isGapVariant?: boolean;
|
|
939
956
|
}
|
|
940
957
|
interface MenuGroupProps {
|
|
941
958
|
/** MenuItem children — itemPosition is auto-injected */
|
|
@@ -966,6 +983,7 @@ interface MenuGroupProps {
|
|
|
966
983
|
}
|
|
967
984
|
interface MenuDividerProps {
|
|
968
985
|
className?: string;
|
|
986
|
+
isGapVariant?: boolean;
|
|
969
987
|
}
|
|
970
988
|
interface SubMenuProps {
|
|
971
989
|
/** The SubMenu children (another MenuContent) */
|
|
@@ -1158,7 +1176,7 @@ declare const ContextMenuContent: React$1.ForwardRefExoticComponent<ContextMenuC
|
|
|
1158
1176
|
* </MenuContent>
|
|
1159
1177
|
* </Menu>
|
|
1160
1178
|
*/
|
|
1161
|
-
declare function Menu({ children, variant, menuVariant, colorVariant, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1179
|
+
declare function Menu({ children, variant, menuVariant, colorVariant, density, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1162
1180
|
declare namespace Menu {
|
|
1163
1181
|
var displayName: string;
|
|
1164
1182
|
}
|
|
@@ -1236,6 +1254,8 @@ interface MenuContextValue {
|
|
|
1236
1254
|
variant: MenuVariant;
|
|
1237
1255
|
/** Color variant inherited by all children unless overridden */
|
|
1238
1256
|
colorVariant: MenuColorVariant;
|
|
1257
|
+
/** Density of menu items: 0, -2, -4 */
|
|
1258
|
+
density: MenuDensity;
|
|
1239
1259
|
/**
|
|
1240
1260
|
* Which Radix primitive family drives this menu:
|
|
1241
1261
|
* - "dropdown" → @radix-ui/react-dropdown-menu (button/field trigger)
|
|
@@ -1254,12 +1274,13 @@ interface MenuContextValue {
|
|
|
1254
1274
|
interface MenuProviderProps {
|
|
1255
1275
|
variant?: MenuVariant;
|
|
1256
1276
|
colorVariant?: MenuColorVariant;
|
|
1277
|
+
density?: MenuDensity;
|
|
1257
1278
|
menuPrimitive?: MenuPrimitive;
|
|
1258
1279
|
open: boolean;
|
|
1259
1280
|
onOpenChange: (open: boolean) => void;
|
|
1260
1281
|
children: React$1.ReactNode;
|
|
1261
1282
|
}
|
|
1262
|
-
declare function MenuProvider({ variant, colorVariant, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1283
|
+
declare function MenuProvider({ variant, colorVariant, density, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1263
1284
|
/**
|
|
1264
1285
|
* Returns the nearest MenuContext value.
|
|
1265
1286
|
* Safe to use outside a MenuProvider (returns default: baseline, dropdown, closed).
|
|
@@ -1396,7 +1417,7 @@ declare const ITEM_SHAPE_CLASSES: {
|
|
|
1396
1417
|
readonly leading: "rounded-t-[12px] rounded-b-[4px]";
|
|
1397
1418
|
readonly middle: "rounded-[4px]";
|
|
1398
1419
|
readonly trailing: "rounded-t-[4px] rounded-b-[12px]";
|
|
1399
|
-
readonly standalone: "rounded-[
|
|
1420
|
+
readonly standalone: "rounded-[12px]";
|
|
1400
1421
|
readonly selected: "rounded-[12px]";
|
|
1401
1422
|
};
|
|
1402
1423
|
/**
|
|
@@ -1423,9 +1444,9 @@ declare const STANDARD_COLORS: {
|
|
|
1423
1444
|
/** Trailing icon color (StandardMenuTokens.ItemTrailingIconColor) */
|
|
1424
1445
|
readonly trailingIconColor: "text-m3-on-surface-variant";
|
|
1425
1446
|
/** Hover state layer (OnSurface @ 8% opacity) */
|
|
1426
|
-
readonly hoverLayer: "hover:bg-m3-on-surface/8";
|
|
1447
|
+
readonly hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8";
|
|
1427
1448
|
/** Focus state layer (OnSurface @ 12% opacity) */
|
|
1428
|
-
readonly focusLayer: "focus:bg-m3-on-surface/12";
|
|
1449
|
+
readonly focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8";
|
|
1429
1450
|
/** Selected item background (StandardMenuTokens.ItemSelectedContainerColor) */
|
|
1430
1451
|
readonly selectedBg: "bg-m3-tertiary-container";
|
|
1431
1452
|
/** Selected item text (StandardMenuTokens.ItemSelectedLabelTextColor) */
|
|
@@ -1459,9 +1480,9 @@ declare const VIBRANT_COLORS: {
|
|
|
1459
1480
|
/** Trailing icon color (VibrantMenuTokens.ItemTrailingIconColor) */
|
|
1460
1481
|
readonly trailingIconColor: "text-m3-on-tertiary-container";
|
|
1461
1482
|
/** Hover state layer (OnTertiaryContainer @ 8% opacity) */
|
|
1462
|
-
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8";
|
|
1483
|
+
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1463
1484
|
/** Focus state layer (OnTertiaryContainer @ 12% opacity) */
|
|
1464
|
-
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12";
|
|
1485
|
+
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1465
1486
|
/** Selected item background (VibrantMenuTokens.ItemSelectedContainerColor = Tertiary) */
|
|
1466
1487
|
readonly selectedBg: "bg-m3-tertiary";
|
|
1467
1488
|
/** Selected item text (VibrantMenuTokens.ItemSelectedLabelTextColor = OnTertiary) */
|
|
@@ -1609,6 +1630,18 @@ declare const VerticalMenuContent: React$1.ForwardRefExoticComponent<VerticalMen
|
|
|
1609
1630
|
*/
|
|
1610
1631
|
declare const VerticalMenu: React$1.ForwardRefExoticComponent<VerticalMenuProps & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1611
1632
|
|
|
1633
|
+
type NavigationItemShape = "pill" | MD3ShapeName;
|
|
1634
|
+
/**
|
|
1635
|
+
* Returns inline style for a navigation item shape.
|
|
1636
|
+
* If shape is 'pill' or 'circle', returns undefined (handled via rounded-full CSS).
|
|
1637
|
+
* For custom MD3 shapes (e.g. 'sunny', 'flower', 'star'), returns { clipPath: "path(...)" }.
|
|
1638
|
+
*/
|
|
1639
|
+
declare function getNavigationShapeStyle(shape: NavigationItemShape | undefined, width?: number, height?: number): React.CSSProperties | undefined;
|
|
1640
|
+
/**
|
|
1641
|
+
* Checks if a shape is a 1:1 ratio shape (circle or custom MD3 shape).
|
|
1642
|
+
*/
|
|
1643
|
+
declare function isSquareShape(shape: NavigationItemShape | undefined): boolean;
|
|
1644
|
+
|
|
1612
1645
|
/**
|
|
1613
1646
|
* Layout styling for navigation bar items.
|
|
1614
1647
|
* - vertical: Icon above label (default for mobile)
|
|
@@ -1622,13 +1655,20 @@ type NavigationBarItemLayout = "vertical" | "horizontal";
|
|
|
1622
1655
|
* - xr: Floating orbiter variant for spatial interfaces (detached from bottom).
|
|
1623
1656
|
*/
|
|
1624
1657
|
type NavigationBarVariant = "flexible" | "baseline" | "xr";
|
|
1658
|
+
type NavigationBarLabelVisibility = "labeled" | "auto" | "unlabeled";
|
|
1625
1659
|
interface NavigationBarItemProps {
|
|
1626
1660
|
selected: boolean;
|
|
1627
1661
|
icon: React$1.ReactNode;
|
|
1628
|
-
label
|
|
1662
|
+
label?: React$1.ReactNode;
|
|
1629
1663
|
onClick?: () => void;
|
|
1630
1664
|
disabled?: boolean;
|
|
1631
1665
|
badge?: React$1.ReactNode;
|
|
1666
|
+
/** Shape of the item active indicator / icon container (pill, circle, sunny, flower, etc.) */
|
|
1667
|
+
shape?: NavigationItemShape;
|
|
1668
|
+
/** Override size (width & height) of the shape container in px. Default: 56 for square shapes, 32h×56w for pill */
|
|
1669
|
+
shapeSize?: number;
|
|
1670
|
+
/** Hide the label below the icon. Overrides container-level labelVisibility. */
|
|
1671
|
+
hideLabel?: boolean;
|
|
1632
1672
|
"aria-label"?: string;
|
|
1633
1673
|
className?: string;
|
|
1634
1674
|
asChild?: boolean;
|
|
@@ -1639,6 +1679,17 @@ interface NavigationBarProps {
|
|
|
1639
1679
|
variant?: NavigationBarVariant;
|
|
1640
1680
|
/** Forces a specific item layout (horizontal/vertical) */
|
|
1641
1681
|
itemLayout?: NavigationBarItemLayout;
|
|
1682
|
+
/** Default shape of navigation items (pill, circle, sunny, flower, etc.) */
|
|
1683
|
+
shape?: NavigationItemShape;
|
|
1684
|
+
/**
|
|
1685
|
+
* Label visibility for all items.
|
|
1686
|
+
* - "labeled" (default): always show label
|
|
1687
|
+
* - "auto": show label only for the selected item
|
|
1688
|
+
* - "unlabeled": never show label (icon-only mode)
|
|
1689
|
+
*/
|
|
1690
|
+
labelVisibility?: NavigationBarLabelVisibility;
|
|
1691
|
+
/** Default size (width & height) for square shape containers in px. Default: 56 */
|
|
1692
|
+
shapeSize?: number;
|
|
1642
1693
|
/** Whether the bar should hide when scrolling down */
|
|
1643
1694
|
hideOnScroll?: boolean;
|
|
1644
1695
|
/** Whether the bar should have an elevation shadow */
|
|
@@ -1664,6 +1715,7 @@ declare const NavigationBar: React$1.NamedExoticComponent<NavigationBarProps & R
|
|
|
1664
1715
|
|
|
1665
1716
|
type NavigationRailVariant = "collapsed" | "expanded" | "modal" | "xr";
|
|
1666
1717
|
type NavigationRailLabelVisibility = "labeled" | "auto" | "unlabeled";
|
|
1718
|
+
type NavigationRailActiveIndicatorWidth = "hug" | "fill";
|
|
1667
1719
|
interface NavigationRailItemProps {
|
|
1668
1720
|
selected: boolean;
|
|
1669
1721
|
icon: React$1.ReactNode;
|
|
@@ -1671,6 +1723,16 @@ interface NavigationRailItemProps {
|
|
|
1671
1723
|
onClick?: () => void;
|
|
1672
1724
|
disabled?: boolean;
|
|
1673
1725
|
badge?: React$1.ReactNode;
|
|
1726
|
+
/** Shape of the item active indicator / icon container (pill, circle, sunny, flower, etc.) */
|
|
1727
|
+
shape?: NavigationItemShape;
|
|
1728
|
+
/** Override size (width & height) of the shape container in px. Default: 56 for square shapes, 32h×56w for pill */
|
|
1729
|
+
shapeSize?: number;
|
|
1730
|
+
/**
|
|
1731
|
+
* Width behavior of the active indicator when expanded with pill shape.
|
|
1732
|
+
* - "hug" (default): hugs the icon + label contents (MD3 Expressive style)
|
|
1733
|
+
* - "fill": fills the full width of the container (baseline navigation drawer style)
|
|
1734
|
+
*/
|
|
1735
|
+
activeIndicatorWidth?: NavigationRailActiveIndicatorWidth;
|
|
1674
1736
|
"aria-label"?: string;
|
|
1675
1737
|
className?: string;
|
|
1676
1738
|
asChild?: boolean;
|
|
@@ -1679,6 +1741,16 @@ interface NavigationRailItemProps {
|
|
|
1679
1741
|
interface NavigationRailProps {
|
|
1680
1742
|
variant?: NavigationRailVariant;
|
|
1681
1743
|
labelVisibility?: NavigationRailLabelVisibility;
|
|
1744
|
+
/** Default shape of navigation rail items (pill, circle, sunny, flower, etc.) */
|
|
1745
|
+
shape?: NavigationItemShape;
|
|
1746
|
+
/** Default size (width & height) for square shape containers in px. Default: 56 */
|
|
1747
|
+
shapeSize?: number;
|
|
1748
|
+
/**
|
|
1749
|
+
* Default width behavior of the active indicator when expanded with pill shape.
|
|
1750
|
+
* - "hug" (default): hugs the icon + label contents (MD3 Expressive style)
|
|
1751
|
+
* - "fill": fills the full width of the container (baseline navigation drawer style)
|
|
1752
|
+
*/
|
|
1753
|
+
activeIndicatorWidth?: NavigationRailActiveIndicatorWidth;
|
|
1682
1754
|
header?: React$1.ReactNode;
|
|
1683
1755
|
fab?: React$1.ReactNode;
|
|
1684
1756
|
fabPlacement?: "contained" | "spatialized";
|
|
@@ -2811,18 +2883,17 @@ interface ToolbarToggleButtonProps extends Omit<HTMLMotionProps<"button">, "chil
|
|
|
2811
2883
|
*/
|
|
2812
2884
|
children?: React$1.ReactNode;
|
|
2813
2885
|
/**
|
|
2814
|
-
*
|
|
2815
|
-
*
|
|
2816
|
-
* @default
|
|
2886
|
+
* Enable symmetric spring expand on press.
|
|
2887
|
+
* The button expands equally to the left and right — matching ButtonDistribute behavior.
|
|
2888
|
+
* @default true
|
|
2817
2889
|
*/
|
|
2818
|
-
|
|
2890
|
+
pressExpand?: boolean;
|
|
2819
2891
|
/**
|
|
2820
|
-
*
|
|
2821
|
-
*
|
|
2822
|
-
*
|
|
2823
|
-
* @default 6
|
|
2892
|
+
* Fraction of the button width added symmetrically on press.
|
|
2893
|
+
* e.g. 0.06 → scaleX goes from 1.0 to 1.06 (3% each side).
|
|
2894
|
+
* @default 0.06
|
|
2824
2895
|
*/
|
|
2825
|
-
|
|
2896
|
+
pressExpandRatio?: number;
|
|
2826
2897
|
/**
|
|
2827
2898
|
* Enable MD3 state layer ripple effect on click.
|
|
2828
2899
|
* @default true
|
|
@@ -2838,8 +2909,10 @@ interface ToolbarToggleButtonProps extends Omit<HTMLMotionProps<"button">, "chil
|
|
|
2838
2909
|
* An MD3 pill-shaped toggle button with optional leading icon and text label.
|
|
2839
2910
|
*
|
|
2840
2911
|
* Meets MD3 Expressive touch-target requirements (48dp height minimum, ~95dp width).
|
|
2841
|
-
* Features Material Design 3 Expressive spring press animation
|
|
2842
|
-
*
|
|
2912
|
+
* Features Material Design 3 Expressive spring press animation:
|
|
2913
|
+
* - Symmetric horizontal expand (scaleX) with `FAST_SPATIAL_SPRING` (has bounce)
|
|
2914
|
+
* - Border-radius morphing via `BUTTON_RADIUS_SPRING` (fast.effects, no overshoot)
|
|
2915
|
+
* - Configurable ripple state layer
|
|
2843
2916
|
*
|
|
2844
2917
|
* @example
|
|
2845
2918
|
* ```tsx
|
|
@@ -2894,4 +2967,4 @@ declare const ToolbarToggleButtonTokens: {
|
|
|
2894
2967
|
readonly Gap: 8;
|
|
2895
2968
|
};
|
|
2896
2969
|
|
|
2897
|
-
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, type AppBarColors, AppBarColumn, type AppBarColumnProps, type AppBarItem, type AppBarItemType, type AppBarMenuState, AppBarOverflowIndicator, type AppBarOverflowIndicatorProps, AppBarRow, type AppBarRowProps, type AppBarScrollBehavior, AppBarTokens, type BaseAppBarProps, BottomAppBar, type BottomAppBarProps, BottomDockedToolbar, type BottomDockedToolbarProps, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, type ContextMenuContentProps, type ContextMenuProps, ContextMenuTrigger, type ContextMenuTriggerProps, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, type DockedToolbarProps, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, type FlexibleAppBarProps, type FloatingToolbarColors, type FloatingToolbarProps, type FloatingToolbarScrollBehavior, type FloatingToolbarWithFabProps, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, LargeFlexibleAppBar, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MediumFlexibleAppBar, Menu, type MenuColorVariant, MenuContent, type MenuContentProps, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupPosition, type MenuGroupProps, MenuItem, type MenuItemPosition, type MenuItemProps, type MenuPrimitive, type MenuProps, MenuProvider, MenuTrigger, type MenuTriggerProps, type MenuVariant, NavigationBar, NavigationBarComponent, NavigationBarItem, type NavigationBarItemLayout, type NavigationBarItemProps, type NavigationBarProps, type NavigationBarVariant, NavigationRail, NavigationRailItem, type NavigationRailItemProps, type NavigationRailLabelVisibility, type NavigationRailProps, type NavigationRailVariant, SEARCH_BAR_EXIT_SPRING, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Search, SearchAppBar, type SearchAppBarProps, SearchBar, type SearchBarVariant, type SearchProps, type SearchStyleType, SearchTokens, type SearchVariant, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, type SearchViewProps, SmallAppBar, type SmallAppBarProps, SubMenu, type SubMenuProps, Tab, type TabProps, Tabs, TabsColors, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTokens, type TabsVariant, type TitleAlignment, ToolbarDivider, type ToolbarDividerProps, ToolbarDividerTokens, ToolbarIconButton, type ToolbarIconButtonProps, type ToolbarIconButtonSize, ToolbarIconButtonTokens, type ToolbarIconButtonVariant, ToolbarToggleButton, type ToolbarToggleButtonProps, ToolbarToggleButtonTokens, type ToolbarVariant, type UseAppBarScrollReturn, type UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, type VerticalMenuContentProps, VerticalMenuDivider, type VerticalMenuDividerProps, VerticalMenuGroup, type VerticalMenuGroupProps, type VerticalMenuProps, type VerticalMenuSeparatorStyle, appBarTypography, getToolbarColors, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
|
|
2970
|
+
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, type AppBarColors, AppBarColumn, type AppBarColumnProps, type AppBarItem, type AppBarItemType, type AppBarMenuState, AppBarOverflowIndicator, type AppBarOverflowIndicatorProps, AppBarRow, type AppBarRowProps, type AppBarScrollBehavior, AppBarTokens, type BaseAppBarProps, BottomAppBar, type BottomAppBarProps, BottomDockedToolbar, type BottomDockedToolbarProps, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, type ContextMenuContentProps, type ContextMenuProps, ContextMenuTrigger, type ContextMenuTriggerProps, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, type DockedToolbarProps, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, type FlexibleAppBarProps, type FloatingToolbarColors, type FloatingToolbarProps, type FloatingToolbarScrollBehavior, type FloatingToolbarWithFabProps, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, LargeFlexibleAppBar, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MediumFlexibleAppBar, Menu, type MenuColorVariant, MenuContent, type MenuContentProps, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupPosition, type MenuGroupProps, MenuItem, type MenuItemPosition, type MenuItemProps, type MenuPrimitive, type MenuProps, MenuProvider, MenuTrigger, type MenuTriggerProps, type MenuVariant, NavigationBar, NavigationBarComponent, NavigationBarItem, type NavigationBarItemLayout, type NavigationBarItemProps, type NavigationBarLabelVisibility, type NavigationBarProps, type NavigationBarVariant, type NavigationItemShape, NavigationRail, type NavigationRailActiveIndicatorWidth, NavigationRailItem, type NavigationRailItemProps, type NavigationRailLabelVisibility, type NavigationRailProps, type NavigationRailVariant, SEARCH_BAR_EXIT_SPRING, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Search, SearchAppBar, type SearchAppBarProps, SearchBar, type SearchBarVariant, type SearchProps, type SearchStyleType, SearchTokens, type SearchVariant, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, type SearchViewProps, SmallAppBar, type SmallAppBarProps, SubMenu, type SubMenuProps, Tab, type TabProps, Tabs, TabsColors, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTokens, type TabsVariant, type TitleAlignment, ToolbarDivider, type ToolbarDividerProps, ToolbarDividerTokens, ToolbarIconButton, type ToolbarIconButtonProps, type ToolbarIconButtonSize, ToolbarIconButtonTokens, type ToolbarIconButtonVariant, ToolbarToggleButton, type ToolbarToggleButtonProps, ToolbarToggleButtonTokens, type ToolbarVariant, type UseAppBarScrollReturn, type UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, type VerticalMenuContentProps, VerticalMenuDivider, type VerticalMenuDividerProps, VerticalMenuGroup, type VerticalMenuGroupProps, type VerticalMenuProps, type VerticalMenuSeparatorStyle, appBarTypography, getNavigationShapeStyle, getToolbarColors, isSquareShape, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
|
package/dist/navigation.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import * as RxContextMenu from '@radix-ui/react-context-menu';
|
|
6
6
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
7
7
|
import { Transition, Variants, HTMLMotionProps } from 'motion/react';
|
|
8
|
+
import { M as MD3ShapeName } from './md3-expressive-shapes-CPcfl_Hf.js';
|
|
8
9
|
import { B as BaseIconButtonProps } from './icon-button-CSsDmuQC.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -810,6 +811,8 @@ declare function SmallAppBar({ title, subtitle, titleAlignment, navigationIcon,
|
|
|
810
811
|
type MenuColorVariant = "standard" | "vibrant";
|
|
811
812
|
/** Visual variant of the menu. */
|
|
812
813
|
type MenuVariant = "baseline" | "expressive";
|
|
814
|
+
/** Layout density for menu items: 0 (default: 48dp), -2 (40dp), -4 (32dp). */
|
|
815
|
+
type MenuDensity = 0 | -2 | -4;
|
|
813
816
|
/**
|
|
814
817
|
* Which Radix primitive family drives this menu:
|
|
815
818
|
* - `dropdown` → @radix-ui/react-dropdown-menu (button, text field, icon trigger)
|
|
@@ -842,6 +845,11 @@ interface MenuProps {
|
|
|
842
845
|
* - `vibrant`: tertiary-container background (use sparingly, high emphasis)
|
|
843
846
|
*/
|
|
844
847
|
colorVariant?: MenuColorVariant;
|
|
848
|
+
/**
|
|
849
|
+
* Layout density of menu items: 0 (48dp), -2 (40dp), -4 (32dp).
|
|
850
|
+
* @default 0
|
|
851
|
+
*/
|
|
852
|
+
density?: MenuDensity;
|
|
845
853
|
/**
|
|
846
854
|
* Visual variant of the menu.
|
|
847
855
|
* - `baseline`: original M3 specs (4dp corners, no shape morphing)
|
|
@@ -894,6 +902,11 @@ interface MenuContentProps {
|
|
|
894
902
|
* Default: "gap"
|
|
895
903
|
*/
|
|
896
904
|
separatorStyle?: VerticalMenuSeparatorStyle;
|
|
905
|
+
/**
|
|
906
|
+
* When true, automatically sets the menu popover width to match the trigger width
|
|
907
|
+
* using Radix CSS variable `--radix-dropdown-menu-trigger-width`.
|
|
908
|
+
*/
|
|
909
|
+
matchTriggerWidth?: boolean;
|
|
897
910
|
className?: string;
|
|
898
911
|
}
|
|
899
912
|
interface MenuItemProps {
|
|
@@ -927,6 +940,8 @@ interface MenuItemProps {
|
|
|
927
940
|
itemPosition?: MenuItemPosition;
|
|
928
941
|
/** Override colorVariant from MenuContext */
|
|
929
942
|
colorVariant?: MenuColorVariant;
|
|
943
|
+
/** Layout density of this menu item: 0 (48dp), -2 (40dp), -4 (32dp). */
|
|
944
|
+
density?: MenuDensity;
|
|
930
945
|
/** If true, keeps the menu open after clicking (e.g. for multi-select items) */
|
|
931
946
|
keepOpen?: boolean;
|
|
932
947
|
className?: string;
|
|
@@ -936,6 +951,8 @@ interface MenuItemProps {
|
|
|
936
951
|
isSubTrigger?: boolean;
|
|
937
952
|
/** ARIA role override. Defaults to 'menuitem', 'menuitemcheckbox', or 'menuitemradio' based on selected prop. */
|
|
938
953
|
role?: string;
|
|
954
|
+
/** Internal flag: true if rendered inside a gap-variant expressive menu */
|
|
955
|
+
isGapVariant?: boolean;
|
|
939
956
|
}
|
|
940
957
|
interface MenuGroupProps {
|
|
941
958
|
/** MenuItem children — itemPosition is auto-injected */
|
|
@@ -966,6 +983,7 @@ interface MenuGroupProps {
|
|
|
966
983
|
}
|
|
967
984
|
interface MenuDividerProps {
|
|
968
985
|
className?: string;
|
|
986
|
+
isGapVariant?: boolean;
|
|
969
987
|
}
|
|
970
988
|
interface SubMenuProps {
|
|
971
989
|
/** The SubMenu children (another MenuContent) */
|
|
@@ -1158,7 +1176,7 @@ declare const ContextMenuContent: React$1.ForwardRefExoticComponent<ContextMenuC
|
|
|
1158
1176
|
* </MenuContent>
|
|
1159
1177
|
* </Menu>
|
|
1160
1178
|
*/
|
|
1161
|
-
declare function Menu({ children, variant, menuVariant, colorVariant, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1179
|
+
declare function Menu({ children, variant, menuVariant, colorVariant, density, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, ...props }: MenuProps & Omit<React$1.ComponentPropsWithoutRef<typeof DropdownMenu.Root>, "children">): react_jsx_runtime.JSX.Element;
|
|
1162
1180
|
declare namespace Menu {
|
|
1163
1181
|
var displayName: string;
|
|
1164
1182
|
}
|
|
@@ -1236,6 +1254,8 @@ interface MenuContextValue {
|
|
|
1236
1254
|
variant: MenuVariant;
|
|
1237
1255
|
/** Color variant inherited by all children unless overridden */
|
|
1238
1256
|
colorVariant: MenuColorVariant;
|
|
1257
|
+
/** Density of menu items: 0, -2, -4 */
|
|
1258
|
+
density: MenuDensity;
|
|
1239
1259
|
/**
|
|
1240
1260
|
* Which Radix primitive family drives this menu:
|
|
1241
1261
|
* - "dropdown" → @radix-ui/react-dropdown-menu (button/field trigger)
|
|
@@ -1254,12 +1274,13 @@ interface MenuContextValue {
|
|
|
1254
1274
|
interface MenuProviderProps {
|
|
1255
1275
|
variant?: MenuVariant;
|
|
1256
1276
|
colorVariant?: MenuColorVariant;
|
|
1277
|
+
density?: MenuDensity;
|
|
1257
1278
|
menuPrimitive?: MenuPrimitive;
|
|
1258
1279
|
open: boolean;
|
|
1259
1280
|
onOpenChange: (open: boolean) => void;
|
|
1260
1281
|
children: React$1.ReactNode;
|
|
1261
1282
|
}
|
|
1262
|
-
declare function MenuProvider({ variant, colorVariant, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1283
|
+
declare function MenuProvider({ variant, colorVariant, density, menuPrimitive, open, onOpenChange, children, }: MenuProviderProps): react_jsx_runtime.JSX.Element;
|
|
1263
1284
|
/**
|
|
1264
1285
|
* Returns the nearest MenuContext value.
|
|
1265
1286
|
* Safe to use outside a MenuProvider (returns default: baseline, dropdown, closed).
|
|
@@ -1396,7 +1417,7 @@ declare const ITEM_SHAPE_CLASSES: {
|
|
|
1396
1417
|
readonly leading: "rounded-t-[12px] rounded-b-[4px]";
|
|
1397
1418
|
readonly middle: "rounded-[4px]";
|
|
1398
1419
|
readonly trailing: "rounded-t-[4px] rounded-b-[12px]";
|
|
1399
|
-
readonly standalone: "rounded-[
|
|
1420
|
+
readonly standalone: "rounded-[12px]";
|
|
1400
1421
|
readonly selected: "rounded-[12px]";
|
|
1401
1422
|
};
|
|
1402
1423
|
/**
|
|
@@ -1423,9 +1444,9 @@ declare const STANDARD_COLORS: {
|
|
|
1423
1444
|
/** Trailing icon color (StandardMenuTokens.ItemTrailingIconColor) */
|
|
1424
1445
|
readonly trailingIconColor: "text-m3-on-surface-variant";
|
|
1425
1446
|
/** Hover state layer (OnSurface @ 8% opacity) */
|
|
1426
|
-
readonly hoverLayer: "hover:bg-m3-on-surface/8";
|
|
1447
|
+
readonly hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8";
|
|
1427
1448
|
/** Focus state layer (OnSurface @ 12% opacity) */
|
|
1428
|
-
readonly focusLayer: "focus:bg-m3-on-surface/12";
|
|
1449
|
+
readonly focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8";
|
|
1429
1450
|
/** Selected item background (StandardMenuTokens.ItemSelectedContainerColor) */
|
|
1430
1451
|
readonly selectedBg: "bg-m3-tertiary-container";
|
|
1431
1452
|
/** Selected item text (StandardMenuTokens.ItemSelectedLabelTextColor) */
|
|
@@ -1459,9 +1480,9 @@ declare const VIBRANT_COLORS: {
|
|
|
1459
1480
|
/** Trailing icon color (VibrantMenuTokens.ItemTrailingIconColor) */
|
|
1460
1481
|
readonly trailingIconColor: "text-m3-on-tertiary-container";
|
|
1461
1482
|
/** Hover state layer (OnTertiaryContainer @ 8% opacity) */
|
|
1462
|
-
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8";
|
|
1483
|
+
readonly hoverLayer: "hover:bg-m3-on-tertiary-container/8 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1463
1484
|
/** Focus state layer (OnTertiaryContainer @ 12% opacity) */
|
|
1464
|
-
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12";
|
|
1485
|
+
readonly focusLayer: "focus:bg-m3-on-tertiary-container/12 data-[highlighted]:bg-m3-on-tertiary-container/8";
|
|
1465
1486
|
/** Selected item background (VibrantMenuTokens.ItemSelectedContainerColor = Tertiary) */
|
|
1466
1487
|
readonly selectedBg: "bg-m3-tertiary";
|
|
1467
1488
|
/** Selected item text (VibrantMenuTokens.ItemSelectedLabelTextColor = OnTertiary) */
|
|
@@ -1609,6 +1630,18 @@ declare const VerticalMenuContent: React$1.ForwardRefExoticComponent<VerticalMen
|
|
|
1609
1630
|
*/
|
|
1610
1631
|
declare const VerticalMenu: React$1.ForwardRefExoticComponent<VerticalMenuProps & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1611
1632
|
|
|
1633
|
+
type NavigationItemShape = "pill" | MD3ShapeName;
|
|
1634
|
+
/**
|
|
1635
|
+
* Returns inline style for a navigation item shape.
|
|
1636
|
+
* If shape is 'pill' or 'circle', returns undefined (handled via rounded-full CSS).
|
|
1637
|
+
* For custom MD3 shapes (e.g. 'sunny', 'flower', 'star'), returns { clipPath: "path(...)" }.
|
|
1638
|
+
*/
|
|
1639
|
+
declare function getNavigationShapeStyle(shape: NavigationItemShape | undefined, width?: number, height?: number): React.CSSProperties | undefined;
|
|
1640
|
+
/**
|
|
1641
|
+
* Checks if a shape is a 1:1 ratio shape (circle or custom MD3 shape).
|
|
1642
|
+
*/
|
|
1643
|
+
declare function isSquareShape(shape: NavigationItemShape | undefined): boolean;
|
|
1644
|
+
|
|
1612
1645
|
/**
|
|
1613
1646
|
* Layout styling for navigation bar items.
|
|
1614
1647
|
* - vertical: Icon above label (default for mobile)
|
|
@@ -1622,13 +1655,20 @@ type NavigationBarItemLayout = "vertical" | "horizontal";
|
|
|
1622
1655
|
* - xr: Floating orbiter variant for spatial interfaces (detached from bottom).
|
|
1623
1656
|
*/
|
|
1624
1657
|
type NavigationBarVariant = "flexible" | "baseline" | "xr";
|
|
1658
|
+
type NavigationBarLabelVisibility = "labeled" | "auto" | "unlabeled";
|
|
1625
1659
|
interface NavigationBarItemProps {
|
|
1626
1660
|
selected: boolean;
|
|
1627
1661
|
icon: React$1.ReactNode;
|
|
1628
|
-
label
|
|
1662
|
+
label?: React$1.ReactNode;
|
|
1629
1663
|
onClick?: () => void;
|
|
1630
1664
|
disabled?: boolean;
|
|
1631
1665
|
badge?: React$1.ReactNode;
|
|
1666
|
+
/** Shape of the item active indicator / icon container (pill, circle, sunny, flower, etc.) */
|
|
1667
|
+
shape?: NavigationItemShape;
|
|
1668
|
+
/** Override size (width & height) of the shape container in px. Default: 56 for square shapes, 32h×56w for pill */
|
|
1669
|
+
shapeSize?: number;
|
|
1670
|
+
/** Hide the label below the icon. Overrides container-level labelVisibility. */
|
|
1671
|
+
hideLabel?: boolean;
|
|
1632
1672
|
"aria-label"?: string;
|
|
1633
1673
|
className?: string;
|
|
1634
1674
|
asChild?: boolean;
|
|
@@ -1639,6 +1679,17 @@ interface NavigationBarProps {
|
|
|
1639
1679
|
variant?: NavigationBarVariant;
|
|
1640
1680
|
/** Forces a specific item layout (horizontal/vertical) */
|
|
1641
1681
|
itemLayout?: NavigationBarItemLayout;
|
|
1682
|
+
/** Default shape of navigation items (pill, circle, sunny, flower, etc.) */
|
|
1683
|
+
shape?: NavigationItemShape;
|
|
1684
|
+
/**
|
|
1685
|
+
* Label visibility for all items.
|
|
1686
|
+
* - "labeled" (default): always show label
|
|
1687
|
+
* - "auto": show label only for the selected item
|
|
1688
|
+
* - "unlabeled": never show label (icon-only mode)
|
|
1689
|
+
*/
|
|
1690
|
+
labelVisibility?: NavigationBarLabelVisibility;
|
|
1691
|
+
/** Default size (width & height) for square shape containers in px. Default: 56 */
|
|
1692
|
+
shapeSize?: number;
|
|
1642
1693
|
/** Whether the bar should hide when scrolling down */
|
|
1643
1694
|
hideOnScroll?: boolean;
|
|
1644
1695
|
/** Whether the bar should have an elevation shadow */
|
|
@@ -1664,6 +1715,7 @@ declare const NavigationBar: React$1.NamedExoticComponent<NavigationBarProps & R
|
|
|
1664
1715
|
|
|
1665
1716
|
type NavigationRailVariant = "collapsed" | "expanded" | "modal" | "xr";
|
|
1666
1717
|
type NavigationRailLabelVisibility = "labeled" | "auto" | "unlabeled";
|
|
1718
|
+
type NavigationRailActiveIndicatorWidth = "hug" | "fill";
|
|
1667
1719
|
interface NavigationRailItemProps {
|
|
1668
1720
|
selected: boolean;
|
|
1669
1721
|
icon: React$1.ReactNode;
|
|
@@ -1671,6 +1723,16 @@ interface NavigationRailItemProps {
|
|
|
1671
1723
|
onClick?: () => void;
|
|
1672
1724
|
disabled?: boolean;
|
|
1673
1725
|
badge?: React$1.ReactNode;
|
|
1726
|
+
/** Shape of the item active indicator / icon container (pill, circle, sunny, flower, etc.) */
|
|
1727
|
+
shape?: NavigationItemShape;
|
|
1728
|
+
/** Override size (width & height) of the shape container in px. Default: 56 for square shapes, 32h×56w for pill */
|
|
1729
|
+
shapeSize?: number;
|
|
1730
|
+
/**
|
|
1731
|
+
* Width behavior of the active indicator when expanded with pill shape.
|
|
1732
|
+
* - "hug" (default): hugs the icon + label contents (MD3 Expressive style)
|
|
1733
|
+
* - "fill": fills the full width of the container (baseline navigation drawer style)
|
|
1734
|
+
*/
|
|
1735
|
+
activeIndicatorWidth?: NavigationRailActiveIndicatorWidth;
|
|
1674
1736
|
"aria-label"?: string;
|
|
1675
1737
|
className?: string;
|
|
1676
1738
|
asChild?: boolean;
|
|
@@ -1679,6 +1741,16 @@ interface NavigationRailItemProps {
|
|
|
1679
1741
|
interface NavigationRailProps {
|
|
1680
1742
|
variant?: NavigationRailVariant;
|
|
1681
1743
|
labelVisibility?: NavigationRailLabelVisibility;
|
|
1744
|
+
/** Default shape of navigation rail items (pill, circle, sunny, flower, etc.) */
|
|
1745
|
+
shape?: NavigationItemShape;
|
|
1746
|
+
/** Default size (width & height) for square shape containers in px. Default: 56 */
|
|
1747
|
+
shapeSize?: number;
|
|
1748
|
+
/**
|
|
1749
|
+
* Default width behavior of the active indicator when expanded with pill shape.
|
|
1750
|
+
* - "hug" (default): hugs the icon + label contents (MD3 Expressive style)
|
|
1751
|
+
* - "fill": fills the full width of the container (baseline navigation drawer style)
|
|
1752
|
+
*/
|
|
1753
|
+
activeIndicatorWidth?: NavigationRailActiveIndicatorWidth;
|
|
1682
1754
|
header?: React$1.ReactNode;
|
|
1683
1755
|
fab?: React$1.ReactNode;
|
|
1684
1756
|
fabPlacement?: "contained" | "spatialized";
|
|
@@ -2811,18 +2883,17 @@ interface ToolbarToggleButtonProps extends Omit<HTMLMotionProps<"button">, "chil
|
|
|
2811
2883
|
*/
|
|
2812
2884
|
children?: React$1.ReactNode;
|
|
2813
2885
|
/**
|
|
2814
|
-
*
|
|
2815
|
-
*
|
|
2816
|
-
* @default
|
|
2886
|
+
* Enable symmetric spring expand on press.
|
|
2887
|
+
* The button expands equally to the left and right — matching ButtonDistribute behavior.
|
|
2888
|
+
* @default true
|
|
2817
2889
|
*/
|
|
2818
|
-
|
|
2890
|
+
pressExpand?: boolean;
|
|
2819
2891
|
/**
|
|
2820
|
-
*
|
|
2821
|
-
*
|
|
2822
|
-
*
|
|
2823
|
-
* @default 6
|
|
2892
|
+
* Fraction of the button width added symmetrically on press.
|
|
2893
|
+
* e.g. 0.06 → scaleX goes from 1.0 to 1.06 (3% each side).
|
|
2894
|
+
* @default 0.06
|
|
2824
2895
|
*/
|
|
2825
|
-
|
|
2896
|
+
pressExpandRatio?: number;
|
|
2826
2897
|
/**
|
|
2827
2898
|
* Enable MD3 state layer ripple effect on click.
|
|
2828
2899
|
* @default true
|
|
@@ -2838,8 +2909,10 @@ interface ToolbarToggleButtonProps extends Omit<HTMLMotionProps<"button">, "chil
|
|
|
2838
2909
|
* An MD3 pill-shaped toggle button with optional leading icon and text label.
|
|
2839
2910
|
*
|
|
2840
2911
|
* Meets MD3 Expressive touch-target requirements (48dp height minimum, ~95dp width).
|
|
2841
|
-
* Features Material Design 3 Expressive spring press animation
|
|
2842
|
-
*
|
|
2912
|
+
* Features Material Design 3 Expressive spring press animation:
|
|
2913
|
+
* - Symmetric horizontal expand (scaleX) with `FAST_SPATIAL_SPRING` (has bounce)
|
|
2914
|
+
* - Border-radius morphing via `BUTTON_RADIUS_SPRING` (fast.effects, no overshoot)
|
|
2915
|
+
* - Configurable ripple state layer
|
|
2843
2916
|
*
|
|
2844
2917
|
* @example
|
|
2845
2918
|
* ```tsx
|
|
@@ -2894,4 +2967,4 @@ declare const ToolbarToggleButtonTokens: {
|
|
|
2894
2967
|
readonly Gap: 8;
|
|
2895
2968
|
};
|
|
2896
2969
|
|
|
2897
|
-
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, type AppBarColors, AppBarColumn, type AppBarColumnProps, type AppBarItem, type AppBarItemType, type AppBarMenuState, AppBarOverflowIndicator, type AppBarOverflowIndicatorProps, AppBarRow, type AppBarRowProps, type AppBarScrollBehavior, AppBarTokens, type BaseAppBarProps, BottomAppBar, type BottomAppBarProps, BottomDockedToolbar, type BottomDockedToolbarProps, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, type ContextMenuContentProps, type ContextMenuProps, ContextMenuTrigger, type ContextMenuTriggerProps, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, type DockedToolbarProps, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, type FlexibleAppBarProps, type FloatingToolbarColors, type FloatingToolbarProps, type FloatingToolbarScrollBehavior, type FloatingToolbarWithFabProps, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, LargeFlexibleAppBar, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MediumFlexibleAppBar, Menu, type MenuColorVariant, MenuContent, type MenuContentProps, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupPosition, type MenuGroupProps, MenuItem, type MenuItemPosition, type MenuItemProps, type MenuPrimitive, type MenuProps, MenuProvider, MenuTrigger, type MenuTriggerProps, type MenuVariant, NavigationBar, NavigationBarComponent, NavigationBarItem, type NavigationBarItemLayout, type NavigationBarItemProps, type NavigationBarProps, type NavigationBarVariant, NavigationRail, NavigationRailItem, type NavigationRailItemProps, type NavigationRailLabelVisibility, type NavigationRailProps, type NavigationRailVariant, SEARCH_BAR_EXIT_SPRING, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Search, SearchAppBar, type SearchAppBarProps, SearchBar, type SearchBarVariant, type SearchProps, type SearchStyleType, SearchTokens, type SearchVariant, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, type SearchViewProps, SmallAppBar, type SmallAppBarProps, SubMenu, type SubMenuProps, Tab, type TabProps, Tabs, TabsColors, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTokens, type TabsVariant, type TitleAlignment, ToolbarDivider, type ToolbarDividerProps, ToolbarDividerTokens, ToolbarIconButton, type ToolbarIconButtonProps, type ToolbarIconButtonSize, ToolbarIconButtonTokens, type ToolbarIconButtonVariant, ToolbarToggleButton, type ToolbarToggleButtonProps, ToolbarToggleButtonTokens, type ToolbarVariant, type UseAppBarScrollReturn, type UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, type VerticalMenuContentProps, VerticalMenuDivider, type VerticalMenuDividerProps, VerticalMenuGroup, type VerticalMenuGroupProps, type VerticalMenuProps, type VerticalMenuSeparatorStyle, appBarTypography, getToolbarColors, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
|
|
2970
|
+
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, type AppBarColors, AppBarColumn, type AppBarColumnProps, type AppBarItem, type AppBarItemType, type AppBarMenuState, AppBarOverflowIndicator, type AppBarOverflowIndicatorProps, AppBarRow, type AppBarRowProps, type AppBarScrollBehavior, AppBarTokens, type BaseAppBarProps, BottomAppBar, type BottomAppBarProps, BottomDockedToolbar, type BottomDockedToolbarProps, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, type ContextMenuContentProps, type ContextMenuProps, ContextMenuTrigger, type ContextMenuTriggerProps, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, type DockedToolbarProps, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, type FlexibleAppBarProps, type FloatingToolbarColors, type FloatingToolbarProps, type FloatingToolbarScrollBehavior, type FloatingToolbarWithFabProps, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, LargeFlexibleAppBar, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MediumFlexibleAppBar, Menu, type MenuColorVariant, MenuContent, type MenuContentProps, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupPosition, type MenuGroupProps, MenuItem, type MenuItemPosition, type MenuItemProps, type MenuPrimitive, type MenuProps, MenuProvider, MenuTrigger, type MenuTriggerProps, type MenuVariant, NavigationBar, NavigationBarComponent, NavigationBarItem, type NavigationBarItemLayout, type NavigationBarItemProps, type NavigationBarLabelVisibility, type NavigationBarProps, type NavigationBarVariant, type NavigationItemShape, NavigationRail, type NavigationRailActiveIndicatorWidth, NavigationRailItem, type NavigationRailItemProps, type NavigationRailLabelVisibility, type NavigationRailProps, type NavigationRailVariant, SEARCH_BAR_EXIT_SPRING, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Search, SearchAppBar, type SearchAppBarProps, SearchBar, type SearchBarVariant, type SearchProps, type SearchStyleType, SearchTokens, type SearchVariant, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, type SearchViewProps, SmallAppBar, type SmallAppBarProps, SubMenu, type SubMenuProps, Tab, type TabProps, Tabs, TabsColors, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTokens, type TabsVariant, type TitleAlignment, ToolbarDivider, type ToolbarDividerProps, ToolbarDividerTokens, ToolbarIconButton, type ToolbarIconButtonProps, type ToolbarIconButtonSize, ToolbarIconButtonTokens, type ToolbarIconButtonVariant, ToolbarToggleButton, type ToolbarToggleButtonProps, ToolbarToggleButtonTokens, type ToolbarVariant, type UseAppBarScrollReturn, type UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, type VerticalMenuContentProps, VerticalMenuDivider, type VerticalMenuDividerProps, VerticalMenuGroup, type VerticalMenuGroupProps, type VerticalMenuProps, type VerticalMenuSeparatorStyle, appBarTypography, getNavigationShapeStyle, getToolbarColors, isSquareShape, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
|