@metamask/design-system-react-native 0.19.0 → 0.20.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 +22 -3
- package/dist/components/BannerAlert/BannerAlert.constants.cjs +8 -8
- package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +1 -1
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs +2 -2
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/Box/Box.cjs +35 -12
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.constants.cjs.map +1 -1
- package/dist/components/Box/Box.constants.d.cts +1 -1
- package/dist/components/Box/Box.constants.d.cts.map +1 -1
- package/dist/components/Box/Box.constants.d.mts +1 -1
- package/dist/components/Box/Box.constants.d.mts.map +1 -1
- package/dist/components/Box/Box.constants.mjs.map +1 -1
- package/dist/components/Box/Box.d.cts +4 -2
- package/dist/components/Box/Box.d.cts.map +1 -1
- package/dist/components/Box/Box.d.mts +4 -2
- package/dist/components/Box/Box.d.mts.map +1 -1
- package/dist/components/Box/Box.mjs +13 -9
- package/dist/components/Box/Box.mjs.map +1 -1
- package/dist/components/Box/Box.types.cjs.map +1 -1
- package/dist/components/Box/Box.types.d.cts +3 -107
- package/dist/components/Box/Box.types.d.cts.map +1 -1
- package/dist/components/Box/Box.types.d.mts +3 -107
- package/dist/components/Box/Box.types.d.mts.map +1 -1
- package/dist/components/Box/Box.types.mjs.map +1 -1
- package/dist/components/Box/index.cjs +7 -7
- package/dist/components/Box/index.cjs.map +1 -1
- package/dist/components/Box/index.d.cts +1 -2
- package/dist/components/Box/index.d.cts.map +1 -1
- package/dist/components/Box/index.d.mts +1 -2
- package/dist/components/Box/index.d.mts.map +1 -1
- package/dist/components/Box/index.mjs +1 -1
- package/dist/components/Box/index.mjs.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.cjs +2 -2
- package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.mjs +1 -1
- package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.cjs +2 -2
- package/dist/components/BoxRow/BoxRow.cjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.d.cts.map +1 -1
- package/dist/components/BoxRow/BoxRow.d.mts.map +1 -1
- package/dist/components/BoxRow/BoxRow.mjs +1 -1
- package/dist/components/BoxRow/BoxRow.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +2 -3
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +2 -3
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
- package/dist/components/Icon/Icon.assets.cjs +282 -283
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +282 -283
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/Icon.types.cjs.map +1 -1
- package/dist/components/Icon/Icon.types.d.cts +2 -19
- package/dist/components/Icon/Icon.types.d.cts.map +1 -1
- package/dist/components/Icon/Icon.types.d.mts +2 -19
- package/dist/components/Icon/Icon.types.d.mts.map +1 -1
- package/dist/components/Icon/Icon.types.mjs.map +1 -1
- package/dist/components/Icon/assets/after-hours.svg +1 -1
- package/dist/components/Tag/Tag.cjs +45 -0
- package/dist/components/Tag/Tag.cjs.map +1 -0
- package/dist/components/Tag/Tag.constants.cjs +27 -0
- package/dist/components/Tag/Tag.constants.cjs.map +1 -0
- package/dist/components/Tag/Tag.constants.d.cts +6 -0
- package/dist/components/Tag/Tag.constants.d.cts.map +1 -0
- package/dist/components/Tag/Tag.constants.d.mts +6 -0
- package/dist/components/Tag/Tag.constants.d.mts.map +1 -0
- package/dist/components/Tag/Tag.constants.mjs +24 -0
- package/dist/components/Tag/Tag.constants.mjs.map +1 -0
- package/dist/components/Tag/Tag.d.cts +4 -0
- package/dist/components/Tag/Tag.d.cts.map +1 -0
- package/dist/components/Tag/Tag.d.mts +4 -0
- package/dist/components/Tag/Tag.d.mts.map +1 -0
- package/dist/components/Tag/Tag.mjs +45 -0
- package/dist/components/Tag/Tag.mjs.map +1 -0
- package/dist/components/Tag/Tag.types.cjs +3 -0
- package/dist/components/Tag/Tag.types.cjs.map +1 -0
- package/dist/components/Tag/Tag.types.d.cts +38 -0
- package/dist/components/Tag/Tag.types.d.cts.map +1 -0
- package/dist/components/Tag/Tag.types.d.mts +38 -0
- package/dist/components/Tag/Tag.types.d.mts.map +1 -0
- package/dist/components/Tag/Tag.types.mjs +2 -0
- package/dist/components/Tag/Tag.types.mjs.map +1 -0
- package/dist/components/Tag/index.cjs +8 -0
- package/dist/components/Tag/index.cjs.map +1 -0
- package/dist/components/Tag/index.d.cts +4 -0
- package/dist/components/Tag/index.d.cts.map +1 -0
- package/dist/components/Tag/index.d.mts +4 -0
- package/dist/components/Tag/index.d.mts.map +1 -0
- package/dist/components/Tag/index.mjs +3 -0
- package/dist/components/Tag/index.mjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.cjs +58 -0
- package/dist/components/TitleStandard/TitleStandard.cjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.d.cts +23 -0
- package/dist/components/TitleStandard/TitleStandard.d.cts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.d.mts +23 -0
- package/dist/components/TitleStandard/TitleStandard.d.mts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.mjs +58 -0
- package/dist/components/TitleStandard/TitleStandard.mjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.cjs +3 -0
- package/dist/components/TitleStandard/TitleStandard.types.cjs.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.cts +31 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.mts +31 -0
- package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -0
- package/dist/components/TitleStandard/TitleStandard.types.mjs +2 -0
- package/dist/components/TitleStandard/TitleStandard.types.mjs.map +1 -0
- package/dist/components/TitleStandard/index.cjs +6 -0
- package/dist/components/TitleStandard/index.cjs.map +1 -0
- package/dist/components/TitleStandard/index.d.cts +3 -0
- package/dist/components/TitleStandard/index.d.cts.map +1 -0
- package/dist/components/TitleStandard/index.d.mts +3 -0
- package/dist/components/TitleStandard/index.d.mts.map +1 -0
- package/dist/components/TitleStandard/index.mjs +2 -0
- package/dist/components/TitleStandard/index.mjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.cjs +85 -0
- package/dist/components/TitleSubpage/TitleSubpage.cjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.cts +30 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.cts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.mts +30 -0
- package/dist/components/TitleSubpage/TitleSubpage.d.mts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.mjs +85 -0
- package/dist/components/TitleSubpage/TitleSubpage.mjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.cjs +3 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.cjs.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +44 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +44 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.mjs +2 -0
- package/dist/components/TitleSubpage/TitleSubpage.types.mjs.map +1 -0
- package/dist/components/TitleSubpage/index.cjs +6 -0
- package/dist/components/TitleSubpage/index.cjs.map +1 -0
- package/dist/components/TitleSubpage/index.d.cts +3 -0
- package/dist/components/TitleSubpage/index.d.cts.map +1 -0
- package/dist/components/TitleSubpage/index.d.mts +3 -0
- package/dist/components/TitleSubpage/index.d.mts.map +1 -0
- package/dist/components/TitleSubpage/index.mjs +2 -0
- package/dist/components/TitleSubpage/index.mjs.map +1 -0
- package/dist/components/Toast/Toast.d.cts +1 -1
- package/dist/components/Toast/Toast.d.mts +1 -1
- package/dist/components/index.cjs +9 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +6 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +6 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +3 -0
- package/dist/components/index.mjs.map +1 -1
- package/dist/types/index.cjs +12 -532
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +4 -520
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +4 -520
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +4 -527
- package/dist/types/index.mjs.map +1 -1
- package/package.json +3 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TagPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { ViewProps, StyleProp, ViewStyle } from "react-native/index.js";
|
|
3
|
+
import type { IconName, IconProps } from "../Icon/index.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Tag component props (React Native platform-specific).
|
|
6
|
+
* Extends shared props from @metamask/design-system-shared with React Native specific platform concerns.
|
|
7
|
+
*/
|
|
8
|
+
export type TagProps = TagPropsShared & {
|
|
9
|
+
/**
|
|
10
|
+
* Optional prop to specify an icon to show at the start of the tag (`IconSize.Xs` unless overridden in `startIconProps`).
|
|
11
|
+
*/
|
|
12
|
+
startIconName?: IconName;
|
|
13
|
+
/**
|
|
14
|
+
* Optional prop to pass additional properties to the start icon. You may set `name` here instead of `startIconName`.
|
|
15
|
+
*/
|
|
16
|
+
startIconProps?: Partial<IconProps>;
|
|
17
|
+
/**
|
|
18
|
+
* Optional prop to specify an icon to show at the end of the tag (`IconSize.Xs` unless overridden in `endIconProps`).
|
|
19
|
+
*/
|
|
20
|
+
endIconName?: IconName;
|
|
21
|
+
/**
|
|
22
|
+
* Optional prop to pass additional properties to the end icon. You may set `name` here instead of `endIconName`.
|
|
23
|
+
*/
|
|
24
|
+
endIconProps?: Partial<IconProps>;
|
|
25
|
+
/**
|
|
26
|
+
* Additional Tailwind classes to be applied to the Tag container.
|
|
27
|
+
*/
|
|
28
|
+
twClassName?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Test identifier for selecting the component in tests.
|
|
31
|
+
*/
|
|
32
|
+
testID?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Optional container styles.
|
|
35
|
+
*/
|
|
36
|
+
style?: StyleProp<ViewStyle>;
|
|
37
|
+
} & Omit<ViewProps, 'children' | 'style'>;
|
|
38
|
+
//# sourceMappingURL=Tag.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.d.mts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,uCAAuC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEpE,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAEnD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.mjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TagPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { IconName, IconProps } from '../Icon';\n\n/**\n * Tag component props (React Native platform-specific).\n * Extends shared props from @metamask/design-system-shared with React Native specific platform concerns.\n */\nexport type TagProps = TagPropsShared & {\n /**\n * Optional prop to specify an icon to show at the start of the tag (`IconSize.Xs` unless overridden in `startIconProps`).\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon. You may set `name` here instead of `startIconName`.\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop to specify an icon to show at the end of the tag (`IconSize.Xs` unless overridden in `endIconProps`).\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon. You may set `name` here instead of `endIconName`.\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Additional Tailwind classes to be applied to the Tag container.\n */\n twClassName?: string;\n /**\n * Test identifier for selecting the component in tests.\n */\n testID?: string;\n /**\n * Optional container styles.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<ViewProps, 'children' | 'style'>;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagSeverity = exports.Tag = void 0;
|
|
4
|
+
var Tag_1 = require("./Tag.cjs");
|
|
5
|
+
Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return Tag_1.Tag; } });
|
|
6
|
+
var design_system_shared_1 = require("@metamask/design-system-shared");
|
|
7
|
+
Object.defineProperty(exports, "TagSeverity", { enumerable: true, get: function () { return design_system_shared_1.TagSeverity; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":";;;AAAA,iCAA4B;AAAnB,0FAAA,GAAG,OAAA;AACZ,uEAA6D;AAApD,mHAAA,WAAW,OAAA","sourcesContent":["export { Tag } from './Tag';\nexport { TagSeverity } from '@metamask/design-system-shared';\nexport type { TagProps } from './Tag.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,OAAO,EAAE,WAAW,EAAE,uCAAuC;AAC7D,YAAY,EAAE,QAAQ,EAAE,wBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,OAAO,EAAE,WAAW,EAAE,uCAAuC;AAC7D,YAAY,EAAE,QAAQ,EAAE,wBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,OAAO,EAAE,WAAW,EAAE,uCAAuC","sourcesContent":["export { Tag } from './Tag';\nexport { TagSeverity } from '@metamask/design-system-shared';\nexport type { TagProps } from './Tag.types';\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TitleStandard = void 0;
|
|
7
|
+
// Third party dependencies.
|
|
8
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
// Internal dependencies.
|
|
11
|
+
const Box_1 = require("../Box/index.cjs");
|
|
12
|
+
const BoxRow_1 = require("../BoxRow/index.cjs");
|
|
13
|
+
/**
|
|
14
|
+
* Displays a primary title with optional top, inline, and bottom rows in a left-aligned layout.
|
|
15
|
+
* Remaining `View` props are forwarded to the root `Box`.
|
|
16
|
+
*
|
|
17
|
+
* @param props - Component props
|
|
18
|
+
* @param props.title - Primary title content
|
|
19
|
+
* @param props.titleEndAccessory - Optional inline accessory to the right of the title
|
|
20
|
+
* @param props.topAccessory - Optional row above the title
|
|
21
|
+
* @param props.bottomAccessory - Optional custom bottom row when `bottomLabel` is not renderable
|
|
22
|
+
* @param props.bottomLabel - Optional secondary label below the title
|
|
23
|
+
* @param props.bottomLabelEndAccessory - Optional inline accessory to the right of the bottom label
|
|
24
|
+
* @param props.titleProps - Optional props merged into title `Text` when `title` is a string
|
|
25
|
+
* @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string
|
|
26
|
+
* @param props.titleWrapperProps - Optional props forwarded to the title row `BoxRow`
|
|
27
|
+
* @param props.bottomLabelWrapperProps - Optional props forwarded to the bottom label row `BoxRow`
|
|
28
|
+
* @param props.twClassName - Optional Tailwind classes on the root container
|
|
29
|
+
*
|
|
30
|
+
* @returns The rendered TitleStandard layout.
|
|
31
|
+
*/
|
|
32
|
+
const TitleStandard = ({ title, titleEndAccessory, topAccessory, bottomAccessory, bottomLabel, bottomLabelEndAccessory, titleProps, titleWrapperProps, bottomLabelProps, bottomLabelWrapperProps, twClassName = '', ...props }) => {
|
|
33
|
+
return (<Box_1.Box twClassName={twClassName} gap={1} {...props}>
|
|
34
|
+
{/* Top Accessory Slot */}
|
|
35
|
+
{topAccessory}
|
|
36
|
+
{/* Title Row */}
|
|
37
|
+
<BoxRow_1.BoxRow gap={2} {...titleWrapperProps} endAccessory={titleEndAccessory} textProps={{
|
|
38
|
+
variant: design_system_shared_1.TextVariant.HeadingLg,
|
|
39
|
+
...titleProps,
|
|
40
|
+
}}>
|
|
41
|
+
{title}
|
|
42
|
+
</BoxRow_1.BoxRow>
|
|
43
|
+
{/* Bottom Label Row */}
|
|
44
|
+
{bottomLabel && (<BoxRow_1.BoxRow gap={2} {...bottomLabelWrapperProps} endAccessory={bottomLabelEndAccessory} textProps={{
|
|
45
|
+
variant: design_system_shared_1.TextVariant.BodySm,
|
|
46
|
+
fontWeight: design_system_shared_1.FontWeight.Medium,
|
|
47
|
+
color: design_system_shared_1.TextColor.TextAlternative,
|
|
48
|
+
...bottomLabelProps,
|
|
49
|
+
}}>
|
|
50
|
+
{bottomLabel}
|
|
51
|
+
</BoxRow_1.BoxRow>)}
|
|
52
|
+
{/* Bottom Accessory Slot */}
|
|
53
|
+
{!bottomLabel && bottomAccessory}
|
|
54
|
+
</Box_1.Box>);
|
|
55
|
+
};
|
|
56
|
+
exports.TitleStandard = TitleStandard;
|
|
57
|
+
exports.TitleStandard.displayName = 'TitleStandard';
|
|
58
|
+
//# sourceMappingURL=TitleStandard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.cjs","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,yEAIwC;AACxC,kDAA0B;AAE1B,yBAAyB;AACzB,0CAA6B;AAC7B,gDAAmC;AAInC;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAG,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAC/C;MAAA,CAAC,wBAAwB,CACzB;MAAA,CAAC,YAAY,CACb;MAAA,CAAC,eAAe,CAChB;MAAA,CAAC,eAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,IAAI,iBAAiB,CAAC,CACtB,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,kCAAW,CAAC,SAAS;YAC9B,GAAG,UAAU;SACd,CAAC,CAEF;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,eAAM,CACR;MAAA,CAAC,sBAAsB,CACvB;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,eAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,IAAI,uBAAuB,CAAC,CAC5B,YAAY,CAAC,CAAC,uBAAuB,CAAC,CACtC,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,MAAM;gBAC3B,UAAU,EAAE,iCAAU,CAAC,MAAM;gBAC7B,KAAK,EAAE,gCAAS,CAAC,eAAe;gBAChC,GAAG,gBAAgB;aACpB,CAAC,CAEF;UAAA,CAAC,WAAW,CACd;QAAA,EAAE,eAAM,CAAC,CACV,CACD;MAAA,CAAC,2BAA2B,CAC5B;MAAA,CAAC,CAAC,WAAW,IAAI,eAAe,CAClC;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAlDW,QAAA,aAAa,iBAkDxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\n// Internal dependencies.\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\n\nimport type { TitleStandardProps } from './TitleStandard.types';\n\n/**\n * Displays a primary title with optional top, inline, and bottom rows in a left-aligned layout.\n * Remaining `View` props are forwarded to the root `Box`.\n *\n * @param props - Component props\n * @param props.title - Primary title content\n * @param props.titleEndAccessory - Optional inline accessory to the right of the title\n * @param props.topAccessory - Optional row above the title\n * @param props.bottomAccessory - Optional custom bottom row when `bottomLabel` is not renderable\n * @param props.bottomLabel - Optional secondary label below the title\n * @param props.bottomLabelEndAccessory - Optional inline accessory to the right of the bottom label\n * @param props.titleProps - Optional props merged into title `Text` when `title` is a string\n * @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string\n * @param props.titleWrapperProps - Optional props forwarded to the title row `BoxRow`\n * @param props.bottomLabelWrapperProps - Optional props forwarded to the bottom label row `BoxRow`\n * @param props.twClassName - Optional Tailwind classes on the root container\n *\n * @returns The rendered TitleStandard layout.\n */\nexport const TitleStandard: React.FC<TitleStandardProps> = ({\n title,\n titleEndAccessory,\n topAccessory,\n bottomAccessory,\n bottomLabel,\n bottomLabelEndAccessory,\n titleProps,\n titleWrapperProps,\n bottomLabelProps,\n bottomLabelWrapperProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <Box twClassName={twClassName} gap={1} {...props}>\n {/* Top Accessory Slot */}\n {topAccessory}\n {/* Title Row */}\n <BoxRow\n gap={2}\n {...titleWrapperProps}\n endAccessory={titleEndAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n {/* Bottom Label Row */}\n {bottomLabel && (\n <BoxRow\n gap={2}\n {...bottomLabelWrapperProps}\n endAccessory={bottomLabelEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...bottomLabelProps,\n }}\n >\n {bottomLabel}\n </BoxRow>\n )}\n {/* Bottom Accessory Slot */}\n {!bottomLabel && bottomAccessory}\n </Box>\n );\n};\n\nTitleStandard.displayName = 'TitleStandard';\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TitleStandardProps } from "./TitleStandard.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* Displays a primary title with optional top, inline, and bottom rows in a left-aligned layout.
|
|
5
|
+
* Remaining `View` props are forwarded to the root `Box`.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Component props
|
|
8
|
+
* @param props.title - Primary title content
|
|
9
|
+
* @param props.titleEndAccessory - Optional inline accessory to the right of the title
|
|
10
|
+
* @param props.topAccessory - Optional row above the title
|
|
11
|
+
* @param props.bottomAccessory - Optional custom bottom row when `bottomLabel` is not renderable
|
|
12
|
+
* @param props.bottomLabel - Optional secondary label below the title
|
|
13
|
+
* @param props.bottomLabelEndAccessory - Optional inline accessory to the right of the bottom label
|
|
14
|
+
* @param props.titleProps - Optional props merged into title `Text` when `title` is a string
|
|
15
|
+
* @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string
|
|
16
|
+
* @param props.titleWrapperProps - Optional props forwarded to the title row `BoxRow`
|
|
17
|
+
* @param props.bottomLabelWrapperProps - Optional props forwarded to the bottom label row `BoxRow`
|
|
18
|
+
* @param props.twClassName - Optional Tailwind classes on the root container
|
|
19
|
+
*
|
|
20
|
+
* @returns The rendered TitleStandard layout.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TitleStandard: React.FC<TitleStandardProps>;
|
|
23
|
+
//# sourceMappingURL=TitleStandard.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.d.cts","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkDtD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TitleStandardProps } from "./TitleStandard.types.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Displays a primary title with optional top, inline, and bottom rows in a left-aligned layout.
|
|
5
|
+
* Remaining `View` props are forwarded to the root `Box`.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Component props
|
|
8
|
+
* @param props.title - Primary title content
|
|
9
|
+
* @param props.titleEndAccessory - Optional inline accessory to the right of the title
|
|
10
|
+
* @param props.topAccessory - Optional row above the title
|
|
11
|
+
* @param props.bottomAccessory - Optional custom bottom row when `bottomLabel` is not renderable
|
|
12
|
+
* @param props.bottomLabel - Optional secondary label below the title
|
|
13
|
+
* @param props.bottomLabelEndAccessory - Optional inline accessory to the right of the bottom label
|
|
14
|
+
* @param props.titleProps - Optional props merged into title `Text` when `title` is a string
|
|
15
|
+
* @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string
|
|
16
|
+
* @param props.titleWrapperProps - Optional props forwarded to the title row `BoxRow`
|
|
17
|
+
* @param props.bottomLabelWrapperProps - Optional props forwarded to the bottom label row `BoxRow`
|
|
18
|
+
* @param props.twClassName - Optional Tailwind classes on the root container
|
|
19
|
+
*
|
|
20
|
+
* @returns The rendered TitleStandard layout.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TitleStandard: React.FC<TitleStandardProps>;
|
|
23
|
+
//# sourceMappingURL=TitleStandard.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.d.mts","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkDtD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
// Third party dependencies.
|
|
8
|
+
import { FontWeight, TextColor, TextVariant } from "@metamask/design-system-shared";
|
|
9
|
+
import $React from "react";
|
|
10
|
+
const React = $importDefault($React);
|
|
11
|
+
// Internal dependencies.
|
|
12
|
+
import { Box } from "../Box/index.mjs";
|
|
13
|
+
import { BoxRow } from "../BoxRow/index.mjs";
|
|
14
|
+
/**
|
|
15
|
+
* Displays a primary title with optional top, inline, and bottom rows in a left-aligned layout.
|
|
16
|
+
* Remaining `View` props are forwarded to the root `Box`.
|
|
17
|
+
*
|
|
18
|
+
* @param props - Component props
|
|
19
|
+
* @param props.title - Primary title content
|
|
20
|
+
* @param props.titleEndAccessory - Optional inline accessory to the right of the title
|
|
21
|
+
* @param props.topAccessory - Optional row above the title
|
|
22
|
+
* @param props.bottomAccessory - Optional custom bottom row when `bottomLabel` is not renderable
|
|
23
|
+
* @param props.bottomLabel - Optional secondary label below the title
|
|
24
|
+
* @param props.bottomLabelEndAccessory - Optional inline accessory to the right of the bottom label
|
|
25
|
+
* @param props.titleProps - Optional props merged into title `Text` when `title` is a string
|
|
26
|
+
* @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string
|
|
27
|
+
* @param props.titleWrapperProps - Optional props forwarded to the title row `BoxRow`
|
|
28
|
+
* @param props.bottomLabelWrapperProps - Optional props forwarded to the bottom label row `BoxRow`
|
|
29
|
+
* @param props.twClassName - Optional Tailwind classes on the root container
|
|
30
|
+
*
|
|
31
|
+
* @returns The rendered TitleStandard layout.
|
|
32
|
+
*/
|
|
33
|
+
export const TitleStandard = ({ title, titleEndAccessory, topAccessory, bottomAccessory, bottomLabel, bottomLabelEndAccessory, titleProps, titleWrapperProps, bottomLabelProps, bottomLabelWrapperProps, twClassName = '', ...props }) => {
|
|
34
|
+
return (<Box twClassName={twClassName} gap={1} {...props}>
|
|
35
|
+
{/* Top Accessory Slot */}
|
|
36
|
+
{topAccessory}
|
|
37
|
+
{/* Title Row */}
|
|
38
|
+
<BoxRow gap={2} {...titleWrapperProps} endAccessory={titleEndAccessory} textProps={{
|
|
39
|
+
variant: TextVariant.HeadingLg,
|
|
40
|
+
...titleProps,
|
|
41
|
+
}}>
|
|
42
|
+
{title}
|
|
43
|
+
</BoxRow>
|
|
44
|
+
{/* Bottom Label Row */}
|
|
45
|
+
{bottomLabel && (<BoxRow gap={2} {...bottomLabelWrapperProps} endAccessory={bottomLabelEndAccessory} textProps={{
|
|
46
|
+
variant: TextVariant.BodySm,
|
|
47
|
+
fontWeight: FontWeight.Medium,
|
|
48
|
+
color: TextColor.TextAlternative,
|
|
49
|
+
...bottomLabelProps,
|
|
50
|
+
}}>
|
|
51
|
+
{bottomLabel}
|
|
52
|
+
</BoxRow>)}
|
|
53
|
+
{/* Bottom Accessory Slot */}
|
|
54
|
+
{!bottomLabel && bottomAccessory}
|
|
55
|
+
</Box>);
|
|
56
|
+
};
|
|
57
|
+
TitleStandard.displayName = 'TitleStandard';
|
|
58
|
+
//# sourceMappingURL=TitleStandard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.mjs","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AAInC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAC/C;MAAA,CAAC,wBAAwB,CACzB;MAAA,CAAC,YAAY,CACb;MAAA,CAAC,eAAe,CAChB;MAAA,CAAC,MAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,IAAI,iBAAiB,CAAC,CACtB,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,WAAW,CAAC,SAAS;YAC9B,GAAG,UAAU;SACd,CAAC,CAEF;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,MAAM,CACR;MAAA,CAAC,sBAAsB,CACvB;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,MAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,IAAI,uBAAuB,CAAC,CAC5B,YAAY,CAAC,CAAC,uBAAuB,CAAC,CACtC,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,MAAM;gBAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;gBAC7B,KAAK,EAAE,SAAS,CAAC,eAAe;gBAChC,GAAG,gBAAgB;aACpB,CAAC,CAEF;UAAA,CAAC,WAAW,CACd;QAAA,EAAE,MAAM,CAAC,CACV,CACD;MAAA,CAAC,2BAA2B,CAC5B;MAAA,CAAC,CAAC,WAAW,IAAI,eAAe,CAClC;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\n// Internal dependencies.\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\n\nimport type { TitleStandardProps } from './TitleStandard.types';\n\n/**\n * Displays a primary title with optional top, inline, and bottom rows in a left-aligned layout.\n * Remaining `View` props are forwarded to the root `Box`.\n *\n * @param props - Component props\n * @param props.title - Primary title content\n * @param props.titleEndAccessory - Optional inline accessory to the right of the title\n * @param props.topAccessory - Optional row above the title\n * @param props.bottomAccessory - Optional custom bottom row when `bottomLabel` is not renderable\n * @param props.bottomLabel - Optional secondary label below the title\n * @param props.bottomLabelEndAccessory - Optional inline accessory to the right of the bottom label\n * @param props.titleProps - Optional props merged into title `Text` when `title` is a string\n * @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string\n * @param props.titleWrapperProps - Optional props forwarded to the title row `BoxRow`\n * @param props.bottomLabelWrapperProps - Optional props forwarded to the bottom label row `BoxRow`\n * @param props.twClassName - Optional Tailwind classes on the root container\n *\n * @returns The rendered TitleStandard layout.\n */\nexport const TitleStandard: React.FC<TitleStandardProps> = ({\n title,\n titleEndAccessory,\n topAccessory,\n bottomAccessory,\n bottomLabel,\n bottomLabelEndAccessory,\n titleProps,\n titleWrapperProps,\n bottomLabelProps,\n bottomLabelWrapperProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <Box twClassName={twClassName} gap={1} {...props}>\n {/* Top Accessory Slot */}\n {topAccessory}\n {/* Title Row */}\n <BoxRow\n gap={2}\n {...titleWrapperProps}\n endAccessory={titleEndAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n {/* Bottom Label Row */}\n {bottomLabel && (\n <BoxRow\n gap={2}\n {...bottomLabelWrapperProps}\n endAccessory={bottomLabelEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...bottomLabelProps,\n }}\n >\n {bottomLabel}\n </BoxRow>\n )}\n {/* Bottom Accessory Slot */}\n {!bottomLabel && bottomAccessory}\n </Box>\n );\n};\n\nTitleStandard.displayName = 'TitleStandard';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.types.cjs","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleStandardPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleStandard component props (React Native).\n * Extends {@link TitleStandardPropsShared} (requires `title`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleStandardProps = TitleStandardPropsShared & {\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props forwarded to the title row {@link BoxRow} (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'textProps' | 'endAccessory'\n >;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props forwarded to the bottom label row {@link BoxRow} when `bottomLabel` is renderable (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).\n */\n bottomLabelWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'textProps' | 'endAccessory'\n >;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TitleStandardPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { ViewProps } from "react-native/index.js";
|
|
3
|
+
import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
|
|
4
|
+
import type { TextProps } from "../Text/Text.types.cjs";
|
|
5
|
+
/**
|
|
6
|
+
* TitleStandard component props (React Native).
|
|
7
|
+
* Extends {@link TitleStandardPropsShared} (requires `title`) with platform `Text` passthroughs, `twClassName`, and `View` props.
|
|
8
|
+
*/
|
|
9
|
+
export type TitleStandardProps = TitleStandardPropsShared & {
|
|
10
|
+
/**
|
|
11
|
+
* Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
|
|
12
|
+
*/
|
|
13
|
+
titleProps?: Omit<Partial<TextProps>, 'children'>;
|
|
14
|
+
/**
|
|
15
|
+
* Optional props forwarded to the title row {@link BoxRow} (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).
|
|
16
|
+
*/
|
|
17
|
+
titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps' | 'endAccessory'>;
|
|
18
|
+
/**
|
|
19
|
+
* Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.
|
|
20
|
+
*/
|
|
21
|
+
bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;
|
|
22
|
+
/**
|
|
23
|
+
* Optional props forwarded to the bottom label row {@link BoxRow} when `bottomLabel` is renderable (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).
|
|
24
|
+
*/
|
|
25
|
+
bottomLabelWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps' | 'endAccessory'>;
|
|
26
|
+
/**
|
|
27
|
+
* Optional Tailwind class name to apply to the container.
|
|
28
|
+
*/
|
|
29
|
+
twClassName?: string;
|
|
30
|
+
} & Omit<ViewProps, 'children'>;
|
|
31
|
+
//# sourceMappingURL=TitleStandard.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.types.d.cts","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAuC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CACtB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,WAAW,GAAG,cAAc,CAC1C,CAAC;IACF;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,uBAAuB,CAAC,EAAE,IAAI,CAC5B,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,WAAW,GAAG,cAAc,CAC1C,CAAC;IACF;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TitleStandardPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { ViewProps } from "react-native/index.js";
|
|
3
|
+
import type { BoxRowProps } from "../BoxRow/BoxRow.types.mjs";
|
|
4
|
+
import type { TextProps } from "../Text/Text.types.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* TitleStandard component props (React Native).
|
|
7
|
+
* Extends {@link TitleStandardPropsShared} (requires `title`) with platform `Text` passthroughs, `twClassName`, and `View` props.
|
|
8
|
+
*/
|
|
9
|
+
export type TitleStandardProps = TitleStandardPropsShared & {
|
|
10
|
+
/**
|
|
11
|
+
* Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
|
|
12
|
+
*/
|
|
13
|
+
titleProps?: Omit<Partial<TextProps>, 'children'>;
|
|
14
|
+
/**
|
|
15
|
+
* Optional props forwarded to the title row {@link BoxRow} (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).
|
|
16
|
+
*/
|
|
17
|
+
titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps' | 'endAccessory'>;
|
|
18
|
+
/**
|
|
19
|
+
* Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.
|
|
20
|
+
*/
|
|
21
|
+
bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;
|
|
22
|
+
/**
|
|
23
|
+
* Optional props forwarded to the bottom label row {@link BoxRow} when `bottomLabel` is renderable (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).
|
|
24
|
+
*/
|
|
25
|
+
bottomLabelWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps' | 'endAccessory'>;
|
|
26
|
+
/**
|
|
27
|
+
* Optional Tailwind class name to apply to the container.
|
|
28
|
+
*/
|
|
29
|
+
twClassName?: string;
|
|
30
|
+
} & Omit<ViewProps, 'children'>;
|
|
31
|
+
//# sourceMappingURL=TitleStandard.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.types.d.mts","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAuC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CACtB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,WAAW,GAAG,cAAc,CAC1C,CAAC;IACF;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,uBAAuB,CAAC,EAAE,IAAI,CAC5B,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,WAAW,GAAG,cAAc,CAC1C,CAAC;IACF;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleStandard.types.mjs","sourceRoot":"","sources":["../../../src/components/TitleStandard/TitleStandard.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleStandardPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleStandard component props (React Native).\n * Extends {@link TitleStandardPropsShared} (requires `title`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleStandardProps = TitleStandardPropsShared & {\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props forwarded to the title row {@link BoxRow} (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'textProps' | 'endAccessory'\n >;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props forwarded to the bottom label row {@link BoxRow} when `bottomLabel` is renderable (excluding `children`, `textProps`, and `endAccessory`, which are controlled by this component).\n */\n bottomLabelWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'textProps' | 'endAccessory'\n >;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TitleStandard = void 0;
|
|
4
|
+
var TitleStandard_1 = require("./TitleStandard.cjs");
|
|
5
|
+
Object.defineProperty(exports, "TitleStandard", { enumerable: true, get: function () { return TitleStandard_1.TitleStandard; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/TitleStandard/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAAvC,8GAAA,aAAa,OAAA","sourcesContent":["export { TitleStandard } from './TitleStandard';\nexport type { TitleStandardProps } from './TitleStandard.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/TitleStandard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/TitleStandard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/TitleStandard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB","sourcesContent":["export { TitleStandard } from './TitleStandard';\nexport type { TitleStandardProps } from './TitleStandard.types';\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TitleSubpage = void 0;
|
|
7
|
+
// Third party dependencies.
|
|
8
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
// Internal dependencies.
|
|
11
|
+
const Box_1 = require("../Box/index.cjs");
|
|
12
|
+
const BoxRow_1 = require("../BoxRow/index.cjs");
|
|
13
|
+
/**
|
|
14
|
+
* Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.
|
|
15
|
+
* Remaining `View` props are forwarded to the root `Box`.
|
|
16
|
+
*
|
|
17
|
+
* @param props - Component props
|
|
18
|
+
* @param props.title - Title row content (required)
|
|
19
|
+
* @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)
|
|
20
|
+
* @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)
|
|
21
|
+
* @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)
|
|
22
|
+
* @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)
|
|
23
|
+
* @param props.titleEndAccessory - Optional inline accessory to the right of `title`
|
|
24
|
+
* @param props.subtitle - Optional subtitle row below the title and above the amount
|
|
25
|
+
* @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`
|
|
26
|
+
* @param props.amount - Optional primary amount below the title
|
|
27
|
+
* @param props.amountEndAccessory - Optional inline accessory to the right of the amount
|
|
28
|
+
* @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown
|
|
29
|
+
* @param props.bottomLabel - Optional secondary label below the amount row
|
|
30
|
+
* @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`
|
|
31
|
+
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
32
|
+
* @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string
|
|
33
|
+
* @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string
|
|
34
|
+
* @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string
|
|
35
|
+
* @param props.twClassName - Optional Tailwind classes on the root container
|
|
36
|
+
*
|
|
37
|
+
* @returns The rendered TitleSubpage layout.
|
|
38
|
+
*/
|
|
39
|
+
const TitleSubpage = ({ amount, amountEndAccessory, title, titleAvatar, titleEndAccessory, subtitle, subtitleEndAccessory, bottomAccessory, bottomLabel, bottomLabelEndAccessory, amountProps, titleProps, subtitleProps, bottomLabelProps, identityRowProps, titleColumnProps, bottomLabelWrapperProps, twClassName = '', ...props }) => {
|
|
40
|
+
return (<Box_1.Box twClassName={twClassName} gap={1} {...props}>
|
|
41
|
+
{/* Identity Row */}
|
|
42
|
+
<BoxRow_1.BoxRow gap={4} twClassName="h-14" {...identityRowProps} startAccessory={titleAvatar}>
|
|
43
|
+
{/* Title and Subtitle Column */}
|
|
44
|
+
<Box_1.Box {...titleColumnProps}>
|
|
45
|
+
{/* Title Row */}
|
|
46
|
+
{title && (<BoxRow_1.BoxRow endAccessory={titleEndAccessory} textProps={{
|
|
47
|
+
variant: design_system_shared_1.TextVariant.HeadingSm,
|
|
48
|
+
color: design_system_shared_1.TextColor.TextDefault,
|
|
49
|
+
...titleProps,
|
|
50
|
+
}}>
|
|
51
|
+
{title}
|
|
52
|
+
</BoxRow_1.BoxRow>)}
|
|
53
|
+
{/* Subtitle Row */}
|
|
54
|
+
{subtitle && (<BoxRow_1.BoxRow endAccessory={subtitleEndAccessory} textProps={{
|
|
55
|
+
variant: design_system_shared_1.TextVariant.BodySm,
|
|
56
|
+
fontWeight: design_system_shared_1.FontWeight.Medium,
|
|
57
|
+
color: design_system_shared_1.TextColor.TextAlternative,
|
|
58
|
+
...subtitleProps,
|
|
59
|
+
}}>
|
|
60
|
+
{subtitle}
|
|
61
|
+
</BoxRow_1.BoxRow>)}
|
|
62
|
+
</Box_1.Box>
|
|
63
|
+
</BoxRow_1.BoxRow>
|
|
64
|
+
{/* Amount Row */}
|
|
65
|
+
{amount && (<BoxRow_1.BoxRow endAccessory={amountEndAccessory} textProps={{
|
|
66
|
+
variant: design_system_shared_1.TextVariant.DisplayLg,
|
|
67
|
+
...amountProps,
|
|
68
|
+
}}>
|
|
69
|
+
{amount}
|
|
70
|
+
</BoxRow_1.BoxRow>)}
|
|
71
|
+
{/* Bottom Label Row */}
|
|
72
|
+
{bottomLabel && (<BoxRow_1.BoxRow {...bottomLabelWrapperProps} endAccessory={bottomLabelEndAccessory} textProps={{
|
|
73
|
+
variant: design_system_shared_1.TextVariant.BodySm,
|
|
74
|
+
fontWeight: design_system_shared_1.FontWeight.Medium,
|
|
75
|
+
color: design_system_shared_1.TextColor.TextAlternative,
|
|
76
|
+
...bottomLabelProps,
|
|
77
|
+
}}>
|
|
78
|
+
{bottomLabel}
|
|
79
|
+
</BoxRow_1.BoxRow>)}
|
|
80
|
+
{!bottomLabel && bottomAccessory}
|
|
81
|
+
</Box_1.Box>);
|
|
82
|
+
};
|
|
83
|
+
exports.TitleSubpage = TitleSubpage;
|
|
84
|
+
exports.TitleSubpage.displayName = 'TitleSubpage';
|
|
85
|
+
//# sourceMappingURL=TitleSubpage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleSubpage.cjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,yEAIwC;AACxC,kDAA0B;AAE1B,yBAAyB;AACzB,0CAA6B;AAC7B,gDAAmC;AAInC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,MAAM,YAAY,GAAgC,CAAC,EACxD,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAG,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAC/C;MAAA,CAAC,kBAAkB,CACnB;MAAA,CAAC,eAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,MAAM,CAClB,IAAI,gBAAgB,CAAC,CACrB,cAAc,CAAC,CAAC,WAAW,CAAC,CAE5B;QAAA,CAAC,+BAA+B,CAChC;QAAA,CAAC,SAAG,CAAC,IAAI,gBAAgB,CAAC,CACxB;UAAA,CAAC,eAAe,CAChB;UAAA,CAAC,KAAK,IAAI,CACR,CAAC,eAAM,CACL,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;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,eAAM,CAAC,CACV,CACD;UAAA,CAAC,kBAAkB,CACnB;UAAA,CAAC,QAAQ,IAAI,CACX,CAAC,eAAM,CACL,YAAY,CAAC,CAAC,oBAAoB,CAAC,CACnC,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,MAAM;gBAC3B,UAAU,EAAE,iCAAU,CAAC,MAAM;gBAC7B,KAAK,EAAE,gCAAS,CAAC,eAAe;gBAChC,GAAG,aAAa;aACjB,CAAC,CAEF;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,eAAM,CAAC,CACV,CACH;QAAA,EAAE,SAAG,CACP;MAAA,EAAE,eAAM,CACR;MAAA,CAAC,gBAAgB,CACjB;MAAA,CAAC,MAAM,IAAI,CACT,CAAC,eAAM,CACL,YAAY,CAAC,CAAC,kBAAkB,CAAC,CACjC,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,SAAS;gBAC9B,GAAG,WAAW;aACf,CAAC,CAEF;UAAA,CAAC,MAAM,CACT;QAAA,EAAE,eAAM,CAAC,CACV,CACD;MAAA,CAAC,sBAAsB,CACvB;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,eAAM,CACL,IAAI,uBAAuB,CAAC,CAC5B,YAAY,CAAC,CAAC,uBAAuB,CAAC,CACtC,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,MAAM;gBAC3B,UAAU,EAAE,iCAAU,CAAC,MAAM;gBAC7B,KAAK,EAAE,gCAAS,CAAC,eAAe;gBAChC,GAAG,gBAAgB;aACpB,CAAC,CAEF;UAAA,CAAC,WAAW,CACd;QAAA,EAAE,eAAM,CAAC,CACV,CACD;MAAA,CAAC,CAAC,WAAW,IAAI,eAAe,CAClC;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AA3FW,QAAA,YAAY,gBA2FvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\n// Internal dependencies.\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\n\nimport type { TitleSubpageProps } from './TitleSubpage.types';\n\n/**\n * Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.\n * Remaining `View` props are forwarded to the root `Box`.\n *\n * @param props - Component props\n * @param props.title - Title row content (required)\n * @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)\n * @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)\n * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)\n * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)\n * @param props.titleEndAccessory - Optional inline accessory to the right of `title`\n * @param props.subtitle - Optional subtitle row below the title and above the amount\n * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`\n * @param props.amount - Optional primary amount below the title\n * @param props.amountEndAccessory - Optional inline accessory to the right of the amount\n * @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown\n * @param props.bottomLabel - Optional secondary label below the amount row\n * @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string\n * @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string\n * @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string\n * @param props.twClassName - Optional Tailwind classes on the root container\n *\n * @returns The rendered TitleSubpage layout.\n */\nexport const TitleSubpage: React.FC<TitleSubpageProps> = ({\n amount,\n amountEndAccessory,\n title,\n titleAvatar,\n titleEndAccessory,\n subtitle,\n subtitleEndAccessory,\n bottomAccessory,\n bottomLabel,\n bottomLabelEndAccessory,\n amountProps,\n titleProps,\n subtitleProps,\n bottomLabelProps,\n identityRowProps,\n titleColumnProps,\n bottomLabelWrapperProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <Box twClassName={twClassName} gap={1} {...props}>\n {/* Identity Row */}\n <BoxRow\n gap={4}\n twClassName=\"h-14\"\n {...identityRowProps}\n startAccessory={titleAvatar}\n >\n {/* Title and Subtitle Column */}\n <Box {...titleColumnProps}>\n {/* Title Row */}\n {title && (\n <BoxRow\n endAccessory={titleEndAccessory}\n textProps={{\n variant: TextVariant.HeadingSm,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n )}\n {/* Subtitle Row */}\n {subtitle && (\n <BoxRow\n endAccessory={subtitleEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subtitleProps,\n }}\n >\n {subtitle}\n </BoxRow>\n )}\n </Box>\n </BoxRow>\n {/* Amount Row */}\n {amount && (\n <BoxRow\n endAccessory={amountEndAccessory}\n textProps={{\n variant: TextVariant.DisplayLg,\n ...amountProps,\n }}\n >\n {amount}\n </BoxRow>\n )}\n {/* Bottom Label Row */}\n {bottomLabel && (\n <BoxRow\n {...bottomLabelWrapperProps}\n endAccessory={bottomLabelEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...bottomLabelProps,\n }}\n >\n {bottomLabel}\n </BoxRow>\n )}\n {!bottomLabel && bottomAccessory}\n </Box>\n );\n};\n\nTitleSubpage.displayName = 'TitleSubpage';\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TitleSubpageProps } from "./TitleSubpage.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.
|
|
5
|
+
* Remaining `View` props are forwarded to the root `Box`.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Component props
|
|
8
|
+
* @param props.title - Title row content (required)
|
|
9
|
+
* @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)
|
|
10
|
+
* @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)
|
|
11
|
+
* @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)
|
|
12
|
+
* @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)
|
|
13
|
+
* @param props.titleEndAccessory - Optional inline accessory to the right of `title`
|
|
14
|
+
* @param props.subtitle - Optional subtitle row below the title and above the amount
|
|
15
|
+
* @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`
|
|
16
|
+
* @param props.amount - Optional primary amount below the title
|
|
17
|
+
* @param props.amountEndAccessory - Optional inline accessory to the right of the amount
|
|
18
|
+
* @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown
|
|
19
|
+
* @param props.bottomLabel - Optional secondary label below the amount row
|
|
20
|
+
* @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`
|
|
21
|
+
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
22
|
+
* @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string
|
|
23
|
+
* @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string
|
|
24
|
+
* @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string
|
|
25
|
+
* @param props.twClassName - Optional Tailwind classes on the root container
|
|
26
|
+
*
|
|
27
|
+
* @returns The rendered TitleSubpage layout.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TitleSubpage: React.FC<TitleSubpageProps>;
|
|
30
|
+
//# sourceMappingURL=TitleSubpage.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleSubpage.d.cts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2FpD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TitleSubpageProps } from "./TitleSubpage.types.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.
|
|
5
|
+
* Remaining `View` props are forwarded to the root `Box`.
|
|
6
|
+
*
|
|
7
|
+
* @param props - Component props
|
|
8
|
+
* @param props.title - Title row content (required)
|
|
9
|
+
* @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)
|
|
10
|
+
* @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)
|
|
11
|
+
* @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)
|
|
12
|
+
* @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)
|
|
13
|
+
* @param props.titleEndAccessory - Optional inline accessory to the right of `title`
|
|
14
|
+
* @param props.subtitle - Optional subtitle row below the title and above the amount
|
|
15
|
+
* @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`
|
|
16
|
+
* @param props.amount - Optional primary amount below the title
|
|
17
|
+
* @param props.amountEndAccessory - Optional inline accessory to the right of the amount
|
|
18
|
+
* @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown
|
|
19
|
+
* @param props.bottomLabel - Optional secondary label below the amount row
|
|
20
|
+
* @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`
|
|
21
|
+
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
22
|
+
* @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string
|
|
23
|
+
* @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string
|
|
24
|
+
* @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string
|
|
25
|
+
* @param props.twClassName - Optional Tailwind classes on the root container
|
|
26
|
+
*
|
|
27
|
+
* @returns The rendered TitleSubpage layout.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TitleSubpage: React.FC<TitleSubpageProps>;
|
|
30
|
+
//# sourceMappingURL=TitleSubpage.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleSubpage.d.mts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2FpD,CAAC"}
|