@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/TextEllipsis/TextEllipsis.tsx"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport React, {\n forwardRef,\n HTMLAttributes,\n RefObject,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport useResizeObserver from 'use-resize-observer';\n\nimport { textEllipsisCSS } from './TextEllipsis.sty.js';\nimport { _useFontsUpdated } from '../../core/hooks/useFontsUpdated.js';\nimport { useMergeRefs } from '../../core/hooks/useMergeRefs.js';\nimport { DataTestId } from '../../core/types/data-props.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\nimport { StylingProps } from '../../core/types/styling-props.js';\nimport type { _Font } from '../utils.js';\nimport { _centerEllipsizeText } from '../utils.js';\n\n/**\n * Available modes for how overly long text is truncated and where the ellipsis is placed.\n * @internal\n * */\nexport type _TruncationMode = 'start' | 'middle' | 'end';\n\n/**\n * The props for the TextEllipsis component.\n * @public\n * */\nexport interface TextEllipsisProps\n extends HTMLAttributes<HTMLSpanElement>,\n StylingProps,\n DataTestId,\n MaskingProps {\n /** The children (as text) passed to the component. */\n children: string;\n /**\n * The mode used for for truncating the text, either at the start, in the middle or at the end.\n * @defaultValue 'end'\n */\n truncationMode?: 'start' | 'middle' | 'end';\n /** Gets called when text needs to get truncated due to lack of horizontal space. */\n onTextOverflow?: (ellipsized: boolean) => void;\n}\n\n/**\n * Returns an object containing all font-related CSS properties from\n * a given DOM element that are relevant for rendering formatted text\n * in a 2D canvas context.\n *\n * @param textWrapper - The HTML element to extract the CSS properties from\n */\nfunction getFontProps(textWrapper: HTMLSpanElement): _Font {\n const computedStyle = window.getComputedStyle(textWrapper, null);\n\n return {\n fontStyle: computedStyle.getPropertyValue('font-style'),\n fontWeight: computedStyle.getPropertyValue('font-weight'),\n fontSize: computedStyle.getPropertyValue('font-size'),\n fontFamily: computedStyle.getPropertyValue('font-family'),\n };\n}\n\n/**\n * Determines whether a CSS text-ellipsis is currently rendered in a container.\n * Note: `containerWidth` is only passed to avoid unnecessary reflows by calling `getBoundingClientRect()`\n */\nfunction isNativeEllipsisActive(\n textWrapper: HTMLSpanElement,\n containerWidth: number,\n): boolean {\n const textWidth =\n Math.floor(textWrapper.getBoundingClientRect().width * 100) / 100;\n\n return textWidth > containerWidth;\n}\n\n/**\n * Detects whether a given formatted text has enough space within its\n * parent container and applies or removes an ellipsis accordingly.\n *\n * @param originalText - The text to be truncated if its width exceeds <code>maxWidthInPx</code>\n * @param truncationMode - The mode used for for truncating the text, either at the start, in the middle or at the end\n * @param containerRef - Object ref pointing towards the root element of the TextEllipsis component\n * @param wasEllipsized - Whether an ellipsis was applied during the last render cycle\n * @param onTextOverflow - Callback that gets called whenever the state of the ellipsis changes since the last render cycle\n */\nfunction renderEllipsizedText(\n originalText: string,\n truncationMode: TextEllipsisProps['truncationMode'],\n containerRef: RefObject<HTMLSpanElement>,\n wasEllipsized: boolean,\n onTextOverflow?: (ellipsized: boolean) => void,\n): boolean {\n const containerElement = containerRef.current;\n const textWrapper: HTMLSpanElement | null =\n (containerElement?.firstElementChild as HTMLSpanElement) || null;\n\n if (containerElement !== null && textWrapper !== null) {\n if (textWrapper.textContent !== originalText) {\n textWrapper.textContent = originalText; // always reset to full text before measuring container width\n }\n\n const containerWidth =\n Math.ceil(containerElement.getBoundingClientRect().width * 100) / 100;\n\n if (truncationMode === 'middle') {\n if (isNativeEllipsisActive(textWrapper, containerWidth)) {\n const ellipsizedText = _centerEllipsizeText(\n originalText,\n getFontProps(textWrapper),\n containerWidth,\n );\n textWrapper.textContent = ellipsizedText;\n\n if (ellipsizedText !== originalText) {\n if (onTextOverflow && !wasEllipsized) {\n onTextOverflow(true);\n }\n\n return true;\n }\n }\n\n if (onTextOverflow && wasEllipsized) {\n onTextOverflow(false);\n }\n } else if (isNativeEllipsisActive(textWrapper, containerWidth)) {\n if (onTextOverflow && !wasEllipsized) {\n onTextOverflow(true);\n }\n\n return true;\n } else if (onTextOverflow && wasEllipsized) {\n onTextOverflow(false);\n }\n }\n\n return false;\n}\n\nconst ComputedTextEllipsis = /* @__PURE__ */ forwardRef<\n HTMLSpanElement,\n TextEllipsisProps\n>((props, forwardedRef) => {\n const {\n children,\n truncationMode = 'end',\n onTextOverflow,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n ...remainingProps\n } = props;\n\n // resize observer is needed to re-render the component in case of resizing\n const { ref: observerContainerRef } = useResizeObserver<HTMLSpanElement>();\n const containerRef = useRef<HTMLSpanElement | null>(null);\n const ellipsisStateRef = useRef<boolean>(false);\n const mergedRef = useMergeRefs<HTMLSpanElement | null>([\n observerContainerRef,\n (instance: HTMLSpanElement) => {\n containerRef.current = instance;\n },\n forwardedRef,\n ]);\n const containerWidth = containerRef.current?.getBoundingClientRect().width;\n const fontsUpdated = _useFontsUpdated();\n\n useLayoutEffect(() => {\n ellipsisStateRef.current = renderEllipsizedText(\n children,\n truncationMode,\n containerRef,\n ellipsisStateRef.current,\n onTextOverflow,\n );\n }, [containerWidth, children, truncationMode, fontsUpdated, onTextOverflow]);\n\n return (\n <span\n ref={mergedRef}\n aria-label={children}\n data-ellipsis\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(textEllipsisCSS({ truncationMode }), consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n <span>{children}</span>\n </span>\n );\n});\n\nconst CssTextEllipsis = /* @__PURE__ */ forwardRef<\n HTMLSpanElement,\n TextEllipsisProps\n>((props, forwardedRef) => {\n const {\n children,\n truncationMode = 'end',\n onTextOverflow,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n ...remainingProps\n } = props;\n\n return (\n <span\n ref={forwardedRef}\n aria-label={children}\n data-ellipsis\n data-testid={dataTestId}\n className={clsx(textEllipsisCSS({ truncationMode }), consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n <span>{children}</span>\n </span>\n );\n});\n\n/**\n * @public\n * Use the `TextEllipsis` component to truncate text and show an ellipsis whenever\n * there is insufficient space to render the entire text. While some of our Strato\n * components provide ellipsis out of the box, you need to take care of this yourself\n * when writing your own components.\n */\nexport const TextEllipsis = /* @__PURE__ */ forwardRef<\n HTMLSpanElement,\n TextEllipsisProps\n>((props, forwardedRef) => {\n // in case onTextOverflow is not defined and the ellipsis is start or end\n // we can use css only which is significantly more performant\n const cssOnlyEllipsis =\n !props.onTextOverflow && props.truncationMode !== 'middle';\n\n return cssOnlyEllipsis ? (\n <CssTextEllipsis ref={forwardedRef} {...props} />\n ) : (\n <ComputedTextEllipsis ref={forwardedRef} {...props} />\n );\n});\n\n(TextEllipsis as typeof TextEllipsis & { displayName: string }).displayName =\n 'TextEllipsis';\n"],
5
+ "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO;AAAA,EACL;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AACP,OAAO,uBAAuB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAK7B,SAAS,4BAA4B;AAmCrC,SAAS,aAAa,aAAqC;AACzD,QAAM,gBAAgB,OAAO,iBAAiB,aAAa,IAAI;AAE/D,SAAO;AAAA,IACL,WAAW,cAAc,iBAAiB,YAAY;AAAA,IACtD,YAAY,cAAc,iBAAiB,aAAa;AAAA,IACxD,UAAU,cAAc,iBAAiB,WAAW;AAAA,IACpD,YAAY,cAAc,iBAAiB,aAAa;AAAA,EAC1D;AACF;AAMA,SAAS,uBACP,aACA,gBACS;AACT,QAAM,YACJ,KAAK,MAAM,YAAY,sBAAsB,EAAE,QAAQ,GAAG,IAAI;AAEhE,SAAO,YAAY;AACrB;AAYA,SAAS,qBACP,cACA,gBACA,cACA,eACA,gBACS;AACT,QAAM,mBAAmB,aAAa;AACtC,QAAM,cACH,kBAAkB,qBAAyC;AAE9D,MAAI,qBAAqB,QAAQ,gBAAgB,MAAM;AACrD,QAAI,YAAY,gBAAgB,cAAc;AAC5C,kBAAY,cAAc;AAAA,IAC5B;AAEA,UAAM,iBACJ,KAAK,KAAK,iBAAiB,sBAAsB,EAAE,QAAQ,GAAG,IAAI;AAEpE,QAAI,mBAAmB,UAAU;AAC/B,UAAI,uBAAuB,aAAa,cAAc,GAAG;AACvD,cAAM,iBAAiB;AAAA,UACrB;AAAA,UACA,aAAa,WAAW;AAAA,UACxB;AAAA,QACF;AACA,oBAAY,cAAc;AAE1B,YAAI,mBAAmB,cAAc;AACnC,cAAI,kBAAkB,CAAC,eAAe;AACpC,2BAAe,IAAI;AAAA,UACrB;AAEA,iBAAO;AAAA,QACT;AAAA,MACF;AAEA,UAAI,kBAAkB,eAAe;AACnC,uBAAe,KAAK;AAAA,MACtB;AAAA,IACF,WAAW,uBAAuB,aAAa,cAAc,GAAG;AAC9D,UAAI,kBAAkB,CAAC,eAAe;AACpC,uBAAe,IAAI;AAAA,MACrB;AAEA,aAAO;AAAA,IACT,WAAW,kBAAkB,eAAe;AAC1C,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,uBAAuC,2BAG3C,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,IAAI;AAGJ,QAAM,EAAE,KAAK,qBAAqB,IAAI,kBAAmC;AACzE,QAAM,eAAe,OAA+B,IAAI;AACxD,QAAM,mBAAmB,OAAgB,KAAK;AAC9C,QAAM,YAAY,aAAqC;AAAA,IACrD;AAAA,IACA,CAAC,aAA8B;AAC7B,mBAAa,UAAU;AAAA,IACzB;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,iBAAiB,aAAa,SAAS,sBAAsB,EAAE;AACrE,QAAM,eAAe,iBAAiB;AAEtC,kBAAgB,MAAM;AACpB,qBAAiB,UAAU;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,MACjB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,gBAAgB,UAAU,gBAAgB,cAAc,cAAc,CAAC;AAE3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,cAAY;AAAA,MACZ,iBAAa;AAAA,MACb,eAAa;AAAA,MACb,mBAAiB;AAAA,MACjB,oBAAkB;AAAA,MAClB,WAAW,KAAK,gBAAgB,EAAE,eAAe,CAAC,GAAG,iBAAiB;AAAA,MACtE,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,IAEJ,oCAAC,cAAM,QAAS;AAAA,EAClB;AAEJ,CAAC;AAED,MAAM,kBAAkC,2BAGtC,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ;AAAA,IACA,iBAAiB;AAAA,IACjB;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,GAAG;AAAA,EACL,IAAI;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,cAAY;AAAA,MACZ,iBAAa;AAAA,MACb,eAAa;AAAA,MACb,WAAW,KAAK,gBAAgB,EAAE,eAAe,CAAC,GAAG,iBAAiB;AAAA,MACtE,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,IAEJ,oCAAC,cAAM,QAAS;AAAA,EAClB;AAEJ,CAAC;AASM,MAAM,eAA+B,2BAG1C,CAAC,OAAO,iBAAiB;AAGzB,QAAM,kBACJ,CAAC,MAAM,kBAAkB,MAAM,mBAAmB;AAEpD,SAAO,kBACL,oCAAC,mBAAgB,KAAK,cAAe,GAAG,OAAO,IAE/C,oCAAC,wBAAqB,KAAK,cAAe,GAAG,OAAO;AAExD,CAAC;AAEA,aAA+D,cAC9D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import "./TextEllipsis.css";
2
+ import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
3
+ var textEllipsisCSS = _7a468({ defaultClassName: "TextEllipsis_textEllipsisCSS__1n6xzhd0", variantClassNames: { truncationMode: { start: "TextEllipsis_textEllipsisCSS_truncationMode_start__1n6xzhd1", middle: "TextEllipsis_textEllipsisCSS_truncationMode_middle__1n6xzhd2", end: "TextEllipsis_textEllipsisCSS_truncationMode_end__1n6xzhd3" } }, defaultVariants: {}, compoundVariants: [] });
4
+ export {
5
+ textEllipsisCSS
6
+ };
7
+ //# sourceMappingURL=TextEllipsis.sty.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/typography/TextEllipsis/TextEllipsis.css.ts"],
4
+ "sourcesContent": ["import './TextEllipsis.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var textEllipsisCSS = _7a468({defaultClassName:'TextEllipsis_textEllipsisCSS__1n6xzhd0',variantClassNames:{truncationMode:{start:'TextEllipsis_textEllipsisCSS_truncationMode_start__1n6xzhd1',middle:'TextEllipsis_textEllipsisCSS_truncationMode_middle__1n6xzhd2',end:'TextEllipsis_textEllipsisCSS_truncationMode_end__1n6xzhd3'}},defaultVariants:{},compoundVariants:[]});"],
5
+ "mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,kBAAkB,OAAO,EAAC,kBAAiB,0CAAyC,mBAAkB,EAAC,gBAAe,EAAC,OAAM,+DAA8D,QAAO,gEAA+D,KAAI,4DAA2D,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,43 @@
1
+ import { Blockquote } from "./BlockQuote/Blockquote.js";
2
+ import { Code } from "./Code/Code.js";
3
+ import { Emphasis } from "./Emphasis/Emphasis.js";
4
+ import { ExternalLink } from "./ExternalLink/ExternalLink.js";
5
+ import { Heading } from "./Heading/Heading.js";
6
+ import { Highlight } from "./Highlight/Highlight.js";
7
+ import { Link } from "./Link/Link.js";
8
+ import { List } from "./List/List.js";
9
+ import { Paragraph } from "./Paragraph/Paragraph.js";
10
+ import { Strikethrough } from "./Strikethrough/Strikethrough.js";
11
+ import { Strong } from "./Strong/Strong.js";
12
+ import { Text } from "./Text/Text.js";
13
+ import { TextEllipsis } from "./TextEllipsis/TextEllipsis.js";
14
+ import {
15
+ _calculateEllipsisInfo,
16
+ _getTextHeight,
17
+ _centerEllipsizeText,
18
+ _getTextWidth,
19
+ _ELLIPSIS_APPROXIMATION_THRESHOLD,
20
+ _ELLIPSIS_CHARACTER
21
+ } from "./utils.js";
22
+ export {
23
+ Blockquote,
24
+ Code,
25
+ Emphasis,
26
+ ExternalLink,
27
+ Heading,
28
+ Highlight,
29
+ Link,
30
+ List,
31
+ Paragraph,
32
+ Strikethrough,
33
+ Strong,
34
+ Text,
35
+ TextEllipsis,
36
+ _ELLIPSIS_APPROXIMATION_THRESHOLD,
37
+ _ELLIPSIS_CHARACTER,
38
+ _calculateEllipsisInfo,
39
+ _centerEllipsizeText,
40
+ _getTextHeight,
41
+ _getTextWidth
42
+ };
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/typography/index.ts"],
4
+ "sourcesContent": ["export { Blockquote } from './BlockQuote/Blockquote.js';\nexport type { BlockquoteProps } from './BlockQuote/Blockquote.js';\nexport { Code } from './Code/Code.js';\nexport type { CodeProps } from './Code/Code.js';\nexport { Emphasis } from './Emphasis/Emphasis.js';\nexport type { EmphasisProps } from './Emphasis/Emphasis.js';\nexport { ExternalLink } from './ExternalLink/ExternalLink.js';\nexport type { ExternalLinkProps } from './ExternalLink/ExternalLink.js';\nexport { Heading } from './Heading/Heading.js';\nexport type { HeadingProps } from './Heading/Heading.js';\nexport { Highlight } from './Highlight/Highlight.js';\nexport type { HighlightProps } from './Highlight/Highlight.js';\nexport { Link } from './Link/Link.js';\nexport type { LinkProps } from './Link/Link.js';\nexport { List } from './List/List.js';\nexport type { ListProps } from './List/List.js';\nexport { Paragraph } from './Paragraph/Paragraph.js';\nexport type { ParagraphProps } from './Paragraph/Paragraph.js';\nexport { Strikethrough } from './Strikethrough/Strikethrough.js';\nexport type { StrikethroughProps } from './Strikethrough/Strikethrough.js';\nexport { Strong } from './Strong/Strong.js';\nexport type { StrongProps } from './Strong/Strong.js';\nexport { Text } from './Text/Text.js';\nexport type { TextOwnProps, TextProps } from './Text/Text.js';\nexport { TextEllipsis } from './TextEllipsis/TextEllipsis.js';\nexport type {\n TextEllipsisProps,\n _TruncationMode,\n} from './TextEllipsis/TextEllipsis.js';\nexport {\n _calculateEllipsisInfo,\n _getTextHeight,\n _centerEllipsizeText,\n _getTextWidth,\n _ELLIPSIS_APPROXIMATION_THRESHOLD,\n _ELLIPSIS_CHARACTER,\n} from './utils.js';\nexport type { _Font } from './utils.js';\n"],
5
+ "mappings": "AAAA,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AAErB,SAAS,gBAAgB;AAEzB,SAAS,oBAAoB;AAE7B,SAAS,eAAe;AAExB,SAAS,iBAAiB;AAE1B,SAAS,YAAY;AAErB,SAAS,YAAY;AAErB,SAAS,iBAAiB;AAE1B,SAAS,qBAAqB;AAE9B,SAAS,cAAc;AAEvB,SAAS,YAAY;AAErB,SAAS,oBAAoB;AAK7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
6
+ "names": []
7
+ }
@@ -0,0 +1,101 @@
1
+ const _ELLIPSIS_CHARACTER = "\u2026";
2
+ const _ELLIPSIS_APPROXIMATION_THRESHOLD = 15;
3
+ let inMemContext2d;
4
+ function _getTextWidth(text, textFont) {
5
+ const context = getCanvasContext2d();
6
+ context.font = getFontString(textFont);
7
+ const textMetrics = context.measureText(text);
8
+ if (textMetrics.width < 0) {
9
+ return textMetrics.width;
10
+ }
11
+ const actualTextWidth = Math.abs(textMetrics.actualBoundingBoxLeft) + Math.abs(textMetrics.actualBoundingBoxRight);
12
+ return Math.ceil(actualTextWidth);
13
+ }
14
+ function _getTextHeight(text, textFont) {
15
+ const context = getCanvasContext2d();
16
+ context.font = getFontString(textFont);
17
+ const textMetrics = context.measureText(text);
18
+ const actualTextHeight = Math.abs(textMetrics.actualBoundingBoxAscent) + Math.abs(textMetrics.actualBoundingBoxDescent);
19
+ return Math.ceil(actualTextHeight);
20
+ }
21
+ function _centerEllipsizeText(originalText, textFont, maxWidthInPx) {
22
+ const ellipsisInfo = _calculateEllipsisInfo(
23
+ originalText,
24
+ textFont,
25
+ maxWidthInPx
26
+ );
27
+ if (ellipsisInfo === null) {
28
+ return originalText;
29
+ }
30
+ const { ellipsisWidth, avgLetterWidth } = ellipsisInfo;
31
+ const availableTextWidth = maxWidthInPx - ellipsisWidth;
32
+ if (availableTextWidth <= ellipsisWidth) {
33
+ return _ELLIPSIS_CHARACTER;
34
+ }
35
+ const initialPrefixSuffixLength = Math.floor(availableTextWidth / avgLetterWidth / 2) + 1;
36
+ let prefix;
37
+ let suffix;
38
+ let ellipsizedText;
39
+ let approximatedTextWidth;
40
+ let attempt = 1;
41
+ let prefixLength = initialPrefixSuffixLength;
42
+ let suffixLength = initialPrefixSuffixLength;
43
+ do {
44
+ prefixLength -= attempt % 2 === 1 ? 1 : 0;
45
+ suffixLength -= attempt % 2 === 0 ? 1 : 0;
46
+ prefix = originalText.substring(0, prefixLength);
47
+ suffix = originalText.substring(originalText.length - suffixLength);
48
+ ellipsizedText = `${prefix}${_ELLIPSIS_CHARACTER}${suffix}`;
49
+ approximatedTextWidth = _getTextWidth(ellipsizedText, textFont);
50
+ attempt++;
51
+ } while (attempt <= _ELLIPSIS_APPROXIMATION_THRESHOLD && approximatedTextWidth >= maxWidthInPx);
52
+ return ellipsizedText;
53
+ }
54
+ function getFontString(textFont) {
55
+ const { fontStyle, fontWeight, fontSize, fontFamily } = textFont;
56
+ return [
57
+ fontStyle === "normal" ? "" : fontStyle,
58
+ fontWeight === "400" ? "" : fontWeight,
59
+ fontSize,
60
+ fontFamily
61
+ ].filter((value) => value !== void 0 && value !== "").map(
62
+ (value) => (
63
+ // we need to resolve CSS variables manually because they are not supported by the canvas API
64
+ value?.trim().startsWith("var(") ? value.replace(/^\s*var\(--[0-9A-Za-z-]+,\s*([^)]+)\)\s*$/, "$1") : value
65
+ )
66
+ ).join(" ");
67
+ }
68
+ function _calculateEllipsisInfo(originalText, textFont, maxWidthInPx) {
69
+ const originalTextLength = originalText.length;
70
+ if (originalTextLength <= 1) {
71
+ return null;
72
+ }
73
+ const textWidth = _getTextWidth(originalText, textFont);
74
+ const avgLetterWidth = textWidth / originalTextLength;
75
+ return textWidth > maxWidthInPx ? {
76
+ ellipsisWidth: _getTextWidth(_ELLIPSIS_CHARACTER, textFont),
77
+ avgLetterWidth
78
+ } : null;
79
+ }
80
+ function getCanvasContext2d() {
81
+ if (!inMemContext2d) {
82
+ const context = document.createElement("canvas").getContext("2d");
83
+ if (context !== null) {
84
+ context.imageSmoothingEnabled = false;
85
+ context.imageSmoothingQuality = "low";
86
+ inMemContext2d = context;
87
+ } else {
88
+ throw new Error("Failed to create a Canvas 2D context");
89
+ }
90
+ }
91
+ return inMemContext2d;
92
+ }
93
+ export {
94
+ _ELLIPSIS_APPROXIMATION_THRESHOLD,
95
+ _ELLIPSIS_CHARACTER,
96
+ _calculateEllipsisInfo,
97
+ _centerEllipsizeText,
98
+ _getTextHeight,
99
+ _getTextWidth
100
+ };
101
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/typography/utils.ts"],
4
+ "sourcesContent": ["/**\n * @internal\n * Properties describing how a piece of text is formatted. */\nexport type _Font = {\n fontStyle?: string;\n fontWeight?: string;\n fontSize: string;\n fontFamily: string;\n};\n\n/**\n * @internal\n * The Unicode character representing an ellipsis. */\nexport const _ELLIPSIS_CHARACTER = '\\u2026';\n\n/**\n * @internal\n * Max iterations for finding the perfect truncated text for a given width */\nexport const _ELLIPSIS_APPROXIMATION_THRESHOLD = 15;\n\nlet inMemContext2d: CanvasRenderingContext2D;\n\n/**\n * Calculates the width of formatted text in pixels.\n *\n * @param text - The text to calculate the width of\n * @param textFont - The font settings for the text\n * @internal\n */\nexport function _getTextWidth(text: string, textFont: _Font): number {\n const context = getCanvasContext2d();\n\n context.font = getFontString(textFont);\n\n const textMetrics = context.measureText(text);\n\n // this branch is relevant for mocked canvas API in unit tests\n if (textMetrics.width < 0) {\n return textMetrics.width;\n }\n\n // more accurate than using metrics width\n // see https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics#measuring_text_width\n const actualTextWidth =\n Math.abs(textMetrics.actualBoundingBoxLeft) +\n Math.abs(textMetrics.actualBoundingBoxRight);\n\n // Scrap sub-pixel accuracy and always round up to be on the safer side\n return Math.ceil(actualTextWidth);\n}\n\n/**\n * @internal\n * Calculates the height of formatted text in pixels.\n * @param text - The text to calculate the height of\n * @param textFont - The font settings for the text\n */\nexport function _getTextHeight(text: string, textFont: _Font): number {\n const context = getCanvasContext2d();\n\n context.font = getFontString(textFont);\n\n const textMetrics = context.measureText(text);\n\n const actualTextHeight =\n Math.abs(textMetrics.actualBoundingBoxAscent) +\n Math.abs(textMetrics.actualBoundingBoxDescent);\n\n // Scrap sub-pixel accuracy and always round up to be on the safer side\n return Math.ceil(actualTextHeight);\n}\n\n/**\n * Cuts off text that exceeds the maximum width in the center and\n * concatenates both shortened ends of the text with an ellipsis.\n *\n * @param originalText - The text to be truncated if its width exceeds <code>maxWidthInPx</code>\n * @param textFont - Different font settings to be considered when determining the width of the text\n * @param maxWidthInPx - If the text's width exceeds this value, the text will be truncated to a string whose width is guaranteed to be below it\n * @internal\n */\nexport function _centerEllipsizeText(\n originalText: string,\n textFont: _Font,\n maxWidthInPx: number,\n): string {\n const ellipsisInfo = _calculateEllipsisInfo(\n originalText,\n textFont,\n maxWidthInPx,\n );\n\n if (ellipsisInfo === null) {\n return originalText;\n }\n\n const { ellipsisWidth, avgLetterWidth } = ellipsisInfo;\n const availableTextWidth = maxWidthInPx - ellipsisWidth;\n\n if (availableTextWidth <= ellipsisWidth) {\n return _ELLIPSIS_CHARACTER;\n }\n\n const initialPrefixSuffixLength =\n Math.floor(availableTextWidth / avgLetterWidth / 2) + 1;\n\n let prefix: string;\n let suffix: string;\n let ellipsizedText: string;\n let approximatedTextWidth: number;\n let attempt = 1;\n let prefixLength = initialPrefixSuffixLength;\n let suffixLength = initialPrefixSuffixLength;\n\n do {\n prefixLength -= attempt % 2 === 1 ? 1 : 0;\n suffixLength -= attempt % 2 === 0 ? 1 : 0;\n\n prefix = originalText.substring(0, prefixLength);\n suffix = originalText.substring(originalText.length - suffixLength);\n\n ellipsizedText = `${prefix}${_ELLIPSIS_CHARACTER}${suffix}`;\n approximatedTextWidth = _getTextWidth(ellipsizedText, textFont);\n\n attempt++;\n } while (\n attempt <= _ELLIPSIS_APPROXIMATION_THRESHOLD &&\n approximatedTextWidth >= maxWidthInPx\n );\n\n return ellipsizedText;\n}\n\n/**\n * Transforms a font settings object into a CSS font specifier string\n * that can be used on 2D canvas contexts.\n */\nfunction getFontString(textFont: _Font): string {\n const { fontStyle, fontWeight, fontSize, fontFamily } = textFont;\n\n // Note: always drop default values for fontStyle and fontWeight as\n // these can randomly (!) break text width detection!\n return [\n fontStyle === 'normal' ? '' : fontStyle,\n fontWeight === '400' ? '' : fontWeight,\n fontSize,\n fontFamily,\n ]\n .filter((value) => value !== undefined && value !== '')\n .map((value) =>\n // we need to resolve CSS variables manually because they are not supported by the canvas API\n value?.trim().startsWith('var(')\n ? value.replace(/^\\s*var\\(--[0-9A-Za-z-]+,\\s*([^)]+)\\)\\s*$/, '$1')\n : value,\n )\n .join(' ');\n}\n\n/**\n * Returns an object containing the width of a given formatted text and the\n * width of an ellipsis character with the same text format or `null`\n * if the text width does not exceed its maximum available width.\n * @internal\n */\nexport function _calculateEllipsisInfo(\n originalText: string,\n textFont: _Font,\n maxWidthInPx: number,\n): { ellipsisWidth: number; avgLetterWidth: number } | null {\n const originalTextLength = originalText.length;\n\n if (originalTextLength <= 1) {\n return null;\n }\n\n const textWidth = _getTextWidth(originalText, textFont);\n const avgLetterWidth = textWidth / originalTextLength;\n\n return textWidth > maxWidthInPx\n ? {\n ellipsisWidth: _getTextWidth(_ELLIPSIS_CHARACTER, textFont),\n avgLetterWidth,\n }\n : null;\n}\n\n/** Returns the canvas 2D context used for measuring the width of formatted text. */\nfunction getCanvasContext2d() {\n if (!inMemContext2d) {\n const context = document.createElement('canvas').getContext('2d');\n\n if (context !== null) {\n context.imageSmoothingEnabled = false;\n context.imageSmoothingQuality = 'low';\n inMemContext2d = context;\n } else {\n throw new Error('Failed to create a Canvas 2D context');\n }\n }\n\n return inMemContext2d;\n}\n"],
5
+ "mappings": "AAaO,MAAM,sBAAsB;AAK5B,MAAM,oCAAoC;AAEjD,IAAI;AASG,SAAS,cAAc,MAAc,UAAyB;AACnE,QAAM,UAAU,mBAAmB;AAEnC,UAAQ,OAAO,cAAc,QAAQ;AAErC,QAAM,cAAc,QAAQ,YAAY,IAAI;AAG5C,MAAI,YAAY,QAAQ,GAAG;AACzB,WAAO,YAAY;AAAA,EACrB;AAIA,QAAM,kBACJ,KAAK,IAAI,YAAY,qBAAqB,IAC1C,KAAK,IAAI,YAAY,sBAAsB;AAG7C,SAAO,KAAK,KAAK,eAAe;AAClC;AAQO,SAAS,eAAe,MAAc,UAAyB;AACpE,QAAM,UAAU,mBAAmB;AAEnC,UAAQ,OAAO,cAAc,QAAQ;AAErC,QAAM,cAAc,QAAQ,YAAY,IAAI;AAE5C,QAAM,mBACJ,KAAK,IAAI,YAAY,uBAAuB,IAC5C,KAAK,IAAI,YAAY,wBAAwB;AAG/C,SAAO,KAAK,KAAK,gBAAgB;AACnC;AAWO,SAAS,qBACd,cACA,UACA,cACQ;AACR,QAAM,eAAe;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,MAAI,iBAAiB,MAAM;AACzB,WAAO;AAAA,EACT;AAEA,QAAM,EAAE,eAAe,eAAe,IAAI;AAC1C,QAAM,qBAAqB,eAAe;AAE1C,MAAI,sBAAsB,eAAe;AACvC,WAAO;AAAA,EACT;AAEA,QAAM,4BACJ,KAAK,MAAM,qBAAqB,iBAAiB,CAAC,IAAI;AAExD,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI,UAAU;AACd,MAAI,eAAe;AACnB,MAAI,eAAe;AAEnB,KAAG;AACD,oBAAgB,UAAU,MAAM,IAAI,IAAI;AACxC,oBAAgB,UAAU,MAAM,IAAI,IAAI;AAExC,aAAS,aAAa,UAAU,GAAG,YAAY;AAC/C,aAAS,aAAa,UAAU,aAAa,SAAS,YAAY;AAElE,qBAAiB,GAAG,MAAM,GAAG,mBAAmB,GAAG,MAAM;AACzD,4BAAwB,cAAc,gBAAgB,QAAQ;AAE9D;AAAA,EACF,SACE,WAAW,qCACX,yBAAyB;AAG3B,SAAO;AACT;AAMA,SAAS,cAAc,UAAyB;AAC9C,QAAM,EAAE,WAAW,YAAY,UAAU,WAAW,IAAI;AAIxD,SAAO;AAAA,IACL,cAAc,WAAW,KAAK;AAAA,IAC9B,eAAe,QAAQ,KAAK;AAAA,IAC5B;AAAA,IACA;AAAA,EACF,EACG,OAAO,CAAC,UAAU,UAAU,UAAa,UAAU,EAAE,EACrD;AAAA,IAAI,CAAC;AAAA;AAAA,MAEJ,OAAO,KAAK,EAAE,WAAW,MAAM,IAC3B,MAAM,QAAQ,6CAA6C,IAAI,IAC/D;AAAA;AAAA,EACN,EACC,KAAK,GAAG;AACb;AAQO,SAAS,uBACd,cACA,UACA,cAC0D;AAC1D,QAAM,qBAAqB,aAAa;AAExC,MAAI,sBAAsB,GAAG;AAC3B,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,cAAc,cAAc,QAAQ;AACtD,QAAM,iBAAiB,YAAY;AAEnC,SAAO,YAAY,eACf;AAAA,IACE,eAAe,cAAc,qBAAqB,QAAQ;AAAA,IAC1D;AAAA,EACF,IACA;AACN;AAGA,SAAS,qBAAqB;AAC5B,MAAI,CAAC,gBAAgB;AACnB,UAAM,UAAU,SAAS,cAAc,QAAQ,EAAE,WAAW,IAAI;AAEhE,QAAI,YAAY,MAAM;AACpB,cAAQ,wBAAwB;AAChC,cAAQ,wBAAwB;AAChC,uBAAiB;AAAA,IACnB,OAAO;AACL,YAAM,IAAI,MAAM,sCAAsC;AAAA,IACxD;AAAA,EACF;AAEA,SAAO;AACT;",
6
+ "names": []
7
+ }
package/index.d.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from './core/index.js';
2
+ export * from './layouts/index.js';
3
+ export * from './typography/index.js';
package/index.js CHANGED
@@ -15,3 +15,5 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
15
15
  var src_exports = {};
