@metamask/design-system-react-native 0.28.0 → 0.29.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 (132) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +2 -2
  3. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
  4. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +2 -2
  5. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
  6. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +1 -2
  7. package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
  8. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
  9. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
  10. package/dist/components/AvatarNetwork/AvatarNetwork.mjs +1 -2
  11. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  12. package/dist/components/AvatarNetwork/index.cjs +2 -2
  13. package/dist/components/AvatarNetwork/index.cjs.map +1 -1
  14. package/dist/components/AvatarNetwork/index.d.cts +1 -1
  15. package/dist/components/AvatarNetwork/index.d.cts.map +1 -1
  16. package/dist/components/AvatarNetwork/index.d.mts +1 -1
  17. package/dist/components/AvatarNetwork/index.d.mts.map +1 -1
  18. package/dist/components/AvatarNetwork/index.mjs +1 -1
  19. package/dist/components/AvatarNetwork/index.mjs.map +1 -1
  20. package/dist/components/Icon/Icon.constants.cjs +6 -6
  21. package/dist/components/Icon/Icon.constants.cjs.map +1 -1
  22. package/dist/components/Icon/Icon.constants.d.cts +1 -1
  23. package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
  24. package/dist/components/Icon/Icon.constants.d.mts +1 -1
  25. package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
  26. package/dist/components/Icon/Icon.constants.mjs +1 -1
  27. package/dist/components/Icon/Icon.constants.mjs.map +1 -1
  28. package/dist/components/IconAlert/IconAlert.constants.cjs +1 -1
  29. package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
  30. package/dist/components/IconAlert/IconAlert.constants.mjs +1 -1
  31. package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -1
  32. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +2 -3
  33. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  34. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  35. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  36. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +1 -2
  37. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  38. package/dist/components/KeyValueRow/KeyValueRow.cjs +2 -3
  39. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  40. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  41. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  42. package/dist/components/KeyValueRow/KeyValueRow.mjs +1 -2
  43. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  44. package/dist/components/ListItem/ListItem.cjs +26 -48
  45. package/dist/components/ListItem/ListItem.cjs.map +1 -1
  46. package/dist/components/ListItem/ListItem.d.cts.map +1 -1
  47. package/dist/components/ListItem/ListItem.d.mts.map +1 -1
  48. package/dist/components/ListItem/ListItem.mjs +26 -28
  49. package/dist/components/ListItem/ListItem.mjs.map +1 -1
  50. package/dist/components/ListItem/ListItem.types.cjs +0 -9
  51. package/dist/components/ListItem/ListItem.types.cjs.map +1 -1
  52. package/dist/components/ListItem/ListItem.types.d.cts +13 -55
  53. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -1
  54. package/dist/components/ListItem/ListItem.types.d.mts +13 -55
  55. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -1
  56. package/dist/components/ListItem/ListItem.types.mjs +1 -8
  57. package/dist/components/ListItem/ListItem.types.mjs.map +1 -1
  58. package/dist/components/ListItem/index.cjs +1 -3
  59. package/dist/components/ListItem/index.cjs.map +1 -1
  60. package/dist/components/ListItem/index.d.cts +0 -1
  61. package/dist/components/ListItem/index.d.cts.map +1 -1
  62. package/dist/components/ListItem/index.d.mts +0 -1
  63. package/dist/components/ListItem/index.d.mts.map +1 -1
  64. package/dist/components/ListItem/index.mjs +0 -1
  65. package/dist/components/ListItem/index.mjs.map +1 -1
  66. package/dist/components/SelectButton/SelectButton.constants.cjs +4 -5
  67. package/dist/components/SelectButton/SelectButton.constants.cjs.map +1 -1
  68. package/dist/components/SelectButton/SelectButton.constants.d.cts +1 -2
  69. package/dist/components/SelectButton/SelectButton.constants.d.cts.map +1 -1
  70. package/dist/components/SelectButton/SelectButton.constants.d.mts +1 -2
  71. package/dist/components/SelectButton/SelectButton.constants.d.mts.map +1 -1
  72. package/dist/components/SelectButton/SelectButton.constants.mjs +1 -2
  73. package/dist/components/SelectButton/SelectButton.constants.mjs.map +1 -1
  74. package/dist/components/Tag/Tag.constants.cjs +3 -3
  75. package/dist/components/Tag/Tag.constants.cjs.map +1 -1
  76. package/dist/components/Tag/Tag.constants.mjs +3 -3
  77. package/dist/components/Tag/Tag.constants.mjs.map +1 -1
  78. package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
  79. package/dist/components/TextButton/TextButton.types.d.cts +2 -5
  80. package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
  81. package/dist/components/TextButton/TextButton.types.d.mts +2 -5
  82. package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
  83. package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
  84. package/dist/components/Toast/Toast.constants.cjs +5 -8
  85. package/dist/components/Toast/Toast.constants.cjs.map +1 -1
  86. package/dist/components/Toast/Toast.constants.d.cts +2 -7
  87. package/dist/components/Toast/Toast.constants.d.cts.map +1 -1
  88. package/dist/components/Toast/Toast.constants.d.mts +2 -7
  89. package/dist/components/Toast/Toast.constants.d.mts.map +1 -1
  90. package/dist/components/Toast/Toast.constants.mjs +2 -7
  91. package/dist/components/Toast/Toast.constants.mjs.map +1 -1
  92. package/dist/components/Toast/Toast.types.cjs +2 -10
  93. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  94. package/dist/components/Toast/Toast.types.d.cts +4 -11
  95. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  96. package/dist/components/Toast/Toast.types.d.mts +4 -11
  97. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  98. package/dist/components/Toast/Toast.types.mjs +2 -10
  99. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  100. package/dist/components/Toast/index.cjs +3 -5
  101. package/dist/components/Toast/index.cjs.map +1 -1
  102. package/dist/components/Toast/index.d.cts +2 -2
  103. package/dist/components/Toast/index.d.cts.map +1 -1
  104. package/dist/components/Toast/index.d.mts +2 -2
  105. package/dist/components/Toast/index.d.mts.map +1 -1
  106. package/dist/components/Toast/index.mjs +2 -2
  107. package/dist/components/Toast/index.mjs.map +1 -1
  108. package/dist/components/index.cjs +2 -3
  109. package/dist/components/index.cjs.map +1 -1
  110. package/dist/components/index.d.cts +1 -1
  111. package/dist/components/index.d.cts.map +1 -1
  112. package/dist/components/index.d.mts +1 -1
  113. package/dist/components/index.d.mts.map +1 -1
  114. package/dist/components/index.mjs +1 -1
  115. package/dist/components/index.mjs.map +1 -1
  116. package/package.json +4 -4
  117. package/dist/components/ListItem/ListItem.constants.cjs +0 -14
  118. package/dist/components/ListItem/ListItem.constants.cjs.map +0 -1
  119. package/dist/components/ListItem/ListItem.constants.d.cts +0 -8
  120. package/dist/components/ListItem/ListItem.constants.d.cts.map +0 -1
  121. package/dist/components/ListItem/ListItem.constants.d.mts +0 -8
  122. package/dist/components/ListItem/ListItem.constants.d.mts.map +0 -1
  123. package/dist/components/ListItem/ListItem.constants.mjs +0 -11
  124. package/dist/components/ListItem/ListItem.constants.mjs.map +0 -1
  125. package/dist/types/index.cjs +0 -18
  126. package/dist/types/index.cjs.map +0 -1
  127. package/dist/types/index.d.cts +0 -8
  128. package/dist/types/index.d.cts.map +0 -1
  129. package/dist/types/index.d.mts +0 -8
  130. package/dist/types/index.d.mts.map +0 -1
  131. package/dist/types/index.mjs +0 -8
  132. package/dist/types/index.mjs.map +0 -1
