@e1011/es-kit 1.0.168 → 1.0.170

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 (123) hide show
  1. package/dist/hooks/esm/index.css +39 -39
  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 +39 -39
  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 +3 -2
  67. package/dist/types/src/core/ui/components/container/ResizableContainer.d.ts.map +1 -1
  68. package/dist/types/src/core/ui/components/container/layoutBox.types.d.ts +39 -1
  69. package/dist/types/src/core/ui/components/container/layoutBox.types.d.ts.map +1 -1
  70. package/dist/types/src/core/ui/components/dividers/DividerLine.d.ts.map +1 -1
  71. package/dist/types/src/core/ui/components/icon/IconBase.d.ts +10 -10
  72. package/dist/types/src/core/ui/components/icon/IconBase.d.ts.map +1 -1
  73. package/dist/types/src/core/ui/components/icon/unifyIconUrl.d.ts +2 -0
  74. package/dist/types/src/core/ui/components/icon/unifyIconUrl.d.ts.map +1 -0
  75. package/dist/ui/esm/node_modules/core-js/internals/is-regexp.js +2 -0
  76. package/dist/ui/esm/node_modules/core-js/internals/is-regexp.js.map +1 -0
  77. package/dist/ui/esm/node_modules/core-js/internals/regexp-get-flags.js +2 -0
  78. package/dist/ui/esm/node_modules/core-js/internals/regexp-get-flags.js.map +1 -0
  79. package/dist/ui/esm/node_modules/core-js/modules/es.string.replace-all.js +2 -0
  80. package/dist/ui/esm/node_modules/core-js/modules/es.string.replace-all.js.map +1 -0
  81. package/dist/ui/esm/src/core/hooks/useResize.js +2 -0
  82. package/dist/ui/esm/src/core/hooks/useResize.js.map +1 -0
  83. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  84. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  85. package/dist/ui/esm/src/core/ui/components/container/LayoutBox.js +1 -1
  86. package/dist/ui/esm/src/core/ui/components/container/LayoutBox.js.map +1 -1
  87. package/dist/ui/esm/src/core/ui/components/container/ResizableContainer.js +1 -1
  88. package/dist/ui/esm/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  89. package/dist/ui/esm/src/core/ui/components/container/layoutBox.types.js +2 -0
  90. package/dist/ui/esm/src/core/ui/components/container/layoutBox.types.js.map +1 -0
  91. package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js +1 -1
  92. package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  93. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js +1 -1
  94. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  95. package/dist/ui/esm/src/core/ui/components/icon/unifyIconUrl.js +2 -0
  96. package/dist/ui/esm/src/core/ui/components/icon/unifyIconUrl.js.map +1 -0
  97. package/dist/ui/esm/src/core/ui/index.js +1 -1
  98. package/dist/ui/node_modules/core-js/internals/is-regexp.js +2 -0
  99. package/dist/ui/node_modules/core-js/internals/is-regexp.js.map +1 -0
  100. package/dist/ui/node_modules/core-js/internals/regexp-get-flags.js +2 -0
  101. package/dist/ui/node_modules/core-js/internals/regexp-get-flags.js.map +1 -0
  102. package/dist/ui/node_modules/core-js/modules/es.string.replace-all.js +2 -0
  103. package/dist/ui/node_modules/core-js/modules/es.string.replace-all.js.map +1 -0
  104. package/dist/ui/src/core/hooks/useResize.js +2 -0
  105. package/dist/ui/src/core/hooks/useResize.js.map +1 -0
  106. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  107. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  108. package/dist/ui/src/core/ui/components/container/LayoutBox.js +1 -1
  109. package/dist/ui/src/core/ui/components/container/LayoutBox.js.map +1 -1
  110. package/dist/ui/src/core/ui/components/container/ResizableContainer.js +1 -1
  111. package/dist/ui/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  112. package/dist/ui/src/core/ui/components/container/layoutBox.types.js +2 -0
  113. package/dist/ui/src/core/ui/components/container/layoutBox.types.js.map +1 -0
  114. package/dist/ui/src/core/ui/components/dividers/DividerLine.js +1 -1
  115. package/dist/ui/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  116. package/dist/ui/src/core/ui/components/icon/IconBase.js +1 -1
  117. package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
  118. package/dist/ui/src/core/ui/components/icon/unifyIconUrl.js +2 -0
  119. package/dist/ui/src/core/ui/components/icon/unifyIconUrl.js.map +1 -0
  120. package/dist/ui/src/core/ui/index.js +1 -1
  121. package/dist/utils/esm/index.css +39 -39
  122. package/dist/utils/index.css +39 -39
  123. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemePreference.js","sources":["../../../../../../src/core/hooks/useThemePreference.ts"],"sourcesContent":["import { useEffect } from 'react'\n\n\nconst windowMatchMediaChangeEventType = 'change'\n\nexport const observeThemePreference = (\n getHtmlElement: () => HTMLElement = () => document.body,\n switchCallback: (isDark: boolean) => void = (isDark: boolean) => isDark,\n) => {\n const switchColorThemeHandler = (isDark: boolean) => {\n const htmlElement = getHtmlElement()\n\n switchColorTheme?.(isDark, htmlElement)\n switchCallback?.(isDark)\n }\n\n const changeDarkColorThemeHandler = (event: MediaQueryListEvent) => {\n switchColorThemeHandler(event.matches)\n }\n\n const changeLightColorThemeHandler = (event: MediaQueryListEvent) => {\n switchColorThemeHandler(!event.matches)\n }\n\n const isDark = window.matchMedia('(prefers-color-scheme: dark)')\n\n try {\n window.matchMedia('(prefers-color-scheme: dark)').removeEventListener(\n windowMatchMediaChangeEventType, changeDarkColorThemeHandler,\n )\n window.matchMedia('(prefers-color-scheme: light)').removeEventListener(\n windowMatchMediaChangeEventType, changeLightColorThemeHandler,\n )\n } catch (error) {\n console.error(`Error::observeThemePreference::removeEventListener: ${error}`)\n }\n\n switchColorThemeHandler(isDark?.matches)\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener(\n windowMatchMediaChangeEventType, changeDarkColorThemeHandler,\n )\n window.matchMedia('(prefers-color-scheme: light)').addEventListener(\n windowMatchMediaChangeEventType, changeLightColorThemeHandler,\n )\n\n return () => {\n window.matchMedia('(prefers-color-scheme: dark)').removeEventListener(\n windowMatchMediaChangeEventType, changeDarkColorThemeHandler,\n )\n window.matchMedia('(prefers-color-scheme: light)').removeEventListener(\n windowMatchMediaChangeEventType, changeLightColorThemeHandler,\n )\n }\n}\n\nexport const useThemePreference = (\n getHtmlElement: () => HTMLElement = () => document.body,\n switchCallback: (isDark: boolean) => void = (isDark: boolean) => isDark,\n) => {\n useEffect(() => observeThemePreference(getHtmlElement, switchCallback), [getHtmlElement, switchCallback])\n}\n\n\nexport const baseThemes: {\n dark: string\n light: string\n} = {\n dark: 'theme-dark',\n light: 'theme-light',\n}\n\nexport const switchColorTheme = (isDark: boolean, htmlElement?: HTMLElement, findShadows = true) => {\n const oldClass = isDark ? baseThemes.light : baseThemes.dark\n const newClass = isDark ? baseThemes.dark : baseThemes.light\n\n if (htmlElement) {\n htmlElement.classList.remove(oldClass)\n htmlElement.classList.remove(newClass)\n htmlElement.classList.add(newClass)\n }\n\n if (typeof document !== 'undefined') {\n document.querySelectorAll(`.${oldClass}`).forEach((element) => {\n element.classList.add(`.${newClass}`)\n element.classList.remove(`.${oldClass}`)\n })\n\n if (findShadows) {\n document.querySelectorAll('.shadow-div').forEach((element) => {\n element.shadowRoot?.querySelector(`.${oldClass}`)?.classList.add(newClass)\n element.shadowRoot?.querySelector(`.${oldClass}`)?.classList.remove(oldClass)\n })\n\n document.querySelectorAll('vcmf-wrapper').forEach((element) => {\n element.shadowRoot?.querySelector(`.${oldClass}`)?.classList.add(newClass)\n element.shadowRoot?.querySelector(`.${oldClass}`)?.classList.remove(oldClass)\n\n const firstChild: HTMLElement = element.shadowRoot?.childNodes[0] as HTMLElement\n\n if (firstChild) {\n firstChild.classList.add(newClass)\n firstChild.classList.remove(oldClass)\n }\n })\n }\n }\n}\n\nexport const updateColorTheme = (isDark?: boolean, htmlElement?: HTMLElement) => {\n let resolvedIsDark: boolean = isDark || false\n\n if (typeof document !== 'undefined' && isDark === undefined) {\n resolvedIsDark = document.body.classList.contains(baseThemes.dark)\n }\n switchColorTheme(resolvedIsDark, htmlElement || document.body)\n}\n"],"names":["windowMatchMediaChangeEventType","observeThemePreference","getHtmlElement","arguments","length","undefined","document","body","switchCallback","isDark","switchColorThemeHandler","htmlElement","switchColorTheme","changeDarkColorThemeHandler","event","matches","changeLightColorThemeHandler","window","matchMedia","removeEventListener","error","addEventListener","useThemePreference","useEffect","baseThemes","dark","light","findShadows","oldClass","newClass","classList","remove","add","querySelectorAll","concat","forEach","element","_element$shadowRoot","_element$shadowRoot2","shadowRoot","querySelector","_element$shadowRoot3","_element$shadowRoot4","_element$shadowRoot5","firstChild","childNodes","updateColorTheme","resolvedIsDark","contains"],"mappings":"kCAGA,MAAMA,EAAkC,SAE3BC,EAAyB,WAGjC,IAFHC,EAAiCC,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAA,GAAG,IAAMG,SAASC,KACnDC,EAAyCL,UAAAC,OAAAD,QAAAE,IAAAF,UAAAE,GAAAF,UAAIM,GAAAA,GAAoBA,EAEjE,MAAMC,EAA2BD,IAC/B,MAAME,EAAcT,IAEpBU,SAAAA,EAAmBH,EAAQE,GAC3BH,SAAAA,EAAiBC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AMG,OAAKN,GAAW,IAGtCD,IACFrB,SAAS2B,iBAAiB,eAAeE,SAASC,IAAY,IAAAC,EAAAC,EAC1C,QAAlBD,EAAAD,EAAQG,kBAAU,IAAAF,GAA+B,QAA/BA,EAAlBA,EAAoBG,cAAa,IAAAN,OAAKN,WAAW,IAAAS,GAAjDA,EAAmDP,UAAUE,IAAIH,GAC/C,QAAlBS,EAAAF,EAAQG,kBAAU,IAAAD,GAA+B,QAA/BA,EAAlBA,EAAoBE,cAAa,IAAAN,OAAKN,WAAW,IAAAU,GAAjDA,EAAmDR,UAAUC,OAAOH,EAAS,IAG/EtB,SAAS2B,iBAAiB,gBAAgBE,SAASC,IAAY,IAAAK,EAAAC,EAAAC,EAC3C,QAAlBF,EAAAL,EAAQG,kBAAU,IAAAE,GAA+B,QAA/BA,EAAlBA,EAAoBD,cAAa,IAAAN,OAAKN,WAAW,IAAAa,GAAjDA,EAAmDX,UAAUE,IAAIH,GAC/C,QAAlBa,EAAAN,EAAQG,kBAAU,IAAAG,GAA+B,QAA/BA,EAAlBA,EAAoBF,cAAa,IAAAN,OAAKN,WAAW,IAAAc,GAAjDA,EAAmDZ,UAAUC,OAAOH,GAEpE,MAAMgB,EAA4CD,QAArBA,EAAGP,EAAQG,sBAAUI,SAAlBA,EAAoBE,WAAW,GAE3DD,IACFA,EAAWd,UAAUE,IAAIH,GACzBe,EAAWd,UAAUC,OAAOH,GAC9B,KAIR,EAEakB,EAAmBA,CAACrC,EAAkBE,KACjD,IAAIoC,EAA0BtC,IAAU,EAEhB,oBAAbH,eAAuCD,IAAXI,IACrCsC,EAAiBzC,SAASC,KAAKuB,UAAUkB,SAASxB,EAAWC,OAE/Db,EAAiBmC,EAAgBpC,GAAeL,SAASC,KAAK"}
