widenarrow-ui 0.1.32 → 0.1.33
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/.storybook/main.js +1 -1
- package/.storybook/preview.js +4 -0
- package/lib/components/Box/Box.d.ts +7 -6
- package/lib/components/Button/Button.d.ts +2 -2
- package/lib/components/DropDownItem/DropDownItem.d.ts +4 -4
- package/lib/components/FacetButton/FacetButton.d.ts +1 -1
- package/lib/components/IconButton/IconButton.d.ts +1 -1
- package/lib/components/Image/Image.d.ts +17 -0
- package/lib/components/Image/Image.stories.d.ts +6 -0
- package/lib/components/Image/index.d.ts +1 -0
- package/lib/components/InlineButton/InlineButton.d.ts +2 -2
- package/lib/components/ListSkeleton/ListSkeleton.d.ts +8 -3
- package/lib/components/MultiActionButton/MultiActionButton.d.ts +3 -3
- package/lib/components/Separator/Separator.d.ts +1 -1
- package/lib/components/SolidSpinner/SolidSpinner.d.ts +1 -1
- package/lib/components/SortableTable/SortableTable.d.ts +29 -0
- package/lib/components/SortableTable/SortableTable.stories.d.ts +7 -0
- package/lib/components/SortableTable/index.d.ts +1 -0
- package/lib/constants.d.ts +9 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.esm.css +1 -1
- package/lib/index.esm.js +335 -93
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +335 -91
- package/lib/index.js.map +1 -1
- package/lib/types/styling.d.ts +4 -4
- package/lib/utils.d.ts +57 -0
- package/package.json +5 -2
- package/src/components/Box/Box.module.scss +1 -22
- package/src/components/Box/Box.tsx +10 -7
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/DropDownItem/DropDownItem.tsx +4 -4
- package/src/components/FacetButton/FacetButton.tsx +1 -1
- package/src/components/IconButton/IconButton.tsx +1 -1
- package/src/components/Image/Image.module.scss +95 -0
- package/src/components/Image/Image.stories.tsx +23 -0
- package/src/components/Image/Image.tsx +98 -0
- package/src/components/Image/index.tsx +1 -0
- package/src/components/InlineButton/InlineButton.tsx +2 -2
- package/src/components/ListSkeleton/ListSkeleton.module.scss +0 -4
- package/src/components/ListSkeleton/ListSkeleton.tsx +19 -5
- package/src/components/MultiActionButton/MultiActionButton.tsx +3 -3
- package/src/components/Separator/Separator.tsx +1 -1
- package/src/components/SolidSpinner/SolidSpinner.tsx +1 -1
- package/src/components/SortableTable/SortableTable.module.scss +107 -0
- package/src/components/SortableTable/SortableTable.stories.tsx +65 -0
- package/src/components/SortableTable/SortableTable.tsx +239 -0
- package/src/components/SortableTable/index.tsx +1 -0
- package/src/constants.ts +10 -0
- package/src/index.ts +7 -2
- package/src/styles/mixins.scss +23 -118
- package/src/styles/variables.scss +2 -48
- package/src/types/styling.ts +6 -4
- package/src/utils.ts +114 -1
- package/lib/index.d.ts.map +0 -1
package/.storybook/main.js
CHANGED
package/.storybook/preview.js
CHANGED
|
@@ -2,6 +2,10 @@ import './normalize.css';
|
|
|
2
2
|
import './fonts.css';
|
|
3
3
|
import './storybook.css';
|
|
4
4
|
|
|
5
|
+
import 'lazysizes';
|
|
6
|
+
import 'lazysizes/plugins/attrchange/ls.attrchange';
|
|
7
|
+
import 'lazysizes/plugins/bgset/ls.bgset';
|
|
8
|
+
|
|
5
9
|
export const parameters = {
|
|
6
10
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
7
11
|
layout: 'centered'
|
|
@@ -5,13 +5,14 @@ interface Props extends MarginInterface, PaddingInterface, FlexStylingInterface
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
7
|
position?: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
borderColor?: Partial<ColorTypes>;
|
|
9
|
+
border?: '1' | '2' | '3';
|
|
10
|
+
borderTop?: '1' | '2' | '3';
|
|
11
|
+
borderBottom?: '1' | '2' | '3';
|
|
12
|
+
borderRight?: '1' | '2' | '3';
|
|
13
|
+
borderLeft?: '1' | '2' | '3';
|
|
14
|
+
backgroundColor?: Partial<ColorTypes>;
|
|
13
15
|
showOnBreakpoint?: string;
|
|
14
|
-
borderLeft?: string;
|
|
15
16
|
withBorderRadius?: boolean;
|
|
16
17
|
width?: string;
|
|
17
18
|
minWidth?: string;
|
|
@@ -3,9 +3,9 @@ import { HierarchyTypes, SizeTypes, IconTypes } from 'src/constants';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
text?: string;
|
|
5
5
|
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
type?:
|
|
6
|
+
type?: Partial<HierarchyTypes>;
|
|
7
7
|
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
8
|
-
icon?:
|
|
8
|
+
icon?: Partial<IconTypes>;
|
|
9
9
|
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
10
10
|
withIconLeft?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
@@ -10,11 +10,11 @@ interface Props {
|
|
|
10
10
|
wrapperElement?: 'div' | 'li';
|
|
11
11
|
className?: string;
|
|
12
12
|
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
13
|
-
leftIcon?:
|
|
14
|
-
rightIcon?:
|
|
13
|
+
leftIcon?: Partial<IconTypes>;
|
|
14
|
+
rightIcon?: Partial<IconTypes>;
|
|
15
15
|
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
16
|
-
iconColor?:
|
|
17
|
-
textColor?:
|
|
16
|
+
iconColor?: Partial<ColorTypes>;
|
|
17
|
+
textColor?: Partial<ColorTypes>;
|
|
18
18
|
iconClassName?: string;
|
|
19
19
|
}
|
|
20
20
|
declare const DropDownItem: FC<Props>;
|
|
@@ -9,7 +9,7 @@ interface Props extends IconStyleInterface, SizeStyleInterface {
|
|
|
9
9
|
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
10
10
|
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
11
11
|
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
12
|
-
iconColor?:
|
|
12
|
+
iconColor?: Partial<ColorTypes>;
|
|
13
13
|
href?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
toolTip?: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { AspectRatioTypes } from 'src/constants';
|
|
3
|
+
interface Props {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
customCellComponent?: ReactNode;
|
|
8
|
+
aspectRatio?: Partial<AspectRatioTypes>;
|
|
9
|
+
bgImage?: boolean;
|
|
10
|
+
bgImageProps?: {
|
|
11
|
+
size: 'cover' | 'contain';
|
|
12
|
+
position: 'top' | 'bottom' | 'center';
|
|
13
|
+
};
|
|
14
|
+
placeHolderColor?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const Image: FC<Props>;
|
|
17
|
+
export default Image;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Image';
|
|
@@ -5,11 +5,11 @@ interface Props {
|
|
|
5
5
|
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
6
|
className?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
-
icon?:
|
|
8
|
+
icon?: Partial<IconTypes>;
|
|
9
9
|
rotateIcon?: boolean;
|
|
10
10
|
iconClassName?: string;
|
|
11
11
|
withIconRight?: boolean;
|
|
12
|
-
type?:
|
|
12
|
+
type?: Partial<HierarchyTypes>;
|
|
13
13
|
size?: SizeTypes.SMALL | SizeTypes.MEDIUM;
|
|
14
14
|
textClassName?: string;
|
|
15
15
|
withEllipsis?: boolean;
|
|
@@ -7,11 +7,16 @@ interface Props {
|
|
|
7
7
|
itemClassName?: string;
|
|
8
8
|
withBorderRadius?: boolean;
|
|
9
9
|
withContent?: boolean;
|
|
10
|
-
backgroundColor?:
|
|
10
|
+
backgroundColor?: Partial<ColorTypes>;
|
|
11
11
|
marginBottom?: string;
|
|
12
12
|
padding?: string;
|
|
13
|
-
borderColor?:
|
|
14
|
-
|
|
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>;
|
|
15
20
|
}
|
|
16
21
|
declare const ListSkeleton: FC<Props>;
|
|
17
22
|
export default ListSkeleton;
|
|
@@ -4,12 +4,12 @@ interface Props {
|
|
|
4
4
|
text?: string;
|
|
5
5
|
onLeftClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
6
|
onRightClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
-
type?:
|
|
7
|
+
type?: Partial<HierarchyTypes>;
|
|
8
8
|
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
9
9
|
leftIconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
10
10
|
rightIconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
11
|
-
leftIcon?:
|
|
12
|
-
rightIcon?:
|
|
11
|
+
leftIcon?: Partial<IconTypes>;
|
|
12
|
+
rightIcon?: Partial<IconTypes>;
|
|
13
13
|
rotateLeftIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
14
14
|
rotateRightIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
15
15
|
disabled?: boolean;
|
|
@@ -3,7 +3,7 @@ import { MarginInterface, PaddingInterface } from 'src/types/styling';
|
|
|
3
3
|
import { SizeTypes, ColorTypes } from 'src/constants';
|
|
4
4
|
interface Props extends MarginInterface, PaddingInterface {
|
|
5
5
|
className?: string;
|
|
6
|
-
color?:
|
|
6
|
+
color?: Partial<ColorTypes>;
|
|
7
7
|
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
8
8
|
}
|
|
9
9
|
interface Props {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { HierarchyTypes, SizeTypes } from 'src/constants';
|
|
3
3
|
interface Props {
|
|
4
|
-
type?:
|
|
4
|
+
type?: Partial<HierarchyTypes>;
|
|
5
5
|
size?: SizeTypes.EXTRA_SMALL | SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
className?: string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
cells: Array<{
|
|
4
|
+
key: string;
|
|
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
|
+
fetching?: boolean;
|
|
23
|
+
skeletonRows?: number;
|
|
24
|
+
withStickyHeader?: boolean;
|
|
25
|
+
withIntersectionObserver?: boolean;
|
|
26
|
+
onSortCallback?: (keyName: string) => void;
|
|
27
|
+
}
|
|
28
|
+
declare const SortableTable: FC<Props>;
|
|
29
|
+
export default SortableTable;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import SortableTable from 'src/components/SortableTable';
|
|
3
|
+
declare const meta: Meta<typeof SortableTable>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SortableTable>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Custom: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SortableTable';
|
package/lib/constants.d.ts
CHANGED
|
@@ -194,6 +194,15 @@ export declare enum HierarchyTypes {
|
|
|
194
194
|
SECONDARY = "secondary",
|
|
195
195
|
TERTIARY = "tertiary"
|
|
196
196
|
}
|
|
197
|
+
export declare enum AspectRatioTypes {
|
|
198
|
+
ar4_1 = "ar4_1",
|
|
199
|
+
ar3_1 = "ar3_1",
|
|
200
|
+
ar21_9 = "ar21_9",
|
|
201
|
+
ar16_9 = "ar16_9",
|
|
202
|
+
ar21_13 = "ar21_13",
|
|
203
|
+
ar4_3 = "ar4_3",
|
|
204
|
+
ar1_1 = "ar1_1"
|
|
205
|
+
}
|
|
197
206
|
export declare enum ColorTypes {
|
|
198
207
|
WHITE = "white",
|
|
199
208
|
BLUE = "blue",
|