@bug-on/m3-expressive 1.2.0 → 1.2.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 (54) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/buttons.d.mts +2 -2
  3. package/dist/buttons.d.ts +2 -2
  4. package/dist/buttons.js +678 -605
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +677 -604
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/core.js +86 -61
  9. package/dist/core.js.map +1 -1
  10. package/dist/core.mjs +86 -61
  11. package/dist/core.mjs.map +1 -1
  12. package/dist/feedback.js +85 -61
  13. package/dist/feedback.js.map +1 -1
  14. package/dist/feedback.mjs +85 -61
  15. package/dist/feedback.mjs.map +1 -1
  16. package/dist/forms.d.mts +2 -2
  17. package/dist/forms.d.ts +2 -2
  18. package/dist/forms.js +70 -8
  19. package/dist/forms.js.map +1 -1
  20. package/dist/forms.mjs +70 -8
  21. package/dist/forms.mjs.map +1 -1
  22. package/dist/{icon-button-D-gs0gfj.d.mts → icon-button-sSt6PPLg.d.mts} +6 -0
  23. package/dist/{icon-button-D-gs0gfj.d.ts → icon-button-sSt6PPLg.d.ts} +6 -0
  24. package/dist/index.d.mts +4 -4
  25. package/dist/index.d.ts +4 -4
  26. package/dist/index.js +973 -496
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +967 -497
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/layout.d.mts +18 -1
  31. package/dist/layout.d.ts +18 -1
  32. package/dist/layout.js +65 -8
  33. package/dist/layout.js.map +1 -1
  34. package/dist/layout.mjs +65 -8
  35. package/dist/layout.mjs.map +1 -1
  36. package/dist/navigation.d.mts +134 -9
  37. package/dist/navigation.d.ts +134 -9
  38. package/dist/navigation.js +403 -93
  39. package/dist/navigation.js.map +1 -1
  40. package/dist/navigation.mjs +397 -94
  41. package/dist/navigation.mjs.map +1 -1
  42. package/dist/overlays.js +214 -189
  43. package/dist/overlays.js.map +1 -1
  44. package/dist/overlays.mjs +176 -151
  45. package/dist/overlays.mjs.map +1 -1
  46. package/dist/pickers.js +222 -197
  47. package/dist/pickers.js.map +1 -1
  48. package/dist/pickers.mjs +189 -164
  49. package/dist/pickers.mjs.map +1 -1
  50. package/dist/{split-button-trailing-uncheckable-BkPbiBo3.d.ts → split-button-trailing-uncheckable-BcPD_7uK.d.ts} +44 -6
  51. package/dist/{split-button-trailing-uncheckable-D_PLPb-u.d.mts → split-button-trailing-uncheckable-DtFJkTFr.d.mts} +44 -6
  52. package/dist/{text-field-eAIpz9z1.d.mts → text-field-T4Rg-9Bw.d.mts} +7 -0
  53. package/dist/{text-field-eAIpz9z1.d.ts → text-field-T4Rg-9Bw.d.ts} +7 -0
  54. package/package.json +1 -1
