@e1011/es-kit 1.0.108 → 1.0.112
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/dist/lib/src/core/index.js +1 -0
- package/dist/lib/src/core/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/core/index.d.ts +1 -0
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/hooks/esm/index.css +0 -106
- package/dist/hooks/index.css +0 -106
- package/dist/lib/cjs/index.css +0 -106
- package/dist/lib/cjs/node_modules/core-js/modules/es.array.index-of.js +0 -2
- package/dist/lib/cjs/node_modules/core-js/modules/es.array.index-of.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainerS.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainerS.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/FBox.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/Flex.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/Placeholder.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/dividers/divider.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/dividers/divider.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/field/Field.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/field/Field.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/Icon.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/Icon.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/icon.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/icon.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/utils/style.js +0 -2
- package/dist/lib/cjs/src/core/ui/utils/style.js.map +0 -1
- package/dist/lib/esm/index.css +0 -106
- package/dist/lib/esm/node_modules/core-js/modules/es.array.index-of.js +0 -2
- package/dist/lib/esm/node_modules/core-js/modules/es.array.index-of.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainerS.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainerS.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/FBox.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/Flex.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/Placeholder.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js +0 -2
- package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/dividers/divider.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/dividers/divider.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/field/Field.js +0 -2
- package/dist/lib/esm/src/core/ui/components/field/Field.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/Icon.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/Icon.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconBase.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconWC.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/IconWC.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/icon.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/icon.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/utils/style.js +0 -2
- package/dist/lib/esm/src/core/ui/utils/style.js.map +0 -1
- package/dist/lib/src/core/ui/components/container/FBox.js +0 -37
- package/dist/lib/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/types/src/core/ui/components/container/FBox.d.ts +0 -28
- package/dist/types/src/core/ui/components/container/FBox.d.ts.map +0 -1
- package/dist/ui/esm/src/core/ui/components/container/FBox.js +0 -2
- package/dist/ui/esm/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/ui/esm/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/ui/esm/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/ui/src/core/ui/components/container/FBox.js +0 -2
- package/dist/ui/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/ui/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/ui/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/utils/esm/index.css +0 -106
- package/dist/utils/index.css +0 -106
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e1011/es-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.112",
|
|
4
4
|
"main": "dist/lib/cjs/src/index.js",
|
|
5
5
|
"module": "dist/lib/esm/src/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"clean": "rimraf ./dist ./es ./coverage",
|
|
45
45
|
"build:lib": "yarn tsc && BABEL_ENV=production NODE_ENV=production rollup --config --environment INCLUDE_DEPS,BUILD:production",
|
|
46
46
|
"build:css": "sass src/core/ui/styles:dist/ui/styles",
|
|
47
|
-
"build": "yarn prepush && yarn build:lib && yarn build:css",
|
|
47
|
+
"build": "rm -rf dist && yarn prepush && yarn build:lib && yarn build:css",
|
|
48
48
|
"watch": "rollup --config --watch",
|
|
49
49
|
"lint": "eslint src --ext js,jsx,ts,tsx",
|
|
50
50
|
"lint:quiet": "eslint src --ext js,jsx,ts,tsx --quiet",
|
package/dist/hooks/esm/index.css
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
2
|
-
transform-origin: 0% 0%;
|
|
3
|
-
opacity: 0;
|
|
4
|
-
overflow: clip;
|
|
5
|
-
}
|
|
6
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
|
|
7
|
-
transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
|
|
8
|
-
will-change: opacity, height, max-height;
|
|
9
|
-
}
|
|
10
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
11
|
-
height: 0;
|
|
12
|
-
max-height: 0;
|
|
13
|
-
opacity: 0;
|
|
14
|
-
}
|
|
15
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
16
|
-
height: var(--prop-value);
|
|
17
|
-
max-height: var(--prop-value);
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
|
|
21
|
-
transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
|
|
22
|
-
will-change: opacity, width, max-width;
|
|
23
|
-
}
|
|
24
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
25
|
-
width: 0;
|
|
26
|
-
max-width: 0;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
}
|
|
29
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
30
|
-
width: var(--prop-value);
|
|
31
|
-
max-width: var(--prop-value);
|
|
32
|
-
opacity: 1;
|
|
33
|
-
}
|
|
34
|
-
.fbox-module_flexible-box__rLJ93 {
|
|
35
|
-
display: flex;
|
|
36
|
-
position: relative;
|
|
37
|
-
flex-direction: row;
|
|
38
|
-
flex: 0;
|
|
39
|
-
flex-grow: 0;
|
|
40
|
-
flex-shrink: 0;
|
|
41
|
-
flex-basis: auto;
|
|
42
|
-
flex-wrap: nowrap;
|
|
43
|
-
gap: 0;
|
|
44
|
-
text-align: left;
|
|
45
|
-
justify-content: flex-start;
|
|
46
|
-
align-items: flex-start;
|
|
47
|
-
align-self: auto;
|
|
48
|
-
margin: 0;
|
|
49
|
-
padding: 0;
|
|
50
|
-
width: auto;
|
|
51
|
-
height: auto;
|
|
52
|
-
max-width: none;
|
|
53
|
-
max-height: none;
|
|
54
|
-
min-width: 0;
|
|
55
|
-
min-height: 0;
|
|
56
|
-
border-radius: initial;
|
|
57
|
-
}
|
|
58
|
-
.divider-module_divider-line__6CesR {
|
|
59
|
-
position: relative;
|
|
60
|
-
display: block;
|
|
61
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
62
|
-
background-color: var(--color);
|
|
63
|
-
opacity: var(--opacity);
|
|
64
|
-
}
|
|
65
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
66
|
-
height: var(--length);
|
|
67
|
-
left: var(--left);
|
|
68
|
-
width: var(--width);
|
|
69
|
-
margin: var(--margin);
|
|
70
|
-
}
|
|
71
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
72
|
-
width: var(--length);
|
|
73
|
-
left: var(--left);
|
|
74
|
-
height: var(--height);
|
|
75
|
-
margin: var(--margin);
|
|
76
|
-
}
|
|
77
|
-
.icon-module_icon-base-parent__nOMvW {
|
|
78
|
-
line-height: 1px !important;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.icon-module_icon-base__S0tHf {
|
|
82
|
-
min-width: var(--min-width);
|
|
83
|
-
min-height: var(--min-height);
|
|
84
|
-
width: var(--width) !important;
|
|
85
|
-
height: var(--height) !important;
|
|
86
|
-
line-height: var(--height);
|
|
87
|
-
background-color: var(--icon-color);
|
|
88
|
-
color: var(--icon-content-color);
|
|
89
|
-
background-repeat: no-repeat;
|
|
90
|
-
mask-image: var(--icon-url);
|
|
91
|
-
-webkit-mask-image: var(--icon-url);
|
|
92
|
-
mask-repeat: no-repeat;
|
|
93
|
-
-webkit-mask-repeat: no-repeat;
|
|
94
|
-
mask-size: contain;
|
|
95
|
-
-webkit-mask-size: contain;
|
|
96
|
-
mask-position: center;
|
|
97
|
-
-webkit-mask-position: center;
|
|
98
|
-
display: inline-block;
|
|
99
|
-
will-change: transform;
|
|
100
|
-
transform: translate3d(0, 0, 0);
|
|
101
|
-
}
|
|
102
|
-
.icon-module_icon-base__S0tHf svg {
|
|
103
|
-
fill: var(--icon-content-color);
|
|
104
|
-
width: var(--height);
|
|
105
|
-
height: var(--width);
|
|
106
|
-
}
|
package/dist/hooks/index.css
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
2
|
-
transform-origin: 0% 0%;
|
|
3
|
-
opacity: 0;
|
|
4
|
-
overflow: clip;
|
|
5
|
-
}
|
|
6
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
|
|
7
|
-
transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
|
|
8
|
-
will-change: opacity, height, max-height;
|
|
9
|
-
}
|
|
10
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
11
|
-
height: 0;
|
|
12
|
-
max-height: 0;
|
|
13
|
-
opacity: 0;
|
|
14
|
-
}
|
|
15
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
16
|
-
height: var(--prop-value);
|
|
17
|
-
max-height: var(--prop-value);
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
|
|
21
|
-
transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
|
|
22
|
-
will-change: opacity, width, max-width;
|
|
23
|
-
}
|
|
24
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
25
|
-
width: 0;
|
|
26
|
-
max-width: 0;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
}
|
|
29
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
30
|
-
width: var(--prop-value);
|
|
31
|
-
max-width: var(--prop-value);
|
|
32
|
-
opacity: 1;
|
|
33
|
-
}
|
|
34
|
-
.fbox-module_flexible-box__rLJ93 {
|
|
35
|
-
display: flex;
|
|
36
|
-
position: relative;
|
|
37
|
-
flex-direction: row;
|
|
38
|
-
flex: 0;
|
|
39
|
-
flex-grow: 0;
|
|
40
|
-
flex-shrink: 0;
|
|
41
|
-
flex-basis: auto;
|
|
42
|
-
flex-wrap: nowrap;
|
|
43
|
-
gap: 0;
|
|
44
|
-
text-align: left;
|
|
45
|
-
justify-content: flex-start;
|
|
46
|
-
align-items: flex-start;
|
|
47
|
-
align-self: auto;
|
|
48
|
-
margin: 0;
|
|
49
|
-
padding: 0;
|
|
50
|
-
width: auto;
|
|
51
|
-
height: auto;
|
|
52
|
-
max-width: none;
|
|
53
|
-
max-height: none;
|
|
54
|
-
min-width: 0;
|
|
55
|
-
min-height: 0;
|
|
56
|
-
border-radius: initial;
|
|
57
|
-
}
|
|
58
|
-
.divider-module_divider-line__6CesR {
|
|
59
|
-
position: relative;
|
|
60
|
-
display: block;
|
|
61
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
62
|
-
background-color: var(--color);
|
|
63
|
-
opacity: var(--opacity);
|
|
64
|
-
}
|
|
65
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
66
|
-
height: var(--length);
|
|
67
|
-
left: var(--left);
|
|
68
|
-
width: var(--width);
|
|
69
|
-
margin: var(--margin);
|
|
70
|
-
}
|
|
71
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
72
|
-
width: var(--length);
|
|
73
|
-
left: var(--left);
|
|
74
|
-
height: var(--height);
|
|
75
|
-
margin: var(--margin);
|
|
76
|
-
}
|
|
77
|
-
.icon-module_icon-base-parent__nOMvW {
|
|
78
|
-
line-height: 1px !important;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.icon-module_icon-base__S0tHf {
|
|
82
|
-
min-width: var(--min-width);
|
|
83
|
-
min-height: var(--min-height);
|
|
84
|
-
width: var(--width) !important;
|
|
85
|
-
height: var(--height) !important;
|
|
86
|
-
line-height: var(--height);
|
|
87
|
-
background-color: var(--icon-color);
|
|
88
|
-
color: var(--icon-content-color);
|
|
89
|
-
background-repeat: no-repeat;
|
|
90
|
-
mask-image: var(--icon-url);
|
|
91
|
-
-webkit-mask-image: var(--icon-url);
|
|
92
|
-
mask-repeat: no-repeat;
|
|
93
|
-
-webkit-mask-repeat: no-repeat;
|
|
94
|
-
mask-size: contain;
|
|
95
|
-
-webkit-mask-size: contain;
|
|
96
|
-
mask-position: center;
|
|
97
|
-
-webkit-mask-position: center;
|
|
98
|
-
display: inline-block;
|
|
99
|
-
will-change: transform;
|
|
100
|
-
transform: translate3d(0, 0, 0);
|
|
101
|
-
}
|
|
102
|
-
.icon-module_icon-base__S0tHf svg {
|
|
103
|
-
fill: var(--icon-content-color);
|
|
104
|
-
width: var(--height);
|
|
105
|
-
height: var(--width);
|
|
106
|
-
}
|
package/dist/lib/cjs/index.css
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
.fbox-module_flexible-box__rLJ93 {
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
flex: 0;
|
|
6
|
-
flex-grow: 0;
|
|
7
|
-
flex-shrink: 0;
|
|
8
|
-
flex-basis: auto;
|
|
9
|
-
flex-wrap: nowrap;
|
|
10
|
-
gap: 0;
|
|
11
|
-
text-align: left;
|
|
12
|
-
justify-content: flex-start;
|
|
13
|
-
align-items: flex-start;
|
|
14
|
-
align-self: auto;
|
|
15
|
-
margin: 0;
|
|
16
|
-
padding: 0;
|
|
17
|
-
width: auto;
|
|
18
|
-
height: auto;
|
|
19
|
-
max-width: none;
|
|
20
|
-
max-height: none;
|
|
21
|
-
min-width: 0;
|
|
22
|
-
min-height: 0;
|
|
23
|
-
border-radius: initial;
|
|
24
|
-
}
|
|
25
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
26
|
-
transform-origin: 0% 0%;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
overflow: clip;
|
|
29
|
-
}
|
|
30
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
|
|
31
|
-
transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
|
|
32
|
-
will-change: opacity, height, max-height;
|
|
33
|
-
}
|
|
34
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
35
|
-
height: 0;
|
|
36
|
-
max-height: 0;
|
|
37
|
-
opacity: 0;
|
|
38
|
-
}
|
|
39
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
40
|
-
height: var(--prop-value);
|
|
41
|
-
max-height: var(--prop-value);
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
|
|
45
|
-
transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
|
|
46
|
-
will-change: opacity, width, max-width;
|
|
47
|
-
}
|
|
48
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
49
|
-
width: 0;
|
|
50
|
-
max-width: 0;
|
|
51
|
-
opacity: 0;
|
|
52
|
-
}
|
|
53
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
54
|
-
width: var(--prop-value);
|
|
55
|
-
max-width: var(--prop-value);
|
|
56
|
-
opacity: 1;
|
|
57
|
-
}
|
|
58
|
-
.divider-module_divider-line__6CesR {
|
|
59
|
-
position: relative;
|
|
60
|
-
display: block;
|
|
61
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
62
|
-
background-color: var(--color);
|
|
63
|
-
opacity: var(--opacity);
|
|
64
|
-
}
|
|
65
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
66
|
-
height: var(--length);
|
|
67
|
-
left: var(--left);
|
|
68
|
-
width: var(--width);
|
|
69
|
-
margin: var(--margin);
|
|
70
|
-
}
|
|
71
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
72
|
-
width: var(--length);
|
|
73
|
-
left: var(--left);
|
|
74
|
-
height: var(--height);
|
|
75
|
-
margin: var(--margin);
|
|
76
|
-
}
|
|
77
|
-
.icon-module_icon-base-parent__nOMvW {
|
|
78
|
-
line-height: 1px !important;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.icon-module_icon-base__S0tHf {
|
|
82
|
-
min-width: var(--min-width);
|
|
83
|
-
min-height: var(--min-height);
|
|
84
|
-
width: var(--width) !important;
|
|
85
|
-
height: var(--height) !important;
|
|
86
|
-
line-height: var(--height);
|
|
87
|
-
background-color: var(--icon-color);
|
|
88
|
-
color: var(--icon-content-color);
|
|
89
|
-
background-repeat: no-repeat;
|
|
90
|
-
mask-image: var(--icon-url);
|
|
91
|
-
-webkit-mask-image: var(--icon-url);
|
|
92
|
-
mask-repeat: no-repeat;
|
|
93
|
-
-webkit-mask-repeat: no-repeat;
|
|
94
|
-
mask-size: contain;
|
|
95
|
-
-webkit-mask-size: contain;
|
|
96
|
-
mask-position: center;
|
|
97
|
-
-webkit-mask-position: center;
|
|
98
|
-
display: inline-block;
|
|
99
|
-
will-change: transform;
|
|
100
|
-
transform: translate3d(0, 0, 0);
|
|
101
|
-
}
|
|
102
|
-
.icon-module_icon-base__S0tHf svg {
|
|
103
|
-
fill: var(--icon-content-color);
|
|
104
|
-
width: var(--height);
|
|
105
|
-
height: var(--width);
|
|
106
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=require("../internals/export.js"),e=require("../internals/function-uncurry-this-clause.js"),i=require("../internals/array-includes.js"),t=require("../internals/array-method-is-strict.js"),n=r._export,s=e.functionUncurryThisClause,a=i.arrayIncludes.indexOf,u=t.arrayMethodIsStrict,c=s([].indexOf),o=!!c&&1/c([1],1,-0)<0;n({target:"Array",proto:!0,forced:o||!u("indexOf")},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return o?c(this,r,e)||0:a(this,r,e)}});
|
|
2
|
-
//# sourceMappingURL=es.array.index-of.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es.array.index-of.js","sources":["../../../../../../node_modules/core-js/modules/es.array.index-of.js"],"sourcesContent":["'use strict';\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeIndexOf = uncurryThis([].indexOf);\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;\nvar FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: FORCED }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n var fromIndex = arguments.length > 1 ? arguments[1] : undefined;\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf(this, searchElement, fromIndex) || 0\n : $indexOf(this, searchElement, fromIndex);\n }\n});\n"],"names":["$","require$$0","uncurryThis","require$$1","$indexOf","require$$2","arrayIncludes","indexOf","arrayMethodIsStrict","require$$3","nativeIndexOf","NEGATIVE_ZERO","target","proto","forced","searchElement","fromIndex","arguments","length","undefined","this"],"mappings":"+MAEIA,EAAIC,EAAAA,QACJC,EAAcC,EAAAA,0BACdC,EAAWC,EAAsCC,cAACC,QAClDC,EAAsBC,EAAAA,oBAEtBC,EAAgBR,EAAY,GAAGK,SAE/BI,IAAkBD,GAAiB,EAAIA,EAAc,CAAC,GAAI,GAAI,GAAK,EAKvEV,EAAE,CAAEY,OAAQ,QAASC,OAAO,EAAMC,OAJrBH,IAAkBH,EAAoB,YAIC,CAClDD,QAAS,SAAiBQ,GACxB,IAAIC,EAAYC,UAAUC,OAAS,EAAID,UAAU,QAAKE,EACtD,OAAOR,EAEHD,EAAcU,KAAML,EAAeC,IAAc,EACjDZ,EAASgB,KAAML,EAAeC,EACnC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var l=require("react"),a=require("./CollapsibleContainer.module.scss.js"),r=["collapsed","collapseHandler","children","horizontal","className"],t={width:"scrollWidth",height:"scrollHeight"},o=l.memo((function(o){var n=o.collapsed,i=void 0!==n&&n,s=o.collapseHandler,c=o.children,u=o.horizontal,d=void 0!==u&&u,p=o.className,h=void 0===p?"":p,f=e.objectWithoutProperties(o,r),m=l.useRef(null),v=l.useState(0),b=e.slicedToArray(v,2),j=b[0],x=b[1],g=!d;l.useEffect((function(){null==s||s(i)}),[s,i]),l.useLayoutEffect((function(){if(null!=m&&m.current){var e=g?"height":"width";x(m.current[t[e]])}}),[m,g]);var y=l.useMemo((function(){return e.objectSpread2({"--prop-name":g?"height":"width","--prop-max-name":g?"max-height":"max-width","--prop-value":"".concat(j,"px")},f)}),[g,f,j]),C=l.useMemo((function(){var e=[g?a.default.vertical:a.default.horizontal];return i&&j&&null!=j&&e.push(a.default.collapsed),!i&&j&&null!=j&&e.push(a.default.expanded),e.join(" ")}),[i,j,g]);return React.createElement("div",{className:"".concat(a.default["collapsible-container"]," ").concat(C," ").concat(h," "),ref:m,style:y},c)}));o.displayName="CollapsibleContainer",exports.CollapsibleContainer=o;
|
|
2
|
-
//# sourceMappingURL=CollapsibleContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleContainer.js","sources":["../../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode, useEffect, useLayoutEffect, useMemo, CSSProperties } from 'react'\n\nimport classes from './CollapsibleContainer.module.scss'\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nexport type CollapsibleContainerProps = {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n className?: string\n horizontal?: boolean\n} & CSSProperties\n\nexport const CollapsibleContainer: FC<CollapsibleContainerProps> = memo(({\n collapsed = false, collapseHandler, children, horizontal = false, className = '', ...style\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const vertical = !horizontal\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useLayoutEffect(() => {\n if (containerRef?.current) {\n const propName = vertical ? 'height' : 'width'\n\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, [containerRef, vertical])\n\n const styleProps: CSSProperties = useMemo(() => ({\n '--prop-name': vertical ? 'height' : 'width',\n '--prop-max-name': vertical ? 'max-height' : 'max-width',\n '--prop-value': `${contentProp}px`,\n ...style,\n } as CSSProperties), [vertical, style, contentProp])\n\n const classNames = useMemo(() => {\n const classNames = [vertical ? classes.vertical : classes.horizontal]\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.collapsed)\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.expanded)\n }\n return classNames.join(' ')\n }, [collapsed, contentProp, vertical])\n\n return (\n <div\n className={`${classes['collapsible-container']} ${classNames} ${className} `}\n ref={containerRef}\n style={styleProps}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","_ref$collapsed","collapsed","collapseHandler","children","_ref$horizontal","horizontal","_ref$className","className","style","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","contentProp","setContentProp","vertical","useEffect","useLayoutEffect","current","propName","styleProps","useMemo","_objectSpread","concat","classNames","classes","push","expanded","join","React","createElement","ref","displayName"],"mappings":"oWAIMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,E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,EAAU,KAAAD,OAAIrB,EAAa,KAC7E6B,IAAKxB,EACLJ,MAAOiB,GAENtB,EAGP,IAEAN,EAAqBwC,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default={"collapsible-container":"CollapsibleContainer-module_collapsible-container__u0Jmm",vertical:"CollapsibleContainer-module_vertical__w7MVN",collapsed:"CollapsibleContainer-module_collapsed__q8fs8",expanded:"CollapsibleContainer-module_expanded__O6Vh8",horizontal:"CollapsibleContainer-module_horizontal__QJWI-"};
|
|
2
|
-
//# sourceMappingURL=CollapsibleContainer.module.scss.js.map
|
package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleContainer.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),n=require("styled-components");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var t=require("react");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(n),l=["collapsed","collapseHandler","children","propName","className","css"],r={width:"scrollWidth",height:"scrollHeight"},i=function(e){return e.propName},c=t.memo(a.default.div.withConfig({displayName:"CollapsibleContainerS__StyledContainer",componentId:"sc-fj3lnl-0"})(["transform-origin:0% 0%;transition:opacity 0.2s ease-in-out,"," 0.2s ease-in-out,max-"," 0.2s ease-in-out;will-change:opacity,",",max-",";overflow:hidden;opacity:0;&.Collapsible__container__collapsed{",":0;max-",":0;opacity:0;}&.Collapsible__container__expanded{",":",";max-",":",";opacity:1;}"],i,i,i,i,i,i,i,(function(e){var n=e.contentProp;return"".concat(n,"px")}),i,(function(e){var n=e.contentProp;return"".concat(n,"px")}))),s=a.default(c).withConfig({displayName:"CollapsibleContainerS___StyledStyledContainer",componentId:"sc-fj3lnl-1"})(["",""],(function(e){return e.$_css})),p=t.memo((function(n){var o=n.collapsed,a=void 0!==o&&o,i=n.collapseHandler,c=n.children,p=n.propName,u=void 0===p?"height":p,d=n.className,_=n.css,f=e.objectWithoutProperties(n,l),m=t.useRef(),y=t.useState(0),h=e.slicedToArray(y,2),C=h[0],v=h[1];t.useEffect((function(){null==i||i(a)}),[i,a]),t.useEffect((function(){null!=m&&m.current&&v(m.current[r[u]])}),[m,u]);var x="";return a&&C&&null!=C&&(x="Collapsible__container__collapsed"),!a&&C&&null!=C&&(x="Collapsible__container__expanded"),React.createElement(s,e.extends({className:"".concat(d," ").concat(x),ref:m,contentProp:C,propName:u},f,{$_css:_}),c)}));p.displayName="ContainerS",exports.ContainerS=p;
|
|
2
|
-
//# sourceMappingURL=CollapsibleContainerS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleContainerS.js","sources":["../../../../../../../../src/core/ui/components/container/CollapsibleContainerS.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode, useEffect } from 'react'\nimport styled from 'styled-components'\n\ntype StyledContainerProps = { propName: string; className: string; [key: string]: any }\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nconst propNameFunc = ({ propName }: { propName: StyledContainerProps['propName']}) => propName\n\nconst StyledContainer: FC<StyledContainerProps> = memo(styled.div<StyledContainerProps>`\n transform-origin: 0% 0%;\n transition: opacity 0.2s ease-in-out, ${propNameFunc} 0.2s ease-in-out, max-${propNameFunc} 0.2s ease-in-out;\n will-change: opacity, ${propNameFunc}, max-${propNameFunc};\n overflow: hidden;\n opacity: 0;\n\n &.Collapsible__container__collapsed {\n ${propNameFunc}: 0;\n max-${propNameFunc}: 0;\n opacity: 0;\n }\n\n &.Collapsible__container__expanded {\n ${propNameFunc}: ${({ contentProp }: Partial<StyledContainerProps>) => `${contentProp}px`};\n max-${propNameFunc}: ${({ contentProp }: Partial<StyledContainerProps>) => `${contentProp}px`};\n opacity: 1;\n }\n`)\n\nexport type ContainerProps = {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n propName?: string\n className?: string\n css?: string\n}\nexport const ContainerS: FC<ContainerProps> = memo(({\n collapsed = false, collapseHandler, children, propName = 'height', className, css, ...props\n}: ContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n const [contentProp, setContentProp] = useState(0)\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useEffect(() => {\n if (containerRef?.current) {\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, [containerRef, propName])\n\n let resolvedClassName = ''\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n resolvedClassName = 'Collapsible__container__collapsed'\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n resolvedClassName = 'Collapsible__container__expanded'\n }\n\n return (\n <StyledContainer\n className={`${className} ${resolvedClassName}`}\n ref={containerRef}\n contentProp={contentProp}\n propName={propName}\n css={css}\n {...props}\n >\n {children}\n </StyledContainer>\n )\n})\n\nContainerS.displayName = 'ContainerS'\n"],"names":["elementPropNameMap","width","height","propNameFunc","_ref","propName","StyledContainer","memo","styled","div","withConfig","displayName","componentId","_ref2","contentProp","concat","_ref3","_StyledStyledContainer","p","$_css","ContainerS","_ref4","_ref4$collapsed","collapsed","collapseHandler","children","_ref4$propName","className","css","props","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","setContentProp","useEffect","current","resolvedClassName","React","createElement","_extends","ref"],"mappings":"uaAKMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAGJC,EAAe,SAAHC,GAAc,OAAAA,EAARC,QAAsE,EAExFC,EAA4CC,EAAIA,KAACC,UAAOC,IAAGC,WAAA,CAAAC,YAAA,yCAAAC,YAAA,eAAVJ,CAAU,CAAA,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3BI,IAAKb,EACLnB,YAAaA,EACbT,SAAUA,GAENwB,EAAK,CAAAV,MADJS,IAGJH,EAGP,IAEAL,EAAWT,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.object.to-string.js"),require("../../../../../node_modules/core-js/modules/web.dom-collections.for-each.js"),require("../../../../../node_modules/core-js/modules/es.object.entries.js"),require("../../../../../node_modules/core-js/modules/es.array.concat.js");var r=require("react"),t=require("./fbox.module.scss.js"),o=["style","children","tabIndex","className"],s={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},a=function(e){return e&&s[e]||e},n=r.forwardRef((function(s,n){var l=s.style,c=s.children,d=s.tabIndex,i=s.className,u=void 0===i?"":i,f=e.objectWithoutProperties(s,o),j=r.useMemo((function(){var r={},t={};return Object.entries(f).forEach((function(o){var s=e.slicedToArray(o,2),a=s[0],n=s[1];"data"===a.substr(0,4)?r[a]=n:t[a]=n})),[r,t]}),[f]),m=e.slicedToArray(j,2),b=m[0],x=m[1],p=r.useMemo((function(){return e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2({},x),x.align?{alignItems:a(x.align)}:{}),x.justify?{justifyContent:a(x.justify)}:{}),x.direction?{flexDirection:x.direction}:{}),l)}),[x,l]);return React.createElement("div",e.extends({ref:n,tabIndex:d,className:"".concat(t.default["flexible-box"]," ").concat(u),style:p},b),c)}));n.displayName="FBoxRefForwarded";var l=r.memo(n);l.displayName="FBox",exports.FBox=l;
|
|
2
|
-
//# sourceMappingURL=FBox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n} & CSSProperties\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (key.substr(0, 4) === 'data') {\n restProps[key] = value\n } else {\n cssProps[key] = value\n }\n })\n return [restProps, cssProps]\n }, [props])\n\n const styles = useMemo(() => (\n {\n ...cssProps,\n ...(cssProps.align ? { alignItems: resolveFlexProps(cssProps.align as string) } : {}),\n ...(cssProps.justify ? { justifyContent: resolveFlexProps(cssProps.justify as string) } : {}),\n ...(cssProps.direction ? { flexDirection: cssProps.direction } : {}),\n ...style,\n }\n ), [cssProps, style])\n\n return (\n <div\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['flexible-box']} ${className}`}\n style={styles as CSSProperties}\n {...restProps}\n >\n {children}\n </div>\n )\n})\n\nFBoxRefForwarded.displayName = 'FBoxRefForwarded'\n\nexport const FBox: FC<FBoxProps> = memo<FBoxProps>(FBoxRefForwarded)\n\n\nFBox.displayName = 'FBox'\n\n\n// default flex centralized, 100% width and height\n// export const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n// {\n// width: props.width || '100%',\n// height: props.height || '100%',\n// justify: props.justify || 'center',\n// align: props.align || 'center',\n// ...props,\n// }\n// ))``)\n\n// export const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// ...props,\n// }))``)\n\n// export const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// style: {\n// text: 'blue',\n// padding: '1rem',\n// border: '1px solid green',\n// },\n// ...props,\n// }))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","FBoxRefForwarded","forwardRef","_ref","ref","style","children","tabIndex","_ref$className","className","props","_objectWithoutProperties","objectWithoutProperties","_excluded","_useMemo","useMemo","restProps","cssProps","Object","entries","forEach","_ref2","_ref3","_slicedToArray","key","substr","_useMemo2","styles","_objectSpread","objectSpread2","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","displayName","FBox","memo"],"mappings":"6iBAgCMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAmB,SAACC,GAAc,OAA0BA,GAASJ,EAAaI,IAAmBA,CAAK,EAG1GC,EAAmBC,EAAUA,YAAC,SAAAC,EAEtBC,GAA+C,IAD3DC,EAAKF,EAALE,MAAOC,EAAQH,EAARG,SAAUC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAC,wBAAAT,EAAAU,GAEnDC,EAA8BC,EAAAA,SAAQ,WACpC,IAAMC,EAAqC,CAAA,EACrCC,EAAoC,CAAA,EAS1C,OAPAC,OAAOC,QAAQT,GAAOU,SAAQ,SAAAC,GAAkB,IAAAC,EAAAC,EAAAA,cAAAF,EAAA,GAAhBG,EAAGF,EAAA,GAAEtB,EAAKsB,EAAA,GACf,SAArBE,EAAIC,OAAO,EAAG,GAChBT,EAAUQ,GAAOxB,EAEjBiB,EAASO,GAAOxB,CAEpB,IACO,CAACgB,EAAWC,EACrB,GAAG,CAACP,IAAOgB,EAAAH,EAAAA,cAAAT,EAAA,GAZJE,EAASU,EAAA,GAAET,EAAQS,EAAA,GAcpBC,EAASZ,EAAAA,SAAQ,WAAA,OAAAa,EAAAC,cAAAD,gBAAAA,EAAAA,cAAAA,EAAAC,cAAAD,mBAEhBX,GACCA,EAASa,MAAQ,CAAEC,WAAYhC,EAAiBkB,EAASa,QAAqB,CAAE,GAChFb,EAASe,QAAU,CAAEC,eAAgBlC,EAAiBkB,EAASe,UAAuB,CAAE,GACxFf,EAASiB,UAAY,CAAEC,cAAelB,EAASiB,WAAc,CAAE,GAChE7B,EAAK,GAET,CAACY,EAAUZ,IAEd,OACE+B,MAAAC,cAAA,MAAAC,UAAA,CACElC,IAAKA,EACLG,SAAUA,EACVE,UAAS,GAAA8B,OAAMC,EAAO,QAAS,gBAAeD,KAAAA,OAAI9B,GAClDJ,MAAOsB,GACHX,GAEHV,EAGP,IAEAL,EAAiBwC,YAAc,uBAElBC,EAAsBC,EAAIA,KAAY1C,GAGnDyC,EAAKD,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),e=require("react");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(require("styled-components")),r={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},o=function(t){return t&&r[t]||t},a=e.memo(i.default.div.withConfig({displayName:"Flex",componentId:"sc-19vq3db-0"})(["display:flex;position:relative;flex-direction:",";flex:",";flex-grow:",";flex-shrink:",";flex-basis:",";flex-wrap:",";gap:",";text-align:",";justify-content:",";align-items:",";align-self:",";margin:",";padding:",";width:",";height:",";max-width:",";max-height:",";min-width:",";min-height:",";border-radius:",";"],(function(t){return t.direction||"row"}),(function(t){var e=t.flex;return void 0!==e?e:"0"}),(function(t){var e=t.flexGrow;return void 0!==e?e:"0"}),(function(t){var e=t.flexShrink;return void 0!==e?e:"0"}),(function(t){return t.flexBasis||"auto"}),(function(t){return t.flexWrap||"nowrap"}),(function(t){var e=t.gap;return void 0!==e?e:"0"}),(function(t){return t.alignText||"left"}),(function(t){var e=t.justify;return o(e)||"flex-start"}),(function(t){var e=t.align;return o(e)||"flex-start"}),(function(t){return t.alignSelf||"auto"}),(function(t){return t.margin||"0"}),(function(t){return t.padding||"0"}),(function(t){return t.width||"auto"}),(function(t){return t.height||"auto"}),(function(t){return t.maxWidth||"none"}),(function(t){return t.maxHeight||"none"}),(function(t){var e=t.minWidth;return e||"0"===e?e:"0"}),(function(t){return t.minHeight||"0"}),(function(t){return t.borderRadius||"initial"}))),u=e.memo(i.default(a).attrs((function(e){return t.objectSpread2({width:e.width||"100%",height:e.height||"100%",justify:e.justify||"center",align:e.align||"center"},e)})).withConfig({displayName:"Flex__FlexWrapper",componentId:"sc-19vq3db-1"})([""])),l=e.memo(i.default(a).attrs((function(e){return t.objectSpread2({width:"initial"},e)})).withConfig({displayName:"Flex__FlexTight",componentId:"sc-19vq3db-2"})([""])),f=e.memo(i.default(a).attrs((function(e){return t.objectSpread2({width:"initial",style:{text:"blue",padding:"1rem",border:"1px solid green"}},e)})).withConfig({displayName:"Flex__FlexTightStyled",componentId:"sc-19vq3db-3"})([""]));exports.Flex=a,exports.FlexTight=l,exports.FlexTightStyled=f,exports.FlexWrapper=u;
|
|
2
|
-
//# sourceMappingURL=Flex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.js","sources":["../../../../../../../../src/core/ui/components/container/Flex.ts"],"sourcesContent":["import { memo } from 'react'\nimport styled from 'styled-components'\n\nexport type FlexProps = {\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\nexport const Flex = memo(styled.div<FlexProps>`\n display: flex;\n position: relative;\n flex-direction: ${({ direction }: Partial<FlexProps>) => direction || 'row'};\n flex: ${({ flex }: Partial<FlexProps>) => (flex !== undefined ? flex : '0')};\n flex-grow: ${({ flexGrow }: Partial<FlexProps>) => (flexGrow !== undefined ? flexGrow : '0')};\n flex-shrink: ${({ flexShrink }: Partial<FlexProps>) => (flexShrink !== undefined ? flexShrink : '0')};\n flex-basis: ${({ flexBasis }: Partial<FlexProps>) => flexBasis || 'auto'};\n flex-wrap: ${({ flexWrap }: Partial<FlexProps>) => flexWrap || 'nowrap'};\n gap: ${({ gap }: Partial<FlexProps>) => (gap !== undefined ? gap : '0')};\n text-align: ${({ alignText }: Partial<FlexProps>) => alignText || 'left'};\n justify-content: ${({ justify }: Partial<FlexProps>) => resolveFlexProps(justify) || 'flex-start'};\n align-items: ${({ align }: Partial<FlexProps>) => resolveFlexProps(align) || 'flex-start'};\n align-self: ${({ alignSelf }: Partial<FlexProps>) => alignSelf || 'auto'};\n margin: ${({ margin }: Partial<FlexProps>) => margin || '0'};\n padding: ${({ padding }: Partial<FlexProps>) => padding || '0'};\n width: ${({ width }: Partial<FlexProps>) => width || 'auto'};\n height: ${({ height }: Partial<FlexProps>) => height || 'auto'};\n max-width: ${({ maxWidth }: Partial<FlexProps>) => maxWidth || 'none'};\n max-height: ${({ maxHeight }: Partial<FlexProps>) => maxHeight || 'none'};\n min-width: ${({ minWidth }: Partial<FlexProps>) => ((minWidth || minWidth === '0') ? minWidth : '0')};\n min-height: ${({ minHeight }: Partial<FlexProps>) => minHeight || '0'};\n border-radius: ${({ borderRadius }: Partial<FlexProps>) => borderRadius || 'initial'};\n`)\n\n// default flex centralized, 100% width and height\nexport const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n {\n width: props.width || '100%',\n height: props.height || '100%',\n justify: props.justify || 'center',\n align: props.align || 'center',\n ...props,\n }\n))``)\n\nexport const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n width: 'initial',\n ...props,\n}))``)\n\nexport const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n width: 'initial',\n style: {\n text: 'blue',\n padding: '1rem',\n border: '1px solid green',\n },\n ...props,\n}))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","Flex","memo","styled","div","withConfig","displayName","componentId","_ref","direction","_ref2","flex","undefined","_ref3","flexGrow","_ref4","flexShrink","_ref5","flexBasis","_ref6","flexWrap","_ref7","gap","_ref8","alignText","_ref9","justify","_ref10","align","_ref11","alignSelf","_ref12","margin","_ref13","padding","_ref14","width","_ref15","height","_ref16","maxWidth","_ref17","maxHeight","_ref18","minWidth","_ref19","minHeight","_ref20","borderRadius","FlexWrapper","attrs","props","_objectSpread","FlexTight","FlexTightStyled","style","text","border"],"mappings":"2QA2BMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAmB,SAACC,GAAc,OAA0BA,GAASJ,EAAaI,IAAmBA,CAAK,EAEnGC,EAAOC,EAAIA,KAACC,UAAOC,IAAGC,WAAA,CAAAC,YAAA,OAAAC,YAAA,gBAAVJ,CAAU,CAAA,iDAAA,SAAA,cAAA,gBAAA,eAAA,cAAA,QAAA,eAAA,oBAAA,gBAAA,eAAA,WAAA,YAAA,UAAA,WAAA,cAAA,eAAA,cAAA,eAAA,kBAAA,MAGf,SAAAK,GAAY,OAAAA,EAATC,WAAiD,KAAK,IACnE,SAAAC,GAAA,IAAGC,EAAID,EAAJC,KAA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U,OACxBZ,QAASyB,EAAMzB,SAAW,SAC1BE,MAAOuB,EAAMvB,OAAS,UACnBuB,EAAK,IAEV9C,WAAA,CAAAC,YAAA,oBAAAC,YAAA,gBAR8BJ,CAQ3B,CAAA,MAEQkD,EAAYnD,EAAIA,KAACC,EAAM,QAACF,GAAMiD,OAAM,SAACC,GAAyB,OAAAC,gBAAA,CACzEhB,MAAO,WACJe,EAAK,IACP9C,WAAA,CAAAC,YAAA,kBAAAC,YAAA,gBAH2BJ,CAGxB,CAAA,MAEOmD,EAAkBpD,EAAIA,KAACC,EAAM,QAACF,GAAMiD,OAAM,SAACC,GAAyB,OAAAC,gBAAA,CAC/EhB,MAAO,UACPmB,MAAO,CACLC,KAAM,OACNtB,QAAS,OACTuB,OAAQ,oBAEPN,EAAK,IACP9C,WAAA,CAAAC,YAAA,wBAAAC,YAAA,gBARiCJ,CAQ9B,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),r=require("styled-components"),t=require("react"),o=require("./Flex.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(r),n=["title","border","background","onClick","cssProp","children"],s=t.memo((function(r){var t=r.title,o=r.border,c=r.background,l=r.onClick,s=r.cssProp,i=r.children,u=e.objectWithoutProperties(r,n);return React.createElement(a,e.extends({onClick:l},u,{$_css:o||"border: 1px solid #999999;",$_css2:c||"background-color: rgba(0, 120, 255, 0.2);",$_css3:s}),t&&React.createElement("h2",null,t),i&&i)}));s.displayName="Placeholder";var a=l.default(o.FlexWrapper).withConfig({displayName:"Placeholder___StyledFlexWrapper",componentId:"sc-ozx0bx-0"})([""," "," ",""],(function(e){return e.$_css}),(function(e){return e.$_css2}),(function(e){return e.$_css3}));exports.Placeholder=s;
|
|
2
|
-
//# sourceMappingURL=Placeholder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.js","sources":["../../../../../../../../src/core/ui/components/container/Placeholder.tsx"],"sourcesContent":["import { FC, memo, PropsWithChildren } from 'react'\n\nimport { FlexWrapper, FlexProps } from './Flex'\n\nexport type PlaceholderProps = FlexProps & PropsWithChildren<unknown> & {\n title?: string\n cssProp?: string\n background?: string\n border?: string\n onClick?: () => void\n}\n\nexport const Placeholder: FC<PlaceholderProps>\n= memo<PlaceholderProps>(({ title, border, background, onClick, cssProp, children, ...props }: PlaceholderProps) => (\n <FlexWrapper\n css={`\n ${border || 'border: 1px solid #999999;'}\n ${background || 'background-color: rgba(0, 120, 255, 0.2);'}\n ${cssProp}\n `}\n onClick={onClick}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n >\n {title && (<h2>{title}</h2>)}\n {children && children}\n </FlexWrapper>\n))\n\nPlaceholder.displayName = 'Placeholder'\n"],"names":["Placeholder","memo","_ref","title","border","background","onClick","cssProp","children","props","_objectWithoutProperties","objectWithoutProperties","_excluded","React","createElement","_StyledFlexWrapper","_extends","$_css","$_css2","$_css3","displayName","_styled","FlexWrapper","withConfig","componentId","p"],"mappings":"uWAYaA,EACXC,EAAAA,MAAuB,SAAAC,GAAA,IAAGC,EAAKD,EAALC,MAAOC,EAAMF,EAANE,OAAQC,EAAUH,EAAVG,WAAYC,EAAOJ,EAAPI,QAASC,EAAOL,EAAPK,QAASC,EAAQN,EAARM,SAAaC,EAAKC,EAAAC,wBAAAT,EAAAU,GAAA,OACzFC,MAAAC,cAAAC,EAAAC,UAAA,CAMEV,QAASA,GAELG,EAAK,CAAAQ,MANLb,GAAU,6BAA4Bc,OACtCb,GAAc,4CAA2Cc,OACzDZ,IAMHJ,GAAUU,MAAAC,cAAA,KAAA,KAAKX,GACfK,GAAYA,EACD,IAGhBR,EAAYoB,YAAc,cAAa,IAAAL,EAAAM,EAAA,QAAAC,eAAAC,WAAA,CAAAH,YAAA,kCAAAI,YAAA,eAAAH,CAAA,CAAA,GAAA,IAAA,IAAA,KAAA,SAAAI,GAAA,OAAAA,EAAAR,KAAA,IAAA,SAAAQ,GAAA,OAAAA,EAAAP,MAAA,IAAA,SAAAO,GAAA,OAAAA,EAAAN,MAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),i=require("../../../../../node_modules/lodash-es/debounce.js"),n=require("./FBox.js"),l=["children","debounceDelay"],o={main:{position:"absolute",zIndex:111,left:0,pointerEvents:"none"},empty:{pointerEvents:"none"}},r=t.memo((function(r){var u=r.children,d=r.debounceDelay,c=void 0===d?250:d,h=e.objectWithoutProperties(r,l),a=t.useRef(),s=t.useRef({width:0,height:0}),v=t.useState({width:void 0,height:void 0}),g=e.slicedToArray(v,2),m=g[0],p=g[1],f=t.useMemo((function(){return i.default((function(e){var t,i,n,l,o=e[0].contentRect.width,r=e[0].contentRect.height;(null===(t=s.current)||void 0===t?void 0:t.width)===o&&(null===(i=s.current)||void 0===i?void 0:i.height)===r||(s.current={width:o,height:r},p({width:null==a||null===(n=a.current)||void 0===n?void 0:n.clientWidth,height:null==a||null===(l=a.current)||void 0===l?void 0:l.clientHeight}))}),c)}),[c]);return t.useLayoutEffect((function(){var e,t,i,n;null!=a&&a.current&&(t=null==a?void 0:a.current,(e=new ResizeObserver(f)).observe(t),p({width:null==a||null===(i=a.current)||void 0===i?void 0:i.clientWidth,height:null==a||null===(n=a.current)||void 0===n?void 0:n.clientHeight}));return function(){var i,n;null===(i=e)||void 0===i||null===(n=i.unobserve)||void 0===n||n.call(i,t)}}),[f,a]),React.createElement(n.FBox,e.extends({width:"100%",height:"100%",justify:"center",align:"center",direction:"column"},h),React.createElement(n.FBox,{style:o.main,width:"100%",height:"100%",ref:a}),!u&&React.createElement(n.FBox,{width:"".concat(Math.max((null==m?void 0:m.width)||200,200)||200,"px"),height:"".concat(Math.max((null==m?void 0:m.height)||200,200)||200,"px"),style:o.empty}),u&&(null==u?void 0:u({height:"".concat((null==m?void 0:m.height)||200,"px"),width:"".concat((null==m?void 0:m.width)||200,"px"),measured:!(null==m||!m.height)})))}));r.displayName="ResizableContainer",exports.ResizableContainer=r;
|
|
2
|
-
//# sourceMappingURL=ResizableContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResizableContainer.js","sources":["../../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"sourcesContent":["import { memo, useState, useRef, useMemo, useLayoutEffect, RefObject, PropsWithChildren } from 'react'\nimport debounce from 'lodash-es/debounce'\n\nimport { FBox, FBoxProps } from './FBox'\n\n\nexport type ResizableContainerProps = FBoxProps & PropsWithChildren<any> & {\n debounceDelay?: number\n}\n\nexport type ResizableContainerRenderProps = {\n width: number | string\n height: number | string\n measured: boolean\n}\n\ntype WrapperSize = {width: undefined | number; height: undefined | number}\n\nconst styles = {\n main: {\n position: 'absolute',\n zIndex: 111,\n left: 0,\n pointerEvents: 'none',\n // backgroundColor: '#FF000040',\n },\n empty: {\n pointerEvents: 'none',\n // background: '#FF000040',\n // border: '1px solid #0000FF40',\n },\n}\n\nexport const ResizableContainer = memo<ResizableContainerProps>(\n ({ children, debounceDelay = 250, ...props }: ResizableContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n\n const lastResizeWidthRef = useRef<{ width: number; height: number }>({ width: 0, height: 0 })\n\n const [containerSize, setContainerSize]\n = useState<WrapperSize>({ width: undefined, height: undefined })\n\n const debouncedResizeWrapper = useMemo(() => debounce((entries) => {\n const newResizeWidth = entries[0].contentRect.width\n const newResizeHeight = entries[0].contentRect.height\n\n if (lastResizeWidthRef.current?.width === newResizeWidth\n && lastResizeWidthRef.current?.height === newResizeHeight) {\n return\n }\n lastResizeWidthRef.current = { width: newResizeWidth, height: newResizeHeight }\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }, debounceDelay), [debounceDelay])\n\n useLayoutEffect(() => {\n let resizeObserver: ResizeObserver\n let containerElement: HTMLElement\n\n if (containerRef?.current) {\n containerElement = containerRef?.current\n resizeObserver = new ResizeObserver(debouncedResizeWrapper)\n resizeObserver.observe(containerElement as Element)\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }\n return () => {\n resizeObserver?.unobserve?.(containerElement as Element)\n }\n }, [debouncedResizeWrapper, containerRef])\n\n // END RESIZING\n\n return (\n <FBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <FBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (<FBox\n width={`${Math.max(containerSize?.width || 200, 200) || 200}px`}\n height={`${Math.max(containerSize?.height || 200, 200) || 200}px`}\n style={styles.empty}\n />)}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </FBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","_ref$debounceDelay","debounceDelay","props","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","lastResizeWidthRef","width","height","_useState","useState","undefined","_useState2","_slicedToArray","containerSize","setContainerSize","debouncedResizeWrapper","useMemo","debounce","entries","_lastResizeWidthRef$c","_lastResizeWidthRef$c2","_containerRef$current","_containerRef$current2","newResizeWidth","contentRect","newResizeHeight","current","clientWidth","clientHeight","useLayoutEffect","resizeObserver","containerElement","_containerRef$current3","_containerRef$current4","ResizeObserver","observe","_resizeObserver","_resizeObserver$unobs","unobserve","call","React","createElement","FBox","_extends","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"kRAkBMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,IACRC,KAAM,EACNC,cAAe,QAGjBC,MAAO,CACLD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A,SAArBA,EAAuBL,YAC9BpB,OAAQJ,SAAqB,QAAT8B,EAAZ9B,EAAcuB,eAAO,IAAAO,SAArBA,EAAuBL,gBAGnC,OAAO,WAAM,IAAAQ,EAAAC,EACG,QAAdD,EAAAN,SAAcO,IAAAD,GAAWC,QAAXA,EAAdD,EAAgBE,qBAASD,GAAzBA,EAAAE,KAAAH,EAA4BL,GAEhC,GAAG,CAAChB,EAAwBZ,IAK1BqC,MAAAC,cAACC,EAAIA,KAAAC,UAAA,CACHrC,MAAM,OACNC,OAAO,OACPqC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACN/C,GAEJyC,MAAAC,cAACC,EAAAA,KAAI,CACHK,MAAO7D,EAAOC,KACdmB,MAAM,OACNC,OAAO,OACPyC,IAAK7C,KAELP,GAAa4C,MAAAC,cAACC,EAAAA,KAAI,CAClBpC,MAAK,GAAA2C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeP,QAAS,IAAK,MAAQ,IAAQ,MAChEC,OAAM,GAAA0C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeN,SAAU,IAAK,MAAQ,IAAQ,MAClEwC,MAAO7D,EAAOM,QAEfI,IAAYA,aAAQ,EAARA,EAAW,CACtBW,OAAM0C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeN,SAAU,IAAO,MAC3CD,MAAK2C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeP,QAAS,IAAO,MACzC8C,WAAYvC,UAAAA,EAAeN,WAInC,IAGFd,EAAmB4D,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fbox.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var t=require("react"),r=require("./divider.module.scss.js"),i=t.memo((function(e){var i=e.orientation,a=e.vertical,o=e.color,l=void 0===o?"#999999":o,n=e.opacity,c=e.length,d=void 0===c?"80%":c,s=e.left,u=void 0===s?"0":s,v=e.width,m=void 0===v?"1px":v,p=e.height,f=void 0===p?"1px":p,h=e.margin,g=e.className,x=void 0===g?"":g,y=t.useMemo((function(){return"vertical"===i||!0===a}),[i,a]),D=t.useMemo((function(){return{"--width":m,"--height":f,"--length":d,"--opacity":n,"--color":l,"--left":u,"--margin":h||(y?"auto 0":"0 auto")}}),[m,f,d,n,l,u,h,y]),j=y?r.default.vertical:r.default.horizontal;return React.createElement("div",{className:"".concat(r.default["divider-line"]," ").concat(j," ").concat(x),style:D})}));i.displayName="DividerLine";var a=t.memo((function(t){return React.createElement(i,e.extends({vertical:!0,length:"100%"},t))}));a.displayName="DividerVertical";var o=t.memo((function(t){return React.createElement(i,e.extends({length:"100%"},t))}));o.displayName="DividerHorizontal",exports.DividerHorizontal=o,exports.DividerLine=i,exports.DividerVertical=a;
|
|
2
|
-
//# sourceMappingURL=DividerLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DividerLine.js","sources":["../../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"iRAkBaA,EAAgCC,EAAAA,MAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,EAAAA,SAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,EAAAA,SAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAAA,QAAQnB,SAAWmB,EAAAA,QAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAO,QAAS,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("styled-components");require("../../../../../node_modules/core-js/modules/es.array.map.js"),require("../../../../../node_modules/core-js/modules/es.array.concat.js");var n=require("react");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(t),l=["options","value","inputRef"],i=["label","name","type","value","defaultValue","placeholder","inputRef","error","disabled","userDisabled","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","className","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","options","css"],c=function(){return"#000000"},r=n.memo((function(){return React.createElement("span",null)})),s=o.default.div.withConfig({displayName:"Field__FieldWrapper",componentId:"sc-i8c0jy-0"})(["opacity:",";pointer-events:",";flex:1 1 auto;width:100%;@media (min-width:400px){flex:1;}.label{font-size:0.8rem !important;font-weight:normal;}.help{text-align:left;}.mainControl{flex:1;border-radius:6px;box-shadow:0 0 6px 1px rgba(0,0,0,0.06);will-change:box-shadow;transition:box-shadow 250ms ease-in-out;&:hover{box-shadow:0 0 8px 2px rgba(0,0,0,0.1);}}button{box-shadow:0 0 8px 2px rgba(0,0,0,0.1);}.select{width:100%;flex:1;&::after{border-color:#000000 !important;}}.icon{&.is-action{cursor:pointer;pointer-events:initial !important;}}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}input[type=number]{-moz-appearance:textfield;}.input[type=date]::-webkit-calendar-picker-indicator{opacity:0;-webkit-appearance:none;position:absolute;left:0;top:0;width:40px;height:100%;margin:0;padding:0;cursor:pointer;}textarea{resize:none;}"],(function(e){var t=e.disabled,n=e.userDisabled;return t||n?.5:1}),(function(e){var t=e.disabled,n=e.userDisabled;return t||n?"none":"auto"})),u=o.default(s).withConfig({displayName:"Field___StyledFieldWrapper",componentId:"sc-i8c0jy-1"})(["",""],(function(e){return e.$_css})),d=n.memo((function(t){var n=t.options,a=t.value,o=t.inputRef,i=e.objectWithoutProperties(t,l);return React.createElement("div",{className:"select"},React.createElement("select",e.extends({},i,{ref:o,defaultValue:a}),null==n?void 0:n.map((function(t){return React.createElement("option",{key:"".concat(JSON.stringify(t)),value:"object"===e.typeof(t)?null==t?void 0:t.value:t},"object"===e.typeof(t)?null==t?void 0:t.label:t)}))))})),p=o.default.input.withConfig({displayName:"Field__InputComponent",componentId:"sc-i8c0jy-2"})([""]),m=o.default.textarea.withConfig({displayName:"Field__TextAreaComponent",componentId:"sc-i8c0jy-3"})([""]),f=o.default.label.withConfig({displayName:"Field__StyledFieldLabel",componentId:"sc-i8c0jy-4"})(["text-align:left;"]),h=n.memo((function(t){var a=t.label,o=t.name,l=t.type,s=void 0===l?"text":l,h=t.value,b=t.defaultValue,x=t.placeholder,g=t.inputRef,v=t.error,y=t.disabled,C=t.userDisabled,w=t.withoutComponent,R=t.helpTextInfo,N=t.helpText,_=t.children,j=t.iconLeft,E=t.iconRight,F=t.addon,I=t.className,k=t.onChange,D=t.onChangeInner,q=t.onBlur,B=t.onFocus,T=t.rightIconClick,W=t.leftIconClick,L=t.options,P=t.css,S=e.objectWithoutProperties(t,i),V=p;_||"textarea"!==s||(V=m);var z=n.useCallback((function(e){var t;C?null==e||null===(t=e.preventDefault)||void 0===t||t.call(e):B&&B(e)}),[C,B]),K=n.useCallback((function(e){C||(D&&null!=e&&e.target?(e.target.value=D(e.target.value),k&&k(e)):k&&k(e))}),[D,k,C]),M=n.useMemo((function(){return void 0===h?{defaultValue:b}:{value:h}}),[h,b]);return React.createElement(u,{className:"field ".concat(I),error:v,disabled:y,userDisabled:C,$_css:P},React.createElement(f,{htmlFor:o,className:"label"},a),React.createElement("div",{className:"field ".concat(F?"has-addons":"")},React.createElement("div",{className:"control mainControl ".concat(j&&!w?"has-icons-left":""," ").concat(E?"has-icons-right":"")},!w&&(_||"select"!==s&&!L?!_&&React.createElement(V,e.extends({name:o,id:o,ref:g,className:"input ".concat(v?"is-danger":""),type:s,placeholder:x},M,{onChange:K,onBlur:q,onFocus:z,onKeyDown:z,autoComplete:"off",disabled:y},S)):React.createElement(d,e.extends({name:o,id:o,inputRef:g,className:"input ".concat(v?"is-danger":""),type:"select",placeholder:x,value:h,options:L,onChange:k,onBlur:q,onFocus:z,onKeyDown:z,autoComplete:"off",disabled:y},S))),j&&!w&&React.createElement("span",{className:"iconLeft icon is-small is-left ".concat(W?"is-action":""),onClick:W},React.createElement(r,{iconName:j,color:c})),E&&React.createElement("span",{className:"iconRight icon is-small is-right ".concat(T?"is-action":""),onClick:T},React.createElement(r,{iconName:E,color:c})),_&&_),F&&F),R&&React.createElement("p",{className:"help"},R),N&&React.createElement("p",{className:"help ".concat(v?"is-danger":"")},N))}));h.displayName="Field",exports.Field=h,exports.FieldWrapper=s,exports.Select=d,exports.setIconColor=function(e){c=e},exports.setIconComponent=function(e){r=e};
|
|
2
|
-
//# sourceMappingURL=Field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../../../../../src/core/ui/components/field/Field.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport { FC, ReactNode, memo, useMemo, useCallback, PropsWithChildren } from 'react'\nimport styled from 'styled-components'\n\nimport type { FieldError, IconComponentType } from './types'\n\nlet iconColor: string | (() => string) = () => '#000000'\n\nexport const setIconColor = (color: string | (() => string)): void => {\n iconColor = color\n}\n\nlet IconComponent: IconComponentType = memo(function IconComponent() { return <span /> })\n\nexport const setIconComponent = (component: IconComponentType): void => {\n IconComponent = component\n}\n\nexport type FileWrapperProps = PropsWithChildren<unknown> & {\n className?: string\n error?: boolean\n disabled?: boolean\n userDisabled?: boolean\n css?: string\n}\n\nexport const FieldWrapper: FC<FileWrapperProps> = styled.div<FileWrapperProps>`\n opacity: ${({ disabled, userDisabled }) => (disabled || userDisabled ? 0.5 : 1)};\n pointer-events: ${({ disabled, userDisabled }) => (disabled || userDisabled ? 'none' : 'auto')};\n flex: 1 1 auto;\n width: 100%;\n @media (min-width: 400px) {\n flex: 1;\n }\n .label {\n font-size: 0.8rem !important;\n font-weight: normal;\n }\n\n .help {\n text-align: left;\n }\n\n .mainControl {\n flex: 1;\n border-radius: 6px;\n box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);\n will-change: box-shadow;\n transition: box-shadow 250ms ease-in-out;\n &:hover {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n }\n button {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n .select {\n width: 100%;\n flex: 1;\n &::after {\n border-color: #000000 !important;\n }\n }\n\n .icon {\n &.is-action {\n cursor: pointer;\n pointer-events: initial !important;\n }\n }\n\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type=number] {\n -moz-appearance: textfield;\n }\n\n .input[type=date]::-webkit-calendar-picker-indicator {\n opacity:0;\n -webkit-appearance: none;\n position: absolute;\n left: 0;\n top: 0;\n width: 40px;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n }\n\n textarea {\n resize: none;\n }\n`\n\ntype EventType = { target: any; type?: any } & Partial<Event>\nexport interface FieldProps {\n label?: string\n name?: string\n type?: string\n min?: number | string | Date | any\n max?: number | string | Date | any\n value?: string | number | readonly string[] | undefined\n defaultValue?: string | number | readonly string[] | undefined\n placeholder?: string\n inputRef?: ReactHookFormRef\n error?: boolean\n errors?: FieldError\n disabled?: boolean\n userDisabled?: boolean\n helpTextInfo?: string\n helpText?: string\n iconLeft?: string\n iconRight?: string\n withoutComponent?: boolean\n addon?: ReactNode\n children?: ReactNode\n className?: string\n onChange?: (event?: EventType) => unknown\n // TODO, rename... something like changeHandler or valueDecorator\n onChangeInner?: (value: string | number) => string | number\n onBlur?: (event?: EventType) => void\n onFocus?: (event?: EventType | undefined) => void\n rightIconClick?: (event?: EventType) => void\n leftIconClick?: (event?: EventType) => void\n options?: any[] | null\n creatable?: boolean\n async?: boolean\n css?: string\n [key: string]: any\n}\n\ninterface SelectProps extends FieldProps {\n id?: string\n}\n\ntype OptionObj = { label: string | number | undefined; value: string | number | undefined }\ntype Option = OptionObj | string | number\n\nexport const Select: FC<SelectProps>\n= memo<SelectProps>(\n function Select({ options, value, inputRef, ...props }: SelectProps) {\n return (\n <div className='select'>\n <select {...props} ref={inputRef} defaultValue={value}>\n {options?.map((option: Option) => (\n <option\n key={`${JSON.stringify(option)}`}\n value={typeof option === 'object' ? (option as OptionObj)?.value : option}\n >\n {typeof option === 'object' ? (option as OptionObj)?.label : option}\n </option>\n ))}\n </select>\n </div>\n )\n },\n)\n\nconst InputComponent = styled.input``\nconst TextAreaComponent = styled.textarea``\nconst StyledFieldLabel = styled.label`\n text-align: left;\n`\n\nexport const Field: FC<FieldProps> = memo<FieldProps>(({\n label,\n name,\n type = 'text',\n value,\n defaultValue,\n placeholder,\n inputRef,\n error,\n disabled,\n userDisabled,\n withoutComponent,\n helpTextInfo,\n helpText,\n children,\n iconLeft,\n iconRight,\n addon,\n className,\n onChange,\n onChangeInner,\n onBlur,\n onFocus,\n rightIconClick,\n leftIconClick,\n options,\n css,\n ...props\n}: FieldProps) => {\n let Component: FC<any> = InputComponent\n\n if (!children && type === 'textarea') {\n Component = TextAreaComponent\n }\n const handleFocus = useCallback((event: Event | EventType | undefined) => {\n if (userDisabled) {\n event?.preventDefault?.()\n } else {\n onFocus && onFocus(event)\n }\n }, [userDisabled, onFocus])\n\n const handleChange = useCallback((event: { target: { value: string } }) => {\n if (userDisabled) {\n return\n }\n if (onChangeInner && event?.target) {\n // eslint-disable-next-line no-param-reassign\n event.target.value = onChangeInner((event.target.value as string)) as string\n onChange && onChange(event as EventType)\n } else {\n onChange && onChange(event as EventType)\n }\n }, [onChangeInner, onChange, userDisabled])\n\n const valueProps = useMemo(() => {\n if (value === undefined) {\n return { defaultValue }\n }\n return { value }\n }, [value, defaultValue])\n\n return (\n <FieldWrapper\n className={`field ${className}`}\n error={error}\n disabled={disabled}\n userDisabled={userDisabled}\n css={css}\n >\n <StyledFieldLabel htmlFor={name} className='label'>{label}</StyledFieldLabel>\n <div className={`field ${addon ? 'has-addons' : ''}`}>\n <div\n className={`control mainControl ${iconLeft && !withoutComponent\n ? 'has-icons-left' : ''} ${iconRight ? 'has-icons-right' : ''}`}\n >\n {!withoutComponent && ((!children && (type === 'select' || options))\n ? (\n <Select\n name={name}\n id={name}\n inputRef={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type='select'\n placeholder={placeholder}\n value={value}\n options={options}\n // TODO also handle change but value versus event.target.value issue\n onChange={onChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )\n : (\n !children && <Component\n name={name}\n id={name}\n ref={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type={type}\n placeholder={placeholder}\n {...valueProps}\n onChange={handleChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />))}\n\n {iconLeft && !withoutComponent && (\n <span\n className={`iconLeft icon is-small is-left ${leftIconClick ? 'is-action' : ''}`}\n onClick={leftIconClick}\n >\n <IconComponent\n iconName={iconLeft}\n color={iconColor}\n />\n </span>\n )}\n {iconRight && (\n <span\n className={`iconRight icon is-small is-right ${rightIconClick ? 'is-action' : ''}`}\n onClick={rightIconClick}\n >\n <IconComponent\n iconName={iconRight}\n color={iconColor}\n />\n </span>\n )}\n {children && children}\n </div>\n {addon && addon}\n </div>\n {helpTextInfo && <p className='help'>{helpTextInfo}</p>}\n {helpText && <p className={`help ${error ? 'is-danger' : ''}`}>{helpText}</p>}\n </FieldWrapper>\n )\n})\n\nField.displayName = 'Field'\n"],"names":["iconColor","IconComponent","memo","React","createElement","FieldWrapper","styled","div","withConfig","displayName","componentId","_ref","disabled","userDisabled","_ref2","_StyledFieldWrapper","p","$_css","Select","_ref3","options","value","inputRef","props","_objectWithoutProperties","objectWithoutProperties","_excluded","className","_extends","ref","defaultValue","map","option","key","concat","JSON","stringify","_typeof","label","InputComponent","input","TextAreaComponent","textarea","StyledFieldLabel","Field","_ref4","name","_ref4$type","type","placeholder","error","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","css","_excluded2","Component","handleFocus","useCallback","event","_event$preventDefault","preventDefault","call","handleChange","target","valueProps","useMemo","undefined","htmlFor","id","onKeyDown","autoComplete","onClick","iconName","color","component"],"mappings":"mvBAQIA,EAAqC,WAAA,MAAM,SAAS,EAMpDC,EAAmCC,EAAAA,MAAK,WAA2B,OAAOC,MAAAC,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,QAASpB,GAET3D,MAAAC,cAACH,EAAa,CACZkF,SAAU3B,EACV4B,MAAOpF,KAIZsD,GAAYA,GAEdG,GAASA,GAEXL,GAAgBjD,MAAAC,cAAA,IAAA,CAAGuB,UAAU,QAAQyB,GACrCC,GAAYlD,MAAAC,cAAA,IAAA,CAAGuB,kBAASO,OAAUgB,EAAQ,YAAc,KAAOG,GAGtE,IAEAT,EAAMnC,YAAc,qFAtTQ,SAAC2E,GAC3BpF,EAAYoF,CACd,2BAIgC,SAACC,GAC/BpF,EAAgBoF,CAClB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../node_modules/core-js/modules/es.array.concat.js");var e=require("react").memo((function(e){var a=e.icon,c=e.className,o=e.color,r=void 0===o?"currentColor":o;return React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":a.prefix,"data-icon":a.iconName,className:"svg-inline--fa fa-".concat(a.iconName," ").concat(c),role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(a.icon[0]," ").concat(a.icon[1])},React.createElement("path",{fill:r,d:a.icon[4]}))}));e.displayName="Icon",exports.Icon=e;
|
|
2
|
-
//# sourceMappingURL=Icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../../../../../src/core/ui/components/icon/Icon.tsx"],"sourcesContent":["import { memo } from 'react'\n\ntype IconType = {\n icon: {\n prefix: string\n iconName: string\n icon: any[]\n }\n className?: string\n color?: string\n}\n\nexport const Icon = memo<IconType>(({ icon, className, color = 'currentColor' }: IconType) => (\n <svg\n aria-hidden='true'\n focusable='false'\n data-prefix={icon.prefix}\n data-icon={icon.iconName}\n className={`svg-inline--fa fa-${icon.iconName} ${className}`}\n role='img'\n xmlns='http://www.w3.org/2000/svg'\n viewBox={`0 0 ${icon.icon[0]} ${icon.icon[1]}`}\n >\n <path\n fill={color}\n d={icon.icon[4]}\n />\n </svg>\n))\n\nIcon.displayName = 'Icon'\n"],"names":["Icon","memo","_ref","icon","className","_ref$color","color","React","createElement","focusable","prefix","iconName","concat","role","xmlns","viewBox","fill","d","displayName"],"mappings":"kJAYaA,mBAAOC,MAAe,SAAAC,GAAA,IAAGC,EAAID,EAAJC,KAAMC,EAASF,EAATE,UAASC,EAAAH,EAAEI,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAA,OAC3EE,MAAAC,cAAA,MAAA,CACE,cAAY,OACZC,UAAU,QACV,cAAaN,EAAKO,OAClB,YAAWP,EAAKQ,SAChBP,UAAS,qBAAAQ,OAAuBT,EAAKQ,SAAQC,KAAAA,OAAIR,GACjDS,KAAK,MACLC,MAAM,6BACNC,eAAOH,OAAST,EAAKA,KAAK,GAAE,KAAAS,OAAIT,EAAKA,KAAK,KAE1CI,MAAAC,cAAA,OAAA,CACEQ,KAAMV,EACNW,EAAGd,EAAKA,KAAK,KAEX,IAGRH,EAAKkB,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var o=require("react"),t=require("./icon.module.scss.js"),i=["iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style"],r=o.memo((function(r){var c=r.iconUrl,n=r.minWidth,s=r.minHeight,a=r.size,l=r.fontSize,u=r.width,d=r.height,h=r.color,m=void 0===h?"currentColor":h,p=r.className,j=void 0===p?"":p,b=r.children,f=r.style,g=e.objectWithoutProperties(r,i),v=o.useMemo((function(){return e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":n||a||u||"auto","--min-height":s||a||d||"auto","--width":a||u,"--height":a||d},l?{fontSize:l}:{}),c?{"--icon-url":"url(".concat(c,")")}:{}),c?{"--icon-color":m}:{"--icon-content-color":m}),f)}),[n,a,u,s,d,l,c,m,f]);return React.createElement("span",e.extends({},g,{className:"".concat(t.default["icon-base"]," icon-base ").concat(j),style:v}),!c&&b&&b)}));r.displayName="IconBase",exports.IconBase=r;
|
|
2
|
-
//# sourceMappingURL=IconBase.js.map
|