@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.cjs CHANGED
@@ -63,19 +63,17 @@ const roundedLabelClass = {
63
63
  lg: "rounded-lg",
64
64
  xl: "rounded-lg"
65
65
  };
66
+ const heightClass = {
67
+ xs: "h-[26px]",
68
+ sm: "h-[28px]",
69
+ md: "h-8",
70
+ // 32px
71
+ lg: "h-9",
72
+ // 36px
73
+ xl: "h-10"
74
+ // 40px
75
+ };
66
76
  function getPaddingClasses(size, hasLeft, hasRight) {
67
- const pyMap = {
68
- xs: "py-1",
69
- // 4px
70
- sm: "py-1",
71
- // 4px
72
- md: "py-1.5",
73
- // 6px
74
- lg: "py-2",
75
- // 8px
76
- xl: "py-2.5"
77
- // 10px
78
- };
79
77
  const pxMap = {
80
78
  xs: { l: "pl-1.5", r: "pr-1.5" },
81
79
  // 6px
@@ -97,8 +95,7 @@ function getPaddingClasses(size, hasLeft, hasRight) {
97
95
  };
98
96
  return [
99
97
  hasLeft ? reducedMap[size].l : pxMap[size].l,
100
- hasRight ? reducedMap[size].r : pxMap[size].r,
101
- pyMap[size]
98
+ hasRight ? reducedMap[size].r : pxMap[size].r
102
99
  ];
103
100
  }
104
101
  const iconSizeSpec = {
@@ -112,17 +109,17 @@ function getVariantClasses(variant, isDisabled) {
112
109
  if (isDisabled) {
113
110
  if (variant === "outline" || variant === "outline-black")
114
111
  return "bg-disabled-bg text-disabled border border-border-disabled cursor-not-allowed";
115
- return "bg-disabled-bg text-disabled cursor-not-allowed";
112
+ return "bg-disabled-bg text-disabled border border-transparent cursor-not-allowed";
116
113
  }
117
114
  if (variant === "outline")
118
115
  return "bg-background text-primary-action border border-border hover:bg-hover-bg active:bg-disabled-bg";
119
116
  if (variant === "plain")
120
- return "bg-transparent text-primary-action hover:bg-hover-bg active:bg-disabled-bg";
117
+ return "bg-transparent text-primary-action border border-transparent hover:bg-hover-bg active:bg-disabled-bg";
121
118
  if (variant === "outline-black")
122
119
  return "bg-background text-foreground border border-border hover:bg-hover-bg";
123
120
  if (variant === "plain-black")
124
- return "bg-transparent text-foreground hover:bg-hover-bg";
125
- return "bg-primary-action text-on-primary-action hover:bg-primary-action-hover active:bg-primary-action-active";
121
+ return "bg-transparent text-foreground border border-transparent hover:bg-hover-bg";
122
+ return "bg-primary-action text-on-primary-action border border-transparent hover:bg-primary-action-hover active:bg-primary-action-active";
126
123
  }
127
124
  const Button = React.forwardRef(function Button2({
128
125
  size = "md",
@@ -204,9 +201,9 @@ const Button = React.forwardRef(function Button2({
204
201
  className: cn(
205
202
  baseClasses,
206
203
  roundedLabelClass[labelSize],
204
+ heightClass[labelSize],
207
205
  paddingParts[0],
208
206
  paddingParts[1],
209
- paddingParts[2],
210
207
  hasLeft || hasRight ? gapClass[labelSize] : void 0,
211
208
  variantClasses,
212
209
  cursorClass,