@bug-on/m3-expressive 1.3.2 → 1.3.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/index.d.mts CHANGED
@@ -4,7 +4,7 @@ export { A as ANGLE_EPSILON, C as CornerFeature, a as CornerRounding, b as Cubic
4
4
  export { CubicPair, DoubleMapper, MD3CornerRadius, MD3CornerRadiusToken, MeasuredCubic, MeasuredFeature, MeasuredPolygon, Morph, MorphTrigger, ShapeIcon, ShapeIconProps, ShapeMedia, ShapeMediaProps, ShapeMediaServer, ShapeMorphOptions, ShapeRef, ShapeSvg, ShapeSvgProps, UseShapeMorphResult, circle, createDoubleMapper, featureMapper, interpolatePath, pill, pillStar, rectangle, star, toClipPath, toSvgPath, useShapeMorph } from './shapes.mjs';
5
5
  export { M as MD3ColorStyle, a as MD3Shape, b as MD3Size, P as PolymorphicProps, c as PolymorphicRef } from './md3-BQhRygSi.mjs';
6
6
  export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColors, AppBarColumn, AppBarColumnProps, AppBarItem, AppBarItemType, AppBarMenuState, AppBarOverflowIndicator, AppBarOverflowIndicatorProps, AppBarRow, AppBarRowProps, AppBarScrollBehavior, AppBarTokens, BaseAppBarProps, BottomAppBar, BottomAppBarProps, BottomDockedToolbar, BottomDockedToolbarProps, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, ContextMenuTrigger, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, DockedToolbarProps, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, FadingBlurDirection, FadingBlurMask, FadingBlurMaskProps, FadingBlurProps, FlexibleAppBarProps, FloatingToolbarColors, FloatingToolbarProps, FloatingToolbarScrollBehavior, 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, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, NavigationBar, NavigationBarItem, NavigationBarItemLayout, NavigationBarItemProps, NavigationBarLabelVisibility, NavigationBarProps, NavigationBarVariant, NavigationItemShape, NavigationRail, NavigationRailItem, NavigationRailItemProps, NavigationRailLabelVisibility, NavigationRailProps, NavigationRailVariant, 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, SearchAppBarProps, SearchBar, SearchBarVariant, SearchProps, SearchStyleType, SearchTokens, SearchVariant, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, SearchViewProps, SmallAppBar, SmallAppBarProps, SubMenu, Tab, TabProps, Tabs, TabsColors, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTokens, TabsVariant, TitleAlignment, ToolbarDivider, ToolbarDividerProps, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonProps, ToolbarIconButtonTokens, ToolbarIconButtonVariant, ToolbarToggleButton, ToolbarToggleButtonProps, ToolbarToggleButtonTokens, ToolbarVariant, UseAppBarScrollReturn, UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, appBarTypography, getToolbarColors, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors } from './navigation.mjs';
7
- export { Badge, BadgeProps, BadgedBox, BadgedBoxProps, CaretConfig, CircularProgressProps, LinearProgressProps, LoadingIndicator, LoadingIndicatorProps, PlainTooltip, PlainTooltipProps, ProgressIndicator, ProgressIndicatorProps, RichTooltip, RichTooltipProps, Snackbar, SnackbarData, SnackbarDuration, SnackbarHost, SnackbarHostProps, SnackbarProps, SnackbarProvider, SnackbarResult, SnackbarVisuals, TooltipBox, TooltipBoxProps, TooltipCaretShape, TooltipPlacement, TooltipState, TooltipStateConfig, TooltipTokens, TooltipTrigger, UseSnackbarStateReturn, useSnackbar, useSnackbarState, useTooltipPosition, useTooltipState } from './feedback.mjs';
7
+ export { Badge, BadgeProps, BadgedBox, BadgedBoxProps, CaretConfig, CircularProgressProps, LinearProgressProps, LoadingIndicator, LoadingIndicatorProps, PlainTooltip, PlainTooltipProps, ProgressIndicator, ProgressIndicatorProps, RichTooltip, RichTooltipProps, Snackbar, SnackbarContext, SnackbarData, SnackbarDuration, SnackbarHost, SnackbarHostProps, SnackbarProps, SnackbarProvider, SnackbarResult, SnackbarVisuals, TooltipBox, TooltipBoxProps, TooltipCaretShape, TooltipPlacement, TooltipState, TooltipStateConfig, TooltipTokens, TooltipTrigger, UseSnackbarStateReturn, useSnackbar, useSnackbarState, useTooltipPosition, useTooltipState } from './feedback.mjs';
8
8
  export { B as BUTTON_COLOR_TOKENS, a as BUTTON_SIZE_TOKENS, b as BaseButtonProps, c as Button, d as ButtonDistribute, e as ButtonDistributeProps, f as ButtonGroup, g as ButtonGroupOrientation, h as ButtonGroupProps, i as ButtonGroupVariant, j as ButtonProps, D as DistributeMode, E as ElevatedSplitButtonLeading, k as ElevatedSplitButtonTrailing, l as ElevatedSplitButtonTrailingUncheckable, m as ExtendedFAB, n as ExtendedFABProps, F as FAB, o as FABMenu, p as FABMenuItem, q as FABMenuItemData, r as FABMenuItemProps, s as FABMenuProps, t as FABPosition, u as FABPositionProps, v as FABProps, w as FilledSplitButtonLeading, x as FilledSplitButtonTrailing, y as FilledSplitButtonTrailingUncheckable, O as OutlinedSplitButtonLeading, z as OutlinedSplitButtonTrailing, A as OutlinedSplitButtonTrailingUncheckable, S as SplitButtonLayout, C as SplitButtonLayoutProps, G as SplitButtonLeading, H as SplitButtonLeadingProps, I as SplitButtonSize, J as SplitButtonTrailing, K as SplitButtonTrailingProps, L as SplitButtonTrailingUncheckable, M as SplitButtonTrailingUncheckableProps, N as SplitButtonVariant, T as ToggleFAB, P as ToggleFABProps, Q as TonalSplitButtonLeading, R as TonalSplitButtonTrailing, U as TonalSplitButtonTrailingUncheckable } from './split-button-trailing-uncheckable-gAz6OAIi.mjs';
