@egov3/system-design 2.1.49 → 2.2.1
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/README.md +26 -29
- package/dist/cjs/components/Accordion/index.d.ts +8 -0
- package/dist/cjs/components/Button/index.d.ts +13 -0
- package/dist/cjs/components/Calendar/Body/index.d.ts +12 -0
- package/dist/cjs/components/Calendar/Footer/index.d.ts +9 -0
- package/dist/cjs/components/Calendar/Header/index.d.ts +8 -0
- package/dist/cjs/components/Calendar/Main/index.d.ts +9 -0
- package/dist/cjs/components/Calendar/index.d.ts +8 -0
- package/dist/cjs/components/InputField/index.d.ts +22 -0
- package/dist/cjs/components/Modal/index.d.ts +9 -0
- package/dist/cjs/components/RadioGroup/index.d.ts +20 -0
- package/dist/cjs/components/RadioToggle/index.d.ts +6 -0
- package/dist/cjs/components/SelectBoxButton/index.d.ts +9 -0
- package/dist/cjs/components/Typography/index.d.ts +8 -0
- package/dist/cjs/components/index.d.ts +20 -0
- package/dist/cjs/constants/calendar/index.d.ts +2 -0
- package/dist/cjs/index.d.ts +21 -0
- package/dist/cjs/index.js +3496 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces/Calendar.d.ts +24 -0
- package/dist/cjs/stories/Accordion.stories.d.ts +7 -0
- package/dist/cjs/stories/Button.stories.d.ts +28 -0
- package/dist/cjs/stories/Calendar.stories.d.ts +6 -0
- package/dist/cjs/stories/CardWrapperItem.d.ts +4 -0
- package/dist/cjs/stories/InputField.stories.d.ts +22 -0
- package/dist/cjs/stories/Modal.stories.d.ts +8 -0
- package/dist/cjs/stories/RadioGroup.stories.d.ts +23 -0
- package/dist/cjs/stories/RadioToggle.stories.d.ts +13 -0
- package/dist/cjs/stories/Typography.stories.d.ts +12 -0
- package/dist/cjs/svg/ClearIcon.d.ts +4 -0
- package/dist/cjs/svg/index.d.ts +2 -0
- package/dist/cjs/utils/CreateArray.d.ts +1 -0
- package/dist/cjs/utils/GenerateArray.d.ts +1 -0
- package/dist/cjs/utils/date/convertType.d.ts +53 -0
- package/dist/cjs/utils/date/formatDate.d.ts +1 -0
- package/dist/cjs/utils/date/getDaysInMonth.d.ts +1 -0
- package/dist/cjs/utils/date/getMonthNameProper.d.ts +1 -0
- package/dist/cjs/utils/date/getValideMonth.d.ts +6 -0
- package/dist/cjs/utils/date/index.d.ts +6 -0
- package/dist/cjs/utils/date/inverseDate.d.ts +1 -0
- package/dist/cjs/utils/date/isValidateDate.d.ts +3 -0
- package/dist/cjs/utils/date/normalizeDayAndMonth.d.ts +2 -0
- package/dist/cjs/utils/date/range/getDaysRange.d.ts +2 -0
- package/dist/cjs/utils/date/range/getMonthRange.d.ts +1 -0
- package/dist/cjs/utils/date/range/getYearRange.d.ts +1 -0
- package/dist/cjs/utils/date/range/isValidDateRange.d.ts +3 -0
- package/dist/cjs/utils/joinClasses.d.ts +1 -0
- package/dist/cjs/utils/string/SetCharAt.d.ts +1 -0
- package/dist/cjs/utils/string/toPascalCase.d.ts +1 -0
- package/dist/esm/components/Accordion/index.d.ts +8 -0
- package/dist/esm/components/Button/index.d.ts +13 -0
- package/dist/esm/components/Calendar/Body/index.d.ts +12 -0
- package/dist/esm/components/Calendar/Footer/index.d.ts +9 -0
- package/dist/esm/components/Calendar/Header/index.d.ts +8 -0
- package/dist/esm/components/Calendar/Main/index.d.ts +9 -0
- package/dist/esm/components/Calendar/index.d.ts +8 -0
- package/dist/esm/components/InputField/index.d.ts +22 -0
- package/dist/esm/components/Modal/index.d.ts +9 -0
- package/dist/esm/components/RadioGroup/index.d.ts +20 -0
- package/dist/esm/components/RadioToggle/index.d.ts +6 -0
- package/dist/esm/components/SelectBoxButton/index.d.ts +9 -0
- package/dist/esm/components/Typography/index.d.ts +8 -0
- package/dist/esm/components/index.d.ts +20 -0
- package/dist/esm/constants/calendar/index.d.ts +2 -0
- package/dist/{index.d.ts → esm/index.d.ts} +6 -30
- package/dist/esm/index.js +3494 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interfaces/Calendar.d.ts +24 -0
- package/dist/esm/stories/Accordion.stories.d.ts +7 -0
- package/dist/esm/stories/Button.stories.d.ts +28 -0
- package/dist/esm/stories/Calendar.stories.d.ts +6 -0
- package/dist/esm/stories/CardWrapperItem.d.ts +4 -0
- package/dist/esm/stories/InputField.stories.d.ts +22 -0
- package/dist/esm/stories/Modal.stories.d.ts +8 -0
- package/dist/esm/stories/RadioGroup.stories.d.ts +23 -0
- package/dist/esm/stories/RadioToggle.stories.d.ts +13 -0
- package/dist/esm/stories/Typography.stories.d.ts +12 -0
- package/dist/esm/svg/ClearIcon.d.ts +4 -0
- package/dist/esm/svg/index.d.ts +2 -0
- package/dist/esm/utils/CreateArray.d.ts +1 -0
- package/dist/esm/utils/GenerateArray.d.ts +1 -0
- package/dist/esm/utils/date/convertType.d.ts +53 -0
- package/dist/esm/utils/date/formatDate.d.ts +1 -0
- package/dist/esm/utils/date/getDaysInMonth.d.ts +1 -0
- package/dist/esm/utils/date/getMonthNameProper.d.ts +1 -0
- package/dist/esm/utils/date/getValideMonth.d.ts +6 -0
- package/dist/esm/utils/date/index.d.ts +6 -0
- package/dist/esm/utils/date/inverseDate.d.ts +1 -0
- package/dist/esm/utils/date/isValidateDate.d.ts +3 -0
- package/dist/esm/utils/date/normalizeDayAndMonth.d.ts +2 -0
- package/dist/esm/utils/date/range/getDaysRange.d.ts +2 -0
- package/dist/esm/utils/date/range/getMonthRange.d.ts +1 -0
- package/dist/esm/utils/date/range/getYearRange.d.ts +1 -0
- package/dist/esm/utils/date/range/isValidDateRange.d.ts +3 -0
- package/dist/esm/utils/joinClasses.d.ts +1 -0
- package/dist/esm/utils/string/SetCharAt.d.ts +1 -0
- package/dist/esm/utils/string/toPascalCase.d.ts +1 -0
- package/package.json +24 -32
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -1
- package/dist/index.d.cts +0 -164
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ISelectedPeriod {
|
|
2
|
+
fromDate?: string;
|
|
3
|
+
toDate?: string;
|
|
4
|
+
periodSelected: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IStrictSelectedPeriod extends Omit<ISelectedPeriod, "fromDate" | "toDate"> {
|
|
7
|
+
fromDate: string;
|
|
8
|
+
toDate: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IDateItem<T = number> {
|
|
11
|
+
day: T;
|
|
12
|
+
month: T;
|
|
13
|
+
year: T;
|
|
14
|
+
}
|
|
15
|
+
export interface IPeriodKeys {
|
|
16
|
+
from: "from";
|
|
17
|
+
to: "to";
|
|
18
|
+
}
|
|
19
|
+
export type TPeriodKeys = keyof IPeriodKeys;
|
|
20
|
+
export interface ICalendarPeriod<T = number> {
|
|
21
|
+
from: IDateItem<T>;
|
|
22
|
+
to: IDateItem<T>;
|
|
23
|
+
}
|
|
24
|
+
export type TTimeUnit = keyof IDateItem;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const AccordionStory: () => React.JSX.Element;
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ open, setOpen, children, title, }: import("../components/Accordion").IAccordionProps) => React.JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ onClick, children, style, className, isRounded, disabled, variant, size, ariaLabel, }: import("../components/Button").IButtonProps) => import("react").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {};
|
|
11
|
+
args: {
|
|
12
|
+
onClick: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const IsRounded: Story;
|
|
18
|
+
export declare const NotRounded: Story;
|
|
19
|
+
export declare const Large: Story;
|
|
20
|
+
export declare const Medium: Story;
|
|
21
|
+
export declare const Small: Story;
|
|
22
|
+
export declare const Mini: Story;
|
|
23
|
+
export declare const VariantDefault: Story;
|
|
24
|
+
export declare const VariantTinted: Story;
|
|
25
|
+
export declare const VariantSecondary: Story;
|
|
26
|
+
export declare const VariantDefaultDisabled: Story;
|
|
27
|
+
export declare const VariantTintedDisabled: Story;
|
|
28
|
+
export declare const VariantSecondaryDisabled: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("../components/InputField").IInputFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {};
|
|
11
|
+
args: {
|
|
12
|
+
onChange: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
13
|
+
ariaLabel: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Default: Story;
|
|
19
|
+
export declare const LeftIcon: Story;
|
|
20
|
+
export declare const IsClearable: Story;
|
|
21
|
+
export declare const Label: Story;
|
|
22
|
+
export declare const InputGroup: () => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ open, setOpen, children, headerTitle, variant, }: import("../components/Modal").IModalProps) => React.JSX.Element | null;
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const SmallVariant: () => React.JSX.Element;
|
|
8
|
+
export declare const LargeVariant: () => React.JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ RadioGroupItems, invokeCustomOnChange, setSelectedOption, selectedOption, }: import("../components/RadioGroup").IRadioGroupProps) => import("react").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {};
|
|
11
|
+
args: {
|
|
12
|
+
RadioGroupItems: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
invokeCustomOnChange: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
17
|
+
setSelectedOption: () => void;
|
|
18
|
+
selectedOption: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ lock, setLock }: import("../components/RadioToggle").IRadioToggleProps) => React.JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Unlock: () => React.JSX.Element;
|
|
13
|
+
export declare const Lock: () => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("../components/Typography").ITypographyProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Typography: () => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreateArray: (n: number) => number[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GenerateArray: (length: number, start?: number) => number[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ICalendarPeriod, IDateItem } from "~interfaces/Calendar";
|
|
2
|
+
export declare const convertType: {
|
|
3
|
+
day: {
|
|
4
|
+
toString: (num: number) => string;
|
|
5
|
+
toNumber: (str: string) => number;
|
|
6
|
+
};
|
|
7
|
+
month: {
|
|
8
|
+
toString: (num: number) => string;
|
|
9
|
+
toNumber: (str: string) => number;
|
|
10
|
+
};
|
|
11
|
+
year: {
|
|
12
|
+
toString: (num: number) => string;
|
|
13
|
+
toNumber: (str: string) => number;
|
|
14
|
+
};
|
|
15
|
+
date: {
|
|
16
|
+
toString: ({ day, month, year }: IDateItem<number>) => {
|
|
17
|
+
day: string;
|
|
18
|
+
month: string;
|
|
19
|
+
year: string;
|
|
20
|
+
};
|
|
21
|
+
toNumber: ({ day, month, year }: IDateItem<string>) => {
|
|
22
|
+
day: number;
|
|
23
|
+
month: number;
|
|
24
|
+
year: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
dateRange: {
|
|
28
|
+
toString: ({ from: { day: fromday, month: fromMonth, year: fromYear }, to: { day: toDay, month: toMonth, year: toYear }, }: ICalendarPeriod<number>) => {
|
|
29
|
+
from: {
|
|
30
|
+
day: string;
|
|
31
|
+
month: string;
|
|
32
|
+
year: string;
|
|
33
|
+
};
|
|
34
|
+
to: {
|
|
35
|
+
day: string;
|
|
36
|
+
month: string;
|
|
37
|
+
year: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
toNumber: ({ from: { day: fromday, month: fromMonth, year: fromYear }, to: { day: toDay, month: toMonth, year: toYear }, }: ICalendarPeriod<string>) => {
|
|
41
|
+
from: {
|
|
42
|
+
day: number;
|
|
43
|
+
month: number;
|
|
44
|
+
year: number;
|
|
45
|
+
};
|
|
46
|
+
to: {
|
|
47
|
+
day: number;
|
|
48
|
+
month: number;
|
|
49
|
+
year: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatDate: (date: Date) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDaysInMonth: (month: number, year: number) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getMonthNameProper: (month: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const inverseDate: (dateStr: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getMonthRange: (month: number, year: number) => number[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getYearRange: (year: number) => string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const joinClasses: (...args: unknown[]) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SetCharAt: (str: string, index: number, chr: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toPascalCase: (str: string) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { Dispatch } from "react";
|
|
2
|
+
export interface IAccordionProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
setOpen: Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
title: React.JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
export declare const Accordion: ({ open, setOpen, children, title, }: IAccordionProps) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IButtonProps {
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
isRounded?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
variant?: 'default' | 'tinted' | 'secondary';
|
|
10
|
+
size?: 'mini' | 'small' | 'medium' | 'large';
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: ({ onClick, children, style, className, isRounded, disabled, variant, size, ariaLabel, }: IButtonProps) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { ICalendarPeriod, IDateItem, TPeriodKeys, TTimeUnit } from "~interfaces/Calendar";
|
|
3
|
+
export interface IBodyProps {
|
|
4
|
+
changeDate: IDateItem<(direction: number) => void>;
|
|
5
|
+
handleMouseDown: (e: React.MouseEvent, type: TTimeUnit) => void;
|
|
6
|
+
handleMouseUp: () => void;
|
|
7
|
+
selectedCalenderDate: ICalendarPeriod<string>;
|
|
8
|
+
selectedPeriodInterval: TPeriodKeys;
|
|
9
|
+
setDistanceTraveled: Dispatch<SetStateAction<number>>;
|
|
10
|
+
setInitialY: Dispatch<SetStateAction<number>>;
|
|
11
|
+
}
|
|
12
|
+
export declare const Body: ({ changeDate, handleMouseDown, handleMouseUp, selectedCalenderDate, selectedPeriodInterval, setDistanceTraveled, setInitialY, }: IBodyProps) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { ICalendarPeriod, IStrictSelectedPeriod } from "~interfaces/Calendar";
|
|
3
|
+
export interface IFooterProps {
|
|
4
|
+
selectedCalenderDate: ICalendarPeriod<string>;
|
|
5
|
+
setSelectedPeriod: Dispatch<SetStateAction<IStrictSelectedPeriod>>;
|
|
6
|
+
setIsModalOpen: Dispatch<SetStateAction<boolean>>;
|
|
7
|
+
setSelectedRadioOption: Dispatch<SetStateAction<string>>;
|
|
8
|
+
}
|
|
9
|
+
export declare const Footer: ({ selectedCalenderDate, setSelectedPeriod, setIsModalOpen, setSelectedRadioOption, }: IFooterProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { ICalendarPeriod, TPeriodKeys } from "~interfaces/Calendar";
|
|
3
|
+
export interface IHeaderProps {
|
|
4
|
+
setSelectedPeriodInterval: Dispatch<SetStateAction<TPeriodKeys>>;
|
|
5
|
+
selectedPeriodInterval: TPeriodKeys;
|
|
6
|
+
selectedCalenderDate: ICalendarPeriod<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare const Header: ({ setSelectedPeriodInterval, selectedPeriodInterval, selectedCalenderDate, }: IHeaderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { IStrictSelectedPeriod } from "~interfaces/Calendar";
|
|
3
|
+
export interface IMainProps {
|
|
4
|
+
setSelectedPeriod: Dispatch<SetStateAction<IStrictSelectedPeriod>>;
|
|
5
|
+
selectedPeriod: IStrictSelectedPeriod;
|
|
6
|
+
setIsModalOpen: Dispatch<SetStateAction<boolean>>;
|
|
7
|
+
setSelectedRadioOption: Dispatch<SetStateAction<string>>;
|
|
8
|
+
}
|
|
9
|
+
export declare const Main: ({ setSelectedPeriod, selectedPeriod, setIsModalOpen, setSelectedRadioOption, }: IMainProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const Calendar: {
|
|
3
|
+
Body: ({ changeDate, handleMouseDown, handleMouseUp, selectedCalenderDate, selectedPeriodInterval, setDistanceTraveled, setInitialY, }: import("./Body").IBodyProps) => import("react").JSX.Element;
|
|
4
|
+
Footer: ({ selectedCalenderDate, setSelectedPeriod, setIsModalOpen, setSelectedRadioOption, }: import("./Footer").IFooterProps) => import("react").JSX.Element;
|
|
5
|
+
Main: ({ setSelectedPeriod, selectedPeriod, setIsModalOpen, setSelectedRadioOption, }: import("./Main").IMainProps) => import("react").JSX.Element;
|
|
6
|
+
Header: ({ setSelectedPeriodInterval, selectedPeriodInterval, selectedCalenderDate, }: import("./Header").IHeaderProps) => import("react").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export { Calendar };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { HTMLInputTypeAttribute } from "react";
|
|
2
|
+
export type TOtpType = "OTP" | "TEXT";
|
|
3
|
+
export interface IInputFieldProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
+
onFocus?: () => void;
|
|
5
|
+
onBlur?: () => void;
|
|
6
|
+
onEnterPress?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
7
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
value?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
isClearable?: boolean;
|
|
13
|
+
inputLeftIcon?: JSX.Element;
|
|
14
|
+
type?: HTMLInputTypeAttribute;
|
|
15
|
+
id: string;
|
|
16
|
+
labelText?: string;
|
|
17
|
+
ariaLabel: string;
|
|
18
|
+
focused?: boolean;
|
|
19
|
+
setFocused?: (val: boolean) => void;
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const InputField: React.ForwardRefExoticComponent<Omit<IInputFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { Dispatch } from "react";
|
|
2
|
+
export interface IModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
children: JSX.Element;
|
|
5
|
+
setOpen: Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
headerTitle?: string;
|
|
7
|
+
variant: "large" | "small";
|
|
8
|
+
}
|
|
9
|
+
export declare const Modal: ({ open, setOpen, children, headerTitle, variant, }: IModalProps) => React.JSX.Element | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface RadioGroupItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ICustomRadioButtonProps {
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
checked: boolean;
|
|
10
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IRadioGroupProps {
|
|
14
|
+
RadioGroupItems: RadioGroupItem[];
|
|
15
|
+
invokeCustomOnChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
setSelectedOption: React.Dispatch<React.SetStateAction<string>>;
|
|
17
|
+
selectedOption: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const CustomRadioButton: ({ label, name, checked, onChange, value, }: ICustomRadioButtonProps) => React.JSX.Element;
|
|
20
|
+
export declare const RadioGroup: ({ RadioGroupItems, invokeCustomOnChange, setSelectedOption, selectedOption, }: IRadioGroupProps) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { Dispatch } from "react";
|
|
2
|
+
export interface ISelectBoxProps {
|
|
3
|
+
labelText?: string;
|
|
4
|
+
setIsOpen: Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
modalValue?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SelectBoxButton: ({ setIsOpen, labelText, disabled, error, modalValue, }: ISelectBoxProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
type TFontClass = "Heading1" | "Heading3" | "Subtitles3" | "Body1Medium" | "Body1Regular" | "Body2Medium" | "Body2Regular" | "Body3Regular" | "Caption1Medium" | "Caption1Regular" | "Caption1Semibold" | "Caption2Medium" | "Caption2Regular";
|
|
3
|
+
export interface ITypographyProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
tag: keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>;
|
|
5
|
+
fontClass: TFontClass;
|
|
6
|
+
}
|
|
7
|
+
export declare const Typography: FC<ITypographyProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Button } from "./Button";
|
|
3
|
+
export declare const Components: {
|
|
4
|
+
Accordion: ({ open, setOpen, children, title, }: import("./Accordion").IAccordionProps) => import("react").JSX.Element;
|
|
5
|
+
Button: ({ onClick, children, style, className, isRounded, disabled, variant, size, ariaLabel, }: import("./Button").IButtonProps) => import("react").JSX.Element;
|
|
6
|
+
Calendar: {
|
|
7
|
+
Body: ({ changeDate, handleMouseDown, handleMouseUp, selectedCalenderDate, selectedPeriodInterval, setDistanceTraveled, setInitialY, }: import("./Calendar/Body").IBodyProps) => import("react").JSX.Element;
|
|
8
|
+
Footer: ({ selectedCalenderDate, setSelectedPeriod, setIsModalOpen, setSelectedRadioOption, }: import("./Calendar/Footer").IFooterProps) => import("react").JSX.Element;
|
|
9
|
+
Main: ({ setSelectedPeriod, selectedPeriod, setIsModalOpen, setSelectedRadioOption, }: import("./Calendar/Main").IMainProps) => import("react").JSX.Element;
|
|
10
|
+
Header: ({ setSelectedPeriodInterval, selectedPeriodInterval, selectedCalenderDate, }: import("./Calendar/Header").IHeaderProps) => import("react").JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
CustomRadioButton: ({ label, name, checked, onChange, value, }: import("./RadioGroup").ICustomRadioButtonProps) => import("react").JSX.Element;
|
|
13
|
+
InputField: import("react").ForwardRefExoticComponent<Omit<import("./InputField").IInputFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
14
|
+
Modal: ({ open, setOpen, children, headerTitle, variant, }: import("./Modal").IModalProps) => import("react").JSX.Element | null;
|
|
15
|
+
RadioGroup: ({ RadioGroupItems, invokeCustomOnChange, setSelectedOption, selectedOption, }: import("./RadioGroup").IRadioGroupProps) => import("react").JSX.Element;
|
|
16
|
+
RadioToggle: ({ lock, setLock }: import("./RadioToggle").IRadioToggleProps) => import("react").JSX.Element;
|
|
17
|
+
SelectBoxButton: ({ setIsOpen, labelText, disabled, error, modalValue, }: import("./SelectBoxButton").ISelectBoxProps) => JSX.Element;
|
|
18
|
+
Typography: import("react").FC<import("./Typography").ITypographyProps>;
|
|
19
|
+
};
|
|
20
|
+
export { Button };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
import React__default, {
|
|
3
|
+
import React__default, { Dispatch, SetStateAction, HTMLInputTypeAttribute } from 'react';
|
|
4
|
+
import { TPeriodKeys, ICalendarPeriod, IStrictSelectedPeriod, IDateItem, TTimeUnit } from '~interfaces/Calendar';
|
|
3
5
|
|
|
4
6
|
type TFontClass = "Heading1" | "Heading3" | "Subtitles3" | "Body1Medium" | "Body1Regular" | "Body2Medium" | "Body2Regular" | "Body3Regular" | "Caption1Medium" | "Caption1Regular" | "Caption1Semibold" | "Caption2Medium" | "Caption2Regular";
|
|
5
7
|
interface ITypographyProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
@@ -46,7 +48,6 @@ interface IInputFieldProps extends React__default.DetailedHTMLProps<React__defau
|
|
|
46
48
|
focused?: boolean;
|
|
47
49
|
setFocused?: (val: boolean) => void;
|
|
48
50
|
readOnly?: boolean;
|
|
49
|
-
inline?: boolean;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
interface RadioGroupItem {
|
|
@@ -67,31 +68,6 @@ interface IRadioGroupProps {
|
|
|
67
68
|
selectedOption: string;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
interface ISelectedPeriod {
|
|
71
|
-
fromDate?: string;
|
|
72
|
-
toDate?: string;
|
|
73
|
-
periodSelected: boolean;
|
|
74
|
-
}
|
|
75
|
-
interface IStrictSelectedPeriod extends Omit<ISelectedPeriod, "fromDate" | "toDate"> {
|
|
76
|
-
fromDate: string;
|
|
77
|
-
toDate: string;
|
|
78
|
-
}
|
|
79
|
-
interface IDateItem<T = number> {
|
|
80
|
-
day: T;
|
|
81
|
-
month: T;
|
|
82
|
-
year: T;
|
|
83
|
-
}
|
|
84
|
-
interface IPeriodKeys {
|
|
85
|
-
from: "from";
|
|
86
|
-
to: "to";
|
|
87
|
-
}
|
|
88
|
-
type TPeriodKeys = keyof IPeriodKeys;
|
|
89
|
-
interface ICalendarPeriod<T = number> {
|
|
90
|
-
from: IDateItem<T>;
|
|
91
|
-
to: IDateItem<T>;
|
|
92
|
-
}
|
|
93
|
-
type TTimeUnit = keyof IDateItem;
|
|
94
|
-
|
|
95
71
|
interface IHeaderProps {
|
|
96
72
|
setSelectedPeriodInterval: Dispatch<SetStateAction<TPeriodKeys>>;
|
|
97
73
|
selectedPeriodInterval: TPeriodKeys;
|
|
@@ -129,8 +105,8 @@ interface IButtonProps {
|
|
|
129
105
|
className?: string;
|
|
130
106
|
isRounded?: boolean;
|
|
131
107
|
disabled?: boolean;
|
|
132
|
-
variant?:
|
|
133
|
-
size?:
|
|
108
|
+
variant?: 'default' | 'tinted' | 'secondary';
|
|
109
|
+
size?: 'mini' | 'small' | 'medium' | 'large';
|
|
134
110
|
style?: React__default.CSSProperties;
|
|
135
111
|
}
|
|
136
112
|
|
|
@@ -156,7 +132,7 @@ declare const SystemDesign: {
|
|
|
156
132
|
Modal: ({ open, setOpen, children, headerTitle, variant, }: IModalProps) => React.JSX.Element | null;
|
|
157
133
|
RadioGroup: ({ RadioGroupItems, invokeCustomOnChange, setSelectedOption, selectedOption, }: IRadioGroupProps) => React.JSX.Element;
|
|
158
134
|
RadioToggle: ({ lock, setLock }: IRadioToggleProps) => React.JSX.Element;
|
|
159
|
-
SelectBoxButton: ({ setIsOpen, labelText, disabled, error, modalValue, }: ISelectBoxProps) =>
|
|
135
|
+
SelectBoxButton: ({ setIsOpen, labelText, disabled, error, modalValue, }: ISelectBoxProps) => JSX.Element;
|
|
160
136
|
Typography: React.FC<ITypographyProps>;
|
|
161
137
|
};
|
|
162
138
|
};
|