package/dist/feedback.js CHANGED
@@ -1301,6 +1301,7 @@ var IconButtonComponent = React12__namespace.forwardRef(
1301
1301
  loading = false,
1302
1302
  loadingVariant = "loading-indicator",
1303
1303
  iconSize,
1304
+ asChild = false,
1304
1305
  children,
1305
1306
  onClick,
1306
1307
  onKeyDown,
@@ -1316,6 +1317,7 @@ var IconButtonComponent = React12__namespace.forwardRef(
1316
1317
  "loading",
1317
1318
  "loadingVariant",
1318
1319
  "iconSize",
1320
+ "asChild",
1319
1321
  "children",
1320
1322
  "onClick",
1321
1323
  "onKeyDown",
@@ -1377,7 +1379,87 @@ var IconButtonComponent = React12__namespace.forwardRef(
1377
1379
  },
1378
1380
  [loading, onClick, onKeyDown]
1379
1381
  );
1380
- return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
1382
+ const innerContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1383
+ needsTouchTarget && /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, {}),
1384
+ /* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone: removeRipple }),
1385
+ /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
1386
+ react.m.span,
1387
+ __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1388
+ transition: SPRING_TRANSITION,
1389
+ className: cn(
1390
+ "flex items-center justify-center shrink-0",
1391
+ iconSize != null ? void 0 : iconClass
1392
+ ),
1393
+ style: isCustomSize ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0,
1394
+ children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsxRuntime.jsx(
1395
+ LoadingIndicator,
1396
+ {
1397
+ size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1398
+ color: "currentColor",
1399
+ "aria-label": "Loading"
1400
+ }
1401
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1402
+ ProgressIndicator,
1403
+ {
1404
+ variant: "circular",
1405
+ size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1406
+ color: "currentColor",
1407
+ trackColor: "transparent",
1408
+ "aria-label": "Loading"
1409
+ }
1410
+ )
1411
+ }),
1412
+ "loading"
1413
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1414
+ react.m.span,
1415
+ __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1416
+ transition: SPRING_TRANSITION,
1417
+ "aria-hidden": "true",
1418
+ className: cn(
1419
+ "flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]!",
1420
+ iconSize != null ? void 0 : iconClass
1421
+ ),
1422
+ style: {
1423
+ fontSize: typeof iconPx === "number" ? `${iconPx}px` : iconPx,
1424
+ width: isCustomSize ? `${iconSize}px` : void 0,
1425
+ height: isCustomSize ? `${iconSize}px` : void 0
1426
+ },
1427
+ children: asChild ? React12__namespace.Children.only(children).props.children : children
1428
+ }),
1429
+ "content"
1430
+ ) })
1431
+ ] });
1432
+ const containerClassName = cn(
1433
+ baseIconButtonClasses,
1434
+ resolvedColorClass,
1435
+ outlineWidthClass,
1436
+ disabledBgClass,
1437
+ "overflow-hidden",
1438
+ SIZE_STYLES[size],
1439
+ loading && "pointer-events-none opacity-75 cursor-not-allowed",
1440
+ className
1441
+ );
1442
+ if (asChild) {
1443
+ const child = React12__namespace.Children.only(children);
1444
+ return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1445
+ reactSlot.Slot,
1446
+ __spreadProps(__spreadValues({
1447
+ ref,
1448
+ "aria-pressed": isToggle ? isSelected : void 0,
1449
+ "aria-label": ariaLabel,
1450
+ "aria-busy": loading || void 0,
1451
+ "aria-disabled": loading || restProps.disabled,
1452
+ onClick: handleClick,
1453
+ onPointerDown,
1454
+ onKeyDown: handleKeyDown,
1455
+ style: __spreadProps(__spreadValues({}, style), { borderRadius: `${animateRadius}px` }),
1456
+ className: containerClassName
1457
+ }, restProps), {
1458
+ children: React12__namespace.cloneElement(child, { children: innerContent })
1459
+ })
1460
+ ) });
1461
+ }
1462
+ return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1381
1463
  react.m.button,
1382
1464
  __spreadProps(__spreadValues({
1383
1465
  ref,
@@ -1393,67 +1475,9 @@ var IconButtonComponent = React12__namespace.forwardRef(
1393
1475
  animate: { borderRadius: animateRadius },
1394
1476
  whileTap: { borderRadius: pressedRadius },
1395
1477
  transition: { borderRadius: SPRING_TRANSITION_FAST },
1396
- className: cn(
1397
- baseIconButtonClasses,
1398
- resolvedColorClass,
1399
- outlineWidthClass,
1400
- disabledBgClass,
1401
- "overflow-hidden",
1402
- SIZE_STYLES[size],
1403
- loading && "pointer-events-none opacity-75 cursor-not-allowed",
1404
- className
1405
- )
1478
+ className: containerClassName
1406
1479
  }, restProps), {
1407
- children: [
1408
- needsTouchTarget && /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, {}),
1409
- /* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone: removeRipple }),
1410
- /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
1411
- react.m.span,
1412
- __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1413
- transition: SPRING_TRANSITION,
1414
- className: cn(
1415
- "flex items-center justify-center shrink-0",
1416
- iconSize != null ? void 0 : iconClass
1417
- ),
1418
- style: isCustomSize ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0,
1419
- children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsxRuntime.jsx(
1420
- LoadingIndicator,
1421
- {
1422
- size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1423
- color: "currentColor",
1424
- "aria-label": "Loading"
1425
- }
1426
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1427
- ProgressIndicator,
1428
- {
1429
- variant: "circular",
1430
- size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1431
- color: "currentColor",
1432
- trackColor: "transparent",
1433
- "aria-label": "Loading"
1434
- }
1435
- )
1436
- }),
1437
- "loading"
1438
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1439
- react.m.span,
1440
- __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1441
- transition: SPRING_TRANSITION,
1442
- "aria-hidden": "true",
1443
- className: cn(
1444
- "flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]!",
1445
- iconSize != null ? void 0 : iconClass
1446
- ),
1447
- style: {
1448
- fontSize: typeof iconPx === "number" ? `${iconPx}px` : iconPx,
1449
- width: isCustomSize ? `${iconSize}px` : void 0,
1450
- height: isCustomSize ? `${iconSize}px` : void 0
1451
- },
1452
- children
1453
- }),
1454
- "content"
1455
- ) })
1456
- ]
1480
+ children: innerContent
1457
1481
  })
1458
1482
  ) });
1459
1483
  }