widenarrow-ui 1.0.2 → 1.0.4
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/.eslintrc +72 -5
- package/.storybook/{main.js → main.ts} +9 -7
- package/lib/components/Box/Box.d.ts +4 -27
- package/lib/components/Box/Box.stories.d.ts +1 -1
- package/lib/components/Box/Box.types.d.ts +25 -0
- package/lib/components/Box/index.d.ts +1 -1
- package/lib/components/Button/Button.d.ts +4 -25
- package/lib/components/Button/Button.stories.d.ts +1 -1
- package/lib/components/Button/Button.types.d.ts +23 -0
- package/lib/components/Button/index.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.d.ts +4 -18
- package/lib/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.types.d.ts +16 -0
- package/lib/components/Checkbox/index.d.ts +1 -1
- package/lib/components/DropDown/DropDown.d.ts +4 -27
- package/lib/components/DropDown/DropDown.stories.d.ts +1 -1
- package/lib/components/DropDown/DropDown.types.d.ts +26 -0
- package/lib/components/DropDown/index.d.ts +1 -1
- package/lib/components/DropDownItem/DropDownItem.d.ts +4 -21
- package/lib/components/DropDownItem/DropDownItem.stories.d.ts +1 -1
- package/lib/components/DropDownItem/DropDownItem.types.d.ts +19 -0
- package/lib/components/DropDownItem/index.d.ts +1 -1
- package/lib/components/FacetButton/FacetButton.d.ts +4 -17
- package/lib/components/FacetButton/FacetButton.stories.d.ts +1 -1
- package/lib/components/FacetButton/FacetButton.types.d.ts +15 -0
- package/lib/components/FacetButton/index.d.ts +1 -1
- package/lib/components/FormSkeleton/FormSkeleton.d.ts +3 -10
- package/lib/components/FormSkeleton/FormSkeleton.types.d.ts +8 -0
- package/lib/components/FormSkeleton/index.d.ts +1 -1
- package/lib/components/Grid/Grid.d.ts +4 -49
- package/lib/components/Grid/Grid.stories.d.ts +1 -1
- package/lib/components/Grid/Grid.types.d.ts +51 -0
- package/lib/components/Grid/index.d.ts +1 -1
- package/lib/components/Icon/Icon.d.ts +3 -12
- package/lib/components/Icon/Icon.stories.d.ts +1 -1
- package/lib/components/Icon/Icon.types.d.ts +10 -0
- package/lib/components/Icon/getIconFromConstant.d.ts +2 -1
- package/lib/components/Icon/index.d.ts +1 -1
- package/lib/components/IconButton/IconButton.d.ts +4 -19
- package/lib/components/IconButton/IconButton.stories.d.ts +1 -1
- package/lib/components/IconButton/IconButton.types.d.ts +17 -0
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/Image/Image.d.ts +4 -19
- package/lib/components/Image/Image.stories.d.ts +1 -1
- package/lib/components/Image/Image.types.d.ts +18 -0
- package/lib/components/Image/index.d.ts +1 -1
- package/lib/components/InlineButton/InlineButton.d.ts +4 -21
- package/lib/components/InlineButton/InlineButton.stories.d.ts +1 -1
- package/lib/components/InlineButton/InlineButton.types.d.ts +19 -0
- package/lib/components/InlineButton/index.d.ts +1 -1
- package/lib/components/ListItem/ListItem.d.ts +4 -23
- package/lib/components/ListItem/ListItem.stories.d.ts +1 -1
- package/lib/components/ListItem/ListItem.types.d.ts +24 -0
- package/lib/components/ListItem/index.d.ts +1 -1
- package/lib/components/ListSkeleton/ListSkeleton.d.ts +3 -21
- package/lib/components/ListSkeleton/ListSkeleton.stories.d.ts +1 -1
- package/lib/components/ListSkeleton/ListSkeleton.types.d.ts +19 -0
- package/lib/components/ListSkeleton/index.d.ts +1 -1
- package/lib/components/MultiActionButton/MultiActionButton.d.ts +4 -28
- package/lib/components/MultiActionButton/MultiActionButton.stories.d.ts +1 -1
- package/lib/components/MultiActionButton/MultiActionButton.types.d.ts +26 -0
- package/lib/components/MultiActionButton/index.d.ts +1 -1
- package/lib/components/RadioButton/RadioButton.d.ts +3 -14
- package/lib/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/lib/components/RadioButton/RadioButton.types.d.ts +12 -0
- package/lib/components/RadioButton/index.d.ts +1 -1
- package/lib/components/Separator/Separator.d.ts +3 -12
- package/lib/components/Separator/Separator.stories.d.ts +1 -1
- package/lib/components/Separator/Separator.types.d.ts +7 -0
- package/lib/components/Separator/index.d.ts +1 -1
- package/lib/components/SolidSpinner/SolidSpinner.d.ts +3 -12
- package/lib/components/SolidSpinner/SolidSpinner.stories.d.ts +1 -1
- package/lib/components/SolidSpinner/SolidSpinner.types.d.ts +10 -0
- package/lib/components/SolidSpinner/index.d.ts +1 -1
- package/lib/components/SortableTable/SortableTable.d.ts +4 -30
- package/lib/components/SortableTable/SortableTable.stories.d.ts +1 -1
- package/lib/components/SortableTable/SortableTable.types.d.ts +37 -0
- package/lib/components/SortableTable/index.d.ts +1 -1
- package/lib/components/SwitchButton/SwitchButton.d.ts +3 -13
- package/lib/components/SwitchButton/SwitchButton.stories.d.ts +1 -1
- package/lib/components/SwitchButton/SwitchButton.types.d.ts +11 -0
- package/lib/components/SwitchButton/index.d.ts +1 -1
- package/lib/components/ToolTip/ToolTip.d.ts +7 -24
- package/lib/components/ToolTip/ToolTip.types.d.ts +15 -0
- package/lib/components/ToolTip/index.d.ts +1 -1
- package/lib/components/Typography/Typography.d.ts +7 -60
- package/lib/components/Typography/Typography.types.d.ts +37 -0
- package/lib/components/Typography/index.d.ts +1 -2
- package/lib/components/index.d.ts +19 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +733 -23
- package/lib/index.esm.css +1 -1
- package/lib/index.esm.js +638 -741
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +649 -755
- package/lib/index.js.map +1 -1
- package/lib/utils.d.ts +17 -10
- package/package.json +25 -16
- package/rollup.config.mjs +3 -1
- package/src/assets/svg/askWideNarrow.tsx +1 -1
- package/src/assets/svg/textReplace.tsx +1 -1
- package/src/components/Box/Box.stories.tsx +4 -4
- package/src/components/Box/Box.tsx +4 -29
- package/src/components/Box/Box.types.ts +26 -0
- package/src/components/Box/index.ts +1 -0
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/Button.tsx +16 -40
- package/src/components/Button/Button.types.ts +24 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +7 -7
- package/src/components/Checkbox/Checkbox.tsx +5 -20
- package/src/components/Checkbox/Checkbox.types.ts +17 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/DropDown/DropDown.stories.tsx +3 -3
- package/src/components/DropDown/DropDown.tsx +13 -31
- package/src/components/DropDown/DropDown.types.ts +26 -0
- package/src/components/DropDown/index.ts +1 -0
- package/src/components/DropDownItem/DropDownItem.stories.tsx +1 -1
- package/src/components/DropDownItem/DropDownItem.tsx +11 -31
- package/src/components/DropDownItem/DropDownItem.types.ts +20 -0
- package/src/components/DropDownItem/index.ts +1 -0
- package/src/components/FacetButton/FacetButton.stories.tsx +1 -1
- package/src/components/FacetButton/FacetButton.tsx +7 -25
- package/src/components/FacetButton/FacetButton.types.ts +16 -0
- package/src/components/FacetButton/index.ts +1 -0
- package/src/components/FormSkeleton/FormSkeleton.tsx +4 -13
- package/src/components/FormSkeleton/FormSkeleton.types.ts +9 -0
- package/src/components/FormSkeleton/index.ts +1 -0
- package/src/components/Grid/Grid.stories.tsx +6 -5
- package/src/components/Grid/Grid.tsx +4 -56
- package/src/components/Grid/Grid.types.ts +53 -0
- package/src/components/Grid/index.ts +1 -0
- package/src/components/Icon/Icon.stories.tsx +1 -1
- package/src/components/Icon/Icon.tsx +9 -24
- package/src/components/Icon/Icon.types.ts +11 -0
- package/src/components/Icon/Iconography.mdx +0 -1
- package/src/components/Icon/Iconography.tsx +1 -1
- package/src/components/Icon/getIconFromConstant.tsx +1 -1
- package/src/components/Icon/index.ts +1 -0
- package/src/components/IconButton/IconButton.stories.tsx +1 -1
- package/src/components/IconButton/IconButton.tsx +70 -84
- package/src/components/IconButton/IconButton.types.ts +19 -0
- package/src/components/IconButton/index.ts +1 -0
- package/src/components/Image/Image.stories.tsx +1 -1
- package/src/components/Image/Image.tsx +6 -23
- package/src/components/Image/Image.types.ts +19 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/InlineButton/InlineButton.stories.tsx +1 -1
- package/src/components/InlineButton/InlineButton.tsx +70 -85
- package/src/components/InlineButton/InlineButton.types.ts +20 -0
- package/src/components/InlineButton/index.ts +1 -0
- package/src/components/ListItem/ListItem.stories.tsx +4 -4
- package/src/components/ListItem/ListItem.tsx +13 -33
- package/src/components/ListItem/ListItem.types.ts +25 -0
- package/src/components/ListItem/index.ts +1 -0
- package/src/components/ListSkeleton/ListSkeleton.stories.tsx +1 -1
- package/src/components/ListSkeleton/ListSkeleton.tsx +3 -21
- package/src/components/ListSkeleton/ListSkeleton.types.ts +20 -0
- package/src/components/ListSkeleton/index.ts +1 -0
- package/src/components/MultiActionButton/MultiActionButton.stories.tsx +1 -1
- package/src/components/MultiActionButton/MultiActionButton.tsx +20 -47
- package/src/components/MultiActionButton/MultiActionButton.types.ts +27 -0
- package/src/components/MultiActionButton/index.ts +1 -0
- package/src/components/RadioButton/RadioButton.stories.tsx +1 -1
- package/src/components/RadioButton/RadioButton.tsx +4 -16
- package/src/components/RadioButton/RadioButton.types.ts +12 -0
- package/src/components/RadioButton/index.ts +1 -0
- package/src/components/Separator/Separator.stories.tsx +1 -1
- package/src/components/Separator/Separator.tsx +3 -13
- package/src/components/Separator/Separator.types.ts +8 -0
- package/src/components/Separator/index.ts +1 -0
- package/src/components/SolidSpinner/SolidSpinner.stories.tsx +1 -1
- package/src/components/SolidSpinner/SolidSpinner.tsx +11 -12
- package/src/components/SolidSpinner/SolidSpinner.types.ts +11 -0
- package/src/components/SolidSpinner/index.ts +1 -0
- package/src/components/SortableTable/SortableTable.stories.tsx +2 -2
- package/src/components/SortableTable/SortableTable.tsx +31 -54
- package/src/components/SortableTable/SortableTable.types.ts +40 -0
- package/src/components/SortableTable/index.ts +1 -0
- package/src/components/SwitchButton/SwitchButton.stories.tsx +1 -1
- package/src/components/SwitchButton/SwitchButton.tsx +3 -14
- package/src/components/SwitchButton/SwitchButton.types.ts +11 -0
- package/src/components/SwitchButton/index.ts +1 -0
- package/src/components/ToolTip/ToolTip.tsx +12 -33
- package/src/components/ToolTip/ToolTip.types.ts +16 -0
- package/src/components/ToolTip/index.ts +1 -0
- package/src/components/Typography/Typography.tsx +10 -78
- package/src/components/Typography/Typography.types.ts +45 -0
- package/src/components/Typography/index.ts +1 -0
- package/src/components/index.ts +19 -0
- package/src/index.ts +3 -60
- package/src/styles/colors.scss +1 -1
- package/src/styles/mixins.scss +1 -1
- package/src/types/{styling.ts → styling.types.ts} +0 -2
- package/src/utils.ts +26 -21
- package/tsconfig.json +3 -1
- package/src/components/Box/index.tsx +0 -1
- package/src/components/Button/index.tsx +0 -1
- package/src/components/Checkbox/index.tsx +0 -1
- package/src/components/DropDown/index.tsx +0 -1
- package/src/components/DropDownItem/index.tsx +0 -1
- package/src/components/FacetButton/index.tsx +0 -1
- package/src/components/FormSkeleton/index.tsx +0 -1
- package/src/components/Grid/index.tsx +0 -1
- package/src/components/Icon/index.tsx +0 -1
- package/src/components/IconButton/index.tsx +0 -1
- package/src/components/Image/index.tsx +0 -1
- package/src/components/InlineButton/index.tsx +0 -1
- package/src/components/ListItem/index.tsx +0 -1
- package/src/components/ListSkeleton/index.tsx +0 -1
- package/src/components/MultiActionButton/index.tsx +0 -1
- package/src/components/RadioButton/index.tsx +0 -1
- package/src/components/Separator/index.tsx +0 -1
- package/src/components/SolidSpinner/index.tsx +0 -1
- package/src/components/SortableTable/index.tsx +0 -1
- package/src/components/SwitchButton/index.tsx +0 -1
- package/src/components/ToolTip/index.tsx +0 -1
- package/src/components/Typography/index.tsx +0 -2
- /package/lib/types/{styling.d.ts → styling.types.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SizeTypes } from '../../constants';
|
|
2
|
+
import { ColorStyleInterface, IconStyleInterface } from '../../types/styling.types';
|
|
3
|
+
export interface IconProps extends ColorStyleInterface, IconStyleInterface {
|
|
4
|
+
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE | SizeTypes.AUTO | undefined;
|
|
5
|
+
rotateIcon?: boolean | undefined;
|
|
6
|
+
rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
toolTip?: string | undefined;
|
|
10
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { IconTypes } from 'src/constants';
|
|
2
|
+
declare const getIconFromConstant: (icon: Partial<IconTypes>, getIconClassName: (additionalClassName?: string) => string) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
3
|
export default getIconFromConstant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Icon';
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
className?: string;
|
|
6
|
-
rotateIcon?: boolean;
|
|
7
|
-
rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
8
|
-
iconClassName?: string;
|
|
9
|
-
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
10
|
-
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
-
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
12
|
-
iconColor?: Partial<ColorTypes>;
|
|
13
|
-
href?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
toolTip?: string;
|
|
16
|
-
ariaLabel?: string;
|
|
17
|
-
}
|
|
18
|
-
declare const _default: import("react").NamedExoticComponent<Props>;
|
|
19
|
-
export default _default;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconButtonProps } from './IconButton.types';
|
|
3
|
+
declare const IconButton: FC<IconButtonProps>;
|
|
4
|
+
export { IconButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import IconButton from 'src/components/IconButton';
|
|
2
|
+
import { IconButton } from 'src/components/IconButton';
|
|
3
3
|
declare const meta: Meta<typeof IconButton>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof IconButton>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { IconStyleInterface, SizeStyleInterface } from '../../types/styling.types';
|
|
3
|
+
import { ColorTypes, HierarchyTypes, SizeTypes } from '../../constants';
|
|
4
|
+
export interface IconButtonProps extends IconStyleInterface, SizeStyleInterface {
|
|
5
|
+
className?: string;
|
|
6
|
+
rotateIcon?: boolean;
|
|
7
|
+
rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
8
|
+
iconClassName?: string;
|
|
9
|
+
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
10
|
+
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
12
|
+
iconColor?: Partial<ColorTypes>;
|
|
13
|
+
href?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
toolTip?: string;
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './IconButton';
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
alt?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
imageClassName?: string;
|
|
8
|
-
customComponent?: ReactNode;
|
|
9
|
-
aspectRatio?: Partial<AspectRatioTypes>;
|
|
10
|
-
withContainer?: boolean;
|
|
11
|
-
bgImage?: boolean;
|
|
12
|
-
bgImageProps?: {
|
|
13
|
-
size: 'cover' | 'contain';
|
|
14
|
-
position: 'top' | 'bottom' | 'center';
|
|
15
|
-
};
|
|
16
|
-
placeHolderColor?: string;
|
|
17
|
-
}
|
|
18
|
-
declare const Image: FC<Props>;
|
|
19
|
-
export default Image;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ImageProps } from './Image.types';
|
|
3
|
+
declare const Image: FC<ImageProps>;
|
|
4
|
+
export { Image };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AspectRatioTypes } from '../../constants';
|
|
3
|
+
export interface ImageProps {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
imageClassName?: string;
|
|
8
|
+
customCellComponent?: ReactNode;
|
|
9
|
+
aspectRatio?: Partial<AspectRatioTypes>;
|
|
10
|
+
bgImage?: boolean;
|
|
11
|
+
bgImageProps?: {
|
|
12
|
+
size: 'cover' | 'contain';
|
|
13
|
+
position: 'top' | 'bottom' | 'center';
|
|
14
|
+
};
|
|
15
|
+
placeHolderColor?: string;
|
|
16
|
+
customComponent?: ReactNode;
|
|
17
|
+
withContainer?: boolean;
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Image';
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
className?: string;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
icon?: Partial<IconTypes>;
|
|
9
|
-
rotateIcon?: boolean;
|
|
10
|
-
iconClassName?: string;
|
|
11
|
-
withIconRight?: boolean;
|
|
12
|
-
type?: Partial<HierarchyTypes>;
|
|
13
|
-
size?: SizeTypes.SMALL | SizeTypes.MEDIUM;
|
|
14
|
-
textClassName?: string;
|
|
15
|
-
withEllipsis?: boolean;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
style?: object;
|
|
18
|
-
toolTip?: string;
|
|
19
|
-
}
|
|
20
|
-
declare const _default: import("react").NamedExoticComponent<Props>;
|
|
21
|
-
export default _default;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { InlineButtonProps } from './InlineButton.types';
|
|
3
|
+
declare const InlineButton: FC<InlineButtonProps>;
|
|
4
|
+
export { InlineButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import InlineButton from 'src/components/InlineButton';
|
|
2
|
+
import { InlineButton } from 'src/components/InlineButton';
|
|
3
3
|
declare const meta: Meta<typeof InlineButton>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof InlineButton>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { HierarchyTypes, IconTypes, SizeTypes } from '../../constants';
|
|
3
|
+
export interface InlineButtonProps {
|
|
4
|
+
text: string;
|
|
5
|
+
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
icon?: Partial<IconTypes>;
|
|
9
|
+
rotateIcon?: boolean;
|
|
10
|
+
iconClassName?: string;
|
|
11
|
+
withIconRight?: boolean;
|
|
12
|
+
type?: Partial<HierarchyTypes>;
|
|
13
|
+
size?: SizeTypes.SMALL | SizeTypes.MEDIUM;
|
|
14
|
+
textClassName?: string;
|
|
15
|
+
withEllipsis?: boolean;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
style?: object;
|
|
18
|
+
toolTip?: string;
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './InlineButton';
|
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
buttonsComponent?: ReactNode;
|
|
6
|
-
contentComponent?: ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
imageSrc?: string;
|
|
9
|
-
withBorderRadius?: boolean;
|
|
10
|
-
imageIcon?: Partial<IconTypes>;
|
|
11
|
-
size: Partial<SizeTypes>;
|
|
12
|
-
imageAspectRatio?: Partial<AspectRatioTypes>;
|
|
13
|
-
borderColor?: Partial<ColorTypes>;
|
|
14
|
-
backgroundColor?: Partial<ColorTypes>;
|
|
15
|
-
wrapperElement?: 'div' | 'li' | 'section' | 'link';
|
|
16
|
-
border?: '1' | '2' | '3';
|
|
17
|
-
borderTop?: '1' | '2' | '3';
|
|
18
|
-
borderBottom?: '1' | '2' | '3';
|
|
19
|
-
onClickCallback?: () => void;
|
|
20
|
-
linkTo?: string;
|
|
21
|
-
}
|
|
22
|
-
declare const ListItem: FC<Props>;
|
|
23
|
-
export default ListItem;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ListItemProps } from './ListItem.types';
|
|
3
|
+
declare const ListItem: FC<ListItemProps>;
|
|
4
|
+
export { ListItem };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MarginInterface, PaddingInterface } from '../../types/styling.types';
|
|
3
|
+
import { AspectRatioTypes, ColorTypes, IconTypes, SizeTypes } from '../../constants';
|
|
4
|
+
export interface ListItemProps extends MarginInterface, PaddingInterface {
|
|
5
|
+
buttonsComponent?: ReactNode;
|
|
6
|
+
contentComponent?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
imageSrc?: string;
|
|
9
|
+
withBorderRadius?: boolean;
|
|
10
|
+
imageIcon?: Partial<IconTypes>;
|
|
11
|
+
size: Partial<SizeTypes>;
|
|
12
|
+
imageAspectRatio?: Partial<AspectRatioTypes>;
|
|
13
|
+
borderColor?: Partial<ColorTypes>;
|
|
14
|
+
backgroundColor?: Partial<ColorTypes>;
|
|
15
|
+
wrapperElement?: 'div' | 'li' | 'section' | 'link';
|
|
16
|
+
border?: '1' | '2' | '3';
|
|
17
|
+
borderTop?: '1' | '2' | '3';
|
|
18
|
+
borderBottom?: '1' | '2' | '3';
|
|
19
|
+
onClickCallback?: () => void;
|
|
20
|
+
linkTo?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
imageContainerClassName?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './ListItem';
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
itemHeight?: number;
|
|
6
|
-
className?: string;
|
|
7
|
-
itemClassName?: string;
|
|
8
|
-
withBorderRadius?: boolean;
|
|
9
|
-
withContent?: boolean;
|
|
10
|
-
backgroundColor?: Partial<ColorTypes>;
|
|
11
|
-
marginBottom?: string;
|
|
12
|
-
padding?: string;
|
|
13
|
-
borderColor?: Partial<ColorTypes>;
|
|
14
|
-
border?: '1' | '2' | '3';
|
|
15
|
-
borderTop?: '1' | '2' | '3';
|
|
16
|
-
borderBottom?: '1' | '2' | '3';
|
|
17
|
-
borderRight?: '1' | '2' | '3';
|
|
18
|
-
borderLeft?: '1' | '2' | '3';
|
|
19
|
-
contentColor?: Partial<ColorTypes>;
|
|
20
|
-
}
|
|
21
|
-
declare const ListSkeleton: FC<Props>;
|
|
22
|
-
export default ListSkeleton;
|
|
2
|
+
import { ListSkeletonProps } from './ListSkeleton.types';
|
|
3
|
+
declare const ListSkeleton: FC<ListSkeletonProps>;
|
|
4
|
+
export { ListSkeleton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import ListSkeleton from 'src/components/ListSkeleton';
|
|
2
|
+
import { ListSkeleton } from 'src/components/ListSkeleton';
|
|
3
3
|
declare const meta: Meta<typeof ListSkeleton>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof ListSkeleton>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ColorTypes } from '../../constants';
|
|
2
|
+
export interface ListSkeletonProps {
|
|
3
|
+
items: number;
|
|
4
|
+
itemHeight?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
itemClassName?: string;
|
|
7
|
+
withBorderRadius?: boolean;
|
|
8
|
+
withContent?: boolean;
|
|
9
|
+
backgroundColor?: Partial<ColorTypes>;
|
|
10
|
+
marginBottom?: string;
|
|
11
|
+
padding?: string;
|
|
12
|
+
borderColor?: Partial<ColorTypes>;
|
|
13
|
+
border?: '1' | '2' | '3';
|
|
14
|
+
borderTop?: '1' | '2' | '3';
|
|
15
|
+
borderBottom?: '1' | '2' | '3';
|
|
16
|
+
borderRight?: '1' | '2' | '3';
|
|
17
|
+
borderLeft?: '1' | '2' | '3';
|
|
18
|
+
contentColor?: Partial<ColorTypes>;
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './ListSkeleton';
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onLeftClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
onRightClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
-
type?: Partial<HierarchyTypes>;
|
|
8
|
-
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
9
|
-
leftIconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
10
|
-
rightIconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
11
|
-
leftIcon?: Partial<IconTypes>;
|
|
12
|
-
rightIcon?: Partial<IconTypes>;
|
|
13
|
-
rotateLeftIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
14
|
-
rotateRightIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
className?: string;
|
|
17
|
-
iconClassName?: string;
|
|
18
|
-
toolTip?: string;
|
|
19
|
-
id?: string | number;
|
|
20
|
-
loading?: boolean;
|
|
21
|
-
withEllipsis?: boolean;
|
|
22
|
-
autoFocus?: boolean;
|
|
23
|
-
ariaLabel?: string;
|
|
24
|
-
tabIndex?: number;
|
|
25
|
-
withSeparator?: boolean;
|
|
26
|
-
}
|
|
27
|
-
declare const MultiActionButton: FC<Props>;
|
|
28
|
-
export default MultiActionButton;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MultiActionButtonProps } from './MultiActionButton.types';
|
|
3
|
+
declare const MultiActionButton: FC<MultiActionButtonProps>;
|
|
4
|
+
export { MultiActionButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import MultiActionButton from 'src/components/MultiActionButton';
|
|
2
|
+
import { MultiActionButton } from 'src/components/MultiActionButton';
|
|
3
3
|
declare const meta: Meta<typeof MultiActionButton>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof MultiActionButton>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { HierarchyTypes, IconTypes, SizeTypes } from '../../constants';
|
|
3
|
+
export interface MultiActionButtonProps {
|
|
4
|
+
text?: string;
|
|
5
|
+
onLeftClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
onRightClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
type?: Partial<HierarchyTypes>;
|
|
8
|
+
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
9
|
+
leftIconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
10
|
+
rightIconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
11
|
+
leftIcon?: Partial<IconTypes>;
|
|
12
|
+
rightIcon?: Partial<IconTypes>;
|
|
13
|
+
rotateLeftIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
14
|
+
rotateRightIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
iconClassName?: string;
|
|
18
|
+
toolTip?: string;
|
|
19
|
+
id?: string | number;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
withEllipsis?: boolean;
|
|
22
|
+
autoFocus?: boolean;
|
|
23
|
+
ariaLabel?: string;
|
|
24
|
+
tabIndex?: number;
|
|
25
|
+
withSeparator?: boolean;
|
|
26
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './MultiActionButton';
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
label?: string;
|
|
6
|
-
value?: string | number;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
helperText?: string;
|
|
9
|
-
marginRight?: boolean;
|
|
10
|
-
checked: boolean;
|
|
11
|
-
toolTip?: string;
|
|
12
|
-
onChange: (value: string | number) => void;
|
|
13
|
-
}
|
|
14
|
-
declare const RadioButton: FC<Props>;
|
|
15
|
-
export default RadioButton;
|
|
2
|
+
import { RadioButtonProps } from './RadioButton.types';
|
|
3
|
+
declare const RadioButton: FC<RadioButtonProps>;
|
|
4
|
+
export { RadioButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import RadioButton from 'src/components/RadioButton';
|
|
2
|
+
import { RadioButton } from 'src/components/RadioButton';
|
|
3
3
|
declare const meta: Meta<typeof RadioButton>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof RadioButton>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface RadioButtonProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
value?: string | number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
marginRight?: boolean;
|
|
9
|
+
checked: boolean;
|
|
10
|
+
toolTip?: string;
|
|
11
|
+
onChange: (value?: string | number) => void;
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './RadioButton';
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
className?: string;
|
|
6
|
-
color?: Partial<ColorTypes>;
|
|
7
|
-
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
8
|
-
}
|
|
9
|
-
interface Props {
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
declare const Separator: FC<Props>;
|
|
13
|
-
export default Separator;
|
|
2
|
+
import { SeparatorProps } from './Separator.types';
|
|
3
|
+
declare const Separator: FC<SeparatorProps>;
|
|
4
|
+
export { Separator };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import Separator from 'src/components/Separator';
|
|
2
|
+
import { Separator } from 'src/components/Separator';
|
|
3
3
|
declare const meta: Meta<typeof Separator>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Separator>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MarginInterface, PaddingInterface } from '../../types/styling.types';
|
|
2
|
+
import { ColorTypes, SizeTypes } from '../../constants';
|
|
3
|
+
export interface SeparatorProps extends MarginInterface, PaddingInterface {
|
|
4
|
+
className?: string;
|
|
5
|
+
color?: Partial<ColorTypes>;
|
|
6
|
+
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Separator';
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
size?: SizeTypes.EXTRA_SMALL | SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
labelClassName?: string;
|
|
10
|
-
absoluteCenter?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const SolidSpinner: FC<Props>;
|
|
13
|
-
export default SolidSpinner;
|
|
2
|
+
import { SolidSpinnerProps } from './SolidSpinner.types';
|
|
3
|
+
declare const SolidSpinner: FC<SolidSpinnerProps>;
|
|
4
|
+
export { SolidSpinner };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import SolidSpinner from 'src/components/SolidSpinner';
|
|
2
|
+
import { SolidSpinner } from 'src/components/SolidSpinner';
|
|
3
3
|
declare const meta: Meta<typeof SolidSpinner>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof SolidSpinner>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HierarchyTypes, SizeTypes } from '../../constants';
|
|
2
|
+
export interface SolidSpinnerProps {
|
|
3
|
+
type?: Partial<HierarchyTypes>;
|
|
4
|
+
size?: SizeTypes.EXTRA_SMALL | SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
labelClassName?: string;
|
|
9
|
+
absoluteCenter?: boolean;
|
|
10
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './SolidSpinner';
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
title: string;
|
|
6
|
-
width: string;
|
|
7
|
-
disableSort?: boolean;
|
|
8
|
-
alignRight?: boolean;
|
|
9
|
-
alignCenter?: boolean;
|
|
10
|
-
withEllipsis?: boolean;
|
|
11
|
-
toolTip?: string;
|
|
12
|
-
customHeaderCellComponent?: (row: object, cell: object) => ReactNode;
|
|
13
|
-
customCellComponent?: (row: object, cell: object) => ReactNode;
|
|
14
|
-
}>;
|
|
15
|
-
data?: Array<object>;
|
|
16
|
-
sortBy: Array<{
|
|
17
|
-
keyName: string;
|
|
18
|
-
ascending: boolean;
|
|
19
|
-
}>;
|
|
20
|
-
className?: string;
|
|
21
|
-
headerClassName?: string;
|
|
22
|
-
rowClassName?: string;
|
|
23
|
-
loading?: boolean;
|
|
24
|
-
skeletonRows?: number;
|
|
25
|
-
withStickyHeader?: boolean;
|
|
26
|
-
withIntersectionObserver?: boolean;
|
|
27
|
-
onSortCallback?: (keyName: string) => void;
|
|
28
|
-
}
|
|
29
|
-
declare const SortableTable: FC<Props>;
|
|
30
|
-
export default SortableTable;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SortableTableProps } from './SortableTable.types';
|
|
3
|
+
declare const SortableTable: FC<SortableTableProps>;
|
|
4
|
+
export { SortableTable };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import SortableTable from 'src/components/SortableTable';
|
|
2
|
+
import { SortableTable } from 'src/components/SortableTable';
|
|
3
3
|
declare const meta: Meta<typeof SortableTable>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof SortableTable>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconTypes } from '../../constants';
|
|
3
|
+
export interface RowProps {
|
|
4
|
+
row: object;
|
|
5
|
+
rowClassName?: string;
|
|
6
|
+
withIntersectionObserver?: boolean | undefined;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface CellInterface {
|
|
10
|
+
key: string;
|
|
11
|
+
title: string;
|
|
12
|
+
width: string;
|
|
13
|
+
icon?: Partial<IconTypes>;
|
|
14
|
+
disableSort?: boolean;
|
|
15
|
+
alignRight?: boolean;
|
|
16
|
+
alignCenter?: boolean;
|
|
17
|
+
withEllipsis?: boolean;
|
|
18
|
+
toolTip?: string;
|
|
19
|
+
customHeaderCellComponent?: (cell: CellInterface) => ReactNode;
|
|
20
|
+
customCellComponent?: (row: object) => ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface SortableTableProps {
|
|
23
|
+
cells: Array<CellInterface>;
|
|
24
|
+
data: Array<object>;
|
|
25
|
+
sortBy: Array<{
|
|
26
|
+
keyName: string;
|
|
27
|
+
ascending: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
className?: string;
|
|
30
|
+
rowClassName?: string;
|
|
31
|
+
headerClassName?: string;
|
|
32
|
+
loading?: boolean;
|
|
33
|
+
skeletonRows?: number;
|
|
34
|
+
withStickyHeader?: boolean;
|
|
35
|
+
withIntersectionObserver?: boolean;
|
|
36
|
+
onSortCallback?: (keyName: string) => void;
|
|
37
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './SortableTable';
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
label?: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
alignCenter?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
marginBottom?: boolean;
|
|
10
|
-
inlineLabel?: boolean;
|
|
11
|
-
onClickCallback: () => void;
|
|
12
|
-
}
|
|
13
|
-
declare const SwitchButton: FC<Props>;
|
|
14
|
-
export default SwitchButton;
|
|
2
|
+
import { SwitchButtonProps } from './SwitchButton.types';
|
|
3
|
+
declare const SwitchButton: FC<SwitchButtonProps>;
|
|
4
|
+
export { SwitchButton };
|