@bug-on/m3-expressive 1.3.4 → 1.3.5

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 (60) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +31 -7
  3. package/dist/assets/material-symbols-cdn.css +17 -23
  4. package/dist/buttons.js +129 -35
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +129 -35
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/{core-COvZHQ_k.d.ts → core-Cckt8qEm.d.ts} +10 -4
  9. package/dist/{core-CRkixy1y.d.mts → core-DDfG4pym.d.mts} +10 -4
  10. package/dist/core.d.mts +2 -2
  11. package/dist/core.d.ts +2 -2
  12. package/dist/core.js +6 -5
  13. package/dist/core.js.map +1 -1
  14. package/dist/core.mjs +6 -5
  15. package/dist/core.mjs.map +1 -1
  16. package/dist/fading-blur-mask--uZbBKLj.d.mts +77 -0
  17. package/dist/fading-blur-mask--uZbBKLj.d.ts +77 -0
  18. package/dist/feedback.js +1 -1
  19. package/dist/feedback.js.map +1 -1
  20. package/dist/feedback.mjs +1 -1
  21. package/dist/feedback.mjs.map +1 -1
  22. package/dist/forms.js +1 -1
  23. package/dist/forms.js.map +1 -1
  24. package/dist/forms.mjs +1 -1
  25. package/dist/forms.mjs.map +1 -1
  26. package/dist/index.d.mts +5 -4
  27. package/dist/index.d.ts +5 -4
  28. package/dist/index.js +266 -122
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.mjs +266 -122
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/layout.d.mts +5 -3
  33. package/dist/layout.d.ts +5 -3
  34. package/dist/layout.js +61 -6
  35. package/dist/layout.js.map +1 -1
  36. package/dist/layout.mjs +61 -7
  37. package/dist/layout.mjs.map +1 -1
  38. package/dist/material-symbols-cdn.css +17 -23
  39. package/dist/navigation.d.mts +25 -83
  40. package/dist/navigation.d.ts +25 -83
  41. package/dist/navigation.js +22 -9
  42. package/dist/navigation.js.map +1 -1
  43. package/dist/navigation.mjs +22 -9
  44. package/dist/navigation.mjs.map +1 -1
  45. package/dist/overlays.js +1 -1
  46. package/dist/overlays.js.map +1 -1
  47. package/dist/overlays.mjs +1 -1
  48. package/dist/overlays.mjs.map +1 -1
  49. package/dist/pickers.d.mts +12 -0
  50. package/dist/pickers.d.ts +12 -0
  51. package/dist/pickers.js +98 -65
  52. package/dist/pickers.js.map +1 -1
  53. package/dist/pickers.mjs +98 -65
  54. package/dist/pickers.mjs.map +1 -1
  55. package/dist/{typography-339RV6v7.d.mts → typography-CKTjvlZ4.d.mts} +25 -0
  56. package/dist/{typography-339RV6v7.d.ts → typography-CKTjvlZ4.d.ts} +25 -0
  57. package/dist/typography.css +1 -1
  58. package/llms-full.txt +17 -13
  59. package/llms.txt +11 -6
  60. package/package.json +3 -3
package/dist/layout.d.mts CHANGED
@@ -5,8 +5,9 @@ import { HTMLMotionProps } from 'motion/react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { b as ScrollAreaProps } from './scroll-area-CVS6HyLl.mjs';
7
7
  export { S as ScrollArea, a as ScrollAreaOrientation, c as ScrollAreaScrollbar, d as ScrollAreaType } from './scroll-area-CVS6HyLl.mjs';
8
+ export { F as FadingBlurDirection, a as FadingBlurMask, b as FadingBlurMaskProps, c as FadingBlurProps } from './fading-blur-mask--uZbBKLj.mjs';
8
9
  import { VariantProps } from 'class-variance-authority';
9
- export { D as DEFAULT_FONT_VARIATION_AXES, F as FontVariationAxes, M as MD3_EXPRESSIVE_FONT_VARIATION, T as TextStyle, a as Typography, b as TypographyContext, c as TypographyKeyTokens, d as TypographyProvider, e as TypographyProviderProps, f as TypographyTokens, g as TypographyTokensOptions, s as serializeFontVariationAxes, u as useTypography } from './typography-339RV6v7.mjs';
10
+ export { D as DEFAULT_FONT_VARIATION_AXES, F as FontVariationAxes, M as MD3_EXPRESSIVE_FONT_VARIATION, T as TextStyle, a as Typography, b as TypographyContext, c as TypographyKeyTokens, d as TypographyProvider, e as TypographyProviderProps, f as TypographyTokens, g as TypographyTokensOptions, s as serializeFontVariationAxes, u as useTypography } from './typography-CKTjvlZ4.mjs';
10
11
  import '@radix-ui/react-scroll-area';
11
12
 
