@e1011/es-kit 1.0.62 → 1.0.66

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.
Files changed (60) hide show
  1. package/dist/hooks/esm/index.css +49 -16
  2. package/dist/hooks/index.css +49 -16
  3. package/dist/lib/cjs/index.css +33 -0
  4. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js +2 -0
  5. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js.map +1 -0
  6. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.module.scss.js +2 -0
  7. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +1 -0
  8. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainerS.js +2 -0
  9. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainerS.js.map +1 -0
  10. package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js +1 -1
  11. package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js.map +1 -1
  12. package/dist/lib/cjs/src/index.js +1 -1
  13. package/dist/lib/esm/index.css +33 -0
  14. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js +2 -0
  15. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -0
  16. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js +2 -0
  17. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +1 -0
  18. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainerS.js +2 -0
  19. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainerS.js.map +1 -0
  20. package/dist/lib/esm/src/core/ui/components/icon/IconWC.js +1 -1
  21. package/dist/lib/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
  22. package/dist/lib/esm/src/index.js +1 -1
  23. package/dist/lib/src/core/ui/components/container/CollapsibleContainer.js +40 -0
  24. package/dist/lib/src/core/ui/components/container/CollapsibleContainer.js.map +1 -0
  25. package/dist/lib/src/core/ui/components/container/CollapsibleContainerS.js +49 -0
  26. package/dist/lib/src/core/ui/components/container/CollapsibleContainerS.js.map +1 -0
  27. package/dist/lib/src/core/ui/components/container/index.js +2 -1
  28. package/dist/lib/src/core/ui/components/container/index.js.map +1 -1
  29. package/dist/lib/src/core/ui/components/icon/IconWC.js +1 -1
  30. package/dist/lib/src/core/ui/components/icon/IconWC.js.map +1 -1
  31. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  32. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts +10 -0
  33. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts.map +1 -0
  34. package/dist/types/src/core/ui/components/container/CollapsibleContainerS.d.ts +11 -0
  35. package/dist/types/src/core/ui/components/container/CollapsibleContainerS.d.ts.map +1 -0
  36. package/dist/types/src/core/ui/components/container/index.d.ts +2 -1
  37. package/dist/types/src/core/ui/components/container/index.d.ts.map +1 -1
  38. package/dist/ui/esm/index.css +33 -0
  39. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js +2 -0
  40. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -0
  41. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js +2 -0
  42. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +1 -0
  43. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainerS.js +2 -0
  44. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainerS.js.map +1 -0
  45. package/dist/ui/esm/src/core/ui/components/icon/IconWC.js +1 -1
  46. package/dist/ui/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
  47. package/dist/ui/esm/src/core/ui/index.js +1 -1
  48. package/dist/ui/index.css +33 -0
  49. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js +2 -0
  50. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js.map +1 -0
  51. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.module.scss.js +2 -0
  52. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +1 -0
  53. package/dist/ui/src/core/ui/components/container/CollapsibleContainerS.js +2 -0
  54. package/dist/ui/src/core/ui/components/container/CollapsibleContainerS.js.map +1 -0
  55. package/dist/ui/src/core/ui/components/icon/IconWC.js +1 -1
  56. package/dist/ui/src/core/ui/components/icon/IconWC.js.map +1 -1
  57. package/dist/ui/src/core/ui/index.js +1 -1
  58. package/dist/utils/esm/index.css +49 -16
  59. package/dist/utils/index.css +49 -16
  60. package/package.json +1 -1
@@ -1,21 +1,35 @@
1
- .divider-module_divider-line__6CesR {
2
- position: relative;
3
- display: block;
4
- transition: opacity, width, height 250ms ease-in-out;
5
- background-color: var(--color);
6
- opacity: var(--opacity);
1
+ .CollapsibleContainer-module_collapsible-container__u0Jmm {
2
+ transform-origin: 0% 0%;
3
+ opacity: 0;
4
+ overflow: clip;
7
5
  }
8
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
9
- height: var(--length);
10
- left: var(--left);
11
- width: var(--width);
12
- margin: var(--margin);
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;
13
9
  }
14
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
15
- width: var(--length);
16
- left: var(--left);
17
- height: var(--height);
18
- margin: var(--margin);
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;
19
33
  }
20
34
  .icon-module_icon-base-parent__nOMvW {
21
35
  line-height: 1px !important;
@@ -70,4 +84,23 @@
70
84
  min-width: 0;
71
85
  min-height: 0;
72
86
  border-radius: initial;
87
+ }
88
+ .divider-module_divider-line__6CesR {
89
+ position: relative;
90
+ display: block;
91
+ transition: opacity, width, height 250ms ease-in-out;
92
+ background-color: var(--color);
93
+ opacity: var(--opacity);
94
+ }
95
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
96
+ height: var(--length);
97
+ left: var(--left);
98
+ width: var(--width);
99
+ margin: var(--margin);
100
+ }
101
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
102
+ width: var(--length);
103
+ left: var(--left);
104
+ height: var(--height);
105
+ margin: var(--margin);
73
106
  }
@@ -1,21 +1,35 @@
1
- .divider-module_divider-line__6CesR {
2
- position: relative;
3
- display: block;
4
- transition: opacity, width, height 250ms ease-in-out;
5
- background-color: var(--color);
6
- opacity: var(--opacity);
1
+ .CollapsibleContainer-module_collapsible-container__u0Jmm {
2
+ transform-origin: 0% 0%;
3
+ opacity: 0;
4
+ overflow: clip;
7
5
  }
8
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
9
- height: var(--length);
10
- left: var(--left);
11
- width: var(--width);
12
- margin: var(--margin);
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;
13
9
  }
14
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
15
- width: var(--length);
16
- left: var(--left);
17
- height: var(--height);
18
- margin: var(--margin);
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;
19
33
  }
20
34
  .icon-module_icon-base-parent__nOMvW {
21
35
  line-height: 1px !important;
@@ -70,4 +84,23 @@
70
84
  min-width: 0;
71
85
  min-height: 0;
72
86
  border-radius: initial;
87
+ }
88
+ .divider-module_divider-line__6CesR {
89
+ position: relative;
90
+ display: block;
91
+ transition: opacity, width, height 250ms ease-in-out;
92
+ background-color: var(--color);
93
+ opacity: var(--opacity);
94
+ }
95
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
96
+ height: var(--length);
97
+ left: var(--left);
98
+ width: var(--width);
99
+ margin: var(--margin);
100
+ }
101
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
102
+ width: var(--length);
103
+ left: var(--left);
104
+ height: var(--height);
105
+ margin: var(--margin);
73
106
  }
@@ -22,6 +22,39 @@
22
22
  min-height: 0;
23
23
  border-radius: initial;
