@metamask/design-system-react-native 0.30.2 → 0.32.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 (127) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/dist/components/BannerAlert/BannerAlert.cjs +2 -5
  3. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
  4. package/dist/components/BannerAlert/BannerAlert.constants.cjs +4 -7
  5. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
  6. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +1 -2
  7. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
  8. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +1 -2
  9. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
  10. package/dist/components/BannerAlert/BannerAlert.constants.mjs +4 -7
  11. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
  12. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -1
  13. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -1
  14. package/dist/components/BannerAlert/BannerAlert.mjs +3 -6
  15. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
  16. package/dist/components/BannerBase/BannerBase.cjs +5 -8
  17. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  18. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  19. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  20. package/dist/components/BannerBase/BannerBase.mjs +6 -9
  21. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  22. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs +1 -1
  23. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -1
  24. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs +1 -1
  25. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -1
  26. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +1 -1
  27. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -1
  28. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +1 -1
  29. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -1
  30. package/dist/components/ButtonIcon/ButtonIcon.constants.cjs +2 -0
  31. package/dist/components/ButtonIcon/ButtonIcon.constants.cjs.map +1 -1
  32. package/dist/components/ButtonIcon/ButtonIcon.constants.d.cts +1 -0
  33. package/dist/components/ButtonIcon/ButtonIcon.constants.d.cts.map +1 -1
  34. package/dist/components/ButtonIcon/ButtonIcon.constants.d.mts +1 -0
  35. package/dist/components/ButtonIcon/ButtonIcon.constants.d.mts.map +1 -1
  36. package/dist/components/ButtonIcon/ButtonIcon.constants.mjs +2 -0
  37. package/dist/components/ButtonIcon/ButtonIcon.constants.mjs.map +1 -1
  38. package/dist/components/ButtonSemantic/index.cjs +3 -1
  39. package/dist/components/ButtonSemantic/index.cjs.map +1 -1
  40. package/dist/components/ButtonSemantic/index.d.cts +1 -0
  41. package/dist/components/ButtonSemantic/index.d.cts.map +1 -1
  42. package/dist/components/ButtonSemantic/index.d.mts +1 -0
  43. package/dist/components/ButtonSemantic/index.d.mts.map +1 -1
  44. package/dist/components/ButtonSemantic/index.mjs +1 -0
  45. package/dist/components/ButtonSemantic/index.mjs.map +1 -1
  46. package/dist/components/FilterButton/FilterButton.cjs +1 -1
  47. package/dist/components/FilterButton/FilterButton.cjs.map +1 -1
  48. package/dist/components/FilterButton/FilterButton.mjs +2 -2
  49. package/dist/components/FilterButton/FilterButton.mjs.map +1 -1
  50. package/dist/components/FilterButton/index.cjs +2 -1
  51. package/dist/components/FilterButton/index.cjs.map +1 -1
  52. package/dist/components/FilterButton/index.d.cts +1 -1
  53. package/dist/components/FilterButton/index.d.cts.map +1 -1
  54. package/dist/components/FilterButton/index.d.mts +1 -1
  55. package/dist/components/FilterButton/index.d.mts.map +1 -1
  56. package/dist/components/FilterButton/index.mjs +1 -1
  57. package/dist/components/FilterButton/index.mjs.map +1 -1
  58. package/dist/components/Icon/Icon.assets.cjs +2 -0
  59. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  60. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  61. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  62. package/dist/components/Icon/Icon.assets.mjs +2 -0
  63. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  64. package/dist/components/Icon/assets/hard-drive.svg +1 -0
  65. package/dist/components/MainActionButton/MainActionButton.cjs +1 -1
  66. package/dist/components/MainActionButton/MainActionButton.cjs.map +1 -1
  67. package/dist/components/MainActionButton/MainActionButton.mjs +1 -1
  68. package/dist/components/MainActionButton/MainActionButton.mjs.map +1 -1
  69. package/dist/components/SectionHeader/SectionHeader.cjs +28 -10
  70. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
  71. package/dist/components/SectionHeader/SectionHeader.d.cts +3 -2
  72. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
  73. package/dist/components/SectionHeader/SectionHeader.d.mts +3 -2
  74. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
  75. package/dist/components/SectionHeader/SectionHeader.mjs +28 -10
  76. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
  77. package/dist/components/SegmentedControl/SegmentedControl.cjs +1 -1
  78. package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  79. package/dist/components/SegmentedControl/SegmentedControl.constants.cjs +3 -3
  80. package/dist/components/SegmentedControl/SegmentedControl.constants.cjs.map +1 -1
  81. package/dist/components/SegmentedControl/SegmentedControl.constants.d.cts +3 -3
  82. package/dist/components/SegmentedControl/SegmentedControl.constants.d.cts.map +1 -1
  83. package/dist/components/SegmentedControl/SegmentedControl.constants.d.mts +3 -3
  84. package/dist/components/SegmentedControl/SegmentedControl.constants.d.mts.map +1 -1
  85. package/dist/components/SegmentedControl/SegmentedControl.constants.mjs +4 -4
  86. package/dist/components/SegmentedControl/SegmentedControl.constants.mjs.map +1 -1
  87. package/dist/components/SegmentedControl/SegmentedControl.mjs +2 -2
  88. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  89. package/dist/components/SegmentedControl/index.cjs +3 -1
  90. package/dist/components/SegmentedControl/index.cjs.map +1 -1
  91. package/dist/components/SegmentedControl/index.d.cts +1 -0
  92. package/dist/components/SegmentedControl/index.d.cts.map +1 -1
  93. package/dist/components/SegmentedControl/index.d.mts +1 -0
  94. package/dist/components/SegmentedControl/index.d.mts.map +1 -1
  95. package/dist/components/SegmentedControl/index.mjs +1 -0
  96. package/dist/components/SegmentedControl/index.mjs.map +1 -1
  97. package/dist/components/Tag/Tag.constants.cjs +2 -2
  98. package/dist/components/Tag/Tag.constants.cjs.map +1 -1
  99. package/dist/components/Tag/Tag.constants.mjs +2 -2
  100. package/dist/components/Tag/Tag.constants.mjs.map +1 -1
  101. package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
  102. package/dist/components/TextButton/TextButton.types.d.cts +5 -2
  103. package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
  104. package/dist/components/TextButton/TextButton.types.d.mts +5 -2
  105. package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
  106. package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
  107. package/dist/components/TitleAlert/TitleAlert.cjs +3 -5
  108. package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
  109. package/dist/components/TitleAlert/TitleAlert.d.cts +1 -3
  110. package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -1
  111. package/dist/components/TitleAlert/TitleAlert.d.mts +1 -3
  112. package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -1
  113. package/dist/components/TitleAlert/TitleAlert.mjs +3 -5
  114. package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -1
  115. package/dist/components/TitleAlert/TitleAlert.types.cjs.map +1 -1
  116. package/dist/components/TitleAlert/TitleAlert.types.d.cts +2 -2
  117. package/dist/components/TitleAlert/TitleAlert.types.d.mts +2 -2
  118. package/dist/components/TitleAlert/TitleAlert.types.mjs.map +1 -1
  119. package/dist/components/index.cjs +5 -2
  120. package/dist/components/index.cjs.map +1 -1
  121. package/dist/components/index.d.cts +3 -3
  122. package/dist/components/index.d.cts.map +1 -1
  123. package/dist/components/index.d.mts +3 -3
  124. package/dist/components/index.d.mts.map +1 -1
  125. package/dist/components/index.mjs +3 -3
  126. package/dist/components/index.mjs.map +1 -1
  127. package/package.json +7 -7