9
9
  export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-CxyJv7UV.mjs';
10
10
  export { Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps, CardVariant, Carousel, CarouselGrid, CarouselItem, CarouselItemScope, CarouselKeyline, CarouselKeylineResult, CarouselLayout, CarouselProps, CarouselScrollClient, CarouselTokens, CodeBlock, CodeBlockProps, Divider, DividerProps, KeylineType, LIST_TOKENS, List, ListContext, ListDivider, ListDividerProps, ListItem, ListItemLeadingType, ListItemProps, ListItemTrailingType, ListProps, ListSelectionMode, ListStyle, ListVariant, TableOfContents, TableOfContentsProps, Text, TextProps, ToCItem, TypeScaleTokens, TypeScaleTokensType, buildWavePath, cardVariants, getExpressiveShape, getListItemHeight, shouldTopAlign, useCarouselA11y, useCarouselKeylines, useListContext } from './layout.mjs';
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { A as ANGLE_EPSILON, C as CornerFeature, a as CornerRounding, b as Cubic
4
4
  export { CubicPair, DoubleMapper, MD3CornerRadius, MD3CornerRadiusToken, MeasuredCubic, MeasuredFeature, MeasuredPolygon, Morph, MorphTrigger, ShapeIcon, ShapeIconProps, ShapeMedia, ShapeMediaProps, ShapeMediaServer, ShapeMorphOptions, ShapeRef, ShapeSvg, ShapeSvgProps, UseShapeMorphResult, circle, createDoubleMapper, featureMapper, interpolatePath, pill, pillStar, rectangle, star, toClipPath, toSvgPath, useShapeMorph } from './shapes.js';
5
5
  export { M as MD3ColorStyle, a as MD3Shape, b as MD3Size, P as PolymorphicProps, c as PolymorphicRef } from './md3-BQhRygSi.js';
6
6
  export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColors, AppBarColumn, AppBarColumnProps, AppBarItem, AppBarItemType, AppBarMenuState, AppBarOverflowIndicator, AppBarOverflowIndicatorProps, AppBarRow, AppBarRowProps, AppBarScrollBehavior, AppBarTokens, BaseAppBarProps, BottomAppBar, BottomAppBarProps, BottomDockedToolbar, BottomDockedToolbarProps, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, ContextMenuTrigger, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, DockedToolbarProps, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, FadingBlurDirection, FadingBlurMask, FadingBlurMaskProps, FadingBlurProps, FlexibleAppBarProps, FloatingToolbarColors, FloatingToolbarProps, FloatingToolbarScrollBehavior, 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, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, NavigationBar, NavigationBarItem, NavigationBarItemLayout, NavigationBarItemProps, NavigationBarLabelVisibility, NavigationBarProps, NavigationBarVariant, NavigationItemShape, NavigationRail, NavigationRailItem, NavigationRailItemProps, NavigationRailLabelVisibility, NavigationRailProps, NavigationRailVariant, 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, SearchAppBarProps, SearchBar, SearchBarVariant, SearchProps, SearchStyleType, SearchTokens, SearchVariant, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, SearchViewProps, SmallAppBar, SmallAppBarProps, SubMenu, Tab, TabProps, Tabs, TabsColors, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTokens, TabsVariant, TitleAlignment, ToolbarDivider, ToolbarDividerProps, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonProps, ToolbarIconButtonTokens, ToolbarIconButtonVariant, ToolbarToggleButton, ToolbarToggleButtonProps, ToolbarToggleButtonTokens, ToolbarVariant, UseAppBarScrollReturn, UseFloatingToolbarScrollBehaviorOptions, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, appBarTypography, getToolbarColors, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors } from './navigation.js';