@@ -1,2 +1,2 @@
1
- import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import{memo as l,useRef as o,useState as t,useEffect as r,useLayoutEffect as s,useMemo as a}from"react";import{useParseProps as n}from"../../../hooks/useParseProps.js";import c from"./CollapsibleContainer.module.scss.js";const i={width:"scrollWidth",height:"scrollHeight"},p=l((l=>{let{collapsed:p=!1,collapseHandler:m,children:u,horizontal:d=!1,className:h="",...x}=l;const f=o(null),[g,j]=t(0),{dataProps:b,restProps:w}=n(x),P=!d;r((()=>{null==m||m(p)}),[m,p]),s((()=>{if(null!=f&&f.current){const e=P?"height":"width";setTimeout((()=>{null!=f&&f.current&&j(f.current[i[e]])}),100)}}),[f,P]);const v=a((()=>({"--prop-name":P?"height":"width","--prop-max-name":P?"max-height":"max-width","--prop-value":"".concat(g,"px"),...w})),[P,w,g]),C=a((()=>{const e=[P?c.vertical:c.horizontal];return p&&g&&null!=g&&e.push(c.collapsed),!p&&g&&null!=g&&e.push(c.expanded),e.join(" ")}),[p,g,P]);return React.createElement("div",e({className:"".concat(c["collapsible-container"]," ").concat(C," ").concat(h," "),ref:f,style:v},b),u)}));p.displayName="CollapsibleContainer";export{p as CollapsibleContainer};
1
+ import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import{memo as t,useRef as o,useState as l,useEffect as a,useLayoutEffect as r,useMemo as s}from"react";import{useParseProps as n}from"../../../hooks/useParseProps.js";import i from"./CollapsibleContainer.module.scss.js";const c={width:"scrollWidth",height:"scrollHeight"},d=t((t=>{let{collapsed:d=!1,collapseHandler:p,children:m,horizontal:u=!1,className:h="",id:x,...f}=t;const g=o(null),[j,b]=l(0),{dataProps:v,restProps:w}=n(f),P=!u;a((()=>{null==p||p(d)}),[p,d]),r((()=>{if(null!=g&&g.current){const e=P?"height":"width";setTimeout((()=>{null!=g&&g.current&&b(g.current[c[e]])}),100)}}),[g,P]);const C=s((()=>({"--prop-name":P?"height":"width","--prop-max-name":P?"max-height":"max-width","--prop-value":"".concat(j,"px"),...w})),[P,w,j]),H=s((()=>{const e=[P?i.vertical:i.horizontal];return d&&j&&null!=j&&e.push(i.collapsed),!d&&j&&null!=j&&e.push(i.expanded),e.join(" ")}),[d,j,P]);return React.createElement("div",e({id:"".concat(void 0!==x&&x||x),className:"".concat(i["collapsible-container"]," ").concat(H," ").concat(h," "),ref:g,style:C},v,{"data-testid":v.dataTestId||v["data-testid"]||x}),m)}));d.displayName="CollapsibleContainer";export{d as CollapsibleContainer};
2
2
  //# sourceMappingURL=CollapsibleContainer.js.map
