@ai-matrx/design-system 0.20.22 → 0.21.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.
@@ -78,13 +78,28 @@ var buttonVariants = cva(
78
78
  }
79
79
  }
80
80
  );
81
+ var TOUCH_FLOOR_SIZES = /* @__PURE__ */ new Set([
82
+ "xs",
83
+ "sm",
84
+ "default",
85
+ "md",
86
+ "lg",
87
+ "icon",
88
+ "icon-sm",
89
+ "roundIcon"
90
+ ]);
91
+ var SQUARE_SIZES = /* @__PURE__ */ new Set(["icon", "icon-sm", "roundIcon"]);
81
92
  var Button = React.forwardRef(
82
93
  ({ className, variant, size, asChild = false, ...props }, ref) => {
83
94
  const Component = asChild ? Slot : "button";
95
+ const resolvedSize = size ?? "default";
84
96
  return /* @__PURE__ */ jsx(
85
97
  Component,
86
98
  {
87
99
  className: cn(buttonVariants({ variant, size, className })),
100
+ "data-matrx-button": "",
101
+ "data-tap-floor": TOUCH_FLOOR_SIZES.has(resolvedSize) ? "" : void 0,
102
+ "data-tap-floor-square": SQUARE_SIZES.has(resolvedSize) ? "" : void 0,
88
103
  ref,
89
104
  ...props
90
105
  }