@metamask/design-system-react-native 0.15.0 → 0.16.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.
Files changed (218) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/components/BadgeNetwork/BadgeNetwork.types.cjs.map +1 -1
  3. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts +6 -15
  4. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts.map +1 -1
  5. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts +6 -15
  6. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts.map +1 -1
  7. package/dist/components/BadgeNetwork/BadgeNetwork.types.mjs.map +1 -1
  8. package/dist/components/{BoxVertical/BoxVertical.cjs → BoxColumn/BoxColumn.cjs} +5 -5
  9. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -0
  10. package/dist/components/BoxColumn/BoxColumn.d.cts +7 -0
  11. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -0
  12. package/dist/components/BoxColumn/BoxColumn.d.mts +7 -0
  13. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -0
  14. package/dist/components/{BoxVertical/BoxVertical.mjs → BoxColumn/BoxColumn.mjs} +3 -3
  15. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -0
  16. package/dist/components/{BoxVertical/BoxVertical.types.cjs → BoxColumn/BoxColumn.types.cjs} +1 -1
  17. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -0
  18. package/dist/components/BoxColumn/BoxColumn.types.d.cts +13 -0
  19. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -0
  20. package/dist/components/BoxColumn/BoxColumn.types.d.mts +13 -0
  21. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -0
  22. package/dist/components/BoxColumn/BoxColumn.types.mjs +2 -0
  23. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -0
  24. package/dist/components/BoxColumn/index.cjs +6 -0
  25. package/dist/components/BoxColumn/index.cjs.map +1 -0
  26. package/dist/components/BoxColumn/index.d.cts +3 -0
  27. package/dist/components/BoxColumn/index.d.cts.map +1 -0
  28. package/dist/components/BoxColumn/index.d.mts +3 -0
  29. package/dist/components/BoxColumn/index.d.mts.map +1 -0
  30. package/dist/components/BoxColumn/index.mjs +2 -0
  31. package/dist/components/BoxColumn/index.mjs.map +1 -0
  32. package/dist/components/{BoxHorizontal/BoxHorizontal.cjs → BoxRow/BoxRow.cjs} +5 -5
  33. package/dist/components/BoxRow/BoxRow.cjs.map +1 -0
  34. package/dist/components/BoxRow/BoxRow.d.cts +7 -0
  35. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -0
  36. package/dist/components/BoxRow/BoxRow.d.mts +7 -0
  37. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -0
  38. package/dist/components/{BoxHorizontal/BoxHorizontal.mjs → BoxRow/BoxRow.mjs} +3 -3
  39. package/dist/components/BoxRow/BoxRow.mjs.map +1 -0
  40. package/dist/components/{BoxHorizontal/BoxHorizontal.types.cjs → BoxRow/BoxRow.types.cjs} +1 -1
  41. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -0
  42. package/dist/components/BoxRow/BoxRow.types.d.cts +13 -0
  43. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -0
  44. package/dist/components/BoxRow/BoxRow.types.d.mts +13 -0
  45. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -0
  46. package/dist/components/BoxRow/BoxRow.types.mjs +2 -0
  47. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -0
  48. package/dist/components/BoxRow/index.cjs +6 -0
  49. package/dist/components/BoxRow/index.cjs.map +1 -0
  50. package/dist/components/BoxRow/index.d.cts +3 -0
  51. package/dist/components/BoxRow/index.d.cts.map +1 -0
  52. package/dist/components/BoxRow/index.d.mts +3 -0
  53. package/dist/components/BoxRow/index.d.mts.map +1 -0
  54. package/dist/components/BoxRow/index.mjs +2 -0
  55. package/dist/components/BoxRow/index.mjs.map +1 -0
  56. package/dist/components/HeaderRoot/HeaderRoot.cjs +3 -3
  57. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  58. package/dist/components/HeaderRoot/HeaderRoot.mjs +3 -3
  59. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  60. package/dist/components/HeaderSearch/HeaderSearch.cjs +80 -0
  61. package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -0
  62. package/dist/components/HeaderSearch/HeaderSearch.d.cts +37 -0
  63. package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -0
  64. package/dist/components/HeaderSearch/HeaderSearch.d.mts +37 -0
  65. package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -0
  66. package/dist/components/HeaderSearch/HeaderSearch.mjs +80 -0
  67. package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -0
  68. package/dist/components/HeaderSearch/HeaderSearch.types.cjs +3 -0
  69. package/dist/components/HeaderSearch/HeaderSearch.types.cjs.map +1 -0
  70. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts +33 -0
  71. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts.map +1 -0
  72. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts +33 -0
  73. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts.map +1 -0
  74. package/dist/components/HeaderSearch/HeaderSearch.types.mjs +2 -0
  75. package/dist/components/HeaderSearch/HeaderSearch.types.mjs.map +1 -0
  76. package/dist/components/HeaderSearch/index.cjs +8 -0
  77. package/dist/components/HeaderSearch/index.cjs.map +1 -0
  78. package/dist/components/HeaderSearch/index.d.cts +4 -0
  79. package/dist/components/HeaderSearch/index.d.cts.map +1 -0
  80. package/dist/components/HeaderSearch/index.d.mts +4 -0
  81. package/dist/components/HeaderSearch/index.d.mts.map +1 -0
  82. package/dist/components/HeaderSearch/index.mjs +3 -0
  83. package/dist/components/HeaderSearch/index.mjs.map +1 -0
  84. package/dist/components/HeaderStandard/HeaderStandard.cjs +3 -3
  85. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  86. package/dist/components/HeaderStandard/HeaderStandard.mjs +3 -3
  87. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  88. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +43 -0
  89. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -0
  90. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts +7 -0
  91. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -0
  92. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts +7 -0
  93. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -0
  94. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +43 -0
  95. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -0
  96. package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs +3 -0
  97. package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs.map +1 -0
  98. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts +17 -0
  99. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts.map +1 -0
  100. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts +17 -0
  101. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts.map +1 -0
  102. package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs +2 -0
  103. package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs.map +1 -0
  104. package/dist/components/KeyValueColumn/index.cjs +6 -0
  105. package/dist/components/KeyValueColumn/index.cjs.map +1 -0
  106. package/dist/components/KeyValueColumn/index.d.cts +3 -0
  107. package/dist/components/KeyValueColumn/index.d.cts.map +1 -0
  108. package/dist/components/KeyValueColumn/index.d.mts +3 -0
  109. package/dist/components/KeyValueColumn/index.d.mts.map +1 -0
  110. package/dist/components/KeyValueColumn/index.mjs +2 -0
  111. package/dist/components/KeyValueColumn/index.mjs.map +1 -0
  112. package/dist/components/KeyValueRow/KeyValueRow.cjs +43 -64
  113. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  114. package/dist/components/KeyValueRow/KeyValueRow.d.cts +3 -20
  115. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  116. package/dist/components/KeyValueRow/KeyValueRow.d.mts +3 -20
  117. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  118. package/dist/components/KeyValueRow/KeyValueRow.mjs +42 -63
  119. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  120. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +0 -26
  121. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -1
  122. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +14 -174
  123. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -1
  124. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +14 -174
  125. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -1
  126. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +1 -25
  127. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -1
  128. package/dist/components/KeyValueRow/index.cjs +3 -7
  129. package/dist/components/KeyValueRow/index.cjs.map +1 -1
  130. package/dist/components/KeyValueRow/index.d.cts +3 -2
  131. package/dist/components/KeyValueRow/index.d.cts.map +1 -1
  132. package/dist/components/KeyValueRow/index.d.mts +3 -2
  133. package/dist/components/KeyValueRow/index.d.mts.map +1 -1
  134. package/dist/components/KeyValueRow/index.mjs +2 -2
  135. package/dist/components/KeyValueRow/index.mjs.map +1 -1
  136. package/dist/components/index.cjs +15 -7
  137. package/dist/components/index.cjs.map +1 -1
  138. package/dist/components/index.d.cts +10 -4
  139. package/dist/components/index.d.cts.map +1 -1
  140. package/dist/components/index.d.mts +10 -4
  141. package/dist/components/index.d.mts.map +1 -1
  142. package/dist/components/index.mjs +5 -2
  143. package/dist/components/index.mjs.map +1 -1
  144. package/package.json +2 -2
  145. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +0 -1
  146. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +0 -7
  147. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +0 -1
  148. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +0 -7
  149. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +0 -1
  150. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +0 -1
  151. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +0 -1
  152. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +0 -13
  153. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +0 -1
  154. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +0 -13
  155. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +0 -1
  156. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +0 -2
  157. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +0 -1
  158. package/dist/components/BoxHorizontal/index.cjs +0 -6
  159. package/dist/components/BoxHorizontal/index.cjs.map +0 -1
  160. package/dist/components/BoxHorizontal/index.d.cts +0 -3
  161. package/dist/components/BoxHorizontal/index.d.cts.map +0 -1
  162. package/dist/components/BoxHorizontal/index.d.mts +0 -3
  163. package/dist/components/BoxHorizontal/index.d.mts.map +0 -1
  164. package/dist/components/BoxHorizontal/index.mjs +0 -2
  165. package/dist/components/BoxHorizontal/index.mjs.map +0 -1
  166. package/dist/components/BoxVertical/BoxVertical.cjs.map +0 -1
  167. package/dist/components/BoxVertical/BoxVertical.d.cts +0 -7
  168. package/dist/components/BoxVertical/BoxVertical.d.cts.map +0 -1
  169. package/dist/components/BoxVertical/BoxVertical.d.mts +0 -7
  170. package/dist/components/BoxVertical/BoxVertical.d.mts.map +0 -1
  171. package/dist/components/BoxVertical/BoxVertical.mjs.map +0 -1
  172. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +0 -1
  173. package/dist/components/BoxVertical/BoxVertical.types.d.cts +0 -13
  174. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +0 -1
  175. package/dist/components/BoxVertical/BoxVertical.types.d.mts +0 -13
  176. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +0 -1
  177. package/dist/components/BoxVertical/BoxVertical.types.mjs +0 -2
  178. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +0 -1
  179. package/dist/components/BoxVertical/index.cjs +0 -6
  180. package/dist/components/BoxVertical/index.cjs.map +0 -1
  181. package/dist/components/BoxVertical/index.d.cts +0 -3
  182. package/dist/components/BoxVertical/index.d.cts.map +0 -1
  183. package/dist/components/BoxVertical/index.d.mts +0 -3
  184. package/dist/components/BoxVertical/index.d.mts.map +0 -1
  185. package/dist/components/BoxVertical/index.mjs +0 -2
  186. package/dist/components/BoxVertical/index.mjs.map +0 -1
  187. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +0 -34
  188. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +0 -1
  189. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +0 -13
  190. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +0 -1
  191. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +0 -13
  192. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +0 -1
  193. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +0 -34
  194. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +0 -1
  195. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +0 -40
  196. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +0 -1
  197. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +0 -24
  198. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +0 -1
  199. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +0 -24
  200. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +0 -1
  201. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +0 -40
  202. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +0 -1
  203. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +0 -6
  204. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +0 -1
  205. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +0 -3
  206. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +0 -1
  207. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +0 -3
  208. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +0 -1
  209. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +0 -2
  210. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +0 -1
  211. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +0 -30
  212. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +0 -1
  213. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +0 -16
  214. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +0 -1
  215. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +0 -16
  216. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +0 -1
  217. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +0 -30
  218. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +0 -1