24
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
+ }
25
58
  .divider-module_divider-line__6CesR {
26
59
  position: relative;
27
60
  display: block;
@@ -0,0 +1,2 @@
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"),r=require("./CollapsibleContainer.module.scss.js"),a=["collapsed","collapseHandler","children","horizontal","className"],o={width:"scrollWidth",height:"scrollHeight"},t=l.memo((function(t){var n=t.collapsed,i=void 0!==n&&n,s=t.collapseHandler,c=t.children,u=t.horizontal,d=void 0!==u&&u,p=t.className,h=void 0===p?"":p,m=e.objectWithoutProperties(t,a),v=l.useRef(null),f=l.useState(0),b=e.slicedToArray(f,2),j=b[0],x=b[1],g=!d;l.useEffect((function(){null==s||s(i)}),[s,i]),l.useLayoutEffect((function(){if(null!=v&&v.current){var e=g?"height":"width";x(v.current[o[e]])}}),[v,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")},m)}),[g,m,j]),C=l.useMemo((function(){var e=[g?r.vertical:r.horizontal];return i&&j&&null!=j&&e.push(r.collapsed),!i&&j&&null!=j&&e.push(r.expanded),e.join(" ")}),[i,j,g]);return React.createElement("div",{className:"".concat(r["collapsible-container"]," ").concat(C," ").concat(h," "),ref:v,style:y},c)}));t.displayName="CollapsibleContainer",exports.CollapsibleContainer=t;
2
+ //# sourceMappingURL=CollapsibleContainer.js.map
@@ -0,0 +1 @@
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}\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","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AE5B,OACEc,MAAAC,cAAA,MAAA,CACE5B,UAASqB,GAAAA,OAAKE,EAAQ,yBAAwBF,KAAAA,OAAIC,EAAU,KAAAD,OAAIrB,EAAa,KAC7E6B,IAAKxB,EACLJ,MAAOiB,GAENtB,EAGP,IAEAN,EAAqBwC,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";module.exports={"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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleContainer.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
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,8DAAA,yBAAA,yCAAA,QAAA,kEAAA,UAAA,oDAAA,IAAA,QAAA,IAAA,g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AGJH,EAGP,IAEAL,EAAWT,YAAc"}
@@ -1,2 +1,2 @@
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"),require("../../../../../node_modules/core-js/modules/es.array.map.js"),require("../../../../../node_modules/core-js/modules/es.object.entries.js");var t,i=require("./icon.module.scss.js"),n=require("core/utils"),s=document.createElement("template");s.innerHTML='<span class="icon-base"></span>';var r=n.ced("icon-base")(t=function(t){e.inherits(o,t);var r=e.createSuper(o);function o(){var t;e.classCallCheck(this,o);for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return(t=r.call.apply(r,[this].concat(s))).content=void 0,t.mainElement=void 0,t.iconUrl=void 0,t.minWidth=void 0,t.minHeight=void 0,t.width=void 0,t.height=void 0,t.size=void 0,t.fontSize=void 0,t.color=void 0,t.render=function(){if(t.mainElement=t.mainElement||t.querySelector(".icon-base"),t.mainElement){t.classList.add(i["icon-base-parent"]),t.mainElement.classList.add(i["icon-base"]);var n=e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":t.minWidth||t.size||t.width||"auto","--min-height":t.minHeight||t.size||t.height||"auto","--width":t.size||t.width,"--height":t.size||t.height},t.fontSize?{"font-size":t.fontSize||"unset"}:{}),t.iconUrl?{"--icon-url":"url(".concat(t.iconUrl,")")}:{}),t.iconUrl?{"--icon-color":t.color}:{"--icon-content-color":t.color});t.mainElement.innerHTML=t.iconUrl?"":t.content||"",t.mainElement.setAttribute("style",Object.entries(n).map((function(t){var i=e.slicedToArray(t,2),n=i[0],s=i[1];return"".concat(n,": ").concat(s,";")})).join(" "))}},t}return e.createClass(o,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=s.innerHTML,n.resolveAttributes(this,o.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),o}(e.wrapNativeSuper(HTMLElement)))||t,o={IconBaseWC:r};exports.IconBaseWC=o,exports.default=r;
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"),require("../../../../../node_modules/core-js/modules/es.array.map.js"),require("../../../../../node_modules/core-js/modules/es.object.entries.js");var t,i=require("../../../utils/webComponents/webComponent.utils.js"),n=require("./icon.module.scss.js"),s=document.createElement("template");s.innerHTML='<span class="icon-base"></span>';var o=i.ced("icon-base")(t=function(t){e.inherits(r,t);var o=e.createSuper(r);function r(){var t;e.classCallCheck(this,r);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return(t=o.call.apply(o,[this].concat(s))).content=void 0,t.mainElement=void 0,t.iconUrl=void 0,t.minWidth=void 0,t.minHeight=void 0,t.width=void 0,t.height=void 0,t.size=void 0,t.fontSize=void 0,t.color=void 0,t.render=function(){if(t.mainElement=t.mainElement||t.querySelector(".icon-base"),t.mainElement){t.classList.add(n["icon-base-parent"]),t.mainElement.classList.add(n["icon-base"]);var i=e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":t.minWidth||t.size||t.width||"auto","--min-height":t.minHeight||t.size||t.height||"auto","--width":t.size||t.width,"--height":t.size||t.height},t.fontSize?{"font-size":t.fontSize||"unset"}:{}),t.iconUrl?{"--icon-url":"url(".concat(t.iconUrl,")")}:{}),t.iconUrl?{"--icon-color":t.color}:{"--icon-content-color":t.color});t.mainElement.innerHTML=t.iconUrl?"":t.content||"",t.mainElement.setAttribute("style",Object.entries(i).map((function(t){var i=e.slicedToArray(t,2),n=i[0],s=i[1];return"".concat(n,": ").concat(s,";")})).join(" "))}},t}return e.createClass(r,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=s.innerHTML,i.resolveAttributes(this,r.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),r}(e.wrapNativeSuper(HTMLElement)))||t,r={IconBaseWC:o};exports.IconBaseWC=r,exports.default=o;
2
2
  //# sourceMappingURL=IconWC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import classes from './icon.module.scss'\n\nimport { ced, resolveAttributes } from 'core/utils'\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconBaseWC = {\n IconBaseWC: IconBase,\n}\n"],"names":["template","document","createElement","innerHTML","IconBase","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","objectSpread2","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get","_wrapNativeSuper","HTMLElement","IconBaseWC"],"mappings":"waAIMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAAiC,IAejCC,EADpBC,MAAI,YAAYC,CAAAC,WAAAC,GAAAC,WAAAL,EAAAI,GAAA,IAAAE,EAAAC,cAAAP,GAAA,SAAAA,IAAA,IAAAQ,EAAAC,sBAAAT,GAAA,IAAA,IAAAU,E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AAEG,EAAGF,EAAA,GAAEG,EAAKH,EAAA,GAAA,MAAA,GAAAxB,OAAS0B,EAAG1B,MAAAA,OAAK2B,EAAK,IAAA,IAAKC,KAAK,KAhB9G,GAiBDvC,CAAA,CAjDA,OAiDAwC,EAAAC,YAAAjD,EAAA,CAAA,CAAA6C,IAAA,oBAAAC,MA/CD,WACM5B,KAAKnB,YACPmB,KAAKE,QAAUF,KAAKE,SAAWF,KAAKnB,WAAamB,KAAKgC,aAAa,YAGrEhC,KAAKnB,UAAYH,EAASG,UAE1BoD,EAAAA,kBAAkBjC,KAAMlB,EAASoD,oBAEjClC,KAAKY,QACP,GAAC,CAAAe,IAAA,2BAAAC,MAED,SAAyBO,EAAkBC,EAAgCC,GACxD,cAAbF,IACFnC,KAAKsC,UAAaD,GAAqB,GACnCrC,KAAKsC,YACPtC,KAAKc,UAAUyB,OAAOvC,KAAKsC,WAC3BtC,KAAKc,UAAUC,IAAIf,KAAKsC,aAK5BtC,KAAKmC,GAAYE,EACjBrC,KAAKY,QACP,IAAC,CAAA,CAAAe,IAAA,qBAAAa,IA5BD,WACE,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,KAAC1D,CAAA,EAAA2D,kBAvBmCC,gBAAWzD,EAoFpC0D,EAAa,CACxBA,WAAY7D"}