@@ -28,7 +28,7 @@ const design_system_shared_1 = require("@metamask/design-system-shared");
28
28
  const react_1 = __importStar(require("react"));
29
29
  const Box_1 = require("../Box/index.cjs");
30
30
  const SegmentedControl_constants_1 = require("./SegmentedControl.constants.cjs");
31
- const SegmentedControl = ({ value, onChange, size = design_system_shared_1.ButtonBaseSize.Sm, isFullWidth = false, children, twClassName, style, ...rest }) => {
31
+ const SegmentedControl = ({ value, onChange, size = design_system_shared_1.SegmentedControlSize.Sm, isFullWidth = false, children, twClassName, style, ...rest }) => {
32
32
  const contextValue = (0, react_1.useMemo)(() => ({
33
33
  value,
34
34
  onChange,
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAKwC;AACxC,+CAAiD;AAEjD,0CAA6B;AAE7B,iFAAsF;AAG/E,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,qCAAc,CAAC,EAAE,EACxB,WAAW,GAAG,KAAK,EACnB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACe,EAAE,EAAE;IAC1B,MAAM,YAAY,GAAG,IAAA,eAAO,EAC1B,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,QAAQ;QACR,OAAO,EAAE,0CAAmB,CAAC,SAAS;QACtC,IAAI;QACJ,YAAY,EAAE,WAAW;KAC1B,CAAC,EACF,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CACrC,CAAC;IAEF,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC;IAE/D,OAAO,CACL,CAAC,+CAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACrD;MAAA,CAAC,SAAG,CACF,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,SAAS,CAC3B,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAC3B,IAAA,uCAAgB,EACd,GAAG,UAAU,sDAAsD,EACnE,IAAA,mEAAsC,EAAC,IAAI,CAAC,CAC7C,EACD,WAAW,CACZ,CAAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;QAAA,CAAC,gBAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACvC,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,SAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,QAAQ,CACnC;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,CACF,CAAC,eAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,eAAK,CAAC,QAAQ,CAAC,CACrD,CACF,CACH;MAAA,EAAE,SAAG,CACP;IAAA,EAAE,+CAAwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,gBAAgB,oBAiD3B;AAEF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FilterButtonGroupContext,\n FilterButtonVariant,\n mergeTwClassName,\n} from '@metamask/design-system-shared';\nimport React, { Children, useMemo } from 'react';\n\nimport { Box } from '../Box';\n\nimport { getSegmentedControlBorderRadiusTwClass } from './SegmentedControl.constants';\nimport type { SegmentedControlProps } from './SegmentedControl.types';\n\nexport const SegmentedControl = ({\n value,\n onChange,\n size = ButtonBaseSize.Sm,\n isFullWidth = false,\n children,\n twClassName,\n style,\n ...rest\n}: SegmentedControlProps) => {\n const contextValue = useMemo(\n () => ({\n value,\n onChange,\n variant: FilterButtonVariant.Secondary,\n size,\n isEqualWidth: isFullWidth,\n }),\n [value, onChange, size, isFullWidth],\n );\n\n const widthClass = isFullWidth ? 'self-stretch' : 'self-start';\n\n return (\n <FilterButtonGroupContext.Provider value={contextValue}>\n <Box\n {...rest}\n accessibilityRole=\"tablist\"\n twClassName={mergeTwClassName(\n mergeTwClassName(\n `${widthClass} flex-row items-center gap-1 border border-muted p-1`,\n getSegmentedControlBorderRadiusTwClass(size),\n ),\n twClassName,\n )}\n style={style}\n >\n {Children.map(children, (child, index) =>\n isFullWidth ? (\n <Box key={index} twClassName=\"flex-1\">\n {child}\n </Box>\n ) : (\n <React.Fragment key={index}>{child}</React.Fragment>\n ),\n )}\n </Box>\n </FilterButtonGroupContext.Provider>\n );\n};\n\nSegmentedControl.displayName = 'SegmentedControl';\n"]}
1
+ {"version":3,"file":"SegmentedControl.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAKwC;AACxC,+CAAiD;AAEjD,0CAA6B;AAE7B,iFAAsF;AAG/E,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,2CAAoB,CAAC,EAAE,EAC9B,WAAW,GAAG,KAAK,EACnB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACe,EAAE,EAAE;IAC1B,MAAM,YAAY,GAAG,IAAA,eAAO,EAC1B,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,QAAQ;QACR,OAAO,EAAE,0CAAmB,CAAC,SAAS;QACtC,IAAI;QACJ,YAAY,EAAE,WAAW;KAC1B,CAAC,EACF,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CACrC,CAAC;IAEF,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC;IAE/D,OAAO,CACL,CAAC,+CAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACrD;MAAA,CAAC,SAAG,CACF,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,SAAS,CAC3B,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAC3B,IAAA,uCAAgB,EACd,GAAG,UAAU,sDAAsD,EACnE,IAAA,mEAAsC,EAAC,IAAI,CAAC,CAC7C,EACD,WAAW,CACZ,CAAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;QAAA,CAAC,gBAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACvC,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,SAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,QAAQ,CACnC;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,CACF,CAAC,eAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,eAAK,CAAC,QAAQ,CAAC,CACrD,CACF,CACH;MAAA,EAAE,SAAG,CACP;IAAA,EAAE,+CAAwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,gBAAgB,oBAiD3B;AAEF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n FilterButtonGroupContext,\n FilterButtonVariant,\n SegmentedControlSize,\n mergeTwClassName,\n} from '@metamask/design-system-shared';\nimport React, { Children, useMemo } from 'react';\n\nimport { Box } from '../Box';\n\nimport { getSegmentedControlBorderRadiusTwClass } from './SegmentedControl.constants';\nimport type { SegmentedControlProps } from './SegmentedControl.types';\n\nexport const SegmentedControl = ({\n value,\n onChange,\n size = SegmentedControlSize.Sm,\n isFullWidth = false,\n children,\n twClassName,\n style,\n ...rest\n}: SegmentedControlProps) => {\n const contextValue = useMemo(\n () => ({\n value,\n onChange,\n variant: FilterButtonVariant.Secondary,\n size,\n isEqualWidth: isFullWidth,\n }),\n [value, onChange, size, isFullWidth],\n );\n\n const widthClass = isFullWidth ? 'self-stretch' : 'self-start';\n\n return (\n <FilterButtonGroupContext.Provider value={contextValue}>\n <Box\n {...rest}\n accessibilityRole=\"tablist\"\n twClassName={mergeTwClassName(\n mergeTwClassName(\n `${widthClass} flex-row items-center gap-1 border border-muted p-1`,\n getSegmentedControlBorderRadiusTwClass(size),\n ),\n twClassName,\n )}\n style={style}\n >\n {Children.map(children, (child, index) =>\n isFullWidth ? (\n <Box key={index} twClassName=\"flex-1\">\n {child}\n </Box>\n ) : (\n <React.Fragment key={index}>{child}</React.Fragment>\n ),\n )}\n </Box>\n </FilterButtonGroupContext.Provider>\n );\n};\n\nSegmentedControl.displayName = 'SegmentedControl';\n"]}
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSegmentedControlBorderRadiusTwClass = exports.TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS = void 0;
4
4
  const design_system_shared_1 = require("@metamask/design-system-shared");
5
5
  exports.TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS = {
6
- [design_system_shared_1.ButtonBaseSize.Sm]: 'rounded-xl',
7
- [design_system_shared_1.ButtonBaseSize.Md]: 'rounded-2xl',
8
- [design_system_shared_1.ButtonBaseSize.Lg]: 'rounded-2xl',
6
+ [design_system_shared_1.SegmentedControlSize.Sm]: 'rounded-xl',
7
+ [design_system_shared_1.SegmentedControlSize.Md]: 'rounded-2xl',
8
+ [design_system_shared_1.SegmentedControlSize.Lg]: 'rounded-2xl',
9
9
  };
10
10
  const getSegmentedControlBorderRadiusTwClass = (size) => exports.TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];
11
11
  exports.getSegmentedControlBorderRadiusTwClass = getSegmentedControlBorderRadiusTwClass;
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.constants.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":";;;AAAA,yEAAgE;AAEnD,QAAA,yCAAyC,GAGlD;IACF,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,YAAY;IACjC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,aAAa;IAClC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,aAAa;CACnC,CAAC;AAEK,MAAM,sCAAsC,GAAG,CACpD,IAAoB,EACZ,EAAE,CAAC,iDAAyC,CAAC,IAAI,CAAC,CAAC;AAFhD,QAAA,sCAAsC,0CAEU","sourcesContent":["import { ButtonBaseSize } from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<\n ButtonBaseSize,\n string\n> = {\n [ButtonBaseSize.Sm]: 'rounded-xl',\n [ButtonBaseSize.Md]: 'rounded-2xl',\n [ButtonBaseSize.Lg]: 'rounded-2xl',\n};\n\nexport const getSegmentedControlBorderRadiusTwClass = (\n size: ButtonBaseSize,\n): string => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];\n"]}
1
+ {"version":3,"file":"SegmentedControl.constants.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAEzD,QAAA,yCAAyC,GAGlD;IACF,CAAC,2CAAoB,CAAC,EAAE,CAAC,EAAE,YAAY;IACvC,CAAC,2CAAoB,CAAC,EAAE,CAAC,EAAE,aAAa;IACxC,CAAC,2CAAoB,CAAC,EAAE,CAAC,EAAE,aAAa;CACzC,CAAC;AAEK,MAAM,sCAAsC,GAAG,CACpD,IAA0B,EAClB,EAAE,CAAC,iDAAyC,CAAC,IAAI,CAAC,CAAC;AAFhD,QAAA,sCAAsC,0CAEU","sourcesContent":["import { SegmentedControlSize } from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<\n SegmentedControlSize,\n string\n> = {\n [SegmentedControlSize.Sm]: 'rounded-xl',\n [SegmentedControlSize.Md]: 'rounded-2xl',\n [SegmentedControlSize.Lg]: 'rounded-2xl',\n};\n\nexport const getSegmentedControlBorderRadiusTwClass = (\n size: SegmentedControlSize,\n): string => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];\n"]}
@@ -1,4 +1,4 @@
1
- import { ButtonBaseSize } from "@metamask/design-system-shared";
2
- export declare const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<ButtonBaseSize, string>;
3
- export declare const getSegmentedControlBorderRadiusTwClass: (size: ButtonBaseSize) => string;
1
+ import { SegmentedControlSize } from "@metamask/design-system-shared";
2
+ export declare const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<SegmentedControlSize, string>;
3
+ export declare const getSegmentedControlBorderRadiusTwClass: (size: SegmentedControlSize) => string;
4
4
  //# sourceMappingURL=SegmentedControl.constants.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.constants.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,uCAAuC;AAEhE,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAC5D,cAAc,EACd,MAAM,CAKP,CAAC;AAEF,eAAO,MAAM,sCAAsC,SAC3C,cAAc,KACnB,MAAyD,CAAC"}
1
+ {"version":3,"file":"SegmentedControl.constants.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AAEtE,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAC5D,oBAAoB,EACpB,MAAM,CAKP,CAAC;AAEF,eAAO,MAAM,sCAAsC,SAC3C,oBAAoB,KACzB,MAAyD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ButtonBaseSize } from "@metamask/design-system-shared";
2
- export declare const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<ButtonBaseSize, string>;
3
- export declare const getSegmentedControlBorderRadiusTwClass: (size: ButtonBaseSize) => string;
1
+ import { SegmentedControlSize } from "@metamask/design-system-shared";
2
+ export declare const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<SegmentedControlSize, string>;
3
+ export declare const getSegmentedControlBorderRadiusTwClass: (size: SegmentedControlSize) => string;
4
4
  //# sourceMappingURL=SegmentedControl.constants.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.constants.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,uCAAuC;AAEhE,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAC5D,cAAc,EACd,MAAM,CAKP,CAAC;AAEF,eAAO,MAAM,sCAAsC,SAC3C,cAAc,KACnB,MAAyD,CAAC"}
1
+ {"version":3,"file":"SegmentedControl.constants.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AAEtE,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAC5D,oBAAoB,EACpB,MAAM,CAKP,CAAC;AAEF,eAAO,MAAM,sCAAsC,SAC3C,oBAAoB,KACzB,MAAyD,CAAC"}
@@ -1,8 +1,8 @@
1
- import { ButtonBaseSize } from "@metamask/design-system-shared";
1
+ import { SegmentedControlSize } from "@metamask/design-system-shared";
2
2
  export const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS = {
3
- [ButtonBaseSize.Sm]: 'rounded-xl',
4
- [ButtonBaseSize.Md]: 'rounded-2xl',
5
- [ButtonBaseSize.Lg]: 'rounded-2xl',
3
+ [SegmentedControlSize.Sm]: 'rounded-xl',
4
+ [SegmentedControlSize.Md]: 'rounded-2xl',
5
+ [SegmentedControlSize.Lg]: 'rounded-2xl',
6
6
  };
7
7
  export const getSegmentedControlBorderRadiusTwClass = (size) => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];
8
8
  //# sourceMappingURL=SegmentedControl.constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.constants.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,uCAAuC;AAEhE,MAAM,CAAC,MAAM,yCAAyC,GAGlD;IACF,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,YAAY;IACjC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,aAAa;IAClC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,aAAa;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACpD,IAAoB,EACZ,EAAE,CAAC,yCAAyC,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import { ButtonBaseSize } from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<\n ButtonBaseSize,\n string\n> = {\n [ButtonBaseSize.Sm]: 'rounded-xl',\n [ButtonBaseSize.Md]: 'rounded-2xl',\n [ButtonBaseSize.Lg]: 'rounded-2xl',\n};\n\nexport const getSegmentedControlBorderRadiusTwClass = (\n size: ButtonBaseSize,\n): string => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];\n"]}
1
+ {"version":3,"file":"SegmentedControl.constants.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AAEtE,MAAM,CAAC,MAAM,yCAAyC,GAGlD;IACF,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,YAAY;IACvC,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,aAAa;IACxC,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,aAAa;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACpD,IAA0B,EAClB,EAAE,CAAC,yCAAyC,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import { SegmentedControlSize } from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<\n SegmentedControlSize,\n string\n> = {\n [SegmentedControlSize.Sm]: 'rounded-xl',\n [SegmentedControlSize.Md]: 'rounded-2xl',\n [SegmentedControlSize.Lg]: 'rounded-2xl',\n};\n\nexport const getSegmentedControlBorderRadiusTwClass = (\n size: SegmentedControlSize,\n): string => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];\n"]}
@@ -4,12 +4,12 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { ButtonBaseSize, FilterButtonGroupContext, FilterButtonVariant, mergeTwClassName } from "@metamask/design-system-shared";
7
+ import { FilterButtonGroupContext, FilterButtonVariant, SegmentedControlSize, mergeTwClassName } from "@metamask/design-system-shared";
8
8
  import $React, { Children, useMemo } from "react";