@@ -1,59 +1,37 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
6
  exports.ListItem = void 0;
27
7
  const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
28
- const react_1 = __importStar(require("react"));
8
+ const react_1 = __importDefault(require("react"));
29
9
  const react_native_1 = require("react-native");
30
10
  const Box_1 = require("../Box/index.cjs");
31
- const ListItem_constants_1 = require("./ListItem.constants.cjs");
32
- const ListItem_types_1 = require("./ListItem.types.cjs");
33
- const VERTICAL_ALIGNMENT_MAP = {
34
- [ListItem_types_1.ListItemVerticalAlignment.Top]: Box_1.BoxAlignItems.Start,
35
- [ListItem_types_1.ListItemVerticalAlignment.Center]: Box_1.BoxAlignItems.Center,
36
- [ListItem_types_1.ListItemVerticalAlignment.Bottom]: Box_1.BoxAlignItems.End,
37
- };
38
- const ListItem = ({ children, topAccessory, bottomAccessory, topAccessoryGap = ListItem_constants_1.DEFAULT_LISTITEM_TOPACCESSORYGAP, bottomAccessoryGap = ListItem_constants_1.DEFAULT_LISTITEM_BOTTOMACCESSORYGAP, gap = ListItem_constants_1.DEFAULT_LISTITEM_GAP, verticalAlignment = ListItem_constants_1.DEFAULT_LISTITEM_VERTICALALIGNMENT, twClassName, style, ...props }) => {
11
+ const Content_1 = require("../Content/index.cjs");
12
+ const ListItem = ({ children, isInteractive = false, twClassName, style, startAccessory, endAccessory, topAccessory, bottomAccessory, verticalAlignment, avatar, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, accessibilityRole, ...props }) => {
39
13
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
40
- return (<Box_1.Box style={style
41
- ? [tw.style('p-4', twClassName), style]
42
- : tw.style('p-4', twClassName)} {...props}>
43
- {topAccessory && (<react_native_1.View testID={ListItem_constants_1.TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER} style={{ marginBottom: topAccessoryGap }}>
44
- {topAccessory}
45
- </react_native_1.View>)}
46
- <Box_1.Box flexDirection={Box_1.BoxFlexDirection.Row} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}>
47
- {react_1.Children.toArray(children)
48
- .filter((child) => Boolean(child))
49
- .map((child, index) => (<react_1.default.Fragment key={index}>
50
- {index > 0 && (<react_native_1.View style={{ width: gap }} testID={ListItem_constants_1.TESTID_LISTITEM_GAP} accessible={false}/>)}
51
- {child}
52
- </react_1.default.Fragment>))}
53
- </Box_1.Box>
54
- {bottomAccessory && (<react_native_1.View testID={ListItem_constants_1.TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER} style={{ marginTop: bottomAccessoryGap }}>
55
- {bottomAccessory}
56
- </react_native_1.View>)}
14
+ const wrapperStyle = style
15
+ ? [tw.style('px-4 py-3', twClassName), style]
16
+ : tw.style('px-4 py-3', twClassName);
17
+ const getPressableStyle = ({ pressed, }) => {
18
+ const baseStyle = tw.style('w-full px-4 py-3', twClassName, pressed && 'bg-pressed');
19
+ if (!style) {
20
+ return baseStyle;
21
+ }
22
+ const userStyle = typeof style === 'function' ? style({ pressed }) : style;
23
+ return [baseStyle, userStyle];
24
+ };
25
+ const content = (<Content_1.Content startAccessory={startAccessory} endAccessory={endAccessory} topAccessory={topAccessory} bottomAccessory={bottomAccessory} verticalAlignment={verticalAlignment} avatar={avatar} title={title} titleProps={titleProps} titleStartAccessory={titleStartAccessory} titleEndAccessory={titleEndAccessory} description={description} descriptionProps={descriptionProps} descriptionStartAccessory={descriptionStartAccessory} descriptionEndAccessory={descriptionEndAccessory} value={value} valueProps={valueProps} valueStartAccessory={valueStartAccessory} valueEndAccessory={valueEndAccessory} subvalue={subvalue} subvalueProps={subvalueProps} subvalueStartAccessory={subvalueStartAccessory} subvalueEndAccessory={subvalueEndAccessory}/>);
26
+ if (isInteractive) {
27
+ return (<react_native_1.Pressable accessibilityRole={accessibilityRole ?? 'button'} style={getPressableStyle} {...props}>
28
+ {content}
29
+ {children}
30
+ </react_native_1.Pressable>);
31
+ }
32
+ return (<Box_1.Box style={wrapperStyle} {...props}>
33
+ {content}
34
+ {children}
57
35
  </Box_1.Box>);
58
36
  };
59
37
  exports.ListItem = ListItem;
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAmE;AACnE,+CAAwC;AACxC,+CAAoD;AAEpD,0CAA8D;AAE9D,iEAQ8B;AAE9B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AAC,CAAC;aACjC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACrB,CAAC,eAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CACzB;cAAA,CAAC,KAAK,GAAG,CAAC,IAAI,CACZ,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,GAAqB,EAAE,CAAC,CACxC,MAAM,CAAC,CAAC,wCAAmB,CAAC,CAC5B,UAAU,CAAC,CAAC,KAAK,CAAC,EAClB,CACH,CACD;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,eAAK,CAAC,QAAQ,CAAC,CAClB,CAAC,CACN;MAAA,EAAE,SAAG,CACL;MAAA,CAAC,eAAe,IAAI,CAClB,CAAC,mBAAI,CACH,MAAM,CAAC,CAAC,6DAAwC,CAAC,CACjD,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAEzC;UAAA,CAAC,eAAe,CAClB;QAAA,EAAE,mBAAI,CAAC,CACR,CACH;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AA5DW,QAAA,QAAQ,YA4DnB;AAEF,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { Children } from 'react';\nimport { DimensionValue, View } from 'react-native';\n\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\n\nimport {\n DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n DEFAULT_LISTITEM_GAP,\n DEFAULT_LISTITEM_TOPACCESSORYGAP,\n DEFAULT_LISTITEM_VERTICALALIGNMENT,\n TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER,\n TESTID_LISTITEM_GAP,\n TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER,\n} from './ListItem.constants';\nimport type { ListItemProps } from './ListItem.types';\nimport { ListItemVerticalAlignment } from './ListItem.types';\n\nconst VERTICAL_ALIGNMENT_MAP: Record<ListItemVerticalAlignment, BoxAlignItems> =\n {\n [ListItemVerticalAlignment.Top]: BoxAlignItems.Start,\n [ListItemVerticalAlignment.Center]: BoxAlignItems.Center,\n [ListItemVerticalAlignment.Bottom]: BoxAlignItems.End,\n };\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n topAccessory,\n bottomAccessory,\n topAccessoryGap = DEFAULT_LISTITEM_TOPACCESSORYGAP,\n bottomAccessoryGap = DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n gap = DEFAULT_LISTITEM_GAP,\n verticalAlignment = DEFAULT_LISTITEM_VERTICALALIGNMENT,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n return (\n <Box\n style={\n style\n ? [tw.style('p-4', twClassName), style]\n : tw.style('p-4', twClassName)\n }\n {...props}\n >\n {topAccessory && (\n <View\n testID={TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER}\n style={{ marginBottom: topAccessoryGap }}\n >\n {topAccessory}\n </View>\n )}\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n >\n {Children.toArray(children)\n .filter((child) => Boolean(child))\n .map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <View\n style={{ width: gap as DimensionValue }}\n testID={TESTID_LISTITEM_GAP}\n accessible={false}\n />\n )}\n {child}\n </React.Fragment>\n ))}\n </Box>\n {bottomAccessory && (\n <View\n testID={TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER}\n style={{ marginTop: bottomAccessoryGap }}\n >\n {bottomAccessory}\n </View>\n )}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
1
+ {"version":3,"file":"ListItem.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,qFAAmE;AACnE,kDAA0B;AAC1B,+CAAyC;AAOzC,0CAA6B;AAC7B,k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QAAA,QAAQ,YAoGnB;AAEF,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\nimport type {\n PressableStateCallbackType,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport { Box } from '../Box';\nimport { Content } from '../Content';\n\nimport type { ListItemProps } from './ListItem.types';\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n isInteractive = false,\n twClassName,\n style,\n startAccessory,\n endAccessory,\n topAccessory,\n bottomAccessory,\n verticalAlignment,\n avatar,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n accessibilityRole,\n ...props\n}) => {\n const tw = useTailwind();\n\n const wrapperStyle = style\n ? [tw.style('px-4 py-3', twClassName), style]\n : tw.style('px-4 py-3', twClassName);\n\n const getPressableStyle = ({\n pressed,\n }: PressableStateCallbackType): StyleProp<ViewStyle> => {\n const baseStyle = tw.style(\n 'w-full px-4 py-3',\n twClassName,\n pressed && 'bg-pressed',\n );\n\n if (!style) {\n return baseStyle;\n }\n\n const userStyle = typeof style === 'function' ? style({ pressed }) : style;\n\n return [baseStyle, userStyle];\n };\n\n const content = (\n <Content\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n topAccessory={topAccessory}\n bottomAccessory={bottomAccessory}\n verticalAlignment={verticalAlignment}\n avatar={avatar}\n title={title}\n titleProps={titleProps}\n titleStartAccessory={titleStartAccessory}\n titleEndAccessory={titleEndAccessory}\n description={description}\n descriptionProps={descriptionProps}\n descriptionStartAccessory={descriptionStartAccessory}\n descriptionEndAccessory={descriptionEndAccessory}\n value={value}\n valueProps={valueProps}\n valueStartAccessory={valueStartAccessory}\n valueEndAccessory={valueEndAccessory}\n subvalue={subvalue}\n subvalueProps={subvalueProps}\n subvalueStartAccessory={subvalueStartAccessory}\n subvalueEndAccessory={subvalueEndAccessory}\n />\n );\n\n if (isInteractive) {\n return (\n <Pressable\n accessibilityRole={accessibilityRole ?? 'button'}\n style={getPressableStyle}\n {...props}\n >\n {content}\n {children}\n </Pressable>\n );\n }\n\n return (\n <Box style={wrapperStyle} {...props}>\n {content}\n {children}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAcxC,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAUtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4D5C,CAAC"}
1
+ {"version":3,"file":"ListItem.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoG5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAcxC,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAUtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4D5C,CAAC"}
1
+ {"version":3,"file":"ListItem.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoG5C,CAAC"}
@@ -5,36 +5,34 @@ function $importDefault(module) {
5
5
  return module;
6
6
  }
