@shoplflow/base 0.24.21 → 0.24.24
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 +33 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +33 -13
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -546,6 +546,7 @@ var setEllipsis = (maxLines) => {
|
|
|
546
546
|
-webkit-line-clamp: ${maxLines};
|
|
547
547
|
-webkit-box-orient: vertical;
|
|
548
548
|
overflow: hidden;
|
|
549
|
+
word-break: break-all;
|
|
549
550
|
text-overflow: ellipsis;
|
|
550
551
|
`;
|
|
551
552
|
};
|
|
@@ -1398,7 +1399,8 @@ var Button = React2.forwardRef(
|
|
|
1398
1399
|
as,
|
|
1399
1400
|
children,
|
|
1400
1401
|
leftSource,
|
|
1401
|
-
rightSource
|
|
1402
|
+
rightSource,
|
|
1403
|
+
lineClamp
|
|
1402
1404
|
} = _b, rest = __objRest(_b, [
|
|
1403
1405
|
"styleVar",
|
|
1404
1406
|
"sizeVar",
|
|
@@ -1407,7 +1409,8 @@ var Button = React2.forwardRef(
|
|
|
1407
1409
|
"as",
|
|
1408
1410
|
"children",
|
|
1409
1411
|
"leftSource",
|
|
1410
|
-
"rightSource"
|
|
1412
|
+
"rightSource",
|
|
1413
|
+
"lineClamp"
|
|
1411
1414
|
]);
|
|
1412
1415
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1413
1416
|
StyledButton,
|
|
@@ -1426,8 +1429,7 @@ var Button = React2.forwardRef(
|
|
|
1426
1429
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1427
1430
|
exports.Text,
|
|
1428
1431
|
{
|
|
1429
|
-
|
|
1430
|
-
whiteSpace: "nowrap",
|
|
1432
|
+
lineClamp,
|
|
1431
1433
|
color: styleVar === "PRIMARY" ? "neutral0" : "neutral700",
|
|
1432
1434
|
typography: sizeVar === "M" ? "body1_400" : "body2_400",
|
|
1433
1435
|
children
|
|
@@ -1860,11 +1862,24 @@ var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled }) => {
|
|
|
1860
1862
|
var InputWrapper = styled5__default.default.label`
|
|
1861
1863
|
display: flex;
|
|
1862
1864
|
align-items: center;
|
|
1863
|
-
width: ${({ width }) =>
|
|
1864
|
-
|
|
1865
|
+
width: ${({ width }) => {
|
|
1866
|
+
var _a;
|
|
1867
|
+
return (_a = `calc(${width} - 2px)`) != null ? _a : "calc(100% - 2px)";
|
|
1868
|
+
}};
|
|
1869
|
+
min-width: ${({ minWidth }) => {
|
|
1870
|
+
var _a;
|
|
1871
|
+
return (_a = `calc(${minWidth} - 2px)`) != null ? _a : "fit-content";
|
|
1872
|
+
}};
|
|
1873
|
+
height: ${({ height }) => {
|
|
1874
|
+
var _a;
|
|
1875
|
+
return (_a = `calc(${height} - 2px)`) != null ? _a : "fit-content";
|
|
1876
|
+
}};
|
|
1865
1877
|
flex-direction: ${({ direction }) => direction || "row"};
|
|
1866
1878
|
justify-content: space-between;
|
|
1867
|
-
min-height: ${({
|
|
1879
|
+
min-height: ${({ minHeight }) => {
|
|
1880
|
+
var _a;
|
|
1881
|
+
return (_a = `calc(${minHeight} - 2px)`) != null ? _a : "fit-content";
|
|
1882
|
+
}};
|
|
1868
1883
|
margin: 1px;
|
|
1869
1884
|
gap: 8px;
|
|
1870
1885
|
box-shadow: 0 0 0 1px ${(props) => getBorderColorByStatus(props)};
|
|
@@ -1919,7 +1934,7 @@ var Icon = React2.forwardRef((_a, ref) => {
|
|
|
1919
1934
|
exports.Icon = Icon;
|
|
1920
1935
|
var DropdownButton = React2.forwardRef(
|
|
1921
1936
|
(_a, ref) => {
|
|
1922
|
-
var _b = _a, { width, onClick, sizeVar = "M", placeholder, value, disabled, leftSource } = _b, rest = __objRest(_b, ["width", "onClick", "sizeVar", "placeholder", "value", "disabled", "leftSource"]);
|
|
1937
|
+
var _b = _a, { width = "100%", onClick, sizeVar = "M", isError, placeholder, value, disabled, leftSource } = _b, rest = __objRest(_b, ["width", "onClick", "sizeVar", "isError", "placeholder", "value", "disabled", "leftSource"]);
|
|
1923
1938
|
const { isOpen, setIsOpen } = useDropdown();
|
|
1924
1939
|
const [isHovered, setIsHovered] = React2.useState(false);
|
|
1925
1940
|
const handleOnClick = (e) => {
|
|
@@ -1943,6 +1958,7 @@ var DropdownButton = React2.forwardRef(
|
|
|
1943
1958
|
isHovered,
|
|
1944
1959
|
disabled,
|
|
1945
1960
|
width,
|
|
1961
|
+
isError,
|
|
1946
1962
|
height: exports.getDropdownHeightBySizeVar(sizeVar),
|
|
1947
1963
|
children: /* @__PURE__ */ jsxRuntime.jsxs(exports.StyledDropdownButton, __spreadProps(__spreadValues({ ref, onClick: handleOnClick, disabled }, rest), { sizeVar, children: [
|
|
1948
1964
|
leftSource && leftSource,
|
|
@@ -2666,7 +2682,7 @@ var Input = React2.forwardRef(
|
|
|
2666
2682
|
min,
|
|
2667
2683
|
max,
|
|
2668
2684
|
className,
|
|
2669
|
-
width
|
|
2685
|
+
width = "100%"
|
|
2670
2686
|
} = _b, rest = __objRest(_b, [
|
|
2671
2687
|
"onFocus",
|
|
2672
2688
|
"onBlur",
|
|
@@ -2792,6 +2808,7 @@ var Input = React2.forwardRef(
|
|
|
2792
2808
|
onMouseEnter: handleOnMouseEnter,
|
|
2793
2809
|
onMouseLeave: handleOnMouseLeave,
|
|
2794
2810
|
width: getWidth(),
|
|
2811
|
+
height: type === "number" ? "32px" : "40px",
|
|
2795
2812
|
"data-shoplflow": "input",
|
|
2796
2813
|
children: [
|
|
2797
2814
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2936,7 +2953,7 @@ var StyledTextarea = styled5__default.default.textarea`
|
|
|
2936
2953
|
background-color: transparent;
|
|
2937
2954
|
resize: none;
|
|
2938
2955
|
width: 100%;
|
|
2939
|
-
height:
|
|
2956
|
+
height: 100%;
|
|
2940
2957
|
flex: 1;
|
|
2941
2958
|
word-break: break-all;
|
|
2942
2959
|
${({ disabled }) => getDisabledStyle(disabled)};
|
|
@@ -2957,8 +2974,9 @@ var TextArea = React2.forwardRef(
|
|
|
2957
2974
|
defaultValue,
|
|
2958
2975
|
onBlur,
|
|
2959
2976
|
onFocus,
|
|
2960
|
-
minHeight =
|
|
2977
|
+
minHeight = "100px",
|
|
2961
2978
|
width,
|
|
2979
|
+
height,
|
|
2962
2980
|
className
|
|
2963
2981
|
} = _b, rest = __objRest(_b, [
|
|
2964
2982
|
"name",
|
|
@@ -2973,6 +2991,7 @@ var TextArea = React2.forwardRef(
|
|
|
2973
2991
|
"onFocus",
|
|
2974
2992
|
"minHeight",
|
|
2975
2993
|
"width",
|
|
2994
|
+
"height",
|
|
2976
2995
|
"className"
|
|
2977
2996
|
]);
|
|
2978
2997
|
const [text, setText] = React2.useState("");
|
|
@@ -3032,6 +3051,8 @@ var TextArea = React2.forwardRef(
|
|
|
3032
3051
|
direction: "column",
|
|
3033
3052
|
onMouseEnter: handleOnMouseEnter,
|
|
3034
3053
|
onMouseLeave: handleOnMouseLeave,
|
|
3054
|
+
height,
|
|
3055
|
+
minHeight,
|
|
3035
3056
|
width,
|
|
3036
3057
|
"data-shoplflow": "text-area",
|
|
3037
3058
|
children: [
|
|
@@ -3048,8 +3069,7 @@ var TextArea = React2.forwardRef(
|
|
|
3048
3069
|
value,
|
|
3049
3070
|
ref,
|
|
3050
3071
|
maxLength,
|
|
3051
|
-
disabled
|
|
3052
|
-
minHeight
|
|
3072
|
+
disabled
|
|
3053
3073
|
}, rest)
|
|
3054
3074
|
),
|
|
3055
3075
|
/* @__PURE__ */ jsxRuntime.jsx(BottomElementWrapper, { children: maxLength && /* @__PURE__ */ jsxRuntime.jsx(TextCounter_default, { currentLength: String(text).length, maxLength }) })
|