7
- export { Badge, BadgeProps, BadgedBox, BadgedBoxProps, CaretConfig, CircularProgressProps, LinearProgressProps, LoadingIndicator, LoadingIndicatorProps, PlainTooltip, PlainTooltipProps, ProgressIndicator, ProgressIndicatorProps, RichTooltip, RichTooltipProps, Snackbar, SnackbarData, SnackbarDuration, SnackbarHost, SnackbarHostProps, SnackbarProps, SnackbarProvider, SnackbarResult, SnackbarVisuals, TooltipBox, TooltipBoxProps, TooltipCaretShape, TooltipPlacement, TooltipState, TooltipStateConfig, TooltipTokens, TooltipTrigger, UseSnackbarStateReturn, useSnackbar, useSnackbarState, useTooltipPosition, useTooltipState } from './feedback.js';
7
+ export { Badge, BadgeProps, BadgedBox, BadgedBoxProps, CaretConfig, CircularProgressProps, LinearProgressProps, LoadingIndicator, LoadingIndicatorProps, PlainTooltip, PlainTooltipProps, ProgressIndicator, ProgressIndicatorProps, RichTooltip, RichTooltipProps, Snackbar, SnackbarContext, SnackbarData, SnackbarDuration, SnackbarHost, SnackbarHostProps, SnackbarProps, SnackbarProvider, SnackbarResult, SnackbarVisuals, TooltipBox, TooltipBoxProps, TooltipCaretShape, TooltipPlacement, TooltipState, TooltipStateConfig, TooltipTokens, TooltipTrigger, UseSnackbarStateReturn, useSnackbar, useSnackbarState, useTooltipPosition, useTooltipState } from './feedback.js';
8
8
  export { B as BUTTON_COLOR_TOKENS, a as BUTTON_SIZE_TOKENS, b as BaseButtonProps, c as Button, d as ButtonDistribute, e as ButtonDistributeProps, f as ButtonGroup, g as ButtonGroupOrientation, h as ButtonGroupProps, i as ButtonGroupVariant, j as ButtonProps, D as DistributeMode, E as ElevatedSplitButtonLeading, k as ElevatedSplitButtonTrailing, l as ElevatedSplitButtonTrailingUncheckable, m as ExtendedFAB, n as ExtendedFABProps, F as FAB, o as FABMenu, p as FABMenuItem, q as FABMenuItemData, r as FABMenuItemProps, s as FABMenuProps, t as FABPosition, u as FABPositionProps, v as FABProps, w as FilledSplitButtonLeading, x as FilledSplitButtonTrailing, y as FilledSplitButtonTrailingUncheckable, O as OutlinedSplitButtonLeading, z as OutlinedSplitButtonTrailing, A as OutlinedSplitButtonTrailingUncheckable, S as SplitButtonLayout, C as SplitButtonLayoutProps, G as SplitButtonLeading, H as SplitButtonLeadingProps, I as SplitButtonSize, J as SplitButtonTrailing, K as SplitButtonTrailingProps, L as SplitButtonTrailingUncheckable, M as SplitButtonTrailingUncheckableProps, N as SplitButtonVariant, T as ToggleFAB, P as ToggleFABProps, Q as TonalSplitButtonLeading, R as TonalSplitButtonTrailing, U as TonalSplitButtonTrailingUncheckable } from './split-button-trailing-uncheckable-CGzk7KcG.js';
9
9
  export { B as BaseIconButtonProps, I as IconButton, a as IconButtonProps } from './icon-button-Di8VX6ou.js';
10
10
  export { Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps, CardVariant, Carousel, CarouselGrid, CarouselItem, CarouselItemScope, CarouselKeyline, CarouselKeylineResult, CarouselLayout, CarouselProps, CarouselScrollClient, CarouselTokens, CodeBlock, CodeBlockProps, Divider, DividerProps, KeylineType, LIST_TOKENS, List, ListContext, ListDivider, ListDividerProps, ListItem, ListItemLeadingType, ListItemProps, ListItemTrailingType, ListProps, ListSelectionMode, ListStyle, ListVariant, TableOfContents, TableOfContentsProps, Text, TextProps, ToCItem, TypeScaleTokens, TypeScaleTokensType, buildWavePath, cardVariants, getExpressiveShape, getListItemHeight, shouldTopAlign, useCarouselA11y, useCarouselKeylines, useListContext } from './layout.js';
