@metamask/design-system-react-native 0.25.0 → 0.26.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 (83) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/dist/components/Icon/assets/telegram.svg +1 -3
  3. package/dist/components/SectionDivider/SectionDivider.cjs +47 -0
  4. package/dist/components/SectionDivider/SectionDivider.cjs.map +1 -0
  5. package/dist/components/SectionDivider/SectionDivider.d.cts +6 -0
  6. package/dist/components/SectionDivider/SectionDivider.d.cts.map +1 -0
  7. package/dist/components/SectionDivider/SectionDivider.d.mts +6 -0
  8. package/dist/components/SectionDivider/SectionDivider.d.mts.map +1 -0
  9. package/dist/components/SectionDivider/SectionDivider.mjs +28 -0
  10. package/dist/components/SectionDivider/SectionDivider.mjs.map +1 -0
  11. package/dist/components/SectionDivider/SectionDivider.types.cjs +3 -0
  12. package/dist/components/SectionDivider/SectionDivider.types.cjs.map +1 -0
  13. package/dist/components/SectionDivider/SectionDivider.types.d.cts +3 -0
  14. package/dist/components/SectionDivider/SectionDivider.types.d.cts.map +1 -0
  15. package/dist/components/SectionDivider/SectionDivider.types.d.mts +3 -0
  16. package/dist/components/SectionDivider/SectionDivider.types.d.mts.map +1 -0
  17. package/dist/components/SectionDivider/SectionDivider.types.mjs +2 -0
  18. package/dist/components/SectionDivider/SectionDivider.types.mjs.map +1 -0
  19. package/dist/components/SectionDivider/index.cjs +6 -0
  20. package/dist/components/SectionDivider/index.cjs.map +1 -0
  21. package/dist/components/SectionDivider/index.d.cts +3 -0
  22. package/dist/components/SectionDivider/index.d.cts.map +1 -0
  23. package/dist/components/SectionDivider/index.d.mts +3 -0
  24. package/dist/components/SectionDivider/index.d.mts.map +1 -0
  25. package/dist/components/SectionDivider/index.mjs +2 -0
  26. package/dist/components/SectionDivider/index.mjs.map +1 -0
  27. package/dist/components/SectionHeader/SectionHeader.cjs +45 -0
  28. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -0
  29. package/dist/components/SectionHeader/SectionHeader.d.cts +23 -0
  30. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -0
  31. package/dist/components/SectionHeader/SectionHeader.d.mts +23 -0
  32. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -0
  33. package/dist/components/SectionHeader/SectionHeader.mjs +45 -0
  34. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -0
  35. package/dist/components/SectionHeader/SectionHeader.types.cjs +3 -0
  36. package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -0
  37. package/dist/components/SectionHeader/SectionHeader.types.d.cts +32 -0
  38. package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -0
  39. package/dist/components/SectionHeader/SectionHeader.types.d.mts +32 -0
  40. package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -0
  41. package/dist/components/SectionHeader/SectionHeader.types.mjs +2 -0
  42. package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -0
  43. package/dist/components/SectionHeader/index.cjs +6 -0
  44. package/dist/components/SectionHeader/index.cjs.map +1 -0
  45. package/dist/components/SectionHeader/index.d.cts +3 -0
  46. package/dist/components/SectionHeader/index.d.cts.map +1 -0
  47. package/dist/components/SectionHeader/index.d.mts +3 -0
  48. package/dist/components/SectionHeader/index.d.mts.map +1 -0
  49. package/dist/components/SectionHeader/index.mjs +2 -0
  50. package/dist/components/SectionHeader/index.mjs.map +1 -0
  51. package/dist/components/TitleAlert/TitleAlert.cjs +54 -0
  52. package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -0
  53. package/dist/components/TitleAlert/TitleAlert.d.cts +21 -0
  54. package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -0
  55. package/dist/components/TitleAlert/TitleAlert.d.mts +21 -0
  56. package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -0
  57. package/dist/components/TitleAlert/TitleAlert.mjs +54 -0
  58. package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -0
  59. package/dist/components/TitleAlert/TitleAlert.types.cjs +3 -0
  60. package/dist/components/TitleAlert/TitleAlert.types.cjs.map +1 -0
  61. package/dist/components/TitleAlert/TitleAlert.types.d.cts +31 -0
  62. package/dist/components/TitleAlert/TitleAlert.types.d.cts.map +1 -0
  63. package/dist/components/TitleAlert/TitleAlert.types.d.mts +31 -0
  64. package/dist/components/TitleAlert/TitleAlert.types.d.mts.map +1 -0
  65. package/dist/components/TitleAlert/TitleAlert.types.mjs +2 -0
  66. package/dist/components/TitleAlert/TitleAlert.types.mjs.map +1 -0
  67. package/dist/components/TitleAlert/index.cjs +6 -0
  68. package/dist/components/TitleAlert/index.cjs.map +1 -0
  69. package/dist/components/TitleAlert/index.d.cts +3 -0
  70. package/dist/components/TitleAlert/index.d.cts.map +1 -0
  71. package/dist/components/TitleAlert/index.d.mts +3 -0
  72. package/dist/components/TitleAlert/index.d.mts.map +1 -0
  73. package/dist/components/TitleAlert/index.mjs +2 -0
  74. package/dist/components/TitleAlert/index.mjs.map +1 -0
  75. package/dist/components/index.cjs +8 -2
  76. package/dist/components/index.cjs.map +1 -1
  77. package/dist/components/index.d.cts +6 -0
  78. package/dist/components/index.d.cts.map +1 -1
  79. package/dist/components/index.d.mts +6 -0
  80. package/dist/components/index.d.mts.map +1 -1
  81. package/dist/components/index.mjs +3 -0
  82. package/dist/components/index.mjs.map +1 -1
  83. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.26.0]