7
7
  import { useTailwind } from "@metamask/design-system-twrnc-preset";
8
- import $React, { Children } from "react";
8
+ import $React from "react";
9
9
  const React = $importDefault($React);
10
- import { View } from "react-native";
11
- import { Box, BoxAlignItems, BoxFlexDirection } from "../Box/index.mjs";
12
- import { DEFAULT_LISTITEM_BOTTOMACCESSORYGAP, DEFAULT_LISTITEM_GAP, DEFAULT_LISTITEM_TOPACCESSORYGAP, DEFAULT_LISTITEM_VERTICALALIGNMENT, TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER, TESTID_LISTITEM_GAP, TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER } from "./ListItem.constants.mjs";
13
- import { ListItemVerticalAlignment } from "./ListItem.types.mjs";
14
- const VERTICAL_ALIGNMENT_MAP = {
15
- [ListItemVerticalAlignment.Top]: BoxAlignItems.Start,
16
- [ListItemVerticalAlignment.Center]: BoxAlignItems.Center,
17
- [ListItemVerticalAlignment.Bottom]: BoxAlignItems.End,
18
- };
19
- export const ListItem = ({ children, topAccessory, bottomAccessory, topAccessoryGap = DEFAULT_LISTITEM_TOPACCESSORYGAP, bottomAccessoryGap = DEFAULT_LISTITEM_BOTTOMACCESSORYGAP, gap = DEFAULT_LISTITEM_GAP, verticalAlignment = DEFAULT_LISTITEM_VERTICALALIGNMENT, twClassName, style, ...props }) => {
10
+ import { Pressable } from "react-native";
11
+ import { Box } from "../Box/index.mjs";
12
+ import { Content } from "../Content/index.mjs";
13
+ export const ListItem = ({ children, isInteractive = false, twClassName, style, startAccessory, endAccessory, topAccessory, bottomAccessory, verticalAlignment, avatar, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, accessibilityRole, ...props }) => {
20
14
  const tw = useTailwind();
21
- return (<Box style={style
22
- ? [tw.style('p-4', twClassName), style]
23
- : tw.style('p-4', twClassName)} {...props}>
24
- {topAccessory && (<View testID={TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER} style={{ marginBottom: topAccessoryGap }}>
25
- {topAccessory}
26
- </View>)}
27
- <Box flexDirection={BoxFlexDirection.Row} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}>
28
- {Children.toArray(children)
29
- .filter((child) => Boolean(child))
30
- .map((child, index) => (<React.Fragment key={index}>
31
- {index > 0 && (<View style={{ width: gap }} testID={TESTID_LISTITEM_GAP} accessible={false}/>)}
32
- {child}
33
- </React.Fragment>))}
34
- </Box>
35
- {bottomAccessory && (<View testID={TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER} style={{ marginTop: bottomAccessoryGap }}>
36
- {bottomAccessory}
37
- </View>)}
15
+ const wrapperStyle = style
16
+ ? [tw.style('px-4 py-3', twClassName), style]
17
+ : tw.style('px-4 py-3', twClassName);
18
+ const getPressableStyle = ({ pressed, }) => {
19
+ const baseStyle = tw.style('w-full px-4 py-3', twClassName, pressed && 'bg-pressed');
20
+ if (!style) {
21
+ return baseStyle;
22
+ }
23
+ const userStyle = typeof style === 'function' ? style({ pressed }) : style;
24
+ return [baseStyle, userStyle];
25
+ };
26
+ const content = (<Content startAccessory={startAccessory} endAccessory={endAccessory} topAccessory={topAccessory} bottomAccessory={bottomAccessory} verticalAlignment={verticalAlignment} avatar={avatar} title={title} titleProps={titleProps} titleStartAccessory={titleStartAccessory} titleEndAccessory={titleEndAccessory} description={description} descriptionProps={descriptionProps} descriptionStartAccessory={descriptionStartAccessory} descriptionEndAccessory={descriptionEndAccessory} value={value} valueProps={valueProps} valueStartAccessory={valueStartAccessory} valueEndAccessory={valueEndAccessory} subvalue={subvalue} subvalueProps={subvalueProps} subvalueStartAccessory={subvalueStartAccessory} subvalueEndAccessory={subvalueEndAccessory}/>);
27
+ if (isInteractive) {
28
+ return (<Pressable accessibilityRole={accessibilityRole ?? 'button'} style={getPressableStyle} {...props}>
29
+ {content}
30
+ {children}
31
+ </Pressable>);
32
+ }
33
+ return (<Box style={wrapperStyle} {...props}>
34
+ {content}
35
+ {children}
38
36
  </Box>);
39
37
  };
40
38
  ListItem.displayName = 'ListItem';
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AACxC,OAAO,EAAkB,IAAI,EAAE,qBAAqB;AAEpD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,gBAAgB,EAAE,yBAAe;AAE9D,OAAO,EACL,mCAAmC,EACnC,oBAAoB,EACpB,gCAAgC,EAChC,kCAAkC,EAClC,wCAAwC,EACxC,mBAAmB,EACnB,qCAAqC,EACtC,iCAA6B;AAE9B,OAAO,EAAE,yBAAyB,EAAE,6BAAyB;AAE7D,MAAM,sBAAsB,GAC1B;IACE,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,KAAK;IACpD,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM;IACxD,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,GAAG;CACtD,CAAC;AAEJ,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,eAAe,GAAG,gCAAgC,EAClD,kBAAkB,GAAG,mCAAmC,EACxD,GAAG,GAAG,oBAAoB,EAC1B,iBAAiB,GAAG,kCAAkC,EACtD,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,OAAO,CACL,CAAC,GAAG,CACF,KAAK,CAAC,CACJ,KAAK;YACH,CAAC,CAAC,CAAC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C,eAAe,CAClB;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { Children } from 'react';\nimport { DimensionValue, View } from 'react-native';\n\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\n\nimport {\n DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n DEFAULT_LISTITEM_GAP,\n DEFAULT_LISTITEM_TOPACCESSORYGAP,\n DEFAULT_LISTITEM_VERTICALALIGNMENT,\n TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER,\n TESTID_LISTITEM_GAP,\n TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER,\n} from './ListItem.constants';\nimport type { ListItemProps } from './ListItem.types';\nimport { ListItemVerticalAlignment } from './ListItem.types';\n\nconst VERTICAL_ALIGNMENT_MAP: Record<ListItemVerticalAlignment, BoxAlignItems> =\n {\n [ListItemVerticalAlignment.Top]: BoxAlignItems.Start,\n [ListItemVerticalAlignment.Center]: BoxAlignItems.Center,\n [ListItemVerticalAlignment.Bottom]: BoxAlignItems.End,\n };\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n topAccessory,\n bottomAccessory,\n topAccessoryGap = DEFAULT_LISTITEM_TOPACCESSORYGAP,\n bottomAccessoryGap = DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n gap = DEFAULT_LISTITEM_GAP,\n verticalAlignment = DEFAULT_LISTITEM_VERTICALALIGNMENT,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n return (\n <Box\n style={\n style\n ? [tw.style('p-4', twClassName), style]\n : tw.style('p-4', twClassName)\n }\n {...props}\n >\n {topAccessory && (\n <View\n testID={TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER}\n style={{ marginBottom: topAccessoryGap }}\n >\n {topAccessory}\n </View>\n )}\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n >\n {Children.toArray(children)\n .filter((child) => Boolean(child))\n .map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <View\n style={{ width: gap as DimensionValue }}\n testID={TESTID_LISTITEM_GAP}\n accessible={false}\n />\n )}\n {child}\n </React.Fragment>\n ))}\n </Box>\n {bottomAccessory && (\n <View\n testID={TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER}\n style={{ marginTop: bottomAccessoryGap }}\n >\n {bottomAccessory}\n </View>\n )}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
1
+ {"version":3,"file":"ListItem.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAOzC,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,OAAO,EAAE,6BAAmB;AAIrC,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,aAAa,GAAG,KAAK,EACrB,WAAW,EACX,KAAK,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,MAAM,EACN,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,MAAM,YAAY,GAAG,KAAK;QACxB,CAAC,CAAC,CAAC,EA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AC,mBAAmB,CAAC,CACzC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAC/C,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,EAC3C,CACH,CAAC;IAEF,IAAI,aAAa,EAAE;QACjB,OAAO,CACL,CAAC,SAAS,CACR,iBAAiB,CAAC,CAAC,iBAAiB,IAAI,QAAQ,CAAC,CACjD,KAAK,CAAC,CAAC,iBAAiB,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,OAAO,CACR;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,CACL,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAClC;MAAA,CAAC,OAAO,CACR;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\nimport type {\n PressableStateCallbackType,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport { Box } from '../Box';\nimport { Content } from '../Content';\n\nimport type { ListItemProps } from './ListItem.types';\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n isInteractive = false,\n twClassName,\n style,\n startAccessory,\n endAccessory,\n topAccessory,\n bottomAccessory,\n verticalAlignment,\n avatar,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n accessibilityRole,\n ...props\n}) => {\n const tw = useTailwind();\n\n const wrapperStyle = style\n ? [tw.style('px-4 py-3', twClassName), style]\n : tw.style('px-4 py-3', twClassName);\n\n const getPressableStyle = ({\n pressed,\n }: PressableStateCallbackType): StyleProp<ViewStyle> => {\n const baseStyle = tw.style(\n 'w-full px-4 py-3',\n twClassName,\n pressed && 'bg-pressed',\n );\n\n if (!style) {\n return baseStyle;\n }\n\n const userStyle = typeof style === 'function' ? style({ pressed }) : style;\n\n return [baseStyle, userStyle];\n };\n\n const content = (\n <Content\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n topAccessory={topAccessory}\n bottomAccessory={bottomAccessory}\n verticalAlignment={verticalAlignment}\n avatar={avatar}\n title={title}\n titleProps={titleProps}\n titleStartAccessory={titleStartAccessory}\n titleEndAccessory={titleEndAccessory}\n description={description}\n descriptionProps={descriptionProps}\n descriptionStartAccessory={descriptionStartAccessory}\n descriptionEndAccessory={descriptionEndAccessory}\n value={value}\n valueProps={valueProps}\n valueStartAccessory={valueStartAccessory}\n valueEndAccessory={valueEndAccessory}\n subvalue={subvalue}\n subvalueProps={subvalueProps}\n subvalueStartAccessory={subvalueStartAccessory}\n subvalueEndAccessory={subvalueEndAccessory}\n />\n );\n\n if (isInteractive) {\n return (\n <Pressable\n accessibilityRole={accessibilityRole ?? 'button'}\n style={getPressableStyle}\n {...props}\n >\n {content}\n {children}\n </Pressable>\n );\n }\n\n return (\n <Box style={wrapperStyle} {...props}>\n {content}\n {children}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
@@ -1,12 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListItemVerticalAlignment = void 0;
4
- /**
5
- * Vertical alignment options for children inside the ListItem row.
6
- */
7
- exports.ListItemVerticalAlignment = {
8
- Top: 'top',
9
- Center: 'center',
10
- Bottom: 'bottom',
11
- };
12
3
  //# sourceMappingURL=ListItem.types.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.types.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACvC,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\n/**\n * Vertical alignment options for children inside the ListItem row.\n */\nexport const ListItemVerticalAlignment = {\n Top: 'top',\n Center: 'center',\n Bottom: 'bottom',\n} as const;\n\nexport type ListItemVerticalAlignment =\n (typeof ListItemVerticalAlignment)[keyof typeof ListItemVerticalAlignment];\n\n/**\n * ListItem component props.\n *\n * Extends `ViewProps` so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type ListItemProps = {\n /**\n * Content to display inside the list item row.\n */\n children?: ReactNode;\n /**\n * Optional content displayed above the list item row.\n */\n topAccessory?: ReactNode;\n /**\n * Optional content displayed below the list item row.\n */\n bottomAccessory?: ReactNode;\n /**\n * Gap in pixels between the topAccessory and the row.\n *\n * @default 0\n */\n topAccessoryGap?: number;\n /**\n * Gap in pixels between the row and the bottomAccessory.\n *\n * @default 0\n */\n bottomAccessoryGap?: number;\n /**\n * Horizontal spacing between each child inside the row.\n *\n * @default 16\n */\n gap?: number | string;\n /**\n * Vertical alignment of children inside the row.\n *\n * @default ListItemVerticalAlignment.Center\n */\n verticalAlignment?: ListItemVerticalAlignment;\n /**\n * Optional Tailwind class names to override default styles on the root element.\n */\n twClassName?: string;\n} & ViewProps;\n"]}
1
+ {"version":3,"file":"ListItem.types.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ListItemPropsShared } from '@metamask/design-system-shared';\nimport type { PressableProps } from 'react-native';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { ContentProps } from '../Content/Content.types';\n\ntype ListItemPropsBase = ListItemPropsShared & ContentProps;\n\n/**\n * ListItem component props.\n *\n * Wraps {@link Content} in a padded root (`px-4 py-3`). When `isInteractive` is\n * `false` (default), the root is a `Box`; when `true`, the root is a `Pressable`.\n */\nexport type ListItemProps =\n | (ListItemPropsBase & { isInteractive?: false } & Omit<BoxProps, 'children'>)\n | (ListItemPropsBase & {\n isInteractive: true;\n } & Omit<PressableProps, 'children'>);\n"]}
@@ -1,60 +1,18 @@
1
- import type { ReactNode } from "react";
2
- import type { ViewProps } from "react-native";
3
- /**
4
- * Vertical alignment options for children inside the ListItem row.
5
- */
6
- export declare const ListItemVerticalAlignment: {
7
- readonly Top: "top";
8
- readonly Center: "center";
9
- readonly Bottom: "bottom";
10
- };
11
- export type ListItemVerticalAlignment = (typeof ListItemVerticalAlignment)[keyof typeof ListItemVerticalAlignment];
1
+ import type { ListItemPropsShared } from "@metamask/design-system-shared";
2
+ import type { PressableProps } from "react-native";
3
+ import type { BoxProps } from "../Box/Box.types.cjs";
4
+ import type { ContentProps } from "../Content/Content.types.cjs";
5
+ type ListItemPropsBase = ListItemPropsShared & ContentProps;
12
6
  /**
13
7
  * ListItem component props.
14
8
  *
15
- * Extends `ViewProps` so the root View inherits standard React Native
16
- * props such as `testID` and `accessibilityLabel`.
9
+ * Wraps {@link Content} in a padded root (`px-4 py-3`). When `isInteractive` is
10
+ * `false` (default), the root is a `Box`; when `true`, the root is a `Pressable`.
17
11
  */
