@shoplflow/base 0.24.21 → 0.24.23

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
@@ -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
- wordBreak: "keep-all",
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,12 @@ 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 }) => width != null ? width : "100%"};
1864
- height: fit-content;
1865
+ width: ${({ width }) => width != null ? width : "calc(100% - 2px)"};
1866
+ min-width: ${({ minWidth }) => minWidth != null ? minWidth : "fit-content"};
1867
+ height: ${({ height }) => height != null ? height : "fit-content"};
1865
1868
  flex-direction: ${({ direction }) => direction || "row"};
1866
1869
  justify-content: space-between;
1867
- min-height: ${({ height }) => height != null ? height : "40px"};
1870
+ min-height: ${({ minHeight }) => minHeight != null ? minHeight : "38px"};
1868
1871
  margin: 1px;
1869
1872
  gap: 8px;
1870
1873
  box-shadow: 0 0 0 1px ${(props) => getBorderColorByStatus(props)};
@@ -2936,7 +2939,7 @@ var StyledTextarea = styled5__default.default.textarea`
2936
2939
  background-color: transparent;
2937
2940
  resize: none;
2938
2941
  width: 100%;
2939
- height: ${({ minHeight }) => minHeight ? `${minHeight}px` : "300px"};
2942
+ height: 100%;
2940
2943
  flex: 1;
2941
2944
  word-break: break-all;
2942
2945
  ${({ disabled }) => getDisabledStyle(disabled)};
@@ -2957,8 +2960,9 @@ var TextArea = React2.forwardRef(
2957
2960
  defaultValue,
2958
2961
  onBlur,
2959
2962
  onFocus,
2960
- minHeight = 100,
2963
+ minHeight = "100px",
2961
2964
  width,
2965
+ height,
2962
2966
  className
2963
2967
  } = _b, rest = __objRest(_b, [
2964
2968
  "name",
@@ -2973,6 +2977,7 @@ var TextArea = React2.forwardRef(
2973
2977
  "onFocus",
2974
2978
  "minHeight",
2975
2979
  "width",
2980
+ "height",
2976
2981
  "className"
2977
2982
  ]);
2978
2983
  const [text, setText] = React2.useState("");
@@ -3032,6 +3037,8 @@ var TextArea = React2.forwardRef(
3032
3037
  direction: "column",
3033
3038
  onMouseEnter: handleOnMouseEnter,
3034
3039
  onMouseLeave: handleOnMouseLeave,
3040
+ height,
3041
+ minHeight,
3035
3042
  width,
3036
3043
  "data-shoplflow": "text-area",
3037
3044
  children: [
@@ -3048,8 +3055,7 @@ var TextArea = React2.forwardRef(
3048
3055
  value,
3049
3056
  ref,
3050
3057
  maxLength,
3051
- disabled,
3052
- minHeight
3058
+ disabled
3053
3059
  }, rest)
3054
3060
  ),
3055
3061
  /* @__PURE__ */ jsxRuntime.jsx(BottomElementWrapper, { children: maxLength && /* @__PURE__ */ jsxRuntime.jsx(TextCounter_default, { currentLength: String(text).length, maxLength }) })