@shoplflow/base 0.15.0 → 0.15.1

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
@@ -1318,6 +1318,7 @@ var getStyleByStyleVar2 = (styleVar, color) => {
1318
1318
  case "GHOST":
1319
1319
  return react$1.css`
1320
1320
  border: 1px solid transparent;
1321
+ background: transparent;
1321
1322
  &:hover {
1322
1323
  background: ${exports.colorTokens.neutral400_5};
1323
1324
  }
@@ -1656,7 +1657,10 @@ var InputWrapper = styled5__default.default.label`
1656
1657
  border-radius: 6px;
1657
1658
  background-color: ${exports.colorTokens.neutral0};
1658
1659
  overflow: hidden;
1659
- ${({ disabled }) => getDisabledStyle(disabled)};
1660
+ ${({ disabled }) => disabled && react$1.css`
1661
+ background-color: ${exports.colorTokens.neutral100};
1662
+ cursor: not-allowed;
1663
+ `};
1660
1664
  `;
1661
1665
 
1662
1666
  // src/components/Icon/Icon.types.ts
@@ -2030,34 +2034,23 @@ exports.StyledInputButton = styled5__default.default.button`
2030
2034
  padding: 4px 4px 4px 12px;
2031
2035
  cursor: pointer;
2032
2036
  ${({ disabled }) => disabled && react$1.css`
2037
+ background-color: ${exports.colorTokens.neutral100};
2033
2038
  cursor: not-allowed;
2034
2039
  `}
2035
2040
  `;
2041
+ exports.StyledInputButtonContent = styled5__default.default.input`
2042
+ display: flex;
2043
+ width: 100%;
2044
+ border: none;
2045
+ box-sizing: border-box;
2046
+ caret-color: transparent;
2047
+ &::placeholder {
2048
+ color: ${exports.colorTokens.neutral350};
2049
+ }
2050
+ `;
2036
2051
  var InputButton = React3.forwardRef(
2037
2052
  (_a, ref) => {
2038
- var _b = _a, {
2039
- value,
2040
- defaultValue,
2041
- onChange,
2042
- onClick,
2043
- isSelected,
2044
- disabled = false,
2045
- rightSource,
2046
- placeholder,
2047
- onClear,
2048
- width
2049
- } = _b, rest = __objRest(_b, [
2050
- "value",
2051
- "defaultValue",
2052
- "onChange",
2053
- "onClick",
2054
- "isSelected",
2055
- "disabled",
2056
- "rightSource",
2057
- "placeholder",
2058
- "onClear",
2059
- "width"
2060
- ]);
2053
+ 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"]);
2061
2054
  const [text, setText] = React3.useState("");
2062
2055
  const [isHovered, setIsHovered] = React3.useState(false);
2063
2056
  const convertToString = React3.useCallback((value2) => {
@@ -2108,13 +2101,13 @@ var InputButton = React3.forwardRef(
2108
2101
  isFocused: isSelected,
2109
2102
  disabled,
2110
2103
  width,
2111
- children: /* @__PURE__ */ jsxRuntime.jsxs(exports.StyledInputButton, __spreadProps(__spreadValues({}, rest), { onClick: handleOnClick, disabled, ref, children: [
2112
- text && text.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_400", color: "neutral700", textOverflow: "ellipsis", lineClamp: 1, children: text }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_400", color: "neutral350", textOverflow: "ellipsis", lineClamp: 1, children: placeholder }),
2104
+ children: /* @__PURE__ */ jsxRuntime.jsxs(exports.StyledInputButton, { onClick: handleOnClick, disabled, children: [
2105
+ /* @__PURE__ */ jsxRuntime.jsx(exports.StyledInputButtonContent, __spreadValues({ className: "body1_400", defaultValue: text, ref }, rest)),
2113
2106
  /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack.Horizontal, { align: "center", children: [
2114
2107
  value && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", onClick: handleOnClear, styleVar: "GHOST", disabled, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: assetFunction("DeleteIcon"), color: "neutral600" }) }),
2115
2108
  rightSource
2116
2109
  ] })
2117
- ] }))
2110
+ ] })
2118
2111
  }
2119
2112
  );
2120
2113
  }