@shoplflow/base 0.30.8 → 0.31.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
@@ -2034,6 +2034,7 @@ var StyledDropdownButton = styled6__default.default.button`
2034
2034
  background-color: ${exports.colorTokens.neutral0};
2035
2035
  ${({ sizeVar }) => sizeVar && getDropdownStyleBySizeVar(sizeVar)};
2036
2036
  ${({ disabled }) => disabled && react$1.css`
2037
+ background-color: ${exports.colorTokens.neutral100};
2037
2038
  cursor: not-allowed;
2038
2039
  `}
2039
2040
  `;
@@ -2165,6 +2166,15 @@ var DropdownButton = React3.forwardRef(
2165
2166
  const handleOnMouseLeave = () => {
2166
2167
  setIsHovered(false);
2167
2168
  };
2169
+ const getTextColor = ({ value: value2, disabled: disabled2 }) => {
2170
+ if (disabled2) {
2171
+ return "neutral350";
2172
+ }
2173
+ if (!value2) {
2174
+ return "neutral400";
2175
+ }
2176
+ return "neutral700";
2177
+ };
2168
2178
  return /* @__PURE__ */ jsxRuntime.jsx(
2169
2179
  InputWrapper,
2170
2180
  {
@@ -2182,7 +2192,7 @@ var DropdownButton = React3.forwardRef(
2182
2192
  exports.Text,
2183
2193
  {
2184
2194
  typography: getDropdownFontSizeBySizeVar(sizeVar),
2185
- color: value ? "neutral700" : "neutral400",
2195
+ color: getTextColor({ value, disabled }),
2186
2196
  textOverflow: "ellipsis",
2187
2197
  lineClamp: 1,
2188
2198
  children: placeholder
@@ -3260,6 +3270,7 @@ var InputButton = React3.forwardRef(
3260
3270
  onClick,
3261
3271
  isSelected,
3262
3272
  disabled = false,
3273
+ useClear = true,
3263
3274
  rightSource,
3264
3275
  onClear,
3265
3276
  width = "100%"
@@ -3270,6 +3281,7 @@ var InputButton = React3.forwardRef(
3270
3281
  "onClick",
3271
3282
  "isSelected",
3272
3283
  "disabled",
3284
+ "useClear",
3273
3285
  "rightSource",
3274
3286
  "onClear",
3275
3287
  "width"
@@ -3334,7 +3346,7 @@ var InputButton = React3.forwardRef(
3334
3346
  children: /* @__PURE__ */ jsxRuntime.jsxs(StyledInputButton, { onClick: handleOnClick, disabled, children: [
3335
3347
  /* @__PURE__ */ jsxRuntime.jsx(StyledInputButtonContent, __spreadValues({ className: "body1_400", value: text, ref }, rest)),
3336
3348
  /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack.Horizontal, { align: "center", children: [
3337
- text && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", onClick: handleOnClear, styleVar: "GHOST", disabled, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: assetFunction("DeleteIcon"), color: "neutral350" }) }),
3349
+ useClear && text && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", onClick: handleOnClear, styleVar: "GHOST", disabled, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: assetFunction("DeleteIcon"), color: "neutral350" }) }),
3338
3350
  rightSource
3339
3351
  ] })
3340
3352
  ] })