@dynatrace/strato-components 1.13.0 → 1.15.0
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 +16 -16
- package/buttons/button/Button.js +10 -10
- package/buttons/button/Button.sty.d.ts +4 -4
- package/buttons/button/Button.sty.js +8 -8
- package/buttons/button/Label.js +1 -1
- package/content/progress/ProgressBar.css +71 -71
- package/content/progress/ProgressBar.sty.js +5 -5
- package/content/progress/ProgressBarIcon.css +2 -2
- package/content/progress/ProgressBarIcon.sty.js +1 -1
- package/content/progress/ProgressBarLabel.css +3 -3
- package/content/progress/ProgressBarLabel.js +3 -3
- package/content/progress/ProgressBarLabel.sty.d.ts +1 -1
- package/content/progress/ProgressBarLabel.sty.js +2 -2
- package/content/progress/ProgressBarValue.css +5 -5
- package/content/progress/ProgressBarValue.js +2 -2
- package/content/progress/ProgressBarValue.sty.d.ts +1 -1
- package/content/progress/ProgressBarValue.sty.js +2 -2
- package/content/progress/ProgressCircle.css +40 -40
- package/content/progress/ProgressCircle.js +1 -1
- package/content/progress/ProgressCircle.sty.js +5 -5
- package/content/skeleton/Skeleton.css +7 -7
- package/content/skeleton/Skeleton.sty.js +5 -5
- package/core/components/app-root/AppRoot.d.ts +13 -1
- package/core/components/app-root/AppRoot.js +3 -2
- package/core/styles/focusRing.css +66 -66
- package/core/styles/focusRing.sty.js +2 -2
- package/core/utils/colorUtils.css +60 -60
- package/core/utils/colorUtils.sty.js +2 -2
- package/core/utils/is-node-environment.d.ts +15 -0
- package/core/utils/is-node-environment.js +34 -0
- package/core/utils/logging.d.ts +8 -0
- package/core/utils/logging.js +33 -0
- package/esm/buttons/button/Button.css +16 -16
- package/esm/buttons/button/Button.js +11 -11
- package/esm/buttons/button/Button.js.map +2 -2
- package/esm/buttons/button/Button.sty.js +8 -8
- package/esm/buttons/button/Button.sty.js.map +2 -2
- package/esm/buttons/button/Label.js +2 -2
- package/esm/buttons/button/Label.js.map +2 -2
- package/esm/content/progress/ProgressBar.css +71 -71
- package/esm/content/progress/ProgressBar.sty.js +5 -5
- package/esm/content/progress/ProgressBar.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarIcon.css +2 -2
- package/esm/content/progress/ProgressBarIcon.sty.js +1 -1
- package/esm/content/progress/ProgressBarIcon.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarLabel.css +3 -3
- package/esm/content/progress/ProgressBarLabel.js +6 -6
- package/esm/content/progress/ProgressBarLabel.js.map +2 -2
- package/esm/content/progress/ProgressBarLabel.sty.js +2 -2
- package/esm/content/progress/ProgressBarLabel.sty.js.map +2 -2
- package/esm/content/progress/ProgressBarValue.css +5 -5
- package/esm/content/progress/ProgressBarValue.js +4 -4
- package/esm/content/progress/ProgressBarValue.js.map +2 -2
- package/esm/content/progress/ProgressBarValue.sty.js +2 -2
- package/esm/content/progress/ProgressBarValue.sty.js.map +2 -2
- package/esm/content/progress/ProgressCircle.css +40 -40
- package/esm/content/progress/ProgressCircle.js +2 -2
- package/esm/content/progress/ProgressCircle.js.map +2 -2
- package/esm/content/progress/ProgressCircle.sty.js +5 -5
- package/esm/content/progress/ProgressCircle.sty.js.map +1 -1
- package/esm/content/skeleton/Skeleton.css +7 -7
- package/esm/content/skeleton/Skeleton.sty.js +5 -5
- package/esm/content/skeleton/Skeleton.sty.js.map +1 -1
- package/esm/core/components/app-root/AppRoot.js +3 -2
- package/esm/core/components/app-root/AppRoot.js.map +2 -2
- package/esm/core/hooks/useId.js.map +2 -2
- package/esm/core/styles/focusRing.css +66 -66
- package/esm/core/styles/focusRing.sty.js +2 -2
- package/esm/core/styles/focusRing.sty.js.map +1 -1
- package/esm/core/utils/colorUtils.css +60 -60
- package/esm/core/utils/colorUtils.sty.js +2 -2
- package/esm/core/utils/colorUtils.sty.js.map +1 -1
- package/esm/core/utils/is-node-environment.js +15 -0
- package/esm/core/utils/is-node-environment.js.map +7 -0
- package/esm/core/utils/logging.js +14 -0
- package/esm/core/utils/logging.js.map +7 -0
- package/esm/layouts/container/Container.css +4 -4
- package/esm/layouts/container/Container.sty.js +1 -1
- package/esm/layouts/container/Container.sty.js.map +1 -1
- package/esm/layouts/divider/Divider.css +6 -6
- package/esm/layouts/divider/Divider.sty.js +1 -1
- package/esm/layouts/divider/Divider.sty.js.map +1 -1
- package/esm/layouts/surface/Surface.css +39 -39
- package/esm/layouts/surface/Surface.js +4 -4
- package/esm/layouts/surface/Surface.js.map +2 -2
- package/esm/layouts/surface/Surface.sty.js +2 -2
- package/esm/layouts/surface/Surface.sty.js.map +1 -1
- package/esm/layouts/surface/variables.sty.js +1 -1
- package/esm/layouts/surface/variables.sty.js.map +1 -1
- package/esm/styles/colorUtils.css +60 -60
- package/esm/styles/colorUtils.sty.js +3 -3
- package/esm/styles/colorUtils.sty.js.map +2 -2
- package/esm/styles/container.css +47 -47
- package/esm/styles/container.sty.js +2 -2
- package/esm/styles/container.sty.js.map +1 -1
- package/esm/styles/ellipsis.css +1 -1
- package/esm/styles/ellipsis.sty.js +2 -2
- package/esm/styles/ellipsis.sty.js.map +2 -2
- package/esm/styles/field.css +153 -153
- package/esm/styles/field.sty.js +3 -3
- package/esm/styles/field.sty.js.map +2 -2
- package/esm/styles/index.js +2 -2
- package/esm/styles/index.js.map +2 -2
- package/esm/styles/sprinkles.css +262 -262
- package/esm/styles/sprinkles.sty.js +1 -1
- package/esm/styles/sprinkles.sty.js.map +1 -1
- package/esm/styles/textStyle.css +8 -8
- package/esm/styles/textStyle.sty.js +2 -2
- package/esm/styles/textStyle.sty.js.map +2 -2
- package/esm/typography/block-quote/Blockquote.css +2 -2
- package/esm/typography/block-quote/Blockquote.sty.js +1 -1
- package/esm/typography/block-quote/Blockquote.sty.js.map +1 -1
- package/esm/typography/code/Code.css +1 -1
- package/esm/typography/code/Code.sty.js +1 -1
- package/esm/typography/code/Code.sty.js.map +1 -1
- package/esm/typography/emphasis/Emphasis.css +1 -1
- package/esm/typography/emphasis/Emphasis.sty.js +1 -1
- package/esm/typography/emphasis/Emphasis.sty.js.map +1 -1
- package/esm/typography/external-link/ExternalLink.css +5 -5
- package/esm/typography/external-link/ExternalLink.js +2 -2
- package/esm/typography/external-link/ExternalLink.js.map +2 -2
- package/esm/typography/external-link/ExternalLink.sty.js +1 -1
- package/esm/typography/external-link/ExternalLink.sty.js.map +1 -1
- package/esm/typography/heading/Heading.css +7 -7
- package/esm/typography/heading/Heading.sty.js +1 -1
- package/esm/typography/heading/Heading.sty.js.map +1 -1
- package/esm/typography/highlight/Highlight.css +5 -6
- package/esm/typography/highlight/Highlight.js +45 -138
- package/esm/typography/highlight/Highlight.js.map +3 -3
- package/esm/typography/highlight/Highlight.sty.js +2 -4
- package/esm/typography/highlight/Highlight.sty.js.map +2 -2
- package/esm/typography/highlight/utils/create-ranged-highlights.js +51 -0
- package/esm/typography/highlight/utils/create-ranged-highlights.js.map +7 -0
- package/esm/typography/highlight/utils/get-or-create-shared-highlight.js +25 -0
- package/esm/typography/highlight/utils/get-or-create-shared-highlight.js.map +7 -0
- package/esm/typography/link/Link.css +3 -3
- package/esm/typography/link/Link.js +2 -2
- package/esm/typography/link/Link.js.map +2 -2
- package/esm/typography/link/Link.sty.js +1 -1
- package/esm/typography/link/Link.sty.js.map +1 -1
- package/esm/typography/list/List.css +4 -4
- package/esm/typography/list/List.sty.js +2 -2
- package/esm/typography/list/List.sty.js.map +1 -1
- package/esm/typography/paragraph/Paragraph.css +3 -3
- package/esm/typography/paragraph/Paragraph.js +3 -7
- package/esm/typography/paragraph/Paragraph.js.map +2 -2
- package/esm/typography/paragraph/Paragraph.sty.js +2 -2
- package/esm/typography/paragraph/Paragraph.sty.js.map +2 -2
- package/esm/typography/strikethrough/Strikethrough.css +1 -1
- package/esm/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/esm/typography/strikethrough/Strikethrough.sty.js.map +1 -1
- package/esm/typography/strong/Strong.css +1 -1
- package/esm/typography/strong/Strong.sty.js +1 -1
- package/esm/typography/strong/Strong.sty.js.map +1 -1
- package/esm/typography/text/Text.css +3 -3
- package/esm/typography/text/Text.js +5 -5
- package/esm/typography/text/Text.js.map +2 -2
- package/esm/typography/text/Text.sty.js +2 -2
- package/esm/typography/text/Text.sty.js.map +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.css +6 -6
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js.map +1 -1
- package/layouts/container/Container.css +4 -4
- package/layouts/container/Container.sty.js +1 -1
- package/layouts/divider/Divider.css +6 -6
- package/layouts/divider/Divider.sty.js +1 -1
- package/layouts/surface/Surface.css +39 -39
- package/layouts/surface/Surface.js +2 -2
- package/layouts/surface/Surface.sty.js +2 -2
- package/layouts/surface/variables.sty.js +1 -1
- package/package.json +3 -3
- package/styles/colorUtils.css +60 -60
- package/styles/colorUtils.sty.d.ts +1 -1
- package/styles/colorUtils.sty.js +3 -3
- package/styles/container.css +47 -47
- package/styles/container.sty.js +2 -2
- package/styles/ellipsis.css +1 -1
- package/styles/ellipsis.sty.d.ts +1 -1
- package/styles/ellipsis.sty.js +2 -2
- package/styles/field.css +153 -153
- package/styles/field.sty.d.ts +1 -1
- package/styles/field.sty.js +3 -3
- package/styles/index.d.ts +1 -1
- package/styles/index.js +1 -1
- package/styles/sprinkles.css +262 -262
- package/styles/sprinkles.sty.js +1 -1
- package/styles/textStyle.css +8 -8
- package/styles/textStyle.sty.d.ts +1 -1
- package/styles/textStyle.sty.js +2 -2
- package/typography/block-quote/Blockquote.css +2 -2
- package/typography/block-quote/Blockquote.sty.js +1 -1
- package/typography/code/Code.css +1 -1
- package/typography/code/Code.sty.js +1 -1
- package/typography/emphasis/Emphasis.css +1 -1
- package/typography/emphasis/Emphasis.sty.js +1 -1
- package/typography/external-link/ExternalLink.css +5 -5
- package/typography/external-link/ExternalLink.js +2 -2
- package/typography/external-link/ExternalLink.sty.js +1 -1
- package/typography/heading/Heading.css +7 -7
- package/typography/heading/Heading.sty.js +1 -1
- package/typography/highlight/Highlight.css +5 -6
- package/typography/highlight/Highlight.d.ts +1 -1
- package/typography/highlight/Highlight.js +43 -127
- package/typography/highlight/Highlight.sty.d.ts +1 -2
- package/typography/highlight/Highlight.sty.js +2 -4
- package/typography/highlight/utils/create-ranged-highlights.d.ts +10 -0
- package/typography/highlight/utils/create-ranged-highlights.js +70 -0
- package/typography/highlight/utils/get-or-create-shared-highlight.d.ts +7 -0
- package/typography/highlight/utils/get-or-create-shared-highlight.js +44 -0
- package/typography/link/Link.css +3 -3
- package/typography/link/Link.js +2 -2
- package/typography/link/Link.sty.js +1 -1
- package/typography/list/List.css +4 -4
- package/typography/list/List.sty.js +2 -2
- package/typography/paragraph/Paragraph.css +3 -3
- package/typography/paragraph/Paragraph.js +1 -5
- package/typography/paragraph/Paragraph.sty.d.ts +1 -1
- package/typography/paragraph/Paragraph.sty.js +2 -2
- package/typography/strikethrough/Strikethrough.css +1 -1
- package/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/typography/strong/Strong.css +1 -1
- package/typography/strong/Strong.sty.js +1 -1
- package/typography/text/Text.css +3 -3
- package/typography/text/Text.js +3 -3
- package/typography/text/Text.sty.d.ts +1 -1
- package/typography/text/Text.sty.js +2 -2
- package/typography/text-ellipsis/TextEllipsis.css +6 -6
- package/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
|
@@ -2,10 +2,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { useSharedProgressBarPropsContext } from "./hooks/useProgressBarPropsContext.js";
|
|
5
|
-
import {
|
|
5
|
+
import { label } from "./ProgressBarLabel.sty.js";
|
|
6
6
|
import { canReceiveDefaultTextFormat } from "../../core/utils/can-receive-default-text-format.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { ellipsis } from "../../styles/ellipsis.sty.js";
|
|
8
|
+
import { textStyle } from "../../styles/textStyle.sty.js";
|
|
9
9
|
const ProgressBarLabel = forwardRef((props, forwardedRef) => {
|
|
10
10
|
const {
|
|
11
11
|
children,
|
|
@@ -24,11 +24,11 @@ const ProgressBarLabel = forwardRef((props, forwardedRef) => {
|
|
|
24
24
|
htmlFor: id,
|
|
25
25
|
className: clsx(
|
|
26
26
|
{
|
|
27
|
-
[
|
|
27
|
+
[ellipsis]: density === "condensed" && childIsText
|
|
28
28
|
},
|
|
29
29
|
consumerClassName,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
label({ size: density, childIsText }),
|
|
31
|
+
textStyle({ textStyle: "base" })
|
|
32
32
|
),
|
|
33
33
|
style: consumerStyle,
|
|
34
34
|
...remainingProps,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/progress/ProgressBarLabel.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useSharedProgressBarPropsContext } from './hooks/useProgressBarPropsContext.js';\nimport {
|
|
5
|
-
"mappings": "AA0CI;AA1CJ,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAE3B,SAAS,wCAAwC;AACjD,SAAS,
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useSharedProgressBarPropsContext } from './hooks/useProgressBarPropsContext.js';\nimport { label } from './ProgressBarLabel.sty.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { type WithChildren } from '../../core/types/with-children.js';\nimport { canReceiveDefaultTextFormat } from '../../core/utils/can-receive-default-text-format.js';\nimport { ellipsis } from '../../styles/ellipsis.sty.js';\nimport { textStyle } from '../../styles/textStyle.sty.js';\n\n/**\n * Accepted properties for ProgressBarLabel.\n * @public\n */\nexport interface ProgressBarLabelProps\n extends WithChildren,\n StylingProps,\n DataTestId {}\n\n/**\n * ProgressBarLabel sub-component is rendered inside ProgressBar component.\n * @public\n */\nexport const ProgressBarLabel = forwardRef<\n HTMLLabelElement,\n ProgressBarLabelProps\n>((props, forwardedRef) => {\n const {\n children,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n ...remainingProps\n }: ProgressBarLabelProps = props;\n\n const { id, density } = useSharedProgressBarPropsContext();\n\n const childIsText = canReceiveDefaultTextFormat(children);\n\n return (\n <label\n data-testid={dataTestId}\n ref={forwardedRef}\n htmlFor={id}\n className={clsx(\n {\n [ellipsis]: density === 'condensed' && childIsText,\n },\n consumerClassName,\n label({ size: density, childIsText }),\n textStyle({ textStyle: 'base' }),\n )}\n style={consumerStyle}\n {...remainingProps}\n >\n {children}\n </label>\n );\n});\n\n(\n ProgressBarLabel as typeof ProgressBarLabel & { displayName: string }\n).displayName = 'ProgressBar.Label';\n"],
|
|
5
|
+
"mappings": "AA0CI;AA1CJ,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAE3B,SAAS,wCAAwC;AACjD,SAAS,aAAa;AAItB,SAAS,mCAAmC;AAC5C,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAenB,MAAM,mBAAmB,WAG9B,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,GAAG;AAAA,EACL,IAA2B;AAE3B,QAAM,EAAE,IAAI,QAAQ,IAAI,iCAAiC;AAEzD,QAAM,cAAc,4BAA4B,QAAQ;AAExD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa;AAAA,MACb,KAAK;AAAA,MACL,SAAS;AAAA,MACT,WAAW;AAAA,QACT;AAAA,UACE,CAAC,QAAQ,GAAG,YAAY,eAAe;AAAA,QACzC;AAAA,QACA;AAAA,QACA,MAAM,EAAE,MAAM,SAAS,YAAY,CAAC;AAAA,QACpC,UAAU,EAAE,WAAW,OAAO,CAAC;AAAA,MACjC;AAAA,MACA,OAAO;AAAA,MACN,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ,CAAC;AAGC,iBACA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./ProgressBarLabel.css";
|
|
2
2
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
var
|
|
3
|
+
var label = _7a468({ defaultClassName: "_1ceb8vp0-1-15-0", variantClassNames: { size: { condensed: "_1ceb8vp1-1-15-0", "default": "_1ceb8vp2-1-15-0" }, childIsText: { false: "_1ceb8vp3-1-15-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
label
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=ProgressBarLabel.sty.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/progress/ProgressBarLabel.css.ts"],
|
|
4
|
-
"sourcesContent": ["import './ProgressBarLabel.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var
|
|
5
|
-
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,
|
|
4
|
+
"sourcesContent": ["import './ProgressBarLabel.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var label = _7a468({defaultClassName:'_1ceb8vp0-1-15-0',variantClassNames:{size:{condensed:'_1ceb8vp1-1-15-0','default':'_1ceb8vp2-1-15-0'},childIsText:{false:'_1ceb8vp3-1-15-0'}},defaultVariants:{},compoundVariants:[]});"],
|
|
5
|
+
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,QAAQ,OAAO,EAAC,kBAAiB,oBAAmB,mBAAkB,EAAC,MAAK,EAAC,WAAU,oBAAmB,WAAU,mBAAkB,GAAE,aAAY,EAAC,OAAM,mBAAkB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
._1ri4i7o0-1-
|
|
2
|
-
color: var(--_13n9uwh4-1-
|
|
1
|
+
._1ri4i7o0-1-15-0 {
|
|
2
|
+
color: var(--_13n9uwh4-1-15-0);
|
|
3
3
|
}
|
|
4
|
-
._1ri4i7o2-1-
|
|
4
|
+
._1ri4i7o2-1-15-0 {
|
|
5
5
|
word-break: break-word;
|
|
6
6
|
}
|
|
7
|
-
._1ri4i7o4-1-
|
|
7
|
+
._1ri4i7o4-1-15-0 {
|
|
8
8
|
word-break: break-word;
|
|
9
9
|
}
|
|
10
|
-
._1ri4i7o5-1-
|
|
10
|
+
._1ri4i7o5-1-15-0 {
|
|
11
11
|
margin-left: auto;
|
|
12
12
|
align-self: center;
|
|
13
13
|
}
|
|
@@ -3,9 +3,9 @@ import clsx from "clsx";
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { useSharedProgressBarPropsContext } from "./hooks/useProgressBarPropsContext.js";
|
|
6
|
-
import {
|
|
6
|
+
import { value } from "./ProgressBarValue.sty.js";
|
|
7
7
|
import { canReceiveDefaultTextFormat } from "../../core/utils/can-receive-default-text-format.js";
|
|
8
|
-
import {
|
|
8
|
+
import { textStyle } from "../../styles/textStyle.sty.js";
|
|
9
9
|
const ProgressBarValue = forwardRef((props, forwardedRef) => {
|
|
10
10
|
const {
|
|
11
11
|
children,
|
|
@@ -29,8 +29,8 @@ const ProgressBarValue = forwardRef((props, forwardedRef) => {
|
|
|
29
29
|
ref: forwardedRef,
|
|
30
30
|
className: clsx(
|
|
31
31
|
consumerClassName,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
value({ size: density, childIsText }),
|
|
33
|
+
textStyle({ textStyle: "small" })
|
|
34
34
|
),
|
|
35
35
|
style: consumerStyle,
|
|
36
36
|
...remainingProps,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/progress/ProgressBarValue.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { useSharedProgressBarPropsContext } from './hooks/useProgressBarPropsContext.js';\nimport {
|
|
5
|
-
"mappings": "AAiDI;AAjDJ,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAExB,SAAS,wCAAwC;AACjD,SAAS,
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { useSharedProgressBarPropsContext } from './hooks/useProgressBarPropsContext.js';\nimport { value } from './ProgressBarValue.sty.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { type WithChildren } from '../../core/types/with-children.js';\nimport { canReceiveDefaultTextFormat } from '../../core/utils/can-receive-default-text-format.js';\nimport { textStyle } from '../../styles/textStyle.sty.js';\n\n/**\n * Accepted properties for ProgressBarValue.\n * @public\n * */\nexport interface ProgressBarValueProps\n extends WithChildren,\n StylingProps,\n DataTestId {}\n\n/**\n * ProgressBarValue sub-component is rendered inside ProgressBar component.\n * @public\n */\nexport const ProgressBarValue = forwardRef<\n HTMLDivElement,\n ProgressBarValueProps\n>((props, forwardedRef) => {\n const {\n children,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n ...remainingProps\n }: ProgressBarValueProps = props;\n const intl = useIntl();\n\n const progressBarDefaultLabel = intl.formatMessage({\n defaultMessage: 'Loading',\n id: '3J6qHQEUwDxvZuIl',\n description: 'Default label for the progress-bar.',\n });\n\n const { density } = useSharedProgressBarPropsContext();\n\n const childIsText = canReceiveDefaultTextFormat(children);\n\n return (\n <div\n data-testid={dataTestId}\n ref={forwardedRef}\n className={clsx(\n consumerClassName,\n value({ size: density, childIsText }),\n textStyle({ textStyle: 'small' }),\n )}\n style={consumerStyle}\n {...remainingProps}\n >\n {children || progressBarDefaultLabel}\n </div>\n );\n});\n\n(\n ProgressBarValue as typeof ProgressBarValue & { displayName: string }\n).displayName = 'ProgressBar.Value';\n"],
|
|
5
|
+
"mappings": "AAiDI;AAjDJ,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAExB,SAAS,wCAAwC;AACjD,SAAS,aAAa;AAItB,SAAS,mCAAmC;AAC5C,SAAS,iBAAiB;AAenB,MAAM,mBAAmB,WAG9B,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,GAAG;AAAA,EACL,IAA2B;AAC3B,QAAM,OAAO,QAAQ;AAErB,QAAM,0BAA0B,KAAK,cAAc;AAAA,IACjD,gBAAgB;AAAA,IAChB,IAAI;AAAA,IACJ,aAAa;AAAA,EACf,CAAC;AAED,QAAM,EAAE,QAAQ,IAAI,iCAAiC;AAErD,QAAM,cAAc,4BAA4B,QAAQ;AAExD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa;AAAA,MACb,KAAK;AAAA,MACL,WAAW;AAAA,QACT;AAAA,QACA,MAAM,EAAE,MAAM,SAAS,YAAY,CAAC;AAAA,QACpC,UAAU,EAAE,WAAW,QAAQ,CAAC;AAAA,MAClC;AAAA,MACA,OAAO;AAAA,MACN,GAAG;AAAA,MAEH,sBAAY;AAAA;AAAA,EACf;AAEJ,CAAC;AAGC,iBACA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,8 +2,8 @@ import "./ProgressBar.css";
|
|
|
2
2
|
import "../../styles/ellipsis.css";
|
|
3
3
|
import "./ProgressBarValue.css";
|
|
4
4
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
5
|
-
var
|
|
5
|
+
var value = _7a468({ defaultClassName: "_1ri4i7o0-1-15-0", variantClassNames: { size: { condensed: "_1ri4i7o1-1-15-0", "default": "_1ri4i7o2-1-15-0" }, childIsText: { true: "_1ri4i7o3-1-15-0", false: "_1ri4i7o4-1-15-0" } }, defaultVariants: {}, compoundVariants: [[{ size: "condensed", childIsText: true }, "_1ri4i7o5-1-15-0 _oqqp1n0-1-15-0"]] });
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
value
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=ProgressBarValue.sty.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/progress/ProgressBarValue.css.ts"],
|
|
4
|
-
"sourcesContent": ["import './ProgressBar.css';\nimport '../../styles/ellipsis.css';\nimport './ProgressBarValue.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var
|
|
5
|
-
"mappings": "AAAA,OAAO;AACP,OAAO;AACP,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,
|
|
4
|
+
"sourcesContent": ["import './ProgressBar.css';\nimport '../../styles/ellipsis.css';\nimport './ProgressBarValue.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var value = _7a468({defaultClassName:'_1ri4i7o0-1-15-0',variantClassNames:{size:{condensed:'_1ri4i7o1-1-15-0','default':'_1ri4i7o2-1-15-0'},childIsText:{true:'_1ri4i7o3-1-15-0',false:'_1ri4i7o4-1-15-0'}},defaultVariants:{},compoundVariants:[[{size:'condensed',childIsText:true},'_1ri4i7o5-1-15-0 _oqqp1n0-1-15-0']]});"],
|
|
5
|
+
"mappings": "AAAA,OAAO;AACP,OAAO;AACP,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,QAAQ,OAAO,EAAC,kBAAiB,oBAAmB,mBAAkB,EAAC,MAAK,EAAC,WAAU,oBAAmB,WAAU,mBAAkB,GAAE,aAAY,EAAC,MAAK,oBAAmB,OAAM,mBAAkB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,CAAC,EAAC,MAAK,aAAY,aAAY,KAAI,GAAE,kCAAkC,CAAC,EAAC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@keyframes _kvldjh3-1-
|
|
1
|
+
@keyframes _kvldjh3-1-15-0 {
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -6,79 +6,79 @@
|
|
|
6
6
|
transform: rotate(360deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
._kvldjh4-1-
|
|
9
|
+
._kvldjh4-1-15-0 {
|
|
10
10
|
display: inline-block;
|
|
11
11
|
}
|
|
12
|
-
._kvldjh5-1-
|
|
12
|
+
._kvldjh5-1-15-0 {
|
|
13
13
|
display: block;
|
|
14
14
|
transform: rotate(-90deg);
|
|
15
15
|
}
|
|
16
|
-
._kvldjh6-1-
|
|
17
|
-
stroke: var(--_kvldjh2-1-
|
|
16
|
+
._kvldjh6-1-15-0 {
|
|
17
|
+
stroke: var(--_kvldjh2-1-15-0);
|
|
18
18
|
transform-origin: center;
|
|
19
19
|
}
|
|
20
|
-
._kvldjh7-1-
|
|
20
|
+
._kvldjh7-1-15-0 {
|
|
21
21
|
stroke-dasharray: 90 360;
|
|
22
22
|
transform-origin: 50% 50%;
|
|
23
|
-
animation-name: _kvldjh3-1-
|
|
23
|
+
animation-name: _kvldjh3-1-15-0;
|
|
24
24
|
animation-duration: var(--dt-timings-slowest-moderate, 1200ms);
|
|
25
25
|
animation-timing-function: cubic-bezier(0.5, 0.15, 0.5, 0.8);
|
|
26
26
|
animation-iteration-count: infinite;
|
|
27
27
|
}
|
|
28
|
-
._kvldjh8-1-
|
|
28
|
+
._kvldjh8-1-15-0 {
|
|
29
29
|
animation-duration: var(--dt-timings-fast-moderate, 200ms);
|
|
30
30
|
transition-property: stroke-dashoffset;
|
|
31
31
|
}
|
|
32
|
-
._kvldjh9-1-
|
|
33
|
-
stroke: var(--_kvldjh1-1-
|
|
32
|
+
._kvldjh9-1-15-0 {
|
|
33
|
+
stroke: var(--_kvldjh1-1-15-0);
|
|
34
34
|
}
|
|
35
|
-
._kvldjha-1-
|
|
35
|
+
._kvldjha-1-15-0 {
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
align-items: center;
|
|
39
|
-
color: var(--_kvldjh0-1-
|
|
39
|
+
color: var(--_kvldjh0-1-15-0);
|
|
40
40
|
}
|
|
41
|
-
._kvldjhb-1-
|
|
41
|
+
._kvldjhb-1-15-0 {
|
|
42
42
|
gap: var(--dt-spacings-size-8, 8px);
|
|
43
43
|
}
|
|
44
|
-
._kvldjhc-1-
|
|
44
|
+
._kvldjhc-1-15-0 {
|
|
45
45
|
gap: var(--dt-spacings-size-12, 12px);
|
|
46
46
|
}
|
|
47
|
-
._kvldjhd-1-
|
|
48
|
-
--_kvldjh2-1-
|
|
47
|
+
._kvldjhd-1-15-0 {
|
|
48
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-critical-accent, #bb0731);
|
|
49
49
|
}
|
|
50
|
-
._kvldjhe-1-
|
|
51
|
-
--_kvldjh2-1-
|
|
50
|
+
._kvldjhe-1-15-0 {
|
|
51
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-neutral-accent, #595a7d);
|
|
52
52
|
}
|
|
53
|
-
._kvldjhf-1-
|
|
54
|
-
--_kvldjh2-1-
|
|
53
|
+
._kvldjhf-1-15-0 {
|
|
54
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-primary-accent, #464cce);
|
|
55
55
|
}
|
|
56
|
-
._kvldjhg-1-
|
|
57
|
-
--_kvldjh2-1-
|
|
56
|
+
._kvldjhg-1-15-0 {
|
|
57
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-success-accent, #2d6761);
|
|
58
58
|
}
|
|
59
|
-
._kvldjhh-1-
|
|
60
|
-
--_kvldjh2-1-
|
|
59
|
+
._kvldjhh-1-15-0 {
|
|
60
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-warning-accent, #855400);
|
|
61
61
|
}
|
|
62
|
-
._kvldjhi-1-
|
|
63
|
-
--_kvldjh0-1-
|
|
64
|
-
--_kvldjh1-1-
|
|
62
|
+
._kvldjhi-1-15-0 {
|
|
63
|
+
--_kvldjh0-1-15-0: var(--dt-colors-text-neutral-default, #2f2f4f);
|
|
64
|
+
--_kvldjh1-1-15-0: var(--dt-colors-border-neutral-default, #dadbe4);
|
|
65
65
|
}
|
|
66
|
-
._kvldjhj-1-
|
|
67
|
-
--_kvldjh0-1-
|
|
68
|
-
--_kvldjh1-1-
|
|
66
|
+
._kvldjhj-1-15-0 {
|
|
67
|
+
--_kvldjh0-1-15-0: var(--dt-colors-text-neutral-on-accent-default, #f3f3f6);
|
|
68
|
+
--_kvldjh1-1-15-0: var(--dt-colors-border-neutral-on-accent-disabled, #f3f3f633);
|
|
69
69
|
}
|
|
70
|
-
._kvldjhk-1-
|
|
71
|
-
--_kvldjh2-1-
|
|
70
|
+
._kvldjhk-1-15-0 {
|
|
71
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-primary-on-accent-default, #f4f4fb);
|
|
72
72
|
}
|
|
73
|
-
._kvldjhl-1-
|
|
74
|
-
--_kvldjh2-1-
|
|
73
|
+
._kvldjhl-1-15-0 {
|
|
74
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-success-on-accent-default, #f1f4f4);
|
|
75
75
|
}
|
|
76
|
-
._kvldjhm-1-
|
|
77
|
-
--_kvldjh2-1-
|
|
76
|
+
._kvldjhm-1-15-0 {
|
|
77
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-warning-on-accent-default, #272024);
|
|
78
78
|
}
|
|
79
|
-
._kvldjhn-1-
|
|
80
|
-
--_kvldjh2-1-
|
|
79
|
+
._kvldjhn-1-15-0 {
|
|
80
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-critical-on-accent-default, #f9f1f3);
|
|
81
81
|
}
|
|
82
|
-
._kvldjho-1-
|
|
83
|
-
--_kvldjh2-1-
|
|
82
|
+
._kvldjho-1-15-0 {
|
|
83
|
+
--_kvldjh2-1-15-0: var(--dt-colors-border-neutral-on-accent-default, #f3f3f6);
|
|
84
84
|
}
|
|
@@ -14,7 +14,7 @@ import { useId } from "../../core/hooks/useId.js";
|
|
|
14
14
|
import { useSafeForwardProps } from "../../core/hooks/useSafeForwardProps.js";
|
|
15
15
|
import { useContainerColoring } from "../../layouts/container/Container.js";
|
|
16
16
|
import { containerColorsCSS } from "../../styles/container.sty.js";
|
|
17
|
-
import {
|
|
17
|
+
import { textStyle } from "../../styles/textStyle.sty.js";
|
|
18
18
|
const progressCircleSizes = {
|
|
19
19
|
small: 20,
|
|
20
20
|
large: 40
|
|
@@ -143,7 +143,7 @@ const ProgressCircle = forwardRef(
|
|
|
143
143
|
"label",
|
|
144
144
|
{
|
|
145
145
|
className: clsx(
|
|
146
|
-
|
|
146
|
+
textStyle({ textStyle: size === "small" ? "small" : "base" })
|
|
147
147
|
),
|
|
148
148
|
htmlFor: id,
|
|
149
149
|
children
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/progress/ProgressCircle.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { type CSSProperties, forwardRef } from 'react';\n\nimport { useProgressAriaProps } from './hooks/useProgressAriaProps.js';\nimport {\n progressCircleBackgroundCSS,\n progressCircleContainerCSS,\n progressCircleCSS,\n progressCircleRootCSS,\n progressCircleSvgCss,\n} from './ProgressCircle.sty.js';\nimport { useAriaLabelingProps } from '../../core/hooks/useAriaLabelingProps.js';\nimport { useId } from '../../core/hooks/useId.js';\nimport { useSafeForwardProps } from '../../core/hooks/useSafeForwardProps.js';\nimport { type AriaLabelingProps } from '../../core/types/a11y-props.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type DOMProps } from '../../core/types/dom.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 { useContainerColoring } from '../../layouts/container/Container.js';\nimport { containerColorsCSS } from '../../styles/container.sty.js';\nimport {
|
|
5
|
-
"mappings": "AAwLU,SAME,KANF;AAxLV,OAAO,UAAU;AACjB,SAA6B,kBAAkB;AAE/C,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AACrC,SAAS,aAAa;AACtB,SAAS,2BAA2B;AAOpC,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { type CSSProperties, forwardRef } from 'react';\n\nimport { useProgressAriaProps } from './hooks/useProgressAriaProps.js';\nimport {\n progressCircleBackgroundCSS,\n progressCircleContainerCSS,\n progressCircleCSS,\n progressCircleRootCSS,\n progressCircleSvgCss,\n} from './ProgressCircle.sty.js';\nimport { useAriaLabelingProps } from '../../core/hooks/useAriaLabelingProps.js';\nimport { useId } from '../../core/hooks/useId.js';\nimport { useSafeForwardProps } from '../../core/hooks/useSafeForwardProps.js';\nimport { type AriaLabelingProps } from '../../core/types/a11y-props.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type DOMProps } from '../../core/types/dom.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 { useContainerColoring } from '../../layouts/container/Container.js';\nimport { containerColorsCSS } from '../../styles/container.sty.js';\nimport { textStyle } from '../../styles/textStyle.sty.js';\n\n/**\n * Accepted properties for ProgressCircle.\n * @public\n */\nexport interface ProgressCircleProps\n extends WithChildren,\n DOMProps,\n AriaLabelingProps,\n StylingProps,\n DataTestId,\n MaskingProps {\n /**\n * The current value.\n * @defaultValue 'indeterminate'\n */\n value?: number | 'indeterminate';\n /**\n * The smallest allowed value.\n * @defaultValue 0\n */\n min?: number;\n /**\n * The maximum allowed value.\n * @defaultValue 100\n */\n max?: number;\n /**\n * Controls the size of the rendered progress.\n * @defaultValue 'large'\n */\n size?: 'small' | 'large';\n /**\n * Controls the color of the progress.\n * @defaultValue 'primary' or a container's color.\n */\n color?: 'neutral' | 'primary' | 'success' | 'warning' | 'critical';\n /**\n * The aria-valuetext attribute defines the human-readable text alternative of aria-valuenow for a range widget.\n * Default the value as percentage will be provided. If the value is not a percentage please provide the aria-valuetext.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-valuetext\n * @defaultValue the value of the progress as percentage.\n */\n 'aria-valuetext'?: string;\n}\n\nconst progressCircleSizes = {\n small: 20,\n large: 40,\n};\nconst progressCircleThickness = 5;\n\n/**\n * The `ProgressCircle` component is used to indicate the progress or completion status of a task or process.\n * @public\n * */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (props, forwardedRef) => {\n const {\n value: originalValue,\n min = 0,\n max = 100,\n size = 'large',\n color,\n children,\n id: propId,\n 'aria-valuetext': ariaValuetext,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n ...remainingProps\n }: ProgressCircleProps = props;\n\n const { value, isIndeterminate, progressAriaProps } = useProgressAriaProps(\n originalValue,\n min,\n max,\n ariaValuetext,\n );\n\n const containerColoring = useContainerColoring();\n const derivedVariant =\n containerColoring.variant === 'accent' ? 'accent' : 'default';\n\n // for the color in the ProgressCircle the fallback logic is a bit different - usually\n // the fallback from the container is \"neutral\" - but in the case of the progress circle the default\n // fallback color is \"primary\"\n const fallbackColor = containerColoring.default\n ? 'primary'\n : containerColoring.color;\n const derivedColor = color ?? fallbackColor;\n\n const ariaLabelingProps = useAriaLabelingProps(remainingProps);\n const forwardProps = useSafeForwardProps(remainingProps, ariaLabelingProps);\n\n const generatedId = useId();\n const id = propId ?? generatedId;\n\n const circleStyles: CSSProperties = {};\n const rootProps = {};\n\n if (!isIndeterminate && value !== undefined) {\n const circumference =\n 2 *\n Math.PI *\n ((progressCircleSizes[size] - progressCircleThickness) / 2);\n circleStyles['strokeDasharray'] = circumference.toFixed(3);\n const dashOffset = Number(\n (((max - value) / max) * circumference).toFixed(3),\n );\n circleStyles['strokeDashoffset'] = `${\n dashOffset >= 0 ? dashOffset : 0\n }px`;\n }\n\n if (\n !children &&\n !ariaLabelingProps['aria-label'] &&\n !ariaLabelingProps['aria-labelledby']\n ) {\n process.env.NODE_ENV === 'development' &&\n // eslint-disable-next-line no-console\n console.warn(\n 'If no label is provided please make sure to provide an aria label on your progressCircle element.',\n );\n }\n\n return (\n <div\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n ref={forwardedRef}\n className={clsx(\n consumerClassName,\n containerColorsCSS({\n color: derivedColor,\n variant: derivedVariant,\n }),\n progressCircleContainerCSS({\n size,\n color: derivedColor,\n variant: derivedVariant,\n }),\n )}\n style={consumerStyle}\n {...forwardProps}\n >\n <span\n id={id}\n className={clsx(progressCircleRootCSS)}\n style={{\n height: `${progressCircleSizes[size]}px`,\n width: `${progressCircleSizes[size]}px`,\n }}\n {...ariaLabelingProps}\n {...progressAriaProps}\n {...rootProps}\n >\n <svg\n className={progressCircleSvgCss}\n viewBox={`0 0 ${progressCircleSizes[size]} ${progressCircleSizes[size]}`}\n width=\"100%\"\n height=\"100%\"\n >\n <circle\n fill=\"none\"\n className={clsx(progressCircleBackgroundCSS)}\n cx={progressCircleSizes[size] / 2}\n cy={progressCircleSizes[size] / 2}\n r={(progressCircleSizes[size] - progressCircleThickness) / 2}\n strokeWidth={progressCircleThickness}\n />\n <circle\n style={circleStyles}\n className={progressCircleCSS({ indeterminate: isIndeterminate })}\n fill=\"none\"\n pathLength={\n isIndeterminate ? 360 : circleStyles['strokeDasharray']\n }\n cx={progressCircleSizes[size] / 2}\n cy={progressCircleSizes[size] / 2}\n r={(progressCircleSizes[size] - progressCircleThickness) / 2}\n strokeWidth={progressCircleThickness}\n />\n </svg>\n </span>\n {children && (\n <label\n className={clsx(\n textStyle({ textStyle: size === 'small' ? 'small' : 'base' }),\n )}\n htmlFor={id}\n >\n {children}\n </label>\n )}\n </div>\n );\n },\n);\n\n(\n ProgressCircle as typeof ProgressCircle & { displayName: string }\n).displayName = 'ProgressCircle';\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./ProgressCircle.css";
|
|
2
2
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
var progressCircleBackgroundCSS = "_kvldjh9-1-
|
|
4
|
-
var progressCircleCSS = _7a468({ defaultClassName: "_kvldjh6-1-
|
|
5
|
-
var progressCircleContainerCSS = _7a468({ defaultClassName: "_kvldjha-1-
|
|
6
|
-
var progressCircleRootCSS = "_kvldjh4-1-
|
|
7
|
-
var progressCircleSvgCss = "_kvldjh5-1-
|
|
3
|
+
var progressCircleBackgroundCSS = "_kvldjh9-1-15-0";
|
|
4
|
+
var progressCircleCSS = _7a468({ defaultClassName: "_kvldjh6-1-15-0", variantClassNames: { indeterminate: { true: "_kvldjh7-1-15-0", false: "_kvldjh8-1-15-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5
|
+
var progressCircleContainerCSS = _7a468({ defaultClassName: "_kvldjha-1-15-0", variantClassNames: { size: { small: "_kvldjhb-1-15-0", large: "_kvldjhc-1-15-0" }, color: { critical: "_kvldjhd-1-15-0", neutral: "_kvldjhe-1-15-0", primary: "_kvldjhf-1-15-0", success: "_kvldjhg-1-15-0", warning: "_kvldjhh-1-15-0" }, variant: { "default": "_kvldjhi-1-15-0", accent: "_kvldjhj-1-15-0" } }, defaultVariants: {}, compoundVariants: [[{ color: "primary", variant: "accent" }, "_kvldjhk-1-15-0"], [{ color: "success", variant: "accent" }, "_kvldjhl-1-15-0"], [{ color: "warning", variant: "accent" }, "_kvldjhm-1-15-0"], [{ color: "critical", variant: "accent" }, "_kvldjhn-1-15-0"], [{ color: "neutral", variant: "accent" }, "_kvldjho-1-15-0"]] });
|
|
6
|
+
var progressCircleRootCSS = "_kvldjh4-1-15-0";
|
|
7
|
+
var progressCircleSvgCss = "_kvldjh5-1-15-0";
|
|
8
8
|
export {
|
|
9
9
|
progressCircleBackgroundCSS,
|
|
10
10
|
progressCircleCSS,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/progress/ProgressCircle.css.ts"],
|
|
4
|
-
"sourcesContent": ["import './ProgressCircle.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var progressCircleBackgroundCSS = '_kvldjh9-1-
|
|
4
|
+
"sourcesContent": ["import './ProgressCircle.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var progressCircleBackgroundCSS = '_kvldjh9-1-15-0';\nexport var progressCircleCSS = _7a468({defaultClassName:'_kvldjh6-1-15-0',variantClassNames:{indeterminate:{true:'_kvldjh7-1-15-0',false:'_kvldjh8-1-15-0'}},defaultVariants:{},compoundVariants:[]});\nexport var progressCircleContainerCSS = _7a468({defaultClassName:'_kvldjha-1-15-0',variantClassNames:{size:{small:'_kvldjhb-1-15-0',large:'_kvldjhc-1-15-0'},color:{critical:'_kvldjhd-1-15-0',neutral:'_kvldjhe-1-15-0',primary:'_kvldjhf-1-15-0',success:'_kvldjhg-1-15-0',warning:'_kvldjhh-1-15-0'},variant:{'default':'_kvldjhi-1-15-0',accent:'_kvldjhj-1-15-0'}},defaultVariants:{},compoundVariants:[[{color:'primary',variant:'accent'},'_kvldjhk-1-15-0'],[{color:'success',variant:'accent'},'_kvldjhl-1-15-0'],[{color:'warning',variant:'accent'},'_kvldjhm-1-15-0'],[{color:'critical',variant:'accent'},'_kvldjhn-1-15-0'],[{color:'neutral',variant:'accent'},'_kvldjho-1-15-0']]});\nexport var progressCircleRootCSS = '_kvldjh4-1-15-0';\nexport var progressCircleSvgCss = '_kvldjh5-1-15-0';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,8BAA8B;AAClC,IAAI,oBAAoB,OAAO,EAAC,kBAAiB,mBAAkB,mBAAkB,EAAC,eAAc,EAAC,MAAK,mBAAkB,OAAM,kBAAiB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;AAC7L,IAAI,6BAA6B,OAAO,EAAC,kBAAiB,mBAAkB,mBAAkB,EAAC,MAAK,EAAC,OAAM,mBAAkB,OAAM,kBAAiB,GAAE,OAAM,EAAC,UAAS,mBAAkB,SAAQ,mBAAkB,SAAQ,mBAAkB,SAAQ,mBAAkB,SAAQ,kBAAiB,GAAE,SAAQ,EAAC,WAAU,mBAAkB,QAAO,kBAAiB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,iBAAiB,GAAE,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,iBAAiB,GAAE,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,iBAAiB,GAAE,CAAC,EAAC,OAAM,YAAW,SAAQ,SAAQ,GAAE,iBAAiB,GAAE,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,iBAAiB,CAAC,EAAC,CAAC;AAC3pB,IAAI,wBAAwB;AAC5B,IAAI,uBAAuB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
._1a1ozfd0-1-
|
|
1
|
+
._1a1ozfd0-1-15-0 {
|
|
2
2
|
position: relative;
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
}
|
|
5
|
-
._1a1ozfd1-1-
|
|
5
|
+
._1a1ozfd1-1-15-0 {
|
|
6
6
|
border-radius: var(--dt-borders-radius-container-subdued, 6px);
|
|
7
7
|
}
|
|
8
|
-
._1a1ozfd2-1-
|
|
8
|
+
._1a1ozfd2-1-15-0 {
|
|
9
9
|
border-radius: 9999px;
|
|
10
10
|
}
|
|
11
|
-
._1a1ozfd3-1-
|
|
11
|
+
._1a1ozfd3-1-15-0 {
|
|
12
12
|
width: 100%;
|
|
13
13
|
height: 100%;
|
|
14
14
|
}
|
|
15
|
-
._1a1ozfd4-1-
|
|
15
|
+
._1a1ozfd4-1-15-0 stop {
|
|
16
16
|
stop-color: var(--dt-colors-background-field-neutral-disabled, #e4e5eb80);
|
|
17
17
|
}
|
|
18
|
-
._1a1ozfd5-1-
|
|
18
|
+
._1a1ozfd5-1-15-0 {
|
|
19
19
|
width: 100%;
|
|
20
20
|
height: 100%;
|
|
21
21
|
fill: var(--dt-colors-background-field-neutral-disabled, #e4e5eb80);
|
|
22
22
|
}
|
|
23
23
|
@media (prefers-reduced-motion) {
|
|
24
|
-
._1a1ozfd6-1-
|
|
24
|
+
._1a1ozfd6-1-15-0 {
|
|
25
25
|
display: contents;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./Skeleton.css";
|
|
2
2
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
var skeletonPlaceholderCSS = _7a468({ defaultClassName: "_1a1ozfd0-1-
|
|
4
|
-
var skeletonSvgBackgroundFillCSS = "_1a1ozfd5-1-
|
|
5
|
-
var skeletonSvgCSS = "_1a1ozfd3-1-
|
|
6
|
-
var skeletonSvgGradientCSS = "_1a1ozfd4-1-
|
|
7
|
-
var skeletonSvgGradientRectCSS = "_1a1ozfd6-1-
|
|
3
|
+
var skeletonPlaceholderCSS = _7a468({ defaultClassName: "_1a1ozfd0-1-15-0", variantClassNames: { variant: { "default": "_1a1ozfd1-1-15-0", rounded: "_1a1ozfd2-1-15-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
|
+
var skeletonSvgBackgroundFillCSS = "_1a1ozfd5-1-15-0";
|
|
5
|
+
var skeletonSvgCSS = "_1a1ozfd3-1-15-0";
|
|
6
|
+
var skeletonSvgGradientCSS = "_1a1ozfd4-1-15-0";
|
|
7
|
+
var skeletonSvgGradientRectCSS = "_1a1ozfd6-1-15-0";
|
|
8
8
|
export {
|
|
9
9
|
skeletonPlaceholderCSS,
|
|
10
10
|
skeletonSvgBackgroundFillCSS,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/skeleton/Skeleton.css.ts"],
|
|
4
|
-
"sourcesContent": ["import './Skeleton.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var skeletonPlaceholderCSS = _7a468({defaultClassName:'_1a1ozfd0-1-
|
|
4
|
+
"sourcesContent": ["import './Skeleton.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var skeletonPlaceholderCSS = _7a468({defaultClassName:'_1a1ozfd0-1-15-0',variantClassNames:{variant:{'default':'_1a1ozfd1-1-15-0',rounded:'_1a1ozfd2-1-15-0'}},defaultVariants:{},compoundVariants:[]});\nexport var skeletonSvgBackgroundFillCSS = '_1a1ozfd5-1-15-0';\nexport var skeletonSvgCSS = '_1a1ozfd3-1-15-0';\nexport var skeletonSvgGradientCSS = '_1a1ozfd4-1-15-0';\nexport var skeletonSvgGradientRectCSS = '_1a1ozfd6-1-15-0';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,yBAAyB,OAAO,EAAC,kBAAiB,oBAAmB,mBAAkB,EAAC,SAAQ,EAAC,WAAU,oBAAmB,SAAQ,mBAAkB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;AACtM,IAAI,+BAA+B;AACnC,IAAI,iBAAiB;AACrB,IAAI,yBAAyB;AAC7B,IAAI,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -25,7 +25,8 @@ const AppRoot = /* @__PURE__ */ forwardRef(
|
|
|
25
25
|
className: consumerClassName,
|
|
26
26
|
"data-testid": dataTestId,
|
|
27
27
|
"data-dtrum-mask": dataDtrumMask,
|
|
28
|
-
"data-dtrum-allow": dataDtrumAllow
|
|
28
|
+
"data-dtrum-allow": dataDtrumAllow,
|
|
29
|
+
translationRootPath = `${getBaseHref()}lang/`
|
|
29
30
|
} = props;
|
|
30
31
|
const [messages, setMessages] = useState({});
|
|
31
32
|
const { children } = props;
|
|
@@ -46,7 +47,7 @@ const AppRoot = /* @__PURE__ */ forwardRef(
|
|
|
46
47
|
if (language === "en") {
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
49
|
-
fetch(`${
|
|
50
|
+
fetch(`${translationRootPath}${language}.json`).then((res) => {
|
|
50
51
|
return res.json();
|
|
51
52
|
}).then((receivedMessages) => {
|
|
52
53
|
setMessages(receivedMessages);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/core/components/app-root/AppRoot.tsx"],
|
|
4
|
-
"sourcesContent": ["import { isEmpty } from 'lodash-es';\nimport {\n type PropsWithChildren,\n forwardRef,\n useEffect,\n useLayoutEffect,\n useState,\n} from 'react';\nimport { IntlProvider, type MessageFormatElement } from 'react-intl';\n\nimport 'wicg-inert';\nimport { getLanguage, getTimezone } from '@dynatrace-sdk/user-preferences';\n\nimport './AppRoot.sty.js';\nimport { useCurrentTheme } from '../../hooks/useCurrentTheme.js';\nimport { FocusProvider } from '../../providers/FocusProvider.js';\nimport { type DataTestId } from '../../types/data-props.js';\nimport { type MaskingProps } from '../../types/masking-props.js';\nimport { type StylingProps } from '../../types/styling-props.js';\n\n/**\n * Gets the href value set in the <base> element to prefix fetches correctly.\n * Will always end with a `/` value\n */\nfunction getBaseHref(): string {\n const baseElement = document.querySelector('base');\n const href = baseElement?.href ?? '/';\n return href.endsWith('/') ? href : `${href}/`;\n}\n\n/**\n * AppRoot component props.\n * @public\n */\nexport type AppRootProps = PropsWithChildren<\n DataTestId & StylingProps & MaskingProps\n
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { isEmpty } from 'lodash-es';\nimport {\n type PropsWithChildren,\n forwardRef,\n useEffect,\n useLayoutEffect,\n useState,\n} from 'react';\nimport { IntlProvider, type MessageFormatElement } from 'react-intl';\n\nimport 'wicg-inert';\nimport { getLanguage, getTimezone } from '@dynatrace-sdk/user-preferences';\n\nimport './AppRoot.sty.js';\nimport { useCurrentTheme } from '../../hooks/useCurrentTheme.js';\nimport { FocusProvider } from '../../providers/FocusProvider.js';\nimport { type DataTestId } from '../../types/data-props.js';\nimport { type MaskingProps } from '../../types/masking-props.js';\nimport { type StylingProps } from '../../types/styling-props.js';\n\n/**\n * Gets the href value set in the <base> element to prefix fetches correctly.\n * Will always end with a `/` value\n */\nfunction getBaseHref(): string {\n const baseElement = document.querySelector('base');\n const href = baseElement?.href ?? '/';\n return href.endsWith('/') ? href : `${href}/`;\n}\n\n/**\n * AppRoot component props.\n * @public\n */\nexport type AppRootProps = PropsWithChildren<\n DataTestId & StylingProps & MaskingProps\n> & {\n /**\n * The path to the folder of translations. Needs to always end with a `/` value and contain language files like en.json + ja.json.\n * The default path depends on your host domain and looks something like 'https://example.com/ui/lang/'.\n */\n translationRootPath?: string;\n};\n\nconst defaultLanguage = 'en';\n\n/**\n * In order to have all the providers in place for rendering overlays, applying\n * global styles or internationalization, you need to wrap your app in the\n * `AppRoot`. If you're using the `dt-app` to create your app, this is\n * automatically taken care of and you can start working on your app without\n * further ado.\n * @public\n */\nexport const AppRoot = /* @__PURE__ */ forwardRef<HTMLDivElement, AppRootProps>(\n (props, forwardedRef) => {\n const {\n style: consumerStyle,\n className: consumerClassName,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n translationRootPath = `${getBaseHref()}lang/`,\n } = props;\n\n /** Messages that are used for the translation. */\n const [messages, setMessages] = useState<\n Record<string, string> | Record<string, MessageFormatElement[]>\n >({});\n\n const { children } = props;\n\n const theme = useCurrentTheme();\n const language = getLanguage();\n let timezone = getTimezone();\n try {\n new Intl.DateTimeFormat(language, { timeZone: timezone });\n } catch {\n // If the passed timezone is not valid, we can fall back to the browsers\n // configured one.\n timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /**\n * Synchronize the [data-theme] attribute to the root of the document\n * to have the design tokens defined in the cascade.\n */\n useLayoutEffect(() => {\n if (document !== undefined) {\n document.documentElement.setAttribute('data-theme', theme);\n }\n }, [theme]);\n\n useEffect(() => {\n if (language === 'en') {\n // Don't fetch translations for 'en' to avoid an additional render cycle.\n // The default messages are in english already.\n return;\n }\n\n fetch(`${translationRootPath}${language}.json`)\n .then((res) => {\n return res.json();\n })\n .then((receivedMessages) => {\n setMessages(receivedMessages);\n })\n .catch(() => {\n // Only set messages to a new empty object if the previous messages were not empty.\n // `setMessages({})` would make react believe that this is a new object and, hence, re-render.\n // By just returning `prev` if the messages were already empty, we can avoid the additional render.\n setMessages((prev) => (isEmpty(prev) ? prev : {}));\n });\n }, [language]);\n\n return (\n <div\n ref={forwardedRef}\n data-testid={dataTestId}\n className={consumerClassName}\n style={consumerStyle}\n data-theme={theme}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n >\n <IntlProvider\n locale={language}\n timeZone={timezone}\n messages={messages}\n defaultLocale={defaultLanguage}\n >\n <FocusProvider>{children}</FocusProvider>\n </IntlProvider>\n </div>\n );\n },\n);\n\n(AppRoot as typeof AppRoot & { displayName: string }).displayName = 'AppRoot';\n"],
|
|
5
|
+
"mappings": "AAmIU;AAnIV,SAAS,eAAe;AACxB;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAA+C;AAExD,OAAO;AACP,SAAS,aAAa,mBAAmB;AAEzC,OAAO;AACP,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAS9B,SAAS,cAAsB;AAC7B,QAAM,cAAc,SAAS,cAAc,MAAM;AACjD,QAAM,OAAO,aAAa,QAAQ;AAClC,SAAO,KAAK,SAAS,GAAG,IAAI,OAAO,GAAG,IAAI;AAC5C;AAgBA,MAAM,kBAAkB;AAUjB,MAAM,UAA0B;AAAA,EACrC,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,sBAAsB,GAAG,YAAY,CAAC;AAAA,IACxC,IAAI;AAGJ,UAAM,CAAC,UAAU,WAAW,IAAI,SAE9B,CAAC,CAAC;AAEJ,UAAM,EAAE,SAAS,IAAI;AAErB,UAAM,QAAQ,gBAAgB;AAC9B,UAAM,WAAW,YAAY;AAC7B,QAAI,WAAW,YAAY;AAC3B,QAAI;AACF,UAAI,KAAK,eAAe,UAAU,EAAE,UAAU,SAAS,CAAC;AAAA,IAC1D,QAAQ;AAGN,iBAAW,KAAK,eAAe,EAAE,gBAAgB,EAAE;AAAA,IACrD;AAMA,oBAAgB,MAAM;AACpB,UAAI,aAAa,QAAW;AAC1B,iBAAS,gBAAgB,aAAa,cAAc,KAAK;AAAA,MAC3D;AAAA,IACF,GAAG,CAAC,KAAK,CAAC;AAEV,cAAU,MAAM;AACd,UAAI,aAAa,MAAM;AAGrB;AAAA,MACF;AAEA,YAAM,GAAG,mBAAmB,GAAG,QAAQ,OAAO,EAC3C,KAAK,CAAC,QAAQ;AACb,eAAO,IAAI,KAAK;AAAA,MAClB,CAAC,EACA,KAAK,CAAC,qBAAqB;AAC1B,oBAAY,gBAAgB;AAAA,MAC9B,CAAC,EACA,MAAM,MAAM;AAIX,oBAAY,CAAC,SAAU,QAAQ,IAAI,IAAI,OAAO,CAAC,CAAE;AAAA,MACnD,CAAC;AAAA,IACL,GAAG,CAAC,QAAQ,CAAC;AAEb,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,eAAa;AAAA,QACb,WAAW;AAAA,QACX,OAAO;AAAA,QACP,cAAY;AAAA,QACZ,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAElB;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ;AAAA,YACR,UAAU;AAAA,YACV;AAAA,YACA,eAAe;AAAA,YAEf,8BAAC,iBAAe,UAAS;AAAA;AAAA,QAC3B;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEC,QAAqD,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/hooks/useId.ts"],
|
|
4
|
-
"sourcesContent": ["// The one place where we actually need to use this import.\n// eslint-disable-next-line no-restricted-imports\nimport { useMemo, useId as useReactId } from 'react';\n\n/**\n * Custom hook to generate a sanitized react useId for use in DOM selectors.\n *\n * React's `useId()` may return IDs containing colons (e.g., `:r1:`), which are valid in HTML\n * but **not valid CSS identifiers**. This can cause issues when using `querySelector` or when\n * libraries like `nwsapi` attempt to parse selectors, especially in test environments like jest\n * with jsdom.\n *\n * This hook replaces colons with a safe, reversible encoding (`\u00AB` and `\u00BB`) to ensure the ID\n * remains unique and usable in CSS selectors. The characters are chosen to be the same as in the\n * react 19.2+ implementation.\n *\n * Background:\n * - React previously used colons in generated IDs to avoid collisions.\n * - This caused parsing errors in selector engines like `nwsapi` when used in test environments.\n * - React addressed this in [facebook/react#32001](https://github.com/facebook/react/pull/32001) in React 19.2+.\n *\n * This hook provides a workaround for environments still using older React versions or needing\n * compatibility with selector engines that strictly enforce CSS syntax.\n *\n * @returns A sanitized ID string safe for use in `querySelector` and CSS selectors.\n * @public\n */\nexport function useId() {\n const id = useReactId();\n\n const sanitizedId = useMemo(() => {\n return id.replace(':', '\\u00AB').replace(':', '\\u00BB');\n }, [id]);\n\n return sanitizedId;\n}\n"],
|
|
5
|
-
"mappings": "AAEA,SAAS,SAAS,SAAS,kBAAkB;AAyBtC,SAAS,
|
|
4
|
+
"sourcesContent": ["// The one place where we actually need to use this import.\n// eslint-disable-next-line no-restricted-imports\nimport { useMemo, useId as useReactId } from 'react';\n\n/**\n * Custom hook to generate a sanitized react useId for use in DOM selectors.\n *\n * React's `useId()` may return IDs containing colons (e.g., `:r1:`), which are valid in HTML\n * but **not valid CSS identifiers**. This can cause issues when using `querySelector` or when\n * libraries like `nwsapi` attempt to parse selectors, especially in test environments like jest\n * with jsdom.\n *\n * This hook replaces colons with a safe, reversible encoding (`\u00AB` and `\u00BB`) to ensure the ID\n * remains unique and usable in CSS selectors. The characters are chosen to be the same as in the\n * react 19.2+ implementation.\n *\n * Background:\n * - React previously used colons in generated IDs to avoid collisions.\n * - This caused parsing errors in selector engines like `nwsapi` when used in test environments.\n * - React addressed this in [facebook/react#32001](https://github.com/facebook/react/pull/32001) in React 19.2+.\n *\n * This hook provides a workaround for environments still using older React versions or needing\n * compatibility with selector engines that strictly enforce CSS syntax.\n *\n * @returns A sanitized ID string safe for use in `querySelector` and CSS selectors.\n * @public\n */\nexport function useId(): string {\n const id = useReactId();\n\n const sanitizedId = useMemo(() => {\n return id.replace(':', '\\u00AB').replace(':', '\\u00BB');\n }, [id]);\n\n return sanitizedId;\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,SAAS,SAAS,kBAAkB;AAyBtC,SAAS,QAAgB;AAC9B,QAAM,KAAK,WAAW;AAEtB,QAAM,cAAc,QAAQ,MAAM;AAChC,WAAO,GAAG,QAAQ,KAAK,MAAQ,EAAE,QAAQ,KAAK,MAAQ;AAAA,EACxD,GAAG,CAAC,EAAE,CAAC;AAEP,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|