fis-component 0.0.65 → 0.0.66

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/cjs/index.js CHANGED
@@ -73320,12 +73320,35 @@ const DivContainerSC = styled.div `
73320
73320
  color: ${getTheme("com/select/field/default/icon/color-icon/active")};
73321
73321
  }
73322
73322
  }
73323
+
73324
+ // Design chưa có negative
73325
+ &.negative {
73326
+ outline-color: ${getTheme("com/input/field/negative/border/default")};
73327
+ background-color: ${getTheme("com/input/field/negative/background/default")};
73328
+
73329
+ &:hover {
73330
+ outline-color: ${getTheme("com/input/field/negative/border/hover")};
73331
+ background-color: ${getTheme("com/input/field/negative/background/hover")};
73332
+ }
73333
+
73334
+ &:has(${InputSC}:focus) {
73335
+ outline-color: ${getTheme("com/input/field/negative/border/active")};
73336
+ background-color: ${getTheme("com/input/field/negative/background/active")};
73337
+ box-shadow: 0 0 0 ${getTheme("com/actived-mark/gap-spacing")}
73338
+ ${getTheme("com/actived-mark/color-gap-spacing-negative")};
73339
+ }
73340
+
73341
+ &::placeholder {
73342
+ color: ${getTheme("com/input/field/negative/label/color-text/placeholder")};
73343
+ }
73344
+ }
73323
73345
  `;
73324
73346
 
73325
73347
  const FISSelectItem = React.forwardRef((props, ref) => {
73326
- const { size = "md", iconPrefix, iconSuffix, disabled, activeDropdown, ...rest } = props;
73348
+ const { size = "md", iconPrefix, iconSuffix, disabled, activeDropdown, negative, ...rest } = props;
73327
73349
  return (jsxRuntime.jsx(DivContainerSC, { className: classNames({
73328
73350
  iconPrefix: iconPrefix,
73351
+ negative: negative,
73329
73352
  }), "$size": size, children: jsxRuntime.jsxs(DivWrapperSC, { children: [iconPrefix && (jsxRuntime.jsx(DivIconPrefixSC, { "$size": size, children: iconPrefix })), jsxRuntime.jsx(InputSC, { ...rest, ref: ref, disabled: disabled, "$size": size }), iconSuffix && (jsxRuntime.jsx(DivIconSuffixSC, { "$size": size, children: iconSuffix }))] }) }));
73330
73353
  });
73331
73354
  FISSelectItem.displayName = "FISSelectItem";
@@ -73469,7 +73492,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
73469
73492
  document.addEventListener("mousedown", handleClickOutside);
73470
73493
  return () => document.removeEventListener("mousedown", handleClickOutside);
73471
73494
  }, [referenceElement, popperElement]);
73472
- return (jsxRuntime.jsxs(DivWrapperSC$1, { className: className, style: style, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsxRuntime.jsx(FISSelectItem, { ...restProps, ref: ref, size: size, iconSuffix: isOpen ? jsxRuntime.jsx(ArrowUpIcon, {}) : jsxRuntime.jsx(ArrowDownIcon, {}), value: computedDisplayValue(), disabled: disabled, activeDropdown: isOpen }) }), message && (jsxRuntime.jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsxRuntime.jsx(SelectedTagsWrapper, { children: jsxRuntime.jsx(MultipleValue, { options: selectedItems, onRemove: handleOptionRemove }) })), isOpen && (jsxRuntime.jsx(Portal, { portal: portal, children: jsxRuntime.jsx(DivDropdownMenuSC, { ref: setPopperElement, style: {
73495
+ return (jsxRuntime.jsxs(DivWrapperSC$1, { className: className, style: style, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsxRuntime.jsx(FISSelectItem, { ...restProps, ref: ref, size: size, iconSuffix: isOpen ? jsxRuntime.jsx(ArrowUpIcon, {}) : jsxRuntime.jsx(ArrowDownIcon, {}), value: computedDisplayValue(), disabled: disabled, activeDropdown: isOpen, negative: negative }) }), message && (jsxRuntime.jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsxRuntime.jsx(SelectedTagsWrapper, { children: jsxRuntime.jsx(MultipleValue, { options: selectedItems, onRemove: handleOptionRemove }) })), isOpen && (jsxRuntime.jsx(Portal, { portal: portal, children: jsxRuntime.jsx(DivDropdownMenuSC, { ref: setPopperElement, style: {
73473
73496
  ...styles.popper,
73474
73497
  width: referenceElement?.offsetWidth,
73475
73498
  zIndex: 9999,