@bug-on/m3-expressive 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/buttons.d.mts +26 -5
- package/dist/buttons.d.ts +26 -5
- package/dist/buttons.js +581 -345
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +573 -345
- package/dist/buttons.mjs.map +1 -1
- package/dist/core.js +52 -13
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +52 -13
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.js +52 -13
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +52 -13
- package/dist/feedback.mjs.map +1 -1
- package/dist/forms.js +4 -1
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +4 -1
- package/dist/forms.mjs.map +1 -1
- package/dist/{icon-button-sSt6PPLg.d.mts → icon-button-CSsDmuQC.d.mts} +13 -0
- package/dist/{icon-button-sSt6PPLg.d.ts → icon-button-CSsDmuQC.d.ts} +13 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1268 -1005
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1127 -865
- package/dist/index.mjs.map +1 -1
- package/dist/layout.js +15 -7
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +15 -7
- package/dist/layout.mjs.map +1 -1
- package/dist/navigation.d.mts +1 -1
- package/dist/navigation.d.ts +1 -1
- package/dist/navigation.js +66 -16
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +66 -16
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.js +52 -13
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +52 -13
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.js +177 -111
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +177 -111
- package/dist/pickers.mjs.map +1 -1
- package/dist/{split-button-trailing-uncheckable-BcPD_7uK.d.ts → split-button-trailing-uncheckable-C-qQlyZx.d.ts} +74 -19
- package/dist/{split-button-trailing-uncheckable-DtFJkTFr.d.mts → split-button-trailing-uncheckable-DHJqNeq_.d.mts} +74 -19
- package/package.json +3 -3
package/dist/navigation.mjs
CHANGED
|
@@ -2578,7 +2578,10 @@ function useRippleState(options = {}) {
|
|
|
2578
2578
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
2579
2579
|
const x = e.clientX - rect.left;
|
|
2580
2580
|
const y = e.clientY - rect.top;
|
|
2581
|
-
const rippleSize = Math.
|
|
2581
|
+
const rippleSize = Math.max(
|
|
2582
|
+
Math.hypot(rect.width, rect.height) * 2.5,
|
|
2583
|
+
320
|
|
2584
|
+
);
|
|
2582
2585
|
setRipples((prev) => [
|
|
2583
2586
|
...prev,
|
|
2584
2587
|
{ id: Date.now(), x, y, size: rippleSize }
|
|
@@ -2661,7 +2664,11 @@ var NavigationBarItemComponent = React36.forwardRef(
|
|
|
2661
2664
|
className,
|
|
2662
2665
|
"aria-label": ariaLabelProp
|
|
2663
2666
|
}, ref) => {
|
|
2664
|
-
const {
|
|
2667
|
+
const {
|
|
2668
|
+
variant,
|
|
2669
|
+
itemLayout,
|
|
2670
|
+
itemClassName: contextItemClassName
|
|
2671
|
+
} = React36.useContext(NavigationBarContext);
|
|
2665
2672
|
const isForcedHorizontal = itemLayout === "horizontal";
|
|
2666
2673
|
const isResponsiveHorizontal = (variant === "flexible" || variant === "xr") && itemLayout === void 0;
|
|
2667
2674
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
@@ -2865,7 +2872,12 @@ var NavigationBarComponent = React36.forwardRef(
|
|
|
2865
2872
|
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
|
|
2866
2873
|
NavigationBarContext.Provider,
|
|
2867
2874
|
{
|
|
2868
|
-
value: {
|
|
2875
|
+
value: {
|
|
2876
|
+
variant,
|
|
2877
|
+
itemLayout,
|
|
2878
|
+
activeIndicatorTransition,
|
|
2879
|
+
itemClassName
|
|
2880
|
+
},
|
|
2869
2881
|
children: /* @__PURE__ */ jsx(
|
|
2870
2882
|
m.nav,
|
|
2871
2883
|
{
|
|
@@ -4629,12 +4641,39 @@ var ProgressIndicator = React36.forwardRef((props, ref) => {
|
|
|
4629
4641
|
return /* @__PURE__ */ jsx(LinearProgress, __spreadValues({ ref }, props));
|
|
4630
4642
|
});
|
|
4631
4643
|
ProgressIndicator.displayName = "ProgressIndicator";
|
|
4632
|
-
var
|
|
4633
|
-
xs: "h-8
|
|
4634
|
-
sm: "h-10
|
|
4635
|
-
md: "h-14
|
|
4636
|
-
lg: "h-24
|
|
4637
|
-
xl: "h-[8.5rem]
|
|
4644
|
+
var SIZE_HEIGHT_STYLES = {
|
|
4645
|
+
xs: "h-8",
|
|
4646
|
+
sm: "h-10",
|
|
4647
|
+
md: "h-14",
|
|
4648
|
+
lg: "h-24",
|
|
4649
|
+
xl: "h-[8.5rem]"
|
|
4650
|
+
};
|
|
4651
|
+
var WIDTH_SIZE_STYLES = {
|
|
4652
|
+
xs: {
|
|
4653
|
+
default: "w-8",
|
|
4654
|
+
narrow: "w-8",
|
|
4655
|
+
wide: "w-12"
|
|
4656
|
+
},
|
|
4657
|
+
sm: {
|
|
4658
|
+
default: "w-10",
|
|
4659
|
+
narrow: "w-12",
|
|
4660
|
+
wide: "w-[3.25rem]"
|
|
4661
|
+
},
|
|
4662
|
+
md: {
|
|
4663
|
+
default: "w-14",
|
|
4664
|
+
narrow: "w-12",
|
|
4665
|
+
wide: "w-[4.5rem]"
|
|
4666
|
+
},
|
|
4667
|
+
lg: {
|
|
4668
|
+
default: "w-24",
|
|
4669
|
+
narrow: "w-16",
|
|
4670
|
+
wide: "w-32"
|
|
4671
|
+
},
|
|
4672
|
+
xl: {
|
|
4673
|
+
default: "w-[8.5rem]",
|
|
4674
|
+
narrow: "w-[6.5rem]",
|
|
4675
|
+
wide: "w-[11.5rem]"
|
|
4676
|
+
}
|
|
4638
4677
|
};
|
|
4639
4678
|
var SIZE_ICON = {
|
|
4640
4679
|
xs: { cls: "size-5", px: 20 },
|
|
@@ -4735,8 +4774,10 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4735
4774
|
variant = "default",
|
|
4736
4775
|
colorStyle = "standard",
|
|
4737
4776
|
size = "sm",
|
|
4777
|
+
widthVariant = "default",
|
|
4738
4778
|
shape = "round",
|
|
4739
4779
|
selected,
|
|
4780
|
+
selectedIcon,
|
|
4740
4781
|
loading = false,
|
|
4741
4782
|
loadingVariant = "loading-indicator",
|
|
4742
4783
|
iconSize,
|
|
@@ -4751,8 +4792,10 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4751
4792
|
"variant",
|
|
4752
4793
|
"colorStyle",
|
|
4753
4794
|
"size",
|
|
4795
|
+
"widthVariant",
|
|
4754
4796
|
"shape",
|
|
4755
4797
|
"selected",
|
|
4798
|
+
"selectedIcon",
|
|
4756
4799
|
"loading",
|
|
4757
4800
|
"loadingVariant",
|
|
4758
4801
|
"iconSize",
|
|
@@ -4762,7 +4805,7 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4762
4805
|
"onKeyDown",
|
|
4763
4806
|
"aria-label"
|
|
4764
4807
|
]);
|
|
4765
|
-
var _a2, _b2;
|
|
4808
|
+
var _a2, _b2, _c, _d, _e;
|
|
4766
4809
|
const isToggle = variant === "toggle";
|
|
4767
4810
|
const isSelected = isToggle && !!selected;
|
|
4768
4811
|
const resolvedColorClass = React36.useMemo(
|
|
@@ -4793,6 +4836,8 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4793
4836
|
const defaultIconPx = sizeIcon.px;
|
|
4794
4837
|
const iconPx = iconSize != null ? iconSize : defaultIconPx;
|
|
4795
4838
|
const isCustomSize = iconSize != null && iconSize !== "inherit";
|
|
4839
|
+
const heightClass = (_c = SIZE_HEIGHT_STYLES[size]) != null ? _c : SIZE_HEIGHT_STYLES.sm;
|
|
4840
|
+
const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[widthVariant]) != null ? _e : WIDTH_SIZE_STYLES.sm.default;
|
|
4796
4841
|
const needsTouchTarget = size === "xs" || size === "sm";
|
|
4797
4842
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
4798
4843
|
disabled: loading
|
|
@@ -4855,7 +4900,7 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4855
4900
|
transition: SPRING_TRANSITION,
|
|
4856
4901
|
"aria-hidden": "true",
|
|
4857
4902
|
className: cn(
|
|
4858
|
-
"flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]
|
|
4903
|
+
"flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]",
|
|
4859
4904
|
iconSize != null ? void 0 : iconClass
|
|
4860
4905
|
),
|
|
4861
4906
|
style: {
|
|
@@ -4863,9 +4908,9 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4863
4908
|
width: isCustomSize ? `${iconSize}px` : void 0,
|
|
4864
4909
|
height: isCustomSize ? `${iconSize}px` : void 0
|
|
4865
4910
|
},
|
|
4866
|
-
children: asChild ? React36.Children.only(children).props.children : children
|
|
4911
|
+
children: isSelected && selectedIcon ? selectedIcon : asChild ? React36.Children.only(children).props.children : children
|
|
4867
4912
|
}),
|
|
4868
|
-
"content"
|
|
4913
|
+
isSelected && selectedIcon ? "selected-content" : "content"
|
|
4869
4914
|
) })
|
|
4870
4915
|
] });
|
|
4871
4916
|
const containerClassName = cn(
|
|
@@ -4874,7 +4919,8 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4874
4919
|
outlineWidthClass,
|
|
4875
4920
|
disabledBgClass,
|
|
4876
4921
|
"overflow-hidden",
|
|
4877
|
-
|
|
4922
|
+
heightClass,
|
|
4923
|
+
widthClass,
|
|
4878
4924
|
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
4879
4925
|
className
|
|
4880
4926
|
);
|
|
@@ -4891,7 +4937,9 @@ var IconButtonComponent = React36.forwardRef(
|
|
|
4891
4937
|
onClick: handleClick,
|
|
4892
4938
|
onPointerDown,
|
|
4893
4939
|
onKeyDown: handleKeyDown,
|
|
4894
|
-
style: __spreadProps(__spreadValues({}, style), {
|
|
4940
|
+
style: __spreadProps(__spreadValues({}, style), {
|
|
4941
|
+
borderRadius: `${animateRadius}px`
|
|
4942
|
+
}),
|
|
4895
4943
|
className: containerClassName
|
|
4896
4944
|
}, restProps), {
|
|
4897
4945
|
children: React36.cloneElement(child, { children: innerContent })
|
|
@@ -6340,7 +6388,9 @@ var FloatingToolbarBase = React36.forwardRef(
|
|
|
6340
6388
|
isHorizontal ? "flex-row h-full" : "flex-col w-full",
|
|
6341
6389
|
isStringPadding ? contentPadding : isHorizontal ? "px-2" : "py-2"
|
|
6342
6390
|
),
|
|
6343
|
-
style: __spreadValues({
|
|
6391
|
+
style: __spreadValues({
|
|
6392
|
+
gap: itemGap
|
|
6393
|
+
}, isStringPadding ? {} : contentPadding),
|
|
6344
6394
|
children: [
|
|
6345
6395
|
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: expanded && startContent && /* @__PURE__ */ jsx(
|
|
6346
6396
|
m.div,
|