18
- export type ListItemProps = {
19
- /**
20
- * Content to display inside the list item row.
21
- */
22
- children?: ReactNode;
23
- /**
24
- * Optional content displayed above the list item row.
25
- */
26
- topAccessory?: ReactNode;
27
- /**
28
- * Optional content displayed below the list item row.
29
- */
30
- bottomAccessory?: ReactNode;
31
- /**
32
- * Gap in pixels between the topAccessory and the row.
33
- *
34
- * @default 0
35
- */
36
- topAccessoryGap?: number;
37
- /**
38
- * Gap in pixels between the row and the bottomAccessory.
39
- *
40
- * @default 0
41
- */
42
- bottomAccessoryGap?: number;
43
- /**
44
- * Horizontal spacing between each child inside the row.
45
- *
46
- * @default 16
47
- */
48
- gap?: number | string;
49
- /**
50
- * Vertical alignment of children inside the row.
51
- *
52
- * @default ListItemVerticalAlignment.Center
53
- */
54
- verticalAlignment?: ListItemVerticalAlignment;
55
- /**
56
- * Optional Tailwind class names to override default styles on the root element.
57
- */
58
- twClassName?: string;
59
- } & ViewProps;
12
+ export type ListItemProps = (ListItemPropsBase & {
13
+ isInteractive?: false;
14
+ } & Omit<BoxProps, 'children'>) | (ListItemPropsBase & {
15
+ isInteractive: true;
16
+ } & Omit<PressableProps, 'children'>);
17
+ export {};
60
18
  //# sourceMappingURL=ListItem.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.types.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX,MAAM,MAAM,yBAAyB,GACnC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"ListItem.types.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uCAAuC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,qCAAiC;AAE7D,KAAK,iBAAiB,GAAG,mBAAmB,GAAG,YAAY,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,CAAC,iBAAiB,GAAG;IAAE,aAAa,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,GAC5E,CAAC,iBAAiB,GAAG;IACnB,aAAa,EAAE,IAAI,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC"}
