@dynatrace/strato-components 0.84.21 → 0.84.42

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 (230) hide show
  1. package/core/components/app-root/AppRoot.d.ts +9 -4
  2. package/core/components/app-root/AppRoot.js +6 -2
  3. package/core/contexts/FocusContext.d.ts +1 -1
  4. package/core/hooks/useCurrentTheme.d.ts +4 -1
  5. package/core/hooks/useFontsUpdated.d.ts +9 -0
  6. package/core/hooks/useFontsUpdated.js +51 -0
  7. package/core/hooks/useMergeRefs.d.ts +7 -0
  8. package/core/hooks/useMergeRefs.js +34 -0
  9. package/core/index.d.ts +5 -0
  10. package/core/styles/focusRing.css +88 -0
  11. package/core/styles/focusRing.sty.d.ts +96 -0
  12. package/core/styles/focusRing.sty.js +27 -0
  13. package/core/styles/useFocusRing.d.ts +49 -0
  14. package/core/styles/useFocusRing.js +83 -0
  15. package/core/types/a11y-props.d.ts +19 -0
  16. package/core/types/a11y-props.js +15 -0
  17. package/core/types/data-props.d.ts +1 -0
  18. package/core/types/dom.d.ts +19 -0
  19. package/core/types/dom.js +15 -0
  20. package/core/types/focusable-element.d.ts +5 -0
  21. package/core/types/focusable-element.js +15 -0
  22. package/core/types/heading.d.ts +9 -0
  23. package/core/types/heading.js +15 -0
  24. package/core/types/masking-props.d.ts +9 -0
  25. package/core/types/masking-props.js +15 -0
  26. package/core/types/polymorph.d.ts +25 -0
  27. package/core/types/polymorph.js +15 -0
  28. package/core/types/styling-props.d.ts +3 -2
  29. package/core/types/with-children.d.ts +4 -1
  30. package/core/utils/colorUtils.css +80 -0
  31. package/core/utils/colorUtils.sty.d.ts +48 -0
  32. package/core/utils/colorUtils.sty.js +27 -0
  33. package/esm/core/components/app-root/AppRoot.js +6 -2
  34. package/esm/core/components/app-root/AppRoot.js.map +2 -2
  35. package/esm/core/contexts/FocusContext.js.map +1 -1
  36. package/esm/core/hooks/useCurrentTheme.js.map +2 -2
  37. package/esm/core/hooks/useFontsUpdated.js +33 -0
  38. package/esm/core/hooks/useFontsUpdated.js.map +7 -0
  39. package/esm/core/hooks/useMergeRefs.js +16 -0
  40. package/esm/core/hooks/useMergeRefs.js.map +7 -0
  41. package/esm/core/index.js.map +2 -2
  42. package/esm/core/styles/focusRing.css +88 -0
  43. package/esm/core/styles/focusRing.sty.js +9 -0
  44. package/esm/core/styles/focusRing.sty.js.map +7 -0
  45. package/esm/core/styles/useFocusRing.js +69 -0
  46. package/esm/core/styles/useFocusRing.js.map +7 -0
  47. package/esm/core/types/a11y-props.js +1 -0
  48. package/esm/core/types/a11y-props.js.map +7 -0
  49. package/esm/core/types/dom.js +1 -0
  50. package/esm/core/types/dom.js.map +7 -0
  51. package/esm/core/types/focusable-element.js +1 -0
  52. package/esm/core/types/focusable-element.js.map +7 -0
  53. package/esm/core/types/heading.js +1 -0
  54. package/esm/core/types/heading.js.map +7 -0
  55. package/esm/core/types/masking-props.js +1 -0
  56. package/esm/core/types/masking-props.js.map +7 -0
  57. package/esm/core/types/polymorph.js +1 -0
  58. package/esm/core/types/polymorph.js.map +7 -0
  59. package/esm/core/utils/colorUtils.css +80 -0
  60. package/esm/core/utils/colorUtils.sty.js +9 -0
  61. package/esm/core/utils/colorUtils.sty.js.map +7 -0
  62. package/esm/index.js +2 -0
  63. package/esm/index.js.map +2 -2
  64. package/esm/layouts/Divider/Divider.css +23 -0
  65. package/esm/layouts/Divider/Divider.js +39 -0
  66. package/esm/layouts/Divider/Divider.js.map +7 -0
  67. package/esm/layouts/Divider/Divider.sty.js +8 -0
  68. package/esm/layouts/Divider/Divider.sty.js.map +7 -0
  69. package/esm/layouts/index.js +5 -0
  70. package/esm/layouts/index.js.map +7 -0
  71. package/esm/styles/textStyle.css +64 -0
  72. package/esm/styles/textStyle.sty.js +7 -0
  73. package/esm/styles/textStyle.sty.js.map +7 -0
  74. package/esm/typography/BlockQuote/Blockquote.css +17 -0
  75. package/esm/typography/BlockQuote/Blockquote.js +34 -0
  76. package/esm/typography/BlockQuote/Blockquote.js.map +7 -0
  77. package/esm/typography/BlockQuote/Blockquote.sty.js +6 -0
  78. package/esm/typography/BlockQuote/Blockquote.sty.js.map +7 -0
  79. package/esm/typography/Code/Code.css +16 -0
  80. package/esm/typography/Code/Code.js +34 -0
  81. package/esm/typography/Code/Code.js.map +7 -0
  82. package/esm/typography/Code/Code.sty.js +6 -0
  83. package/esm/typography/Code/Code.sty.js.map +7 -0
  84. package/esm/typography/Emphasis/Emphasis.css +4 -0
  85. package/esm/typography/Emphasis/Emphasis.js +34 -0
  86. package/esm/typography/Emphasis/Emphasis.js.map +7 -0
  87. package/esm/typography/Emphasis/Emphasis.sty.js +6 -0
  88. package/esm/typography/Emphasis/Emphasis.sty.js.map +7 -0
  89. package/esm/typography/ExternalLink/ExternalLink.css +28 -0
  90. package/esm/typography/ExternalLink/ExternalLink.js +56 -0
  91. package/esm/typography/ExternalLink/ExternalLink.js.map +7 -0
  92. package/esm/typography/ExternalLink/ExternalLink.sty.js +6 -0
  93. package/esm/typography/ExternalLink/ExternalLink.sty.js.map +7 -0
  94. package/esm/typography/Heading/Heading.css +54 -0
  95. package/esm/typography/Heading/Heading.js +36 -0
  96. package/esm/typography/Heading/Heading.js.map +7 -0
  97. package/esm/typography/Heading/Heading.sty.js +7 -0
  98. package/esm/typography/Heading/Heading.sty.js.map +7 -0
  99. package/esm/typography/Highlight/Highlight.css +4 -0
  100. package/esm/typography/Highlight/Highlight.js +111 -0
  101. package/esm/typography/Highlight/Highlight.js.map +7 -0
  102. package/esm/typography/Highlight/Highlight.sty.js +6 -0
  103. package/esm/typography/Highlight/Highlight.sty.js.map +7 -0
  104. package/esm/typography/Link/Link.css +15 -0
  105. package/esm/typography/Link/Link.js +49 -0
  106. package/esm/typography/Link/Link.js.map +7 -0
  107. package/esm/typography/Link/Link.sty.js +6 -0
  108. package/esm/typography/Link/Link.sty.js.map +7 -0
  109. package/esm/typography/List/List.css +16 -0
  110. package/esm/typography/List/List.js +81 -0
  111. package/esm/typography/List/List.js.map +7 -0
  112. package/esm/typography/List/List.sty.js +8 -0
  113. package/esm/typography/List/List.sty.js.map +7 -0
  114. package/esm/typography/Paragraph/Paragraph.css +19 -0
  115. package/esm/typography/Paragraph/Paragraph.js +49 -0
  116. package/esm/typography/Paragraph/Paragraph.js.map +7 -0
  117. package/esm/typography/Paragraph/Paragraph.sty.js +7 -0
  118. package/esm/typography/Paragraph/Paragraph.sty.js.map +7 -0
  119. package/esm/typography/Strikethrough/Strikethrough.css +5 -0
  120. package/esm/typography/Strikethrough/Strikethrough.js +32 -0
  121. package/esm/typography/Strikethrough/Strikethrough.js.map +7 -0
  122. package/esm/typography/Strikethrough/Strikethrough.sty.js +6 -0
  123. package/esm/typography/Strikethrough/Strikethrough.sty.js.map +7 -0
  124. package/esm/typography/Strong/Strong.css +4 -0
  125. package/esm/typography/Strong/Strong.js +34 -0
  126. package/esm/typography/Strong/Strong.js.map +7 -0
  127. package/esm/typography/Strong/Strong.sty.js +6 -0
  128. package/esm/typography/Strong/Strong.sty.js.map +7 -0
  129. package/esm/typography/Text/Text.css +18 -0
  130. package/esm/typography/Text/Text.js +43 -0
  131. package/esm/typography/Text/Text.js.map +7 -0
  132. package/esm/typography/Text/Text.sty.js +7 -0
  133. package/esm/typography/Text/Text.sty.js.map +7 -0
  134. package/esm/typography/TextEllipsis/TextEllipsis.css +22 -0
  135. package/esm/typography/TextEllipsis/TextEllipsis.js +143 -0
  136. package/esm/typography/TextEllipsis/TextEllipsis.js.map +7 -0
  137. package/esm/typography/TextEllipsis/TextEllipsis.sty.js +7 -0
  138. package/esm/typography/TextEllipsis/TextEllipsis.sty.js.map +7 -0
  139. package/esm/typography/index.js +43 -0
  140. package/esm/typography/index.js.map +7 -0
  141. package/esm/typography/utils.js +101 -0
  142. package/esm/typography/utils.js.map +7 -0
  143. package/index.d.ts +2 -0
  144. package/index.js +2 -0
  145. package/lang/en.json +6 -0
  146. package/lang/uncompiled/en.json +6 -1
  147. package/layouts/Divider/Divider.css +23 -0
  148. package/layouts/Divider/Divider.d.ts +39 -0
  149. package/layouts/Divider/Divider.js +67 -0
  150. package/layouts/Divider/Divider.sty.d.ts +16 -0
  151. package/layouts/Divider/Divider.sty.js +26 -0
  152. package/layouts/index.d.ts +2 -0
  153. package/layouts/index.js +23 -0
  154. package/package.json +17 -2
  155. package/styles/textStyle.css +64 -0
  156. package/styles/textStyle.sty.d.ts +12 -0
  157. package/styles/textStyle.sty.js +25 -0
  158. package/testing/custom-render.d.ts +1 -1
  159. package/testing/mocks/resize-observer-mock.d.ts +1 -1
  160. package/testing/mocks/text-ellipsis-mock.d.ts +1 -1
  161. package/testing/mocks/text-ellipsis-mock.js +8 -3
  162. package/typography/BlockQuote/Blockquote.css +17 -0
  163. package/typography/BlockQuote/Blockquote.d.ts +19 -0
  164. package/typography/BlockQuote/Blockquote.js +62 -0
  165. package/typography/BlockQuote/Blockquote.sty.d.ts +1 -0
  166. package/typography/BlockQuote/Blockquote.sty.js +24 -0
  167. package/typography/Code/Code.css +16 -0
  168. package/typography/Code/Code.d.ts +17 -0
  169. package/typography/Code/Code.js +62 -0
  170. package/typography/Code/Code.sty.d.ts +1 -0
  171. package/typography/Code/Code.sty.js +24 -0
  172. package/typography/Emphasis/Emphasis.css +4 -0
  173. package/typography/Emphasis/Emphasis.d.ts +14 -0
  174. package/typography/Emphasis/Emphasis.js +62 -0
  175. package/typography/Emphasis/Emphasis.sty.d.ts +1 -0
  176. package/typography/Emphasis/Emphasis.sty.js +24 -0
  177. package/typography/ExternalLink/ExternalLink.css +28 -0
  178. package/typography/ExternalLink/ExternalLink.d.ts +21 -0
  179. package/typography/ExternalLink/ExternalLink.js +82 -0
  180. package/typography/ExternalLink/ExternalLink.sty.d.ts +1 -0
  181. package/typography/ExternalLink/ExternalLink.sty.js +24 -0
  182. package/typography/Heading/Heading.css +54 -0
  183. package/typography/Heading/Heading.d.ts +24 -0
  184. package/typography/Heading/Heading.js +64 -0
  185. package/typography/Heading/Heading.sty.d.ts +52 -0
  186. package/typography/Heading/Heading.sty.js +25 -0
  187. package/typography/Highlight/Highlight.css +4 -0
  188. package/typography/Highlight/Highlight.d.ts +27 -0
  189. package/typography/Highlight/Highlight.js +139 -0
  190. package/typography/Highlight/Highlight.sty.d.ts +1 -0
  191. package/typography/Highlight/Highlight.sty.js +24 -0
  192. package/typography/Link/Link.css +15 -0
  193. package/typography/Link/Link.d.ts +17 -0
  194. package/typography/Link/Link.js +75 -0
  195. package/typography/Link/Link.sty.d.ts +1 -0
  196. package/typography/Link/Link.sty.js +24 -0
  197. package/typography/List/List.css +16 -0
  198. package/typography/List/List.d.ts +39 -0
  199. package/typography/List/List.js +109 -0
  200. package/typography/List/List.sty.d.ts +2 -0
  201. package/typography/List/List.sty.js +26 -0
  202. package/typography/Paragraph/Paragraph.css +19 -0
  203. package/typography/Paragraph/Paragraph.d.ts +19 -0
  204. package/typography/Paragraph/Paragraph.js +77 -0
  205. package/typography/Paragraph/Paragraph.sty.d.ts +16 -0
  206. package/typography/Paragraph/Paragraph.sty.js +25 -0
  207. package/typography/Strikethrough/Strikethrough.css +5 -0
  208. package/typography/Strikethrough/Strikethrough.d.ts +15 -0
  209. package/typography/Strikethrough/Strikethrough.js +60 -0
  210. package/typography/Strikethrough/Strikethrough.sty.d.ts +1 -0
  211. package/typography/Strikethrough/Strikethrough.sty.js +24 -0
  212. package/typography/Strong/Strong.css +4 -0
  213. package/typography/Strong/Strong.d.ts +14 -0
  214. package/typography/Strong/Strong.js +62 -0
  215. package/typography/Strong/Strong.sty.d.ts +1 -0
  216. package/typography/Strong/Strong.sty.js +24 -0
  217. package/typography/Text/Text.css +18 -0
  218. package/typography/Text/Text.d.ts +26 -0
  219. package/typography/Text/Text.js +71 -0
  220. package/typography/Text/Text.sty.d.ts +16 -0
  221. package/typography/Text/Text.sty.js +25 -0
  222. package/typography/TextEllipsis/TextEllipsis.css +22 -0
  223. package/typography/TextEllipsis/TextEllipsis.d.ts +32 -0
  224. package/typography/TextEllipsis/TextEllipsis.js +167 -0
  225. package/typography/TextEllipsis/TextEllipsis.sty.d.ts +15 -0
  226. package/typography/TextEllipsis/TextEllipsis.sty.js +25 -0
  227. package/typography/index.d.ts +28 -0
  228. package/typography/index.js +54 -0
  229. package/typography/utils.d.ts +52 -0
  230. package/typography/utils.js +119 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Code/Code.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\n\nimport { codeCSS } from './Code.sty.js';\nimport {\n type DataTestId,\n type StylingProps,\n type WithChildren,\n} from '../../core/index.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\n\n/**\n * The props for the Code component.\n * @public\n */\nexport interface CodeProps\n extends WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {}\n\n/**\n * @public\n * Use the `Code` component to display snippets of code inline. If you want to\n * display a block of code, use the\n * {@link https://developer.dynatrace.com/reference/design-system/preview/content/CodeSnippet/ | `CodeSnippet`}\n * component instead.\n */\nexport const Code = /* @__PURE__ */ forwardRef<HTMLElement, CodeProps>(\n (props, ref) => {\n const {\n children,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n className: consumerClassName,\n style: consumerStyle,\n ...remainingProps\n } = props;\n return (\n <code\n ref={ref}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(codeCSS, consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n {children}\n </code>\n );\n },\n);\n\n(Code as typeof Code & { displayName: string }).displayName = 'Code';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAAS,kBAAkB;AAElC,SAAS,eAAe;AAyBjB,MAAM,OAAuB;AAAA,EAClC,CAAC,OAAO,QAAQ;AACd,UAAM;AAAA,MACJ;AAAA,MACA,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,WAAW;AAAA,MACX,OAAO;AAAA,MACP,GAAG;AAAA,IACL,IAAI;AACJ,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB,WAAW,KAAK,SAAS,iBAAiB;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEC,KAA+C,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import "./Code.css";