11
+
12
+ ### Added
13
+
14
+ - Added `TitleAlert` for alert-style headings with a severity icon, title row, and optional description in modals, bottom sheets, and other compact surfaces ([#1131](https://github.com/MetaMask/metamask-design-system/pull/1131))
15
+ - Added `SectionHeader` for section titles with optional start and end accessories, icon shortcuts, and an inline title accessory ([#1175](https://github.com/MetaMask/metamask-design-system/pull/1175))
16
+ - Added `SectionDivider` as a horizontal rule with a muted top border and default vertical spacing for separating screen sections ([#1174](https://github.com/MetaMask/metamask-design-system/pull/1174))
17
+
18
+ ### Changed
19
+
20
+ - Updated the `Telegram` icon asset to match the official Telegram logo ([#1176](https://github.com/MetaMask/metamask-design-system/pull/1176))
21
+
10
22
  ## [0.25.0]
11
23
 
12
24
  ### Added
@@ -434,7 +446,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
434
446
  - Full TypeScript support with type definitions and enums
435
447
  - React Native integration with TWRNC preset support
436
448
 
437
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.25.0...HEAD
449
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.26.0...HEAD
450
+ [0.26.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.25.0...@metamask/design-system-react-native@0.26.0
438
451
  [0.25.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.24.0...@metamask/design-system-react-native@0.25.0
439
452
  [0.24.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.23.0...@metamask/design-system-react-native@0.24.0
440
453
  [0.23.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.22.0...@metamask/design-system-react-native@0.23.0
@@ -1,3 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z"/>
3
- </svg>
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.2949 3.81315C20.2949 3.81315 22.145 3.09173 21.9908 4.84377C21.9395 5.5652 21.4769 8.0902 21.1172 10.8213L19.8837 18.9117C19.8837 18.9117 19.781 20.0969 18.8559 20.303C17.9308 20.5091 16.5432 19.5816 16.2862 19.3754C16.0807 19.2209 12.4318 16.902 11.1469 15.7683C10.7872 15.4591 10.376 14.8407 11.1983 14.1193L16.5946 8.96625C17.2113 8.34787 17.828 6.90501 15.2584 8.65706L8.06338 13.5525C8.06338 13.5525 7.24109 14.0678 5.69933 13.604L2.35877 12.5734C2.35877 12.5734 1.12534 11.8004 3.23245 11.0274C8.37176 8.60549 14.6931 6.13201 20.2949 3.81315Z"/></svg>
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SectionDivider = void 0;
27
+ const design_system_shared_1 = require("@metamask/design-system-shared");
28
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
29
+ const react_1 = __importStar(require("react"));
30
+ const Box_1 = require("../Box/index.cjs");
31
+ exports.SectionDivider = (0, react_1.forwardRef)(({ borderWidth, borderColor, marginVertical, twClassName, style, ...rest }, ref) => {
32
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
33
+ const w = borderWidth ?? 1;
34
+ let borderTopClass;
35
+ if (w === 0) {
36
+ borderTopClass = 'border-t-0';
37
+ }
38
+ else if (w === 1) {
39
+ borderTopClass = 'border-t';
40
+ }
41
+ else {
42
+ borderTopClass = `border-t-${w}`;
43
+ }
44
+ return (<Box_1.Box ref={ref} borderColor={borderColor ?? design_system_shared_1.BoxBorderColor.BorderMuted} marginVertical={marginVertical ?? 5} style={[tw.style('self-stretch', borderTopClass, twClassName), style]} {...rest}/>);
45
+ });
46
+ exports.SectionDivider.displayName = 'SectionDivider';
47
+ //# sourceMappingURL=SectionDivider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAgE;AAChE,qFAAmE;AACnE,+CAA0C;AAG1C,0CAA6B;AAIhB,QAAA,cAAc,GAAG,IAAA,kBAAU,EACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,cAAc,GAAG,YAAY,CAAC;KAC/B;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE;QAClB,cAAc,GAAG,UAAU,CAAC;KAC7B;SAAM;QACL,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;KAClC;IAED,OAAO,CACL,CAAC,SAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,qCAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import type { View } from "react-native/index.js";
3
+ export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
4
+ twClassName?: string | undefined;
5
+ } & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=SectionDivider.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.d.cts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,cAAc;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,8BAAqB;AAMzC,eAAO,MAAM,cAAc;;8BA0B1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import type { View } from "react-native/index.js";
3
+ export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
4
+ twClassName?: string | undefined;
5
+ } & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=SectionDivider.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.d.mts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,cAAc;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,8BAAqB;AAMzC,eAAO,MAAM,cAAc;;8BA0B1B,CAAC"}
@@ -0,0 +1,28 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { BoxBorderColor } from "@metamask/design-system-shared";
8
+ import { useTailwind } from "@metamask/design-system-twrnc-preset";
9
+ import $React, { forwardRef } from "react";
10
+ const React = $importDefault($React);
11
+ import { Box } from "../Box/index.mjs";
12
+ export const SectionDivider = forwardRef(({ borderWidth, borderColor, marginVertical, twClassName, style, ...rest }, ref) => {
13
+ const tw = useTailwind();
14
+ const w = borderWidth ?? 1;
15
+ let borderTopClass;
16
+ if (w === 0) {
17
+ borderTopClass = 'border-t-0';
18
+ }
19
+ else if (w === 1) {
20
+ borderTopClass = 'border-t';
21
+ }
22
+ else {
23
+ borderTopClass = `border-t-${w}`;
24
+ }
25
+ return (<Box ref={ref} borderColor={borderColor ?? BoxBorderColor.BorderMuted} marginVertical={marginVertical ?? 5} style={[tw.style('self-stretch', borderTopClass, twClassName), style]} {...rest}/>);
26
+ });
27
+ SectionDivider.displayName = 'SectionDivider';
28
+ //# sourceMappingURL=SectionDivider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,uCAAuC;AAChE,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAG1C,OAAO,EAAE,GAAG,EAAE,yBAAe;AAI7B,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,cAAc,GAAG,YAAY,CAAC;KAC/B;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE;QAClB,cAAc,GAAG,UAAU,CAAC;KAC7B;SAAM;QACL,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;KAClC;IAED,OAAO,CACL,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SectionDivider.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxProps } from '../Box/Box.types';\n\nexport type SectionDividerProps = BoxProps;\n"]}
@@ -0,0 +1,3 @@
1
+ import type { BoxProps } from "../Box/Box.types.cjs";
2
+ export type SectionDividerProps = BoxProps;
3
+ //# sourceMappingURL=SectionDivider.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AAEjD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { BoxProps } from "../Box/Box.types.mjs";
2
+ export type SectionDividerProps = BoxProps;
3
+ //# sourceMappingURL=SectionDivider.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.d.mts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AAEjD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SectionDivider.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxProps } from '../Box/Box.types';\n\nexport type SectionDividerProps = BoxProps;\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SectionDivider = void 0;
4
+ var SectionDivider_1 = require("./SectionDivider.cjs");
5
+ Object.defineProperty(exports, "SectionDivider", { enumerable: true, get: function () { return SectionDivider_1.SectionDivider; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAAzC,gHAAA,cAAc,OAAA","sourcesContent":["export { SectionDivider } from './SectionDivider';\nexport type { SectionDividerProps } from './SectionDivider.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { SectionDivider } from "./SectionDivider.cjs";
2
+ export type { SectionDividerProps } from "./SectionDivider.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,YAAY,EAAE,mBAAmB,EAAE,mCAA+B"}
@@ -0,0 +1,3 @@
1
+ export { SectionDivider } from "./SectionDivider.mjs";
2
+ export type { SectionDividerProps } from "./SectionDivider.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,YAAY,EAAE,mBAAmB,EAAE,mCAA+B"}
@@ -0,0 +1,2 @@
1
+ export { SectionDivider } from "./SectionDivider.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB","sourcesContent":["export { SectionDivider } from './SectionDivider';\nexport type { SectionDividerProps } from './SectionDivider.types';\n"]}
@@ -0,0 +1,45 @@
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.SectionHeader = void 0;
7
+ const design_system_shared_1 = require("@metamask/design-system-shared");
8
+ const react_1 = __importDefault(require("react"));
9
+ const BoxRow_1 = require("../BoxRow/index.cjs");
10
+ const Icon_1 = require("../Icon/index.cjs");
11
+ /**
12
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
13
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
14
+ *
15
+ * @param props - Component props
16
+ * @param props.title - Title content for the inner row (required)
17
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
18
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
19
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
20
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
21
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
22
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
23
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
24
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
25
+ * @param props.endIconProps - Props merged into the end `Icon`
26
+ * @param props.twClassName - Optional Tailwind classes on the outer row
27
+ *
28
+ * @returns The rendered SectionHeader layout.
29
+ */
30
+ const SectionHeader = ({ title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, twClassName = '', ...rest }) => {
31
+ const finalStartIconName = startIconName ?? startIconProps?.name;
32
+ const finalEndIconName = endIconName ?? endIconProps?.name;
33
+ return (<BoxRow_1.BoxRow {...rest} gap={1} twClassName={twClassName} startAccessory={finalStartIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={finalStartIconName}/>) : (startAccessory)} endAccessory={finalEndIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...endIconProps} name={finalEndIconName}/>) : (endAccessory)}>
34
+ {title ? (<BoxRow_1.BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
35
+ variant: design_system_shared_1.TextVariant.HeadingMd,
36
+ color: design_system_shared_1.TextColor.TextDefault,
37
+ ...titleProps,
38
+ }}>
39
+ {title}
40
+ </BoxRow_1.BoxRow>) : null}
41
+ </BoxRow_1.BoxRow>);
42
+ };
43
+ exports.SectionHeader = SectionHeader;
44
+ exports.SectionHeader.displayName = 'SectionHeader';
45
+ //# sourceMappingURL=SectionHeader.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAKwC;AACxC,kDAA0B;AAE1B,gDAAmC;AACnC,4CAA+B;AAI/B;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,GAAG,EAAE,EAChB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,OAAO,CACL,CAAC,eAAM,CACL,IAAI,IAAI,CAAC,CACT,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CACb,kBAAkB,CAAC,CAAC,CAAC,CACnB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,CACnB,IAAI,CAAC,CAAC,kBAAkB,CAAC,EACzB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACF,CACD,YAAY,CAAC,CACX,gBAAgB,CAAC,CAAC,CAAC,CACjB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,CACjB,IAAI,CAAC,CAAC,gBAAgB,CAAC,EACvB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACF,CAED;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,eAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,cAAc,CAAC,CAC7B,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,gCAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,aAAa,iBAiExB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * Remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param props - Component props\n * @param props.title - Title content for the inner row (required)\n * @param props.titleAccessory - Optional node to the right of `title` in the inner row\n * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved\n * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved\n * @param props.endIconProps - Props merged into the end `Icon`\n * @param props.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = ({\n title,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n twClassName = '',\n ...rest\n}) => {\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n return (\n <BoxRow\n {...rest}\n gap={1}\n twClassName={twClassName}\n startAccessory={\n finalStartIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={finalStartIconName}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={finalEndIconName}\n />\n ) : (\n endAccessory\n )\n }\n >\n {title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import type { SectionHeaderProps } from "./SectionHeader.types.cjs";
3
+ /**
4
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
5
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
6
+ *
7
+ * @param props - Component props
8
+ * @param props.title - Title content for the inner row (required)
9
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
10
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
11
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
12
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
13
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
14
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
15
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
16
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
17
+ * @param props.endIconProps - Props merged into the end `Icon`
18
+ * @param props.twClassName - Optional Tailwind classes on the outer row
19
+ *
20
+ * @returns The rendered SectionHeader layout.
21
+ */
22
+ export declare const SectionHeader: React.FC<SectionHeaderProps>;
23
+ //# sourceMappingURL=SectionHeader.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiEtD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import type { SectionHeaderProps } from "./SectionHeader.types.mjs";
3
+ /**
4
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
5
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
6
+ *
7
+ * @param props - Component props
8
+ * @param props.title - Title content for the inner row (required)
9
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
10
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
11
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
12
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
13
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
14
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
15
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
16
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
17
+ * @param props.endIconProps - Props merged into the end `Icon`
18
+ * @param props.twClassName - Optional Tailwind classes on the outer row
19
+ *
20
+ * @returns The rendered SectionHeader layout.
21
+ */
22
+ export declare const SectionHeader: React.FC<SectionHeaderProps>;
23
+ //# sourceMappingURL=SectionHeader.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiEtD,CAAC"}
@@ -0,0 +1,45 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { IconColor, IconSize, TextColor, TextVariant } from "@metamask/design-system-shared";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { BoxRow } from "../BoxRow/index.mjs";
11
+ import { Icon } from "../Icon/index.mjs";
12
+ /**
13
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
14
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
15
+ *
16
+ * @param props - Component props
17
+ * @param props.title - Title content for the inner row (required)
18
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
19
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
20
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
21
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
22
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
23
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
24
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
25
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
26
+ * @param props.endIconProps - Props merged into the end `Icon`
27
+ * @param props.twClassName - Optional Tailwind classes on the outer row
28
+ *
29
+ * @returns The rendered SectionHeader layout.
30
+ */
31
+ export const SectionHeader = ({ title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, twClassName = '', ...rest }) => {
32
+ const finalStartIconName = startIconName ?? startIconProps?.name;
33
+ const finalEndIconName = endIconName ?? endIconProps?.name;
34
+ return (<BoxRow {...rest} gap={1} twClassName={twClassName} startAccessory={finalStartIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={finalStartIconName}/>) : (startAccessory)} endAccessory={finalEndIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...endIconProps} name={finalEndIconName}/>) : (endAccessory)}>
35
+ {title ? (<BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
36
+ variant: TextVariant.HeadingMd,
37
+ color: TextColor.TextDefault,
38
+ ...titleProps,
39
+ }}>
40
+ {title}
41
+ </BoxRow>) : null}
42
+ </BoxRow>);
43
+ };
44
+ SectionHeader.displayName = 'SectionHeader';
45
+ //# sourceMappingURL=SectionHeader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,GAAG,EAAE,EAChB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,OAAO,CACL,CAAC,MAAM,CACL,IAAI,IAAI,CAAC,CACT,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CACb,kBAAkB,CAAC,CAAC,CAAC,CACnB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,CACnB,IAAI,CAAC,CAAC,kBAAkB,CAAC,EACzB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACF,CACD,YAAY,CAAC,CACX,gBAAgB,CAAC,CAAC,CAAC,CACjB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,CACjB,IAAI,CAAC,CAAC,gBAAgB,CAAC,EACvB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACF,CAED;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,cAAc,CAAC,CAC7B,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,SAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * Remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param props - Component props\n * @param props.title - Title content for the inner row (required)\n * @param props.titleAccessory - Optional node to the right of `title` in the inner row\n * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved\n * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved\n * @param props.endIconProps - Props merged into the end `Icon`\n * @param props.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = ({\n title,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n twClassName = '',\n ...rest\n}) => {\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n return (\n <BoxRow\n {...rest}\n gap={1}\n twClassName={twClassName}\n startAccessory={\n finalStartIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={finalStartIconName}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={finalEndIconName}\n />\n ) : (\n endAccessory\n )\n }\n >\n {title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SectionHeader.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.\n */\nexport type SectionHeaderProps = SectionHeaderPropsShared & {\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional prop to pass additional properties to the start icon.\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -0,0 +1,32 @@
1
+ import type { SectionHeaderPropsShared } from "@metamask/design-system-shared";
2
+ import type { ViewProps } from "react-native/index.js";
3
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
4
+ import type { IconProps } from "../Icon/index.cjs";
5
+ import type { TextProps } from "../Text/Text.types.cjs";
6
+ /**
7
+ * SectionHeader component props (React Native).
8
+ * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.
9
+ */
10
+ export type SectionHeaderProps = SectionHeaderPropsShared & {
11
+ /**
12
+ * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
13
+ */
14
+ titleProps?: Omit<Partial<TextProps>, 'children'>;
15
+ /**
16
+ * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).
17
+ */
18
+ titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
19
+ /**
20
+ * Optional prop to pass additional properties to the start icon.
21
+ */
22
+ startIconProps?: Partial<IconProps>;
23
+ /**
24
+ * Optional prop to pass additional properties to the end icon.
25
+ */
26
+ endIconProps?: Partial<IconProps>;
27
+ /**
28
+ * Optional Tailwind class name to apply to the outer row.
29
+ */
30
+ twClassName?: string;
31
+ } & Omit<ViewProps, 'children'>;
32
+ //# sourceMappingURL=SectionHeader.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAuC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CACtB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { SectionHeaderPropsShared } from "@metamask/design-system-shared";
2
+ import type { ViewProps } from "react-native/index.js";
3
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.mjs";
4
+ import type { IconProps } from "../Icon/index.mjs";
5
+ import type { TextProps } from "../Text/Text.types.mjs";
6
+ /**
7
+ * SectionHeader component props (React Native).
8
+ * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.
9
+ */
10
+ export type SectionHeaderProps = SectionHeaderPropsShared & {
11
+ /**
12
+ * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
13
+ */
14
+ titleProps?: Omit<Partial<TextProps>, 'children'>;
15
+ /**
16
+ * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).
17
+ */
18
+ titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
19
+ /**
20
+ * Optional prop to pass additional properties to the start icon.
21
+ */
22
+ startIconProps?: Partial<IconProps>;
23
+ /**
24
+ * Optional prop to pass additional properties to the end icon.
25
+ */
26
+ endIconProps?: Partial<IconProps>;
27
+ /**
28
+ * Optional Tailwind class name to apply to the outer row.
29
+ */
30
+ twClassName?: string;
31
+ } & Omit<ViewProps, 'children'>;
32
+ //# sourceMappingURL=SectionHeader.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.types.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAuC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CACtB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SectionHeader.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.types.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.\n */\nexport type SectionHeaderProps = SectionHeaderPropsShared & {\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional prop to pass additional properties to the start icon.\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SectionHeader = void 0;
4
+ var SectionHeader_1 = require("./SectionHeader.cjs");
5
+ Object.defineProperty(exports, "SectionHeader", { enumerable: true, get: function () { return SectionHeader_1.SectionHeader; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAAvC,8GAAA,aAAa,OAAA","sourcesContent":["export { SectionHeader } from './SectionHeader';\nexport type { SectionHeaderProps } from './SectionHeader.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { SectionHeader } from "./SectionHeader.cjs";
2
+ export type { SectionHeaderProps } from "./SectionHeader.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
@@ -0,0 +1,3 @@
1
+ export { SectionHeader } from "./SectionHeader.mjs";
2
+ export type { SectionHeaderProps } from "./SectionHeader.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
@@ -0,0 +1,2 @@
1
+ export { SectionHeader } from "./SectionHeader.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB","sourcesContent":["export { SectionHeader } from './SectionHeader';\nexport type { SectionHeaderProps } from './SectionHeader.types';\n"]}
@@ -0,0 +1,54 @@
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.TitleAlert = 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 BoxColumn_1 = require("../BoxColumn/index.cjs");
11
+ const BoxRow_1 = require("../BoxRow/index.cjs");
12
+ const IconAlert_1 = require("../IconAlert/index.cjs");
13
+ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
14
+ /**
15
+ * Displays a severity-based {@link IconAlert} above a centered title row with optional inline accessories.
16
+ * Remaining `View` props are forwarded to the root {@link BoxColumn}.
17
+ *
18
+ * @param props - Component props
19
+ * @param props.severity - Passed to {@link IconAlert} for glyph and color
20
+ * @param props.title - Title row content; row renders only when `title` is renderable
21
+ * @param props.titleStartAccessory - Optional inline accessory to the left of `title`
22
+ * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
23
+ * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
24
+ * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
25
+ * @param props.description - Optional description below the title; uses {@link TextOrChildren}
26
+ * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
27
+ * @param props.twClassName - Optional Tailwind classes on the root BoxColumn
28
+ *
29
+ * @returns The rendered TitleAlert layout.
30
+ */
31
+ const TitleAlert = ({ severity, title, titleStartAccessory, titleEndAccessory, titleProps, titleWrapperProps, description, descriptionProps, twClassName = '', ...props }) => {
32
+ return (<BoxColumn_1.BoxColumn alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} topAccessory={<IconAlert_1.IconAlert severity={severity} size={design_system_shared_1.IconSize.Xl}/>} bottomAccessory={description ? (<Box_1.Box twClassName="self-stretch">
33
+ <TextOrChildren_1.TextOrChildren textProps={{
34
+ variant: design_system_shared_1.TextVariant.BodySm,
35
+ color: design_system_shared_1.TextColor.TextAlternative,
36
+ fontWeight: design_system_shared_1.FontWeight.Medium,
37
+ ...descriptionProps,
38
+ style: [{ textAlign: 'center' }, descriptionProps?.style],
39
+ }}>
40
+ {description}
41
+ </TextOrChildren_1.TextOrChildren>
42
+ </Box_1.Box>) : undefined} twClassName={twClassName} {...props}>
43
+ {title ? (<BoxRow_1.BoxRow justifyContent={design_system_shared_1.BoxJustifyContent.Center} twClassName="self-stretch" {...titleWrapperProps} startAccessory={titleStartAccessory} endAccessory={titleEndAccessory} textProps={{
44
+ variant: design_system_shared_1.TextVariant.HeadingLg,
45
+ color: design_system_shared_1.TextColor.TextDefault,
46
+ ...titleProps,
47
+ }}>
48
+ {title}
49
+ </BoxRow_1.BoxRow>) : null}
50
+ </BoxColumn_1.BoxColumn>);
51
+ };
52
+ exports.TitleAlert = TitleAlert;
53
+ exports.TitleAlert.displayName = 'TitleAlert';
54
+ //# sourceMappingURL=TitleAlert.cjs.map