@dynatrace/strato-components 1.4.0 → 1.6.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 +18 -22
- package/buttons/button/Button.d.ts +4 -4
- package/buttons/button/Button.js +48 -34
- package/buttons/button/Button.sty.js +5 -4
- package/buttons/button/Label.d.ts +2 -2
- package/buttons/button/Label.js +7 -5
- package/buttons/button/Prefix.d.ts +2 -2
- package/buttons/button/Prefix.js +7 -15
- package/buttons/button/Suffix.d.ts +3 -3
- package/buttons/button/Suffix.js +7 -15
- package/buttons/button/types/button-aria.js +1 -0
- package/buttons/button/utils/focus-without-scrolling.js +1 -0
- package/buttons/button/utils/is-virtual-event.js +1 -0
- package/buttons/index.js +1 -0
- package/buttons/intent-button/IntentButton.d.ts +2 -2
- package/buttons/intent-button/IntentButton.js +17 -21
- package/buttons/intent-button/useIntentButton.d.ts +4 -3
- package/buttons/intent-button/useIntentButton.js +1 -0
- package/content/index.js +1 -0
- package/content/progress/ProgressBar.css +71 -71
- package/content/progress/ProgressBar.d.ts +4 -5
- package/content/progress/ProgressBar.js +50 -41
- package/content/progress/ProgressBar.sty.js +6 -5
- package/content/progress/ProgressBarIcon.css +2 -2
- package/content/progress/ProgressBarIcon.d.ts +1 -2
- package/content/progress/ProgressBarIcon.js +7 -5
- package/content/progress/ProgressBarIcon.sty.js +2 -1
- package/content/progress/ProgressBarLabel.css +3 -3
- package/content/progress/ProgressBarLabel.d.ts +1 -2
- package/content/progress/ProgressBarLabel.js +7 -5
- package/content/progress/ProgressBarLabel.sty.js +2 -1
- package/content/progress/ProgressBarValue.css +5 -5
- package/content/progress/ProgressBarValue.d.ts +1 -2
- package/content/progress/ProgressBarValue.js +7 -5
- package/content/progress/ProgressBarValue.sty.js +2 -1
- package/content/progress/ProgressCircle.css +40 -40
- package/content/progress/ProgressCircle.d.ts +1 -2
- package/content/progress/ProgressCircle.js +61 -55
- package/content/progress/ProgressCircle.sty.js +6 -5
- package/content/progress/contexts/SharedProgressBarPropsContext.d.ts +1 -2
- package/content/progress/contexts/SharedProgressBarPropsContext.js +3 -12
- package/content/progress/hooks/useProgressAriaProps.js +1 -0
- package/content/progress/hooks/useProgressBarPropsContext.js +1 -0
- package/content/skeleton/Skeleton.css +6 -6
- package/content/skeleton/Skeleton.d.ts +2 -2
- package/content/skeleton/Skeleton.js +7 -5
- package/content/skeleton/Skeleton.sty.js +2 -1
- package/content/skeleton/SkeletonText.d.ts +2 -2
- package/content/skeleton/SkeletonText.js +10 -18
- package/core/components/app-root/AppRoot.d.ts +3 -3
- package/core/components/app-root/AppRoot.js +16 -24
- package/core/components/app-root/AppRoot.sty.js +1 -0
- package/core/components/focus-scope/FocusScope.d.ts +1 -2
- package/core/components/focus-scope/FocusScope.js +7 -15
- package/core/contexts/FocusContext.js +1 -0
- package/core/hooks/useActiveElement.js +1 -0
- package/core/hooks/useAriaLabelingProps.js +1 -0
- package/core/hooks/useCurrentTheme.js +1 -0
- package/core/hooks/useFocusContext.js +1 -0
- package/core/hooks/useFontsUpdated.js +2 -1
- package/core/hooks/useId.js +1 -0
- package/core/hooks/useMergeRefs.d.ts +2 -2
- package/core/hooks/useMergeRefs.js +1 -0
- package/core/hooks/useSafeForwardProps.js +1 -0
- package/core/index.js +1 -0
- package/core/providers/FocusProvider.d.ts +1 -2
- package/core/providers/FocusProvider.js +7 -15
- package/core/styles/focusRing.css +66 -66
- package/core/styles/focusRing.sty.js +3 -2
- package/core/styles/useFocusRing.d.ts +3 -3
- package/core/styles/useFocusRing.js +1 -0
- package/core/types/a11y-props.js +1 -0
- package/core/types/data-props.js +1 -0
- package/core/types/dom.js +1 -0
- package/core/types/heading.js +1 -0
- package/core/types/masking-props.js +1 -0
- package/core/types/polymorph.d.ts +1 -1
- package/core/types/polymorph.js +1 -0
- package/core/types/styling-props.d.ts +1 -1
- package/core/types/styling-props.js +1 -0
- package/core/types/with-children.d.ts +1 -1
- package/core/types/with-children.js +1 -0
- package/core/utils/_is-string-children.d.ts +2 -2
- package/core/utils/_is-string-children.js +3 -12
- package/core/utils/colorUtils.css +60 -60
- package/core/utils/colorUtils.sty.js +3 -2
- package/core/utils/focus-management/attempt-focus.js +1 -0
- package/core/utils/focus-management/focus-first-descendant.js +1 -0
- package/core/utils/focus-management/get-first-focusable-child.js +1 -0
- package/core/utils/focus-management/get-last-focusable-child.js +1 -0
- package/core/utils/focus-management/is-focusable.js +1 -0
- package/core/utils/isBrowser.js +1 -0
- package/core/utils/merge-props.js +1 -0
- package/core/utils/parse-boolean.js +1 -0
- package/core/utils/seed-random.js +1 -0
- package/core/utils/uuidv4.js +1 -0
- package/esm/buttons/button/Button.css +18 -22
- package/esm/buttons/button/Button.js +49 -35
- package/esm/buttons/button/Button.js.map +2 -2
- package/esm/buttons/button/Button.sty.js +4 -4
- package/esm/buttons/button/Button.sty.js.map +1 -1
- package/esm/buttons/button/Label.js +6 -5
- package/esm/buttons/button/Label.js.map +2 -2
- package/esm/buttons/button/Prefix.js +6 -5
- package/esm/buttons/button/Prefix.js.map +2 -2
- package/esm/buttons/button/Suffix.js +6 -5
- package/esm/buttons/button/Suffix.js.map +2 -2
- package/esm/buttons/intent-button/IntentButton.js +16 -11
- package/esm/buttons/intent-button/IntentButton.js.map +2 -2
- package/esm/buttons/intent-button/useIntentButton.js +4 -1
- package/esm/buttons/intent-button/useIntentButton.js.map +2 -2
- package/esm/content/progress/ProgressBar.css +71 -71
- package/esm/content/progress/ProgressBar.js +53 -41
- package/esm/content/progress/ProgressBar.js.map +2 -2
- 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.js +6 -5
- package/esm/content/progress/ProgressBarIcon.js.map +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 -5
- package/esm/content/progress/ProgressBarLabel.js.map +2 -2
- package/esm/content/progress/ProgressBarLabel.sty.js +1 -1
- package/esm/content/progress/ProgressBarLabel.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarValue.css +5 -5
- package/esm/content/progress/ProgressBarValue.js +6 -5
- package/esm/content/progress/ProgressBarValue.js.map +2 -2
- package/esm/content/progress/ProgressBarValue.sty.js +1 -1
- package/esm/content/progress/ProgressBarValue.sty.js.map +1 -1
- package/esm/content/progress/ProgressCircle.css +40 -40
- package/esm/content/progress/ProgressCircle.js +60 -55
- 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/progress/contexts/SharedProgressBarPropsContext.js +2 -2
- package/esm/content/progress/contexts/SharedProgressBarPropsContext.js.map +2 -2
- package/esm/content/skeleton/Skeleton.css +6 -6
- package/esm/content/skeleton/Skeleton.js +6 -5
- package/esm/content/skeleton/Skeleton.js.map +2 -2
- package/esm/content/skeleton/Skeleton.sty.js +1 -1
- package/esm/content/skeleton/Skeleton.sty.js.map +1 -1
- package/esm/content/skeleton/SkeletonText.js +9 -8
- package/esm/content/skeleton/SkeletonText.js.map +2 -2
- package/esm/core/components/app-root/AppRoot.js +15 -14
- package/esm/core/components/app-root/AppRoot.js.map +2 -2
- package/esm/core/components/focus-scope/FocusScope.js +6 -5
- package/esm/core/components/focus-scope/FocusScope.js.map +2 -2
- package/esm/core/hooks/useFontsUpdated.js +1 -1
- package/esm/core/hooks/useFontsUpdated.js.map +2 -2
- package/esm/core/hooks/useMergeRefs.js +3 -1
- package/esm/core/hooks/useMergeRefs.js.map +2 -2
- package/esm/core/providers/FocusProvider.js +6 -5
- package/esm/core/providers/FocusProvider.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/styles/useFocusRing.js.map +1 -1
- package/esm/core/utils/_is-string-children.js +2 -2
- package/esm/core/utils/_is-string-children.js.map +2 -2
- 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/layouts/container/Container.css +4 -4
- package/esm/layouts/container/Container.js +7 -6
- package/esm/layouts/container/Container.js.map +2 -2
- 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.js +3 -2
- package/esm/layouts/divider/Divider.js.map +2 -2
- package/esm/layouts/divider/Divider.sty.js +1 -1
- package/esm/layouts/divider/Divider.sty.js.map +1 -1
- package/esm/layouts/flex/Flex.js +6 -5
- package/esm/layouts/flex/Flex.js.map +2 -2
- package/esm/layouts/grid/Grid.js +6 -5
- package/esm/layouts/grid/Grid.js.map +2 -2
- package/esm/layouts/surface/Surface.css +39 -39
- package/esm/layouts/surface/Surface.js +17 -14
- 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 +2 -2
- package/esm/styles/colorUtils.sty.js.map +1 -1
- 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 +1 -1
- package/esm/styles/ellipsis.sty.js.map +1 -1
- package/esm/styles/field.css +153 -153
- package/esm/styles/field.sty.js +2 -2
- package/esm/styles/field.sty.js.map +1 -1
- package/esm/styles/getFlexStyles.js.map +1 -1
- package/esm/styles/getGridStyles.js.map +1 -1
- package/esm/styles/getLayoutSizeStyles.js.map +1 -1
- 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 +1 -1
- package/esm/styles/textStyle.sty.js.map +1 -1
- package/esm/typography/block-quote/Blockquote.css +2 -2
- package/esm/typography/block-quote/Blockquote.js +6 -5
- package/esm/typography/block-quote/Blockquote.js.map +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.js +6 -5
- package/esm/typography/code/Code.js.map +2 -2
- 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.js +6 -5
- package/esm/typography/emphasis/Emphasis.js.map +2 -2
- 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 +6 -6
- package/esm/typography/external-link/ExternalLink.js +22 -16
- 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.js +6 -5
- package/esm/typography/heading/Heading.js.map +2 -2
- 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 +2 -1
- package/esm/typography/highlight/Highlight.js +31 -18
- package/esm/typography/highlight/Highlight.js.map +3 -3
- package/esm/typography/highlight/Highlight.sty.js +1 -1
- package/esm/typography/highlight/Highlight.sty.js.map +1 -1
- package/esm/typography/link/Link.css +4 -4
- package/esm/typography/link/Link.js +6 -5
- 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.js +14 -9
- package/esm/typography/list/List.js.map +2 -2
- 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 +6 -5
- package/esm/typography/paragraph/Paragraph.js.map +2 -2
- package/esm/typography/paragraph/Paragraph.sty.js +1 -1
- package/esm/typography/paragraph/Paragraph.sty.js.map +1 -1
- package/esm/typography/strikethrough/Strikethrough.css +1 -1
- package/esm/typography/strikethrough/Strikethrough.js +6 -5
- package/esm/typography/strikethrough/Strikethrough.js.map +2 -2
- 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.js +6 -5
- package/esm/typography/strong/Strong.js.map +2 -2
- 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 +6 -5
- package/esm/typography/text/Text.js.map +2 -2
- package/esm/typography/text/Text.sty.js +1 -1
- package/esm/typography/text/Text.sty.js.map +1 -1
- package/esm/typography/text-ellipsis/TextEllipsis.css +8 -5
- package/esm/typography/text-ellipsis/TextEllipsis.js +16 -15
- package/esm/typography/text-ellipsis/TextEllipsis.js.map +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js +4 -4
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js.map +2 -2
- package/index.js +1 -0
- package/layouts/container/Container.css +4 -4
- package/layouts/container/Container.js +8 -6
- package/layouts/container/Container.sty.js +2 -1
- package/layouts/divider/Divider.css +6 -6
- package/layouts/divider/Divider.d.ts +1 -2
- package/layouts/divider/Divider.js +4 -2
- package/layouts/divider/Divider.sty.js +2 -1
- package/layouts/flex/Flex.js +7 -5
- package/layouts/grid/Grid.d.ts +1 -1
- package/layouts/grid/Grid.js +7 -5
- package/layouts/helpers/spacingToCss.js +1 -0
- package/layouts/hooks/useBreakpoint.js +1 -0
- package/layouts/hooks/useLayoutSizeProps.js +1 -0
- package/layouts/hooks/useLayoutStyles.js +1 -0
- package/layouts/hooks/useMarginProps.js +1 -0
- package/layouts/hooks/usePaddingProps.js +1 -0
- package/layouts/index.js +1 -0
- package/layouts/surface/Surface.css +39 -39
- package/layouts/surface/Surface.js +18 -14
- package/layouts/surface/Surface.sty.js +3 -2
- package/layouts/surface/variables.sty.js +2 -1
- package/layouts/types/layout.types.d.ts +1 -1
- package/layouts/types/layout.types.js +1 -0
- package/package.json +5 -5
- package/styles/colorUtils.css +60 -60
- package/styles/colorUtils.sty.js +3 -2
- package/styles/container.css +47 -47
- package/styles/container.sty.js +3 -2
- package/styles/ellipsis.css +1 -1
- package/styles/ellipsis.sty.js +2 -1
- package/styles/extract-util.js +1 -0
- package/styles/field.css +153 -153
- package/styles/field.sty.js +3 -2
- package/styles/getFlexStyles.d.ts +17 -17
- package/styles/getFlexStyles.js +1 -0
- package/styles/getGapSprinkles.js +1 -0
- package/styles/getGridFlexPositionSprinkles.js +1 -0
- package/styles/getGridStyles.d.ts +22 -22
- package/styles/getGridStyles.js +1 -0
- package/styles/getLayoutSizeStyles.d.ts +1 -1
- package/styles/getLayoutSizeStyles.js +1 -0
- package/styles/getSpacingSprinkles.js +1 -0
- package/styles/index.js +1 -0
- package/styles/safe-sprinkles.js +1 -0
- package/styles/sprinkle-properties.js +1 -0
- package/styles/sprinkles.css +262 -262
- package/styles/sprinkles.sty.js +2 -1
- package/styles/textStyle.css +8 -8
- package/styles/textStyle.sty.js +2 -1
- package/typography/block-quote/Blockquote.css +2 -2
- package/typography/block-quote/Blockquote.d.ts +1 -2
- package/typography/block-quote/Blockquote.js +7 -5
- package/typography/block-quote/Blockquote.sty.js +2 -1
- package/typography/code/Code.css +1 -1
- package/typography/code/Code.d.ts +1 -2
- package/typography/code/Code.js +7 -5
- package/typography/code/Code.sty.js +2 -1
- package/typography/emphasis/Emphasis.css +1 -1
- package/typography/emphasis/Emphasis.d.ts +1 -2
- package/typography/emphasis/Emphasis.js +7 -5
- package/typography/emphasis/Emphasis.sty.js +2 -1
- package/typography/external-link/ExternalLink.css +6 -6
- package/typography/external-link/ExternalLink.d.ts +2 -2
- package/typography/external-link/ExternalLink.js +23 -16
- package/typography/external-link/ExternalLink.sty.js +2 -1
- package/typography/heading/Heading.css +7 -7
- package/typography/heading/Heading.d.ts +1 -2
- package/typography/heading/Heading.js +7 -5
- package/typography/heading/Heading.sty.js +2 -1
- package/typography/highlight/Highlight.css +2 -1
- package/typography/highlight/Highlight.d.ts +1 -1
- package/typography/highlight/Highlight.js +22 -17
- package/typography/highlight/Highlight.sty.js +2 -1
- package/typography/index.js +1 -0
- package/typography/link/Link.css +4 -4
- package/typography/link/Link.d.ts +1 -1
- package/typography/link/Link.js +7 -5
- package/typography/link/Link.sty.js +2 -1
- package/typography/list/List.css +4 -4
- package/typography/list/List.d.ts +1 -2
- package/typography/list/List.js +11 -9
- package/typography/list/List.sty.js +3 -2
- package/typography/paragraph/Paragraph.css +3 -3
- package/typography/paragraph/Paragraph.d.ts +1 -2
- package/typography/paragraph/Paragraph.js +7 -5
- package/typography/paragraph/Paragraph.sty.js +2 -1
- package/typography/strikethrough/Strikethrough.css +1 -1
- package/typography/strikethrough/Strikethrough.d.ts +1 -2
- package/typography/strikethrough/Strikethrough.js +7 -5
- package/typography/strikethrough/Strikethrough.sty.js +2 -1
- package/typography/strong/Strong.css +1 -1
- package/typography/strong/Strong.d.ts +1 -2
- package/typography/strong/Strong.js +7 -5
- package/typography/strong/Strong.sty.js +2 -1
- package/typography/text/Text.css +3 -3
- package/typography/text/Text.js +7 -5
- package/typography/text/Text.sty.js +2 -1
- package/typography/text-ellipsis/TextEllipsis.css +8 -5
- package/typography/text-ellipsis/TextEllipsis.d.ts +2 -2
- package/typography/text-ellipsis/TextEllipsis.js +17 -15
- package/typography/text-ellipsis/TextEllipsis.sty.d.ts +7 -2
- package/typography/text-ellipsis/TextEllipsis.sty.js +5 -4
- package/typography/utils.js +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/content/progress/contexts/SharedProgressBarPropsContext.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable deprecation/deprecation */\n\nimport
|
|
5
|
-
"mappings": "AAEA,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable deprecation/deprecation */\n\nimport { createContext } from 'react';\n\nexport type SharedProgressBarProps = {\n id: string;\n density: 'default' | 'condensed';\n};\n\n/** Context provider for `ProgressBarProps` props meant to be provided to all its progressbar-related child nodes. */\nexport const SharedProgressBarPropsContext =\n createContext<SharedProgressBarProps>({\n id: '',\n density: 'default',\n });\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,qBAAqB;AAQvB,MAAM,gCACX,cAAsC;AAAA,EACpC,IAAI;AAAA,EACJ,SAAS;AACX,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@keyframes _1a1ozfd0-1-
|
|
1
|
+
@keyframes _1a1ozfd0-1-6-0 {
|
|
2
2
|
0% {
|
|
3
3
|
transform: translateX(-100%) scaleX(0);
|
|
4
4
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
transform: translateX(100%) scaleX(1.5);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
._1a1ozfd1-1-
|
|
9
|
+
._1a1ozfd1-1-6-0 {
|
|
10
10
|
position: relative;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
background-color: var(--dt-colors-background-field-neutral-disabled, #dadbe780);
|
|
13
13
|
}
|
|
14
|
-
._1a1ozfd1-1-
|
|
14
|
+
._1a1ozfd1-1-6-0:after {
|
|
15
15
|
content: "";
|
|
16
16
|
position: absolute;
|
|
17
17
|
top: 0;
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
background-color: var(--dt-colors-background-field-neutral-disabled, #dadbe780);
|
|
22
22
|
animation-iteration-count: infinite;
|
|
23
23
|
transform-origin: left center;
|
|
24
|
-
animation-name: _1a1ozfd0-1-
|
|
24
|
+
animation-name: _1a1ozfd0-1-6-0;
|
|
25
25
|
animation-duration: var(--dt-timings-slow-gentle, 800ms);
|
|
26
26
|
animation-timing-function: var(--dt-easings-fast-in-slow-out, cubic-bezier(0.4, 0, 0.2, 1));
|
|
27
27
|
}
|
|
28
|
-
._1a1ozfd2-1-
|
|
28
|
+
._1a1ozfd2-1-6-0 {
|
|
29
29
|
border-radius: var(--dt-borders-radius-container-subdued, 8px);
|
|
30
30
|
}
|
|
31
|
-
._1a1ozfd3-1-
|
|
31
|
+
._1a1ozfd3-1-6-0 {
|
|
32
32
|
border-radius: 9999px;
|
|
33
33
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import clsx from "clsx";
|
|
2
|
-
import
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { skeletonPlaceholderCSS } from "./Skeleton.sty.js";
|
|
4
5
|
const Skeleton = forwardRef(
|
|
5
6
|
(props, forwardedRef) => {
|
|
@@ -13,16 +14,16 @@ const Skeleton = forwardRef(
|
|
|
13
14
|
"data-testid": dataTestId,
|
|
14
15
|
...remainingProps
|
|
15
16
|
} = props;
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
17
18
|
"div",
|
|
18
19
|
{
|
|
19
20
|
"data-testid": dataTestId,
|
|
20
21
|
ref: forwardedRef,
|
|
21
22
|
className: clsx(skeletonPlaceholderCSS({ variant }), consumerClassName),
|
|
22
23
|
style: { width, height, ...consumerStyle },
|
|
23
|
-
...remainingProps
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
...remainingProps,
|
|
25
|
+
children
|
|
26
|
+
}
|
|
26
27
|
);
|
|
27
28
|
}
|
|
28
29
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/skeleton/Skeleton.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { type CSSProperties, forwardRef } from 'react';\n\nimport { skeletonPlaceholderCSS } from './Skeleton.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';\n\n/**\n * Accepted properties for Skeleton\n * @public\n */\nexport interface SkeletonProps extends WithChildren, StylingProps, DataTestId {\n /**\n * Defines the shape of the Skeleton.\n * @defaultValue 'default'\n */\n variant?: 'default' | 'rounded';\n /**\n * Width of the Skeleton placeholder.\n * @defaultValue 100%\n */\n width?: CSSProperties['width'];\n /**\n * Height of the Skeleton placeholder.\n * @defaultValue 100%\n */\n height?: CSSProperties['height'];\n}\n\n/**\n * The `Skeleton` component renders a colored block with an animated background, indicating that something is loading.\n * @public\n */\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(\n (props, forwardedRef) => {\n const {\n children,\n variant = 'default',\n width = '100%',\n height = '100%',\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n ...remainingProps\n }: SkeletonProps = props;\n\n return (\n <div\n data-testid={dataTestId}\n ref={forwardedRef}\n className={clsx(skeletonPlaceholderCSS({ variant }), consumerClassName)}\n style={{ width: width, height: height, ...consumerStyle }}\n {...remainingProps}\n >\n {children}\n </div>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": "AAgDM;AAhDN,OAAO,UAAU;AACjB,SAA6B,kBAAkB;AAE/C,SAAS,8BAA8B;AA+BhC,MAAM,WAAW;AAAA,EACtB,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ;AAAA,MACA,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,WAAW;AAAA,MACX,OAAO;AAAA,MACP,eAAe;AAAA,MACf,GAAG;AAAA,IACL,IAAmB;AAEnB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAa;AAAA,QACb,KAAK;AAAA,QACL,WAAW,KAAK,uBAAuB,EAAE,QAAQ,CAAC,GAAG,iBAAiB;AAAA,QACtE,OAAO,EAAE,OAAc,QAAgB,GAAG,cAAc;AAAA,QACvD,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./Skeleton.css";
|
|
2
2
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
var skeletonPlaceholderCSS = _7a468({ defaultClassName: "_1a1ozfd1-1-
|
|
3
|
+
var skeletonPlaceholderCSS = _7a468({ defaultClassName: "_1a1ozfd1-1-6-0", variantClassNames: { variant: { "default": "_1a1ozfd2-1-6-0", rounded: "_1a1ozfd3-1-6-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
4
|
export {
|
|
5
5
|
skeletonPlaceholderCSS
|
|
6
6
|
};
|
|
@@ -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:'_1a1ozfd1-1-
|
|
4
|
+
"sourcesContent": ["import './Skeleton.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var skeletonPlaceholderCSS = _7a468({defaultClassName:'_1a1ozfd1-1-6-0',variantClassNames:{variant:{'default':'_1a1ozfd2-1-6-0',rounded:'_1a1ozfd3-1-6-0'}},defaultVariants:{},compoundVariants:[]});"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,yBAAyB,OAAO,EAAC,kBAAiB,mBAAkB,mBAAkB,EAAC,SAAQ,EAAC,WAAU,mBAAkB,SAAQ,kBAAiB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import { Skeleton } from "./Skeleton.js";
|
|
3
4
|
import { Flex } from "../../layouts/flex/Flex.js";
|
|
4
5
|
const SkeletonText = forwardRef(
|
|
@@ -22,19 +23,19 @@ const SkeletonText = forwardRef(
|
|
|
22
23
|
for (let line = 0; line < lines2; line++) {
|
|
23
24
|
const width2 = `calc(100% - ${getSkeletonLinesMargin(line, lines2)}px)`;
|
|
24
25
|
render.push(
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
26
27
|
Skeleton,
|
|
27
28
|
{
|
|
28
|
-
key: `${lines2}-${line}`,
|
|
29
29
|
width: width2,
|
|
30
30
|
height: "12px"
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
|
+
`${lines2}-${line}`
|
|
32
33
|
)
|
|
33
34
|
);
|
|
34
35
|
}
|
|
35
36
|
return render;
|
|
36
37
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
38
39
|
Flex,
|
|
39
40
|
{
|
|
40
41
|
"data-testid": dataTestId,
|
|
@@ -44,9 +45,9 @@ const SkeletonText = forwardRef(
|
|
|
44
45
|
paddingY: 4,
|
|
45
46
|
className: consumerClassName,
|
|
46
47
|
style: { width, ...consumerStyle },
|
|
47
|
-
...remainingProps
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
...remainingProps,
|
|
49
|
+
children: getSkeletonLines(lines)
|
|
50
|
+
}
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/content/skeleton/SkeletonText.tsx"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { type CSSProperties, forwardRef, type ReactNode } from 'react';\n\nimport { Skeleton } from './Skeleton.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { Flex } from '../../layouts/flex/Flex.js';\n\n/**\n * Accepted properties for SkeletonText\n * @public\n */\nexport interface SkeletonTextProps extends StylingProps, DataTestId {\n /**\n * Width of the SkeletonText placeholder.\n * @defaultValue 100%\n */\n width?: CSSProperties['width'];\n /**\n * Number of Lines of the SkeletonText placeholder.\n * @defaultValue 3\n */\n lines?: number;\n}\n\n/**\n * The `SkeletonText` component renders a specified number of placeholder boxes for lines of text with an animated background.\n * @public\n */\nexport const SkeletonText = forwardRef<HTMLDivElement, SkeletonTextProps>(\n (props, forwardedRef) => {\n const {\n width = '100%',\n lines = 3,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n ...remainingProps\n }: SkeletonTextProps = props;\n\n const getSkeletonLinesMargin = (line: number, lines: number) => {\n if (lines === 1) {\n // do not add any margin for single-line SkeletonTexts\n return 0;\n }\n return ((line + 2) % 3) * 12;\n };\n\n const getSkeletonLines = (lines: number) => {\n const render: ReactNode[] = [];\n for (let line = 0; line < lines; line++) {\n const width = `calc(100% - ${getSkeletonLinesMargin(line, lines)}px)`;\n render.push(\n <Skeleton\n // key needs to be individual every time we render, because it resets the animation with every child drawn again.\n key={`${lines}-${line}`}\n width={width}\n height=\"12px\"\n />,\n );\n }\n return render;\n };\n\n return (\n <Flex\n data-testid={dataTestId}\n ref={forwardedRef}\n flexDirection=\"column\"\n gap={8}\n paddingY={4}\n className={consumerClassName}\n style={{ width: width, ...consumerStyle }}\n {...remainingProps}\n >\n {getSkeletonLines(lines)}\n </Flex>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": "AAoDU;AApDV,SAA6B,kBAAkC;AAE/D,SAAS,gBAAgB;AAGzB,SAAS,YAAY;AAuBd,MAAM,eAAe;AAAA,EAC1B,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,OAAO;AAAA,MACP,eAAe;AAAA,MACf,GAAG;AAAA,IACL,IAAuB;AAEvB,UAAM,yBAAyB,CAAC,MAAcA,WAAkB;AAC9D,UAAIA,WAAU,GAAG;AAEf,eAAO;AAAA,MACT;AACA,cAAS,OAAO,KAAK,IAAK;AAAA,IAC5B;AAEA,UAAM,mBAAmB,CAACA,WAAkB;AAC1C,YAAM,SAAsB,CAAC;AAC7B,eAAS,OAAO,GAAG,OAAOA,QAAO,QAAQ;AACvC,cAAMC,SAAQ,eAAe,uBAAuB,MAAMD,MAAK,CAAC;AAChE,eAAO;AAAA,UACL;AAAA,YAAC;AAAA;AAAA,cAGC,OAAOC;AAAA,cACP,QAAO;AAAA;AAAA,YAFF,GAAGD,MAAK,IAAI,IAAI;AAAA,UAGvB;AAAA,QACF;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAa;AAAA,QACb,KAAK;AAAA,QACL,eAAc;AAAA,QACd,KAAK;AAAA,QACL,UAAU;AAAA,QACV,WAAW;AAAA,QACX,OAAO,EAAE,OAAc,GAAG,cAAc;AAAA,QACvC,GAAG;AAAA,QAEH,2BAAiB,KAAK;AAAA;AAAA,IACzB;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["lines", "width"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import { isEmpty } from "lodash-es";
|
|
2
|
-
import
|
|
3
|
+
import {
|
|
3
4
|
forwardRef,
|
|
4
5
|
useEffect,
|
|
5
6
|
useLayoutEffect,
|
|
@@ -62,7 +63,7 @@ const AppRoot = /* @__PURE__ */ forwardRef(
|
|
|
62
63
|
setMessages((prev) => isEmpty(prev) ? prev : {});
|
|
63
64
|
});
|
|
64
65
|
}, [language]);
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
66
67
|
"div",
|
|
67
68
|
{
|
|
68
69
|
ref: forwardedRef,
|
|
@@ -71,18 +72,18 @@ const AppRoot = /* @__PURE__ */ forwardRef(
|
|
|
71
72
|
style: consumerStyle,
|
|
72
73
|
"data-theme": theme,
|
|
73
74
|
"data-dtrum-mask": dataDtrumMask,
|
|
74
|
-
"data-dtrum-allow": dataDtrumAllow
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
"data-dtrum-allow": dataDtrumAllow,
|
|
76
|
+
children: /* @__PURE__ */ jsx(
|
|
77
|
+
IntlProvider,
|
|
78
|
+
{
|
|
79
|
+
locale: language,
|
|
80
|
+
timeZone: timezone,
|
|
81
|
+
messages,
|
|
82
|
+
defaultLocale: defaultLanguage,
|
|
83
|
+
children: /* @__PURE__ */ jsx(FocusProvider, { children })
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
86
87
|
);
|
|
87
88
|
}
|
|
88
89
|
);
|
|
@@ -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
|
|
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\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 = 'app-root',\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\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 /** Inject the font link into the head */\n useLayoutEffect(() => {\n // Right now the font css file is not automatically injected into\n // the app index.html file. And as there are no static ways to @import\n // css with vanilla extract, we need to inject the link here.\n const link = document.createElement('link');\n\n link.rel = 'stylesheet';\n link.href = 'https://dt-cdn.net/fonts/fonts-v004.css';\n document.head.appendChild(link);\n return () => {\n document.head.removeChild(link);\n };\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(`${getBaseHref()}lang/${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": "AA2IU;AA3IV,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;AAUA,MAAM,kBAAkB;AAUjB,MAAM,UAA0B;AAAA,EACrC,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,eAAe,aAAa;AAAA,MAC5B,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,IACtB,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;AAGA,oBAAgB,MAAM;AAIpB,YAAM,OAAO,SAAS,cAAc,MAAM;AAE1C,WAAK,MAAM;AACX,WAAK,OAAO;AACZ,eAAS,KAAK,YAAY,IAAI;AAC9B,aAAO,MAAM;AACX,iBAAS,KAAK,YAAY,IAAI;AAAA,MAChC;AAAA,IACF,GAAG,CAAC,CAAC;AAML,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,YAAY,CAAC,QAAQ,QAAQ,OAAO,EAC1C,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,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
2
3
|
import { useActiveElement } from "../../hooks/useActiveElement.js";
|
|
3
4
|
import { useFocusContext } from "../../hooks/useFocusContext.js";
|
|
4
5
|
import { focusFirstDescendant } from "../../utils/focus-management/focus-first-descendant.js";
|
|
@@ -36,14 +37,14 @@ const FocusScope = (props) => {
|
|
|
36
37
|
triggerElementCopy.focus();
|
|
37
38
|
};
|
|
38
39
|
}, [contain, autoFocus]);
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
40
41
|
"div",
|
|
41
42
|
{
|
|
42
43
|
style: { display: "contents" },
|
|
43
44
|
ref: wrapperRef,
|
|
44
|
-
"aria-labelledby": triggerElement.current.id
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
"aria-labelledby": triggerElement.current.id,
|
|
46
|
+
children
|
|
47
|
+
}
|
|
47
48
|
);
|
|
48
49
|
};
|
|
49
50
|
FocusScope.displayName = "FocusScope";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/core/components/focus-scope/FocusScope.tsx"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { useEffect, useRef } from 'react';\n\nimport { useActiveElement } from '../../hooks/useActiveElement.js';\nimport { useFocusContext } from '../../hooks/useFocusContext.js';\nimport type { WithChildren } from '../../types/with-children.js';\nimport { focusFirstDescendant } from '../../utils/focus-management/focus-first-descendant.js';\n\n// #region Types\n\n/**\n * Prop definition of the `FocusScope` component.\n * @public\n */\nexport interface FocusScopeProps extends WithChildren {\n /**\n * If set to true, the focus scope automatically focuses the first focusable element inside.\n * @defaultValue false\n */\n autoFocus?: boolean;\n /**\n * If set to true, the focus scope traps the focus inside.\n * @defaultValue false\n */\n contain?: boolean;\n}\n// #endregion Types\n\n/**\n * The `FocusScope` helps you manage the focus when opening any overlay. If you\n * want to create a custom overlay, you can wrap the content of your overlay in the\n * `FocusScope` to help you make the overlay accessible and handle focus\n * appropriately.\n * @public\n */\nexport const FocusScope = (props: FocusScopeProps) => {\n const { autoFocus, contain, children } = props;\n const focusContext = useFocusContext();\n const wrapperRef = useRef<HTMLDivElement>(null);\n const focusedElement = useActiveElement();\n const triggerElement = useRef(focusedElement);\n\n useEffect(() => {\n if (contain || autoFocus) {\n focusFirstDescendant(wrapperRef.current);\n }\n\n if (contain) {\n focusContext.setBackgroundInertness(true);\n const triggerElementCopy = triggerElement.current;\n\n return () => {\n focusContext.setBackgroundInertness(false);\n // The focus must be restored on the trigger after removing the inert prop on\n // AppRoot (rendering complete). SetTimeout creates a macrotask to change queueing order.\n window.setTimeout(() => triggerElementCopy.focus(), 0);\n };\n }\n\n if (!autoFocus && !contain) {\n document.addEventListener('keydown', (e) => {\n if (e.key !== 'Tab') {\n return;\n }\n\n if (e.target === triggerElement.current) {\n e.preventDefault();\n focusFirstDescendant(wrapperRef.current);\n }\n });\n }\n\n const triggerElementCopy = triggerElement.current;\n\n return () => {\n // restore focus on trigger when unmounting the focusscope\n triggerElementCopy.focus();\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [contain, autoFocus]);\n\n return (\n <div\n style={{ display: 'contents' }}\n ref={wrapperRef}\n aria-labelledby={triggerElement.current.id}\n // Prevents that focus is lost when clicking on non-focusable items inside (atm used in the internal Drawer).\n // Probably worth considering moving that to the focusScope when redoing the overlays.\n // tabIndex={-1}\n >\n {children}\n </div>\n );\n};\n\nFocusScope.displayName = 'FocusScope';\n"],
|
|
5
|
+
"mappings": "AAkFI;AAlFJ,SAAS,WAAW,cAAc;AAElC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAEhC,SAAS,4BAA4B;AA6B9B,MAAM,aAAa,CAAC,UAA2B;AACpD,QAAM,EAAE,WAAW,SAAS,SAAS,IAAI;AACzC,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAAa,OAAuB,IAAI;AAC9C,QAAM,iBAAiB,iBAAiB;AACxC,QAAM,iBAAiB,OAAO,cAAc;AAE5C,YAAU,MAAM;AACd,QAAI,WAAW,WAAW;AACxB,2BAAqB,WAAW,OAAO;AAAA,IACzC;AAEA,QAAI,SAAS;AACX,mBAAa,uBAAuB,IAAI;AACxC,YAAMA,sBAAqB,eAAe;AAE1C,aAAO,MAAM;AACX,qBAAa,uBAAuB,KAAK;AAGzC,eAAO,WAAW,MAAMA,oBAAmB,MAAM,GAAG,CAAC;AAAA,MACvD;AAAA,IACF;AAEA,QAAI,CAAC,aAAa,CAAC,SAAS;AAC1B,eAAS,iBAAiB,WAAW,CAAC,MAAM;AAC1C,YAAI,EAAE,QAAQ,OAAO;AACnB;AAAA,QACF;AAEA,YAAI,EAAE,WAAW,eAAe,SAAS;AACvC,YAAE,eAAe;AACjB,+BAAqB,WAAW,OAAO;AAAA,QACzC;AAAA,MACF,CAAC;AAAA,IACH;AAEA,UAAM,qBAAqB,eAAe;AAE1C,WAAO,MAAM;AAEX,yBAAmB,MAAM;AAAA,IAC3B;AAAA,EAGF,GAAG,CAAC,SAAS,SAAS,CAAC;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,EAAE,SAAS,WAAW;AAAA,MAC7B,KAAK;AAAA,MACL,mBAAiB,eAAe,QAAQ;AAAA,MAKvC;AAAA;AAAA,EACH;AAEJ;AAEA,WAAW,cAAc;",
|
|
6
6
|
"names": ["triggerElementCopy"]
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { isEqual } from "lodash-es";
|
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
3
|
function useFontsUpdated(callback) {
|
|
4
4
|
const [fontsUpdated, setFontsUpdated] = useState(false);
|
|
5
|
-
const prevFontFamilies = useRef();
|
|
5
|
+
const prevFontFamilies = useRef([]);
|
|
6
6
|
const fontFamilies = [];
|
|
7
7
|
const firstRender = useRef(true);
|
|
8
8
|
if (document.fonts) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/hooks/useFontsUpdated.ts"],
|
|
4
|
-
"sourcesContent": ["import { isEqual } from 'lodash-es';\nimport { useRef, useState } from 'react';\n\n/**\n * Hook that checks if the initially loaded fonts were updated.\n * Used to trigger remeasuring in the DataTable (autoWidth) and TextEllipsis once all fonts are loaded.\n *\n * @param callback - optionally pass a function to be executed once when the fonts were updated\n * @returns boolean whether the fonts have changed\n * @internal\n */\nexport function useFontsUpdated(callback?: () => void): boolean {\n const [fontsUpdated, setFontsUpdated] = useState(false);\n const prevFontFamilies = useRef<string[]>();\n const fontFamilies: string[] = [];\n const firstRender = useRef(true);\n\n if (document.fonts) {\n // gather the font families that are already loaded\n if (firstRender.current) {\n const loadedFontFamilies: string[] = [];\n document.fonts.forEach((fontFace: FontFace) =>\n loadedFontFamilies.push(`${fontFace.family} ${fontFace.weight}`),\n );\n prevFontFamilies.current = loadedFontFamilies;\n firstRender.current = false;\n }\n\n document.fonts.ready.then((fontFaceSet: FontFaceSet) => {\n fontFaceSet.forEach((fontFace: FontFace) =>\n fontFamilies.push(`${fontFace.family} ${fontFace.weight}`),\n );\n\n if (!isEqual(prevFontFamilies.current, fontFamilies)) {\n prevFontFamilies.current = fontFamilies;\n callback?.();\n setFontsUpdated(true);\n }\n });\n }\n\n return fontsUpdated;\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAe;AACxB,SAAS,QAAQ,gBAAgB;AAU1B,SAAS,gBAAgB,UAAgC;AAC9D,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,KAAK;AACtD,QAAM,mBAAmB,OAAiB;
|
|
4
|
+
"sourcesContent": ["import { isEqual } from 'lodash-es';\nimport { useRef, useState } from 'react';\n\n/**\n * Hook that checks if the initially loaded fonts were updated.\n * Used to trigger remeasuring in the DataTable (autoWidth) and TextEllipsis once all fonts are loaded.\n *\n * @param callback - optionally pass a function to be executed once when the fonts were updated\n * @returns boolean whether the fonts have changed\n * @internal\n */\nexport function useFontsUpdated(callback?: () => void): boolean {\n const [fontsUpdated, setFontsUpdated] = useState(false);\n const prevFontFamilies = useRef<string[]>([]);\n const fontFamilies: string[] = [];\n const firstRender = useRef(true);\n\n if (document.fonts) {\n // gather the font families that are already loaded\n if (firstRender.current) {\n const loadedFontFamilies: string[] = [];\n document.fonts.forEach((fontFace: FontFace) =>\n loadedFontFamilies.push(`${fontFace.family} ${fontFace.weight}`),\n );\n prevFontFamilies.current = loadedFontFamilies;\n firstRender.current = false;\n }\n\n document.fonts.ready.then((fontFaceSet: FontFaceSet) => {\n fontFaceSet.forEach((fontFace: FontFace) =>\n fontFamilies.push(`${fontFace.family} ${fontFace.weight}`),\n );\n\n if (!isEqual(prevFontFamilies.current, fontFamilies)) {\n prevFontFamilies.current = fontFamilies;\n callback?.();\n setFontsUpdated(true);\n }\n });\n }\n\n return fontsUpdated;\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,eAAe;AACxB,SAAS,QAAQ,gBAAgB;AAU1B,SAAS,gBAAgB,UAAgC;AAC9D,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,KAAK;AACtD,QAAM,mBAAmB,OAAiB,CAAC,CAAC;AAC5C,QAAM,eAAyB,CAAC;AAChC,QAAM,cAAc,OAAO,IAAI;AAE/B,MAAI,SAAS,OAAO;AAElB,QAAI,YAAY,SAAS;AACvB,YAAM,qBAA+B,CAAC;AACtC,eAAS,MAAM;AAAA,QAAQ,CAAC,aACtB,mBAAmB,KAAK,GAAG,SAAS,MAAM,IAAI,SAAS,MAAM,EAAE;AAAA,MACjE;AACA,uBAAiB,UAAU;AAC3B,kBAAY,UAAU;AAAA,IACxB;AAEA,aAAS,MAAM,MAAM,KAAK,CAAC,gBAA6B;AACtD,kBAAY;AAAA,QAAQ,CAAC,aACnB,aAAa,KAAK,GAAG,SAAS,MAAM,IAAI,SAAS,MAAM,EAAE;AAAA,MAC3D;AAEA,UAAI,CAAC,QAAQ,iBAAiB,SAAS,YAAY,GAAG;AACpD,yBAAiB,UAAU;AAC3B,mBAAW;AACX,wBAAgB,IAAI;AAAA,MACtB;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/hooks/useMergeRefs.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n useCallback,\n type MutableRefObject,\n type LegacyRef,\n type SetStateAction,\n type Dispatch,\n type RefCallback,\n} from 'react';\n\n/**\n * If you have multiple references (e.g. from different hooks) you need to apply to\n * the same element, you can use the `useMergeRefs` hook to combine them into one\n * reference.\n */\nexport function useMergeRefs<T = unknown>(\n refs: Array<\n | MutableRefObject<T>\n | LegacyRef<T>\n | Dispatch<SetStateAction<T | null>>\n | undefined\n >,\n): RefCallback<T> {\n return useCallback((value) => {\n for (const ref of refs) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref !== undefined && ref !== null) {\n (ref as MutableRefObject<T | null>).current = value;\n }\n }\n }, refs); // eslint-disable-line react-hooks/exhaustive-deps\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,OAMK;AAOA,SAAS,aACd,MAMgB;AAChB,SAAO,YAAY,CAAC,UAAU;AAC5B,eAAW,OAAO,MAAM;AACtB,UAAI,OAAO,QAAQ,YAAY;AAC7B,YAAI,KAAK;AAAA,MACX,WAAW,QAAQ,UAAa,QAAQ,MAAM;AAC5C,QAAC,IAAmC,UAAU;AAAA,MAChD;AAAA,IACF;AAAA,EACF,GAAG,IAAI;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
2
3
|
import { FocusContext } from "../contexts/FocusContext.js";
|
|
3
4
|
import { useFocusContext } from "../hooks/useFocusContext.js";
|
|
4
5
|
import { mergeProps } from "../utils/merge-props.js";
|
|
@@ -97,7 +98,7 @@ const FocusProvider = ({ children }) => {
|
|
|
97
98
|
tabIndex: -1,
|
|
98
99
|
"aria-hidden": true
|
|
99
100
|
} : { inert: void 0, tabIndex: void 0, "aria-hidden": false };
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ jsx(
|
|
101
102
|
FocusContext.Provider,
|
|
102
103
|
{
|
|
103
104
|
value: {
|
|
@@ -106,9 +107,9 @@ const FocusProvider = ({ children }) => {
|
|
|
106
107
|
setBackgroundInertness,
|
|
107
108
|
modality
|
|
108
109
|
})
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
},
|
|
111
|
+
children: /* @__PURE__ */ jsx("div", { ...focusProps, children })
|
|
112
|
+
}
|
|
112
113
|
);
|
|
113
114
|
};
|
|
114
115
|
FocusProvider["displayName"] = "FocusProvider";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/providers/FocusProvider.tsx"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { useCallback, useEffect, useState } from 'react';\n\nimport { FocusContext } from '../contexts/FocusContext.js';\nimport { useFocusContext } from '../hooks/useFocusContext.js';\nimport type { WithChildren } from '../types/with-children.js';\nimport { mergeProps } from '../utils/merge-props.js';\n\n// list of modifier keys commonly used in a mouse or keyboard combination,\n// see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#modifier_keys.\nconst ignoreMap = [\n 'Alt',\n 'AltGraph',\n 'CapsLock',\n 'Control',\n 'Fn',\n 'FnLock',\n 'Hyper',\n 'Meta', // Command (Mac), in some browsers also Windows-key\n 'NumLock',\n 'OS', // Windows-key\n 'ScrollLock',\n 'Super', // Virtual keyboard key\n 'Symbol',\n 'SymbolLock',\n];\n\n/** Look-up map of all event types and the corresponding modalities. */\nconst eventTypeMap: Record<string, string> = {\n keydown: 'keyboard',\n keyup: 'keyboard',\n mousedown: 'mouse',\n mousemove: 'mouse',\n MSPointerDown: 'pointer',\n MSPointerMove: 'pointer',\n pointerdown: 'pointer',\n pointermove: 'pointer',\n touchstart: 'touch',\n touchend: 'touch',\n wheel: 'wheel',\n};\n\n/**\n * Type defining the modality options for the focus handling.\n * @internal\n */\nexport type Modality = 'keyboard' | 'pointer' | 'touch' | 'unknown';\n\n/**\n * All navigational keys that should be considered keyboard users,\n * see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#navigation_keys\n */\nconst navigationalKeys = [\n 'Tab',\n 'Esc',\n 'Escape',\n ' ',\n 'ArrowDown',\n 'Down',\n 'ArrowUp',\n 'Up',\n 'ArrowLeft',\n 'Left',\n 'ArrowRight',\n 'Right',\n 'End',\n 'Home',\n 'PageDown',\n 'PageUp',\n];\n\n/**\n * Provider that can be reused in components for storing the focus context props.\n * Loosely inspired by [what-input-js](https://github.com/ten1seven/what-input/blob/main/src/scripts/what-input.js).\n * @internal\n */\nexport const FocusProvider = ({ children }: WithChildren) => {\n const [backgroundInertness, setBackgroundInertness] = useState(false);\n const focusContext = useFocusContext();\n const [modality, setModality] = useState<Modality>('unknown');\n\n const setKeyboardInputModality = useCallback((event: KeyboardEvent) => {\n if (ignoreMap.includes(event.key)) {\n setModality('pointer');\n return;\n }\n\n if (!event.target || navigationalKeys.includes(event.key)) {\n setModality('keyboard');\n }\n }, []);\n\n const setMouseInputModality = useCallback((event: MouseEvent) => {\n switch (eventTypeMap[event.type]) {\n case 'touch':\n case 'pen':\n return setModality('touch');\n case 'mouse':\n case 'pointer':\n case 'wheel':\n return setModality('pointer');\n default:\n return 'unknown';\n }\n }, []);\n\n useEffect(() => {\n window.addEventListener('pointerdown', setMouseInputModality);\n // we need to rely on the keydown event (already in the capture phase) here so we don't break usages where the event default behavior is prevented or propagation is stopped,\n // which would otherwise get the wrong, initial, modality (unknown); by using the capture phase, we can ensure we set the modality correctly before the other events occur\n window.addEventListener('keydown', setKeyboardInputModality, {\n capture: true,\n });\n window.addEventListener('wheel', setMouseInputModality);\n\n return () => {\n window.removeEventListener('pointerdown', setMouseInputModality);\n window.removeEventListener('keydown', setKeyboardInputModality, {\n capture: true,\n });\n window.removeEventListener('wheel', setMouseInputModality);\n };\n }, [setKeyboardInputModality, setMouseInputModality]);\n\n const focusProps = backgroundInertness\n ? {\n inert: 'true',\n tabIndex: -1,\n 'aria-hidden': true,\n }\n : { inert: undefined, tabIndex: undefined, 'aria-hidden': false };\n\n return (\n <FocusContext.Provider\n value={{\n ...mergeProps(focusContext, {\n backgroundInertness,\n setBackgroundInertness,\n modality,\n }),\n }}\n >\n <div {...focusProps}>{children}</div>\n </FocusContext.Provider>\n );\n};\n\nFocusProvider['displayName'] = 'FocusProvider';\n"],
|
|
5
|
+
"mappings": "AA6IM;AA7IN,SAAS,aAAa,WAAW,gBAAgB;AAEjD,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAEhC,SAAS,kBAAkB;AAI3B,MAAM,YAAY;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AACF;AAGA,MAAM,eAAuC;AAAA,EAC3C,SAAS;AAAA,EACT,OAAO;AAAA,EACP,WAAW;AAAA,EACX,WAAW;AAAA,EACX,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,OAAO;AACT;AAYA,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAOO,MAAM,gBAAgB,CAAC,EAAE,SAAS,MAAoB;AAC3D,QAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAAS,KAAK;AACpE,QAAM,eAAe,gBAAgB;AACrC,QAAM,CAAC,UAAU,WAAW,IAAI,SAAmB,SAAS;AAE5D,QAAM,2BAA2B,YAAY,CAAC,UAAyB;AACrE,QAAI,UAAU,SAAS,MAAM,GAAG,GAAG;AACjC,kBAAY,SAAS;AACrB;AAAA,IACF;AAEA,QAAI,CAAC,MAAM,UAAU,iBAAiB,SAAS,MAAM,GAAG,GAAG;AACzD,kBAAY,UAAU;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,wBAAwB,YAAY,CAAC,UAAsB;AAC/D,YAAQ,aAAa,MAAM,IAAI,GAAG;AAAA,MAChC,KAAK;AAAA,MACL,KAAK;AACH,eAAO,YAAY,OAAO;AAAA,MAC5B,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,YAAY,SAAS;AAAA,MAC9B;AACE,eAAO;AAAA,IACX;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AACd,WAAO,iBAAiB,eAAe,qBAAqB;AAG5D,WAAO,iBAAiB,WAAW,0BAA0B;AAAA,MAC3D,SAAS;AAAA,IACX,CAAC;AACD,WAAO,iBAAiB,SAAS,qBAAqB;AAEtD,WAAO,MAAM;AACX,aAAO,oBAAoB,eAAe,qBAAqB;AAC/D,aAAO,oBAAoB,WAAW,0BAA0B;AAAA,QAC9D,SAAS;AAAA,MACX,CAAC;AACD,aAAO,oBAAoB,SAAS,qBAAqB;AAAA,IAC3D;AAAA,EACF,GAAG,CAAC,0BAA0B,qBAAqB,CAAC;AAEpD,QAAM,aAAa,sBACf;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,EACjB,IACA,EAAE,OAAO,QAAW,UAAU,QAAW,eAAe,MAAM;AAElE,SACE;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACC,OAAO;AAAA,QACL,GAAG,WAAW,cAAc;AAAA,UAC1B;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA,MAEA,8BAAC,SAAK,GAAG,YAAa,UAAS;AAAA;AAAA,EACjC;AAEJ;AAEA,cAAc,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
._z2r50s3-1-
|
|
1
|
+
._z2r50s3-1-6-0 {
|
|
2
2
|
outline: none;
|
|
3
3
|
}
|
|
4
|
-
._z2r50s3-1-
|
|
4
|
+
._z2r50s3-1-6-0:focus-visible {
|
|
5
5
|
outline: none;
|
|
6
6
|
}
|
|
7
|
-
._z2r50s4-1-
|
|
7
|
+
._z2r50s4-1-6-0 {
|
|
8
8
|
border-radius: var(--dt-borders-radius-field-subdued, 4px);
|
|
9
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-
|
|
10
|
-
background-color: var(--_z2r50s2-1-
|
|
11
|
-
}
|
|
12
|
-
._z2r50s5-1-
|
|
13
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-
|
|
14
|
-
}
|
|
15
|
-
._z2r50s6-1-
|
|
16
|
-
--_z2r50s0-1-
|
|
17
|
-
--_z2r50s1-1-
|
|
18
|
-
--_z2r50s2-1-
|
|
19
|
-
}
|
|
20
|
-
._z2r50s7-1-
|
|
21
|
-
--_z2r50s0-1-
|
|
22
|
-
--_z2r50s1-1-
|
|
23
|
-
--_z2r50s2-1-
|
|
24
|
-
}
|
|
25
|
-
._z2r50s8-1-
|
|
26
|
-
--_z2r50s0-1-
|
|
27
|
-
--_z2r50s1-1-
|
|
28
|
-
--_z2r50s2-1-
|
|
29
|
-
}
|
|
30
|
-
._z2r50s9-1-
|
|
31
|
-
--_z2r50s0-1-
|
|
32
|
-
--_z2r50s1-1-
|
|
33
|
-
--_z2r50s2-1-
|
|
34
|
-
}
|
|
35
|
-
._z2r50sa-1-
|
|
36
|
-
--_z2r50s0-1-
|
|
37
|
-
--_z2r50s1-1-
|
|
38
|
-
--_z2r50s2-1-
|
|
39
|
-
}
|
|
40
|
-
._z2r50sb-1-
|
|
9
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-6-0);
|
|
10
|
+
background-color: var(--_z2r50s2-1-6-0);
|
|
11
|
+
}
|
|
12
|
+
._z2r50s5-1-6-0._z2r50s5-1-6-0 {
|
|
13
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-6-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-6-0);
|
|
14
|
+
}
|
|
15
|
+
._z2r50s6-1-6-0 {
|
|
16
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-neutral-accent, #545587);
|
|
17
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-neutral-default, #d2d3e1);
|
|
18
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-neutral-emphasized, #dadbe7);
|
|
19
|
+
}
|
|
20
|
+
._z2r50s7-1-6-0 {
|
|
21
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-primary-accent, #454cc9);
|
|
22
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-primary-default, #ccd3f3);
|
|
23
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-primary-emphasized, #d6dbf4);
|
|
24
|
+
}
|
|
25
|
+
._z2r50s8-1-6-0 {
|
|
26
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-success-accent, #2c6360);
|
|
27
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-success-default, #cad6d7);
|
|
28
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-success-emphasized, #d4dddf);
|
|
29
|
+
}
|
|
30
|
+
._z2r50s9-1-6-0 {
|
|
31
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-warning-accent, #805100);
|
|
32
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-warning-default, #f4e5d5);
|
|
33
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-warning-emphasized, #f4e8de);
|
|
34
|
+
}
|
|
35
|
+
._z2r50sa-1-6-0 {
|
|
36
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-critical-accent, #b80031);
|
|
37
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-critical-default, #f1cdcf);
|
|
38
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-critical-emphasized, #f2d7d9);
|
|
39
|
+
}
|
|
40
|
+
._z2r50sb-1-6-0:focus-within {
|
|
41
41
|
outline: none;
|
|
42
42
|
}
|
|
43
|
-
._z2r50sc-1-
|
|
43
|
+
._z2r50sc-1-6-0:focus-within {
|
|
44
44
|
border-radius: var(--dt-borders-radius-field-subdued, 4px);
|
|
45
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-
|
|
46
|
-
background-color: var(--_z2r50s2-1-
|
|
47
|
-
}
|
|
48
|
-
._z2r50sd-1-
|
|
49
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-
|
|
50
|
-
}
|
|
51
|
-
._z2r50se-1-
|
|
52
|
-
--_z2r50s0-1-
|
|
53
|
-
--_z2r50s1-1-
|
|
54
|
-
--_z2r50s2-1-
|
|
55
|
-
}
|
|
56
|
-
._z2r50sf-1-
|
|
57
|
-
--_z2r50s0-1-
|
|
58
|
-
--_z2r50s1-1-
|
|
59
|
-
--_z2r50s2-1-
|
|
60
|
-
}
|
|
61
|
-
._z2r50sg-1-
|
|
62
|
-
--_z2r50s0-1-
|
|
63
|
-
--_z2r50s1-1-
|
|
64
|
-
--_z2r50s2-1-
|
|
65
|
-
}
|
|
66
|
-
._z2r50sh-1-
|
|
67
|
-
--_z2r50s0-1-
|
|
68
|
-
--_z2r50s1-1-
|
|
69
|
-
--_z2r50s2-1-
|
|
70
|
-
}
|
|
71
|
-
._z2r50si-1-
|
|
72
|
-
--_z2r50s0-1-
|
|
73
|
-
--_z2r50s1-1-
|
|
74
|
-
--_z2r50s2-1-
|
|
45
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-6-0);
|
|
46
|
+
background-color: var(--_z2r50s2-1-6-0);
|
|
47
|
+
}
|
|
48
|
+
._z2r50sd-1-6-0:focus-within {
|
|
49
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-6-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-6-0);
|
|
50
|
+
}
|
|
51
|
+
._z2r50se-1-6-0 {
|
|
52
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-neutral-accent, #545587);
|
|
53
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-neutral-default, #d2d3e1);
|
|
54
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-neutral-emphasized, #dadbe7);
|
|
55
|
+
}
|
|
56
|
+
._z2r50sf-1-6-0 {
|
|
57
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-primary-accent, #454cc9);
|
|
58
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-primary-default, #ccd3f3);
|
|
59
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-primary-emphasized, #d6dbf4);
|
|
60
|
+
}
|
|
61
|
+
._z2r50sg-1-6-0 {
|
|
62
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-success-accent, #2c6360);
|
|
63
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-success-default, #cad6d7);
|
|
64
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-success-emphasized, #d4dddf);
|
|
65
|
+
}
|
|
66
|
+
._z2r50sh-1-6-0 {
|
|
67
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-warning-accent, #805100);
|
|
68
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-warning-default, #f4e5d5);
|
|
69
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-warning-emphasized, #f4e8de);
|
|
70
|
+
}
|
|
71
|
+
._z2r50si-1-6-0 {
|
|
72
|
+
--_z2r50s0-1-6-0: var(--dt-colors-border-critical-accent, #b80031);
|
|
73
|
+
--_z2r50s1-1-6-0: var(--dt-colors-border-critical-default, #f1cdcf);
|
|
74
|
+
--_z2r50s2-1-6-0: var(--dt-colors-background-field-critical-emphasized, #f2d7d9);
|
|
75
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./focusRing.css";
|
|
2
2
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
var focusRingCSS = _7a468({ defaultClassName: "_z2r50s3-1-
|
|
4
|
-
var focusRingFocusWithinCSS = _7a468({ defaultClassName: "_z2r50sb-1-
|
|
3
|
+
var focusRingCSS = _7a468({ defaultClassName: "_z2r50s3-1-6-0", variantClassNames: { minimal: { true: "_z2r50s4-1-6-0", false: "_z2r50s5-1-6-0" }, variant: { neutral: "_z2r50s6-1-6-0", primary: "_z2r50s7-1-6-0", success: "_z2r50s8-1-6-0", warning: "_z2r50s9-1-6-0", critical: "_z2r50sa-1-6-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
|
+
var focusRingFocusWithinCSS = _7a468({ defaultClassName: "_z2r50sb-1-6-0", variantClassNames: { minimal: { true: "_z2r50sc-1-6-0", false: "_z2r50sd-1-6-0" }, variant: { neutral: "_z2r50se-1-6-0", primary: "_z2r50sf-1-6-0", success: "_z2r50sg-1-6-0", warning: "_z2r50sh-1-6-0", critical: "_z2r50si-1-6-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5
5
|
export {
|
|
6
6
|
focusRingCSS,
|
|
7
7
|
focusRingFocusWithinCSS
|