@metamask-previews/design-system-react-native 0.52.0-preview.3026400c → 0.56.0-preview.12867efa
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 +65 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +7 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs +7 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +11 -3
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs +12 -4
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +11 -3
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +12 -4
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.cjs +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.d.cts +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.d.mts +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.mjs +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -1
- package/dist/components/Icon/Icon.assets.cjs +36 -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 +36 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/assets/baseball.svg +1 -0
- package/dist/components/Icon/assets/basketball.svg +1 -0
- package/dist/components/Icon/assets/bicycle.svg +1 -0
- package/dist/components/Icon/assets/boxing-glove.svg +1 -0
- package/dist/components/Icon/assets/cricket.svg +1 -0
- package/dist/components/Icon/assets/feed-post.svg +1 -0
- package/dist/components/Icon/assets/flag-checkered.svg +1 -0
- package/dist/components/Icon/assets/football.svg +1 -0
- package/dist/components/Icon/assets/game-controller.svg +1 -0
- package/dist/components/Icon/assets/golf.svg +1 -0
- package/dist/components/Icon/assets/hockey.svg +1 -0
- package/dist/components/Icon/assets/horse.svg +1 -0
- package/dist/components/Icon/assets/medal.svg +1 -0
- package/dist/components/Icon/assets/pause.svg +1 -0
- package/dist/components/Icon/assets/ping-pong.svg +1 -0
- package/dist/components/Icon/assets/play.svg +1 -0
- package/dist/components/Icon/assets/soccer-ball.svg +1 -0
- package/dist/components/Icon/assets/tennis-ball.svg +1 -0
- package/dist/components/IconAlert/IconAlert.constants.cjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.cjs +2 -2
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.mjs +2 -2
- package/dist/components/RadioButton/RadioButton.mjs.map +1 -1
- package/dist/components/Slider/Slider.constants.cjs +6 -5
- package/dist/components/Slider/Slider.constants.cjs.map +1 -1
- package/dist/components/Slider/Slider.constants.d.cts +6 -5
- package/dist/components/Slider/Slider.constants.d.cts.map +1 -1
- package/dist/components/Slider/Slider.constants.d.mts +6 -5
- package/dist/components/Slider/Slider.constants.d.mts.map +1 -1
- package/dist/components/Slider/Slider.constants.mjs +6 -5
- package/dist/components/Slider/Slider.constants.mjs.map +1 -1
- package/dist/components/Slider/Slider.types.cjs.map +1 -1
- package/dist/components/Slider/Slider.types.d.cts +5 -4
- package/dist/components/Slider/Slider.types.d.cts.map +1 -1
- package/dist/components/Slider/Slider.types.d.mts +5 -4
- package/dist/components/Slider/Slider.types.d.mts.map +1 -1
- package/dist/components/Slider/Slider.types.mjs.map +1 -1
- package/dist/components/Slider/Slider.utilities.cjs +7 -37
- package/dist/components/Slider/Slider.utilities.cjs.map +1 -1
- package/dist/components/Slider/Slider.utilities.d.cts +3 -24
- package/dist/components/Slider/Slider.utilities.d.cts.map +1 -1
- package/dist/components/Slider/Slider.utilities.d.mts +3 -24
- package/dist/components/Slider/Slider.utilities.d.mts.map +1 -1
- package/dist/components/Slider/Slider.utilities.mjs +8 -38
- package/dist/components/Slider/Slider.utilities.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs +5 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs +5 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts +5 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts +5 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.cjs +1 -1
- package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.cts +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.mts +1 -1
- package/dist/components/TitleAlert/TitleAlert.mjs +1 -1
- package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -1
- package/package.json +10 -10
|
@@ -10,7 +10,7 @@ const React = $importDefault($React);
|
|
|
10
10
|
import { ButtonIcon, ButtonIconSize } from "../ButtonIcon/index.mjs";
|
|
11
11
|
import { Icon, IconColor, IconName, IconSize } from "../Icon/index.mjs";
|
|
12
12
|
import { TextField } from "../TextField/index.mjs";
|
|
13
|
-
export const TextFieldSearch = forwardRef(({ onPressClearButton, clearButtonProps, value, style, startAccessory, endAccessory, ...props }, ref) => {
|
|
13
|
+
export const TextFieldSearch = forwardRef(({ onPressClearButton, clearButtonProps, value, style, startAccessory, endAccessory, inputAccessibilityLabel, inputProps, ...props }, ref) => {
|
|
14
14
|
const tw = useTailwind();
|
|
15
15
|
const containerStyle = tw.style('rounded-full');
|
|
16
16
|
const searchIcon = (<Icon name={IconName.Search} size={IconSize.Md} color={IconColor.IconAlternative}/>);
|
|
@@ -18,7 +18,10 @@ export const TextFieldSearch = forwardRef(({ onPressClearButton, clearButtonProp
|
|
|
18
18
|
onPressClearButton();
|
|
19
19
|
}, [onPressClearButton]);
|
|
20
20
|
const clearButton = (<ButtonIcon size={ButtonIconSize.Md} iconName={IconName.CircleX} iconProps={{ color: IconColor.IconAlternative }} onPress={clearButtonHandler} {...clearButtonProps}/>);
|
|
21
|
-
return (<TextField ref={ref} {...props}
|
|
21
|
+
return (<TextField ref={ref} {...props} inputProps={{
|
|
22
|
+
...inputProps,
|
|
23
|
+
accessibilityLabel: inputAccessibilityLabel,
|
|
24
|
+
}} value={value} startAccessory={startAccessory !== undefined ? startAccessory : searchIcon} endAccessory={endAccessory !== undefined
|
|
22
25
|
? endAccessory
|
|
23
26
|
: Boolean(value) && clearButton} testID="textfieldsearch" style={[containerStyle, style]}/>);
|
|
24
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.mjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc;;AAGvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,0BAAgB;AAC9D,OAAO,EAAE,SAAS,EAAE,+BAAqB;AAIzC,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACvC,CACE,EACE,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,CACjB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CACtB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;IAEF,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC1C,kBAAkB,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,MAAM,WAAW,GAAG,CAClB,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CACxB,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAC3B,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,eAAe,EAAE,CAAC,CAChD,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAC5B,IAAI,gBAAgB,CAAC,EACrB,CACH,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,cAAc,CAAC,CACb,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAC3D,CACD,YAAY,CAAC,CACX,YAAY,KAAK,SAAS;YACxB,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,CAClC,CACD,MAAM,CAAC,iBAAiB,CACxB,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef, useCallback } from 'react';\nimport type { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { Icon, IconColor, IconName, IconSize } from '../Icon';\nimport { TextField } from '../TextField';\n\nimport type { TextFieldSearchProps } from './TextFieldSearch.types';\n\nexport const TextFieldSearch = forwardRef<View, TextFieldSearchProps>(\n (\n {\n onPressClearButton,\n clearButtonProps,\n value,\n style,\n startAccessory,\n endAccessory,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const containerStyle = tw.style('rounded-full');\n\n const searchIcon = (\n <Icon\n name={IconName.Search}\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n />\n );\n\n const clearButtonHandler = useCallback(() => {\n onPressClearButton();\n }, [onPressClearButton]);\n\n const clearButton = (\n <ButtonIcon\n size={ButtonIconSize.Md}\n iconName={IconName.CircleX}\n iconProps={{ color: IconColor.IconAlternative }}\n onPress={clearButtonHandler}\n {...clearButtonProps}\n />\n );\n\n return (\n <TextField\n ref={ref}\n {...props}\n value={value}\n startAccessory={\n startAccessory !== undefined ? startAccessory : searchIcon\n }\n endAccessory={\n endAccessory !== undefined\n ? endAccessory\n : Boolean(value) && clearButton\n }\n testID=\"textfieldsearch\"\n style={[containerStyle, style]}\n />\n );\n },\n);\n\nTextFieldSearch.displayName = 'TextFieldSearch';\n"]}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.mjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc;;AAGvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,0BAAgB;AAC9D,OAAO,EAAE,SAAS,EAAE,+BAAqB;AAIzC,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACvC,CACE,EACE,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,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esContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef, useCallback } from 'react';\nimport type { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { Icon, IconColor, IconName, IconSize } from '../Icon';\nimport { TextField } from '../TextField';\n\nimport type { TextFieldSearchProps } from './TextFieldSearch.types';\n\nexport const TextFieldSearch = forwardRef<View, TextFieldSearchProps>(\n (\n {\n onPressClearButton,\n clearButtonProps,\n value,\n style,\n startAccessory,\n endAccessory,\n inputAccessibilityLabel,\n inputProps,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const containerStyle = tw.style('rounded-full');\n\n const searchIcon = (\n <Icon\n name={IconName.Search}\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n />\n );\n\n const clearButtonHandler = useCallback(() => {\n onPressClearButton();\n }, [onPressClearButton]);\n\n const clearButton = (\n <ButtonIcon\n size={ButtonIconSize.Md}\n iconName={IconName.CircleX}\n iconProps={{ color: IconColor.IconAlternative }}\n onPress={clearButtonHandler}\n {...clearButtonProps}\n />\n );\n\n return (\n <TextField\n ref={ref}\n {...props}\n inputProps={{\n ...inputProps,\n accessibilityLabel: inputAccessibilityLabel,\n }}\n value={value}\n startAccessory={\n startAccessory !== undefined ? startAccessory : searchIcon\n }\n endAccessory={\n endAccessory !== undefined\n ? endAccessory\n : Boolean(value) && clearButton\n }\n testID=\"textfieldsearch\"\n style={[containerStyle, style]}\n />\n );\n },\n);\n\nTextFieldSearch.displayName = 'TextFieldSearch';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.cjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.cjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Accessible name for the inner `TextInput`. Required, including when the\n * search field does not have a visible label.\n */\n inputAccessibilityLabel: string;\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
@@ -4,6 +4,11 @@ import type { TextFieldProps } from "../TextField/index.cjs";
|
|
|
4
4
|
* TextFieldSearch component props.
|
|
5
5
|
*/
|
|
6
6
|
export type TextFieldSearchProps = TextFieldProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Accessible name for the inner `TextInput`. Required, including when the
|
|
9
|
+
* search field does not have a visible label.
|
|
10
|
+
*/
|
|
11
|
+
inputAccessibilityLabel: string;
|
|
7
12
|
/**
|
|
8
13
|
* Optional prop to pass any additional props to the clear button.
|
|
9
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
@@ -4,6 +4,11 @@ import type { TextFieldProps } from "../TextField/index.mjs";
|
|
|
4
4
|
* TextFieldSearch component props.
|
|
5
5
|
*/
|
|
6
6
|
export type TextFieldSearchProps = TextFieldProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Accessible name for the inner `TextInput`. Required, including when the
|
|
9
|
+
* search field does not have a visible label.
|
|
10
|
+
*/
|
|
11
|
+
inputAccessibilityLabel: string;
|
|
7
12
|
/**
|
|
8
13
|
* Optional prop to pass any additional props to the clear button.
|
|
9
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.mjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.mjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Accessible name for the inner `TextInput`. Required, including when the\n * search field does not have a visible label.\n */\n inputAccessibilityLabel: string;\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
@@ -20,7 +20,7 @@ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
|
|
|
20
20
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
21
21
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
22
22
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
23
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
23
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
24
24
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
25
25
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
26
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleAlert.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,kDAA0B;AAE1B,0CAA6B;AAC7B,sDAAyC;AACzC,gDAAmC;AACnC,sDAAyC;AACzC,gFAAmE;AAInE;;;;;;;;;;;;;;GAcG;AACI,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,qBAAS,CACR,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,qBAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,SAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,+BAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,gCAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,iCAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,+BAAc,CAClB;UAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,wCAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,gCAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAnDW,QAAA,UAAU,cAmDrB;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
|
|
1
|
+
{"version":3,"file":"TitleAlert.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names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AAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,gCAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAnDW,QAAA,UAAU,cAmDrB;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
|
|
@@ -9,7 +9,7 @@ import type { TitleAlertProps } from "./TitleAlert.types.cjs";
|
|
|
9
9
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
10
10
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
11
11
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
12
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
12
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
13
13
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
14
14
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
15
15
|
*
|
|
@@ -9,7 +9,7 @@ import type { TitleAlertProps } from "./TitleAlert.types.mjs";
|
|
|
9
9
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
10
10
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
11
11
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
12
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
12
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
13
13
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
14
14
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
15
15
|
*
|
|
@@ -21,7 +21,7 @@ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
|
21
21
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
22
22
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
23
23
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
24
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
24
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
25
25
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
26
26
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
27
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleAlert.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAS,CACR,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG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,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
|
|
1
|
+
{"version":3,"file":"TitleAlert.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAS,CACR,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,GAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,cAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,SAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,UAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,cAAc,CAClB;UAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,cAAc,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,SAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\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.56.0-preview.12867efa",
|
|
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.45.0-preview.12867efa",
|
|
51
51
|
"react-native-jazzicon": "^0.1.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"@babel/preset-typescript": "^7.23.3",
|
|
58
58
|
"@figma/code-connect": "^1.4.9",
|
|
59
59
|
"@gorhom/bottom-sheet": "^5.1.3",
|
|
60
|
-
"@metamask-previews/design-system-twrnc-preset": "0.
|
|
61
|
-
"@metamask-previews/design-tokens": "
|
|
62
|
-
"@metamask/auto-changelog": "^
|
|
60
|
+
"@metamask-previews/design-system-twrnc-preset": "0.14.0-preview.12867efa",
|
|
61
|
+
"@metamask-previews/design-tokens": "13.0.0-preview.12867efa",
|
|
62
|
+
"@metamask/auto-changelog": "^7.1.0",
|
|
63
63
|
"@metamask/utils": "^11.12.1",
|
|
64
64
|
"@react-native/babel-preset": "0.86.3",
|
|
65
65
|
"@react-native/jest-preset": "0.86.3",
|
|
66
66
|
"@react-native/typescript-config": "0.86.3",
|
|
67
|
-
"@storybook/react-native": "10.6.
|
|
67
|
+
"@storybook/react-native": "10.6.2",
|
|
68
68
|
"@testing-library/react-native": "^13.3.3",
|
|
69
69
|
"@ts-bridge/cli": "^0.6.3",
|
|
70
70
|
"@types/babel__preset-env": "^7",
|
|
@@ -85,14 +85,14 @@
|
|
|
85
85
|
"react-native-svg-transformer": "^1.5.3",
|
|
86
86
|
"react-native-worklets": "0.10.4",
|
|
87
87
|
"react-test-renderer": "19.2.3",
|
|
88
|
-
"storybook": "10.6.
|
|
88
|
+
"storybook": "10.6.2",
|
|
89
89
|
"ts-jest": "^29.2.5",
|
|
90
|
-
"tsx": "^4.
|
|
90
|
+
"tsx": "^4.23.15",
|
|
91
91
|
"typescript": "~5.2.2"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@metamask/design-system-twrnc-preset": "^0.
|
|
95
|
-
"@metamask/design-tokens": "^
|
|
94
|
+
"@metamask/design-system-twrnc-preset": "^0.14.0",
|
|
95
|
+
"@metamask/design-tokens": "^13.0.0",
|
|
96
96
|
"@metamask/utils": "^11.12.1",
|
|
97
97
|
"expo-image": ">=3.0.0",
|
|
98
98
|
"lodash": "^4.17.21",
|