@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.d.cts
CHANGED
|
@@ -992,7 +992,8 @@ interface InputProps extends InputOptionProps, Omit<InputHTMLAttributes<HTMLInpu
|
|
|
992
992
|
interface InputOptionProps extends ErrorProps {
|
|
993
993
|
width?: string;
|
|
994
994
|
maxLength?: number;
|
|
995
|
-
borderRadius?:
|
|
995
|
+
borderRadius?: BorderRadiusTokens;
|
|
996
|
+
customNumberInputHeight?: string;
|
|
996
997
|
onClear?: () => void;
|
|
997
998
|
}
|
|
998
999
|
|
package/dist/index.d.ts
CHANGED
|
@@ -992,7 +992,8 @@ interface InputProps extends InputOptionProps, Omit<InputHTMLAttributes<HTMLInpu
|
|
|
992
992
|
interface InputOptionProps extends ErrorProps {
|
|
993
993
|
width?: string;
|
|
994
994
|
maxLength?: number;
|
|
995
|
-
borderRadius?:
|
|
995
|
+
borderRadius?: BorderRadiusTokens;
|
|
996
|
+
customNumberInputHeight?: string;
|
|
996
997
|
onClear?: () => void;
|
|
997
998
|
}
|
|
998
999
|
|
package/dist/index.js
CHANGED
|
@@ -2050,12 +2050,14 @@ var getStyleByType = ({
|
|
|
2050
2050
|
width,
|
|
2051
2051
|
minWidth,
|
|
2052
2052
|
maxWidth,
|
|
2053
|
-
borderRadius
|
|
2053
|
+
borderRadius,
|
|
2054
|
+
customNumberInputHeight
|
|
2054
2055
|
}) => {
|
|
2055
2056
|
if (type === "number") {
|
|
2056
2057
|
return css`
|
|
2057
2058
|
width: ${width || "64px"};
|
|
2058
|
-
height: ${
|
|
2059
|
+
height: ${customNumberInputHeight || "32px"};
|
|
2060
|
+
border-radius: ${borderRadius ? borderRadiusTokens[borderRadius] : "6px"};
|
|
2059
2061
|
`;
|
|
2060
2062
|
}
|
|
2061
2063
|
return css`
|
|
@@ -2065,7 +2067,7 @@ var getStyleByType = ({
|
|
|
2065
2067
|
height: ${height || "initial"};
|
|
2066
2068
|
min-height: ${minHeight || "initial"};
|
|
2067
2069
|
max-height: ${maxHeight || "initial"};
|
|
2068
|
-
border-radius: ${borderRadius
|
|
2070
|
+
border-radius: ${borderRadius ? borderRadiusTokens[borderRadius] : "6px"};
|
|
2069
2071
|
`;
|
|
2070
2072
|
};
|
|
2071
2073
|
var InputWrapper = styled6.label`
|
|
@@ -2074,7 +2076,17 @@ var InputWrapper = styled6.label`
|
|
|
2074
2076
|
align-items: center;
|
|
2075
2077
|
border-radius: 6px;
|
|
2076
2078
|
flex-direction: ${({ direction }) => direction || "row"};
|
|
2077
|
-
${({ type, height, minHeight, maxHeight, width, maxWidth, minWidth, borderRadius }) => getStyleByType({
|
|
2079
|
+
${({ type, height, minHeight, maxHeight, width, maxWidth, minWidth, borderRadius, customNumberInputHeight }) => getStyleByType({
|
|
2080
|
+
customNumberInputHeight,
|
|
2081
|
+
type,
|
|
2082
|
+
height,
|
|
2083
|
+
minHeight,
|
|
2084
|
+
maxHeight,
|
|
2085
|
+
width,
|
|
2086
|
+
maxWidth,
|
|
2087
|
+
minWidth,
|
|
2088
|
+
borderRadius
|
|
2089
|
+
})};
|
|
2078
2090
|
justify-content: space-between;
|
|
2079
2091
|
gap: 8px;
|
|
2080
2092
|
border: 1px solid ${(props) => getBorderColorByStatus(props)};
|
|
@@ -3067,7 +3079,8 @@ var Input = forwardRef(
|
|
|
3067
3079
|
max,
|
|
3068
3080
|
className,
|
|
3069
3081
|
width,
|
|
3070
|
-
borderRadius
|
|
3082
|
+
borderRadius,
|
|
3083
|
+
customNumberInputHeight
|
|
3071
3084
|
} = _b, rest = __objRest(_b, [
|
|
3072
3085
|
"onFocus",
|
|
3073
3086
|
"onBlur",
|
|
@@ -3083,7 +3096,8 @@ var Input = forwardRef(
|
|
|
3083
3096
|
"max",
|
|
3084
3097
|
"className",
|
|
3085
3098
|
"width",
|
|
3086
|
-
"borderRadius"
|
|
3099
|
+
"borderRadius",
|
|
3100
|
+
"customNumberInputHeight"
|
|
3087
3101
|
]);
|
|
3088
3102
|
const [text, setText] = useState("");
|
|
3089
3103
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -3183,6 +3197,7 @@ var Input = forwardRef(
|
|
|
3183
3197
|
maxHeight: "40px",
|
|
3184
3198
|
"data-shoplflow": "input",
|
|
3185
3199
|
borderRadius,
|
|
3200
|
+
customNumberInputHeight,
|
|
3186
3201
|
children: [
|
|
3187
3202
|
/* @__PURE__ */ jsx(
|
|
3188
3203
|
StyledInput,
|