@sarunyu/system-one 4.9.5 → 4.9.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.
package/dist/index.js CHANGED
@@ -44,19 +44,17 @@ const roundedLabelClass = {
44
44
  lg: "rounded-lg",
45
45
  xl: "rounded-lg"
46
46
  };
47
+ const heightClass = {
48
+ xs: "h-[26px]",
49
+ sm: "h-[28px]",
50
+ md: "h-8",
51
+ // 32px
52
+ lg: "h-9",
53
+ // 36px
54
+ xl: "h-10"
55
+ // 40px
56
+ };
47
57
  function getPaddingClasses(size, hasLeft, hasRight) {
48
- const pyMap = {
49
- xs: "py-1",
50
- // 4px
51
- sm: "py-1",
52
- // 4px
53
- md: "py-1.5",
54
- // 6px
55
- lg: "py-2",
56
- // 8px
57
- xl: "py-2.5"
58
- // 10px
59
- };
60
58
  const pxMap = {
61
59
  xs: { l: "pl-1.5", r: "pr-1.5" },
62
60
  // 6px
@@ -78,8 +76,7 @@ function getPaddingClasses(size, hasLeft, hasRight) {
78
76
  };
79
77
  return [
80
78
  hasLeft ? reducedMap[size].l : pxMap[size].l,
81
- hasRight ? reducedMap[size].r : pxMap[size].r,
82
- pyMap[size]
79
+ hasRight ? reducedMap[size].r : pxMap[size].r
83
80
  ];
84
81
  }
85
82
  const iconSizeSpec = {
@@ -93,17 +90,17 @@ function getVariantClasses(variant, isDisabled) {
93
90
  if (isDisabled) {
94
91
  if (variant === "outline" || variant === "outline-black")
95
92
  return "bg-disabled-bg text-disabled border border-border-disabled cursor-not-allowed";
96
- return "bg-disabled-bg text-disabled cursor-not-allowed";
93
+ return "bg-disabled-bg text-disabled border border-transparent cursor-not-allowed";
97
94
  }
98
95
  if (variant === "outline")
99
96
  return "bg-background text-primary-action border border-border hover:bg-hover-bg active:bg-disabled-bg";
100
97
  if (variant === "plain")
101
- return "bg-transparent text-primary-action hover:bg-hover-bg active:bg-disabled-bg";
98
+ return "bg-transparent text-primary-action border border-transparent hover:bg-hover-bg active:bg-disabled-bg";
102
99
  if (variant === "outline-black")
103
100
  return "bg-background text-foreground border border-border hover:bg-hover-bg";
104
101
  if (variant === "plain-black")
105
- return "bg-transparent text-foreground hover:bg-hover-bg";
106
- return "bg-primary-action text-on-primary-action hover:bg-primary-action-hover active:bg-primary-action-active";
102
+ return "bg-transparent text-foreground border border-transparent hover:bg-hover-bg";
103
+ return "bg-primary-action text-on-primary-action border border-transparent hover:bg-primary-action-hover active:bg-primary-action-active";
107
104
  }
108
105
  const Button = forwardRef(function Button2({
109
106
  size = "md",
@@ -185,9 +182,9 @@ const Button = forwardRef(function Button2({
185
182
  className: cn(
186
183
  baseClasses,
187
184
  roundedLabelClass[labelSize],
185
+ heightClass[labelSize],
188
186
  paddingParts[0],
189
187
  paddingParts[1],
190
- paddingParts[2],
191
188
  hasLeft || hasRight ? gapClass[labelSize] : void 0,
192
189
  variantClasses,
193
190
  cursorClass,