@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/core/styles/focusRing.css.ts"],
|
|
4
|
-
"sourcesContent": ["import './focusRing.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var focusRingCSS = _7a468({defaultClassName:'_z2r50s3-1-
|
|
4
|
+
"sourcesContent": ["import './focusRing.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport 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:[]});\nexport 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
|
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,eAAe,OAAO,EAAC,kBAAiB,kBAAiB,mBAAkB,EAAC,SAAQ,EAAC,MAAK,kBAAiB,OAAM,iBAAgB,GAAE,SAAQ,EAAC,SAAQ,kBAAiB,SAAQ,kBAAiB,SAAQ,kBAAiB,SAAQ,kBAAiB,UAAS,iBAAgB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;AACvT,IAAI,0BAA0B,OAAO,EAAC,kBAAiB,kBAAiB,mBAAkB,EAAC,SAAQ,EAAC,MAAK,kBAAiB,OAAM,iBAAgB,GAAE,SAAQ,EAAC,SAAQ,kBAAiB,SAAQ,kBAAiB,SAAQ,kBAAiB,SAAQ,kBAAiB,UAAS,iBAAgB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/styles/useFocusRing.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n FocusEvent,\n FocusEventHandler,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nimport { focusRingCSS, focusRingFocusWithinCSS } from './focusRing.sty.js';\nimport { _useFocusContext } from '../index.js';\n\n/** @internal */\nexport type VariantType =\n | 'neutral'\n | 'primary'\n | 'success'\n | 'warning'\n | 'critical';\n/** @internal */\nexport type UseFocusRingProps = {\n /**\n * A minimal focus outline is available for smaller content elements like links. This variant is applied when set to true.\n * @defaultValue false\n */\n isMinimal?: boolean;\n\n /**\n * Whether or not the modality should be ignored, so that the focus ring is also present if users clicks the element (not just by tabbing to it).\n * @defaultValue false\n */\n ignoreModality?: boolean;\n\n /**\n * The styling variant of the element.\n * @defaultValue neutral\n */\n variant?: VariantType;\n\n /**\n * Apply the focus ring styling if an embedded element gains the focus\n */\n focusWithin?: boolean;\n\n /**\n * Whether the element is disabled. If disabled changes to true, the focus will be removed.\n */\n disabled?: boolean;\n};\n\nexport type FocusRingProps = {\n /** The focus styles that depend on modality. */\n focusClassName: string;\n /** Focus handlers used to manage the focus state. Must be applied to the element that receives the focus.*/\n focusProps: {\n onFocus: (e:
|
|
4
|
+
"sourcesContent": ["import {\n type FocusEvent as ReactFocusEvent,\n type FocusEventHandler,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nimport { focusRingCSS, focusRingFocusWithinCSS } from './focusRing.sty.js';\nimport { _useFocusContext } from '../index.js';\n\n/** @internal */\nexport type VariantType =\n | 'neutral'\n | 'primary'\n | 'success'\n | 'warning'\n | 'critical';\n/** @internal */\nexport type UseFocusRingProps = {\n /**\n * A minimal focus outline is available for smaller content elements like links. This variant is applied when set to true.\n * @defaultValue false\n */\n isMinimal?: boolean;\n\n /**\n * Whether or not the modality should be ignored, so that the focus ring is also present if users clicks the element (not just by tabbing to it).\n * @defaultValue false\n */\n ignoreModality?: boolean;\n\n /**\n * The styling variant of the element.\n * @defaultValue neutral\n */\n variant?: VariantType;\n\n /**\n * Apply the focus ring styling if an embedded element gains the focus\n */\n focusWithin?: boolean;\n\n /**\n * Whether the element is disabled. If disabled changes to true, the focus will be removed.\n */\n disabled?: boolean;\n};\n\nexport type FocusRingProps = {\n /** The focus styles that depend on modality. */\n focusClassName: string;\n /** Focus handlers used to manage the focus state. Must be applied to the element that receives the focus.*/\n focusProps: {\n onFocus: (e: ReactFocusEvent) => void;\n onBlur: (e: ReactFocusEvent) => void;\n };\n /** Whether or not the element got focus via keyboard. */\n isFocusVisible: boolean;\n};\n\n/**\n * Custom hook used to determine focus styling depending on modality.\n * Returns the css classes (vanilla) that can be applied to the component in order to show the correct focus outline.\n * @internal\n */\nexport function useFocusRing(props: UseFocusRingProps = {}): FocusRingProps {\n const {\n variant = 'neutral',\n ignoreModality = false,\n isMinimal = false,\n focusWithin = false,\n disabled = false,\n } = props;\n const [isFocused, setIsFocused] = useState(false);\n const { modality } = _useFocusContext();\n\n useEffect(() => {\n if (disabled) {\n setIsFocused(false);\n }\n }, [disabled]);\n\n const onBlur = useCallback<FocusEventHandler>((e) => {\n // trigger only when the self element is unfocused (stopPropagation)\n if (e.currentTarget === e.target) {\n setIsFocused(false);\n }\n }, []);\n\n const onFocus = useCallback<FocusEventHandler>((e) => {\n // trigger only when the self element is focused (stopPropagation)\n if (e.currentTarget === e.target) {\n setIsFocused(true);\n }\n }, []);\n\n const focusProps = {\n onFocus,\n onBlur,\n };\n\n if (\n ((ignoreModality || modality === 'keyboard') && isFocused) ||\n focusWithin\n ) {\n if (isMinimal) {\n return {\n focusClassName: focusWithin\n ? focusRingFocusWithinCSS({ minimal: true, variant })\n : focusRingCSS({ minimal: true, variant }),\n isFocusVisible: !focusWithin,\n focusProps,\n };\n }\n\n return {\n focusClassName: focusWithin\n ? focusRingFocusWithinCSS({ minimal: false, variant })\n : focusRingCSS({ minimal: false, variant }),\n isFocusVisible: !focusWithin,\n focusProps,\n };\n }\n\n return {\n focusClassName: focusWithin ? focusRingFocusWithinCSS() : focusRingCSS(),\n isFocusVisible: false,\n focusProps,\n };\n}\n"],
|
|
5
5
|
"mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,cAAc,+BAA+B;AACtD,SAAS,wBAAwB;AAyD1B,SAAS,aAAa,QAA2B,CAAC,GAAmB;AAC1E,QAAM;AAAA,IACJ,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,WAAW;AAAA,EACb,IAAI;AACJ,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,SAAS,IAAI,iBAAiB;AAEtC,YAAU,MAAM;AACd,QAAI,UAAU;AACZ,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,SAAS,YAA+B,CAAC,MAAM;AAEnD,QAAI,EAAE,kBAAkB,EAAE,QAAQ;AAChC,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,YAA+B,CAAC,MAAM;AAEpD,QAAI,EAAE,kBAAkB,EAAE,QAAQ;AAChC,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,aAAa;AAAA,IACjB;AAAA,IACA;AAAA,EACF;AAEA,OACI,kBAAkB,aAAa,eAAe,aAChD,aACA;AACA,QAAI,WAAW;AACb,aAAO;AAAA,QACL,gBAAgB,cACZ,wBAAwB,EAAE,SAAS,MAAM,QAAQ,CAAC,IAClD,aAAa,EAAE,SAAS,MAAM,QAAQ,CAAC;AAAA,QAC3C,gBAAgB,CAAC;AAAA,QACjB;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,MACL,gBAAgB,cACZ,wBAAwB,EAAE,SAAS,OAAO,QAAQ,CAAC,IACnD,aAAa,EAAE,SAAS,OAAO,QAAQ,CAAC;AAAA,MAC5C,gBAAgB,CAAC;AAAA,MACjB;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,gBAAgB,cAAc,wBAAwB,IAAI,aAAa;AAAA,IACvE,gBAAgB;AAAA,IAChB;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Children } from "react";
|
|
2
2
|
import { FormattedMessage } from "react-intl";
|
|
3
3
|
import { isElement } from "react-is";
|
|
4
4
|
function isStringChildren(children) {
|
|
5
|
-
const childrenArray =
|
|
5
|
+
const childrenArray = Children.toArray(children);
|
|
6
6
|
if (!childrenArray.some(isElement)) {
|
|
7
7
|
return true;
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/utils/_is-string-children.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "AAAA,
|
|
4
|
+
"sourcesContent": ["import { type ReactNode, Children } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { isElement } from 'react-is';\n\n/**\n * Returns whether children only consist of text nodes.\n * @internal\n */\nexport function isStringChildren(children: ReactNode): children is string {\n const childrenArray = Children.toArray(children);\n\n if (!childrenArray.some(isElement)) {\n return true; // All children are strings\n }\n\n return childrenArray.every(\n (child) =>\n !isElement(child) ||\n (isElement(child) && child.type && child.type === FormattedMessage),\n );\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAyB,gBAAgB;AACzC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAMnB,SAAS,iBAAiB,UAAyC;AACxE,QAAM,gBAAgB,SAAS,QAAQ,QAAQ;AAE/C,MAAI,CAAC,cAAc,KAAK,SAAS,GAAG;AAClC,WAAO;AAAA,EACT;AAEA,SAAO,cAAc;AAAA,IACnB,CAAC,UACC,CAAC,UAAU,KAAK,KACf,UAAU,KAAK,KAAK,MAAM,QAAQ,MAAM,SAAS;AAAA,EACtD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
._k096v44-1-
|
|
2
|
-
--_k096v40-1-
|
|
3
|
-
--_k096v41-1-
|
|
4
|
-
--_k096v42-1-
|
|
1
|
+
._k096v44-1-6-0 {
|
|
2
|
+
--_k096v40-1-6-0: var(--dt-colors-text-critical-default, #b80031);
|
|
3
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-critical-default, #b80031);
|
|
4
|
+
--_k096v42-1-6-0: var(--dt-colors-border-critical-default, #f1cdcf);
|
|
5
5
|
}
|
|
6
|
-
._k096v45-1-
|
|
7
|
-
--_k096v40-1-
|
|
8
|
-
--_k096v41-1-
|
|
9
|
-
--_k096v42-1-
|
|
6
|
+
._k096v45-1-6-0 {
|
|
7
|
+
--_k096v40-1-6-0: var(--dt-colors-text-neutral-default, #2b2a58);
|
|
8
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-neutral-default, #2b2a58);
|
|
9
|
+
--_k096v42-1-6-0: var(--dt-colors-border-neutral-default, #d2d3e1);
|
|
10
10
|
}
|
|
11
|
-
._k096v46-1-
|
|
12
|
-
--_k096v40-1-
|
|
13
|
-
--_k096v41-1-
|
|
14
|
-
--_k096v42-1-
|
|
11
|
+
._k096v46-1-6-0 {
|
|
12
|
+
--_k096v40-1-6-0: var(--dt-colors-text-primary-default, #454cc9);
|
|
13
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-primary-default, #454cc9);
|
|
14
|
+
--_k096v42-1-6-0: var(--dt-colors-border-primary-default, #ccd3f3);
|
|
15
15
|
}
|
|
16
|
-
._k096v47-1-
|
|
17
|
-
--_k096v40-1-
|
|
18
|
-
--_k096v41-1-
|
|
19
|
-
--_k096v42-1-
|
|
16
|
+
._k096v47-1-6-0 {
|
|
17
|
+
--_k096v40-1-6-0: var(--dt-colors-text-success-default, #2c6360);
|
|
18
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-success-default, #2c6360);
|
|
19
|
+
--_k096v42-1-6-0: var(--dt-colors-border-success-default, #cad6d7);
|
|
20
20
|
}
|
|
21
|
-
._k096v48-1-
|
|
22
|
-
--_k096v40-1-
|
|
23
|
-
--_k096v41-1-
|
|
24
|
-
--_k096v42-1-
|
|
21
|
+
._k096v48-1-6-0 {
|
|
22
|
+
--_k096v40-1-6-0: var(--dt-colors-text-warning-default, #805100);
|
|
23
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-warning-default, #805100);
|
|
24
|
+
--_k096v42-1-6-0: var(--dt-colors-border-warning-default, #f4e5d5);
|
|
25
25
|
}
|
|
26
|
-
._k096v4d-1-
|
|
27
|
-
--_k096v40-1-
|
|
28
|
-
--_k096v41-1-
|
|
29
|
-
--_k096v42-1-
|
|
26
|
+
._k096v4d-1-6-0 {
|
|
27
|
+
--_k096v40-1-6-0: var(--dt-colors-text-primary-on-accent-default, #f4f4fb);
|
|
28
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-primary-on-accent-default, #f4f4fb);
|
|
29
|
+
--_k096v42-1-6-0: var(--dt-colors-border-primary-accent, #454cc9);
|
|
30
30
|
}
|
|
31
|
-
._k096v4e-1-
|
|
32
|
-
--_k096v40-1-
|
|
33
|
-
--_k096v41-1-
|
|
34
|
-
--_k096v42-1-
|
|
31
|
+
._k096v4e-1-6-0 {
|
|
32
|
+
--_k096v40-1-6-0: var(--dt-colors-text-success-on-accent-default, #f1f4f4);
|
|
33
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-success-on-accent-default, #f1f4f4);
|
|
34
|
+
--_k096v42-1-6-0: var(--dt-colors-border-success-accent, #2c6360);
|
|
35
35
|
}
|
|
36
|
-
._k096v4f-1-
|
|
37
|
-
--_k096v40-1-
|
|
38
|
-
--_k096v41-1-
|
|
39
|
-
--_k096v42-1-
|
|
36
|
+
._k096v4f-1-6-0 {
|
|
37
|
+
--_k096v40-1-6-0: var(--dt-colors-text-warning-on-accent-default, #272025);
|
|
38
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-warning-on-accent-default, #272025);
|
|
39
|
+
--_k096v42-1-6-0: var(--dt-colors-border-warning-accent, #805100);
|
|
40
40
|
}
|
|
41
|
-
._k096v4g-1-
|
|
42
|
-
--_k096v40-1-
|
|
43
|
-
--_k096v41-1-
|
|
44
|
-
--_k096v42-1-
|
|
41
|
+
._k096v4g-1-6-0 {
|
|
42
|
+
--_k096v40-1-6-0: var(--dt-colors-text-critical-on-accent-default, #f9f1f3);
|
|
43
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-critical-on-accent-default, #f9f1f3);
|
|
44
|
+
--_k096v42-1-6-0: var(--dt-colors-border-critical-accent, #b80031);
|
|
45
45
|
}
|
|
46
|
-
._k096v4h-1-
|
|
47
|
-
--_k096v40-1-
|
|
48
|
-
--_k096v41-1-
|
|
49
|
-
--_k096v42-1-
|
|
46
|
+
._k096v4h-1-6-0 {
|
|
47
|
+
--_k096v40-1-6-0: var(--dt-colors-text-neutral-on-accent-default, #f3f3f6);
|
|
48
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-neutral-on-accent-default, #f3f3f6);
|
|
49
|
+
--_k096v42-1-6-0: var(--dt-colors-border-neutral-accent, #545587);
|
|
50
50
|
}
|
|
51
|
-
._k096v4i-1-
|
|
52
|
-
--_k096v40-1-
|
|
53
|
-
--_k096v41-1-
|
|
54
|
-
--_k096v42-1-
|
|
51
|
+
._k096v4i-1-6-0 {
|
|
52
|
+
--_k096v40-1-6-0: var(--dt-colors-text-primary-disabled, #54558780);
|
|
53
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-primary-disabled, #54558780);
|
|
54
|
+
--_k096v42-1-6-0: var(--dt-colors-border-primary-disabled, #d2d3e180);
|
|
55
55
|
}
|
|
56
|
-
._k096v4j-1-
|
|
57
|
-
--_k096v40-1-
|
|
58
|
-
--_k096v41-1-
|
|
59
|
-
--_k096v42-1-
|
|
56
|
+
._k096v4j-1-6-0 {
|
|
57
|
+
--_k096v40-1-6-0: var(--dt-colors-text-success-disabled, #54558780);
|
|
58
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-success-disabled, #54558780);
|
|
59
|
+
--_k096v42-1-6-0: var(--dt-colors-border-success-disabled, #d2d3e180);
|
|
60
60
|
}
|
|
61
|
-
._k096v4k-1-
|
|
62
|
-
--_k096v40-1-
|
|
63
|
-
--_k096v41-1-
|
|
64
|
-
--_k096v42-1-
|
|
61
|
+
._k096v4k-1-6-0 {
|
|
62
|
+
--_k096v40-1-6-0: var(--dt-colors-text-warning-disabled, #54558780);
|
|
63
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-warning-disabled, #54558780);
|
|
64
|
+
--_k096v42-1-6-0: var(--dt-colors-border-warning-disabled, #d2d3e180);
|
|
65
65
|
}
|
|
66
|
-
._k096v4l-1-
|
|
67
|
-
--_k096v40-1-
|
|
68
|
-
--_k096v41-1-
|
|
69
|
-
--_k096v42-1-
|
|
66
|
+
._k096v4l-1-6-0 {
|
|
67
|
+
--_k096v40-1-6-0: var(--dt-colors-text-critical-disabled, #54558780);
|
|
68
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-critical-disabled, #54558780);
|
|
69
|
+
--_k096v42-1-6-0: var(--dt-colors-border-critical-disabled, #d2d3e180);
|
|
70
70
|
}
|
|
71
|
-
._k096v4m-1-
|
|
72
|
-
--_k096v40-1-
|
|
73
|
-
--_k096v41-1-
|
|
74
|
-
--_k096v42-1-
|
|
71
|
+
._k096v4m-1-6-0 {
|
|
72
|
+
--_k096v40-1-6-0: var(--dt-colors-text-neutral-disabled, #54558780);
|
|
73
|
+
--_k096v41-1-6-0: var(--dt-colors-icon-neutral-disabled, #54558780);
|
|
74
|
+
--_k096v42-1-6-0: var(--dt-colors-border-neutral-disabled, #d2d3e180);
|
|
75
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./colorUtils.css";
|
|
2
2
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
var colorUtilsCSS = _7a468({ defaultClassName: "_k096v43-1-
|
|
4
|
-
var colorUtilsVars = { text: "var(--_k096v40-1-
|
|
3
|
+
var colorUtilsCSS = _7a468({ defaultClassName: "_k096v43-1-6-0", variantClassNames: { color: { critical: "_k096v44-1-6-0", neutral: "_k096v45-1-6-0", primary: "_k096v46-1-6-0", success: "_k096v47-1-6-0", warning: "_k096v48-1-6-0" }, variant: { "default": "_k096v49-1-6-0", accent: "_k096v4a-1-6-0" }, disabled: { true: "_k096v4b-1-6-0", false: "_k096v4c-1-6-0" } }, defaultVariants: {}, compoundVariants: [[{ color: "primary", variant: "accent" }, "_k096v4d-1-6-0"], [{ color: "success", variant: "accent" }, "_k096v4e-1-6-0"], [{ color: "warning", variant: "accent" }, "_k096v4f-1-6-0"], [{ color: "critical", variant: "accent" }, "_k096v4g-1-6-0"], [{ color: "neutral", variant: "accent" }, "_k096v4h-1-6-0"], [{ color: "primary", disabled: true }, "_k096v4i-1-6-0"], [{ color: "success", disabled: true }, "_k096v4j-1-6-0"], [{ color: "warning", disabled: true }, "_k096v4k-1-6-0"], [{ color: "critical", disabled: true }, "_k096v4l-1-6-0"], [{ color: "neutral", disabled: true }, "_k096v4m-1-6-0"]] });
|
|
4
|
+
var colorUtilsVars = { text: "var(--_k096v40-1-6-0)", icon: "var(--_k096v41-1-6-0)", borderColor: "var(--_k096v42-1-6-0)" };
|
|
5
5
|
export {
|
|
6
6
|
colorUtilsCSS,
|
|
7
7
|
colorUtilsVars
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/utils/colorUtils.css.ts"],
|
|
4
|
-
"sourcesContent": ["import './colorUtils.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var colorUtilsCSS = _7a468({defaultClassName:'_k096v43-1-
|
|
4
|
+
"sourcesContent": ["import './colorUtils.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var colorUtilsCSS = _7a468({defaultClassName:'_k096v43-1-6-0',variantClassNames:{color:{critical:'_k096v44-1-6-0',neutral:'_k096v45-1-6-0',primary:'_k096v46-1-6-0',success:'_k096v47-1-6-0',warning:'_k096v48-1-6-0'},variant:{'default':'_k096v49-1-6-0',accent:'_k096v4a-1-6-0'},disabled:{true:'_k096v4b-1-6-0',false:'_k096v4c-1-6-0'}},defaultVariants:{},compoundVariants:[[{color:'primary',variant:'accent'},'_k096v4d-1-6-0'],[{color:'success',variant:'accent'},'_k096v4e-1-6-0'],[{color:'warning',variant:'accent'},'_k096v4f-1-6-0'],[{color:'critical',variant:'accent'},'_k096v4g-1-6-0'],[{color:'neutral',variant:'accent'},'_k096v4h-1-6-0'],[{color:'primary',disabled:true},'_k096v4i-1-6-0'],[{color:'success',disabled:true},'_k096v4j-1-6-0'],[{color:'warning',disabled:true},'_k096v4k-1-6-0'],[{color:'critical',disabled:true},'_k096v4l-1-6-0'],[{color:'neutral',disabled:true},'_k096v4m-1-6-0']]});\nexport var colorUtilsVars = {text:'var(--_k096v40-1-6-0)',icon:'var(--_k096v41-1-6-0)',borderColor:'var(--_k096v42-1-6-0)'};"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,gBAAgB,OAAO,EAAC,kBAAiB,kBAAiB,mBAAkB,EAAC,OAAM,EAAC,UAAS,kBAAiB,SAAQ,kBAAiB,SAAQ,kBAAiB,SAAQ,kBAAiB,SAAQ,iBAAgB,GAAE,SAAQ,EAAC,WAAU,kBAAiB,QAAO,iBAAgB,GAAE,UAAS,EAAC,MAAK,kBAAiB,OAAM,iBAAgB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,YAAW,SAAQ,SAAQ,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,WAAU,SAAQ,SAAQ,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,WAAU,UAAS,KAAI,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,WAAU,UAAS,KAAI,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,WAAU,UAAS,KAAI,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,YAAW,UAAS,KAAI,GAAE,gBAAgB,GAAE,CAAC,EAAC,OAAM,WAAU,UAAS,KAAI,GAAE,gBAAgB,CAAC,EAAC,CAAC;AACl4B,IAAI,iBAAiB,EAAC,MAAK,yBAAwB,MAAK,yBAAwB,aAAY,wBAAuB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
._f32lcd0-1-
|
|
1
|
+
._f32lcd0-1-6-0 {
|
|
2
2
|
border-style: var(--dt-borders-style-default, solid);
|
|
3
3
|
border-width: var(--dt-borders-width-emphasized, 2px);
|
|
4
4
|
border-radius: var(--dt-borders-radius-container-default, 12px);
|
|
5
|
-
color: var(--_6levse0-1-
|
|
6
|
-
border-color: var(--_6levse2-1-
|
|
7
|
-
background-color: var(--_6levse1-1-
|
|
5
|
+
color: var(--_6levse0-1-6-0);
|
|
6
|
+
border-color: var(--_6levse2-1-6-0);
|
|
7
|
+
background-color: var(--_6levse1-1-6-0);
|
|
8
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import clsx from "clsx";
|
|
2
|
-
import
|
|
3
|
+
import {
|
|
3
4
|
createContext,
|
|
4
5
|
forwardRef,
|
|
5
6
|
useContext,
|
|
@@ -42,7 +43,7 @@ const Container = /* @__PURE__ */ forwardRef(
|
|
|
42
43
|
() => ({ color, variant, default: false }),
|
|
43
44
|
[color, variant]
|
|
44
45
|
);
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ jsx(ContainerColoringContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
46
47
|
Component,
|
|
47
48
|
{
|
|
48
49
|
ref,
|
|
@@ -59,10 +60,10 @@ const Container = /* @__PURE__ */ forwardRef(
|
|
|
59
60
|
"data-testid": dataTestId,
|
|
60
61
|
"data-dtrum-mask": dataDtrumMask,
|
|
61
62
|
"data-dtrum-allow": dataDtrumAllow,
|
|
62
|
-
...sizeRestProps
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
));
|
|
63
|
+
...sizeRestProps,
|
|
64
|
+
children
|
|
65
|
+
}
|
|
66
|
+
) });
|
|
66
67
|
}
|
|
67
68
|
);
|
|
68
69
|
Container.displayName = "Container";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/layouts/container/Container.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport {\n createContext,\n forwardRef,\n useContext,\n useMemo,\n type ElementType,\n type ReactElement,\n} from 'react';\n\nimport { containerCSS } from './Container.sty.js';\nimport type { DataTestId } from '../../core/types/data-props.js';\nimport type { MaskingProps } from '../../core/types/masking-props.js';\nimport type { PolymorphicComponentProps } from '../../core/types/polymorph.js';\nimport type { StylingProps } from '../../core/types/styling-props.js';\nimport type { WithChildren } from '../../core/types/with-children.js';\nimport { containerColorsCSS } from '../../styles/container.sty.js';\nimport {\n _getLayoutSizeStyles as getLayoutSizeStyles,\n _getSpacingSprinkles as getSpacingSprinkles,\n type LayoutSizeProps,\n type SpacingProps,\n} from '../../styles/index.js';\n\n/** @internal */\nexport type ContainerColoring = {\n /**\n * The visual style of the container.\n * @defaultValue 'default'\n */\n variant: 'minimal' | 'default' | 'emphasized' | 'accent';\n /**\n * The color of the container. This should be chosen based on the context\n * the container is used in.\n * @defaultValue 'neutral'\n */\n color: 'primary' | 'neutral' | 'success' | 'warning' | 'critical';\n\n default: boolean;\n};\n\nconst ContainerColoringContext = createContext<ContainerColoring>({\n variant: 'default',\n color: 'neutral',\n default: true,\n});\n\n/**\n * Context used for passing down color and variant information for accent inheritance\n * @internal\n */\nexport const useContainerColoring = () => {\n return useContext(ContainerColoringContext);\n};\n\n/**\n * Accepted properties for Container\n * @public\n */\nexport interface ContainerOwnProps\n extends WithChildren,\n DataTestId,\n StylingProps,\n SpacingProps,\n LayoutSizeProps,\n MaskingProps {\n /**\n * The visual style of the container.\n * @defaultValue 'default'\n */\n variant?: 'minimal' | 'default' | 'emphasized' | 'accent';\n /**\n * The color of the container. This should be chosen based on the context\n * the container is used in.\n * @defaultValue 'neutral'\n */\n color?: 'primary' | 'neutral' | 'success' | 'warning' | 'critical';\n}\n\n/**\n * Merge own props with others inherited from the underlying element type\n * @public\n */\nexport type ContainerProps<E extends ElementType> = PolymorphicComponentProps<\n E,\n ContainerOwnProps\n>;\n\n/**\n * Containers can be used to group content that is related. Additionally, they emphasize and highlight your grouped content.\n * @public\n */\nexport const Container: <E extends ElementType = 'div'>(\n props: ContainerProps<E>,\n) => ReactElement | null = /* @__PURE__ */ forwardRef(\n <E extends ElementType>(\n {\n as,\n children,\n variant = 'default',\n color = 'neutral',\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n ...remainingProps\n }: ContainerProps<E>,\n ref: typeof remainingProps.ref,\n ) => {\n const [spacingClasses, sprinkleRestProps] = getSpacingSprinkles(\n remainingProps,\n { padding: 16 },\n );\n\n const [sizeStyles, sizeRestProps] = getLayoutSizeStyles(sprinkleRestProps);\n\n // Make the component polymorphic\n const Component = as || 'div';\n\n const context = useMemo(\n () => ({ color, variant, default: false }),\n [color, variant],\n );\n\n return (\n <ContainerColoringContext.Provider value={context}>\n <Component\n ref={ref}\n className={clsx(\n containerColorsCSS({ color, variant }),\n containerCSS,\n spacingClasses,\n consumerClassName,\n )}\n style={{\n ...sizeStyles,\n ...consumerStyle,\n }}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n {...sizeRestProps}\n >\n {children}\n </Component>\n </ContainerColoringContext.Provider>\n );\n },\n);\n\n(Container as typeof Container & { displayName: string }).displayName =\n 'Container';\n"],
|
|
5
|
+
"mappings": "AA+HQ;AA/HR,OAAO,UAAU;AACjB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,oBAAoB;AAM7B,SAAS,0BAA0B;AACnC;AAAA,EACE,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,OAGnB;AAmBP,MAAM,2BAA2B,cAAiC;AAAA,EAChE,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX,CAAC;AAMM,MAAM,uBAAuB,MAAM;AACxC,SAAO,WAAW,wBAAwB;AAC5C;AAuCO,MAAM,YAE8B;AAAA,EACzC,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,OAAO;AAAA,IACP,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,CAAC,gBAAgB,iBAAiB,IAAI;AAAA,MAC1C;AAAA,MACA,EAAE,SAAS,GAAG;AAAA,IAChB;AAEA,UAAM,CAAC,YAAY,aAAa,IAAI,oBAAoB,iBAAiB;AAGzE,UAAM,YAAY,MAAM;AAExB,UAAM,UAAU;AAAA,MACd,OAAO,EAAE,OAAO,SAAS,SAAS,MAAM;AAAA,MACxC,CAAC,OAAO,OAAO;AAAA,IACjB;AAEA,WACE,oBAAC,yBAAyB,UAAzB,EAAkC,OAAO,SACxC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT,mBAAmB,EAAE,OAAO,QAAQ,CAAC;AAAA,UACrC;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,UACL,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,QACA,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QACjB,GAAG;AAAA,QAEH;AAAA;AAAA,IACH,GACF;AAAA,EAEJ;AACF;AAEC,UAAyD,cACxD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/layouts/container/Container.css.ts"],
|
|
4
|
-
"sourcesContent": ["import '../../styles/container.css';\nimport './Container.css';\nexport var containerCSS = '_f32lcd0-1-
|
|
4
|
+
"sourcesContent": ["import '../../styles/container.css';\nimport './Container.css';\nexport var containerCSS = '_f32lcd0-1-6-0';"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACP,OAAO;AACA,IAAI,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
._1thxv8m0-1-
|
|
1
|
+
._1thxv8m0-1-6-0 {
|
|
2
2
|
border: none;
|
|
3
3
|
margin: 0;
|
|
4
4
|
overflow-wrap: break-word;
|
|
5
|
-
background-color: var(--_k096v42-1-
|
|
5
|
+
background-color: var(--_k096v42-1-6-0);
|
|
6
6
|
}
|
|
7
|
-
._1thxv8m1-1-
|
|
7
|
+
._1thxv8m1-1-6-0 {
|
|
8
8
|
width: 100%;
|
|
9
9
|
height: var(--dt-borders-width-default, 1px);
|
|
10
10
|
}
|
|
11
|
-
._1thxv8m2-1-
|
|
11
|
+
._1thxv8m2-1-6-0 {
|
|
12
12
|
width: var(--dt-borders-width-default, 1px);
|
|
13
13
|
height: 100%;
|
|
14
14
|
}
|
|
15
|
-
._1thxv8m5-1-
|
|
15
|
+
._1thxv8m5-1-6-0 {
|
|
16
16
|
flex-shrink: 0;
|
|
17
17
|
}
|
|
18
|
-
._1thxv8m6-1-
|
|
18
|
+
._1thxv8m6-1-6-0 {
|
|
19
19
|
flex-shrink: 0;
|
|
20
20
|
width: var(--dt-borders-width-default, 1px);
|
|
21
21
|
height: auto;
|
|
@@ -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 { dividerCSS } from "./Divider.sty.js";
|
|
4
5
|
import { colorUtilsCSS } from "../../core/utils/colorUtils.sty.js";
|
|
5
6
|
const Divider = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
@@ -15,7 +16,7 @@ const Divider = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
15
16
|
...remainingProps
|
|
16
17
|
} = props;
|
|
17
18
|
const DividerTag = as;
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
19
20
|
DividerTag,
|
|
20
21
|
{
|
|
21
22
|
role: "separator",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/layouts/divider/Divider.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { dividerCSS } from './Divider.sty.js';\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { colorUtilsCSS } from '../../core/utils/colorUtils.sty.js';\n\n// #region Typings\n\n/** @public\n * Divider component props.\n */\nexport interface DividerProps extends StylingProps, DataTestId {\n /**\n * Orientation of the Divider component.\n * @defaultValue 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Control the HTML tag used for rendering the Divider.\n * @defaultValue 'div'\n */\n as?: 'hr' | 'div';\n /**\n * Indicate whether the Divider is used inside a Flex component to apply the right styling.\n * If set to false, make sure to have an explicit width/height style set on a parent HTML tag.\n * @defaultValue true\n */\n flexItem?: boolean;\n /**\n * The color of the Divider.\n * @defaultValue 'neutral'\n */\n color?: 'primary' | 'neutral' | 'success' | 'warning' | 'critical';\n /**\n * The visual style of the Divider.\n * @defaultValue 'default'\n */\n variant?: 'default' | 'accent';\n}\n// #endregion\n\n/**\n * The `Divider` component visually separates groups of content.\n * @public\n */\nexport const Divider = /* @__PURE__ */ forwardRef<\n HTMLDivElement | HTMLHRElement,\n DividerProps\n>((props, ref) => {\n const {\n orientation = 'horizontal',\n flexItem = true,\n as = 'div',\n color = 'neutral',\n variant = 'default',\n 'data-testid': dataTestId,\n className: consumerClassName,\n style: consumerStyle,\n ...remainingProps\n } = props;\n\n const DividerTag = as;\n\n return (\n <DividerTag\n role=\"separator\"\n aria-orientation={orientation === 'vertical' ? orientation : undefined}\n // @ts-expect-error ref can't be div and hr here\n ref={ref}\n data-testid={dataTestId}\n className={clsx(\n colorUtilsCSS({ color, variant }),\n dividerCSS({ orientation, flexItem }),\n consumerClassName,\n )}\n style={consumerStyle}\n {...remainingProps}\n />\n );\n});\n\n(Divider as typeof Divider & { displayName: string }).displayName = 'Divider';\n"],
|
|
5
|
+
"mappings": "AAkEI;AAlEJ,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAE3B,SAAS,kBAAkB;AAG3B,SAAS,qBAAqB;AAyCvB,MAAM,UAA0B,2BAGrC,CAAC,OAAO,QAAQ;AAChB,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,WAAW;AAAA,IACX,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,eAAe;AAAA,IACf,WAAW;AAAA,IACX,OAAO;AAAA,IACP,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,aAAa;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,oBAAkB,gBAAgB,aAAa,cAAc;AAAA,MAE7D;AAAA,MACA,eAAa;AAAA,MACb,WAAW;AAAA,QACT,cAAc,EAAE,OAAO,QAAQ,CAAC;AAAA,QAChC,WAAW,EAAE,aAAa,SAAS,CAAC;AAAA,QACpC;AAAA,MACF;AAAA,MACA,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AAEA,QAAqD,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../core/utils/colorUtils.css";
|
|
2
2
|
import "./Divider.css";
|
|
3
3
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4
|
-
var dividerCSS = _7a468({ defaultClassName: "_1thxv8m0-1-
|
|
4
|
+
var dividerCSS = _7a468({ defaultClassName: "_1thxv8m0-1-6-0", variantClassNames: { orientation: { horizontal: "_1thxv8m1-1-6-0", vertical: "_1thxv8m2-1-6-0" }, flexItem: { true: "_1thxv8m3-1-6-0", false: "_1thxv8m4-1-6-0" } }, defaultVariants: {}, compoundVariants: [[{ orientation: "horizontal", flexItem: false }, "_1thxv8m5-1-6-0"], [{ orientation: "vertical", flexItem: true }, "_1thxv8m6-1-6-0"]] });
|
|
5
5
|
export {
|
|
6
6
|
dividerCSS
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/layouts/divider/Divider.css.ts"],
|
|
4
|
-
"sourcesContent": ["import '../../core/utils/colorUtils.css';\nimport './Divider.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var dividerCSS = _7a468({defaultClassName:'_1thxv8m0-1-
|
|
4
|
+
"sourcesContent": ["import '../../core/utils/colorUtils.css';\nimport './Divider.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var dividerCSS = _7a468({defaultClassName:'_1thxv8m0-1-6-0',variantClassNames:{orientation:{horizontal:'_1thxv8m1-1-6-0',vertical:'_1thxv8m2-1-6-0'},flexItem:{true:'_1thxv8m3-1-6-0',false:'_1thxv8m4-1-6-0'}},defaultVariants:{},compoundVariants:[[{orientation:'horizontal',flexItem:false},'_1thxv8m5-1-6-0'],[{orientation:'vertical',flexItem:true},'_1thxv8m6-1-6-0']]});"],
|
|
5
5
|
"mappings": "AAAA,OAAO;AACP,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,aAAa,OAAO,EAAC,kBAAiB,mBAAkB,mBAAkB,EAAC,aAAY,EAAC,YAAW,mBAAkB,UAAS,kBAAiB,GAAE,UAAS,EAAC,MAAK,mBAAkB,OAAM,kBAAiB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,CAAC,EAAC,aAAY,cAAa,UAAS,MAAK,GAAE,iBAAiB,GAAE,CAAC,EAAC,aAAY,YAAW,UAAS,KAAI,GAAE,iBAAiB,CAAC,EAAC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/esm/layouts/flex/Flex.js
CHANGED
|
@@ -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 {
|
|
4
5
|
getFlexStyles
|
|
5
6
|
} from "../../styles/getFlexStyles.js";
|
|
@@ -21,7 +22,7 @@ const Flex = /* @__PURE__ */ forwardRef(
|
|
|
21
22
|
{ gap: 8 }
|
|
22
23
|
);
|
|
23
24
|
const Component = as ?? "div";
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
25
26
|
Component,
|
|
26
27
|
{
|
|
27
28
|
ref: forwardedRef,
|
|
@@ -34,9 +35,9 @@ const Flex = /* @__PURE__ */ forwardRef(
|
|
|
34
35
|
...flexStyles,
|
|
35
36
|
...consumerStyle
|
|
36
37
|
},
|
|
37
|
-
...nonFlexStyleProps
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
...nonFlexStyleProps,
|
|
39
|
+
children
|
|
40
|
+
}
|
|
40
41
|
);
|
|
41
42
|
}
|
|
42
43
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/layouts/flex/Flex.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { type ElementType, type ReactElement, forwardRef } from 'react';\n\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type MaskingProps } from '../../core/types/masking-props.js';\nimport { type PolymorphicComponentProps } from '../../core/types/polymorph.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { type WithChildren } from '../../core/types/with-children.js';\nimport {\n getFlexStyles,\n type FlexStyleProps,\n} from '../../styles/getFlexStyles.js';\n\n/**\n * Flex own props.\n * @public\n */\nexport type FlexOwnProps = WithChildren &\n StylingProps &\n FlexStyleProps &\n DataTestId &\n MaskingProps;\n\n/**\n * Merge own props with others inherited from the underlying element type.\n * @public\n */\nexport type FlexProps<E extends ElementType> = PolymorphicComponentProps<\n E,\n FlexOwnProps\n>;\n\n/**\n * The `Flex` component can be used to layout its children with Flexbox.\n * The component can be customized with flexbox props.\n * @public\n */\nexport const Flex: <E extends ElementType = 'div'>(\n props: FlexProps<E>,\n) => ReactElement | null = /* @__PURE__ */ forwardRef(\n <E extends ElementType>(\n props: FlexProps<E>,\n forwardedRef: typeof props.ref,\n ) => {\n const {\n children,\n id,\n as,\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n ...remainingProps\n } = props;\n\n const [flexClassNames, flexStyles, nonFlexStyleProps] = getFlexStyles(\n remainingProps,\n { gap: 8 },\n );\n\n const Component = as ?? 'div';\n\n return (\n <Component\n ref={forwardedRef}\n id={id}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n className={clsx(flexClassNames, consumerClassName)}\n style={{\n ...flexStyles,\n ...consumerStyle,\n }}\n {...nonFlexStyleProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": "AAgEM;AAhEN,OAAO,UAAU;AACjB,SAA8C,kBAAkB;AAOhE;AAAA,EACE;AAAA,OAEK;AA0BA,MAAM,OAE8B;AAAA,EACzC,CACE,OACA,iBACG;AACH,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX,OAAO;AAAA,MACP,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,GAAG;AAAA,IACL,IAAI;AAEJ,UAAM,CAAC,gBAAgB,YAAY,iBAAiB,IAAI;AAAA,MACtD;AAAA,MACA,EAAE,KAAK,EAAE;AAAA,IACX;AAEA,UAAM,YAAY,MAAM;AAExB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL;AAAA,QACA,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB,WAAW,KAAK,gBAAgB,iBAAiB;AAAA,QACjD,OAAO;AAAA,UACL,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/esm/layouts/grid/Grid.js
CHANGED
|
@@ -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 {
|
|
4
5
|
getGridStyles
|
|
5
6
|
} from "../../styles/getGridStyles.js";
|
|
@@ -21,7 +22,7 @@ const Grid = /* @__PURE__ */ forwardRef(
|
|
|
21
22
|
{ gap: 8 }
|
|
22
23
|
);
|
|
23
24
|
const Component = as ?? "div";
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
25
26
|
Component,
|
|
26
27
|
{
|
|
27
28
|
ref: forwardedRef,
|
|
@@ -34,9 +35,9 @@ const Grid = /* @__PURE__ */ forwardRef(
|
|
|
34
35
|
...gridStyles,
|
|
35
36
|
...consumerStyle
|
|
36
37
|
},
|
|
37
|
-
...nonGridStyleProps
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
...nonGridStyleProps,
|
|
39
|
+
children
|
|
40
|
+
}
|
|
40
41
|
);
|
|
41
42
|
}
|
|
42
43
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/layouts/grid/Grid.tsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import clsx from 'clsx';\nimport { type ElementType, type ReactElement, forwardRef } from 'react';\n\nimport { type DataTestId } from '../../core/types/data-props.js';\nimport { type MaskingProps } from '../../core/types/masking-props.js';\nimport { type PolymorphicComponentProps } from '../../core/types/polymorph.js';\nimport { type StylingProps } from '../../core/types/styling-props.js';\nimport { type WithChildren } from '../../core/types/with-children.js';\nimport {\n type GridStyleProps,\n getGridStyles,\n} from '../../styles/getGridStyles.js';\n\n/**\n * Defines grid own props.\n * @public\n */\nexport type GridOwnProps = WithChildren &\n StylingProps &\n GridStyleProps &\n DataTestId &\n MaskingProps;\n\n/**\n * Merge own props with others inherited from the underlying element type.\n * @public\n */\nexport type GridProps<E extends ElementType> = PolymorphicComponentProps<\n E,\n GridOwnProps\n>;\n\n/**\n * The `Grid` component can be used to layout its children with the help of CSS Grid.\n * The component can be customized with CSS grid props.\n * @public\n */\nexport const Grid: <E extends ElementType = 'div'>(\n props: GridProps<E>,\n) => ReactElement | null = /* @__PURE__ */ forwardRef(\n <E extends ElementType>(\n props: GridProps<E>,\n forwardedRef: typeof props.ref,\n ) => {\n const {\n children,\n id,\n as = 'div',\n className: consumerClassName,\n style: consumerStyle,\n 'data-testid': dataTestId,\n 'data-dtrum-mask': dataDtrumMask,\n 'data-dtrum-allow': dataDtrumAllow,\n ...remainingProps\n } = props;\n\n const [gridClassNames, gridStyles, nonGridStyleProps] = getGridStyles(\n remainingProps,\n { gap: 8 },\n );\n\n const Component = as ?? 'div';\n\n return (\n <Component\n ref={forwardedRef}\n data-testid={dataTestId}\n data-dtrum-mask={dataDtrumMask}\n data-dtrum-allow={dataDtrumAllow}\n id={id}\n className={clsx(gridClassNames, consumerClassName)}\n style={{\n ...gridStyles,\n ...consumerStyle,\n }}\n {...nonGridStyleProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],
|
|
5
|
+
"mappings": "AAgEM;AAhEN,OAAO,UAAU;AACjB,SAA8C,kBAAkB;AAOhE;AAAA,EAEE;AAAA,OACK;AA0BA,MAAM,OAE8B;AAAA,EACzC,CACE,OACA,iBACG;AACH,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL,WAAW;AAAA,MACX,OAAO;AAAA,MACP,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,GAAG;AAAA,IACL,IAAI;AAEJ,UAAM,CAAC,gBAAgB,YAAY,iBAAiB,IAAI;AAAA,MACtD;AAAA,MACA,EAAE,KAAK,EAAE;AAAA,IACX;AAEA,UAAM,YAAY,MAAM;AAExB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,eAAa;AAAA,QACb,mBAAiB;AAAA,QACjB,oBAAkB;AAAA,QAClB;AAAA,QACA,WAAW,KAAK,gBAAgB,iBAAiB;AAAA,QACjD,OAAO;AAAA,UACL,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|