@drawbridge/components 0.0.50 → 0.0.51
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/advertisement.js
CHANGED
package/dist/advertisement.mjs
CHANGED
package/dist/input-number.js
CHANGED
|
@@ -111,11 +111,12 @@ var InputNumber = ({
|
|
|
111
111
|
value,
|
|
112
112
|
...rest
|
|
113
113
|
}) => {
|
|
114
|
-
const classes = [(inline ? "inline-flex items-center rounded-sm" : "input p-0 flex items-center") + "
|
|
114
|
+
const classes = [(inline ? "inline-flex items-center rounded-sm" : "input p-0 flex items-center") + " overflow-hidden"];
|
|
115
115
|
if (className) {
|
|
116
116
|
classes.push(className);
|
|
117
117
|
}
|
|
118
118
|
;
|
|
119
|
+
const dividerBorder = "1px solid " + inputStyle(style).borderColor;
|
|
119
120
|
const increment = (0, import_react.useCallback)(
|
|
120
121
|
() => {
|
|
121
122
|
const newValue = Number(value || 0) + 1;
|
|
@@ -139,7 +140,10 @@ var InputNumber = ({
|
|
|
139
140
|
"aria-label": "decrement",
|
|
140
141
|
type: "button",
|
|
141
142
|
onClick: decrement,
|
|
142
|
-
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0"
|
|
143
|
+
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0",
|
|
144
|
+
// split: decrement is leftmost, so its divider is on the right (before
|
|
145
|
+
// the input); after: it follows the input, so the divider is on its left.
|
|
146
|
+
style: layout === "split" ? { borderRight: dividerBorder } : { borderLeft: dividerBorder }
|
|
143
147
|
},
|
|
144
148
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
145
149
|
"span",
|
|
@@ -166,7 +170,9 @@ var InputNumber = ({
|
|
|
166
170
|
"aria-label": "increment",
|
|
167
171
|
type: "button",
|
|
168
172
|
onClick: increment,
|
|
169
|
-
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0"
|
|
173
|
+
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0",
|
|
174
|
+
// increment is always rightmost, so its divider is always on its left.
|
|
175
|
+
style: { borderLeft: dividerBorder }
|
|
170
176
|
},
|
|
171
177
|
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
172
178
|
"span",
|
package/dist/input-number.mjs
CHANGED
|
@@ -23,11 +23,12 @@ var InputNumber = ({
|
|
|
23
23
|
value,
|
|
24
24
|
...rest
|
|
25
25
|
}) => {
|
|
26
|
-
const classes = [(inline ? "inline-flex items-center rounded-sm" : "input p-0 flex items-center") + "
|
|
26
|
+
const classes = [(inline ? "inline-flex items-center rounded-sm" : "input p-0 flex items-center") + " overflow-hidden"];
|
|
27
27
|
if (className) {
|
|
28
28
|
classes.push(className);
|
|
29
29
|
}
|
|
30
30
|
;
|
|
31
|
+
const dividerBorder = "1px solid " + inputStyle(style).borderColor;
|
|
31
32
|
const increment = useCallback(
|
|
32
33
|
() => {
|
|
33
34
|
const newValue = Number(value || 0) + 1;
|
|
@@ -51,7 +52,10 @@ var InputNumber = ({
|
|
|
51
52
|
"aria-label": "decrement",
|
|
52
53
|
type: "button",
|
|
53
54
|
onClick: decrement,
|
|
54
|
-
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0"
|
|
55
|
+
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0",
|
|
56
|
+
// split: decrement is leftmost, so its divider is on the right (before
|
|
57
|
+
// the input); after: it follows the input, so the divider is on its left.
|
|
58
|
+
style: layout === "split" ? { borderRight: dividerBorder } : { borderLeft: dividerBorder }
|
|
55
59
|
},
|
|
56
60
|
children: /* @__PURE__ */ jsx(
|
|
57
61
|
"span",
|
|
@@ -78,7 +82,9 @@ var InputNumber = ({
|
|
|
78
82
|
"aria-label": "increment",
|
|
79
83
|
type: "button",
|
|
80
84
|
onClick: increment,
|
|
81
|
-
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0"
|
|
85
|
+
className: (small ? "h-[34px] w-[34px]" : "h-[42px] w-[42px]") + " flex justify-center items-center text-inherit shrink-0 grow-0",
|
|
86
|
+
// increment is always rightmost, so its divider is always on its left.
|
|
87
|
+
style: { borderLeft: dividerBorder }
|
|
82
88
|
},
|
|
83
89
|
children: /* @__PURE__ */ jsx(
|
|
84
90
|
"span",
|
package/dist/product.js
CHANGED
package/dist/product.mjs
CHANGED