@metamask-previews/design-system-react-native 0.13.0-preview.dbe1fac → 0.14.0-preview.4ce710b
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 +28 -1
- package/dist/components/AvatarAccount/AvatarAccount.cjs +6 -6
- package/dist/components/AvatarAccount/AvatarAccount.cjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.cjs +6 -6
- package/dist/components/AvatarAccount/AvatarAccount.constants.cjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.mjs +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.mjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.d.cts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.d.mts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.mjs +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.mjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.types.cjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.types.d.cts +2 -12
- package/dist/components/AvatarAccount/AvatarAccount.types.d.cts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.types.d.mts +2 -12
- package/dist/components/AvatarAccount/AvatarAccount.types.d.mts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.types.mjs.map +1 -1
- package/dist/components/AvatarAccount/index.cjs +3 -3
- package/dist/components/AvatarAccount/index.cjs.map +1 -1
- package/dist/components/AvatarAccount/index.d.cts +1 -1
- package/dist/components/AvatarAccount/index.d.cts.map +1 -1
- package/dist/components/AvatarAccount/index.d.mts +1 -1
- package/dist/components/AvatarAccount/index.d.mts.map +1 -1
- package/dist/components/AvatarAccount/index.mjs +1 -1
- package/dist/components/AvatarAccount/index.mjs.map +1 -1
- package/dist/components/AvatarBase/index.cjs.map +1 -1
- package/dist/components/AvatarBase/index.d.cts.map +1 -1
- package/dist/components/AvatarBase/index.d.mts.map +1 -1
- package/dist/components/AvatarBase/index.mjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -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 +2 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +2 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs +2 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +3 -3
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.types.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.types.d.cts +5 -7
- package/dist/components/AvatarToken/AvatarToken.types.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.types.d.mts +5 -7
- package/dist/components/AvatarToken/AvatarToken.types.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.types.mjs.map +1 -1
- package/dist/components/AvatarToken/index.cjs +2 -2
- package/dist/components/AvatarToken/index.cjs.map +1 -1
- package/dist/components/AvatarToken/index.d.cts +1 -1
- package/dist/components/AvatarToken/index.d.cts.map +1 -1
- package/dist/components/AvatarToken/index.d.mts +1 -1
- package/dist/components/AvatarToken/index.d.mts.map +1 -1
- package/dist/components/AvatarToken/index.mjs +1 -1
- package/dist/components/AvatarToken/index.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +4 -3
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs +2 -1
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/Icon/Icon.cjs +2 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.constants.cjs +12 -0
- package/dist/components/Icon/Icon.constants.cjs.map +1 -0
- package/dist/components/Icon/Icon.constants.d.cts +3 -0
- package/dist/components/Icon/Icon.constants.d.cts.map +1 -0
- package/dist/components/Icon/Icon.constants.d.mts +3 -0
- package/dist/components/Icon/Icon.constants.d.mts.map +1 -0
- package/dist/components/Icon/Icon.constants.mjs +9 -0
- package/dist/components/Icon/Icon.constants.mjs.map +1 -0
- 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 +2 -1
- package/dist/components/Icon/Icon.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +3 -3
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.constants.cjs +15 -15
- package/dist/components/Input/Input.constants.cjs.map +1 -1
- package/dist/components/Input/Input.constants.d.cts +1 -1
- package/dist/components/Input/Input.constants.d.cts.map +1 -1
- package/dist/components/Input/Input.constants.d.mts +1 -1
- package/dist/components/Input/Input.constants.d.mts.map +1 -1
- package/dist/components/Input/Input.constants.mjs +1 -1
- package/dist/components/Input/Input.constants.mjs.map +1 -1
- package/dist/components/Input/Input.d.cts +1 -1
- package/dist/components/Input/Input.d.cts.map +1 -1
- package/dist/components/Input/Input.d.mts +1 -1
- package/dist/components/Input/Input.d.mts.map +1 -1
- package/dist/components/Input/Input.mjs +1 -1
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/Input.types.cjs.map +1 -1
- package/dist/components/Input/Input.types.d.cts +1 -1
- package/dist/components/Input/Input.types.d.cts.map +1 -1
- package/dist/components/Input/Input.types.d.mts +1 -1
- package/dist/components/Input/Input.types.d.mts.map +1 -1
- package/dist/components/Input/Input.types.mjs.map +1 -1
- package/dist/components/Text/Text.cjs +4 -4
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.constants.cjs +18 -23
- package/dist/components/Text/Text.constants.cjs.map +1 -1
- package/dist/components/Text/Text.constants.d.cts +1 -1
- package/dist/components/Text/Text.constants.d.cts.map +1 -1
- package/dist/components/Text/Text.constants.d.mts +1 -1
- package/dist/components/Text/Text.constants.d.mts.map +1 -1
- package/dist/components/Text/Text.constants.mjs +15 -20
- package/dist/components/Text/Text.constants.mjs.map +1 -1
- package/dist/components/Text/Text.d.cts.map +1 -1
- package/dist/components/Text/Text.d.mts.map +1 -1
- package/dist/components/Text/Text.mjs +1 -1
- package/dist/components/Text/Text.mjs.map +1 -1
- package/dist/components/Text/Text.types.cjs.map +1 -1
- package/dist/components/Text/Text.types.d.cts +3 -35
- package/dist/components/Text/Text.types.d.cts.map +1 -1
- package/dist/components/Text/Text.types.d.mts +3 -35
- package/dist/components/Text/Text.types.d.mts.map +1 -1
- package/dist/components/Text/Text.types.mjs.map +1 -1
- package/dist/components/Text/index.cjs +7 -7
- package/dist/components/Text/index.cjs.map +1 -1
- package/dist/components/Text/index.d.cts +1 -1
- package/dist/components/Text/index.d.cts.map +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/Text/index.d.mts.map +1 -1
- package/dist/components/Text/index.mjs +1 -1
- package/dist/components/Text/index.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.cjs +3 -3
- package/dist/components/TextButton/TextButton.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.d.cts.map +1 -1
- package/dist/components/TextButton/TextButton.d.mts.map +1 -1
- package/dist/components/TextButton/TextButton.mjs +1 -1
- package/dist/components/TextButton/TextButton.mjs.map +1 -1
- package/dist/components/TextField/TextField.cjs +2 -2
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.cts.map +1 -1
- package/dist/components/TextField/TextField.d.mts.map +1 -1
- package/dist/components/TextField/TextField.mjs +1 -1
- package/dist/components/TextField/TextField.mjs.map +1 -1
- package/dist/types/index.cjs +11 -131
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +5 -113
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +5 -113
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +5 -123
- package/dist/types/index.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -1,44 +1,12 @@
|
|
|
1
|
+
import type { TextPropsShared } from "@metamask-previews/design-system-shared";
|
|
1
2
|
import type { TextProps as RNTextProps } from "react-native/index.js";
|
|
2
|
-
import type { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.cjs";
|
|
3
3
|
/**
|
|
4
4
|
* Text component props.
|
|
5
5
|
*/
|
|
6
|
-
export type TextProps = {
|
|
7
|
-
/**
|
|
8
|
-
* Optional enum to select between Typography variants.
|
|
9
|
-
*
|
|
10
|
-
* @default BodyMD
|
|
11
|
-
*/
|
|
12
|
-
variant?: TextVariant;
|
|
13
|
-
/**
|
|
14
|
-
* Text to be displayed.
|
|
15
|
-
*/
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* Optional prop to add color to text.
|
|
19
|
-
*/
|
|
20
|
-
color?: TextColor;
|
|
21
|
-
/**
|
|
22
|
-
* Optional prop to control the font weight of the text.
|
|
23
|
-
* Normal: 400
|
|
24
|
-
* Medium: 500
|
|
25
|
-
* Bold: 600
|
|
26
|
-
*/
|
|
27
|
-
fontWeight?: FontWeight;
|
|
28
|
-
/**
|
|
29
|
-
* Optional prop to adjust the font family.
|
|
30
|
-
* Default: Geist
|
|
31
|
-
* Accent: MM Sans
|
|
32
|
-
* Hero: MM Poly
|
|
33
|
-
*/
|
|
34
|
-
fontFamily?: FontFamily;
|
|
35
|
-
/**
|
|
36
|
-
* Optional prop to adjust the style of the font.
|
|
37
|
-
*/
|
|
38
|
-
fontStyle?: FontStyle;
|
|
6
|
+
export type TextProps = TextPropsShared & RNTextProps & {
|
|
39
7
|
/**
|
|
40
8
|
* Optional prop to add twrnc overriding classNames.
|
|
41
9
|
*/
|
|
42
10
|
twClassName?: string;
|
|
43
|
-
}
|
|
11
|
+
};
|
|
44
12
|
//# sourceMappingURL=Text.types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gDAAgD;AAC/E,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GACrC,WAAW,GAAG;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1,44 +1,12 @@
|
|
|
1
|
+
import type { TextPropsShared } from "@metamask-previews/design-system-shared";
|
|
1
2
|
import type { TextProps as RNTextProps } from "react-native/index.js";
|
|
2
|
-
import type { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Text component props.
|
|
5
5
|
*/
|
|
6
|
-
export type TextProps = {
|
|
7
|
-
/**
|
|
8
|
-
* Optional enum to select between Typography variants.
|
|
9
|
-
*
|
|
10
|
-
* @default BodyMD
|
|
11
|
-
*/
|
|
12
|
-
variant?: TextVariant;
|
|
13
|
-
/**
|
|
14
|
-
* Text to be displayed.
|
|
15
|
-
*/
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* Optional prop to add color to text.
|
|
19
|
-
*/
|
|
20
|
-
color?: TextColor;
|
|
21
|
-
/**
|
|
22
|
-
* Optional prop to control the font weight of the text.
|
|
23
|
-
* Normal: 400
|
|
24
|
-
* Medium: 500
|
|
25
|
-
* Bold: 600
|
|
26
|
-
*/
|
|
27
|
-
fontWeight?: FontWeight;
|
|
28
|
-
/**
|
|
29
|
-
* Optional prop to adjust the font family.
|
|
30
|
-
* Default: Geist
|
|
31
|
-
* Accent: MM Sans
|
|
32
|
-
* Hero: MM Poly
|
|
33
|
-
*/
|
|
34
|
-
fontFamily?: FontFamily;
|
|
35
|
-
/**
|
|
36
|
-
* Optional prop to adjust the style of the font.
|
|
37
|
-
*/
|
|
38
|
-
fontStyle?: FontStyle;
|
|
6
|
+
export type TextProps = TextPropsShared & RNTextProps & {
|
|
39
7
|
/**
|
|
40
8
|
* Optional prop to add twrnc overriding classNames.
|
|
41
9
|
*/
|
|
42
10
|
twClassName?: string;
|
|
43
|
-
}
|
|
11
|
+
};
|
|
44
12
|
//# sourceMappingURL=Text.types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gDAAgD;AAC/E,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GACrC,WAAW,GAAG;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextPropsShared } from '@metamask-previews/design-system-shared';\nimport type { TextProps as RNTextProps } from 'react-native';\n\n/**\n * Text component props.\n */\nexport type TextProps = TextPropsShared &\n RNTextProps & {\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Text = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
Object.defineProperty(exports, "
|
|
7
|
-
Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return
|
|
8
|
-
Object.defineProperty(exports, "FontFamily", { enumerable: true, get: function () { return
|
|
9
|
-
Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return
|
|
3
|
+
exports.Text = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextVariant = exports.TextColor = void 0;
|
|
4
|
+
var design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "TextColor", { enumerable: true, get: function () { return design_system_shared_1.TextColor; } });
|
|
6
|
+
Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function () { return design_system_shared_1.TextVariant; } });
|
|
7
|
+
Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return design_system_shared_1.FontWeight; } });
|
|
8
|
+
Object.defineProperty(exports, "FontFamily", { enumerable: true, get: function () { return design_system_shared_1.FontFamily; } });
|
|
9
|
+
Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return design_system_shared_1.FontStyle; } });
|
|
10
10
|
var Text_1 = require("./Text.cjs");
|
|
11
11
|
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.Text; } });
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;AAAA,gFAOiD;AAN/C,iHAAA,SAAS,OAAA;AACT,mHAAA,WAAW,OAAA;AACX,kHAAA,UAAU,OAAA;AACV,kHAAA,UAAU,OAAA;AACV,iHAAA,SAAS,OAAA;AAGX,mCAA8B;AAArB,4FAAA,IAAI,OAAA","sourcesContent":["export {\n TextColor,\n TextVariant,\n FontWeight,\n FontFamily,\n FontStyle,\n type TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle, type TextPropsShared, } from "@metamask-previews/design-system-shared";
|
|
2
2
|
export { Text } from "./Text.cjs";
|
|
3
3
|
export type { TextProps } from "./Text.types.cjs";
|
|
4
4
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,eAAe,GACrB,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle, type TextPropsShared, } from "@metamask-previews/design-system-shared";
|
|
2
2
|
export { Text } from "./Text.mjs";
|
|
3
3
|
export type { TextProps } from "./Text.types.mjs";
|
|
4
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,eAAe,GACrB,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle } from "@metamask-previews/design-system-shared";
|
|
2
2
|
export { Text } from "./Text.mjs";
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EAEV,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe","sourcesContent":["export {\n TextColor,\n TextVariant,\n FontWeight,\n FontFamily,\n FontStyle,\n type TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
|
|
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.TextButton = void 0;
|
|
27
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
27
28
|
const react_1 = __importStar(require("react"));
|
|
28
|
-
const types_1 = require("../../types/index.cjs");
|
|
29
29
|
const Text_1 = require("../Text/index.cjs");
|
|
30
|
-
const TextButton = ({ children, variant =
|
|
30
|
+
const TextButton = ({ children, variant = design_system_shared_1.TextVariant.BodyMd, fontWeight = Text_1.FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
|
|
31
31
|
const [pressed, setPressed] = (0, react_1.useState)(false);
|
|
32
32
|
const handlePressIn = (e) => {
|
|
33
33
|
setPressed(true);
|
|
@@ -37,7 +37,7 @@ const TextButton = ({ children, variant = types_1.TextVariant.BodyMd, fontWeight
|
|
|
37
37
|
setPressed(false);
|
|
38
38
|
onPressOut?.(e);
|
|
39
39
|
};
|
|
40
|
-
return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ?
|
|
40
|
+
return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? design_system_shared_1.TextColor.PrimaryDefaultPressed : design_system_shared_1.TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
|
|
41
41
|
{children}
|
|
42
42
|
</Text_1.Text>);
|
|
43
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAExC,
|
|
1
|
+
{"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAiF;AACjF,+CAAwC;AAExC,4CAA2C;AAIpC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,kCAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,iBAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,gCAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,gCAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,UAAU,cA0CrB","sourcesContent":["import { TextColor, TextVariant } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\n\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAIxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAIxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
|
|
@@ -4,9 +4,9 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
+
import { TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
7
8
|
import $React, { useState } from "react";
|
|
8
9
|
const React = $importDefault($React);
|
|
9
|
-
import { TextVariant, TextColor } from "../../types/index.mjs";
|
|
10
10
|
import { Text, FontWeight } from "../Text/index.mjs";
|
|
11
11
|
export const TextButton = ({ children, variant = TextVariant.BodyMd, fontWeight = FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
|
|
12
12
|
const [pressed, setPressed] = useState(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,gDAAgD;AACjF,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAExC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAI3C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { TextColor, TextVariant } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\n\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TextField = void 0;
|
|
4
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
4
5
|
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
5
6
|
const react_1 = require("react");
|
|
6
7
|
const react_native_1 = require("react-native/index.js");
|
|
7
|
-
const types_1 = require("../../types/index.cjs");
|
|
8
8
|
const Input_1 = require("../Input/index.cjs");
|
|
9
9
|
function getContainerBorderColorClass(isDisabled, isFocused, isError) {
|
|
10
10
|
if (isDisabled) {
|
|
@@ -45,7 +45,7 @@ exports.TextField = (0, react_1.forwardRef)(({ style, startAccessory, endAccesso
|
|
|
45
45
|
return (<react_native_1.Pressable testID={testID} style={[containerStyle, style]} onPress={onPressHandler} accessible={false}>
|
|
46
46
|
{startAccessory}
|
|
47
47
|
<react_native_1.View style={tw.style('min-h-0 flex-1 justify-center')}>
|
|
48
|
-
{inputElement ?? (<Input_1.Input {...props} ref={inputRef} textVariant={
|
|
48
|
+
{inputElement ?? (<Input_1.Input {...props} ref={inputRef} textVariant={design_system_shared_1.TextVariant.BodyMd} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled
|
|
49
49
|
// Row is `h-12` (48px) with `border` on the Pressable (1px top + bottom). Inner TextInput
|
|
50
50
|
// uses 46px height so the field matches a 48px-tall control without vertical overflow.
|
|
51
51
|
twClassName="h-[46px] bg-transparent border-0" numberOfLines={1} multiline={false}/>)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,8FAA4E;AAC5E,iCAOe;AACf,wDAA0D;AAE1D,
|
|
1
|
+
{"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,kFAAsE;AACtE,8FAA4E;AAC5E,iCAOe;AACf,wDAA0D;AAE1D,8CAAiC;AAIjC,SAAS,4BAA4B,CACnC,UAAmB,EACnB,SAAkB,EAClB,OAAgB;IAEhB,IAAI,UAAU,EAAE;QACd,OAAO,cAAc,CAAC;KACvB;IACD,IAAI,OAAO,EAAE;QACX,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,gBAAgB,CAAC;KACzB;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAEY,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CACE,EACE,KAAK,EACL,cAAc,EACd,YAAY,EACZ,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,WAAW,EACX,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAY,IAAI,CAAC,CAAC;IACzC,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,IAAA,2BAAmB,EACjB,GAAG,EACH,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EACtB,EAAE,CACH,CAAC;IAEF,MAAM,gBAAgB,GAAG,4BAA4B,CACnD,UAAU,EACV,SAAS,EACT,OAAO,CACR,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,eAAO,EAC5B,GAAG,EAAE,CACH,EAAE,CAAC,KAAK,CACN,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,UAAU,IAAI,YAAY,EAC1B,WAAW,CACZ,EACH,CAAC,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC,CAChD,CAAC;IAEF,MAAM,aAAa,GAAG,IAAA,mBAAW,EAC/B,CAAC,CAAuD,EAAE,EAAE;QAC1D,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC,EACD,CAAC,UAAU,EAAE,MAAM,CAAC,CACrB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,CAAC,CAAwD,EAAE,EAAE;QAC3D,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;SACd;IACH,CAAC,EACD,CAAC,UAAU,EAAE,OAAO,CAAC,CACtB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACtC,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,OAAO,EAAE;YACnC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SAC1B;IACH,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,wBAAS,CACR,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAC/B,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,UAAU,CAAC,CAAC,KAAK,CAAC,CAElB;QAAA,CAAC,cAAc,CACf;QAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CACrD;UAAA,CAAC,YAAY,IAAI,CACf,CAAC,aAAK,CACJ,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,QAAQ,CAAC,CACd,WAAW,CAAC,CAAC,kCAAW,CAAC,MAAM,CAAC,CAChC,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB;QACrB,0FAA0F;QAC1F,uFAAuF;QACvF,WAAW,CAAC,kCAAkC,CAC9C,aAAa,CAAC,CAAC,CAAC,CAAC,CACjB,SAAS,CAAC,CAAC,KAAK,CAAC,EACjB,CACH,CACH;QAAA,EAAE,mBAAI,CACN;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,wBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { TextVariant } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Pressable, TextInput, View } from 'react-native';\n\nimport { Input } from '../Input';\n\nimport type { TextFieldProps } from './TextField.types';\n\nfunction getContainerBorderColorClass(\n isDisabled: boolean,\n isFocused: boolean,\n isError: boolean,\n): string {\n if (isDisabled) {\n return 'border-muted';\n }\n if (isError) {\n return 'border-error-default';\n }\n if (isFocused) {\n return 'border-default';\n }\n return 'border-muted';\n}\n\nexport const TextField = forwardRef<TextInput, TextFieldProps>(\n (\n {\n style,\n startAccessory,\n endAccessory,\n isError = false,\n inputElement,\n isDisabled = false,\n autoFocus = false,\n twClassName,\n onBlur,\n onFocus,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const inputRef = useRef<TextInput>(null);\n const tw = useTailwind();\n\n useImperativeHandle<TextInput | null, TextInput | null>(\n ref,\n () => inputRef.current,\n [],\n );\n\n const borderColorClass = getContainerBorderColorClass(\n isDisabled,\n isFocused,\n isError,\n );\n\n const containerStyle = useMemo(\n () =>\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n borderColorClass,\n 'px-4',\n 'bg-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n [borderColorClass, isDisabled, twClassName, tw],\n );\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const onPressHandler = useCallback(() => {\n if (!isDisabled && inputRef.current) {\n inputRef.current.focus();\n }\n }, [isDisabled]);\n\n return (\n <Pressable\n testID={testID}\n style={[containerStyle, style]}\n onPress={onPressHandler}\n accessible={false}\n >\n {startAccessory}\n <View style={tw.style('min-h-0 flex-1 justify-center')}>\n {inputElement ?? (\n <Input\n {...props}\n ref={inputRef}\n textVariant={TextVariant.BodyMd}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n // Row is `h-12` (48px) with `border` on the Pressable (1px top + bottom). Inner TextInput\n // uses 46px height so the field matches a 48px-tall control without vertical overflow.\n twClassName=\"h-[46px] bg-transparent border-0\"\n numberOfLines={1}\n multiline={false}\n />\n )}\n </View>\n {endAccessory}\n </Pressable>\n );\n },\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAa,SAAS,EAAQ,8BAAqB;AAuB1D,eAAO,MAAM,SAAS;;;;;;;6CA6GrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAa,SAAS,EAAQ,8BAAqB;AAuB1D,eAAO,MAAM,SAAS;;;;;;;6CA6GrB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { TextVariant } from "@metamask-previews/design-system-shared";
|
|
1
2
|
import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
|
|
2
3
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
3
4
|
import { Pressable, TextInput, View } from "react-native/index.js";
|
|
4
|
-
import { TextVariant } from "../../types/index.mjs";
|
|
5
5
|
import { Input } from "../Input/index.mjs";
|
|
6
6
|
function getContainerBorderColorClass(isDisabled, isFocused, isError) {
|
|
7
7
|
if (isDisabled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.mjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,EACT,cAAc;AACf,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,8BAAqB;AAE1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TextField.mjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"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","sourcesContent":["import { TextVariant } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Pressable, TextInput, View } from 'react-native';\n\nimport { Input } from '../Input';\n\nimport type { TextFieldProps } from './TextField.types';\n\nfunction getContainerBorderColorClass(\n isDisabled: boolean,\n isFocused: boolean,\n isError: boolean,\n): string {\n if (isDisabled) {\n return 'border-muted';\n }\n if (isError) {\n return 'border-error-default';\n }\n if (isFocused) {\n return 'border-default';\n }\n return 'border-muted';\n}\n\nexport const TextField = forwardRef<TextInput, TextFieldProps>(\n (\n {\n style,\n startAccessory,\n endAccessory,\n isError = false,\n inputElement,\n isDisabled = false,\n autoFocus = false,\n twClassName,\n onBlur,\n onFocus,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const inputRef = useRef<TextInput>(null);\n const tw = useTailwind();\n\n useImperativeHandle<TextInput | null, TextInput | null>(\n ref,\n () => inputRef.current,\n [],\n );\n\n const borderColorClass = getContainerBorderColorClass(\n isDisabled,\n isFocused,\n isError,\n );\n\n const containerStyle = useMemo(\n () =>\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n borderColorClass,\n 'px-4',\n 'bg-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n [borderColorClass, isDisabled, twClassName, tw],\n );\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const onPressHandler = useCallback(() => {\n if (!isDisabled && inputRef.current) {\n inputRef.current.focus();\n }\n }, [isDisabled]);\n\n return (\n <Pressable\n testID={testID}\n style={[containerStyle, style]}\n onPress={onPressHandler}\n accessible={false}\n >\n {startAccessory}\n <View style={tw.style('min-h-0 flex-1 justify-center')}>\n {inputElement ?? (\n <Input\n {...props}\n ref={inputRef}\n textVariant={TextVariant.BodyMd}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n // Row is `h-12` (48px) with `border` on the Pressable (1px top + bottom). Inner TextInput\n // uses 46px height so the field matches a 48px-tall control without vertical overflow.\n twClassName=\"h-[46px] bg-transparent border-0\"\n numberOfLines={1}\n multiline={false}\n />\n )}\n </View>\n {endAccessory}\n </Pressable>\n );\n },\n);\n"]}
|
package/dist/types/index.cjs
CHANGED
|
@@ -1,32 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IconName = exports.IconSize = exports.IconColor = exports.
|
|
3
|
+
exports.IconName = exports.IconSize = exports.IconColor = exports.ButtonIconVariant = exports.ButtonIconSize = exports.ButtonVariant = exports.ButtonHeroSize = exports.ButtonTertiarySize = exports.ButtonSecondarySize = exports.ButtonPrimarySize = exports.ButtonSize = exports.ButtonBaseSize = exports.BoxBorderColor = exports.BoxBackgroundColor = exports.BoxJustifyContent = exports.BoxAlignItems = exports.BoxFlexWrap = exports.BoxFlexDirection = exports.AvatarIconSeverity = exports.AvatarGroupVariant = exports.AvatarSize = exports.AvatarNetworkSize = exports.AvatarIconSize = exports.AvatarGroupSize = exports.AvatarFaviconSize = exports.AvatarBaseShape = exports.AvatarBaseSize = void 0;
|
|
4
4
|
var design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
5
|
Object.defineProperty(exports, "AvatarBaseSize", { enumerable: true, get: function () { return design_system_shared_1.AvatarBaseSize; } });
|
|
6
6
|
Object.defineProperty(exports, "AvatarBaseShape", { enumerable: true, get: function () { return design_system_shared_1.AvatarBaseShape; } });
|
|
7
7
|
var design_system_shared_2 = require("@metamask-previews/design-system-shared");
|
|
8
|
-
Object.defineProperty(exports, "
|
|
8
|
+
Object.defineProperty(exports, "AvatarFaviconSize", { enumerable: true, get: function () { return design_system_shared_2.AvatarBaseSize; } });
|
|
9
9
|
var design_system_shared_3 = require("@metamask-previews/design-system-shared");
|
|
10
|
-
Object.defineProperty(exports, "
|
|
10
|
+
Object.defineProperty(exports, "AvatarGroupSize", { enumerable: true, get: function () { return design_system_shared_3.AvatarBaseSize; } });
|
|
11
11
|
var design_system_shared_4 = require("@metamask-previews/design-system-shared");
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "AvatarIconSize", { enumerable: true, get: function () { return design_system_shared_4.AvatarBaseSize; } });
|
|
13
13
|
var design_system_shared_5 = require("@metamask-previews/design-system-shared");
|
|
14
|
-
Object.defineProperty(exports, "
|
|
14
|
+
Object.defineProperty(exports, "AvatarNetworkSize", { enumerable: true, get: function () { return design_system_shared_5.AvatarBaseSize; } });
|
|
15
15
|
var design_system_shared_6 = require("@metamask-previews/design-system-shared");
|
|
16
|
-
Object.defineProperty(exports, "
|
|
17
|
-
var design_system_shared_7 = require("@metamask-previews/design-system-shared");
|
|
18
|
-
Object.defineProperty(exports, "AvatarTokenSize", { enumerable: true, get: function () { return design_system_shared_7.AvatarBaseSize; } });
|
|
19
|
-
var design_system_shared_8 = require("@metamask-previews/design-system-shared");
|
|
20
|
-
Object.defineProperty(exports, "AvatarSize", { enumerable: true, get: function () { return design_system_shared_8.AvatarBaseSize; } });
|
|
21
|
-
/**
|
|
22
|
-
* AvatarAccount - variant
|
|
23
|
-
*/
|
|
24
|
-
var AvatarAccountVariant;
|
|
25
|
-
(function (AvatarAccountVariant) {
|
|
26
|
-
AvatarAccountVariant["Blockies"] = "blockies";
|
|
27
|
-
AvatarAccountVariant["Jazzicon"] = "jazzicon";
|
|
28
|
-
AvatarAccountVariant["Maskicon"] = "maskicon";
|
|
29
|
-
})(AvatarAccountVariant || (exports.AvatarAccountVariant = AvatarAccountVariant = {}));
|
|
16
|
+
Object.defineProperty(exports, "AvatarSize", { enumerable: true, get: function () { return design_system_shared_6.AvatarBaseSize; } });
|
|
30
17
|
/**
|
|
31
18
|
* AvatarGroup - variant
|
|
32
19
|
*/
|
|
@@ -275,113 +262,6 @@ var ButtonIconVariant;
|
|
|
275
262
|
ButtonIconVariant["Filled"] = "filled";
|
|
276
263
|
ButtonIconVariant["Floating"] = "floating";
|
|
277
264
|
})(ButtonIconVariant || (exports.ButtonIconVariant = ButtonIconVariant = {}));
|
|
278
|
-
/**
|
|
279
|
-
* Text - variant
|
|
280
|
-
*/
|
|
281
|
-
var TextVariant;
|
|
282
|
-
(function (TextVariant) {
|
|
283
|
-
// Display Sizes
|
|
284
|
-
TextVariant["DisplayLg"] = "display-lg";
|
|
285
|
-
TextVariant["DisplayMd"] = "display-md";
|
|
286
|
-
// Heading Sizes
|
|
287
|
-
TextVariant["HeadingLg"] = "heading-lg";
|
|
288
|
-
TextVariant["HeadingMd"] = "heading-md";
|
|
289
|
-
TextVariant["HeadingSm"] = "heading-sm";
|
|
290
|
-
// Body Sizes
|
|
291
|
-
TextVariant["BodyLg"] = "body-lg";
|
|
292
|
-
TextVariant["BodyMd"] = "body-md";
|
|
293
|
-
TextVariant["BodySm"] = "body-sm";
|
|
294
|
-
TextVariant["BodyXs"] = "body-xs";
|
|
295
|
-
// Special Typography Variants
|
|
296
|
-
TextVariant["PageHeading"] = "page-heading";
|
|
297
|
-
TextVariant["SectionHeading"] = "section-heading";
|
|
298
|
-
TextVariant["ButtonLabelMd"] = "button-label-md";
|
|
299
|
-
TextVariant["ButtonLabelLg"] = "button-label-lg";
|
|
300
|
-
TextVariant["AmountDisplayLg"] = "amount-display-lg";
|
|
301
|
-
})(TextVariant || (exports.TextVariant = TextVariant = {}));
|
|
302
|
-
/**
|
|
303
|
-
* Text - color
|
|
304
|
-
*/
|
|
305
|
-
var TextColor;
|
|
306
|
-
(function (TextColor) {
|
|
307
|
-
/** For default neutral text. */
|
|
308
|
-
TextColor["TextDefault"] = "text-default";
|
|
309
|
-
/** For softer contrast neutral text */
|
|
310
|
-
TextColor["TextAlternative"] = "text-alternative";
|
|
311
|
-
/** For the softest contrast neutral text (not accessible) */
|
|
312
|
-
TextColor["TextMuted"] = "text-muted";
|
|
313
|
-
/** For elements used on top of overlay/alternative. */
|
|
314
|
-
TextColor["OverlayInverse"] = "text-overlay-inverse";
|
|
315
|
-
/** For interactive, active, and selected semantics. */
|
|
316
|
-
TextColor["PrimaryDefault"] = "text-primary-default";
|
|
317
|
-
/** For softer variants of primary text. */
|
|
318
|
-
TextColor["PrimaryAlternative"] = "text-primary-alternative";
|
|
319
|
-
/** For elements used on top of primary/default. */
|
|
320
|
-
TextColor["PrimaryInverse"] = "text-primary-inverse";
|
|
321
|
-
/** For primary text in a pressed state. */
|
|
322
|
-
TextColor["PrimaryDefaultPressed"] = "text-primary-default-pressed";
|
|
323
|
-
/** For critical alert text. */
|
|
324
|
-
TextColor["ErrorDefault"] = "text-error-default";
|
|
325
|
-
/** For stronger contrast error text. */
|
|
326
|
-
TextColor["ErrorAlternative"] = "text-error-alternative";
|
|
327
|
-
/** For elements used on top of error/default. */
|
|
328
|
-
TextColor["ErrorInverse"] = "text-error-inverse";
|
|
329
|
-
/** For critical alert text in a pressed state. */
|
|
330
|
-
TextColor["ErrorDefaultPressed"] = "text-error-default-pressed";
|
|
331
|
-
/** For caution alert text. */
|
|
332
|
-
TextColor["WarningDefault"] = "text-warning-default";
|
|
333
|
-
/** For elements used on top of warning/default. */
|
|
334
|
-
TextColor["WarningInverse"] = "text-warning-inverse";
|
|
335
|
-
/** For caution text in a pressed state. */
|
|
336
|
-
TextColor["WarningDefaultPressed"] = "text-warning-default-pressed";
|
|
337
|
-
/** For positive semantic text. */
|
|
338
|
-
TextColor["SuccessDefault"] = "text-success-default";
|
|
339
|
-
/** For elements used on top of success/default. */
|
|
340
|
-
TextColor["SuccessInverse"] = "text-success-inverse";
|
|
341
|
-
/** For positive text in a pressed state. */
|
|
342
|
-
TextColor["SuccessDefaultPressed"] = "text-success-default-pressed";
|
|
343
|
-
/** For informational read-only text. */
|
|
344
|
-
TextColor["InfoDefault"] = "text-info-default";
|
|
345
|
-
/** For elements used on top of info/default. */
|
|
346
|
-
TextColor["InfoInverse"] = "text-info-inverse";
|
|
347
|
-
/** Make the text color transparent. */
|
|
348
|
-
TextColor["Transparent"] = "text-transparent";
|
|
349
|
-
})(TextColor || (exports.TextColor = TextColor = {}));
|
|
350
|
-
/**
|
|
351
|
-
* Text - fontWeight
|
|
352
|
-
*/
|
|
353
|
-
var FontWeight;
|
|
354
|
-
(function (FontWeight) {
|
|
355
|
-
/**
|
|
356
|
-
* Weight - 600
|
|
357
|
-
*/
|
|
358
|
-
FontWeight["Bold"] = "600";
|
|
359
|
-
/**
|
|
360
|
-
* Weight - 500
|
|
361
|
-
*/
|
|
362
|
-
FontWeight["Medium"] = "500";
|
|
363
|
-
/**
|
|
364
|
-
* Weight - 400
|
|
365
|
-
*/
|
|
366
|
-
FontWeight["Regular"] = "400";
|
|
367
|
-
})(FontWeight || (exports.FontWeight = FontWeight = {}));
|
|
368
|
-
/**
|
|
369
|
-
* Text - fontStyle
|
|
370
|
-
*/
|
|
371
|
-
var FontStyle;
|
|
372
|
-
(function (FontStyle) {
|
|
373
|
-
FontStyle["Italic"] = "italic";
|
|
374
|
-
FontStyle["Normal"] = "normal";
|
|
375
|
-
})(FontStyle || (exports.FontStyle = FontStyle = {}));
|
|
376
|
-
/**
|
|
377
|
-
* Text - fontFamily
|
|
378
|
-
*/
|
|
379
|
-
var FontFamily;
|
|
380
|
-
(function (FontFamily) {
|
|
381
|
-
FontFamily["Default"] = "default";
|
|
382
|
-
FontFamily["Accent"] = "accent";
|
|
383
|
-
FontFamily["Hero"] = "hero";
|
|
384
|
-
})(FontFamily || (exports.FontFamily = FontFamily = {}));
|
|
385
265
|
/**
|
|
386
266
|
* Icon - color
|
|
387
267
|
*/
|
|
@@ -434,15 +314,15 @@ var IconColor;
|
|
|
434
314
|
var IconSize;
|
|
435
315
|
(function (IconSize) {
|
|
436
316
|
/** Extra small - 12px */
|
|
437
|
-
IconSize["Xs"] = "
|
|
317
|
+
IconSize["Xs"] = "xs";
|
|
438
318
|
/** Small - 16px */
|
|
439
|
-
IconSize["Sm"] = "
|
|
319
|
+
IconSize["Sm"] = "sm";
|
|
440
320
|
/** Medium - 20px (Default) */
|
|
441
|
-
IconSize["Md"] = "
|
|
321
|
+
IconSize["Md"] = "md";
|
|
442
322
|
/** Large - 24px */
|
|
443
|
-
IconSize["Lg"] = "
|
|
323
|
+
IconSize["Lg"] = "lg";
|
|
444
324
|
/** Extra large - 32px */
|
|
445
|
-
IconSize["Xl"] = "
|
|
325
|
+
IconSize["Xl"] = "xl";
|
|
446
326
|
})(IconSize || (exports.IconSize = IconSize = {}));
|
|
447
327
|
// /////////////////////////////////////////////////////
|
|
448
328
|
// This is generated code - Manually add types above
|