fis-component 0.0.45 → 0.0.47

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
@@ -64623,7 +64623,7 @@ const DivContainerSC$7 = styled.div `
64623
64623
  cursor: default;
64624
64624
  }
64625
64625
 
64626
- &:hover:not(:has(.icon-suffix:hover)) {
64626
+ &:hover:not(.disabled):not(:has(.icon-suffix:hover)) {
64627
64627
  outline-color: ${getTheme("com/input/field/default/border/hover")};
64628
64628
  background-color: ${getTheme("com/input/field/default/background/hover")};
64629
64629
 
@@ -64684,9 +64684,9 @@ const FISInputField = React.forwardRef(({ onClickSuffix, onClickPrefix, ...props
64684
64684
  dropdownPrefix: typePrefix === "dropdown",
64685
64685
  iconPrefix: iconPrefix,
64686
64686
  prefix: typePrefix === "prefix" || typePrefix === "dropdown",
64687
- suffix: typeSuffix === "suffix" ||
64688
- typeSuffix === "dropdown",
64687
+ suffix: typeSuffix === "suffix" || typeSuffix === "dropdown",
64689
64688
  iconSuffix: typeSuffix === "icon",
64689
+ disabled: disabled,
64690
64690
  }), children: [iconPrefix && typePrefix !== "prefix" && typePrefix !== "dropdown" && (jsxRuntime.jsx(DivIconSC$2, { className: classNames({
64691
64691
  "input-text-lg": sizeInput === "lg",
64692
64692
  }), children: iconPrefix })), typePrefix === "prefix" && (jsxRuntime.jsxs(DivPrefixSC, { onClick: onClickPrefix, className: classNames({ disabled: disabled }), children: [iconPrefix && jsxRuntime.jsx(DivIconPrefixSC$1, { children: iconPrefix }), labelPrefix && jsxRuntime.jsx(SpanTextPrefixSC, { children: labelPrefix })] })), typePrefix === "dropdown" && (jsxRuntime.jsxs(DivDropdownPreFixSC, { className: classNames({
@@ -71685,6 +71685,18 @@ const DivDateRangeContainerSC = styled.div `
71685
71685
  justify-content: center;
71686
71686
  }
71687
71687
 
71688
+ ${(props) => props.$disabled &&
71689
+ styled.css `
71690
+ .ant-picker-range {
71691
+ background-color: ${getTheme("com/input/field/disable/background-color")};
71692
+ border-color: ${getTheme("com/input/field/disable/stroke-color")};
71693
+
71694
+ .ant-picker-suffix svg {
71695
+ color: ${getTheme("com/button/disable/icon-color")};
71696
+ }
71697
+ }
71698
+ `}
71699
+
71688
71700
  ${(props) => {
71689
71701
  if (props.$negative) {
71690
71702
  return styled.css `
@@ -71734,12 +71746,12 @@ const DivSuffixIconSC = styled.div `
71734
71746
  `;
71735
71747
 
71736
71748
  const { RangePicker } = DatePicker;
71737
- const FISDateRange = ({ placeholder = ["dd/mm/yyyy", "dd/mm/yyyy"], label, required = true, message, negative = false, positive = false, ...rest }) => {
71749
+ const FISDateRange = ({ placeholder = ["dd/mm/yyyy", "dd/mm/yyyy"], label, required = true, message, negative = false, positive = false, disabled = true, ...rest }) => {
71738
71750
  const [open, setOpen] = React.useState(false);
71739
71751
  const handleOpenCalendar = () => {
71740
71752
  setOpen(!open);
71741
71753
  };
71742
- return (jsxRuntime.jsxs(DivDateRangeContainerSC, { "$negative": negative, "$positive": positive, children: [label && jsxRuntime.jsx(FISInputLabel, { textLabel: label, required: required }), jsxRuntime.jsx(RangePicker, { open: open, onOpenChange: setOpen, placeholder: placeholder, separator: jsxRuntime.jsx(DivSeparatorIconSC, { "$negative": negative, children: jsxRuntime.jsx(ArrowRightIcon, {}) }), suffixIcon: jsxRuntime.jsx(DivSuffixIconSC, { children: jsxRuntime.jsx(FISIconButton, { size: "sm", variant: "tertiary-invisible", icon: jsxRuntime.jsx(CalendarIcon, {}), onClick: handleOpenCalendar }) }), ...rest }), message && (jsxRuntime.jsx("div", { className: "hint-box", children: jsxRuntime.jsx("div", { className: "hint-text", children: message }) }))] }));
71754
+ return (jsxRuntime.jsxs(DivDateRangeContainerSC, { "$negative": negative, "$positive": positive, "$disabled": disabled, children: [label && jsxRuntime.jsx(FISInputLabel, { textLabel: label, required: required }), jsxRuntime.jsx(RangePicker, { open: open, onOpenChange: setOpen, placeholder: placeholder, disabled: disabled, separator: jsxRuntime.jsx(DivSeparatorIconSC, { "$negative": negative, children: jsxRuntime.jsx(ArrowRightIcon, {}) }), suffixIcon: jsxRuntime.jsx(DivSuffixIconSC, { children: jsxRuntime.jsx(FISIconButton, { disabled: disabled, size: "sm", variant: "tertiary-invisible", icon: jsxRuntime.jsx(CalendarIcon, {}), onClick: handleOpenCalendar }) }), ...rest }), message && (jsxRuntime.jsx("div", { className: "hint-box", children: jsxRuntime.jsx("div", { className: "hint-text", children: message }) }))] }));
71743
71755
  };
71744
71756
  FISDateRange.displayName = "FISDateRange";
71745
71757