12
13
  /**
@@ -609,10 +610,11 @@ interface DividerProps extends SafeHTMLDivAttrs {
609
610
  /**
610
611
  * Generates an SVG path `d` string for a sinusoidal wave between two X bounds.
611
612
  * Uses cubic Bézier approximation of a sine curve for smooth rendering.
612
- * The error vs. a true sine is < 0.2%.
613
613
  *
614
614
  * Each half-cycle alternates between crest (+amplitude) and trough (-amplitude).
615
- * Control points are placed at 1/3 and 2/3 of each half-cycle for accuracy.
615
+ * Adapts the half-cycle count so an integer number of half-cycles perfectly spans
616
+ * between startX and endX, ensuring both leading and trailing ends land smoothly
617
+ * on the center baseline without trailing kinks or partial-segment distortion.
616
618
  *
617
619
  * @param startX - X coordinate where the path begins (e.g. capWidth = strokeWidth/2)
618
620
  * @param endX - X coordinate where the path ends (e.g. containerWidth - capWidth)
package/dist/layout.d.ts CHANGED
@@ -5,8 +5,9 @@ import { HTMLMotionProps } from 'motion/react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { b as ScrollAreaProps } from './scroll-area-CVS6HyLl.js';
7
7
  export { S as ScrollArea, a as ScrollAreaOrientation, c as ScrollAreaScrollbar, d as ScrollAreaType } from './scroll-area-CVS6HyLl.js';
8
+ export { F as FadingBlurDirection, a as FadingBlurMask, b as FadingBlurMaskProps, c as FadingBlurProps } from './fading-blur-mask--uZbBKLj.js';
8
9
  import { VariantProps } from 'class-variance-authority';
9
- export { D as DEFAULT_FONT_VARIATION_AXES, F as FontVariationAxes, M as MD3_EXPRESSIVE_FONT_VARIATION, T as TextStyle, a as Typography, b as TypographyContext, c as TypographyKeyTokens, d as TypographyProvider, e as TypographyProviderProps, f as TypographyTokens, g as TypographyTokensOptions, s as serializeFontVariationAxes, u as useTypography } from './typography-339RV6v7.js';
10
+ export { D as DEFAULT_FONT_VARIATION_AXES, F as FontVariationAxes, M as MD3_EXPRESSIVE_FONT_VARIATION, T as TextStyle, a as Typography, b as TypographyContext, c as TypographyKeyTokens, d as TypographyProvider, e as TypographyProviderProps, f as TypographyTokens, g as TypographyTokensOptions, s as serializeFontVariationAxes, u as useTypography } from './typography-CKTjvlZ4.js';
10
11
  import '@radix-ui/react-scroll-area';
11
12
 
12
13
  /**
@@ -609,10 +610,11 @@ interface DividerProps extends SafeHTMLDivAttrs {
609
610
  /**
610
611
  * Generates an SVG path `d` string for a sinusoidal wave between two X bounds.
611
612
  * Uses cubic Bézier approximation of a sine curve for smooth rendering.
612
- * The error vs. a true sine is < 0.2%.
613
613
  *
614
614
  * Each half-cycle alternates between crest (+amplitude) and trough (-amplitude).
615
- * Control points are placed at 1/3 and 2/3 of each half-cycle for accuracy.
615
+ * Adapts the half-cycle count so an integer number of half-cycles perfectly spans
616
+ * between startX and endX, ensuring both leading and trailing ends land smoothly
617
+ * on the center baseline without trailing kinks or partial-segment distortion.
616
618
  *
617
619
  * @param startX - X coordinate where the path begins (e.g. capWidth = strokeWidth/2)
618
620
  * @param endX - X coordinate where the path ends (e.g. containerWidth - capWidth)
package/dist/layout.js CHANGED
@@ -3320,7 +3320,7 @@ var IconComponent = React23__namespace.forwardRef(
3320
3320
  (_a, ref) => {
3321
3321
  var _b = _a, {
3322
3322
  name,
3323
- variant = "outlined",
3323
+ variant = "rounded",
3324
3324
  fill = 0,
3325
3325
  weight = 400,
3326
3326
  grade = 0,
@@ -3674,13 +3674,16 @@ function CodeBlock({
3674
3674
  }
3675
3675
  function buildWavePath(startX, endX, amplitude = 2, wavelength = 32, yCenter = 4) {
3676
3676
  if (startX >= endX) return "";
3677
+ const totalWidth = endX - startX;
3677
3678
  const halfCycle = wavelength / 2;
3678
- const numHalfCycles = Math.ceil((endX - startX) / halfCycle);
3679
- const cpDistanceY = amplitude * (4 / 3);
3679
+ const numHalfCycles = Math.max(1, Math.round(totalWidth / halfCycle));
3680
+ const actualHalfCycle = totalWidth / numHalfCycles;
3681
+ const scale = Math.min(1, actualHalfCycle / halfCycle);
3682
+ const cpDistanceY = amplitude * (4 / 3) * scale;
3680
3683
  let d = `M ${startX},${yCenter}`;
3681
3684
  for (let i = 0; i < numHalfCycles; i++) {
3682
- const x0 = startX + i * halfCycle;
3683
- const x1 = Math.min(startX + (i + 1) * halfCycle, endX);
3685
+ const x0 = startX + i * actualHalfCycle;
3686
+ const x1 = i === numHalfCycles - 1 ? endX : startX + (i + 1) * actualHalfCycle;
3684
3687
  const peak = i % 2 === 0 ? yCenter - cpDistanceY : yCenter + cpDistanceY;
3685
3688
  const segLen = x1 - x0;
3686
3689
  const cp1x = x0 + segLen / 3;
@@ -5601,7 +5604,7 @@ var ListItemImpl = React23__namespace.forwardRef(
5601
5604
  "cursor-grab active:cursor-grabbing text-m3-on-surface-variant p-2 -mr-2"
5602
5605
  )
5603
5606
  }, attributes), listeners), {
5604
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "material-symbols-outlined text-[24px]", children: "drag_handle" })
5607
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "material-symbols-rounded text-[24px]", children: "drag_handle" })
5605
5608
  })
5606
5609
  );
5607
5610
  }
@@ -5833,6 +5836,57 @@ var ListItemImpl = React23__namespace.forwardRef(
5833
5836
  );
5834
5837
  ListItemImpl.displayName = "ListItem";
5835
5838
  var ListItem = React23__namespace.memo(ListItemImpl);
5839
+ function getMaskGradient(direction) {
5840
+ switch (direction) {
5841
+ case "bottom":
5842
+ return "linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.7) 75%, rgba(0, 0, 0, 0) 100%)";
5843
+ case "both":
5844
+ return "linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 15%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.7) 85%, rgba(0, 0, 0, 1) 100%)";
5845
+ default:
5846
+ return "linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.7) 75%, rgba(0, 0, 0, 0) 100%)";
5847
+ }
5848
+ }
5849
+ function FadingBlurMask({
5850
+ direction = "top",
5851
+ blurIntensity = 12,
5852
+ blurHeight = "100%",
5853
+ color = "var(--md-sys-color-surface)",
5854
+ className,
5855
+ style,
5856
+ children
5857
+ }) {
5858
+ const shouldReduceMotion = react.useReducedMotion();
5859
+ const activeBlur = shouldReduceMotion ? 0 : blurIntensity;
5860
+ const maskGradient = getMaskGradient(direction);
5861
+ const isFullHeight = direction === "both" || blurHeight === "100%";
5862
+ const computedHeight = isFullHeight ? "100%" : typeof blurHeight === "number" ? `${blurHeight}px` : blurHeight;
5863
+ const maskStyle = __spreadValues({
5864
+ position: "absolute",
5865
+ top: direction === "bottom" && !isFullHeight ? "auto" : 0,
5866
+ bottom: direction === "top" && !isFullHeight ? "auto" : 0,
5867
+ left: 0,
5868
+ right: 0,
5869
+ pointerEvents: "none",
5870
+ height: computedHeight,
5871
+ backdropFilter: activeBlur > 0 ? `blur(${activeBlur}px)` : void 0,
5872
+ WebkitBackdropFilter: activeBlur > 0 ? `blur(${activeBlur}px)` : void 0,
5873
+ maskImage: maskGradient,
5874
+ WebkitMaskImage: maskGradient,
5875
+ backgroundColor: color
5876
+ }, style);
5877
+ return /* @__PURE__ */ jsxRuntime.jsx(
5878
+ "div",
5879
+ {
5880
+ "aria-hidden": "true",
5881
+ className: cn(
5882
+ "absolute pointer-events-none z-10 rounded-[inherit]",
5883
+ className
5884
+ ),
5885
+ style: maskStyle,
5886
+ children
5887
+ }
5888
+ );
5889
+ }
5836
5890
  var typographyVariants = classVarianceAuthority.cva("m-0 p-0 text-m3-on-surface", {
5837
5891
  variants: {
5838
5892
  variant: {
@@ -6713,6 +6767,7 @@ exports.CarouselTokens = CarouselTokens;
6713
6767
  exports.CodeBlock = CodeBlock;
6714
6768
  exports.DEFAULT_FONT_VARIATION_AXES = DEFAULT_FONT_VARIATION_AXES;
6715
6769
  exports.Divider = Divider;
6770
+ exports.FadingBlurMask = FadingBlurMask;
6716
6771
  exports.LIST_TOKENS = LIST_TOKENS;
6717
6772
  exports.List = List;
6718
6773
  exports.ListContext = ListContext;