@metamask/design-system-react-native 0.27.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -1
- package/dist/components/AvatarBase/AvatarBase.cjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -2
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs +2 -2
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +2 -2
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +2 -2
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +3 -4
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs +3 -4
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarNetwork/index.cjs +2 -2
- package/dist/components/AvatarNetwork/index.cjs.map +1 -1
- package/dist/components/AvatarNetwork/index.d.cts +1 -1
- package/dist/components/AvatarNetwork/index.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/index.d.mts +1 -1
- package/dist/components/AvatarNetwork/index.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/index.mjs +1 -1
- package/dist/components/AvatarNetwork/index.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +2 -2
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +2 -2
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/Content/Content.cjs +71 -0
- package/dist/components/Content/Content.cjs.map +1 -0
- package/dist/components/Content/Content.constants.cjs +9 -0
- package/dist/components/Content/Content.constants.cjs.map +1 -0
- package/dist/components/Content/Content.constants.d.cts +3 -0
- package/dist/components/Content/Content.constants.d.cts.map +1 -0
- package/dist/components/Content/Content.constants.d.mts +3 -0
- package/dist/components/Content/Content.constants.d.mts.map +1 -0
- package/dist/components/Content/Content.constants.mjs +6 -0
- package/dist/components/Content/Content.constants.mjs.map +1 -0
- package/dist/components/Content/Content.d.cts +4 -0
- package/dist/components/Content/Content.d.cts.map +1 -0
- package/dist/components/Content/Content.d.mts +4 -0
- package/dist/components/Content/Content.d.mts.map +1 -0
- package/dist/components/Content/Content.mjs +71 -0
- package/dist/components/Content/Content.mjs.map +1 -0
- package/dist/components/Content/Content.types.cjs +3 -0
- package/dist/components/Content/Content.types.cjs.map +1 -0
- package/dist/components/Content/Content.types.d.cts +31 -0
- package/dist/components/Content/Content.types.d.cts.map +1 -0
- package/dist/components/Content/Content.types.d.mts +31 -0
- package/dist/components/Content/Content.types.d.mts.map +1 -0
- package/dist/components/Content/Content.types.mjs +2 -0
- package/dist/components/Content/Content.types.mjs.map +1 -0
- package/dist/components/Content/index.cjs +8 -0
- package/dist/components/Content/index.cjs.map +1 -0
- package/dist/components/Content/index.d.cts +4 -0
- package/dist/components/Content/index.d.cts.map +1 -0
- package/dist/components/Content/index.d.mts +4 -0
- package/dist/components/Content/index.d.mts.map +1 -0
- package/dist/components/Content/index.mjs +3 -0
- package/dist/components/Content/index.mjs.map +1 -0
- package/dist/components/Icon/Icon.constants.cjs +6 -6
- package/dist/components/Icon/Icon.constants.cjs.map +1 -1
- package/dist/components/Icon/Icon.constants.d.cts +1 -1
- package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
- package/dist/components/Icon/Icon.constants.d.mts +1 -1
- package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
- package/dist/components/Icon/Icon.constants.mjs +1 -1
- package/dist/components/Icon/Icon.constants.mjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.cjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.cjs +2 -3
- package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.mjs +1 -2
- package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.cjs +2 -3
- package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.mjs +1 -2
- package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
- package/dist/components/ListItem/ListItem.cjs +26 -48
- package/dist/components/ListItem/ListItem.cjs.map +1 -1
- package/dist/components/ListItem/ListItem.d.cts.map +1 -1
- package/dist/components/ListItem/ListItem.d.mts.map +1 -1
- package/dist/components/ListItem/ListItem.mjs +26 -28
- package/dist/components/ListItem/ListItem.mjs.map +1 -1
- package/dist/components/ListItem/ListItem.types.cjs +0 -9
- package/dist/components/ListItem/ListItem.types.cjs.map +1 -1
- package/dist/components/ListItem/ListItem.types.d.cts +13 -55
- package/dist/components/ListItem/ListItem.types.d.cts.map +1 -1
- package/dist/components/ListItem/ListItem.types.d.mts +13 -55
- package/dist/components/ListItem/ListItem.types.d.mts.map +1 -1
- package/dist/components/ListItem/ListItem.types.mjs +1 -8
- package/dist/components/ListItem/ListItem.types.mjs.map +1 -1
- package/dist/components/ListItem/index.cjs +1 -3
- package/dist/components/ListItem/index.cjs.map +1 -1
- package/dist/components/ListItem/index.d.cts +0 -1
- package/dist/components/ListItem/index.d.cts.map +1 -1
- package/dist/components/ListItem/index.d.mts +0 -1
- package/dist/components/ListItem/index.d.mts.map +1 -1
- package/dist/components/ListItem/index.mjs +0 -1
- package/dist/components/ListItem/index.mjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs +47 -24
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.cts +16 -13
- package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.mts +16 -13
- package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.mjs +48 -25
- package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.d.cts +16 -9
- package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.d.mts +16 -9
- package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -1
- package/dist/components/SelectButton/SelectButton.constants.cjs +4 -5
- package/dist/components/SelectButton/SelectButton.constants.cjs.map +1 -1
- package/dist/components/SelectButton/SelectButton.constants.d.cts +1 -2
- package/dist/components/SelectButton/SelectButton.constants.d.cts.map +1 -1
- package/dist/components/SelectButton/SelectButton.constants.d.mts +1 -2
- package/dist/components/SelectButton/SelectButton.constants.d.mts.map +1 -1
- package/dist/components/SelectButton/SelectButton.constants.mjs +1 -2
- package/dist/components/SelectButton/SelectButton.constants.mjs.map +1 -1
- package/dist/components/Tag/Tag.constants.cjs +3 -3
- package/dist/components/Tag/Tag.constants.cjs.map +1 -1
- package/dist/components/Tag/Tag.constants.mjs +3 -3
- package/dist/components/Tag/Tag.constants.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs +3 -7
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.cts +158 -163
- package/dist/components/TextArea/TextArea.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.d.mts +158 -163
- package/dist/components/TextArea/TextArea.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs +4 -8
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.types.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.types.d.cts +12 -45
- package/dist/components/TextArea/TextArea.types.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.types.d.mts +12 -45
- package/dist/components/TextArea/TextArea.types.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.types.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.types.d.cts +2 -5
- package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
- package/dist/components/TextButton/TextButton.types.d.mts +2 -5
- package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
- package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
- package/dist/components/Toast/Toast.constants.cjs +5 -8
- package/dist/components/Toast/Toast.constants.cjs.map +1 -1
- package/dist/components/Toast/Toast.constants.d.cts +2 -7
- package/dist/components/Toast/Toast.constants.d.cts.map +1 -1
- package/dist/components/Toast/Toast.constants.d.mts +2 -7
- package/dist/components/Toast/Toast.constants.d.mts.map +1 -1
- package/dist/components/Toast/Toast.constants.mjs +2 -7
- package/dist/components/Toast/Toast.constants.mjs.map +1 -1
- package/dist/components/Toast/Toast.types.cjs +2 -10
- package/dist/components/Toast/Toast.types.cjs.map +1 -1
- package/dist/components/Toast/Toast.types.d.cts +4 -11
- package/dist/components/Toast/Toast.types.d.cts.map +1 -1
- package/dist/components/Toast/Toast.types.d.mts +4 -11
- package/dist/components/Toast/Toast.types.d.mts.map +1 -1
- package/dist/components/Toast/Toast.types.mjs +2 -10
- package/dist/components/Toast/Toast.types.mjs.map +1 -1
- package/dist/components/Toast/index.cjs +3 -5
- package/dist/components/Toast/index.cjs.map +1 -1
- package/dist/components/Toast/index.d.cts +2 -2
- package/dist/components/Toast/index.d.cts.map +1 -1
- package/dist/components/Toast/index.d.mts +2 -2
- package/dist/components/Toast/index.d.mts.map +1 -1
- package/dist/components/Toast/index.mjs +2 -2
- package/dist/components/Toast/index.mjs.map +1 -1
- package/dist/components/index.cjs +6 -4
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +3 -1
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +2 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.cjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts +2 -2
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts +2 -2
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.mjs.map +1 -1
- package/package.json +8 -8
- package/dist/components/ListItem/ListItem.constants.cjs +0 -14
- package/dist/components/ListItem/ListItem.constants.cjs.map +0 -1
- package/dist/components/ListItem/ListItem.constants.d.cts +0 -8
- package/dist/components/ListItem/ListItem.constants.d.cts.map +0 -1
- package/dist/components/ListItem/ListItem.constants.d.mts +0 -8
- package/dist/components/ListItem/ListItem.constants.d.mts.map +0 -1
- package/dist/components/ListItem/ListItem.constants.mjs +0 -11
- package/dist/components/ListItem/ListItem.constants.mjs.map +0 -1
- package/dist/types/index.cjs +0 -18
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts +0 -8
- package/dist/types/index.d.cts.map +0 -1
- package/dist/types/index.d.mts +0 -8
- package/dist/types/index.d.mts.map +0 -1
- package/dist/types/index.mjs +0 -8
- package/dist/types/index.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAKwC;AACxC,kDAA0B;AAE1B,sDAAyC;AACzC,gDAAmC;AACnC,gFAAmE;AAEnE,+DAA6D;AAGtD,MAAM,OAAO,GAA2B,CAAC,EAC9C,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,GAAG,+CAAwB,CAAC,MAAM,EACnD,MAAM,EACN,WAAW,EACX,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAEzE,MAAM,UAAU,GAAG,CACjB,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,UAAU,CAAC,CAAC,0CAAsB,CAAC,iBAAiB,CAAC,CAAC,CACtD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E,+BAAc,CAClB;YAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,qBAAS,CAAC,CACb,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;IAEF,IAAI,cAAc,EAAE;QAClB,OAAO,CACL,CAAC,qBAAS,CACR,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,UAAU,CACb;MAAA,EAAE,qBAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AApJW,QAAA,OAAO,WAoJlB;AAEF,eAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import {\n ContentVerticalAlignment,\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport { VERTICAL_ALIGNMENT_MAP } from './Content.constants';\nimport type { ContentProps } from './Content.types';\n\nexport const Content: React.FC<ContentProps> = ({\n startAccessory,\n endAccessory,\n topAccessory,\n bottomAccessory,\n verticalAlignment = ContentVerticalAlignment.Center,\n avatar,\n twClassName,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n ...props\n}) => {\n const hasColumnShell = Boolean(topAccessory) || Boolean(bottomAccessory);\n\n const contentRow = (\n <BoxRow\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n gap={4}\n twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()}\n {...(hasColumnShell ? {} : props)}\n >\n {avatar}\n {/* Title and description Column */}\n <BoxColumn\n twClassName=\"flex-1 min-w-0\"\n bottomAccessory={\n description ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={descriptionStartAccessory}\n endAccessory={descriptionEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...descriptionProps,\n }}\n >\n {description}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {title ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n {/* Value and subvalue Column */}\n {value || subvalue ? (\n <BoxColumn\n twClassName=\"min-w-0\"\n bottomAccessory={\n subvalue ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={subvalueStartAccessory}\n endAccessory={subvalueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subvalueProps,\n }}\n >\n {subvalue}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {value ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...valueProps,\n }}\n >\n {value}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n ) : null}\n </BoxRow>\n );\n\n if (hasColumnShell) {\n return (\n <BoxColumn\n gap={1}\n topAccessory={topAccessory}\n bottomAccessory={bottomAccessory}\n twClassName={twClassName}\n {...props}\n >\n {contentRow}\n </BoxColumn>\n );\n }\n\n return contentRow;\n};\n\nContent.displayName = 'Content';\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VERTICAL_ALIGNMENT_MAP = void 0;
|
|
4
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
exports.VERTICAL_ALIGNMENT_MAP = {
|
|
6
|
+
[design_system_shared_1.ContentVerticalAlignment.Top]: design_system_shared_1.BoxAlignItems.Start,
|
|
7
|
+
[design_system_shared_1.ContentVerticalAlignment.Center]: design_system_shared_1.BoxAlignItems.Center,
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=Content.constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.constants.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":";;;AAAA,yEAGwC;AAE3B,QAAA,sBAAsB,GAG/B;IACF,CAAC,+CAAwB,CAAC,GAAG,CAAC,EAAE,oCAAa,CAAC,KAAK;IACnD,CAAC,+CAAwB,CAAC,MAAM,CAAC,EAAE,oCAAa,CAAC,MAAM;CACxD,CAAC","sourcesContent":["import {\n BoxAlignItems,\n ContentVerticalAlignment,\n} from '@metamask/design-system-shared';\n\nexport const VERTICAL_ALIGNMENT_MAP: Record<\n ContentVerticalAlignment,\n BoxAlignItems\n> = {\n [ContentVerticalAlignment.Top]: BoxAlignItems.Start,\n [ContentVerticalAlignment.Center]: BoxAlignItems.Center,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACzB,uCAAuC;AAExC,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,wBAAwB,EACxB,aAAa,CAId,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACzB,uCAAuC;AAExC,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,wBAAwB,EACxB,aAAa,CAId,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BoxAlignItems, ContentVerticalAlignment } from "@metamask/design-system-shared";
|
|
2
|
+
export const VERTICAL_ALIGNMENT_MAP = {
|
|
3
|
+
[ContentVerticalAlignment.Top]: BoxAlignItems.Start,
|
|
4
|
+
[ContentVerticalAlignment.Center]: BoxAlignItems.Center,
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=Content.constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.constants.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACzB,uCAAuC;AAExC,MAAM,CAAC,MAAM,sBAAsB,GAG/B;IACF,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,KAAK;IACnD,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM;CACxD,CAAC","sourcesContent":["import {\n BoxAlignItems,\n ContentVerticalAlignment,\n} from '@metamask/design-system-shared';\n\nexport const VERTICAL_ALIGNMENT_MAP: Record<\n ContentVerticalAlignment,\n BoxAlignItems\n> = {\n [ContentVerticalAlignment.Top]: BoxAlignItems.Start,\n [ContentVerticalAlignment.Center]: BoxAlignItems.Center,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,YAAY,EAAE,4BAAwB;AAEpD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoJ1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,YAAY,EAAE,4BAAwB;AAEpD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoJ1C,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import { ContentVerticalAlignment, FontWeight, TextColor, TextVariant } from "@metamask/design-system-shared";
|
|
8
|
+
import $React from "react";
|
|
9
|
+
const React = $importDefault($React);
|
|
10
|
+
import { BoxColumn } from "../BoxColumn/index.mjs";
|
|
11
|
+
import { BoxRow } from "../BoxRow/index.mjs";
|
|
12
|
+
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
13
|
+
import { VERTICAL_ALIGNMENT_MAP } from "./Content.constants.mjs";
|
|
14
|
+
export const Content = ({ startAccessory, endAccessory, topAccessory, bottomAccessory, verticalAlignment = ContentVerticalAlignment.Center, avatar, twClassName, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, ...props }) => {
|
|
15
|
+
const hasColumnShell = Boolean(topAccessory) || Boolean(bottomAccessory);
|
|
16
|
+
const contentRow = (<BoxRow startAccessory={startAccessory} endAccessory={endAccessory} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]} gap={4} twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()} {...(hasColumnShell ? {} : props)}>
|
|
17
|
+
{avatar}
|
|
18
|
+
{/* Title and description Column */}
|
|
19
|
+
<BoxColumn twClassName="flex-1 min-w-0" bottomAccessory={description ? (<BoxRow twClassName="w-full" startAccessory={descriptionStartAccessory} endAccessory={descriptionEndAccessory} gap={1}>
|
|
20
|
+
<TextOrChildren textProps={{
|
|
21
|
+
variant: TextVariant.BodySm,
|
|
22
|
+
fontWeight: FontWeight.Medium,
|
|
23
|
+
color: TextColor.TextAlternative,
|
|
24
|
+
...descriptionProps,
|
|
25
|
+
}}>
|
|
26
|
+
{description}
|
|
27
|
+
</TextOrChildren>
|
|
28
|
+
</BoxRow>) : null}>
|
|
29
|
+
{title ? (<BoxRow twClassName="w-full" startAccessory={titleStartAccessory} endAccessory={titleEndAccessory} gap={1}>
|
|
30
|
+
<TextOrChildren textProps={{
|
|
31
|
+
variant: TextVariant.BodyMd,
|
|
32
|
+
fontWeight: FontWeight.Medium,
|
|
33
|
+
color: TextColor.TextDefault,
|
|
34
|
+
...titleProps,
|
|
35
|
+
}}>
|
|
36
|
+
{title}
|
|
37
|
+
</TextOrChildren>
|
|
38
|
+
</BoxRow>) : null}
|
|
39
|
+
</BoxColumn>
|
|
40
|
+
{/* Value and subvalue Column */}
|
|
41
|
+
{value || subvalue ? (<BoxColumn twClassName="min-w-0" bottomAccessory={subvalue ? (<BoxRow twClassName="w-full" startAccessory={subvalueStartAccessory} endAccessory={subvalueEndAccessory} gap={1}>
|
|
42
|
+
<TextOrChildren textProps={{
|
|
43
|
+
variant: TextVariant.BodySm,
|
|
44
|
+
fontWeight: FontWeight.Medium,
|
|
45
|
+
color: TextColor.TextAlternative,
|
|
46
|
+
...subvalueProps,
|
|
47
|
+
}}>
|
|
48
|
+
{subvalue}
|
|
49
|
+
</TextOrChildren>
|
|
50
|
+
</BoxRow>) : null}>
|
|
51
|
+
{value ? (<BoxRow twClassName="w-full" startAccessory={valueStartAccessory} endAccessory={valueEndAccessory} gap={1}>
|
|
52
|
+
<TextOrChildren textProps={{
|
|
53
|
+
variant: TextVariant.BodyMd,
|
|
54
|
+
fontWeight: FontWeight.Medium,
|
|
55
|
+
color: TextColor.TextDefault,
|
|
56
|
+
...valueProps,
|
|
57
|
+
}}>
|
|
58
|
+
{value}
|
|
59
|
+
</TextOrChildren>
|
|
60
|
+
</BoxRow>) : null}
|
|
61
|
+
</BoxColumn>) : null}
|
|
62
|
+
</BoxRow>);
|
|
63
|
+
if (hasColumnShell) {
|
|
64
|
+
return (<BoxColumn gap={1} topAccessory={topAccessory} bottomAccessory={bottomAccessory} twClassName={twClassName} {...props}>
|
|
65
|
+
{contentRow}
|
|
66
|
+
</BoxColumn>);
|
|
67
|
+
}
|
|
68
|
+
return contentRow;
|
|
69
|
+
};
|
|
70
|
+
Content.displayName = 'Content';
|
|
71
|
+
//# sourceMappingURL=Content.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,sBAAsB,EAAE,gCAA4B;AAG7D,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAC9C,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,GAAG,wBAAwB,CAAC,MAAM,EACnD,MAAM,EACN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cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACT,CAED;UAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,WAAW,CAAC,QAAQ,CACpB,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,GAAG,CAAC,CAAC,CAAC,CAAC,CAEP;cAAA,CAAC,cAAc,CACb,SAAS,CAAC,CAAC;oBACT,OAAO,EAAE,WAAW,CAAC,MAAM;oBAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;oBAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;oBAC5B,GAAG,UAAU;iBACd,CAAC,CAEF;gBAAA,CAAC,KAAK,CACR;cAAA,EAAE,cAAc,CAClB;YAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,SAAS,CAAC,CACb,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,IAAI,cAAc,EAAE;QAClB,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,UAAU,CACb;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import {\n ContentVerticalAlignment,\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport { VERTICAL_ALIGNMENT_MAP } from './Content.constants';\nimport type { ContentProps } from './Content.types';\n\nexport const Content: React.FC<ContentProps> = ({\n startAccessory,\n endAccessory,\n topAccessory,\n bottomAccessory,\n verticalAlignment = ContentVerticalAlignment.Center,\n avatar,\n twClassName,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n ...props\n}) => {\n const hasColumnShell = Boolean(topAccessory) || Boolean(bottomAccessory);\n\n const contentRow = (\n <BoxRow\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n gap={4}\n twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()}\n {...(hasColumnShell ? {} : props)}\n >\n {avatar}\n {/* Title and description Column */}\n <BoxColumn\n twClassName=\"flex-1 min-w-0\"\n bottomAccessory={\n description ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={descriptionStartAccessory}\n endAccessory={descriptionEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...descriptionProps,\n }}\n >\n {description}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {title ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n {/* Value and subvalue Column */}\n {value || subvalue ? (\n <BoxColumn\n twClassName=\"min-w-0\"\n bottomAccessory={\n subvalue ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={subvalueStartAccessory}\n endAccessory={subvalueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subvalueProps,\n }}\n >\n {subvalue}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {value ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...valueProps,\n }}\n >\n {value}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n ) : null}\n </BoxRow>\n );\n\n if (hasColumnShell) {\n return (\n <BoxColumn\n gap={1}\n topAccessory={topAccessory}\n bottomAccessory={bottomAccessory}\n twClassName={twClassName}\n {...props}\n >\n {contentRow}\n </BoxColumn>\n );\n }\n\n return contentRow;\n};\n\nContent.displayName = 'Content';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.types.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for list rows (`title`, `avatar`, accessories, etc.).\n */\nexport type ContentProps = Omit<BoxProps, 'children'> &\n ContentPropsShared & {\n /**\n * Optional props for the title Text when `title` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n titleProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the description Text when `description` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n descriptionProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the value Text when `value` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n valueProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the subvalue Text when `subvalue` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n subvalueProps?: Partial<Omit<TextProps, 'children'>>;\n };\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ContentPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { BoxProps } from "../Box/Box.types.cjs";
|
|
3
|
+
import type { TextProps } from "../Text/Text.types.cjs";
|
|
4
|
+
/**
|
|
5
|
+
* Content component props.
|
|
6
|
+
*
|
|
7
|
+
* Props-only layout for list rows (`title`, `avatar`, accessories, etc.).
|
|
8
|
+
*/
|
|
9
|
+
export type ContentProps = Omit<BoxProps, 'children'> & ContentPropsShared & {
|
|
10
|
+
/**
|
|
11
|
+
* Optional props for the title Text when `title` is a string.
|
|
12
|
+
* Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
|
|
13
|
+
*/
|
|
14
|
+
titleProps?: Partial<Omit<TextProps, 'children'>>;
|
|
15
|
+
/**
|
|
16
|
+
* Optional props for the description Text when `description` is a string.
|
|
17
|
+
* Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
|
|
18
|
+
*/
|
|
19
|
+
descriptionProps?: Partial<Omit<TextProps, 'children'>>;
|
|
20
|
+
/**
|
|
21
|
+
* Optional props for the value Text when `value` is a string.
|
|
22
|
+
* Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
|
|
23
|
+
*/
|
|
24
|
+
valueProps?: Partial<Omit<TextProps, 'children'>>;
|
|
25
|
+
/**
|
|
26
|
+
* Optional props for the subvalue Text when `subvalue` is a string.
|
|
27
|
+
* Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
|
|
28
|
+
*/
|
|
29
|
+
subvalueProps?: Partial<Omit<TextProps, 'children'>>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Content.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.types.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,uCAAuC;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GACnD,kBAAkB,GAAG;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACxD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ContentPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { BoxProps } from "../Box/Box.types.mjs";
|
|
3
|
+
import type { TextProps } from "../Text/Text.types.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Content component props.
|
|
6
|
+
*
|
|
7
|
+
* Props-only layout for list rows (`title`, `avatar`, accessories, etc.).
|
|
8
|
+
*/
|
|
9
|
+
export type ContentProps = Omit<BoxProps, 'children'> & ContentPropsShared & {
|
|
10
|
+
/**
|
|
11
|
+
* Optional props for the title Text when `title` is a string.
|
|
12
|
+
* Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
|
|
13
|
+
*/
|
|
14
|
+
titleProps?: Partial<Omit<TextProps, 'children'>>;
|
|
15
|
+
/**
|
|
16
|
+
* Optional props for the description Text when `description` is a string.
|
|
17
|
+
* Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
|
|
18
|
+
*/
|
|
19
|
+
descriptionProps?: Partial<Omit<TextProps, 'children'>>;
|
|
20
|
+
/**
|
|
21
|
+
* Optional props for the value Text when `value` is a string.
|
|
22
|
+
* Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
|
|
23
|
+
*/
|
|
24
|
+
valueProps?: Partial<Omit<TextProps, 'children'>>;
|
|
25
|
+
/**
|
|
26
|
+
* Optional props for the subvalue Text when `subvalue` is a string.
|
|
27
|
+
* Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
|
|
28
|
+
*/
|
|
29
|
+
subvalueProps?: Partial<Omit<TextProps, 'children'>>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Content.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.types.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,uCAAuC;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GACnD,kBAAkB,GAAG;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACxD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.types.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for list rows (`title`, `avatar`, accessories, etc.).\n */\nexport type ContentProps = Omit<BoxProps, 'children'> &\n ContentPropsShared & {\n /**\n * Optional props for the title Text when `title` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n titleProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the description Text when `description` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n descriptionProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the value Text when `value` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n valueProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the subvalue Text when `subvalue` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n subvalueProps?: Partial<Omit<TextProps, 'children'>>;\n };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Content = exports.ContentVerticalAlignment = void 0;
|
|
4
|
+
var design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "ContentVerticalAlignment", { enumerable: true, get: function () { return design_system_shared_1.ContentVerticalAlignment; } });
|
|
6
|
+
var Content_1 = require("./Content.cjs");
|
|
7
|
+
Object.defineProperty(exports, "Content", { enumerable: true, get: function () { return Content_1.Content; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":";;;AAAA,uEAA0E;AAAjE,gIAAA,wBAAwB,OAAA;AACjC,yCAAoC;AAA3B,kGAAA,OAAO,OAAA","sourcesContent":["export { ContentVerticalAlignment } from '@metamask/design-system-shared';\nexport { Content } from './Content';\nexport type { ContentProps } from './Content.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uCAAuC;AAC1E,OAAO,EAAE,OAAO,EAAE,sBAAkB;AACpC,YAAY,EAAE,YAAY,EAAE,4BAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uCAAuC;AAC1E,OAAO,EAAE,OAAO,EAAE,sBAAkB;AACpC,YAAY,EAAE,YAAY,EAAE,4BAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uCAAuC;AAC1E,OAAO,EAAE,OAAO,EAAE,sBAAkB","sourcesContent":["export { ContentVerticalAlignment } from '@metamask/design-system-shared';\nexport { Content } from './Content';\nexport type { ContentProps } from './Content.types';\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TWCLASSMAP_ICON_SIZE_DIMENSION = void 0;
|
|
4
|
-
const
|
|
4
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
5
|
exports.TWCLASSMAP_ICON_SIZE_DIMENSION = {
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
6
|
+
[design_system_shared_1.IconSize.Xs]: 'w-3 h-3',
|
|
7
|
+
[design_system_shared_1.IconSize.Sm]: 'w-4 h-4',
|
|
8
|
+
[design_system_shared_1.IconSize.Md]: 'w-5 h-5',
|
|
9
|
+
[design_system_shared_1.IconSize.Lg]: 'w-6 h-6',
|
|
10
|
+
[design_system_shared_1.IconSize.Xl]: 'w-8 h-8', // 32px
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Icon.constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.constants.cjs","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Icon.constants.cjs","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":";;;AAAA,yEAA0D;AAE7C,QAAA,8BAA8B,GAA6B;IACtE,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO;CAClC,CAAC","sourcesContent":["import { IconSize } from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_ICON_SIZE_DIMENSION: Record<IconSize, string> = {\n [IconSize.Xs]: 'w-3 h-3', // 12px\n [IconSize.Sm]: 'w-4 h-4', // 16px\n [IconSize.Md]: 'w-5 h-5', // 20px\n [IconSize.Lg]: 'w-6 h-6', // 24px\n [IconSize.Xl]: 'w-8 h-8', // 32px\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"Icon.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uCAAuC;AAE1D,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"Icon.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uCAAuC;AAE1D,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.constants.mjs","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"Icon.constants.mjs","sourceRoot":"","sources":["../../../src/components/Icon/Icon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uCAAuC;AAE1D,MAAM,CAAC,MAAM,8BAA8B,GAA6B;IACtE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS;IACxB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO;CAClC,CAAC","sourcesContent":["import { IconSize } from '@metamask/design-system-shared';\n\nexport const TWCLASSMAP_ICON_SIZE_DIMENSION: Record<IconSize, string> = {\n [IconSize.Xs]: 'w-3 h-3', // 12px\n [IconSize.Sm]: 'w-4 h-4', // 16px\n [IconSize.Md]: 'w-5 h-5', // 20px\n [IconSize.Lg]: 'w-6 h-6', // 24px\n [IconSize.Xl]: 'w-8 h-8', // 32px\n};\n"]}
|
|
@@ -15,7 +15,7 @@ exports.ICON_ALERT_SEVERITY_MAP = {
|
|
|
15
15
|
name: design_system_shared_1.IconName.Danger,
|
|
16
16
|
color: design_system_shared_1.IconColor.WarningDefault,
|
|
17
17
|
},
|
|
18
|
-
[design_system_shared_1.IconAlertSeverity.
|
|
18
|
+
[design_system_shared_1.IconAlertSeverity.Danger]: {
|
|
19
19
|
name: design_system_shared_1.IconName.Error,
|
|
20
20
|
color: design_system_shared_1.IconColor.ErrorDefault,
|
|
21
21
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":";;;AAAA,yEAIwC;AAE3B,QAAA,uBAAuB,GAGhC;IACF,CAAC,wCAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":";;;AAAA,yEAIwC;AAE3B,QAAA,uBAAuB,GAGhC;IACF,CAAC,wCAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,EAAE,+BAAQ,CAAC,KAAK;QACpB,KAAK,EAAE,gCAAS,CAAC,YAAY;KAC9B;CACF,CAAC","sourcesContent":["import {\n IconAlertSeverity,\n IconColor,\n IconName,\n} from '@metamask/design-system-shared';\n\nexport const ICON_ALERT_SEVERITY_MAP: Record<\n IconAlertSeverity,\n { name: IconName; color: IconColor }\n> = {\n [IconAlertSeverity.Info]: {\n name: IconName.Info,\n color: IconColor.PrimaryDefault,\n },\n [IconAlertSeverity.Success]: {\n name: IconName.Confirmation,\n color: IconColor.SuccessDefault,\n },\n [IconAlertSeverity.Warning]: {\n name: IconName.Danger,\n color: IconColor.WarningDefault,\n },\n [IconAlertSeverity.Danger]: {\n name: IconName.Error,\n color: IconColor.ErrorDefault,\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,uCAAuC;AAExC,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,uCAAuC;AAExC,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,EAAE,QAAQ,CAAC,KAAK;QACpB,KAAK,EAAE,SAAS,CAAC,YAAY;KAC9B;CACF,CAAC","sourcesContent":["import {\n IconAlertSeverity,\n IconColor,\n IconName,\n} from '@metamask/design-system-shared';\n\nexport const ICON_ALERT_SEVERITY_MAP: Record<\n IconAlertSeverity,\n { name: IconName; color: IconColor }\n> = {\n [IconAlertSeverity.Info]: {\n name: IconName.Info,\n color: IconColor.PrimaryDefault,\n },\n [IconAlertSeverity.Success]: {\n name: IconName.Confirmation,\n color: IconColor.SuccessDefault,\n },\n [IconAlertSeverity.Warning]: {\n name: IconName.Danger,\n color: IconColor.WarningDefault,\n },\n [IconAlertSeverity.Danger]: {\n name: IconName.Error,\n color: IconColor.ErrorDefault,\n },\n};\n"]}
|
|
@@ -6,15 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.KeyValueColumn = void 0;
|
|
7
7
|
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const types_1 = require("../../types/index.cjs");
|
|
10
9
|
const BoxColumn_1 = require("../BoxColumn/index.cjs");
|
|
11
10
|
const BoxRow_1 = require("../BoxRow/index.cjs");
|
|
12
11
|
const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
|
|
13
12
|
const KeyValueColumn = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps, keyLabel: keyContent, keyTextProps, valueStartAccessory, valueEndAccessory, valueEndButtonIconProps, value: valueContent, valueTextProps, twClassName, ...viewProps }) => {
|
|
14
13
|
const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
|
|
15
|
-
keyEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} iconProps={{ color:
|
|
14
|
+
keyEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} iconProps={{ color: design_system_shared_1.IconColor.IconAlternative }} {...keyEndButtonIconProps} iconName={keyEndButtonIconProps.iconName}/>) : (keyEndAccessory);
|
|
16
15
|
const valueEndAccessoryNode = valueEndButtonIconProps?.iconName !== undefined &&
|
|
17
|
-
valueEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} iconProps={{ color:
|
|
16
|
+
valueEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} iconProps={{ color: design_system_shared_1.IconColor.IconDefault }} {...valueEndButtonIconProps} iconName={valueEndButtonIconProps.iconName}/>) : (valueEndAccessory);
|
|
18
17
|
const keyBox = (<BoxRow_1.BoxRow startAccessory={keyStartAccessory} endAccessory={keyEndAccessoryNode} textProps={{
|
|
19
18
|
variant: design_system_shared_1.TextVariant.BodyMd,
|
|
20
19
|
fontWeight: design_system_shared_1.FontWeight.Medium,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueColumn.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"KeyValueColumn.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAMwC;AACxC,kDAA0B;AAE1B,sDAAyC;AACzC,gDAAmC;AACnC,wDAA2C;AAIpC,MAAM,cAAc,GAAG,CAAC,EAC7B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,EAAE,YAAY,EACnB,cAAc,EACd,WAAW,EACX,GAAG,SAAS,EACQ,EAAE,EAAE;IACxB,MAAM,mBAAmB,GACvB,qBAAqB,EAAE,QAAQ,KAAK,SAAS;QAC7C,qBAAqB,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,CACxC,CAAC,uBAAU,CACT,IAAI,CAA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C,MAAM;YAC3B,UAAU,EAAE,iCAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,gCAAS,CAAC,WAAW;YAC5B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,cAAc;SAClB,CAAC,CACF,WAAW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,qBAAS,CACR,eAAe,CAAC,CAAC,QAAQ,CAAC,CAC1B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,MAAM,CACT;IAAA,EAAE,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AArFW,QAAA,cAAc,kBAqFzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n IconColor,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueColumnProps } from './KeyValueColumn.types';\n\nexport const KeyValueColumn = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n twClassName,\n ...viewProps\n}: KeyValueColumnProps) => {\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconAlternative }}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconDefault }}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxColumn\n bottomAccessory={valueBox}\n twClassName={twClassName}\n {...viewProps}\n >\n {keyBox}\n </BoxColumn>\n );\n};\n\nKeyValueColumn.displayName = 'KeyValueColumn';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueColumn.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeyValueColumn.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc;yOAaxB,mBAAmB;;CAwErB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueColumn.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeyValueColumn.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc;yOAaxB,mBAAmB;;CAwErB,CAAC"}
|
|
@@ -4,10 +4,9 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { ButtonIconSize, FontWeight, TextColor, TextVariant } from "@metamask/design-system-shared";
|
|
7
|
+
import { ButtonIconSize, FontWeight, IconColor, TextColor, TextVariant } from "@metamask/design-system-shared";
|
|
8
8
|
import $React from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
|
-
import { IconColor } from "../../types/index.mjs";
|
|
11
10
|
import { BoxColumn } from "../BoxColumn/index.mjs";
|
|
12
11
|
import { BoxRow } from "../BoxRow/index.mjs";
|
|
13
12
|
import { ButtonIcon } from "../ButtonIcon/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueColumn.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,SAAS,EAAE
|
|
1
|
+
{"version":3,"file":"KeyValueColumn.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;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W,CAAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,SAAS,CAAC,eAAe;YAChC,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,YAAY;SAChB,CAAC,CACF,WAAW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,UAAU,CACb;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,MAAM,QAAQ,GAAG,CACf,CAAC,MAAM,CACL,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CACpC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,WAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;YAC5B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,cAAc;SAClB,CAAC,CACF,WAAW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,eAAe,CAAC,CAAC,QAAQ,CAAC,CAC1B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,MAAM,CACT;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n IconColor,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueColumnProps } from './KeyValueColumn.types';\n\nexport const KeyValueColumn = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n twClassName,\n ...viewProps\n}: KeyValueColumnProps) => {\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconAlternative }}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconDefault }}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxColumn\n bottomAccessory={valueBox}\n twClassName={twClassName}\n {...viewProps}\n >\n {keyBox}\n </BoxColumn>\n );\n};\n\nKeyValueColumn.displayName = 'KeyValueColumn';\n"]}
|
|
@@ -7,7 +7,6 @@ exports.KeyValueRow = void 0;
|
|
|
7
7
|
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
8
8
|
const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
|
|
9
9
|
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const types_1 = require("../../types/index.cjs");
|
|
11
10
|
const Box_1 = require("../Box/index.cjs");
|
|
12
11
|
const BoxRow_1 = require("../BoxRow/index.cjs");
|
|
13
12
|
const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
|
|
@@ -15,12 +14,12 @@ const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps
|
|
|
15
14
|
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
16
15
|
const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
|
|
17
16
|
keyEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} {...keyEndButtonIconProps} iconName={keyEndButtonIconProps.iconName} iconProps={{
|
|
18
|
-
color:
|
|
17
|
+
color: design_system_shared_1.IconColor.IconAlternative,
|
|
19
18
|
...keyEndButtonIconProps.iconProps,
|
|
20
19
|
}}/>) : (keyEndAccessory);
|
|
21
20
|
const valueEndAccessoryNode = valueEndButtonIconProps?.iconName !== undefined &&
|
|
22
21
|
valueEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} {...valueEndButtonIconProps} iconName={valueEndButtonIconProps.iconName} iconProps={{
|
|
23
|
-
color:
|
|
22
|
+
color: design_system_shared_1.IconColor.IconDefault,
|
|
24
23
|
...valueEndButtonIconProps.iconProps,
|
|
25
24
|
}}/>) : (valueEndAccessory);
|
|
26
25
|
const keyBox = (<BoxRow_1.BoxRow startAccessory={keyStartAccessory} endAccessory={keyEndAccessoryNode} textProps={{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueRow.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
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AAC,CACF,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,SAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,SAAG,CAC3C;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AArGW,QAAA,WAAW,eAqGtB;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n IconColor,\n KeyValueRowVariant,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxRow\n endAccessory={valueBox}\n gap={4}\n style={[\n tw.style(\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n </BoxRow>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueRow.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeyValueRow.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW;yPAerB,gBAAgB;;CAsFlB,CAAC"}
|