@shoplflow/base 0.24.23 → 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 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(