@metamask-previews/design-system-react-native 0.26.0-preview.047f96c → 0.27.0-preview.a0fe3894
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/CHANGELOG.md +24 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +3 -0
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.mjs +3 -0
- package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +2 -6
- package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.d.cts.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.d.mts.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +2 -6
- package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs +0 -11
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts +6 -20
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts +6 -20
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs +1 -10
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs.map +1 -1
- package/dist/components/BottomSheetHeader/index.cjs +1 -3
- package/dist/components/BottomSheetHeader/index.cjs.map +1 -1
- package/dist/components/BottomSheetHeader/index.d.cts +0 -1
- package/dist/components/BottomSheetHeader/index.d.cts.map +1 -1
- package/dist/components/BottomSheetHeader/index.d.mts +0 -1
- package/dist/components/BottomSheetHeader/index.d.mts.map +1 -1
- package/dist/components/BottomSheetHeader/index.mjs +0 -1
- package/dist/components/BottomSheetHeader/index.mjs.map +1 -1
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs +1 -1
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs.map +1 -1
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.cts.map +1 -1
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.mts.map +1 -1
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs +3 -3
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs.map +1 -1
- package/dist/components/Content/Content.cjs +71 -0
- package/dist/components/Content/Content.cjs.map +1 -0
- package/dist/components/Content/Content.constants.cjs +9 -0
- package/dist/components/Content/Content.constants.cjs.map +1 -0
- package/dist/components/Content/Content.constants.d.cts +3 -0
- package/dist/components/Content/Content.constants.d.cts.map +1 -0
- package/dist/components/Content/Content.constants.d.mts +3 -0
- package/dist/components/Content/Content.constants.d.mts.map +1 -0
- package/dist/components/Content/Content.constants.mjs +6 -0
- package/dist/components/Content/Content.constants.mjs.map +1 -0
- package/dist/components/Content/Content.d.cts +4 -0
- package/dist/components/Content/Content.d.cts.map +1 -0
- package/dist/components/Content/Content.d.mts +4 -0
- package/dist/components/Content/Content.d.mts.map +1 -0
- package/dist/components/Content/Content.mjs +71 -0
- package/dist/components/Content/Content.mjs.map +1 -0
- package/dist/components/Content/Content.types.cjs +3 -0
- package/dist/components/Content/Content.types.cjs.map +1 -0
- package/dist/components/Content/Content.types.d.cts +31 -0
- package/dist/components/Content/Content.types.d.cts.map +1 -0
- package/dist/components/Content/Content.types.d.mts +31 -0
- package/dist/components/Content/Content.types.d.mts.map +1 -0
- package/dist/components/Content/Content.types.mjs +2 -0
- package/dist/components/Content/Content.types.mjs.map +1 -0
- package/dist/components/Content/index.cjs +8 -0
- package/dist/components/Content/index.cjs.map +1 -0
- package/dist/components/Content/index.d.cts +4 -0
- package/dist/components/Content/index.d.cts.map +1 -0
- package/dist/components/Content/index.d.mts +4 -0
- package/dist/components/Content/index.d.mts.map +1 -0
- package/dist/components/Content/index.mjs +3 -0
- package/dist/components/Content/index.mjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.cjs +93 -72
- package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.d.cts.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.d.mts.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.mjs +93 -72
- package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.types.cjs +0 -12
- package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.types.d.cts +11 -19
- package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.types.d.mts +11 -19
- package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.types.mjs +1 -11
- package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -1
- package/dist/components/HeaderBase/index.cjs +1 -3
- package/dist/components/HeaderBase/index.cjs.map +1 -1
- package/dist/components/HeaderBase/index.d.cts +0 -1
- package/dist/components/HeaderBase/index.d.cts.map +1 -1
- package/dist/components/HeaderBase/index.d.mts +0 -1
- package/dist/components/HeaderBase/index.d.mts.map +1 -1
- package/dist/components/HeaderBase/index.mjs +0 -1
- package/dist/components/HeaderBase/index.mjs.map +1 -1
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs +4 -12
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs.map +1 -1
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts +0 -8
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts.map +1 -1
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts +0 -8
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts.map +1 -1
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs +3 -10
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs.map +1 -1
- package/dist/components/Icon/Icon.assets.cjs +2 -0
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +2 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/Icon.cjs +3 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.cts.map +1 -1
- package/dist/components/Icon/Icon.d.mts.map +1 -1
- package/dist/components/Icon/Icon.mjs +3 -1
- package/dist/components/Icon/Icon.mjs.map +1 -1
- package/dist/components/Icon/assets/flash-filled.svg +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.cjs +4 -6
- package/dist/components/SegmentGroup/SegmentGroup.cjs.map +1 -1
- package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +1 -1
- package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +1 -1
- package/dist/components/SegmentGroup/SegmentGroup.mjs +5 -7
- package/dist/components/SegmentGroup/SegmentGroup.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.cts +2 -2
- package/dist/components/TextArea/TextArea.d.mts +2 -2
- package/dist/components/TextField/TextField.d.cts +2 -2
- package/dist/components/TextField/TextField.d.mts +2 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +2 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +2 -2
- package/dist/components/Toast/Toast.constants.cjs +4 -7
- package/dist/components/Toast/Toast.constants.cjs.map +1 -1
- package/dist/components/Toast/Toast.constants.d.cts +1 -6
- package/dist/components/Toast/Toast.constants.d.cts.map +1 -1
- package/dist/components/Toast/Toast.constants.d.mts +1 -6
- package/dist/components/Toast/Toast.constants.d.mts.map +1 -1
- package/dist/components/Toast/Toast.constants.mjs +1 -6
- package/dist/components/Toast/Toast.constants.mjs.map +1 -1
- package/dist/components/Toast/Toast.types.cjs +2 -10
- package/dist/components/Toast/Toast.types.cjs.map +1 -1
- package/dist/components/Toast/Toast.types.d.cts +4 -11
- package/dist/components/Toast/Toast.types.d.cts.map +1 -1
- package/dist/components/Toast/Toast.types.d.mts +4 -11
- package/dist/components/Toast/Toast.types.d.mts.map +1 -1
- package/dist/components/Toast/Toast.types.mjs +2 -10
- package/dist/components/Toast/Toast.types.mjs.map +1 -1
- package/dist/components/Toast/index.cjs +3 -5
- package/dist/components/Toast/index.cjs.map +1 -1
- package/dist/components/Toast/index.d.cts +2 -2
- package/dist/components/Toast/index.d.cts.map +1 -1
- package/dist/components/Toast/index.d.mts +2 -2
- package/dist/components/Toast/index.d.mts.map +1 -1
- package/dist/components/Toast/index.mjs +2 -2
- package/dist/components/Toast/index.mjs.map +1 -1
- package/dist/components/index.cjs +5 -4
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +4 -2
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +4 -2
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +3 -2
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
- package/dist/components/temp-components/Spinner/Spinner.cjs +1 -1
- package/dist/components/temp-components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/temp-components/Spinner/Spinner.mjs +1 -1
- package/dist/components/temp-components/Spinner/Spinner.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs +0 -15
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs.map +0 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts +0 -7
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts.map +0 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts +0 -7
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts.map +0 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs +0 -12
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs.map +0 -1
- package/dist/components/HeaderBase/HeaderBase.constants.cjs +0 -15
- package/dist/components/HeaderBase/HeaderBase.constants.cjs.map +0 -1
- package/dist/components/HeaderBase/HeaderBase.constants.d.cts +0 -7
- package/dist/components/HeaderBase/HeaderBase.constants.d.cts.map +0 -1
- package/dist/components/HeaderBase/HeaderBase.constants.d.mts +0 -7
- package/dist/components/HeaderBase/HeaderBase.constants.d.mts.map +0 -1
- package/dist/components/HeaderBase/HeaderBase.constants.mjs +0 -12
- package/dist/components/HeaderBase/HeaderBase.constants.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.cjs","sourceRoot":"","sources":["../../../../src/components/temp-components/Spinner/Spinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAyC;AACzC,+CAAoC;AACpC,mFAMiC;AAGjC,+C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AAM,CAAC,uBAAuB,CACnE;QAAA,CAAC,WAAI,CAAC,IAAI,qBAAqB,CAAC,EAClC;MAAA,EAAE,iCAAQ,CAAC,IAAI,CACf;MAAA,CAAC,WAAW,IAAI,CAAC,WAAI,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,WAAI,CAAC,CACvE;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAtDW,QAAA,OAAO,WAsDlB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect } from 'react';\nimport { View } from 'react-native';\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withRepeat,\n withTiming,\n Easing,\n} from 'react-native-reanimated';\n\nimport type { IconProps } from '../../Icon';\nimport { Icon, IconColor, IconName, IconSize } from '../../Icon';\nimport type { TextProps } from '../../Text';\nimport { Text, TextVariant, TextColor } from '../../Text';\n\nimport type { SpinnerProps } from './Spinner.types';\n\nexport const Spinner = ({\n color = IconColor.IconDefault,\n spinnerIconProps,\n loadingText,\n loadingTextProps,\n twClassName,\n style,\n ...props\n}: SpinnerProps) => {\n const tw = useTailwind();\n\n // Create a shared value for rotation\n const rotation = useSharedValue(0);\n\n // Start the animation when the component mounts\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, { duration: 1000, easing: Easing.linear }), // Complete a full spin in 1 second\n -1, // Infinite repetitions\n false, // Do not reverse the animation\n );\n }, []);\n\n // Define the animated style\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ rotate: `${rotation.value % 360}deg` }],\n }), []);\n\n const finalSpinnerIconProps: IconProps = {\n size: IconSize.Md,\n name: IconName.Loading,\n testID: 'spinner-icon',\n color,\n ...spinnerIconProps,\n };\n\n const finalLoadingTextProps: Partial<TextProps> = {\n variant: TextVariant.BodyMd,\n color: TextColor.TextDefault,\n testID: 'spinner-text',\n ...loadingTextProps,\n };\n\n return (\n <View\n {...props}\n style={[tw.style('flex-row items-center gap-x-2', twClassName), style]}\n >\n <Animated.View style={[animatedStyle]} testID=\"spinner-animated-view\">\n <Icon {...finalSpinnerIconProps} />\n </Animated.View>\n {loadingText && <Text {...finalLoadingTextProps}>{loadingText}</Text>}\n </View>\n );\n};\n"]}
|
|
@@ -24,7 +24,7 @@ export const Spinner = ({ color = IconColor.IconDefault, spinnerIconProps, loadi
|
|
|
24
24
|
// Define the animated style
|
|
25
25
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
26
26
|
transform: [{ rotate: `${rotation.value % 360}deg` }],
|
|
27
|
-
}));
|
|
27
|
+
}), []);
|
|
28
28
|
const finalSpinnerIconProps = {
|
|
29
29
|
size: IconSize.Md,
|
|
30
30
|
name: IconName.Loading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.mjs","sourceRoot":"","sources":["../../../../src/components/temp-components/Spinner/Spinner.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,SAAS,EAAE,cAAc;;AACzC,OAAO,EAAE,IAAI,EAAE,qBAAqB;AACpC,OAAO,QAAQ,EAAE,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,MAAM,EACP,gCAAgC;AAGjC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,6BAAmB;AAEjE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,6BAAmB;AAI1D,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACtB,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACK,EAAE,EAAE;IACjB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,qCAAqC;IACrC,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;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I,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CACvE;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect } from 'react';\nimport { View } from 'react-native';\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withRepeat,\n withTiming,\n Easing,\n} from 'react-native-reanimated';\n\nimport type { IconProps } from '../../Icon';\nimport { Icon, IconColor, IconName, IconSize } from '../../Icon';\nimport type { TextProps } from '../../Text';\nimport { Text, TextVariant, TextColor } from '../../Text';\n\nimport type { SpinnerProps } from './Spinner.types';\n\nexport const Spinner = ({\n color = IconColor.IconDefault,\n spinnerIconProps,\n loadingText,\n loadingTextProps,\n twClassName,\n style,\n ...props\n}: SpinnerProps) => {\n const tw = useTailwind();\n\n // Create a shared value for rotation\n const rotation = useSharedValue(0);\n\n // Start the animation when the component mounts\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, { duration: 1000, easing: Easing.linear }), // Complete a full spin in 1 second\n -1, // Infinite repetitions\n false, // Do not reverse the animation\n );\n }, []);\n\n // Define the animated style\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ rotate: `${rotation.value % 360}deg` }],\n }), []);\n\n const finalSpinnerIconProps: IconProps = {\n size: IconSize.Md,\n name: IconName.Loading,\n testID: 'spinner-icon',\n color,\n ...spinnerIconProps,\n };\n\n const finalLoadingTextProps: Partial<TextProps> = {\n variant: TextVariant.BodyMd,\n color: TextColor.TextDefault,\n testID: 'spinner-text',\n ...loadingTextProps,\n };\n\n return (\n <View\n {...props}\n style={[tw.style('flex-row items-center gap-x-2', twClassName), style]}\n >\n <Animated.View style={[animatedStyle]} testID=\"spinner-animated-view\">\n <Icon {...finalSpinnerIconProps} />\n </Animated.View>\n {loadingText && <Text {...finalLoadingTextProps}>{loadingText}</Text>}\n </View>\n );\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/design-system-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0-preview.a0fe3894",
|
|
4
4
|
"description": "Design System React Native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@metamask-previews/design-system-shared": "0.
|
|
50
|
+
"@metamask-previews/design-system-shared": "0.20.0-preview.a0fe3894",
|
|
51
51
|
"fast-text-encoding": "^1.0.6",
|
|
52
52
|
"react-native-jazzicon": "^0.1.2"
|
|
53
53
|
},
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@babel/preset-react": "^7.25.9",
|
|
58
58
|
"@babel/preset-typescript": "^7.23.3",
|
|
59
59
|
"@figma/code-connect": "^1.0.0",
|
|
60
|
-
"@metamask-previews/design-system-twrnc-preset": "0.4.2-preview.
|
|
61
|
-
"@metamask-previews/design-tokens": "8.4.0-preview.
|
|
60
|
+
"@metamask-previews/design-system-twrnc-preset": "0.4.2-preview.a0fe3894",
|
|
61
|
+
"@metamask-previews/design-tokens": "8.4.0-preview.a0fe3894",
|
|
62
62
|
"@metamask/auto-changelog": "^6.1.1",
|
|
63
63
|
"@metamask/utils": "^11.11.0",
|
|
64
64
|
"@react-native/babel-preset": "0.81.5",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BOTTOM_SHEET_HEADER_VARIANT_MAP = void 0;
|
|
4
|
-
// External dependencies.
|
|
5
|
-
const HeaderBase_types_1 = require("../HeaderBase/HeaderBase.types.cjs");
|
|
6
|
-
// Internal dependencies.
|
|
7
|
-
const BottomSheetHeader_types_1 = require("./BottomSheetHeader.types.cjs");
|
|
8
|
-
/**
|
|
9
|
-
* Maps BottomSheetHeaderVariant to HeaderBaseVariant.
|
|
10
|
-
*/
|
|
11
|
-
exports.BOTTOM_SHEET_HEADER_VARIANT_MAP = {
|
|
12
|
-
[BottomSheetHeader_types_1.BottomSheetHeaderVariant.Display]: HeaderBase_types_1.HeaderBaseVariant.Display,
|
|
13
|
-
[BottomSheetHeader_types_1.BottomSheetHeaderVariant.Compact]: HeaderBase_types_1.HeaderBaseVariant.Compact,
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=BottomSheetHeader.constants.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetHeader.constants.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/BottomSheetHeader.constants.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,yEAAmE;AAEnE,yBAAyB;AACzB,2EAAqE;AAErE;;GAEG;AACU,QAAA,+BAA+B,GAGxC;IACF,CAAC,kDAAwB,CAAC,OAAO,CAAC,EAAE,oCAAiB,CAAC,OAAO;IAC7D,CAAC,kDAAwB,CAAC,OAAO,CAAC,EAAE,oCAAiB,CAAC,OAAO;CAC9D,CAAC","sourcesContent":["// External dependencies.\nimport { HeaderBaseVariant } from '../HeaderBase/HeaderBase.types';\n\n// Internal dependencies.\nimport { BottomSheetHeaderVariant } from './BottomSheetHeader.types';\n\n/**\n * Maps BottomSheetHeaderVariant to HeaderBaseVariant.\n */\nexport const BOTTOM_SHEET_HEADER_VARIANT_MAP: Record<\n BottomSheetHeaderVariant,\n HeaderBaseVariant\n> = {\n [BottomSheetHeaderVariant.Display]: HeaderBaseVariant.Display,\n [BottomSheetHeaderVariant.Compact]: HeaderBaseVariant.Compact,\n};\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HeaderBaseVariant } from "../HeaderBase/HeaderBase.types.cjs";
|
|
2
|
-
import { BottomSheetHeaderVariant } from "./BottomSheetHeader.types.cjs";
|
|
3
|
-
/**
|
|
4
|
-
* Maps BottomSheetHeaderVariant to HeaderBaseVariant.
|
|
5
|
-
*/
|
|
6
|
-
export declare const BOTTOM_SHEET_HEADER_VARIANT_MAP: Record<BottomSheetHeaderVariant, HeaderBaseVariant>;
|
|
7
|
-
//# sourceMappingURL=BottomSheetHeader.constants.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetHeader.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/BottomSheetHeader.constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,2CAAuC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,sCAAkC;AAErE;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAClD,wBAAwB,EACxB,iBAAiB,CAIlB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HeaderBaseVariant } from "../HeaderBase/HeaderBase.types.mjs";
|
|
2
|
-
import { BottomSheetHeaderVariant } from "./BottomSheetHeader.types.mjs";
|
|
3
|
-
/**
|
|
4
|
-
* Maps BottomSheetHeaderVariant to HeaderBaseVariant.
|
|
5
|
-
*/
|
|
6
|
-
export declare const BOTTOM_SHEET_HEADER_VARIANT_MAP: Record<BottomSheetHeaderVariant, HeaderBaseVariant>;
|
|
7
|
-
//# sourceMappingURL=BottomSheetHeader.constants.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetHeader.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/BottomSheetHeader.constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,2CAAuC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,sCAAkC;AAErE;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAClD,wBAAwB,EACxB,iBAAiB,CAIlB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// External dependencies.
|
|
2
|
-
import { HeaderBaseVariant } from "../HeaderBase/HeaderBase.types.mjs";
|
|
3
|
-
// Internal dependencies.
|
|
4
|
-
import { BottomSheetHeaderVariant } from "./BottomSheetHeader.types.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Maps BottomSheetHeaderVariant to HeaderBaseVariant.
|
|
7
|
-
*/
|
|
8
|
-
export const BOTTOM_SHEET_HEADER_VARIANT_MAP = {
|
|
9
|
-
[BottomSheetHeaderVariant.Display]: HeaderBaseVariant.Display,
|
|
10
|
-
[BottomSheetHeaderVariant.Compact]: HeaderBaseVariant.Compact,
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=BottomSheetHeader.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetHeader.constants.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/BottomSheetHeader.constants.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,iBAAiB,EAAE,2CAAuC;AAEnE,yBAAyB;AACzB,OAAO,EAAE,wBAAwB,EAAE,sCAAkC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAGxC;IACF,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO;IAC7D,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO;CAC9D,CAAC","sourcesContent":["// External dependencies.\nimport { HeaderBaseVariant } from '../HeaderBase/HeaderBase.types';\n\n// Internal dependencies.\nimport { BottomSheetHeaderVariant } from './BottomSheetHeader.types';\n\n/**\n * Maps BottomSheetHeaderVariant to HeaderBaseVariant.\n */\nexport const BOTTOM_SHEET_HEADER_VARIANT_MAP: Record<\n BottomSheetHeaderVariant,\n HeaderBaseVariant\n> = {\n [BottomSheetHeaderVariant.Display]: HeaderBaseVariant.Display,\n [BottomSheetHeaderVariant.Compact]: HeaderBaseVariant.Compact,\n};\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HEADERBASE_VARIANT_TEXT_VARIANTS = void 0;
|
|
4
|
-
// External dependencies.
|
|
5
|
-
const Text_1 = require("../Text/index.cjs");
|
|
6
|
-
// Internal dependencies.
|
|
7
|
-
const HeaderBase_types_1 = require("./HeaderBase.types.cjs");
|
|
8
|
-
/**
|
|
9
|
-
* Text variant mapping based on HeaderBase variant.
|
|
10
|
-
*/
|
|
11
|
-
exports.HEADERBASE_VARIANT_TEXT_VARIANTS = {
|
|
12
|
-
[HeaderBase_types_1.HeaderBaseVariant.Compact]: Text_1.TextVariant.HeadingSm,
|
|
13
|
-
[HeaderBase_types_1.HeaderBaseVariant.Display]: Text_1.TextVariant.HeadingLg,
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=HeaderBase.constants.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderBase.constants.cjs","sourceRoot":"","sources":["../../../src/components/HeaderBase/HeaderBase.constants.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,4CAAsC;AAEtC,yBAAyB;AACzB,6DAAuD;AAEvD;;GAEG;AACU,QAAA,gCAAgC,GAGzC;IACF,CAAC,oCAAiB,CAAC,OAAO,CAAC,EAAE,kBAAW,CAAC,SAAS;IAClD,CAAC,oCAAiB,CAAC,OAAO,CAAC,EAAE,kBAAW,CAAC,SAAS;CACnD,CAAC","sourcesContent":["// External dependencies.\nimport { TextVariant } from '../Text';\n\n// Internal dependencies.\nimport { HeaderBaseVariant } from './HeaderBase.types';\n\n/**\n * Text variant mapping based on HeaderBase variant.\n */\nexport const HEADERBASE_VARIANT_TEXT_VARIANTS: Record<\n HeaderBaseVariant,\n TextVariant\n> = {\n [HeaderBaseVariant.Compact]: TextVariant.HeadingSm,\n [HeaderBaseVariant.Display]: TextVariant.HeadingLg,\n};\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TextVariant } from "../Text/index.cjs";
|
|
2
|
-
import { HeaderBaseVariant } from "./HeaderBase.types.cjs";
|
|
3
|
-
/**
|
|
4
|
-
* Text variant mapping based on HeaderBase variant.
|
|
5
|
-
*/
|
|
6
|
-
export declare const HEADERBASE_VARIANT_TEXT_VARIANTS: Record<HeaderBaseVariant, TextVariant>;
|
|
7
|
-
//# sourceMappingURL=HeaderBase.constants.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderBase.constants.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderBase/HeaderBase.constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAGtC,OAAO,EAAE,iBAAiB,EAAE,+BAA2B;AAEvD;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,MAAM,CACnD,iBAAiB,EACjB,WAAW,CAIZ,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TextVariant } from "../Text/index.mjs";
|
|
2
|
-
import { HeaderBaseVariant } from "./HeaderBase.types.mjs";
|
|
3
|
-
/**
|
|
4
|
-
* Text variant mapping based on HeaderBase variant.
|
|
5
|
-
*/
|
|
6
|
-
export declare const HEADERBASE_VARIANT_TEXT_VARIANTS: Record<HeaderBaseVariant, TextVariant>;
|
|
7
|
-
//# sourceMappingURL=HeaderBase.constants.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderBase.constants.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderBase/HeaderBase.constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAGtC,OAAO,EAAE,iBAAiB,EAAE,+BAA2B;AAEvD;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,MAAM,CACnD,iBAAiB,EACjB,WAAW,CAIZ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// External dependencies.
|
|
2
|
-
import { TextVariant } from "../Text/index.mjs";
|
|
3
|
-
// Internal dependencies.
|
|
4
|
-
import { HeaderBaseVariant } from "./HeaderBase.types.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Text variant mapping based on HeaderBase variant.
|
|
7
|
-
*/
|
|
8
|
-
export const HEADERBASE_VARIANT_TEXT_VARIANTS = {
|
|
9
|
-
[HeaderBaseVariant.Compact]: TextVariant.HeadingSm,
|
|
10
|
-
[HeaderBaseVariant.Display]: TextVariant.HeadingLg,
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=HeaderBase.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderBase.constants.mjs","sourceRoot":"","sources":["../../../src/components/HeaderBase/HeaderBase.constants.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAEtC,yBAAyB;AACzB,OAAO,EAAE,iBAAiB,EAAE,+BAA2B;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAGzC;IACF,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS;IAClD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS;CACnD,CAAC","sourcesContent":["// External dependencies.\nimport { TextVariant } from '../Text';\n\n// Internal dependencies.\nimport { HeaderBaseVariant } from './HeaderBase.types';\n\n/**\n * Text variant mapping based on HeaderBase variant.\n */\nexport const HEADERBASE_VARIANT_TEXT_VARIANTS: Record<\n HeaderBaseVariant,\n TextVariant\n> = {\n [HeaderBaseVariant.Compact]: TextVariant.HeadingSm,\n [HeaderBaseVariant.Display]: TextVariant.HeadingLg,\n};\n"]}
|