@@ -0,0 +1,80 @@
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.HeaderSearch = void 0;
7
+ const design_system_shared_1 = require("@metamask/design-system-shared");
8
+ const react_1 = __importDefault(require("react"));
9
+ const Box_1 = require("../Box/index.cjs");
10
+ const Button_1 = require("../Button/index.cjs");
11
+ const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
12
+ const Icon_1 = require("../Icon/index.cjs");
13
+ const TextFieldSearch_1 = require("../TextFieldSearch/index.cjs");
14
+ const CANCEL_LABEL = 'Cancel';
15
+ /**
16
+ * HeaderSearch is a header component that combines a search field
17
+ * with either a back button (screen variant) or cancel button (inline variant).
18
+ *
19
+ * @example
20
+ * // Screen variant with back button
21
+ * <HeaderSearch
22
+ * variant={HeaderSearchVariant.Screen}
23
+ * onPressBackButton={handleBack}
24
+ * textFieldSearchProps={{
25
+ * value: searchText,
26
+ * onChangeText: setSearchText,
27
+ * onPressClearButton: () => setSearchText(''),
28
+ * placeholder: 'Search...',
29
+ * }}
30
+ * />
31
+ *
32
+ * @example
33
+ * // Inline variant with cancel button
34
+ * <HeaderSearch
35
+ * variant={HeaderSearchVariant.Inline}
36
+ * onPressCancelButton={handleCancel}
37
+ * textFieldSearchProps={{
38
+ * value: searchText,
39
+ * onChangeText: setSearchText,
40
+ * onPressClearButton: () => setSearchText(''),
41
+ * placeholder: 'Search...',
42
+ * }}
43
+ * />
44
+ *
45
+ * @param props - Header row props (discriminated by `variant`).
46
+ * @returns The header search UI for the active variant.
47
+ */
48
+ const HeaderSearch = (props) => {
49
+ const baseTwClassName = 'h-14 flex-row items-center';
50
+ if (props.variant === design_system_shared_1.HeaderSearchVariant.Screen) {
51
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressBackButton, backButtonProps, ...screenBoxProps } = props;
52
+ return (<Box_1.Box {...screenBoxProps} twClassName={twClassName
53
+ ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`
54
+ : `${baseTwClassName} ml-1 mr-4 gap-2`}>
55
+ <ButtonIcon_1.ButtonIcon size={ButtonIcon_1.ButtonIconSize.Md} {...backButtonProps} iconName={Icon_1.IconName.ArrowLeft} onPress={onPressBackButton}/>
56
+ <TextFieldSearch_1.TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
57
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
58
+ : 'flex-1'}/>
59
+ </Box_1.Box>);
60
+ }
61
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressCancelButton, cancelButtonProps, ...inlineBoxProps } = props;
62
+ return (<Box_1.Box {...inlineBoxProps} twClassName={twClassName
63
+ ? `${baseTwClassName} ml-4 ${twClassName}`
64
+ : `${baseTwClassName} ml-4`}>
65
+ <TextFieldSearch_1.TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
66
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
67
+ : 'flex-1'}/>
68
+ <Button_1.Button {...cancelButtonProps} variant={Button_1.ButtonVariant.Tertiary} onPress={onPressCancelButton} textProps={{
69
+ ...cancelButtonProps?.textProps,
70
+ twClassName: cancelButtonProps?.textProps?.twClassName
71
+ ? `text-default ${cancelButtonProps.textProps.twClassName}`
72
+ : 'text-default',
73
+ }}>
74
+ {CANCEL_LABEL}
75
+ </Button_1.Button>
76
+ </Box_1.Box>);
77
+ };
78
+ exports.HeaderSearch = HeaderSearch;
79
+ exports.HeaderSearch.displayName = 'HeaderSearch';
80
+ //# sourceMappingURL=HeaderSearch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAAqE;AACrE,kDAA0B;AAE1B,0CAA6B;AAC7B,gDAAkD;AAClD,wDAA2D;AAC3D,4CAAmC;AACnC,kEAAqD;AAKrD,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACI,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,eAAe,GAAG,4BAA4B,CAAC;IAErD,IAAI,KAAK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,QAAQ,CACb,EAEH;MAAA,CAAC,eAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,OAAO,CAAC,CAAC,sBAAa,CAAC,QAAQ,CAAC,CAChC,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,SAAS,CAAC,CAAC;YACT,GAAG,iBAAiB,EAAE,SAAS;YAC/B,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW;gBACpD,CAAC,CAAC,gBAAgB,iBAAiB,CAAC,SAAS,CAAC,WAAW,EAAE;gBAC3D,CAAC,CAAC,cAAc;SACnB,CAAC,CAEF;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,eAAM,CACV;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAjFW,QAAA,YAAY,gBAiFvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import { HeaderSearchVariant } from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { Button, ButtonVariant } from '../Button';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { IconName } from '../Icon';\nimport { TextFieldSearch } from '../TextFieldSearch';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\nimport type { HeaderSearchProps } from './HeaderSearch.types';\n\nconst CANCEL_LABEL = 'Cancel';\n\n/**\n * HeaderSearch is a header component that combines a search field\n * with either a back button (screen variant) or cancel button (inline variant).\n *\n * @example\n * // Screen variant with back button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Screen}\n * onPressBackButton={handleBack}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @example\n * // Inline variant with cancel button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Inline}\n * onPressCancelButton={handleCancel}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @param props - Header row props (discriminated by `variant`).\n * @returns The header search UI for the active variant.\n */\nexport const HeaderSearch: React.FC<HeaderSearchProps> = (props) => {\n const baseTwClassName = 'h-14 flex-row items-center';\n\n if (props.variant === HeaderSearchVariant.Screen) {\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressBackButton,\n backButtonProps,\n ...screenBoxProps\n } = props;\n\n return (\n <Box\n {...screenBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`\n : `${baseTwClassName} ml-1 mr-4 gap-2`\n }\n >\n <ButtonIcon\n size={ButtonIconSize.Md}\n {...backButtonProps}\n iconName={IconName.ArrowLeft}\n onPress={onPressBackButton}\n />\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n </Box>\n );\n }\n\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressCancelButton,\n cancelButtonProps,\n ...inlineBoxProps\n } = props;\n\n return (\n <Box\n {...inlineBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-4 ${twClassName}`\n : `${baseTwClassName} ml-4`\n }\n >\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n <Button\n {...cancelButtonProps}\n variant={ButtonVariant.Tertiary}\n onPress={onPressCancelButton}\n textProps={{\n ...cancelButtonProps?.textProps,\n twClassName: cancelButtonProps?.textProps?.twClassName\n ? `text-default ${cancelButtonProps.textProps.twClassName}`\n : 'text-default',\n }}\n >\n {CANCEL_LABEL}\n </Button>\n </Box>\n );\n};\n\nHeaderSearch.displayName = 'HeaderSearch';\n"]}
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import type { HeaderSearchProps } from "./HeaderSearch.types.cjs";
3
+ /**
4
+ * HeaderSearch is a header component that combines a search field
5
+ * with either a back button (screen variant) or cancel button (inline variant).
6
+ *
7
+ * @example
8
+ * // Screen variant with back button
9
+ * <HeaderSearch
10
+ * variant={HeaderSearchVariant.Screen}
11
+ * onPressBackButton={handleBack}
12
+ * textFieldSearchProps={{
13
+ * value: searchText,
14
+ * onChangeText: setSearchText,
15
+ * onPressClearButton: () => setSearchText(''),
16
+ * placeholder: 'Search...',
17
+ * }}
18
+ * />
19
+ *
20
+ * @example
21
+ * // Inline variant with cancel button
22
+ * <HeaderSearch
23
+ * variant={HeaderSearchVariant.Inline}
24
+ * onPressCancelButton={handleCancel}
25
+ * textFieldSearchProps={{
26
+ * value: searchText,
27
+ * onChangeText: setSearchText,
28
+ * onPressClearButton: () => setSearchText(''),
29
+ * placeholder: 'Search...',
30
+ * }}
31
+ * />
32
+ *
33
+ * @param props - Header row props (discriminated by `variant`).
34
+ * @returns The header search UI for the active variant.
35
+ */
36
+ export declare const HeaderSearch: React.FC<HeaderSearchProps>;
37
+ //# sourceMappingURL=HeaderSearch.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAI9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiFpD,CAAC"}
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import type { HeaderSearchProps } from "./HeaderSearch.types.mjs";
3
+ /**
4
+ * HeaderSearch is a header component that combines a search field
5
+ * with either a back button (screen variant) or cancel button (inline variant).
6
+ *
7
+ * @example
8
+ * // Screen variant with back button
9
+ * <HeaderSearch
10
+ * variant={HeaderSearchVariant.Screen}
11
+ * onPressBackButton={handleBack}
12
+ * textFieldSearchProps={{
13
+ * value: searchText,
14
+ * onChangeText: setSearchText,
15
+ * onPressClearButton: () => setSearchText(''),
16
+ * placeholder: 'Search...',
17
+ * }}
18
+ * />
19
+ *
20
+ * @example
21
+ * // Inline variant with cancel button
22
+ * <HeaderSearch
23
+ * variant={HeaderSearchVariant.Inline}
24
+ * onPressCancelButton={handleCancel}
25
+ * textFieldSearchProps={{
26
+ * value: searchText,
27
+ * onChangeText: setSearchText,
28
+ * onPressClearButton: () => setSearchText(''),
29
+ * placeholder: 'Search...',
30
+ * }}
31
+ * />
32
+ *
33
+ * @param props - Header row props (discriminated by `variant`).
34
+ * @returns The header search UI for the active variant.
35
+ */
36
+ export declare const HeaderSearch: React.FC<HeaderSearchProps>;
37
+ //# sourceMappingURL=HeaderSearch.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAI9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiFpD,CAAC"}
@@ -0,0 +1,80 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { HeaderSearchVariant } from "@metamask/design-system-shared";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { Box } from "../Box/index.mjs";
11
+ import { Button, ButtonVariant } from "../Button/index.mjs";
12
+ import { ButtonIcon, ButtonIconSize } from "../ButtonIcon/index.mjs";
13
+ import { IconName } from "../Icon/index.mjs";
14
+ import { TextFieldSearch } from "../TextFieldSearch/index.mjs";
15
+ const CANCEL_LABEL = 'Cancel';
16
+ /**
17
+ * HeaderSearch is a header component that combines a search field
18
+ * with either a back button (screen variant) or cancel button (inline variant).
19
+ *
20
+ * @example
21
+ * // Screen variant with back button
22
+ * <HeaderSearch
23
+ * variant={HeaderSearchVariant.Screen}
24
+ * onPressBackButton={handleBack}
25
+ * textFieldSearchProps={{
26
+ * value: searchText,
27
+ * onChangeText: setSearchText,
28
+ * onPressClearButton: () => setSearchText(''),
29
+ * placeholder: 'Search...',
30
+ * }}
31
+ * />
32
+ *
33
+ * @example
34
+ * // Inline variant with cancel button
35
+ * <HeaderSearch
36
+ * variant={HeaderSearchVariant.Inline}
37
+ * onPressCancelButton={handleCancel}
38
+ * textFieldSearchProps={{
39
+ * value: searchText,
40
+ * onChangeText: setSearchText,
41
+ * onPressClearButton: () => setSearchText(''),
42
+ * placeholder: 'Search...',
43
+ * }}
44
+ * />
45
+ *
46
+ * @param props - Header row props (discriminated by `variant`).
47
+ * @returns The header search UI for the active variant.
48
+ */
49
+ export const HeaderSearch = (props) => {
50
+ const baseTwClassName = 'h-14 flex-row items-center';
51
+ if (props.variant === HeaderSearchVariant.Screen) {
52
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressBackButton, backButtonProps, ...screenBoxProps } = props;
53
+ return (<Box {...screenBoxProps} twClassName={twClassName
54
+ ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`
55
+ : `${baseTwClassName} ml-1 mr-4 gap-2`}>
56
+ <ButtonIcon size={ButtonIconSize.Md} {...backButtonProps} iconName={IconName.ArrowLeft} onPress={onPressBackButton}/>
57
+ <TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
58
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
59
+ : 'flex-1'}/>
60
+ </Box>);
61
+ }
62
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressCancelButton, cancelButtonProps, ...inlineBoxProps } = props;
63
+ return (<Box {...inlineBoxProps} twClassName={twClassName
64
+ ? `${baseTwClassName} ml-4 ${twClassName}`
65
+ : `${baseTwClassName} ml-4`}>
66
+ <TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
67
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
68
+ : 'flex-1'}/>
69
+ <Button {...cancelButtonProps} variant={ButtonVariant.Tertiary} onPress={onPressCancelButton} textProps={{
70
+ ...cancelButtonProps?.textProps,
71
+ twClassName: cancelButtonProps?.textProps?.twClassName
72
+ ? `text-default ${cancelButtonProps.textProps.twClassName}`
73
+ : 'text-default',
74
+ }}>
75
+ {CANCEL_LABEL}
76
+ </Button>
77
+ </Box>);
78
+ };
79
+ HeaderSearch.displayName = 'HeaderSearch';
80
+ //# sourceMappingURL=HeaderSearch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,uCAAuC;AACrE,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,4BAAkB;AAClD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,eAAe,EAAE,qCAA2B;AAKrD,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,eAAe,GAAG,4BAA4B,CAAC;IAErD,IAAI,KAAK,CAAC,OAAO,KAAK,mBAAmB,CAAC,MAAM,EAAE;QAChD,MAAM,EACJ,OAAO,EAAE,QAAQ,EACjB,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,GAAG,cAAc,EAClB,GAAG,KAAK,CAAC;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GAAG,iBAAiB,EAAE,SAAS;YAC/B,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW;gBACpD,CAAC,CAAC,gBAAgB,iBAAiB,CAAC,SAAS,CAAC,WAAW,EAAE;gBAC3D,CAAC,CAAC,cAAc;SACnB,CAAC,CAEF;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import { HeaderSearchVariant } from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { Button, ButtonVariant } from '../Button';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { IconName } from '../Icon';\nimport { TextFieldSearch } from '../TextFieldSearch';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\nimport type { HeaderSearchProps } from './HeaderSearch.types';\n\nconst CANCEL_LABEL = 'Cancel';\n\n/**\n * HeaderSearch is a header component that combines a search field\n * with either a back button (screen variant) or cancel button (inline variant).\n *\n * @example\n * // Screen variant with back button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Screen}\n * onPressBackButton={handleBack}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @example\n * // Inline variant with cancel button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Inline}\n * onPressCancelButton={handleCancel}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @param props - Header row props (discriminated by `variant`).\n * @returns The header search UI for the active variant.\n */\nexport const HeaderSearch: React.FC<HeaderSearchProps> = (props) => {\n const baseTwClassName = 'h-14 flex-row items-center';\n\n if (props.variant === HeaderSearchVariant.Screen) {\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressBackButton,\n backButtonProps,\n ...screenBoxProps\n } = props;\n\n return (\n <Box\n {...screenBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`\n : `${baseTwClassName} ml-1 mr-4 gap-2`\n }\n >\n <ButtonIcon\n size={ButtonIconSize.Md}\n {...backButtonProps}\n iconName={IconName.ArrowLeft}\n onPress={onPressBackButton}\n />\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n </Box>\n );\n }\n\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressCancelButton,\n cancelButtonProps,\n ...inlineBoxProps\n } = props;\n\n return (\n <Box\n {...inlineBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-4 ${twClassName}`\n : `${baseTwClassName} ml-4`\n }\n >\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n <Button\n {...cancelButtonProps}\n variant={ButtonVariant.Tertiary}\n onPress={onPressCancelButton}\n textProps={{\n ...cancelButtonProps?.textProps,\n twClassName: cancelButtonProps?.textProps?.twClassName\n ? `text-default ${cancelButtonProps.textProps.twClassName}`\n : 'text-default',\n }}\n >\n {CANCEL_LABEL}\n </Button>\n </Box>\n );\n};\n\nHeaderSearch.displayName = 'HeaderSearch';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=HeaderSearch.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n HeaderSearchInlinePropsShared,\n HeaderSearchScreenPropsShared,\n} from '@metamask/design-system-shared';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\ntype HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {\n /**\n * Props to pass to the TextFieldSearch component.\n */\n textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;\n};\n\n/**\n * Screen variant props.\n * Renders a back button (ArrowLeft) on the left side.\n */\nexport type HeaderSearchScreenProps = HeaderSearchScreenPropsShared &\n HeaderSearchBaseProps & {\n onPressBackButton: () => void;\n backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;\n };\n\n/**\n * Inline variant props.\n * Renders a cancel button on the right side.\n */\nexport type HeaderSearchInlineProps = HeaderSearchInlinePropsShared &\n HeaderSearchBaseProps & {\n onPressCancelButton: () => void;\n cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;\n };\n\n/**\n * HeaderSearch component props.\n */\nexport type HeaderSearchProps =\n | HeaderSearchScreenProps\n | HeaderSearchInlineProps;\n"]}
@@ -0,0 +1,33 @@
1
+ import type { HeaderSearchInlinePropsShared, HeaderSearchScreenPropsShared } from "@metamask/design-system-shared";
2
+ import type { BoxProps } from "../Box/index.cjs";
3
+ import type { ButtonProps } from "../Button/index.cjs";
4
+ import type { ButtonIconProps } from "../ButtonIcon/index.cjs";
5
+ import type { TextFieldSearchProps } from "../TextFieldSearch/index.cjs";
6
+ type HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {
7
+ /**
8
+ * Props to pass to the TextFieldSearch component.
9
+ */
10
+ textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;
11
+ };
12
+ /**
13
+ * Screen variant props.
14
+ * Renders a back button (ArrowLeft) on the left side.
15
+ */
16
+ export type HeaderSearchScreenProps = HeaderSearchScreenPropsShared & HeaderSearchBaseProps & {
17
+ onPressBackButton: () => void;
18
+ backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;
19
+ };
20
+ /**
21
+ * Inline variant props.
22
+ * Renders a cancel button on the right side.
23
+ */
24
+ export type HeaderSearchInlineProps = HeaderSearchInlinePropsShared & HeaderSearchBaseProps & {
25
+ onPressCancelButton: () => void;
26
+ cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;
27
+ };
28
+ /**
29
+ * HeaderSearch component props.
30
+ */
31
+ export type HeaderSearchProps = HeaderSearchScreenProps | HeaderSearchInlineProps;
32
+ export {};
33
+ //# sourceMappingURL=HeaderSearch.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,6BAA6B,EAC9B,uCAAuC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAe;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,4BAAkB;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qCAA2B;AAE/D,KAAK,qBAAqB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IACxD;;OAEG;IACH,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;CAC3D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CACjE,CAAC;AAEJ;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;CAC3E,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,uBAAuB,GACvB,uBAAuB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { HeaderSearchInlinePropsShared, HeaderSearchScreenPropsShared } from "@metamask/design-system-shared";
2
+ import type { BoxProps } from "../Box/index.mjs";
3
+ import type { ButtonProps } from "../Button/index.mjs";
4
+ import type { ButtonIconProps } from "../ButtonIcon/index.mjs";
5
+ import type { TextFieldSearchProps } from "../TextFieldSearch/index.mjs";
6
+ type HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {
7
+ /**
8
+ * Props to pass to the TextFieldSearch component.
9
+ */
10
+ textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;
11
+ };
12
+ /**
13
+ * Screen variant props.
14
+ * Renders a back button (ArrowLeft) on the left side.
15
+ */
16
+ export type HeaderSearchScreenProps = HeaderSearchScreenPropsShared & HeaderSearchBaseProps & {
17
+ onPressBackButton: () => void;
18
+ backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;
19
+ };
20
+ /**
21
+ * Inline variant props.
22
+ * Renders a cancel button on the right side.
23
+ */
24
+ export type HeaderSearchInlineProps = HeaderSearchInlinePropsShared & HeaderSearchBaseProps & {
25
+ onPressCancelButton: () => void;
26
+ cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;
27
+ };
28
+ /**
29
+ * HeaderSearch component props.
30
+ */
31
+ export type HeaderSearchProps = HeaderSearchScreenProps | HeaderSearchInlineProps;
32
+ export {};
33
+ //# sourceMappingURL=HeaderSearch.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,6BAA6B,EAC9B,uCAAuC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAe;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,4BAAkB;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qCAA2B;AAE/D,KAAK,qBAAqB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IACxD;;OAEG;IACH,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;CAC3D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CACjE,CAAC;AAEJ;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;CAC3E,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,uBAAuB,GACvB,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=HeaderSearch.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n HeaderSearchInlinePropsShared,\n HeaderSearchScreenPropsShared,\n} from '@metamask/design-system-shared';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\ntype HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {\n /**\n * Props to pass to the TextFieldSearch component.\n */\n textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;\n};\n\n/**\n * Screen variant props.\n * Renders a back button (ArrowLeft) on the left side.\n */\nexport type HeaderSearchScreenProps = HeaderSearchScreenPropsShared &\n HeaderSearchBaseProps & {\n onPressBackButton: () => void;\n backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;\n };\n\n/**\n * Inline variant props.\n * Renders a cancel button on the right side.\n */\nexport type HeaderSearchInlineProps = HeaderSearchInlinePropsShared &\n HeaderSearchBaseProps & {\n onPressCancelButton: () => void;\n cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;\n };\n\n/**\n * HeaderSearch component props.\n */\nexport type HeaderSearchProps =\n | HeaderSearchScreenProps\n | HeaderSearchInlineProps;\n"]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeaderSearch = exports.HeaderSearchVariant = void 0;
4
+ var design_system_shared_1 = require("@metamask/design-system-shared");
5
+ Object.defineProperty(exports, "HeaderSearchVariant", { enumerable: true, get: function () { return design_system_shared_1.HeaderSearchVariant; } });
6
+ var HeaderSearch_1 = require("./HeaderSearch.cjs");
7
+ Object.defineProperty(exports, "HeaderSearch", { enumerable: true, get: function () { return HeaderSearch_1.HeaderSearch; } });
8
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":";;;AAAA,uEAKwC;AAJtC,2HAAA,mBAAmB,OAAA;AAKrB,mDAA8C;AAArC,4GAAA,YAAY,OAAA","sourcesContent":["export {\n HeaderSearchVariant,\n type HeaderSearchInlinePropsShared,\n type HeaderSearchPropsShared,\n type HeaderSearchScreenPropsShared,\n} from '@metamask/design-system-shared';\nexport { HeaderSearch } from './HeaderSearch';\nexport type {\n HeaderSearchProps,\n HeaderSearchScreenProps,\n HeaderSearchInlineProps,\n} from './HeaderSearch.types';\n"]}
@@ -0,0 +1,4 @@
1
+ export { HeaderSearchVariant, type HeaderSearchInlinePropsShared, type HeaderSearchPropsShared, type HeaderSearchScreenPropsShared, } from "@metamask/design-system-shared";
2
+ export { HeaderSearch } from "./HeaderSearch.cjs";
3
+ export type { HeaderSearchProps, HeaderSearchScreenProps, HeaderSearchInlineProps, } from "./HeaderSearch.types.cjs";
4
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,uCAAuC;AACxC,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,iCAA6B"}
@@ -0,0 +1,4 @@
1
+ export { HeaderSearchVariant, type HeaderSearchInlinePropsShared, type HeaderSearchPropsShared, type HeaderSearchScreenPropsShared, } from "@metamask/design-system-shared";
2
+ export { HeaderSearch } from "./HeaderSearch.mjs";
3
+ export type { HeaderSearchProps, HeaderSearchScreenProps, HeaderSearchInlineProps, } from "./HeaderSearch.types.mjs";
4
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,uCAAuC;AACxC,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,iCAA6B"}
@@ -0,0 +1,3 @@
1
+ export { HeaderSearchVariant } from "@metamask/design-system-shared";
2
+ export { HeaderSearch } from "./HeaderSearch.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAIpB,uCAAuC;AACxC,OAAO,EAAE,YAAY,EAAE,2BAAuB","sourcesContent":["export {\n HeaderSearchVariant,\n type HeaderSearchInlinePropsShared,\n type HeaderSearchPropsShared,\n type HeaderSearchScreenPropsShared,\n} from '@metamask/design-system-shared';\nexport { HeaderSearch } from './HeaderSearch';\nexport type {\n HeaderSearchProps,\n HeaderSearchScreenProps,\n HeaderSearchInlineProps,\n} from './HeaderSearch.types';\n"]}
@@ -28,7 +28,7 @@ exports.HeaderStandard = void 0;
28
28
  const react_1 = __importStar(require("react"));
