@shoplflow/base 0.31.6 → 0.31.7
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 +21 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2075,12 +2075,14 @@ var getStyleByType = ({
|
|
|
2075
2075
|
width,
|
|
2076
2076
|
minWidth,
|
|
2077
2077
|
maxWidth,
|
|
2078
|
-
borderRadius
|
|
2078
|
+
borderRadius,
|
|
2079
|
+
customNumberInputHeight
|
|
2079
2080
|
}) => {
|
|
2080
2081
|
if (type === "number") {
|
|
2081
2082
|
return react$1.css`
|
|
2082
2083
|
width: ${width || "64px"};
|
|
2083
|
-
height: ${
|
|
2084
|
+
height: ${customNumberInputHeight || "32px"};
|
|
2085
|
+
border-radius: ${borderRadius ? exports.borderRadiusTokens[borderRadius] : "6px"};
|
|
2084
2086
|
`;
|
|
2085
2087
|
}
|
|
2086
2088
|
return react$1.css`
|
|
@@ -2090,7 +2092,7 @@ var getStyleByType = ({
|
|
|
2090
2092
|
height: ${height || "initial"};
|
|
2091
2093
|
min-height: ${minHeight || "initial"};
|
|
2092
2094
|
max-height: ${maxHeight || "initial"};
|
|
2093
|
-
border-radius: ${borderRadius
|
|
2095
|
+
border-radius: ${borderRadius ? exports.borderRadiusTokens[borderRadius] : "6px"};
|
|
2094
2096
|
`;
|
|
2095
2097
|
};
|
|
2096
2098
|
var InputWrapper = styled6__default.default.label`
|
|
@@ -2099,7 +2101,17 @@ var InputWrapper = styled6__default.default.label`
|
|
|
2099
2101
|
align-items: center;
|
|
2100
2102
|
border-radius: 6px;
|
|
2101
2103
|
flex-direction: ${({ direction }) => direction || "row"};
|
|
2102
|
-
${({ type, height, minHeight, maxHeight, width, maxWidth, minWidth, borderRadius }) => getStyleByType({
|
|
2104
|
+
${({ type, height, minHeight, maxHeight, width, maxWidth, minWidth, borderRadius, customNumberInputHeight }) => getStyleByType({
|
|
2105
|
+
customNumberInputHeight,
|
|
2106
|
+
type,
|
|
2107
|
+
height,
|
|
2108
|
+
minHeight,
|
|
2109
|
+
maxHeight,
|
|
2110
|
+
width,
|
|
2111
|
+
maxWidth,
|
|
2112
|
+
minWidth,
|
|
2113
|
+
borderRadius
|
|
2114
|
+
})};
|
|
2103
2115
|
justify-content: space-between;
|
|
2104
2116
|
gap: 8px;
|
|
2105
2117
|
border: 1px solid ${(props) => getBorderColorByStatus(props)};
|
|
@@ -3092,7 +3104,8 @@ var Input = React3.forwardRef(
|
|
|
3092
3104
|
max,
|
|
3093
3105
|
className,
|
|
3094
3106
|
width,
|
|
3095
|
-
borderRadius
|
|
3107
|
+
borderRadius,
|
|
3108
|
+
customNumberInputHeight
|
|
3096
3109
|
} = _b, rest = __objRest(_b, [
|
|
3097
3110
|
"onFocus",
|
|
3098
3111
|
"onBlur",
|
|
@@ -3108,7 +3121,8 @@ var Input = React3.forwardRef(
|
|
|
3108
3121
|
"max",
|
|
3109
3122
|
"className",
|
|
3110
3123
|
"width",
|
|
3111
|
-
"borderRadius"
|
|
3124
|
+
"borderRadius",
|
|
3125
|
+
"customNumberInputHeight"
|
|
3112
3126
|
]);
|
|
3113
3127
|
const [text, setText] = React3.useState("");
|
|
3114
3128
|
const [isFocused, setIsFocused] = React3.useState(false);
|
|
@@ -3208,6 +3222,7 @@ var Input = React3.forwardRef(
|
|
|
3208
3222
|
maxHeight: "40px",
|
|
3209
3223
|
"data-shoplflow": "input",
|
|
3210
3224
|
borderRadius,
|
|
3225
|
+
customNumberInputHeight,
|
|
3211
3226
|
children: [
|
|
3212
3227
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3213
3228
|
StyledInput,
|