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.
@@ -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;
@@ -1,14 +1,27 @@
1
1
  export type DateRangeProps = {
2
2
  className?: string;
3
- placeholder?: [string, string];
4
3
  label?: string;
5
4
  required?: boolean;
5
+ disabled?: boolean;
6
6
  message?: string;
7
7
  negative?: boolean;
8
8
  positive?: boolean;
9
- };
9
+ placeholder?: [string, string];
10
+ } & React.ComponentProps<typeof RangePicker>;
11
+ declare const RangePicker: import("react").ForwardRefExoticComponent<Omit<import("rc-picker").RangePickerProps<import("dayjs").Dayjs>, "locale" | "generateConfig" | "hideHeader"> & {
12
+ locale?: import("antd/es/date-picker/generatePicker").PickerLocale;
13
+ size?: import("antd/es/button").ButtonSize;
14
+ placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
15
+ bordered?: boolean;
16
+ status?: import("antd/es/_util/statusUtils").InputStatus;
17
+ variant?: import("antd/es/config-provider").Variant;
18
+ dropdownClassName?: string;
19
+ popupClassName?: string;
20
+ rootClassName?: string;
21
+ popupStyle?: React.CSSProperties;
22
+ } & import("react").RefAttributes<import("rc-picker").PickerRef>>;
10
23
  declare const FISDateRange: {
11
- ({ 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;
12
25
  displayName: string;
13
26
  };
14
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
@@ -64603,7 +64603,7 @@ const DivContainerSC$7 = styled.div `
64603
64603
  cursor: default;
64604
64604
  }
64605
64605
 
64606
- &:hover:not(:has(.icon-suffix:hover)) {
64606
+ &:hover:not(.disabled):not(:has(.icon-suffix:hover)) {
64607
64607
  outline-color: ${getTheme("com/input/field/default/border/hover")};
64608
64608
  background-color: ${getTheme("com/input/field/default/background/hover")};
64609
64609
 
@@ -64664,9 +64664,9 @@ const FISInputField = forwardRef(({ onClickSuffix, onClickPrefix, ...props }, re
64664
64664
  dropdownPrefix: typePrefix === "dropdown",
64665
64665
  iconPrefix: iconPrefix,
64666
64666
  prefix: typePrefix === "prefix" || typePrefix === "dropdown",
64667
- suffix: typeSuffix === "suffix" ||
64668
- typeSuffix === "dropdown",
64667
+ suffix: typeSuffix === "suffix" || typeSuffix === "dropdown",
64669
64668
  iconSuffix: typeSuffix === "icon",
64669
+ disabled: disabled,
64670
64670
  }), children: [iconPrefix && typePrefix !== "prefix" && typePrefix !== "dropdown" && (jsx(DivIconSC$2, { className: classNames({
64671
64671
  "input-text-lg": sizeInput === "lg",
64672
64672
  }), children: iconPrefix })), typePrefix === "prefix" && (jsxs(DivPrefixSC, { onClick: onClickPrefix, className: classNames({ disabled: disabled }), children: [iconPrefix && jsx(DivIconPrefixSC$1, { children: iconPrefix }), labelPrefix && jsx(SpanTextPrefixSC, { children: labelPrefix })] })), typePrefix === "dropdown" && (jsxs(DivDropdownPreFixSC, { className: classNames({
@@ -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