@metamask-previews/design-system-react-native 0.0.0-preview.31cc4ac → 0.0.0-preview.3ab3ce4
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/dist/components/Icon/Icon.assets.d.ts +6 -0
- package/dist/components/Icon/Icon.assets.d.ts.map +1 -0
- package/dist/components/Icon/Icon.assets.js +324 -0
- package/dist/components/Icon/Icon.assets.js.map +1 -0
- package/dist/components/Icon/Icon.constants.d.ts +8 -0
- package/dist/components/Icon/Icon.constants.d.ts.map +1 -0
- package/dist/components/Icon/Icon.constants.js +22 -0
- package/dist/components/Icon/Icon.constants.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +5 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.js +45 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/Icon.types.d.ts +254 -0
- package/dist/components/Icon/Icon.types.d.ts.map +1 -0
- package/dist/components/Icon/Icon.types.js +229 -0
- package/dist/components/Icon/Icon.types.js.map +1 -0
- package/dist/components/Icon/Icon.utilities.d.ts +22 -0
- package/dist/components/Icon/Icon.utilities.d.ts.map +1 -0
- package/dist/components/Icon/Icon.utilities.js +31 -0
- package/dist/components/Icon/Icon.utilities.js.map +1 -0
- package/dist/components/Icon/index.d.ts +4 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +13 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Text/Text.d.ts +3 -10
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/Text/Text.types.d.ts +39 -29
- package/dist/components/Text/Text.types.d.ts.map +1 -1
- package/dist/components/Text/Text.types.js +39 -29
- package/dist/components/Text/Text.types.js.map +1 -1
- package/dist/components/Text/Text.utilities.d.ts +1 -1
- package/dist/components/Text/Text.utilities.js +2 -2
- package/dist/components/Text/Text.utilities.js.map +1 -1
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/primitives/ButtonAnimated/ButtonAnimated.d.ts +5 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.d.ts.map +1 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.js +58 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.js.map +1 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.d.ts +6 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.d.ts.map +1 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.js +3 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.js.map +1 -0
- package/dist/primitives/ButtonAnimated/index.d.ts +2 -0
- package/dist/primitives/ButtonAnimated/index.d.ts.map +1 -0
- package/dist/primitives/ButtonAnimated/index.js +9 -0
- package/dist/primitives/ButtonAnimated/index.js.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.d.ts +5 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.d.ts.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.js +15 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.js.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.d.ts +15 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.d.ts.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.js +3 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.js.map +1 -0
- package/dist/temp-components/Spinner/Spinner.constants.d.ts +3 -0
- package/dist/temp-components/Spinner/Spinner.constants.d.ts.map +1 -0
- package/dist/temp-components/Spinner/Spinner.constants.js +21 -0
- package/dist/temp-components/Spinner/Spinner.constants.js.map +1 -0
- package/dist/temp-components/Spinner/Spinner.d.ts +5 -0
- package/dist/temp-components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/temp-components/Spinner/Spinner.js +68 -0
- package/dist/temp-components/Spinner/Spinner.js.map +1 -0
- package/dist/temp-components/Spinner/Spinner.types.d.ts +30 -0
- package/dist/temp-components/Spinner/Spinner.types.d.ts.map +1 -0
- package/dist/temp-components/Spinner/Spinner.types.js +3 -0
- package/dist/temp-components/Spinner/Spinner.types.js.map +1 -0
- package/dist/temp-components/Spinner/index.d.ts +3 -0
- package/dist/temp-components/Spinner/index.d.ts.map +1 -0
- package/dist/temp-components/Spinner/index.js +9 -0
- package/dist/temp-components/Spinner/index.js.map +1 -0
- package/package.json +11 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAA8C;AAE9C,qDAA4E;AAE5E,6CAAqD;AACrD,qDAA0D;AAE1D,MAAM,IAAI,GAAwB,CAAC,EACjC,OAAO,GAAG,qCAAoB,EAC9B,KAAK,GAAG,mCAAkB,EAC1B,KAAK,EACL,QAAQ,EACR,UAAU,GAAG,uBAAU,CAAC,MAAM,EAC9B,SAAS,GAAG,sBAAS,CAAC,MAAM,EAC5B,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,gBAAgB,GAAG,IAAA,uCAAsB,EAAC;QAC9C,OAAO;QACP,KAAK;QACL,UAAU;QACV,SAAS;QACT,WAAW;KACZ,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,mBAAM,CACL,iBAAiB,CAAC,MAAM,CACxB,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA,GAAG,gBAAgB,EAAE,EAAE,KAAK,CAAC,CAAC,CAExC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport { DEFAULT_TEXT_COLOR, DEFAULT_TEXT_VARIANT } from './Text.constants';\nimport type { TextProps } from './Text.types';\nimport { FontWeight, FontStyle } from './Text.types';\nimport { generateTextClassNames } from './Text.utilities';\n\nconst Text: React.FC<TextProps> = ({\n variant = DEFAULT_TEXT_VARIANT,\n color = DEFAULT_TEXT_COLOR,\n style,\n children,\n fontWeight = FontWeight.Normal,\n fontStyle = FontStyle.Normal,\n twClassName = '',\n ...props\n}) => {\n const tw = useTailwind();\n const mergedClassnames = generateTextClassNames({\n variant,\n color,\n fontWeight,\n fontStyle,\n twClassName,\n });\n\n return (\n <RNText\n accessibilityRole=\"text\"\n {...props}\n style={[tw`${mergedClassnames}`, style]}\n >\n {children}\n </RNText>\n );\n};\n\nexport default Text;\n"]}
|
|
@@ -17,37 +17,47 @@ export declare enum TextVariant {
|
|
|
17
17
|
*/
|
|
18
18
|
export declare enum TextColor {
|
|
19
19
|
/** For default neutral text. */
|
|
20
|
-
TextDefault = "text-default",
|
|
20
|
+
TextDefault = "text-text-default",
|
|
21
21
|
/** For softer contrast neutral text */
|
|
22
|
-
TextAlternative = "text-alternative",
|
|
22
|
+
TextAlternative = "text-text-alternative",
|
|
23
23
|
/** For the softest contrast neutral text (not accessible) */
|
|
24
|
-
TextMuted = "text-muted",
|
|
25
|
-
/** For elements used on top of overlay/alternative.
|
|
26
|
-
OverlayInverse = "overlay-inverse",
|
|
27
|
-
/** For interactive, active, and selected semantics.
|
|
28
|
-
PrimaryDefault = "primary-default",
|
|
29
|
-
/** For
|
|
30
|
-
|
|
31
|
-
/** For
|
|
32
|
-
|
|
33
|
-
/** For
|
|
34
|
-
|
|
35
|
-
/** For
|
|
36
|
-
|
|
37
|
-
/** For
|
|
38
|
-
|
|
39
|
-
/** For elements used on top of
|
|
40
|
-
|
|
41
|
-
/** For
|
|
42
|
-
|
|
43
|
-
/** For
|
|
44
|
-
|
|
45
|
-
/** For
|
|
46
|
-
|
|
47
|
-
/** For
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
|
|
24
|
+
TextMuted = "text-text-muted",
|
|
25
|
+
/** For elements used on top of overlay/alternative. */
|
|
26
|
+
OverlayInverse = "text-overlay-inverse",
|
|
27
|
+
/** For interactive, active, and selected semantics. */
|
|
28
|
+
PrimaryDefault = "text-primary-default",
|
|
29
|
+
/** For softer variants of primary text. */
|
|
30
|
+
PrimaryAlternative = "text-primary-alternative",
|
|
31
|
+
/** For elements used on top of primary/default. */
|
|
32
|
+
PrimaryInverse = "text-primary-inverse",
|
|
33
|
+
/** For primary text in a pressed state. */
|
|
34
|
+
PrimaryDefaultPressed = "text-primary-defaultPressed",
|
|
35
|
+
/** For critical alert text. */
|
|
36
|
+
ErrorDefault = "text-error-default",
|
|
37
|
+
/** For stronger contrast error text. */
|
|
38
|
+
ErrorAlternative = "text-error-alternative",
|
|
39
|
+
/** For elements used on top of error/default. */
|
|
40
|
+
ErrorInverse = "text-error-inverse",
|
|
41
|
+
/** For critical alert text in a pressed state. */
|
|
42
|
+
ErrorDefaultPressed = "text-error-defaultPressed",
|
|
43
|
+
/** For caution alert text. */
|
|
44
|
+
WarningDefault = "text-warning-default",
|
|
45
|
+
/** For elements used on top of warning/default. */
|
|
46
|
+
WarningInverse = "text-warning-inverse",
|
|
47
|
+
/** For caution text in a pressed state. */
|
|
48
|
+
WarningDefaultPressed = "text-warning-defaultPressed",
|
|
49
|
+
/** For positive semantic text. */
|
|
50
|
+
SuccessDefault = "text-success-default",
|
|
51
|
+
/** For elements used on top of success/default. */
|
|
52
|
+
SuccessInverse = "text-success-inverse",
|
|
53
|
+
/** For positive text in a pressed state. */
|
|
54
|
+
SuccessDefaultPressed = "text-success-defaultPressed",
|
|
55
|
+
/** For informational read-only text. */
|
|
56
|
+
InfoDefault = "text-info-default",
|
|
57
|
+
/** For elements used on top of info/default. */
|
|
58
|
+
InfoInverse = "text-info-inverse",
|
|
59
|
+
/** Make the text color transparent. */
|
|
60
|
+
Transparent = "text-transparent"
|
|
51
61
|
}
|
|
52
62
|
export declare enum FontWeight {
|
|
53
63
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,oBAAY,WAAW;IAErB,SAAS,eAAe;IAGxB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;IAGxB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;CACnB;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,gCAAgC;IAChC,WAAW,
|
|
1
|
+
{"version":3,"file":"Text.types.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,oBAAY,WAAW;IAErB,SAAS,eAAe;IAGxB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;IAGxB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;CACnB;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,gCAAgC;IAChC,WAAW,sBAAsB;IACjC,uCAAuC;IACvC,eAAe,0BAA0B;IACzC,6DAA6D;IAC7D,SAAS,oBAAoB;IAC7B,uDAAuD;IACvD,cAAc,yBAAyB;IACvC,uDAAuD;IACvD,cAAc,yBAAyB;IACvC,2CAA2C;IAC3C,kBAAkB,6BAA6B;IAC/C,mDAAmD;IACnD,cAAc,yBAAyB;IACvC,2CAA2C;IAC3C,qBAAqB,gCAAgC;IACrD,+BAA+B;IAC/B,YAAY,uBAAuB;IACnC,wCAAwC;IACxC,gBAAgB,2BAA2B;IAC3C,iDAAiD;IACjD,YAAY,uBAAuB;IACnC,kDAAkD;IAClD,mBAAmB,8BAA8B;IACjD,8BAA8B;IAC9B,cAAc,yBAAyB;IACvC,mDAAmD;IACnD,cAAc,yBAAyB;IACvC,2CAA2C;IAC3C,qBAAqB,gCAAgC;IACrD,kCAAkC;IAClC,cAAc,yBAAyB;IACvC,mDAAmD;IACnD,cAAc,yBAAyB;IACvC,4CAA4C;IAC5C,qBAAqB,gCAAgC;IACrD,wCAAwC;IACxC,WAAW,sBAAsB;IACjC,gDAAgD;IAChD,WAAW,sBAAsB;IACjC,uCAAuC;IACvC,WAAW,qBAAqB;CACjC;AAED,oBAAY,UAAU;IACpB;;OAEG;IACH,IAAI,QAAQ;IACZ;;OAEG;IACH,MAAM,QAAQ;IACd;;OAEG;IACH,MAAM,QAAQ;CACf;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AACD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,WAAW,CAAC"}
|
|
@@ -24,37 +24,47 @@ var TextVariant;
|
|
|
24
24
|
var TextColor;
|
|
25
25
|
(function (TextColor) {
|
|
26
26
|
/** For default neutral text. */
|
|
27
|
-
TextColor["TextDefault"] = "text-default";
|
|
27
|
+
TextColor["TextDefault"] = "text-text-default";
|
|
28
28
|
/** For softer contrast neutral text */
|
|
29
|
-
TextColor["TextAlternative"] = "text-alternative";
|
|
29
|
+
TextColor["TextAlternative"] = "text-text-alternative";
|
|
30
30
|
/** For the softest contrast neutral text (not accessible) */
|
|
31
|
-
TextColor["TextMuted"] = "text-muted";
|
|
32
|
-
/** For elements used on top of overlay/alternative.
|
|
33
|
-
TextColor["OverlayInverse"] = "overlay-inverse";
|
|
34
|
-
/** For interactive, active, and selected semantics.
|
|
35
|
-
TextColor["PrimaryDefault"] = "primary-default";
|
|
36
|
-
/** For
|
|
37
|
-
TextColor["
|
|
38
|
-
/** For
|
|
39
|
-
TextColor["
|
|
40
|
-
/** For
|
|
41
|
-
TextColor["
|
|
42
|
-
/** For
|
|
43
|
-
TextColor["
|
|
44
|
-
/** For
|
|
45
|
-
TextColor["
|
|
46
|
-
/** For elements used on top of
|
|
47
|
-
TextColor["
|
|
48
|
-
/** For
|
|
49
|
-
TextColor["
|
|
50
|
-
/** For
|
|
51
|
-
TextColor["
|
|
52
|
-
/** For
|
|
53
|
-
TextColor["
|
|
54
|
-
/** For
|
|
55
|
-
TextColor["
|
|
56
|
-
/**
|
|
57
|
-
TextColor["
|
|
31
|
+
TextColor["TextMuted"] = "text-text-muted";
|
|
32
|
+
/** For elements used on top of overlay/alternative. */
|
|
33
|
+
TextColor["OverlayInverse"] = "text-overlay-inverse";
|
|
34
|
+
/** For interactive, active, and selected semantics. */
|
|
35
|
+
TextColor["PrimaryDefault"] = "text-primary-default";
|
|
36
|
+
/** For softer variants of primary text. */
|
|
37
|
+
TextColor["PrimaryAlternative"] = "text-primary-alternative";
|
|
38
|
+
/** For elements used on top of primary/default. */
|
|
39
|
+
TextColor["PrimaryInverse"] = "text-primary-inverse";
|
|
40
|
+
/** For primary text in a pressed state. */
|
|
41
|
+
TextColor["PrimaryDefaultPressed"] = "text-primary-defaultPressed";
|
|
42
|
+
/** For critical alert text. */
|
|
43
|
+
TextColor["ErrorDefault"] = "text-error-default";
|
|
44
|
+
/** For stronger contrast error text. */
|
|
45
|
+
TextColor["ErrorAlternative"] = "text-error-alternative";
|
|
46
|
+
/** For elements used on top of error/default. */
|
|
47
|
+
TextColor["ErrorInverse"] = "text-error-inverse";
|
|
48
|
+
/** For critical alert text in a pressed state. */
|
|
49
|
+
TextColor["ErrorDefaultPressed"] = "text-error-defaultPressed";
|
|
50
|
+
/** For caution alert text. */
|
|
51
|
+
TextColor["WarningDefault"] = "text-warning-default";
|
|
52
|
+
/** For elements used on top of warning/default. */
|
|
53
|
+
TextColor["WarningInverse"] = "text-warning-inverse";
|
|
54
|
+
/** For caution text in a pressed state. */
|
|
55
|
+
TextColor["WarningDefaultPressed"] = "text-warning-defaultPressed";
|
|
56
|
+
/** For positive semantic text. */
|
|
57
|
+
TextColor["SuccessDefault"] = "text-success-default";
|
|
58
|
+
/** For elements used on top of success/default. */
|
|
59
|
+
TextColor["SuccessInverse"] = "text-success-inverse";
|
|
60
|
+
/** For positive text in a pressed state. */
|
|
61
|
+
TextColor["SuccessDefaultPressed"] = "text-success-defaultPressed";
|
|
62
|
+
/** For informational read-only text. */
|
|
63
|
+
TextColor["InfoDefault"] = "text-info-default";
|
|
64
|
+
/** For elements used on top of info/default. */
|
|
65
|
+
TextColor["InfoInverse"] = "text-info-inverse";
|
|
66
|
+
/** Make the text color transparent. */
|
|
67
|
+
TextColor["Transparent"] = "text-transparent";
|
|
58
68
|
})(TextColor || (exports.TextColor = TextColor = {}));
|
|
59
69
|
var FontWeight;
|
|
60
70
|
(function (FontWeight) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.js","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,gBAAgB;IAChB,uCAAwB,CAAA;IAExB,gBAAgB;IAChB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IAExB,aAAa;IACb,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;AACpB,CAAC,EAdW,WAAW,2BAAX,WAAW,QActB;AAED;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"Text.types.js","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,gBAAgB;IAChB,uCAAwB,CAAA;IAExB,gBAAgB;IAChB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IAExB,aAAa;IACb,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;AACpB,CAAC,EAdW,WAAW,2BAAX,WAAW,QActB;AAED;;GAEG;AACH,IAAY,SA2CX;AA3CD,WAAY,SAAS;IACnB,gCAAgC;IAChC,8CAAiC,CAAA;IACjC,uCAAuC;IACvC,sDAAyC,CAAA;IACzC,6DAA6D;IAC7D,0CAA6B,CAAA;IAC7B,uDAAuD;IACvD,oDAAuC,CAAA;IACvC,uDAAuD;IACvD,oDAAuC,CAAA;IACvC,2CAA2C;IAC3C,4DAA+C,CAAA;IAC/C,mDAAmD;IACnD,oDAAuC,CAAA;IACvC,2CAA2C;IAC3C,kEAAqD,CAAA;IACrD,+BAA+B;IAC/B,gDAAmC,CAAA;IACnC,wCAAwC;IACxC,wDAA2C,CAAA;IAC3C,iDAAiD;IACjD,gDAAmC,CAAA;IACnC,kDAAkD;IAClD,8DAAiD,CAAA;IACjD,8BAA8B;IAC9B,oDAAuC,CAAA;IACvC,mDAAmD;IACnD,oDAAuC,CAAA;IACvC,2CAA2C;IAC3C,kEAAqD,CAAA;IACrD,kCAAkC;IAClC,oDAAuC,CAAA;IACvC,mDAAmD;IACnD,oDAAuC,CAAA;IACvC,4CAA4C;IAC5C,kEAAqD,CAAA;IACrD,wCAAwC;IACxC,8CAAiC,CAAA;IACjC,gDAAgD;IAChD,8CAAiC,CAAA;IACjC,uCAAuC;IACvC,6CAAgC,CAAA;AAClC,CAAC,EA3CW,SAAS,yBAAT,SAAS,QA2CpB;AAED,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;OAEG;IACH,0BAAY,CAAA;IACZ;;OAEG;IACH,4BAAc,CAAA;IACd;;OAEG;IACH,4BAAc,CAAA;AAChB,CAAC,EAbW,UAAU,0BAAV,UAAU,QAarB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACnB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB","sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\n// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\n/**\n * Text component variants.\n */\nexport enum TextVariant {\n // Display Sizes\n DisplayMd = 'display-md',\n\n // Heading Sizes\n HeadingLg = 'heading-lg',\n HeadingMd = 'heading-md',\n HeadingSm = 'heading-sm',\n\n // Body Sizes\n BodyLg = 'body-lg',\n BodyMd = 'body-md',\n BodySm = 'body-sm',\n BodyXs = 'body-xs',\n}\n\n/**\n * Text colors\n */\nexport enum TextColor {\n /** For default neutral text. */\n TextDefault = 'text-text-default',\n /** For softer contrast neutral text */\n TextAlternative = 'text-text-alternative',\n /** For the softest contrast neutral text (not accessible) */\n TextMuted = 'text-text-muted',\n /** For elements used on top of overlay/alternative. */\n OverlayInverse = 'text-overlay-inverse',\n /** For interactive, active, and selected semantics. */\n PrimaryDefault = 'text-primary-default',\n /** For softer variants of primary text. */\n PrimaryAlternative = 'text-primary-alternative',\n /** For elements used on top of primary/default. */\n PrimaryInverse = 'text-primary-inverse',\n /** For primary text in a pressed state. */\n PrimaryDefaultPressed = 'text-primary-defaultPressed',\n /** For critical alert text. */\n ErrorDefault = 'text-error-default',\n /** For stronger contrast error text. */\n ErrorAlternative = 'text-error-alternative',\n /** For elements used on top of error/default. */\n ErrorInverse = 'text-error-inverse',\n /** For critical alert text in a pressed state. */\n ErrorDefaultPressed = 'text-error-defaultPressed',\n /** For caution alert text. */\n WarningDefault = 'text-warning-default',\n /** For elements used on top of warning/default. */\n WarningInverse = 'text-warning-inverse',\n /** For caution text in a pressed state. */\n WarningDefaultPressed = 'text-warning-defaultPressed',\n /** For positive semantic text. */\n SuccessDefault = 'text-success-default',\n /** For elements used on top of success/default. */\n SuccessInverse = 'text-success-inverse',\n /** For positive text in a pressed state. */\n SuccessDefaultPressed = 'text-success-defaultPressed',\n /** For informational read-only text. */\n InfoDefault = 'text-info-default',\n /** For elements used on top of info/default. */\n InfoInverse = 'text-info-inverse',\n /** Make the text color transparent. */\n Transparent = 'text-transparent',\n}\n\nexport enum FontWeight {\n /**\n * Weight - 700\n */\n Bold = '700',\n /**\n * Weight - 500\n */\n Medium = '500',\n /**\n * Weight - 400\n */\n Normal = '400',\n}\n\nexport enum FontStyle {\n Italic = 'italic',\n Normal = 'normal',\n}\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to adjust the weight of the font.\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
|
|
@@ -14,7 +14,7 @@ import type { TextProps } from './Text.types';
|
|
|
14
14
|
*
|
|
15
15
|
* Example:
|
|
16
16
|
* ```
|
|
17
|
-
* const classNames =
|
|
17
|
+
* const classNames = generateTextClassNames({
|
|
18
18
|
* variant: TextVariant.BodyMd,
|
|
19
19
|
* color: TextColor.PrimaryDefault,
|
|
20
20
|
* fontWeight: FontWeight.Bold,
|
|
@@ -20,7 +20,7 @@ const Text_types_1 = require("./Text.types");
|
|
|
20
20
|
*
|
|
21
21
|
* Example:
|
|
22
22
|
* ```
|
|
23
|
-
* const classNames =
|
|
23
|
+
* const classNames = generateTextClassNames({
|
|
24
24
|
* variant: TextVariant.BodyMd,
|
|
25
25
|
* color: TextColor.PrimaryDefault,
|
|
26
26
|
* fontWeight: FontWeight.Bold,
|
|
@@ -37,7 +37,7 @@ const generateTextClassNames = ({ variant = Text_constants_1.DEFAULT_TEXT_VARIAN
|
|
|
37
37
|
const isItalic = fontStyle === Text_types_1.FontStyle.Italic;
|
|
38
38
|
const textClassname = `text-${variant}`;
|
|
39
39
|
const fontFamilyClassname = `font-${variant}${fontWeightStyleClassname}${isItalic ? '-italic' : ''}`;
|
|
40
|
-
const textColorClassname =
|
|
40
|
+
const textColorClassname = `${color}`;
|
|
41
41
|
const mergedClassnames = `${textClassname} ${fontFamilyClassname} ${textColorClassname} ${twClassName}`.trim();
|
|
42
42
|
return mergedClassnames;
|
|
43
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.utilities.js","sourceRoot":"","sources":["../../../src/components/Text/Text.utilities.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,wCAAwC;AACxC,qDAI0B;AAE1B,6CAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACI,MAAM,sBAAsB,GAAG,CAAC,EACrC,OAAO,GAAG,qCAAoB,EAC9B,KAAK,GAAG,mCAAkB,EAC1B,UAAU,GAAG,uBAAU,CAAC,MAAM,EAC9B,SAAS,GAAG,sBAAS,CAAC,MAAM,EAC5B,WAAW,GAAG,EAAE,GACG,EAAU,EAAE;IAC/B,MAAM,wBAAwB,GAC5B,+DAA8C,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,QAAQ,GAAG,SAAS,KAAK,sBAAS,CAAC,MAAM,CAAC;IAChD,MAAM,aAAa,GAAG,QAAQ,OAAO,EAAE,CAAC;IACxC,MAAM,mBAAmB,GAAG,QAAQ,OAAO,GAAG,wBAAwB,GACpE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACzB,EAAE,CAAC;IACH,MAAM,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"Text.utilities.js","sourceRoot":"","sources":["../../../src/components/Text/Text.utilities.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,wCAAwC;AACxC,qDAI0B;AAE1B,6CAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACI,MAAM,sBAAsB,GAAG,CAAC,EACrC,OAAO,GAAG,qCAAoB,EAC9B,KAAK,GAAG,mCAAkB,EAC1B,UAAU,GAAG,uBAAU,CAAC,MAAM,EAC9B,SAAS,GAAG,sBAAS,CAAC,MAAM,EAC5B,WAAW,GAAG,EAAE,GACG,EAAU,EAAE;IAC/B,MAAM,wBAAwB,GAC5B,+DAA8C,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,QAAQ,GAAG,SAAS,KAAK,sBAAS,CAAC,MAAM,CAAC;IAChD,MAAM,aAAa,GAAG,QAAQ,OAAO,EAAE,CAAC;IACxC,MAAM,mBAAmB,GAAG,QAAQ,OAAO,GAAG,wBAAwB,GACpE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACzB,EAAE,CAAC;IACH,MAAM,kBAAkB,GAAG,GAAG,KAAK,EAAE,CAAC;IACtC,MAAM,gBAAgB,GACpB,GAAG,aAAa,IAAI,mBAAmB,IAAI,kBAAkB,IAAI,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IAExF,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAnBW,QAAA,sBAAsB,0BAmBjC","sourcesContent":["/* eslint-disable jsdoc/check-param-names */\n/* eslint-disable jsdoc/require-param */\nimport {\n DEFAULT_TEXT_COLOR,\n DEFAULT_TEXT_VARIANT,\n MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\nimport { FontWeight, FontStyle } from './Text.types';\n\n/**\n * Generates a combined string of Tailwind CSS class names for the Text component\n * based on the provided props. This utility simplifies the process of combining\n * typography, color, font weight, and style classes, ensuring consistency with the\n * design system.\n *\n * @param variant - Specifies the typography variant (e.g., body, heading, display).\n * @param color - Specifies the text color based on the design system's color tokens.\n * @param fontWeight - Specifies the font weight (e.g., normal, bold).\n * @param fontStyle - Specifies the font style (e.g., normal, italic).\n * @param twClassName - Additional custom Tailwind class names to be appended to the generated classes.\n * @returns A string of combined Tailwind CSS class names.\n *\n * Example:\n * ```\n * const classNames = generateTextClassNames({\n * variant: TextVariant.BodyMd,\n * color: TextColor.PrimaryDefault,\n * fontWeight: FontWeight.Bold,\n * fontStyle: FontStyle.Italic,\n * twClassName: 'text-center underline',\n * });\n *\n * console.log(classNames);\n * // Output: \"text-body-md font-body-md-bold-italic text-primary-default text-center underline\"\n * ```\n */\nexport const generateTextClassNames = ({\n variant = DEFAULT_TEXT_VARIANT,\n color = DEFAULT_TEXT_COLOR,\n fontWeight = FontWeight.Normal,\n fontStyle = FontStyle.Normal,\n twClassName = '',\n}: Partial<TextProps>): string => {\n const fontWeightStyleClassname =\n MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME[fontWeight];\n const isItalic = fontStyle === FontStyle.Italic;\n const textClassname = `text-${variant}`;\n const fontFamilyClassname = `font-${variant}${fontWeightStyleClassname}${\n isItalic ? '-italic' : ''\n }`;\n const textColorClassname = `${color}`;\n const mergedClassnames =\n `${textClassname} ${fontFamilyClassname} ${textColorClassname} ${twClassName}`.trim();\n\n return mergedClassnames;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAiC;AAAxB,gHAAA,OAAO,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAiC;AAAxB,gHAAA,OAAO,OAAA;AAEhB,2CAA6E;AAApE,yGAAA,WAAW,OAAA;AAAE,uGAAA,SAAS,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,uGAAA,SAAS,OAAA","sourcesContent":["export { default } from './Text';\nexport type { TextProps } from './Text.types';\nexport { TextVariant, TextColor, FontWeight, FontStyle } from './Text.types';\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const Text: import("react").ForwardRefExoticComponent<
|
|
1
|
+
export declare const Text: import("react").ForwardRefExoticComponent<{
|
|
2
2
|
variant?: import("./components/Text").TextVariant | undefined;
|
|
3
3
|
children: import("react").ReactNode;
|
|
4
4
|
color?: import("./components/Text").TextColor | undefined;
|
|
5
5
|
fontWeight?: import("./components/Text").FontWeight | undefined;
|
|
6
6
|
fontStyle?: import("./components/Text").FontStyle | undefined;
|
|
7
7
|
twClassName?: string | undefined;
|
|
8
|
-
} & import("react-native").TextProps & import("react").RefAttributes<any
|
|
8
|
+
} & import("react-native").TextProps & import("react").RefAttributes<any>>;
|
|
9
9
|
export { TextVariant, TextColor, FontWeight, FontStyle, } from './components/Text';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI;;;;;;;0EAAmC,CAAC;AACrD,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonAnimatedProps } from './ButtonAnimated.types';
|
|
3
|
+
declare const ButtonAnimated: ({ onPressIn, onPressOut, disabled, ...props }: ButtonAnimatedProps) => React.JSX.Element;
|
|
4
|
+
export default ButtonAnimated;
|
|
5
|
+
//# sourceMappingURL=ButtonAnimated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,QAAA,MAAM,cAAc,kDAKjB,mBAAmB,sBAkCrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = __importDefault(require("react"));
|
|
30
|
+
const react_native_1 = require("react-native");
|
|
31
|
+
const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
32
|
+
const ButtonAnimated = ({ onPressIn, onPressOut, disabled, ...props }) => {
|
|
33
|
+
const animation = (0, react_native_reanimated_1.useSharedValue)(1);
|
|
34
|
+
const scaleStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
35
|
+
return {
|
|
36
|
+
transform: [{ scale: animation.value }],
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
const onPressInHandler = (event) => {
|
|
40
|
+
animation.value = (0, react_native_reanimated_1.withTiming)(0.97, {
|
|
41
|
+
duration: 100,
|
|
42
|
+
easing: react_native_reanimated_1.Easing.bezier(0.3, 0.8, 0.3, 1),
|
|
43
|
+
});
|
|
44
|
+
onPressIn?.(event);
|
|
45
|
+
};
|
|
46
|
+
const onPressOutHandler = (event) => {
|
|
47
|
+
animation.value = (0, react_native_reanimated_1.withTiming)(1, {
|
|
48
|
+
duration: 100,
|
|
49
|
+
easing: react_native_reanimated_1.Easing.bezier(0.3, 0.8, 0.3, 1),
|
|
50
|
+
});
|
|
51
|
+
onPressOut?.(event);
|
|
52
|
+
};
|
|
53
|
+
return (<react_native_reanimated_1.default.View style={scaleStyle}>
|
|
54
|
+
<react_native_1.Pressable onPressIn={onPressInHandler} onPressOut={onPressOutHandler} disabled={disabled} {...props}/>
|
|
55
|
+
</react_native_reanimated_1.default.View>);
|
|
56
|
+
};
|
|
57
|
+
exports.default = ButtonAnimated;
|
|
58
|
+
//# sourceMappingURL=ButtonAnimated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.js","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,+CAAyC;AACzC,mFAKiC;AAIjC,MAAM,cAAc,GAAG,CAAC,EACtB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,SAAS,GAAG,IAAA,wCAAc,EAAC,CAAC,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,IAAA,0CAAgB,EAAC,GAAG,EAAE;QACvC,OAAO;YACL,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;SACxC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;QACxD,SAAS,CAAC,KAAK,GAAG,IAAA,oCAAU,EAAC,IAAI,EAAE;YACjC,QAAQ,EAAE,GAAG;YACb,MAAM,EAAE,gCAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;SACxC,CAAC,CAAC;QACH,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,KAA4B,EAAE,EAAE;QACzD,SAAS,CAAC,KAAK,GAAG,IAAA,oCAAU,EAAC,CAAC,EAAE;YAC9B,QAAQ,EAAE,GAAG;YACb,MAAM,EAAE,gCAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;SACxC,CAAC,CAAC;QACH,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,iCAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAC/B;MAAA,CAAC,wBAAS,CACR,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAC5B,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAC9B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,IAAI,KAAK,CAAC,EAEd;IAAA,EAAE,iCAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["import React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport { Pressable } from 'react-native';\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withTiming,\n Easing,\n} from 'react-native-reanimated';\n\nimport type { ButtonAnimatedProps } from './ButtonAnimated.types';\n\nconst ButtonAnimated = ({\n onPressIn,\n onPressOut,\n disabled,\n ...props\n}: ButtonAnimatedProps) => {\n const animation = useSharedValue(1);\n const scaleStyle = useAnimatedStyle(() => {\n return {\n transform: [{ scale: animation.value }],\n };\n });\n\n const onPressInHandler = (event: GestureResponderEvent) => {\n animation.value = withTiming(0.97, {\n duration: 100,\n easing: Easing.bezier(0.3, 0.8, 0.3, 1),\n });\n onPressIn?.(event);\n };\n\n const onPressOutHandler = (event: GestureResponderEvent) => {\n animation.value = withTiming(1, {\n duration: 100,\n easing: Easing.bezier(0.3, 0.8, 0.3, 1),\n });\n onPressOut?.(event);\n };\n\n return (\n <Animated.View style={scaleStyle}>\n <Pressable\n onPressIn={onPressInHandler}\n onPressOut={onPressOutHandler}\n disabled={disabled}\n {...props}\n />\n </Animated.View>\n );\n};\n\nexport default ButtonAnimated;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.types.js","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PressableProps } from 'react-native';\n\n/**\n * ButtonAnimated component props.\n */\nexport type ButtonAnimatedProps = PressableProps;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var ButtonAnimated_1 = require("./ButtonAnimated");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ButtonAnimated_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA2C;AAAlC,0HAAA,OAAO,OAAA","sourcesContent":["export { default } from './ButtonAnimated';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextOrChildrenProps } from './TextOrChildren.types';
|
|
3
|
+
declare const TextOrChildren: ({ children, textProps }: TextOrChildrenProps) => React.JSX.Element;
|
|
4
|
+
export default TextOrChildren;
|
|
5
|
+
//# sourceMappingURL=TextOrChildren.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.d.ts","sourceRoot":"","sources":["../../../src/primitives/TextOrChildren/TextOrChildren.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,QAAA,MAAM,cAAc,4BAA6B,mBAAmB,sBAKnE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const Text_1 = __importDefault(require("../../components/Text"));
|
|
8
|
+
const TextOrChildren = ({ children, textProps }) => {
|
|
9
|
+
if (typeof children === 'string') {
|
|
10
|
+
return <Text_1.default {...textProps}>{children}</Text_1.default>;
|
|
11
|
+
}
|
|
12
|
+
return <>{children}</>;
|
|
13
|
+
};
|
|
14
|
+
exports.default = TextOrChildren;
|
|
15
|
+
//# sourceMappingURL=TextOrChildren.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.js","sourceRoot":"","sources":["../../../src/primitives/TextOrChildren/TextOrChildren.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAE1B,iEAAyC;AAGzC,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAuB,EAAE,EAAE;IACtE,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,OAAO,CAAC,cAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAI,CAAC,CAAC;KAC/C;IACD,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzB,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["import React from 'react';\n\nimport Text from '../../components/Text';\nimport type { TextOrChildrenProps } from './TextOrChildren.types';\n\nconst TextOrChildren = ({ children, textProps }: TextOrChildrenProps) => {\n if (typeof children === 'string') {\n return <Text {...textProps}>{children}</Text>;\n }\n return <>{children}</>;\n};\n\nexport default TextOrChildren;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TextProps } from '../../components/Text/Text.types';
|
|
2
|
+
/**
|
|
3
|
+
* TextOrChildren component props.
|
|
4
|
+
*/
|
|
5
|
+
export type TextOrChildrenProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Required prop for the content to be rendered
|
|
8
|
+
*/
|
|
9
|
+
children: React.ReactNode | string;
|
|
10
|
+
/**
|
|
11
|
+
* Optional props to be passed to the Text component when children is a string
|
|
12
|
+
*/
|
|
13
|
+
textProps?: Omit<Partial<TextProps>, 'children'>;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=TextOrChildren.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/TextOrChildren/TextOrChildren.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;CAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.types.js","sourceRoot":"","sources":["../../../src/primitives/TextOrChildren/TextOrChildren.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../../components/Text/Text.types';\n\n/**\n * TextOrChildren component props.\n */\nexport type TextOrChildrenProps = {\n /**\n * Required prop for the content to be rendered\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.constants.d.ts","sourceRoot":"","sources":["../../../src/temp-components/Spinner/Spinner.constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,YAAY,CAavD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_SPINNER_PROPS = void 0;
|
|
4
|
+
const Icon_1 = require("../../components/Icon");
|
|
5
|
+
const Text_1 = require("../../components/Text");
|
|
6
|
+
// Defaults
|
|
7
|
+
exports.DEFAULT_SPINNER_PROPS = {
|
|
8
|
+
color: Icon_1.IconColor.IconDefault,
|
|
9
|
+
spinnerIconProps: {
|
|
10
|
+
size: Icon_1.IconSize.Md,
|
|
11
|
+
testID: 'spinner-icon',
|
|
12
|
+
},
|
|
13
|
+
loadingText: 'Loading',
|
|
14
|
+
loadingTextProps: {
|
|
15
|
+
variant: Text_1.TextVariant.BodyMd,
|
|
16
|
+
color: Text_1.TextColor.TextDefault,
|
|
17
|
+
testID: 'spinner-text',
|
|
18
|
+
},
|
|
19
|
+
twClassName: '',
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Spinner.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.constants.js","sourceRoot":"","sources":["../../../src/temp-components/Spinner/Spinner.constants.ts"],"names":[],"mappings":";;;AAAA,gDAA4D;AAC5D,gDAA+D;AAG/D,WAAW;AACE,QAAA,qBAAqB,GAA0B;IAC1D,KAAK,EAAE,gBAAS,CAAC,WAAW;IAC5B,gBAAgB,EAAE;QAChB,IAAI,EAAE,eAAQ,CAAC,EAAE;QACjB,MAAM,EAAE,cAAc;KACvB;IACD,WAAW,EAAE,SAAS;IACtB,gBAAgB,EAAE;QAChB,OAAO,EAAE,kBAAW,CAAC,MAAM;QAC3B,KAAK,EAAE,gBAAS,CAAC,WAAW;QAC5B,MAAM,EAAE,cAAc;KACvB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC","sourcesContent":["import { IconColor, IconSize } from '../../components/Icon';\nimport { TextVariant, TextColor } from '../../components/Text';\nimport type { SpinnerProps } from './Spinner.types';\n\n// Defaults\nexport const DEFAULT_SPINNER_PROPS: Partial<SpinnerProps> = {\n color: IconColor.IconDefault,\n spinnerIconProps: {\n size: IconSize.Md,\n testID: 'spinner-icon',\n },\n loadingText: 'Loading',\n loadingTextProps: {\n variant: TextVariant.BodyMd,\n color: TextColor.TextDefault,\n testID: 'spinner-text',\n },\n twClassName: '',\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SpinnerProps } from './Spinner.types';
|
|
3
|
+
declare const Spinner: ({ color, spinnerIconProps, loadingText, loadingTextProps, twClassName, ...props }: SpinnerProps) => React.JSX.Element;
|
|
4
|
+
export default Spinner;
|
|
5
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/temp-components/Spinner/Spinner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAezC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,QAAA,MAAM,OAAO,sFAOV,YAAY,sBA4Cd,CAAC;AAEF,eAAe,OAAO,CAAC"}
|