@bug-on/m3-expressive 1.3.4 → 1.3.6

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 (76) hide show
  1. package/CHANGELOG.md +19 -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.d.mts +2 -2
  23. package/dist/forms.d.ts +2 -2
  24. package/dist/forms.js +17 -7
  25. package/dist/forms.js.map +1 -1
  26. package/dist/forms.mjs +17 -7
  27. package/dist/forms.mjs.map +1 -1
  28. package/dist/index.d.mts +9 -8
  29. package/dist/index.d.ts +9 -8
  30. package/dist/index.js +988 -309
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.mjs +984 -310
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/layout.d.mts +5 -3
  35. package/dist/layout.d.ts +5 -3
  36. package/dist/layout.js +61 -6
  37. package/dist/layout.js.map +1 -1
  38. package/dist/layout.mjs +61 -7
  39. package/dist/layout.mjs.map +1 -1
  40. package/dist/material-symbols-cdn.css +17 -23
  41. package/dist/{md3-expressive-shapes-CPcfl_Hf.d.mts → md3-expressive-shapes-wk_98LJh.d.mts} +20 -1
  42. package/dist/{md3-expressive-shapes-CPcfl_Hf.d.ts → md3-expressive-shapes-wk_98LJh.d.ts} +20 -1
  43. package/dist/navigation.d.mts +26 -84
  44. package/dist/navigation.d.ts +26 -84
  45. package/dist/navigation.js +95 -29
  46. package/dist/navigation.js.map +1 -1
  47. package/dist/navigation.mjs +95 -29
  48. package/dist/navigation.mjs.map +1 -1
  49. package/dist/overlays.d.mts +4 -2
  50. package/dist/overlays.d.ts +4 -2
  51. package/dist/overlays.js +85 -44
  52. package/dist/overlays.js.map +1 -1
  53. package/dist/overlays.mjs +85 -44
  54. package/dist/overlays.mjs.map +1 -1
  55. package/dist/pickers.d.mts +12 -0
  56. package/dist/pickers.d.ts +12 -0
  57. package/dist/pickers.js +186 -120
  58. package/dist/pickers.js.map +1 -1
  59. package/dist/pickers.mjs +186 -120
  60. package/dist/pickers.mjs.map +1 -1
  61. package/dist/shapes.d.mts +141 -15
  62. package/dist/shapes.d.ts +141 -15
  63. package/dist/shapes.js +618 -126
  64. package/dist/shapes.js.map +1 -1
  65. package/dist/shapes.mjs +614 -127
  66. package/dist/shapes.mjs.map +1 -1
  67. package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-BycxrabB.d.mts} +70 -0
  68. package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-Cw4vemKx.d.ts} +70 -0
  69. package/dist/{text-field-4OlT9o8s.d.mts → text-field-B1fLh5Sh.d.mts} +22 -3
  70. package/dist/{text-field-DARNdj14.d.ts → text-field-C0VQLp8Y.d.ts} +22 -3
  71. package/dist/{typography-339RV6v7.d.mts → typography-CKTjvlZ4.d.mts} +25 -0
  72. package/dist/{typography-339RV6v7.d.ts → typography-CKTjvlZ4.d.ts} +25 -0
  73. package/dist/typography.css +1 -1
  74. package/llms-full.txt +24 -13
  75. package/llms.txt +11 -6
  76. package/package.json +3 -3
