@umami/react-zen 0.248.0 → 0.249.0

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/dist/index.d.mts CHANGED
@@ -666,7 +666,7 @@ interface ButtonRenderProps {
666
666
  children: ReactNode;
667
667
  [key: string]: unknown;
668
668
  }
669
- declare function Button({ variant, size, render, preventFocusOnPress: _preventFocusOnPress, isDisabled, disabled, onPress, onClick, className, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
669
+ declare function Button({ variant, size, render, preventFocusOnPress: _preventFocusOnPress, nativeButton, isDisabled, disabled, onPress, onClick, className, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
670
670
 
671
671
  interface SeparatorProps extends Separator$1.Props {
672
672
  orientation?: 'horizontal' | 'vertical';
package/dist/index.d.ts CHANGED
@@ -666,7 +666,7 @@ interface ButtonRenderProps {
666
666
  children: ReactNode;
667
667
  [key: string]: unknown;
668
668
  }
669
- declare function Button({ variant, size, render, preventFocusOnPress: _preventFocusOnPress, isDisabled, disabled, onPress, onClick, className, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
669
+ declare function Button({ variant, size, render, preventFocusOnPress: _preventFocusOnPress, nativeButton, isDisabled, disabled, onPress, onClick, className, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
670
670
 
671
671
  interface SeparatorProps extends Separator$1.Props {
672
672
  orientation?: 'horizontal' | 'vertical';
package/dist/index.js CHANGED
@@ -2268,7 +2268,8 @@ var button = tailwindVariants.tv({
2268
2268
  default: [
2269
2269
  "bg-interactive text-foreground-primary",
2270
2270
  "hover:bg-interactive-hover",
2271
- "pressed:bg-interactive-pressed"
2271
+ "pressed:bg-interactive-pressed",
2272
+ "disabled:text-foreground-disabled"
2272
2273
  ],
2273
2274
  primary: [
2274
2275
  "bg-primary text-primary-foreground",
@@ -2280,16 +2281,26 @@ var button = tailwindVariants.tv({
2280
2281
  "bg-surface-base border-edge shadow-sm text-foreground-primary",
2281
2282
  "hover:border-edge-strong",
2282
2283
  "pressed:bg-surface-raised",
2283
- "disabled:bg-surface-disabled"
2284
+ "disabled:bg-surface-disabled disabled:text-foreground-disabled"
2285
+ ],
2286
+ quiet: [
2287
+ "bg-transparent",
2288
+ "hover:bg-interactive",
2289
+ "pressed:bg-interactive-hover",
2290
+ "disabled:text-foreground-disabled"
2284
2291
  ],
2285
- quiet: ["bg-transparent", "hover:bg-interactive", "pressed:bg-interactive-hover"],
2286
2292
  danger: [
2287
2293
  "bg-status-error text-white",
2288
2294
  "hover:opacity-90",
2289
2295
  "pressed:opacity-80",
2290
2296
  "disabled:opacity-50"
2291
2297
  ],
2292
- zero: ["bg-transparent border-0", "hover:bg-transparent", "pressed:bg-transparent"]
2298
+ zero: [
2299
+ "bg-transparent border-0",
2300
+ "hover:bg-transparent",
2301
+ "pressed:bg-transparent",
2302
+ "disabled:text-foreground-disabled"
2303
+ ]
2293
2304
  },
2294
2305
  size: {
2295
2306
  xs: "text-sm py-1 px-2",
@@ -2694,6 +2705,7 @@ function Button({
2694
2705
  size = "md",
2695
2706
  render,
2696
2707
  preventFocusOnPress: _preventFocusOnPress = true,
2708
+ nativeButton,
2697
2709
  isDisabled,
2698
2710
  disabled,
2699
2711
  onPress,
@@ -2703,6 +2715,7 @@ function Button({
2703
2715
  ...props
2704
2716
  }) {
2705
2717
  const buttonClassName = button({ variant, size, className });
2718
+ const isNativeButton = nativeButton ?? (render === void 0 || react.isValidElement(render) && render.type === "button");
2706
2719
  const handleClick = (event) => {
2707
2720
  onClick?.(event);
2708
2721
  if (!event.defaultPrevented) {
@@ -2715,6 +2728,7 @@ function Button({
2715
2728
  ...props,
2716
2729
  "data-slot": "button",
2717
2730
  render,
2731
+ nativeButton: isNativeButton,
2718
2732
  disabled: isDisabled ?? disabled,
2719
2733
  className: buttonClassName,
2720
2734
  onClick: handleClick,
@@ -3226,7 +3240,7 @@ function Breadcrumb({ children, className, isDisabled, ...props }) {
3226
3240
  "aria-disabled": isDisabled || void 0,
3227
3241
  className: cn(
3228
3242
  "flex items-center text-base gap-3 list-none",
3229
- "[&_a]:text-foreground-muted [&_a]:no-underline [&_a]:font-normal [&_a]:p-2",
3243
+ "[&_a]:text-foreground-muted [&_a]:no-underline [&_a]:font-normal",
3230
3244
  "[&_a:hover]:text-foreground-primary",
3231
3245
  "last:[&>span]:hidden",
3232
3246
  className
@@ -5787,7 +5801,8 @@ function Menu({
5787
5801
  return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
5788
5802
  menu.Menu.Positioner,
5789
5803
  {
5790
- ...inMenubar ? { align: "start", sideOffset: 8 } : {},
5804
+ sideOffset: 4,
5805
+ ...inMenubar ? { align: "start" } : {},
5791
5806
  className: "zen-layer-floating",
5792
5807
  children: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Popup, { ...props, className: cn("zen-popover", popupClassName2), children: popupContent })
5793
5808
  }
@@ -5951,10 +5966,7 @@ function Menubar({ isDisabled, className, children, ...props }) {
5951
5966
  {
5952
5967
  ...props,
5953
5968
  disabled: isDisabled,
5954
- className: cn(
5955
- "flex items-center gap-1 p-1 rounded-md border border-edge bg-surface-base shadow-sm w-fit",
5956
- className
5957
- ),
5969
+ className: cn("flex items-center gap-1 w-fit", className),
5958
5970
  children
5959
5971
  }
5960
5972
  );