@zohodesk/dot 1.0.0-temp-187.1 → 1.0.0-temp-187.2
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/.cli/UnValidatedFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +15 -0
- package/es/DotProvider/DotProvider.js +60 -0
- package/es/DotProvider/hooks/useDotProvider.js +55 -0
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +97 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +1 -0
- package/es/DotProvider/props/defaultProps.js +11 -0
- package/es/DotProvider/props/propTypes.js +16 -0
- package/es/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +4 -0
- package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +28 -0
- package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +29 -0
- package/es/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +4 -0
- package/es/DotProvider/utils/constants.js +14 -0
- package/es/DotProvider/utils/errorValidation.js +17 -0
- package/es/DotProvider/utils/getAssetsImportPromises.js +17 -0
- package/es/DotProvider/utils/sizeAssetsConfig.js +12 -0
- package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +47 -0
- package/es/DotProvider/utils/themeColorAssetsConfig.js +221 -0
- package/es/Drawer/Drawer.js +4 -7
- package/es/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +1 -1
- package/es/Drawer/props/defaultProps.js +1 -0
- package/es/Drawer/props/propTypes.js +1 -0
- package/es/common/dot_boxShadow.module.css +0 -2
- package/es/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/es/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +16 -0
- package/es/list/status/StatusDropdown/__tests__/__snapshots__/StatusDropdown.spec.js.snap +14 -0
- package/es/list/status/StatusDropdown/props/propTypes.js +2 -0
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/es/v1/list/status/StatusDropdown/props/propTypes.js +2 -0
- package/lib/DotProvider/DotProvider.js +88 -0
- package/lib/DotProvider/hooks/useDotProvider.js +83 -0
- package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +119 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +3 -0
- package/lib/DotProvider/props/defaultProps.js +20 -0
- package/lib/DotProvider/props/propTypes.js +28 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +12 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +39 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +40 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +12 -0
- package/lib/DotProvider/utils/constants.js +34 -0
- package/lib/DotProvider/utils/errorValidation.js +25 -0
- package/lib/DotProvider/utils/getAssetsImportPromises.js +22 -0
- package/lib/DotProvider/utils/sizeAssetsConfig.js +31 -0
- package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +69 -0
- package/lib/DotProvider/utils/themeColorAssetsConfig.js +249 -0
- package/lib/Drawer/Drawer.js +4 -7
- package/lib/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +1 -1
- package/lib/Drawer/props/defaultProps.js +1 -0
- package/lib/Drawer/props/propTypes.js +1 -0
- package/lib/common/dot_boxShadow.module.css +0 -2
- package/lib/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/lib/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +14 -0
- package/lib/list/status/StatusDropdown/__tests__/__snapshots__/StatusDropdown.spec.js.snap +14 -0
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/lib/v1/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/package.json +6 -6
- package/result.json +1 -1
- package/unittest/index.html +6 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { LIBRARY_COMPONENT, LIBRARY_DOT, LIBRARY_SVG, THEME_APPEARANCE_DARK, THEME_APPEARANCE_LIGHT, THEME_APPEARANCE_PURE_DARK } from "./constants";
|
|
2
|
+
export const themeAppearanceImports = {
|
|
3
|
+
Lib_LightMode_Component: () => import(
|
|
4
|
+
/* webpackChunkName: 'Lib_LightMode_Component' */
|
|
5
|
+
'@zohodesk/components/assets/Appearance/light/mode/Component_LightMode.module.css'),
|
|
6
|
+
Lib_DarkMode_Component: () => import(
|
|
7
|
+
/* webpackChunkName: 'Lib_DarkMode_Component' */
|
|
8
|
+
'@zohodesk/components/assets/Appearance/dark/mode/Component_DarkMode.module.css'),
|
|
9
|
+
Lib_PureDarkMode_Component: () => import(
|
|
10
|
+
/* webpackChunkName: 'Lib_PureDarkMode_Component' */
|
|
11
|
+
'@zohodesk/components/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css'),
|
|
12
|
+
Lib_LightMode_Dot: () => import(
|
|
13
|
+
/* webpackChunkName: 'Lib_LightMode_Dot' */
|
|
14
|
+
"./../../../assets/Appearance/light/mode/Dot_LightMode.module.css"),
|
|
15
|
+
Lib_DarkMode_Dot: () => import(
|
|
16
|
+
/* webpackChunkName: 'Lib_DarkMode_Dot' */
|
|
17
|
+
"./../../../assets/Appearance/dark/mode/Dot_DarkMode.module.css"),
|
|
18
|
+
Lib_PureDarkMode_Dot: () => import(
|
|
19
|
+
/* webpackChunkName: 'Lib_PureDarkMode_Dot' */
|
|
20
|
+
"./../../../assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css"),
|
|
21
|
+
Lib_LightMode_SVG: () => import(
|
|
22
|
+
/* webpackChunkName: 'Lib_LightMode_SVG' */
|
|
23
|
+
'@zohodesk/svg/assets/Appearance/light/mode/SVG_LightMode.module.css'),
|
|
24
|
+
Lib_DarkMode_SVG: () => import(
|
|
25
|
+
/* webpackChunkName: 'Lib_DarkMode_SVG' */
|
|
26
|
+
'@zohodesk/svg/assets/Appearance/dark/mode/SVG_DarkMode.module.css'),
|
|
27
|
+
Lib_PureDarkMode_SVG: () => import(
|
|
28
|
+
/* webpackChunkName: 'Lib_PureDarkMode_SVG' */
|
|
29
|
+
'@zohodesk/svg/assets/Appearance/pureDark/mode/SVG_PureDarkMode.module.css')
|
|
30
|
+
};
|
|
31
|
+
export const themeAppearanceMapping = {
|
|
32
|
+
[LIBRARY_COMPONENT]: {
|
|
33
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_LightMode_Component',
|
|
34
|
+
[THEME_APPEARANCE_DARK]: 'Lib_DarkMode_Component',
|
|
35
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_PureDarkMode_Component'
|
|
36
|
+
},
|
|
37
|
+
[LIBRARY_DOT]: {
|
|
38
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_LightMode_Dot',
|
|
39
|
+
[THEME_APPEARANCE_DARK]: 'Lib_DarkMode_Dot',
|
|
40
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_PureDarkMode_Dot'
|
|
41
|
+
},
|
|
42
|
+
[LIBRARY_SVG]: {
|
|
43
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_LightMode_SVG',
|
|
44
|
+
[THEME_APPEARANCE_DARK]: 'Lib_DarkMode_SVG',
|
|
45
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_PureDarkMode_SVG'
|
|
46
|
+
}
|
|
47
|
+
};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { LIBRARY_COMPONENT, LIBRARY_DOT, LIBRARY_SVG, THEME_APPEARANCE_DARK, THEME_APPEARANCE_LIGHT, THEME_APPEARANCE_PURE_DARK, THEME_COLOR_BLUE, THEME_COLOR_GREEN, THEME_COLOR_ORANGE, THEME_COLOR_RED, THEME_COLOR_YELLOW } from "./constants";
|
|
2
|
+
export const themeColorImports = {
|
|
3
|
+
Lib_Blue_Light_Component: () => import(
|
|
4
|
+
/* webpackChunkName: 'Lib_Blue_Light_Component' */
|
|
5
|
+
"../libraryChunks/themes/component/blue/Blue_Light_Component"),
|
|
6
|
+
Lib_Blue_Dark_Component: () => import(
|
|
7
|
+
/* webpackChunkName: 'Lib_Blue_Dark_Component' */
|
|
8
|
+
"../libraryChunks/themes/component/blue/Blue_Dark_Component"),
|
|
9
|
+
Lib_Blue_PureDark_Component: () => import(
|
|
10
|
+
/* webpackChunkName: 'Lib_Blue_PureDark_Component' */
|
|
11
|
+
"../libraryChunks/themes/component/blue/Blue_PureDark_Component"),
|
|
12
|
+
Lib_Green_Light_Component: () => import(
|
|
13
|
+
/* webpackChunkName: 'Lib_Green_Light_Component' */
|
|
14
|
+
"../libraryChunks/themes/component/green/Green_Light_Component"),
|
|
15
|
+
Lib_Green_Dark_Component: () => import(
|
|
16
|
+
/* webpackChunkName: 'Lib_Green_Dark_Component' */
|
|
17
|
+
"../libraryChunks/themes/component/green/Green_Dark_Component"),
|
|
18
|
+
Lib_Green_PureDark_Component: () => import(
|
|
19
|
+
/* webpackChunkName: 'Lib_Green_PureDark_Component' */
|
|
20
|
+
"../libraryChunks/themes/component/green/Green_PureDark_Component"),
|
|
21
|
+
Lib_Orange_Light_Component: () => import(
|
|
22
|
+
/* webpackChunkName: 'Lib_Orange_Light_Component' */
|
|
23
|
+
"../libraryChunks/themes/component/orange/Orange_Light_Component"),
|
|
24
|
+
Lib_Orange_Dark_Component: () => import(
|
|
25
|
+
/* webpackChunkName: 'Lib_Orange_Dark_Component' */
|
|
26
|
+
"../libraryChunks/themes/component/orange/Orange_Dark_Component"),
|
|
27
|
+
Lib_Orange_PureDark_Component: () => import(
|
|
28
|
+
/* webpackChunkName: 'Lib_Orange_PureDark_Component' */
|
|
29
|
+
"../libraryChunks/themes/component/orange/Orange_PureDark_Component"),
|
|
30
|
+
Lib_Red_Light_Component: () => import(
|
|
31
|
+
/* webpackChunkName: 'Lib_Red_Light_Component' */
|
|
32
|
+
"../libraryChunks/themes/component/red/Red_Light_Component"),
|
|
33
|
+
Lib_Red_Dark_Component: () => import(
|
|
34
|
+
/* webpackChunkName: 'Lib_Red_Dark_Component' */
|
|
35
|
+
"../libraryChunks/themes/component/red/Red_Dark_Component"),
|
|
36
|
+
Lib_Red_PureDark_Component: () => import(
|
|
37
|
+
/* webpackChunkName: 'Lib_Red_PureDark_Component' */
|
|
38
|
+
"../libraryChunks/themes/component/red/Red_PureDark_Component"),
|
|
39
|
+
Lib_Yellow_Light_Component: () => import(
|
|
40
|
+
/* webpackChunkName: 'Lib_Yellow_Light_Component' */
|
|
41
|
+
"../libraryChunks/themes/component/yellow/Yellow_Light_Component"),
|
|
42
|
+
Lib_Yellow_Dark_Component: () => import(
|
|
43
|
+
/* webpackChunkName: 'Lib_Yellow_Dark_Component' */
|
|
44
|
+
"../libraryChunks/themes/component/yellow/Yellow_Dark_Component"),
|
|
45
|
+
Lib_Yellow_PureDark_Component: () => import(
|
|
46
|
+
/* webpackChunkName: 'Lib_Yellow_PureDark_Component' */
|
|
47
|
+
"../libraryChunks/themes/component/yellow/Yellow_PureDark_Component"),
|
|
48
|
+
Lib_Blue_Light_Dot: () => import(
|
|
49
|
+
/* webpackChunkName: 'Lib_Blue_Light_Dot' */
|
|
50
|
+
"../libraryChunks/themes/dot/blue/Blue_Light_Dot"),
|
|
51
|
+
Lib_Blue_Dark_Dot: () => import(
|
|
52
|
+
/* webpackChunkName: 'Lib_Blue_Dark_Dot' */
|
|
53
|
+
"../libraryChunks/themes/dot/blue/Blue_Dark_Dot"),
|
|
54
|
+
Lib_Blue_PureDark_Dot: () => import(
|
|
55
|
+
/* webpackChunkName: 'Lib_Blue_PureDark_Dot' */
|
|
56
|
+
"../libraryChunks/themes/dot/blue/Blue_PureDark_Dot"),
|
|
57
|
+
Lib_Green_Light_Dot: () => import(
|
|
58
|
+
/* webpackChunkName: 'Lib_Green_Light_Dot' */
|
|
59
|
+
"../libraryChunks/themes/dot/green/Green_Light_Dot"),
|
|
60
|
+
Lib_Green_Dark_Dot: () => import(
|
|
61
|
+
/* webpackChunkName: 'Lib_Green_Dark_Dot' */
|
|
62
|
+
"../libraryChunks/themes/dot/green/Green_Dark_Dot"),
|
|
63
|
+
Lib_Green_PureDark_Dot: () => import(
|
|
64
|
+
/* webpackChunkName: 'Lib_Green_PureDark_Dot' */
|
|
65
|
+
"../libraryChunks/themes/dot/green/Green_PureDark_Dot"),
|
|
66
|
+
Lib_Orange_Light_Dot: () => import(
|
|
67
|
+
/* webpackChunkName: 'Lib_Orange_Light_Dot' */
|
|
68
|
+
"../libraryChunks/themes/dot/orange/Orange_Light_Dot"),
|
|
69
|
+
Lib_Orange_Dark_Dot: () => import(
|
|
70
|
+
/* webpackChunkName: 'Lib_Orange_Dark_Dot' */
|
|
71
|
+
"../libraryChunks/themes/dot/orange/Orange_Dark_Dot"),
|
|
72
|
+
Lib_Orange_PureDark_Dot: () => import(
|
|
73
|
+
/* webpackChunkName: 'Lib_Orange_PureDark_Dot' */
|
|
74
|
+
"../libraryChunks/themes/dot/orange/Orange_PureDark_Dot"),
|
|
75
|
+
Lib_Red_Light_Dot: () => import(
|
|
76
|
+
/* webpackChunkName: 'Lib_Red_Light_Dot' */
|
|
77
|
+
"../libraryChunks/themes/dot/red/Red_Light_Dot"),
|
|
78
|
+
Lib_Red_Dark_Dot: () => import(
|
|
79
|
+
/* webpackChunkName: 'Lib_Red_Dark_Dot' */
|
|
80
|
+
"../libraryChunks/themes/dot/red/Red_Dark_Dot"),
|
|
81
|
+
Lib_Red_PureDark_Dot: () => import(
|
|
82
|
+
/* webpackChunkName: 'Lib_Red_PureDark_Dot' */
|
|
83
|
+
"../libraryChunks/themes/dot/red/Red_PureDark_Dot"),
|
|
84
|
+
Lib_Yellow_Light_Dot: () => import(
|
|
85
|
+
/* webpackChunkName: 'Lib_Yellow_Light_Dot' */
|
|
86
|
+
"../libraryChunks/themes/dot/yellow/Yellow_Light_Dot"),
|
|
87
|
+
Lib_Yellow_Dark_Dot: () => import(
|
|
88
|
+
/* webpackChunkName: 'Lib_Yellow_Dark_Dot' */
|
|
89
|
+
"../libraryChunks/themes/dot/yellow/Yellow_Dark_Dot"),
|
|
90
|
+
Lib_Yellow_PureDark_Dot: () => import(
|
|
91
|
+
/* webpackChunkName: 'Lib_Yellow_PureDark_Dot' */
|
|
92
|
+
"../libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot"),
|
|
93
|
+
Lib_Blue_Light_SVG: () => import(
|
|
94
|
+
/* webpackChunkName: 'Lib_Blue_Light_SVG' */
|
|
95
|
+
"../libraryChunks/themes/svg/blue/Blue_Light_SVG"),
|
|
96
|
+
Lib_Blue_Dark_SVG: () => import(
|
|
97
|
+
/* webpackChunkName: 'Lib_Blue_Dark_SVG' */
|
|
98
|
+
"../libraryChunks/themes/svg/blue/Blue_Dark_SVG"),
|
|
99
|
+
Lib_Blue_PureDark_SVG: () => import(
|
|
100
|
+
/* webpackChunkName: 'Lib_Blue_PureDark_SVG' */
|
|
101
|
+
"../libraryChunks/themes/svg/blue/Blue_PureDark_SVG"),
|
|
102
|
+
Lib_Green_Light_SVG: () => import(
|
|
103
|
+
/* webpackChunkName: 'Lib_Green_Light_SVG' */
|
|
104
|
+
"../libraryChunks/themes/svg/green/Green_Light_SVG"),
|
|
105
|
+
Lib_Green_Dark_SVG: () => import(
|
|
106
|
+
/* webpackChunkName: 'Lib_Green_Dark_SVG' */
|
|
107
|
+
"../libraryChunks/themes/svg/green/Green_Dark_SVG"),
|
|
108
|
+
Lib_Green_PureDark_SVG: () => import(
|
|
109
|
+
/* webpackChunkName: 'Lib_Green_PureDark_SVG' */
|
|
110
|
+
"../libraryChunks/themes/svg/green/Green_PureDark_SVG"),
|
|
111
|
+
Lib_Orange_Light_SVG: () => import(
|
|
112
|
+
/* webpackChunkName: 'Lib_Orange_Light_SVG' */
|
|
113
|
+
"../libraryChunks/themes/svg/orange/Orange_Light_SVG"),
|
|
114
|
+
Lib_Orange_Dark_SVG: () => import(
|
|
115
|
+
/* webpackChunkName: 'Lib_Orange_Dark_SVG' */
|
|
116
|
+
"../libraryChunks/themes/svg/orange/Orange_Dark_SVG"),
|
|
117
|
+
Lib_Orange_PureDark_SVG: () => import(
|
|
118
|
+
/* webpackChunkName: 'Lib_Orange_PureDark_SVG' */
|
|
119
|
+
"../libraryChunks/themes/svg/orange/Orange_PureDark_SVG"),
|
|
120
|
+
Lib_Red_Light_SVG: () => import(
|
|
121
|
+
/* webpackChunkName: 'Lib_Red_Light_SVG' */
|
|
122
|
+
"../libraryChunks/themes/svg/red/Red_Light_SVG"),
|
|
123
|
+
Lib_Red_Dark_SVG: () => import(
|
|
124
|
+
/* webpackChunkName: 'Lib_Red_Dark_SVG' */
|
|
125
|
+
"../libraryChunks/themes/svg/red/Red_Dark_SVG"),
|
|
126
|
+
Lib_Red_PureDark_SVG: () => import(
|
|
127
|
+
/* webpackChunkName: 'Lib_Red_PureDark_SVG' */
|
|
128
|
+
"../libraryChunks/themes/svg/red/Red_PureDark_SVG"),
|
|
129
|
+
Lib_Yellow_Light_SVG: () => import(
|
|
130
|
+
/* webpackChunkName: 'Lib_Yellow_Light_SVG' */
|
|
131
|
+
"../libraryChunks/themes/svg/yellow/Yellow_Light_SVG"),
|
|
132
|
+
Lib_Yellow_Dark_SVG: () => import(
|
|
133
|
+
/* webpackChunkName: 'Lib_Yellow_Dark_SVG' */
|
|
134
|
+
"../libraryChunks/themes/svg/yellow/Yellow_Dark_SVG"),
|
|
135
|
+
Lib_Yellow_PureDark_SVG: () => import(
|
|
136
|
+
/* webpackChunkName: 'Lib_Yellow_PureDark_SVG' */
|
|
137
|
+
"../libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG")
|
|
138
|
+
};
|
|
139
|
+
export const themeColorMapping = {
|
|
140
|
+
[LIBRARY_COMPONENT]: {
|
|
141
|
+
[THEME_COLOR_BLUE]: {
|
|
142
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Blue_Light_Component',
|
|
143
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Blue_Dark_Component',
|
|
144
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Blue_PureDark_Component'
|
|
145
|
+
},
|
|
146
|
+
[THEME_COLOR_GREEN]: {
|
|
147
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Green_Light_Component',
|
|
148
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Green_Dark_Component',
|
|
149
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Green_PureDark_Component'
|
|
150
|
+
},
|
|
151
|
+
[THEME_COLOR_ORANGE]: {
|
|
152
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Orange_Light_Component',
|
|
153
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Orange_Dark_Component',
|
|
154
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Orange_PureDark_Component'
|
|
155
|
+
},
|
|
156
|
+
[THEME_COLOR_RED]: {
|
|
157
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Red_Light_Component',
|
|
158
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Red_Dark_Component',
|
|
159
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Red_PureDark_Component'
|
|
160
|
+
},
|
|
161
|
+
[THEME_COLOR_YELLOW]: {
|
|
162
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Yellow_Light_Component',
|
|
163
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Yellow_Dark_Component',
|
|
164
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Yellow_PureDark_Component'
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
[LIBRARY_DOT]: {
|
|
168
|
+
[THEME_COLOR_BLUE]: {
|
|
169
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Blue_Light_Dot',
|
|
170
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Blue_Dark_Dot',
|
|
171
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Blue_PureDark_Dot'
|
|
172
|
+
},
|
|
173
|
+
[THEME_COLOR_GREEN]: {
|
|
174
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Green_Light_Dot',
|
|
175
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Green_Dark_Dot',
|
|
176
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Green_PureDark_Dot'
|
|
177
|
+
},
|
|
178
|
+
[THEME_COLOR_ORANGE]: {
|
|
179
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Orange_Light_Dot',
|
|
180
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Orange_Dark_Dot',
|
|
181
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Orange_PureDark_Dot'
|
|
182
|
+
},
|
|
183
|
+
[THEME_COLOR_RED]: {
|
|
184
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Red_Light_Dot',
|
|
185
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Red_Dark_Dot',
|
|
186
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Red_PureDark_Dot'
|
|
187
|
+
},
|
|
188
|
+
[THEME_COLOR_YELLOW]: {
|
|
189
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Yellow_Light_Dot',
|
|
190
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Yellow_Dark_Dot',
|
|
191
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Yellow_PureDark_Dot'
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
[LIBRARY_SVG]: {
|
|
195
|
+
[THEME_COLOR_BLUE]: {
|
|
196
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Blue_Light_SVG',
|
|
197
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Blue_Dark_SVG',
|
|
198
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Blue_PureDark_SVG'
|
|
199
|
+
},
|
|
200
|
+
[THEME_COLOR_GREEN]: {
|
|
201
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Green_Light_SVG',
|
|
202
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Green_Dark_SVG',
|
|
203
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Green_PureDark_SVG'
|
|
204
|
+
},
|
|
205
|
+
[THEME_COLOR_ORANGE]: {
|
|
206
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Orange_Light_SVG',
|
|
207
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Orange_Dark_SVG',
|
|
208
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Orange_PureDark_SVG'
|
|
209
|
+
},
|
|
210
|
+
[THEME_COLOR_RED]: {
|
|
211
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Red_Light_SVG',
|
|
212
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Red_Dark_SVG',
|
|
213
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Red_PureDark_SVG'
|
|
214
|
+
},
|
|
215
|
+
[THEME_COLOR_YELLOW]: {
|
|
216
|
+
[THEME_APPEARANCE_LIGHT]: 'Lib_Yellow_Light_SVG',
|
|
217
|
+
[THEME_APPEARANCE_DARK]: 'Lib_Yellow_Dark_SVG',
|
|
218
|
+
[THEME_APPEARANCE_PURE_DARK]: 'Lib_Yellow_PureDark_SVG'
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
package/es/Drawer/Drawer.js
CHANGED
|
@@ -149,7 +149,8 @@ export default class Drawer extends React.Component {
|
|
|
149
149
|
onClose,
|
|
150
150
|
needFocusScope,
|
|
151
151
|
customProps,
|
|
152
|
-
a11y
|
|
152
|
+
a11y,
|
|
153
|
+
customDrawerClass
|
|
153
154
|
} = this.props;
|
|
154
155
|
const {
|
|
155
156
|
focusScopeProps = {}
|
|
@@ -174,7 +175,7 @@ export default class Drawer extends React.Component {
|
|
|
174
175
|
return child;
|
|
175
176
|
});
|
|
176
177
|
let content = /*#__PURE__*/React.createElement(Box, {
|
|
177
|
-
className: `${style.container} ${style.columns} ${style.drawerModal} ${uptoTablet ? style.mbleSize : style[size]}`,
|
|
178
|
+
className: `${style.container} ${style.columns} ${style.drawerModal} ${uptoTablet ? style.mbleSize : style[size]} ${customDrawerClass}`,
|
|
178
179
|
"data-a11y-need-focus-style": "false",
|
|
179
180
|
tabindex: -1,
|
|
180
181
|
eleRef: this.createRef,
|
|
@@ -281,8 +282,4 @@ export default class Drawer extends React.Component {
|
|
|
281
282
|
|
|
282
283
|
}
|
|
283
284
|
Drawer.propTypes = Drawer_propTypes;
|
|
284
|
-
Drawer.defaultProps = Drawer_defaultProps;
|
|
285
|
-
// Drawer.docs = {
|
|
286
|
-
// componentGroup: 'Template'
|
|
287
|
-
// };
|
|
288
|
-
// }
|
|
285
|
+
Drawer.defaultProps = Drawer_defaultProps;
|
|
@@ -12,7 +12,7 @@ exports[`Drawer rendering the isActive true 1`] = `
|
|
|
12
12
|
style="z-index: 4;"
|
|
13
13
|
>
|
|
14
14
|
<div
|
|
15
|
-
class="container columns drawerModal small
|
|
15
|
+
class="container columns drawerModal small shrinkOff"
|
|
16
16
|
data-a11y-need-focus-style="false"
|
|
17
17
|
data-id="boxComponent"
|
|
18
18
|
data-selector-id="box"
|
|
@@ -32,6 +32,7 @@ export const Footer_propTypes = {
|
|
|
32
32
|
export const Drawer_propTypes = {
|
|
33
33
|
children: PropTypes.node,
|
|
34
34
|
customClass: PropTypes.string,
|
|
35
|
+
customDrawerClass: PropTypes.string,
|
|
35
36
|
forwardRef: PropTypes.object,
|
|
36
37
|
isActive: PropTypes.bool,
|
|
37
38
|
needAutoZindex: PropTypes.bool,
|
|
@@ -117,6 +117,7 @@ export default class CurrencyField extends PureComponent {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
120
|
+
const isFocusable = !needReadOnlyStyle || !isReadOnly && needReadOnlyStyle;
|
|
120
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
121
122
|
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
122
123
|
"data-title": isDisabled ? title : null,
|
|
@@ -149,7 +150,7 @@ export default class CurrencyField extends PureComponent {
|
|
|
149
150
|
onChange: this.handleChange,
|
|
150
151
|
dataId: dataId,
|
|
151
152
|
onBlur: this.onBlur,
|
|
152
|
-
onFocus: this.onFocus,
|
|
153
|
+
onFocus: isFocusable && this.onFocus,
|
|
153
154
|
onKeyDown: onKeyDown,
|
|
154
155
|
placeHolder: placeHolder,
|
|
155
156
|
borderColor: borderColor,
|
|
@@ -176,6 +176,8 @@ export class StatusDropdown extends React.Component {
|
|
|
176
176
|
isRestrictScroll,
|
|
177
177
|
positionsOffset,
|
|
178
178
|
targetOffset,
|
|
179
|
+
renderTargetElement,
|
|
180
|
+
renderFooterElement,
|
|
179
181
|
a11y = {}
|
|
180
182
|
} = this.props;
|
|
181
183
|
const {
|
|
@@ -193,7 +195,11 @@ export class StatusDropdown extends React.Component {
|
|
|
193
195
|
className: style.posRel,
|
|
194
196
|
onMouseEnter: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined,
|
|
195
197
|
onMouseLeave: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined
|
|
196
|
-
},
|
|
198
|
+
}, renderTargetElement ? renderTargetElement({
|
|
199
|
+
handleTogglePopup: this.handleTogglePopup,
|
|
200
|
+
isPopupOpen,
|
|
201
|
+
getTargetRef
|
|
202
|
+
}) : /*#__PURE__*/React.createElement(Container, {
|
|
197
203
|
tagName: "button",
|
|
198
204
|
alignBox: "row",
|
|
199
205
|
className: `${style.container} ${containerClass} ${btnStyle.buttonReset}`,
|
|
@@ -333,7 +339,7 @@ export class StatusDropdown extends React.Component {
|
|
|
333
339
|
getEmptyState: this.emptySearchSVG
|
|
334
340
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
335
341
|
className: style.loader
|
|
336
|
-
}, /*#__PURE__*/React.createElement(Loader, null)))));
|
|
342
|
+
}, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null));
|
|
337
343
|
}) : null);
|
|
338
344
|
}
|
|
339
345
|
|
|
@@ -7,5 +7,21 @@ describe('StatusDropdown', () => {
|
|
|
7
7
|
asFragment
|
|
8
8
|
} = render( /*#__PURE__*/React.createElement(StatusDropdown, null));
|
|
9
9
|
expect(asFragment()).toMatchSnapshot();
|
|
10
|
+
}), test('rendering target element', () => {
|
|
11
|
+
const renderTargetElement = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
isPopupOpen
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: isPopupOpen ? 'popupOpened' : 'popupClosed'
|
|
17
|
+
}, "Target Element");
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
asFragment
|
|
22
|
+
} = render( /*#__PURE__*/React.createElement(StatusDropdown, {
|
|
23
|
+
renderTargetElement: renderTargetElement
|
|
24
|
+
}));
|
|
25
|
+
expect(asFragment()).toMatchSnapshot();
|
|
10
26
|
});
|
|
11
27
|
});
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`StatusDropdown rendering target element 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="posRel"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="popupClosed"
|
|
10
|
+
>
|
|
11
|
+
Target Element
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</DocumentFragment>
|
|
15
|
+
`;
|
|
16
|
+
|
|
3
17
|
exports[`StatusDropdown rendering the defult props 1`] = `
|
|
4
18
|
<DocumentFragment>
|
|
5
19
|
<div
|
|
@@ -54,5 +54,7 @@ export const propTypes = {
|
|
|
54
54
|
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
55
55
|
isRestrictScroll: PropTypes.bool,
|
|
56
56
|
positionsOffset: PropTypes.object,
|
|
57
|
+
renderTargetElement: PropTypes.func,
|
|
58
|
+
renderFooterElement: PropTypes.node,
|
|
57
59
|
targetOffset: PropTypes.object
|
|
58
60
|
};
|
|
@@ -72,6 +72,7 @@ function CurrencyField(props) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
let uniqueId = htmlId ? htmlId : getNextId();
|
|
75
|
+
const isFocusable = !needReadOnlyStyle || !isReadOnly && needReadOnlyStyle;
|
|
75
76
|
|
|
76
77
|
function handleChange(value) {
|
|
77
78
|
onChange && onChange(id, value);
|
|
@@ -124,7 +125,7 @@ function CurrencyField(props) {
|
|
|
124
125
|
onChange: handleChange,
|
|
125
126
|
dataId: dataId,
|
|
126
127
|
onBlur: handleonBlur,
|
|
127
|
-
onFocus: handleonFocus,
|
|
128
|
+
onFocus: isFocusable && handleonFocus,
|
|
128
129
|
onKeyDown: onKeyDown,
|
|
129
130
|
placeHolder: placeHolder,
|
|
130
131
|
borderColor: borderColor,
|
|
@@ -73,6 +73,8 @@ function StatusDropdown(props) {
|
|
|
73
73
|
isRestrictScroll,
|
|
74
74
|
positionsOffset,
|
|
75
75
|
targetOffset,
|
|
76
|
+
renderTargetElement,
|
|
77
|
+
renderFooterElement,
|
|
76
78
|
a11y = {}
|
|
77
79
|
} = props;
|
|
78
80
|
const [optionsList, setOptionsList] = useState(options);
|
|
@@ -149,7 +151,11 @@ function StatusDropdown(props) {
|
|
|
149
151
|
className: style.posRel,
|
|
150
152
|
onMouseEnter: showOnHover && !isDisabled && !isReadOnly && isEditable ? handleTogglePopup : undefined,
|
|
151
153
|
onMouseLeave: showOnHover && !isDisabled && !isReadOnly && isEditable ? handleTogglePopup : undefined
|
|
152
|
-
},
|
|
154
|
+
}, renderTargetElement ? renderTargetElement({
|
|
155
|
+
handleTogglePopup,
|
|
156
|
+
isPopupOpen,
|
|
157
|
+
getTargetRef
|
|
158
|
+
}) : /*#__PURE__*/React.createElement(Container, {
|
|
153
159
|
tagName: "button",
|
|
154
160
|
alignBox: "row",
|
|
155
161
|
className: `${style.container} ${containerClass} ${btnStyle.buttonReset}`,
|
|
@@ -289,7 +295,7 @@ function StatusDropdown(props) {
|
|
|
289
295
|
getEmptyState: emptySearchSVG
|
|
290
296
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
291
297
|
className: style.loader
|
|
292
|
-
}, /*#__PURE__*/React.createElement(Loader, null)))));
|
|
298
|
+
}, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null));
|
|
293
299
|
}) : null);
|
|
294
300
|
}
|
|
295
301
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _defaultProps = require("./props/defaultProps");
|
|
11
|
+
|
|
12
|
+
var _propTypes = require("./props/propTypes");
|
|
13
|
+
|
|
14
|
+
var _useDotProvider = _interopRequireDefault(require("./hooks/useDotProvider"));
|
|
15
|
+
|
|
16
|
+
var _excluded = ["tag", "themeAppearance", "themeColor", "baseZoomUnit", "baseFontUnit", "zoomUnitVariable", "fontUnitVariable", "themeAppearanceAttr", "themeColorAttr", "providerRef", "onAssetsDownloadSuccess", "getAssetsPromises", "children"];
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
+
|
|
26
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
+
|
|
30
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
+
|
|
32
|
+
var DotProvider = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
33
|
+
var _props$tag = props.tag,
|
|
34
|
+
Element = _props$tag === void 0 ? 'div' : _props$tag,
|
|
35
|
+
themeAppearance = props.themeAppearance,
|
|
36
|
+
themeColor = props.themeColor,
|
|
37
|
+
baseZoomUnit = props.baseZoomUnit,
|
|
38
|
+
baseFontUnit = props.baseFontUnit,
|
|
39
|
+
zoomUnitVariable = props.zoomUnitVariable,
|
|
40
|
+
fontUnitVariable = props.fontUnitVariable,
|
|
41
|
+
themeAppearanceAttr = props.themeAppearanceAttr,
|
|
42
|
+
themeColorAttr = props.themeColorAttr,
|
|
43
|
+
providerRef = props.providerRef,
|
|
44
|
+
onAssetsDownloadSuccess = props.onAssetsDownloadSuccess,
|
|
45
|
+
getAssetsPromises = props.getAssetsPromises,
|
|
46
|
+
children = props.children,
|
|
47
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
48
|
+
|
|
49
|
+
var wrapperElementRef = (0, _react.useRef)(null);
|
|
50
|
+
var getProviderElement = (0, _react.useCallback)(function () {
|
|
51
|
+
if (typeof providerRef === 'function') {
|
|
52
|
+
return providerRef();
|
|
53
|
+
} else if (Element !== _react["default"].Fragment) {
|
|
54
|
+
return wrapperElementRef.current;
|
|
55
|
+
} else {
|
|
56
|
+
return document.documentElement;
|
|
57
|
+
}
|
|
58
|
+
}, [providerRef, Element]);
|
|
59
|
+
var getEleRef = (0, _react.useCallback)(function (ele) {
|
|
60
|
+
wrapperElementRef.current = ele;
|
|
61
|
+
|
|
62
|
+
if (ref && typeof ref === 'function') {
|
|
63
|
+
ref(ele);
|
|
64
|
+
} else if (ref && _typeof(ref) === 'object') {
|
|
65
|
+
ref.current = ele;
|
|
66
|
+
}
|
|
67
|
+
}, [ref]);
|
|
68
|
+
(0, _useDotProvider["default"])({
|
|
69
|
+
themeAppearance: themeAppearance,
|
|
70
|
+
themeColor: themeColor,
|
|
71
|
+
themeAppearanceAttr: themeAppearanceAttr,
|
|
72
|
+
themeColorAttr: themeColorAttr,
|
|
73
|
+
baseZoomUnit: baseZoomUnit,
|
|
74
|
+
baseFontUnit: baseFontUnit,
|
|
75
|
+
zoomUnitVariable: zoomUnitVariable,
|
|
76
|
+
fontUnitVariable: fontUnitVariable,
|
|
77
|
+
getProviderElement: getProviderElement,
|
|
78
|
+
onAssetsDownloadSuccess: onAssetsDownloadSuccess,
|
|
79
|
+
getAssetsPromises: getAssetsPromises
|
|
80
|
+
});
|
|
81
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({}, rest, {
|
|
82
|
+
ref: getEleRef
|
|
83
|
+
}), children);
|
|
84
|
+
});
|
|
85
|
+
DotProvider.propTypes = _propTypes.propTypes;
|
|
86
|
+
DotProvider.defaultProps = _defaultProps.defaultProps;
|
|
87
|
+
var _default = DotProvider;
|
|
88
|
+
exports["default"] = _default;
|