16
16
  module.exports = __toCommonJS(src_exports);
17
17
  __reExport(src_exports, require("./core/index.js"), module.exports);
18
+ __reExport(src_exports, require("./layouts/index.js"), module.exports);
19
+ __reExport(src_exports, require("./typography/index.js"), module.exports);
package/lang/en.json CHANGED
@@ -1,2 +1,8 @@
1
1
  {
2
+ "JzYy8MUVfPcyf4l5": [
3
+ {
4
+ "type": 0,
5
+ "value": "Opening the link in a new window"
6
+ }
7
+ ]
2
8
  }
@@ -1 +1,6 @@
1
- {}
1
+ {
2
+ "JzYy8MUVfPcyf4l5": {
3
+ "notes": "External link icon that describes the external link icon",
4
+ "translation": "Opening the link in a new window"
5
+ }
6
+ }
@@ -0,0 +1,23 @@
1
+ .Divider_dividerCSS__1ljcfp90 {
2
+ border: none;
3
+ margin: 0;
4
+ overflow-wrap: break-word;
5
+ background-color: var(--vars_borderColor__k096v42);
6
+ }
7
+ .Divider_dividerCSS_orientation_horizontal__1ljcfp91 {
8
+ width: 100%;
9
+ height: var(--dt-borders-width-default, 1px);
10
+ }
11
+ .Divider_dividerCSS_orientation_vertical__1ljcfp92 {
12
+ width: var(--dt-borders-width-default, 1px);
13
+ height: 100%;
14
+ }
15
+ .Divider_dividerCSS_compound_0__1ljcfp95 {
16
+ flex-shrink: 0;
17
+ }
18
+ .Divider_dividerCSS_compound_1__1ljcfp96 {
19
+ flex-shrink: 0;
20
+ width: var(--dt-borders-width-default, 1px);
21
+ height: auto;
22
+ align-self: stretch;
23
+ }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { type DataTestId } from '../../core/types/data-props.js';
3
+ import { type StylingProps } from '../../core/types/styling-props.js';
4
+ /** @public
5
+ * Divider component props.
6
+ */
7
+ export interface DividerProps extends StylingProps, DataTestId {
8
+ /**
9
+ * Orientation of the Divider component.
10
+ * @defaultValue 'horizontal'
11
+ */
12
+ orientation?: 'horizontal' | 'vertical';
13
+ /**
14
+ * Control the HTML tag used for rendering the Divider.
15
+ * @defaultValue 'div'
16
+ */
17
+ as?: 'hr' | 'div';
18
+ /**
19
+ * Indicate whether the Divider is used inside a Flex component to apply the right styling.
20
+ * If set to false, make sure to have an explicit width/height style set on a parent HTML tag.
21
+ * @defaultValue true
22
+ */
23
+ flexItem?: boolean;
24
+ /**
25
+ * The color of the Divider.
26
+ * @defaultValue 'neutral'
27
+ */
28
+ color?: 'primary' | 'neutral' | 'success' | 'warning' | 'critical';
29
+ /**
30
+ * The visual style of the Divider.
31
+ * @defaultValue 'default'
32
+ */
33
+ variant?: 'default' | 'accent';
34
+ }
35
+ /**
36
+ * The `Divider` component visually separates groups of content.
37
+ * @public
38
+ */
39
+ export declare const Divider: (props: DividerProps & React.RefAttributes<HTMLDivElement | HTMLHRElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,67 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var Divider_exports = {};
29
+ __export(Divider_exports, {
30
+ Divider: () => Divider
31
+ });
32
+ module.exports = __toCommonJS(Divider_exports);
33
+ var import_clsx = __toESM(require("clsx"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_Divider_css = require("./Divider.sty.js");
36
+ var import_colorUtils_css = require("../../core/utils/colorUtils.sty.js");
37
+ const Divider = /* @__PURE__ */ (0, import_react.forwardRef)((props, ref) => {
38
+ const {
39
+ orientation = "horizontal",
40
+ flexItem = true,
41
+ as = "div",
42
+ color = "neutral",
43
+ variant = "default",
44
+ "data-testid": dataTestId,
45
+ className: consumerClassName,
46
+ style: consumerStyle,
47
+ ...remainingProps
48
+ } = props;
49
+ const DividerTag = as;
50
+ return /* @__PURE__ */ import_react.default.createElement(
51
+ DividerTag,
52
+ {
53
+ role: "separator",
54
+ "aria-orientation": orientation === "vertical" ? orientation : void 0,
55
+ ref,
56
+ "data-testid": dataTestId,
57
+ className: (0, import_clsx.default)(
58
+ (0, import_colorUtils_css.colorUtilsCSS)({ color, variant }),
59
+ (0, import_Divider_css.dividerCSS)({ orientation, flexItem }),
60
+ consumerClassName
61
+ ),
62
+ style: consumerStyle,
63
+ ...remainingProps
64
+ }
65
+ );
66
+ });
67
+ Divider.displayName = "Divider";
@@ -0,0 +1,16 @@
1
+ export declare const dividerCSS: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ orientation: {
3
+ horizontal: {
4
+ width: "100%";
5
+ height: string;
6
+ };
7
+ vertical: {
8
+ width: string;
9
+ height: "100%";
10
+ };
11
+ };
12
+ flexItem: {
13
+ true: {};
14
+ false: {};
15
+ };
16
+ }>;
@@ -0,0 +1,26 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var Divider_css_exports = {};
19
+ __export(Divider_css_exports, {
20
+ dividerCSS: () => dividerCSS
21
+ });
22
+ module.exports = __toCommonJS(Divider_css_exports);
23
+ var import_colorUtils_css_ts_vanilla = require("../../core/utils/colorUtils.css");
24
+ var import_Divider_css_ts_vanilla = require("./Divider.css");
25
+ var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
26
+ var dividerCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "Divider_dividerCSS__1ljcfp90", variantClassNames: { orientation: { horizontal: "Divider_dividerCSS_orientation_horizontal__1ljcfp91", vertical: "Divider_dividerCSS_orientation_vertical__1ljcfp92" }, flexItem: { true: "Divider_dividerCSS_flexItem_true__1ljcfp93", false: "Divider_dividerCSS_flexItem_false__1ljcfp94" } }, defaultVariants: {}, compoundVariants: [[{ orientation: "horizontal", flexItem: false }, "Divider_dividerCSS_compound_0__1ljcfp95"], [{ orientation: "vertical", flexItem: true }, "Divider_dividerCSS_compound_1__1ljcfp96"]] });
@@ -0,0 +1,2 @@
1
+ export { Divider } from './Divider/Divider.js';
2
+ export type { DividerProps } from './Divider/Divider.js';
@@ -0,0 +1,23 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var layouts_exports = {};
19
+ __export(layouts_exports, {
20
+ Divider: () => import_Divider.Divider
21
+ });
22
+ module.exports = __toCommonJS(layouts_exports);
23
+ var import_Divider = require("./Divider/Divider.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace/strato-components",
3
- "version": "0.84.21",
3
+ "version": "0.84.42",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "lang": "lang/uncompiled",
@@ -26,6 +26,13 @@
26
26
  "module": "./esm/core/index.js",
27
27
  "import": "./esm/core/index.js"
28
28
  },