package/dist/index.js CHANGED
@@ -253,7 +253,7 @@ function applyTheme(sourceColorHex, mode = "light", root = document.documentElem
253
253
  const resolved = resolveMode(mode);
254
254
  const colors = generateM3Theme(sourceColorHex, resolved, options);
255
255
  for (const [key, value] of Object.entries(colors)) {
256
- const kebabKey = key.replace(/[A-Z]/g, (m71) => `-${m71.toLowerCase()}`);
256
+ const kebabKey = key.replace(/[A-Z]/g, (m72) => `-${m72.toLowerCase()}`);
257
257
  root.style.setProperty(`--md-sys-color-${kebabKey}`, value);
258
258
  root.style.setProperty(`--color-m3-${kebabKey}`, value);
259
259
  }
@@ -275,7 +275,7 @@ function createMd3ExpressiveTheme(options) {
275
275
  function schemeToCssVariables(scheme) {
276
276
  const result = {};
277
277
  for (const [key, value] of Object.entries(scheme)) {
278
- const kebabKey = key.replace(/[A-Z]/g, (m71) => `-${m71.toLowerCase()}`);
278
+ const kebabKey = key.replace(/[A-Z]/g, (m72) => `-${m72.toLowerCase()}`);
279
279
  result[`--md-sys-color-${kebabKey}`] = value;
280
280
  }
281
281
  return result;
@@ -1112,8 +1112,8 @@ var RoundedPolygon = class _RoundedPolygon {
1112
1112
  );
1113
1113
  const mid = c.pointOnCurve(0.5);
1114
1114
  const md = distanceSquared(mid.x - this.centerX, mid.y - this.centerY);
1115
- const m71 = Math.max(ad, md);
1116
- if (m71 > maxDistSq) maxDistSq = m71;
1115
+ const m72 = Math.max(ad, md);
1116
+ if (m72 > maxDistSq) maxDistSq = m72;
1117
1117
  }
1118
1118
  const d = Math.sqrt(maxDistSq);
1119
1119
  return [
@@ -15465,7 +15465,7 @@ var TimePickerDialog = ({
15465
15465
  TimePickerDialog.displayName = "TimePickerDialog";
15466
15466
  var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
15467
15467
  var isValidHourInput = (h, is24hour) => is24hour ? h >= 0 && h <= 23 : h >= 1 && h <= 12;
15468
- var isValidMinuteInput = (m71) => m71 >= 0 && m71 <= 59;
15468
+ var isValidMinuteInput = (m72) => m72 >= 0 && m72 <= 59;
15469
15469
  var to24Hour = (hour12, isPm) => {
15470
15470
  if (isPm) {
15471
15471
  return hour12 === 12 ? 12 : hour12 + 12;
@@ -15501,8 +15501,8 @@ var useTimePickerState = (options) => {
15501
15501
  },
15502
15502
  [is24hour]
15503
15503
  );
15504
- const setMinute = React67.useCallback((m71) => {
15505
- const clamped = clamp(m71, 0, 59);
15504
+ const setMinute = React67.useCallback((m72) => {
15505
+ const clamped = clamp(m72, 0, 59);
15506
15506
  setMinuteState(clamped);
15507
15507
  setMinuteInputState(clamped);
15508
15508
  }, []);
@@ -15516,10 +15516,10 @@ var useTimePickerState = (options) => {
15516
15516
  },
15517
15517
  [is24hour, isPm]
15518
15518
  );
15519
- const setMinuteInput = React67.useCallback((m71) => {
15520
- setMinuteInputState(m71);
15521
- if (isValidMinuteInput(m71)) {
15522
- setMinuteState(m71);
15519
+ const setMinuteInput = React67.useCallback((m72) => {
15520
+ setMinuteInputState(m72);
15521
+ if (isValidMinuteInput(m72)) {
15522
+ setMinuteState(m72);
15523
15523
  }
15524
15524
  }, []);
15525
15525
  const setSelection = React67.useCallback((mode) => {
@@ -18917,7 +18917,12 @@ var SEARCH_COLORS = {
18917
18917
  /** SearchViewTokens.DividerColor → outline */
18918
18918
  divider: "var(--md-sys-color-outline)",
18919
18919
  /** Focus indicator → secondary */
18920
- focusIndicator: "var(--md-sys-color-secondary)"
18920
+ focusIndicator: "var(--md-sys-color-secondary)",
18921
+ /** State layer overlay for interactive hover/press */
18922
+ stateLayer: "var(--md-sys-color-on-surface)"
18923
+ };
18924
+ var SEARCH_ELEVATION = {
18925
+ level3: "elevation-3"
18921
18926
  };
18922
18927
  var SEARCH_TYPOGRAPHY = {
18923
18928
  /** BodyLarge — used for input text and placeholder. */
@@ -19022,6 +19027,7 @@ function SearchBar({
19022
19027
  onActiveChange,
19023
19028
  leadingIcon,
19024
19029
  trailingIcon,
19030
+ avatar,
19025
19031
  placeholder = "Search",
19026
19032
  textAlign = "left",
19027
19033
  className,
@@ -19035,6 +19041,9 @@ function SearchBar({
19035
19041
  const inputRef = React67__namespace.useRef(null);
19036
19042
  const prevActiveRef = React67__namespace.useRef(active);
19037
19043
  const isRestoringFocusRef = React67__namespace.useRef(false);
19044
+ const [isHovered, setIsHovered] = React67__namespace.useState(false);
19045
+ const [isPressed, setIsPressed] = React67__namespace.useState(false);
19046
+ const [isFocused, setIsFocused] = React67__namespace.useState(false);
19038
19047
  React67__namespace.useEffect(() => {
19039
19048
  var _a;
19040
19049
  let rafId;
@@ -19051,10 +19060,14 @@ function SearchBar({
19051
19060
  };
19052
19061
  }, [active]);
19053
19062
  const handleFocus = () => {
19063
+ setIsFocused(true);
19054
19064
  if (!active && !isRestoringFocusRef.current) {
19055
19065
  onActiveChange(true);
19056
19066
  }
19057
19067
  };
19068
+ const handleBlur = () => {
19069
+ setIsFocused(false);
19070
+ };
19058
19071
  const handleFormSubmit = (e) => {
19059
19072
  e.preventDefault();
19060
19073
  onSearch(query);
@@ -19073,18 +19086,39 @@ function SearchBar({
19073
19086
  layout: !shouldReduceMotion,
19074
19087
  layoutId: shouldReduceMotion ? void 0 : searchId,
19075
19088
  transition: shouldReduceMotion ? void 0 : SEARCH_BAR_EXPAND_SPRING,
19076
- className: cn("relative", className),
19089
+ className: cn(
19090
+ "relative group select-none",
19091
+ SEARCH_ELEVATION.level3,
19092
+ className
19093
+ ),
19077
19094
  style: { height: SearchTokens.heights.bar },
19078
19095
  initial: shouldReduceMotion ? false : { opacity: 0, scale: 0.95 },
19079
19096
  animate: { opacity: 1, scale: 1 },
19080
19097
  exit: shouldReduceMotion ? {} : { opacity: 0, scale: 0.95, transition: SEARCH_BAR_EXIT_SPRING },
19098
+ onPointerEnter: () => setIsHovered(true),
19099
+ onPointerLeave: () => {
19100
+ setIsHovered(false);
19101
+ setIsPressed(false);
19102
+ },
19103
+ onPointerDown: () => setIsPressed(true),
19104
+ onPointerUp: () => setIsPressed(false),
19105
+ onPointerCancel: () => setIsPressed(false),
19081
19106
  children: [
19082
19107
  /* @__PURE__ */ jsxRuntime.jsx(
19083
19108
  "div",
19084
19109
  {
19085
- className: "absolute inset-0 rounded-full",
19110
+ className: "absolute inset-0 rounded-full overflow-hidden",
19086
19111
  style: { backgroundColor: SEARCH_COLORS.container },
19087
- "aria-hidden": "true"
19112
+ "aria-hidden": "true",
19113
+ children: /* @__PURE__ */ jsxRuntime.jsx(
19114
+ StateLayer,
19115
+ {
19116
+ hovered: isHovered,
19117
+ focused: isFocused,
19118
+ pressed: isPressed,
19119
+ style: { color: SEARCH_COLORS.stateLayer }
19120
+ }
19121
+ )
19088
19122
  }
19089
19123
  ),
19090
19124
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -19130,21 +19164,36 @@ function SearchBar({
19130
19164
  ),
19131
19165
  style: { color: SEARCH_COLORS.inputText },
19132
19166
  onFocus: handleFocus,
19167
+ onBlur: handleBlur,
19133
19168
  onChange: (e) => onQueryChange(e.target.value),
19134
19169
  onKeyDown
19135
19170
  }
19136
19171
  )
19137
19172
  }
19138
19173
  ),
19139
- trailingIcon && /* @__PURE__ */ jsxRuntime.jsx(
19140
- "span",
19141
- {
19142
- className: "flex shrink-0 items-center justify-center",
19143
- style: { color: SEARCH_COLORS.trailingIcon },
19144
- "aria-hidden": "true",
19145
- children: trailingIcon
19146
- }
19147
- )
19174
+ (trailingIcon || avatar) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
19175
+ trailingIcon && /* @__PURE__ */ jsxRuntime.jsx(
19176
+ "span",
19177
+ {
19178
+ className: "flex shrink-0 items-center justify-center",
19179
+ style: { color: SEARCH_COLORS.trailingIcon },
19180
+ "aria-hidden": "true",
19181
+ children: trailingIcon
19182
+ }
19183
+ ),
19184
+ avatar && /* @__PURE__ */ jsxRuntime.jsx(
19185
+ "span",
19186
+ {
19187
+ className: "flex shrink-0 items-center justify-center rounded-full overflow-hidden",
19188
+ style: {
19189
+ width: SearchTokens.avatarSize,
19190
+ height: SearchTokens.avatarSize
19191
+ },
19192
+ "aria-hidden": "true",
19193
+ children: avatar
19194
+ }
19195
+ )
19196
+ ] })
19148
19197
  ] })
19149
19198
  }
19150
19199
  )
@@ -19207,40 +19256,77 @@ function useSearchViewFocus(inputRef, active) {
19207
19256
  function TrailingAction({
19208
19257
  query,
19209
19258
  trailingIcon,
19259
+ avatar,
19210
19260
  onClear
19211
19261
  }) {
19212
- if (query) {
19213
- return /* @__PURE__ */ jsxRuntime.jsx(
19214
- IconButton,
19262
+ const shouldReduceMotion = react.useReducedMotion();
19263
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
19264
+ /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: query ? /* @__PURE__ */ jsxRuntime.jsx(
19265
+ react.m.div,
19215
19266
  {
19216
- size: "sm",
19217
- style: { color: SEARCH_COLORS.trailingIcon },
19218
- "aria-label": "Clear search",
19219
- onClick: onClear,
19267
+ initial: shouldReduceMotion ? false : { opacity: 0, scale: 0.8 },
19268
+ animate: { opacity: 1, scale: 1 },
19269
+ exit: shouldReduceMotion ? {} : { opacity: 0, scale: 0.8 },
19270
+ transition: { duration: 0.15 },
19271
+ className: "flex items-center justify-center",
19220
19272
  children: /* @__PURE__ */ jsxRuntime.jsx(
19221
- "span",
19273
+ IconButton,
19222
19274
  {
19223
- className: "material-symbols-rounded select-none leading-none",
19224
- style: { fontSize: 20 },
19225
- "aria-hidden": "true",
19226
- children: "close"
19275
+ size: "sm",
19276
+ style: { color: SEARCH_COLORS.trailingIcon },
19277
+ "aria-label": "Clear search",
19278
+ onClick: onClear,
19279
+ children: /* @__PURE__ */ jsxRuntime.jsx(
19280
+ "span",
19281
+ {
19282
+ className: "material-symbols-rounded select-none leading-none",
19283
+ style: { fontSize: 20 },
19284
+ "aria-hidden": "true",
19285
+ children: "close"
19286
+ }
19287
+ )
19227
19288
  }
19228
19289
  )
19229
- }
19230
- );
19231
- }
19232
- if (trailingIcon) {
19233
- return /* @__PURE__ */ jsxRuntime.jsx(
19234
- "span",
19290
+ },
19291
+ "clear-action"
19292
+ ) : trailingIcon && /* @__PURE__ */ jsxRuntime.jsx(
19293
+ react.m.span,
19235
19294
  {
19295
+ initial: shouldReduceMotion ? false : { opacity: 0, scale: 0.8 },
19296
+ animate: { opacity: 1, scale: 1 },
19297
+ exit: shouldReduceMotion ? {} : { opacity: 0, scale: 0.8 },
19298
+ transition: { duration: 0.15 },
19236
19299
  className: "flex shrink-0 items-center justify-center",
19237
19300
  style: { color: SEARCH_COLORS.trailingIcon },
19238
19301
  "aria-hidden": "true",
19239
19302
  children: trailingIcon
19303
+ },
19304
+ "trailing-icon"
19305
+ ) }),
19306
+ avatar && /* @__PURE__ */ jsxRuntime.jsx(
19307
+ "span",
19308
+ {
19309
+ className: "flex shrink-0 items-center justify-center rounded-full overflow-hidden",
19310
+ style: {
19311
+ width: SearchTokens.avatarSize,
19312
+ height: SearchTokens.avatarSize
19313
+ },
19314
+ "aria-hidden": "true",
19315
+ children: avatar
19240
19316
  }
19241
- );
19242
- }
19243
- return null;
19317
+ )
19318
+ ] });
19319
+ }
19320
+ function DefaultSearchIcon2() {
19321
+ return /* @__PURE__ */ jsxRuntime.jsx(
19322
+ "span",
19323
+ {
19324
+ className: "material-symbols-rounded select-none leading-none",
19325
+ style: { fontSize: SearchTokens.iconSize },
19326
+ "aria-hidden": "true",
19327
+ children: "search"
19328
+ }
19329
+ );
19244
19330
  }
19245
19331
  function SearchViewDocked({
19246
19332
  query,
@@ -19250,6 +19336,7 @@ function SearchViewDocked({
19250
19336
  onActiveChange,
19251
19337
  leadingIcon,
19252
19338
  trailingIcon,
19339
+ avatar,
19253
19340
  placeholder = "Search",
19254
19341
  textAlign = "left",
19255
19342
  styleType = "contained",
@@ -19282,10 +19369,12 @@ function SearchViewDocked({
19282
19369
  react.m.div,
19283
19370
  {
19284
19371
  ref: dropdownRef,
19372
+ layout: !shouldReduceMotion,
19285
19373
  layoutId: shouldReduceMotion ? void 0 : searchId,
19286
19374
  className: cn(
19287
19375
  // DockedContainerShape = CornerExtraLarge = 28dp radius
19288
19376
  "rounded-[28px] overflow-hidden",
19377
+ SEARCH_ELEVATION.level3,
19289
19378
  viewClassName
19290
19379
  ),
19291
19380
  style: { backgroundColor: SEARCH_COLORS.container },
@@ -19307,7 +19396,7 @@ function SearchViewDocked({
19307
19396
  className: "flex shrink-0 items-center justify-center",
19308
19397
  style: { color: SEARCH_COLORS.leadingIcon },
19309
19398
  "aria-hidden": "true",
19310
- children: leadingIcon
19399
+ children: leadingIcon != null ? leadingIcon : /* @__PURE__ */ jsxRuntime.jsx(DefaultSearchIcon2, {})
19311
19400
  }
19312
19401
  ),
19313
19402
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -19348,6 +19437,7 @@ function SearchViewDocked({
19348
19437
  {
19349
19438
  query,
19350
19439
  trailingIcon,
19440
+ avatar,
19351
19441
  onClear: () => onQueryChange("")
19352
19442
  }
19353
19443
  )
@@ -19368,7 +19458,7 @@ function SearchViewDocked({
19368
19458
  id: listboxId,
19369
19459
  role: "listbox",
19370
19460
  "aria-label": `${ariaLabel} results`,
19371
- className: "min-h-30",
19461
+ className: "min-h-[120px]",
19372
19462
  children
19373
19463
  }
19374
19464
  )
@@ -19397,6 +19487,7 @@ function SearchViewFullScreen({
19397
19487
  onActiveChange,
19398
19488
  leadingIcon,
19399
19489
  trailingIcon,
19490
+ avatar,
19400
19491
  placeholder = "Search",
19401
19492
  textAlign = "left",
19402
19493
  styleType = "contained",
@@ -19511,6 +19602,7 @@ function SearchViewFullScreen({
19511
19602
  {
19512
19603
  query,
19513
19604
  trailingIcon,
19605
+ avatar,
19514
19606
  onClear: () => onQueryChange("")
19515
19607
  }
19516
19608
  )
@@ -19562,6 +19654,7 @@ function SearchComponent({
19562
19654
  hasGap = false,
19563
19655
  leadingIcon,
19564
19656
  trailingIcon,
19657
+ avatar,
19565
19658
  placeholder = "Search",
19566
19659
  textAlign = "left",
19567
19660
  children,
@@ -19589,6 +19682,7 @@ function SearchComponent({
19589
19682
  onActiveChange,
19590
19683
  leadingIcon,
19591
19684
  trailingIcon,
19685
+ avatar,
19592
19686
  placeholder,
19593
19687
  textAlign,
19594
19688
  "aria-label": ariaLabel,
@@ -24084,11 +24178,13 @@ var Snackbar = React67__namespace.memo(function Snackbar2({
24084
24178
  type: "button",
24085
24179
  onClick: handleAction,
24086
24180
  className: cn(
24087
- "text-sm font-medium",
24088
- "px-2 py-1 rounded-sm",
24089
- "focus-visible:outline-none focus-visible:ring-2",
24090
- "transition-colors whitespace-nowrap",
24091
- "text-m3-inverse-primary"
24181
+ "inline-flex items-center justify-center",
24182
+ "h-10 px-3 py-2.5 rounded-sm",
24183
+ "text-sm font-medium leading-5 whitespace-nowrap",
24184
+ "text-m3-inverse-primary",
24185
+ "hover:bg-m3-inverse-primary/8 focus-visible:bg-m3-inverse-primary/12 active:bg-m3-inverse-primary/12",
24186
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-inverse-primary",
24187
+ "transition-colors select-none cursor-pointer"
24092
24188
  ),
24093
24189
  children: actionLabel
24094
24190
  }
@@ -24097,10 +24193,10 @@ var Snackbar = React67__namespace.memo(function Snackbar2({
24097
24193
  IconButton,
24098
24194
  {
24099
24195
  size: "sm",
24100
- colorStyle: "filled",
24196
+ colorStyle: "standard",
24101
24197
  "aria-label": "Dismiss notification",
24102
24198
  onClick: handleDismiss,
24103
- className: "text-m3-inverse-on-surface bg-m3-inverse-surface",
24199
+ className: "text-m3-inverse-on-surface hover:bg-m3-inverse-on-surface/8 active:bg-m3-inverse-on-surface/12 focus-visible:ring-m3-inverse-primary",
24104
24200
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", "aria-hidden": "true" })
24105
24201
  }
24106
24202
  )
@@ -25594,12 +25690,15 @@ function useThemeMode() {
25594
25690
  function TableOfContents({
25595
25691
  items,
25596
25692
  className,
25597
- scrollAreaProps
25693
+ scrollAreaProps,
25694
+ scrollContainerRef
25598
25695
  }) {
25599
25696
  const [activeId, setActiveId] = React67.useState("");
25600
25697
  const itemIds = React67.useMemo(() => items.map((i) => i.id), [items]);
25601
25698
  React67.useEffect(() => {
25699
+ var _a;
25602
25700
  if (typeof IntersectionObserver === "undefined") return;
25701
+ const root = (_a = scrollContainerRef == null ? void 0 : scrollContainerRef.current) != null ? _a : null;
25603
25702
  const observer = new IntersectionObserver(
25604
25703
  (entries) => {
25605
25704
  for (const entry of entries) {
@@ -25607,19 +25706,20 @@ function TableOfContents({
25607
25706
  }
25608
25707
  },
25609
25708
  // rootMargin: top offset ~100px (fixed header), bottom -80% (early switch)
25610
- { rootMargin: "-100px 0% -80% 0%" }
25709
+ { root, rootMargin: "-100px 0% -80% 0%" }
25611
25710
  );
25612
25711
  for (const id of itemIds) {
25613
25712
  const el = document.getElementById(id);
25614
25713
  if (el) observer.observe(el);
25615
25714
  }
25616
25715
  return () => observer.disconnect();
25617
- }, [itemIds]);
25716
+ }, [itemIds, scrollContainerRef]);
25618
25717
  const handleClick = React67.useCallback(
25619
25718
  (e, id) => {
25620
- var _a;
25621
25719
  e.preventDefault();
25622
- (_a = document.getElementById(id)) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth", block: "start" });
25720
+ const target = document.getElementById(id);
25721
+ if (!target) return;
25722
+ target.scrollIntoView({ behavior: "smooth", block: "start" });
25623
25723
  },
25624
25724
  []
25625
25725
  );
@@ -25636,19 +25736,35 @@ function TableOfContents({
25636
25736
  type: "hover"
25637
25737
  }, scrollAreaProps), {
25638
25738
  className: cn("flex-1 min-h-0", scrollAreaProps == null ? void 0 : scrollAreaProps.className),
25639
- children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-4 pr-4", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
25640
- "a",
25641
- {
25642
- href: `#${item.id}`,
25643
- onClick: (e) => handleClick(e, item.id),
25644
- "aria-current": activeId === item.id ? "true" : void 0,
25645
- className: cn(
25646
- "text-sm transition-colors hover:text-m3-primary block",
25647
- activeId === item.id ? "text-m3-primary font-bold" : "text-m3-on-surface-variant font-medium"
25648
- ),
25649
- children: item.label
25650
- }
25651
- ) }, item.id)) })
25739
+ children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2 pr-4", children: items.map((item) => {
25740
+ var _a;
25741
+ const depth = (_a = item.depth) != null ? _a : 1;
25742
+ const isSubItem = depth > 1;
25743
+ return /* @__PURE__ */ jsxRuntime.jsx(
25744
+ "li",
25745
+ {
25746
+ className: cn(
25747
+ isSubItem && "pl-3.5 border-l border-m3-outline-variant/40 ml-1"
25748
+ ),
25749
+ children: /* @__PURE__ */ jsxRuntime.jsx(
25750
+ "a",
25751
+ {
25752
+ href: `#${item.id}`,
25753
+ onClick: (e) => handleClick(e, item.id),
25754
+ "aria-current": activeId === item.id ? "true" : void 0,
25755
+ className: cn(
25756
+ "transition-colors hover:text-m3-primary block truncate",
25757
+ isSubItem ? "text-xs py-0.5 leading-relaxed" : "text-sm py-1 font-medium leading-snug",
25758
+ activeId === item.id ? "text-m3-primary font-bold" : "text-m3-on-surface-variant"
25759
+ ),
25760
+ title: item.label,
25761
+ children: item.label
25762
+ }
25763
+ )
25764
+ },
25765
+ item.id
25766
+ );
25767
+ }) })
25652
25768
  })
25653
25769
  )
25654
25770
  ]
@@ -27354,6 +27470,7 @@ exports.SliderColors = SliderColors;
27354
27470
  exports.SliderTokens = SliderTokens;
27355
27471
  exports.SmallAppBar = SmallAppBar;
27356
27472
  exports.Snackbar = Snackbar;
27473
+ exports.SnackbarContext = SnackbarContext;
27357
27474
  exports.SnackbarHost = SnackbarHost;
27358
27475
  exports.SnackbarProvider = SnackbarProvider;
27359
27476
  exports.SplitButtonLayout = SplitButtonLayout;