1
+ {"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconBaseWC = {\n IconBaseWC: IconBase,\n}\n"],"names":["template","document","createElement","innerHTML","IconBase","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","objectSpread2","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get","_wrapNativeSuper","HTMLElement","IconBaseWC"],"mappings":"gdAIMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAAiC,IAejCC,EADpBC,MAAI,YAAYC,CAAAC,WAAAC,GAAAC,WAAAL,EAAAI,GAAA,IAAAE,EAAAC,cAAAP,GAAA,SAAAA,IAAA,IAAAQ,EAAAC,sBAAAT,GAAA,IAAA,IAAAU,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GAyEd,OAzEcP,EAAAF,EAAAU,KAAAC,MAAAX,EAAA,CAAAY,MAAAC,OAAAN,KAEfO,aAAO,EAAAZ,EAEPa,iBAAW,EAAAb,EAEXc,aAAO,EAAAd,EAEPe,cAAQ,EAAAf,EAERgB,eAAS,EAAAhB,EAETiB,WAAK,EAAAjB,EAELkB,YAAM,EAAAlB,EAENmB,UAAI,EAAAnB,EAEJoB,cAAQ,EAAApB,EAERqB,WAAK,EAAArB,EAgCLsB,OAAS,WAEP,GADAtB,EAAKa,YAAcb,EAAKa,aAAeb,EAAKuB,cAAc,cACrDvB,EAAKa,YAAV,CAGAb,EAAKwB,UAAUC,IAAIC,EAAQ,qBAC3B1B,EAAKa,YAAYW,UAAUC,IAAIC,EAAQ,cAEvC,IAAMC,EAAMC,EAAAA,cAAAA,EAAAC,cAAAD,gBAAA,CACV,cAAe5B,EAAKe,UAAYf,EAAKmB,MAAQnB,EAAKiB,OAAS,OAC3D,eAAgBjB,EAAKgB,WAAahB,EAAKmB,MAAQnB,EAAKkB,QAAU,OAC9D,UAAWlB,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A2D,kBAvBmCC,gBAAWzD,EAoFpC0D,EAAa,CACxBA,WAAY7D"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useTranslations.js"),o=require("./core/hooks/useOutsideClick.js"),s=require("./core/hooks/useResize.js"),i=require("./core/utils/helpers/birthnumber.validator.js"),a=require("./core/utils/helpers/birthnumberCZSKvalidator.js"),n=require("./core/utils/helpers/fileValidator.js"),l=require("./core/utils/helpers/date.js"),p=require("./core/utils/helpers/deviceInfo.js"),c=require("./core/utils/helpers/emailMatcher.js"),u=require("./core/utils/helpers/file.js"),x=require("./core/utils/helpers/objectOperations.js"),m=require("./core/utils/helpers/other.js"),d=require("./core/utils/helpers/textValueOperations.js"),T=require("./core/utils/helpers/valueOperations.js"),v=require("./core/utils/helpers/cancelableDelayedFunction.js"),h=require("./core/utils/keyExtractor.js"),F=require("./core/utils/date.js"),g=require("./core/utils/webComponents/webComponent.utils.js"),j=require("./core/ui/utils/style.js"),b=require("./core/ui/components/container/FBox.js"),C=require("./core/ui/components/container/Flex.js"),f=require("./core/ui/components/container/Placeholder.js"),S=require("./core/ui/components/container/Container.js"),q=require("./core/ui/components/container/ResizableContainer.js"),I=require("./core/ui/components/field/Field.js"),D=require("./core/ui/components/dividers/DividerLine.js"),O=require("./core/ui/components/icon/IconBase.js"),y=require("./core/ui/components/icon/Icon.js"),z=require("./core/ui/components/icon/IconWC.js"),V=require("./core/constants/ui.constants.js");exports.useApi=e.useApi,exports.useToggle=r.useToggle,exports.createSafeT=t.createSafeT,exports.setUseTranslation=t.setUseTranslation,exports.useTranslations=t.useTranslations,exports.useOutsideClick=o.useOutsideClick,exports.useResize=s.useResize,exports.isBirthNumberValid=i.isBirthNumberValid,exports.getMatch=a.getMatch,exports.isValidFormat=a.isValidFormat,exports.isValidModulo11=a.isValidModulo11,exports.parse=a.parse,exports.regex=a.regex,exports.parseCSVdata=n.parseCSVdata,exports.validateCSVFile=n.validateCSVFile,exports.validateCSVlines=n.validateCSVlines,exports.validateJSONFile=n.validateJSONFile,exports.validateLineCellTrimmed=n.validateLineCellTrimmed,exports.validateLineNumColumns=n.validateLineNumColumns,exports.validateSDFFile=n.validateSDFFile,exports.DATE_FORMAT=l.DATE_FORMAT,exports.formatDateToTimestamp=l.formatDateToTimestamp,exports.getDate=l.getDate,exports.getDeviceId=p.getDeviceId,exports.emailMatch=c.emailMatch,exports.emailMatcher=c.emailMatcher,exports.regexBuilder=c.regexBuilder,exports.cleanCsvLines=u.cleanCsvLines,exports.formatFilePath=u.formatFilePath,exports.arrayToObjectTree=x.arrayToObjectTree,exports.chunkArray=x.chunkArray,exports.duplicatesInArray=x.duplicatesInArray,exports.formatJsonString=x.formatJsonString,exports.formatObj=x.formatObj,exports.formatObj2=x.formatObj2,exports.debounce=m.debounce,exports.delay=m.delay,exports.memoize=m.memoize,exports.memoizeComplex=m.memoizeComplex,exports.memoizer=m.memoizer,exports.nestedTernary=m.nestedTernary,exports.escapeRegExp=d.escapeRegExp,exports.fileNameExt=d.fileNameExt,exports.findStringInText=d.findStringInText,exports.normalizeString=d.normalizeString,exports.removeWhitespaces=d.removeWhitespaces,exports.sanitizeId=d.sanitizeId,exports.sanitizePathId=d.sanitizePathId,exports.toLowerCase=d.toLowerCase,exports.toUpperCase=d.toUpperCase,exports.truncateText=d.truncateText,Object.defineProperty(exports,"Operation",{enumerable:!0,get:function(){return T.Operation}}),exports.decrementValue=T.decrementValue,exports.incerementValue=T.incerementValue,exports.numberDefined=T.numberDefined,exports.numberOperation=T.numberOperation,exports.restrictNumberInLimits=T.restrictNumberInLimits,exports.setValue=T.setValue,exports.cancelableSetInterval=v.cancelableSetInterval,exports.cancelableSetTimeout=v.cancelableSetTimeout,exports.keyExtractor=h.keyExtractor,exports.keyExtractorFunction=h.keyExtractorFunction,exports.dateRangeFormat=F.dateRangeFormat,exports.getDateTime=F.getDateTime,exports.getTimeFromNow=F.getTimeFromNow,exports.getTimeFromNowOriginal=F.getTimeFromNowOriginal,exports.getTimeTo=F.getTimeTo,exports.ced=g.ced,exports.createResolveAttribute=g.createResolveAttribute,exports.customElementDefine=g.customElementDefine,exports.resolveAttributes=g.resolveAttributes,exports.calculateColors=j.calculateColors,exports.calculatePercColor=j.calculatePercColor,exports.convertHex=j.convertHex,exports.convertRGB=j.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return j.defaultFontSize}}),exports.pxToRem=j.pxToRem,exports.resolveStyleValue=j.resolveStyleValue,exports.setDefaultFontSize=j.setDefaultFontSize,exports.toHex=j.toHex,exports.FBox=b.FBox,exports.Flex=C.Flex,exports.FlexTight=C.FlexTight,exports.FlexTightStyled=C.FlexTightStyled,exports.FlexWrapper=C.FlexWrapper,exports.Placeholder=f.Placeholder,exports.Container=S.Container,exports.ResizableContainer=q.ResizableContainer,exports.Field=I.Field,exports.FieldWrapper=I.FieldWrapper,exports.Select=I.Select,exports.setIconColor=I.setIconColor,exports.setIconComponent=I.setIconComponent,exports.DividerHorizontal=D.DividerHorizontal,exports.DividerLine=D.DividerLine,exports.DividerVertical=D.DividerVertical,exports.IconBase=O.IconBase,exports.Icon=y.Icon,exports.IconBaseWC=z.IconBaseWC,Object.defineProperty(exports,"EventName",{enumerable:!0,get:function(){return V.EventName}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useTranslations.js"),o=require("./core/hooks/useOutsideClick.js"),s=require("./core/hooks/useResize.js"),i=require("./core/utils/helpers/birthnumber.validator.js"),a=require("./core/utils/helpers/birthnumberCZSKvalidator.js"),n=require("./core/utils/helpers/fileValidator.js"),l=require("./core/utils/helpers/date.js"),p=require("./core/utils/helpers/deviceInfo.js"),c=require("./core/utils/helpers/emailMatcher.js"),u=require("./core/utils/helpers/file.js"),x=require("./core/utils/helpers/objectOperations.js"),m=require("./core/utils/helpers/other.js"),d=require("./core/utils/helpers/textValueOperations.js"),C=require("./core/utils/helpers/valueOperations.js"),T=require("./core/utils/helpers/cancelableDelayedFunction.js"),b=require("./core/utils/keyExtractor.js"),v=require("./core/utils/date.js"),h=require("./core/utils/webComponents/webComponent.utils.js"),j=require("./core/ui/utils/style.js"),F=require("./core/ui/components/container/FBox.js"),g=require("./core/ui/components/container/Flex.js"),S=require("./core/ui/components/container/Placeholder.js"),f=require("./core/ui/components/container/CollapsibleContainerS.js"),q=require("./core/ui/components/container/CollapsibleContainer.js"),I=require("./core/ui/components/container/ResizableContainer.js"),D=require("./core/ui/components/field/Field.js"),O=require("./core/ui/components/dividers/DividerLine.js"),y=require("./core/ui/components/icon/IconBase.js"),z=require("./core/ui/components/icon/Icon.js"),V=require("./core/ui/components/icon/IconWC.js"),R=require("./core/constants/ui.constants.js");exports.useApi=e.useApi,exports.useToggle=r.useToggle,exports.createSafeT=t.createSafeT,exports.setUseTranslation=t.setUseTranslation,exports.useTranslations=t.useTranslations,exports.useOutsideClick=o.useOutsideClick,exports.useResize=s.useResize,exports.isBirthNumberValid=i.isBirthNumberValid,exports.getMatch=a.getMatch,exports.isValidFormat=a.isValidFormat,exports.isValidModulo11=a.isValidModulo11,exports.parse=a.parse,exports.regex=a.regex,exports.parseCSVdata=n.parseCSVdata,exports.validateCSVFile=n.validateCSVFile,exports.validateCSVlines=n.validateCSVlines,exports.validateJSONFile=n.validateJSONFile,exports.validateLineCellTrimmed=n.validateLineCellTrimmed,exports.validateLineNumColumns=n.validateLineNumColumns,exports.validateSDFFile=n.validateSDFFile,exports.DATE_FORMAT=l.DATE_FORMAT,exports.formatDateToTimestamp=l.formatDateToTimestamp,exports.getDate=l.getDate,exports.getDeviceId=p.getDeviceId,exports.emailMatch=c.emailMatch,exports.emailMatcher=c.emailMatcher,exports.regexBuilder=c.regexBuilder,exports.cleanCsvLines=u.cleanCsvLines,exports.formatFilePath=u.formatFilePath,exports.arrayToObjectTree=x.arrayToObjectTree,exports.chunkArray=x.chunkArray,exports.duplicatesInArray=x.duplicatesInArray,exports.formatJsonString=x.formatJsonString,exports.formatObj=x.formatObj,exports.formatObj2=x.formatObj2,exports.debounce=m.debounce,exports.delay=m.delay,exports.memoize=m.memoize,exports.memoizeComplex=m.memoizeComplex,exports.memoizer=m.memoizer,exports.nestedTernary=m.nestedTernary,exports.escapeRegExp=d.escapeRegExp,exports.fileNameExt=d.fileNameExt,exports.findStringInText=d.findStringInText,exports.normalizeString=d.normalizeString,exports.removeWhitespaces=d.removeWhitespaces,exports.sanitizeId=d.sanitizeId,exports.sanitizePathId=d.sanitizePathId,exports.toLowerCase=d.toLowerCase,exports.toUpperCase=d.toUpperCase,exports.truncateText=d.truncateText,Object.defineProperty(exports,"Operation",{enumerable:!0,get:function(){return C.Operation}}),exports.decrementValue=C.decrementValue,exports.incerementValue=C.incerementValue,exports.numberDefined=C.numberDefined,exports.numberOperation=C.numberOperation,exports.restrictNumberInLimits=C.restrictNumberInLimits,exports.setValue=C.setValue,exports.cancelableSetInterval=T.cancelableSetInterval,exports.cancelableSetTimeout=T.cancelableSetTimeout,exports.keyExtractor=b.keyExtractor,exports.keyExtractorFunction=b.keyExtractorFunction,exports.dateRangeFormat=v.dateRangeFormat,exports.getDateTime=v.getDateTime,exports.getTimeFromNow=v.getTimeFromNow,exports.getTimeFromNowOriginal=v.getTimeFromNowOriginal,exports.getTimeTo=v.getTimeTo,exports.ced=h.ced,exports.createResolveAttribute=h.createResolveAttribute,exports.customElementDefine=h.customElementDefine,exports.resolveAttributes=h.resolveAttributes,exports.calculateColors=j.calculateColors,exports.calculatePercColor=j.calculatePercColor,exports.convertHex=j.convertHex,exports.convertRGB=j.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return j.defaultFontSize}}),exports.pxToRem=j.pxToRem,exports.resolveStyleValue=j.resolveStyleValue,exports.setDefaultFontSize=j.setDefaultFontSize,exports.toHex=j.toHex,exports.FBox=F.FBox,exports.Flex=g.Flex,exports.FlexTight=g.FlexTight,exports.FlexTightStyled=g.FlexTightStyled,exports.FlexWrapper=g.FlexWrapper,exports.Placeholder=S.Placeholder,exports.ContainerS=f.ContainerS,exports.CollapsibleContainer=q.CollapsibleContainer,exports.ResizableContainer=I.ResizableContainer,exports.Field=D.Field,exports.FieldWrapper=D.FieldWrapper,exports.Select=D.Select,exports.setIconColor=D.setIconColor,exports.setIconComponent=D.setIconComponent,exports.DividerHorizontal=O.DividerHorizontal,exports.DividerLine=O.DividerLine,exports.DividerVertical=O.DividerVertical,exports.IconBase=y.IconBase,exports.Icon=z.Icon,exports.IconBaseWC=V.IconBaseWC,Object.defineProperty(exports,"EventName",{enumerable:!0,get:function(){return R.EventName}});
2
2
  //# sourceMappingURL=index.js.map
