@shoplflow/base 0.24.23 → 0.24.25

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
@@ -1862,12 +1862,24 @@ var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled }) => {
1862
1862
  var InputWrapper = styled5__default.default.label`
1863
1863
  display: flex;
1864
1864
  align-items: center;
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
+ 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
+ }};
1868
1877
  flex-direction: ${({ direction }) => direction || "row"};
1869
1878
  justify-content: space-between;
1870
- min-height: ${({ minHeight }) => minHeight != null ? minHeight : "38px"};
1879
+ min-height: ${({ minHeight }) => {
1880
+ var _a;
1881
+ return (_a = `calc(${minHeight} - 2px)`) != null ? _a : "fit-content";
1882
+ }};
1871
1883
  margin: 1px;
1872
1884
  gap: 8px;
1873
1885
  box-shadow: 0 0 0 1px ${(props) => getBorderColorByStatus(props)};
@@ -1922,7 +1934,7 @@ var Icon = React2.forwardRef((_a, ref) => {
1922
1934
  exports.Icon = Icon;
1923
1935
  var DropdownButton = React2.forwardRef(
1924
1936
  (_a, ref) => {
1925
- 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"]);
1926
1938
  const { isOpen, setIsOpen } = useDropdown();
1927
1939
  const [isHovered, setIsHovered] = React2.useState(false);
1928
1940
  const handleOnClick = (e) => {
@@ -1946,6 +1958,7 @@ var DropdownButton = React2.forwardRef(
1946
1958
  isHovered,
1947
1959
  disabled,
1948
1960
  width,
1961
+ isError,
1949
1962
  height: exports.getDropdownHeightBySizeVar(sizeVar),
1950
1963
  children: /* @__PURE__ */ jsxRuntime.jsxs(exports.StyledDropdownButton, __spreadProps(__spreadValues({ ref, onClick: handleOnClick, disabled }, rest), { sizeVar, children: [
1951
1964
  leftSource && leftSource,
@@ -2669,7 +2682,7 @@ var Input = React2.forwardRef(
2669
2682
  min,
2670
2683
  max,
2671
2684
  className,
2672
- width
2685
+ width = "100%"
2673
2686
  } = _b, rest = __objRest(_b, [
2674
2687
  "onFocus",
2675
2688
  "onBlur",
@@ -2795,6 +2808,7 @@ var Input = React2.forwardRef(
2795
2808
  onMouseEnter: handleOnMouseEnter,
2796
2809
  onMouseLeave: handleOnMouseLeave,
2797
2810
  width: getWidth(),
2811
+ height: type === "number" ? "32px" : "40px",
2798
2812
  "data-shoplflow": "input",
2799
2813
  children: [
2800
2814
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2856,7 +2870,27 @@ exports.StyledInputButtonContent = styled5__default.default.input`
2856
2870
  `;
2857
2871
  var InputButton = React2.forwardRef(
2858
2872
  (_a, ref) => {
2859
- var _b = _a, { value, defaultValue, onChange, onClick, isSelected, disabled = false, rightSource, onClear, width } = _b, rest = __objRest(_b, ["value", "defaultValue", "onChange", "onClick", "isSelected", "disabled", "rightSource", "onClear", "width"]);
2873
+ var _b = _a, {
2874
+ value,
2875
+ defaultValue,
2876
+ onChange,
2877
+ onClick,
2878
+ isSelected,
2879
+ disabled = false,
2880
+ rightSource,
2881
+ onClear,
2882
+ width = "100%"
2883
+ } = _b, rest = __objRest(_b, [
2884
+ "value",
2885
+ "defaultValue",
2886
+ "onChange",
2887
+ "onClick",
2888
+ "isSelected",
2889
+ "disabled",
2890
+ "rightSource",
2891
+ "onClear",
2892
+ "width"
2893
+ ]);
2860
2894
  const [text, setText] = React2.useState("");
2861
2895
  const [isHovered, setIsHovered] = React2.useState(false);
2862
2896
  const prevValue = React2.useRef(value);
@@ -2913,6 +2947,7 @@ var InputButton = React2.forwardRef(
2913
2947
  isHovered,
2914
2948
  isFocused: isSelected,
2915
2949
  disabled,
2950
+ minHeight: "40px",
2916
2951
  width,
2917
2952
  children: /* @__PURE__ */ jsxRuntime.jsxs(exports.StyledInputButton, { onClick: handleOnClick, disabled, children: [
2918
2953
  /* @__PURE__ */ jsxRuntime.jsx(exports.StyledInputButtonContent, __spreadValues({ className: "body1_400", defaultValue: text, ref }, rest)),
@@ -3091,7 +3126,7 @@ var SelectInputButton = (_a) => {
3091
3126
  value,
3092
3127
  placeholder,
3093
3128
  label,
3094
- width,
3129
+ width = "100%",
3095
3130
  rightSource
3096
3131
  } = _b, rest = __objRest(_b, [
3097
3132
  "disabled",
@@ -3138,11 +3173,12 @@ var SelectInputButton = (_a) => {
3138
3173
  isHovered,
3139
3174
  isFocused: isSelected,
3140
3175
  disabled,
3141
- width
3176
+ width,
3177
+ minHeight: "40px"
3142
3178
  }, rest), {
3143
3179
  "data-shoplflow": "SelectInputButton",
3144
3180
  children: /* @__PURE__ */ jsxRuntime.jsxs(StyledSelectInputButton, { children: [
3145
- value && value.length > 0 && label ? /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_400", children: value[0][label] }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_400", color: "neutral350", children: placeholder }),
3181
+ value && value.length > 0 && label ? /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_400", lineClamp: 1, children: value[0][label] }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_400", lineClamp: 1, color: "neutral350", children: placeholder }),
3146
3182
  /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack.Horizontal, { align: "center", spacing: "spacing04", children: [
3147
3183
  value && value.length > 1 && /* @__PURE__ */ jsxRuntime.jsxs(exports.Text, { typography: "body1_400", color: "neutral700", children: [
3148
3184
  "+",