2
+ var codeCSS = "Code_codeCSS__1lx0ryl0";
3
+ export {
4
+ codeCSS
5
+ };
6
+ //# sourceMappingURL=Code.sty.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Code/Code.css.ts"],
4
+ "sourcesContent": ["import './Code.css';\nexport var codeCSS = 'Code_codeCSS__1lx0ryl0';"],
5
+ "mappings": "AAAA,OAAO;AACA,IAAI,UAAU;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ .Emphasis_emphasisCSS__19xtnhr0 {
2
+ font-style: italic;
3
+ overflow-wrap: break-word;
4
+ }
@@ -0,0 +1,34 @@
1
+ import clsx from "clsx";
2
+ import React, { forwardRef } from "react";
3
+ import { emphasisCSS } from "./Emphasis.sty.js";
4
+ const Emphasis = /* @__PURE__ */ forwardRef(
5
+ (props, ref) => {
6
+ const {
7
+ children,
8
+ "data-testid": dataTestId,
9
+ "data-dtrum-mask": dataDtrumMask,
10
+ "data-dtrum-allow": dataDtrumAllow,
11
+ className: consumerClassName,
12
+ style: consumerStyle,
13
+ ...remainingProps
14
+ } = props;
15
+ return /* @__PURE__ */ React.createElement(
16
+ "em",
17
+ {
18
+ ref,
19
+ "data-testid": dataTestId,
20
+ "data-dtrum-mask": dataDtrumMask,
21
+ "data-dtrum-allow": dataDtrumAllow,
22
+ className: clsx(emphasisCSS, consumerClassName),
23
+ style: consumerStyle,
24
+ ...remainingProps
25
+ },
26
+ children
27
+ );
28
+ }
29
+ );
30
+ Emphasis.displayName = "Emphasis";
31
+ export {
32
+ Emphasis
33
+ };
34
+ //# sourceMappingURL=Emphasis.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Emphasis/Emphasis.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\n\nimport { emphasisCSS } from './Emphasis.sty.js';\nimport {\n type DataTestId,\n type StylingProps,\n type WithChildren,\n} from '../../core/index.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\n\n/**\n * The props for the Emphasis component.\n * @public\n */\nexport interface EmphasisProps\n extends WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {}\n\n/**\n * @public\n * The `Emphasis` component adds visual and semantic emphasis to stressed or essential content.\n */\nexport const Emphasis = /* @__PURE__ */ forwardRef<HTMLElement, EmphasisProps>(\n (props, ref) => {\n const {\n children,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n className: consumerClassName,\n style: consumerStyle,\n ...remainingProps\n } = props;\n\n return (\n <em\n ref={ref}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(emphasisCSS, consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n {children}\n </em>\n );\n },\n);\n\n(Emphasis as typeof Emphasis & { displayName: string }).displayName =\n 'Emphasis';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAAS,kBAAkB;AAElC,SAAS,mBAAmB;AAsBrB,MAAM,WAA2B;AAAA,EACtC,CAAC,OAAO,QAAQ;AACd,UAAM;AAAA,MACJ;AAAA,MACA,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,WAAW;AAAA,MACX,OAAO;AAAA,MACP,GAAG;AAAA,IACL,IAAI;AAEJ,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB,WAAW,KAAK,aAAa,iBAAiB;AAAA,QAC9C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEC,SAAuD,cACtD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import "./Emphasis.css";
2
+ var emphasisCSS = "Emphasis_emphasisCSS__19xtnhr0";
3
+ export {
4
+ emphasisCSS
5
+ };
6
+ //# sourceMappingURL=Emphasis.sty.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Emphasis/Emphasis.css.ts"],
4
+ "sourcesContent": ["import './Emphasis.css';\nexport var emphasisCSS = 'Emphasis_emphasisCSS__19xtnhr0';"],
5
+ "mappings": "AAAA,OAAO;AACA,IAAI,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,28 @@
1
+ .ExternalLink_externalLinkCSS__8noiqs0 {
2
+ display: inline-block;
3
+ color: var(--dt-colors-text-primary-default, #454cc9);
4
+ text-decoration: underline;
5
+ overflow-wrap: anywhere;
6
+ }
7
+ .ExternalLink_externalLinkCSS__8noiqs0:hover {
8
+ color: var(--dt-colors-text-primary-default-hover, #3332ae);
9
+ }
10
+ .ExternalLink_externalLinkCSS__8noiqs0:active {
11
+ color: var(--dt-colors-text-primary-default-active, #241193);
12
+ }
13
+ .ExternalLink_externalLinkCSS__8noiqs0:focus-visible {
14
+ text-decoration: none;
15
+ }
16
+ .ExternalLink_externalLinkCSS__8noiqs0 > span {
17
+ white-space: nowrap;
18
+ display: inline-flex;
19
+ }
20
+ .ExternalLink_externalLinkCSS__8noiqs0 > span > svg {
21
+ margin-left: var(--dt-spacings-size-2, 2px);
22
+ align-self: center;
23
+ min-width: var(--dt-spacings-size-20, 20px);
24
+ width: calc(20em / 14);
25
+ height: calc(20em / 14);
26
+ max-width: var(--dt-spacings-size-24, 24px);
27
+ max-height: var(--dt-spacings-size-24, 24px);
28
+ }
@@ -0,0 +1,56 @@
1
+ import clsx from "clsx";
2
+ import React, { forwardRef } from "react";
3
+ import { useIntl } from "react-intl";
4
+ import { ExternalLinkIcon } from "@dynatrace/strato-icons";
5
+ import { externalLinkCSS } from "./ExternalLink.sty.js";
6
+ import {
7
+ _mergeProps
8
+ } from "../../core/index.js";
9
+ import { useFocusRing } from "../../core/styles/useFocusRing.js";
10
+ const ExternalLink = /* @__PURE__ */ forwardRef((props, ref) => {
11
+ const {
12
+ children,
13
+ "data-testid": dataTestId,
14
+ "data-dtrum-mask": dataDtrumMask,
15
+ "data-dtrum-allow": dataDtrumAllow,
16
+ className: consumerClassName,
17
+ style: consumerStyle,
18
+ ...remainingProps
19
+ } = props;
20
+ const { focusProps, focusClassName } = useFocusRing({
21
+ variant: "primary",
22
+ isMinimal: true
23
+ });
24
+ const intl = useIntl();
25
+ return /* @__PURE__ */ React.createElement(
26
+ "a",
27
+ {
28
+ ref,
29
+ target: "_blank",
30
+ rel: "noopener noreferrer",
31
+ "data-testid": dataTestId,
32
+ "data-dtrum-mask": dataDtrumMask,
33
+ "data-dtrum-allow": dataDtrumAllow,
34
+ className: clsx(focusClassName, externalLinkCSS, consumerClassName),
35
+ style: consumerStyle,
36
+ ..._mergeProps(remainingProps, focusProps)
37
+ },
38
+ children,
39
+ /* @__PURE__ */ React.createElement("span", null, "\uFEFF", /* @__PURE__ */ React.createElement(
40
+ ExternalLinkIcon,
41
+ {
42
+ "aria-hidden": "false",
43
+ "aria-label": intl.formatMessage({
44
+ defaultMessage: "Opening the link in a new window",
45
+ id: "JzYy8MUVfPcyf4l5",
46
+ description: "External link icon that describes the external link icon"
47
+ })
48
+ }
49
+ ))
50
+ );
51
+ });
52
+ ExternalLink.displayName = "ExternalLink";
53
+ export {
54
+ ExternalLink
55
+ };
56
+ //# sourceMappingURL=ExternalLink.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/ExternalLink/ExternalLink.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef, MouseEventHandler } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { ExternalLinkIcon } from '@dynatrace/strato-icons';\n\nimport { externalLinkCSS } from './ExternalLink.sty.js';\nimport {\n type DataTestId,\n type StylingProps,\n type WithChildren,\n _mergeProps,\n} from '../../core/index.js';\nimport { useFocusRing } from '../../core/styles/useFocusRing.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\n\n/**\n * The props for the ExternalLink component.\n * @public\n */\nexport interface ExternalLinkProps\n extends WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {\n /** The href used for the link. */\n href: string;\n /** Callback handler called on click. */\n onClick?: MouseEventHandler;\n}\n\n/**\n * @public\n * Use the `ExternalLink` component to link outside of the\n * Dynatrace platform. For resources within the Dynatrace platform, use the\n * {@link https://developer.dynatrace.com/reference/design-system/preview/typography/Link/ | `Link`}\n * component instead.\n */\nexport const ExternalLink = /* @__PURE__ */ forwardRef<\n HTMLAnchorElement,\n ExternalLinkProps\n>((props, ref) => {\n const {\n children,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n className: consumerClassName,\n style: consumerStyle,\n ...remainingProps\n } = props;\n\n const { focusProps, focusClassName } = useFocusRing({\n variant: 'primary',\n isMinimal: true,\n });\n\n const intl = useIntl();\n\n return (\n <a\n ref={ref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(focusClassName, externalLinkCSS, consumerClassName)}\n style={consumerStyle}\n {..._mergeProps(remainingProps, focusProps)}\n >\n {children}\n <span>\n &#65279;\n <ExternalLinkIcon\n aria-hidden=\"false\"\n // https://www.w3.org/WAI/tutorials/images/functional/#example-3-icon-image-conveying-information-within-link-text\n aria-label={intl.formatMessage({\n defaultMessage: 'Opening the link in a new window',\n id: 'JzYy8MUVfPcyf4l5',\n description:\n 'External link icon that describes the external link icon',\n })}\n />\n </span>\n </a>\n );\n});\n\n(ExternalLink as typeof ExternalLink & { displayName: string }).displayName =\n 'ExternalLink';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAAS,kBAAqC;AACrD,SAAS,eAAe;AAExB,SAAS,wBAAwB;AAEjC,SAAS,uBAAuB;AAChC;AAAA,EAIE;AAAA,OACK;AACP,SAAS,oBAAoB;AAyBtB,MAAM,eAA+B,2BAG1C,CAAC,OAAO,QAAQ;AAChB,QAAM;AAAA,IACJ;AAAA,IACA,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,YAAY,eAAe,IAAI,aAAa;AAAA,IAClD,SAAS;AAAA,IACT,WAAW;AAAA,EACb,CAAC;AAED,QAAM,OAAO,QAAQ;AAErB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,eAAa;AAAA,MACb,mBAAiB;AAAA,MACjB,oBAAkB;AAAA,MAClB,WAAW,KAAK,gBAAgB,iBAAiB,iBAAiB;AAAA,MAClE,OAAO;AAAA,MACN,GAAG,YAAY,gBAAgB,UAAU;AAAA;AAAA,IAEzC;AAAA,IACD,oCAAC,cAAK,UAEJ;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QAEZ,cAAY,KAAK,cAAc;AAAA,UAC7B,gBAAgB;AAAA,UAChB,IAAI;AAAA,UACJ,aACE;AAAA,QACJ,CAAC;AAAA;AAAA,IACH,CACF;AAAA,EACF;AAEJ,CAAC;AAEA,aAA+D,cAC9D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import "./ExternalLink.css";
2
+ var externalLinkCSS = "ExternalLink_externalLinkCSS__8noiqs0";
3
+ export {
4
+ externalLinkCSS
5
+ };
6
+ //# sourceMappingURL=ExternalLink.sty.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/ExternalLink/ExternalLink.css.ts"],
4
+ "sourcesContent": ["import './ExternalLink.css';\nexport var externalLinkCSS = 'ExternalLink_externalLinkCSS__8noiqs0';"],
5
+ "mappings": "AAAA,OAAO;AACA,IAAI,kBAAkB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,54 @@
1
+ .Heading_headingCSS__u4t9450 {
2
+ margin: 0;
3
+ overflow-wrap: break-word;
4
+ font-style: normal;
5
+ color: var(--dt-colors-text-neutral-default, #2b2a58);
6
+ }
7
+ .Heading_headingCSS_visualLevel_1__u4t9451 {
8
+ font-family: var(--dt-typography-heading-level-1-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
9
+ font-size: var(--dt-typography-heading-level-1-size, 32px);
10
+ font-weight: var(--dt-typography-heading-level-1-weight, 600);
11
+ line-height: var(--dt-typography-heading-level-1-line-height, 1.25);
12
+ text-transform: var(--dt-typography-heading-level-1-text-transform, none);
13
+ text-decoration: var(--dt-typography-heading-level-1-text-decoration, none);
14
+ }
15
+ .Heading_headingCSS_visualLevel_2__u4t9452 {
16
+ font-family: var(--dt-typography-heading-level-2-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
17
+ font-size: var(--dt-typography-heading-level-2-size, 28px);
18
+ font-weight: var(--dt-typography-heading-level-2-weight, 600);
19
+ line-height: var(--dt-typography-heading-level-2-line-height, 1.2857142857);
20
+ text-transform: var(--dt-typography-heading-level-2-text-transform, none);
21
+ text-decoration: var(--dt-typography-heading-level-2-text-decoration, none);
22
+ }
23
+ .Heading_headingCSS_visualLevel_3__u4t9453 {
24
+ font-family: var(--dt-typography-heading-level-3-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
25
+ font-size: var(--dt-typography-heading-level-3-size, 24px);
26
+ font-weight: var(--dt-typography-heading-level-3-weight, 600);
27
+ line-height: var(--dt-typography-heading-level-3-line-height, 1.3333333333);
28
+ text-transform: var(--dt-typography-heading-level-3-text-transform, none);
29
+ text-decoration: var(--dt-typography-heading-level-3-text-decoration, none);
30
+ }
31
+ .Heading_headingCSS_visualLevel_4__u4t9454 {
32
+ font-family: var(--dt-typography-heading-level-4-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
33
+ font-size: var(--dt-typography-heading-level-4-size, 20px);
34
+ font-weight: var(--dt-typography-heading-level-4-weight, 600);
35
+ line-height: var(--dt-typography-heading-level-4-line-height, 1.4);
36
+ text-transform: var(--dt-typography-heading-level-4-text-transform, none);
37
+ text-decoration: var(--dt-typography-heading-level-4-text-decoration, none);
38
+ }
39
+ .Heading_headingCSS_visualLevel_5__u4t9455 {
40
+ font-family: var(--dt-typography-heading-level-5-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
41
+ font-size: var(--dt-typography-heading-level-5-size, 16px);
42
+ font-weight: var(--dt-typography-heading-level-5-weight, 600);
43
+ line-height: var(--dt-typography-heading-level-5-line-height, 1.5);
44
+ text-transform: var(--dt-typography-heading-level-5-text-transform, none);
45
+ text-decoration: var(--dt-typography-heading-level-5-text-decoration, none);
46
+ }
47
+ .Heading_headingCSS_visualLevel_6__u4t9456 {
48
+ font-family: var(--dt-typography-heading-level-6-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
49
+ font-size: var(--dt-typography-heading-level-6-size, 14px);
50
+ font-weight: var(--dt-typography-heading-level-6-weight, 600);
51
+ line-height: var(--dt-typography-heading-level-6-line-height, 1.4285714286);
52
+ text-transform: var(--dt-typography-heading-level-6-text-transform, none);
53
+ text-decoration: var(--dt-typography-heading-level-6-text-decoration, none);
54
+ }
@@ -0,0 +1,36 @@
1
+ import clsx from "clsx";
2
+ import React, { forwardRef } from "react";
3
+ import { headingCSS } from "./Heading.sty.js";
4
+ const Heading = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
5
+ const {
6
+ level,
7
+ children,
8
+ as,
9
+ "data-testid": dataTestId,
10
+ "data-dtrum-mask": dataDtrumMask,
11
+ "data-dtrum-allow": dataDtrumAllow,
12
+ className: consumerClassName,
13
+ style: consumerStyle,
14
+ ...remainingProps
15
+ } = props;
16
+ const visualLevel = level ?? 1;
17
+ const HeadingTag = as ?? `h${visualLevel}`;
18
+ return /* @__PURE__ */ React.createElement(
19
+ HeadingTag,
20
+ {
21
+ ref: forwardedRef,
22
+ "data-testid": dataTestId,
23
+ "data-dtrum-mask": dataDtrumMask,
24
+ "data-dtrum-allow": dataDtrumAllow,
25
+ className: clsx(headingCSS({ visualLevel }), consumerClassName),
26
+ style: consumerStyle,
27
+ ...remainingProps
28
+ },
29
+ children
30
+ );
31
+ });
32
+ Heading.displayName = "Heading";
33
+ export {
34
+ Heading
35
+ };
36
+ //# sourceMappingURL=Heading.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Heading/Heading.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\n\nimport { headingCSS } from './Heading.sty.js';\nimport {\n type DataTestId,\n type StylingProps,\n type WithChildren,\n type MaskingProps,\n} from '../../core/index.js';\nimport type { DOMProps } from '../../core/types/dom.js';\nimport type { _HeadingTag } from '../../core/types/heading.js';\n\n/**\n * @public\n * Props used for the Heading component */\nexport interface HeadingProps\n extends DOMProps,\n WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {\n /**\n * The visual level of the heading.\n * @defaultValue 1\n */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n /**\n * The polymorphed HTML tag that determines the semantic level of the heading.\n * @defaultValue 'h1'\n */\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n}\n\n/**\n * @public\n * Use the `Heading` to render semantic HTML heading elements (`h1`, `h2`, etc.).\n * The component allows you to independently define both the visual and the semantic level of the heading.\n */\nexport const Heading = /* @__PURE__ */ forwardRef<\n HTMLHeadingElement,\n HeadingProps\n>((props, forwardedRef) => {\n const {\n level,\n children,\n as,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n className: consumerClassName,\n style: consumerStyle,\n ...remainingProps\n } = props;\n\n const visualLevel = level ?? 1;\n // semantic level\n const HeadingTag: _HeadingTag = as ?? (`h${visualLevel}` as _HeadingTag);\n\n return (\n <HeadingTag\n ref={forwardedRef}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(headingCSS({ visualLevel }), consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n {children}\n </HeadingTag>\n );\n});\n(Heading as typeof Heading & { displayName: string }).displayName = 'Heading';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAAS,kBAAkB;AAElC,SAAS,kBAAkB;AAoCpB,MAAM,UAA0B,2BAGrC,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,cAAc,SAAS;AAE7B,QAAM,aAA0B,MAAO,IAAI,WAAW;AAEtD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,eAAa;AAAA,MACb,mBAAiB;AAAA,MACjB,oBAAkB;AAAA,MAClB,WAAW,KAAK,WAAW,EAAE,YAAY,CAAC,GAAG,iBAAiB;AAAA,MAC9D,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AACA,QAAqD,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import "./Heading.css";
2
+ import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
3
+ var headingCSS = _7a468({ defaultClassName: "Heading_headingCSS__u4t9450", variantClassNames: { visualLevel: { "1": "Heading_headingCSS_visualLevel_1__u4t9451", "2": "Heading_headingCSS_visualLevel_2__u4t9452", "3": "Heading_headingCSS_visualLevel_3__u4t9453", "4": "Heading_headingCSS_visualLevel_4__u4t9454", "5": "Heading_headingCSS_visualLevel_5__u4t9455", "6": "Heading_headingCSS_visualLevel_6__u4t9456" } }, defaultVariants: {}, compoundVariants: [] });
4
+ export {
5
+ headingCSS
6
+ };
7
+ //# sourceMappingURL=Heading.sty.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Heading/Heading.css.ts"],
4
+ "sourcesContent": ["import './Heading.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var headingCSS = _7a468({defaultClassName:'Heading_headingCSS__u4t9450',variantClassNames:{visualLevel:{'1':'Heading_headingCSS_visualLevel_1__u4t9451','2':'Heading_headingCSS_visualLevel_2__u4t9452','3':'Heading_headingCSS_visualLevel_3__u4t9453','4':'Heading_headingCSS_visualLevel_4__u4t9454','5':'Heading_headingCSS_visualLevel_5__u4t9455','6':'Heading_headingCSS_visualLevel_6__u4t9456'}},defaultVariants:{},compoundVariants:[]});"],
5
+ "mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,aAAa,OAAO,EAAC,kBAAiB,+BAA8B,mBAAkB,EAAC,aAAY,EAAC,KAAI,6CAA4C,KAAI,6CAA4C,KAAI,6CAA4C,KAAI,6CAA4C,KAAI,6CAA4C,KAAI,4CAA2C,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ .Highlight_highlightCSS__1u4tng00 {
2
+ color: var(--dt-colors-text-neutral-on-accent-default, #f3f3f6);
3
+ background: var(--dt-colors-background-container-neutral-accent, #5a5b8c);
4
+ }
@@ -0,0 +1,111 @@
1
+ import clsx from "clsx";
2
+ import React from "react";
3
+ import { highlightCSS } from "./Highlight.sty.js";
4
+ const HTML_CHARS_OVERRIDES = [
5
+ [/&lt;/g, "<"],
6
+ [/&gt;/g, ">"],
7
+ [/&amp;/g, "&"],
8
+ [/&nbsp;/g, " "]
9
+ ];
10
+ function escapeRegExp(text) {
11
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
12
+ }
13
+ function highlightChildren(children, term, caseSensitive, dataTestId, dataDtrumMask, dataDtrumAllow) {
14
+ const terms = (() => {
15
+ if (Array.isArray(term)) {
16
+ return term.filter((t) => t);
17
+ }
18
+ return term ? [term] : [];
19
+ })();
20
+ return terms.length > 0 ? React.Children.map(
21
+ children,
22
+ (child) => highlightRecursive(
23
+ child,
24
+ terms,
25
+ caseSensitive,
26
+ dataTestId,
27
+ dataDtrumMask,
28
+ dataDtrumAllow
29
+ )
30
+ ) : children;
31
+ }
32
+ function highlightRecursive(sourceElement, terms, caseSensitive, dataTestId, dataDtrumMask, dataDtrumAllow) {
33
+ if (!sourceElement) {
34
+ return sourceElement;
35
+ }
36
+ if (React.isValidElement(sourceElement)) {
37
+ const children = React.Children.map(
38
+ sourceElement.props.children,
39
+ (child) => highlightRecursive(
40
+ child,
41
+ terms,
42
+ caseSensitive,
43
+ dataTestId,
44
+ dataDtrumMask,
45
+ dataDtrumAllow
46
+ )
47
+ );
48
+ return React.cloneElement(sourceElement, sourceElement.props, children);
49
+ }
50
+ return highlightLeafElement(
51
+ sourceElement,
52
+ terms,
53
+ caseSensitive,
54
+ dataTestId,
55
+ dataDtrumMask,
56
+ dataDtrumAllow
57
+ );
58
+ }
59
+ function highlightLeafElement(textContent, terms, caseSensitive, dataTestId, dataDtrumMask, dataDtrumAllow) {
60
+ if (terms.length === 0) {
61
+ return textContent;
62
+ }
63
+ const sanitizedTextContent = HTML_CHARS_OVERRIDES.reduce(
64
+ (text, [needle, replacement]) => text.replace(needle, replacement),
65
+ `${textContent}`
66
+ );
67
+ const termsInLowerCase = terms.map((t) => t.toLowerCase());
68
+ return getTextTokens(sanitizedTextContent, terms, caseSensitive).map(
69
+ (token) => termsInLowerCase.includes(token.toLowerCase()) ? /* @__PURE__ */ React.createElement(
70
+ "mark",
71
+ {
72
+ role: "mark",
73
+ className: clsx(highlightCSS),
74
+ "data-dtrum-mask": dataDtrumMask,
75
+ "data-dtrum-allow": dataDtrumAllow
76
+ },
77
+ token
78
+ ) : /* @__PURE__ */ React.createElement("span", null, token)
79
+ );
80
+ }
81
+ function getTextTokens(textContent, terms, caseSensitive) {
82
+ const flags = caseSensitive ? "gm" : "gmi";
83
+ const regExp = new RegExp(
84
+ `(${terms.map((t) => escapeRegExp(t)).join("|")})`,
85
+ flags
86
+ );
87
+ return textContent.toString().split(regExp).filter((s) => s.length > 0);
88
+ }
89
+ const Highlight = (props) => {
90
+ const {
91
+ children,
92
+ term,
93
+ caseSensitive = false,
94
+ "data-testid": dataTestId,
95
+ "data-dtrum-mask": dataDtrumMask,
96
+ "data-dtrum-allow": dataDtrumAllow
97
+ } = props;
98
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, highlightChildren(
99
+ children,
100
+ term,
101
+ caseSensitive,
102
+ dataTestId,
103
+ dataDtrumMask,
104
+ dataDtrumAllow
105
+ ));
106
+ };
107
+ Highlight.displayName = "Highlight";
108
+ export {
109
+ Highlight
110
+ };
111
+ //# sourceMappingURL=Highlight.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Highlight/Highlight.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, { ReactElement, ReactNode, ReactText } from 'react';\n\nimport { highlightCSS } from './Highlight.sty.js';\nimport { type DataTestId, type WithChildren } from '../../core/index.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\n\n/**\n * The props for the Heading component.\n * @public\n */\nexport interface HighlightProps extends WithChildren, DataTestId, MaskingProps {\n /**\n * Either a substring or an array of multiple different substrings that\n * should be highlighted in the projected content.\n * Every occurrence of the string(s) is highlighted accordingly.\n */\n term: string | string[];\n\n /**\n * Property that determines whether the highlighting search is case-sensitive.\n * If set to `true`, the component searches for case sensitive occurrences.\n * @defaultValue false\n */\n caseSensitive?: boolean;\n}\n\nconst HTML_CHARS_OVERRIDES: [RegExp, string][] = [\n [/&lt;/g, '<'],\n [/&gt;/g, '>'],\n [/&amp;/g, '&'],\n [/&nbsp;/g, ' '],\n];\n\n/** Escapes all characters that could be dangerous for a regular expression */\nfunction escapeRegExp(text: string): string {\n return text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\n\n/** Highlights all occurences of a list of terms within a ReactNode. */\nfunction highlightChildren(\n children: ReactNode,\n term: string | string[],\n caseSensitive: boolean,\n dataTestId?: string,\n dataDtrumMask?: boolean,\n dataDtrumAllow?: boolean,\n) {\n const terms = (() => {\n if (Array.isArray(term)) {\n return term.filter((t) => t);\n }\n\n return term ? [term] : [];\n })();\n\n return terms.length > 0\n ? React.Children.map(children, (child: ReactNode) =>\n highlightRecursive(\n child,\n terms,\n caseSensitive,\n dataTestId,\n dataDtrumMask,\n dataDtrumAllow,\n ),\n )\n : children;\n}\n\n/**\n * Iterates over all children of a ReactNode recursively to look\n * for a list of terms and highlights them.\n */\nfunction highlightRecursive(\n sourceElement: ReactNode,\n terms: string[],\n caseSensitive: boolean,\n dataTestId?: string,\n dataDtrumMask?: boolean,\n dataDtrumAllow?: boolean,\n): ReactNode {\n if (!sourceElement) {\n return sourceElement;\n }\n\n if (React.isValidElement(sourceElement)) {\n const children = React.Children.map(sourceElement.props.children, (child) =>\n highlightRecursive(\n child,\n terms,\n caseSensitive,\n dataTestId,\n dataDtrumMask,\n dataDtrumAllow,\n ),\n );\n\n return React.cloneElement(sourceElement, sourceElement.props, children);\n }\n\n return highlightLeafElement(\n sourceElement as ReactText,\n terms,\n caseSensitive,\n dataTestId,\n dataDtrumMask,\n dataDtrumAllow,\n );\n}\n\n/** Highlights parts of the text that match a certain group of terms. */\nfunction highlightLeafElement(\n textContent: ReactText,\n terms: string[],\n caseSensitive: boolean,\n dataTestId?: string,\n dataDtrumMask?: boolean,\n dataDtrumAllow?: boolean,\n): ReactNode {\n if (terms.length === 0) {\n return textContent;\n }\n\n const sanitizedTextContent = HTML_CHARS_OVERRIDES.reduce(\n (text, [needle, replacement]) => text.replace(needle, replacement),\n `${textContent}`,\n );\n const termsInLowerCase = terms.map((t) => t.toLowerCase());\n\n return getTextTokens(sanitizedTextContent, terms, caseSensitive).map(\n (token: string) =>\n termsInLowerCase.includes(token.toLowerCase()) ? (\n <mark\n role=\"mark\"\n className={clsx(highlightCSS)}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n >\n {token}\n </mark>\n ) : (\n <span>{token}</span>\n ),\n );\n}\n\n/**\n * Splits text into an array of strings where a given list of terms\n * acts as separator strings.\n */\nfunction getTextTokens(\n textContent: ReactText,\n terms: string[],\n caseSensitive: boolean,\n): string[] {\n const flags = caseSensitive ? 'gm' : 'gmi';\n const regExp = new RegExp(\n `(${terms.map((t) => escapeRegExp(t)).join('|')})`,\n flags,\n );\n\n return textContent\n .toString()\n .split(regExp)\n .filter((s) => s.length > 0);\n}\n\n/**\n * @public\n * Use the `Highlight` component to highlight one or more substrings within a\n * text.\n */\nexport const Highlight = (props: HighlightProps): ReactElement => {\n const {\n children,\n term,\n caseSensitive = false,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n } = props;\n\n return (\n <>\n {highlightChildren(\n children,\n term,\n caseSensitive,\n dataTestId,\n dataDtrumMask,\n dataDtrumAllow,\n )}\n </>\n );\n};\n\n(Highlight as typeof Highlight & { displayName: string }).displayName =\n 'Highlight';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,WAAmD;AAE1D,SAAS,oBAAoB;AAwB7B,MAAM,uBAA2C;AAAA,EAC/C,CAAC,SAAS,GAAG;AAAA,EACb,CAAC,SAAS,GAAG;AAAA,EACb,CAAC,UAAU,GAAG;AAAA,EACd,CAAC,WAAW,GAAG;AACjB;AAGA,SAAS,aAAa,MAAsB;AAC1C,SAAO,KAAK,QAAQ,uBAAuB,MAAM;AACnD;AAGA,SAAS,kBACP,UACA,MACA,eACA,YACA,eACA,gBACA;AACA,QAAM,SAAS,MAAM;AACnB,QAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,aAAO,KAAK,OAAO,CAAC,MAAM,CAAC;AAAA,IAC7B;AAEA,WAAO,OAAO,CAAC,IAAI,IAAI,CAAC;AAAA,EAC1B,GAAG;AAEH,SAAO,MAAM,SAAS,IAClB,MAAM,SAAS;AAAA,IAAI;AAAA,IAAU,CAAC,UAC5B;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,IACA;AACN;AAMA,SAAS,mBACP,eACA,OACA,eACA,YACA,eACA,gBACW;AACX,MAAI,CAAC,eAAe;AAClB,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,eAAe,aAAa,GAAG;AACvC,UAAM,WAAW,MAAM,SAAS;AAAA,MAAI,cAAc,MAAM;AAAA,MAAU,CAAC,UACjE;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,WAAO,MAAM,aAAa,eAAe,cAAc,OAAO,QAAQ;AAAA,EACxE;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAGA,SAAS,qBACP,aACA,OACA,eACA,YACA,eACA,gBACW;AACX,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO;AAAA,EACT;AAEA,QAAM,uBAAuB,qBAAqB;AAAA,IAChD,CAAC,MAAM,CAAC,QAAQ,WAAW,MAAM,KAAK,QAAQ,QAAQ,WAAW;AAAA,IACjE,GAAG,WAAW;AAAA,EAChB;AACA,QAAM,mBAAmB,MAAM,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC;AAEzD,SAAO,cAAc,sBAAsB,OAAO,aAAa,EAAE;AAAA,IAC/D,CAAC,UACC,iBAAiB,SAAS,MAAM,YAAY,CAAC,IAC3C;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAW,KAAK,YAAY;AAAA,QAC5B,mBAAiB;AAAA,QACjB,oBAAkB;AAAA;AAAA,MAEjB;AAAA,IACH,IAEA,oCAAC,cAAM,KAAM;AAAA,EAEnB;AACF;AAMA,SAAS,cACP,aACA,OACA,eACU;AACV,QAAM,QAAQ,gBAAgB,OAAO;AACrC,QAAM,SAAS,IAAI;AAAA,IACjB,IAAI,MAAM,IAAI,CAAC,MAAM,aAAa,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC;AAAA,IAC/C;AAAA,EACF;AAEA,SAAO,YACJ,SAAS,EACT,MAAM,MAAM,EACZ,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC;AAC/B;AAOO,MAAM,YAAY,CAAC,UAAwC;AAChE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,EACtB,IAAI;AAEJ,SACE,0DACG;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AAEJ;AAEC,UAAyD,cACxD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import "./Highlight.css";
2
+ var highlightCSS = "Highlight_highlightCSS__1u4tng00";
3
+ export {
4
+ highlightCSS
5
+ };
6
+ //# sourceMappingURL=Highlight.sty.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Highlight/Highlight.css.ts"],
4
+ "sourcesContent": ["import './Highlight.css';\nexport var highlightCSS = 'Highlight_highlightCSS__1u4tng00';"],
5
+ "mappings": "AAAA,OAAO;AACA,IAAI,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,15 @@
1
+ .Link_linkCSS__1ck42do0 {
2
+ display: inline-block;
3
+ color: var(--dt-colors-text-primary-default, #454cc9);
4
+ text-decoration: underline;
5
+ overflow-wrap: anywhere;
6
+ }
7
+ .Link_linkCSS__1ck42do0:hover {
8
+ color: var(--dt-colors-text-primary-default-hover, #3332ae);
9
+ }
10
+ .Link_linkCSS__1ck42do0:active {
11
+ color: var(--dt-colors-text-primary-default-active, #241193);
12
+ }
13
+ .Link_linkCSS__1ck42do0:focus-visible {
14
+ text-decoration: none;
15
+ }
@@ -0,0 +1,49 @@
1
+ import clsx from "clsx";
2
+ import React, { forwardRef } from "react";
3
+ import {
4
+ _mergeProps
5
+ } from "../../core/index.js";
6
+ import { useFocusRing } from "../../core/styles/useFocusRing.js";
7
+ import { linkCSS } from "../Link/Link.sty.js";
8
+ const Link = /* @__PURE__ */ forwardRef(
9
+ ({
10
+ children,
11
+ as,
12
+ "data-testid": dataTestId,
13
+ "data-dtrum-mask": dataDtrumMask,
14
+ "data-dtrum-allow": dataDtrumAllow,
15
+ className: consumerClassName,
16
+ style: consumerStyle,
17
+ ...remainingProps
18
+ }, ref) => {
19
+ const { focusProps, focusClassName } = useFocusRing({
20
+ variant: "primary",
21
+ isMinimal: true
22
+ });
23
+ const LinkTag = as || "a";
24
+ return /* @__PURE__ */ React.createElement(
25
+ LinkTag,
26
+ {
27
+ ref,
28
+ "data-testid": dataTestId,
29
+ "data-dtrum-mask": dataDtrumMask,
30
+ "data-dtrum-allow": dataDtrumAllow,
31
+ className: clsx(focusClassName, linkCSS, consumerClassName),
32
+ style: consumerStyle,
33
+ ..._mergeProps(
34
+ // Need to cast this one as the inference of mergeProps would generate
35
+ // a not allowed overlap. The remainingProps type is too complex due to the
36
+ // polymorphic inheritance.
37
+ remainingProps,
38
+ focusProps
39
+ )
40
+ },
41
+ children
42
+ );
43
+ }
44
+ );
45
+ Link.displayName = "Link";
46
+ export {
47
+ Link
48
+ };
49
+ //# sourceMappingURL=Link.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Link/Link.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, { ElementType, forwardRef, ReactElement } from 'react';\n\nimport {\n type DataTestId,\n type StylingProps,\n type WithChildren,\n _mergeProps,\n} from '../../core/index.js';\nimport { useFocusRing } from '../../core/styles/useFocusRing.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\nimport type { PolymorphicComponentProps } from '../../core/types/polymorph.js';\nimport { linkCSS } from '../Link/Link.sty.js';\n\n/**\n * The props for the Link component.\n * @public\n */\nexport type LinkProps<E extends ElementType> = PolymorphicComponentProps<\n E,\n WithChildren & StylingProps & DataTestId & MaskingProps\n>;\n\n/**\n * @public\n * Use the `Link` component to navigate to a different page within the application.\n * For external resources in a different domain, use the\n * {@link https://developer.dynatrace.com/reference/design-system/preview/typography/ExternalLink/ | `ExternalLink`}\n * component instead.\n */\nexport const Link: <E extends ElementType = 'a'>(\n props: LinkProps<E>,\n) => ReactElement | null = /* @__PURE__ */ forwardRef(\n <E extends ElementType>(\n {\n children,\n as,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n className: consumerClassName,\n style: consumerStyle,\n ...remainingProps\n }: LinkProps<E>,\n ref: typeof remainingProps.ref,\n ) => {\n const { focusProps, focusClassName } = useFocusRing({\n variant: 'primary',\n isMinimal: true,\n });\n const LinkTag = as || 'a';\n\n return (\n <LinkTag\n ref={ref}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(focusClassName, linkCSS, consumerClassName)}\n style={consumerStyle}\n {..._mergeProps(\n // Need to cast this one as the inference of mergeProps would generate\n // a not allowed overlap. The remainingProps type is too complex due to the\n // polymorphic inheritance.\n remainingProps as Record<string, unknown>,\n focusProps,\n )}\n >\n {children}\n </LinkTag>\n );\n },\n);\n\n(Link as typeof Link & { displayName: string }).displayName = 'Link';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAAsB,kBAAgC;AAE7D;AAAA,EAIE;AAAA,OACK;AACP,SAAS,oBAAoB;AAG7B,SAAS,eAAe;AAkBjB,MAAM,OAE8B;AAAA,EACzC,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,EAAE,YAAY,eAAe,IAAI,aAAa;AAAA,MAClD,SAAS;AAAA,MACT,WAAW;AAAA,IACb,CAAC;AACD,UAAM,UAAU,MAAM;AAEtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB,WAAW,KAAK,gBAAgB,SAAS,iBAAiB;AAAA,QAC1D,OAAO;AAAA,QACN,GAAG;AAAA;AAAA;AAAA;AAAA,UAIF;AAAA,UACA;AAAA,QACF;AAAA;AAAA,MAEC;AAAA,IACH;AAAA,EAEJ;AACF;AAEC,KAA+C,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import "./Link.css";
2
+ var linkCSS = "Link_linkCSS__1ck42do0";
3
+ export {
4
+ linkCSS
5
+ };
6
+ //# sourceMappingURL=Link.sty.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/Link/Link.css.ts"],
4
+ "sourcesContent": ["import './Link.css';\nexport var linkCSS = 'Link_linkCSS__1ck42do0';"],
5
+ "mappings": "AAAA,OAAO;AACA,IAAI,UAAU;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ .List_listCSS__13d6w3n0 {
2
+ margin: 0;
3
+ padding-left: var(--dt-spacings-size-40, 40px);
4
+ }
5
+ .List_listCSS__13d6w3n0 .List_listCSS__13d6w3n0 {
6
+ margin-block: var(--dt-spacings-size-4, 4px);
7
+ padding-left: var(--dt-spacings-size-28, 28px);
8
+ }
9
+ .List_listItemCSS__13d6w3n1 {
10
+ position: relative;
11
+ overflow-wrap: break-word;
12
+ margin-block: var(--dt-spacings-size-2, 2px);
13
+ }
14
+ .List_listItemCSS__13d6w3n1::marker {
15
+ font-weight: var(--dt-typography-text-base-emphasized-weight, 500);
16
+ }