@@ -22,6 +22,39 @@
22
22
  min-height: 0;
23
23
  border-radius: initial;
24
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
+ }
25
58
  .divider-module_divider-line__6CesR {
26
59
  position: relative;
27
60
  display: block;
@@ -0,0 +1,2 @@
1
+ import{objectWithoutProperties as e,slicedToArray as l,objectSpread2 as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as a,useRef as r,useState as t,useEffect as n,useLayoutEffect as i,useMemo as c}from"react";import s from"./CollapsibleContainer.module.scss.js";var p=["collapsed","collapseHandler","children","horizontal","className"],d={width:"scrollWidth",height:"scrollHeight"},u=a((function(a){var u=a.collapsed,h=void 0!==u&&u,m=a.collapseHandler,v=a.children,f=a.horizontal,j=void 0!==f&&f,b=a.className,g=void 0===b?"":b,x=e(a,p),w=r(null),y=t(0),C=l(y,2),H=C[0],N=C[1],z=!j;n((function(){null==m||m(h)}),[m,h]),i((function(){if(null!=w&&w.current){var e=z?"height":"width";N(w.current[d[e]])}}),[w,z]);var _=c((function(){return o({"--prop-name":z?"height":"width","--prop-max-name":z?"max-height":"max-width","--prop-value":"".concat(H,"px")},x)}),[z,x,H]),P=c((function(){var e=[z?s.vertical:s.horizontal];return h&&H&&null!=H&&e.push(s.collapsed),!h&&H&&null!=H&&e.push(s.expanded),e.join(" ")}),[h,H,z]);return React.createElement("div",{className:"".concat(s["collapsible-container"]," ").concat(P," ").concat(g," "),ref:w,style:_},v)}));u.displayName="CollapsibleContainer";export{u as CollapsibleContainer};
2
+ //# sourceMappingURL=CollapsibleContainer.js.map
@@ -0,0 +1 @@
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}\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","_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":"mbAIMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAUGC,EAAsDC,GAAK,SAAAC,GAEvC,IAAAC,EAAAD,EAD/BE,UAAAA,OAAY,IAAHD,GAAQA,EAAEE,EAAeH,EAAfG,gBAAiBC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,WAAAA,OAAa,IAAHD,GAAQA,EAAAE,EAAAP,EAAEQ,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAV,EAAAW,GAEpFC,EAAeC,EAAuB,MAC5CC,EAAsCC,EAAS,GAAEC,EAAAC,EAAAH,EAAA,GAA1CI,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAE5BI,GAAYd,EAElBe,GAAU,WACRlB,SAAAA,EAAkBD,EACpB,GAAG,CAACC,EAAiBD,IAErBoB,GAAgB,WACd,GAAIV,SAAAA,EAAcW,QAAS,CACzB,IAAMC,EAAWJ,EAAW,SAAW,QAEvCD,EAAgBP,EAAaW,QAAgB5B,EAAmB6B,IAClE,CACF,GAAG,CAACZ,EAAcQ,IAElB,IAAMK,EAA4BC,GAAQ,WAAA,OAAAC,EAAA,CACxC,cAAeP,EAAW,SAAW,QACrC,kBAAmBA,EAAW,aAAe,YAC7C,eAAc,GAAAQ,OAAKV,EAAW,OAC3BT,EACc,GAAE,CAACW,EAAUX,EAAOS,IAEjCW,EAAaH,GAAQ,WACzB,IAAMG,EAAa,CAACT,EAAWU,EAAQV,SAAWU,EAAQxB,YAQ1D,OANIJ,GAAagB,GAAbhB,MAA4BgB,GAC9BW,EAAWE,KAAKD,EAAQ5B,YAErBA,GAAagB,GAAd,MAA6BA,GAC/BW,EAAWE,KAAKD,EAAQE,UAEnBH,EAAWI,KAAK,IACxB,GAAE,CAAC/B,EAAWgB,EAAaE,IAE5B,OACEc,MAAAC,cAAA,MAAA,CACE3B,UAASoB,GAAAA,OAAKE,EAAQ,yBAAwBF,KAAAA,OAAIC,EAAU,KAAAD,OAAIpB,EAAa,KAC7E4B,IAAKxB,EACLH,MAAOgB,GAENrB,EAGP,IAEAN,EAAqBuC,YAAc"}
@@ -0,0 +1,2 @@
1
+ var l={"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-"};export{l as default};
2
+ //# sourceMappingURL=CollapsibleContainer.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleContainer.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{objectWithoutProperties as e,slicedToArray as o,extends as n}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import a from"styled-components";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as t,useRef as l,useState as r,useEffect as i}from"react";var c=["collapsed","collapseHandler","children","propName","className","css"],s={width:"scrollWidth",height:"scrollHeight"},p=function(e){return e.propName},d=t(a.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;}"],p,p,p,p,p,p,p,(function(e){var o=e.contentProp;return"".concat(o,"px")}),p,(function(e){var o=e.contentProp;return"".concat(o,"px")}))),m=a(d).withConfig({displayName:"CollapsibleContainerS___StyledStyledContainer",componentId:"sc-fj3lnl-1"})(["",""],(function(e){return e.$_css})),u=t((function(a){var t=a.collapsed,p=void 0!==t&&t,d=a.collapseHandler,u=a.children,_=a.propName,f=void 0===_?"height":_,h=a.className,y=a.css,C=e(a,c),v=l(),x=r(0),N=o(x,2),b=N[0],g=N[1];i((function(){null==d||d(p)}),[d,p]),i((function(){null!=v&&v.current&&g(v.current[s[f]])}),[v,f]);var j="";return p&&b&&null!=b&&(j="Collapsible__container__collapsed"),!p&&b&&null!=b&&(j="Collapsible__container__expanded"),React.createElement(m,n({className:"".concat(h," ").concat(j),ref:v,contentProp:b,propName:f},C,{$_css:y}),u)}));u.displayName="ContainerS";export{u as ContainerS};
2
+ //# sourceMappingURL=CollapsibleContainerS.js.map
@@ -0,0 +1 @@
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","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","setContentProp","useEffect","current","resolvedClassName","React","createElement","_extends","ref"],"mappings":"2XAKMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAGJC,EAAe,SAAHC,GAAc,OAAAA,EAARC,QAAsE,EAExFC,EAA4CC,EAAKC,EAAOC,IAAGC,WAAA,CAAAC,YAAA,yCAAAC,YAAA,eAAVJ,CAAU,CAAA,8DAAA,yBAAA,yCAAA,QAAA,kEAAA,UAAA,oDAAA,IAAA,QAAA,IAAA,gBAEvBL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as e,createSuper as t,createClass as i,classCallCheck as n,objectSpread2 as s,slicedToArray as o,wrapNativeSuper as a}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import"../../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../../node_modules/core-js/modules/es.object.entries.js";import r from"./icon.module.scss.js";import{ced as c,resolveAttributes as l}from"core/utils";var m,d=document.createElement("template");d.innerHTML='<span class="icon-base"></span>';var h=c("icon-base")(m=function(a){e(m,a);var c=t(m);function m(){var e;n(this,m);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return(e=c.call.apply(c,[this].concat(i))).content=void 0,e.mainElement=void 0,e.iconUrl=void 0,e.minWidth=void 0,e.minHeight=void 0,e.width=void 0,e.height=void 0,e.size=void 0,e.fontSize=void 0,e.color=void 0,e.render=function(){if(e.mainElement=e.mainElement||e.querySelector(".icon-base"),e.mainElement){e.classList.add(r["icon-base-parent"]),e.mainElement.classList.add(r["icon-base"]);var t=s(s(s({"--min-width":e.minWidth||e.size||e.width||"auto","--min-height":e.minHeight||e.size||e.height||"auto","--width":e.size||e.width,"--height":e.size||e.height},e.fontSize?{"font-size":e.fontSize||"unset"}:{}),e.iconUrl?{"--icon-url":"url(".concat(e.iconUrl,")")}:{}),e.iconUrl?{"--icon-color":e.color}:{"--icon-content-color":e.color});e.mainElement.innerHTML=e.iconUrl?"":e.content||"",e.mainElement.setAttribute("style",Object.entries(t).map((function(e){var t=o(e,2),i=t[0],n=t[1];return"".concat(i,": ").concat(n,";")})).join(" "))}},e}return i(m,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=d.innerHTML,l(this,m.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),m}(a(HTMLElement)))||m,u={IconBaseWC:h};export{u as IconBaseWC,h as default};
1
+ import{inherits as e,createSuper as t,createClass as i,classCallCheck as n,objectSpread2 as s,slicedToArray as o,wrapNativeSuper as a}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import"../../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../../node_modules/core-js/modules/es.object.entries.js";import{ced as r,resolveAttributes as c}from"../../../utils/webComponents/webComponent.utils.js";import l from"./icon.module.scss.js";var m,d=document.createElement("template");d.innerHTML='<span class="icon-base"></span>';var h=r("icon-base")(m=function(a){e(m,a);var r=t(m);function m(){var e;n(this,m);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return(e=r.call.apply(r,[this].concat(i))).content=void 0,e.mainElement=void 0,e.iconUrl=void 0,e.minWidth=void 0,e.minHeight=void 0,e.width=void 0,e.height=void 0,e.size=void 0,e.fontSize=void 0,e.color=void 0,e.render=function(){if(e.mainElement=e.mainElement||e.querySelector(".icon-base"),e.mainElement){e.classList.add(l["icon-base-parent"]),e.mainElement.classList.add(l["icon-base"]);var t=s(s(s({"--min-width":e.minWidth||e.size||e.width||"auto","--min-height":e.minHeight||e.size||e.height||"auto","--width":e.size||e.width,"--height":e.size||e.height},e.fontSize?{"font-size":e.fontSize||"unset"}:{}),e.iconUrl?{"--icon-url":"url(".concat(e.iconUrl,")")}:{}),e.iconUrl?{"--icon-color":e.color}:{"--icon-content-color":e.color});e.mainElement.innerHTML=e.iconUrl?"":e.content||"",e.mainElement.setAttribute("style",Object.entries(t).map((function(e){var t=o(e,2),i=t[0],n=t[1];return"".concat(i,": ").concat(n,";")})).join(" "))}},e}return i(m,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=d.innerHTML,c(this,m.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),m}(a(HTMLElement)))||m,u={IconBaseWC:h};export{u as IconBaseWC,h as default};
2
2
  //# sourceMappingURL=IconWC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import classes from './icon.module.scss'\n\nimport { ced, resolveAttributes } from 'core/utils'\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconBaseWC = {\n IconBaseWC: IconBase,\n}\n"],"names":["template","document","createElement","innerHTML","IconBase","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get","_wrapNativeSuper","HTMLElement","IconBaseWC"],"mappings":"wfAIMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAAiC,IAejCC,EADpBC,EAAI,YAAYC,CAAAC,WAAAC,GAAAC,EAAAL,EAAAI,GAAA,IAAAE,EAAAC,EAAAP,GAAA,SAAAA,IAAA,IAAAQ,EAAAC,OAAAT,GAAA,IAAA,IAAAU,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GAyEd,OAzEcP,EAAAF,EAAAU,KAAAC,MAAAX,EAA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CAAA4C,IAAA,oBAAAC,MA/CD,WACM3B,KAAKnB,YACPmB,KAAKE,QAAUF,KAAKE,SAAWF,KAAKnB,WAAamB,KAAK8B,aAAa,YAGrE9B,KAAKnB,UAAYH,EAASG,UAE1BkD,EAAkB/B,KAAMlB,EAASkD,oBAEjChC,KAAKY,QACP,GAAC,CAAAc,IAAA,2BAAAC,MAED,SAAyBM,EAAkBC,EAAgCC,GACxD,cAAbF,IACFjC,KAAKoC,UAAaD,GAAqB,GACnCnC,KAAKoC,YACPpC,KAAKc,UAAUuB,OAAOrC,KAAKoC,WAC3BpC,KAAKc,UAAUC,IAAIf,KAAKoC,aAK5BpC,KAAKiC,GAAYE,EACjBnC,KAAKY,QACP,IAAC,CAAA,CAAAc,IAAA,qBAAAY,IA5BD,WACE,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,KAACxD,CAAA,EAAAyD,EAvBmCC,gBAAWvD,EAoFpCwD,EAAa,CACxBA,WAAY3D"}
1
+ {"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconBaseWC = {\n IconBaseWC: IconBase,\n}\n"],"names":["template","document","createElement","innerHTML","IconBase","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get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,CAAE,eAAgBd,EAAKqB,OAAU,CAAE,uBAAwBrB,EAAKqB,QAGrFrB,EAAKa,YAAYtB,UAAYS,EAAKc,QAAU,GAAMd,EAAKY,SAAW,GAElEZ,EAAKa,YAAYgB,aAAa,QAASC,OAAOC,QAAQJ,GAAQK,KAAI,SAAAC,GAAA,IAAAC,EAAAC,EAAAF,EAAA,GAAEG,EAAGF,EAAA,GAAEG,EAAKH,EAAA,GAAA,MAAA,GAAAvB,OAASyB,EAAGzB,MAAAA,OAAK0B,EAAK,IAAA,IAAKC,KAAK,KAhB9G,GAiBDtC,CAAA,CAjDA,OAiDAuC,EAAA/C,EAAA,CAAA,CAAA4C,IAAA,oBAAAC,MA/CD,WACM3B,KAAKnB,YACPmB,KAAKE,QAAUF,KAAKE,SAAWF,KAAKnB,WAAamB,KAAK8B,aAAa,YAGrE9B,KAAKnB,UAAYH,EAASG,UAE1BkD,EAAkB/B,KAAMlB,EAASkD,oBAEjChC,KAAKY,QACP,GAAC,CAAAc,IAAA,2BAAAC,MAED,SAAyBM,EAAkBC,EAAgCC,GACxD,cAAbF,IACFjC,KAAKoC,UAAaD,GAAqB,GACnCnC,KAAKoC,YACPpC,KAAKc,UAAUuB,OAAOrC,KAAKoC,WAC3BpC,KAAKc,UAAUC,IAAIf,KAAKoC,aAK5BpC,KAAKiC,GAAYE,EACjBnC,KAAKY,QACP,IAAC,CAAA,CAAAc,IAAA,qBAAAY,IA5BD,WACE,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,KAACxD,CAAA,EAAAyD,EAvBmCC,gBAAWvD,EAoFpCwD,EAAa,CACxBA,WAAY3D"}
@@ -1,2 +1,2 @@
1
- export{useApi}from"./core/hooks/useApi.js";export{useToggle}from"./core/hooks/useToggle.js";export{createSafeT,setUseTranslation,useTranslations}from"./core/hooks/useTranslations.js";export{useOutsideClick}from"./core/hooks/useOutsideClick.js";export{useResize}from"./core/hooks/useResize.js";export{isBirthNumberValid}from"./core/utils/helpers/birthnumber.validator.js";export{getMatch,isValidFormat,isValidModulo11,parse,regex}from"./core/utils/helpers/birthnumberCZSKvalidator.js";export{parseCSVdata,validateCSVFile,validateCSVlines,validateJSONFile,validateLineCellTrimmed,validateLineNumColumns,validateSDFFile}from"./core/utils/helpers/fileValidator.js";export{DATE_FORMAT,formatDateToTimestamp,getDate}from"./core/utils/helpers/date.js";export{getDeviceId}from"./core/utils/helpers/deviceInfo.js";export{emailMatch,emailMatcher,regexBuilder}from"./core/utils/helpers/emailMatcher.js";export{cleanCsvLines,formatFilePath}from"./core/utils/helpers/file.js";export{arrayToObjectTree,chunkArray,duplicatesInArray,formatJsonString,formatObj,formatObj2}from"./core/utils/helpers/objectOperations.js";export{debounce,delay,memoize,memoizeComplex,memoizer,nestedTernary}from"./core/utils/helpers/other.js";export{escapeRegExp,fileNameExt,findStringInText,normalizeString,removeWhitespaces,sanitizeId,sanitizePathId,toLowerCase,toUpperCase,truncateText}from"./core/utils/helpers/textValueOperations.js";export{Operation,decrementValue,incerementValue,numberDefined,numberOperation,restrictNumberInLimits,setValue}from"./core/utils/helpers/valueOperations.js";export{cancelableSetInterval,cancelableSetTimeout}from"./core/utils/helpers/cancelableDelayedFunction.js";export{keyExtractor,keyExtractorFunction}from"./core/utils/keyExtractor.js";export{dateRangeFormat,getDateTime,getTimeFromNow,getTimeFromNowOriginal,getTimeTo}from"./core/utils/date.js";export{ced,createResolveAttribute,customElementDefine,resolveAttributes}from"./core/utils/webComponents/webComponent.utils.js";export{calculateColors,calculatePercColor,convertHex,convertRGB,defaultFontSize,pxToRem,resolveStyleValue,setDefaultFontSize,toHex}from"./core/ui/utils/style.js";export{FBox}from"./core/ui/components/container/FBox.js";export{Flex,FlexTight,FlexTightStyled,FlexWrapper}from"./core/ui/components/container/Flex.js";export{Placeholder}from"./core/ui/components/container/Placeholder.js";export{Container}from"./core/ui/components/container/Container.js";export{ResizableContainer}from"./core/ui/components/container/ResizableContainer.js";export{Field,FieldWrapper,Select,setIconColor,setIconComponent}from"./core/ui/components/field/Field.js";export{DividerHorizontal,DividerLine,DividerVertical}from"./core/ui/components/dividers/DividerLine.js";export{IconBase}from"./core/ui/components/icon/IconBase.js";export{Icon}from"./core/ui/components/icon/Icon.js";export{IconBaseWC}from"./core/ui/components/icon/IconWC.js";export{EventName}from"./core/constants/ui.constants.js";
1
+ export{useApi}from"./core/hooks/useApi.js";export{useToggle}from"./core/hooks/useToggle.js";export{createSafeT,setUseTranslation,useTranslations}from"./core/hooks/useTranslations.js";export{useOutsideClick}from"./core/hooks/useOutsideClick.js";export{useResize}from"./core/hooks/useResize.js";export{isBirthNumberValid}from"./core/utils/helpers/birthnumber.validator.js";export{getMatch,isValidFormat,isValidModulo11,parse,regex}from"./core/utils/helpers/birthnumberCZSKvalidator.js";export{parseCSVdata,validateCSVFile,validateCSVlines,validateJSONFile,validateLineCellTrimmed,validateLineNumColumns,validateSDFFile}from"./core/utils/helpers/fileValidator.js";export{DATE_FORMAT,formatDateToTimestamp,getDate}from"./core/utils/helpers/date.js";export{getDeviceId}from"./core/utils/helpers/deviceInfo.js";export{emailMatch,emailMatcher,regexBuilder}from"./core/utils/helpers/emailMatcher.js";export{cleanCsvLines,formatFilePath}from"./core/utils/helpers/file.js";export{arrayToObjectTree,chunkArray,duplicatesInArray,formatJsonString,formatObj,formatObj2}from"./core/utils/helpers/objectOperations.js";export{debounce,delay,memoize,memoizeComplex,memoizer,nestedTernary}from"./core/utils/helpers/other.js";export{escapeRegExp,fileNameExt,findStringInText,normalizeString,removeWhitespaces,sanitizeId,sanitizePathId,toLowerCase,toUpperCase,truncateText}from"./core/utils/helpers/textValueOperations.js";export{Operation,decrementValue,incerementValue,numberDefined,numberOperation,restrictNumberInLimits,setValue}from"./core/utils/helpers/valueOperations.js";export{cancelableSetInterval,cancelableSetTimeout}from"./core/utils/helpers/cancelableDelayedFunction.js";export{keyExtractor,keyExtractorFunction}from"./core/utils/keyExtractor.js";export{dateRangeFormat,getDateTime,getTimeFromNow,getTimeFromNowOriginal,getTimeTo}from"./core/utils/date.js";export{ced,createResolveAttribute,customElementDefine,resolveAttributes}from"./core/utils/webComponents/webComponent.utils.js";export{calculateColors,calculatePercColor,convertHex,convertRGB,defaultFontSize,pxToRem,resolveStyleValue,setDefaultFontSize,toHex}from"./core/ui/utils/style.js";export{FBox}from"./core/ui/components/container/FBox.js";export{Flex,FlexTight,FlexTightStyled,FlexWrapper}from"./core/ui/components/container/Flex.js";export{Placeholder}from"./core/ui/components/container/Placeholder.js";export{ContainerS}from"./core/ui/components/container/CollapsibleContainerS.js";export{CollapsibleContainer}from"./core/ui/components/container/CollapsibleContainer.js";export{ResizableContainer}from"./core/ui/components/container/ResizableContainer.js";export{Field,FieldWrapper,Select,setIconColor,setIconComponent}from"./core/ui/components/field/Field.js";export{DividerHorizontal,DividerLine,DividerVertical}from"./core/ui/components/dividers/DividerLine.js";export{IconBase}from"./core/ui/components/icon/IconBase.js";export{Icon}from"./core/ui/components/icon/Icon.js";export{IconBaseWC}from"./core/ui/components/icon/IconWC.js";export{EventName}from"./core/constants/ui.constants.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef, useState, memo, useEffect, useLayoutEffect, useMemo } from 'react';
3
+ import classes from './CollapsibleContainer.module.scss';
4
+ const elementPropNameMap = {
5
+ width: 'scrollWidth',
6
+ height: 'scrollHeight',
7
+ };
8
+ export const CollapsibleContainer = memo(({ collapsed = false, collapseHandler, children, horizontal = false, className = '', ...style }) => {
9
+ const containerRef = useRef(null);
10
+ const [contentProp, setContentProp] = useState(0);
11
+ const vertical = !horizontal;
12
+ useEffect(() => {
13
+ collapseHandler?.(collapsed);
14
+ }, [collapseHandler, collapsed]);
15
+ useLayoutEffect(() => {
16
+ if (containerRef?.current) {
17
+ const propName = vertical ? 'height' : 'width';
18
+ setContentProp(containerRef.current[elementPropNameMap[propName]]);
19
+ }
20
+ }, [containerRef, vertical]);
21
+ const styleProps = useMemo(() => ({
22
+ '--prop-name': vertical ? 'height' : 'width',
23
+ '--prop-max-name': vertical ? 'max-height' : 'max-width',
24
+ '--prop-value': `${contentProp}px`,
25
+ ...style,
26
+ }), [vertical, style, contentProp]);
27
+ const classNames = useMemo(() => {
28
+ const classNames = [vertical ? classes.vertical : classes.horizontal];
29
+ if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {
30
+ classNames.push(classes.collapsed);
31
+ }
32
+ if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {
33
+ classNames.push(classes.expanded);
34
+ }
35
+ return classNames.join(' ');
36
+ }, [collapsed, contentProp, vertical]);
37
+ return (_jsx("div", { className: `${classes['collapsible-container']} ${classNames} ${className} `, ref: containerRef, style: styleProps, children: children }));
38
+ });
39
+ CollapsibleContainer.displayName = 'CollapsibleContainer';
40
+ //# sourceMappingURL=CollapsibleContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleContainer.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAa,SAAS,EAAE,eAAe,EAAE,OAAO,EAAiB,MAAM,OAAO,CAAA;AAEjH,OAAO,OAAO,MAAM,oCAAoC,CAAA;AAExD,MAAM,kBAAkB,GAA2B;IACjD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,cAAc;CACvB,CAAA;AASD,MAAM,CAAC,MAAM,oBAAoB,GAAkC,IAAI,CAAC,CAAC,EACvE,SAAS,GAAG,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,GAAG,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,EAChE,EAAE,EAAE;IAC9B,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACjD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CA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AS,IAAI,WAAW,KAAK,IAAI,EAAE;YAClF,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;SAClC;QACD,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC7B,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAA;IAEtC,OAAO,CACL,cACE,SAAS,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,IAAI,UAAU,IAAI,SAAS,GAAG,EAC5E,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,UAAU,YAEhB,QAAQ,GACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAA"}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef, useState, memo, useEffect } from 'react';
3
+ import styled from 'styled-components';
4
+ const elementPropNameMap = {
5
+ width: 'scrollWidth',
6
+ height: 'scrollHeight',
7
+ };
8
+ const propNameFunc = ({ propName }) => propName;
9
+ const StyledContainer = memo(styled.div `
10
+ transform-origin: 0% 0%;
11
+ transition: opacity 0.2s ease-in-out, ${propNameFunc} 0.2s ease-in-out, max-${propNameFunc} 0.2s ease-in-out;
12
+ will-change: opacity, ${propNameFunc}, max-${propNameFunc};
13
+ overflow: hidden;
14
+ opacity: 0;
15
+
16
+ &.Collapsible__container__collapsed {
17
+ ${propNameFunc}: 0;
18
+ max-${propNameFunc}: 0;
19
+ opacity: 0;
20
+ }
21
+
22
+ &.Collapsible__container__expanded {
23
+ ${propNameFunc}: ${({ contentProp }) => `${contentProp}px`};
24
+ max-${propNameFunc}: ${({ contentProp }) => `${contentProp}px`};
25
+ opacity: 1;
26
+ }
27
+ `);
28
+ export const ContainerS = memo(({ collapsed = false, collapseHandler, children, propName = 'height', className, css, ...props }) => {
29
+ const containerRef = useRef();
30
+ const [contentProp, setContentProp] = useState(0);
31
+ useEffect(() => {
32
+ collapseHandler?.(collapsed);
33
+ }, [collapseHandler, collapsed]);
34
+ useEffect(() => {
35
+ if (containerRef?.current) {
36
+ setContentProp(containerRef.current[elementPropNameMap[propName]]);
37
+ }
38
+ }, [containerRef, propName]);
39
+ let resolvedClassName = '';
40
+ if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {
41
+ resolvedClassName = 'Collapsible__container__collapsed';
42
+ }
43
+ if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {
44
+ resolvedClassName = 'Collapsible__container__expanded';
45
+ }
46
+ return (_jsx(StyledContainer, { className: `${className} ${resolvedClassName}`, ref: containerRef, contentProp: contentProp, propName: propName, css: css, ...props, children: children }));
47
+ });
48
+ ContainerS.displayName = 'ContainerS';
49
+ //# sourceMappingURL=CollapsibleContainerS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleContainerS.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainerS.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAa,SAAS,EAAE,MAAM,OAAO,CAAA;AACxE,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAItC,MAAM,kBAAkB,GAA2B;IACjD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,cAAc;CACvB,CAAA;AAED,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAiD,EAAE,EAAE,CAAC,QAAQ,CAAA;AAE9F,MAAM,eAAe,GAA6B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAsB;;0CAE7C,YAAY,0BAA0B,YAAY;0BAClE,YAAY,SAAS,YAAY;;;;;MAKrD,YAAY;UACR,YAAY;;;;;MAKhB,YAAY,KAAK,CAAC,EAAE,WAAW,EAAiC,EAAE,EAAE,CAAC,GAAG,WAAW,IAAI;UACnF,YAAY,KAAK,CAAC,EAAE,WAAW,EAAiC,EAAE,EAAE,CAAC,GAAG,WAAW,IAAI;;;C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