@@ -1,60 +1,18 @@
1
- import type { ReactNode } from "react";
2
- import type { ViewProps } from "react-native";
3
- /**
4
- * Vertical alignment options for children inside the ListItem row.
5
- */
6
- export declare const ListItemVerticalAlignment: {
7
- readonly Top: "top";
8
- readonly Center: "center";
9
- readonly Bottom: "bottom";
10
- };
11
- export type ListItemVerticalAlignment = (typeof ListItemVerticalAlignment)[keyof typeof ListItemVerticalAlignment];
1
+ import type { ListItemPropsShared } from "@metamask/design-system-shared";
2
+ import type { PressableProps } from "react-native";
3
+ import type { BoxProps } from "../Box/Box.types.mjs";
4
+ import type { ContentProps } from "../Content/Content.types.mjs";
5
+ type ListItemPropsBase = ListItemPropsShared & ContentProps;
12
6
  /**
13
7
  * ListItem component props.
14
8
  *
15
- * Extends `ViewProps` so the root View inherits standard React Native
16
- * props such as `testID` and `accessibilityLabel`.
9
+ * Wraps {@link Content} in a padded root (`px-4 py-3`). When `isInteractive` is
10
+ * `false` (default), the root is a `Box`; when `true`, the root is a `Pressable`.
17
11
  */
