@bug-on/m3-expressive 1.3.0 → 1.3.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/buttons.d.mts +1 -1
  3. package/dist/buttons.d.ts +1 -1
  4. package/dist/buttons.js +185 -40
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +186 -41
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/core.js +156 -25
  9. package/dist/core.js.map +1 -1
  10. package/dist/core.mjs +157 -26
  11. package/dist/core.mjs.map +1 -1
  12. package/dist/feedback.d.mts +20 -0
  13. package/dist/feedback.d.ts +20 -0
  14. package/dist/feedback.js +156 -25
  15. package/dist/feedback.js.map +1 -1
  16. package/dist/feedback.mjs +157 -26
  17. package/dist/feedback.mjs.map +1 -1
  18. package/dist/forms.d.mts +3 -2
  19. package/dist/forms.d.ts +3 -2
  20. package/dist/forms.js +88 -100
  21. package/dist/forms.js.map +1 -1
  22. package/dist/forms.mjs +88 -100
  23. package/dist/forms.mjs.map +1 -1
  24. package/dist/index.d.mts +3 -3
  25. package/dist/index.d.ts +3 -3
  26. package/dist/index.js +279 -146
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +280 -147
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/layout.js +158 -27
  31. package/dist/layout.js.map +1 -1
  32. package/dist/layout.mjs +159 -28
  33. package/dist/layout.mjs.map +1 -1
  34. package/dist/navigation.js +156 -25
  35. package/dist/navigation.js.map +1 -1
  36. package/dist/navigation.mjs +157 -26
  37. package/dist/navigation.mjs.map +1 -1
  38. package/dist/overlays.js +156 -25
  39. package/dist/overlays.js.map +1 -1
  40. package/dist/overlays.mjs +157 -26
  41. package/dist/overlays.mjs.map +1 -1
  42. package/dist/pickers.js +156 -25
  43. package/dist/pickers.js.map +1 -1
  44. package/dist/pickers.mjs +157 -26
  45. package/dist/pickers.mjs.map +1 -1
  46. package/dist/{split-button-trailing-uncheckable-26qlZvKT.d.mts → split-button-trailing-uncheckable-CIVEYgjY.d.mts} +2 -0
  47. package/dist/{split-button-trailing-uncheckable-CXUVrH64.d.ts → split-button-trailing-uncheckable-DTQJjzsB.d.ts} +2 -0
  48. package/dist/{text-field-DWC7qOvp.d.mts → text-field-CiOmDM_8.d.ts} +52 -51
  49. package/dist/{text-field-DWC7qOvp.d.ts → text-field-Ear3hCSq.d.mts} +52 -51
  50. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -5846,7 +5846,7 @@ LoadingIndicator.displayName = "LoadingIndicator";
5846
5846
  function easeInOutCubic(x) {
5847
5847
  return x < 0.5 ? 4 * x * x * x : 1 - (-2 * x + 2) ** 3 / 2;
5848
5848
  }