29
+ "./typography": {
30
+ "types": "./typography/index.d.ts",
31
+ "require": "./typography/index.js",
32
+ "browser": "./esm/typography/index.js",
33
+ "module": "./esm/typography/index.js",
34
+ "import": "./esm/typography/index.js"
35
+ },
29
36
  "./testing": {
30
37
  "types": "./testing/index.d.ts",
31
38
  "require": "./testing/index.js"
@@ -33,6 +40,13 @@
33
40
  "./testing/jest": {
34
41
  "types": "./testing/jest/index.d.ts",
35
42
  "require": "./testing/jest/index.js"
43
+ },
44
+ "./layouts": {
45
+ "types": "./layouts/index.d.ts",
46
+ "require": "./layouts/index.js",
47
+ "browser": "./esm/layouts/index.js",
48
+ "module": "./esm/layouts/index.js",
49
+ "import": "./esm/layouts/index.js"
36
50
  }
37
51
  },
38
52
  "dependencies": {
@@ -42,7 +56,8 @@
42
56
  "clsx": "^2.1.0",
43
57
  "lodash-es": "^4.17.21",
44
58
  "wicg-inert": "^3.1.2",
45
- "@dynatrace/strato-design-tokens": "0.20.10",
59
+ "use-resize-observer": "^9.1.0",
60
+ "@dynatrace/strato-design-tokens": "0.20.30",
46
61
  "@dynatrace/strato-icons": "0.37.0"
47
62
  },
