@dynatrace/strato-components 0.84.31 → 0.84.51
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/content/index.d.ts +7 -0
- package/content/index.js +25 -0
- package/content/progress/ProgressBar.css +52 -0
- package/content/progress/ProgressBar.d.ts +56 -0
- package/content/progress/ProgressBar.js +191 -0
- package/content/progress/ProgressBar.sty.d.ts +42 -0
- package/content/progress/ProgressBar.sty.js +28 -0
- package/content/progress/ProgressBarIcon.css +5 -0
- package/content/progress/ProgressBarIcon.d.ts +15 -0
- package/content/progress/ProgressBarIcon.js +68 -0
- package/content/progress/ProgressBarIcon.sty.d.ts +1 -0
- package/content/progress/ProgressBarIcon.sty.js +25 -0
- package/content/progress/ProgressBarLabel.css +9 -0
- package/content/progress/ProgressBarLabel.d.ts +15 -0
- package/content/progress/ProgressBarLabel.js +75 -0
- package/content/progress/ProgressBarLabel.sty.d.ts +13 -0
- package/content/progress/ProgressBarLabel.sty.js +26 -0
- package/content/progress/ProgressBarValue.css +28 -0
- package/content/progress/ProgressBarValue.d.ts +15 -0
- package/content/progress/ProgressBarValue.js +72 -0
- package/content/progress/ProgressBarValue.sty.d.ts +34 -0
- package/content/progress/ProgressBarValue.sty.js +26 -0
- package/content/progress/ProgressCircle.css +52 -0
- package/content/progress/ProgressCircle.d.ts +51 -0
- package/content/progress/ProgressCircle.js +174 -0
- package/content/progress/ProgressCircle.sty.d.ts +41 -0
- package/content/progress/ProgressCircle.sty.js +37 -0
- package/content/progress/contexts/SharedProgressBarPropsContext.d.ts +9 -0
- package/content/progress/contexts/SharedProgressBarPropsContext.js +38 -0
- package/content/progress/hooks/useProgressAriaProps.d.ts +38 -0
- package/content/progress/hooks/useProgressAriaProps.js +63 -0
- package/content/progress/hooks/useProgressBarPropsContext.d.ts +2 -0
- package/content/progress/hooks/useProgressBarPropsContext.js +32 -0
- package/content/progress/utils.d.ts +2 -0
- package/content/progress/utils.js +50 -0
- package/core/components/app-root/AppRoot.d.ts +4 -4
- package/core/hooks/useAriaLabelingProps.d.ts +6 -0
- package/core/hooks/useAriaLabelingProps.js +30 -0
- package/core/hooks/useCurrentTheme.d.ts +1 -1
- package/core/hooks/useFontsUpdated.d.ts +9 -0
- package/core/hooks/useFontsUpdated.js +51 -0
- package/core/hooks/useId.d.ts +12 -0
- package/core/hooks/useId.js +32 -0
- package/core/hooks/useMergeRefs.d.ts +7 -0
- package/core/hooks/useMergeRefs.js +34 -0
- package/core/hooks/useSafeForwardProps.d.ts +10 -0
- package/core/hooks/useSafeForwardProps.js +34 -0
- package/core/index.d.ts +12 -0
- package/core/index.js +12 -0
- package/core/styles/focusRing.css +88 -0
- package/core/styles/focusRing.sty.d.ts +96 -0
- package/core/styles/focusRing.sty.js +27 -0
- package/core/styles/useFocusRing.d.ts +49 -0
- package/core/styles/useFocusRing.js +83 -0
- package/core/types/a11y-props.d.ts +26 -0
- package/core/types/a11y-props.js +15 -0
- package/core/types/data-props.d.ts +1 -1
- package/core/types/dom.d.ts +8 -0
- package/core/types/dom.js +15 -0
- package/core/types/heading.d.ts +9 -0
- package/core/types/heading.js +15 -0
- package/core/types/masking-props.d.ts +2 -1
- package/core/types/polymorph.d.ts +28 -0
- package/core/types/polymorph.js +15 -0
- package/core/types/role-variant.d.ts +10 -0
- package/core/types/role-variant.js +30 -0
- package/core/types/styling-props.d.ts +1 -1
- package/core/types/with-children.d.ts +1 -1
- package/core/utils/_is-string-children.d.ts +6 -0
- package/core/utils/_is-string-children.js +44 -0
- package/core/utils/colorUtils.css +80 -0
- package/core/utils/colorUtils.sty.d.ts +48 -0
- package/core/utils/colorUtils.sty.js +27 -0
- package/core/utils/isBrowser.d.ts +1 -1
- package/core/utils/merge-props.d.ts +4 -5
- package/core/utils/seed-random.d.ts +5 -0
- package/core/utils/seed-random.js +34 -0
- package/core/utils/uuidv4.d.ts +5 -0
- package/core/utils/uuidv4.js +31 -0
- package/esm/content/index.js +7 -0
- package/esm/content/index.js.map +7 -0
- package/esm/content/progress/ProgressBar.css +52 -0
- package/esm/content/progress/ProgressBar.js +163 -0
- package/esm/content/progress/ProgressBar.js.map +7 -0
- package/esm/content/progress/ProgressBar.sty.js +10 -0
- package/esm/content/progress/ProgressBar.sty.js.map +7 -0
- package/esm/content/progress/ProgressBarIcon.css +5 -0
- package/esm/content/progress/ProgressBarIcon.js +40 -0
- package/esm/content/progress/ProgressBarIcon.js.map +7 -0
- package/esm/content/progress/ProgressBarIcon.sty.js +7 -0
- package/esm/content/progress/ProgressBarIcon.sty.js.map +7 -0
- package/esm/content/progress/ProgressBarLabel.css +9 -0
- package/esm/content/progress/ProgressBarLabel.js +47 -0
- package/esm/content/progress/ProgressBarLabel.js.map +7 -0
- package/esm/content/progress/ProgressBarLabel.sty.js +8 -0
- package/esm/content/progress/ProgressBarLabel.sty.js.map +7 -0
- package/esm/content/progress/ProgressBarValue.css +28 -0
- package/esm/content/progress/ProgressBarValue.js +44 -0
- package/esm/content/progress/ProgressBarValue.js.map +7 -0
- package/esm/content/progress/ProgressBarValue.sty.js +8 -0
- package/esm/content/progress/ProgressBarValue.sty.js.map +7 -0
- package/esm/content/progress/ProgressCircle.css +52 -0
- package/esm/content/progress/ProgressCircle.js +153 -0
- package/esm/content/progress/ProgressCircle.js.map +7 -0
- package/esm/content/progress/ProgressCircle.sty.js +19 -0
- package/esm/content/progress/ProgressCircle.sty.js.map +7 -0
- package/esm/content/progress/contexts/SharedProgressBarPropsContext.js +10 -0
- package/esm/content/progress/contexts/SharedProgressBarPropsContext.js.map +7 -0
- package/esm/content/progress/hooks/useProgressAriaProps.js +45 -0
- package/esm/content/progress/hooks/useProgressAriaProps.js.map +7 -0
- package/esm/content/progress/hooks/useProgressBarPropsContext.js +16 -0
- package/esm/content/progress/hooks/useProgressBarPropsContext.js.map +7 -0
- package/esm/content/progress/utils.js +22 -0
- package/esm/content/progress/utils.js.map +7 -0
- package/esm/core/components/app-root/AppRoot.js.map +1 -1
- package/esm/core/hooks/useAriaLabelingProps.js +12 -0
- package/esm/core/hooks/useAriaLabelingProps.js.map +7 -0
- package/esm/core/hooks/useCurrentTheme.js.map +1 -1
- package/esm/core/hooks/useFontsUpdated.js +33 -0
- package/esm/core/hooks/useFontsUpdated.js.map +7 -0
- package/esm/core/hooks/useId.js +14 -0
- package/esm/core/hooks/useId.js.map +7 -0
- package/esm/core/hooks/useMergeRefs.js +16 -0
- package/esm/core/hooks/useMergeRefs.js.map +7 -0
- package/esm/core/hooks/useSafeForwardProps.js +16 -0
- package/esm/core/hooks/useSafeForwardProps.js.map +7 -0
- package/esm/core/index.js +12 -0
- package/esm/core/index.js.map +2 -2
- package/esm/core/styles/focusRing.css +88 -0
- package/esm/core/styles/focusRing.sty.js +9 -0
- package/esm/core/styles/focusRing.sty.js.map +7 -0
- package/esm/core/styles/useFocusRing.js +69 -0
- package/esm/core/styles/useFocusRing.js.map +7 -0
- package/esm/core/types/a11y-props.js +1 -0
- package/esm/core/types/a11y-props.js.map +7 -0
- package/esm/core/types/dom.js +1 -0
- package/esm/core/types/dom.js.map +7 -0
- package/esm/core/types/heading.js +1 -0
- package/esm/core/types/heading.js.map +7 -0
- package/esm/core/types/polymorph.js +1 -0
- package/esm/core/types/polymorph.js.map +7 -0
- package/esm/core/types/role-variant.js +12 -0
- package/esm/core/types/role-variant.js.map +7 -0
- package/esm/core/utils/_is-string-children.js +16 -0
- package/esm/core/utils/_is-string-children.js.map +7 -0
- package/esm/core/utils/colorUtils.css +80 -0
- package/esm/core/utils/colorUtils.sty.js +9 -0
- package/esm/core/utils/colorUtils.sty.js.map +7 -0
- package/esm/core/utils/isBrowser.js.map +1 -1
- package/esm/core/utils/merge-props.js.map +2 -2
- package/esm/core/utils/seed-random.js +16 -0
- package/esm/core/utils/seed-random.js.map +7 -0
- package/esm/core/utils/uuidv4.js +13 -0
- package/esm/core/utils/uuidv4.js.map +7 -0
- package/esm/index.js +4 -0
- package/esm/index.js.map +2 -2
- package/esm/layouts/Divider/Divider.css +23 -0
- package/esm/layouts/Divider/Divider.js +39 -0
- package/esm/layouts/Divider/Divider.js.map +7 -0
- package/esm/layouts/Divider/Divider.sty.js +8 -0
- package/esm/layouts/Divider/Divider.sty.js.map +7 -0
- package/esm/layouts/container/Container.css +8 -0
- package/esm/layouts/container/Container.js +55 -0
- package/esm/layouts/container/Container.js.map +7 -0
- package/esm/layouts/container/Container.sty.js +7 -0
- package/esm/layouts/container/Container.sty.js.map +7 -0
- package/esm/layouts/flex/Flex.js +46 -0
- package/esm/layouts/flex/Flex.js.map +7 -0
- package/esm/layouts/grid/Grid.js +46 -0
- package/esm/layouts/grid/Grid.js.map +7 -0
- package/esm/layouts/index.js +11 -0
- package/esm/layouts/index.js.map +7 -0
- package/esm/styles/colorUtils.css +80 -0
- package/esm/styles/colorUtils.sty.js +9 -0
- package/esm/styles/colorUtils.sty.js.map +7 -0
- package/esm/styles/container.css +64 -0
- package/esm/styles/container.sty.js +9 -0
- package/esm/styles/container.sty.js.map +7 -0
- package/esm/styles/ellipsis.css +5 -0
- package/esm/styles/ellipsis.sty.js +6 -0
- package/esm/styles/ellipsis.sty.js.map +7 -0
- package/esm/styles/extract-util.js +15 -0
- package/esm/styles/extract-util.js.map +7 -0
- package/esm/styles/getFlexStyles.js +69 -0
- package/esm/styles/getFlexStyles.js.map +7 -0
- package/esm/styles/getGapSprinkles.js +18 -0
- package/esm/styles/getGapSprinkles.js.map +7 -0
- package/esm/styles/getGridFlexPositionSprinkles.js +25 -0
- package/esm/styles/getGridFlexPositionSprinkles.js.map +7 -0
- package/esm/styles/getGridStyles.js +78 -0
- package/esm/styles/getGridStyles.js.map +7 -0
- package/esm/styles/getLayoutSizeStyles.js +21 -0
- package/esm/styles/getLayoutSizeStyles.js.map +7 -0
- package/esm/styles/getSpacingSprinkles.js +50 -0
- package/esm/styles/getSpacingSprinkles.js.map +7 -0
- package/esm/styles/index.js +49 -0
- package/esm/styles/index.js.map +7 -0
- package/esm/styles/safe-sprinkles.js +17 -0
- package/esm/styles/safe-sprinkles.js.map +7 -0
- package/esm/styles/sprinkle-properties.js +137 -0
- package/esm/styles/sprinkle-properties.js.map +7 -0
- package/esm/styles/sprinkles.css +786 -0
- package/esm/styles/sprinkles.sty.js +9 -0
- package/esm/styles/sprinkles.sty.js.map +7 -0
- package/esm/styles/textStyle.css +64 -0
- package/esm/styles/textStyle.sty.js +7 -0
- package/esm/styles/textStyle.sty.js.map +7 -0
- package/esm/typography/BlockQuote/Blockquote.css +17 -0
- package/esm/typography/BlockQuote/Blockquote.js +34 -0
- package/esm/typography/BlockQuote/Blockquote.js.map +7 -0
- package/esm/typography/BlockQuote/Blockquote.sty.js +6 -0
- package/esm/typography/BlockQuote/Blockquote.sty.js.map +7 -0
- package/esm/typography/Code/Code.css +16 -0
- package/esm/typography/Code/Code.js +34 -0
- package/esm/typography/Code/Code.js.map +7 -0
- package/esm/typography/Code/Code.sty.js +6 -0
- package/esm/typography/Code/Code.sty.js.map +7 -0
- package/esm/typography/Emphasis/Emphasis.css +4 -0
- package/esm/typography/Emphasis/Emphasis.js +34 -0
- package/esm/typography/Emphasis/Emphasis.js.map +7 -0
- package/esm/typography/Emphasis/Emphasis.sty.js +6 -0
- package/esm/typography/Emphasis/Emphasis.sty.js.map +7 -0
- package/esm/typography/ExternalLink/ExternalLink.css +28 -0
- package/esm/typography/ExternalLink/ExternalLink.js +56 -0
- package/esm/typography/ExternalLink/ExternalLink.js.map +7 -0
- package/esm/typography/ExternalLink/ExternalLink.sty.js +6 -0
- package/esm/typography/ExternalLink/ExternalLink.sty.js.map +7 -0
- package/esm/typography/Heading/Heading.css +54 -0
- package/esm/typography/Heading/Heading.js +36 -0
- package/esm/typography/Heading/Heading.js.map +7 -0
- package/esm/typography/Heading/Heading.sty.js +7 -0
- package/esm/typography/Heading/Heading.sty.js.map +7 -0
- package/esm/typography/Highlight/Highlight.css +4 -0
- package/esm/typography/Highlight/Highlight.js +111 -0
- package/esm/typography/Highlight/Highlight.js.map +7 -0
- package/esm/typography/Highlight/Highlight.sty.js +6 -0
- package/esm/typography/Highlight/Highlight.sty.js.map +7 -0
- package/esm/typography/Link/Link.css +15 -0
- package/esm/typography/Link/Link.js +49 -0
- package/esm/typography/Link/Link.js.map +7 -0
- package/esm/typography/Link/Link.sty.js +6 -0
- package/esm/typography/Link/Link.sty.js.map +7 -0
- package/esm/typography/List/List.css +16 -0
- package/esm/typography/List/List.js +81 -0
- package/esm/typography/List/List.js.map +7 -0
- package/esm/typography/List/List.sty.js +8 -0
- package/esm/typography/List/List.sty.js.map +7 -0
- package/esm/typography/Paragraph/Paragraph.css +19 -0
- package/esm/typography/Paragraph/Paragraph.js +49 -0
- package/esm/typography/Paragraph/Paragraph.js.map +7 -0
- package/esm/typography/Paragraph/Paragraph.sty.js +7 -0
- package/esm/typography/Paragraph/Paragraph.sty.js.map +7 -0
- package/esm/typography/Strikethrough/Strikethrough.css +5 -0
- package/esm/typography/Strikethrough/Strikethrough.js +32 -0
- package/esm/typography/Strikethrough/Strikethrough.js.map +7 -0
- package/esm/typography/Strikethrough/Strikethrough.sty.js +6 -0
- package/esm/typography/Strikethrough/Strikethrough.sty.js.map +7 -0
- package/esm/typography/Strong/Strong.css +4 -0
- package/esm/typography/Strong/Strong.js +34 -0
- package/esm/typography/Strong/Strong.js.map +7 -0
- package/esm/typography/Strong/Strong.sty.js +6 -0
- package/esm/typography/Strong/Strong.sty.js.map +7 -0
- package/esm/typography/Text/Text.css +18 -0
- package/esm/typography/Text/Text.js +43 -0
- package/esm/typography/Text/Text.js.map +7 -0
- package/esm/typography/Text/Text.sty.js +7 -0
- package/esm/typography/Text/Text.sty.js.map +7 -0
- package/esm/typography/TextEllipsis/TextEllipsis.css +22 -0
- package/esm/typography/TextEllipsis/TextEllipsis.js +143 -0
- package/esm/typography/TextEllipsis/TextEllipsis.js.map +7 -0
- package/esm/typography/TextEllipsis/TextEllipsis.sty.js +7 -0
- package/esm/typography/TextEllipsis/TextEllipsis.sty.js.map +7 -0
- package/esm/typography/index.js +43 -0
- package/esm/typography/index.js.map +7 -0
- package/esm/typography/utils.js +101 -0
- package/esm/typography/utils.js.map +7 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/lang/en.json +12 -0
- package/lang/uncompiled/en.json +10 -1
- package/layouts/Divider/Divider.css +23 -0
- package/layouts/Divider/Divider.d.ts +39 -0
- package/layouts/Divider/Divider.js +67 -0
- package/layouts/Divider/Divider.sty.d.ts +16 -0
- package/layouts/Divider/Divider.sty.js +26 -0
- package/layouts/container/Container.css +8 -0
- package/layouts/container/Container.d.ts +34 -0
- package/layouts/container/Container.js +80 -0
- package/layouts/container/Container.sty.d.ts +1 -0
- package/layouts/container/Container.sty.js +25 -0
- package/layouts/flex/Flex.d.ts +23 -0
- package/layouts/flex/Flex.js +72 -0
- package/layouts/grid/Grid.d.ts +23 -0
- package/layouts/grid/Grid.js +72 -0
- package/layouts/index.d.ts +6 -0
- package/layouts/index.js +29 -0
- package/package.json +34 -4
- package/styles/colorUtils.css +80 -0
- package/styles/colorUtils.sty.d.ts +56 -0
- package/styles/colorUtils.sty.js +27 -0
- package/styles/container.css +64 -0
- package/styles/container.sty.d.ts +54 -0
- package/styles/container.sty.js +27 -0
- package/styles/ellipsis.css +5 -0
- package/styles/ellipsis.sty.d.ts +5 -0
- package/styles/ellipsis.sty.js +24 -0
- package/styles/extract-util.d.ts +9 -0
- package/styles/extract-util.js +33 -0
- package/styles/getFlexStyles.d.ts +64 -0
- package/styles/getFlexStyles.js +95 -0
- package/styles/getGapSprinkles.d.ts +19 -0
- package/styles/getGapSprinkles.js +36 -0
- package/styles/getGridFlexPositionSprinkles.d.ts +35 -0
- package/styles/getGridFlexPositionSprinkles.js +43 -0
- package/styles/getGridStyles.d.ts +74 -0
- package/styles/getGridStyles.js +100 -0
- package/styles/getLayoutSizeStyles.d.ts +29 -0
- package/styles/getLayoutSizeStyles.js +39 -0
- package/styles/getSpacingSprinkles.d.ts +74 -0
- package/styles/getSpacingSprinkles.js +68 -0
- package/styles/index.d.ts +11 -0
- package/styles/index.js +47 -0
- package/styles/safe-sprinkles.d.ts +6 -0
- package/styles/safe-sprinkles.js +35 -0
- package/styles/sprinkle-properties.d.ts +257 -0
- package/styles/sprinkle-properties.js +165 -0
- package/styles/sprinkles.css +786 -0
- package/styles/sprinkles.sty.d.ts +913 -0
- package/styles/sprinkles.sty.js +27 -0
- package/styles/textStyle.css +64 -0
- package/styles/textStyle.sty.d.ts +13 -0
- package/styles/textStyle.sty.js +25 -0
- package/testing/mocks/canvas-mock.js +6 -1
- package/testing/mocks/text-ellipsis-mock.d.ts +1 -1
- package/testing/mocks/text-ellipsis-mock.js +8 -3
- package/typography/BlockQuote/Blockquote.css +17 -0
- package/typography/BlockQuote/Blockquote.d.ts +19 -0
- package/typography/BlockQuote/Blockquote.js +62 -0
- package/typography/BlockQuote/Blockquote.sty.d.ts +1 -0
- package/typography/BlockQuote/Blockquote.sty.js +24 -0
- package/typography/Code/Code.css +16 -0
- package/typography/Code/Code.d.ts +17 -0
- package/typography/Code/Code.js +62 -0
- package/typography/Code/Code.sty.d.ts +1 -0
- package/typography/Code/Code.sty.js +24 -0
- package/typography/Emphasis/Emphasis.css +4 -0
- package/typography/Emphasis/Emphasis.d.ts +14 -0
- package/typography/Emphasis/Emphasis.js +62 -0
- package/typography/Emphasis/Emphasis.sty.d.ts +1 -0
- package/typography/Emphasis/Emphasis.sty.js +24 -0
- package/typography/ExternalLink/ExternalLink.css +28 -0
- package/typography/ExternalLink/ExternalLink.d.ts +21 -0
- package/typography/ExternalLink/ExternalLink.js +82 -0
- package/typography/ExternalLink/ExternalLink.sty.d.ts +1 -0
- package/typography/ExternalLink/ExternalLink.sty.js +24 -0
- package/typography/Heading/Heading.css +54 -0
- package/typography/Heading/Heading.d.ts +24 -0
- package/typography/Heading/Heading.js +64 -0
- package/typography/Heading/Heading.sty.d.ts +52 -0
- package/typography/Heading/Heading.sty.js +25 -0
- package/typography/Highlight/Highlight.css +4 -0
- package/typography/Highlight/Highlight.d.ts +27 -0
- package/typography/Highlight/Highlight.js +139 -0
- package/typography/Highlight/Highlight.sty.d.ts +1 -0
- package/typography/Highlight/Highlight.sty.js +24 -0
- package/typography/Link/Link.css +15 -0
- package/typography/Link/Link.d.ts +16 -0
- package/typography/Link/Link.js +75 -0
- package/typography/Link/Link.sty.d.ts +1 -0
- package/typography/Link/Link.sty.js +24 -0
- package/typography/List/List.css +16 -0
- package/typography/List/List.d.ts +39 -0
- package/typography/List/List.js +109 -0
- package/typography/List/List.sty.d.ts +2 -0
- package/typography/List/List.sty.js +26 -0
- package/typography/Paragraph/Paragraph.css +19 -0
- package/typography/Paragraph/Paragraph.d.ts +19 -0
- package/typography/Paragraph/Paragraph.js +77 -0
- package/typography/Paragraph/Paragraph.sty.d.ts +16 -0
- package/typography/Paragraph/Paragraph.sty.js +25 -0
- package/typography/Strikethrough/Strikethrough.css +5 -0
- package/typography/Strikethrough/Strikethrough.d.ts +15 -0
- package/typography/Strikethrough/Strikethrough.js +60 -0
- package/typography/Strikethrough/Strikethrough.sty.d.ts +1 -0
- package/typography/Strikethrough/Strikethrough.sty.js +24 -0
- package/typography/Strong/Strong.css +4 -0
- package/typography/Strong/Strong.d.ts +14 -0
- package/typography/Strong/Strong.js +62 -0
- package/typography/Strong/Strong.sty.d.ts +1 -0
- package/typography/Strong/Strong.sty.js +24 -0
- package/typography/Text/Text.css +18 -0
- package/typography/Text/Text.d.ts +26 -0
- package/typography/Text/Text.js +71 -0
- package/typography/Text/Text.sty.d.ts +16 -0
- package/typography/Text/Text.sty.js +25 -0
- package/typography/TextEllipsis/TextEllipsis.css +22 -0
- package/typography/TextEllipsis/TextEllipsis.d.ts +32 -0
- package/typography/TextEllipsis/TextEllipsis.js +167 -0
- package/typography/TextEllipsis/TextEllipsis.sty.d.ts +15 -0
- package/typography/TextEllipsis/TextEllipsis.sty.js +25 -0
- package/typography/index.d.ts +28 -0
- package/typography/index.js +54 -0
- package/typography/utils.d.ts +52 -0
- package/typography/utils.js +119 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var useProgressAriaProps_exports = {};
|
|
19
|
+
__export(useProgressAriaProps_exports, {
|
|
20
|
+
useProgressAriaProps: () => useProgressAriaProps
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(useProgressAriaProps_exports);
|
|
23
|
+
var import_lodash_es = require("lodash");
|
|
24
|
+
var import_units = require("@dynatrace-sdk/units");
|
|
25
|
+
function useProgressAriaProps(originalValue, min, max, valueText) {
|
|
26
|
+
let value;
|
|
27
|
+
let isIndeterminate;
|
|
28
|
+
if (originalValue === "indeterminate" || originalValue === void 0) {
|
|
29
|
+
value = void 0;
|
|
30
|
+
isIndeterminate = true;
|
|
31
|
+
} else {
|
|
32
|
+
value = originalValue;
|
|
33
|
+
isIndeterminate = false;
|
|
34
|
+
}
|
|
35
|
+
if (!isIndeterminate) {
|
|
36
|
+
value = (0, import_lodash_es.clamp)(originalValue, min, max);
|
|
37
|
+
}
|
|
38
|
+
if (!isIndeterminate && value !== void 0 && !valueText) {
|
|
39
|
+
valueText = (0, import_units.format)(value, { input: import_units.units.percentage.percent });
|
|
40
|
+
}
|
|
41
|
+
const progressAriaProps = {
|
|
42
|
+
// aria-valuenow should only be provided and updated if the value is not indeterminate https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role)
|
|
43
|
+
"aria-valuenow": isIndeterminate ? void 0 : value,
|
|
44
|
+
"aria-valuetext": isIndeterminate ? void 0 : valueText,
|
|
45
|
+
// aria-valuemin should only be provided if min is not 0 (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role)
|
|
46
|
+
"aria-valuemin": min !== 0 ? min : void 0,
|
|
47
|
+
// aria-valuemax should only be provided if min is not 100 (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role)
|
|
48
|
+
"aria-valuemax": max !== 100 ? max : void 0,
|
|
49
|
+
role: "progressbar"
|
|
50
|
+
};
|
|
51
|
+
if (isIndeterminate === true && value === void 0) {
|
|
52
|
+
return {
|
|
53
|
+
value: void 0,
|
|
54
|
+
isIndeterminate: true,
|
|
55
|
+
progressAriaProps
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
value,
|
|
60
|
+
isIndeterminate: false,
|
|
61
|
+
progressAriaProps
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var useProgressBarPropsContext_exports = {};
|
|
19
|
+
__export(useProgressBarPropsContext_exports, {
|
|
20
|
+
_useSharedProgressBarPropsContext: () => _useSharedProgressBarPropsContext
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(useProgressBarPropsContext_exports);
|
|
23
|
+
var import_react = require("react");
|
|
24
|
+
var import_SharedProgressBarPropsContext = require("../contexts/SharedProgressBarPropsContext.js");
|
|
25
|
+
function _useSharedProgressBarPropsContext() {
|
|
26
|
+
const context = (0, import_react.useContext)(import_SharedProgressBarPropsContext.SharedProgressBarPropsContext);
|
|
27
|
+
return {
|
|
28
|
+
id: context.id,
|
|
29
|
+
variant: context.variant,
|
|
30
|
+
density: context.density
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var utils_exports = {};
|
|
29
|
+
__export(utils_exports, {
|
|
30
|
+
getFillColorFromVariant: () => getFillColorFromVariant
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(utils_exports);
|
|
33
|
+
var import_colors = __toESM(require("@dynatrace/strato-design-tokens/colors"));
|
|
34
|
+
function getFillColorFromVariant($variant) {
|
|
35
|
+
switch ($variant) {
|
|
36
|
+
case "onAccent":
|
|
37
|
+
return import_colors.default.Border.OnAccent.Default;
|
|
38
|
+
case "primary":
|
|
39
|
+
return import_colors.default.Border.Primary.Accent;
|
|
40
|
+
case "success":
|
|
41
|
+
return import_colors.default.Border.Success.Accent;
|
|
42
|
+
case "warning":
|
|
43
|
+
return import_colors.default.Border.Warning.Accent;
|
|
44
|
+
case "critical":
|
|
45
|
+
return import_colors.default.Border.Critical.Accent;
|
|
46
|
+
case "neutral":
|
|
47
|
+
default:
|
|
48
|
+
return import_colors.default.Border.Neutral.Accent;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -5,18 +5,18 @@ import { type DataTestId } from '../../types/data-props.js';
|
|
|
5
5
|
import { type MaskingProps } from '../../types/masking-props.js';
|
|
6
6
|
import { type StylingProps } from '../../types/styling-props.js';
|
|
7
7
|
/**
|
|
8
|
-
* @public
|
|
9
8
|
* AppRoot component props.
|
|
9
|
+
* @public
|
|
10
10
|
*/
|
|
11
11
|
export type AppRootProps = PropsWithChildren<DataTestId & StylingProps & MaskingProps>;
|
|
12
12
|
/**
|
|
13
|
-
* @public
|
|
14
13
|
* In order to have all the providers in place for rendering overlays, applying
|
|
15
14
|
* global styles or internationalization, you need to wrap your app in the
|
|
16
15
|
* `AppRoot`. If you're using the `dt-app` to create your app, this is
|
|
17
16
|
* automatically taken care of and you can start working on your app without
|
|
18
17
|
* further ado.
|
|
18
|
+
* @public
|
|
19
19
|
*/
|
|
20
|
-
export declare const AppRoot:
|
|
20
|
+
export declare const AppRoot: (props: DataTestId & StylingProps & MaskingProps & {
|
|
21
21
|
children?: React.ReactNode;
|
|
22
|
-
} & React.RefAttributes<HTMLDivElement
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AriaLabelingProps } from '../types/a11y-props.js';
|
|
2
|
+
/**
|
|
3
|
+
* Utility function to extract aria-labeling props from component props to easily spread them to the desired child.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAriaLabelingProps<T extends object>(props: AriaLabelingProps & T): AriaLabelingProps;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var useAriaLabelingProps_exports = {};
|
|
19
|
+
__export(useAriaLabelingProps_exports, {
|
|
20
|
+
useAriaLabelingProps: () => useAriaLabelingProps
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(useAriaLabelingProps_exports);
|
|
23
|
+
function useAriaLabelingProps(props) {
|
|
24
|
+
return {
|
|
25
|
+
"aria-label": props["aria-label"],
|
|
26
|
+
"aria-labelledby": props["aria-labelledby"],
|
|
27
|
+
"aria-describedby": props["aria-describedby"],
|
|
28
|
+
"aria-details": props["aria-details"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook that checks if the initially loaded fonts were updated.
|
|
3
|
+
* Used to trigger remeasuring in the DataTable (autoWidth) and TextEllipsis once all fonts are loaded.
|
|
4
|
+
*
|
|
5
|
+
* @param callback - optionally pass a function to be executed once when the fonts were updated
|
|
6
|
+
* @returns boolean whether the fonts have changed
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function _useFontsUpdated(callback?: () => void): boolean;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var useFontsUpdated_exports = {};
|
|
19
|
+
__export(useFontsUpdated_exports, {
|
|
20
|
+
_useFontsUpdated: () => _useFontsUpdated
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(useFontsUpdated_exports);
|
|
23
|
+
var import_lodash_es = require("lodash");
|
|
24
|
+
var import_react = require("react");
|
|
25
|
+
function _useFontsUpdated(callback) {
|
|
26
|
+
const [fontsUpdated, setFontsUpdated] = (0, import_react.useState)(false);
|
|
27
|
+
const prevFontFamilies = (0, import_react.useRef)();
|
|
28
|
+
const fontFamilies = [];
|
|
29
|
+
const firstRender = (0, import_react.useRef)(true);
|
|
30
|
+
if (document.fonts) {
|
|
31
|
+
if (firstRender.current) {
|
|
32
|
+
const loadedFontFamilies = [];
|
|
33
|
+
document.fonts.forEach(
|
|
34
|
+
(fontFace) => loadedFontFamilies.push(`${fontFace.family} ${fontFace.weight}`)
|
|
35
|
+
);
|
|
36
|
+
prevFontFamilies.current = loadedFontFamilies;
|
|
37
|
+
firstRender.current = false;
|
|
38
|
+
}
|
|
39
|
+
document.fonts.ready.then((fontFaceSet) => {
|
|
40
|
+
fontFaceSet.forEach(
|
|
41
|
+
(fontFace) => fontFamilies.push(`${fontFace.family} ${fontFace.weight}`)
|
|
42
|
+
);
|
|
43
|
+
if (!(0, import_lodash_es.isEqual)(prevFontFamilies.current, fontFamilies)) {
|
|
44
|
+
prevFontFamilies.current = fontFamilies;
|
|
45
|
+
callback?.();
|
|
46
|
+
setFontsUpdated(true);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return fontsUpdated;
|
|
51
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook used to generate a unique identifier.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const useId: (props?: {
|
|
6
|
+
/** If a prefix is defined, the hook prepends the prefix with a hyphen to the generated id.
|
|
7
|
+
* @defaultValue 'strato'
|
|
8
|
+
*/
|
|
9
|
+
prefix?: string;
|
|
10
|
+
/** If a seed is defined, the hook uses a seeded random function to generate the id consistently. */
|
|
11
|
+
seed?: number;
|
|
12
|
+
}) => string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var useId_exports = {};
|
|
19
|
+
__export(useId_exports, {
|
|
20
|
+
useId: () => useId
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(useId_exports);
|
|
23
|
+
var import_react = require("react");
|
|
24
|
+
var import_uuidv4 = require("../utils/uuidv4.js");
|
|
25
|
+
const useId = (props = {}) => {
|
|
26
|
+
const { prefix = "strato", seed } = props;
|
|
27
|
+
const generatedId = (0, import_react.useMemo)(
|
|
28
|
+
() => `${prefix}-${(0, import_uuidv4.uuidv4)(seed)}`,
|
|
29
|
+
[prefix, seed]
|
|
30
|
+
);
|
|
31
|
+
return generatedId;
|
|
32
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* If you have multiple references (e.g. from different hooks) you need to apply to
|
|
4
|
+
* the same element, you can use the `useMergeRefs` hook to combine them into one
|
|
5
|
+
* reference.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useMergeRefs<T = unknown>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T> | React.Dispatch<React.SetStateAction<T | null>> | undefined>): React.RefCallback<T>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var useMergeRefs_exports = {};
|
|
19
|
+
__export(useMergeRefs_exports, {
|
|
20
|
+
useMergeRefs: () => useMergeRefs
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(useMergeRefs_exports);
|
|
23
|
+
var import_react = require("react");
|
|
24
|
+
function useMergeRefs(refs) {
|
|
25
|
+
return (0, import_react.useCallback)((value) => {
|
|
26
|
+
for (const ref of refs) {
|
|
27
|
+
if (typeof ref === "function") {
|
|
28
|
+
ref(value);
|
|
29
|
+
} else if (ref !== void 0 && ref !== null) {
|
|
30
|
+
ref.current = value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, refs);
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Filtered Props from 'useSafeForwardProps'
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export type UseSafeForwardReturnProps<T, P> = Omit<T, keyof P | 'className' | 'classNames' | 'style'>;
|
|
6
|
+
/**
|
|
7
|
+
* Filters props out of a prop list. Per default className, classNames & style are filtered.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function useSafeForwardProps<T extends object, P extends object>(props: T, excludedProps?: P): UseSafeForwardReturnProps<T, P>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var useSafeForwardProps_exports = {};
|
|
19
|
+
__export(useSafeForwardProps_exports, {
|
|
20
|
+
useSafeForwardProps: () => useSafeForwardProps
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(useSafeForwardProps_exports);
|
|
23
|
+
function useSafeForwardProps(props, excludedProps) {
|
|
24
|
+
const ignoreStyles = ["className", "classNames", "style"];
|
|
25
|
+
const ignoreList = excludedProps ? [...ignoreStyles, ...Object.keys(excludedProps)] : ignoreStyles;
|
|
26
|
+
const safeForwardProps = {};
|
|
27
|
+
for (const [name, prop] of Object.entries(props)) {
|
|
28
|
+
if (!ignoreList.includes(name)) {
|
|
29
|
+
const localName = name;
|
|
30
|
+
safeForwardProps[localName] = prop;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return safeForwardProps;
|
|
34
|
+
}
|
package/core/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type { MaskingProps } from './types/masking-props.js';
|
|
|
8
8
|
export type { DataTestId } from './types/data-props.js';
|
|
9
9
|
export type { StylingProps } from './types/styling-props.js';
|
|
10
10
|
export type { WithChildren } from './types/with-children.js';
|
|
11
|
+
export type { PolymorphOwnProps, PolymorphProps, PolymorphicComponentProps, } from './types/polymorph.js';
|
|
11
12
|
export { attemptFocus as _attemptFocus } from './utils/focus-management/attempt-focus.js';
|
|
12
13
|
export { focusFirstDescendant as _focusFirstDescendant } from './utils/focus-management/focus-first-descendant.js';
|
|
13
14
|
export { getFirstFocusableChild as _getFirstFocusableChild } from './utils/focus-management/get-first-focusable-child.js';
|
|
@@ -15,3 +16,14 @@ export { getLastFocusableChild as _getLastFocusableChild } from './utils/focus-m
|
|
|
15
16
|
export { isFocusable as _isFocusable } from './utils/focus-management/is-focusable.js';
|
|
16
17
|
export { isBrowser as _isBrowser } from './utils/isBrowser.js';
|
|
17
18
|
export { mergeProps as _mergeProps, type NullToObject as _NullToObject, type TupleTypes as _TupleTypes, type UnionToIntersection as _UnionToIntersection, } from './utils/merge-props.js';
|
|
19
|
+
export { type _HeadingLevel, type _HeadingTag } from './types/heading.js';
|
|
20
|
+
export { useAriaLabelingProps as _useAriaLabelingProps } from './hooks/useAriaLabelingProps.js';
|
|
21
|
+
export { useId as _useId } from './hooks/useId.js';
|
|
22
|
+
export { useSafeForwardProps as _useSafeForwardProps } from './hooks/useSafeForwardProps.js';
|
|
23
|
+
export type { UseSafeForwardReturnProps as _UseSafeForwardReturnProps } from './hooks/useSafeForwardProps.js';
|
|
24
|
+
export type { AriaDisabledProps, AriaLabelingProps, } from './types/a11y-props.js';
|
|
25
|
+
export type { DOMProps } from './types/dom.js';
|
|
26
|
+
export { roleVariants } from './types/role-variant.js';
|
|
27
|
+
export type { RoleVariantType } from './types/role-variant.js';
|
|
28
|
+
export { uuidv4 as _uuidv4 } from './utils/uuidv4.js';
|
|
29
|
+
export { isStringChildren as _isStringChildren } from './utils/_is-string-children.js';
|
package/core/index.js
CHANGED
|
@@ -26,8 +26,14 @@ __export(core_exports, {
|
|
|
26
26
|
_getLastFocusableChild: () => import_get_last_focusable_child.getLastFocusableChild,
|
|
27
27
|
_isBrowser: () => import_isBrowser.isBrowser,
|
|
28
28
|
_isFocusable: () => import_is_focusable.isFocusable,
|
|
29
|
+
_isStringChildren: () => import_is_string_children.isStringChildren,
|
|
29
30
|
_mergeProps: () => import_merge_props.mergeProps,
|
|
31
|
+
_useAriaLabelingProps: () => import_useAriaLabelingProps.useAriaLabelingProps,
|
|
30
32
|
_useFocusContext: () => import_useFocusContext.useFocusContext,
|
|
33
|
+
_useId: () => import_useId.useId,
|
|
34
|
+
_useSafeForwardProps: () => import_useSafeForwardProps.useSafeForwardProps,
|
|
35
|
+
_uuidv4: () => import_uuidv4.uuidv4,
|
|
36
|
+
roleVariants: () => import_role_variant.roleVariants,
|
|
31
37
|
useCurrentTheme: () => import_useCurrentTheme.useCurrentTheme
|
|
32
38
|
});
|
|
33
39
|
module.exports = __toCommonJS(core_exports);
|
|
@@ -43,3 +49,9 @@ var import_get_last_focusable_child = require("./utils/focus-management/get-last
|
|
|
43
49
|
var import_is_focusable = require("./utils/focus-management/is-focusable.js");
|
|
44
50
|
var import_isBrowser = require("./utils/isBrowser.js");
|
|
45
51
|
var import_merge_props = require("./utils/merge-props.js");
|
|
52
|
+
var import_useAriaLabelingProps = require("./hooks/useAriaLabelingProps.js");
|
|
53
|
+
var import_useId = require("./hooks/useId.js");
|
|
54
|
+
var import_useSafeForwardProps = require("./hooks/useSafeForwardProps.js");
|
|
55
|
+
var import_role_variant = require("./types/role-variant.js");
|
|
56
|
+
var import_uuidv4 = require("./utils/uuidv4.js");
|
|
57
|
+
var import_is_string_children = require("./utils/_is-string-children.js");
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.focusRing_focusRingCSS__z2r50s3 {
|
|
2
|
+
outline: none;
|
|
3
|
+
}
|
|
4
|
+
.focusRing_focusRingCSS__z2r50s3:focus-visible {
|
|
5
|
+
outline: none;
|
|
6
|
+
}
|
|
7
|
+
.focusRing_focusRingCSS_minimal_true__z2r50s4 {
|
|
8
|
+
border-radius: calc(var(--dt-borders-radius-field-subdued, 4px) / 2);
|
|
9
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--outerShadow__z2r50s0);
|
|
10
|
+
background-color: var(--backgroundColor__z2r50s2);
|
|
11
|
+
}
|
|
12
|
+
.focusRing_focusRingCSS_minimal_false__z2r50s5.focusRing_focusRingCSS_minimal_false__z2r50s5 {
|
|
13
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--outerShadow__z2r50s0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--innerShadow__z2r50s1);
|
|
14
|
+
}
|
|
15
|
+
.focusRing_focusRingCSS_variant_neutral__z2r50s6 {
|
|
16
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-neutral-accent, #545587);
|
|
17
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-neutral-default, #d2d3e1);
|
|
18
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-neutral-emphasized, #dadbe7);
|
|
19
|
+
}
|
|
20
|
+
.focusRing_focusRingCSS_variant_primary__z2r50s7 {
|
|
21
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-primary-accent, #454cc9);
|
|
22
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-primary-default, #ccd3f3);
|
|
23
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-primary-emphasized, #d6dbf4);
|
|
24
|
+
}
|
|
25
|
+
.focusRing_focusRingCSS_variant_success__z2r50s8 {
|
|
26
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-success-accent, #2c6360);
|
|
27
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-success-default, #cad6d7);
|
|
28
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-success-emphasized, #d4dddf);
|
|
29
|
+
}
|
|
30
|
+
.focusRing_focusRingCSS_variant_warning__z2r50s9 {
|
|
31
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-warning-accent, #805100);
|
|
32
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-warning-default, #f4e5d5);
|
|
33
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-warning-emphasized, #f4e8de);
|
|
34
|
+
}
|
|
35
|
+
.focusRing_focusRingCSS_variant_critical__z2r50sa {
|
|
36
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-critical-accent, #b80031);
|
|
37
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-critical-default, #f1cdcf);
|
|
38
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-critical-emphasized, #f2d7d9);
|
|
39
|
+
}
|
|
40
|
+
.focusRing_focusRingCSS_variant_onAccent__z2r50sb {
|
|
41
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-on-accent-default, #f3f3f7);
|
|
42
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-on-accent-default, #f3f3f7);
|
|
43
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-on-accent-emphasized, #f3f3f733);
|
|
44
|
+
}
|
|
45
|
+
.focusRing_focusRingFocusWithinCSS__z2r50sc:focus-within {
|
|
46
|
+
outline: none;
|
|
47
|
+
:focus-visible {
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
.focusRing_focusRingFocusWithinCSS_minimal_true__z2r50sd:focus-within {
|
|
52
|
+
border-radius: calc(var(--dt-borders-radius-field-subdued, 4px) / 2);
|
|
53
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--outerShadow__z2r50s0);
|
|
54
|
+
background-color: var(--backgroundColor__z2r50s2);
|
|
55
|
+
}
|
|
56
|
+
.focusRing_focusRingFocusWithinCSS_minimal_false__z2r50se:focus-within {
|
|
57
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--outerShadow__z2r50s0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--innerShadow__z2r50s1);
|
|
58
|
+
}
|
|
59
|
+
.focusRing_focusRingFocusWithinCSS_variant_neutral__z2r50sf {
|
|
60
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-neutral-accent, #545587);
|
|
61
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-neutral-default, #d2d3e1);
|
|
62
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-neutral-emphasized, #dadbe7);
|
|
63
|
+
}
|
|
64
|
+
.focusRing_focusRingFocusWithinCSS_variant_primary__z2r50sg {
|
|
65
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-primary-accent, #454cc9);
|
|
66
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-primary-default, #ccd3f3);
|
|
67
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-primary-emphasized, #d6dbf4);
|
|
68
|
+
}
|
|
69
|
+
.focusRing_focusRingFocusWithinCSS_variant_success__z2r50sh {
|
|
70
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-success-accent, #2c6360);
|
|
71
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-success-default, #cad6d7);
|
|
72
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-success-emphasized, #d4dddf);
|
|
73
|
+
}
|
|
74
|
+
.focusRing_focusRingFocusWithinCSS_variant_warning__z2r50si {
|
|
75
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-warning-accent, #805100);
|
|
76
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-warning-default, #f4e5d5);
|
|
77
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-warning-emphasized, #f4e8de);
|
|
78
|
+
}
|
|
79
|
+
.focusRing_focusRingFocusWithinCSS_variant_critical__z2r50sj {
|
|
80
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-critical-accent, #b80031);
|
|
81
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-critical-default, #f1cdcf);
|
|
82
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-critical-emphasized, #f2d7d9);
|
|
83
|
+
}
|
|
84
|
+
.focusRing_focusRingFocusWithinCSS_variant_onAccent__z2r50sk {
|
|
85
|
+
--outerShadow__z2r50s0: var(--dt-colors-border-on-accent-default, #f3f3f7);
|
|
86
|
+
--innerShadow__z2r50s1: var(--dt-colors-border-on-accent-default, #f3f3f7);
|
|
87
|
+
--backgroundColor__z2r50s2: var(--dt-colors-background-field-on-accent-emphasized, #f3f3f733);
|
|
88
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export declare const focusRingCSS: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
minimal: {
|
|
3
|
+
true: {
|
|
4
|
+
borderRadius: string;
|
|
5
|
+
boxShadow: string;
|
|
6
|
+
backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
7
|
+
};
|
|
8
|
+
false: {
|
|
9
|
+
selectors: {
|
|
10
|
+
'&&': {
|
|
11
|
+
boxShadow: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
variant: {
|
|
17
|
+
neutral: {
|
|
18
|
+
vars: {
|
|
19
|
+
[x: string]: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
primary: {
|
|
23
|
+
vars: {
|
|
24
|
+
[x: string]: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
success: {
|
|
28
|
+
vars: {
|
|
29
|
+
[x: string]: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
warning: {
|
|
33
|
+
vars: {
|
|
34
|
+
[x: string]: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
critical: {
|
|
38
|
+
vars: {
|
|
39
|
+
[x: string]: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
onAccent: {
|
|
43
|
+
vars: {
|
|
44
|
+
[x: string]: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
export declare const focusRingFocusWithinCSS: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
50
|
+
minimal: {
|
|
51
|
+
true: {
|
|
52
|
+
':focus-within': {
|
|
53
|
+
borderRadius: string;
|
|
54
|
+
boxShadow: string;
|
|
55
|
+
backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
false: {
|
|
59
|
+
':focus-within': {
|
|
60
|
+
boxShadow: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
variant: {
|
|
65
|
+
neutral: {
|
|
66
|
+
vars: {
|
|
67
|
+
[x: string]: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
primary: {
|
|
71
|
+
vars: {
|
|
72
|
+
[x: string]: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
success: {
|
|
76
|
+
vars: {
|
|
77
|
+
[x: string]: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
warning: {
|
|
81
|
+
vars: {
|
|
82
|
+
[x: string]: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
critical: {
|
|
86
|
+
vars: {
|
|
87
|
+
[x: string]: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
onAccent: {
|
|
91
|
+
vars: {
|
|
92
|
+
[x: string]: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
}>;
|