@bug-on/md3-react 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useClickOutside.d.ts +8 -0
- package/dist/index.css +23 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11316 -9210
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11262 -9187
- package/dist/index.mjs.map +1 -1
- package/dist/ui/app-bar/app-bar-column.d.ts +28 -0
- package/dist/ui/app-bar/app-bar-item-button.d.ts +16 -0
- package/dist/ui/app-bar/app-bar-overflow-indicator.d.ts +18 -0
- package/dist/ui/app-bar/app-bar-row.d.ts +36 -0
- package/dist/ui/app-bar/app-bar.tokens.d.ts +184 -0
- package/dist/ui/app-bar/app-bar.types.d.ts +392 -0
- package/dist/ui/app-bar/bottom-app-bar.d.ts +31 -0
- package/dist/ui/app-bar/docked-toolbar.d.ts +25 -0
- package/dist/ui/app-bar/hooks/use-app-bar-scroll.d.ts +42 -0
- package/dist/ui/app-bar/hooks/use-flexible-app-bar.d.ts +37 -0
- package/dist/ui/app-bar/index.d.ts +39 -0
- package/dist/ui/app-bar/large-flexible-app-bar.d.ts +26 -0
- package/dist/ui/app-bar/medium-flexible-app-bar.d.ts +28 -0
- package/dist/ui/app-bar/search-app-bar.d.ts +43 -0
- package/dist/ui/app-bar/search-view.d.ts +54 -0
- package/dist/ui/app-bar/small-app-bar.d.ts +37 -0
- package/dist/ui/search/animated-placeholder.d.ts +54 -0
- package/dist/ui/search/hooks/use-search-keyboard.d.ts +32 -0
- package/dist/ui/search/hooks/use-search-view-focus.d.ts +6 -0
- package/dist/ui/search/index.d.ts +27 -0
- package/dist/ui/search/search-bar.d.ts +32 -0
- package/dist/ui/search/search-context.d.ts +24 -0
- package/dist/ui/search/search-view-docked.d.ts +25 -0
- package/dist/ui/search/search-view-fullscreen.d.ts +36 -0
- package/dist/ui/search/search.d.ts +50 -0
- package/dist/ui/search/search.tokens.d.ts +112 -0
- package/dist/ui/search/search.types.d.ts +131 -0
- package/dist/ui/search/trailing-action.d.ts +9 -0
- package/dist/ui/snackbar/snackbar.d.ts +1 -0
- package/dist/ui/theme-provider/index.d.ts +31 -1
- package/dist/ui/toc.d.ts +7 -1
- package/package.json +2 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file search.tsx
|
|
3
|
+
* MD3 Expressive Search — Orchestrator component.
|
|
4
|
+
*
|
|
5
|
+
* Composes SearchBar (collapsed) + SearchView (expanded) into a single
|
|
6
|
+
* developer-facing API. Routes to the correct SearchView variant based on props.
|
|
7
|
+
*
|
|
8
|
+
* Developer usage:
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const [query, setQuery] = useState("");
|
|
11
|
+
* const [active, setActive] = useState(false);
|
|
12
|
+
*
|
|
13
|
+
* <Search
|
|
14
|
+
* query={query}
|
|
15
|
+
* onQueryChange={setQuery}
|
|
16
|
+
* onSearch={(q) => doSearch(q)}
|
|
17
|
+
* active={active}
|
|
18
|
+
* onActiveChange={setActive}
|
|
19
|
+
* variant="docked"
|
|
20
|
+
* styleType="contained"
|
|
21
|
+
* >
|
|
22
|
+
* {results.map((r) => (
|
|
23
|
+
* <div key={r.id} id={`${YOUR_LISTBOX_ID}-option-0`} role="option">
|
|
24
|
+
* {r.label}
|
|
25
|
+
* </div>
|
|
26
|
+
* ))}
|
|
27
|
+
* </Search>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
import type { SearchProps } from "./search.types";
|
|
31
|
+
import { useSearch } from "./search-context";
|
|
32
|
+
/**
|
|
33
|
+
* MD3 Expressive Search — Orchestrator component.
|
|
34
|
+
*
|
|
35
|
+
* Renders a SearchBar (collapsed pill) and the appropriate SearchView
|
|
36
|
+
* (docked popup or fullscreen overlay) based on `variant`.
|
|
37
|
+
*
|
|
38
|
+
* The component is fully controlled:
|
|
39
|
+
* - `active` / `onActiveChange` manage open/close state.
|
|
40
|
+
* - `query` / `onQueryChange` manage input value.
|
|
41
|
+
*
|
|
42
|
+
* Shared `searchId` (React.useId) links SearchBar and SearchView via
|
|
43
|
+
* Framer Motion `layoutId` for seamless animated transitions.
|
|
44
|
+
*/
|
|
45
|
+
declare function SearchComponent({ query, onQueryChange, onSearch, active, onActiveChange, variant, styleType, hasGap, leadingIcon, trailingIcon, placeholder, textAlign, children, id, "aria-label": ariaLabel, className, viewClassName, }: SearchProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
/** MD3 Expressive Search component with `Search.useSearch` context accessor. */
|
|
47
|
+
export declare const Search: typeof SearchComponent & {
|
|
48
|
+
useSearch: typeof useSearch;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file search.tokens.ts
|
|
3
|
+
* MD3 Expressive Search — Design tokens ported from:
|
|
4
|
+
* - SearchBarTokens.kt (v0_210)
|
|
5
|
+
* - SearchViewTokens.kt (v0_210)
|
|
6
|
+
*
|
|
7
|
+
* All dimensional values are in px (1dp = 1px on web).
|
|
8
|
+
* Colors reference CSS custom properties — do NOT hardcode hex.
|
|
9
|
+
* @see docs/m3/search/SearchBarTokens.kt
|
|
10
|
+
* @see docs/m3/search/SearchViewTokens.kt
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Height and shape tokens for Search variants.
|
|
14
|
+
* Maps directly from MD3 Kotlin token files.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SearchTokens: {
|
|
17
|
+
readonly heights: {
|
|
18
|
+
/** SearchBarTokens.ContainerHeight = 56dp */
|
|
19
|
+
readonly bar: 56;
|
|
20
|
+
/** SearchViewTokens.DockedHeaderContainerHeight = 56dp */
|
|
21
|
+
readonly dockedHeader: 56;
|
|
22
|
+
/** SearchViewTokens.FullScreenHeaderContainerHeight = 72dp */
|
|
23
|
+
readonly fullScreenHeader: 72;
|
|
24
|
+
};
|
|
25
|
+
/** SearchBarTokens.AvatarSize = 30dp */
|
|
26
|
+
readonly avatarSize: 30;
|
|
27
|
+
/** Standard icon size for leading/trailing icons. */
|
|
28
|
+
readonly iconSize: 20;
|
|
29
|
+
/** Touch target for interactive icons per MD3 a11y spec. */
|
|
30
|
+
readonly iconTouchTarget: 48;
|
|
31
|
+
/** Gap between SearchBar and results list when hasGap=true. */
|
|
32
|
+
readonly dropdownGap: 2;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* CSS custom property references for Search colors.
|
|
36
|
+
* Maps to --md-sys-color-* tokens in the MD3 theme system.
|
|
37
|
+
*
|
|
38
|
+
* SearchBarTokens.kt:
|
|
39
|
+
* - ContainerColor → SurfaceContainerHigh
|
|
40
|
+
* - LeadingIconColor → OnSurface
|
|
41
|
+
* - TrailingIconColor → OnSurfaceVariant
|
|
42
|
+
* - InputTextColor → OnSurface
|
|
43
|
+
* - SupportingTextColor → OnSurfaceVariant (placeholder)
|
|
44
|
+
*
|
|
45
|
+
* SearchViewTokens.kt:
|
|
46
|
+
* - ContainerColor → SurfaceContainerHigh
|
|
47
|
+
* - DividerColor → Outline
|
|
48
|
+
*/
|
|
49
|
+
export declare const SEARCH_COLORS: {
|
|
50
|
+
/** SearchBarTokens.ContainerColor → surface-container-high */
|
|
51
|
+
readonly container: "var(--md-sys-color-surface-container-high)";
|
|
52
|
+
/** SearchBarTokens.LeadingIconColor → on-surface */
|
|
53
|
+
readonly leadingIcon: "var(--md-sys-color-on-surface)";
|
|
54
|
+
/** SearchBarTokens.TrailingIconColor → on-surface-variant */
|
|
55
|
+
readonly trailingIcon: "var(--md-sys-color-on-surface-variant)";
|
|
56
|
+
/** SearchBarTokens.InputTextColor → on-surface */
|
|
57
|
+
readonly inputText: "var(--md-sys-color-on-surface)";
|
|
58
|
+
/** SearchBarTokens.SupportingTextColor → on-surface-variant (placeholder) */
|
|
59
|
+
readonly supportingText: "var(--md-sys-color-on-surface-variant)";
|
|
60
|
+
/** SearchViewTokens.DividerColor → outline */
|
|
61
|
+
readonly divider: "var(--md-sys-color-outline)";
|
|
62
|
+
/** Focus indicator → secondary */
|
|
63
|
+
readonly focusIndicator: "var(--md-sys-color-secondary)";
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* SearchBarTokens.InputTextFont = BodyLarge (16sp / 24sp line-height).
|
|
67
|
+
* SearchBarTokens.SupportingTextFont = BodyLarge.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SEARCH_TYPOGRAPHY: {
|
|
70
|
+
/** BodyLarge — used for input text and placeholder. */
|
|
71
|
+
readonly bodyLarge: "text-[16px] leading-6 font-normal tracking-[0.5px]";
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Spring animation for SearchBar width expand (inactive → active).
|
|
75
|
+
* Matches MD3 FastSpatial motion scheme.
|
|
76
|
+
*/
|
|
77
|
+
export declare const SEARCH_BAR_EXPAND_SPRING: {
|
|
78
|
+
type: "spring";
|
|
79
|
+
stiffness: number;
|
|
80
|
+
damping: number;
|
|
81
|
+
mass: number;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Spring animation for Docked SearchView dropdown reveal (slide + fade).
|
|
85
|
+
* Offset Y: -8px on enter, opacity 0→1.
|
|
86
|
+
*/
|
|
87
|
+
export declare const SEARCH_DOCKED_REVEAL_SPRING: {
|
|
88
|
+
type: "spring";
|
|
89
|
+
stiffness: number;
|
|
90
|
+
damping: number;
|
|
91
|
+
mass: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Spring animation for FullScreen SearchView shape morphing.
|
|
95
|
+
* Lower stiffness + mass gives a smoother pill→fullscreen morph.
|
|
96
|
+
*/
|
|
97
|
+
export declare const SEARCH_FULLSCREEN_SPRING: {
|
|
98
|
+
type: "spring";
|
|
99
|
+
stiffness: number;
|
|
100
|
+
damping: number;
|
|
101
|
+
mass: number;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Exit transition for SearchBar when mode="popLayout" is used.
|
|
105
|
+
* Fast fade-out so SearchView can claim the layoutId quickly.
|
|
106
|
+
*/
|
|
107
|
+
export declare const SEARCH_BAR_EXIT_SPRING: {
|
|
108
|
+
type: "spring";
|
|
109
|
+
stiffness: number;
|
|
110
|
+
damping: number;
|
|
111
|
+
mass: number;
|
|
112
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file search.types.ts
|
|
3
|
+
* MD3 Expressive Search — TypeScript prop definitions.
|
|
4
|
+
* Spec: https://m3.material.io/components/search/overview
|
|
5
|
+
* Reference: docs/m3/search/SearchBar.kt (MD3 Expressive)
|
|
6
|
+
*/
|
|
7
|
+
import type * as React from "react";
|
|
8
|
+
/**
|
|
9
|
+
* Display variant for the expanded SearchView.
|
|
10
|
+
*
|
|
11
|
+
* - `docked`: Popup dropdown below the SearchBar. For medium/large screens.
|
|
12
|
+
* - `fullscreen`: Full-screen dialog overlay. For compact/mobile screens.
|
|
13
|
+
*/
|
|
14
|
+
export type SearchVariant = "docked" | "fullscreen";
|
|
15
|
+
/**
|
|
16
|
+
* Visual style type for the SearchView.
|
|
17
|
+
*
|
|
18
|
+
* - `contained`: No divider between the input area and results.
|
|
19
|
+
* The container background is preserved continuously (recommended).
|
|
20
|
+
* - `divided`: A HorizontalDivider separates the input area from results.
|
|
21
|
+
*/
|
|
22
|
+
export type SearchStyleType = "contained" | "divided";
|
|
23
|
+
/**
|
|
24
|
+
* Internal props shared between SearchBar and SearchView sub-components.
|
|
25
|
+
* Not part of the public API.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export interface SearchInternalProps {
|
|
29
|
+
/** Unique ID generated by useId(), used as Framer Motion layoutId. */
|
|
30
|
+
searchId: string;
|
|
31
|
+
/** Unique ID for the results listbox, used for aria-controls. */
|
|
32
|
+
listboxId: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props for the `<Search>` component (orchestrator).
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* const [query, setQuery] = useState("");
|
|
40
|
+
* const [active, setActive] = useState(false);
|
|
41
|
+
*
|
|
42
|
+
* <Search
|
|
43
|
+
* query={query}
|
|
44
|
+
* onQueryChange={setQuery}
|
|
45
|
+
* onSearch={(q) => console.log("search:", q)}
|
|
46
|
+
* active={active}
|
|
47
|
+
* onActiveChange={setActive}
|
|
48
|
+
* variant="docked"
|
|
49
|
+
* styleType="contained"
|
|
50
|
+
* >
|
|
51
|
+
* <SearchResultsList />
|
|
52
|
+
* </Search>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export interface SearchProps {
|
|
56
|
+
/** Current search query value (controlled). */
|
|
57
|
+
query: string;
|
|
58
|
+
/** Called when user types in the search input. */
|
|
59
|
+
onQueryChange: (query: string) => void;
|
|
60
|
+
/** Called when user submits search (Enter key or suggestion click). */
|
|
61
|
+
onSearch: (query: string) => void;
|
|
62
|
+
/** Whether the SearchView is expanded/open (controlled). */
|
|
63
|
+
active: boolean;
|
|
64
|
+
/** Called when the Search open/close state should change. */
|
|
65
|
+
onActiveChange: (active: boolean) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Display variant for the expanded state.
|
|
68
|
+
* @default "docked"
|
|
69
|
+
*/
|
|
70
|
+
variant?: SearchVariant;
|
|
71
|
+
/**
|
|
72
|
+
* Visual style for the SearchView container.
|
|
73
|
+
* @default "contained"
|
|
74
|
+
*/
|
|
75
|
+
styleType?: SearchStyleType;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to add a 2dp gap between the input header and the results list.
|
|
78
|
+
* Only applies when `variant="docked"`.
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
hasGap?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Icon rendered at the leading edge of the search input.
|
|
84
|
+
* Defaults to a built-in search icon.
|
|
85
|
+
*/
|
|
86
|
+
leadingIcon?: React.ReactNode;
|
|
87
|
+
/**
|
|
88
|
+
* Icon or action rendered at the trailing edge of the search input.
|
|
89
|
+
* Common examples: mic, camera, QR code.
|
|
90
|
+
*/
|
|
91
|
+
trailingIcon?: React.ReactNode;
|
|
92
|
+
/** Placeholder text shown when the input is empty. @default "Search" */
|
|
93
|
+
placeholder?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Align the placeholder text to left, center, or right.
|
|
96
|
+
* Typed text will always remain left-aligned.
|
|
97
|
+
* @default "left"
|
|
98
|
+
*/
|
|
99
|
+
textAlign?: "left" | "center" | "right";
|
|
100
|
+
/**
|
|
101
|
+
* Search results or suggestions rendered inside the SearchView.
|
|
102
|
+
* Use `role="option"` on each item for accessibility.
|
|
103
|
+
*/
|
|
104
|
+
children?: React.ReactNode;
|
|
105
|
+
/**
|
|
106
|
+
* Override the auto-generated input element ID.
|
|
107
|
+
* Auto-generated via React.useId() if not provided.
|
|
108
|
+
*/
|
|
109
|
+
id?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Accessible label for the search landmark.
|
|
112
|
+
* @default "Search"
|
|
113
|
+
*/
|
|
114
|
+
"aria-label"?: string;
|
|
115
|
+
/** Additional CSS classes for the SearchBar root element. */
|
|
116
|
+
className?: string;
|
|
117
|
+
/** Additional CSS classes for the SearchView container. */
|
|
118
|
+
viewClassName?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Return type for `useSearchKeyboard`.
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
export interface UseSearchKeyboardReturn {
|
|
125
|
+
/** Currently highlighted suggestion index. -1 = none. */
|
|
126
|
+
activeIndex: number;
|
|
127
|
+
/** KeyDown handler — attach to the search input. */
|
|
128
|
+
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
129
|
+
/** Reset activeIndex (e.g., when query changes). */
|
|
130
|
+
resetActiveIndex: () => void;
|
|
131
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
interface TrailingActionProps {
|
|
3
|
+
query: string;
|
|
4
|
+
trailingIcon?: React.ReactNode;
|
|
5
|
+
onClear: () => void;
|
|
6
|
+
}
|
|
7
|
+
/** Clear button when query is non-empty, otherwise the trailing icon slot. */
|
|
8
|
+
export declare function TrailingAction({ query, trailingIcon, onClear, }: TrailingActionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -146,6 +146,7 @@ export declare namespace SnackbarHost {
|
|
|
146
146
|
interface SnackbarContextValue {
|
|
147
147
|
showSnackbar: (visuals: SnackbarVisuals) => Promise<SnackbarResult>;
|
|
148
148
|
}
|
|
149
|
+
export declare const SnackbarContext: React.Context<SnackbarContextValue | null>;
|
|
149
150
|
/**
|
|
150
151
|
* MD3 SnackbarProvider — context provider for imperative snackbar API.
|
|
151
152
|
*
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type ThemeMode } from "../../lib/theme-utils";
|
|
3
|
+
import { Typography } from "../typography/typography";
|
|
4
|
+
import { type FontVariationAxes } from "../typography/typography-tokens";
|
|
3
5
|
interface ThemeContextValue {
|
|
4
6
|
sourceColor: string;
|
|
5
7
|
setSourceColor: (color: string) => void;
|
|
@@ -11,8 +13,36 @@ export interface MD3ThemeProviderProps {
|
|
|
11
13
|
sourceColor?: string;
|
|
12
14
|
defaultMode?: ThemeMode;
|
|
13
15
|
persistToLocalStorage?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* A fully custom `Typography` instance.
|
|
18
|
+
* When provided, `fontFamily` and `fontVariationAxes` are ignored.
|
|
19
|
+
*/
|
|
20
|
+
typography?: Typography;
|
|
21
|
+
/**
|
|
22
|
+
* Override the CSS `font-family` for all typography styles.
|
|
23
|
+
* Ignored when `typography` prop is provided.
|
|
24
|
+
* @example "'Inter', sans-serif"
|
|
25
|
+
*/
|
|
26
|
+
fontFamily?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Variable font axes applied globally via `font-variation-settings`.
|
|
29
|
+
* Merged on top of defaults (`ROND: 100`). Ignored when `typography` is provided.
|
|
30
|
+
* @example { ROND: 50 }
|
|
31
|
+
*/
|
|
32
|
+
fontVariationAxes?: FontVariationAxes;
|
|
33
|
+
/**
|
|
34
|
+
* When `true`, mounts `SnackbarHost` inside the provider and exposes
|
|
35
|
+
* `useSnackbar()` to all descendants — no separate `<SnackbarProvider>` needed.
|
|
36
|
+
*
|
|
37
|
+
* Opt-in, default `false`. For advanced usage (e.g., scoped snackbars or
|
|
38
|
+
* custom host positioning), keep this `false` and use `<SnackbarProvider>`
|
|
39
|
+
* or `<SnackbarHost>` directly.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
enableSnackbar?: boolean;
|
|
14
44
|
}
|
|
15
|
-
export declare function MD3ThemeProvider({ children, sourceColor: initialSourceColor, defaultMode, persistToLocalStorage, }: MD3ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function MD3ThemeProvider({ children, sourceColor: initialSourceColor, defaultMode, persistToLocalStorage, typography: typographyProp, fontFamily, fontVariationAxes, enableSnackbar, }: MD3ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
46
|
export declare function useTheme(): ThemeContextValue;
|
|
17
47
|
export declare function useThemeMode(): Pick<ThemeContextValue, "mode" | "setMode">;
|
|
18
48
|
export {};
|
package/dist/ui/toc.d.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* (~100px) and early deactivation (~80% from bottom) so the active item changes
|
|
15
15
|
* before the section scrolls off-screen.
|
|
16
16
|
*/
|
|
17
|
+
import { type ScrollAreaProps } from "./scroll-area";
|
|
17
18
|
/**
|
|
18
19
|
* A single entry in the Table of Contents.
|
|
19
20
|
*
|
|
@@ -45,6 +46,11 @@ export interface TableOfContentsProps {
|
|
|
45
46
|
* Use this to control positioning (e.g. sticky, fixed) from the consumer.
|
|
46
47
|
*/
|
|
47
48
|
className?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Configuration for the internal ScrollArea.
|
|
51
|
+
* @default { type: "hover" }
|
|
52
|
+
*/
|
|
53
|
+
scrollAreaProps?: Omit<ScrollAreaProps, "children">;
|
|
48
54
|
}
|
|
49
55
|
/**
|
|
50
56
|
* Table of Contents sidebar component.
|
|
@@ -71,4 +77,4 @@ export interface TableOfContentsProps {
|
|
|
71
77
|
*
|
|
72
78
|
* @see https://m3.material.io/foundations/content-design/navigation
|
|
73
79
|
*/
|
|
74
|
-
export declare function TableOfContents({ items, className }: TableOfContentsProps): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
export declare function TableOfContents({ items, className, scrollAreaProps, }: TableOfContentsProps): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bug-on/md3-react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Material Design 3 Expressive React components",
|
|
5
5
|
"author": "Bug Ổn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"@types/react": "^19.0.0",
|
|
69
69
|
"@types/react-dom": "^19.0.0",
|
|
70
70
|
"@vitejs/plugin-react": "^6.0.1",
|
|
71
|
+
"@vitest/coverage-v8": "4.1.4",
|
|
71
72
|
"jsdom": "^29.0.0",
|
|
72
73
|
"tsup": "^8.4.0",
|
|
73
74
|
"typescript": "5.8.3",
|