48
63
  "peerDependencies": {
@@ -0,0 +1,64 @@
1
+ .textStyle_textStyleCSS_compound_0__da9a8v7 {
2
+ font-family: var(--dt-typography-code-base-default-family, Roboto Mono,monospace);
3
+ font-weight: var(--dt-typography-code-base-default-weight, 400);
4
+ font-size: var(--dt-typography-code-base-default-size, 14px);
5
+ line-height: var(--dt-typography-code-base-default-line-height, 1.4285714286);
6
+ text-decoration: var(--dt-typography-code-base-default-text-decoration, none);
7
+ text-transform: var(--dt-typography-code-base-default-text-transform, none);
8
+ }
9
+ .textStyle_textStyleCSS_compound_1__da9a8v8 {
10
+ font-family: var(--dt-typography-code-base-emphasized-family, Roboto Mono,monospace);
11
+ font-weight: var(--dt-typography-code-base-emphasized-weight, 500);
12
+ font-size: var(--dt-typography-code-base-emphasized-size, 14px);
13
+ line-height: var(--dt-typography-code-base-emphasized-line-height, 1.4285714286);
14
+ text-decoration: var(--dt-typography-code-base-emphasized-text-decoration, none);
15
+ text-transform: var(--dt-typography-code-base-emphasized-text-transform, none);
16
+ }
17
+ .textStyle_textStyleCSS_compound_2__da9a8v9 {
18
+ font-family: var(--dt-typography-code-small-default-family, Roboto Mono,monospace);
19
+ font-weight: var(--dt-typography-code-small-default-weight, 400);
20
+ font-size: var(--dt-typography-code-small-default-size, 12px);
21
+ line-height: var(--dt-typography-code-small-default-line-height, 1.333333333);
22
+ text-decoration: var(--dt-typography-code-small-default-text-decoration, none);
23
+ text-transform: var(--dt-typography-code-small-default-text-transform, none);
24
+ }
25
+ .textStyle_textStyleCSS_compound_3__da9a8va {
26
+ font-family: var(--dt-typography-code-small-emphasized-family, Roboto Mono,monospace);
27
+ font-weight: var(--dt-typography-code-small-emphasized-weight, 500);
28
+ font-size: var(--dt-typography-code-small-emphasized-size, 12px);
29
+ line-height: var(--dt-typography-code-small-emphasized-line-height, 1.333333333);
30
+ text-decoration: var(--dt-typography-code-small-emphasized-text-decoration, none);
31
+ text-transform: var(--dt-typography-code-small-emphasized-text-transform, none);
32
+ }
33
+ .textStyle_textStyleCSS_compound_4__da9a8vb {
34
+ font-family: var(--dt-typography-text-base-default-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
35
+ font-weight: var(--dt-typography-text-base-default-weight, 400);
36
+ font-size: var(--dt-typography-text-base-default-size, 14px);
37
+ line-height: var(--dt-typography-text-base-default-line-height, 1.4285714286);
38
+ text-decoration: var(--dt-typography-text-base-default-text-decoration, none);
39
+ text-transform: var(--dt-typography-text-base-default-text-transform, none);
40
+ }
41
+ .textStyle_textStyleCSS_compound_5__da9a8vc {
42
+ font-family: var(--dt-typography-text-base-emphasized-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
43
+ font-weight: var(--dt-typography-text-base-emphasized-weight, 500);
44
+ font-size: var(--dt-typography-text-base-emphasized-size, 14px);
45
+ line-height: var(--dt-typography-text-base-emphasized-line-height, 1.4285714286);
46
+ text-decoration: var(--dt-typography-text-base-emphasized-text-decoration, none);
47
+ text-transform: var(--dt-typography-text-base-emphasized-text-transform, none);
48
+ }
49
+ .textStyle_textStyleCSS_compound_6__da9a8vd {
50
+ font-family: var(--dt-typography-text-small-default-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
51
+ font-weight: var(--dt-typography-text-small-default-weight, 400);
52
+ font-size: var(--dt-typography-text-small-default-size, 12px);
53
+ line-height: var(--dt-typography-text-small-default-line-height, 1.333333333);
54
+ text-decoration: var(--dt-typography-text-small-default-text-decoration, none);
55
+ text-transform: var(--dt-typography-text-small-default-text-transform, none);
56
+ }
57
+ .textStyle_textStyleCSS_compound_7__da9a8ve {
58
+ font-family: var(--dt-typography-text-small-emphasized-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
59
+ font-weight: var(--dt-typography-text-small-emphasized-weight, 500);
60
+ font-size: var(--dt-typography-text-small-emphasized-size, 12px);
61
+ line-height: var(--dt-typography-text-small-emphasized-line-height, 1.333333333);
62
+ text-decoration: var(--dt-typography-text-small-emphasized-text-decoration, none);
63
+ text-transform: var(--dt-typography-text-small-emphasized-text-transform, none);
64
+ }
@@ -0,0 +1,12 @@
1
+ export declare const textStyleCSS: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ fontStyle: {
3
+ code: {};
4
+ text: {};
5
+ };
6
+ textStyle: {
7
+ base: {};
8
+ 'base-emphasized': {};
9
+ small: {};
10
+ 'small-emphasized': {};
11
+ };
12
+ }>;
@@ -0,0 +1,25 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var textStyle_css_exports = {};
19
+ __export(textStyle_css_exports, {
20
+ textStyleCSS: () => textStyleCSS
21
+ });
22
+ module.exports = __toCommonJS(textStyle_css_exports);
23
+ var import_textStyle_css_ts_vanilla = require("./textStyle.css");
24
+ var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
25
+ var textStyleCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "textStyle__da9a8v0", variantClassNames: { fontStyle: { code: "textStyle_textStyleCSS_fontStyle_code__da9a8v1", text: "textStyle_textStyleCSS_fontStyle_text__da9a8v2" }, textStyle: { base: "textStyle_textStyleCSS_textStyle_base__da9a8v3", "base-emphasized": "textStyle_textStyleCSS_textStyle_base-emphasized__da9a8v4", small: "textStyle_textStyleCSS_textStyle_small__da9a8v5", "small-emphasized": "textStyle_textStyleCSS_textStyle_small-emphasized__da9a8v6" } }, defaultVariants: { fontStyle: "text", textStyle: "base" }, compoundVariants: [[{ fontStyle: "code", textStyle: "base" }, "textStyle_textStyleCSS_compound_0__da9a8v7"], [{ fontStyle: "code", textStyle: "base-emphasized" }, "textStyle_textStyleCSS_compound_1__da9a8v8"], [{ fontStyle: "code", textStyle: "small" }, "textStyle_textStyleCSS_compound_2__da9a8v9"], [{ fontStyle: "code", textStyle: "small-emphasized" }, "textStyle_textStyleCSS_compound_3__da9a8va"], [{ fontStyle: "text", textStyle: "base" }, "textStyle_textStyleCSS_compound_4__da9a8vb"], [{ fontStyle: "text", textStyle: "base-emphasized" }, "textStyle_textStyleCSS_compound_5__da9a8vc"], [{ fontStyle: "text", textStyle: "small" }, "textStyle_textStyleCSS_compound_6__da9a8vd"], [{ fontStyle: "text", textStyle: "small-emphasized" }, "textStyle_textStyleCSS_compound_7__da9a8ve"]] });
@@ -1,4 +1,4 @@
1
- import { RenderOptions, RenderResult } from '@testing-library/react';
1
+ import { type RenderOptions, type RenderResult } from '@testing-library/react';
2
2
  import React from 'react';
3
3
  type RenderWithIntlOptions = {
4
4
  locale?: string;
@@ -1,4 +1,4 @@
1
- import { PartialDeep } from 'type-fest';
1
+ import type { PartialDeep } from 'type-fest';
2
2
  /** Mock the Resize Observer */
3
3
  export declare function setupResizeObserverMock(
4
4
  /** When the Resize Observer should return specific results, you can pass them here */