18
- export type ListItemProps = {
19
- /**
20
- * Content to display inside the list item row.
21
- */
22
- children?: ReactNode;
23
- /**
24
- * Optional content displayed above the list item row.
25
- */
26
- topAccessory?: ReactNode;
27
- /**
28
- * Optional content displayed below the list item row.
29
- */
30
- bottomAccessory?: ReactNode;
31
- /**
32
- * Gap in pixels between the topAccessory and the row.
33
- *
34
- * @default 0
35
- */
36
- topAccessoryGap?: number;
37
- /**
38
- * Gap in pixels between the row and the bottomAccessory.
39
- *
40
- * @default 0
41
- */
42
- bottomAccessoryGap?: number;
43
- /**
44
- * Horizontal spacing between each child inside the row.
45
- *
46
- * @default 16
47
- */
48
- gap?: number | string;
49
- /**
50
- * Vertical alignment of children inside the row.
51
- *
52
- * @default ListItemVerticalAlignment.Center
53
- */
54
- verticalAlignment?: ListItemVerticalAlignment;
55
- /**
56
- * Optional Tailwind class names to override default styles on the root element.
57
- */
58
- twClassName?: string;
59
- } & ViewProps;
12
+ export type ListItemProps = (ListItemPropsBase & {
13
+ isInteractive?: false;
14
+ } & Omit<BoxProps, 'children'>) | (ListItemPropsBase & {
15
+ isInteractive: true;
16
+ } & Omit<PressableProps, 'children'>);
17
+ export {};
60
18
  //# sourceMappingURL=ListItem.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.types.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX,MAAM,MAAM,yBAAyB,GACnC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"ListItem.types.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uCAAuC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,qCAAiC;AAE7D,KAAK,iBAAiB,GAAG,mBAAmB,GAAG,YAAY,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,CAAC,iBAAiB,GAAG;IAAE,aAAa,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,GAC5E,CAAC,iBAAiB,GAAG;IACnB,aAAa,EAAE,IAAI,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC"}
