@dynatrace/strato-components 0.85.10 → 0.85.32
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.
- package/buttons/button/Button.css +1 -0
- package/buttons/button/Button.d.ts +4 -4
- package/buttons/button/Label.d.ts +1 -1
- package/buttons/button/Prefix.d.ts +1 -1
- package/buttons/button/Suffix.d.ts +1 -1
- package/buttons/index.d.ts +2 -0
- package/buttons/index.js +2 -0
- package/buttons/intent-button/IntentButton.d.ts +44 -0
- package/buttons/intent-button/IntentButton.js +102 -0
- package/buttons/intent-button/useIntentButton.d.ts +12 -0
- package/buttons/intent-button/useIntentButton.js +72 -0
- package/content/index.d.ts +4 -0
- package/content/index.js +5 -1
- package/content/progress/ProgressBar.d.ts +4 -4
- package/content/progress/ProgressBarIcon.d.ts +1 -1
- package/content/progress/ProgressBarLabel.d.ts +1 -1
- package/content/progress/ProgressBarValue.d.ts +1 -1
- package/content/progress/ProgressCircle.d.ts +1 -1
- package/content/skeleton/Skeleton.css +33 -0
- package/content/skeleton/Skeleton.d.ts +30 -0
- package/content/skeleton/Skeleton.js +60 -0
- package/content/skeleton/Skeleton.sty.d.ts +10 -0
- package/content/skeleton/Skeleton.sty.js +25 -0
- package/content/skeleton/SkeletonText.d.ts +24 -0
- package/content/skeleton/SkeletonText.js +84 -0
- package/core/components/app-root/AppRoot.d.ts +2 -2
- package/core/components/focus-scope/FocusScope.d.ts +1 -1
- package/core/contexts/FocusContext.d.ts +1 -2
- package/core/providers/FocusProvider.d.ts +2 -3
- package/esm/buttons/button/Button.css +1 -0
- package/esm/buttons/index.js +2 -0
- package/esm/buttons/index.js.map +2 -2
- package/esm/buttons/intent-button/IntentButton.js +74 -0
- package/esm/buttons/intent-button/IntentButton.js.map +7 -0
- package/esm/buttons/intent-button/useIntentButton.js +57 -0
- package/esm/buttons/intent-button/useIntentButton.js.map +7 -0
- package/esm/content/index.js +5 -1
- package/esm/content/index.js.map +2 -2
- package/esm/content/skeleton/Skeleton.css +33 -0
- package/esm/content/skeleton/Skeleton.js +32 -0
- package/esm/content/skeleton/Skeleton.js.map +7 -0
- package/esm/content/skeleton/Skeleton.sty.js +7 -0
- package/esm/content/skeleton/Skeleton.sty.js.map +7 -0
- package/esm/content/skeleton/SkeletonText.js +56 -0
- package/esm/content/skeleton/SkeletonText.js.map +7 -0
- package/esm/core/components/focus-scope/FocusScope.js.map +1 -1
- package/esm/core/contexts/FocusContext.js.map +2 -2
- package/esm/core/providers/FocusProvider.js.map +2 -2
- package/esm/layouts/{Divider → divider}/Divider.css +5 -5
- package/esm/layouts/{Divider → divider}/Divider.js.map +1 -1
- package/esm/layouts/{Divider → divider}/Divider.sty.js +1 -1
- package/esm/layouts/{Divider → divider}/Divider.sty.js.map +2 -2
- package/esm/layouts/helpers/spacingToCss.js +13 -0
- package/esm/layouts/helpers/spacingToCss.js.map +7 -0
- package/esm/layouts/hooks/useBreakpoint.js +44 -0
- package/esm/layouts/hooks/useBreakpoint.js.map +7 -0
- package/esm/layouts/hooks/useLayoutSizeProps.js +15 -0
- package/esm/layouts/hooks/useLayoutSizeProps.js.map +7 -0
- package/esm/layouts/hooks/useLayoutStyles.js +105 -0
- package/esm/layouts/hooks/useLayoutStyles.js.map +7 -0
- package/esm/layouts/hooks/useMarginProps.js +55 -0
- package/esm/layouts/hooks/useMarginProps.js.map +7 -0
- package/esm/layouts/hooks/usePaddingProps.js +59 -0
- package/esm/layouts/hooks/usePaddingProps.js.map +7 -0
- package/esm/layouts/index.js +8 -2
- package/esm/layouts/index.js.map +2 -2
- package/esm/layouts/surface/Surface.css +95 -0
- package/esm/layouts/surface/Surface.js +84 -0
- package/esm/layouts/surface/Surface.js.map +7 -0
- package/esm/layouts/surface/Surface.sty.js +10 -0
- package/esm/layouts/surface/Surface.sty.js.map +7 -0
- package/esm/layouts/surface/variables.sty.js +5 -0
- package/esm/layouts/surface/variables.sty.js.map +7 -0
- package/esm/layouts/types/layout.types.js +1 -0
- package/esm/layouts/types/layout.types.js.map +7 -0
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.js.map +2 -2
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js.map +2 -2
- package/{typography/Code → esm/typography/code}/Code.css +1 -1
- package/esm/typography/{Code → code}/Code.js.map +2 -2
- package/esm/typography/{Code → code}/Code.sty.js +1 -1
- package/esm/typography/{Code → code}/Code.sty.js.map +2 -2
- package/esm/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
- package/esm/typography/{Emphasis → emphasis}/Emphasis.js.map +2 -2
- package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
- package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js.map +2 -2
- package/{typography/ExternalLink → esm/typography/external-link}/ExternalLink.css +6 -6
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.js.map +2 -2
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js.map +2 -2
- package/esm/typography/{Heading → heading}/Heading.css +7 -7
- package/esm/typography/heading/Heading.js.map +7 -0
- package/esm/typography/heading/Heading.sty.js +7 -0
- package/esm/typography/{Heading → heading}/Heading.sty.js.map +2 -2
- package/esm/typography/{Highlight → highlight}/Highlight.css +1 -1
- package/esm/typography/{Highlight → highlight}/Highlight.js.map +2 -2
- package/esm/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
- package/esm/typography/{Highlight → highlight}/Highlight.sty.js.map +2 -2
- package/esm/typography/index.js +13 -13
- package/esm/typography/index.js.map +1 -1
- package/{typography/Link → esm/typography/link}/Link.css +4 -4
- package/esm/typography/{Link → link}/Link.js +1 -1
- package/esm/typography/link/Link.js.map +7 -0
- package/esm/typography/{Link → link}/Link.sty.js +1 -1
- package/esm/typography/{Link → link}/Link.sty.js.map +2 -2
- package/esm/typography/{List → list}/List.css +4 -4
- package/esm/typography/{List → list}/List.js +1 -1
- package/esm/typography/{List → list}/List.js.map +2 -2
- package/esm/typography/{List → list}/List.sty.js +2 -2
- package/esm/typography/{List → list}/List.sty.js.map +2 -2
- package/esm/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
- package/esm/typography/{Paragraph → paragraph}/Paragraph.js.map +2 -2
- package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
- package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js.map +2 -2
- package/{typography/Strikethrough → esm/typography/strikethrough}/Strikethrough.css +1 -1
- package/esm/typography/strikethrough/Strikethrough.js.map +7 -0
- package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
- package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js.map +2 -2
- package/{typography/Strong → esm/typography/strong}/Strong.css +1 -1
- package/esm/typography/{Strong → strong}/Strong.js.map +2 -2
- package/esm/typography/{Strong → strong}/Strong.sty.js +1 -1
- package/esm/typography/{Strong → strong}/Strong.sty.js.map +2 -2
- package/{typography/Text → esm/typography/text}/Text.css +3 -3
- package/esm/typography/text/Text.js.map +7 -0
- package/esm/typography/{Text → text}/Text.sty.js +1 -1
- package/esm/typography/{Text → text}/Text.sty.js.map +2 -2
- package/{typography/TextEllipsis → esm/typography/text-ellipsis}/TextEllipsis.css +4 -4
- package/esm/typography/text-ellipsis/TextEllipsis.js.map +7 -0
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js +7 -0
- package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js.map +2 -2
- package/lang/en.json +6 -0
- package/lang/ja.json +24 -0
- package/lang/uncompiled/en.json +4 -0
- package/lang/uncompiled/ja.json +14 -1
- package/layouts/{Divider → divider}/Divider.css +5 -5
- package/layouts/{Divider → divider}/Divider.d.ts +1 -1
- package/layouts/{Divider → divider}/Divider.sty.js +1 -1
- package/layouts/helpers/spacingToCss.d.ts +6 -0
- package/layouts/helpers/spacingToCss.js +29 -0
- package/layouts/hooks/useBreakpoint.d.ts +27 -0
- package/layouts/hooks/useBreakpoint.js +62 -0
- package/layouts/hooks/useLayoutSizeProps.d.ts +6 -0
- package/layouts/hooks/useLayoutSizeProps.js +33 -0
- package/layouts/hooks/useLayoutStyles.d.ts +7 -0
- package/layouts/hooks/useLayoutStyles.js +123 -0
- package/layouts/hooks/useMarginProps.d.ts +7 -0
- package/layouts/hooks/useMarginProps.js +73 -0
- package/layouts/hooks/usePaddingProps.d.ts +7 -0
- package/layouts/hooks/usePaddingProps.js +77 -0
- package/layouts/index.d.ts +7 -2
- package/layouts/index.js +8 -2
- package/layouts/surface/Surface.css +95 -0
- package/layouts/surface/Surface.d.ts +46 -0
- package/layouts/surface/Surface.js +110 -0
- package/layouts/surface/Surface.sty.d.ts +43 -0
- package/layouts/surface/Surface.sty.js +28 -0
- package/layouts/surface/variables.sty.d.ts +1 -0
- package/layouts/surface/variables.sty.js +23 -0
- package/layouts/types/layout.types.d.ts +64 -0
- package/layouts/types/layout.types.js +15 -0
- package/package.json +11 -4
- package/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
- package/typography/{BlockQuote → block-quote}/Blockquote.d.ts +2 -2
- package/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
- package/{esm/typography/Code → typography/code}/Code.css +1 -1
- package/typography/{Code → code}/Code.d.ts +2 -2
- package/typography/{Code → code}/Code.sty.js +1 -1
- package/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
- package/typography/{Emphasis → emphasis}/Emphasis.d.ts +2 -2
- package/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
- package/{esm/typography/ExternalLink → typography/external-link}/ExternalLink.css +6 -6
- package/typography/{ExternalLink → external-link}/ExternalLink.d.ts +2 -2
- package/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
- package/typography/{Heading → heading}/Heading.css +7 -7
- package/typography/{Heading → heading}/Heading.d.ts +4 -3
- package/typography/{Heading → heading}/Heading.sty.js +1 -1
- package/typography/{Highlight → highlight}/Highlight.css +1 -1
- package/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
- package/typography/index.d.ts +26 -26
- package/typography/index.js +13 -13
- package/{esm/typography/Link → typography/link}/Link.css +4 -4
- package/typography/{Link → link}/Link.js +1 -1
- package/typography/{Link → link}/Link.sty.js +1 -1
- package/typography/{List → list}/List.css +4 -4
- package/typography/{List → list}/List.d.ts +2 -2
- package/typography/{List → list}/List.js +1 -1
- package/typography/{List → list}/List.sty.js +2 -2
- package/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
- package/typography/{Paragraph → paragraph}/Paragraph.d.ts +2 -2
- package/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
- package/{esm/typography/Strikethrough → typography/strikethrough}/Strikethrough.css +1 -1
- package/typography/{Strikethrough → strikethrough}/Strikethrough.d.ts +3 -3
- package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
- package/{esm/typography/Strong → typography/strong}/Strong.css +1 -1
- package/typography/{Strong → strong}/Strong.d.ts +2 -2
- package/typography/{Strong → strong}/Strong.sty.js +1 -1
- package/{esm/typography/Text → typography/text}/Text.css +3 -3
- package/typography/{Text → text}/Text.d.ts +5 -3
- package/typography/{Text → text}/Text.sty.js +1 -1
- package/{esm/typography/TextEllipsis → typography/text-ellipsis}/TextEllipsis.css +4 -4
- package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.d.ts +4 -4
- package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js +1 -1
- package/esm/typography/Heading/Heading.js.map +0 -7
- package/esm/typography/Heading/Heading.sty.js +0 -7
- package/esm/typography/Link/Link.js.map +0 -7
- package/esm/typography/Strikethrough/Strikethrough.js.map +0 -7
- package/esm/typography/Text/Text.js.map +0 -7
- package/esm/typography/TextEllipsis/TextEllipsis.js.map +0 -7
- package/esm/typography/TextEllipsis/TextEllipsis.sty.js +0 -7
- package/esm/layouts/{Divider → divider}/Divider.js +0 -0
- package/esm/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
- package/esm/typography/{Code → code}/Code.js +0 -0
- package/esm/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
- package/esm/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
- package/esm/typography/{Heading → heading}/Heading.js +0 -0
- package/esm/typography/{Highlight → highlight}/Highlight.js +0 -0
- package/esm/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
- package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
- package/esm/typography/{Strong → strong}/Strong.js +0 -0
- package/esm/typography/{Text → text}/Text.js +0 -0
- package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
- package/layouts/{Divider → divider}/Divider.js +0 -0
- package/layouts/{Divider → divider}/Divider.sty.d.ts +0 -0
- package/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
- package/typography/{BlockQuote → block-quote}/Blockquote.sty.d.ts +0 -0
- package/typography/{Code → code}/Code.js +0 -0
- package/typography/{Code → code}/Code.sty.d.ts +0 -0
- package/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
- package/typography/{Emphasis → emphasis}/Emphasis.sty.d.ts +0 -0
- package/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
- package/typography/{ExternalLink → external-link}/ExternalLink.sty.d.ts +0 -0
- package/typography/{Heading → heading}/Heading.js +0 -0
- package/typography/{Heading → heading}/Heading.sty.d.ts +0 -0
- package/typography/{Highlight → highlight}/Highlight.d.ts +1 -1
- package/typography/{Highlight → highlight}/Highlight.js +0 -0
- package/typography/{Highlight → highlight}/Highlight.sty.d.ts +0 -0
- package/typography/{Link → link}/Link.d.ts +1 -1
- /package/typography/{Link → link}/Link.sty.d.ts +0 -0
- /package/typography/{List → list}/List.sty.d.ts +0 -0
- /package/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
- /package/typography/{Paragraph → paragraph}/Paragraph.sty.d.ts +0 -0
- /package/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
- /package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.d.ts +0 -0
- /package/typography/{Strong → strong}/Strong.js +0 -0
- /package/typography/{Strong → strong}/Strong.sty.d.ts +0 -0
- /package/typography/{Text → text}/Text.js +0 -0
- /package/typography/{Text → text}/Text.sty.d.ts +0 -0
- /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
- /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\n\nimport { blockquoteCSS } from './Blockquote.sty.js';\nimport type {\n DataTestId,\n StylingProps,\n WithChildren,\n} from '../../core/index.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\n\n/**\n * The props for the Blockquote component.\n * @public\n */\nexport interface BlockquoteProps\n extends WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {\n /**\n * A URL that designates a source document or message for the information quoted.\n * This attribute is intended to point to information explaining the context for the quoted content.\n */\n cite?: string;\n}\n\n/**\n *
|
|
3
|
+
"sources": ["../../../../src/typography/block-quote/Blockquote.tsx"],
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\n\nimport { blockquoteCSS } from './Blockquote.sty.js';\nimport type {\n DataTestId,\n StylingProps,\n WithChildren,\n} from '../../core/index.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\n\n/**\n * The props for the Blockquote component.\n * @public\n */\nexport interface BlockquoteProps\n extends WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {\n /**\n * A URL that designates a source document or message for the information quoted.\n * This attribute is intended to point to information explaining the context for the quoted content.\n */\n cite?: string;\n}\n\n/**\n * The `Blockquote` component wraps longer text blocks and indicates that the passage is quoted from another source.\n * @public\n */\nexport const Blockquote = /* @__PURE__ */ forwardRef<\n HTMLQuoteElement,\n BlockquoteProps\n>((props, ref) => {\n const {\n children,\n cite,\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 <blockquote\n cite={cite}\n ref={ref}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(blockquoteCSS, consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n {children}\n </blockquote>\n );\n});\n\n(Blockquote as typeof Blockquote & { displayName: string }).displayName =\n 'Blockquote';\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAAS,kBAAkB;AAElC,SAAS,qBAAqB;AA4BvB,MAAM,aAA6B,2BAGxC,CAAC,OAAO,QAAQ;AAChB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EACL,IAAI;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,eAAa;AAAA,MACb,mBAAiB;AAAA,MACjB,oBAAkB;AAAA,MAClB,WAAW,KAAK,eAAe,iBAAiB;AAAA,MAChD,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAEA,WAA2D,cAC1D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './Blockquote.css';\nexport var blockquoteCSS = '
|
|
3
|
+
"sources": ["../../../../src/typography/block-quote/Blockquote.css.ts"],
|
|
4
|
+
"sourcesContent": ["import './Blockquote.css';\nexport var blockquoteCSS = 'Blockquote_blockquoteCSS__1knl9z60';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACA,IAAI,gBAAgB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
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 *
|
|
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 * 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/design/components-preview/content/CodeSnippet/ | `CodeSnippet`}\n * component instead.\n * @public\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
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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './Code.css';\nexport var codeCSS = '
|
|
3
|
+
"sources": ["../../../../src/typography/code/Code.css.ts"],
|
|
4
|
+
"sourcesContent": ["import './Code.css';\nexport var codeCSS = 'Code_codeCSS__1v51izp0';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACA,IAAI,UAAU;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
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 *
|
|
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 * The `Emphasis` component adds visual and semantic emphasis to stressed or essential content.\n * @public\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
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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './Emphasis.css';\nexport var emphasisCSS = '
|
|
3
|
+
"sources": ["../../../../src/typography/emphasis/Emphasis.css.ts"],
|
|
4
|
+
"sourcesContent": ["import './Emphasis.css';\nexport var emphasisCSS = 'Emphasis_emphasisCSS__1r35rtu0';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACA,IAAI,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ExternalLink_externalLinkCSS__1v1skpy0 {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
color: var(--dt-colors-text-primary-default, #454cc9);
|
|
4
4
|
text-decoration: underline;
|
|
5
5
|
overflow-wrap: anywhere;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
.ExternalLink_externalLinkCSS__1v1skpy0:hover {
|
|
8
8
|
color: var(--dt-colors-text-primary-default-hover, #3332ae);
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.ExternalLink_externalLinkCSS__1v1skpy0:active {
|
|
11
11
|
color: var(--dt-colors-text-primary-default-active, #241193);
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.ExternalLink_externalLinkCSS__1v1skpy0:focus-visible {
|
|
14
14
|
text-decoration: none;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.ExternalLink_externalLinkCSS__1v1skpy0 > span {
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.ExternalLink_externalLinkCSS__1v1skpy0 > span > svg {
|
|
21
21
|
margin-left: var(--dt-spacings-size-2, 2px);
|
|
22
22
|
align-self: center;
|
|
23
23
|
min-width: var(--dt-spacings-size-20, 20px);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
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 *
|
|
3
|
+
"sources": ["../../../../src/typography/external-link/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 * 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/design/components/typography/Link/ | `Link`}\n * component instead.\n * @public\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 \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
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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './ExternalLink.css';\nexport var externalLinkCSS = '
|
|
3
|
+
"sources": ["../../../../src/typography/external-link/ExternalLink.css.ts"],
|
|
4
|
+
"sourcesContent": ["import './ExternalLink.css';\nexport var externalLinkCSS = 'ExternalLink_externalLinkCSS__1v1skpy0';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACA,IAAI,kBAAkB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.
|
|
1
|
+
.Heading_headingCSS__5ei34w0 {
|
|
2
2
|
margin: 0;
|
|
3
3
|
overflow-wrap: break-word;
|
|
4
4
|
font-style: normal;
|
|
5
5
|
color: var(--dt-colors-text-neutral-default, #2b2a58);
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
.Heading_headingCSS_visualLevel_1__5ei34w1 {
|
|
8
8
|
font-family: var(--dt-typography-heading-level-1-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
|
|
9
9
|
font-size: var(--dt-typography-heading-level-1-size, 32px);
|
|
10
10
|
font-weight: var(--dt-typography-heading-level-1-weight, 600);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
text-transform: var(--dt-typography-heading-level-1-text-transform, none);
|
|
13
13
|
text-decoration: var(--dt-typography-heading-level-1-text-decoration, none);
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.Heading_headingCSS_visualLevel_2__5ei34w2 {
|
|
16
16
|
font-family: var(--dt-typography-heading-level-2-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
|
|
17
17
|
font-size: var(--dt-typography-heading-level-2-size, 28px);
|
|
18
18
|
font-weight: var(--dt-typography-heading-level-2-weight, 600);
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
text-transform: var(--dt-typography-heading-level-2-text-transform, none);
|
|
21
21
|
text-decoration: var(--dt-typography-heading-level-2-text-decoration, none);
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
.Heading_headingCSS_visualLevel_3__5ei34w3 {
|
|
24
24
|
font-family: var(--dt-typography-heading-level-3-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
|
|
25
25
|
font-size: var(--dt-typography-heading-level-3-size, 24px);
|
|
26
26
|
font-weight: var(--dt-typography-heading-level-3-weight, 600);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
text-transform: var(--dt-typography-heading-level-3-text-transform, none);
|
|
29
29
|
text-decoration: var(--dt-typography-heading-level-3-text-decoration, none);
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.Heading_headingCSS_visualLevel_4__5ei34w4 {
|
|
32
32
|
font-family: var(--dt-typography-heading-level-4-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
|
|
33
33
|
font-size: var(--dt-typography-heading-level-4-size, 20px);
|
|
34
34
|
font-weight: var(--dt-typography-heading-level-4-weight, 600);
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
text-transform: var(--dt-typography-heading-level-4-text-transform, none);
|
|
37
37
|
text-decoration: var(--dt-typography-heading-level-4-text-decoration, none);
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.Heading_headingCSS_visualLevel_5__5ei34w5 {
|
|
40
40
|
font-family: var(--dt-typography-heading-level-5-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
|
|
41
41
|
font-size: var(--dt-typography-heading-level-5-size, 16px);
|
|
42
42
|
font-weight: var(--dt-typography-heading-level-5-weight, 600);
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
text-transform: var(--dt-typography-heading-level-5-text-transform, none);
|
|
45
45
|
text-decoration: var(--dt-typography-heading-level-5-text-decoration, none);
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.Heading_headingCSS_visualLevel_6__5ei34w6 {
|
|
48
48
|
font-family: var(--dt-typography-heading-level-6-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
|
|
49
49
|
font-size: var(--dt-typography-heading-level-6-size, 14px);
|
|
50
50
|
font-weight: var(--dt-typography-heading-level-6-weight, 600);
|
|
@@ -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 * Props used for the Heading component\n * @public\n */\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 * 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 * @public\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;AAqCpB,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__5ei34w0", variantClassNames: { visualLevel: { "1": "Heading_headingCSS_visualLevel_1__5ei34w1", "2": "Heading_headingCSS_visualLevel_2__5ei34w2", "3": "Heading_headingCSS_visualLevel_3__5ei34w3", "4": "Heading_headingCSS_visualLevel_4__5ei34w4", "5": "Heading_headingCSS_visualLevel_5__5ei34w5", "6": "Heading_headingCSS_visualLevel_6__5ei34w6" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
|
+
export {
|
|
5
|
+
headingCSS
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=Heading.sty.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './Heading.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var headingCSS = _7a468({defaultClassName:'
|
|
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__5ei34w0',variantClassNames:{visualLevel:{'1':'Heading_headingCSS_visualLevel_1__5ei34w1','2':'Heading_headingCSS_visualLevel_2__5ei34w2','3':'Heading_headingCSS_visualLevel_3__5ei34w3','4':'Heading_headingCSS_visualLevel_4__5ei34w4','5':'Heading_headingCSS_visualLevel_5__5ei34w5','6':'Heading_headingCSS_visualLevel_6__5ei34w6'}},defaultVariants:{},compoundVariants:[]});"],
|
|
5
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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
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 [/</g, '<'],\n [/>/g, '>'],\n [/&/g, '&'],\n [/ /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 *
|
|
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 [/</g, '<'],\n [/>/g, '>'],\n [/&/g, '&'],\n [/ /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 * Use the `Highlight` component to highlight one or more substrings within a\n * text.\n * @public\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
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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './Highlight.css';\nexport var highlightCSS = '
|
|
3
|
+
"sources": ["../../../../src/typography/highlight/Highlight.css.ts"],
|
|
4
|
+
"sourcesContent": ["import './Highlight.css';\nexport var highlightCSS = 'Highlight_highlightCSS__lajjl30';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACA,IAAI,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/esm/typography/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Blockquote } from "./
|
|
2
|
-
import { Code } from "./
|
|
3
|
-
import { Emphasis } from "./
|
|
4
|
-
import { ExternalLink } from "./
|
|
5
|
-
import { Heading } from "./
|
|
6
|
-
import { Highlight } from "./
|
|
7
|
-
import { Link } from "./
|
|
8
|
-
import { List } from "./
|
|
9
|
-
import { Paragraph } from "./
|
|
10
|
-
import { Strikethrough } from "./
|
|
11
|
-
import { Strong } from "./
|
|
12
|
-
import { Text } from "./
|
|
13
|
-
import { TextEllipsis } from "./
|
|
1
|
+
import { Blockquote } from "./block-quote/Blockquote.js";
|
|
2
|
+
import { Code } from "./code/Code.js";
|
|
3
|
+
import { Emphasis } from "./emphasis/Emphasis.js";
|
|
4
|
+
import { ExternalLink } from "./external-link/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 "./text-ellipsis/TextEllipsis.js";
|
|
14
14
|
import {
|
|
15
15
|
_calculateEllipsisInfo,
|
|
16
16
|
_getTextHeight,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/typography/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { Blockquote } from './
|
|
4
|
+
"sourcesContent": ["export { Blockquote } from './block-quote/Blockquote.js';\nexport type { BlockquoteProps } from './block-quote/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 './external-link/ExternalLink.js';\nexport type { ExternalLinkProps } from './external-link/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 './text-ellipsis/TextEllipsis.js';\nexport type {\n TextEllipsisProps,\n _TruncationMode,\n} from './text-ellipsis/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
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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
.
|
|
1
|
+
.Link_linkCSS__1iksxp40 {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
color: var(--dt-colors-text-primary-default, #454cc9);
|
|
4
4
|
text-decoration: underline;
|
|
5
5
|
overflow-wrap: anywhere;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
.Link_linkCSS__1iksxp40:hover {
|
|
8
8
|
color: var(--dt-colors-text-primary-default-hover, #3332ae);
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.Link_linkCSS__1iksxp40:active {
|
|
11
11
|
color: var(--dt-colors-text-primary-default-active, #241193);
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.Link_linkCSS__1iksxp40:focus-visible {
|
|
14
14
|
text-decoration: none;
|
|
15
15
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
+
import { linkCSS } from "./Link.sty.js";
|
|
3
4
|
import {
|
|
4
5
|
_mergeProps
|
|
5
6
|
} from "../../core/index.js";
|
|
6
7
|
import { useFocusRing } from "../../core/styles/useFocusRing.js";
|
|
7
|
-
import { linkCSS } from "../Link/Link.sty.js";
|
|
8
8
|
const Link = /* @__PURE__ */ forwardRef(
|
|
9
9
|
({
|
|
10
10
|
children,
|
|
@@ -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 { linkCSS } from './Link.sty.js';\nimport {\n type PolymorphicComponentProps,\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 Link component.\n * @public\n */\nexport type LinkProps<E extends ElementType> = PolymorphicComponentProps<\n E,\n WithChildren & StylingProps & DataTestId & MaskingProps\n>;\n\n/**\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/design/components/typography/ExternalLink/ | `ExternalLink`}\n * component instead.\n * @public\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,SAAS,eAAe;AACxB;AAAA,EAKE;AAAA,OACK;AACP,SAAS,oBAAoB;AAmBtB,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
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './Link.css';\nexport var linkCSS = '
|
|
3
|
+
"sources": ["../../../../src/typography/link/Link.css.ts"],
|
|
4
|
+
"sourcesContent": ["import './Link.css';\nexport var linkCSS = 'Link_linkCSS__1iksxp40';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACA,IAAI,UAAU;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
.
|
|
1
|
+
.List_listCSS__16276mt0 {
|
|
2
2
|
margin: 0;
|
|
3
3
|
padding-left: var(--dt-spacings-size-40, 40px);
|
|
4
4
|
}
|
|
5
|
-
.
|
|
5
|
+
.List_listCSS__16276mt0 .List_listCSS__16276mt0 {
|
|
6
6
|
margin-block: var(--dt-spacings-size-4, 4px);
|
|
7
7
|
padding-left: var(--dt-spacings-size-28, 28px);
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
.List_listItemCSS__16276mt1 {
|
|
10
10
|
position: relative;
|
|
11
11
|
overflow-wrap: break-word;
|
|
12
12
|
margin-block: var(--dt-spacings-size-2, 2px);
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.List_listItemCSS__16276mt1::marker {
|
|
15
15
|
font-weight: var(--dt-typography-text-base-emphasized-weight, 500);
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
3
|
import { listCSS, listItemCSS } from "./List.sty.js";
|
|
4
|
-
import { Text } from "../
|
|
4
|
+
import { Text } from "../text/Text.js";
|
|
5
5
|
function interleaveListItems(listItems) {
|
|
6
6
|
const items = [];
|
|
7
7
|
React.Children.forEach(listItems, (listItem) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\n\nimport { listCSS, listItemCSS } from './List.sty.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type MaskingProps } from '../../core/types/masking-props.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { type WithChildren } from '../../core/types/with-children.js';\nimport { Text } from '../
|
|
3
|
+
"sources": ["../../../../src/typography/list/List.tsx"],
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\n\nimport { listCSS, listItemCSS } from './List.sty.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type MaskingProps } from '../../core/types/masking-props.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { type WithChildren } from '../../core/types/with-children.js';\nimport { Text } from '../text/Text.js';\n\n/**\n * The props for the Link component.\n * @public\n */\nexport interface ListProps<TOrdered extends boolean = false>\n extends WithChildren,\n StylingProps,\n DataTestId,\n MaskingProps {\n /**\n * Whether the List is ordered or not. This changes whether numbers or bullets are used.\n * @defaultValue false\n */\n ordered?: TOrdered;\n /**\n * Sets the text style for the List.\n * @defaultValue 'base'\n */\n textStyle?: 'base' | 'base-emphasized' | 'small' | 'small-emphasized';\n /**\n * Sets the text style for the List.\n * @defaultValue 'text'\n */\n fontStyle?: 'text' | 'code';\n /**\n * Sets the starting number of the first item in an ordered list.\n * The value is always treated as an integer (floor).\n * @defaultValue 1\n */\n start?: number;\n}\n\n/** Maps a list of (potentially) nested list items to HTML list structure. */\nfunction interleaveListItems(listItems: React.ReactNode) {\n const items: React.ReactNode[][] = [];\n\n React.Children.forEach(listItems, (listItem) => {\n if (React.isValidElement(listItem)) {\n if (listItem.type === List) {\n if (items.length === 0) {\n items.push([listItem]);\n } else {\n items[items.length - 1].push(listItem);\n }\n } else {\n items.push([listItem]);\n }\n }\n });\n\n return items.map((values, index) => {\n const itemKey = `list-item-${getItemKey(values, index)}`;\n return (\n <li key={itemKey} className={listItemCSS}>\n {values}\n </li>\n );\n });\n}\n\n/**\n * Generates a key for a list item. We try to avoid\n * generating [Object object] by looking down levels\n * recursively. If there is an existing key defined in\n * a descendant uses that as part of the key otherwise\n * if we get a string value, use that. Otherwise uses\n * the index if nothing was found.\n * @param values - nodes inside the list item\n * @param index - current zero based index\n * @returns a key generated for the item\n */\nfunction getItemKey(values: React.ReactNode[], index: number): string | number {\n const isArray = Array.isArray(values);\n const value = isArray ? values?.[0] : values;\n if (React.isValidElement(value)) {\n if (value.key) {\n return value.key;\n } else if (value.props && value.props.children) {\n return getItemKey(value.props.children, index);\n }\n return value as unknown as string | number;\n }\n\n if (value === undefined) {\n return index;\n }\n\n return value as unknown as string | number;\n}\n\n/**\n * The `List` component groups a set of related content in a list and can be arbitrarily nested.\n * List items are preceded by either a consecutive number (for ordered lists) or a bullet point\n * (for unordered lists).\n * @public\n */\nexport const List = /* @__PURE__ */ forwardRef(\n <TOrdered extends boolean = false>(\n props: ListProps<TOrdered>,\n ref: React.ForwardedRef<\n TOrdered extends true ? HTMLOListElement : HTMLUListElement\n >,\n ) => {\n const {\n children,\n ordered = false,\n textStyle,\n fontStyle,\n start = 1,\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 <Text\n ref={ref}\n as={ordered ? 'ol' : 'ul'}\n {...(ordered && {\n start,\n })}\n textStyle={textStyle}\n fontStyle={fontStyle}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(listCSS, consumerClassName)}\n style={consumerStyle}\n {...remainingProps}\n >\n {interleaveListItems(children)}\n </Text>\n );\n },\n);\n\n(List as typeof List & { displayName: string }).displayName = 'List';\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,SAAS,kBAAkB;AAElC,SAAS,SAAS,mBAAmB;AAKrC,SAAS,YAAY;AAmCrB,SAAS,oBAAoB,WAA4B;AACvD,QAAM,QAA6B,CAAC;AAEpC,QAAM,SAAS,QAAQ,WAAW,CAAC,aAAa;AAC9C,QAAI,MAAM,eAAe,QAAQ,GAAG;AAClC,UAAI,SAAS,SAAS,MAAM;AAC1B,YAAI,MAAM,WAAW,GAAG;AACtB,gBAAM,KAAK,CAAC,QAAQ,CAAC;AAAA,QACvB,OAAO;AACL,gBAAM,MAAM,SAAS,CAAC,EAAE,KAAK,QAAQ;AAAA,QACvC;AAAA,MACF,OAAO;AACL,cAAM,KAAK,CAAC,QAAQ,CAAC;AAAA,MACvB;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO,MAAM,IAAI,CAAC,QAAQ,UAAU;AAClC,UAAM,UAAU,aAAa,WAAW,QAAQ,KAAK,CAAC;AACtD,WACE,oCAAC,QAAG,KAAK,SAAS,WAAW,eAC1B,MACH;AAAA,EAEJ,CAAC;AACH;AAaA,SAAS,WAAW,QAA2B,OAAgC;AAC7E,QAAM,UAAU,MAAM,QAAQ,MAAM;AACpC,QAAM,QAAQ,UAAU,SAAS,CAAC,IAAI;AACtC,MAAI,MAAM,eAAe,KAAK,GAAG;AAC/B,QAAI,MAAM,KAAK;AACb,aAAO,MAAM;AAAA,IACf,WAAW,MAAM,SAAS,MAAM,MAAM,UAAU;AAC9C,aAAO,WAAW,MAAM,MAAM,UAAU,KAAK;AAAA,IAC/C;AACA,WAAO;AAAA,EACT;AAEA,MAAI,UAAU,QAAW;AACvB,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAQO,MAAM,OAAuB;AAAA,EAClC,CACE,OACA,QAGG;AACH,UAAM;AAAA,MACJ;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR,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,IAAI,UAAU,OAAO;AAAA,QACpB,GAAI,WAAW;AAAA,UACd;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB,WAAW,KAAK,SAAS,iBAAiB;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,MAEH,oBAAoB,QAAQ;AAAA,IAC/B;AAAA,EAEJ;AACF;AAEC,KAA+C,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/typography/
|
|
4
|
-
"sourcesContent": ["import './List.css';\nexport var listCSS = '
|
|
3
|
+
"sources": ["../../../../src/typography/list/List.css.ts"],
|
|
4
|
+
"sourcesContent": ["import './List.css';\nexport var listCSS = 'List_listCSS__16276mt0';\nexport var listItemCSS = 'List_listItemCSS__16276mt1';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACA,IAAI,UAAU;AACd,IAAI,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
.
|
|
1
|
+
.Paragraph_paragraphCSS__487p2n0 {
|
|
2
2
|
margin-top: 0;
|
|
3
3
|
margin-bottom: 0;
|
|
4
4
|
overflow-wrap: break-word;
|
|
5
5
|
color: var(--dt-colors-text-neutral-default, #2b2a58);
|
|
6
6
|
font-style: normal;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
.Paragraph_paragraphCSS_ellipsis_singleLine__487p2n1 {
|
|
9
9
|
display: block;
|
|
10
10
|
white-space: nowrap;
|
|
11
11
|
text-overflow: ellipsis;
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.Paragraph_paragraphCSS_ellipsis_multiLine__487p2n2 {
|
|
15
15
|
display: -webkit-box;
|
|
16
16
|
-webkit-line-clamp: var(--strato-ellipsis-line-clamp);
|
|
17
17
|
-webkit-box-orient: vertical;
|