fis-component 0.0.46 → 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.
@@ -2,12 +2,13 @@ import { DateRangeProps } from ".";
2
2
  declare const meta: {
3
3
  title: string;
4
4
  component: {
5
- ({ placeholder, label, required, message, negative, positive, ...rest }: DateRangeProps): import("react/jsx-runtime").JSX.Element;
5
+ ({ placeholder, label, required, message, negative, positive, disabled, ...rest }: DateRangeProps): import("react/jsx-runtime").JSX.Element;
6
6
  displayName: string;
7
7
  };
8
8
  tags: string[];
9
9
  args: {
10
10
  label: string;
11
+ disabled: false;
11
12
  required: true;
12
13
  message: string;
13
14
  negative: false;
@@ -2,6 +2,7 @@ export type DateRangeProps = {
2
2
  className?: string;
3
3
  label?: string;
4
4
  required?: boolean;
5
+ disabled?: boolean;
5
6
  message?: string;
6
7
  negative?: boolean;
7
8
  positive?: boolean;
@@ -20,7 +21,7 @@ declare const RangePicker: import("react").ForwardRefExoticComponent<Omit<import
20
21
  popupStyle?: React.CSSProperties;
21
22
  } & import("react").RefAttributes<import("rc-picker").PickerRef>>;
22
23
  declare const FISDateRange: {
23
- ({ placeholder, label, required, message, negative, positive, ...rest }: DateRangeProps): import("react/jsx-runtime").JSX.Element;
24
+ ({ placeholder, label, required, message, negative, positive, disabled, ...rest }: DateRangeProps): import("react/jsx-runtime").JSX.Element;
24
25
  displayName: string;
25
26
  };
26
27
  export default FISDateRange;
@@ -1,6 +1,7 @@
1
1
  interface DateRangeProps {
2
2
  $negative?: boolean;
3
3
  $positive?: boolean;
4
+ $disabled?: boolean;
4
5
  }
5
6
  export declare const DivDateRangeContainerSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, DateRangeProps>> & string;
6
7
  export declare const DivSeparatorIconSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, DateRangeProps>> & string;
package/dist/esm/index.js CHANGED
@@ -71665,6 +71665,18 @@ const DivDateRangeContainerSC = styled.div `
71665
71665
  justify-content: center;
71666
71666
  }
71667
71667
 
71668
+ ${(props) => props.$disabled &&
71669
+ css `
71670
+ .ant-picker-range {
71671
+ background-color: ${getTheme("com/input/field/disable/background-color")};
71672
+ border-color: ${getTheme("com/input/field/disable/stroke-color")};
71673
+
71674
+ .ant-picker-suffix svg {
71675
+ color: ${getTheme("com/button/disable/icon-color")};
71676
+ }
71677
+ }
71678
+ `}
71679
+
71668
71680
  ${(props) => {
71669
71681
  if (props.$negative) {
71670
71682
  return css `
@@ -71714,12 +71726,12 @@ const DivSuffixIconSC = styled.div `
71714
71726
  `;
71715
71727
 
71716
71728
  const { RangePicker } = DatePicker;
71717
- const FISDateRange = ({ placeholder = ["dd/mm/yyyy", "dd/mm/yyyy"], label, required = true, message, negative = false, positive = false, ...rest }) => {
71729
+ const FISDateRange = ({ placeholder = ["dd/mm/yyyy", "dd/mm/yyyy"], label, required = true, message, negative = false, positive = false, disabled = true, ...rest }) => {
71718
71730
  const [open, setOpen] = useState(false);
71719
71731
  const handleOpenCalendar = () => {
71720
71732
  setOpen(!open);
71721
71733
  };
71722
- return (jsxs(DivDateRangeContainerSC, { "$negative": negative, "$positive": positive, children: [label && jsx(FISInputLabel, { textLabel: label, required: required }), jsx(RangePicker, { open: open, onOpenChange: setOpen, placeholder: placeholder, separator: jsx(DivSeparatorIconSC, { "$negative": negative, children: jsx(ArrowRightIcon, {}) }), suffixIcon: jsx(DivSuffixIconSC, { children: jsx(FISIconButton, { size: "sm", variant: "tertiary-invisible", icon: jsx(CalendarIcon, {}), onClick: handleOpenCalendar }) }), ...rest }), message && (jsx("div", { className: "hint-box", children: jsx("div", { className: "hint-text", children: message }) }))] }));
71734
+ return (jsxs(DivDateRangeContainerSC, { "$negative": negative, "$positive": positive, "$disabled": disabled, children: [label && jsx(FISInputLabel, { textLabel: label, required: required }), jsx(RangePicker, { open: open, onOpenChange: setOpen, placeholder: placeholder, disabled: disabled, separator: jsx(DivSeparatorIconSC, { "$negative": negative, children: jsx(ArrowRightIcon, {}) }), suffixIcon: jsx(DivSuffixIconSC, { children: jsx(FISIconButton, { disabled: disabled, size: "sm", variant: "tertiary-invisible", icon: jsx(CalendarIcon, {}), onClick: handleOpenCalendar }) }), ...rest }), message && (jsx("div", { className: "hint-box", children: jsx("div", { className: "hint-text", children: message }) }))] }));
71723
71735
  };
71724
71736
  FISDateRange.displayName = "FISDateRange";
71725
71737