9
9
  const React = $importDefault($React);
10
10
  import { Box } from "../Box/index.mjs";
11
11
  import { getSegmentedControlBorderRadiusTwClass } from "./SegmentedControl.constants.mjs";
12
- export const SegmentedControl = ({ value, onChange, size = ButtonBaseSize.Sm, isFullWidth = false, children, twClassName, style, ...rest }) => {
12
+ export const SegmentedControl = ({ value, onChange, size = SegmentedControlSize.Sm, isFullWidth = false, children, twClassName, style, ...rest }) => {
13
13
  const contextValue = useMemo(() => ({
14
14
  value,
15
15
  onChange,
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EACjB,uCAAuC;AACxC,OAAO,QAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc;;AAEjD,OAAO,EAAE,GAAG,EAAE,yBAAe;AAE7B,OAAO,EAAE,sCAAsC,EAAE,yCAAqC;AAGtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,cAAc,CAAC,EAAE,EACxB,WAAW,GAAG,KAAK,EACnB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACe,EAAE,EAAE;IAC1B,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,QAAQ;QACR,OAAO,EAAE,mBAAmB,CAAC,SAAS;QACtC,IAAI;QACJ,YAAY,EAAE,WAAW;KAC1B,CAAC,EACF,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CACrC,CAAC;IAEF,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC;IAE/D,OAAO,CACL,CAAC,wBAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACrD;MAAA,CAAC,GAAG,CACF,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,SAAS,CAC3B,WAAW,CAAC,CAAC,gBAAgB,CAC3B,gBAAgB,CACd,GAAG,UAAU,sDAAsD,EACnE,sCAAsC,CAAC,IAAI,CAAC,CAC7C,EACD,WAAW,CACZ,CAAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;QAAA,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACvC,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,QAAQ,CACnC;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,CACF,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CACrD,CACF,CACH;MAAA,EAAE,GAAG,CACP;IAAA,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FilterButtonGroupContext,\n FilterButtonVariant,\n mergeTwClassName,\n} from '@metamask/design-system-shared';\nimport React, { Children, useMemo } from 'react';\n\nimport { Box } from '../Box';\n\nimport { getSegmentedControlBorderRadiusTwClass } from './SegmentedControl.constants';\nimport type { SegmentedControlProps } from './SegmentedControl.types';\n\nexport const SegmentedControl = ({\n value,\n onChange,\n size = ButtonBaseSize.Sm,\n isFullWidth = false,\n children,\n twClassName,\n style,\n ...rest\n}: SegmentedControlProps) => {\n const contextValue = useMemo(\n () => ({\n value,\n onChange,\n variant: FilterButtonVariant.Secondary,\n size,\n isEqualWidth: isFullWidth,\n }),\n [value, onChange, size, isFullWidth],\n );\n\n const widthClass = isFullWidth ? 'self-stretch' : 'self-start';\n\n return (\n <FilterButtonGroupContext.Provider value={contextValue}>\n <Box\n {...rest}\n accessibilityRole=\"tablist\"\n twClassName={mergeTwClassName(\n mergeTwClassName(\n `${widthClass} flex-row items-center gap-1 border border-muted p-1`,\n getSegmentedControlBorderRadiusTwClass(size),\n ),\n twClassName,\n )}\n style={style}\n >\n {Children.map(children, (child, index) =>\n isFullWidth ? (\n <Box key={index} twClassName=\"flex-1\">\n {child}\n </Box>\n ) : (\n <React.Fragment key={index}>{child}</React.Fragment>\n ),\n )}\n </Box>\n </FilterButtonGroupContext.Provider>\n );\n};\n\nSegmentedControl.displayName = 'SegmentedControl';\n"]}
1
+ {"version":3,"file":"SegmentedControl.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EACjB,uCAAuC;AACxC,OAAO,QAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc;;AAEjD,OAAO,EAAE,GAAG,EAAE,yBAAe;AAE7B,OAAO,EAAE,sCAAsC,EAAE,yCAAqC;AAGtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,oBAAoB,CAAC,EAAE,EAC9B,WAAW,GAAG,KAAK,EACnB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACe,EAAE,EAAE;IAC1B,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,QAAQ;QACR,OAAO,EAAE,mBAAmB,CAAC,SAAS;QACtC,IAAI;QACJ,YAAY,EAAE,WAAW;KAC1B,CAAC,EACF,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CACrC,CAAC;IAEF,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC;IAE/D,OAAO,CACL,CAAC,wBAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACrD;MAAA,CAAC,GAAG,CACF,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,SAAS,CAC3B,WAAW,CAAC,CAAC,gBAAgB,CAC3B,gBAAgB,CACd,GAAG,UAAU,sDAAsD,EACnE,sCAAsC,CAAC,IAAI,CAAC,CAC7C,EACD,WAAW,CACZ,CAAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;QAAA,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACvC,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,QAAQ,CACnC;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,CACF,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CACrD,CACF,CACH;MAAA,EAAE,GAAG,CACP;IAAA,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n FilterButtonGroupContext,\n FilterButtonVariant,\n SegmentedControlSize,\n mergeTwClassName,\n} from '@metamask/design-system-shared';\nimport React, { Children, useMemo } from 'react';\n\nimport { Box } from '../Box';\n\nimport { getSegmentedControlBorderRadiusTwClass } from './SegmentedControl.constants';\nimport type { SegmentedControlProps } from './SegmentedControl.types';\n\nexport const SegmentedControl = ({\n value,\n onChange,\n size = SegmentedControlSize.Sm,\n isFullWidth = false,\n children,\n twClassName,\n style,\n ...rest\n}: SegmentedControlProps) => {\n const contextValue = useMemo(\n () => ({\n value,\n onChange,\n variant: FilterButtonVariant.Secondary,\n size,\n isEqualWidth: isFullWidth,\n }),\n [value, onChange, size, isFullWidth],\n );\n\n const widthClass = isFullWidth ? 'self-stretch' : 'self-start';\n\n return (\n <FilterButtonGroupContext.Provider value={contextValue}>\n <Box\n {...rest}\n accessibilityRole=\"tablist\"\n twClassName={mergeTwClassName(\n mergeTwClassName(\n `${widthClass} flex-row items-center gap-1 border border-muted p-1`,\n getSegmentedControlBorderRadiusTwClass(size),\n ),\n twClassName,\n )}\n style={style}\n >\n {Children.map(children, (child, index) =>\n isFullWidth ? (\n <Box key={index} twClassName=\"flex-1\">\n {child}\n </Box>\n ) : (\n <React.Fragment key={index}>{child}</React.Fragment>\n ),\n )}\n </Box>\n </FilterButtonGroupContext.Provider>\n );\n};\n\nSegmentedControl.displayName = 'SegmentedControl';\n"]}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SegmentedControl = void 0;
3
+ exports.SegmentedControl = exports.SegmentedControlSize = void 0;
4
+ var design_system_shared_1 = require("@metamask/design-system-shared");
5
+ Object.defineProperty(exports, "SegmentedControlSize", { enumerable: true, get: function () { return design_system_shared_1.SegmentedControlSize; } });
4
6
  var SegmentedControl_1 = require("./SegmentedControl.cjs");
5
7
  Object.defineProperty(exports, "SegmentedControl", { enumerable: true, get: function () { return SegmentedControl_1.SegmentedControl; } });
6
8
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAA7C,oHAAA,gBAAgB,OAAA","sourcesContent":["export { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":";;;AAAA,uEAAsE;AAA7D,4HAAA,oBAAoB,OAAA;AAC7B,2DAAsD;AAA7C,oHAAA,gBAAgB,OAAA","sourcesContent":["export { SegmentedControlSize } from '@metamask/design-system-shared';\nexport { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
@@ -1,3 +1,4 @@
1
+ export { SegmentedControlSize } from "@metamask/design-system-shared";
1
2
  export { SegmentedControl } from "./SegmentedControl.cjs";
2
3
  export type { SegmentedControlProps } from "./SegmentedControl.types.cjs";
3
4
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AACtE,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
@@ -1,3 +1,4 @@
1
+ export { SegmentedControlSize } from "@metamask/design-system-shared";
1
2
  export { SegmentedControl } from "./SegmentedControl.mjs";
2
3
  export type { SegmentedControlProps } from "./SegmentedControl.types.mjs";
3
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AACtE,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
@@ -1,2 +1,3 @@
1
+ export { SegmentedControlSize } from "@metamask/design-system-shared";
1
2
  export { SegmentedControl } from "./SegmentedControl.mjs";
2
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B","sourcesContent":["export { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uCAAuC;AACtE,OAAO,EAAE,gBAAgB,EAAE,+BAA2B","sourcesContent":["export { SegmentedControlSize } from '@metamask/design-system-shared';\nexport { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
@@ -10,14 +10,14 @@ exports.MAP_TAG_SEVERITY_BACKGROUND = {
10
10
  [design_system_shared_1.TagSeverity.Info]: design_system_shared_1.BoxBackgroundColor.InfoMuted,
11
11
  };
12
12
  exports.MAP_TAG_SEVERITY_TEXT_COLOR = {
13
- [design_system_shared_1.TagSeverity.Neutral]: design_system_shared_1.TextColor.TextDefault,
13
+ [design_system_shared_1.TagSeverity.Neutral]: design_system_shared_1.TextColor.TextAlternative,
14
14
  [design_system_shared_1.TagSeverity.Success]: design_system_shared_1.TextColor.SuccessDefault,
15
15
  [design_system_shared_1.TagSeverity.Danger]: design_system_shared_1.TextColor.ErrorDefault,
16
16
  [design_system_shared_1.TagSeverity.Warning]: design_system_shared_1.TextColor.WarningDefault,
17
17
  [design_system_shared_1.TagSeverity.Info]: design_system_shared_1.TextColor.InfoDefault,
18
18
  };
19
19
  exports.MAP_TAG_SEVERITY_ICON_COLOR = {
20
- [design_system_shared_1.TagSeverity.Neutral]: design_system_shared_1.IconColor.IconDefault,
20
+ [design_system_shared_1.TagSeverity.Neutral]: design_system_shared_1.IconColor.IconAlternative,
21
21
  [design_system_shared_1.TagSeverity.Success]: design_system_shared_1.IconColor.SuccessDefault,
22
22
  [design_system_shared_1.TagSeverity.Danger]: design_system_shared_1.IconColor.ErrorDefault,
23
23
  [design_system_shared_1.TagSeverity.Warning]: design_system_shared_1.IconColor.WarningDefault,
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.constants.cjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.constants.ts"],"names":[],"mappings":";;;AAAA,yEAKwC;AAE3B,QAAA,2BAA2B,GAGpC;IACF,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,yCAAkB,CAAC,eAAe;IACzD,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,yCAAkB,CAAC,YAAY;IACtD,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,yCAAkB,CAAC,UAAU;IACnD,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,yCAAkB,CAAC,YAAY;IACtD,CAAC,kCAAW,CAAC,IAAI,CAAC,EAAE,yCAAkB,CAAC,SAAS;CACjD,CAAC;AAEW,QAAA,2BAA2B,GAAmC;IACzE,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,WAAW;IAC5C,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,gCAAS,CAAC,YAAY;IAC5C,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,IAAI,CAAC,EAAE,gCAAS,CAAC,WAAW;CAC1C,CAAC;AAEW,QAAA,2BAA2B,GAAmC;IACzE,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,WAAW;IAC5C,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,gCAAS,CAAC,YAAY;IAC5C,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,IAAI,CAAC,EAAE,gCAAS,CAAC,WAAW;CAC1C,CAAC","sourcesContent":["import {\n BoxBackgroundColor,\n IconColor,\n TagSeverity,\n TextColor,\n} from '@metamask/design-system-shared';\n\nexport const MAP_TAG_SEVERITY_BACKGROUND: Record<\n TagSeverity,\n BoxBackgroundColor\n> = {\n [TagSeverity.Neutral]: BoxBackgroundColor.BackgroundMuted,\n [TagSeverity.Success]: BoxBackgroundColor.SuccessMuted,\n [TagSeverity.Danger]: BoxBackgroundColor.ErrorMuted,\n [TagSeverity.Warning]: BoxBackgroundColor.WarningMuted,\n [TagSeverity.Info]: BoxBackgroundColor.InfoMuted,\n};\n\nexport const MAP_TAG_SEVERITY_TEXT_COLOR: Record<TagSeverity, TextColor> = {\n [TagSeverity.Neutral]: TextColor.TextDefault,\n [TagSeverity.Success]: TextColor.SuccessDefault,\n [TagSeverity.Danger]: TextColor.ErrorDefault,\n [TagSeverity.Warning]: TextColor.WarningDefault,\n [TagSeverity.Info]: TextColor.InfoDefault,\n};\n\nexport const MAP_TAG_SEVERITY_ICON_COLOR: Record<TagSeverity, IconColor> = {\n [TagSeverity.Neutral]: IconColor.IconDefault,\n [TagSeverity.Success]: IconColor.SuccessDefault,\n [TagSeverity.Danger]: IconColor.ErrorDefault,\n [TagSeverity.Warning]: IconColor.WarningDefault,\n [TagSeverity.Info]: IconColor.InfoDefault,\n};\n"]}
1
+ {"version":3,"file":"Tag.constants.cjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.constants.ts"],"names":[],"mappings":";;;AAAA,yEAKwC;AAE3B,QAAA,2BAA2B,GAGpC;IACF,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,yCAAkB,CAAC,eAAe;IACzD,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,yCAAkB,CAAC,YAAY;IACtD,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,yCAAkB,CAAC,UAAU;IACnD,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,yCAAkB,CAAC,YAAY;IACtD,CAAC,kCAAW,CAAC,IAAI,CAAC,EAAE,yCAAkB,CAAC,SAAS;CACjD,CAAC;AAEW,QAAA,2BAA2B,GAAmC;IACzE,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,eAAe;IAChD,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,gCAAS,CAAC,YAAY;IAC5C,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,IAAI,CAAC,EAAE,gCAAS,CAAC,WAAW;CAC1C,CAAC;AAEW,QAAA,2BAA2B,GAAmC;IACzE,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,eAAe;IAChD,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,gCAAS,CAAC,YAAY;IAC5C,CAAC,kCAAW,CAAC,OAAO,CAAC,EAAE,gCAAS,CAAC,cAAc;IAC/C,CAAC,kCAAW,CAAC,IAAI,CAAC,EAAE,gCAAS,CAAC,WAAW;CAC1C,CAAC","sourcesContent":["import {\n BoxBackgroundColor,\n IconColor,\n TagSeverity,\n TextColor,\n} from '@metamask/design-system-shared';\n\nexport const MAP_TAG_SEVERITY_BACKGROUND: Record<\n TagSeverity,\n BoxBackgroundColor\n> = {\n [TagSeverity.Neutral]: BoxBackgroundColor.BackgroundMuted,\n [TagSeverity.Success]: BoxBackgroundColor.SuccessMuted,\n [TagSeverity.Danger]: BoxBackgroundColor.ErrorMuted,\n [TagSeverity.Warning]: BoxBackgroundColor.WarningMuted,\n [TagSeverity.Info]: BoxBackgroundColor.InfoMuted,\n};\n\nexport const MAP_TAG_SEVERITY_TEXT_COLOR: Record<TagSeverity, TextColor> = {\n [TagSeverity.Neutral]: TextColor.TextAlternative,\n [TagSeverity.Success]: TextColor.SuccessDefault,\n [TagSeverity.Danger]: TextColor.ErrorDefault,\n [TagSeverity.Warning]: TextColor.WarningDefault,\n [TagSeverity.Info]: TextColor.InfoDefault,\n};\n\nexport const MAP_TAG_SEVERITY_ICON_COLOR: Record<TagSeverity, IconColor> = {\n [TagSeverity.Neutral]: IconColor.IconAlternative,\n [TagSeverity.Success]: IconColor.SuccessDefault,\n [TagSeverity.Danger]: IconColor.ErrorDefault,\n [TagSeverity.Warning]: IconColor.WarningDefault,\n [TagSeverity.Info]: IconColor.InfoDefault,\n};\n"]}
@@ -7,14 +7,14 @@ export const MAP_TAG_SEVERITY_BACKGROUND = {
7
7
  [TagSeverity.Info]: BoxBackgroundColor.InfoMuted,
8
8
  };
9
9
  export const MAP_TAG_SEVERITY_TEXT_COLOR = {
10
- [TagSeverity.Neutral]: TextColor.TextDefault,
10
+ [TagSeverity.Neutral]: TextColor.TextAlternative,
11
11
  [TagSeverity.Success]: TextColor.SuccessDefault,
12
12
  [TagSeverity.Danger]: TextColor.ErrorDefault,
13
13
  [TagSeverity.Warning]: TextColor.WarningDefault,
14
14
  [TagSeverity.Info]: TextColor.InfoDefault,
15
15
  };
16
16
  export const MAP_TAG_SEVERITY_ICON_COLOR = {
17
- [TagSeverity.Neutral]: IconColor.IconDefault,
17
+ [TagSeverity.Neutral]: IconColor.IconAlternative,
18
18
  [TagSeverity.Success]: IconColor.SuccessDefault,
19
19
  [TagSeverity.Danger]: IconColor.ErrorDefault,
20
20
  [TagSeverity.Warning]: IconColor.WarningDefault,
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.constants.mjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,SAAS,EACV,uCAAuC;AAExC,MAAM,CAAC,MAAM,2BAA2B,GAGpC;IACF,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,eAAe;IACzD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,YAAY;IACtD,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC,UAAU;IACnD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,YAAY;IACtD,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC,SAAS;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAmC;IACzE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,WAAW;IAC5C,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY;IAC5C,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,WAAW;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAmC;IACzE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,WAAW;IAC5C,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY;IAC5C,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,WAAW;CAC1C,CAAC","sourcesContent":["import {\n BoxBackgroundColor,\n IconColor,\n TagSeverity,\n TextColor,\n} from '@metamask/design-system-shared';\n\nexport const MAP_TAG_SEVERITY_BACKGROUND: Record<\n TagSeverity,\n BoxBackgroundColor\n> = {\n [TagSeverity.Neutral]: BoxBackgroundColor.BackgroundMuted,\n [TagSeverity.Success]: BoxBackgroundColor.SuccessMuted,\n [TagSeverity.Danger]: BoxBackgroundColor.ErrorMuted,\n [TagSeverity.Warning]: BoxBackgroundColor.WarningMuted,\n [TagSeverity.Info]: BoxBackgroundColor.InfoMuted,\n};\n\nexport const MAP_TAG_SEVERITY_TEXT_COLOR: Record<TagSeverity, TextColor> = {\n [TagSeverity.Neutral]: TextColor.TextDefault,\n [TagSeverity.Success]: TextColor.SuccessDefault,\n [TagSeverity.Danger]: TextColor.ErrorDefault,\n [TagSeverity.Warning]: TextColor.WarningDefault,\n [TagSeverity.Info]: TextColor.InfoDefault,\n};\n\nexport const MAP_TAG_SEVERITY_ICON_COLOR: Record<TagSeverity, IconColor> = {\n [TagSeverity.Neutral]: IconColor.IconDefault,\n [TagSeverity.Success]: IconColor.SuccessDefault,\n [TagSeverity.Danger]: IconColor.ErrorDefault,\n [TagSeverity.Warning]: IconColor.WarningDefault,\n [TagSeverity.Info]: IconColor.InfoDefault,\n};\n"]}
1
+ {"version":3,"file":"Tag.constants.mjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,SAAS,EACV,uCAAuC;AAExC,MAAM,CAAC,MAAM,2BAA2B,GAGpC;IACF,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,eAAe;IACzD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,YAAY;IACtD,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC,UAAU;IACnD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,YAAY;IACtD,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC,SAAS;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAmC;IACzE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,eAAe;IAChD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY;IAC5C,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,WAAW;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAmC;IACzE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,eAAe;IAChD,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY;IAC5C,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IAC/C,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,WAAW;CAC1C,CAAC","sourcesContent":["import {\n BoxBackgroundColor,\n IconColor,\n TagSeverity,\n TextColor,\n} from '@metamask/design-system-shared';\n\nexport const MAP_TAG_SEVERITY_BACKGROUND: Record<\n TagSeverity,\n BoxBackgroundColor\n> = {\n [TagSeverity.Neutral]: BoxBackgroundColor.BackgroundMuted,\n [TagSeverity.Success]: BoxBackgroundColor.SuccessMuted,\n [TagSeverity.Danger]: BoxBackgroundColor.ErrorMuted,\n [TagSeverity.Warning]: BoxBackgroundColor.WarningMuted,\n [TagSeverity.Info]: BoxBackgroundColor.InfoMuted,\n};\n\nexport const MAP_TAG_SEVERITY_TEXT_COLOR: Record<TagSeverity, TextColor> = {\n [TagSeverity.Neutral]: TextColor.TextAlternative,\n [TagSeverity.Success]: TextColor.SuccessDefault,\n [TagSeverity.Danger]: TextColor.ErrorDefault,\n [TagSeverity.Warning]: TextColor.WarningDefault,\n [TagSeverity.Info]: TextColor.InfoDefault,\n};\n\nexport const MAP_TAG_SEVERITY_ICON_COLOR: Record<TagSeverity, IconColor> = {\n [TagSeverity.Neutral]: IconColor.IconAlternative,\n [TagSeverity.Success]: IconColor.SuccessDefault,\n [TagSeverity.Danger]: IconColor.ErrorDefault,\n [TagSeverity.Warning]: IconColor.WarningDefault,\n [TagSeverity.Info]: IconColor.InfoDefault,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.types.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextButtonPropsShared } from '@metamask/design-system-shared';\n\nimport type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> &\n TextButtonPropsShared & {\n /**\n * Called when the user presses the label. Primary interaction for this control.\n */\n onPress?: TextProps['onPress'];\n };\n"]}
1
+ {"version":3,"file":"TextButton.types.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> & {\n /**\n * Content shown as the label.\n */\n children: React.ReactNode;\n /**\n * Called when the user presses the label. Primary interaction for this control.\n */\n onPress?: TextProps['onPress'];\n};\n"]}
@@ -1,10 +1,13 @@
1
- import type { TextButtonPropsShared } from "@metamask/design-system-shared";
2
1
  import type { TextProps } from "../Text/index.cjs";
3
2
  /**
4
3
  * Props for `TextButton`, a text-only control for links and inline actions.
5
4
  * Extends {@link Text} props.
6
5
  */
7
- export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & TextButtonPropsShared & {
6
+ export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
7
+ /**
8
+ * Content shown as the label.
9
+ */
10
+ children: React.ReactNode;
8
11
  /**
9
12
  * Called when the user presses the label. Primary interaction for this control.
10
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uCAAuC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GACC,qBAAqB,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
1
+ {"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GAAG;IACF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
@@ -1,10 +1,13 @@
1
- import type { TextButtonPropsShared } from "@metamask/design-system-shared";
2
1
  import type { TextProps } from "../Text/index.mjs";
3
2
  /**
4
3
  * Props for `TextButton`, a text-only control for links and inline actions.
5
4
  * Extends {@link Text} props.
6
5
  */
7
- export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & TextButtonPropsShared & {
6
+ export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
7
+ /**
8
+ * Content shown as the label.
9
+ */
10
+ children: React.ReactNode;
8
11
  /**
9
12
  * Called when the user presses the label. Primary interaction for this control.
10
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uCAAuC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GACC,qBAAqB,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
1
+ {"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GAAG;IACF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.types.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextButtonPropsShared } from '@metamask/design-system-shared';\n\nimport type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> &\n TextButtonPropsShared & {\n /**\n * Called when the user presses the label. Primary interaction for this control.\n */\n onPress?: TextProps['onPress'];\n };\n"]}
1
+ {"version":3,"file":"TextButton.types.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> & {\n /**\n * Content shown as the label.\n */\n children: React.ReactNode;\n /**\n * Called when the user presses the label. Primary interaction for this control.\n */\n onPress?: TextProps['onPress'];\n};\n"]}
@@ -12,14 +12,12 @@ const BoxRow_1 = require("../BoxRow/index.cjs");
12
12
  const IconAlert_1 = require("../IconAlert/index.cjs");
13
13
  const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
14
14
  /**
15
- * Displays a severity-based {@link IconAlert} above a centered title row with optional inline accessories.
15
+ * Displays a severity-based {@link IconAlert} above a centered title row.
16
16
  * Remaining `View` props are forwarded to the root {@link BoxColumn}.
17
17
  *
18
18
  * @param props - Component props
19
19
  * @param props.severity - Passed to {@link IconAlert} for glyph and color
20
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
21
  * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
24
22
  * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
25
23
  * @param props.description - Optional description below the title; uses {@link TextOrChildren}
@@ -28,7 +26,7 @@ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
28
26
  *
29
27
  * @returns The rendered TitleAlert layout.
30
28
  */
31
- const TitleAlert = ({ severity, title, titleStartAccessory, titleEndAccessory, titleProps, titleWrapperProps, description, descriptionProps, twClassName = '', ...props }) => {
29
+ const TitleAlert = ({ severity, title, titleProps, titleWrapperProps, description, descriptionProps, twClassName = '', ...props }) => {
32
30
  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
31
  <TextOrChildren_1.TextOrChildren textProps={{
34
32
  variant: design_system_shared_1.TextVariant.BodySm,
@@ -40,7 +38,7 @@ const TitleAlert = ({ severity, title, titleStartAccessory, titleEndAccessory, t
40
38
  {description}
41
39
  </TextOrChildren_1.TextOrChildren>
42
40
  </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={{
41
+ {title ? (<BoxRow_1.BoxRow justifyContent={design_system_shared_1.BoxJustifyContent.Center} twClassName="self-stretch" {...titleWrapperProps} textProps={{
44
42
  variant: design_system_shared_1.TextVariant.HeadingLg,
45
43
  color: design_system_shared_1.TextColor.TextDefault,
46
44
  ...titleProps,
@@ -1 +1 @@
1
- {"version":3,"file":"TitleAlert.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAOwC;AACxC,kDAA0B;AAE1B,0CAA6B;AAC7B,sDAAyC;AACzC,gDAAmC;AACnC,sDAAyC;AACzC,gFAAmE;AAInE;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,qBAAS,CACR,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,qBAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,SAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,+BAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,gCAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,iCAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,+BAAc,CAClB;UAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,wCAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,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,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,UAAU,cAuDrB;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row with optional inline accessories.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleStartAccessory - Optional inline accessory to the left of `title`\n * @param props.titleEndAccessory - Optional inline accessory to the right of `title`\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleStartAccessory,\n titleEndAccessory,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
1
+ {"version":3,"file":"TitleAlert.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAOwC;AACxC,kDAA0B;AAE1B,0CAA6B;AAC7B,sDAAyC;AACzC,gDAAmC;AACnC,sDAAyC;AACzC,gFAAmE;AAInE;;;;;;;;;;;;;;GAcG;AACI,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,qBAAS,CACR,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,qBAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,SAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,+BAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,gCAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,iCAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,+BAAc,CAClB;UAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,wCAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,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,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAnDW,QAAA,UAAU,cAmDrB;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
@@ -1,14 +1,12 @@
1
1
  import React from "react";
2
2
  import type { TitleAlertProps } from "./TitleAlert.types.cjs";
3
3
  /**
4
- * Displays a severity-based {@link IconAlert} above a centered title row with optional inline accessories.
4
+ * Displays a severity-based {@link IconAlert} above a centered title row.
5
5
  * Remaining `View` props are forwarded to the root {@link BoxColumn}.
6
6
  *
7
7
  * @param props - Component props
8
8
  * @param props.severity - Passed to {@link IconAlert} for glyph and color
9
9
  * @param props.title - Title row content; row renders only when `title` is renderable
10
- * @param props.titleStartAccessory - Optional inline accessory to the left of `title`
11
- * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
12
10
  * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
13
11
  * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
14
12
  * @param props.description - Optional description below the title; uses {@link TextOrChildren}
@@ -1 +1 @@
1
- {"version":3,"file":"TitleAlert.d.cts","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuDhD,CAAC"}
1
+ {"version":3,"file":"TitleAlert.d.cts","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmDhD,CAAC"}
@@ -1,14 +1,12 @@
1
1
  import React from "react";
2
2
  import type { TitleAlertProps } from "./TitleAlert.types.mjs";
3
3
  /**
4
- * Displays a severity-based {@link IconAlert} above a centered title row with optional inline accessories.
4
+ * Displays a severity-based {@link IconAlert} above a centered title row.
5
5
  * Remaining `View` props are forwarded to the root {@link BoxColumn}.
6
6
  *
7
7
  * @param props - Component props
8
8
  * @param props.severity - Passed to {@link IconAlert} for glyph and color
9
9
  * @param props.title - Title row content; row renders only when `title` is renderable
10
- * @param props.titleStartAccessory - Optional inline accessory to the left of `title`
11
- * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
12
10
  * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
13
11
  * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
14
12
  * @param props.description - Optional description below the title; uses {@link TextOrChildren}
@@ -1 +1 @@
1
- {"version":3,"file":"TitleAlert.d.mts","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuDhD,CAAC"}
1
+ {"version":3,"file":"TitleAlert.d.mts","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmDhD,CAAC"}
@@ -13,14 +13,12 @@ import { BoxRow } from "../BoxRow/index.mjs";
13
13
  import { IconAlert } from "../IconAlert/index.mjs";
14
14
  import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
15
15
  /**
16
- * Displays a severity-based {@link IconAlert} above a centered title row with optional inline accessories.
16
+ * Displays a severity-based {@link IconAlert} above a centered title row.
17
17
  * Remaining `View` props are forwarded to the root {@link BoxColumn}.
18
18
  *
19
19
  * @param props - Component props
20
20
  * @param props.severity - Passed to {@link IconAlert} for glyph and color
21
21
  * @param props.title - Title row content; row renders only when `title` is renderable
22
- * @param props.titleStartAccessory - Optional inline accessory to the left of `title`
23
- * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
24
22
  * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
25
23
  * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
26
24
  * @param props.description - Optional description below the title; uses {@link TextOrChildren}
@@ -29,7 +27,7 @@ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
29
27
  *
30
28
  * @returns The rendered TitleAlert layout.
31
29
  */
32
- export const TitleAlert = ({ severity, title, titleStartAccessory, titleEndAccessory, titleProps, titleWrapperProps, description, descriptionProps, twClassName = '', ...props }) => {
30
+ export const TitleAlert = ({ severity, title, titleProps, titleWrapperProps, description, descriptionProps, twClassName = '', ...props }) => {
33
31
  return (<BoxColumn alignItems={BoxAlignItems.Center} gap={1} topAccessory={<IconAlert severity={severity} size={IconSize.Xl}/>} bottomAccessory={description ? (<Box twClassName="self-stretch">
34
32
  <TextOrChildren textProps={{
35
33
  variant: TextVariant.BodySm,
@@ -41,7 +39,7 @@ export const TitleAlert = ({ severity, title, titleStartAccessory, titleEndAcces
41
39
  {description}
42
40
  </TextOrChildren>
43
41
  </Box>) : undefined} twClassName={twClassName} {...props}>
44
- {title ? (<BoxRow justifyContent={BoxJustifyContent.Center} twClassName="self-stretch" {...titleWrapperProps} startAccessory={titleStartAccessory} endAccessory={titleEndAccessory} textProps={{
42
+ {title ? (<BoxRow justifyContent={BoxJustifyContent.Center} twClassName="self-stretch" {...titleWrapperProps} textProps={{
45
43
  variant: TextVariant.HeadingLg,
46
44
  color: TextColor.TextDefault,
47
45
  ...titleProps,
@@ -1 +1 @@
1
- {"version":3,"file":"TitleAlert.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAS,CACR,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,GAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,cAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,SAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,UAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,cAAc,CAClB;UAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,cAAc,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,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,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row with optional inline accessories.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleStartAccessory - Optional inline accessory to the left of `title`\n * @param props.titleEndAccessory - Optional inline accessory to the right of `title`\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleStartAccessory,\n titleEndAccessory,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
1
+ {"version":3,"file":"TitleAlert.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAS,CACR,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,GAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,cAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,SAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,UAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,cAAc,CAClB;UAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,cAAc,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,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,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TitleAlert.types.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TitleAlertPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleAlert component props (React Native).\n * Extends {@link TitleAlertPropsShared} with platform `Text` passthroughs, `twClassName`, and `View` props\n * forwarded to the root {@link BoxColumn}.\n */\nexport type TitleAlertProps = TitleAlertPropsShared & {\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `startAccessory`,\n * `endAccessory`, and `textProps` (TitleAlert sets those via `title`, `titleStartAccessory`,\n * `titleEndAccessory`, and `titleProps`). Defaults `justifyContent` to center and `twClassName`\n * to include `self-stretch`; values on this object override those defaults when set.\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into title row `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into description `Text` when `description` is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
1
+ {"version":3,"file":"TitleAlert.types.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TitleAlertPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleAlert component props (React Native).\n * Extends {@link TitleAlertPropsShared} with platform `Text` passthroughs, `twClassName`, and `View` props\n * forwarded to the root {@link BoxColumn}.\n */\nexport type TitleAlertProps = TitleAlertPropsShared & {\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `startAccessory`,\n * `endAccessory`, and `textProps` (TitleAlert sets those via `title` and `titleProps`). Defaults\n * `justifyContent` to center and `twClassName`\n * to include `self-stretch`; values on this object override those defaults when set.\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into title row `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into description `Text` when `description` is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -10,8 +10,8 @@ import type { TextProps } from "../Text/Text.types.cjs";
10
10
  export type TitleAlertProps = TitleAlertPropsShared & {
11
11
  /**
12
12
  * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `startAccessory`,
13
- * `endAccessory`, and `textProps` (TitleAlert sets those via `title`, `titleStartAccessory`,
14
- * `titleEndAccessory`, and `titleProps`). Defaults `justifyContent` to center and `twClassName`
13
+ * `endAccessory`, and `textProps` (TitleAlert sets those via `title` and `titleProps`). Defaults
14
+ * `justifyContent` to center and `twClassName`
15
15
  * to include `self-stretch`; values on this object override those defaults when set.
16
16
  */
17
17
  titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'startAccessory' | 'endAccessory' | 'textProps'>;
@@ -10,8 +10,8 @@ import type { TextProps } from "../Text/Text.types.mjs";
10
10
  export type TitleAlertProps = TitleAlertPropsShared & {
11
11
  /**
12
12
  * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `startAccessory`,
13
- * `endAccessory`, and `textProps` (TitleAlert sets those via `title`, `titleStartAccessory`,
14
- * `titleEndAccessory`, and `titleProps`). Defaults `justifyContent` to center and `twClassName`
13
+ * `endAccessory`, and `textProps` (TitleAlert sets those via `title` and `titleProps`). Defaults
14
+ * `justifyContent` to center and `twClassName`
15
15
  * to include `self-stretch`; values on this object override those defaults when set.
16
16
  */
17
17
  titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'startAccessory' | 'endAccessory' | 'textProps'>;
@@ -1 +1 @@
1
- {"version":3,"file":"TitleAlert.types.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TitleAlertPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleAlert component props (React Native).\n * Extends {@link TitleAlertPropsShared} with platform `Text` passthroughs, `twClassName`, and `View` props\n * forwarded to the root {@link BoxColumn}.\n */\nexport type TitleAlertProps = TitleAlertPropsShared & {\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `startAccessory`,\n * `endAccessory`, and `textProps` (TitleAlert sets those via `title`, `titleStartAccessory`,\n * `titleEndAccessory`, and `titleProps`). Defaults `justifyContent` to center and `twClassName`\n * to include `self-stretch`; values on this object override those defaults when set.\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into title row `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into description `Text` when `description` is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
1
+ {"version":3,"file":"TitleAlert.types.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TitleAlertPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleAlert component props (React Native).\n * Extends {@link TitleAlertPropsShared} with platform `Text` passthroughs, `twClassName`, and `View` props\n * forwarded to the root {@link BoxColumn}.\n */\nexport type TitleAlertProps = TitleAlertPropsShared & {\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `startAccessory`,\n * `endAccessory`, and `textProps` (TitleAlert sets those via `title` and `titleProps`). Defaults\n * `justifyContent` to center and `twClassName`\n * to include `self-stretch`; values on this object override those defaults when set.\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into title row `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into description `Text` when `description` is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}