@bug-on/m3-expressive 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/buttons.d.mts +2 -2
- package/dist/buttons.d.ts +2 -2
- package/dist/buttons.js +678 -605
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +677 -604
- package/dist/buttons.mjs.map +1 -1
- package/dist/core.js +86 -61
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +86 -61
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.js +85 -61
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +85 -61
- package/dist/feedback.mjs.map +1 -1
- package/dist/forms.d.mts +2 -2
- package/dist/forms.d.ts +2 -2
- package/dist/forms.js +70 -8
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +70 -8
- package/dist/forms.mjs.map +1 -1
- package/dist/{icon-button-D-gs0gfj.d.mts → icon-button-sSt6PPLg.d.mts} +6 -0
- package/dist/{icon-button-D-gs0gfj.d.ts → icon-button-sSt6PPLg.d.ts} +6 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +973 -496
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +967 -497
- package/dist/index.mjs.map +1 -1
- package/dist/layout.d.mts +18 -1
- package/dist/layout.d.ts +18 -1
- package/dist/layout.js +65 -8
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +65 -8
- package/dist/layout.mjs.map +1 -1
- package/dist/navigation.d.mts +134 -9
- package/dist/navigation.d.ts +134 -9
- package/dist/navigation.js +403 -93
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +397 -94
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.js +214 -189
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +176 -151
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.js +222 -197
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +189 -164
- package/dist/pickers.mjs.map +1 -1
- package/dist/{split-button-trailing-uncheckable-BkPbiBo3.d.ts → split-button-trailing-uncheckable-BcPD_7uK.d.ts} +44 -6
- package/dist/{split-button-trailing-uncheckable-D_PLPb-u.d.mts → split-button-trailing-uncheckable-DtFJkTFr.d.mts} +44 -6
- package/dist/{text-field-eAIpz9z1.d.mts → text-field-T4Rg-9Bw.d.mts} +7 -0
- package/dist/{text-field-eAIpz9z1.d.ts → text-field-T4Rg-9Bw.d.ts} +7 -0
- package/package.json +1 -1
package/dist/navigation.d.mts
CHANGED
|
@@ -4,8 +4,8 @@ import { RefObject } from 'react';
|
|
|
4
4
|
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
|
-
import { Transition, Variants } from 'motion/react';
|
|
8
|
-
import { B as BaseIconButtonProps } from './icon-button-
|
|
7
|
+
import { Transition, Variants, HTMLMotionProps } from 'motion/react';
|
|
8
|
+
import { B as BaseIconButtonProps } from './icon-button-sSt6PPLg.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @file app-bar.tokens.ts
|
|
@@ -1649,6 +1649,8 @@ interface NavigationBarProps {
|
|
|
1649
1649
|
activeIndicatorTransition?: Transition;
|
|
1650
1650
|
/** Navigation items */
|
|
1651
1651
|
children: React$1.ReactNode;
|
|
1652
|
+
/** Optional additional classes for individual navigation items */
|
|
1653
|
+
itemClassName?: string;
|
|
1652
1654
|
/** Optional additional classes */
|
|
1653
1655
|
className?: string;
|
|
1654
1656
|
/** Optional inline styles */
|
|
@@ -2383,6 +2385,11 @@ declare const TabsList: React$1.NamedExoticComponent<TabsListProps & React$1.Ref
|
|
|
2383
2385
|
* Color configuration types and standard values for the FloatingToolbar component.
|
|
2384
2386
|
* Maps MD3 design tokens to CSS custom properties used in Tailwind CSS.
|
|
2385
2387
|
*/
|
|
2388
|
+
/**
|
|
2389
|
+
* Color configuration types and standard values for the FloatingToolbar component.
|
|
2390
|
+
* Maps MD3 design tokens to CSS custom properties used in Tailwind CSS.
|
|
2391
|
+
*/
|
|
2392
|
+
type ToolbarVariant = "standard" | "vibrant" | "surface-high" | "surface-highest" | "tertiary" | "xr";
|
|
2386
2393
|
interface FloatingToolbarColors {
|
|
2387
2394
|
/** The background color of the toolbar container */
|
|
2388
2395
|
toolbarContainerColor?: string;
|
|
@@ -2403,10 +2410,31 @@ declare const standardFloatingToolbarColors: FloatingToolbarColors;
|
|
|
2403
2410
|
* Uses primary container for the toolbar and tertiary container for the FAB.
|
|
2404
2411
|
*/
|
|
2405
2412
|
declare const vibrantFloatingToolbarColors: FloatingToolbarColors;
|
|
2413
|
+
/**
|
|
2414
|
+
* Surface Container High color configuration for the toolbar (XR / Elevated).
|
|
2415
|
+
*/
|
|
2416
|
+
declare const surfaceContainerHighFloatingToolbarColors: FloatingToolbarColors;
|
|
2417
|
+
/**
|
|
2418
|
+
* Surface Container Highest color configuration for the toolbar (XR / Elevated).
|
|
2419
|
+
*/
|
|
2420
|
+
declare const surfaceContainerHighestFloatingToolbarColors: FloatingToolbarColors;
|
|
2421
|
+
/**
|
|
2422
|
+
* Tertiary Container color configuration for the toolbar.
|
|
2423
|
+
*/
|
|
2424
|
+
declare const tertiaryContainerFloatingToolbarColors: FloatingToolbarColors;
|
|
2425
|
+
/**
|
|
2426
|
+
* XR Glassmorphic color configuration for the toolbar.
|
|
2427
|
+
* Uses semi-transparent surface container high with backdrop blur.
|
|
2428
|
+
*/
|
|
2429
|
+
declare const xrFloatingToolbarColors: FloatingToolbarColors;
|
|
2430
|
+
/**
|
|
2431
|
+
* Helper function to resolve FloatingToolbarColors based on variant prop or custom override.
|
|
2432
|
+
*/
|
|
2433
|
+
declare function getToolbarColors(variant?: ToolbarVariant, customColors?: FloatingToolbarColors): FloatingToolbarColors;
|
|
2406
2434
|
|
|
2407
2435
|
interface BottomDockedToolbarProps {
|
|
2408
|
-
/** Color variant: standard or
|
|
2409
|
-
variant?:
|
|
2436
|
+
/** Color variant: standard, vibrant, surface-high, surface-highest, tertiary, or xr */
|
|
2437
|
+
variant?: ToolbarVariant;
|
|
2410
2438
|
/** Custom colors override */
|
|
2411
2439
|
colors?: FloatingToolbarColors;
|
|
2412
2440
|
/** Whether to hide on scroll */
|
|
@@ -2517,7 +2545,9 @@ interface FloatingToolbarProps {
|
|
|
2517
2545
|
expanded: boolean;
|
|
2518
2546
|
/** Orientation of the toolbar */
|
|
2519
2547
|
orientation?: "horizontal" | "vertical";
|
|
2520
|
-
/** Color
|
|
2548
|
+
/** Color variant: standard, vibrant, surface-high, surface-highest, tertiary, or xr */
|
|
2549
|
+
variant?: ToolbarVariant;
|
|
2550
|
+
/** Color configuration override */
|
|
2521
2551
|
colors?: FloatingToolbarColors;
|
|
2522
2552
|
/** Shape variant: full = pill shape (default), large = large rounded */
|
|
2523
2553
|
shape?: "full" | "large";
|
|
@@ -2681,6 +2711,14 @@ interface ToolbarIconButtonProps extends Omit<BaseIconButtonProps, "colorStyle"
|
|
|
2681
2711
|
* @default "default"
|
|
2682
2712
|
*/
|
|
2683
2713
|
toolbarSize?: ToolbarIconButtonSize;
|
|
2714
|
+
/**
|
|
2715
|
+
* Whether the icon button is in a selected/active toggle state.
|
|
2716
|
+
*/
|
|
2717
|
+
selected?: boolean;
|
|
2718
|
+
/**
|
|
2719
|
+
* Change the default rendered element to the one passed as a child, merging their props and behavior.
|
|
2720
|
+
*/
|
|
2721
|
+
asChild?: boolean;
|
|
2684
2722
|
/** Icon content — typically a single SVG icon component. */
|
|
2685
2723
|
children: React$1.ReactNode;
|
|
2686
2724
|
/**
|
|
@@ -2716,6 +2754,8 @@ type ToolbarIconButtonVariant = "standard" | "tonal" | "filled";
|
|
|
2716
2754
|
* Wraps the project's `IconButton` and adds:
|
|
2717
2755
|
* - Three emphasis styles (`standard`, `tonal`, `filled`) via `emphasis` prop.
|
|
2718
2756
|
* - Three width sizes (`narrow`, `default`, `wide`) for visual hierarchy.
|
|
2757
|
+
* - Support for `selected` state (Toggleable Icon Button per MD3 spec).
|
|
2758
|
+
* - Support for `asChild` slot delegation.
|
|
2719
2759
|
* - Always `rounded-full` shape (required for floating toolbars per MD3 spec).
|
|
2720
2760
|
* - Always 48dp height to meet MD3 accessibility touch-target requirements.
|
|
2721
2761
|
*
|
|
@@ -2726,9 +2766,9 @@ type ToolbarIconButtonVariant = "standard" | "tonal" | "filled";
|
|
|
2726
2766
|
* <ShareIcon />
|
|
2727
2767
|
* </ToolbarIconButton>
|
|
2728
2768
|
*
|
|
2729
|
-
* //
|
|
2730
|
-
* <ToolbarIconButton
|
|
2731
|
-
* <
|
|
2769
|
+
* // Toggleable state
|
|
2770
|
+
* <ToolbarIconButton selected={isSelected} aria-label="Bookmark" onClick={() => setIsSelected(!isSelected)}>
|
|
2771
|
+
* <BookmarkIcon />
|
|
2732
2772
|
* </ToolbarIconButton>
|
|
2733
2773
|
* ```
|
|
2734
2774
|
*
|
|
@@ -2736,6 +2776,80 @@ type ToolbarIconButtonVariant = "standard" | "tonal" | "filled";
|
|
|
2736
2776
|
*/
|
|
2737
2777
|
declare const ToolbarIconButton: React$1.ForwardRefExoticComponent<Omit<ToolbarIconButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2738
2778
|
|
|
2779
|
+
/**
|
|
2780
|
+
* @file toolbar-toggle-button.tsx
|
|
2781
|
+
*
|
|
2782
|
+
* An MD3 Expressive toggle button with icon and text label for Toolbar slots.
|
|
2783
|
+
* Implements the 'Button toggleable' building block from MD3 Toolbar guidelines.
|
|
2784
|
+
*
|
|
2785
|
+
* @see https://m3.material.io/components/toolbars/guidelines (Anatomy → Flexibility & slots)
|
|
2786
|
+
*/
|
|
2787
|
+
|
|
2788
|
+
interface ToolbarToggleButtonProps extends Omit<HTMLMotionProps<"button">, "children"> {
|
|
2789
|
+
/**
|
|
2790
|
+
* Visual emphasis variant.
|
|
2791
|
+
* @default "standard"
|
|
2792
|
+
*/
|
|
2793
|
+
emphasis?: "standard" | "tonal" | "filled";
|
|
2794
|
+
/**
|
|
2795
|
+
* Whether the button is in a selected/active state.
|
|
2796
|
+
* @default false
|
|
2797
|
+
*/
|
|
2798
|
+
selected?: boolean;
|
|
2799
|
+
/**
|
|
2800
|
+
* Leading icon component or node.
|
|
2801
|
+
*/
|
|
2802
|
+
icon?: React$1.ReactNode;
|
|
2803
|
+
/**
|
|
2804
|
+
* Button text label / content.
|
|
2805
|
+
*/
|
|
2806
|
+
children?: React$1.ReactNode;
|
|
2807
|
+
/**
|
|
2808
|
+
* Scale compression factor when pressed/clicked.
|
|
2809
|
+
* MD3 Expressive default: 0.95.
|
|
2810
|
+
* @default 0.95
|
|
2811
|
+
*/
|
|
2812
|
+
pressScale?: number;
|
|
2813
|
+
/**
|
|
2814
|
+
* Horizontal spring bounce offset (in px) when pressed/clicked.
|
|
2815
|
+
* Oscillates left and right then contracts back to center.
|
|
2816
|
+
* Set to 0 to disable horizontal bounce.
|
|
2817
|
+
* @default 6
|
|
2818
|
+
*/
|
|
2819
|
+
pressBounceOffset?: number;
|
|
2820
|
+
/**
|
|
2821
|
+
* Enable MD3 state layer ripple effect on click.
|
|
2822
|
+
* @default true
|
|
2823
|
+
*/
|
|
2824
|
+
ripple?: boolean;
|
|
2825
|
+
/**
|
|
2826
|
+
* Delegation prop to merge props onto a child element (Radix Slot).
|
|
2827
|
+
*/
|
|
2828
|
+
asChild?: boolean;
|
|
2829
|
+
className?: string;
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* An MD3 pill-shaped toggle button with optional leading icon and text label.
|
|
2833
|
+
*
|
|
2834
|
+
* Meets MD3 Expressive touch-target requirements (48dp height minimum, ~95dp width).
|
|
2835
|
+
* Features Material Design 3 Expressive spring press animation (`FAST_SPATIAL_SPRING`),
|
|
2836
|
+
* horizontal spring bounce oscillation (left-right bounce), and configurable ripple state layer.
|
|
2837
|
+
*
|
|
2838
|
+
* @example
|
|
2839
|
+
* ```tsx
|
|
2840
|
+
* const [selected, setSelected] = useState(false);
|
|
2841
|
+
*
|
|
2842
|
+
* <ToolbarToggleButton
|
|
2843
|
+
* selected={selected}
|
|
2844
|
+
* onClick={() => setSelected(!selected)}
|
|
2845
|
+
* icon={<EditIcon />}
|
|
2846
|
+
* >
|
|
2847
|
+
* Edit
|
|
2848
|
+
* </ToolbarToggleButton>
|
|
2849
|
+
* ```
|
|
2850
|
+
*/
|
|
2851
|
+
declare const ToolbarToggleButton: React$1.ForwardRefExoticComponent<Omit<ToolbarToggleButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2852
|
+
|
|
2739
2853
|
/**
|
|
2740
2854
|
* Design tokens for the ToolbarDivider component.
|
|
2741
2855
|
* The divider is a decorative separator used to group toolbar actions.
|
|
@@ -2762,5 +2876,16 @@ declare const ToolbarIconButtonTokens: {
|
|
|
2762
2876
|
/** Icon size in dp — larger than standard 24dp to fill the 48dp button properly */
|
|
2763
2877
|
readonly IconSize: 28;
|
|
2764
2878
|
};
|
|
2879
|
+
/**
|
|
2880
|
+
* Design tokens for the ToolbarToggleButton component.
|
|
2881
|
+
* Follows MD3 Expressive 'Button toggleable' building block specifications.
|
|
2882
|
+
*/
|
|
2883
|
+
declare const ToolbarToggleButtonTokens: {
|
|
2884
|
+
readonly Height: 48;
|
|
2885
|
+
readonly MinWidth: 95;
|
|
2886
|
+
readonly IconSize: 24;
|
|
2887
|
+
readonly PaddingX: 16;
|
|
2888
|
+
readonly Gap: 8;
|
|
2889
|
+
};
|
|
2765
2890
|
|
|
2766
|
-
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, type UseAppBarScrollReturn, type UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, type VerticalMenuContentProps, VerticalMenuDivider, type VerticalMenuDividerProps, VerticalMenuGroup, type VerticalMenuGroupProps, type VerticalMenuProps, type VerticalMenuSeparatorStyle, appBarTypography, standardFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors };
|
|
2891
|
+
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 };
|
package/dist/navigation.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { RefObject } from 'react';
|
|
|
4
4
|
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
|
-
import { Transition, Variants } from 'motion/react';
|
|
8
|
-
import { B as BaseIconButtonProps } from './icon-button-
|
|
7
|
+
import { Transition, Variants, HTMLMotionProps } from 'motion/react';
|
|
8
|
+
import { B as BaseIconButtonProps } from './icon-button-sSt6PPLg.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @file app-bar.tokens.ts
|
|
@@ -1649,6 +1649,8 @@ interface NavigationBarProps {
|
|
|
1649
1649
|
activeIndicatorTransition?: Transition;
|
|
1650
1650
|
/** Navigation items */
|
|
1651
1651
|
children: React$1.ReactNode;
|
|
1652
|
+
/** Optional additional classes for individual navigation items */
|
|
1653
|
+
itemClassName?: string;
|
|
1652
1654
|
/** Optional additional classes */
|
|
1653
1655
|
className?: string;
|
|
1654
1656
|
/** Optional inline styles */
|
|
@@ -2383,6 +2385,11 @@ declare const TabsList: React$1.NamedExoticComponent<TabsListProps & React$1.Ref
|
|
|
2383
2385
|
* Color configuration types and standard values for the FloatingToolbar component.
|
|
2384
2386
|
* Maps MD3 design tokens to CSS custom properties used in Tailwind CSS.
|
|
2385
2387
|
*/
|
|
2388
|
+
/**
|
|
2389
|
+
* Color configuration types and standard values for the FloatingToolbar component.
|
|
2390
|
+
* Maps MD3 design tokens to CSS custom properties used in Tailwind CSS.
|
|
2391
|
+
*/
|
|
2392
|
+
type ToolbarVariant = "standard" | "vibrant" | "surface-high" | "surface-highest" | "tertiary" | "xr";
|
|
2386
2393
|
interface FloatingToolbarColors {
|
|
2387
2394
|
/** The background color of the toolbar container */
|
|
2388
2395
|
toolbarContainerColor?: string;
|
|
@@ -2403,10 +2410,31 @@ declare const standardFloatingToolbarColors: FloatingToolbarColors;
|
|
|
2403
2410
|
* Uses primary container for the toolbar and tertiary container for the FAB.
|
|
2404
2411
|
*/
|
|
2405
2412
|
declare const vibrantFloatingToolbarColors: FloatingToolbarColors;
|
|
2413
|
+
/**
|
|
2414
|
+
* Surface Container High color configuration for the toolbar (XR / Elevated).
|
|
2415
|
+
*/
|
|
2416
|
+
declare const surfaceContainerHighFloatingToolbarColors: FloatingToolbarColors;
|
|
2417
|
+
/**
|
|
2418
|
+
* Surface Container Highest color configuration for the toolbar (XR / Elevated).
|
|
2419
|
+
*/
|
|
2420
|
+
declare const surfaceContainerHighestFloatingToolbarColors: FloatingToolbarColors;
|
|
2421
|
+
/**
|
|
2422
|
+
* Tertiary Container color configuration for the toolbar.
|
|
2423
|
+
*/
|
|
2424
|
+
declare const tertiaryContainerFloatingToolbarColors: FloatingToolbarColors;
|
|
2425
|
+
/**
|
|
2426
|
+
* XR Glassmorphic color configuration for the toolbar.
|
|
2427
|
+
* Uses semi-transparent surface container high with backdrop blur.
|
|
2428
|
+
*/
|
|
2429
|
+
declare const xrFloatingToolbarColors: FloatingToolbarColors;
|
|
2430
|
+
/**
|
|
2431
|
+
* Helper function to resolve FloatingToolbarColors based on variant prop or custom override.
|
|
2432
|
+
*/
|
|
2433
|
+
declare function getToolbarColors(variant?: ToolbarVariant, customColors?: FloatingToolbarColors): FloatingToolbarColors;
|
|
2406
2434
|
|
|
2407
2435
|
interface BottomDockedToolbarProps {
|
|
2408
|
-
/** Color variant: standard or
|
|
2409
|
-
variant?:
|
|
2436
|
+
/** Color variant: standard, vibrant, surface-high, surface-highest, tertiary, or xr */
|
|
2437
|
+
variant?: ToolbarVariant;
|
|
2410
2438
|
/** Custom colors override */
|
|
2411
2439
|
colors?: FloatingToolbarColors;
|
|
2412
2440
|
/** Whether to hide on scroll */
|
|
@@ -2517,7 +2545,9 @@ interface FloatingToolbarProps {
|
|
|
2517
2545
|
expanded: boolean;
|
|
2518
2546
|
/** Orientation of the toolbar */
|
|
2519
2547
|
orientation?: "horizontal" | "vertical";
|
|
2520
|
-
/** Color
|
|
2548
|
+
/** Color variant: standard, vibrant, surface-high, surface-highest, tertiary, or xr */
|
|
2549
|
+
variant?: ToolbarVariant;
|
|
2550
|
+
/** Color configuration override */
|
|
2521
2551
|
colors?: FloatingToolbarColors;
|
|
2522
2552
|
/** Shape variant: full = pill shape (default), large = large rounded */
|
|
2523
2553
|
shape?: "full" | "large";
|
|
@@ -2681,6 +2711,14 @@ interface ToolbarIconButtonProps extends Omit<BaseIconButtonProps, "colorStyle"
|
|
|
2681
2711
|
* @default "default"
|
|
2682
2712
|
*/
|
|
2683
2713
|
toolbarSize?: ToolbarIconButtonSize;
|
|
2714
|
+
/**
|
|
2715
|
+
* Whether the icon button is in a selected/active toggle state.
|
|
2716
|
+
*/
|
|
2717
|
+
selected?: boolean;
|
|
2718
|
+
/**
|
|
2719
|
+
* Change the default rendered element to the one passed as a child, merging their props and behavior.
|
|
2720
|
+
*/
|
|
2721
|
+
asChild?: boolean;
|
|
2684
2722
|
/** Icon content — typically a single SVG icon component. */
|
|
2685
2723
|
children: React$1.ReactNode;
|
|
2686
2724
|
/**
|
|
@@ -2716,6 +2754,8 @@ type ToolbarIconButtonVariant = "standard" | "tonal" | "filled";
|
|
|
2716
2754
|
* Wraps the project's `IconButton` and adds:
|
|
2717
2755
|
* - Three emphasis styles (`standard`, `tonal`, `filled`) via `emphasis` prop.
|
|
2718
2756
|
* - Three width sizes (`narrow`, `default`, `wide`) for visual hierarchy.
|
|
2757
|
+
* - Support for `selected` state (Toggleable Icon Button per MD3 spec).
|
|
2758
|
+
* - Support for `asChild` slot delegation.
|
|
2719
2759
|
* - Always `rounded-full` shape (required for floating toolbars per MD3 spec).
|
|
2720
2760
|
* - Always 48dp height to meet MD3 accessibility touch-target requirements.
|
|
2721
2761
|
*
|
|
@@ -2726,9 +2766,9 @@ type ToolbarIconButtonVariant = "standard" | "tonal" | "filled";
|
|
|
2726
2766
|
* <ShareIcon />
|
|
2727
2767
|
* </ToolbarIconButton>
|
|
2728
2768
|
*
|
|
2729
|
-
* //
|
|
2730
|
-
* <ToolbarIconButton
|
|
2731
|
-
* <
|
|
2769
|
+
* // Toggleable state
|
|
2770
|
+
* <ToolbarIconButton selected={isSelected} aria-label="Bookmark" onClick={() => setIsSelected(!isSelected)}>
|
|
2771
|
+
* <BookmarkIcon />
|
|
2732
2772
|
* </ToolbarIconButton>
|
|
2733
2773
|
* ```
|
|
2734
2774
|
*
|
|
@@ -2736,6 +2776,80 @@ type ToolbarIconButtonVariant = "standard" | "tonal" | "filled";
|
|
|
2736
2776
|
*/
|
|
2737
2777
|
declare const ToolbarIconButton: React$1.ForwardRefExoticComponent<Omit<ToolbarIconButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2738
2778
|
|
|
2779
|
+
/**
|
|
2780
|
+
* @file toolbar-toggle-button.tsx
|
|
2781
|
+
*
|
|
2782
|
+
* An MD3 Expressive toggle button with icon and text label for Toolbar slots.
|
|
2783
|
+
* Implements the 'Button toggleable' building block from MD3 Toolbar guidelines.
|
|
2784
|
+
*
|
|
2785
|
+
* @see https://m3.material.io/components/toolbars/guidelines (Anatomy → Flexibility & slots)
|
|
2786
|
+
*/
|
|
2787
|
+
|
|
2788
|
+
interface ToolbarToggleButtonProps extends Omit<HTMLMotionProps<"button">, "children"> {
|
|
2789
|
+
/**
|
|
2790
|
+
* Visual emphasis variant.
|
|
2791
|
+
* @default "standard"
|
|
2792
|
+
*/
|
|
2793
|
+
emphasis?: "standard" | "tonal" | "filled";
|
|
2794
|
+
/**
|
|
2795
|
+
* Whether the button is in a selected/active state.
|
|
2796
|
+
* @default false
|
|
2797
|
+
*/
|
|
2798
|
+
selected?: boolean;
|
|
2799
|
+
/**
|
|
2800
|
+
* Leading icon component or node.
|
|
2801
|
+
*/
|
|
2802
|
+
icon?: React$1.ReactNode;
|
|
2803
|
+
/**
|
|
2804
|
+
* Button text label / content.
|
|
2805
|
+
*/
|
|
2806
|
+
children?: React$1.ReactNode;
|
|
2807
|
+
/**
|
|
2808
|
+
* Scale compression factor when pressed/clicked.
|
|
2809
|
+
* MD3 Expressive default: 0.95.
|
|
2810
|
+
* @default 0.95
|
|
2811
|
+
*/
|
|
2812
|
+
pressScale?: number;
|
|
2813
|
+
/**
|
|
2814
|
+
* Horizontal spring bounce offset (in px) when pressed/clicked.
|
|
2815
|
+
* Oscillates left and right then contracts back to center.
|
|
2816
|
+
* Set to 0 to disable horizontal bounce.
|
|
2817
|
+
* @default 6
|
|
2818
|
+
*/
|
|
2819
|
+
pressBounceOffset?: number;
|
|
2820
|
+
/**
|
|
2821
|
+
* Enable MD3 state layer ripple effect on click.
|
|
2822
|
+
* @default true
|
|
2823
|
+
*/
|
|
2824
|
+
ripple?: boolean;
|
|
2825
|
+
/**
|
|
2826
|
+
* Delegation prop to merge props onto a child element (Radix Slot).
|
|
2827
|
+
*/
|
|
2828
|
+
asChild?: boolean;
|
|
2829
|
+
className?: string;
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* An MD3 pill-shaped toggle button with optional leading icon and text label.
|
|
2833
|
+
*
|
|
2834
|
+
* Meets MD3 Expressive touch-target requirements (48dp height minimum, ~95dp width).
|
|
2835
|
+
* Features Material Design 3 Expressive spring press animation (`FAST_SPATIAL_SPRING`),
|
|
2836
|
+
* horizontal spring bounce oscillation (left-right bounce), and configurable ripple state layer.
|
|
2837
|
+
*
|
|
2838
|
+
* @example
|
|
2839
|
+
* ```tsx
|
|
2840
|
+
* const [selected, setSelected] = useState(false);
|
|
2841
|
+
*
|
|
2842
|
+
* <ToolbarToggleButton
|
|
2843
|
+
* selected={selected}
|
|
2844
|
+
* onClick={() => setSelected(!selected)}
|
|
2845
|
+
* icon={<EditIcon />}
|
|
2846
|
+
* >
|
|
2847
|
+
* Edit
|
|
2848
|
+
* </ToolbarToggleButton>
|
|
2849
|
+
* ```
|
|
2850
|
+
*/
|
|
2851
|
+
declare const ToolbarToggleButton: React$1.ForwardRefExoticComponent<Omit<ToolbarToggleButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2852
|
+
|
|
2739
2853
|
/**
|
|
2740
2854
|
* Design tokens for the ToolbarDivider component.
|
|
2741
2855
|
* The divider is a decorative separator used to group toolbar actions.
|
|
@@ -2762,5 +2876,16 @@ declare const ToolbarIconButtonTokens: {
|
|
|
2762
2876
|
/** Icon size in dp — larger than standard 24dp to fill the 48dp button properly */
|
|
2763
2877
|
readonly IconSize: 28;
|
|
2764
2878
|
};
|
|
2879
|
+
/**
|
|
2880
|
+
* Design tokens for the ToolbarToggleButton component.
|
|
2881
|
+
* Follows MD3 Expressive 'Button toggleable' building block specifications.
|
|
2882
|
+
*/
|
|
2883
|
+
declare const ToolbarToggleButtonTokens: {
|
|
2884
|
+
readonly Height: 48;
|
|
2885
|
+
readonly MinWidth: 95;
|
|
2886
|
+
readonly IconSize: 24;
|
|
2887
|
+
readonly PaddingX: 16;
|
|
2888
|
+
readonly Gap: 8;
|
|
2889
|
+
};
|
|
2765
2890
|
|
|
2766
|
-
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, type UseAppBarScrollReturn, type UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, type VerticalMenuContentProps, VerticalMenuDivider, type VerticalMenuDividerProps, VerticalMenuGroup, type VerticalMenuGroupProps, type VerticalMenuProps, type VerticalMenuSeparatorStyle, appBarTypography, standardFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors };
|
|
2891
|
+
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 };
|