29
29
  // External dependencies.
30
30
  const Box_1 = require("../Box/index.cjs");
31
- const BoxVertical_1 = require("../BoxVertical/index.cjs");
31
+ const BoxColumn_1 = require("../BoxColumn/index.cjs");
32
32
  const HeaderBase_1 = require("../HeaderBase/index.cjs");
33
33
  const Icon_1 = require("../Icon/index.cjs");
34
34
  const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
@@ -80,7 +80,7 @@ const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children,
80
80
  .join(' '),
81
81
  };
82
82
  }
83
- return (<BoxVertical_1.BoxVertical alignItems={Box_1.BoxAlignItems.Center} textProps={{
83
+ return (<BoxColumn_1.BoxColumn alignItems={Box_1.BoxAlignItems.Center} textProps={{
84
84
  variant: Text_1.TextVariant.BodyMd,
85
85
  fontWeight: Text_1.FontWeight.Bold,
86
86
  ...titleProps,
@@ -88,7 +88,7 @@ const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children,
88
88
  {subtitle}
89
89
  </TextOrChildren_1.TextOrChildren>) : undefined}>
90
90
  {title}
91
- </BoxVertical_1.BoxVertical>);
91
+ </BoxColumn_1.BoxColumn>);
92
92
  }
93
93
  return null;
94
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,+CAAuC;AAEvC,yBAAyB;AACzB,0CAAuC;AACvC,0DAA6C;AAE7C,wDAA2C;AAC3C,4CAAmC;AACnC,gFAAmE;AAEnE,4CAA6D;AAKtD,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAChD,IAAI,oBAAoB,EAAE;YACxB,OAAO,oBAAoB,CAAC;SAC7B;QACD,IAAI,MAAM,IAAI,eAAe,EAAE;YAC7B,MAAM,UAAU,GAAoB;gBAClC,QAAQ,EAAE,eAAQ,CAAC,SAAS;gBAC5B,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;gBAC1B,OAAO,EAAE,eAAe,EAAE,OAAO,IAAI,MAAM;aAC5C,CAAC;YACF,OAAO,UAAU,CAAC;SACnB;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAEpD,MAAM,0BAA0B,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC9C,MAAM,KAAK,GAAsB,EAAE,CAAC;QAEpC,IAAI,OAAO,IAAI,gBAAgB,EAAE;YAC/B,MAAM,UAAU,GAAoB;gBAClC,QAAQ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CACd,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;gBAAA,CAAC,QAAQ,CACX;cAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,SAAS,CACd,CAED;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,yBAAW,CAAC,CACf,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAtGW,QAAA,cAAc,kBAsGzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxVertical } from '../BoxVertical';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxVertical\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxVertical>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
1
+ {"version":3,"file":"HeaderStandard.cjs","sourceRoot":"","sources":["../../../src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,CAAC,SAAS,CACd,CAED;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,qBAAS,CAAC,CACb,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAtGW,QAAA,cAAc,kBAsGzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxColumn>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
@@ -9,7 +9,7 @@ import $React, { useMemo } from "react";
9
9
  const React = $importDefault($React);
10
10
  // External dependencies.
11
11
  import { BoxAlignItems } from "../Box/index.mjs";
12
- import { BoxVertical } from "../BoxVertical/index.mjs";
12
+ import { BoxColumn } from "../BoxColumn/index.mjs";
13
13
  import { HeaderBase } from "../HeaderBase/index.mjs";
14
14
  import { IconName } from "../Icon/index.mjs";
15
15
  import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
@@ -61,7 +61,7 @@ export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, chi
61
61
  .join(' '),
62
62
  };
63
63
  }
