@bug-on/m3-expressive 1.3.2 → 1.3.4

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.mjs CHANGED
@@ -3,9 +3,9 @@ import * as React67 from 'react';
3
3
  import { createContext, forwardRef, useState, useRef, useCallback, useMemo, useEffect, useLayoutEffect, useReducer, useContext, useId, cloneElement, createElement } from 'react';
4
4
  import { hexFromArgb, Hct, SchemeExpressive, SchemeNeutral, SchemeMonochrome, SchemeContent, SchemeFidelity, SchemeVibrant, SchemeTonalSpot } from '@material/material-color-utilities';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
+ import { AnimatePresence, m, LazyMotion, domMax, useReducedMotion, useMotionValue, animate, useAnimationFrame, useSpring, useTransform, LayoutGroup, useScroll, useMotionValueEvent } from 'motion/react';
6
7
  import { clsx } from 'clsx';
7
8
  import { twMerge } from 'tailwind-merge';
8
- import { AnimatePresence, m, LazyMotion, domMax, useReducedMotion, useMotionValue, animate, useAnimationFrame, useSpring, useTransform, LayoutGroup, useScroll, useMotionValueEvent } from 'motion/react';
9
9
  import * as RxContextMenu from '@radix-ui/react-context-menu';
10
10
  import * as RadixScrollArea from '@radix-ui/react-scroll-area';
11
11
  import { cornerRadius } from '@bug-on/m3-tokens';
@@ -228,7 +228,7 @@ function applyTheme(sourceColorHex, mode = "light", root = document.documentElem
228
228
  const resolved = resolveMode(mode);
229
229
  const colors = generateM3Theme(sourceColorHex, resolved, options);
230
230
  for (const [key, value] of Object.entries(colors)) {
231
- const kebabKey = key.replace(/[A-Z]/g, (m71) => `-${m71.toLowerCase()}`);
231
+ const kebabKey = key.replace(/[A-Z]/g, (m72) => `-${m72.toLowerCase()}`);
232
232
  root.style.setProperty(`--md-sys-color-${kebabKey}`, value);
233
233
  root.style.setProperty(`--color-m3-${kebabKey}`, value);
234
234
  }
@@ -250,7 +250,7 @@ function createMd3ExpressiveTheme(options) {
250
250
  function schemeToCssVariables(scheme) {
251
251
  const result = {};
252
252
  for (const [key, value] of Object.entries(scheme)) {
253
- const kebabKey = key.replace(/[A-Z]/g, (m71) => `-${m71.toLowerCase()}`);
253
+ const kebabKey = key.replace(/[A-Z]/g, (m72) => `-${m72.toLowerCase()}`);
254
254
  result[`--md-sys-color-${kebabKey}`] = value;
255
255
  }
256
256
  return result;
@@ -294,9 +294,6 @@ function MaterialSymbolsPreconnect({
294
294
  )
295
295
  ] });
296
296
  }
297
- function cn(...inputs) {
298
- return twMerge(clsx(inputs));
299
- }
300
297
 
301
298
  // src/shapes/core/features.ts
302
299
  function cornerFeature(cubics, convex2) {
@@ -1087,8 +1084,8 @@ var RoundedPolygon = class _RoundedPolygon {
1087
1084
  );
1088
1085
  const mid = c.pointOnCurve(0.5);
1089
1086
  const md = distanceSquared(mid.x - this.centerX, mid.y - this.centerY);
1090
- const m71 = Math.max(ad, md);
1091
- if (m71 > maxDistSq) maxDistSq = m71;
1087
+ const m72 = Math.max(ad, md);
1088
+ if (m72 > maxDistSq) maxDistSq = m72;
1092
1089
  }
1093
1090
  const d = Math.sqrt(maxDistSq);