@@ -1,9 +1,2 @@
1
- /**
2
- * Vertical alignment options for children inside the ListItem row.
3
- */
4
- export const ListItemVerticalAlignment = {
5
- Top: 'top',
6
- Center: 'center',
7
- Bottom: 'bottom',
8
- };
1
+ export {};
9
2
  //# sourceMappingURL=ListItem.types.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.types.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\n/**\n * Vertical alignment options for children inside the ListItem row.\n */\nexport const ListItemVerticalAlignment = {\n Top: 'top',\n Center: 'center',\n Bottom: 'bottom',\n} as const;\n\nexport type ListItemVerticalAlignment =\n (typeof ListItemVerticalAlignment)[keyof typeof ListItemVerticalAlignment];\n\n/**\n * ListItem component props.\n *\n * Extends `ViewProps` so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type ListItemProps = {\n /**\n * Content to display inside the list item row.\n */\n children?: ReactNode;\n /**\n * Optional content displayed above the list item row.\n */\n topAccessory?: ReactNode;\n /**\n * Optional content displayed below the list item row.\n */\n bottomAccessory?: ReactNode;\n /**\n * Gap in pixels between the topAccessory and the row.\n *\n * @default 0\n */\n topAccessoryGap?: number;\n /**\n * Gap in pixels between the row and the bottomAccessory.\n *\n * @default 0\n */\n bottomAccessoryGap?: number;\n /**\n * Horizontal spacing between each child inside the row.\n *\n * @default 16\n */\n gap?: number | string;\n /**\n * Vertical alignment of children inside the row.\n *\n * @default ListItemVerticalAlignment.Center\n */\n verticalAlignment?: ListItemVerticalAlignment;\n /**\n * Optional Tailwind class names to override default styles on the root element.\n */\n twClassName?: string;\n} & ViewProps;\n"]}
1
+ {"version":3,"file":"ListItem.types.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ListItemPropsShared } from '@metamask/design-system-shared';\nimport type { PressableProps } from 'react-native';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { ContentProps } from '../Content/Content.types';\n\ntype ListItemPropsBase = ListItemPropsShared & ContentProps;\n\n/**\n * ListItem component props.\n *\n * Wraps {@link Content} in a padded root (`px-4 py-3`). When `isInteractive` is\n * `false` (default), the root is a `Box`; when `true`, the root is a `Pressable`.\n */\nexport type ListItemProps =\n | (ListItemPropsBase & { isInteractive?: false } & Omit<BoxProps, 'children'>)\n | (ListItemPropsBase & {\n isInteractive: true;\n } & Omit<PressableProps, 'children'>);\n"]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListItemVerticalAlignment = exports.ListItem = void 0;
3
+ exports.ListItem = void 0;
4
4
  var ListItem_1 = require("./ListItem.cjs");
5
5
  Object.defineProperty(exports, "ListItem", { enumerable: true, get: function () { return ListItem_1.ListItem; } });