64
- return (<BoxVertical alignItems={BoxAlignItems.Center} textProps={{
64
+ return (<BoxColumn alignItems={BoxAlignItems.Center} textProps={{
65
65
  variant: TextVariant.BodyMd,
66
66
  fontWeight: FontWeight.Bold,
67
67
  ...titleProps,
@@ -69,7 +69,7 @@ export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, chi
69
69
  {subtitle}
70
70
  </TextOrChildren>) : undefined}>
71
71
  {title}
72
- </BoxVertical>);
72
+ </BoxColumn>);
73
73
  }
74
74
  return null;
75
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AAEvC,yBAAyB;AACzB,OAAO,EAAE,aAAa,EAAE,yBAAe;AACvC,OAAO,EAAE,WAAW,EAAE,iCAAuB;AAE7C,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,0BAAgB;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,OAAO,CAAC,G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, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxVertical } from '../BoxVertical';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxVertical\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxVertical>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
1
+ {"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AAEvC,yBAAyB;AACzB,OAAO,EAAE,aAAa,EAAE,yBAAe;AACvC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AAEzC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,0BAAgB;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,OAAO,CAAC,GAAG,EAAE;QAChD,IAAI,oBAAoB,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AAmB,EAAE,GAAG,gBAAgB,EAAE,GAC7D,aAAa,IAAI,EAAE,CAAC;gBACtB,iBAAiB,GAAG;oBAClB,OAAO,EAAE,WAAW,CAAC,MAAM;oBAC3B,KAAK,EAAE,SAAS,CAAC,eAAe;oBAChC,GAAG,gBAAgB;oBACnB,WAAW,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC;yBAC1C,MAAM,CAAC,OAAO,CAAC;yBACf,IAAI,CAAC,GAAG,CAAC;iBACb,CAAC;aACH;YAED,OAAO,CACL,CAAC,SAAS,CACR,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,SAAS,CAAC,CAAC;oBACT,OAAO,EAAE,WAAW,CAAC,MAAM;oBAC3B,UAAU,EAAE,UAAU,CAAC,IAAI;oBAC3B,GAAG,UAAU;iBACd,CAAC,CACF,eAAe,CAAC,CACd,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;gBAAA,CAAC,QAAQ,CACX;cAAA,EAAE,cAAc,CAAC,CAClB,CAAC,CAAC,CAAC,SAAS,CACd,CAED;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,SAAS,CAAC,CACb,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxColumn>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
@@ -0,0 +1,43 @@
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.KeyValueColumn = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const types_1 = require("../../types/index.cjs");
9
+ const BoxColumn_1 = require("../BoxColumn/index.cjs");
10
+ const BoxRow_1 = require("../BoxRow/index.cjs");
11
+ const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
12
+ const KeyValueColumn = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps, keyLabel: keyContent, keyTextProps, valueStartAccessory, valueEndAccessory, valueEndButtonIconProps, value: valueContent, valueTextProps, twClassName, ...viewProps }) => {
13
+ const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
14
+ keyEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={types_1.ButtonIconSize.Sm} iconProps={{ color: types_1.IconColor.IconAlternative }} {...keyEndButtonIconProps} iconName={keyEndButtonIconProps.iconName}/>) : (keyEndAccessory);
15
+ const valueEndAccessoryNode = valueEndButtonIconProps?.iconName !== undefined &&
16
+ valueEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={types_1.ButtonIconSize.Sm} iconProps={{ color: types_1.IconColor.IconDefault }} {...valueEndButtonIconProps} iconName={valueEndButtonIconProps.iconName}/>) : (valueEndAccessory);
17
+ const keyBox = (<BoxRow_1.BoxRow startAccessory={keyStartAccessory} endAccessory={keyEndAccessoryNode} textProps={{
18
+ variant: types_1.TextVariant.BodyMd,
19
+ fontWeight: types_1.FontWeight.Medium,
20
+ color: types_1.TextColor.TextAlternative,
21
+ numberOfLines: 1,
22
+ ellipsizeMode: 'tail',
23
+ ...keyTextProps,
24
+ }} twClassName="w-full min-w-0">
25
+ {keyContent}
26
+ </BoxRow_1.BoxRow>);
27
+ const valueBox = (<BoxRow_1.BoxRow startAccessory={valueStartAccessory} endAccessory={valueEndAccessoryNode} textProps={{
28
+ variant: types_1.TextVariant.BodyMd,
29
+ fontWeight: types_1.FontWeight.Medium,
30
+ color: types_1.TextColor.TextDefault,
31
+ numberOfLines: 1,
32
+ ellipsizeMode: 'tail',
33
+ ...valueTextProps,
34
+ }} twClassName="w-full min-w-0">
35
+ {valueContent}
36
+ </BoxRow_1.BoxRow>);
37
+ return (<BoxColumn_1.BoxColumn bottomAccessory={valueBox} twClassName={twClassName} {...viewProps}>
38
+ {keyBox}
39
+ </BoxColumn_1.BoxColumn>);
40
+ };
41
+ exports.KeyValueColumn = KeyValueColumn;
42
+ exports.KeyValueColumn.displayName = 'KeyValueColumn';
43
+ //# sourceMappingURL=KeyValueColumn.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueColumn.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAMqB;AACrB,sDAAyC;AACzC,gDAAmC;AACnC,wDAA2C;AAIpC,MAAM,cAAc,GAAG,CAAC,EAC7B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,m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AChB,CAAC,CACF,WAAW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,UAAU,CACb;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;IAEF,MAAM,QAAQ,GAAG,CACf,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CACpC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,mBAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,kBAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,iBAAS,CAAC,WAAW;YAC5B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,cAAc;SAClB,CAAC,CACF,WAAW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,qBAAS,CACR,eAAe,CAAC,CAAC,QAAQ,CAAC,CAC1B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,MAAM,CACT;IAAA,EAAE,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AArFW,QAAA,cAAc,kBAqFzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import React from 'react';\n\nimport {\n ButtonIconSize,\n FontWeight,\n IconColor,\n TextColor,\n TextVariant,\n} from '../../types';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueColumnProps } from './KeyValueColumn.types';\n\nexport const KeyValueColumn = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n twClassName,\n ...viewProps\n}: KeyValueColumnProps) => {\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconAlternative }}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconDefault }}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxColumn\n bottomAccessory={valueBox}\n twClassName={twClassName}\n {...viewProps}\n >\n {keyBox}\n </BoxColumn>\n );\n};\n\nKeyValueColumn.displayName = 'KeyValueColumn';\n"]}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { KeyValueColumnProps } from "./KeyValueColumn.types.cjs";
3
+ export declare const KeyValueColumn: {
4
+ ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps, keyLabel: keyContent, keyTextProps, valueStartAccessory, valueEndAccessory, valueEndButtonIconProps, value: valueContent, valueTextProps, twClassName, ...viewProps }: KeyValueColumnProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
7
+ //# sourceMappingURL=KeyValueColumn.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueColumn.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAa1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc;yOAaxB,mBAAmB;;CAwErB,CAAC"}