5849
- function generateWavyCircularPath(center, radius, amplitude, wavelength) {
5849
+ function generateWavyCircularPath(center, radius, amplitude, wavelength, phase = 0) {
5850
5850
  const circumference = 2 * Math.PI * radius;
5851
5851
  const numWaves = Math.max(
5852
5852
  3,
@@ -5854,8 +5854,8 @@ function generateWavyCircularPath(center, radius, amplitude, wavelength) {
5854
5854
  );
5855
5855
  const steps = numWaves * 4;
5856
5856
  const dt = 2 * Math.PI / steps;
5857
- const rAt = (t) => radius + amplitude * Math.sin(numWaves * t);
5858
- const drAt = (t) => amplitude * numWaves * Math.cos(numWaves * t);
5857
+ const rAt = (t) => radius + amplitude * Math.sin(numWaves * t + phase);
5858
+ const drAt = (t) => amplitude * numWaves * Math.cos(numWaves * t + phase);
5859
5859
  const xAt = (t) => center + rAt(t) * Math.cos(t);
5860
5860
  const yAt = (t) => center + rAt(t) * Math.sin(t);
5861
5861
  const dxAt = (t) => drAt(t) * Math.cos(t) - rAt(t) * Math.sin(t);
@@ -5920,15 +5920,18 @@ var CircularProgress = React62__namespace.forwardRef(
5920
5920
  size = 48,
5921
5921
  trackHeight = 4,
5922
5922
  shape = "flat",
5923
+ trackShape = "flat",
5923
5924
  amplitude,
5924
5925
  wavelength,
5925
5926
  gapSize = 4,
5927
+ waveSpeed = 1,
5926
5928
  crawlerSpeed = 1,
5927
5929
  color,
5928
5930
  trackColor,
5929
5931
  showTrack = "auto",
5930
5932
  minProgress = DEFAULT_MIN_PROGRESS,
5931
5933
  maxProgress = DEFAULT_MAX_PROGRESS,
5934
+ determinateAnimation = "md3",
5932
5935
  amplitudeRange,
5933
5936
  className,
5934
5937
  "aria-label": ariaLabel
@@ -5937,15 +5940,18 @@ var CircularProgress = React62__namespace.forwardRef(
5937
5940
  "size",
5938
5941
  "trackHeight",
5939
5942
  "shape",
5943
+ "trackShape",
5940
5944
  "amplitude",
5941
5945
  "wavelength",
5942
5946
  "gapSize",
5947
+ "waveSpeed",
5943
5948
  "crawlerSpeed",
5944
5949
  "color",
5945
5950
  "trackColor",
5946
5951
  "showTrack",
5947
5952
  "minProgress",
5948
5953
  "maxProgress",
5954
+ "determinateAnimation",
5949
5955
  "amplitudeRange",
5950
5956
  "className",
5951
5957
  "aria-label"
@@ -5958,6 +5964,7 @@ var CircularProgress = React62__namespace.forwardRef(
5958
5964
  const bgTrackColor = trackColor || "var(--md-sys-color-indicator-track)";
5959
5965
  const isWavy = shape === "wavy";
5960
5966
  const shouldShowIndeterminateTrack = showTrack === "auto" ? isWavy : showTrack;
5967
+ const shouldShowDeterminateTrack = showTrack === "auto" ? true : showTrack;
5961
5968
  const BASELINE_SIZE = 48;
5962
5969
  const scaleFactor = size / BASELINE_SIZE;
5963
5970
  const effectiveAmplitude = React62__namespace.useMemo(
@@ -5990,19 +5997,50 @@ var CircularProgress = React62__namespace.forwardRef(
5990
5997
  const trackOffset = isDeterminate ? activeAngularFraction + gapForTrack : 0;
5991
5998
  const trackLength = isDeterminate ? Math.max(1e-3, 1 - activeAngularFraction - 2 * gapForTrack) : 1;
5992
5999
  const ActiveCircleElem = react.m.circle;
5993
- const ActivePathElem = react.m.path;
5994
6000
  const indeterminateSvgRef = React62__namespace.useRef(null);
5995
6001
  const indeterminateTrackRef = React62__namespace.useRef(null);
5996
6002
  const indeterminateActiveRef = React62__namespace.useRef(null);
5997
6003
  const indeterminateWavyTrackPathRef = React62__namespace.useRef(null);
5998
6004
  const indeterminateWavyActivePathRef = React62__namespace.useRef(null);
6005
+ const determinateWavyActivePathRef = React62__namespace.useRef(null);
6006
+ const determinateWavyTrackPathRef = React62__namespace.useRef(null);
5999
6007
  const cachedPathLengthRef = React62__namespace.useRef(0);
6008
+ const fractionMV = react.useMotionValue(isDeterminate ? clampedValue / 100 : 0);
6009
+ const amplitudeMV = react.useMotionValue(isWavy ? effectiveAmplitude : 0);
6010
+ React62__namespace.useEffect(() => {
6011
+ if (isDeterminate) {
6012
+ react.animate(fractionMV, clampedValue / 100, {
6013
+ duration: 0.4,
6014
+ ease: [0.2, 0, 0, 1]
6015
+ });
6016
+ }
6017
+ }, [clampedValue, isDeterminate, fractionMV]);
6018
+ React62__namespace.useEffect(() => {
6019
+ if (!isDeterminate || !isWavy) return;
6020
+ const fraction = clampedValue / 100;
6021
+ let targetAmp = effectiveAmplitude;
6022
+ if (determinateAnimation === "md3") {
6023
+ targetAmp = fraction <= 0.1 || fraction >= 0.95 ? 0 : effectiveAmplitude;
6024
+ }
6025
+ react.animate(amplitudeMV, targetAmp, {
6026
+ type: "spring",
6027
+ bounce: 0,
6028
+ duration: 0.5
6029
+ });
6030
+ }, [
6031
+ clampedValue,
6032
+ isDeterminate,
6033
+ isWavy,
6034
+ effectiveAmplitude,
6035
+ amplitudeMV,
6036
+ determinateAnimation
6037
+ ]);
6000
6038
  React62__namespace.useLayoutEffect(() => {
6001
6039
  if (!isWavy || !wavyActivePath) {
6002
6040
  cachedPathLengthRef.current = circumference;
6003
6041
  return;
6004
6042
  }
6005
- const el = indeterminateActiveRef.current;
6043
+ const el = indeterminateActiveRef.current || determinateWavyActivePathRef.current;
6006
6044
  if (el && "getTotalLength" in el) {
6007
6045
  try {
6008
6046
  const len = el.getTotalLength();
@@ -6016,7 +6054,65 @@ var CircularProgress = React62__namespace.forwardRef(
6016
6054
  cachedPathLengthRef.current = circumference;
6017
6055
  }, [isWavy, circumference, wavyActivePath]);
6018
6056
  react.useAnimationFrame((time) => {
6019
- if (isDeterminate) return;
6057
+ const safeWaveSpeed = Math.max(0.1, waveSpeed);
6058
+ const wavePhase = time / 1e3 * safeWaveSpeed * 2 * Math.PI;
6059
+ if (isDeterminate) {
6060
+ if (isWavy) {
6061
+ const currentAmp = amplitudeMV.get();
6062
+ const dynamicPath = generateWavyCircularPath(
6063
+ center,
6064
+ radius,
6065
+ currentAmp,
6066
+ effectiveWavelength,
6067
+ wavePhase
6068
+ );
6069
+ if (determinateWavyActivePathRef.current) {
6070
+ determinateWavyActivePathRef.current.setAttribute("d", dynamicPath);
6071
+ }
6072
+ if (trackShape === "wavy" && determinateWavyTrackPathRef.current) {
6073
+ determinateWavyTrackPathRef.current.setAttribute("d", dynamicPath);
6074
+ }
6075
+ const pathEl = determinateWavyActivePathRef.current;
6076
+ let totalLen = cachedPathLengthRef.current || circumference;
6077
+ if (pathEl) {
6078
+ try {
6079
+ const len = pathEl.getTotalLength();
6080
+ if (len > 0) totalLen = len;
6081
+ } catch (e) {
6082
+ }
6083
+ }
6084
+ const activeFrac = Math.max(0, Math.min(1, fractionMV.get()));
6085
+ const activeLen = totalLen * activeFrac;
6086
+ if (determinateWavyActivePathRef.current) {
6087
+ determinateWavyActivePathRef.current.setAttribute(
6088
+ "stroke-dasharray",
6089
+ `${activeLen} ${totalLen}`
6090
+ );
6091
+ determinateWavyActivePathRef.current.setAttribute(
6092
+ "stroke-dashoffset",
6093
+ "0"
6094
+ );
6095
+ }
6096
+ if (shouldShowDeterminateTrack && trackShape === "wavy" && determinateWavyTrackPathRef.current) {
6097
+ const gapFrac = (gapSize + trackHeight) / totalLen;
6098
+ const trackStartFrac = activeFrac + gapFrac;
6099
+ const trackLen = Math.max(
6100
+ 1e-3,
6101
+ totalLen * (1 - activeFrac - 2 * gapFrac)
6102
+ );
6103
+ const trackOff = -totalLen * trackStartFrac;
6104
+ determinateWavyTrackPathRef.current.setAttribute(
6105
+ "stroke-dasharray",
6106
+ `${trackLen} ${totalLen}`
6107
+ );
6108
+ determinateWavyTrackPathRef.current.setAttribute(
6109
+ "stroke-dashoffset",
6110
+ `${trackOff}`
6111
+ );
6112
+ }
6113
+ }
6114
+ return;
6115
+ }
6020
6116
  const safeCrawlerSpeed = Math.max(0.1, crawlerSpeed);
6021
6117
  const scaledTime = time * safeCrawlerSpeed;
6022
6118
  const globalCycle = scaledTime % GLOBAL_ROTATION_DURATION;
@@ -6051,7 +6147,8 @@ var CircularProgress = React62__namespace.forwardRef(
6051
6147
  center,
6052
6148
  radius,
6053
6149
  currentAmplitude,
6054
- effectiveWavelength
6150
+ effectiveWavelength,
6151
+ wavePhase
6055
6152
  );
6056
6153
  if (indeterminateWavyActivePathRef.current) {
6057
6154
  indeterminateWavyActivePathRef.current.setAttribute("d", dynamicPath);
@@ -6146,7 +6243,7 @@ var CircularProgress = React62__namespace.forwardRef(
6146
6243
  style: { width: size, height: size }
6147
6244
  }, restProps), {
6148
6245
  children: /* @__PURE__ */ jsxRuntime.jsxs(react.LazyMotion, { features: react.domMax, strict: true, children: [
6149
- /* @__PURE__ */ jsxRuntime.jsxs(
6246
+ /* @__PURE__ */ jsxRuntime.jsx(
6150
6247
  "svg",
6151
6248
  {
6152
6249
  width: size,
@@ -6154,8 +6251,18 @@ var CircularProgress = React62__namespace.forwardRef(
6154
6251
  viewBox: `0 0 ${size} ${size}`,
6155
6252
  "aria-hidden": "true",
6156
6253
  style: { transform: "rotate(-90deg)", overflow: "visible" },
6157
- children: [
6158
- isDeterminate ? /* @__PURE__ */ jsxRuntime.jsx(
6254
+ children: isDeterminate ? isWavy ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6255
+ shouldShowDeterminateTrack && (trackShape === "wavy" ? /* @__PURE__ */ jsxRuntime.jsx(
6256
+ "path",
6257
+ {
6258
+ ref: determinateWavyTrackPathRef,
6259
+ d: wavyActivePath != null ? wavyActivePath : "",
6260
+ fill: "none",
6261
+ stroke: bgTrackColor,
6262
+ strokeWidth: trackHeight,
6263
+ strokeLinecap: "round"
6264
+ }
6265
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
6159
6266
  react.m.circle,
6160
6267
  {
6161
6268
  cx: center,
@@ -6164,28 +6271,52 @@ var CircularProgress = React62__namespace.forwardRef(
6164
6271
  fill: "none",
6165
6272
  stroke: bgTrackColor,
6166
6273
  strokeWidth: trackHeight,
6167
- initial: { pathLength: trackLength, pathOffset: trackOffset },
6168
- animate: { pathLength: trackLength, pathOffset: trackOffset },
6274
+ initial: {
6275
+ pathLength: trackLength,
6276
+ pathOffset: trackOffset
6277
+ },
6278
+ animate: {
6279
+ pathLength: trackLength,
6280
+ pathOffset: trackOffset
6281
+ },
6169
6282
  transition: { duration: 0.4, ease: [0.2, 0, 0, 1] },
6170
6283
  strokeLinecap: "round"
6171
6284
  }
6172
- ) : null,
6173
- isDeterminate && (isWavy ? /* @__PURE__ */ jsxRuntime.jsx(
6174
- ActivePathElem,
6285
+ )),
6286
+ /* @__PURE__ */ jsxRuntime.jsx(
6287
+ "path",
6175
6288
  {
6289
+ ref: determinateWavyActivePathRef,
6176
6290
  d: wavyActivePath != null ? wavyActivePath : "",
6177
6291
  fill: "none",
6178
6292
  stroke: activeColor,
6179
6293
  strokeWidth: trackHeight,
6180
- strokeLinecap: "round",
6181
- initial: { pathLength: 0 },
6182
- animate: { pathLength: clampedValue / 100 },
6183
- transition: {
6184
- duration: 0.4,
6185
- ease: [0.2, 0, 0, 1]
6186
- }
6294
+ strokeLinecap: "round"
6187
6295
  }
6188
- ) : /* @__PURE__ */ jsxRuntime.jsx(
6296
+ )
6297
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6298
+ /* @__PURE__ */ jsxRuntime.jsx(
6299
+ react.m.circle,
6300
+ {
6301
+ cx: center,
6302
+ cy: center,
6303
+ r: radius,
6304
+ fill: "none",
6305
+ stroke: bgTrackColor,
6306
+ strokeWidth: trackHeight,
6307
+ initial: {
6308
+ pathLength: trackLength,
6309
+ pathOffset: trackOffset
6310
+ },
6311
+ animate: {
6312
+ pathLength: trackLength,
6313
+ pathOffset: trackOffset
6314
+ },
6315
+ transition: { duration: 0.4, ease: [0.2, 0, 0, 1] },
6316
+ strokeLinecap: "round"
6317
+ }
6318
+ ),
6319
+ /* @__PURE__ */ jsxRuntime.jsx(
6189
6320
  ActiveCircleElem,
6190
6321
  {
6191
6322
  cx: center,
@@ -6202,8 +6333,8 @@ var CircularProgress = React62__namespace.forwardRef(
6202
6333
  ease: [0.2, 0, 0, 1]
6203
6334
  }
6204
6335
  }
6205
- ))
6206
- ]
6336
+ )
6337
+ ] }) : null
6207
6338
  }
6208
6339
  ),
6209
6340
  !isDeterminate && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9366,11 +9497,12 @@ var SplitButtonLayoutComponent = React62__namespace.forwardRef(
9366
9497
  "div",
9367
9498
  __spreadProps(__spreadValues({
9368
9499
  ref,
9500
+ role: "group",
9369
9501
  className: cn(
9370
9502
  "inline-flex flex-row items-stretch justify-center w-fit shrink-0 relative",
9371
9503
  className
9372
9504
  ),
9373
- style: { gap: `${spacing}px` }
9505
+ style: __spreadValues({ gap: `${spacing}px` }, restProps.style)
9374
9506
  }, restProps), {
9375
9507
  children: [
9376
9508
  leadingButton,
@@ -9583,11 +9715,11 @@ var LEADING_ICON_SIZE_FOR_SIZE = {
9583
9715
  xl: 40
9584
9716
  };
9585
9717
  var splitButtonSizeVariants = {
9586
- xs: "min-h-[32px]",
9587
- sm: "min-h-[40px]",
9588
- md: "min-h-[56px]",
9589
- lg: "min-h-[96px]",
9590
- xl: "min-h-[136px]"
9718
+ xs: "h-[32px] min-h-[32px]",
9719
+ sm: "h-[40px] min-h-[40px]",
9720
+ md: "h-[56px] min-h-[56px]",
9721
+ lg: "h-[96px] min-h-[96px]",
9722
+ xl: "h-[136px] min-h-[136px]"
9591
9723
  };
9592
9724
  var splitButtonVariants = classVarianceAuthority.cva(
9593
9725
  "group relative w-fit shrink-0 inline-flex flex-row items-center justify-center whitespace-nowrap select-none cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,filter] duration-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-m3-primary z-10 overflow-hidden",
@@ -9771,7 +9903,7 @@ var SplitButtonLeadingComponent = React62__namespace.forwardRef(
9771
9903
  children: icon
9772
9904
  }
9773
9905
  ),
9774
- labelContent && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center h-full gap-[inherit]", children: labelContent })
9906
+ labelContent && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center justify-center gap-[inherit]", children: labelContent })
9775
9907
  ] });
9776
9908
  const containerClassName = cn(
9777
9909
  splitButtonVariants({
@@ -9779,19 +9911,20 @@ var SplitButtonLeadingComponent = React62__namespace.forwardRef(
9779
9911
  size: actualSize,
9780
9912
  disabled
9781
9913
  }),
9914
+ "gap-2",
9782
9915
  typographyClass,
9783
9916
  className
9784
9917
  );
9785
9918
  const mergedStyle = __spreadValues({
9786
9919
  paddingInlineStart: tokens.leadingPadding.start,
9787
9920
  paddingInlineEnd: tokens.leadingPadding.end,
9788
- gap: "8px",
9789
9921
  borderRadius
9790
9922
  }, style);
9791
9923
  return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: asChild ? /* @__PURE__ */ jsxRuntime.jsx(
9792
9924
  reactSlot.Slot,
9793
9925
  __spreadProps(__spreadValues({
9794
9926
  ref,
9927
+ "data-split-button-part": "leading",
9795
9928
  "aria-disabled": disabled || void 0,
9796
9929
  onClick: handleClick,
9797
9930
  onPointerDown: handlePointerDown,
@@ -9814,6 +9947,7 @@ var SplitButtonLeadingComponent = React62__namespace.forwardRef(
9814
9947
  __spreadProps(__spreadValues({
9815
9948
  ref,
9816
9949
  type: "button",
9950
+ "data-split-button-part": "leading",
9817
9951
  disabled,
9818
9952
  onClick: handleClick,
9819
9953
  onPointerDown: handlePointerDown,
@@ -9827,8 +9961,7 @@ var SplitButtonLeadingComponent = React62__namespace.forwardRef(
9827
9961
  transition: SPLIT_BUTTON_RADIUS_SPRING,
9828
9962
  style: __spreadValues({
9829
9963
  paddingInlineStart: tokens.leadingPadding.start,
9830
- paddingInlineEnd: tokens.leadingPadding.end,
9831
- gap: "8px"
9964
+ paddingInlineEnd: tokens.leadingPadding.end
9832
9965
  }, style),
9833
9966
  className: containerClassName
9834
9967
  }, restProps), {
@@ -9866,7 +9999,8 @@ var SplitButtonTrailingComponent = React62__namespace.forwardRef(
9866
9999
  onBlur,
9867
10000
  asChild = false,
9868
10001
  children,
9869
- "aria-label": ariaLabel
10002
+ "aria-label": ariaLabel,
10003
+ "aria-haspopup": ariaHaspopup = "menu"
9870
10004
  } = _b, restProps = __objRest(_b, [
9871
10005
  "className",
9872
10006
  "style",
@@ -9884,7 +10018,8 @@ var SplitButtonTrailingComponent = React62__namespace.forwardRef(
9884
10018
  "onBlur",
9885
10019
  "asChild",
9886
10020
  "children",
9887
- "aria-label"
10021
+ "aria-label",
10022
+ "aria-haspopup"
9888
10023
  ]);
9889
10024
  var _a2, _b2;
9890
10025
  const context = useSplitButtonContext();
@@ -9977,7 +10112,11 @@ var SplitButtonTrailingComponent = React62__namespace.forwardRef(
9977
10112
  x: checked ? 0 : tokens.opticalCenterOffset
9978
10113
  },
9979
10114
  transition: prefersReducedMotion2 ? { duration: 0 } : SPLIT_BUTTON_CHEVRON_SPRING,
9980
- className: "flex items-center justify-center shrink-0",
10115
+ className: "flex items-center justify-center shrink-0 [&>svg]:w-full [&>svg]:h-full",
10116
+ style: {
10117
+ width: tokens.trailingIconSize,
10118
+ height: tokens.trailingIconSize
10119
+ },
9981
10120
  children: icon != null ? icon : /* @__PURE__ */ jsxRuntime.jsx(
9982
10121
  Icon,
9983
10122
  {
@@ -10006,8 +10145,10 @@ var SplitButtonTrailingComponent = React62__namespace.forwardRef(
10006
10145
  reactSlot.Slot,
10007
10146
  __spreadProps(__spreadValues({
10008
10147
  ref,
10148
+ "data-split-button-part": "trailing",
10009
10149
  "aria-label": ariaLabel,
10010
10150
  "aria-expanded": checked,
10151
+ "aria-haspopup": ariaHaspopup,
10011
10152
  "aria-disabled": disabled,
10012
10153
  onClick: handleToggle,
10013
10154
  onPointerDown: handlePointerDown,
@@ -10030,8 +10171,10 @@ var SplitButtonTrailingComponent = React62__namespace.forwardRef(
10030
10171
  __spreadProps(__spreadValues({
10031
10172
  ref,
10032
10173
  type: "button",
10174
+ "data-split-button-part": "trailing",
10033
10175
  "aria-label": ariaLabel,
10034
10176
  "aria-expanded": checked,
10177
+ "aria-haspopup": ariaHaspopup,
10035
10178
  "aria-disabled": disabled,
10036
10179
  disabled,
10037
10180
  onClick: handleToggle,
@@ -10106,6 +10249,7 @@ var SplitButtonTrailingUncheckableComponent = React62__namespace.forwardRef(
10106
10249
  const [isFocused, setIsFocused] = React62__namespace.useState(false);
10107
10250
  const [isPressed, setIsPressed] = React62__namespace.useState(false);
10108
10251
  const tokens = SPLIT_BUTTON_TOKENS[actualSize];
10252
+ const prefersReducedMotion2 = react.useReducedMotion();
10109
10253
  const needsTouchTarget = actualSize === "xs" || actualSize === "sm";
10110
10254
  const {
10111
10255
  ripples,
@@ -10169,6 +10313,7 @@ var SplitButtonTrailingUncheckableComponent = React62__namespace.forwardRef(
10169
10313
  __spreadProps(__spreadValues({
10170
10314
  ref,
10171
10315
  type: "button",
10316
+ "data-split-button-part": "trailing",
10172
10317
  "aria-label": ariaLabel,
10173
10318
  disabled,
10174
10319
  onClick,
@@ -10180,7 +10325,7 @@ var SplitButtonTrailingUncheckableComponent = React62__namespace.forwardRef(
10180
10325
  onFocus: handleFocus,
10181
10326
  onBlur: handleBlur,
10182
10327
  animate: { borderRadius },
10183
- transition: SPLIT_BUTTON_RADIUS_SPRING,
10328
+ transition: prefersReducedMotion2 ? { duration: 0 } : SPLIT_BUTTON_RADIUS_SPRING,
10184
10329
  style: __spreadValues({
10185
10330
  paddingInlineStart: tokens.trailingPadding.start,
10186
10331
  paddingInlineEnd: tokens.trailingPadding.end
@@ -10209,7 +10354,7 @@ var SplitButtonTrailingUncheckableComponent = React62__namespace.forwardRef(
10209
10354
  react.m.div,
10210
10355
  {
10211
10356
  animate: { x: tokens.opticalCenterOffset },
10212
- transition: SPLIT_BUTTON_RADIUS_SPRING,
10357
+ transition: prefersReducedMotion2 ? { duration: 0 } : SPLIT_BUTTON_RADIUS_SPRING,
10213
10358
  className: "flex items-center justify-center shrink-0 [&>svg]:w-full [&>svg]:h-full",
10214
10359
  style: {
10215
10360
  width: tokens.trailingIconSize,
@@ -14126,7 +14271,7 @@ var DividerImpl = React62__namespace.forwardRef(
14126
14271
  insetStart = "standard",
14127
14272
  waveConfig,
14128
14273
  decorative = false,
14129
- animate: animate4 = true,
14274
+ animate: animate5 = true,
14130
14275
  className,
14131
14276
  style
14132
14277
  } = _b, props = __objRest(_b, [
@@ -14142,7 +14287,7 @@ var DividerImpl = React62__namespace.forwardRef(
14142
14287
  ]);
14143
14288
  var _a2, _b2, _c;
14144
14289
  const reducedMotion = react.useReducedMotion();
14145
- const shouldAnimate = animate4 && !reducedMotion;
14290
+ const shouldAnimate = animate5 && !reducedMotion;
14146
14291
  const effectiveShape = shape === "wavy" && orientation === "vertical" ? "flat" : shape;
14147
14292
  if (shape === "wavy" && orientation === "vertical") {
14148
14293
  console.warn(
@@ -19248,7 +19393,7 @@ function useShapeMorph({
19248
19393
  currentProgressRef.current = p;
19249
19394
  setClipPath(interpolatePath(morph, p, width, height));
19250
19395
  }, [scrollProgress, morphOn, morph, width, height]);
19251
- const animate4 = React62.useCallback(
19396
+ const animate5 = React62.useCallback(
19252
19397
  (timestamp) => {
19253
19398
  if (!morph) return;
19254
19399
  const elapsed = timestamp - startTimeRef.current;
@@ -19259,7 +19404,7 @@ function useShapeMorph({
19259
19404
  currentProgressRef.current = progress;
19260
19405
  setClipPath(interpolatePath(morph, progress, width, height));
19261
19406
  if (rawT < 1) {
19262
- animRef.current = requestAnimationFrame(animate4);
19407
+ animRef.current = requestAnimationFrame(animate5);
19263
19408
  } else {
19264
19409
  animRef.current = null;
19265
19410
  }
@@ -19278,9 +19423,9 @@ function useShapeMorph({
19278
19423
  startProgressRef.current = currentProgressRef.current;
19279
19424
  targetProgressRef.current = toProgress;
19280
19425
  startTimeRef.current = performance.now();
19281
- animRef.current = requestAnimationFrame(animate4);
19426
+ animRef.current = requestAnimationFrame(animate5);
19282
19427
  },
19283
- [morph, animate4, width, height]
19428
+ [morph, animate5, width, height]
19284
19429
  );
19285
19430
  React62.useEffect(() => {
19286
19431
  return () => {
@@ -20637,26 +20782,26 @@ var SliderTokens = {
20637
20782
  // ── Track sizes (height for horizontal, width for vertical) ────────────────
20638
20783
  trackSizes: {
20639
20784
  xs: 16,
20640
- s: 24,
20641
- m: 40,
20642
- l: 56,
20785
+ sm: 24,
20786
+ md: 40,
20787
+ lg: 56,
20643
20788
  xl: 96
20644
20789
  },
20645
20790
  // ── Track shapes (border radius) ──────────────────────────────────────────
20646
20791
  trackShapes: {
20647
20792
  xs: 8,
20648
- s: 8,
20649
- m: 12,
20650
- l: 16,
20793
+ sm: 8,
20794
+ md: 12,
20795
+ lg: 16,
20651
20796
  xl: 28
20652
20797
  },
20653
20798
  // ── Thumb (handle) ────────────────────────────────────────────────────────
20654
20799
  /** Thumb height grows with track size */
20655
20800
  thumbHeights: {
20656
20801
  xs: 44,
20657
- s: 44,
20658
- m: 52,
20659
- l: 68,
20802
+ sm: 44,
20803
+ md: 52,
20804
+ lg: 68,
20660
20805
  xl: 108
20661
20806
  },
20662
20807
  /**
@@ -20701,9 +20846,9 @@ var SliderTokens = {
20701
20846
  /** Standard icon size map for inset icons inside the track. */
20702
20847
  insetIconSizes: {
20703
20848
  xs: 0,
20704
- s: 0,
20705
- m: 24,
20706
- l: 24,
20849
+ sm: 0,
20850
+ md: 24,
20851
+ lg: 24,
20707
20852
  xl: 32
20708
20853
  },
20709
20854
  /**
@@ -20737,14 +20882,14 @@ var SliderColors = {
20737
20882
  // ── Ticks ────────────────────────────────────────────────────────────────
20738
20883
  /**
20739
20884
  * Tick on the INACTIVE portion of the track.
20740
- * Maps to TickMarkActiveContainerColor (in spec: primary color stands out).
20885
+ * Maps to TickMarkInactiveContainerColor (in spec: primary color stands out).
20741
20886
  */
20742
20887
  tickOnInactive: "var(--md-sys-color-primary)",
20743
20888
  /**
20744
20889
  * Tick on the ACTIVE portion of the track.
20745
- * Maps to TickMarkInactiveContainerColor (secondary-container blends in).
20890
+ * Maps to TickMarkActiveContainerColor (in spec: on-primary contrasts with filled track).
20746
20891
  */
20747
- tickOnActive: "var(--md-sys-color-secondary-container)",
20892
+ tickOnActive: "var(--md-sys-color-on-primary)",
20748
20893
  disabledTick: "var(--md-sys-color-on-surface)"
20749
20894
  };
20750
20895
  var SLIDER_THUMB_SPRING = {
@@ -20763,11 +20908,11 @@ var ValueIndicator = React62__namespace.memo(function ValueIndicator2({
20763
20908
  orientation,
20764
20909
  formatValue,
20765
20910
  prefersReduced,
20766
- trackSize
20911
+ size
20767
20912
  }) {
20768
20913
  const label = formatValue ? formatValue(value) : String(Math.round(value));
20769
20914
  const isHorizontal = orientation === "horizontal";
20770
- const thumbHeight = SliderTokens.thumbHeights[trackSize];
20915
+ const thumbHeight = SliderTokens.thumbHeights[size];
20771
20916
  const offsetFromCenter = thumbHeight / 2 + 8;
20772
20917
  return /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: visible && /* @__PURE__ */ jsxRuntime.jsx(
20773
20918
  react.m.div,
@@ -20818,7 +20963,7 @@ var SliderThumb = React62__namespace.memo(function SliderThumb2({
20818
20963
  onValueChangeEnd,
20819
20964
  formatValue,
20820
20965
  thumbId,
20821
- trackSize,
20966
+ size,
20822
20967
  variant,
20823
20968
  zIndex = 1,
20824
20969
  "aria-label": ariaLabel,
@@ -20827,10 +20972,7 @@ var SliderThumb = React62__namespace.memo(function SliderThumb2({
20827
20972
  var _a;
20828
20973
  const isHorizontal = orientation === "horizontal";
20829
20974
  const insetLimit = SliderTokens.thumbGap + SliderTokens.thumbWidthDefault / 2;
20830
- const trackInset = Math.min(
20831
- SliderTokens.trackSizes[trackSize] / 2,
20832
- insetLimit
20833
- );
20975
+ const trackInset = Math.min(SliderTokens.trackSizes[size] / 2, insetLimit);
20834
20976
  const posTarget = isHorizontal ? "left" : "bottom";
20835
20977
  const motionStyle = {
20836
20978
  [posTarget]: `calc(${trackInset}px + ${percent} * (100% - ${trackInset * 2}px))`
@@ -20863,7 +21005,7 @@ var SliderThumb = React62__namespace.memo(function SliderThumb2({
20863
21005
  const space = isHorizontal ? rect.width : rect.height;
20864
21006
  const insetLimit2 = SliderTokens.thumbGap + SliderTokens.thumbWidthDefault / 2;
20865
21007
  const trackInset2 = Math.min(
20866
- SliderTokens.trackSizes[trackSize] / 2,
21008
+ SliderTokens.trackSizes[size] / 2,
20867
21009
  insetLimit2
20868
21010
  );
20869
21011
  const safeSpace = space - trackInset2 * 2;
@@ -20880,7 +21022,7 @@ var SliderThumb = React62__namespace.memo(function SliderThumb2({
20880
21022
  const snapped = step > 0 ? Math.round((rawValue - min) / step) * step + min : rawValue;
20881
21023
  return Math.max(min, Math.min(max, snapped));
20882
21024
  },
20883
- [isHorizontal, max, min, percent, step, trackRef, trackSize]
21025
+ [isHorizontal, max, min, percent, step, trackRef, size]
20884
21026
  );
20885
21027
  const handlePointerDown = React62__namespace.useCallback(
20886
21028
  (e) => {
@@ -20966,7 +21108,7 @@ var SliderThumb = React62__namespace.memo(function SliderThumb2({
20966
21108
  orientation,
20967
21109
  formatValue,
20968
21110
  prefersReduced,
20969
- trackSize
21111
+ size
20970
21112
  }
20971
21113
  ),
20972
21114
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -20999,11 +21141,11 @@ var SliderThumb = React62__namespace.memo(function SliderThumb2({
20999
21141
  "focus-visible:outline-(--md-sys-color-secondary)"
21000
21142
  ),
21001
21143
  style: __spreadProps(__spreadValues({}, isHorizontal ? {
21002
- height: SliderTokens.thumbHeights[trackSize],
21144
+ height: SliderTokens.thumbHeights[size],
21003
21145
  width: SliderTokens.thumbWidthDefault,
21004
21146
  willChange: "width"
21005
21147
  } : {
21006
- width: SliderTokens.thumbHeights[trackSize],
21148
+ width: SliderTokens.thumbHeights[size],
21007
21149
  height: SliderTokens.thumbWidthDefault,
21008
21150
  willChange: "height"
21009
21151
  }), {
@@ -21018,7 +21160,7 @@ var SliderThumb = React62__namespace.memo(function SliderThumb2({
21018
21160
  var RangeTrack = React62__namespace.memo(function RangeTrack2({
21019
21161
  startPercent,
21020
21162
  endPercent,
21021
- trackSize,
21163
+ size,
21022
21164
  orientation,
21023
21165
  variant,
21024
21166
  disabled,
@@ -21030,22 +21172,22 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21030
21172
  onTrackPointerDown
21031
21173
  }) {
21032
21174
  const isHorizontal = orientation === "horizontal";
21033
- const size = SliderTokens.trackSizes[trackSize];
21034
- const thumbHeight = SliderTokens.thumbHeights[trackSize];
21175
+ const trackPixelSize = SliderTokens.trackSizes[size];
21176
+ const thumbHeight = SliderTokens.thumbHeights[size];
21035
21177
  const { thumbGap, thumbWidthDefault, tickSize } = SliderTokens;
21036
21178
  const thumbHalfWidth = thumbWidthDefault / 2;
21037
21179
  const activeTrack = disabled ? SliderColors.disabledActiveTrack : `var(--md-sys-color-${variant})`;
21038
21180
  const inactiveTrack = disabled ? SliderColors.disabledInactiveTrack : `var(--md-sys-color-${variant}-container)`;
21039
21181
  const innerR = SliderTokens.trackInnerRadius;
21040
- let outerR = size / 2;
21182
+ let outerR = trackPixelSize / 2;
21041
21183
  if (trackShape === "md3") {
21042
- outerR = Math.min(SliderTokens.trackShapes[trackSize], size / 2);
21184
+ outerR = Math.min(SliderTokens.trackShapes[size], trackPixelSize / 2);
21043
21185
  } else if (typeof trackShape === "number") {
21044
- outerR = Math.min(trackShape, size / 2);
21186
+ outerR = Math.min(trackShape, trackPixelSize / 2);
21045
21187
  }
21046
21188
  if (isHorizontal) {
21047
21189
  const insetLimit2 = thumbGap + thumbWidthDefault / 2;
21048
- const trackInset2 = Math.min(size / 2, insetLimit2);
21190
+ const trackInset2 = Math.min(trackPixelSize / 2, insetLimit2);
21049
21191
  const cxStart = `calc(${trackInset2}px + ${startPercent} * (100% - ${trackInset2 * 2}px))`;
21050
21192
  const cxEnd = `calc(${trackInset2}px + ${endPercent} * (100% - ${trackInset2 * 2}px))`;
21051
21193
  const gapWithThumbStr2 = `${thumbGap + thumbHalfWidth}px`;
@@ -21076,7 +21218,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21076
21218
  top: "50%",
21077
21219
  transform: "translateY(-50%)",
21078
21220
  width: leadingWidth,
21079
- height: size,
21221
+ height: trackPixelSize,
21080
21222
  backgroundColor: inactiveTrack,
21081
21223
  opacity: disabled ? 0.38 : 1,
21082
21224
  borderTopLeftRadius: outerR,
@@ -21096,7 +21238,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21096
21238
  top: "50%",
21097
21239
  transform: "translateY(-50%)",
21098
21240
  width: activeWidth,
21099
- height: size,
21241
+ height: trackPixelSize,
21100
21242
  backgroundColor: activeTrack,
21101
21243
  opacity: disabled ? 0.38 : 1,
21102
21244
  borderTopLeftRadius: startPercent <= 0 ? outerR : innerR,
@@ -21116,7 +21258,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21116
21258
  top: "50%",
21117
21259
  transform: "translateY(-50%)",
21118
21260
  width: trailingWidth,
21119
- height: size,
21261
+ height: trackPixelSize,
21120
21262
  backgroundColor: inactiveTrack,
21121
21263
  opacity: disabled ? 0.38 : 1,
21122
21264
  borderTopLeftRadius: innerR,
@@ -21138,7 +21280,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21138
21280
  width: tickSize,
21139
21281
  height: tickSize,
21140
21282
  borderRadius: "50%",
21141
- backgroundColor: disabled ? SliderColors.disabledTick : isActive ? `var(--md-sys-color-${variant}-container)` : `var(--md-sys-color-${variant})`,
21283
+ backgroundColor: disabled ? SliderColors.disabledTick : isActive ? `var(--md-sys-color-on-${variant})` : `var(--md-sys-color-${variant})`,
21142
21284
  opacity: disabled ? 0.38 : 1,
21143
21285
  left: `calc(${trackInset2}px + ${tickPct} * (100% - ${trackInset2 * 2}px) - ${tickSize / 2}px)`,
21144
21286
  top: "50%",
@@ -21153,7 +21295,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21153
21295
  );
21154
21296
  }
21155
21297
  const insetLimit = thumbGap + thumbWidthDefault / 2;
21156
- const trackInset = Math.min(size / 2, insetLimit);
21298
+ const trackInset = Math.min(trackPixelSize / 2, insetLimit);
21157
21299
  const cyStart = `calc(${trackInset}px + ${startPercent} * (100% - ${trackInset * 2}px))`;
21158
21300
  const cyEnd = `calc(${trackInset}px + ${endPercent} * (100% - ${trackInset * 2}px))`;
21159
21301
  const gapWithThumbStr = `${thumbGap + thumbHalfWidth}px`;
@@ -21184,7 +21326,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21184
21326
  left: "50%",
21185
21327
  transform: "translateX(-50%)",
21186
21328
  height: leadingHeight,
21187
- width: size,
21329
+ width: trackPixelSize,
21188
21330
  backgroundColor: inactiveTrack,
21189
21331
  opacity: disabled ? 0.38 : 1,
21190
21332
  borderBottomLeftRadius: outerR,
@@ -21204,7 +21346,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21204
21346
  left: "50%",
21205
21347
  transform: "translateX(-50%)",
21206
21348
  height: activeHeight,
21207
- width: size,
21349
+ width: trackPixelSize,
21208
21350
  backgroundColor: activeTrack,
21209
21351
  opacity: disabled ? 0.38 : 1,
21210
21352
  borderBottomLeftRadius: startPercent <= 0 ? outerR : innerR,
@@ -21224,7 +21366,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21224
21366
  left: "50%",
21225
21367
  transform: "translateX(-50%)",
21226
21368
  height: trailingHeight,
21227
- width: size,
21369
+ width: trackPixelSize,
21228
21370
  backgroundColor: inactiveTrack,
21229
21371
  opacity: disabled ? 0.38 : 1,
21230
21372
  borderTopLeftRadius: outerR,
@@ -21246,7 +21388,7 @@ var RangeTrack = React62__namespace.memo(function RangeTrack2({
21246
21388
  width: tickSize,
21247
21389
  height: tickSize,
21248
21390
  borderRadius: "50%",
21249
- backgroundColor: disabled ? SliderColors.disabledTick : isActive ? `var(--md-sys-color-${variant}-container)` : `var(--md-sys-color-${variant})`,
21391
+ backgroundColor: disabled ? SliderColors.disabledTick : isActive ? `var(--md-sys-color-on-${variant})` : `var(--md-sys-color-${variant})`,
21250
21392
  opacity: disabled ? 0.38 : 1,
21251
21393
  bottom: `calc(${trackInset}px + ${tickPct} * (100% - ${trackInset * 2}px) - ${tickSize / 2}px)`,
21252
21394
  left: "50%",
@@ -21270,7 +21412,7 @@ var RangeSliderComponent = React62__namespace.forwardRef(
21270
21412
  max = 100,
21271
21413
  step = 0,
21272
21414
  orientation = "horizontal",
21273
- trackSize = "m",
21415
+ size = "md",
21274
21416
  trackShape = "md3",
21275
21417
  variant = "primary",
21276
21418
  disabled = false,
@@ -21342,7 +21484,7 @@ var RangeSliderComponent = React62__namespace.forwardRef(
21342
21484
  let clickPercent;
21343
21485
  const insetLimit = SliderTokens.thumbGap + SliderTokens.thumbWidthDefault / 2;
21344
21486
  const trackInset = Math.min(
21345
- SliderTokens.trackSizes[trackSize] / 2,
21487
+ SliderTokens.trackSizes[size] / 2,
21346
21488
  insetLimit
21347
21489
  );
21348
21490
  if (isHorizontal) {
@@ -21374,7 +21516,7 @@ var RangeSliderComponent = React62__namespace.forwardRef(
21374
21516
  min,
21375
21517
  snap,
21376
21518
  startValue,
21377
- trackSize
21519
+ size
21378
21520
  ]
21379
21521
  );
21380
21522
  const id = React62__namespace.useId();
@@ -21395,7 +21537,7 @@ var RangeSliderComponent = React62__namespace.forwardRef(
21395
21537
  {
21396
21538
  startPercent,
21397
21539
  endPercent,
21398
- trackSize,
21540
+ size,
21399
21541
  trackShape,
21400
21542
  orientation,
21401
21543
  variant,
@@ -21417,7 +21559,7 @@ var RangeSliderComponent = React62__namespace.forwardRef(
21417
21559
  step,
21418
21560
  disabled,
21419
21561
  orientation,
21420
- trackSize,
21562
+ size,
21421
21563
  variant,
21422
21564
  showValueIndicator,
21423
21565
  trackRef,
@@ -21439,7 +21581,7 @@ var RangeSliderComponent = React62__namespace.forwardRef(
21439
21581
  step,
21440
21582
  disabled,
21441
21583
  orientation,
21442
- trackSize,
21584
+ size,
21443
21585
  variant,
21444
21586
  showValueIndicator,
21445
21587
  trackRef,
@@ -21502,13 +21644,13 @@ var InsetIcon = React62__namespace.memo(function InsetIcon2({
21502
21644
  position,
21503
21645
  orientation,
21504
21646
  trackSize,
21505
- trackSizeToken,
21647
+ sizeToken,
21506
21648
  disabled,
21507
21649
  variant,
21508
21650
  prefersReduced
21509
21651
  }) {
21510
21652
  const iconSize = Math.min(
21511
- SliderTokens.insetIconSizes[trackSizeToken],
21653
+ SliderTokens.insetIconSizes[sizeToken],
21512
21654
  Math.max(4, trackSize - SliderTokens.insetIconPadding * 2)
21513
21655
  );
21514
21656
  const activeColor = `var(--md-sys-color-on-${variant})`;
@@ -21569,7 +21711,7 @@ function Ticks({
21569
21711
  const thumbStart = percent - (thumbGap + thumbWidthDefault / 2) / 100;
21570
21712
  const thumbEnd = percent + (thumbGap + thumbWidthDefault / 2) / 100;
21571
21713
  if (tickPercent > thumbStart && tickPercent < thumbEnd) return null;
21572
- const color = disabled ? SliderColors.disabledTick : isOnActive ? `var(--md-sys-color-${variant}-container)` : `var(--md-sys-color-${variant})`;
21714
+ const color = disabled ? SliderColors.disabledTick : isOnActive ? `var(--md-sys-color-on-${variant})` : `var(--md-sys-color-${variant})`;
21573
21715
  const style = __spreadValues({
21574
21716
  position: "absolute",
21575
21717
  width: tickSize,
@@ -21592,7 +21734,7 @@ function Ticks({
21592
21734
  }
21593
21735
  var SliderTrack = React62__namespace.memo(function SliderTrack2({
21594
21736
  percent,
21595
- trackSize,
21737
+ size,
21596
21738
  orientation,
21597
21739
  variant,
21598
21740
  isCentered,
@@ -21611,15 +21753,15 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21611
21753
  }) {
21612
21754
  var _a;
21613
21755
  const isHorizontal = orientation === "horizontal";
21614
- const size = SliderTokens.trackSizes[trackSize];
21615
- const thumbHeight = SliderTokens.thumbHeights[trackSize];
21756
+ const trackPixelSize = SliderTokens.trackSizes[size];
21757
+ const thumbHeight = SliderTokens.thumbHeights[size];
21616
21758
  const { thumbGap, thumbWidthDefault, trackInnerRadius } = SliderTokens;
21617
21759
  const innerR = trackInnerRadius;
21618
- let outerR = size / 2;
21760
+ let outerR = trackPixelSize / 2;
21619
21761
  if (trackShape === "md3") {
21620
- outerR = Math.min(SliderTokens.trackShapes[trackSize], size / 2);
21762
+ outerR = Math.min(SliderTokens.trackShapes[size], trackPixelSize / 2);
21621
21763
  } else if (typeof trackShape === "number") {
21622
- outerR = Math.min(trackShape, size / 2);
21764
+ outerR = Math.min(trackShape, trackPixelSize / 2);
21623
21765
  }
21624
21766
  const thumbHalfWidth = thumbWidthDefault / 2;
21625
21767
  const gapWithThumbStr = `${thumbGap + thumbHalfWidth}px`;
@@ -21637,8 +21779,8 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21637
21779
  return () => ro.disconnect();
21638
21780
  }, [hasAnyInsetIcon, isHorizontal, trackRef]);
21639
21781
  const activeIconSize = Math.min(
21640
- SliderTokens.insetIconSizes[trackSize],
21641
- Math.max(4, size - SliderTokens.insetIconPadding * 2)
21782
+ SliderTokens.insetIconSizes[size],
21783
+ Math.max(4, trackPixelSize - SliderTokens.insetIconPadding * 2)
21642
21784
  );
21643
21785
  const iconTotalWidth = activeIconSize + SliderTokens.insetIconPadding * 2 + thumbGap + thumbHalfWidth;
21644
21786
  const iconThreshold = trackWidth > 0 ? iconTotalWidth / trackWidth : 0.15;
@@ -21673,7 +21815,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21673
21815
  const activeColor = disabled ? SliderColors.disabledActiveTrack : `var(--md-sys-color-${variant})`;
21674
21816
  const inactiveColor = disabled ? SliderColors.disabledInactiveTrack : `var(--md-sys-color-${variant}-container)`;
21675
21817
  const insetLimit = SliderTokens.thumbGap + SliderTokens.thumbWidthDefault / 2;
21676
- const trackInset = Math.min(size / 2, insetLimit);
21818
+ const trackInset = Math.min(trackPixelSize / 2, insetLimit);
21677
21819
  const gapTotal = thumbGap + thumbHalfWidth;
21678
21820
  const thumbCenter = `calc(${trackInset}px + ${percent} * (100% - ${trackInset * 2}px))`;
21679
21821
  const leadingActiveLeft = `${trackInset + SliderTokens.insetIconPadding}px`;
@@ -21698,7 +21840,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21698
21840
  top: "50%",
21699
21841
  transform: "translateY(-50%)",
21700
21842
  width: leftSegmentWidth,
21701
- height: size,
21843
+ height: trackPixelSize,
21702
21844
  backgroundColor: activeColor,
21703
21845
  opacity: disabled ? 0.38 : 1
21704
21846
  }, getHorizontalRadius(true, innerR, outerR))
@@ -21717,7 +21859,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21717
21859
  top: "50%",
21718
21860
  transform: "translateY(-50%)",
21719
21861
  width: rightSegmentWidth,
21720
- height: size,
21862
+ height: trackPixelSize,
21721
21863
  backgroundColor: inactiveColor,
21722
21864
  opacity: disabled ? 0.38 : 1
21723
21865
  }, getHorizontalRadius(false, innerR, outerR))
@@ -21740,7 +21882,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21740
21882
  top: "50%",
21741
21883
  transform: "translateY(-50%)",
21742
21884
  width: leftBaseWidth,
21743
- height: size,
21885
+ height: trackPixelSize,
21744
21886
  backgroundColor: inactiveColor,
21745
21887
  opacity: disabled ? 0.38 : 1
21746
21888
  }, getHorizontalRadius(true, innerR, outerR))
@@ -21761,7 +21903,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21761
21903
  top: "50%",
21762
21904
  transform: "translateY(-50%)",
21763
21905
  width: centerActiveWidth,
21764
- height: size,
21906
+ height: trackPixelSize,
21765
21907
  backgroundColor: activeColor,
21766
21908
  opacity: disabled ? 0.38 : 1
21767
21909
  }, allInnerRadius(innerR))
@@ -21782,7 +21924,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21782
21924
  top: "50%",
21783
21925
  transform: "translateY(-50%)",
21784
21926
  width: rightBaseWidth,
21785
- height: size,
21927
+ height: trackPixelSize,
21786
21928
  backgroundColor: inactiveColor,
21787
21929
  opacity: disabled ? 0.38 : 1
21788
21930
  }, getHorizontalRadius(false, innerR, outerR))
@@ -21803,7 +21945,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21803
21945
  top: "50%",
21804
21946
  transform: "translateY(-50%)",
21805
21947
  width: leftBaseWidth,
21806
- height: size,
21948
+ height: trackPixelSize,
21807
21949
  backgroundColor: inactiveColor,
21808
21950
  opacity: disabled ? 0.38 : 1
21809
21951
  }, getHorizontalRadius(true, innerR, outerR))
@@ -21824,7 +21966,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21824
21966
  top: "50%",
21825
21967
  transform: "translateY(-50%)",
21826
21968
  width: centerActiveWidth,
21827
- height: size,
21969
+ height: trackPixelSize,
21828
21970
  backgroundColor: activeColor,
21829
21971
  opacity: disabled ? 0.38 : 1
21830
21972
  }, allInnerRadius(innerR))
@@ -21845,7 +21987,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21845
21987
  top: "50%",
21846
21988
  transform: "translateY(-50%)",
21847
21989
  width: rightBaseWidth,
21848
- height: size,
21990
+ height: trackPixelSize,
21849
21991
  backgroundColor: inactiveColor,
21850
21992
  opacity: disabled ? 0.38 : 1
21851
21993
  }, getHorizontalRadius(false, innerR, outerR))
@@ -21889,8 +22031,8 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21889
22031
  isOnActiveSegment: leadingOnActive,
21890
22032
  position: leadingOnActive ? leadingActiveLeft : leadingInactiveLeft,
21891
22033
  orientation,
21892
- trackSize: size,
21893
- trackSizeToken: trackSize,
22034
+ trackSize: trackPixelSize,
22035
+ sizeToken: size,
21894
22036
  disabled,
21895
22037
  variant,
21896
22038
  prefersReduced
@@ -21904,8 +22046,8 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21904
22046
  isOnActiveSegment: trailingOnActive,
21905
22047
  position: trailingOnActive ? trailingActiveLeft : trailingInactiveLeft,
21906
22048
  orientation,
21907
- trackSize: size,
21908
- trackSizeToken: trackSize,
22049
+ trackSize: trackPixelSize,
22050
+ sizeToken: size,
21909
22051
  disabled,
21910
22052
  variant,
21911
22053
  prefersReduced
@@ -21933,7 +22075,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21933
22075
  left: "50%",
21934
22076
  transform: "translateX(-50%)",
21935
22077
  height: bottomSegmentHeight,
21936
- width: size,
22078
+ width: trackPixelSize,
21937
22079
  backgroundColor: activeColor,
21938
22080
  opacity: disabled ? 0.38 : 1
21939
22081
  }, getVerticalRadius(true, innerR, outerR))
@@ -21952,7 +22094,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21952
22094
  left: "50%",
21953
22095
  transform: "translateX(-50%)",
21954
22096
  height: topSegmentHeight,
21955
- width: size,
22097
+ width: trackPixelSize,
21956
22098
  backgroundColor: inactiveColor,
21957
22099
  opacity: disabled ? 0.38 : 1
21958
22100
  }, getVerticalRadius(false, innerR, outerR))
@@ -21975,7 +22117,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21975
22117
  left: "50%",
21976
22118
  transform: "translateX(-50%)",
21977
22119
  height: bottomBaseHeight,
21978
- width: size,
22120
+ width: trackPixelSize,
21979
22121
  backgroundColor: inactiveColor,
21980
22122
  opacity: disabled ? 0.38 : 1
21981
22123
  }, getVerticalRadius(true, innerR, outerR))
@@ -21996,7 +22138,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
21996
22138
  left: "50%",
21997
22139
  transform: "translateX(-50%)",
21998
22140
  height: centerActiveHeight,
21999
- width: size,
22141
+ width: trackPixelSize,
22000
22142
  backgroundColor: activeColor,
22001
22143
  opacity: disabled ? 0.38 : 1
22002
22144
  }, allInnerRadius(innerR))
@@ -22017,7 +22159,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
22017
22159
  left: "50%",
22018
22160
  transform: "translateX(-50%)",
22019
22161
  height: topBaseHeight,
22020
- width: size,
22162
+ width: trackPixelSize,
22021
22163
  backgroundColor: inactiveColor,
22022
22164
  opacity: disabled ? 0.38 : 1
22023
22165
  }, getVerticalRadius(false, innerR, outerR))
@@ -22038,7 +22180,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
22038
22180
  left: "50%",
22039
22181
  transform: "translateX(-50%)",
22040
22182
  height: bottomBaseHeight,
22041
- width: size,
22183
+ width: trackPixelSize,
22042
22184
  backgroundColor: inactiveColor,
22043
22185
  opacity: disabled ? 0.38 : 1
22044
22186
  }, getVerticalRadius(true, innerR, outerR))
@@ -22059,7 +22201,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
22059
22201
  left: "50%",
22060
22202
  transform: "translateX(-50%)",
22061
22203
  height: centerActiveHeight,
22062
- width: size,
22204
+ width: trackPixelSize,
22063
22205
  backgroundColor: activeColor,
22064
22206
  opacity: disabled ? 0.38 : 1
22065
22207
  }, allInnerRadius(innerR))
@@ -22080,7 +22222,7 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
22080
22222
  left: "50%",
22081
22223
  transform: "translateX(-50%)",
22082
22224
  height: topBaseHeight,
22083
- width: size,
22225
+ width: trackPixelSize,
22084
22226
  backgroundColor: inactiveColor,
22085
22227
  opacity: disabled ? 0.38 : 1
22086
22228
  }, getVerticalRadius(false, innerR, outerR))
@@ -22124,8 +22266,8 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
22124
22266
  isOnActiveSegment: leadingOnActive,
22125
22267
  position: leadingOnActive ? leadingActiveLeft : leadingInactiveLeft,
22126
22268
  orientation,
22127
- trackSize: size,
22128
- trackSizeToken: trackSize,
22269
+ trackSize: trackPixelSize,
22270
+ sizeToken: size,
22129
22271
  disabled,
22130
22272
  variant,
22131
22273
  prefersReduced
@@ -22139,8 +22281,8 @@ var SliderTrack = React62__namespace.memo(function SliderTrack2({
22139
22281
  isOnActiveSegment: trailingOnActive,
22140
22282
  position: trailingOnActive ? trailingActiveLeft : trailingInactiveLeft,
22141
22283
  orientation,
22142
- trackSize: size,
22143
- trackSizeToken: trackSize,
22284
+ trackSize: trackPixelSize,
22285
+ sizeToken: size,
22144
22286
  disabled,
22145
22287
  variant,
22146
22288
  prefersReduced
@@ -22161,7 +22303,7 @@ var SliderComponent = React62__namespace.forwardRef(
22161
22303
  max = 100,
22162
22304
  step = 0,
22163
22305
  orientation = "horizontal",
22164
- trackSize = "m",
22306
+ size = "md",
22165
22307
  trackShape = "md3",
22166
22308
  variant = "primary",
22167
22309
  isCentered = false,
@@ -22215,7 +22357,7 @@ var SliderComponent = React62__namespace.forwardRef(
22215
22357
  let clickPercent;
22216
22358
  const insetLimit = SliderTokens.thumbGap + SliderTokens.thumbWidthDefault / 2;
22217
22359
  const trackInset = Math.min(
22218
- SliderTokens.trackSizes[trackSize] / 2,
22360
+ SliderTokens.trackSizes[size] / 2,
22219
22361
  insetLimit
22220
22362
  );
22221
22363
  if (isHorizontal) {
@@ -22230,20 +22372,11 @@ var SliderComponent = React62__namespace.forwardRef(
22230
22372
  const newValue = snap(coerce(rawValue));
22231
22373
  handleValueChange(newValue);
22232
22374
  },
22233
- [
22234
- coerce,
22235
- disabled,
22236
- handleValueChange,
22237
- isHorizontal,
22238
- max,
22239
- min,
22240
- snap,
22241
- trackSize
22242
- ]
22375
+ [coerce, disabled, handleValueChange, isHorizontal, max, min, snap, size]
22243
22376
  );
22244
22377
  const id = React62__namespace.useId();
22245
22378
  const thumbId = `slider-thumb-${id}`;
22246
- const supportsInsetIcon = !isCentered && SliderTokens.trackSizes[trackSize] >= 40;
22379
+ const supportsInsetIcon = !isCentered && SliderTokens.trackSizes[size] >= 40;
22247
22380
  const hasAnyInsetIcon = !!(insetIcon || insetIconTrailing);
22248
22381
  if (hasAnyInsetIcon && !supportsInsetIcon) {
22249
22382
  console.warn(
@@ -22266,7 +22399,7 @@ var SliderComponent = React62__namespace.forwardRef(
22266
22399
  SliderTrack,
22267
22400
  {
22268
22401
  percent,
22269
- trackSize,
22402
+ size,
22270
22403
  trackShape,
22271
22404
  orientation,
22272
22405
  isCentered,
@@ -22294,7 +22427,7 @@ var SliderComponent = React62__namespace.forwardRef(
22294
22427
  step,
22295
22428
  disabled,
22296
22429
  orientation,
22297
- trackSize,
22430
+ size,
22298
22431
  variant,
22299
22432
  showValueIndicator,
22300
22433
  trackRef,