@e1011/es-kit 1.1.26 → 1.1.30

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 (136) hide show
  1. package/dist/hooks/esm/index.css +376 -206
  2. package/dist/hooks/index.css +376 -206
  3. package/dist/lib/cjs/index.css +170 -0
  4. package/dist/lib/cjs/src/core/ui/components/atoms/icons.js.map +1 -1
  5. package/dist/lib/cjs/src/core/ui/components/atoms/tag/Tag.js +2 -0
  6. package/dist/lib/cjs/src/core/ui/components/atoms/tag/Tag.js.map +1 -0
  7. package/dist/lib/cjs/src/core/ui/components/atoms/tag/tag.module.scss.js +2 -0
  8. package/dist/lib/cjs/src/core/ui/components/atoms/tag/tag.module.scss.js.map +1 -0
  9. package/dist/lib/cjs/src/core/ui/components/atoms/tag/tag.types.js +2 -0
  10. package/dist/lib/cjs/src/core/ui/components/atoms/tag/tag.types.js.map +1 -0
  11. package/dist/lib/cjs/src/core/ui/components/atoms/text/Headline.js.map +1 -1
  12. package/dist/lib/cjs/src/core/ui/components/atoms/text/Link.js.map +1 -1
  13. package/dist/lib/cjs/src/core/ui/components/atoms/text/Paragraph.js.map +1 -1
  14. package/dist/lib/cjs/src/core/ui/components/atoms/text/Text.js.map +1 -1
  15. package/dist/lib/cjs/src/core/ui/components/atoms/textAndContent/TextAndContent.js +2 -0
  16. package/dist/lib/cjs/src/core/ui/components/atoms/textAndContent/TextAndContent.js.map +1 -0
  17. package/dist/lib/cjs/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js +2 -0
  18. package/dist/lib/cjs/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js.map +1 -0
  19. package/dist/lib/cjs/src/core/ui/components/error/propsValidationError.js +2 -0
  20. package/dist/lib/cjs/src/core/ui/components/error/propsValidationError.js.map +1 -0
  21. package/dist/lib/cjs/src/index.js +1 -1
  22. package/dist/lib/esm/index.css +170 -0
  23. package/dist/lib/esm/src/core/ui/components/atoms/icons.js.map +1 -1
  24. package/dist/lib/esm/src/core/ui/components/atoms/tag/Tag.js +2 -0
  25. package/dist/lib/esm/src/core/ui/components/atoms/tag/Tag.js.map +1 -0
  26. package/dist/lib/esm/src/core/ui/components/atoms/tag/tag.module.scss.js +2 -0
  27. package/dist/lib/esm/src/core/ui/components/atoms/tag/tag.module.scss.js.map +1 -0
  28. package/dist/lib/esm/src/core/ui/components/atoms/tag/tag.types.js +2 -0
  29. package/dist/lib/esm/src/core/ui/components/atoms/tag/tag.types.js.map +1 -0
  30. package/dist/lib/esm/src/core/ui/components/atoms/text/Headline.js.map +1 -1
  31. package/dist/lib/esm/src/core/ui/components/atoms/text/Link.js.map +1 -1
  32. package/dist/lib/esm/src/core/ui/components/atoms/text/Paragraph.js.map +1 -1
  33. package/dist/lib/esm/src/core/ui/components/atoms/text/Text.js.map +1 -1
  34. package/dist/lib/esm/src/core/ui/components/atoms/textAndContent/TextAndContent.js +2 -0
  35. package/dist/lib/esm/src/core/ui/components/atoms/textAndContent/TextAndContent.js.map +1 -0
  36. package/dist/lib/esm/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js +2 -0
  37. package/dist/lib/esm/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js.map +1 -0
  38. package/dist/lib/esm/src/core/ui/components/error/propsValidationError.js +2 -0
  39. package/dist/lib/esm/src/core/ui/components/error/propsValidationError.js.map +1 -0
  40. package/dist/lib/esm/src/index.js +1 -1
  41. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  42. package/dist/types/src/core/ui/components/atoms/button/button.stories.d.ts +1 -1
  43. package/dist/types/src/core/ui/components/atoms/button/button.stories.d.ts.map +1 -1
  44. package/dist/types/src/core/ui/components/atoms/icons.d.ts +5 -0
  45. package/dist/types/src/core/ui/components/atoms/icons.d.ts.map +1 -1
  46. package/dist/types/src/core/ui/components/atoms/index.d.ts +2 -0
  47. package/dist/types/src/core/ui/components/atoms/index.d.ts.map +1 -1
  48. package/dist/types/src/core/ui/components/atoms/tag/Tag.d.ts +10 -0
  49. package/dist/types/src/core/ui/components/atoms/tag/Tag.d.ts.map +1 -0
  50. package/dist/types/src/core/ui/components/atoms/tag/Tag.test.d.ts +5 -0
  51. package/dist/types/src/core/ui/components/atoms/tag/Tag.test.d.ts.map +1 -0
  52. package/dist/types/src/core/ui/components/atoms/tag/index.d.ts +3 -0
  53. package/dist/types/src/core/ui/components/atoms/tag/index.d.ts.map +1 -0
  54. package/dist/types/src/core/ui/components/atoms/tag/tag.stories.d.ts +6 -0
  55. package/dist/types/src/core/ui/components/atoms/tag/tag.stories.d.ts.map +1 -0
  56. package/dist/types/src/core/ui/components/atoms/tag/tag.types.d.ts +31 -0
  57. package/dist/types/src/core/ui/components/atoms/tag/tag.types.d.ts.map +1 -0
  58. package/dist/types/src/core/ui/components/atoms/text/Headline.d.ts +1 -1
  59. package/dist/types/src/core/ui/components/atoms/text/Headline.d.ts.map +1 -1
  60. package/dist/types/src/core/ui/components/atoms/text/Link.d.ts +1 -1
  61. package/dist/types/src/core/ui/components/atoms/text/Link.d.ts.map +1 -1
  62. package/dist/types/src/core/ui/components/atoms/text/Paragraph.d.ts +1 -1
  63. package/dist/types/src/core/ui/components/atoms/text/Paragraph.d.ts.map +1 -1
  64. package/dist/types/src/core/ui/components/atoms/text/Text.d.ts +2 -15
  65. package/dist/types/src/core/ui/components/atoms/text/Text.d.ts.map +1 -1
  66. package/dist/types/src/core/ui/components/atoms/text/anchor-link/anchorLink.stories.d.ts +1 -1
  67. package/dist/types/src/core/ui/components/atoms/text/anchor-link/anchorLink.stories.d.ts.map +1 -1
  68. package/dist/types/src/core/ui/components/atoms/text/anchor-link/anchorLink.types.d.ts +1 -1
  69. package/dist/types/src/core/ui/components/atoms/text/anchor-link/anchorLink.types.d.ts.map +1 -1
  70. package/dist/types/src/core/ui/components/atoms/text/text.types.d.ts +16 -0
  71. package/dist/types/src/core/ui/components/atoms/text/text.types.d.ts.map +1 -0
  72. package/dist/types/src/core/ui/components/atoms/textAndContent/TextAndContent.d.ts +17 -0
  73. package/dist/types/src/core/ui/components/atoms/textAndContent/TextAndContent.d.ts.map +1 -0
  74. package/dist/types/src/core/ui/components/atoms/textAndContent/index.d.ts +3 -0
  75. package/dist/types/src/core/ui/components/atoms/textAndContent/index.d.ts.map +1 -0
  76. package/dist/types/src/core/ui/components/atoms/textAndContent/textAndContent.stories.d.ts +8 -0
  77. package/dist/types/src/core/ui/components/atoms/textAndContent/textAndContent.stories.d.ts.map +1 -0
  78. package/dist/types/src/core/ui/components/atoms/textAndContent/textAndContent.test.d.ts +5 -0
  79. package/dist/types/src/core/ui/components/atoms/textAndContent/textAndContent.test.d.ts.map +1 -0
  80. package/dist/types/src/core/ui/components/atoms/textAndContent/textAndContent.types.d.ts +24 -0
  81. package/dist/types/src/core/ui/components/atoms/textAndContent/textAndContent.types.d.ts.map +1 -0
  82. package/dist/types/src/core/ui/components/error/errorBoundary.stories.d.ts +3 -3
  83. package/dist/types/src/core/ui/components/error/errorBoundary.stories.d.ts.map +1 -1
  84. package/dist/types/src/core/ui/components/error/propsValidationError.d.ts +4 -0
  85. package/dist/types/src/core/ui/components/error/propsValidationError.d.ts.map +1 -0
  86. package/dist/types/src/core/ui/components/molecules/popup/popup.stories.d.ts +2 -2
  87. package/dist/types/src/core/ui/components/molecules/popup/popup.stories.d.ts.map +1 -1
  88. package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.stories.d.ts +1 -1
  89. package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.stories.d.ts.map +1 -1
  90. package/dist/types/src/core/utils/appState/store/store.stories.d.ts +1 -1
  91. package/dist/types/src/core/utils/appState/store/store.stories.d.ts.map +1 -1
  92. package/dist/ui/esm/index.css +170 -0
  93. package/dist/ui/esm/src/core/hooks/useClassNames.js +2 -0
  94. package/dist/ui/esm/src/core/hooks/useClassNames.js.map +1 -0
  95. package/dist/ui/esm/src/core/ui/components/atoms/icons.js.map +1 -1
  96. package/dist/ui/esm/src/core/ui/components/atoms/tag/Tag.js +2 -0
  97. package/dist/ui/esm/src/core/ui/components/atoms/tag/Tag.js.map +1 -0
  98. package/dist/ui/esm/src/core/ui/components/atoms/tag/tag.module.scss.js +2 -0
  99. package/dist/ui/esm/src/core/ui/components/atoms/tag/tag.module.scss.js.map +1 -0
  100. package/dist/ui/esm/src/core/ui/components/atoms/tag/tag.types.js +2 -0
  101. package/dist/ui/esm/src/core/ui/components/atoms/tag/tag.types.js.map +1 -0
  102. package/dist/ui/esm/src/core/ui/components/atoms/text/Headline.js.map +1 -1
  103. package/dist/ui/esm/src/core/ui/components/atoms/text/Link.js.map +1 -1
  104. package/dist/ui/esm/src/core/ui/components/atoms/text/Paragraph.js.map +1 -1
  105. package/dist/ui/esm/src/core/ui/components/atoms/text/Text.js.map +1 -1
  106. package/dist/ui/esm/src/core/ui/components/atoms/textAndContent/TextAndContent.js +2 -0
  107. package/dist/ui/esm/src/core/ui/components/atoms/textAndContent/TextAndContent.js.map +1 -0
  108. package/dist/ui/esm/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js +2 -0
  109. package/dist/ui/esm/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js.map +1 -0
  110. package/dist/ui/esm/src/core/ui/components/error/propsValidationError.js +2 -0
  111. package/dist/ui/esm/src/core/ui/components/error/propsValidationError.js.map +1 -0
  112. package/dist/ui/esm/src/core/ui/index.js +1 -1
  113. package/dist/ui/index.css +170 -0
  114. package/dist/ui/src/core/hooks/useClassNames.js +2 -0
  115. package/dist/ui/src/core/hooks/useClassNames.js.map +1 -0
  116. package/dist/ui/src/core/ui/components/atoms/icons.js.map +1 -1
  117. package/dist/ui/src/core/ui/components/atoms/tag/Tag.js +2 -0
  118. package/dist/ui/src/core/ui/components/atoms/tag/Tag.js.map +1 -0
  119. package/dist/ui/src/core/ui/components/atoms/tag/tag.module.scss.js +2 -0
  120. package/dist/ui/src/core/ui/components/atoms/tag/tag.module.scss.js.map +1 -0
  121. package/dist/ui/src/core/ui/components/atoms/tag/tag.types.js +2 -0
  122. package/dist/ui/src/core/ui/components/atoms/tag/tag.types.js.map +1 -0
  123. package/dist/ui/src/core/ui/components/atoms/text/Headline.js.map +1 -1
  124. package/dist/ui/src/core/ui/components/atoms/text/Link.js.map +1 -1
  125. package/dist/ui/src/core/ui/components/atoms/text/Paragraph.js.map +1 -1
  126. package/dist/ui/src/core/ui/components/atoms/text/Text.js.map +1 -1
  127. package/dist/ui/src/core/ui/components/atoms/textAndContent/TextAndContent.js +2 -0
  128. package/dist/ui/src/core/ui/components/atoms/textAndContent/TextAndContent.js.map +1 -0
  129. package/dist/ui/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js +2 -0
  130. package/dist/ui/src/core/ui/components/atoms/textAndContent/textAndContent.module.scss.js.map +1 -0
  131. package/dist/ui/src/core/ui/components/error/propsValidationError.js +2 -0
  132. package/dist/ui/src/core/ui/components/error/propsValidationError.js.map +1 -0
  133. package/dist/ui/src/core/ui/index.js +1 -1
  134. package/dist/utils/esm/index.css +376 -206
  135. package/dist/utils/index.css +376 -206
  136. package/package.json +19 -11
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.js","sources":["../../../../../../../../../src/core/ui/components/atoms/tag/Tag.tsx"],"sourcesContent":["import { memo, FC, useMemo, useRef, CSSProperties, useState, RefObject } from 'react'\n\nimport { TextAndIcons } from '../textAndContent/TextAndContent'\nimport { LayoutBox } from '../../container/layoutBox/LayoutBox'\nimport { useClassNames, useParseProps, useResize, WrapperSize } from '../../../../hooks'\nimport { composeId } from '../../../../utils'\nimport { Tooltip } from '../../molecules'\nimport { Text as BodyText } from '../text'\n\nimport classes from './tag.module.scss'\nimport { TagProps, TagVariant } from './tag.types'\n\n\nconst styles = {\n textWrapper: { position: 'relative' },\n textTransformedWrapperTipPlaceholder: {\n position: 'absolute',\n top: 0,\n background: 'transparent',\n zIndex: 0,\n userSelect: 'none',\n },\n}\n\n/**\n * Tag component.\n * *\n * @type {React.FC<TagProps>}\n * @returns {React.ReactElement} The Tag.\n */\nexport const Tag: FC<TagProps> = memo<TagProps>(({\n variant = TagVariant.default,\n text,\n hashtag,\n components,\n onClick,\n children,\n inTable,\n className = '',\n ...props\n}: TagProps) => {\n const TextComponent = components?.TextComponent || BodyText\n\n const classesResolved = useClassNames([\n classes.tag,\n variant && classes[variant],\n onClick && classes.clickable,\n inTable && classes['in-table'],\n className,\n ], [classes])\n\n const { dataProps, restProps } = useParseProps(props)\n const [isTruncated, setIsTruncated] = useState(false)\n\n const wrapperSizeRef = useRef<WrapperSize | null>(null)\n const tooltipTargetRef = useRef<HTMLDivElement | null>(null)\n\n const [textRef] = useResize(50, ({ width, height }: WrapperSize) => {\n const element = textRef.current\n\n if (element) {\n setIsTruncated(element.offsetWidth < element.scrollWidth)\n }\n wrapperSizeRef.current = { width, height }\n })\n\n const hasContent = useMemo(() => !!(children\n || text\n || restProps?.iconLeftUrl\n || restProps?.iconLeft\n || restProps?.iconRightUrl\n || restProps?.iconRight\n ), [children, text, restProps?.iconLeftUrl, restProps?.iconLeft, restProps?.iconRightUrl, restProps?.iconRight])\n\n const stylesTipPlaceholder = useMemo(() => (isTruncated ? ({\n ...styles.textTransformedWrapperTipPlaceholder,\n width: `${wrapperSizeRef?.current?.width}px`,\n height: `${wrapperSizeRef?.current?.height}px`,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }) : null), [isTruncated, wrapperSizeRef?.current])\n\n return (\n <>\n <LayoutBox\n id={`${(typeof props.id !== 'undefined' && props.id) || (text && composeId(text))}`}\n className={classesResolved}\n {...dataProps}\n {...restProps}\n data-testid={`${dataProps.dataTestId || dataProps['data-testid'] || props.id || (text && composeId(text))}`}\n onClick={onClick}\n >\n {hashtag && <TextComponent>#</TextComponent>}\n {hasContent\n && (\n <TextAndIcons\n className={classes.text}\n iconSize='0.8em'\n {...restProps}\n width='auto'\n >\n <div ref={textRef as RefObject<HTMLDivElement>} className='text-truncate'>\n {isTruncated && (\n <>\n <div ref={tooltipTargetRef} style={stylesTipPlaceholder as CSSProperties} />\n <span>{children || text}</span>\n </>\n )}\n {!isTruncated && (children || text)}\n </div>\n </TextAndIcons>\n )}\n </LayoutBox>\n {isTruncated && <Tooltip text={text} targetRef={tooltipTargetRef} />}\n </>\n )\n})\n\nTag.displayName = 'Tag'\n"],"names":["styles","position","top","background","zIndex","userSelect","Tag","memo","_ref","variant","TagVariant","default","text","hashtag","components","onClick","children","inTable","className","props","TextComponent","BodyText","classesResolved","useClassNames","classes","tag","clickable","dataProps","restProps","useParseProps","isTruncated","setIsTruncated","useState","wrapperSizeRef","useRef","tooltipTargetRef","textRef","useResize","_ref2","width","height","element","current","offsetWidth","scrollWidth","hasContent","useMemo","iconLeftUrl","iconLeft","iconRightUrl","iconRight","stylesTipPlaceholder","React","createElement","Fragment","LayoutBox","_extends","id","composeId","dataTestId","TextAndIcons","iconSize","ref","style","Tooltip","targetRef","displayName"],"mappings":"+sBAaA,MAAMA,EAEkC,CACpCC,SAAU,WACVC,IAAK,EACLC,WAAY,cACZC,OAAQ,EACRC,WAAY,QAUHC,EAAoBC,GAAeC,IAUhC,IAViCC,QAC/CA,EAAUC,EAAWC,QAAOC,KAC5BA,EAAIC,QACJA,EAAOC,WACPA,EAAUC,QACVA,EAAOC,SACPA,EAAQC,QACRA,EAAOC,UACPA,EAAY,MACTC,GACMX,EACT,MAAMY,EAAgBN,GAAYM,eAAiBC,EAE7CC,EAAkBC,EAAc,CACpCC,EAAQC,IACRhB,GAAWe,EAAQf,GACnBM,GAAWS,EAAQE,UACnBT,GAAWO,EAAQ,YACnBN,GACC,CAACM,KAEEG,UAAEA,EAASC,UAAEA,GAAcC,EAAcV,IACxCW,EAAaC,GAAkBC,GAAS,GAEzCC,EAAiBC,EAA2B,MAC5CC,EAAmBD,EAA8B,OAEhDE,GAAWC,EAAU,IAAIC,IAAoC,IAAnCC,MAAEA,EAAKC,OAAEA,GAAqBF,EAC7D,MAAMG,EAAUL,EAAQM,QAEpBD,GACFV,EAAeU,EAAQE,YAAcF,EAAQG,aAE/CX,EAAeS,QAAU,CAAEH,QAAOC,SAAQ,IAGtCK,EAAaC,GAAQ,OAAS9B,GAC/BJ,GACAgB,GAAWmB,aACXnB,GAAWoB,UACXpB,GAAWqB,cACXrB,GAAWsB,YACb,CAAClC,EAAUJ,EAAMgB,GAAWmB,YAAanB,GAAWoB,SAAUpB,GAAWqB,aAAcrB,GAAWsB,YAE/FC,EAAuBL,GAAQ,IAAOhB,EAAe,IACtD9B,EACHuC,MAAO,GAAGN,GAAgBS,SAASH,UACnCC,OAAQ,GAAGP,GAAgBS,SAASF,YAEjC,MAAO,CAACV,EAAaG,GAAgBS,UAE1C,OACEU,MAAAC,cAAAD,MAAAE,SACEF,KAAAA,MAAAC,cAACE,EAASC,EAAA,CACRC,GAAI,QAAwB,IAAbtC,EAAMsC,IAAsBtC,EAAMsC,IAAQ7C,GAAQ8C,EAAU9C,KAC3EM,UAAWI,GACPK,EACAC,EAAS,CACb,cAAa,GAAGD,EAAUgC,YAAchC,EAAU,gBAAkBR,EAAMsC,IAAO7C,GAAQ8C,EAAU9C,KACnGG,QAASA,IAERF,GAAWuC,MAAAC,cAACjC,EAAc,KAAA,KAC1ByB,GAEGO,MAAAC,cAACO,EAAYJ,EAAA,CACXtC,UAAWM,EAAQZ,KACnBiD,SAAS,SACLjC,EAAS,CACbW,MAAM,SAENa,MAAAC,cAAA,MAAA,CAAKS,IAAK1B,EAAsClB,UAAU,iBACvDY,GACCsB,MAAAC,cAAAD,MAAAE,SAAA,KACEF,MAAAC,cAAA,MAAA,CAAKS,IAAK3B,EAAkB4B,MAAOZ,IACnCC,MAAAC,cAAA,OAAA,KAAOrC,GAAYJ,KAGrBkB,IAAgBd,GAAYJ,MAKvCkB,GAAesB,MAAAC,cAACW,EAAO,CAACpD,KAAMA,EAAMqD,UAAW9B,IAC/C,IAIP7B,EAAI4D,YAAc"}
@@ -0,0 +1,2 @@
1
+ var _={"overflow-hidden":"tag-module_overflow-hidden__wlxDI","text-truncate":"tag-module_text-truncate__xqW1-","text-nowrap":"tag-module_text-nowrap__CHhhg","text-ellipsis":"tag-module_text-ellipsis__UX32n",tag:"tag-module_tag__rGA-E",text:"tag-module_text__WpK6w","in-table":"tag-module_in-table__cWTuJ",default:"tag-module_default__6cv6k",clickable:"tag-module_clickable__W6arw",info:"tag-module_info__PMCQH","very-low":"tag-module_very-low__a6WSr",low:"tag-module_low__57msG",medium:"tag-module_medium__PtVKT",high:"tag-module_high__8ayT0",critical:"tag-module_critical__fT5Pe",information:"tag-module_information__gjuZe",success:"tag-module_success__M-mEI",alert:"tag-module_alert__1NDIs",error:"tag-module_error__fo8QB",warning:"tag-module_warning__29pni"};export{_ as default};
2
+ //# sourceMappingURL=tag.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ let r=function(r){return r.info="info",r.veryLow="very-low",r.low="low",r.medium="medium",r.high="high",r.critical="critical",r.information="information",r.success="success",r.alert="alert",r.error="error",r.warning="warning",r.default="default",r}({});export{r as TagVariant};
2
+ //# sourceMappingURL=tag.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.types.js","sources":["../../../../../../../../../src/core/ui/components/atoms/tag/tag.types.ts"],"sourcesContent":["import { PropsWithChildren, FC, MouseEvent } from 'react'\n\nimport { TextAndIconsProps } from '../textAndContent/textAndContent.types'\nimport { LayoutBoxProps } from '../../container/layoutBox/layoutBox.types'\nimport { CommonProps } from '../../../../types/CommonProps'\nimport { TextProps } from '../text/text.types'\n\n\nexport enum TagVariant {\n info = 'info',\n veryLow = 'very-low',\n low = 'low',\n medium = 'medium',\n high = 'high',\n critical = 'critical',\n information = 'information',\n success = 'success',\n alert = 'alert',\n error = 'error',\n warning = 'warning',\n default = 'default'\n}\n\nexport type TagProps = PropsWithChildren & CommonProps & TextAndIconsProps & LayoutBoxProps & {\n variant?: TagVariant\n text?: string\n hashtag?: boolean\n inTable?: boolean\n components?: {\n TextComponent?: FC<TextProps>\n }\n onClick?: (event?: MouseEvent) => void\n className?: string\n}\n"],"names":["TagVariant"],"mappings":"AAQYA,IAAAA,WAAAA,GAAU,OAAVA,EAAU,KAAA,OAAVA,EAAU,QAAA,WAAVA,EAAU,IAAA,MAAVA,EAAU,OAAA,SAAVA,EAAU,KAAA,OAAVA,EAAU,SAAA,WAAVA,EAAU,YAAA,cAAVA,EAAU,QAAA,UAAVA,EAAU,MAAA,QAAVA,EAAU,MAAA,QAAVA,EAAU,QAAA,UAAVA,EAAU,QAAA,UAAVA,CAAU,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Headline.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Headline.tsx"],"sourcesContent":["import { memo } from 'react'\n\nimport { ITextProps, Text } from './Text'\nimport classes from './typography.module.scss'\n\n\nexport const Headline = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.headline} ${className}`} element='h1'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nHeadline.displayName = 'Headline'\n\n\nexport const HeadlineSecondary = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.headlineSecondary} ${className}`} element='h2'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nHeadlineSecondary.displayName = 'HeadlineSecondary'\n\n\nexport const HeadlineTertiary = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.headlineTertiary} ${className}`} element='h3'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nHeadlineTertiary.displayName = 'HeadlineTertiary'\n"],"names":["Headline","memo","_ref","children","text","className","props","React","createElement","Text","_extends","classes","headline","element","displayName","HeadlineSecondary","_ref2","headlineSecondary","HeadlineTertiary","_ref3","headlineTertiary"],"mappings":"2LAMaA,MAAAA,EAAWC,GACtBC,IAAA,IAACC,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBJ,EAAA,OACvDK,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQC,YAAYP,IAAaQ,QAAQ,OACrEV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXJ,EAASc,YAAc,WAGVC,MAAAA,EAAoBd,GAC/Be,IAAA,IAACb,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBU,EAAA,OACvDT,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQM,qBAAqBZ,IAAaQ,QAAQ,OAC9EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXW,EAAkBD,YAAc,oBAGnBI,MAAAA,EAAmBjB,GAC9BkB,IAAA,IAAChB,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBa,EAAA,OACvDZ,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQS,oBAAoBf,IAAaQ,QAAQ,OAC7EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXc,EAAiBJ,YAAc"}
1
+ {"version":3,"file":"Headline.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Headline.tsx"],"sourcesContent":["import { memo } from 'react'\n\nimport { ITextProps } from './text.types'\nimport { Text } from './Text'\nimport classes from './typography.module.scss'\n\n\nexport const Headline = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.headline} ${className}`} element='h1'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nHeadline.displayName = 'Headline'\n\n\nexport const HeadlineSecondary = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.headlineSecondary} ${className}`} element='h2'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nHeadlineSecondary.displayName = 'HeadlineSecondary'\n\n\nexport const HeadlineTertiary = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.headlineTertiary} ${className}`} element='h3'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nHeadlineTertiary.displayName = 'HeadlineTertiary'\n"],"names":["Headline","memo","_ref","children","text","className","props","React","createElement","Text","_extends","classes","headline","element","displayName","HeadlineSecondary","_ref2","headlineSecondary","HeadlineTertiary","_ref3","headlineTertiary"],"mappings":"2LAOaA,MAAAA,EAAWC,GACtBC,IAAA,IAACC,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBJ,EAAA,OACvDK,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQC,YAAYP,IAAaQ,QAAQ,OACrEV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXJ,EAASc,YAAc,WAGVC,MAAAA,EAAoBd,GAC/Be,IAAA,IAACb,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBU,EAAA,OACvDT,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQM,qBAAqBZ,IAAaQ,QAAQ,OAC9EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXW,EAAkBD,YAAc,oBAGnBI,MAAAA,EAAmBjB,GAC9BkB,IAAA,IAAChB,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBa,EAAA,OACvDZ,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQS,oBAAoBf,IAAaQ,QAAQ,OAC7EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXc,EAAiBJ,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Link.tsx"],"sourcesContent":["import { memo } from 'react'\n\nimport { ITextProps, Text } from './Text'\nimport classes from './typography.module.scss'\n\n\nexport const Link = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.link} ${className}`} element='a'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nLink.displayName = 'Link'\n\n"],"names":["Link","memo","_ref","children","text","className","props","React","createElement","Text","_extends","classes","link","element","displayName"],"mappings":"2LAMaA,MAAAA,EAAOC,GAClBC,IAAA,IAACC,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBJ,EAAA,OACvDK,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQC,QAAQP,IAAaQ,QAAQ,MACjEV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXJ,EAAKc,YAAc"}
1
+ {"version":3,"file":"Link.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Link.tsx"],"sourcesContent":["import { memo } from 'react'\n\nimport { ITextProps } from './text.types'\nimport { Text } from './Text'\nimport classes from './typography.module.scss'\n\n\nexport const Link = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.link} ${className}`} element='a'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nLink.displayName = 'Link'\n\n"],"names":["Link","memo","_ref","children","text","className","props","React","createElement","Text","_extends","classes","link","element","displayName"],"mappings":"2LAOaA,MAAAA,EAAOC,GAClBC,IAAA,IAACC,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBJ,EAAA,OACvDK,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQC,QAAQP,IAAaQ,QAAQ,MACjEV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXJ,EAAKc,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Paragraph.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Paragraph.tsx"],"sourcesContent":["import { memo } from 'react'\n\nimport { ITextProps, Text } from './Text'\nimport classes from './typography.module.scss'\n\n\nexport const Paragraph = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraph} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraph.displayName = 'Paragraph'\n\n\nexport const ParagraphSmall = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraphSmall} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraphSmall.displayName = 'ParagraphSmall'\n\n\nexport const ParagraphBold = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraphBold} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraphBold.displayName = 'ParagraphBold'\n\n\nexport const ParagraphBoldSmall = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraphBoldSmall} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraphBoldSmall.displayName = 'ParagraphBoldSmall'\n"],"names":["Paragraph","memo","_ref","children","text","className","props","React","createElement","Text","_extends","classes","paragraph","element","displayName","ParagraphSmall","_ref2","paragraphSmall","ParagraphBold","_ref3","paragraphBold","ParagraphBoldSmall","_ref4","paragraphBoldSmall"],"mappings":"2LAMaA,MAAAA,EAAYC,GACvBC,IAAA,IAACC,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBJ,EAAA,OACvDK,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQC,aAAaP,IAAaQ,QAAQ,MACtEV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXJ,EAAUc,YAAc,YAGXC,MAAAA,EAAiBd,GAC5Be,IAAA,IAACb,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBU,EAAA,OACvDT,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQM,kBAAkBZ,IAAaQ,QAAQ,MAC3EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXW,EAAeD,YAAc,iBAGhBI,MAAAA,EAAgBjB,GAC3BkB,IAAA,IAAChB,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBa,EAAA,OACvDZ,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQS,iBAAiBf,IAAaQ,QAAQ,MAC1EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXc,EAAcJ,YAAc,gBAGfO,MAAAA,EAAqBpB,GAChCqB,IAAA,IAACnB,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBgB,EAAA,OACvDf,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQY,sBAAsBlB,IAAaQ,QAAQ,MAC/EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXiB,EAAmBP,YAAc"}
1
+ {"version":3,"file":"Paragraph.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Paragraph.tsx"],"sourcesContent":["import { memo } from 'react'\n\nimport { ITextProps } from './text.types'\nimport { Text } from './Text'\nimport classes from './typography.module.scss'\n\n\nexport const Paragraph = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraph} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraph.displayName = 'Paragraph'\n\n\nexport const ParagraphSmall = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraphSmall} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraphSmall.displayName = 'ParagraphSmall'\n\n\nexport const ParagraphBold = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraphBold} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraphBold.displayName = 'ParagraphBold'\n\n\nexport const ParagraphBoldSmall = memo(\n ({ children, text, className = '', ...props }: ITextProps) => (\n <Text {...props} className={`${classes.paragraphBoldSmall} ${className}`} element='p'>\n {children && children}\n {(!children && text) && text}\n </Text>\n ),\n)\n\nParagraphBoldSmall.displayName = 'ParagraphBoldSmall'\n"],"names":["Paragraph","memo","_ref","children","text","className","props","React","createElement","Text","_extends","classes","paragraph","element","displayName","ParagraphSmall","_ref2","paragraphSmall","ParagraphBold","_ref3","paragraphBold","ParagraphBoldSmall","_ref4","paragraphBoldSmall"],"mappings":"2LAOaA,MAAAA,EAAYC,GACvBC,IAAA,IAACC,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBJ,EAAA,OACvDK,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQC,aAAaP,IAAaQ,QAAQ,MACtEV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXJ,EAAUc,YAAc,YAGXC,MAAAA,EAAiBd,GAC5Be,IAAA,IAACb,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBU,EAAA,OACvDT,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQM,kBAAkBZ,IAAaQ,QAAQ,MAC3EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXW,EAAeD,YAAc,iBAGhBI,MAAAA,EAAgBjB,GAC3BkB,IAAA,IAAChB,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBa,EAAA,OACvDZ,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQS,iBAAiBf,IAAaQ,QAAQ,MAC1EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXc,EAAcJ,YAAc,gBAGfO,MAAAA,EAAqBpB,GAChCqB,IAAA,IAACnB,SAAEA,EAAQC,KAAEA,EAAIC,UAAEA,EAAY,MAAOC,GAAmBgB,EAAA,OACvDf,MAAAC,cAACC,EAAIC,KAAKJ,EAAK,CAAED,UAAW,GAAGM,EAAQY,sBAAsBlB,IAAaQ,QAAQ,MAC/EV,GAAYA,GACVA,GAAYC,GAASA,EACnB,IAIXiB,EAAmBP,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Text.tsx"],"sourcesContent":["import React, { memo, PropsWithChildren, CSSProperties, FC, MouseEventHandler, useMemo } from 'react'\n\nimport { CommonProps } from '../../../types/CommonProps'\nimport { composeId } from '../../../../utils'\nimport { useParseProps } from '../../../../hooks'\n\n\nexport interface ITextProps extends PropsWithChildren, CSSProperties, CommonProps {\n element?: string | FC\n className?: string\n text?: string\n href?: string\n target?: string\n onClick?: MouseEventHandler\n disabled?: boolean\n}\n\nexport type TextProps = ITextProps & { style?: CSSProperties; 'data-testid'?: string }\n\n\nexport const Text: FC<TextProps> = memo<ITextProps>((\n { element = 'span', children, href, target, className = '', id, onClick, text, ...rest }: ITextProps,\n) => {\n const { dataProps, restProps } = useParseProps(rest)\n const textFromChildren: string | undefined = text || children?.toString()\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return React.createElement<TextProps>(\n element,\n {\n id: `${id || (textFromChildren && composeId(textFromChildren))}`,\n href,\n text,\n target,\n className,\n ...onClickProps,\n style: restProps,\n ...dataProps,\n 'data-testid':\n `${dataProps.dataTestId || dataProps['data-testid'] || id || (textFromChildren && composeId(textFromChildren))}`,\n },\n children,\n )\n})\n\nText.displayName = 'Text'\n"],"names":["Text","memo","_ref","element","children","href","target","className","id","onClick","text","rest","dataProps","restProps","useParseProps","textFromChildren","toString","onClickProps","useMemo","onKeyDown","role","tabIndex","React","createElement","composeId","style","dataTestId","displayName"],"mappings":"oLAoBaA,EAAsBC,GAAiBC,IAE/C,IADHC,QAAEA,EAAU,OAAMC,SAAEA,EAAQC,KAAEA,EAAIC,OAAEA,EAAMC,UAAEA,EAAY,GAAEC,GAAEA,EAAEC,QAAEA,EAAOC,KAAEA,KAASC,GAAkBT,EAEpG,MAAMU,UAAEA,EAASC,UAAEA,GAAcC,EAAcH,GACzCI,EAAuCL,GAAQN,GAAUY,WAEzDC,EAAeC,GAAQ,IAAOT,EAAW,CAC7CA,UACAU,UAAWV,EACXW,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACZ,IAEX,OAAOa,EAAMC,cACXpB,EACA,CACEK,GAAI,GAAGA,GAAOO,GAAoBS,EAAUT,KAC5CV,OACAK,OACAJ,SACAC,eACGU,EACHQ,MAAOZ,KACJD,EACH,cACA,GAAGA,EAAUc,YAAcd,EAAU,gBAAkBJ,GAAOO,GAAoBS,EAAUT,MAE9FX,EACD,IAGHJ,EAAK2B,YAAc"}
1
+ {"version":3,"file":"Text.js","sources":["../../../../../../../../../src/core/ui/components/atoms/text/Text.tsx"],"sourcesContent":["import React, { memo, FC, useMemo } from 'react'\n\nimport { composeId } from '../../../../utils'\nimport { useParseProps } from '../../../../hooks'\n\nimport { ITextProps, TextProps } from './text.types'\n\n\nexport const Text: FC<TextProps> = memo<ITextProps>((\n { element = 'span', children, href, target, className = '', id, onClick, text, ...rest }: ITextProps,\n) => {\n const { dataProps, restProps } = useParseProps(rest)\n const textFromChildren: string | undefined = text || children?.toString()\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return React.createElement<TextProps>(\n element,\n {\n id: `${id || (textFromChildren && composeId(textFromChildren))}`,\n href,\n text,\n target,\n className,\n ...onClickProps,\n style: restProps,\n ...dataProps,\n 'data-testid':\n `${dataProps.dataTestId || dataProps['data-testid'] || id || (textFromChildren && composeId(textFromChildren))}`,\n },\n children,\n )\n})\n\nText.displayName = 'Text'\n"],"names":["Text","memo","_ref","element","children","href","target","className","id","onClick","text","rest","dataProps","restProps","useParseProps","textFromChildren","toString","onClickProps","useMemo","onKeyDown","role","tabIndex","React","createElement","composeId","style","dataTestId","displayName"],"mappings":"oLAQaA,EAAsBC,GAAiBC,IAE/C,IADHC,QAAEA,EAAU,OAAMC,SAAEA,EAAQC,KAAEA,EAAIC,OAAEA,EAAMC,UAAEA,EAAY,GAAEC,GAAEA,EAAEC,QAAEA,EAAOC,KAAEA,KAASC,GAAkBT,EAEpG,MAAMU,UAAEA,EAASC,UAAEA,GAAcC,EAAcH,GACzCI,EAAuCL,GAAQN,GAAUY,WAEzDC,EAAeC,GAAQ,IAAOT,EAAW,CAC7CA,UACAU,UAAWV,EACXW,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACZ,IAEX,OAAOa,EAAMC,cACXpB,EACA,CACEK,GAAI,GAAGA,GAAOO,GAAoBS,EAAUT,KAC5CV,OACAK,OACAJ,SACAC,eACGU,EACHQ,MAAOZ,KACJD,EACH,cACA,GAAGA,EAAUc,YAAcd,EAAU,gBAAkBJ,GAAOO,GAAoBS,EAAUT,MAE9FX,EACD,IAGHJ,EAAK2B,YAAc"}
@@ -0,0 +1,2 @@
1
+ import{extends as t}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as e,useMemo as o}from"react";import{PropsValidationError as n}from"../../error/propsValidationError.js";import{Text as r}from"../text/Text.js";import c from"./textAndContent.module.scss.js";import{LayoutBox as i}from"../../container/layoutBox/LayoutBox.js";import{IconBase as l}from"../../icon/IconBase.js";const a=e((e=>{let{text:o,children:l,components:a,leftContent:s,rightContent:m,textProps:x={},className:p="",...d}=e;if(null==o&&!l)throw new n("Missing `text or children` property!");const f=a?.TextComponent||r;return React.createElement(i,t({className:`${c.textAndContent} ${p}`},d),s&&s,React.createElement(f,t({className:"text-truncate"},x,{"data-testid":"text-content-text-component"}),o||l),m&&m)}));a.displayName="TextAndContent";const s=e((e=>{let{iconSize:n,iconColor:r,iconLeft:c,iconRight:i,iconLeftUrl:s,iconRightUrl:m,onLeftIconClick:x,onRightIconClick:p,...d}=e;const[f,u]=o((()=>{let e,o;if(c||s){const o=x?{onClick:x,onKeyDown:x,role:"button",tabIndex:-1,"data-testid":"text-content-icon-left"}:{};e=React.createElement(l,t({iconUrl:s,size:n,color:r},o),c&&c)}if(i||m){const e=p?{onClick:p,onKeyDown:p,role:"button",tabIndex:-1,"data-testid":"text-content-icon-right"}:{};o=React.createElement(l,t({iconUrl:m,size:n,color:r},e),i&&i)}return[e,o]}),[r,c,s,i,m,n,x,p]);return React.createElement(a,t({leftContent:f,rightContent:u},d))}));s.displayName="TextAndIcons";export{a as TextAndContent,s as TextAndIcons};
2
+ //# sourceMappingURL=TextAndContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextAndContent.js","sources":["../../../../../../../../../src/core/ui/components/atoms/textAndContent/TextAndContent.tsx"],"sourcesContent":["import { memo, FC, useMemo } from 'react'\n\nimport { PropsValidationError } from '../../error/propsValidationError'\nimport { IconBase } from '../../icon'\nimport { LayoutBox } from '../../container'\nimport { Text as BodyText } from '../text/Text'\n\nimport type { TextAndContentProps, TextAndIconsProps } from './textAndContent.types'\nimport classes from './textAndContent.module.scss'\n\n\n/**\n * TextAndContent component.\n *\n * @type {React.FC<TextAndContentProps>}\n * @returns {React.ReactElement} The TextAndContent.\n */\nexport const TextAndContent: FC<TextAndContentProps> = memo<TextAndContentProps>(({\n text,\n children,\n components,\n leftContent,\n rightContent,\n textProps = {},\n className = '',\n ...props\n}: TextAndContentProps) => {\n if ((text === undefined || text === null) && !children) {\n throw new PropsValidationError('Missing `text or children` property!')\n }\n\n const TextComponent = components?.TextComponent || BodyText\n\n return (\n <LayoutBox\n className={`${classes.textAndContent} ${className}`}\n {...props}\n >\n {leftContent && leftContent}\n <TextComponent className='text-truncate' {...textProps} data-testid='text-content-text-component'>{text || children}</TextComponent>\n {rightContent && rightContent}\n </LayoutBox>\n )\n})\n\nTextAndContent.displayName = 'TextAndContent'\n\n\n/**\n * TextAndIcons component.\n *\n * @type {React.FC<TextAndIconsProps>}\n * @returns {React.ReactElement} The TextAndIcons.\n */\nexport const TextAndIcons: FC<TextAndIconsProps> = memo<TextAndIconsProps>(({\n iconSize,\n iconColor,\n iconLeft,\n iconRight,\n iconLeftUrl,\n iconRightUrl,\n onLeftIconClick,\n onRightIconClick,\n ...props\n}: TextAndIconsProps) => {\n const [leftContent, rightContent] = useMemo(() => {\n let leftContent\n let rightContent\n\n if (iconLeft || iconLeftUrl) {\n const onLeftIconClickProps = onLeftIconClick ? ({\n onClick: onLeftIconClick,\n onKeyDown: onLeftIconClick,\n role: 'button',\n tabIndex: -1,\n 'data-testid': 'text-content-icon-left',\n }) : {}\n\n leftContent = (\n <IconBase iconUrl={iconLeftUrl} size={iconSize} color={iconColor} {...onLeftIconClickProps}>\n {iconLeft && iconLeft}\n </IconBase>)\n }\n if (iconRight || iconRightUrl) {\n const onRightIconClickProps = onRightIconClick ? ({\n onClick: onRightIconClick,\n onKeyDown: onRightIconClick,\n role: 'button',\n tabIndex: -1,\n 'data-testid': 'text-content-icon-right',\n }) : {}\n\n rightContent = (\n <IconBase iconUrl={iconRightUrl} size={iconSize} color={iconColor} {...onRightIconClickProps}>\n {iconRight && iconRight}\n </IconBase>)\n }\n return [leftContent, rightContent]\n }, [iconColor, iconLeft, iconLeftUrl, iconRight, iconRightUrl, iconSize, onLeftIconClick, onRightIconClick])\n\n\n return (\n <TextAndContent\n leftContent={leftContent}\n rightContent={rightContent}\n {...props}\n />\n )\n})\n\nTextAndIcons.displayName = 'TextAndIcons'\n"],"names":["TextAndContent","memo","_ref","text","children","components","leftContent","rightContent","textProps","className","props","PropsValidationError","TextComponent","BodyText","React","createElement","LayoutBox","_extends","classes","textAndContent","displayName","TextAndIcons","_ref2","iconSize","iconColor","iconLeft","iconRight","iconLeftUrl","iconRightUrl","onLeftIconClick","onRightIconClick","useMemo","onLeftIconClickProps","onClick","onKeyDown","role","tabIndex","IconBase","iconUrl","size","color","onRightIconClickProps"],"mappings":"wZAiBaA,EAA0CC,GAA0BC,IAStD,IATuDC,KAChFA,EAAIC,SACJA,EAAQC,WACRA,EAAUC,YACVA,EAAWC,aACXA,EAAYC,UACZA,EAAY,CAAE,EAAAC,UACdA,EAAY,MACTC,GACiBR,EACpB,GAAI,MAACC,IAAyCC,EAC5C,MAAM,IAAIO,EAAqB,wCAGjC,MAAMC,EAAgBP,GAAYO,eAAiBC,EAEnD,OACEC,MAAAC,cAACC,EAASC,EAAA,CACRR,UAAW,GAAGS,EAAQC,kBAAkBV,KACpCC,GAEHJ,GAAeA,EAChBQ,MAAAC,cAACH,EAAaK,EAAA,CAACR,UAAU,iBAAoBD,EAAS,CAAE,cAAY,gCAA+BL,GAAQC,GAC1GG,GAAgBA,EACP,IAIhBP,EAAeoB,YAAc,uBAShBC,EAAsCpB,GAAwBqB,IAUlD,IAVmDC,SAC1EA,EAAQC,UACRA,EAASC,SACTA,EAAQC,UACRA,EAASC,YACTA,EAAWC,aACXA,EAAYC,gBACZA,EAAeC,iBACfA,KACGpB,GACeY,EAClB,MAAOhB,EAAaC,GAAgBwB,GAAQ,KAC1C,IAAIzB,EACAC,EAEJ,GAAIkB,GAAYE,EAAa,CAC3B,MAAMK,EAAuBH,EAAmB,CAC9CI,QAASJ,EACTK,UAAWL,EACXM,KAAM,SACNC,UAAW,EACX,cAAe,0BACZ,GAEL9B,EACEQ,MAAAC,cAACsB,EAAQpB,EAAA,CAACqB,QAASX,EAAaY,KAAMhB,EAAUiB,MAAOhB,GAAeQ,GACnEP,GAAYA,EAEnB,CACA,GAAIC,GAAaE,EAAc,CAC7B,MAAMa,EAAwBX,EAAoB,CAChDG,QAASH,EACTI,UAAWJ,EACXK,KAAM,SACNC,UAAW,EACX,cAAe,2BACZ,GAEL7B,EACEO,MAAAC,cAACsB,EAAQpB,EAAA,CAACqB,QAASV,EAAcW,KAAMhB,EAAUiB,MAAOhB,GAAeiB,GACpEf,GAAaA,EAEpB,CACA,MAAO,CAACpB,EAAaC,EAAa,GACjC,CAACiB,EAAWC,EAAUE,EAAaD,EAAWE,EAAcL,EAAUM,EAAiBC,IAG1F,OACEhB,MAAAC,cAACf,EAAciB,EAAA,CACbX,YAAaA,EACbC,aAAcA,GACVG,GACJ,IAINW,EAAaD,YAAc"}
@@ -0,0 +1,2 @@
1
+ var t={textAndContent:"textAndContent-module_textAndContent__X5P1n"};export{t as default};
2
+ //# sourceMappingURL=textAndContent.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textAndContent.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ class r extends Error{constructor(r){super(r),this.name="PropsValidationError"}}export{r as PropsValidationError};
2
+ //# sourceMappingURL=propsValidationError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propsValidationError.js","sources":["../../../../../../../../src/core/ui/components/error/propsValidationError.ts"],"sourcesContent":["export class PropsValidationError extends Error {\n constructor(message:string) {\n super(message)\n this.name = 'PropsValidationError'\n }\n}\n"],"names":["PropsValidationError","Error","constructor","message","super","this","name"],"mappings":"AAAO,MAAMA,UAA6BC,MACxCC,WAAAA,CAAYC,GACVC,MAAMD,GACNE,KAAKC,KAAO,sBACd"}
@@ -1,2 +1,2 @@
1
- export{useApi}from"./core/hooks/useApi.js";export{useToggle}from"./core/hooks/useToggle.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{getBaseThemes,observeThemePreference,setThemeClassNames,switchColorTheme,updateColorTheme,useThemePreference}from"./core/hooks/useThemePreference.js";export{useAnimation}from"./core/hooks/useAnimation.js";export{useIntersectionObserver}from"./core/hooks/useIntersectionObserver.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{AsyncFunctionTemplate,debounce,delay,isFunctionAsync,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{anchorClick,classNames,generateId,mapSerReplacer,noop,parseProps}from"./core/utils/helpers/ui.js";export{composeId,defaultSanitizeConfig,sanitizeHtml}from"./core/utils/helpers/text.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{PeregrineMQ,PeregrineMQClearError}from"./core/utils/appState/peregrineMQ/peregrineMQ.js";export{peregrineMQInstance}from"./core/utils/appState/peregrineMQ/index.js";export{TinyStateMachine,TinyStateMachineEvent,TinyStateMachineEventType,TinyStateMachineState,createStates,stateIterator}from"./core/utils/appState/stateMachine/tiny-state-machine.base.js";export{Alerts,EventName,KeyCode}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/LayoutBox.js";export{LayoutDirection}from"./core/ui/components/container/layoutBox/layoutBox.types.js";export{LazyComponent,PendingBoundary,createLazyModule,createLazyModuleWithStore,wrapPromise}from"./core/ui/components/container/lazyComponent/LazyComponent.js";export{CollapsibleContainer}from"./core/ui/components/container/CollapsibleContainer.js";export{ResizableContainer}from"./core/ui/components/container/ResizableContainer.js";export{DefaultErrorComponent,ErrorBoundary}from"./core/ui/components/error/ErrorBoundary.js";export{Field,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{ESIcon,ESIconBase}from"./core/ui/components/icon/IconWC.js";export{Button,keys}from"./core/ui/components/atoms/button/Button.js";export{Text}from"./core/ui/components/atoms/text/Text.js";export{Headline,HeadlineSecondary,HeadlineTertiary}from"./core/ui/components/atoms/text/Headline.js";export{Paragraph,ParagraphBold,ParagraphBoldSmall,ParagraphSmall}from"./core/ui/components/atoms/text/Paragraph.js";export{Link}from"./core/ui/components/atoms/text/Link.js";export{AnchorLink}from"./core/ui/components/atoms/text/anchor-link/AnchorLink.js";export{FlowLayout}from"./core/ui/components/molecules/layouts/FlowLayout.js";export{Popover}from"./core/ui/components/molecules/popover/PopoverLite.js";export{Tooltip}from"./core/ui/components/molecules/popover/Tooltip.js";export{PopoverPlacement}from"./core/ui/components/molecules/popover/popover.types.js";export{Popup}from"./core/ui/components/molecules/popup/Popup.js";export{PopupAnimateVariant}from"./core/ui/components/molecules/popup/popup.types.js";
1
+ export{useApi}from"./core/hooks/useApi.js";export{useToggle}from"./core/hooks/useToggle.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{getBaseThemes,observeThemePreference,setThemeClassNames,switchColorTheme,updateColorTheme,useThemePreference}from"./core/hooks/useThemePreference.js";export{useAnimation}from"./core/hooks/useAnimation.js";export{useIntersectionObserver}from"./core/hooks/useIntersectionObserver.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{AsyncFunctionTemplate,debounce,delay,isFunctionAsync,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{anchorClick,classNames,generateId,mapSerReplacer,noop,parseProps}from"./core/utils/helpers/ui.js";export{composeId,defaultSanitizeConfig,sanitizeHtml}from"./core/utils/helpers/text.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{PeregrineMQ,PeregrineMQClearError}from"./core/utils/appState/peregrineMQ/peregrineMQ.js";export{peregrineMQInstance}from"./core/utils/appState/peregrineMQ/index.js";export{TinyStateMachine,TinyStateMachineEvent,TinyStateMachineEventType,TinyStateMachineState,createStates,stateIterator}from"./core/utils/appState/stateMachine/tiny-state-machine.base.js";export{Alerts,EventName,KeyCode}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/LayoutBox.js";export{LayoutDirection}from"./core/ui/components/container/layoutBox/layoutBox.types.js";export{LazyComponent,PendingBoundary,createLazyModule,createLazyModuleWithStore,wrapPromise}from"./core/ui/components/container/lazyComponent/LazyComponent.js";export{CollapsibleContainer}from"./core/ui/components/container/CollapsibleContainer.js";export{ResizableContainer}from"./core/ui/components/container/ResizableContainer.js";export{DefaultErrorComponent,ErrorBoundary}from"./core/ui/components/error/ErrorBoundary.js";export{Field,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{ESIcon,ESIconBase}from"./core/ui/components/icon/IconWC.js";export{Button,keys}from"./core/ui/components/atoms/button/Button.js";export{Text}from"./core/ui/components/atoms/text/Text.js";export{Headline,HeadlineSecondary,HeadlineTertiary}from"./core/ui/components/atoms/text/Headline.js";export{Paragraph,ParagraphBold,ParagraphBoldSmall,ParagraphSmall}from"./core/ui/components/atoms/text/Paragraph.js";export{Link}from"./core/ui/components/atoms/text/Link.js";export{AnchorLink}from"./core/ui/components/atoms/text/anchor-link/AnchorLink.js";export{TextAndContent,TextAndIcons}from"./core/ui/components/atoms/textAndContent/TextAndContent.js";export{Tag}from"./core/ui/components/atoms/tag/Tag.js";export{TagVariant}from"./core/ui/components/atoms/tag/tag.types.js";export{FlowLayout}from"./core/ui/components/molecules/layouts/FlowLayout.js";export{Popover}from"./core/ui/components/molecules/popover/PopoverLite.js";export{Tooltip}from"./core/ui/components/molecules/popover/Tooltip.js";export{PopoverPlacement}from"./core/ui/components/molecules/popover/popover.types.js";export{Popup}from"./core/ui/components/molecules/popup/Popup.js";export{PopupAnimateVariant}from"./core/ui/components/molecules/popup/popup.types.js";
2
2
  //# sourceMappingURL=index.js.map