package/dist/pickers.mjs CHANGED
@@ -2147,7 +2147,7 @@ var IconComponent = React6.forwardRef(
2147
2147
  (_a, ref) => {
2148
2148
  var _b = _a, {
2149
2149
  name,
2150
- variant = "outlined",
2150
+ variant = "rounded",
2151
2151
  fill = 0,
2152
2152
  weight = 400,
2153
2153
  grade = 0,
@@ -2210,7 +2210,7 @@ var IconComponent = React6.forwardRef(
2210
2210
  );
2211
2211
  IconComponent.displayName = "Icon";
2212
2212
  var Icon = React6.memo(IconComponent);
2213
- var selectorClassName = "flex items-center gap-1 rounded-m3-full px-2 py-1 text-[length:var(--md-typescale-title-small-size,14px)] font-[number:var(--md-typescale-title-small-weight,500)] text-m3-on-surface transition-m3-fast-effects hover:bg-m3-on-surface/8 focus-visible:outline-2 focus-visible:outline-m3-primary";
2213
+ var selectorClassName = "flex items-center gap-1 rounded-m3-full px-2 py-1 text-[length:var(--md-typescale-title-small-size,14px)] font-[number:var(--md-typescale-title-small-weight,500)] text-m3-on-surface transition-m3-fast-effects hover:bg-m3-on-surface/8 focus-visible:outline-2 focus-visible:outline-m3-primary whitespace-nowrap select-none min-w-0";
2214
2214
  var CalendarHeader = ({
2215
2215
  displayedMonthMs,
2216
2216
  activeSelector,
@@ -2236,57 +2236,70 @@ var CalendarHeader = ({
2236
2236
  timeZone: "UTC"
2237
2237
  }).format(date);
2238
2238
  const yearLabel = String(date.getUTCFullYear());
2239
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 px-6 pb-4 pt-5", children: [
2240
- /* @__PURE__ */ jsx("div", { className: "text-(length:--md-typescale-label-large-size,14px) font-(--md-typescale-label-large-weight,500) text-m3-on-surface-variant", children: title }),
2241
- /* @__PURE__ */ jsx("div", { className: "mb-2 leading-tight text-(length:--md-typescale-headline-large-size,32px) font-(--md-typescale-headline-large-weight,400) text-m3-on-surface-variant", children: headline }),
2242
- displayMode === "picker" && /* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-center gap-0.5", children: [
2243
- activeSelector === null && /* @__PURE__ */ jsx(
2244
- IconButton,
2245
- {
2246
- onClick: onPrev,
2247
- "aria-label": "Previous month",
2248
- disabled: !canNavigatePrev,
2249
- size: "xs",
2250
- children: /* @__PURE__ */ jsx(Icon, { name: "chevron_left" })
2251
- }
2252
- ),
2253
- /* @__PURE__ */ jsxs(
2254
- "button",
2255
- {
2256
- type: "button",
2257
- onClick: () => onToggleSelector("month"),
2258
- "aria-expanded": activeSelector === "month",
2259
- "aria-controls": "date-picker-selection",
2260
- className: cn(
2261
- selectorClassName,
2262
- activeSelector === "month" && "bg-m3-on-surface/8"
2263
- ),
2264
- children: [
2265
- monthLabel,
2266
- /* @__PURE__ */ jsx(
2267
- Icon,
2268
- {
2269
- name: "arrow_drop_down",
2270
- className: cn(
2271
- "text-[20px] transition-transform duration-200",
2272
- activeSelector === "month" && "rotate-180"
2273
- )
2274
- }
2275
- )
2276
- ]
2277
- }
2278
- ),
2279
- activeSelector === null && /* @__PURE__ */ jsx(
2280
- IconButton,
2281
- {
2282
- onClick: onNext,
2283
- "aria-label": "Next month",
2284
- disabled: !canNavigateNext,
2285
- size: "xs",
2286
- children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right" })
2287
- }
2288
- ),
2289
- /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-0.5", children: [
2239
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 px-4 sm:px-6 pb-3 pt-5 w-full", children: [
2240
+ /* @__PURE__ */ jsx("div", { className: "text-(length:--md-typescale-label-large-size,14px) font-(--md-typescale-label-large-weight,500) text-m3-on-surface-variant truncate", children: title }),
2241
+ /* @__PURE__ */ jsx(
2242
+ "div",
2243
+ {
2244
+ className: "mb-2 leading-tight text-[26px] sm:text-[32px] font-(--md-typescale-headline-large-weight,400) text-m3-on-surface-variant truncate",
2245
+ title: typeof headline === "string" ? headline : void 0,
2246
+ children: headline
2247
+ }
2248
+ ),
2249
+ displayMode === "picker" && /* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-center justify-between gap-0.5 w-full overflow-hidden", children: [
2250
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 min-w-0 shrink", children: [
2251
+ activeSelector === null && /* @__PURE__ */ jsx(
2252
+ IconButton,
2253
+ {
2254
+ onClick: onPrev,
2255
+ "aria-label": "Previous month",
2256
+ disabled: !canNavigatePrev,
2257
+ size: "xs",
2258
+ className: "shrink-0",
2259
+ children: /* @__PURE__ */ jsx(Icon, { name: "chevron_left" })
2260
+ }
2261
+ ),
2262
+ /* @__PURE__ */ jsxs(
2263
+ "button",
2264
+ {
2265
+ type: "button",
2266
+ onClick: () => onToggleSelector("month"),
2267
+ "aria-expanded": activeSelector === "month",
2268
+ "aria-controls": "date-picker-selection",
2269
+ className: cn(
2270
+ selectorClassName,
2271
+ "min-w-0 max-w-[125px] shrink",
2272
+ activeSelector === "month" && "bg-m3-on-surface/8"
2273
+ ),
2274
+ title: monthLabel,
2275
+ children: [
2276
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: monthLabel }),
2277
+ /* @__PURE__ */ jsx(
2278
+ Icon,
2279
+ {
2280
+ name: "arrow_drop_down",
2281
+ className: cn(
2282
+ "text-[20px] shrink-0 transition-transform duration-200",
2283
+ activeSelector === "month" && "rotate-180"
2284
+ )
2285
+ }
2286
+ )
2287
+ ]
2288
+ }
2289
+ ),
2290
+ activeSelector === null && /* @__PURE__ */ jsx(
2291
+ IconButton,
2292
+ {
2293
+ onClick: onNext,
2294
+ "aria-label": "Next month",
2295
+ disabled: !canNavigateNext,
2296
+ size: "xs",
2297
+ className: "shrink-0",
2298
+ children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right" })
2299
+ }
2300
+ )
2301
+ ] }),
2302
+ /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-0.5 shrink-0", children: [
2290
2303
  activeSelector === null && /* @__PURE__ */ jsx(
2291
2304
  IconButton,
2292
2305
  {
@@ -2294,6 +2307,7 @@ var CalendarHeader = ({
2294
2307
  "aria-label": "Previous year",
2295
2308
  disabled: !canNavigatePreviousYear,
2296
2309
  size: "xs",
2310
+ className: "shrink-0",
2297
2311
  children: /* @__PURE__ */ jsx(Icon, { name: "chevron_left" })
2298
2312
  }
2299
2313
  ),
@@ -2306,16 +2320,18 @@ var CalendarHeader = ({
2306
2320
  "aria-controls": "date-picker-selection",
2307
2321
  className: cn(
2308
2322
  selectorClassName,
2323
+ "shrink-0",
2309
2324
  activeSelector === "year" && "bg-m3-on-surface/8"
2310
2325
  ),
2326
+ title: yearLabel,
2311
2327
  children: [
2312
- yearLabel,
2328
+ /* @__PURE__ */ jsx("span", { children: yearLabel }),
2313
2329
  /* @__PURE__ */ jsx(
2314
2330
  Icon,
2315
2331
  {
2316
2332
  name: "arrow_drop_down",
2317
2333
  className: cn(
2318
- "text-[20px] transition-transform duration-200",
2334
+ "text-[20px] shrink-0 transition-transform duration-200",
2319
2335
  activeSelector === "year" && "rotate-180"
2320
2336
  )
2321
2337
  }
@@ -2330,6 +2346,7 @@ var CalendarHeader = ({
2330
2346
  "aria-label": "Next year",
2331
2347
  disabled: !canNavigateNextYear,
2332
2348
  size: "xs",
2349
+ className: "shrink-0",
2333
2350
  children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right" })
2334
2351
  }
2335
2352
  ),
@@ -2339,6 +2356,7 @@ var CalendarHeader = ({
2339
2356
  onClick: onToggleMode,
2340
2357
  "aria-label": "Switch to text input",
2341
2358
  size: "xs",
2359
+ className: "shrink-0",
2342
2360
  children: /* @__PURE__ */ jsx(Icon, { name: "keyboard" })
2343
2361
  }
2344
2362
  )
@@ -2350,7 +2368,7 @@ var CalendarHeader = ({
2350
2368
  onClick: onToggleMode,
2351
2369
  "aria-label": "Switch to calendar",
2352
2370
  size: "xs",
2353
- className: "self-end",
2371
+ className: "self-end shrink-0",
2354
2372
  children: /* @__PURE__ */ jsx(Icon, { name: "calendar_month" })
2355
2373
  }
2356
2374
  ),
@@ -2397,14 +2415,14 @@ var MonthPickerList = ({
2397
2415
  onClick: () => onMonthSelect(month),
2398
2416
  className: cn(
2399
2417
  "flex min-h-12 w-full items-center gap-4 px-6 text-left",
2400
- "text-[length:var(--md-typescale-body-large-size,16px)]",
2418
+ "text-(length:--md-typescale-body-large-size,16px)",
2401
2419
  "text-m3-on-surface transition-m3-fast-effects",
2402
2420
  "hover:bg-m3-on-surface/8 focus-visible:outline-2 focus-visible:outline-m3-primary",
2403
2421
  isSelected && "bg-m3-secondary-container text-m3-on-secondary-container"
2404
2422
  ),
2405
2423
  children: [
2406
- /* @__PURE__ */ jsx("span", { className: "w-6", "aria-hidden": true, children: isSelected && /* @__PURE__ */ jsx(Icon, { name: "check", className: "text-[20px]" }) }),
2407
- getMonthLabel(month, locale.locale)
2424
+ /* @__PURE__ */ jsx("span", { className: "w-6 shrink-0", "aria-hidden": true, children: isSelected && /* @__PURE__ */ jsx(Icon, { name: "check", className: "text-[20px]" }) }),
2425
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: getMonthLabel(month, locale.locale) })
2408
2426
  ]
2409
2427
  },
2410
2428
  month
@@ -2482,7 +2500,9 @@ var DatePicker = ({
2482
2500
  showModeToggle = true,
2483
2501
  title,
2484
2502
  headline,
2485
- className
2503
+ className,
2504
+ width,
2505
+ maxWidth
2486
2506
  }) => {
2487
2507
  const {
2488
2508
  selectedDateMs,
@@ -2563,7 +2583,10 @@ var DatePicker = ({
2563
2583
  "fieldset",
2564
2584
  {
2565
2585
  className: cn("flex flex-col select-none", className),
2566
- style: { width: "min(100%, 360px)" },
2586
+ style: {
2587
+ width: typeof width === "number" ? `${width}px` : width != null ? width : "min(100%, 360px)",
2588
+ maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
2589
+ },
2567
2590
  "aria-label": computedAriaLabel,
2568
2591
  children: [
2569
2592
  /* @__PURE__ */ jsx("legend", { className: "sr-only", children: computedAriaLabel }),
@@ -2931,45 +2954,64 @@ var DialogOverlay = React6.forwardRef((_a, ref) => {
2931
2954
  ) }));
2932
2955
  });
2933
2956
  DialogOverlay.displayName = "DialogOverlay";
2934
- var DialogContent = React6.forwardRef((_a, ref) => {
2935
- var _b = _a, { className, children, hideCloseButton = false } = _b, props = __objRest(_b, ["className", "children", "hideCloseButton"]);
2936
- return /* @__PURE__ */ jsx(
2937
- RadixDialog.Content,
2938
- __spreadProps(__spreadValues({
2939
- ref,
2940
- asChild: true,
2941
- "aria-describedby": void 0
2942
- }, props), {
2943
- children: /* @__PURE__ */ jsxs(
2944
- m.div,
2945
- __spreadProps(__spreadValues({
2946
- className: cn(
2947
- "fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
2948
- "w-[calc(100%-2rem)] max-w-140",
2949
- "rounded-[28px] bg-m3-surface-container-high p-6",
2950
- "shadow-lg outline-none focus-visible:ring-2 focus-visible:ring-m3-primary",
2951
- className
2952
- ),
2953
- role: "dialog"
2954
- }, MD3_CONTENT_ANIM), {
2955
- children: [
2956
- children,
2957
- !hideCloseButton && /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, "aria-label": "Close dialog", children: /* @__PURE__ */ jsx(
2958
- IconButton,
2959
- {
2960
- size: "sm",
2961
- colorStyle: "filled",
2962
- className: "absolute right-4 top-4",
2963
- "aria-label": "Close",
2964
- children: /* @__PURE__ */ jsx(Icon, { name: "close", "aria-hidden": "true" })
2965
- }
2966
- ) })
2967
- ]
2968
- })
2969
- )
2970
- })
2971
- );
2972
- });
2957
+ var DEFAULT_CLOSE_BTN_PROPS = {
2958
+ size: "sm",
2959
+ colorStyle: "standard",
2960
+ className: "absolute right-4 top-4",
2961
+ "aria-label": "Close"
2962
+ };
2963
+ var DialogContent = React6.forwardRef(
2964
+ (_a, ref) => {
2965
+ var _b = _a, {
2966
+ className,
2967
+ children,
2968
+ hideCloseButton = false,
2969
+ closeButtonProps,
2970
+ closeButton
2971
+ } = _b, props = __objRest(_b, [
2972
+ "className",
2973
+ "children",
2974
+ "hideCloseButton",
2975
+ "closeButtonProps",
2976
+ "closeButton"
2977
+ ]);
2978
+ const closeAriaLabel = (() => {
2979
+ var _a2, _b2, _c;
2980
+ if (closeButton == null) {
2981
+ return (_a2 = closeButtonProps == null ? void 0 : closeButtonProps["aria-label"]) != null ? _a2 : DEFAULT_CLOSE_BTN_PROPS["aria-label"];
2982
+ }
2983
+ const el = closeButton;
2984
+ return (_c = (_b2 = el == null ? void 0 : el.props) == null ? void 0 : _b2["aria-label"]) != null ? _c : "Close";
2985
+ })();
2986
+ return /* @__PURE__ */ jsx(
2987
+ RadixDialog.Content,
2988
+ __spreadProps(__spreadValues({
2989
+ ref,
2990
+ asChild: true,
2991
+ "aria-describedby": void 0
2992
+ }, props), {
2993
+ children: /* @__PURE__ */ jsxs(
2994
+ m.div,
2995
+ __spreadProps(__spreadValues({
2996
+ className: cn(
2997
+ "fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
2998
+ "w-[calc(100%-2rem)] max-w-140",
2999
+ "rounded-[28px] bg-m3-surface-container-high p-6",
3000
+ "shadow-lg outline-none focus-visible:ring-2 focus-visible:ring-m3-primary",
3001
+ className
3002
+ ),
3003
+ role: "dialog"
3004
+ }, MD3_CONTENT_ANIM), {
3005
+ children: [
3006
+ children,
3007
+ closeButton != null ? /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, "aria-label": closeAriaLabel, children: closeButton }) : !hideCloseButton ? /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, "aria-label": closeAriaLabel, children: /* @__PURE__ */ jsx(IconButton, __spreadProps(__spreadValues(__spreadValues({}, DEFAULT_CLOSE_BTN_PROPS), closeButtonProps), { children: /* @__PURE__ */ jsx(Icon, { name: "close", "aria-hidden": "true" }) })) }) : null
3008
+ ]
3009
+ })
3010
+ )
3011
+ })
3012
+ );
3013
+ }
3014
+ );
2973
3015
  DialogContent.displayName = "DialogContent";
2974
3016
  var DialogIcon = React6.forwardRef((_a, ref) => {
2975
3017
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
@@ -3036,6 +3078,8 @@ var DialogFullScreenContent = React6.forwardRef(
3036
3078
  title,
3037
3079
  actionLabel,
3038
3080
  onAction,
3081
+ actionButtonProps,
3082
+ closeButtonProps,
3039
3083
  showDivider
3040
3084
  } = _b, props = __objRest(_b, [
3041
3085
  "className",
@@ -3043,8 +3087,11 @@ var DialogFullScreenContent = React6.forwardRef(
3043
3087
  "title",
3044
3088
  "actionLabel",
3045
3089
  "onAction",
3090
+ "actionButtonProps",
3091
+ "closeButtonProps",
3046
3092
  "showDivider"
3047
3093
  ]);
3094
+ var _a2;
3048
3095
  return /* @__PURE__ */ jsx(
3049
3096
  RadixDialog.Content,
3050
3097
  __spreadProps(__spreadValues({
@@ -3064,16 +3111,33 @@ var DialogFullScreenContent = React6.forwardRef(
3064
3111
  }, MD3_FULLSCREEN_ANIM), {
3065
3112
  children: [
3066
3113
  /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center px-4 h-14 gap-2 bg-m3-surface", children: [
3067
- /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, "aria-label": "Close dialog", children: /* @__PURE__ */ jsx(IconButton, { size: "sm", colorStyle: "filled", "aria-label": "Close", children: /* @__PURE__ */ jsx(Icon, { name: "close", "aria-hidden": "true" }) }) }),
3114
+ /* @__PURE__ */ jsx(
3115
+ RadixDialog.Close,
3116
+ {
3117
+ asChild: true,
3118
+ "aria-label": (_a2 = closeButtonProps == null ? void 0 : closeButtonProps["aria-label"]) != null ? _a2 : "Close",
3119
+ children: /* @__PURE__ */ jsx(
3120
+ IconButton,
3121
+ __spreadProps(__spreadValues({
3122
+ size: "sm",
3123
+ colorStyle: "standard",
3124
+ "aria-label": "Close"
3125
+ }, closeButtonProps), {
3126
+ children: /* @__PURE__ */ jsx(Icon, { name: "close", "aria-hidden": "true" })
3127
+ })
3128
+ )
3129
+ }
3130
+ ),
3068
3131
  title && /* @__PURE__ */ jsx(DialogTitle, { className: "flex-1 text-[22px] leading-7 font-medium truncate pr-2", children: title }),
3069
3132
  actionLabel && onAction && /* @__PURE__ */ jsx(
3070
3133
  "button",
3071
- {
3134
+ __spreadProps(__spreadValues({
3072
3135
  type: "button",
3073
3136
  onClick: onAction,
3074
- className: "text-sm font-medium text-m3-primary px-3 py-2 rounded-full hover:bg-m3-primary/8 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary transition-colors whitespace-nowrap",
3137
+ className: "text-sm font-medium text-m3-primary px-3 py-2 rounded-full hover:bg-m3-primary/8 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary transition-colors whitespace-nowrap disabled:opacity-[0.38] disabled:pointer-events-none"
3138
+ }, actionButtonProps), {
3075
3139
  children: actionLabel
3076
- }
3140
+ })
3077
3141
  )
3078
3142
  ] }),
3079
3143
  showDivider && /* @__PURE__ */ jsx("hr", { className: "border-m3-outline-variant w-full shrink-0 m-0" }),
@@ -3101,7 +3165,9 @@ var DatePickerDialog = ({
3101
3165
  dismissButton,
3102
3166
  children,
3103
3167
  className,
3104
- title = "Select date"
3168
+ title = "Select date",
3169
+ width,
3170
+ maxWidth
3105
3171
  }) => {
3106
3172
  return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (v) => !v && onDismiss(), children: /* @__PURE__ */ jsxs(DialogPortal, { open, children: [
3107
3173
  /* @__PURE__ */ jsx(RadixDialog.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx(
@@ -3137,7 +3203,10 @@ var DatePickerDialog = ({
3137
3203
  "elevation-3",
3138
3204
  className
3139
3205
  ),
3140
- style: { width: "min(calc(100vw - 32px), 360px)" },
3206
+ style: {
3207
+ width: typeof width === "number" ? `${width}px` : width != null ? width : "min(calc(100vw - 32px), 360px)",
3208
+ maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
3209
+ },
3141
3210
  initial: PICKER_CONTENT_ANIM.initial,
3142
3211
  animate: PICKER_CONTENT_ANIM.animate,
3143
3212
  exit: PICKER_CONTENT_ANIM.exit,
@@ -3161,7 +3230,9 @@ var DateRangePicker = ({
3161
3230
  state,
3162
3231
  showModeToggle = false,
3163
3232
  title,
3164
- className
3233
+ className,
3234
+ width,
3235
+ maxWidth
3165
3236
  }) => {
3166
3237
  const {
3167
3238
  selectedStartMs,
@@ -3233,7 +3304,10 @@ var DateRangePicker = ({
3233
3304
  "fieldset",
3234
3305
  {
3235
3306
  className: cn("flex flex-col select-none", className),
3236
- style: { width: "min(100%, 360px)" },
3307
+ style: {
3308
+ width: typeof width === "number" ? `${width}px` : width != null ? width : "min(100%, 360px)",
3309
+ maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
3310
+ },
3237
3311
  "aria-label": computedAriaLabel,
3238
3312
  children: [
3239
3313
  /* @__PURE__ */ jsx("legend", { className: "sr-only", children: computedAriaLabel }),
@@ -4059,21 +4133,13 @@ var normalizeAngle = (angle) => {
4059
4133
  return a;
4060
4134
  };
4061
4135
  var angleToHour12 = (angle) => {
4062
- const hourOffset = RADIANS_PER_HOUR / 2;
4063
- const totalOffset = hourOffset + QUARTER_CIRCLE;
4064
- const hour = Math.round((angle + totalOffset) / RADIANS_PER_HOUR) % 12;
4136
+ const normalized = normalizeAngle(angle + QUARTER_CIRCLE);
4137
+ const hour = Math.round(normalized / RADIANS_PER_HOUR) % 12;
4065
4138
  return hour === 0 ? 12 : hour;
4066
4139
  };
4067
- var angleToMinute = (angle, snap = true) => {
4068
- if (snap) {
4069
- const minuteOffset = RADIANS_PER_MINUTE / 2;
4070
- const totalOffset = minuteOffset + QUARTER_CIRCLE;
4071
- const raw2 = Math.round((angle + totalOffset) / RADIANS_PER_MINUTE) % 60;
4072
- return raw2 < 0 ? raw2 + 60 : raw2;
4073
- }
4140
+ var angleToMinute = (angle, _snap = true) => {
4074
4141
  const normalized = normalizeAngle(angle + QUARTER_CIRCLE);
4075
- const raw = Math.round(normalized / FULL_CIRCLE * 60) % 60;
4076
- return raw < 0 ? raw + 60 : raw;
4142
+ return Math.round(normalized / RADIANS_PER_MINUTE) % 60;
4077
4143
  };
4078
4144
  var getSelectorPosition = (angle, selection, is24hour, isPm) => {
4079
4145
  const useInner = is24hour && isPm && selection === "hour";