@e1011/es-kit 1.0.168 → 1.0.169

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 (121) hide show
  1. package/dist/hooks/esm/index.css +33 -33
  2. package/dist/hooks/esm/src/core/hooks/index.js +1 -1
  3. package/dist/hooks/esm/src/core/hooks/useThemePreference.js +2 -0
  4. package/dist/hooks/esm/src/core/hooks/useThemePreference.js.map +1 -0
  5. package/dist/hooks/index.css +33 -33
  6. package/dist/hooks/src/core/hooks/index.js +1 -1
  7. package/dist/hooks/src/core/hooks/useThemePreference.js +2 -0
  8. package/dist/hooks/src/core/hooks/useThemePreference.js.map +1 -0
  9. package/dist/lib/cjs/src/core/hooks/useThemePreference.js +2 -0
  10. package/dist/lib/cjs/src/core/hooks/useThemePreference.js.map +1 -0
  11. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  12. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  13. package/dist/lib/cjs/src/core/ui/components/container/LayoutBox.js +1 -1
  14. package/dist/lib/cjs/src/core/ui/components/container/LayoutBox.js.map +1 -1
  15. package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js +1 -1
  16. package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  17. package/dist/lib/cjs/src/core/ui/components/container/layoutBox.types.js +2 -0
  18. package/dist/lib/cjs/src/core/ui/components/container/layoutBox.types.js.map +1 -0
  19. package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js +1 -1
  20. package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  21. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js +1 -1
  22. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +1 -1
  23. package/dist/lib/cjs/src/core/ui/components/icon/unifyIconUrl.js +2 -0
  24. package/dist/lib/cjs/src/core/ui/components/icon/unifyIconUrl.js.map +1 -0
  25. package/dist/lib/cjs/src/index.js +1 -1
  26. package/dist/lib/esm/src/core/hooks/useThemePreference.js +2 -0
  27. package/dist/lib/esm/src/core/hooks/useThemePreference.js.map +1 -0
  28. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  29. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  30. package/dist/lib/esm/src/core/ui/components/container/LayoutBox.js +1 -1
  31. package/dist/lib/esm/src/core/ui/components/container/LayoutBox.js.map +1 -1
  32. package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js +1 -1
  33. package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  34. package/dist/lib/esm/src/core/ui/components/container/layoutBox.types.js +2 -0
  35. package/dist/lib/esm/src/core/ui/components/container/layoutBox.types.js.map +1 -0
  36. package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js +1 -1
  37. package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  38. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js +1 -1
  39. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  40. package/dist/lib/esm/src/core/ui/components/icon/unifyIconUrl.js +2 -0
  41. package/dist/lib/esm/src/core/ui/components/icon/unifyIconUrl.js.map +1 -0
  42. package/dist/lib/esm/src/index.js +1 -1
  43. package/dist/lib/src/core/hooks/index.js +1 -0
  44. package/dist/lib/src/core/hooks/index.js.map +1 -1
  45. package/dist/lib/src/core/ui/components/container/CollapsibleContainer.js +11 -2
  46. package/dist/lib/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  47. package/dist/lib/src/core/ui/components/container/LayoutBox.js +39 -4
  48. package/dist/lib/src/core/ui/components/container/LayoutBox.js.map +1 -1
  49. package/dist/lib/src/core/ui/components/container/ResizableContainer.js +4 -36
  50. package/dist/lib/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  51. package/dist/lib/src/core/ui/components/container/layoutBox.types.js +8 -1
  52. package/dist/lib/src/core/ui/components/container/layoutBox.types.js.map +1 -1
  53. package/dist/lib/src/core/ui/components/dividers/DividerLine.js +1 -1
  54. package/dist/lib/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  55. package/dist/lib/src/core/ui/components/icon/IconBase.js +6 -5
  56. package/dist/lib/src/core/ui/components/icon/IconBase.js.map +1 -1
  57. package/dist/lib/src/core/ui/components/icon/unifyIconUrl.js +20 -0
  58. package/dist/lib/src/core/ui/components/icon/unifyIconUrl.js.map +1 -0
  59. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  60. package/dist/types/src/core/hooks/index.d.ts +1 -0
  61. package/dist/types/src/core/hooks/index.d.ts.map +1 -1
  62. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts +9 -0
  63. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts.map +1 -1
  64. package/dist/types/src/core/ui/components/container/LayoutBox.d.ts +4 -0
  65. package/dist/types/src/core/ui/components/container/LayoutBox.d.ts.map +1 -1
  66. package/dist/types/src/core/ui/components/container/ResizableContainer.d.ts.map +1 -1
  67. package/dist/types/src/core/ui/components/container/layoutBox.types.d.ts +39 -1
  68. package/dist/types/src/core/ui/components/container/layoutBox.types.d.ts.map +1 -1
  69. package/dist/types/src/core/ui/components/dividers/DividerLine.d.ts.map +1 -1
  70. package/dist/types/src/core/ui/components/icon/IconBase.d.ts.map +1 -1
  71. package/dist/types/src/core/ui/components/icon/unifyIconUrl.d.ts +2 -0
  72. package/dist/types/src/core/ui/components/icon/unifyIconUrl.d.ts.map +1 -0
  73. package/dist/ui/esm/node_modules/core-js/internals/is-regexp.js +2 -0
  74. package/dist/ui/esm/node_modules/core-js/internals/is-regexp.js.map +1 -0
  75. package/dist/ui/esm/node_modules/core-js/internals/regexp-get-flags.js +2 -0
  76. package/dist/ui/esm/node_modules/core-js/internals/regexp-get-flags.js.map +1 -0
  77. package/dist/ui/esm/node_modules/core-js/modules/es.string.replace-all.js +2 -0
  78. package/dist/ui/esm/node_modules/core-js/modules/es.string.replace-all.js.map +1 -0
  79. package/dist/ui/esm/src/core/hooks/useResize.js +2 -0
  80. package/dist/ui/esm/src/core/hooks/useResize.js.map +1 -0
  81. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  82. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  83. package/dist/ui/esm/src/core/ui/components/container/LayoutBox.js +1 -1
  84. package/dist/ui/esm/src/core/ui/components/container/LayoutBox.js.map +1 -1
  85. package/dist/ui/esm/src/core/ui/components/container/ResizableContainer.js +1 -1
  86. package/dist/ui/esm/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  87. package/dist/ui/esm/src/core/ui/components/container/layoutBox.types.js +2 -0
  88. package/dist/ui/esm/src/core/ui/components/container/layoutBox.types.js.map +1 -0
  89. package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js +1 -1
  90. package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  91. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js +1 -1
  92. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  93. package/dist/ui/esm/src/core/ui/components/icon/unifyIconUrl.js +2 -0
  94. package/dist/ui/esm/src/core/ui/components/icon/unifyIconUrl.js.map +1 -0
  95. package/dist/ui/esm/src/core/ui/index.js +1 -1
  96. package/dist/ui/node_modules/core-js/internals/is-regexp.js +2 -0
  97. package/dist/ui/node_modules/core-js/internals/is-regexp.js.map +1 -0
  98. package/dist/ui/node_modules/core-js/internals/regexp-get-flags.js +2 -0
  99. package/dist/ui/node_modules/core-js/internals/regexp-get-flags.js.map +1 -0
  100. package/dist/ui/node_modules/core-js/modules/es.string.replace-all.js +2 -0
  101. package/dist/ui/node_modules/core-js/modules/es.string.replace-all.js.map +1 -0
  102. package/dist/ui/src/core/hooks/useResize.js +2 -0
  103. package/dist/ui/src/core/hooks/useResize.js.map +1 -0
  104. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  105. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  106. package/dist/ui/src/core/ui/components/container/LayoutBox.js +1 -1
  107. package/dist/ui/src/core/ui/components/container/LayoutBox.js.map +1 -1
  108. package/dist/ui/src/core/ui/components/container/ResizableContainer.js +1 -1
  109. package/dist/ui/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  110. package/dist/ui/src/core/ui/components/container/layoutBox.types.js +2 -0
  111. package/dist/ui/src/core/ui/components/container/layoutBox.types.js.map +1 -0
  112. package/dist/ui/src/core/ui/components/dividers/DividerLine.js +1 -1
  113. package/dist/ui/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  114. package/dist/ui/src/core/ui/components/icon/IconBase.js +1 -1
  115. package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
  116. package/dist/ui/src/core/ui/components/icon/unifyIconUrl.js +2 -0
  117. package/dist/ui/src/core/ui/components/icon/unifyIconUrl.js.map +1 -0
  118. package/dist/ui/src/core/ui/index.js +1 -1
  119. package/dist/utils/esm/index.css +33 -33
  120. package/dist/utils/index.css +33 -33
  121. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleContainer.js","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode,\n useEffect, useLayoutEffect, useMemo, CSSProperties, PropsWithChildren } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport classes from './CollapsibleContainer.module.scss'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nexport type CollapsibleContainerProps = PropsWithChildren & LayoutBoxProps & {\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 = '', ...props\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const { dataProps, restProps: style } = useParseProps(props)\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 // TODO test with requestAnimationFrame\n setTimeout(() => {\n if (containerRef?.current) {\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, 100)\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 {...dataProps}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","collapsed","collapseHandler","children","horizontal","className","props","containerRef","useRef","contentProp","setContentProp","useState","dataProps","restProps","style","useParseProps","vertical","useEffect","useLayoutEffect","current","propName","setTimeout","styleProps","useMemo","concat","classNames","classes","push","expanded","join","React","createElement","_extends","ref","displayName"],"mappings":"wVASA,MAAMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,EAAsDC,EAAIA,MAACC,IAEvC,IAFwCC,UACvEA,GAAY,EAAKC,gBAAEA,EAAeC,SAAEA,EAAQC,WAAEA,GAAa,EAAKC,UAAEA,EAAY,MAAOC,GAC3DN,EAC1B,MAAMO,EAAeC,SAAuB,OACrCC,EAAaC,GAAkBC,EAAQA,SAAC,IAEzCC,UAAEA,EAAWC,UAAWC,GAAUC,EAAAA,cAAcT,GAEhDU,GAAYZ,EAElBa,EAAAA,WAAU,KACRf,SAAAA,EAAkBD,EAAU,GAC3B,CAACC,EAAiBD,IAErBiB,EAAAA,iBAAgB,KACd,GAAIX,SAAAA,EAAcY,QAAS,CACzB,MAAMC,EAAWJ,EAAW,SAAW,QAGvCK,YAAW,KACLd,SAAAA,EAAcY,SAChBT,EAAgBH,EAAaY,QAAgBxB,EAAmByB,IAClE,GACC,IACL,IACC,CAACb,EAAcS,IAElB,MAAMM,EAA4BC,EAAAA,SAAQ,KAAO,CAC/C,cAAeP,EAAW,SAAW,QACrC,kBAAmBA,EAAW,aAAe,YAC7C,eAAcQ,GAAAA,OAAKf,EAAe,SAC/BK,KACgB,CAACE,EAAUF,EAAOL,IAEjCgB,EAAaF,EAAAA,SAAQ,KACzB,MAAME,EAAa,CAACT,EAAWU,EAAAA,QAAQV,SAAWU,EAAAA,QAAQtB,YAQ1D,OANIH,GAAaQ,GAAbR,MAA4BQ,GAC9BgB,EAAWE,KAAKD,UAAQzB,YAErBA,GAAaQ,GAAd,MAA6BA,GAC/BgB,EAAWE,KAAKD,UAAQE,UAEnBH,EAAWI,KAAK,IAAI,GAC1B,CAAC5B,EAAWQ,EAAaO,IAE5B,OACEc,MAAAC,cAAA,MAAAC,UAAA,CACE3B,UAASmB,GAAAA,OAAKE,EAAAA,QAAQ,yBAAwBF,KAAAA,OAAIC,EAAU,KAAAD,OAAInB,EAAa,KAC7E4B,IAAK1B,EACLO,MAAOQ,GACHV,GAEHT,EACG,IAIVL,EAAqBoC,YAAc"}
1
+ {"version":3,"file":"CollapsibleContainer.js","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode,\n useEffect, useLayoutEffect, useMemo, CSSProperties, PropsWithChildren } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport classes from './CollapsibleContainer.module.scss'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\n/**\n * Mapping of element property names for calculating dimensions.\n */\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\n/**\n * Props for the CollapsibleContainer component.\n */\nexport type CollapsibleContainerProps = PropsWithChildren & LayoutBoxProps & {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n className?: string\n horizontal?: boolean\n} & CSSProperties\n\n/**\n * CollapsibleContainer component.\n *\n * @type {React.FC<CollapsibleContainerProps>}\n * @returns {React.ReactElement} The CollapsibleContainer.\n */\nexport const CollapsibleContainer: FC<CollapsibleContainerProps> = memo(({\n collapsed = false, collapseHandler, children, horizontal = false, className = '', id, ...props\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const { dataProps, restProps: style } = useParseProps(props)\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 // TODO test with requestAnimationFrame\n setTimeout(() => {\n if (containerRef?.current) {\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, 100)\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 id={`${(typeof id !== 'undefined' && id) || id}`}\n className={`${classes['collapsible-container']} ${classNames} ${className} `}\n ref={containerRef}\n style={styleProps}\n {...dataProps}\n data-testid={dataProps.dataTestId || dataProps['data-testid'] || id}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","collapsed","collapseHandler","children","horizontal","className","id","props","containerRef","useRef","contentProp","setContentProp","useState","dataProps","restProps","style","useParseProps","vertical","useEffect","useLayoutEffect","current","propName","setTimeout","styleProps","useMemo","concat","classNames","classes","push","expanded","join","React","createElement","_extends","ref","dataTestId","displayName"],"mappings":"wVAYA,MAAMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAoBGC,EAAsDC,EAAIA,MAACC,IAEvC,IAFwCC,UACvEA,GAAY,EAAKC,gBAAEA,EAAeC,SAAEA,EAAQC,WAAEA,GAAa,EAAKC,UAAEA,EAAY,GAAEC,GAAEA,KAAOC,GAC/DP,EAC1B,MAAMQ,EAAeC,SAAuB,OACrCC,EAAaC,GAAkBC,EAAQA,SAAC,IAEzCC,UAAEA,EAAWC,UAAWC,GAAUC,EAAAA,cAAcT,GAEhDU,GAAYb,EAElBc,EAAAA,WAAU,KACRhB,SAAAA,EAAkBD,EAAU,GAC3B,CAACC,EAAiBD,IAErBkB,EAAAA,iBAAgB,KACd,GAAIX,SAAAA,EAAcY,QAAS,CACzB,MAAMC,EAAWJ,EAAW,SAAW,QAGvCK,YAAW,KACLd,SAAAA,EAAcY,SAChBT,EAAgBH,EAAaY,QAAgBzB,EAAmB0B,IAClE,GACC,IACL,IACC,CAACb,EAAcS,IAElB,MAAMM,EAA4BC,EAAAA,SAAQ,KAAO,CAC/C,cAAeP,EAAW,SAAW,QACrC,kBAAmBA,EAAW,aAAe,YAC7C,eAAcQ,GAAAA,OAAKf,EAAe,SAC/BK,KACgB,CAACE,EAAUF,EAAOL,IAEjCgB,EAAaF,EAAAA,SAAQ,KACzB,MAAME,EAAa,CAACT,EAAWU,EAAAA,QAAQV,SAAWU,EAAAA,QAAQvB,YAQ1D,OANIH,GAAaS,GAAbT,MAA4BS,GAC9BgB,EAAWE,KAAKD,UAAQ1B,YAErBA,GAAaS,GAAd,MAA6BA,GAC/BgB,EAAWE,KAAKD,UAAQE,UAEnBH,EAAWI,KAAK,IAAI,GAC1B,CAAC7B,EAAWS,EAAaO,IAE5B,OACEc,MAAAC,cAAA,MAAAC,UAAA,CACE3B,GAAE,GAAAmB,YAAoB,IAAPnB,GAAsBA,GAAOA,GAC5CD,UAASoB,GAAAA,OAAKE,EAAAA,QAAQ,yBAAwBF,KAAAA,OAAIC,EAAU,KAAAD,OAAIpB,EAAa,KAC7E6B,IAAK1B,EACLO,MAAOQ,GACHV,EAAS,CACb,cAAaA,EAAUsB,YAActB,EAAU,gBAAkBP,IAEhEH,EACG,IAIVL,EAAqBsC,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),s=require("../../../hooks/useParseProps.js"),r=require("./layoutBox.module.scss.js");const o={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},a=e=>e&&o[e]||e,l=t.forwardRef(((o,l)=>{let{style:n,children:i,tabIndex:u,className:d="",onClick:c,...x}=o;const{dataProps:f,restProps:y}=s.useParseProps(x),m=t.useMemo((()=>c?{onClick:c,onKeyDown:c,role:"button",tabIndex:-1}:{}),[c]),p=t.useMemo((()=>({...y,...y.align?{alignItems:a(y.align)}:{},...y.justify?{justifyContent:a(y.justify)}:{},...y.direction?{flexDirection:y.direction}:{},...n})),[y,n]);return React.createElement("div",e.extends({ref:l,tabIndex:u,className:"".concat(r.default["flexible-box"]," ").concat(d),style:p},f,m),i)}));l.displayName="LayoutBoxRefForwarded";const n=t.memo(l);n.displayName="LayoutBox",exports.LayoutBox=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),s=require("../../../hooks/useParseProps.js"),o=require("./layoutBox.types.js"),a=require("./layoutBox.module.scss.js");const r={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},l=e=>e&&r[e]||e,i=t.forwardRef(((r,i)=>{let{id:n,style:d,children:u,tabIndex:c,className:x="",onClick:f,column:y,...m}=r;const{dataProps:p,restProps:b}=s.useParseProps(m),j=t.useMemo((()=>f?{onClick:f,onKeyDown:f,role:"button",tabIndex:-1}:{}),[f]),P=t.useMemo((()=>void 0!==y&&!0===y?o.LayoutDirection.COLUMN:null),[y]),B=t.useMemo((()=>({...b,...b.align?{alignItems:l(b.align)}:{},...b.justify?{justifyContent:l(b.justify)}:{},...b.direction||P?{flexDirection:b.direction||P}:{},...d})),[P,b,d]);return React.createElement("div",e.extends({},n?{id:"".concat(n)}:{},{ref:i,tabIndex:c,className:"".concat(a.default["flexible-box"]," ").concat(x),style:B},p,{"data-testid":p.dataTestId||p["data-testid"]||n},j),u)}));i.displayName="LayoutBoxRefForwarded";const n=t.memo(i);n.displayName="LayoutBox",exports.LayoutBox=n;
2
2
  //# sourceMappingURL=LayoutBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutBox.js","sources":["../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"sourcesContent":["import { memo, FC, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport { LayoutBoxProps } from './layoutBox.types'\nimport classes from './layoutBox.module.scss'\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\n\nconst LayoutBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', onClick, ...props\n}: LayoutBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const { dataProps, restProps } = useParseProps(props)\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n const styles = useMemo(() => (\n {\n ...restProps,\n ...(restProps.align ? { alignItems: resolveFlexProps(restProps.align as string) } : {}),\n ...(restProps.justify ? { justifyContent: resolveFlexProps(restProps.justify as string) } : {}),\n ...(restProps.direction ? { flexDirection: restProps.direction } : {}),\n ...style,\n }\n ), [restProps, 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 {...dataProps}\n {...onClickProps}\n >\n {children}\n </div>\n )\n})\n\nLayoutBoxRefForwarded.displayName = 'LayoutBoxRefForwarded'\n\nexport const LayoutBox: FC<LayoutBoxProps> = memo<LayoutBoxProps>(LayoutBoxRefForwarded)\n\n\nLayoutBox.displayName = 'LayoutBox'\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","LayoutBoxRefForwarded","forwardRef","_ref","ref","style","children","tabIndex","className","onClick","props","dataProps","restProps","useParseProps","onClickProps","useMemo","onKeyDown","role","styles","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","displayName","LayoutBox","memo"],"mappings":"kPAQA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAGrGC,EAAwBC,EAAUA,YAAC,CAAAC,EAEtBC,KAA+C,IAFxBC,MACxCA,EAAKC,SAAEA,EAAQC,SAAEA,EAAQC,UAAEA,EAAY,GAAEC,QAAEA,KAAYC,GACxCP,EACf,MAAMQ,UAAEA,EAASC,UAAEA,GAAcC,EAAAA,cAAcH,GAEzCI,EAAeC,WAAQ,IAAON,EAAW,CAC7CA,UACAO,UAAWP,EACXQ,KAAM,SACNV,UAAW,GACR,CAAG,GAAE,CAACE,IAELS,EAASH,EAAAA,SAAQ,KACrB,IACKH,KACCA,EAAUO,MAAQ,CAAEC,WAAYrB,EAAiBa,EAAUO,QAAqB,MAChFP,EAAUS,QAAU,CAAEC,eAAgBvB,EAAiBa,EAAUS,UAAuB,MACxFT,EAAUW,UAAY,CAAEC,cAAeZ,EAAUW,WAAc,MAChElB,KAEJ,CAACO,EAAWP,IAEf,OACEoB,MAAAC,cAAA,MAAAC,UAAA,CACEvB,IAAKA,EACLG,SAAUA,EACVC,UAAS,GAAAoB,OAAMC,EAAO,QAAS,gBAAeD,KAAAA,OAAIpB,GAClDH,MAAOa,GACHP,EACAG,GAEHR,EACG,IAIVL,EAAsB6B,YAAc,8BAEvBC,EAAgCC,EAAIA,KAAiB/B,GAGlE8B,EAAUD,YAAc"}
1
+ {"version":3,"file":"LayoutBox.js","sources":["../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"sourcesContent":["import { memo, FC, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport { LayoutDirection, LayoutBoxProps } from './layoutBox.types'\nimport classes from './layoutBox.module.scss'\n\n\n/**\n * Map of flex values for resolving flex alignment and justification.\n * @type {Record<string, string>}\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\n/**\n * Resolves flex alignment and justification properties based on the provided value.\n * @param {string | undefined} value - The value to resolve.\n * @returns {string | undefined} - Resolved flex property value.\n */\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n/**\n * Forwarded ref version of the LayoutBox component.\n * @param {LayoutBoxProps} props - Props for the LayoutBox component.\n * @param {LegacyRef<HTMLDivElement> | undefined} ref - Ref for accessing the underlying DOM element.\n * @returns {JSX.Element} - Rendered LayoutBox component.\n */\nconst LayoutBoxRefForwarded = forwardRef(({\n id, style, children, tabIndex, className = '', onClick, column, ...props\n}: LayoutBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const { dataProps, restProps } = useParseProps(props)\n\n /**\n * Memoized onClick event properties.\n * @type {{ onClick?: () => void; onKeyDown?: () => void; role?: string; tabIndex?: number }}\n */\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n /**\n * Memoized resolved direction based on the column prop.\n * @type {LayoutDirection}\n */\n const resolvedColumn = useMemo(() => ((\n column !== undefined && column === true)\n ? LayoutDirection.COLUMN\n : null), [column])\n\n /**\n * Memoized styles combining parsed props and additional styles.\n * @type {CSSProperties}\n */\n const styles = useMemo(() => (\n {\n ...restProps,\n ...(restProps.align ? { alignItems: resolveFlexProps(restProps.align as string) } : {}),\n ...(restProps.justify ? { justifyContent: resolveFlexProps(restProps.justify as string) } : {}),\n ...(restProps.direction || resolvedColumn ? { flexDirection: restProps.direction || resolvedColumn } : {}),\n ...style,\n }\n ), [resolvedColumn, restProps, style])\n\n return (\n <div\n {...(id ? { id: `${id}` } : {})}\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['flexible-box']} ${className}`}\n style={styles as CSSProperties}\n {...dataProps}\n data-testid={dataProps.dataTestId || dataProps['data-testid'] || id}\n {...onClickProps}\n >\n {children}\n </div>\n )\n})\n\nLayoutBoxRefForwarded.displayName = 'LayoutBoxRefForwarded'\n\n/**\n * Memoized and memoized LayoutBox component.\n * @type {FC<LayoutBoxProps>}\n */\nexport const LayoutBox: FC<LayoutBoxProps> = memo<LayoutBoxProps>(LayoutBoxRefForwarded)\n\nLayoutBox.displayName = 'LayoutBox'\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","LayoutBoxRefForwarded","forwardRef","_ref","ref","id","style","children","tabIndex","className","onClick","column","props","dataProps","restProps","useParseProps","onClickProps","useMemo","onKeyDown","role","resolvedColumn","undefined","LayoutDirection","COLUMN","styles","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","dataTestId","displayName","LayoutBox","memo"],"mappings":"oRAYA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAQRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAQrGC,EAAwBC,EAAUA,YAAC,CAAAC,EAEtBC,KAA+C,IAFxBC,GACxCA,EAAEC,MAAEA,EAAKC,SAAEA,EAAQC,SAAEA,EAAQC,UAAEA,EAAY,GAAEC,QAAEA,EAAOC,OAAEA,KAAWC,GACpDT,EACf,MAAMU,UAAEA,EAASC,UAAEA,GAAcC,EAAAA,cAAcH,GAMzCI,EAAeC,WAAQ,IAAOP,EAAW,CAC7CA,UACAQ,UAAWR,EACXS,KAAM,SACNX,UAAW,GACR,CAAG,GAAE,CAACE,IAMLU,EAAiBH,EAAOA,SAAC,SAClBI,IAAXV,IAAmC,IAAXA,EACtBW,EAAAA,gBAAgBC,OAChB,MAAO,CAACZ,IAMNa,EAASP,EAAAA,SAAQ,KACrB,IACKH,KACCA,EAAUW,MAAQ,CAAEC,WAAY3B,EAAiBe,EAAUW,QAAqB,MAChFX,EAAUa,QAAU,CAAEC,eAAgB7B,EAAiBe,EAAUa,UAAuB,MACxFb,EAAUe,WAAaT,EAAiB,CAAEU,cAAehB,EAAUe,WAAaT,GAAmB,MACpGd,KAEJ,CAACc,EAAgBN,EAAWR,IAE/B,OACEyB,MAAAC,oBAAAC,EAAAA,QAAA,CAAA,EACO5B,EAAK,CAAEA,GAAE,GAAA6B,OAAK7B,IAAS,GAAE,CAC9BD,IAAKA,EACLI,SAAUA,EACVC,UAAS,GAAAyB,OAAMC,EAAO,QAAS,gBAAeD,KAAAA,OAAIzB,GAClDH,MAAOkB,GACHX,EAAS,CACb,cAAaA,EAAUuB,YAAcvB,EAAU,gBAAkBR,GAC7DW,GAEHT,EACG,IAIVN,EAAsBoC,YAAc,8BAMvBC,EAAgCC,EAAIA,KAAiBtC,GAElEqC,EAAUD,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/web.dom-collections.iterator.js");var t=require("react"),i=require("../../../../../node_modules/lodash-es/debounce.js"),n=require("./LayoutBox.js");const l={main:{position:"absolute",zIndex:111,left:0,pointerEvents:"none"},empty:{pointerEvents:"none"}},o=t.memo((o=>{let{children:r,debounceDelay:u=250,...d}=o;const c=t.useRef(),h=t.useRef({width:0,height:0}),[a,s]=t.useState({width:void 0,height:void 0}),v=t.useMemo((()=>i.default((e=>{var t,i,n,l;const o=e[0].contentRect.width,r=e[0].contentRect.height;(null===(t=h.current)||void 0===t?void 0:t.width)===o&&(null===(i=h.current)||void 0===i?void 0:i.height)===r||(h.current={width:o,height:r},s({width:null==c||null===(n=c.current)||void 0===n?void 0:n.clientWidth,height:null==c||null===(l=c.current)||void 0===l?void 0:l.clientHeight}))}),u)),[u]);return t.useLayoutEffect((()=>{let e,t;var i,n;null!=c&&c.current&&(t=null==c?void 0:c.current,e=new ResizeObserver(v),e.observe(t),s({width:null==c||null===(i=c.current)||void 0===i?void 0:i.clientWidth,height:null==c||null===(n=c.current)||void 0===n?void 0:n.clientHeight}));return()=>{var i,n;null===(i=e)||void 0===i||null===(n=i.unobserve)||void 0===n||n.call(i,t)}}),[v,c]),React.createElement(n.LayoutBox,e.extends({width:"100%",height:"100%",justify:"center",align:"center",direction:"column"},d),React.createElement(n.LayoutBox,{style:l.main,width:"100%",height:"100%",ref:c}),!r&&React.createElement(n.LayoutBox,{width:"".concat(Math.max((null==a?void 0:a.width)||200,200)||200,"px"),height:"".concat(Math.max((null==a?void 0:a.height)||200,200)||200,"px"),style:l.empty}),r&&(null==r?void 0:r({height:"".concat((null==a?void 0:a.height)||200,"px"),width:"".concat((null==a?void 0:a.width)||200,"px"),measured:!(null==a||!a.height)})))}));o.displayName="ResizableContainer",exports.ResizableContainer=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/web.dom-collections.iterator.js");var t=require("react"),i=require("../../../hooks/useResize.js"),o=require("./LayoutBox.js");const n={main:{position:"absolute",zIndex:1,left:0,pointerEvents:"none"},empty:{pointerEvents:"none"}},l=t.memo((t=>{let{children:l,debounceDelay:r=250,...a}=t;const[s,u]=i.useResize(r);return React.createElement(o.LayoutBox,e.extends({width:"100%",height:"100%",justify:"center",align:"center",direction:"column"},a),React.createElement(o.LayoutBox,{style:n.main,width:"100%",height:"100%",ref:s}),!l&&React.createElement(o.LayoutBox,{width:"".concat(Math.max((null==u?void 0:u.width)||200,200)||200,"px"),height:"".concat(Math.max((null==u?void 0:u.height)||200,200)||200,"px"),style:n.empty}),l&&(null==l?void 0:l({height:"".concat((null==u?void 0:u.height)||200,"px"),width:"".concat((null==u?void 0:u.width)||200,"px"),measured:!(null==u||!u.height)})))}));l.displayName="ResizableContainer",exports.ResizableContainer=l;
2
2
  //# sourceMappingURL=ResizableContainer.js.map
@@ -1 +1 @@
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 { LayoutBox } from './LayoutBox'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\nexport type ResizableContainerProps = LayoutBoxProps & 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 },\n empty: {\n pointerEvents: 'none',\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 <LayoutBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <LayoutBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (\n <LayoutBox\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 )}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </LayoutBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","debounceDelay","props","containerRef","useRef","lastResizeWidthRef","width","height","containerSize","setContainerSize","useState","undefined","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","LayoutBox","_extends","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"mVAmBA,MAAMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,IACRC,KAAM,EACNC,cAAe,QAEjBC,MAAO,CACLD,cAAe,SAINE,EAAqBC,EAAIA,MACpCC,IAA0E,IAAzEC,SAAEA,EAAQC,cAAEA,EAAgB,OAAQC,GAAgCH,EACnE,MAAMI,EAAeC,EAAAA,SAEfC,EAAqBD,EAAAA,OAA0C,CAAEE,MAAO,EAAGC,OAAQ,KAElFC,EAAeC,GACpBC,WAAsB,CAAEJ,WAAOK,EAAWJ,YAAQI,IAE9CC,EAAyBC,EAAAA,SAAQ,IAAMC,EAAAA,SAAUC,IAAY,IAAAC,EAAAC,EAAAC,EAAAC,EACjE,MAAMC,EAAiBL,EAAQ,GAAGM,YAAYf,MACxCgB,EAAkBP,EAAQ,GAAGM,YAAYd,QAEjBS,QAA1BA,EAAAX,EAAmBkB,eAAnBP,IAA0BA,OAA1BA,EAAAA,EAA4BV,SAAUc,IACb,QAA1BH,EAAAZ,EAAmBkB,eAAO,IAAAN,OAAA,EAA1BA,EAA4BV,UAAWe,IAG1CjB,EAAmBkB,QAAU,CAAEjB,MAAOc,EAAgBb,OAAQe,GAE9Db,EAAiB,CACfH,MAAOH,SAAqBe,QAATA,EAAZf,EAAcoB,eAAdL,IAAqBA,OAArBA,EAAAA,EAAuBM,YAC9BjB,OAAQJ,SAAqB,QAATgB,EAAZhB,EAAcoB,eAAO,IAAAJ,OAAA,EAArBA,EAAuBM,eAC/B,GACDxB,IAAgB,CAACA,IAuBpB,OArBAyB,EAAAA,iBAAgB,KACd,IAAIC,EACAC,EAEuB,IAAAC,EAAAC,EAAvB3B,SAAAA,EAAcoB,UAChBK,EAAmBzB,aAAAA,EAAAA,EAAcoB,QACjCI,EAAiB,IAAII,eAAenB,GACpCe,EAAeK,QAAQJ,GAEvBnB,EAAiB,CACfH,MAAOH,SAAqB0B,QAATA,EAAZ1B,EAAcoB,eAAdM,IAAqBA,OAArBA,EAAAA,EAAuBL,YAC9BjB,OAAQJ,SAAqB,QAAT2B,EAAZ3B,EAAcoB,eAAO,IAAAO,OAAA,EAArBA,EAAuBL,gBAGnC,MAAO,KAAM,IAAAQ,EAAAC,EACG,QAAdD,EAAAN,SAAcO,IAAAD,GAAWC,QAAXA,EAAdD,EAAgBE,qBAASD,GAAzBA,EAAAE,KAAAH,EAA4BL,EAA4B,CACzD,GACA,CAAChB,EAAwBT,IAK1BkC,MAAAC,cAACC,EAASA,UAAAC,UAAA,CACRlC,MAAM,OACNC,OAAO,OACPkC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACNzC,GAEJmC,MAAAC,cAACC,EAAAA,UAAS,CACRK,MAAOtD,EAAOC,KACde,MAAM,OACNC,OAAO,OACPsC,IAAK1C,KAELH,GACFqC,MAAAC,cAACC,EAAAA,UAAS,CACRjC,MAAK,GAAAwC,OAAKC,KAAKC,KAAIxC,eAAAA,EAAeF,QAAS,IAAK,MAAQ,IAAQ,MAChEC,OAAM,GAAAuC,OAAKC,KAAKC,KAAIxC,eAAAA,EAAeD,SAAU,IAAK,MAAQ,IAAQ,MAClEqC,MAAOtD,EAAOM,QAGfI,IAAYA,aAAAA,EAAAA,EAAW,CACtBO,OAAMuC,GAAAA,QAAKtC,aAAa,EAAbA,EAAeD,SAAU,IAAO,MAC3CD,MAAKwC,GAAAA,QAAKtC,aAAa,EAAbA,EAAeF,QAAS,IAAO,MACzC2C,WAAYzC,UAAAA,EAAeD,WAEnB,IAKlBV,EAAmBqD,YAAc"}
1
+ {"version":3,"file":"ResizableContainer.js","sources":["../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"sourcesContent":["import { memo, RefObject, PropsWithChildren } from 'react'\n\nimport { useResize } from '../../../hooks/useResize'\n\nimport { LayoutBox } from './LayoutBox'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\nexport type ResizableContainerProps = LayoutBoxProps & PropsWithChildren<any> & {\n debounceDelay?: number\n}\n\nexport type ResizableContainerRenderProps = {\n width: number | string\n height: number | string\n measured: boolean\n}\n\nconst styles = {\n main: {\n position: 'absolute',\n zIndex: 1,\n left: 0,\n pointerEvents: 'none',\n },\n empty: {\n pointerEvents: 'none',\n },\n}\n\nexport const ResizableContainer = memo<ResizableContainerProps>(\n ({ children, debounceDelay = 250, ...props }: ResizableContainerProps) => {\n const [containerRef, containerSize] = useResize(debounceDelay)\n\n return (\n <LayoutBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <LayoutBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (\n <LayoutBox\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 )}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </LayoutBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","debounceDelay","props","containerRef","containerSize","useResize","React","createElement","LayoutBox","_extends","width","height","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"6TAkBA,MAAMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,EACRC,KAAM,EACNC,cAAe,QAEjBC,MAAO,CACLD,cAAe,SAINE,EAAqBC,EAAIA,MACpCC,IAA0E,IAAzEC,SAAEA,EAAQC,cAAEA,EAAgB,OAAQC,GAAgCH,EACnE,MAAOI,EAAcC,GAAiBC,EAASA,UAACJ,GAEhD,OACEK,MAAAC,cAACC,EAASA,UAAAC,UAAA,CACRC,MAAM,OACNC,OAAO,OACPC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACNZ,GAEJI,MAAAC,cAACC,EAAAA,UAAS,CACRO,MAAOzB,EAAOC,KACdmB,MAAM,OACNC,OAAO,OACPK,IAAKb,KAELH,GACFM,MAAAC,cAACC,EAAAA,UAAS,CACRE,MAAK,GAAAO,OAAKC,KAAKC,KAAIf,eAAAA,EAAeM,QAAS,IAAK,MAAQ,IAAQ,MAChEC,OAAM,GAAAM,OAAKC,KAAKC,KAAIf,eAAAA,EAAeO,SAAU,IAAK,MAAQ,IAAQ,MAClEI,MAAOzB,EAAOM,QAGfI,IAAYA,aAAAA,EAAAA,EAAW,CACtBW,OAAMM,GAAAA,QAAKb,aAAa,EAAbA,EAAeO,SAAU,IAAO,MAC3CD,MAAKO,GAAAA,QAAKb,aAAa,EAAbA,EAAeM,QAAS,IAAO,MACzCU,WAAYhB,UAAAA,EAAeO,WAEnB,IAKlBd,EAAmBwB,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});let e=function(e){return e.ROW="row",e.COLUMN="column",e}({});exports.LayoutDirection=e;
2
+ //# sourceMappingURL=layoutBox.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layoutBox.types.js","sources":["../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"sourcesContent":["import { CSSProperties, PropsWithChildren, Ref } from 'react'\n\n/**\n * Enum representing the possible layout directions.\n */\nexport enum LayoutDirection {\n ROW = 'row',\n COLUMN = 'column',\n}\n\n/**\n * Props for the LayoutBox component.\n */\nexport type LayoutBoxProps = PropsWithChildren & {\n /** Unique identifier for the component. */\n id?: string | number\n /** CSS flex property. */\n flex?: string\n /** CSS flexGrow property. */\n flexGrow?: string | number\n /** Text alignment within the box. */\n alignText?: 'center' | 'right' | 'left'\n /** Direction of the layout (row or column). */\n direction?: LayoutDirection | string\n /** CSS flexShrink property. */\n flexShrink?: string | number\n /** CSS flexBasis property. */\n flexBasis?: string\n /** CSS flexWrap property. */\n flexWrap?: string\n /** CSS justify-content property. */\n justify?: string\n /** CSS align-items property. */\n align?: string\n /** CSS align-self property. */\n alignSelf?: string\n /** CSS margin property. */\n margin?: string\n /** CSS padding property. */\n padding?: string\n /** CSS width property. */\n width?: string\n /** CSS height property. */\n height?: string\n /** CSS maxWidth property. */\n maxWidth?: string\n /** CSS maxHeight property. */\n maxHeight?: string\n /** CSS minWidth property. */\n minWidth?: string\n /** CSS minHeight property. */\n minHeight?: string\n /** Gap between child elements. */\n gap?: string\n /** CSS borderRadius property. */\n borderRadius?: string\n /** Additional inline styles for the component. */\n style?: Record<string, unknown> | null\n /** Additional class name(s) for the component. */\n className?: string\n /** Tab index for keyboard navigation. */\n tabIndex?: number\n /** Ref for accessing the underlying DOM element. */\n ref?: Ref<HTMLDivElement> | undefined\n /** Callback function for click event. */\n onClick?: () => void\n /** If true, sets the layout direction to column. */\n column?: boolean\n} & Omit<CSSProperties, 'direction'>;\n"],"names":["LayoutDirection"],"mappings":"oEAKYA,IAAAA,WAAAA,GAAe,OAAfA,EAAe,IAAA,MAAfA,EAAe,OAAA,SAAfA,CAAe,EAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),i=require("./divider.module.scss.js");const r=t.memo((e=>{let{orientation:r,vertical:a,color:l="#999999",opacity:o,length:c="80%",left:n="0",width:s="1px",height:d="1px",margin:m,className:u=""}=e;const v=t.useMemo((()=>"vertical"===r||!0===a),[r,a]),p=t.useMemo((()=>({"--width":s,"--height":d,"--length":c,"--opacity":o,"--color":l,"--left":n,"--margin":m||(v?"auto 0":"0 auto")})),[s,d,c,o,l,n,m,v]),h=v?i.default.vertical:i.default.horizontal;return React.createElement("div",{className:"".concat(i.default["divider-line"]," ").concat(h," ").concat(u),style:p})}));r.displayName="DividerLine";const a=t.memo((t=>React.createElement(r,e.extends({vertical:!0,length:"100%"},t))));a.displayName="DividerVertical";const l=t.memo((t=>React.createElement(r,e.extends({length:"100%"},t))));l.displayName="DividerHorizontal",exports.DividerHorizontal=l,exports.DividerLine=r,exports.DividerVertical=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),i=require("./divider.module.scss.js");const r=t.memo((e=>{let{orientation:r,vertical:a,color:l="var(--divider-line)",opacity:o,length:c="80%",left:n="0",width:s="1px",height:d="1px",margin:m,className:u=""}=e;const v=t.useMemo((()=>"vertical"===r||!0===a),[r,a]),p=t.useMemo((()=>({"--width":s,"--height":d,"--length":c,"--opacity":o,"--color":l,"--left":n,"--margin":m||(v?"auto 0":"0 auto")})),[s,d,c,o,l,n,m,v]),h=v?i.default.vertical:i.default.horizontal;return React.createElement("div",{className:"".concat(i.default["divider-line"]," ").concat(h," ").concat(u),style:p})}));r.displayName="DividerLine";const a=t.memo((t=>React.createElement(r,e.extends({vertical:!0,length:"100%"},t))));a.displayName="DividerVertical";const l=t.memo((t=>React.createElement(r,e.extends({length:"100%"},t))));l.displayName="DividerHorizontal",exports.DividerHorizontal=l,exports.DividerLine=r,exports.DividerVertical=a;
2
2
  //# sourceMappingURL=DividerLine.js.map
@@ -1 +1 @@
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\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","color","opacity","length","left","width","height","margin","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"yMAmBaA,EAAgCC,EAAIA,MAAeC,IAQ5C,IAR6CC,YAC/DA,EAAWC,SAAEA,EAAQC,MACrBA,EAAQ,UAASC,QACjBA,EAAOC,OACPA,EAAS,MAAKC,KAAEA,EAAO,IAAGC,MAC1BA,EAAQ,MAAKC,OAAEA,EAAS,MAAKC,OAC7BA,EAAMC,UACNA,EAAY,IACCV,EACb,MAAMW,EAAaC,EAAAA,SAAQ,IAAsB,aAAhBX,IAA2C,IAAbC,GAAmB,CAACD,EAAaC,IAE1FW,EAASD,EAAAA,SAAQ,KACrB,CACE,UAAWL,EACX,WAAYC,EACZ,WAAYH,EACZ,YAAaD,EACb,UAAWD,EACX,SAAUG,EACV,WAAYG,IAAWE,EAAa,SAAW,aAEhD,CAACJ,EAAOC,EAAQH,EAAQD,EAASD,EAAOG,EAAMG,EAAQE,IAEnDG,EAAcH,EAAaI,EAAAA,QAAQb,SAAWa,EAAAA,QAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAO,QAAS,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GACP,IAINf,EAAYuB,YAAc,cAEbC,MAAAA,EACTvB,EAAIA,MAAEwB,GAAUN,MAAAC,cAACpB,EAAW0B,UAAA,CAACtB,UAAQ,EAACG,OAAO,QAAWkB,MAC5DD,EAAgBD,YAAc,kBAEjBI,MAAAA,EACT1B,EAAIA,MAAEwB,GAAUN,MAAAC,cAACpB,EAAW0B,UAAA,CAACnB,OAAO,QAAWkB,MACnDE,EAAkBJ,YAAc"}
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 = 'var(--divider-line)',\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","color","opacity","length","left","width","height","margin","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"yMAkBaA,EAAgCC,EAAIA,MAAeC,IAQ5C,IAR6CC,YAC/DA,EAAWC,SAAEA,EAAQC,MACrBA,EAAQ,sBAAqBC,QAC7BA,EAAOC,OACPA,EAAS,MAAKC,KAAEA,EAAO,IAAGC,MAC1BA,EAAQ,MAAKC,OAAEA,EAAS,MAAKC,OAC7BA,EAAMC,UACNA,EAAY,IACCV,EACb,MAAMW,EAAaC,EAAAA,SAAQ,IAAsB,aAAhBX,IAA2C,IAAbC,GAAmB,CAACD,EAAaC,IAE1FW,EAASD,EAAAA,SAAQ,KACrB,CACE,UAAWL,EACX,WAAYC,EACZ,WAAYH,EACZ,YAAaD,EACb,UAAWD,EACX,SAAUG,EACV,WAAYG,IAAWE,EAAa,SAAW,aAEhD,CAACJ,EAAOC,EAAQH,EAAQD,EAASD,EAAOG,EAAMG,EAAQE,IAEnDG,EAAcH,EAAaI,EAAAA,QAAQb,SAAWa,EAAAA,QAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAO,QAAS,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GACP,IAINf,EAAYuB,YAAc,cAEbC,MAAAA,EACTvB,EAAIA,MAAEwB,GAAUN,MAAAC,cAACpB,EAAW0B,UAAA,CAACtB,UAAQ,EAACG,OAAO,QAAWkB,MAC5DD,EAAgBD,YAAc,kBAEjBI,MAAAA,EACT1B,EAAIA,MAAEwB,GAAUN,MAAAC,cAACpB,EAAW0B,UAAA,CAACnB,OAAO,QAAWkB,MACnDE,EAAkBJ,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),o=require("react"),t=require("./icon.module.scss.js");const n=o.memo((n=>{let{iconUrl:r,minWidth:c,minHeight:i,size:s,fontSize:l,width:a,height:u,color:m="currentColor",className:d="",children:h,style:p,onClick:b,...g}=n;const y=o.useMemo((()=>({"--min-width":c||s||a||"auto","--min-height":i||s||u||"auto","--width":s||a||"1rem","--height":s||u||"1rem",...l?{fontSize:l}:{},...r?{"--icon-url":"url(".concat(r,")")}:{},...r?{"--icon-color":m}:{"--icon-content-color":m},...b?{cursor:"pointer"}:{},...p})),[c,s,a,i,u,l,r,m,b,p]),f=o.useMemo((()=>b?{onClick:b,onkeyDown:b,role:"button",tabIndex:-1}:{}),[b]);return React.createElement("span",e.extends({},g,f,{className:"".concat(t.default["icon-base"]," icon-base ").concat(d),style:y}),!r&&h&&h)}));n.displayName="IconBase",exports.IconBase=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),o=require("react"),t=require("./icon.module.scss.js"),n=require("./unifyIconUrl.js");const r=o.memo((r=>{let{iconUrl:i,minWidth:c,minHeight:s,size:l,fontSize:a,width:u,height:m,color:d="currentColor",className:h="",children:p,style:b,onClick:f,...y}=r;const g=i&&n.unifyIconUrl(i),I=o.useMemo((()=>({"--min-width":c||l||u||"auto","--min-height":s||l||m||"auto","--width":l||u||"1rem","--height":l||m||"1rem",...a?{fontSize:a}:{},...g?{"--icon-url":"url(".concat(g,")")}:{},...g?{"--icon-color":d}:{"--icon-content-color":d},...f?{cursor:"pointer"}:{},...b})),[c,l,u,s,m,a,g,d,f,b]),j=o.useMemo((()=>f?{onClick:f,role:"button",tabIndex:-1}:{}),[f]);return React.createElement("span",e.extends({},y,j,{className:"".concat(t.default["icon-base"]," icon-base ").concat(h),style:I}),!g&&p&&p)}));r.displayName="IconBase",exports.IconBase=r;
2
2
  //# sourceMappingURL=IconBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.js","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent } from 'react'\n\nimport classes from './icon.module.scss'\n\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\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 style?: CSSProperties\n onClick?: (event?: MouseEvent<HTMLSpanElement> | undefined) => void\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, onClick, ...props\n}: IconBaseType) => {\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onkeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!iconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick","props","styles","useMemo","concat","cursor","onClickProps","onkeyDown","role","tabIndex","React","createElement","_extends","classes","displayName"],"mappings":"sMAoBaA,EAA6BC,EAAIA,MAAeC,IAGzC,IAH0CC,QAC5DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,KAAYC,GACjFb,EACb,MAAMc,EAASC,EAAAA,SAAQ,KACrB,CACE,cAAeb,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,MAC1BJ,EAAU,CAAE,aAAY,OAAAe,OAASf,EAAO,MAAQ,MAChDA,EAAU,CAAE,eAAgBO,GAAU,CAAE,uBAAwBA,MAChEI,EAAU,CAAEK,OAAQ,WAAc,MACnCN,KAEJ,CAACT,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUJ,EAASO,EAAOI,EAASD,IAE3EO,EAAeH,WAAQ,IAAOH,EAAW,CAC7CA,UACAO,UAAWP,EACXQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EAAA,QACMX,CAAAA,EAAAA,EACAK,EAAY,CAChBT,UAAS,GAAAO,OAAKS,EAAO,QAAC,aAAYT,eAAAA,OAAcP,GAChDE,MAAOG,KAEJb,GAAWS,GAAaA,EACtB,IAIXZ,EAAS4B,YAAc"}
1
+ {"version":3,"file":"IconBase.js","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent } from 'react'\n\nimport classes from './icon.module.scss'\nimport { unifyIconUrl } from './unifyIconUrl'\n\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\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 style?: CSSProperties\n onClick?: (event?: MouseEvent<HTMLSpanElement> | undefined) => void\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, onClick, ...props\n}: IconBaseType) => {\n const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl)\n\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),\n ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!unifiedIconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick","props","unifiedIconUrl","unifyIconUrl","styles","useMemo","concat","cursor","onClickProps","role","tabIndex","React","createElement","_extends","classes","displayName"],"mappings":"qOAqBaA,EAA6BC,EAAIA,MAAeC,IAGzC,IAH0CC,QAC5DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,KAAYC,GACjFb,EACb,MAAMc,EAAiBb,GAAWc,EAAYA,aAACd,GAEzCe,EAASC,EAAAA,SAAQ,KACrB,CACE,cAAef,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,MAC1BS,EAAiB,CAAE,aAAY,OAAAI,OAASJ,EAAc,MAAQ,MAC9DA,EAAiB,CAAE,eAAgBN,GAAU,CAAE,uBAAwBA,MACvEI,EAAU,CAAEO,OAAQ,WAAc,MACnCR,KAEJ,CAACT,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUS,EAAgBN,EAAOI,EAASD,IAElFS,EAAeH,WAAQ,IAAOL,EAAW,CAC7CA,UACAS,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACV,IAEX,OACEW,MAAAC,cAAA,OAAAC,EAAA,QACMZ,CAAAA,EAAAA,EACAO,EAAY,CAChBX,UAAS,GAAAS,OAAKQ,EAAO,QAAC,aAAYR,eAAAA,OAAcT,GAChDE,MAAOK,KAEJF,GAAkBJ,GAAaA,EAC7B,IAIXZ,EAAS6B,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../node_modules/core-js/modules/es.string.replace.js"),require("../../../../../node_modules/core-js/modules/es.string.replace-all.js");var e=require("ramda");exports.unifyIconUrl=l=>{if(!l||!e.is(String,l)||!l||null!=l&&l.includes(".svg")||null!=l&&l.includes("data:image/svg+xml;base64"))return l;const r=null==l?void 0:l.replaceAll("/\\s+/g"," ").replaceAll("'",'"').replaceAll("%25","%").replaceAll("%23","#").replaceAll("%3c","<").replaceAll("%3e",">").replaceAll("%20"," ").replaceAll("data:image/svg+xml,","");return"data:image/svg+xml;base64,".concat(btoa(r))};
2
+ //# sourceMappingURL=unifyIconUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unifyIconUrl.js","sources":["../../../../../../../src/core/ui/components/icon/unifyIconUrl.ts"],"sourcesContent":["import { is } from 'ramda'\n\n// fix of Vite 5 new way of handling assets\n// https://github.com/vitejs/vite/pull/2909\n// https://github.com/vitejs/vite/blob/77d5165e2f252bfecbb0eebccc6f04dc8be0c5ba/packages/vite/src/node/plugins/asset.ts#L419\nexport const unifyIconUrl = (iconUrl: string) => {\n if (!iconUrl || !is(String, iconUrl) || !iconUrl\n || iconUrl?.includes('.svg') || iconUrl?.includes('data:image/svg+xml;base64')) {\n return iconUrl\n }\n\n const unifiedIconUrl = iconUrl?.replaceAll('/\\\\s+/g', ' ')\n .replaceAll('\\'', '\"')\n .replaceAll('%25', '%')\n .replaceAll('%23', '#')\n .replaceAll('%3c', '<')\n .replaceAll('%3e', '>')\n .replaceAll('%20', ' ')\n .replaceAll('data:image/svg+xml,', '')\n\n return `data:image/svg+xml;base64,${btoa(unifiedIconUrl)}`\n}\n"],"names":["iconUrl","is","String","includes","unifiedIconUrl","replaceAll","concat","btoa"],"mappings":"4QAK6BA,IAC3B,IAAKA,IAAYC,EAAEA,GAACC,OAAQF,KAAaA,GACtCA,SAAAA,EAASG,SAAS,SAAWH,SAAAA,EAASG,SAAS,6BAChD,OAAOH,EAGT,MAAMI,EAAiBJ,aAAO,EAAPA,EAASK,WAAW,UAAW,KACnDA,WAAW,IAAM,KACjBA,WAAW,MAAO,KAClBA,WAAW,MAAO,KAClBA,WAAW,MAAO,KAClBA,WAAW,MAAO,KAClBA,WAAW,MAAO,KAClBA,WAAW,sBAAuB,IAErC,MAAA,6BAAAC,OAAoCC,KAAKH,GAAe"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./utils/style.js"),o=require("./components/container/LayoutBox.js"),r=require("./components/container/Flex.js"),t=require("./components/container/Placeholder.js"),n=require("./components/container/CollapsibleContainer.js"),s=require("./components/container/ResizableContainer.js"),i=require("./components/field/Field.js"),l=require("./components/dividers/DividerLine.js"),c=require("./components/icon/IconBase.js"),p=require("./components/icon/Icon.js"),a=require("./components/icon/IconWC.js");exports.calculateColors=e.calculateColors,exports.calculatePercColor=e.calculatePercColor,exports.convertHex=e.convertHex,exports.convertRGB=e.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return e.defaultFontSize}}),exports.pxToRem=e.pxToRem,exports.resolveStyleValue=e.resolveStyleValue,exports.setDefaultFontSize=e.setDefaultFontSize,exports.toHex=e.toHex,exports.LayoutBox=o.LayoutBox,exports.Flex=r.Flex,exports.FlexTight=r.FlexTight,exports.FlexTightStyled=r.FlexTightStyled,exports.FlexWrapper=r.FlexWrapper,exports.Placeholder=t.Placeholder,exports.CollapsibleContainer=n.CollapsibleContainer,exports.ResizableContainer=s.ResizableContainer,exports.Field=i.Field,exports.FieldWrapper=i.FieldWrapper,exports.Select=i.Select,exports.setIconColor=i.setIconColor,exports.setIconComponent=i.setIconComponent,exports.DividerHorizontal=l.DividerHorizontal,exports.DividerLine=l.DividerLine,exports.DividerVertical=l.DividerVertical,exports.IconBase=c.IconBase,exports.Icon=p.Icon,exports.VCIcon=a.VCIcon,exports.VCIconBase=a.VCIconBase;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./utils/style.js"),o=require("./components/container/LayoutBox.js"),r=require("./components/container/layoutBox.types.js"),t=require("./components/container/Flex.js"),n=require("./components/container/Placeholder.js"),s=require("./components/container/CollapsibleContainer.js"),i=require("./components/container/ResizableContainer.js"),l=require("./components/field/Field.js"),c=require("./components/dividers/DividerLine.js"),p=require("./components/icon/IconBase.js"),a=require("./components/icon/Icon.js"),x=require("./components/icon/IconWC.js");exports.calculateColors=e.calculateColors,exports.calculatePercColor=e.calculatePercColor,exports.convertHex=e.convertHex,exports.convertRGB=e.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return e.defaultFontSize}}),exports.pxToRem=e.pxToRem,exports.resolveStyleValue=e.resolveStyleValue,exports.setDefaultFontSize=e.setDefaultFontSize,exports.toHex=e.toHex,exports.LayoutBox=o.LayoutBox,exports.LayoutDirection=r.LayoutDirection,exports.Flex=t.Flex,exports.FlexTight=t.FlexTight,exports.FlexTightStyled=t.FlexTightStyled,exports.FlexWrapper=t.FlexWrapper,exports.Placeholder=n.Placeholder,exports.CollapsibleContainer=s.CollapsibleContainer,exports.ResizableContainer=i.ResizableContainer,exports.Field=l.Field,exports.FieldWrapper=l.FieldWrapper,exports.Select=l.Select,exports.setIconColor=l.setIconColor,exports.setIconComponent=l.setIconComponent,exports.DividerHorizontal=c.DividerHorizontal,exports.DividerLine=c.DividerLine,exports.DividerVertical=c.DividerVertical,exports.IconBase=p.IconBase,exports.Icon=a.Icon,exports.VCIcon=x.VCIcon,exports.VCIconBase=x.VCIconBase;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,36 @@
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
+ }
1
34
  .layoutBox-module_flexible-box__Q8zyl {
2
35
  display: flex;
3
36
  position: relative;
@@ -70,37 +103,4 @@
70
103
  left: var(--left);
71
104
  height: var(--height);
72
105
  margin: var(--margin);
73
- }
74
- .CollapsibleContainer-module_collapsible-container__u0Jmm {
75
- transform-origin: 0% 0%;
76
- opacity: 0;
77
- overflow: clip;
78
- }
79
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
80
- transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
81
- will-change: opacity, height, max-height;
82
- }
83
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
84
- height: 0;
85
- max-height: 0;
86
- opacity: 0;
87
- }
88
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
89
- height: var(--prop-value);
90
- max-height: var(--prop-value);
91
- opacity: 1;
92
- }
93
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
94
- transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
95
- will-change: opacity, width, max-width;
96
- }
97
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
98
- width: 0;
99
- max-width: 0;
100
- opacity: 0;
101
- }
102
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
103
- width: var(--prop-value);
104
- max-width: var(--prop-value);
105
- opacity: 1;
106
106
  }
@@ -1,3 +1,36 @@
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
+ }
1
34
  .layoutBox-module_flexible-box__Q8zyl {
2
35
  display: flex;
3
36
  position: relative;
@@ -70,37 +103,4 @@
70
103
  left: var(--left);
71
104
  height: var(--height);
72
105
  margin: var(--margin);
73
- }
74
- .CollapsibleContainer-module_collapsible-container__u0Jmm {
75
- transform-origin: 0% 0%;
76
- opacity: 0;
77
- overflow: clip;
78
- }
79
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
80
- transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
81
- will-change: opacity, height, max-height;
82
- }
83
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
84
- height: 0;
85
- max-height: 0;
86
- opacity: 0;
87
- }
88
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
89
- height: var(--prop-value);
90
- max-height: var(--prop-value);
91
- opacity: 1;
92
- }
93
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
94
- transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
95
- will-change: opacity, width, max-width;
96
- }
97
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
98
- width: 0;
99
- max-width: 0;
100
- opacity: 0;
101
- }
102
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
103
- width: var(--prop-value);
104
- max-width: var(--prop-value);
105
- opacity: 1;
106
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e1011/es-kit",
3
- "version": "1.0.168",
3
+ "version": "1.0.169",
4
4
  "main": "dist/lib/cjs/src/index.js",
5
5
  "module": "dist/lib/esm/src/index.js",
6
6
  "sideEffects": false,