@@ -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":"gYASA,MAAMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,EAAsDC,GAAKC,IAEvC,IAFwCC,UACvEA,GAAY,EAAKC,gBAAEA,EAAeC,SAAEA,EAAQC,WAAEA,GAAa,EAAKC,UAAEA,EAAY,MAAOC,GAC3DN,EAC1B,MAAMO,EAAeC,EAAuB,OACrCC,EAAaC,GAAkBC,EAAS,IAEzCC,UAAEA,EAAWC,UAAWC,GAAUC,EAAcT,GAEhDU,GAAYZ,EAElBa,GAAU,KACRf,SAAAA,EAAkBD,EAAU,GAC3B,CAACC,EAAiBD,IAErBiB,GAAgB,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,GAAQ,KAAO,CAC/C,cAAeP,EAAW,SAAW,QACrC,kBAAmBA,EAAW,aAAe,YAC7C,eAAcQ,GAAAA,OAAKf,EAAe,SAC/BK,KACgB,CAACE,EAAUF,EAAOL,IAEjCgB,EAAaF,GAAQ,KACzB,MAAME,EAAa,CAACT,EAAWU,EAAQV,SAAWU,EAAQtB,YAQ1D,OANIH,GAAaQ,GAAbR,MAA4BQ,GAC9BgB,EAAWE,KAAKD,EAAQzB,YAErBA,GAAaQ,GAAd,MAA6BA,GAC/BgB,EAAWE,KAAKD,EAAQE,UAEnBH,EAAWI,KAAK,IAAI,GAC1B,CAAC5B,EAAWQ,EAAaO,IAE5B,OACEc,MAAAC,cAAA,MAAAC,EAAA,CACE3B,UAASmB,GAAAA,OAAKE,EAAQ,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","create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AK1B,EACLO,MAAOQ,GACHV,EAAS,CACb,cAAaA,EAAUsB,YAActB,EAAU,gBAAkBP,IAEhEH,EACG,IAIVL,EAAqBsC,YAAc"}
@@ -1,2 +1,2 @@
1
- import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as t,forwardRef as o,useMemo as s}from"react";import{useParseProps as a}from"../../../hooks/useParseProps.js";import r from"./layoutBox.module.scss.js";const l={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},n=e=>e&&l[e]||e,i=o(((t,o)=>{let{style:l,children:i,tabIndex:c,className:d="",onClick:f,...x}=t;const{dataProps:m,restProps:u}=a(x),p=s((()=>f?{onClick:f,onKeyDown:f,role:"button",tabIndex:-1}:{}),[f]),y=s((()=>({...u,...u.align?{alignItems:n(u.align)}:{},...u.justify?{justifyContent:n(u.justify)}:{},...u.direction?{flexDirection:u.direction}:{},...l})),[u,l]);return React.createElement("div",e({ref:o,tabIndex:c,className:"".concat(r["flexible-box"]," ").concat(d),style:y},m,p),i)}));i.displayName="LayoutBoxRefForwarded";const c=t(i);c.displayName="LayoutBox";export{c as LayoutBox};
1
+ import{extends as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as e,forwardRef as o,useMemo as a}from"react";import{useParseProps as s}from"../../../hooks/useParseProps.js";import{LayoutDirection as l}from"./layoutBox.types.js";import r from"./layoutBox.module.scss.js";const n={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},i=t=>t&&n[t]||t,d=o(((e,o)=>{let{id:n,style:d,children:c,tabIndex:f,className:m="",onClick:x,column:u,...p}=e;const{dataProps:y,restProps:b}=s(p),j=a((()=>x?{onClick:x,onKeyDown:x,role:"button",tabIndex:-1}:{}),[x]),B=a((()=>void 0!==u&&!0===u?l.COLUMN:null),[u]),I=a((()=>({...b,...b.align?{alignItems:i(b.align)}:{},...b.justify?{justifyContent:i(b.justify)}:{},...b.direction||B?{flexDirection:b.direction||B}:{},...d})),[B,b,d]);return React.createElement("div",t({},n?{id:"".concat(n)}:{},{ref:o,tabIndex:f,className:"".concat(r["flexible-box"]," ").concat(m),style:I},y,{"data-testid":y.dataTestId||y["data-testid"]||n},j),c)}));d.displayName="LayoutBoxRefForwarded";const c=e(d);c.displayName="LayoutBox";export{c as LayoutBox};
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":"mPAQA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAGrGC,EAAwBC,GAAW,CAAAC,EAEtBC,KAA+C,IAFxBC,MACxCA,EAAKC,SAAEA,EAAQC,SAAEA,EAAQC,UAAEA,EAAY,GAAEC,QAAEA,KAAYC,GACxCP,EACf,MAAMQ,UAAEA,EAASC,UAAEA,GAAcC,EAAcH,GAEzCI,EAAeC,GAAQ,IAAON,EAAW,CAC7CA,UACAO,UAAWP,EACXQ,KAAM,SACNV,UAAW,GACR,CAAG,GAAE,CAACE,IAELS,EAASH,GAAQ,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,EAAA,CACEvB,IAAKA,EACLG,SAAUA,EACVC,UAAS,GAAAoB,OAAMC,EAAgB,gBAAeD,KAAAA,OAAIpB,GAClDH,MAAOa,GACHP,EACAG,GAEHR,EACG,IAIVL,EAAsB6B,YAAc,8BAEvBC,EAAgCC,EAAqB/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":"0SAYA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAQRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAQrGC,EAAwBC,GAAW,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,EAAcH,GAMzCI,EAAeC,GAAQ,IAAOP,EAAW,CAC7CA,UACAQ,UAAWR,EACXS,KAAM,SACNX,UAAW,GACR,CAAG,GAAE,CAACE,IAMLU,EAAiBH,GAAQ,SAClBI,IAAXV,IAAmC,IAAXA,EACtBW,EAAgBC,OAChB,MAAO,CAACZ,IAMNa,EAASP,GAAQ,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,EAAA,CAAA,EACO5B,EAAK,CAAEA,GAAE,GAAA6B,OAAK7B,IAAS,GAAE,CAC9BD,IAAKA,EACLI,SAAUA,EACVC,UAAS,GAAAyB,OAAMC,EAAgB,gBAAeD,KAAAA,OAAIzB,GAClDH,MAAOkB,GACHX,EAAS,CACb,cAAaA,EAAUuB,YAAcvB,EAAU,gBAAkBR,GAC7DW,GAEHT,EACG,IAIVN,EAAsBoC,YAAc,8BAMvBC,EAAgCC,EAAqBtC,GAElEqC,EAAUD,YAAc"}
@@ -1,2 +1,2 @@
1
- import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import{memo as t,useRef as i,useState as n,useMemo as l,useLayoutEffect as o}from"react";import r from"../../../../../node_modules/lodash-es/debounce.js";import{LayoutBox as d}from"./LayoutBox.js";const h={main:{position:"absolute",zIndex:111,left:0,pointerEvents:"none"},empty:{pointerEvents:"none"}},c=t((t=>{let{children:c,debounceDelay:u=250,...a}=t;const s=i(),v=i({width:0,height:0}),[m,g]=n({width:void 0,height:void 0}),p=l((()=>r((e=>{var t,i,n,l;const o=e[0].contentRect.width,r=e[0].contentRect.height;(null===(t=v.current)||void 0===t?void 0:t.width)===o&&(null===(i=v.current)||void 0===i?void 0:i.height)===r||(v.current={width:o,height:r},g({width:null==s||null===(n=s.current)||void 0===n?void 0:n.clientWidth,height:null==s||null===(l=s.current)||void 0===l?void 0:l.clientHeight}))}),u)),[u]);return o((()=>{let e,t;var i,n;null!=s&&s.current&&(t=null==s?void 0:s.current,e=new ResizeObserver(p),e.observe(t),g({width:null==s||null===(i=s.current)||void 0===i?void 0:i.clientWidth,height:null==s||null===(n=s.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)}}),[p,s]),React.createElement(d,e({width:"100%",height:"100%",justify:"center",align:"center",direction:"column"},a),React.createElement(d,{style:h.main,width:"100%",height:"100%",ref:s}),!c&&React.createElement(d,{width:"".concat(Math.max((null==m?void 0:m.width)||200,200)||200,"px"),height:"".concat(Math.max((null==m?void 0:m.height)||200,200)||200,"px"),style:h.empty}),c&&(null==c?void 0:c({height:"".concat((null==m?void 0:m.height)||200,"px"),width:"".concat((null==m?void 0:m.width)||200,"px"),measured:!(null==m||!m.height)})))}));c.displayName="ResizableContainer";export{c as ResizableContainer};
1
+ import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import{memo as t}from"react";import{useResize as o}from"../../../hooks/useResize.js";import{LayoutBox as i}from"./LayoutBox.js";const n={main:{position:"absolute",zIndex:1,left:0,pointerEvents:"none"},empty:{pointerEvents:"none"}},l=t((t=>{let{children:l,debounceDelay:r=250,...a}=t;const[c,s]=o(r);return React.createElement(i,e({width:"100%",height:"100%",justify:"center",align:"center",direction:"column"},a),React.createElement(i,{style:n.main,width:"100%",height:"100%",ref:c}),!l&&React.createElement(i,{width:"".concat(Math.max((null==s?void 0:s.width)||200,200)||200,"px"),height:"".concat(Math.max((null==s?void 0:s.height)||200,200)||200,"px"),style:n.empty}),l&&(null==l?void 0:l({height:"".concat((null==s?void 0:s.height)||200,"px"),width:"".concat((null==s?void 0:s.width)||200,"px"),measured:!(null==s||!s.height)})))}));l.displayName="ResizableContainer";export{l as ResizableContainer};
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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qB,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,EAASC,EAAA,CACRlC,MAAM,OACNC,OAAO,OACPkC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACNzC,GAEJmC,MAAAC,cAACC,EAAS,CACRK,MAAOtD,EAAOC,KACde,MAAM,OACNC,OAAO,OACPsC,IAAK1C,KAELH,GACFqC,MAAAC,cAACC,EAAS,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, ReactElement, FC } 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 children?: (props: ResizableContainerRenderProps) => ReactElement\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: FC<ResizableContainerProps> = 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":"mSAmBA,MAAMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,EACRC,KAAM,EACNC,cAAe,QAEjBC,MAAO,CACLD,cAAe,SAINE,EAAkDC,GAC7DC,IAA0E,IAAzEC,SAAEA,EAAQC,cAAEA,EAAgB,OAAQC,GAAgCH,EACnE,MAAOI,EAAcC,GAAiBC,EAAUJ,GAEhD,OACEK,MAAAC,cAACC,EAASC,EAAA,CACRC,MAAM,OACNC,OAAO,OACPC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACNZ,GAEJI,MAAAC,cAACC,EAAS,CACRO,MAAOzB,EAAOC,KACdmB,MAAM,OACNC,OAAO,OACPK,IAAKb,KAELH,GACFM,MAAAC,cAACC,EAAS,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
+ let n=function(n){return n.ROW="row",n.COLUMN="column",n}({});export{n as LayoutDirection};
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":"AAKYA,IAAAA,WAAAA,GAAe,OAAfA,EAAe,IAAA,MAAfA,EAAe,OAAA,SAAfA,CAAe,EAAA"}
@@ -1,2 +1,2 @@
1
- import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as t,useMemo as i}from"react";import a from"./divider.module.scss.js";const l=t((e=>{let{orientation:t,vertical:l,color:r="#999999",opacity:o,length:c="80%",left:n="0",width:s="1px",height:m="1px",margin:d,className:p=""}=e;const h=i((()=>"vertical"===t||!0===l),[t,l]),v=i((()=>({"--width":s,"--height":m,"--length":c,"--opacity":o,"--color":r,"--left":n,"--margin":d||(h?"auto 0":"0 auto")})),[s,m,c,o,r,n,d,h]),g=h?a.vertical:a.horizontal;return React.createElement("div",{className:"".concat(a["divider-line"]," ").concat(g," ").concat(p),style:v})}));l.displayName="DividerLine";const r=t((t=>React.createElement(l,e({vertical:!0,length:"100%"},t))));r.displayName="DividerVertical";const o=t((t=>React.createElement(l,e({length:"100%"},t))));o.displayName="DividerHorizontal";export{o as DividerHorizontal,l as DividerLine,r as DividerVertical};
1
+ import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as t,useMemo as i}from"react";import a from"./divider.module.scss.js";const r=t((e=>{let{orientation:t,vertical:r,color:l="var(--divider-line)",opacity:o,length:c="80%",left:n="0",width:s="1px",height:d="1px",margin:m,className:p=""}=e;const v=i((()=>"vertical"===t||!0===r),[t,r]),h=i((()=>({"--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]),g=v?a.vertical:a.horizontal;return React.createElement("div",{className:"".concat(a["divider-line"]," ").concat(g," ").concat(p),style:h})}));r.displayName="DividerLine";const l=t((t=>React.createElement(r,e({vertical:!0,length:"100%"},t))));l.displayName="DividerVertical";const o=t((t=>React.createElement(r,e({length:"100%"},t))));o.displayName="DividerHorizontal";export{o as DividerHorizontal,r as DividerLine,l as DividerVertical};
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":"uKAmBaA,EAAgCC,GAAmBC,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,GAAQ,IAAsB,aAAhBX,IAA2C,IAAbC,GAAmB,CAACD,EAAaC,IAE1FW,EAASD,GAAQ,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,EAAQb,SAAWa,EAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAgB,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GACP,IAINf,EAAYuB,YAAc,cAEbC,MAAAA,EACTvB,GAAMwB,GAAUN,MAAAC,cAACpB,EAAW0B,EAAA,CAACtB,UAAQ,EAACG,OAAO,QAAWkB,MAC5DD,EAAgBD,YAAc,kBAEjBI,MAAAA,EACT1B,GAAMwB,GAAUN,MAAAC,cAACpB,EAAW0B,EAAA,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":"uKAkBaA,EAAgCC,GAAmBC,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,GAAQ,IAAsB,aAAhBX,IAA2C,IAAbC,GAAmB,CAACD,EAAaC,IAE1FW,EAASD,GAAQ,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,EAAQb,SAAWa,EAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAgB,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GACP,IAINf,EAAYuB,YAAc,cAEbC,MAAAA,EACTvB,GAAMwB,GAAUN,MAAAC,cAACpB,EAAW0B,EAAA,CAACtB,UAAQ,EAACG,OAAO,QAAWkB,MAC5DD,EAAgBD,YAAc,kBAEjBI,MAAAA,EACT1B,GAAMwB,GAAUN,MAAAC,cAACpB,EAAW0B,EAAA,CAACnB,OAAO,QAAWkB,MACnDE,EAAkBJ,YAAc"}
@@ -1,2 +1,2 @@
1
- import{extends as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as e,useMemo as t}from"react";import n from"./icon.module.scss.js";const i=e((e=>{let{iconUrl:i,minWidth:c,minHeight:r,size:l,fontSize:s,width:a,height:m,color:h="currentColor",className:u="",children:d,style:p,onClick:b,...f}=e;const g=t((()=>({"--min-width":c||l||a||"auto","--min-height":r||l||m||"auto","--width":l||a||"1rem","--height":l||m||"1rem",...s?{fontSize:s}:{},...i?{"--icon-url":"url(".concat(i,")")}:{},...i?{"--icon-color":h}:{"--icon-content-color":h},...b?{cursor:"pointer"}:{},...p})),[c,l,a,r,m,s,i,h,b,p]),w=t((()=>b?{onClick:b,onkeyDown:b,role:"button",tabIndex:-1}:{}),[b]);return React.createElement("span",o({},f,w,{className:"".concat(n["icon-base"]," icon-base ").concat(u),style:g}),!i&&d&&d)}));i.displayName="IconBase";export{i as IconBase};
1
+ import{extends as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as t,useMemo as e}from"react";import n from"./icon.module.scss.js";import{unifyIconUrl as i}from"./unifyIconUrl.js";const r=t((t=>{let{iconUrl:r,minWidth:c,minHeight:l,size:s,fontSize:a,width:m,height:u,color:h="currentColor",className:p="",children:d,style:f,onClick:b,...g}=t;const y=r&&i(r),j=e((()=>({"--min-width":c||s||m||"auto","--min-height":l||s||u||"auto","--width":s||m||"1rem","--height":s||u||"1rem",...a?{fontSize:a}:{},...y?{"--icon-url":"url(".concat(y,")")}:{},...y?{"--icon-color":h}:{"--icon-content-color":h},...b?{cursor:"pointer"}:{},...f})),[c,s,m,l,u,a,y,h,b,f]),w=e((()=>b?{onClick:b,role:"button",tabIndex:-1}:{}),[b]);return React.createElement("span",o({},g,w,{className:"".concat(n["icon-base"]," icon-base ").concat(p),style:j}),!y&&d&&d)}));r.displayName="IconBase";export{r as IconBase};
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":"oKAoBaA,EAA6BC,GAAmBC,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,GAAQ,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,GAAQ,IAAOH,EAAW,CAC7CA,UACAO,UAAWP,EACXQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EACMX,CAAAA,EAAAA,EACAK,EAAY,CAChBT,UAAS,GAAAO,OAAKS,EAAQ,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 | null\n minWidth?: string | null\n minHeight?: string | null\n width?: string | null\n height?: string | null\n size?: string | null\n fontSize?: string | null\n color?: string | null\n className?: string | null\n style?: CSSProperties | null\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":"qNAqBaA,EAA6BC,GAAmBC,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,EAAad,GAEzCe,EAASC,GAAQ,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,GAAQ,IAAOL,EAAW,CAC7CA,UACAS,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACV,IAEX,OACEW,MAAAC,cAAA,OAAAC,EACMZ,CAAAA,EAAAA,EACAO,EAAY,CAChBX,UAAS,GAAAS,OAAKQ,EAAQ,aAAYR,eAAAA,OAAcT,GAChDE,MAAOK,KAEJF,GAAkBJ,GAAaA,EAC7B,IAIXZ,EAAS6B,YAAc"}
@@ -0,0 +1,2 @@
1
+ import"../../../../../node_modules/core-js/modules/es.string.replace.js";import"../../../../../node_modules/core-js/modules/es.string.replace-all.js";import{is as l}from"ramda";const e=e=>{if(!e||!l(String,e)||!e||null!=e&&e.includes(".svg")||null!=e&&e.includes("data:image/svg+xml;base64"))return e;const a=null==e?void 0:e.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(a))};export{e as unifyIconUrl};
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":["unifyIconUrl","iconUrl","is","String","includes","unifiedIconUrl","replaceAll","concat","btoa"],"mappings":"iLAKaA,MAAAA,EAAgBC,IAC3B,IAAKA,IAAYC,EAAGC,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
- export{useApi}from"./core/hooks/useApi.js";export{useToggle}from"./core/hooks/useToggle.js";export{createSafeT,setUseTranslation,useTranslations}from"./core/hooks/useTranslations.js";export{outsideClickHandler,useOutsideClick}from"./core/hooks/useOutsideClick.js";export{useResize}from"./core/hooks/useResize.js";export{useClassNames}from"./core/hooks/useClassNames.js";export{useParseProps}from"./core/hooks/useParseProps.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{classNames,mapSerReplacer,noop,parseProps}from"./core/utils/helpers/ui.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{createStore}from"./core/utils/appState/store/store.vanillajs.js";export{createDataStore}from"./core/utils/appState/store/store.vanillajs.templates.js";export{useStore,useStoreApi}from"./core/utils/appState/store/useStore.react.js";export{EventName}from"./core/constants/ui.constants.js";export{calculateColors,calculatePercColor,convertHex,convertRGB,defaultFontSize,pxToRem,resolveStyleValue,setDefaultFontSize,toHex}from"./core/ui/utils/style.js";export{LayoutBox}from"./core/ui/components/container/LayoutBox.js";export{Flex,FlexTight,FlexTightStyled,FlexWrapper}from"./core/ui/components/container/Flex.js";export{Placeholder}from"./core/ui/components/container/Placeholder.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{VCIcon,VCIconBase}from"./core/ui/components/icon/IconWC.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{outsideClickHandler,useOutsideClick}from"./core/hooks/useOutsideClick.js";export{useResize}from"./core/hooks/useResize.js";export{useClassNames}from"./core/hooks/useClassNames.js";export{useParseProps}from"./core/hooks/useParseProps.js";export{baseThemes,observeThemePreference,switchColorTheme,updateColorTheme,useThemePreference}from"./core/hooks/useThemePreference.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{classNames,mapSerReplacer,noop,parseProps}from"./core/utils/helpers/ui.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{createStore}from"./core/utils/appState/store/store.vanillajs.js";export{createDataStore}from"./core/utils/appState/store/store.vanillajs.templates.js";export{useStore,useStoreApi}from"./core/utils/appState/store/useStore.react.js";export{EventName}from"./core/constants/ui.constants.js";export{calculateColors,calculatePercColor,convertHex,convertRGB,defaultFontSize,pxToRem,resolveStyleValue,setDefaultFontSize,toHex}from"./core/ui/utils/style.js";export{LayoutBox}from"./core/ui/components/container/LayoutBox.js";export{LayoutDirection}from"./core/ui/components/container/layoutBox.types.js";export{Flex,FlexTight,FlexTightStyled,FlexWrapper}from"./core/ui/components/container/Flex.js";export{Placeholder}from"./core/ui/components/container/Placeholder.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{VCIcon,VCIconBase}from"./core/ui/components/icon/IconWC.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -5,4 +5,5 @@ export * from './useOutsideClick';
5
5
  export * from './useResize';
6
6
  export * from './useClassNames';
7
7
  export * from './useParseProps';
8
+ export * from './useThemePreference';
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA"}
@@ -2,11 +2,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useRef, useState, memo, useEffect, useLayoutEffect, useMemo } from 'react';
3
3
  import { useParseProps } from '../../../hooks/useParseProps';
4
4
  import classes from './CollapsibleContainer.module.scss';
5
+ /**
6
+ * Mapping of element property names for calculating dimensions.
7
+ */
5
8
  const elementPropNameMap = {
6
9
  width: 'scrollWidth',
7
10
  height: 'scrollHeight',
8
11
  };
9
- export const CollapsibleContainer = memo(({ collapsed = false, collapseHandler, children, horizontal = false, className = '', ...props }) => {
12
+ /**
13
+ * CollapsibleContainer component.
14
+ *
15
+ * @type {React.FC<CollapsibleContainerProps>}
16
+ * @returns {React.ReactElement} The CollapsibleContainer.
17
+ */
18
+ export const CollapsibleContainer = memo(({ collapsed = false, collapseHandler, children, horizontal = false, className = '', id, ...props }) => {
10
19
  const containerRef = useRef(null);
11
20
  const [contentProp, setContentProp] = useState(0);
12
21
  const { dataProps, restProps: style } = useParseProps(props);
@@ -41,7 +50,7 @@ export const CollapsibleContainer = memo(({ collapsed = false, collapseHandler,
41
50
  }
42
51
  return classNames.join(' ');
43
52
  }, [collapsed, contentProp, vertical]);
44
- return (_jsx("div", { className: `${classes['collapsible-container']} ${classNames} ${className} `, ref: containerRef, style: styleProps, ...dataProps, children: children }));
53
+ return (_jsx("div", { id: `${(typeof id !== 'undefined' && id) || id}`, className: `${classes['collapsible-container']} ${classNames} ${className} `, ref: containerRef, style: styleProps, ...dataProps, "data-testid": dataProps.dataTestId || dataProps['data-testid'] || id, children: children }));
45
54
  });
46
55
  CollapsibleContainer.displayName = 'CollapsibleContainer';
47
56
  //# sourceMappingURL=CollapsibleContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleContainer.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/Collap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QAAQ,GACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAA"}
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,EACjC,SAAS,EAAE,eAAe,EAAE,OAAO,EAAoC,MAAM,OAAO,CAAA;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,OAAO,MAAM,oCAAoC,CAAA;AAIxD;;GAEG;AACH,MAAM,kBAAkB,GAA2B;IACjD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,cAAc;CACvB,CAAA;AAaD;;;;;GAKG;AACH,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,EAAE,EAAE,GAAG,KAAK,EACpE,EAAE,EAAE;IAC9B,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACjD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IAEjD,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;IAE5D,MAAM,QAAQ,GAAG,CAAC,UAAU,CAAA;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,eAAe,EAAE,CAAC,SAAS,CAAC,CAAA;IAC9B,CAAC,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,CAAA;IAEhC,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,YAAY,EAAE,OAAO,EAAE;YACzB,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAA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AAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAA;IAEtC,OAAO,CACL,cACE,EAAE,EAAE,GAAG,CAAC,OAAO,EAAE,KAAK,WAAW,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAChD,SAAS,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,IAAI,UAAU,IAAI,SAAS,GAAG,EAC5E,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,UAAU,KACb,SAAS,iBACA,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,YAElE,QAAQ,GACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAA"}
@@ -1,32 +1,67 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { memo, useMemo, forwardRef } from 'react';
3
3
  import { useParseProps } from '../../../hooks/useParseProps';
4
+ import { LayoutDirection } from './layoutBox.types';
4
5
  import classes from './layoutBox.module.scss';
6
+ /**
7
+ * Map of flex values for resolving flex alignment and justification.
8
+ * @type {Record<string, string>}
9
+ */
5
10
  const flexValueMap = {
6
11
  start: 'flex-start',
7
12
  'flex-start': 'flex-start',
8
13
  end: 'flex-end',
9
14
  'flex-end': 'flex-end',
10
15
  };
16
+ /**
17
+ * Resolves flex alignment and justification properties based on the provided value.
18
+ * @param {string | undefined} value - The value to resolve.
19
+ * @returns {string | undefined} - Resolved flex property value.
20
+ */
11
21
  const resolveFlexProps = (value) => (value ? (flexValueMap[value] || value) : value);
12
- const LayoutBoxRefForwarded = forwardRef(({ style, children, tabIndex, className = '', onClick, ...props }, ref) => {
22
+ /**
23
+ * Forwarded ref version of the LayoutBox component.
24
+ * @param {LayoutBoxProps} props - Props for the LayoutBox component.
25
+ * @param {LegacyRef<HTMLDivElement> | undefined} ref - Ref for accessing the underlying DOM element.
26
+ * @returns {JSX.Element} - Rendered LayoutBox component.
27
+ */
28
+ const LayoutBoxRefForwarded = forwardRef(({ id, style, children, tabIndex, className = '', onClick, column, ...props }, ref) => {
13
29
  const { dataProps, restProps } = useParseProps(props);
30
+ /**
31
+ * Memoized onClick event properties.
32
+ * @type {{ onClick?: () => void; onKeyDown?: () => void; role?: string; tabIndex?: number }}
33
+ */
14
34
  const onClickProps = useMemo(() => (onClick ? ({
15
35
  onClick,
16
36
  onKeyDown: onClick,
17
37
  role: 'button',
18
38
  tabIndex: -1,
19
39
  }) : {}), [onClick]);
40
+ /**
41
+ * Memoized resolved direction based on the column prop.
42
+ * @type {LayoutDirection}
43
+ */
44
+ const resolvedColumn = useMemo(() => ((column !== undefined && column === true)
45
+ ? LayoutDirection.COLUMN
46
+ : null), [column]);
47
+ /**
48
+ * Memoized styles combining parsed props and additional styles.
49
+ * @type {CSSProperties}
50
+ */
20
51
  const styles = useMemo(() => ({
21
52
  ...restProps,
22
53
  ...(restProps.align ? { alignItems: resolveFlexProps(restProps.align) } : {}),
23
54
  ...(restProps.justify ? { justifyContent: resolveFlexProps(restProps.justify) } : {}),
24
- ...(restProps.direction ? { flexDirection: restProps.direction } : {}),
55
+ ...(restProps.direction || resolvedColumn ? { flexDirection: restProps.direction || resolvedColumn } : {}),
25
56
  ...style,
26
- }), [restProps, style]);
27
- return (_jsx("div", { ref: ref, tabIndex: tabIndex, className: `${classes['flexible-box']} ${className}`, style: styles, ...dataProps, ...onClickProps, children: children }));
57
+ }), [resolvedColumn, restProps, style]);
58
+ return (_jsx("div", { ...(id ? { id: `${id}` } : {}), ref: ref, tabIndex: tabIndex, className: `${classes['flexible-box']} ${className}`, style: styles, ...dataProps, "data-testid": dataProps.dataTestId || dataProps['data-testid'] || id, ...onClickProps, children: children }));
28
59
  });
29
60
  LayoutBoxRefForwarded.displayName = 'LayoutBoxRefForwarded';
61
+ /**
62
+ * Memoized and memoized LayoutBox component.
63
+ * @type {FC<LayoutBoxProps>}
64
+ */
30
65
  export const LayoutBox = memo(LayoutBoxRefForwarded);
31
66
  LayoutBox.displayName = 'LayoutBox';
32
67
  //# sourceMappingURL=LayoutBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutBox.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAM,OAAO,EAAiB,UAAU,EAAa,MAAM,OAAO,CAAA;AAE/E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAG5D,OAAO,OAAO,MAAM,yBAAyB,CAAA;AAG7C,MAAM,YAAY,GAA2B;IAC3C,KAAK,EAAE,YAAY;IACnB,YAAY,EAAE,YAAY;IAC1B,GAAG,EAAE,UAAU;IACf,UAAU,EAAE,UAAU;CACvB,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AAGjH,MAAM,qBAAqB,GAAG,UAAU,CAAC,CAAC,EACxC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,KAAK,EAC7C,EAAE,GAA0C,EAAE,EAAE;IAC/D,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;IAErD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7C,OAAO;QACP,SAAS,EAAE,OAAO;QAClB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,CAAC;KACb,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEpB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAC3B;QACE,GAAG,SAAS;QACZ,GAAG,CAAC,SAAS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AAU,EAAE,gBAAgB,CAAC,SAAS,CAAC,KAAe,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvF,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,gBAAgB,CAAC,SAAS,CAAC,OAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/F,GAAG,CAAC,SAAS,CAAC,SAAS,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,SAAS,IAAI,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1G,GAAG,KAAK;KACT,CACF,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;IAEtC,OAAO,CACL,iBACM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC/B,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,GAAI,OAAe,CAAC,cAAc,CAAC,IAAI,SAAS,EAAE,EAC7D,KAAK,EAAE,MAAuB,KAC1B,SAAS,iBACA,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,KAC/D,YAAY,YAEf,QAAQ,GACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,qBAAqB,CAAC,WAAW,GAAG,uBAAuB,CAAA;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAuB,IAAI,CAAiB,qBAAqB,CAAC,CAAA;AAExF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo, useState, useRef, useMemo, useLayoutEffect } from 'react';
3
- import debounce from 'lodash-es/debounce';
2
+ import { memo } from 'react';
3
+ import { useResize } from '../../../hooks/useResize';
4
4
  import { LayoutBox } from './LayoutBox';
5
5
  const styles = {
6
6
  main: {
7
7
  position: 'absolute',
8
- zIndex: 111,
8
+ zIndex: 1,
9
9
  left: 0,
10
10
  pointerEvents: 'none',
11
11
  },
@@ -14,39 +14,7 @@ const styles = {
14
14
  },
15
15
  };
16
16
  export const ResizableContainer = memo(({ children, debounceDelay = 250, ...props }) => {
17
- const containerRef = useRef();
18
- const lastResizeWidthRef = useRef({ width: 0, height: 0 });
19
- const [containerSize, setContainerSize] = useState({ width: undefined, height: undefined });
20
- const debouncedResizeWrapper = useMemo(() => debounce((entries) => {
21
- const newResizeWidth = entries[0].contentRect.width;
22
- const newResizeHeight = entries[0].contentRect.height;
23
- if (lastResizeWidthRef.current?.width === newResizeWidth
24
- && lastResizeWidthRef.current?.height === newResizeHeight) {
25
- return;
26
- }
27
- lastResizeWidthRef.current = { width: newResizeWidth, height: newResizeHeight };
28
- setContainerSize({
29
- width: containerRef?.current?.clientWidth,
30
- height: containerRef?.current?.clientHeight,
31
- });
32
- }, debounceDelay), [debounceDelay]);
33
- useLayoutEffect(() => {
34
- let resizeObserver;
35
- let containerElement;
36
- if (containerRef?.current) {
37
- containerElement = containerRef?.current;
38
- resizeObserver = new ResizeObserver(debouncedResizeWrapper);
39
- resizeObserver.observe(containerElement);
40
- setContainerSize({
41
- width: containerRef?.current?.clientWidth,
42
- height: containerRef?.current?.clientHeight,
43
- });
44
- }
45
- return () => {
46
- resizeObserver?.unobserve?.(containerElement);
47
- };
48
- }, [debouncedResizeWrapper, containerRef]);
49
- // END RESIZING
17
+ const [containerRef, containerSize] = useResize(debounceDelay);
50
18
  return (_jsxs(LayoutBox, { width: '100%', height: '100%', justify: 'center', align: 'center', direction: 'column', ...props, children: [_jsx(LayoutBox, { style: styles.main, width: '100%', height: '100%', ref: containerRef }), !children && (_jsx(LayoutBox, { width: `${Math.max(containerSize?.width || 200, 200) || 200}px`, height: `${Math.max(containerSize?.height || 200, 200) || 200}px`, style: styles.empty })), children && children?.({
51
19
  height: `${containerSize?.height || 200}px`,
52
20
  width: `${containerSize?.width || 200}px`,
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableContainer.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAgC,MAAM,OAAO,CAAA;AACtG,OAAO,QAAQ,MAAM,oBAAoB,CAAA;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAgBvC,MAAM,MAAM,GAAG;IACb,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,MAAM;KACtB;IACD,KAAK,EAAE;QACL,aAAa,EAAE,MAAM;KACtB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CACpC,CAAC,EAAE,QAAQ,EAAE,aAAa,GAAG,GAAG,EAAE,GAAG,KAAK,EAA2B,EAAE,EAAE;IACvE,MAAM,YAAY,GAAG,MAAM,EAAkB,CAAA;IAE7C,MAAM,kBAAkB,GAAG,MAAM,CAAoC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAA;IAE7F,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GACrC,QAAQ,CAAc,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;IAEhE,MAAM,sBAAsB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE;QAChE,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAA;QACnD,MAAM,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAA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KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,GAAG,EAAE,YAAyC,GAC9C,EACD,CAAC,QAAQ,IAAI,CACd,KAAC,SAAS,IACR,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,EAC/D,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,IAAI,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,EACjE,KAAK,EAAE,MAAM,CAAC,KAAK,GACnB,CACD,EACA,QAAQ,IAAI,QAAQ,EAAE,CAAC;gBACtB,MAAM,EAAE,GAAG,aAAa,EAAE,MAAM,IAAI,GAAG,IAAI;gBAC3C,KAAK,EAAE,GAAG,aAAa,EAAE,KAAK,IAAI,GAAG,IAAI;gBACzC,QAAQ,EAAE,CAAC,CAAC,aAAa,EAAE,MAAM;aACD,CAAC,IACzB,CACb,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA"}
1
+ {"version":3,"file":"ResizableContainer.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkD,MAAM,OAAO,CAAA;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAevC,MAAM,MAAM,GAAG;IACb,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,MAAM;KACtB;IACD,KAAK,EAAE;QACL,aAAa,EAAE,MAAM;KACtB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAgC,IAAI,CACjE,CAAC,EAAE,QAAQ,EAAE,aAAa,GAAG,GAAG,EAAE,GAAG,KAAK,EAA2B,EAAE,EAAE;IACvE,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,GAAG,SAAS,CAAC,aAAa,CAAC,CAAA;IAE9D,OAAO,CACL,MAAC,SAAS,IACR,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAC,QAAQ,EACd,SAAS,EAAC,QAAQ,KACd,KAAK,aAET,KAAC,SAAS,IACR,KAAK,EAAE,MAAM,CAAC,IAAI,EAClB,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,GAAG,EAAE,YAAyC,GAC9C,EACD,CAAC,QAAQ,IAAI,CACd,KAAC,SAAS,IACR,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,EAC/D,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,IAAI,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,EACjE,KAAK,EAAE,MAAM,CAAC,KAAK,GACnB,CACD,EACA,QAAQ,IAAI,QAAQ,EAAE,CAAC;gBACtB,MAAM,EAAE,GAAG,aAAa,EAAE,MAAM,IAAI,GAAG,IAAI;gBAC3C,KAAK,EAAE,GAAG,aAAa,EAAE,KAAK,IAAI,GAAG,IAAI;gBACzC,QAAQ,EAAE,CAAC,CAAC,aAAa,EAAE,MAAM;aACD,CAAC,IACzB,CACb,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA"}
@@ -1,2 +1,9 @@
1
- export {};
1
+ /**
2
+ * Enum representing the possible layout directions.
3
+ */
4
+ export var LayoutDirection;
5
+ (function (LayoutDirection) {
6
+ LayoutDirection["ROW"] = "row";
7
+ LayoutDirection["COLUMN"] = "column";
8
+ })(LayoutDirection || (LayoutDirection = {}));
2
9
  //# sourceMappingURL=layoutBox.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"layoutBox.types.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"layoutBox.types.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"}
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /* eslint-disable react/jsx-props-no-spreading */
3
3
  import { memo, useMemo } from 'react';
4
4
  import classes from './divider.module.scss';
5
- export const DividerLine = memo(({ orientation, vertical, color = '#999999', opacity, length = '80%', left = '0', width = '1px', height = '1px', margin, className = '', }) => {
5
+ export const DividerLine = memo(({ orientation, vertical, color = 'var(--divider-line)', opacity, length = '80%', left = '0', width = '1px', height = '1px', margin, className = '', }) => {
6
6
  const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical]);
7
7
  const styles = useMemo(() => ({
8
8
  '--width': width,
@@ -1 +1 @@
1
- {"version":3,"file":"DividerLine.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAqB,OAAO,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,OAAO,MAAM,uBAAuB,CAAA;AAgB3C,MAAM,CAAC,MAAM,WAAW,GAAqB,IAAI,CAAe,CAAC,EAC/D,WAAW,EAAE,QAAQ,EACrB,KAAK,GAAG,SAAS,EACjB,OAAO,EACP,MAAM,GAAG,KAAK,EAAE,IAAI,GAAG,GAAG,EAC1B,KAAK,GAAG,KAAK,EAAE,MAAM,GAAG,KAAK,EAC7B,MAAM,EAC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,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAA;IAEtE,OAAO,CACL,cACE,SAAS,EAAE,GAAI,OAAe,CAAC,cAAc,CAAC,IAAI,WAAW,IAAI,SAAS,EAAE,EAC5E,KAAK,EAAE,MAAuB,GAC9B,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AAEvC,MAAM,CAAC,MAAM,eAAe,GACxB,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,WAAW,IAAC,QAAQ,QAAC,MAAM,EAAC,MAAM,KAAK,KAAK,GAAI,CAAC,CAAA;AACtE,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAC1B,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,WAAW,IAAC,MAAM,EAAC,MAAM,KAAK,KAAK,GAAI,CAAC,CAAA;AAC7D,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAA"}
@@ -1,25 +1,26 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import classes from './icon.module.scss';
4
+ import { unifyIconUrl } from './unifyIconUrl';
4
5
  export const IconBase = memo(({ iconUrl, minWidth, minHeight, size, fontSize, width, height, color = 'currentColor', className = '', children, style, onClick, ...props }) => {
6
+ const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl);
5
7
  const styles = useMemo(() => ({
6
8
  '--min-width': minWidth || size || width || 'auto',
7
9
  '--min-height': minHeight || size || height || 'auto',
8
10
  '--width': size || width || '1rem',
9
11
  '--height': size || height || '1rem',
10
12
  ...(fontSize ? { fontSize } : {}),
11
- ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),
12
- ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),
13
+ ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),
14
+ ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),
13
15
  ...(onClick ? { cursor: 'pointer' } : {}),
14
16
  ...style,
15
- }), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, onClick, style]);
17
+ }), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style]);
16
18
  const onClickProps = useMemo(() => (onClick ? ({
17
19
  onClick,
18
- onkeyDown: onClick,
19
20
  role: 'button',
20
21
  tabIndex: -1,
21
22
  }) : {}), [onClick]);
22
- return (_jsx("span", { ...props, ...onClickProps, className: `${classes['icon-base']} icon-base ${className}`, style: styles, children: (!iconUrl && children) && children }));
23
+ return (_jsx("span", { ...props, ...onClickProps, className: `${classes['icon-base']} icon-base ${className}`, style: styles, children: (!unifiedIconUrl && children) && children }));
23
24
  });
24
25
  IconBase.displayName = 'IconBase';
25
26
  //# sourceMappingURL=IconBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,OAAO,EAAqC,MAAM,OAAO,CAAA;AAEvF,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAkBxC,MAAM,CAAC,MAAM,QAAQ,GAAqB,IAAI,CAAe,CAAC,EAC5D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAClC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,cAAc,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,EACtF,EAAE,EAAE;IACjB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAC3B;QACE,aAAa,EAAE,QAAQ,IAAI,IAAI,IAAI,KAAK,IAAI,MAAM;QAClD,cAAc,EAAE,SAAS,IAAI,IAAI,IAAI,MAAM,IAAI,MAAM;QACrD,SAAS,EAA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