1094
1091
  return [
@@ -2830,6 +2827,9 @@ function interpolatePath(morph, progress, width, height) {
2830
2827
  function fmt(v) {
2831
2828
  return Number(v.toFixed(4)).toString();
2832
2829
  }
2830
+ function cn(...inputs) {
2831
+ return twMerge(clsx(inputs));
2832
+ }
2833
2833
  function getMaskGradient(direction) {
2834
2834
  switch (direction) {
2835
2835
  case "bottom":
@@ -15440,7 +15440,7 @@ var TimePickerDialog = ({
15440
15440
  TimePickerDialog.displayName = "TimePickerDialog";
15441
15441
  var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
15442
15442
  var isValidHourInput = (h, is24hour) => is24hour ? h >= 0 && h <= 23 : h >= 1 && h <= 12;
15443
- var isValidMinuteInput = (m71) => m71 >= 0 && m71 <= 59;
15443
+ var isValidMinuteInput = (m72) => m72 >= 0 && m72 <= 59;
15444
15444
  var to24Hour = (hour12, isPm) => {
15445
15445
  if (isPm) {
15446
15446
  return hour12 === 12 ? 12 : hour12 + 12;
@@ -15476,8 +15476,8 @@ var useTimePickerState = (options) => {
15476
15476
  },
15477
15477
  [is24hour]
15478
15478
  );
15479
- const setMinute = useCallback((m71) => {
15480
- const clamped = clamp(m71, 0, 59);
15479
+ const setMinute = useCallback((m72) => {
15480
+ const clamped = clamp(m72, 0, 59);
15481
15481
  setMinuteState(clamped);
15482
15482
  setMinuteInputState(clamped);
15483
15483
  }, []);
@@ -15491,10 +15491,10 @@ var useTimePickerState = (options) => {
15491
15491
  },
15492
15492
  [is24hour, isPm]
15493
15493
  );
15494
- const setMinuteInput = useCallback((m71) => {
15495
- setMinuteInputState(m71);
15496
- if (isValidMinuteInput(m71)) {
15497
- setMinuteState(m71);
15494
+ const setMinuteInput = useCallback((m72) => {
15495
+ setMinuteInputState(m72);
15496
+ if (isValidMinuteInput(m72)) {
15497
+ setMinuteState(m72);
15498
15498
  }
15499
15499
  }, []);
15500
15500
  const setSelection = useCallback((mode) => {
@@ -18892,7 +18892,12 @@ var SEARCH_COLORS = {
18892
18892
  /** SearchViewTokens.DividerColor → outline */
18893
18893
  divider: "var(--md-sys-color-outline)",
18894
18894
  /** Focus indicator → secondary */
18895
- focusIndicator: "var(--md-sys-color-secondary)"
18895
+ focusIndicator: "var(--md-sys-color-secondary)",
18896
+ /** State layer overlay for interactive hover/press */
18897
+ stateLayer: "var(--md-sys-color-on-surface)"
18898
+ };
18899
+ var SEARCH_ELEVATION = {
18900
+ level3: "elevation-3"
18896
18901
  };
18897
18902
  var SEARCH_TYPOGRAPHY = {
18898
18903
  /** BodyLarge — used for input text and placeholder. */
@@ -18997,6 +19002,7 @@ function SearchBar({
18997
19002
  onActiveChange,
18998
19003
  leadingIcon,
18999
19004
  trailingIcon,
19005
+ avatar,
19000
19006
  placeholder = "Search",
19001
19007
  textAlign = "left",
19002
19008
  className,
@@ -19010,6 +19016,9 @@ function SearchBar({
19010
19016
  const inputRef = React67.useRef(null);
19011
19017
  const prevActiveRef = React67.useRef(active);
19012
19018
  const isRestoringFocusRef = React67.useRef(false);
19019
+ const [isHovered, setIsHovered] = React67.useState(false);
19020
+ const [isPressed, setIsPressed] = React67.useState(false);
19021
+ const [isFocused, setIsFocused] = React67.useState(false);
19013
19022
  React67.useEffect(() => {
19014
19023
  var _a;
19015
19024
  let rafId;
@@ -19026,10 +19035,14 @@ function SearchBar({
19026
19035
  };
19027
19036
  }, [active]);
19028
19037
  const handleFocus = () => {
19038
+ setIsFocused(true);
19029
19039
  if (!active && !isRestoringFocusRef.current) {
19030
19040
  onActiveChange(true);
19031
19041
  }
19032
19042
  };
19043
+ const handleBlur = () => {
19044
+ setIsFocused(false);
19045
+ };
19033
19046
  const handleFormSubmit = (e) => {
19034
19047
  e.preventDefault();
19035
19048
  onSearch(query);
@@ -19048,18 +19061,39 @@ function SearchBar({
19048
19061
  layout: !shouldReduceMotion,
19049
19062
  layoutId: shouldReduceMotion ? void 0 : searchId,
19050
19063
  transition: shouldReduceMotion ? void 0 : SEARCH_BAR_EXPAND_SPRING,
19051
- className: cn("relative", className),
19064
+ className: cn(
19065
+ "relative group select-none",
19066
+ SEARCH_ELEVATION.level3,
19067
+ className
19068
+ ),
19052
19069
  style: { height: SearchTokens.heights.bar },
19053
19070
  initial: shouldReduceMotion ? false : { opacity: 0, scale: 0.95 },
19054
19071
  animate: { opacity: 1, scale: 1 },
19055
19072
  exit: shouldReduceMotion ? {} : { opacity: 0, scale: 0.95, transition: SEARCH_BAR_EXIT_SPRING },
19073
+ onPointerEnter: () => setIsHovered(true),
19074
+ onPointerLeave: () => {
19075
+ setIsHovered(false);
19076
+ setIsPressed(false);
19077
+ },
19078
+ onPointerDown: () => setIsPressed(true),
19079
+ onPointerUp: () => setIsPressed(false),
19080
+ onPointerCancel: () => setIsPressed(false),
19056
19081
  children: [
19057
19082
  /* @__PURE__ */ jsx(
19058
19083
  "div",
19059
19084
  {
19060
- className: "absolute inset-0 rounded-full",
19085
+ className: "absolute inset-0 rounded-full overflow-hidden",
19061
19086
  style: { backgroundColor: SEARCH_COLORS.container },
19062
- "aria-hidden": "true"
19087
+ "aria-hidden": "true",
19088
+ children: /* @__PURE__ */ jsx(
19089
+ StateLayer,
19090
+ {
19091
+ hovered: isHovered,
19092
+ focused: isFocused,
19093
+ pressed: isPressed,
19094
+ style: { color: SEARCH_COLORS.stateLayer }
19095
+ }
19096
+ )
19063
19097
  }
19064
19098
  ),
19065
19099
  /* @__PURE__ */ jsx(
@@ -19105,21 +19139,36 @@ function SearchBar({
19105
19139
  ),
19106
19140
  style: { color: SEARCH_COLORS.inputText },
19107
19141
  onFocus: handleFocus,
19142
+ onBlur: handleBlur,
19108
19143
  onChange: (e) => onQueryChange(e.target.value),
19109
19144
  onKeyDown
19110
19145
  }
19111
19146
  )
19112
19147
  }
19113
19148
  ),
19114
- trailingIcon && /* @__PURE__ */ jsx(
19115
- "span",
19116
- {
19117
- className: "flex shrink-0 items-center justify-center",
19118
- style: { color: SEARCH_COLORS.trailingIcon },
19119
- "aria-hidden": "true",
19120
- children: trailingIcon
19121
- }
19122
- )
19149
+ (trailingIcon || avatar) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
19150
+ trailingIcon && /* @__PURE__ */ jsx(
19151
+ "span",
19152
+ {
19153
+ className: "flex shrink-0 items-center justify-center",
19154
+ style: { color: SEARCH_COLORS.trailingIcon },
19155
+ "aria-hidden": "true",
19156
+ children: trailingIcon
19157
+ }
19158
+ ),
19159
+ avatar && /* @__PURE__ */ jsx(
19160
+ "span",
19161
+ {
19162
+ className: "flex shrink-0 items-center justify-center rounded-full overflow-hidden",
19163
+ style: {
19164
+ width: SearchTokens.avatarSize,
19165
+ height: SearchTokens.avatarSize
19166
+ },
19167
+ "aria-hidden": "true",
19168
+ children: avatar
19169
+ }
19170
+ )
19171
+ ] })
19123
19172
  ] })
19124
19173
  }
19125
19174
  )
@@ -19182,40 +19231,77 @@ function useSearchViewFocus(inputRef, active) {
19182
19231
  function TrailingAction({
19183
19232
  query,
19184
19233
  trailingIcon,
19234
+ avatar,
19185
19235
  onClear
19186
19236
  }) {
19187
- if (query) {
19188
- return /* @__PURE__ */ jsx(
19189
- IconButton,
19237
+ const shouldReduceMotion = useReducedMotion();
19238
+ return /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
19239
+ /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: query ? /* @__PURE__ */ jsx(
19240
+ m.div,
19190
19241
  {
19191
- size: "sm",
19192
- style: { color: SEARCH_COLORS.trailingIcon },
19193
- "aria-label": "Clear search",
19194
- onClick: onClear,
19242
+ initial: shouldReduceMotion ? false : { opacity: 0, scale: 0.8 },
19243
+ animate: { opacity: 1, scale: 1 },
19244
+ exit: shouldReduceMotion ? {} : { opacity: 0, scale: 0.8 },
19245
+ transition: { duration: 0.15 },
19246
+ className: "flex items-center justify-center",
19195
19247
  children: /* @__PURE__ */ jsx(
19196
- "span",
19248
+ IconButton,
19197
19249
  {
19198
- className: "material-symbols-rounded select-none leading-none",
19199
- style: { fontSize: 20 },
19200
- "aria-hidden": "true",
19201
- children: "close"
19250
+ size: "sm",
19251
+ style: { color: SEARCH_COLORS.trailingIcon },
19252
+ "aria-label": "Clear search",
19253
+ onClick: onClear,
19254
+ children: /* @__PURE__ */ jsx(
19255
+ "span",
19256
+ {
19257
+ className: "material-symbols-rounded select-none leading-none",
19258
+ style: { fontSize: 20 },
19259
+ "aria-hidden": "true",
19260
+ children: "close"
19261
+ }
19262
+ )
19202
19263
  }
19203
19264
  )
19204
- }
19205
- );
19206
- }
19207
- if (trailingIcon) {
19208
- return /* @__PURE__ */ jsx(
19209
- "span",
19265
+ },
19266
+ "clear-action"
19267
+ ) : trailingIcon && /* @__PURE__ */ jsx(
19268
+ m.span,
19210
19269
  {
19270
+ initial: shouldReduceMotion ? false : { opacity: 0, scale: 0.8 },
19271
+ animate: { opacity: 1, scale: 1 },
19272
+ exit: shouldReduceMotion ? {} : { opacity: 0, scale: 0.8 },
19273
+ transition: { duration: 0.15 },
19211
19274
  className: "flex shrink-0 items-center justify-center",
19212
19275
  style: { color: SEARCH_COLORS.trailingIcon },
19213
19276
  "aria-hidden": "true",
19214
19277
  children: trailingIcon
19278
+ },
19279
+ "trailing-icon"
19280
+ ) }),
19281
+ avatar && /* @__PURE__ */ jsx(
19282
+ "span",
19283
+ {
19284
+ className: "flex shrink-0 items-center justify-center rounded-full overflow-hidden",
19285
+ style: {
19286
+ width: SearchTokens.avatarSize,
19287
+ height: SearchTokens.avatarSize
19288
+ },
19289
+ "aria-hidden": "true",
19290
+ children: avatar
19215
19291
  }
19216
- );
19217
- }
19218
- return null;
19292
+ )
19293
+ ] });
19294
+ }
19295
+ function DefaultSearchIcon2() {
19296
+ return /* @__PURE__ */ jsx(
19297
+ "span",
19298
+ {
19299
+ className: "material-symbols-rounded select-none leading-none",
19300
+ style: { fontSize: SearchTokens.iconSize },
19301
+ "aria-hidden": "true",
19302
+ children: "search"
19303
+ }
19304
+ );
19219
19305
  }
19220
19306
  function SearchViewDocked({
19221
19307
  query,
@@ -19225,6 +19311,7 @@ function SearchViewDocked({
19225
19311
  onActiveChange,
19226
19312
  leadingIcon,
19227
19313
  trailingIcon,
19314
+ avatar,
19228
19315
  placeholder = "Search",
19229
19316
  textAlign = "left",
19230
19317
  styleType = "contained",
@@ -19257,10 +19344,12 @@ function SearchViewDocked({
19257
19344
  m.div,
19258
19345
  {
19259
19346
  ref: dropdownRef,
19347
+ layout: !shouldReduceMotion,
19260
19348
  layoutId: shouldReduceMotion ? void 0 : searchId,
19261
19349
  className: cn(
19262
19350
  // DockedContainerShape = CornerExtraLarge = 28dp radius
19263
19351
  "rounded-[28px] overflow-hidden",
19352
+ SEARCH_ELEVATION.level3,
19264
19353
  viewClassName
19265
19354
  ),
19266
19355
  style: { backgroundColor: SEARCH_COLORS.container },
@@ -19282,7 +19371,7 @@ function SearchViewDocked({
19282
19371
  className: "flex shrink-0 items-center justify-center",
19283
19372
  style: { color: SEARCH_COLORS.leadingIcon },
19284
19373
  "aria-hidden": "true",
19285
- children: leadingIcon
19374
+ children: leadingIcon != null ? leadingIcon : /* @__PURE__ */ jsx(DefaultSearchIcon2, {})
19286
19375
  }
19287
19376
  ),
19288
19377
  /* @__PURE__ */ jsx(
@@ -19323,6 +19412,7 @@ function SearchViewDocked({
19323
19412
  {
19324
19413
  query,
19325
19414
  trailingIcon,
19415
+ avatar,
19326
19416
  onClear: () => onQueryChange("")
19327
19417
  }
19328
19418
  )
@@ -19343,7 +19433,7 @@ function SearchViewDocked({
19343
19433
  id: listboxId,
19344
19434
  role: "listbox",
19345
19435
  "aria-label": `${ariaLabel} results`,
19346
- className: "min-h-30",
19436
+ className: "min-h-[120px]",
19347
19437
  children
19348
19438
  }
19349
19439
  )
@@ -19372,6 +19462,7 @@ function SearchViewFullScreen({
19372
19462
  onActiveChange,
19373
19463
  leadingIcon,
19374
19464
  trailingIcon,
19465
+ avatar,
19375
19466
  placeholder = "Search",
19376
19467
  textAlign = "left",
19377
19468
  styleType = "contained",
@@ -19486,6 +19577,7 @@ function SearchViewFullScreen({
19486
19577
  {
19487
19578
  query,
19488
19579
  trailingIcon,
19580
+ avatar,
19489
19581
  onClear: () => onQueryChange("")
19490
19582
  }
19491
19583
  )
@@ -19537,6 +19629,7 @@ function SearchComponent({
19537
19629
  hasGap = false,
19538
19630
  leadingIcon,
19539
19631
  trailingIcon,
19632
+ avatar,
19540
19633
  placeholder = "Search",
19541
19634
  textAlign = "left",
19542
19635
  children,
@@ -19564,6 +19657,7 @@ function SearchComponent({
19564
19657
  onActiveChange,
19565
19658
  leadingIcon,
19566
19659
  trailingIcon,
19660
+ avatar,
19567
19661
  placeholder,
19568
19662
  textAlign,
19569
19663
  "aria-label": ariaLabel,
@@ -24059,11 +24153,13 @@ var Snackbar = React67.memo(function Snackbar2({
24059
24153
  type: "button",
24060
24154
  onClick: handleAction,
24061
24155
  className: cn(
24062
- "text-sm font-medium",
24063
- "px-2 py-1 rounded-sm",
24064
- "focus-visible:outline-none focus-visible:ring-2",
24065
- "transition-colors whitespace-nowrap",
24066
- "text-m3-inverse-primary"
24156
+ "inline-flex items-center justify-center",
24157
+ "h-10 px-3 py-2.5 rounded-sm",
24158
+ "text-sm font-medium leading-5 whitespace-nowrap",
24159
+ "text-m3-inverse-primary",
24160
+ "hover:bg-m3-inverse-primary/8 focus-visible:bg-m3-inverse-primary/12 active:bg-m3-inverse-primary/12",
24161
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-inverse-primary",
24162
+ "transition-colors select-none cursor-pointer"
24067
24163
  ),
24068
24164
  children: actionLabel
24069
24165
  }
@@ -24072,10 +24168,10 @@ var Snackbar = React67.memo(function Snackbar2({
24072
24168
  IconButton,
24073
24169
  {
24074
24170
  size: "sm",
24075
- colorStyle: "filled",
24171
+ colorStyle: "standard",
24076
24172
  "aria-label": "Dismiss notification",
24077
24173
  onClick: handleDismiss,
24078
- className: "text-m3-inverse-on-surface bg-m3-inverse-surface",
24174
+ 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",
24079
24175
  children: /* @__PURE__ */ jsx(Icon, { name: "close", "aria-hidden": "true" })
24080
24176
  }
24081
24177
  )
@@ -25569,12 +25665,15 @@ function useThemeMode() {
25569
25665
  function TableOfContents({
25570
25666
  items,
25571
25667
  className,
25572
- scrollAreaProps
25668
+ scrollAreaProps,
25669
+ scrollContainerRef
25573
25670
  }) {
25574
25671
  const [activeId, setActiveId] = useState("");
25575
25672
  const itemIds = useMemo(() => items.map((i) => i.id), [items]);
25576
25673
  useEffect(() => {
25674
+ var _a;
25577
25675
  if (typeof IntersectionObserver === "undefined") return;
25676
+ const root = (_a = scrollContainerRef == null ? void 0 : scrollContainerRef.current) != null ? _a : null;
25578
25677
  const observer = new IntersectionObserver(
25579
25678
  (entries) => {
25580
25679
  for (const entry of entries) {
@@ -25582,19 +25681,20 @@ function TableOfContents({
25582
25681
  }
25583
25682
  },
25584
25683
  // rootMargin: top offset ~100px (fixed header), bottom -80% (early switch)
25585
- { rootMargin: "-100px 0% -80% 0%" }
25684
+ { root, rootMargin: "-100px 0% -80% 0%" }
25586
25685
  );
25587
25686
  for (const id of itemIds) {
25588
25687
  const el = document.getElementById(id);
25589
25688
  if (el) observer.observe(el);
25590
25689
  }
25591
25690
  return () => observer.disconnect();
25592
- }, [itemIds]);
25691
+ }, [itemIds, scrollContainerRef]);
25593
25692
  const handleClick = useCallback(
25594
25693
  (e, id) => {
25595
- var _a;
25596
25694
  e.preventDefault();
25597
- (_a = document.getElementById(id)) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth", block: "start" });
25695
+ const target = document.getElementById(id);
25696
+ if (!target) return;
25697
+ target.scrollIntoView({ behavior: "smooth", block: "start" });
25598
25698
  },
25599
25699
  []
25600
25700
  );
@@ -25611,19 +25711,35 @@ function TableOfContents({
25611
25711
  type: "hover"
25612
25712
  }, scrollAreaProps), {
25613
25713
  className: cn("flex-1 min-h-0", scrollAreaProps == null ? void 0 : scrollAreaProps.className),
25614
- children: /* @__PURE__ */ jsx("ul", { className: "space-y-4 pr-4", children: items.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
25615
- "a",
25616
- {
25617
- href: `#${item.id}`,
25618
- onClick: (e) => handleClick(e, item.id),
25619
- "aria-current": activeId === item.id ? "true" : void 0,
25620
- className: cn(
25621
- "text-sm transition-colors hover:text-m3-primary block",
25622
- activeId === item.id ? "text-m3-primary font-bold" : "text-m3-on-surface-variant font-medium"
25623
- ),
25624
- children: item.label
25625
- }
25626
- ) }, item.id)) })
25714
+ children: /* @__PURE__ */ jsx("ul", { className: "space-y-2 pr-4", children: items.map((item) => {
25715
+ var _a;
25716
+ const depth = (_a = item.depth) != null ? _a : 1;
25717
+ const isSubItem = depth > 1;
25718
+ return /* @__PURE__ */ jsx(
25719
+ "li",
25720
+ {
25721
+ className: cn(
25722
+ isSubItem && "pl-3.5 border-l border-m3-outline-variant/40 ml-1"
25723
+ ),
25724
+ children: /* @__PURE__ */ jsx(
25725
+ "a",
25726
+ {
25727
+ href: `#${item.id}`,
25728
+ onClick: (e) => handleClick(e, item.id),
25729
+ "aria-current": activeId === item.id ? "true" : void 0,
25730
+ className: cn(
25731
+ "transition-colors hover:text-m3-primary block truncate",
25732
+ isSubItem ? "text-xs py-0.5 leading-relaxed" : "text-sm py-1 font-medium leading-snug",
25733
+ activeId === item.id ? "text-m3-primary font-bold" : "text-m3-on-surface-variant"
25734
+ ),
25735
+ title: item.label,
25736
+ children: item.label
25737
+ }
25738
+ )
25739
+ },
25740
+ item.id
25741
+ );
25742
+ }) })
25627
25743
  })
25628
25744
  )
25629
25745
  ]
@@ -27156,6 +27272,6 @@ function TooltipBox({
27156
27272
  ] });
27157
27273
  }
27158
27274
 
27159
- export { ANGLE_EPSILON, APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, BUTTON_COLOR_TOKENS, BUTTON_SIZE_TOKENS, Badge, BadgedBox, BottomAppBar, BottomDockedToolbar, BottomSheet, BottomSheetModal, Button, ButtonDistribute, ButtonGroup, CHECK_ICON_VARIANTS, Card, CardContent, CardFooter, CardHeader, CardMedia, Carousel, CarouselGrid, CarouselItem, CarouselScrollClient, CarouselTokens, Checkbox, Chip, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, Cubic, DISTANCE_EPSILON, DIVIDER_COLOR, DIVIDER_PADDING, DP_CLASSES, DP_COLORS, DP_SHAPE, DP_SIZE, DatePicker, DatePickerDialog, DatePickerInput, DateRangePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogFullScreenContent, DialogHeader, DialogIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DockedToolbar, DragHandle, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, ElevatedSplitButtonLeading, ElevatedSplitButtonTrailing, ElevatedSplitButtonTrailingUncheckable, ExtendedFAB, FAB, FABMenu, FABMenuItem, FABPosition, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, FLOAT_PI, FadingBlurMask, FilledSplitButtonLeading, FilledSplitButtonTrailing, FilledSplitButtonTrailingUncheckable, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, Icon, IconButton, LIST_TOKENS, LargeFlexibleAppBar, List, ListContext, ListDivider, ListItem, LoadingIndicator, MD3CornerRadius, MD3Shapes, MD3ThemeProvider, MD3_EXPRESSIVE_FONT_VARIATION, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MaterialSymbolsPreconnect, MeasuredPolygon, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, Morph, MutableCubic, NavigationBar, NavigationBarItem, NavigationRail, NavigationRailItem, OutlinedSplitButtonLeading, OutlinedSplitButtonTrailing, OutlinedSplitButtonTrailingUncheckable, PlainTooltip, ProgressIndicator, RadioButton, RadioGroup, RangeSlider, RichTooltip, Ripple, RoundedPolygon, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Scrim, ScrollArea, ScrollAreaScrollbar, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, Select, ShapeIcon, ShapeMedia, ShapeMediaServer, ShapeSvg, SideSheet, SideSheetModal, Slider, SliderColors, SliderTokens, SmallAppBar, Snackbar, SnackbarHost, SnackbarProvider, SplitButtonLayout, SplitButtonLeading, SplitButtonTrailing, SplitButtonTrailingUncheckable, SubMenu, Switch, SwitchColors, SwitchTokens, TP_CLASSES, TP_COLORS, TP_SHAPE, TP_SIZE, Tab, TableOfContents, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, Text, TextField, TimeInput, TimePicker, TimePickerDialog, ToggleFAB, TonalSplitButtonLeading, TonalSplitButtonTrailing, TonalSplitButtonTrailingUncheckable, ToolbarDivider, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonTokens, ToolbarToggleButton, ToolbarToggleButtonTokens, TooltipBox, TooltipCaretShape, TooltipTokens, TriStateCheckbox, TypeScaleTokens, Typography, TypographyContext, TypographyKeyTokens, TypographyProvider, TypographyTokens, UNROUNDED, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, addPoints, appBarTypography, applyTheme, buildWavePath, cardVariants, circle, clockwise, cn, convex, cornerFeature, cornerRounding, createDoubleMapper, createMd3ExpressiveTheme, directionVector, distance, distanceSquared, dividePoint, dotProduct, edgeFeature, featureMapper, generateM3Theme, getDirection, getDistance, getDistanceSquared, getExpressiveShape, getListItemHeight, getToolbarColors, interpolate, interpolatePath, lerpPoint, pill, pillStar, point, positiveModulo, radialToCartesian, rectangle, resolveMode, rotate90, scalePoint, shouldTopAlign, square, standardFloatingToolbarColors, star, subtractPoints, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, toClipPath, toSvgPath, transformFeature, transformPoint, useAppBarScroll, useBottomSheet, useCarouselA11y, useCarouselKeylines, useRipple as useDOMRipple, useDatePickerState, useDateRangePickerState, useFloatingToolbarScrollBehavior, useListContext, useMediaQuery, useMenuContext, useRipple2 as useRipple, useRippleState, useSearchKeyboard, useShapeMorph, useSnackbar, useSnackbarState, useTheme, useThemeMode, useTimePickerState, useTooltipPosition, useTooltipState, useTypography, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
27275
+ export { ANGLE_EPSILON, APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, BUTTON_COLOR_TOKENS, BUTTON_SIZE_TOKENS, Badge, BadgedBox, BottomAppBar, BottomDockedToolbar, BottomSheet, BottomSheetModal, Button, ButtonDistribute, ButtonGroup, CHECK_ICON_VARIANTS, Card, CardContent, CardFooter, CardHeader, CardMedia, Carousel, CarouselGrid, CarouselItem, CarouselScrollClient, CarouselTokens, Checkbox, Chip, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, Cubic, DISTANCE_EPSILON, DIVIDER_COLOR, DIVIDER_PADDING, DP_CLASSES, DP_COLORS, DP_SHAPE, DP_SIZE, DatePicker, DatePickerDialog, DatePickerInput, DateRangePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogFullScreenContent, DialogHeader, DialogIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DockedToolbar, DragHandle, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, ElevatedSplitButtonLeading, ElevatedSplitButtonTrailing, ElevatedSplitButtonTrailingUncheckable, ExtendedFAB, FAB, FABMenu, FABMenuItem, FABPosition, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, FLOAT_PI, FadingBlurMask, FilledSplitButtonLeading, FilledSplitButtonTrailing, FilledSplitButtonTrailingUncheckable, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, Icon, IconButton, LIST_TOKENS, LargeFlexibleAppBar, List, ListContext, ListDivider, ListItem, LoadingIndicator, MD3CornerRadius, MD3Shapes, MD3ThemeProvider, MD3_EXPRESSIVE_FONT_VARIATION, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MaterialSymbolsPreconnect, MeasuredPolygon, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, Morph, MutableCubic, NavigationBar, NavigationBarItem, NavigationRail, NavigationRailItem, OutlinedSplitButtonLeading, OutlinedSplitButtonTrailing, OutlinedSplitButtonTrailingUncheckable, PlainTooltip, ProgressIndicator, RadioButton, RadioGroup, RangeSlider, RichTooltip, Ripple, RoundedPolygon, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Scrim, ScrollArea, ScrollAreaScrollbar, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, Select, ShapeIcon, ShapeMedia, ShapeMediaServer, ShapeSvg, SideSheet, SideSheetModal, Slider, SliderColors, SliderTokens, SmallAppBar, Snackbar, SnackbarContext, SnackbarHost, SnackbarProvider, SplitButtonLayout, SplitButtonLeading, SplitButtonTrailing, SplitButtonTrailingUncheckable, SubMenu, Switch, SwitchColors, SwitchTokens, TP_CLASSES, TP_COLORS, TP_SHAPE, TP_SIZE, Tab, TableOfContents, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, Text, TextField, TimeInput, TimePicker, TimePickerDialog, ToggleFAB, TonalSplitButtonLeading, TonalSplitButtonTrailing, TonalSplitButtonTrailingUncheckable, ToolbarDivider, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonTokens, ToolbarToggleButton, ToolbarToggleButtonTokens, TooltipBox, TooltipCaretShape, TooltipTokens, TriStateCheckbox, TypeScaleTokens, Typography, TypographyContext, TypographyKeyTokens, TypographyProvider, TypographyTokens, UNROUNDED, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, addPoints, appBarTypography, applyTheme, buildWavePath, cardVariants, circle, clockwise, convex, cornerFeature, cornerRounding, createDoubleMapper, createMd3ExpressiveTheme, directionVector, distance, distanceSquared, dividePoint, dotProduct, edgeFeature, featureMapper, generateM3Theme, getDirection, getDistance, getDistanceSquared, getExpressiveShape, getListItemHeight, getToolbarColors, interpolate, interpolatePath, lerpPoint, pill, pillStar, point, positiveModulo, radialToCartesian, rectangle, resolveMode, rotate90, scalePoint, shouldTopAlign, square, standardFloatingToolbarColors, star, subtractPoints, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, toClipPath, toSvgPath, transformFeature, transformPoint, useAppBarScroll, useBottomSheet, useCarouselA11y, useCarouselKeylines, useRipple as useDOMRipple, useDatePickerState, useDateRangePickerState, useFloatingToolbarScrollBehavior, useListContext, useMediaQuery, useMenuContext, useRipple2 as useRipple, useRippleState, useSearchKeyboard, useShapeMorph, useSnackbar, useSnackbarState, useTheme, useThemeMode, useTimePickerState, useTooltipPosition, useTooltipState, useTypography, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
27160
27276
  //# sourceMappingURL=index.mjs.map
27161
27277
  //# sourceMappingURL=index.mjs.map