@metamask/design-system-react-native 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -3
- package/dist/components/AvatarIcon/AvatarIcon.cjs +2 -1
- package/dist/components/AvatarIcon/AvatarIcon.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +16 -16
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.d.cts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.d.mts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.mjs +2 -1
- package/dist/components/AvatarIcon/AvatarIcon.mjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.types.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.types.d.cts +3 -13
- package/dist/components/AvatarIcon/AvatarIcon.types.d.cts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.types.d.mts +3 -13
- package/dist/components/AvatarIcon/AvatarIcon.types.d.mts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.types.mjs.map +1 -1
- package/dist/components/AvatarIcon/index.cjs +4 -4
- package/dist/components/AvatarIcon/index.cjs.map +1 -1
- package/dist/components/AvatarIcon/index.d.cts +1 -1
- package/dist/components/AvatarIcon/index.d.cts.map +1 -1
- package/dist/components/AvatarIcon/index.d.mts +1 -1
- package/dist/components/AvatarIcon/index.d.mts.map +1 -1
- package/dist/components/AvatarIcon/index.mjs +1 -1
- package/dist/components/AvatarIcon/index.mjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.cjs +2 -1
- package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.d.cts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.d.mts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.mjs +2 -1
- package/dist/components/BadgeIcon/BadgeIcon.mjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.types.cjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.types.d.cts +5 -7
- package/dist/components/BadgeIcon/BadgeIcon.types.d.cts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.types.d.mts +5 -7
- package/dist/components/BadgeIcon/BadgeIcon.types.d.mts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.types.mjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.cjs +8 -8
- package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +1 -1
- 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 -2
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/Box/Box.cjs +35 -12
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.constants.cjs.map +1 -1
- package/dist/components/Box/Box.constants.d.cts +1 -1
- package/dist/components/Box/Box.constants.d.cts.map +1 -1
- package/dist/components/Box/Box.constants.d.mts +1 -1
- package/dist/components/Box/Box.constants.d.mts.map +1 -1
- package/dist/components/Box/Box.constants.mjs.map +1 -1
- package/dist/components/Box/Box.d.cts +4 -2
- package/dist/components/Box/Box.d.cts.map +1 -1
- package/dist/components/Box/Box.d.mts +4 -2
- package/dist/components/Box/Box.d.mts.map +1 -1
- package/dist/components/Box/Box.mjs +13 -9
- package/dist/components/Box/Box.mjs.map +1 -1
- package/dist/components/Box/Box.types.cjs.map +1 -1
- package/dist/components/Box/Box.types.d.cts +3 -107
- package/dist/components/Box/Box.types.d.cts.map +1 -1
- package/dist/components/Box/Box.types.d.mts +3 -107
- package/dist/components/Box/Box.types.d.mts.map +1 -1
- package/dist/components/Box/Box.types.mjs.map +1 -1
- package/dist/components/Box/index.cjs +7 -7
- package/dist/components/Box/index.cjs.map +1 -1
- package/dist/components/Box/index.d.cts +1 -2
- package/dist/components/Box/index.d.cts.map +1 -1
- package/dist/components/Box/index.d.mts +1 -2
- package/dist/components/Box/index.d.mts.map +1 -1
- package/dist/components/Box/index.mjs +1 -1
- package/dist/components/Box/index.mjs.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.cjs +2 -2
- package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.mjs +1 -1
- package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.cjs +2 -2
- package/dist/components/BoxRow/BoxRow.cjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.d.cts.map +1 -1
- package/dist/components/BoxRow/BoxRow.d.mts.map +1 -1
- package/dist/components/BoxRow/BoxRow.mjs +1 -1
- package/dist/components/BoxRow/BoxRow.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +2 -3
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +2 -3
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
- package/dist/components/Icon/Icon.assets.cjs +284 -283
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +284 -283
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/Icon.types.cjs.map +1 -1
- package/dist/components/Icon/Icon.types.d.cts +2 -19
- package/dist/components/Icon/Icon.types.d.cts.map +1 -1
- package/dist/components/Icon/Icon.types.d.mts +2 -19
- package/dist/components/Icon/Icon.types.d.mts.map +1 -1
- package/dist/components/Icon/Icon.types.mjs.map +1 -1
- package/dist/components/Icon/assets/after-hours.svg +1 -1
- package/dist/components/Icon/assets/telegram.svg +3 -0
- package/dist/components/TabEmptyState/TabEmptyState.cjs +1 -1
- package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -1
- package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -1
- package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -1
- package/dist/components/TabEmptyState/TabEmptyState.mjs +1 -1
- package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -1
- package/dist/components/Tag/Tag.cjs +45 -0
- package/dist/components/Tag/Tag.cjs.map +1 -0
- package/dist/components/Tag/Tag.constants.cjs +27 -0
- package/dist/components/Tag/Tag.constants.cjs.map +1 -0
- package/dist/components/Tag/Tag.constants.d.cts +6 -0
- package/dist/components/Tag/Tag.constants.d.cts.map +1 -0
- package/dist/components/Tag/Tag.constants.d.mts +6 -0
- package/dist/components/Tag/Tag.constants.d.mts.map +1 -0
- package/dist/components/Tag/Tag.constants.mjs +24 -0
- package/dist/components/Tag/Tag.constants.mjs.map +1 -0
- package/dist/components/Tag/Tag.d.cts +4 -0
- package/dist/components/Tag/Tag.d.cts.map +1 -0
- package/dist/components/Tag/Tag.d.mts +4 -0
- package/dist/components/Tag/Tag.d.mts.map +1 -0
- package/dist/components/Tag/Tag.mjs +45 -0
- package/dist/components/Tag/Tag.mjs.map +1 -0
- package/dist/components/Tag/Tag.types.cjs +3 -0
- package/dist/components/Tag/Tag.types.cjs.map +1 -0
- package/dist/components/Tag/Tag.types.d.cts +38 -0
- package/dist/components/Tag/Tag.types.d.cts.map +1 -0
- package/dist/components/Tag/Tag.types.d.mts +38 -0
- package/dist/components/Tag/Tag.types.d.mts.map +1 -0
- package/dist/components/Tag/Tag.types.mjs +2 -0
- package/dist/components/Tag/Tag.types.mjs.map +1 -0
- package/dist/components/Tag/index.cjs +8 -0
- package/dist/components/Tag/index.cjs.map +1 -0
- package/dist/components/Tag/index.d.cts +4 -0
- package/dist/components/Tag/index.d.cts.map +1 -0
- package/dist/components/Tag/index.d.mts +4 -0
- package/dist/components/Tag/index.d.mts.map +1 -0
- package/dist/components/Tag/index.mjs +3 -0
- package/dist/components/Tag/index.mjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.cjs +58 -0
- package/dist/components/TitleStandard/TitleStandard.cjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.d.cts +23 -0
- package/dist/components/TitleStandard/TitleStandard.d.cts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.d.mts +23 -0
- package/dist/components/TitleStandard/TitleStandard.d.mts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.mjs +58 -0
- package/dist/components/TitleStandard/TitleStandard.mjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.cjs +3 -0
- package/dist/components/TitleStandard/TitleStandard.types.cjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.cts +31 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.mts +31 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.mjs +2 -0
- package/dist/components/TitleStandard/TitleStandard.types.mjs.map +1 -0
- package/dist/components/TitleStandard/index.cjs +6 -0
- package/dist/components/TitleStandard/index.cjs.map +1 -0
- package/dist/components/TitleStandard/index.d.cts +3 -0
- package/dist/components/TitleStandard/index.d.cts.map +1 -0
- package/dist/components/TitleStandard/index.d.mts +3 -0
- package/dist/components/TitleStandard/index.d.mts.map +1 -0
- package/dist/components/TitleStandard/index.mjs +2 -0
- package/dist/components/TitleStandard/index.mjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.cjs +85 -0
- package/dist/components/TitleSubpage/TitleSubpage.cjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.cts +30 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.cts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.mts +30 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.mts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.mjs +85 -0
- package/dist/components/TitleSubpage/TitleSubpage.mjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.cjs +3 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.cjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +44 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +44 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.mjs +2 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.mjs.map +1 -0
- package/dist/components/TitleSubpage/index.cjs +6 -0
- package/dist/components/TitleSubpage/index.cjs.map +1 -0
- package/dist/components/TitleSubpage/index.d.cts +3 -0
- package/dist/components/TitleSubpage/index.d.cts.map +1 -0
- package/dist/components/TitleSubpage/index.d.mts +3 -0
- package/dist/components/TitleSubpage/index.d.mts.map +1 -0
- package/dist/components/TitleSubpage/index.mjs +2 -0
- package/dist/components/TitleSubpage/index.mjs.map +1 -0
- package/dist/components/Toast/Toast.d.cts +1 -1
- package/dist/components/Toast/Toast.d.mts +1 -1
- package/dist/components/Toast/Toast.types.cjs.map +1 -1
- package/dist/components/Toast/Toast.types.d.cts +1 -2
- package/dist/components/Toast/Toast.types.d.cts.map +1 -1
- package/dist/components/Toast/Toast.types.d.mts +1 -2
- package/dist/components/Toast/Toast.types.d.mts.map +1 -1
- package/dist/components/Toast/Toast.types.mjs.map +1 -1
- package/dist/components/index.cjs +9 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +6 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +6 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +3 -0
- package/dist/components/index.mjs.map +1 -1
- package/dist/types/index.cjs +8 -542
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +4 -531
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +4 -531
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +4 -540
- package/dist/types/index.mjs.map +1 -1
- package/package.json +3 -4
|
@@ -1,113 +1,9 @@
|
|
|
1
|
+
import type { BoxPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { ViewProps } from "react-native/index.js";
|
|
2
|
-
|
|
3
|
-
export type BoxProps = {
|
|
4
|
-
/**
|
|
5
|
-
* The flexDirection style of the component.
|
|
6
|
-
*/
|
|
7
|
-
flexDirection?: BoxFlexDirection;
|
|
8
|
-
/**
|
|
9
|
-
* The flexWrap style of the component.
|
|
10
|
-
*/
|
|
11
|
-
flexWrap?: BoxFlexWrap;
|
|
12
|
-
/**
|
|
13
|
-
* The gap between the component's children.
|
|
14
|
-
* Use 1-12 for a gap of 4px-48px.
|
|
15
|
-
*/
|
|
16
|
-
gap?: BoxSpacing;
|
|
17
|
-
/**
|
|
18
|
-
* The alignItems style of the component.
|
|
19
|
-
*/
|
|
20
|
-
alignItems?: BoxAlignItems;
|
|
21
|
-
/**
|
|
22
|
-
* The justifyContent style of the component.
|
|
23
|
-
*/
|
|
24
|
-
justifyContent?: BoxJustifyContent;
|
|
25
|
-
/**
|
|
26
|
-
* The margin of the component.
|
|
27
|
-
* Use 1-12 for margin of 4px-48px.
|
|
28
|
-
*/
|
|
29
|
-
margin?: BoxSpacing;
|
|
30
|
-
/**
|
|
31
|
-
* The top margin of the component.
|
|
32
|
-
* Use 1-12 for margin of 4px-48px.
|
|
33
|
-
*/
|
|
34
|
-
marginTop?: BoxSpacing;
|
|
35
|
-
/**
|
|
36
|
-
* The right margin of the component.
|
|
37
|
-
* Use 1-12 for margin of 4px-48px.
|
|
38
|
-
*/
|
|
39
|
-
marginRight?: BoxSpacing;
|
|
40
|
-
/**
|
|
41
|
-
* The bottom margin of the component.
|
|
42
|
-
* Use 1-12 for margin of 4px-48px.
|
|
43
|
-
*/
|
|
44
|
-
marginBottom?: BoxSpacing;
|
|
45
|
-
/**
|
|
46
|
-
* The left margin of the component.
|
|
47
|
-
* Use 1-12 for margin of 4px-48px.
|
|
48
|
-
*/
|
|
49
|
-
marginLeft?: BoxSpacing;
|
|
50
|
-
/**
|
|
51
|
-
* The horizontal margin of the component.
|
|
52
|
-
* Use 1-12 for margin of 4px-48px.
|
|
53
|
-
*/
|
|
54
|
-
marginHorizontal?: BoxSpacing;
|
|
55
|
-
/**
|
|
56
|
-
* The vertical margin of the component.
|
|
57
|
-
* Use 1-12 for margin of 4px-48px.
|
|
58
|
-
*/
|
|
59
|
-
marginVertical?: BoxSpacing;
|
|
60
|
-
/**
|
|
61
|
-
* The padding of the component.
|
|
62
|
-
* Use 1-12 for padding of 4px-48px.
|
|
63
|
-
*/
|
|
64
|
-
padding?: BoxSpacing;
|
|
65
|
-
/**
|
|
66
|
-
* The top padding of the component.
|
|
67
|
-
* Use 1-12 for padding of 4px-48px.
|
|
68
|
-
*/
|
|
69
|
-
paddingTop?: BoxSpacing;
|
|
70
|
-
/**
|
|
71
|
-
* The right padding of the component.
|
|
72
|
-
* Use 1-12 for padding of 4px-48px.
|
|
73
|
-
*/
|
|
74
|
-
paddingRight?: BoxSpacing;
|
|
75
|
-
/**
|
|
76
|
-
* The bottom padding of the component.
|
|
77
|
-
* Use 1-12 for padding of 4px-48px.
|
|
78
|
-
*/
|
|
79
|
-
paddingBottom?: BoxSpacing;
|
|
80
|
-
/**
|
|
81
|
-
* The left padding of the component.
|
|
82
|
-
* Use 1-12 for padding of 4px-48px.
|
|
83
|
-
*/
|
|
84
|
-
paddingLeft?: BoxSpacing;
|
|
85
|
-
/**
|
|
86
|
-
* The horizontal padding of the component.
|
|
87
|
-
* Use 1-12 for padding of 4px-48px.
|
|
88
|
-
*/
|
|
89
|
-
paddingHorizontal?: BoxSpacing;
|
|
90
|
-
/**
|
|
91
|
-
* The vertical padding of the component.
|
|
92
|
-
* Use 1-12 for padding of 4px-48px.
|
|
93
|
-
*/
|
|
94
|
-
paddingVertical?: BoxSpacing;
|
|
95
|
-
/**
|
|
96
|
-
* The border width of the component.
|
|
97
|
-
* Use 0, 1, 2, 4, or 8 for border width of 0px, 1px, 2px, 4px, or 8px.
|
|
98
|
-
*/
|
|
99
|
-
borderWidth?: BoxBorderWidth;
|
|
100
|
-
/**
|
|
101
|
-
* The border color of the component.
|
|
102
|
-
*/
|
|
103
|
-
borderColor?: BoxBorderColor;
|
|
104
|
-
/**
|
|
105
|
-
* The background color of the component.
|
|
106
|
-
*/
|
|
107
|
-
backgroundColor?: BoxBackgroundColor;
|
|
3
|
+
export type BoxProps = BoxPropsShared & ViewProps & {
|
|
108
4
|
/**
|
|
109
5
|
* Optional prop to add twrnc overriding classNames.
|
|
110
6
|
*/
|
|
111
7
|
twClassName?: string;
|
|
112
|
-
}
|
|
8
|
+
};
|
|
113
9
|
//# sourceMappingURL=Box.types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.d.cts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Box.types.d.cts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,uCAAuC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C,MAAM,MAAM,QAAQ,GAAG,cAAc,GACnC,SAAS,GAAG;IACV;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1,113 +1,9 @@
|
|
|
1
|
+
import type { BoxPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { ViewProps } from "react-native/index.js";
|
|
2
|
-
|
|
3
|
-
export type BoxProps = {
|
|
4
|
-
/**
|
|
5
|
-
* The flexDirection style of the component.
|
|
6
|
-
*/
|
|
7
|
-
flexDirection?: BoxFlexDirection;
|
|
8
|
-
/**
|
|
9
|
-
* The flexWrap style of the component.
|
|
10
|
-
*/
|
|
11
|
-
flexWrap?: BoxFlexWrap;
|
|
12
|
-
/**
|
|
13
|
-
* The gap between the component's children.
|
|
14
|
-
* Use 1-12 for a gap of 4px-48px.
|
|
15
|
-
*/
|
|
16
|
-
gap?: BoxSpacing;
|
|
17
|
-
/**
|
|
18
|
-
* The alignItems style of the component.
|
|
19
|
-
*/
|
|
20
|
-
alignItems?: BoxAlignItems;
|
|
21
|
-
/**
|
|
22
|
-
* The justifyContent style of the component.
|
|
23
|
-
*/
|
|
24
|
-
justifyContent?: BoxJustifyContent;
|
|
25
|
-
/**
|
|
26
|
-
* The margin of the component.
|
|
27
|
-
* Use 1-12 for margin of 4px-48px.
|
|
28
|
-
*/
|
|
29
|
-
margin?: BoxSpacing;
|
|
30
|
-
/**
|
|
31
|
-
* The top margin of the component.
|
|
32
|
-
* Use 1-12 for margin of 4px-48px.
|
|
33
|
-
*/
|
|
34
|
-
marginTop?: BoxSpacing;
|
|
35
|
-
/**
|
|
36
|
-
* The right margin of the component.
|
|
37
|
-
* Use 1-12 for margin of 4px-48px.
|
|
38
|
-
*/
|
|
39
|
-
marginRight?: BoxSpacing;
|
|
40
|
-
/**
|
|
41
|
-
* The bottom margin of the component.
|
|
42
|
-
* Use 1-12 for margin of 4px-48px.
|
|
43
|
-
*/
|
|
44
|
-
marginBottom?: BoxSpacing;
|
|
45
|
-
/**
|
|
46
|
-
* The left margin of the component.
|
|
47
|
-
* Use 1-12 for margin of 4px-48px.
|
|
48
|
-
*/
|
|
49
|
-
marginLeft?: BoxSpacing;
|
|
50
|
-
/**
|
|
51
|
-
* The horizontal margin of the component.
|
|
52
|
-
* Use 1-12 for margin of 4px-48px.
|
|
53
|
-
*/
|
|
54
|
-
marginHorizontal?: BoxSpacing;
|
|
55
|
-
/**
|
|
56
|
-
* The vertical margin of the component.
|
|
57
|
-
* Use 1-12 for margin of 4px-48px.
|
|
58
|
-
*/
|
|
59
|
-
marginVertical?: BoxSpacing;
|
|
60
|
-
/**
|
|
61
|
-
* The padding of the component.
|
|
62
|
-
* Use 1-12 for padding of 4px-48px.
|
|
63
|
-
*/
|
|
64
|
-
padding?: BoxSpacing;
|
|
65
|
-
/**
|
|
66
|
-
* The top padding of the component.
|
|
67
|
-
* Use 1-12 for padding of 4px-48px.
|
|
68
|
-
*/
|
|
69
|
-
paddingTop?: BoxSpacing;
|
|
70
|
-
/**
|
|
71
|
-
* The right padding of the component.
|
|
72
|
-
* Use 1-12 for padding of 4px-48px.
|
|
73
|
-
*/
|
|
74
|
-
paddingRight?: BoxSpacing;
|
|
75
|
-
/**
|
|
76
|
-
* The bottom padding of the component.
|
|
77
|
-
* Use 1-12 for padding of 4px-48px.
|
|
78
|
-
*/
|
|
79
|
-
paddingBottom?: BoxSpacing;
|
|
80
|
-
/**
|
|
81
|
-
* The left padding of the component.
|
|
82
|
-
* Use 1-12 for padding of 4px-48px.
|
|
83
|
-
*/
|
|
84
|
-
paddingLeft?: BoxSpacing;
|
|
85
|
-
/**
|
|
86
|
-
* The horizontal padding of the component.
|
|
87
|
-
* Use 1-12 for padding of 4px-48px.
|
|
88
|
-
*/
|
|
89
|
-
paddingHorizontal?: BoxSpacing;
|
|
90
|
-
/**
|
|
91
|
-
* The vertical padding of the component.
|
|
92
|
-
* Use 1-12 for padding of 4px-48px.
|
|
93
|
-
*/
|
|
94
|
-
paddingVertical?: BoxSpacing;
|
|
95
|
-
/**
|
|
96
|
-
* The border width of the component.
|
|
97
|
-
* Use 0, 1, 2, 4, or 8 for border width of 0px, 1px, 2px, 4px, or 8px.
|
|
98
|
-
*/
|
|
99
|
-
borderWidth?: BoxBorderWidth;
|
|
100
|
-
/**
|
|
101
|
-
* The border color of the component.
|
|
102
|
-
*/
|
|
103
|
-
borderColor?: BoxBorderColor;
|
|
104
|
-
/**
|
|
105
|
-
* The background color of the component.
|
|
106
|
-
*/
|
|
107
|
-
backgroundColor?: BoxBackgroundColor;
|
|
3
|
+
export type BoxProps = BoxPropsShared & ViewProps & {
|
|
108
4
|
/**
|
|
109
5
|
* Optional prop to add twrnc overriding classNames.
|
|
110
6
|
*/
|
|
111
7
|
twClassName?: string;
|
|
112
|
-
}
|
|
8
|
+
};
|
|
113
9
|
//# sourceMappingURL=Box.types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.d.mts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Box.types.d.mts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,uCAAuC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C,MAAM,MAAM,QAAQ,GAAG,cAAc,GACnC,SAAS,GAAG;IACV;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.mjs","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Box.types.mjs","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nexport type BoxProps = BoxPropsShared &\n ViewProps & {\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Box = exports.BoxBorderColor = exports.BoxBackgroundColor = exports.BoxJustifyContent = exports.BoxAlignItems = exports.BoxFlexWrap = exports.BoxFlexDirection = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "BoxFlexDirection", { enumerable: true, get: function () { return
|
|
6
|
-
Object.defineProperty(exports, "BoxFlexWrap", { enumerable: true, get: function () { return
|
|
7
|
-
Object.defineProperty(exports, "BoxAlignItems", { enumerable: true, get: function () { return
|
|
8
|
-
Object.defineProperty(exports, "BoxJustifyContent", { enumerable: true, get: function () { return
|
|
9
|
-
Object.defineProperty(exports, "BoxBackgroundColor", { enumerable: true, get: function () { return
|
|
10
|
-
Object.defineProperty(exports, "BoxBorderColor", { enumerable: true, get: function () { return
|
|
4
|
+
var design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "BoxFlexDirection", { enumerable: true, get: function () { return design_system_shared_1.BoxFlexDirection; } });
|
|
6
|
+
Object.defineProperty(exports, "BoxFlexWrap", { enumerable: true, get: function () { return design_system_shared_1.BoxFlexWrap; } });
|
|
7
|
+
Object.defineProperty(exports, "BoxAlignItems", { enumerable: true, get: function () { return design_system_shared_1.BoxAlignItems; } });
|
|
8
|
+
Object.defineProperty(exports, "BoxJustifyContent", { enumerable: true, get: function () { return design_system_shared_1.BoxJustifyContent; } });
|
|
9
|
+
Object.defineProperty(exports, "BoxBackgroundColor", { enumerable: true, get: function () { return design_system_shared_1.BoxBackgroundColor; } });
|
|
10
|
+
Object.defineProperty(exports, "BoxBorderColor", { enumerable: true, get: function () { return design_system_shared_1.BoxBorderColor; } });
|
|
11
11
|
var Box_1 = require("./Box.cjs");
|
|
12
12
|
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return Box_1.Box; } });
|
|
13
13
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":";;;AAAA,uEASwC;AARtC,wHAAA,gBAAgB,OAAA;AAChB,mHAAA,WAAW,OAAA;AACX,qHAAA,aAAa,OAAA;AACb,yHAAA,iBAAiB,OAAA;AACjB,0HAAA,kBAAkB,OAAA;AAClB,sHAAA,cAAc,OAAA;AAIhB,iCAA4B;AAAnB,0FAAA,GAAG,OAAA","sourcesContent":["export {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n type BoxSpacing,\n type BoxBorderWidth,\n} from '@metamask/design-system-shared';\nexport { Box } from './Box';\nexport type { BoxProps } from './Box.types';\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, } from "
|
|
2
|
-
export type { BoxSpacing, BoxBorderWidth } from "../../types/index.cjs";
|
|
1
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, type BoxSpacing, type BoxBorderWidth, } from "@metamask/design-system-shared";
|
|
3
2
|
export { Box } from "./Box.cjs";
|
|
4
3
|
export type { BoxProps } from "./Box.types.cjs";
|
|
5
4
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,cAAc,GACpB,uCAAuC;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,YAAY,EAAE,QAAQ,EAAE,wBAAoB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, } from "
|
|
2
|
-
export type { BoxSpacing, BoxBorderWidth } from "../../types/index.mjs";
|
|
1
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, type BoxSpacing, type BoxBorderWidth, } from "@metamask/design-system-shared";
|
|
3
2
|
export { Box } from "./Box.mjs";
|
|
4
3
|
export type { BoxProps } from "./Box.types.mjs";
|
|
5
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,cAAc,GACpB,uCAAuC;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,YAAY,EAAE,QAAQ,EAAE,wBAAoB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor } from "
|
|
1
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor } from "@metamask/design-system-shared";
|
|
2
2
|
export { Box } from "./Box.mjs";
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EAGf,uCAAuC;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAc","sourcesContent":["export {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n type BoxSpacing,\n type BoxBorderWidth,\n} from '@metamask/design-system-shared';\nexport { Box } from './Box';\nexport type { BoxProps } from './Box.types';\n"]}
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BoxColumn = void 0;
|
|
7
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const types_1 = require("../../types/index.cjs");
|
|
9
9
|
const Box_1 = require("../Box/index.cjs");
|
|
10
10
|
const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
|
|
11
|
-
const BoxColumn = ({ children, textProps, topAccessory, bottomAccessory, twClassName, ...rest }) => (<Box_1.Box flexDirection={
|
|
11
|
+
const BoxColumn = ({ children, textProps, topAccessory, bottomAccessory, twClassName, ...rest }) => (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Column} twClassName={twClassName} {...rest}>
|
|
12
12
|
{topAccessory}
|
|
13
13
|
<TextOrChildren_1.TextOrChildren textProps={textProps}>{children}</TextOrChildren_1.TextOrChildren>
|
|
14
14
|
{bottomAccessory}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxColumn.cjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"BoxColumn.cjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAAkE;AAClE,kDAA0B;AAE1B,0CAA6B;AAC7B,gFAAmE;AAI5D,MAAM,SAAS,GAAG,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,GAAG,IAAI,EACQ,EAAE,EAAE,CAAC,CACpB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,uCAAgB,CAAC,MAAM,CAAC,CACvC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,YAAY,CACb;IAAA,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,+BAAc,CAChE;IAAA,CAAC,eAAe,CAClB;EAAA,EAAE,SAAG,CAAC,CACP,CAAC;AAjBW,QAAA,SAAS,aAiBpB;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { BoxFlexDirection } from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxColumnProps } from './BoxColumn.types';\n\nexport const BoxColumn = ({\n children,\n textProps,\n topAccessory,\n bottomAccessory,\n twClassName,\n ...rest\n}: BoxColumnProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n twClassName={twClassName}\n {...rest}\n >\n {topAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {bottomAccessory}\n </Box>\n);\n\nBoxColumn.displayName = 'BoxColumn';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxColumn.d.cts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoxColumn.d.cts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS;mFAOnB,cAAc;;CAUhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxColumn.d.mts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoxColumn.d.mts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS;mFAOnB,cAAc;;CAUhB,CAAC"}
|
|
@@ -4,9 +4,9 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
+
import { BoxFlexDirection } from "@metamask/design-system-shared";
|
|
7
8
|
import $React from "react";
|
|
8
9
|
const React = $importDefault($React);
|
|
9
|
-
import { BoxFlexDirection } from "../../types/index.mjs";
|
|
10
10
|
import { Box } from "../Box/index.mjs";
|
|
11
11
|
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
12
12
|
export const BoxColumn = ({ children, textProps, topAccessory, bottomAccessory, twClassName, ...rest }) => (<Box flexDirection={BoxFlexDirection.Column} twClassName={twClassName} {...rest}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxColumn.mjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BoxColumn.mjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,uCAAuC;AAClE,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,GAAG,IAAI,EACQ,EAAE,EAAE,CAAC,CACpB,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CACvC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,YAAY,CACb;IAAA,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAChE;IAAA,CAAC,eAAe,CAClB;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { BoxFlexDirection } from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxColumnProps } from './BoxColumn.types';\n\nexport const BoxColumn = ({\n children,\n textProps,\n topAccessory,\n bottomAccessory,\n twClassName,\n ...rest\n}: BoxColumnProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n twClassName={twClassName}\n {...rest}\n >\n {topAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {bottomAccessory}\n </Box>\n);\n\nBoxColumn.displayName = 'BoxColumn';\n"]}
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BoxRow = void 0;
|
|
7
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const types_1 = require("../../types/index.cjs");
|
|
9
9
|
const Box_1 = require("../Box/index.cjs");
|
|
10
10
|
const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
|
|
11
|
-
const BoxRow = ({ children, textProps, startAccessory, endAccessory, twClassName, ...rest }) => (<Box_1.Box flexDirection={
|
|
11
|
+
const BoxRow = ({ children, textProps, startAccessory, endAccessory, twClassName, ...rest }) => (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} twClassName={twClassName} {...rest}>
|
|
12
12
|
{startAccessory}
|
|
13
13
|
<TextOrChildren_1.TextOrChildren textProps={textProps}>{children}</TextOrChildren_1.TextOrChildren>
|
|
14
14
|
{endAccessory}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxRow.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"BoxRow.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAGwC;AACxC,kDAA0B;AAE1B,0CAA6B;AAC7B,gFAAmE;AAI5D,MAAM,MAAM,GAAG,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,GAAG,IAAI,EACK,EAAE,EAAE,CAAC,CACjB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,uCAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,cAAc,CACf;IAAA,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,+BAAc,CAChE;IAAA,CAAC,YAAY,CACf;EAAA,EAAE,SAAG,CAAC,CACP,CAAC;AAnBW,QAAA,MAAM,UAmBjB;AAEF,cAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxRowProps } from './BoxRow.types';\n\nexport const BoxRow = ({\n children,\n textProps,\n startAccessory,\n endAccessory,\n twClassName,\n ...rest\n}: BoxRowProps) => (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName={twClassName}\n {...rest}\n >\n {startAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {endAccessory}\n </Box>\n);\n\nBoxRow.displayName = 'BoxRow';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxRow.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoxRow.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAElD,eAAO,MAAM,MAAM;kFAOhB,WAAW;;CAYb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxRow.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoxRow.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAElD,eAAO,MAAM,MAAM;kFAOhB,WAAW;;CAYb,CAAC"}
|
|
@@ -4,9 +4,9 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
+
import { BoxAlignItems, BoxFlexDirection } from "@metamask/design-system-shared";
|
|
7
8
|
import $React from "react";
|
|
8
9
|
const React = $importDefault($React);
|
|
9
|
-
import { BoxAlignItems, BoxFlexDirection } from "../../types/index.mjs";
|
|
10
10
|
import { Box } from "../Box/index.mjs";
|
|
11
11
|
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
12
12
|
export const BoxRow = ({ children, textProps, startAccessory, endAccessory, twClassName, ...rest }) => (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} twClassName={twClassName} {...rest}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxRow.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BoxRow.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EACjB,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,GAAG,IAAI,EACK,EAAE,EAAE,CAAC,CACjB,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,cAAc,CACf;IAAA,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAChE;IAAA,CAAC,YAAY,CACf;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxRowProps } from './BoxRow.types';\n\nexport const BoxRow = ({\n children,\n textProps,\n startAccessory,\n endAccessory,\n twClassName,\n ...rest\n}: BoxRowProps) => (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName={twClassName}\n {...rest}\n >\n {startAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {endAccessory}\n </Box>\n);\n\nBoxRow.displayName = 'BoxRow';\n"]}
|
|
@@ -77,9 +77,8 @@ const ButtonTertiary = ({ children, textProps, spinnerProps, startIconProps, end
|
|
|
77
77
|
if (isInverse) {
|
|
78
78
|
return 'text-primary-inverse';
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
: 'text-primary-default';
|
|
80
|
+
// Use neutral text color for all states (default, pressed, loading)
|
|
81
|
+
return 'text-default';
|
|
83
82
|
}, [isDanger, isInverse, isLoading]);
|
|
84
83
|
return (<ButtonBase_1.ButtonBase textProps={{
|
|
85
84
|
variant: Text_1.TextVariant.BodyMd,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.cjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAE3C,8DAAiD;AACjD,kDAAyC;AACzC,kDAAwD;AAIjD,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,KAAK,EACjB,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EACvC,CAAC,OAAgB,EA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AC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAC9C,CAAC;IAEF,MAAM,gBAAgB,GAAG,IAAA,mBAAW,EAClC,CAAC,OAAgB,EAAU,EAAE;QAC3B,IAAI,QAAQ,EAAE;YACZ,OAAO,OAAO,IAAI,SAAS;gBACzB,CAAC,CAAC,4BAA4B;gBAC9B,CAAC,CAAC,oBAAoB,CAAC;SAC1B;QACD,IAAI,SAAS,EAAE;YACb,OAAO,sBAAsB,CAAC;SAC/B;QACD,
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.cjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAE3C,8DAAiD;AACjD,kDAAyC;AACzC,kDAAwD;AAIjD,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,KAAK,EACjB,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EACvC,CAAC,OAAgB,EAAU,EAAE;QAC3B,MAAM,YAAY,GAChB,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAEzE,MAAM,WAAW,GAAG;UAChB,SAAS,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU;UACtD,YAAY;OACf,CAAC;QAEF,IAAI,eAAe,GAAG,EAAE,CAAC;QACzB,IAAI,WAAW,GAAG,EAAE,CAAC;QAErB,IAAI,SAAS,IAAI,QAAQ,EAAE;YACzB,eAAe;gBACb,OAAO,IAAI,SAAS,CA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,CAAC,CACjC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,kBAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,iBAAU,CAAC,MAAM;YAC7B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,SAAS;SACb,CAAC,CACF,YAAY,CAAC,CAAC;YACZ,GAAG,YAAY;SAChB,CAAC,CACF,cAAc,CAAC,CAAC;YACd,IAAI,EAAE,eAAQ,CAAC,EAAE;YACjB,GAAG,cAAc;SAClB,CAAC,CACF,YAAY,CAAC,CAAC;YACZ,IAAI,EAAE,eAAQ,CAAC,EAAE;YACjB,GAAG,YAAY;SAChB,CAAC,CACF,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,WAAW,CAAC,CAAC,qBAAqB,CAAC,CACnC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAxGW,QAAA,cAAc,kBAwGzB","sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ButtonBase } from '../../../ButtonBase';\nimport { IconSize } from '../../../Icon';\nimport { TextVariant, FontWeight } from '../../../Text';\n\nimport type { ButtonTertiaryProps } from './ButtonTertiary.types';\n\nexport const ButtonTertiary = ({\n children,\n textProps,\n spinnerProps,\n startIconProps,\n endIconProps,\n isDanger = false,\n isInverse = false,\n isLoading = false,\n twClassName = '',\n style,\n ...props\n}: ButtonTertiaryProps) => {\n const getContainerClassName = useCallback(\n (pressed: boolean): string => {\n const classNameStr =\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName;\n\n const baseClasses = `\n ${isInverse && !isDanger ? 'border-[1.5px]' : 'border-0'}\n ${classNameStr}\n `;\n\n let backgroundClass = '';\n let borderClass = '';\n\n if (isInverse && isDanger) {\n backgroundClass =\n pressed || isLoading ? 'bg-default-pressed' : 'bg-default';\n borderClass =\n pressed || isLoading\n ? 'border-background-default-pressed'\n : 'border-background-default';\n } else if (isDanger) {\n backgroundClass =\n pressed || isLoading ? 'bg-error-muted-pressed' : 'bg-transparent';\n borderClass =\n pressed || isLoading\n ? 'border-error-muted-pressed'\n : 'border-transparent';\n } else if (isInverse) {\n backgroundClass =\n pressed || isLoading ? 'bg-pressed' : 'bg-transparent';\n borderClass = 'border-primary-inverse';\n } else {\n backgroundClass =\n pressed || isLoading ? 'bg-pressed' : 'bg-transparent';\n borderClass =\n pressed || isLoading\n ? 'border-background-pressed'\n : 'border-transparent';\n }\n\n return `${backgroundClass} ${borderClass} ${baseClasses}`;\n },\n [isInverse, isDanger, isLoading, twClassName],\n );\n\n const getTextClassName = useCallback(\n (pressed: boolean): string => {\n if (isDanger) {\n return pressed || isLoading\n ? 'text-error-default-pressed'\n : 'text-error-default';\n }\n if (isInverse) {\n return 'text-primary-inverse';\n }\n // Use neutral text color for all states (default, pressed, loading)\n return 'text-default';\n },\n [isDanger, isInverse, isLoading],\n );\n\n return (\n <ButtonBase\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n }}\n spinnerProps={{\n ...spinnerProps,\n }}\n startIconProps={{\n size: IconSize.Sm,\n ...startIconProps,\n }}\n endIconProps={{\n size: IconSize.Sm,\n ...endIconProps,\n }}\n isLoading={isLoading}\n twClassName={getContainerClassName}\n textClassName={getTextClassName}\n iconClassName={getTextClassName}\n style={style}\n {...props}\n >\n {children}\n </ButtonBase>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.d.cts","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAM3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,sIAYxB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.d.cts","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAM3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,sIAYxB,mBAAmB,sBA4FrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.d.mts","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAM3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,sIAYxB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.d.mts","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAM3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,sIAYxB,mBAAmB,sBA4FrB,CAAC"}
|
|
@@ -58,9 +58,8 @@ export const ButtonTertiary = ({ children, textProps, spinnerProps, startIconPro
|
|
|
58
58
|
if (isInverse) {
|
|
59
59
|
return 'text-primary-inverse';
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
: 'text-primary-default';
|
|
61
|
+
// Use neutral text color for all states (default, pressed, loading)
|
|
62
|
+
return 'text-default';
|
|
64
63
|
}, [isDanger, isInverse, isLoading]);
|
|
65
64
|
return (<ButtonBase textProps={{
|
|
66
65
|
variant: TextVariant.BodyMd,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.mjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,WAAW,EAAE,cAAc;;AAE3C,OAAO,EAAE,UAAU,EAAE,sCAA4B;AACjD,OAAO,EAAE,QAAQ,EAAE,gCAAsB;AACzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,gCAAsB;AAIxD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,KAAK,EACjB,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,qBAAqB,GAAG,WAAW,CACvC,CAAC,OAAgB,EAAU,EAAE;QAC3B,MAAM,YAAY,GAChB,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAEzE,MAAM,WAAW,GAAG;UAChB,SAAS,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU;UACtD,YAAY;OACf,CAAC;QAEF,IAAI,eAAe,GAAG,EAAE,CAAC;QACzB,IAAI,WAAW,GAAG,EAAE,CAAC;QAErB,IAAI,SAAS,IAAI,QAAQ,EAAE;YACzB,eAAe;gBACb,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC;YAC7D,WAAW;gBACT,OAAO,IAAI,SAAS;oBAClB,CAAC,CAAC,mCAAmC;oBACrC,CAAC,CAAC,2BAA2B,CAAC;SACnC;aAAM,IAAI,QAAQ,EAAE;YACnB,eAAe;gBACb,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,gBAAgB,CAAC;YACrE,WAAW;gBACT,OAAO,IAAI,SAAS;oBAClB,CAAC,CAAC,4BAA4B;oBAC9B,CAAC,CAAC,oBAAoB,CAAC;SAC5B;aAAM,IAAI,SAAS,EAAE;YACpB,eAAe;gBACb,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAC;YACzD,WAAW,GAAG,wBAAwB,CAAC;SACxC;aAAM;YACL,eAAe;gBACb,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAC;YACzD,WAAW;gBACT,OAAO,IAAI,SAAS;oBAClB,CAAC,CAAC,2BAA2B;oBAC7B,CAAC,CAAC,oBAAoB,CAAC;SAC5B;QAED,OAAO,GAAG,eAAe,IAAI,WAAW,IAAI,WAAW,EAAE,CAAC;IAC5D,CAAC,EACD,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAC9C,CAAC;IAEF,MAAM,gBAAgB,GAAG,WAAW,CAClC,CAAC,OAAgB,EAAU,EAAE;QAC3B,IAAI,QAAQ,EAAE;YACZ,OAAO,OAAO,IAAI,SAAS;gBACzB,CAAC,CAAC,4BAA4B;gBAC9B,CAAC,CAAC,oBAAoB,CAAC;SAC1B;QACD,IAAI,SAAS,EAAE;YACb,OAAO,sBAAsB,CAAC;SAC/B;QACD,
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.mjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,WAAW,EAAE,cAAc;;AAE3C,OAAO,EAAE,UAAU,EAAE,sCAA4B;AACjD,OAAO,EAAE,QAAQ,EAAE,gCAAsB;AACzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,gCAAsB;AAIxD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7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AAC,CAAC,gBAAgB,CAAC,CAChC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ButtonBase } from '../../../ButtonBase';\nimport { IconSize } from '../../../Icon';\nimport { TextVariant, FontWeight } from '../../../Text';\n\nimport type { ButtonTertiaryProps } from './ButtonTertiary.types';\n\nexport const ButtonTertiary = ({\n children,\n textProps,\n spinnerProps,\n startIconProps,\n endIconProps,\n isDanger = false,\n isInverse = false,\n isLoading = false,\n twClassName = '',\n style,\n ...props\n}: ButtonTertiaryProps) => {\n const getContainerClassName = useCallback(\n (pressed: boolean): string => {\n const classNameStr =\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName;\n\n const baseClasses = `\n ${isInverse && !isDanger ? 'border-[1.5px]' : 'border-0'}\n ${classNameStr}\n `;\n\n let backgroundClass = '';\n let borderClass = '';\n\n if (isInverse && isDanger) {\n backgroundClass =\n pressed || isLoading ? 'bg-default-pressed' : 'bg-default';\n borderClass =\n pressed || isLoading\n ? 'border-background-default-pressed'\n : 'border-background-default';\n } else if (isDanger) {\n backgroundClass =\n pressed || isLoading ? 'bg-error-muted-pressed' : 'bg-transparent';\n borderClass =\n pressed || isLoading\n ? 'border-error-muted-pressed'\n : 'border-transparent';\n } else if (isInverse) {\n backgroundClass =\n pressed || isLoading ? 'bg-pressed' : 'bg-transparent';\n borderClass = 'border-primary-inverse';\n } else {\n backgroundClass =\n pressed || isLoading ? 'bg-pressed' : 'bg-transparent';\n borderClass =\n pressed || isLoading\n ? 'border-background-pressed'\n : 'border-transparent';\n }\n\n return `${backgroundClass} ${borderClass} ${baseClasses}`;\n },\n [isInverse, isDanger, isLoading, twClassName],\n );\n\n const getTextClassName = useCallback(\n (pressed: boolean): string => {\n if (isDanger) {\n return pressed || isLoading\n ? 'text-error-default-pressed'\n : 'text-error-default';\n }\n if (isInverse) {\n return 'text-primary-inverse';\n }\n // Use neutral text color for all states (default, pressed, loading)\n return 'text-default';\n },\n [isDanger, isInverse, isLoading],\n );\n\n return (\n <ButtonBase\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n }}\n spinnerProps={{\n ...spinnerProps,\n }}\n startIconProps={{\n size: IconSize.Sm,\n ...startIconProps,\n }}\n endIconProps={{\n size: IconSize.Sm,\n ...endIconProps,\n }}\n isLoading={isLoading}\n twClassName={getContainerClassName}\n textClassName={getTextClassName}\n iconClassName={getTextClassName}\n style={style}\n {...props}\n >\n {children}\n </ButtonBase>\n );\n};\n"]}
|