widenarrow-ui 1.0.2 → 1.0.3
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 +24 -15
- 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/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
package/.eslintrc
CHANGED
|
@@ -1,12 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"plugins": ["react", "import", "@typescript-eslint"],
|
|
4
|
+
"extends": ["react-app", "airbnb-base", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended"],
|
|
3
5
|
"rules": {
|
|
4
|
-
"
|
|
6
|
+
"@typescript-eslint/explicit-module-boundary-types": 0,
|
|
7
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
8
|
+
"@typescript-eslint/no-use-before-define": "warn",
|
|
9
|
+
"@typescript-eslint/no-var-requires": 0,
|
|
10
|
+
"@typescript-eslint/rule-name": 0,
|
|
11
|
+
"arrow-parens": 0,
|
|
12
|
+
"class-methods-use-this": 0,
|
|
13
|
+
"comma-dangle": ["error", "never"],
|
|
14
|
+
"consistent-return": 0,
|
|
15
|
+
"default-param-last": 0,
|
|
16
|
+
"func-names": 0,
|
|
17
|
+
"function-paren-newline": 0,
|
|
18
|
+
"generator-star-spacing": 0,
|
|
19
|
+
"implicit-arrow-linebreak": 0,
|
|
20
|
+
"import/extensions": 0,
|
|
21
|
+
"import/no-extraneous-dependencies": 0,
|
|
22
|
+
"import/no-mutable-exports": "warn",
|
|
23
|
+
"import/prefer-default-export": 0,
|
|
24
|
+
"indent": 0,
|
|
25
|
+
"linebreak-style": 0,
|
|
26
|
+
"no-confusing-arrow": 0,
|
|
5
27
|
"no-console": "warn",
|
|
28
|
+
"no-continue": 0,
|
|
29
|
+
"no-mixed-spaces-and-tabs": 0,
|
|
30
|
+
"no-nested-ternary": 0,
|
|
31
|
+
"no-param-reassign": 0,
|
|
32
|
+
"no-plusplus": 0,
|
|
33
|
+
"no-restricted-globals": 0,
|
|
34
|
+
"no-restricted-syntax": 0,
|
|
35
|
+
"no-return-assign": ["error", "except-parens"],
|
|
36
|
+
"no-shadow": 0,
|
|
37
|
+
"no-tabs": ["warn", { "allowIndentationTabs": true }],
|
|
38
|
+
"no-undef": ["warn", { "typeof": true }],
|
|
39
|
+
"no-underscore-dangle": 0,
|
|
40
|
+
"no-unused-expressions": ["error", { "allowTernary": true, "allowShortCircuit": true }],
|
|
41
|
+
"no-use-before-define": "warn",
|
|
42
|
+
"object-curly-newline": 0,
|
|
43
|
+
"operator-linebreak": 0,
|
|
44
|
+
"prefer-destructuring": 0,
|
|
45
|
+
"prefer-regex-literals": 0,
|
|
46
|
+
"react/display-name": 0,
|
|
47
|
+
"react/forbid-prop-types": 0,
|
|
48
|
+
"react/no-deprecated": "warn",
|
|
49
|
+
"react/react-in-jsx-scope": 0,
|
|
50
|
+
"space-before-function-paren": 0,
|
|
6
51
|
"spaced-comment": "warn",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
52
|
+
"template-curly-spacing": 0,
|
|
53
|
+
"max-len": [
|
|
54
|
+
"error",
|
|
55
|
+
{
|
|
56
|
+
"code": 140,
|
|
57
|
+
"tabWidth": 2,
|
|
58
|
+
"ignoreComments": true,
|
|
59
|
+
"ignoreUrls": true,
|
|
60
|
+
"ignoreStrings": true,
|
|
61
|
+
"ignoreTemplateLiterals": true,
|
|
62
|
+
"ignoreRegExpLiterals": true
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"import/no-unresolved": [
|
|
66
|
+
"error",
|
|
67
|
+
{
|
|
68
|
+
"ignore": [
|
|
69
|
+
"components/*",
|
|
70
|
+
"constants/*",
|
|
71
|
+
"types/*",
|
|
72
|
+
"utils/*",
|
|
73
|
+
"assets/*"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
10
77
|
},
|
|
11
78
|
"env": {
|
|
12
79
|
"jest": true,
|
|
@@ -25,13 +25,15 @@ module.exports = {
|
|
|
25
25
|
}
|
|
26
26
|
],
|
|
27
27
|
webpackFinal: async (config) => {
|
|
28
|
-
config.resolve
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
if (config.resolve) {
|
|
29
|
+
config.resolve.plugins = [
|
|
30
|
+
...(config.resolve.plugins || []),
|
|
31
|
+
new TsconfigPathsPlugin({
|
|
32
|
+
configFile: path.resolve(__dirname, '../tsconfig.json'),
|
|
33
|
+
extensions: config.resolve.extensions
|
|
34
|
+
})
|
|
35
|
+
];
|
|
36
|
+
}
|
|
35
37
|
return config;
|
|
36
38
|
},
|
|
37
39
|
docs: {
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
position?: string;
|
|
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>;
|
|
15
|
-
showOnBreakpoint?: string;
|
|
16
|
-
withBorderRadius?: boolean;
|
|
17
|
-
width?: string;
|
|
18
|
-
minWidth?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Max width in percentage e.g 50 = 50%
|
|
21
|
-
*/
|
|
22
|
-
maxWidth?: string;
|
|
23
|
-
style?: CSSProperties;
|
|
24
|
-
onClickCallback?: () => void;
|
|
25
|
-
}
|
|
26
|
-
declare const Box: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
export default Box;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from './Box.types';
|
|
3
|
+
declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Box };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { FlexStylingInterface, MarginInterface, PaddingInterface } from '../../types/styling.types';
|
|
3
|
+
import { ColorTypes } from '../../constants';
|
|
4
|
+
export interface BoxProps extends MarginInterface, PaddingInterface, FlexStylingInterface {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
position?: string;
|
|
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>;
|
|
15
|
+
showOnBreakpoint?: string;
|
|
16
|
+
withBorderRadius?: boolean;
|
|
17
|
+
width?: string;
|
|
18
|
+
minWidth?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Max width in percentage e.g 50 = 50%
|
|
21
|
+
*/
|
|
22
|
+
maxWidth?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
onClickCallback?: () => void;
|
|
25
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Box';
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
type?: Partial<HierarchyTypes>;
|
|
7
|
-
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
8
|
-
icon?: Partial<IconTypes>;
|
|
9
|
-
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
10
|
-
withIconLeft?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
toolTip?: string;
|
|
14
|
-
style?: CSSProperties;
|
|
15
|
-
withEllipsis?: boolean;
|
|
16
|
-
rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
17
|
-
id?: string | number;
|
|
18
|
-
loading?: boolean;
|
|
19
|
-
autoFocus?: boolean;
|
|
20
|
-
children?: ReactNode;
|
|
21
|
-
ariaLabel?: string;
|
|
22
|
-
tabIndex?: number;
|
|
23
|
-
}
|
|
24
|
-
declare const Button: FC<Props>;
|
|
25
|
-
export default Button;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ButtonProps } from './Button.types';
|
|
3
|
+
declare const Button: FC<ButtonProps>;
|
|
4
|
+
export { Button };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { HierarchyTypes, IconTypes, SizeTypes } from '../../constants';
|
|
3
|
+
export interface ButtonProps {
|
|
4
|
+
text?: string;
|
|
5
|
+
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
type?: Partial<HierarchyTypes>;
|
|
7
|
+
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
8
|
+
icon?: Partial<IconTypes>;
|
|
9
|
+
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE | SizeTypes.AUTO;
|
|
10
|
+
withIconLeft?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
toolTip?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
withEllipsis?: boolean;
|
|
16
|
+
rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
17
|
+
id?: string | number;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
autoFocus?: boolean;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
tabIndex?: number;
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Button';
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
-
onChangeFake?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
7
|
-
className?: string;
|
|
8
|
-
ariaLabel?: string;
|
|
9
|
-
helperText?: string;
|
|
10
|
-
checked: boolean;
|
|
11
|
-
blocked?: boolean;
|
|
12
|
-
indeterminate?: boolean;
|
|
13
|
-
wordWrap?: boolean;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
isFake?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare const Checkbox: FC<Props>;
|
|
18
|
-
export default Checkbox;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CheckboxProps } from './Checkbox.types';
|
|
3
|
+
declare const Checkbox: FC<CheckboxProps>;
|
|
4
|
+
export { Checkbox };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChangeEvent, MouseEvent } from 'react';
|
|
2
|
+
export interface CheckboxProps {
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
onChangeFake?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
blocked?: boolean;
|
|
12
|
+
indeterminate?: boolean;
|
|
13
|
+
wordWrap?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
isFake?: boolean;
|
|
16
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
buttonComponent: ReactNode;
|
|
6
|
-
buttonCallbackName?: string;
|
|
7
|
-
footerComponent?: ReactNode;
|
|
8
|
-
title?: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
childrenClassName?: string;
|
|
11
|
-
dark?: boolean;
|
|
12
|
-
withArrow?: boolean;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
childrenIsList?: boolean;
|
|
15
|
-
withVisibleOverflow?: boolean;
|
|
16
|
-
placement?: Placement;
|
|
17
|
-
strategy?: PositioningStrategy;
|
|
18
|
-
offset?: {
|
|
19
|
-
horizontal: number;
|
|
20
|
-
vertical: number;
|
|
21
|
-
};
|
|
22
|
-
arrowPadding?: number;
|
|
23
|
-
onCloseCallback?: () => void;
|
|
24
|
-
onOpenCallback?: () => void;
|
|
25
|
-
}
|
|
26
|
-
declare const DropDown: FC<Props>;
|
|
27
|
-
export default DropDown;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DropDownProps } from './DropDown.types';
|
|
3
|
+
declare const DropDown: FC<DropDownProps>;
|
|
4
|
+
export { DropDown };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Placement, PositioningStrategy } from '@popperjs/core';
|
|
3
|
+
export interface DropDownProps {
|
|
4
|
+
children: ReactNode[] | ReactNode;
|
|
5
|
+
buttonComponent: ReactNode;
|
|
6
|
+
buttonCallbackName?: string;
|
|
7
|
+
footerComponent?: ReactNode;
|
|
8
|
+
title?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
childrenClassName?: string;
|
|
11
|
+
dark?: boolean;
|
|
12
|
+
withArrow?: boolean;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
childrenIsList?: boolean;
|
|
15
|
+
withVisibleOverflow?: boolean;
|
|
16
|
+
closeDropDownOnClick?: boolean;
|
|
17
|
+
placement?: Placement;
|
|
18
|
+
strategy?: PositioningStrategy;
|
|
19
|
+
offset?: {
|
|
20
|
+
horizontal: number;
|
|
21
|
+
vertical: number;
|
|
22
|
+
};
|
|
23
|
+
arrowPadding?: number;
|
|
24
|
+
onCloseCallback?: () => void;
|
|
25
|
+
onOpenCallback?: () => void;
|
|
26
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './DropDown';
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
7
|
-
active?: boolean;
|
|
8
|
-
withChevronRight?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
wrapperElement?: 'div' | 'li';
|
|
11
|
-
className?: string;
|
|
12
|
-
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
13
|
-
leftIcon?: Partial<IconTypes>;
|
|
14
|
-
rightIcon?: Partial<IconTypes>;
|
|
15
|
-
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
16
|
-
iconColor?: Partial<ColorTypes>;
|
|
17
|
-
textColor?: Partial<ColorTypes>;
|
|
18
|
-
iconClassName?: string;
|
|
19
|
-
}
|
|
20
|
-
declare const DropDownItem: FC<Props>;
|
|
21
|
-
export default DropDownItem;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DropDownItemProps } from './DropDownItem.types';
|
|
3
|
+
declare const DropDownItem: FC<DropDownItemProps>;
|
|
4
|
+
export { DropDownItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import DropDownItem from 'src/components/DropDownItem';
|
|
2
|
+
import { DropDownItem } from 'src/components/DropDownItem';
|
|
3
3
|
declare const meta: Meta<typeof DropDownItem>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof DropDownItem>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { ColorTypes, HierarchyTypes, IconTypes, SizeTypes } from '../../constants';
|
|
3
|
+
export interface DropDownItemProps {
|
|
4
|
+
text: string;
|
|
5
|
+
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
withChevronRight?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
wrapperElement?: 'div' | 'li';
|
|
11
|
+
className?: string;
|
|
12
|
+
type?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
13
|
+
leftIcon?: Partial<IconTypes>;
|
|
14
|
+
rightIcon?: Partial<IconTypes>;
|
|
15
|
+
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
16
|
+
iconColor?: Partial<ColorTypes>;
|
|
17
|
+
textColor?: 'inherit' | 'white' | 'grey' | 'black' | 'green' | 'red' | 'orange' | 'blue' | undefined;
|
|
18
|
+
iconClassName?: string;
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './DropDownItem';
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
component?: ReactNode;
|
|
6
|
-
id?: string | number;
|
|
7
|
-
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
selected?: boolean;
|
|
10
|
-
icon?: Partial<IconTypes>;
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
toolTip?: string;
|
|
14
|
-
percent: number;
|
|
15
|
-
}
|
|
16
|
-
declare const FacetButton: FC<Props>;
|
|
17
|
-
export default FacetButton;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FacetButtonProps } from './FacetButton.types';
|
|
3
|
+
declare const FacetButton: FC<FacetButtonProps>;
|
|
4
|
+
export { FacetButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import FacetButton from 'src/components/FacetButton';
|
|
2
|
+
import { FacetButton } from 'src/components/FacetButton';
|
|
3
3
|
declare const meta: Meta<typeof FacetButton>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof FacetButton>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { IconTypes } from '../../constants';
|
|
3
|
+
export interface FacetButtonProps {
|
|
4
|
+
text?: string;
|
|
5
|
+
component?: ReactNode;
|
|
6
|
+
id?: string | number;
|
|
7
|
+
onClickCallback?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
icon?: Partial<IconTypes>;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
toolTip?: string;
|
|
14
|
+
percent: number;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './FacetButton';
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
interface Props {
|
|
7
|
-
className?: string;
|
|
8
|
-
blocks: Array<Block>;
|
|
9
|
-
}
|
|
10
|
-
declare const FormSkeleton: FC<Props>;
|
|
11
|
-
export default FormSkeleton;
|
|
2
|
+
import { FormSkeletonProps } from './FormSkeleton.types';
|
|
3
|
+
declare const FormSkeleton: FC<FormSkeletonProps>;
|
|
4
|
+
export { FormSkeleton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './FormSkeleton';
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Number of columns on viewports < 576px
|
|
6
|
-
*/
|
|
7
|
-
xs?: number;
|
|
8
|
-
/**
|
|
9
|
-
* Number of columns on viewports < 768px
|
|
10
|
-
*/
|
|
11
|
-
sm?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Number of columns on viewports < 1024px
|
|
14
|
-
*/
|
|
15
|
-
md?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Number of columns on viewports < 1200px
|
|
18
|
-
*/
|
|
19
|
-
lg?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Number of columns on viewports < 1646px
|
|
22
|
-
*/
|
|
23
|
-
xl?: number;
|
|
24
|
-
/**
|
|
25
|
-
* Number of columns on viewports < 2000px
|
|
26
|
-
*/
|
|
27
|
-
xxl?: number;
|
|
28
|
-
/**
|
|
29
|
-
* Optionally provide the number of columns in the grid.
|
|
30
|
-
* @default 12
|
|
31
|
-
*/
|
|
32
|
-
/**
|
|
33
|
-
* If the component is a grid container
|
|
34
|
-
*/
|
|
35
|
-
container?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Optionally provide the spacing as a multiple of $half-base-size (4px) for each grid item.
|
|
38
|
-
* Takes either a single string for x and y,
|
|
39
|
-
* or an array for [y, x],
|
|
40
|
-
* or an object for different breakpoints, i.e { xs: '4', md: ['4', '6'], lg: '8' }
|
|
41
|
-
* @default '4'
|
|
42
|
-
*/
|
|
43
|
-
spacing?: string | Array<string> | Record<never, string | string[]>;
|
|
44
|
-
columns?: number;
|
|
45
|
-
className?: string;
|
|
46
|
-
children?: ReactNode;
|
|
47
|
-
}
|
|
48
|
-
declare const Grid: FC<Props>;
|
|
49
|
-
export default Grid;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { GridProps } from './Grid.types';
|
|
3
|
+
declare const Grid: FC<GridProps>;
|
|
4
|
+
export { Grid };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FlexStylingInterface, MarginInterface, PaddingInterface } from '../../types/styling.types';
|
|
3
|
+
export interface GridProps extends MarginInterface, PaddingInterface, FlexStylingInterface {
|
|
4
|
+
/**
|
|
5
|
+
* Number of columns on viewports < 576px
|
|
6
|
+
*/
|
|
7
|
+
xs?: number | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Number of columns on viewports < 768px
|
|
10
|
+
*/
|
|
11
|
+
sm?: number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Number of columns on viewports < 1024px
|
|
14
|
+
*/
|
|
15
|
+
md?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Number of columns on viewports < 1200px
|
|
18
|
+
*/
|
|
19
|
+
lg?: number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Number of columns on viewports < 1646px
|
|
22
|
+
*/
|
|
23
|
+
xl?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Number of columns on viewports < 2000px
|
|
26
|
+
*/
|
|
27
|
+
xxl?: number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Optionally provide the number of columns in the grid.
|
|
30
|
+
* @default 12
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* If the component is a grid container
|
|
34
|
+
*/
|
|
35
|
+
container?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Optionally provide the spacing as a multiple of $half-base-size (4px) for each grid item.
|
|
38
|
+
* Takes either a single string for x and y,
|
|
39
|
+
* or an array for [y, x],
|
|
40
|
+
* or an object for different breakpoints, i.e { xs: '4', md: ['4', '6'], lg: '8' }
|
|
41
|
+
* @default '4'
|
|
42
|
+
*/
|
|
43
|
+
spacing?: string | Array<string> | Record<never, string | string[]> | undefined;
|
|
44
|
+
columns?: number | undefined;
|
|
45
|
+
className?: string | undefined;
|
|
46
|
+
children?: ReactNode | undefined;
|
|
47
|
+
}
|
|
48
|
+
export interface GridContextInterface {
|
|
49
|
+
spacing?: string | Array<string> | Record<never, string | string[]> | undefined;
|
|
50
|
+
columns?: number | undefined;
|
|
51
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Grid';
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE | SizeTypes.AUTO;
|
|
6
|
-
rotateIcon?: boolean;
|
|
7
|
-
rotateIconByDegree?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
toolTip?: string;
|
|
11
|
-
}
|
|
12
|
-
declare const Icon: FC<Props>;
|
|
13
|
-
export default Icon;
|
|
2
|
+
import { IconProps } from './Icon.types';
|
|
3
|
+
declare const Icon: FC<IconProps>;
|
|
4
|
+
export { Icon };
|