fis-component 0.0.64 → 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
@@ -60852,6 +60852,15 @@ const LinkButtonStyled = styled.button `
60852
60852
  styled.css `
60853
60853
  text-decoration: underline;
60854
60854
  `}
60855
+
60856
+ ${(props) => props.$singleLine &&
60857
+ styled.css `
60858
+ .button-content {
60859
+ white-space: nowrap;
60860
+ overflow: hidden;
60861
+ text-overflow: ellipsis;
60862
+ }
60863
+ `}
60855
60864
  `;
60856
60865
  const IconStyled$1 = styled.span `
60857
60866
  display: inline-flex;
@@ -60859,10 +60868,10 @@ const IconStyled$1 = styled.span `
60859
60868
  `;
60860
60869
 
60861
60870
  const FISLinkButton = React.forwardRef((props, ref) => {
60862
- const { type, children, size = "sm", variant = "default", underline, startIcon: startIconProp, endIcon: endIconProp, ...rest } = props;
60871
+ const { children, size = "sm", variant = "default", underline, startIcon: startIconProp, endIcon: endIconProp, singleLine = false, ...rest } = props;
60863
60872
  const startIcon = startIconProp && (jsxRuntime.jsx(IconStyled$1, { className: "button-icon", children: startIconProp }));
60864
60873
  const endIcon = endIconProp && (jsxRuntime.jsx(IconStyled$1, { className: "button-icon", children: endIconProp }));
60865
- return (jsxRuntime.jsxs(LinkButtonStyled, { ...rest, ref: ref, "$variant": variant, "$size": size, "$underline": underline, children: [startIcon, jsxRuntime.jsx("span", { className: "button-content", children: children }), endIcon] }));
60874
+ return (jsxRuntime.jsxs(LinkButtonStyled, { ...rest, ref: ref, "$variant": variant, "$size": size, "$underline": underline, "$singleLine": singleLine, children: [startIcon, jsxRuntime.jsx("span", { className: "button-content", children: children }), endIcon] }));
60866
60875
  });
60867
60876
  FISLinkButton.displayName = "FISLinkButton";
60868
60877
 
@@ -61476,7 +61485,7 @@ function FISProgressCircular({ variant, ...rest }) {
61476
61485
  FISProgressCircular.displayName = "FISProgressCircular";
61477
61486
 
61478
61487
  const FISIconButton = React.forwardRef((props, ref) => {
61479
- const { type, children, active = false, size = "md", variant = "primary", icon: iconProp, loading = false, disabled = false, ...rest } = props;
61488
+ const { children, active = false, size = "md", variant = "primary", icon: iconProp, loading = false, disabled = false, ...rest } = props;
61480
61489
  return (jsxRuntime.jsx(ButtonStyled, { type: "button", ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$loading": loading, disabled: disabled || loading, children: loading ? (jsxRuntime.jsx(FISProgressCircular, { size: size, variant: "indeterminate", invert: variant === "primary-white" ||
61481
61490
  variant === "secondary-white" ||
61482
61491
  variant === "secondary-invisible-white" })) : (iconProp) }));
@@ -62397,10 +62406,10 @@ const ProgressCircularSC$1 = styled(FISProgressCircular) `
62397
62406
  `;
62398
62407
 
62399
62408
  const FISButton = React.forwardRef((props, ref) => {
62400
- const { active, type, children, size = "md", variant = "primary", loading, disabled = false, startIcon: startIconProp, endIcon: endIconProp, ...rest } = props;
62409
+ const { active, children, size = "md", variant = "primary", loading, disabled = false, startIcon: startIconProp, endIcon: endIconProp, ...rest } = props;
62401
62410
  const startIcon = startIconProp && jsxRuntime.jsx(SpanIconSC$2, { children: startIconProp });
62402
62411
  const endIcon = endIconProp && jsxRuntime.jsx(SpanIconSC$2, { children: endIconProp });
62403
- return (jsxRuntime.jsxs(ButtonSC, { type: "button", ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$loading": loading, disabled: disabled || loading, children: [loading && (jsxRuntime.jsx(ProgressCircularSC$1, { size: size, variant: "indeterminate", invert: variant === "primary-white" || variant === "secondary-white" })), startIcon, jsxRuntime.jsx("span", { className: "button-content", children: children }), endIcon] }));
62412
+ return (jsxRuntime.jsxs(ButtonSC, { ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$loading": loading, disabled: disabled || loading, children: [loading && (jsxRuntime.jsx(ProgressCircularSC$1, { size: size, variant: "indeterminate", invert: variant === "primary-white" || variant === "secondary-white" })), startIcon, jsxRuntime.jsx("span", { className: "button-content", children: children }), endIcon] }));
62404
62413
  });
62405
62414
  FISButton.displayName = "FISButton";
62406
62415
 
@@ -73311,12 +73320,35 @@ const DivContainerSC = styled.div `
73311
73320
  color: ${getTheme("com/select/field/default/icon/color-icon/active")};
73312
73321
  }
73313
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
+ }
73314
73345
  `;
73315
73346
 
73316
73347
  const FISSelectItem = React.forwardRef((props, ref) => {
73317
- const { size = "md", iconPrefix, iconSuffix, disabled, activeDropdown, ...rest } = props;
73348
+ const { size = "md", iconPrefix, iconSuffix, disabled, activeDropdown, negative, ...rest } = props;
73318
73349
  return (jsxRuntime.jsx(DivContainerSC, { className: classNames({
73319
73350
  iconPrefix: iconPrefix,
73351
+ negative: negative,
73320
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 }))] }) }));
73321
73353
  });
73322
73354
  FISSelectItem.displayName = "FISSelectItem";
@@ -73460,7 +73492,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
73460
73492
  document.addEventListener("mousedown", handleClickOutside);
73461
73493
  return () => document.removeEventListener("mousedown", handleClickOutside);
73462
73494
  }, [referenceElement, popperElement]);
73463
- 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: {
73464
73496
  ...styles.popper,
73465
73497
  width: referenceElement?.offsetWidth,
73466
73498
  zIndex: 9999,