6
- var ListItem_types_1 = require("./ListItem.types.cjs");
7
- Object.defineProperty(exports, "ListItemVerticalAlignment", { enumerable: true, get: function () { return ListItem_types_1.ListItemVerticalAlignment; } });
8
6
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,uDAA6D;AAApD,2HAAA,yBAAyB,OAAA","sourcesContent":["export { ListItem } from './ListItem';\nexport { ListItemVerticalAlignment } from './ListItem.types';\nexport type { ListItemProps } from './ListItem.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAA7B,oGAAA,QAAQ,OAAA","sourcesContent":["export { ListItem } from './ListItem';\nexport type { ListItemProps } from './ListItem.types';\n"]}
@@ -1,4 +1,3 @@
1
1
  export { ListItem } from "./ListItem.cjs";
2
- export { ListItemVerticalAlignment } from "./ListItem.types.cjs";
3
2
  export type { ListItemProps } from "./ListItem.types.cjs";
4
3
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,yBAAyB,EAAE,6BAAyB;AAC7D,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
@@ -1,4 +1,3 @@
1
1
  export { ListItem } from "./ListItem.mjs";
2
- export { ListItemVerticalAlignment } from "./ListItem.types.mjs";
3
2
  export type { ListItemProps } from "./ListItem.types.mjs";
4
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,yBAAyB,EAAE,6BAAyB;AAC7D,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
@@ -1,3 +1,2 @@
1
1
  export { ListItem } from "./ListItem.mjs";
2
- export { ListItemVerticalAlignment } from "./ListItem.types.mjs";
3
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,OAAO,EAAE,yBAAyB,EAAE,6BAAyB","sourcesContent":["export { ListItem } from './ListItem';\nexport { ListItemVerticalAlignment } from './ListItem.types';\nexport type { ListItemProps } from './ListItem.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB","sourcesContent":["export { ListItem } from './ListItem';\nexport type { ListItemProps } from './ListItem.types';\n"]}
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME = void 0;
4
4
  const design_system_shared_1 = require("@metamask/design-system-shared");
5
- const types_1 = require("../../types/index.cjs");
6
5
  exports.MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME = {
7
- [design_system_shared_1.SelectButtonEndArrow.Up]: types_1.IconName.ArrowUp,
8
- [design_system_shared_1.SelectButtonEndArrow.Down]: types_1.IconName.ArrowDown,
9
- [design_system_shared_1.SelectButtonEndArrow.Left]: types_1.IconName.ArrowLeft,
10
- [design_system_shared_1.SelectButtonEndArrow.Right]: types_1.IconName.ArrowRight,
6
+ [design_system_shared_1.SelectButtonEndArrow.Up]: design_system_shared_1.IconName.ArrowUp,
7
+ [design_system_shared_1.SelectButtonEndArrow.Down]: design_system_shared_1.IconName.ArrowDown,
8
+ [design_system_shared_1.SelectButtonEndArrow.Left]: design_system_shared_1.IconName.ArrowLeft,
9
+ [design_system_shared_1.SelectButtonEndArrow.Right]: design_system_shared_1.IconName.ArrowRight,
11
10
  };
12
11
  //# sourceMappingURL=SelectButton.constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.cjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAEtE,iDAAuC;AAE1B,QAAA,iDAAiD,GAG1D;IACF,CAAC,2CAAoB,CAAC,EAAE,CAAC,EAAE,gBAAQ,CAAC,OAAO;IAC3C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,gBAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,gBAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,KAAK,CAAC,EAAE,gBAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { SelectButtonEndArrow } from '@metamask/design-system-shared';\n\nimport { IconName } from '../../types';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}
1
+ {"version":3,"file":"SelectButton.constants.cjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":";;;AAAA,yEAAgF;AAEnE,QAAA,iDAAiD,GAG1D;IACF,CAAC,2CAAoB,CAAC,EAAE,CAAC,EAAE,+BAAQ,CAAC,OAAO;IAC3C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,+BAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,+BAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,KAAK,CAAC,EAAE,+BAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { IconName, SelectButtonEndArrow } from '@metamask/design-system-shared';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}
@@ -1,4 +1,3 @@
1
- import { SelectButtonEndArrow } from "@metamask/design-system-shared";
2
- import { IconName } from "../../types/index.cjs";
1
+ import { IconName, SelectButtonEndArrow } from "@metamask/design-system-shared";
3
2
  export declare const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<(typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow], IconName>;
4
3
  //# sourceMappingURL=SelectButton.constants.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.d.cts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AAEtE,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAEvC,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
1
+ {"version":3,"file":"SelectButton.constants.d.cts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,uCAAuC;AAEhF,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
@@ -1,4 +1,3 @@
1
- import { SelectButtonEndArrow } from "@metamask/design-system-shared";
2
- import { IconName } from "../../types/index.mjs";
1
+ import { IconName, SelectButtonEndArrow } from "@metamask/design-system-shared";
3
2
  export declare const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<(typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow], IconName>;
4
3
  //# sourceMappingURL=SelectButton.constants.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.d.mts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AAEtE,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAEvC,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
1
+ {"version":3,"file":"SelectButton.constants.d.mts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,uCAAuC;AAEhF,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
@@ -1,5 +1,4 @@
1
- import { SelectButtonEndArrow } from "@metamask/design-system-shared";
2
- import { IconName } from "../../types/index.mjs";
1
+ import { IconName, SelectButtonEndArrow } from "@metamask/design-system-shared";
3
2
  export const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME = {
4
3
  [SelectButtonEndArrow.Up]: IconName.ArrowUp,
5
4
  [SelectButtonEndArrow.Down]: IconName.ArrowDown,
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.mjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AAEtE,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAEvC,MAAM,CAAC,MAAM,iDAAiD,GAG1D;IACF,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,OAAO;IAC3C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { SelectButtonEndArrow } from '@metamask/design-system-shared';\n\nimport { IconName } from '../../types';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}
1
+ {"version":3,"file":"SelectButton.constants.mjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,uCAAuC;AAEhF,MAAM,CAAC,MAAM,iDAAiD,GAG1D;IACF,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,OAAO;IAC3C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { IconName, SelectButtonEndArrow } from '@metamask/design-system-shared';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}