@risalabs_frontend_org/oasis-ui-kit 0.1.0
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 +25 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/library/colors.scss +136 -0
- package/dist/library/globalStyles.scss +22 -0
- package/dist/library/globalVarialbes.scss +16 -0
- package/dist/library/library.scss +2 -0
- package/dist/library/mixins.scss +895 -0
- package/dist/src/SVG/ChevronDown.d.ts +6 -0
- package/dist/src/SVG/arrow-upward.d.ts +2 -0
- package/dist/src/SVG/black-eye-stroke.d.ts +2 -0
- package/dist/src/SVG/black-eye.d.ts +3 -0
- package/dist/src/SVG/calendar-icon.d.ts +3 -0
- package/dist/src/SVG/close-red.d.ts +2 -0
- package/dist/src/SVG/close.d.ts +3 -0
- package/dist/src/SVG/dashed-vertical-line.d.ts +2 -0
- package/dist/src/SVG/delete-bin.d.ts +2 -0
- package/dist/src/SVG/down-arrow.d.ts +3 -0
- package/dist/src/SVG/error-for-toast.d.ts +2 -0
- package/dist/src/SVG/green-cross.d.ts +2 -0
- package/dist/src/SVG/infoIcon.d.ts +8 -0
- package/dist/src/SVG/left-chevron.d.ts +8 -0
- package/dist/src/SVG/red-bin.d.ts +2 -0
- package/dist/src/SVG/red-cross.d.ts +2 -0
- package/dist/src/SVG/right-chevron.d.ts +8 -0
- package/dist/src/SVG/tick-for-toast.d.ts +2 -0
- package/dist/src/SVG/tick-with-green-bg.d.ts +2 -0
- package/dist/src/SVG/tick.d.ts +3 -0
- package/dist/src/SVG/up-arrow.d.ts +3 -0
- package/dist/src/SVG/uploaded-doc.d.ts +2 -0
- package/dist/src/SVG/warning-icon.d.ts +3 -0
- package/dist/src/components/ButtonWithDropdown/ButtonWithDropdown.d.ts +16 -0
- package/dist/src/components/ButtonWithDropdown/MenuItem.d.ts +15 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/src/components/DateRangeCalendar/DateRangeCalendar.d.ts +10 -0
- package/dist/src/components/button/button.d.ts +11 -0
- package/dist/src/components/check-box/check-box.d.ts +14 -0
- package/dist/src/components/date-input/date-input.d.ts +25 -0
- package/dist/src/components/file-upload/file-upload.d.ts +11 -0
- package/dist/src/components/footer/footer.d.ts +13 -0
- package/dist/src/components/header-card/header-card.d.ts +10 -0
- package/dist/src/components/info-icon/info-icon.d.ts +12 -0
- package/dist/src/components/modal/modal.d.ts +21 -0
- package/dist/src/components/notification-card/notification-card.d.ts +15 -0
- package/dist/src/components/pagination/index.d.ts +1 -0
- package/dist/src/components/pagination/pagination.d.ts +12 -0
- package/dist/src/components/progress-loader-with-text/progress-loader-with-text.d.ts +8 -0
- package/dist/src/components/search/search.d.ts +9 -0
- package/dist/src/components/select/select.d.ts +26 -0
- package/dist/src/components/side-navigation/side-navigation.d.ts +10 -0
- package/dist/src/components/side-navigation/single-side-nav.d.ts +8 -0
- package/dist/src/components/spinning-loader/spinning-loader.d.ts +3 -0
- package/dist/src/components/status-text/status-text.d.ts +7 -0
- package/dist/src/components/stepper/stepper.d.ts +11 -0
- package/dist/src/components/tab/single-tab.d.ts +9 -0
- package/dist/src/components/tab/tab-container.d.ts +10 -0
- package/dist/src/components/text-input/text-input.d.ts +36 -0
- package/dist/src/components/time-due/time-due.d.ts +6 -0
- package/dist/src/components/toast/toast.d.ts +12 -0
- package/dist/src/components/toggle/toggle.d.ts +14 -0
- package/dist/src/components/toggle-switch/toggle-switch.d.ts +13 -0
- package/dist/src/components/uploaded-file-banner/uploaded-file-banner.d.ts +9 -0
- package/dist/src/shared/types.d.ts +160 -0
- package/package.json +82 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MenuItemData } from "./MenuItem";
|
|
3
|
+
import "./ButtonWithDropdown.scss";
|
|
4
|
+
interface ButtonWithDropdownProps {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement | HTMLSpanElement>, isOpen: boolean) => void;
|
|
8
|
+
onButtonClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;
|
|
9
|
+
buttonType: "primary" | "secondary" | "tertiary" | "danger";
|
|
10
|
+
size: "small" | "medium" | "large";
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
menuData: MenuItemData[];
|
|
13
|
+
alwaysOpenDropdown?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function ButtonWithDropdown(props: ButtonWithDropdownProps): React.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface MenuItemData {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: (item: MenuItemData) => void;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
interface MenuItemProps {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
color?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function MenuItem({ label, onClick, className, color }: MenuItemProps): React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./DateRangeCalendar.scss";
|
|
3
|
+
interface DateRangeCalendarProps {
|
|
4
|
+
onDateRangeChange?: (startDate: Date | null, endDate: Date | null) => void;
|
|
5
|
+
initialStartDate?: Date;
|
|
6
|
+
initialEndDate?: Date;
|
|
7
|
+
resetSelection?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function DateRangeCalendar(props: DateRangeCalendarProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./button.scss";
|
|
3
|
+
interface ButtonProps {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
buttonType: "primary" | "secondary" | "tertiary" | "danger";
|
|
8
|
+
size: "small" | "medium" | "large";
|
|
9
|
+
}
|
|
10
|
+
export declare function Button(props: ButtonProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./check-box.scss";
|
|
3
|
+
interface CheckBoxProps {
|
|
4
|
+
label: string;
|
|
5
|
+
defaultValue?: boolean;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
id: string;
|
|
8
|
+
onCheckBoxValueChange: (data: {
|
|
9
|
+
name: string;
|
|
10
|
+
value: boolean;
|
|
11
|
+
}) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function CheckBox(props: CheckBoxProps): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./date-input.scss";
|
|
3
|
+
interface OnBlurData {
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
required: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface DateInputProps {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
hint?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
hasError?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
onBlur?: (data: OnBlurData) => void;
|
|
17
|
+
onChange?: (data: OnBlurData) => void;
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
value?: string;
|
|
20
|
+
format?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function DateInput(props: DateInputProps): React.JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./file-upload.scss";
|
|
3
|
+
interface FileUploadProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
file?: File;
|
|
6
|
+
fileName?: string;
|
|
7
|
+
reUpload?: boolean;
|
|
8
|
+
deleteUploadedFile: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function FileUpload(props: FileUploadProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./footer.scss";
|
|
3
|
+
interface FooterProps {
|
|
4
|
+
cancelButtonText: string;
|
|
5
|
+
submitButtonText: React.ReactNode;
|
|
6
|
+
onCancelClick: () => void;
|
|
7
|
+
onSubmitClick: () => void;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
isCancelDisabled?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function Footer(props: FooterProps): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import './header-card.scss';
|
|
3
|
+
interface HeaderCardProps {
|
|
4
|
+
number: number;
|
|
5
|
+
text: string;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
textColor?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function HeaderCard(props: HeaderCardProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./info-icon.scss";
|
|
3
|
+
type Direction = "left" | "right" | "top" | "bottom";
|
|
4
|
+
interface InfoIconProps {
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
maxHeight?: number;
|
|
9
|
+
directionToDisplay?: Direction;
|
|
10
|
+
}
|
|
11
|
+
export declare const InfoIconWithTooltip: React.FC<InfoIconProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./modal.scss";
|
|
3
|
+
interface ModalProps {
|
|
4
|
+
dialogId: string;
|
|
5
|
+
onSave: () => void | Promise<void>;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
title: string;
|
|
8
|
+
saveButtonText: string;
|
|
9
|
+
onCancel?: () => void | Promise<void>;
|
|
10
|
+
onClose?: () => void | Promise<void>;
|
|
11
|
+
cancelText: string;
|
|
12
|
+
heightPercentage?: number;
|
|
13
|
+
showSingleButton?: boolean;
|
|
14
|
+
disableSave?: boolean;
|
|
15
|
+
hideFooter?: boolean;
|
|
16
|
+
autoCloseOnSave?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function Modal(props: ModalProps): React.JSX.Element;
|
|
19
|
+
export declare function openModal(arg0: string): void;
|
|
20
|
+
export declare function closeModal(arg0: string, onCloseFunc?: any): void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './notification-card.scss';
|
|
3
|
+
export interface Notification {
|
|
4
|
+
id: number;
|
|
5
|
+
icon: string;
|
|
6
|
+
title: string;
|
|
7
|
+
datetime: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
type Props = {
|
|
11
|
+
notifications: Notification[];
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const NotificationCard: React.FC<Props>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Pagination } from "./pagination";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./pagination.scss";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface PaginationProps {
|
|
4
|
+
currentPage: number;
|
|
5
|
+
totalPages: number;
|
|
6
|
+
onPrevious: () => void;
|
|
7
|
+
onNext: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function Pagination({ currentPage, totalPages, onPrevious, onNext, disabled, className, }: PaginationProps): React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./progress-loader-with-text.scss";
|
|
3
|
+
interface ProgressLoaderWithTextProps {
|
|
4
|
+
progress: number;
|
|
5
|
+
text?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ProgressLoaderWithText(props: ProgressLoaderWithTextProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './search.scss';
|
|
3
|
+
interface SearchComponentProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
searchButtonText?: string;
|
|
6
|
+
onSearch: (query: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SearchComponent: React.FC<SearchComponentProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./select.scss";
|
|
3
|
+
interface Option {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface SelectProps {
|
|
8
|
+
required?: boolean;
|
|
9
|
+
id: string;
|
|
10
|
+
onOptionChange: (data: OptionChangeData) => void;
|
|
11
|
+
error?: string;
|
|
12
|
+
label: string;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
hint?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
options: Option[];
|
|
17
|
+
value?: string;
|
|
18
|
+
resetValue?: boolean;
|
|
19
|
+
shouldOmitPrevSelectedValueOnReset?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface OptionChangeData {
|
|
22
|
+
name: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function Select(props: SelectProps): React.JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './side-navigation.scss';
|
|
3
|
+
export interface SideNavigationProps {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
sideNavContent?: React.ComponentType<any>;
|
|
7
|
+
}
|
|
8
|
+
export declare const SideNavigation: React.FC<{
|
|
9
|
+
sideTabContent: SideNavigationProps[];
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./stepper.scss";
|
|
3
|
+
export interface StepperProps {
|
|
4
|
+
id: number;
|
|
5
|
+
currentActiveIndex?: number;
|
|
6
|
+
label: string;
|
|
7
|
+
stepperText: string;
|
|
8
|
+
showDashedLine?: boolean;
|
|
9
|
+
stepperContent?: React.ComponentType<any>;
|
|
10
|
+
}
|
|
11
|
+
export declare function Stepper(props: StepperProps): React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./single-tab.scss";
|
|
3
|
+
export interface SingleTabProps {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
tabContent?: (...args: any[]) => any;
|
|
7
|
+
currentActiveTab?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function SingleTab(props: SingleTabProps): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./tab-container.scss";
|
|
3
|
+
import { SingleTabProps } from "./single-tab";
|
|
4
|
+
interface TabContainerProps {
|
|
5
|
+
tabsDetails: SingleTabProps[];
|
|
6
|
+
tabContainerId: string;
|
|
7
|
+
currentActiveTabIndex?: (index: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function TabContainer(props: TabContainerProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./text-input.scss";
|
|
3
|
+
interface TextInputProps {
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
onBlur?: (data: {
|
|
7
|
+
name: string;
|
|
8
|
+
required: boolean;
|
|
9
|
+
value: any;
|
|
10
|
+
}) => void;
|
|
11
|
+
id: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
hasError?: boolean;
|
|
16
|
+
textHidden?: boolean;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
onChange?: (data: {
|
|
19
|
+
name: string;
|
|
20
|
+
required: boolean;
|
|
21
|
+
value: any;
|
|
22
|
+
}) => void;
|
|
23
|
+
resetField?: boolean;
|
|
24
|
+
formatInput?: (value: string) => string;
|
|
25
|
+
labelSuffix?: React.ReactNode;
|
|
26
|
+
hideLabel?: boolean;
|
|
27
|
+
type?: "text" | "number";
|
|
28
|
+
onKeyDown?: (data: {
|
|
29
|
+
name: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
value: any;
|
|
32
|
+
}, event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function TextInput(props: TextInputProps): React.JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./toast.scss";
|
|
3
|
+
interface ToastProps {
|
|
4
|
+
type: "success" | "error";
|
|
5
|
+
header: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
duration?: number;
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Toast: React.FC<ToastProps>;
|
|
11
|
+
export declare const controlToastState: (id: string, state?: boolean) => void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './toggle.scss';
|
|
3
|
+
interface ToggleProps {
|
|
4
|
+
label: string;
|
|
5
|
+
id: string;
|
|
6
|
+
onChange?: (data: {
|
|
7
|
+
name: string;
|
|
8
|
+
required: boolean;
|
|
9
|
+
value: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
defaultValue: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function Toggle(props: ToggleProps): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './toggle-switch.scss';
|
|
3
|
+
interface ToggleSwitchProps {
|
|
4
|
+
id: string;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
onChangeEmit: (data: {
|
|
7
|
+
name: string;
|
|
8
|
+
required: boolean;
|
|
9
|
+
value: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function ToggleSwitch(props: ToggleSwitchProps): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./uploaded-file-banner.scss";
|
|
3
|
+
interface UploadedFileBannerProps {
|
|
4
|
+
fileName: string;
|
|
5
|
+
deleteUploadedFile: () => void;
|
|
6
|
+
currentProgress: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function UploadedFileBanner(props: UploadedFileBannerProps): React.JSX.Element;
|
|
9
|
+
export {};
|