@metamask-previews/design-system-shared 0.4.0-preview.fa05289 → 0.6.0-preview.b4e6ece
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 +16 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +7 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/AvatarBase/AvatarBase.types.cjs +44 -0
- package/dist/types/AvatarBase/AvatarBase.types.cjs.map +1 -0
- package/dist/types/AvatarBase/AvatarBase.types.d.cts +78 -0
- package/dist/types/AvatarBase/AvatarBase.types.d.cts.map +1 -0
- package/dist/types/AvatarBase/AvatarBase.types.d.mts +78 -0
- package/dist/types/AvatarBase/AvatarBase.types.d.mts.map +1 -0
- package/dist/types/AvatarBase/AvatarBase.types.mjs +41 -0
- package/dist/types/AvatarBase/AvatarBase.types.mjs.map +1 -0
- package/dist/types/AvatarBase/index.cjs +7 -0
- package/dist/types/AvatarBase/index.cjs.map +1 -0
- package/dist/types/AvatarBase/index.d.cts +2 -0
- package/dist/types/AvatarBase/index.d.cts.map +1 -0
- package/dist/types/AvatarBase/index.d.mts +2 -0
- package/dist/types/AvatarBase/index.d.mts.map +1 -0
- package/dist/types/AvatarBase/index.mjs +2 -0
- package/dist/types/AvatarBase/index.mjs.map +1 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.cjs +3 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.cjs.map +1 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.d.cts +20 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.d.cts.map +1 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.d.mts +20 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.d.mts.map +1 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.mjs +2 -0
- package/dist/types/AvatarNetwork/AvatarNetwork.types.mjs.map +1 -0
- package/dist/types/AvatarNetwork/index.cjs +3 -0
- package/dist/types/AvatarNetwork/index.cjs.map +1 -0
- package/dist/types/AvatarNetwork/index.d.cts +2 -0
- package/dist/types/AvatarNetwork/index.d.cts.map +1 -0
- package/dist/types/AvatarNetwork/index.d.mts +2 -0
- package/dist/types/AvatarNetwork/index.d.mts.map +1 -0
- package/dist/types/AvatarNetwork/index.mjs +2 -0
- package/dist/types/AvatarNetwork/index.mjs.map +1 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.cjs +40 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.cjs.map +1 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.d.cts +99 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.d.cts.map +1 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.d.mts +99 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.d.mts.map +1 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.mjs +37 -0
- package/dist/types/BadgeWrapper/BadgeWrapper.types.mjs.map +1 -0
- package/dist/types/BadgeWrapper/index.cjs +7 -0
- package/dist/types/BadgeWrapper/index.cjs.map +1 -0
- package/dist/types/BadgeWrapper/index.d.cts +2 -0
- package/dist/types/BadgeWrapper/index.d.cts.map +1 -0
- package/dist/types/BadgeWrapper/index.d.mts +2 -0
- package/dist/types/BadgeWrapper/index.d.mts.map +1 -0
- package/dist/types/BadgeWrapper/index.mjs +2 -0
- package/dist/types/BadgeWrapper/index.mjs.map +1 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.cjs +3 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.cjs.map +1 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.d.cts +17 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.d.cts.map +1 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.d.mts +17 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.d.mts.map +1 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.mjs +2 -0
- package/dist/types/BoxHorizontal/BoxHorizontal.types.mjs.map +1 -0
- package/dist/types/BoxHorizontal/index.cjs +3 -0
- package/dist/types/BoxHorizontal/index.cjs.map +1 -0
- package/dist/types/BoxHorizontal/index.d.cts +2 -0
- package/dist/types/BoxHorizontal/index.d.cts.map +1 -0
- package/dist/types/BoxHorizontal/index.d.mts +2 -0
- package/dist/types/BoxHorizontal/index.d.mts.map +1 -0
- package/dist/types/BoxHorizontal/index.mjs +2 -0
- package/dist/types/BoxHorizontal/index.mjs.map +1 -0
- package/dist/types/BoxVertical/BoxVertical.types.cjs +3 -0
- package/dist/types/BoxVertical/BoxVertical.types.cjs.map +1 -0
- package/dist/types/BoxVertical/BoxVertical.types.d.cts +17 -0
- package/dist/types/BoxVertical/BoxVertical.types.d.cts.map +1 -0
- package/dist/types/BoxVertical/BoxVertical.types.d.mts +17 -0
- package/dist/types/BoxVertical/BoxVertical.types.d.mts.map +1 -0
- package/dist/types/BoxVertical/BoxVertical.types.mjs +2 -0
- package/dist/types/BoxVertical/BoxVertical.types.mjs.map +1 -0
- package/dist/types/BoxVertical/index.cjs +3 -0
- package/dist/types/BoxVertical/index.cjs.map +1 -0
- package/dist/types/BoxVertical/index.d.cts +2 -0
- package/dist/types/BoxVertical/index.d.cts.map +1 -0
- package/dist/types/BoxVertical/index.d.mts +2 -0
- package/dist/types/BoxVertical/index.d.mts.map +1 -0
- package/dist/types/BoxVertical/index.mjs +2 -0
- package/dist/types/BoxVertical/index.mjs.map +1 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.cjs +3 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.cjs.map +1 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.d.cts +12 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.d.cts.map +1 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.d.mts +12 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.d.mts.map +1 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.mjs +2 -0
- package/dist/types/TextOrChildren/TextOrChildren.types.mjs.map +1 -0
- package/dist/types/TextOrChildren/index.cjs +3 -0
- package/dist/types/TextOrChildren/index.cjs.map +1 -0
- package/dist/types/TextOrChildren/index.d.cts +2 -0
- package/dist/types/TextOrChildren/index.d.cts.map +1 -0
- package/dist/types/TextOrChildren/index.d.mts +2 -0
- package/dist/types/TextOrChildren/index.d.mts.map +1 -0
- package/dist/types/TextOrChildren/index.mjs +2 -0
- package/dist/types/TextOrChildren/index.mjs.map +1 -0
- package/dist/utils/isReactNodeRenderable.cjs +20 -0
- package/dist/utils/isReactNodeRenderable.cjs.map +1 -0
- package/dist/utils/isReactNodeRenderable.d.cts +15 -0
- package/dist/utils/isReactNodeRenderable.d.cts.map +1 -0
- package/dist/utils/isReactNodeRenderable.d.mts +15 -0
- package/dist/utils/isReactNodeRenderable.d.mts.map +1 -0
- package/dist/utils/isReactNodeRenderable.mjs +16 -0
- package/dist/utils/isReactNodeRenderable.mjs.map +1 -0
- package/package.json +6 -2
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BadgeWrapper - positionAnchorShape
|
|
3
|
+
* Convert from enum to const object (ADR-0003)
|
|
4
|
+
*/
|
|
5
|
+
export declare const BadgeWrapperPositionAnchorShape: {
|
|
6
|
+
/**
|
|
7
|
+
* Represents a rectangular anchoring shape
|
|
8
|
+
*/
|
|
9
|
+
readonly Rectangular: "rectangular";
|
|
10
|
+
/**
|
|
11
|
+
* Represents a circular anchoring shape
|
|
12
|
+
*/
|
|
13
|
+
readonly Circular: "circular";
|
|
14
|
+
};
|
|
15
|
+
export type BadgeWrapperPositionAnchorShape = (typeof BadgeWrapperPositionAnchorShape)[keyof typeof BadgeWrapperPositionAnchorShape];
|
|
16
|
+
/**
|
|
17
|
+
* BadgeWrapper - position
|
|
18
|
+
* Convert from enum to const object (ADR-0003)
|
|
19
|
+
*/
|
|
20
|
+
export declare const BadgeWrapperPosition: {
|
|
21
|
+
/**
|
|
22
|
+
* Positions the badge at the top right
|
|
23
|
+
*/
|
|
24
|
+
readonly TopRight: "top-right";
|
|
25
|
+
/**
|
|
26
|
+
* Positions the badge at the bottom right
|
|
27
|
+
*/
|
|
28
|
+
readonly BottomRight: "bottom-right";
|
|
29
|
+
/**
|
|
30
|
+
* Positions the badge at the bottom left
|
|
31
|
+
*/
|
|
32
|
+
readonly BottomLeft: "bottom-left";
|
|
33
|
+
/**
|
|
34
|
+
* Positions the badge at the top left
|
|
35
|
+
*/
|
|
36
|
+
readonly TopLeft: "top-left";
|
|
37
|
+
};
|
|
38
|
+
export type BadgeWrapperPosition = (typeof BadgeWrapperPosition)[keyof typeof BadgeWrapperPosition];
|
|
39
|
+
/**
|
|
40
|
+
* BadgeWrapper - customPosition type (ADR-0004)
|
|
41
|
+
* Platform-independent custom position definition
|
|
42
|
+
*/
|
|
43
|
+
export type BadgeWrapperCustomPosition = {
|
|
44
|
+
top?: number | string | undefined;
|
|
45
|
+
right?: number | string | undefined;
|
|
46
|
+
bottom?: number | string | undefined;
|
|
47
|
+
left?: number | string | undefined;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* BadgeWrapper component shared props (ADR-0004)
|
|
51
|
+
* Platform-independent properties shared across React and React Native
|
|
52
|
+
*/
|
|
53
|
+
export type BadgeWrapperPropsShared = {
|
|
54
|
+
/**
|
|
55
|
+
* Optional prop to determine the shape of the anchoring element.
|
|
56
|
+
* This prop gets used along with position, positionXOffset, and positionYOffset
|
|
57
|
+
* to determine the final position.
|
|
58
|
+
* Possible values:
|
|
59
|
+
* - BadgeWrapperPositionAnchorShape.Circular
|
|
60
|
+
* - BadgeWrapperPositionAnchorShape.Rectangular
|
|
61
|
+
*
|
|
62
|
+
* @default BadgeWrapperPositionAnchorShape.Circular
|
|
63
|
+
*/
|
|
64
|
+
positionAnchorShape?: BadgeWrapperPositionAnchorShape;
|
|
65
|
+
/**
|
|
66
|
+
* Optional prop to control the preset position of the badge.
|
|
67
|
+
* This prop gets used along with positionAnchorShape, positionXOffset, and positionYOffset
|
|
68
|
+
* to determine the final position.
|
|
69
|
+
*
|
|
70
|
+
* @default BadgeWrapperPosition.TopRight
|
|
71
|
+
*/
|
|
72
|
+
position?: BadgeWrapperPosition;
|
|
73
|
+
/**
|
|
74
|
+
* Optional prop to move the preset position horizontally.
|
|
75
|
+
*
|
|
76
|
+
* @default 0
|
|
77
|
+
*/
|
|
78
|
+
positionXOffset?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Optional prop to move the preset position vertically.
|
|
81
|
+
*
|
|
82
|
+
* @default 0
|
|
83
|
+
*/
|
|
84
|
+
positionYOffset?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Optional prop to customize the position through the position object.
|
|
87
|
+
* Position object - {top: 0, right: 0, bottom: 0, left: 0}
|
|
88
|
+
*/
|
|
89
|
+
customPosition?: BadgeWrapperCustomPosition;
|
|
90
|
+
/**
|
|
91
|
+
* The element that the badge will attach itself to.
|
|
92
|
+
*/
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Any element that will be placed in the position of the badge.
|
|
96
|
+
*/
|
|
97
|
+
badge: React.ReactNode;
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=BadgeWrapper.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeWrapper.types.d.cts","sourceRoot":"","sources":["../../../src/types/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,+BAA+B;IAC1C;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,OAAO,+BAA+B,CAAC,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;IAC/B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,+BAA+B,CAAC;IACtD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BadgeWrapper - positionAnchorShape
|
|
3
|
+
* Convert from enum to const object (ADR-0003)
|
|
4
|
+
*/
|
|
5
|
+
export declare const BadgeWrapperPositionAnchorShape: {
|
|
6
|
+
/**
|
|
7
|
+
* Represents a rectangular anchoring shape
|
|
8
|
+
*/
|
|
9
|
+
readonly Rectangular: "rectangular";
|
|
10
|
+
/**
|
|
11
|
+
* Represents a circular anchoring shape
|
|
12
|
+
*/
|
|
13
|
+
readonly Circular: "circular";
|
|
14
|
+
};
|
|
15
|
+
export type BadgeWrapperPositionAnchorShape = (typeof BadgeWrapperPositionAnchorShape)[keyof typeof BadgeWrapperPositionAnchorShape];
|
|
16
|
+
/**
|
|
17
|
+
* BadgeWrapper - position
|
|
18
|
+
* Convert from enum to const object (ADR-0003)
|
|
19
|
+
*/
|
|
20
|
+
export declare const BadgeWrapperPosition: {
|
|
21
|
+
/**
|
|
22
|
+
* Positions the badge at the top right
|
|
23
|
+
*/
|
|
24
|
+
readonly TopRight: "top-right";
|
|
25
|
+
/**
|
|
26
|
+
* Positions the badge at the bottom right
|
|
27
|
+
*/
|
|
28
|
+
readonly BottomRight: "bottom-right";
|
|
29
|
+
/**
|
|
30
|
+
* Positions the badge at the bottom left
|
|
31
|
+
*/
|
|
32
|
+
readonly BottomLeft: "bottom-left";
|
|
33
|
+
/**
|
|
34
|
+
* Positions the badge at the top left
|
|
35
|
+
*/
|
|
36
|
+
readonly TopLeft: "top-left";
|
|
37
|
+
};
|
|
38
|
+
export type BadgeWrapperPosition = (typeof BadgeWrapperPosition)[keyof typeof BadgeWrapperPosition];
|
|
39
|
+
/**
|
|
40
|
+
* BadgeWrapper - customPosition type (ADR-0004)
|
|
41
|
+
* Platform-independent custom position definition
|
|
42
|
+
*/
|
|
43
|
+
export type BadgeWrapperCustomPosition = {
|
|
44
|
+
top?: number | string | undefined;
|
|
45
|
+
right?: number | string | undefined;
|
|
46
|
+
bottom?: number | string | undefined;
|
|
47
|
+
left?: number | string | undefined;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* BadgeWrapper component shared props (ADR-0004)
|
|
51
|
+
* Platform-independent properties shared across React and React Native
|
|
52
|
+
*/
|
|
53
|
+
export type BadgeWrapperPropsShared = {
|
|
54
|
+
/**
|
|
55
|
+
* Optional prop to determine the shape of the anchoring element.
|
|
56
|
+
* This prop gets used along with position, positionXOffset, and positionYOffset
|
|
57
|
+
* to determine the final position.
|
|
58
|
+
* Possible values:
|
|
59
|
+
* - BadgeWrapperPositionAnchorShape.Circular
|
|
60
|
+
* - BadgeWrapperPositionAnchorShape.Rectangular
|
|
61
|
+
*
|
|
62
|
+
* @default BadgeWrapperPositionAnchorShape.Circular
|
|
63
|
+
*/
|
|
64
|
+
positionAnchorShape?: BadgeWrapperPositionAnchorShape;
|
|
65
|
+
/**
|
|
66
|
+
* Optional prop to control the preset position of the badge.
|
|
67
|
+
* This prop gets used along with positionAnchorShape, positionXOffset, and positionYOffset
|
|
68
|
+
* to determine the final position.
|
|
69
|
+
*
|
|
70
|
+
* @default BadgeWrapperPosition.TopRight
|
|
71
|
+
*/
|
|
72
|
+
position?: BadgeWrapperPosition;
|
|
73
|
+
/**
|
|
74
|
+
* Optional prop to move the preset position horizontally.
|
|
75
|
+
*
|
|
76
|
+
* @default 0
|
|
77
|
+
*/
|
|
78
|
+
positionXOffset?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Optional prop to move the preset position vertically.
|
|
81
|
+
*
|
|
82
|
+
* @default 0
|
|
83
|
+
*/
|
|
84
|
+
positionYOffset?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Optional prop to customize the position through the position object.
|
|
87
|
+
* Position object - {top: 0, right: 0, bottom: 0, left: 0}
|
|
88
|
+
*/
|
|
89
|
+
customPosition?: BadgeWrapperCustomPosition;
|
|
90
|
+
/**
|
|
91
|
+
* The element that the badge will attach itself to.
|
|
92
|
+
*/
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Any element that will be placed in the position of the badge.
|
|
96
|
+
*/
|
|
97
|
+
badge: React.ReactNode;
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=BadgeWrapper.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeWrapper.types.d.mts","sourceRoot":"","sources":["../../../src/types/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,+BAA+B;IAC1C;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,OAAO,+BAA+B,CAAC,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;IAC/B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,+BAA+B,CAAC;IACtD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BadgeWrapper - positionAnchorShape
|
|
3
|
+
* Convert from enum to const object (ADR-0003)
|
|
4
|
+
*/
|
|
5
|
+
export const BadgeWrapperPositionAnchorShape = {
|
|
6
|
+
/**
|
|
7
|
+
* Represents a rectangular anchoring shape
|
|
8
|
+
*/
|
|
9
|
+
Rectangular: 'rectangular',
|
|
10
|
+
/**
|
|
11
|
+
* Represents a circular anchoring shape
|
|
12
|
+
*/
|
|
13
|
+
Circular: 'circular',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* BadgeWrapper - position
|
|
17
|
+
* Convert from enum to const object (ADR-0003)
|
|
18
|
+
*/
|
|
19
|
+
export const BadgeWrapperPosition = {
|
|
20
|
+
/**
|
|
21
|
+
* Positions the badge at the top right
|
|
22
|
+
*/
|
|
23
|
+
TopRight: 'top-right',
|
|
24
|
+
/**
|
|
25
|
+
* Positions the badge at the bottom right
|
|
26
|
+
*/
|
|
27
|
+
BottomRight: 'bottom-right',
|
|
28
|
+
/**
|
|
29
|
+
* Positions the badge at the bottom left
|
|
30
|
+
*/
|
|
31
|
+
BottomLeft: 'bottom-left',
|
|
32
|
+
/**
|
|
33
|
+
* Positions the badge at the top left
|
|
34
|
+
*/
|
|
35
|
+
TopLeft: 'top-left',
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=BadgeWrapper.types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeWrapper.types.mjs","sourceRoot":"","sources":["../../../src/types/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OAEG;IACH,WAAW,EAAE,cAAc;IAC3B;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,OAAO,EAAE,UAAU;CACX,CAAC","sourcesContent":["/**\n * BadgeWrapper - positionAnchorShape\n * Convert from enum to const object (ADR-0003)\n */\nexport const BadgeWrapperPositionAnchorShape = {\n /**\n * Represents a rectangular anchoring shape\n */\n Rectangular: 'rectangular',\n /**\n * Represents a circular anchoring shape\n */\n Circular: 'circular',\n} as const;\nexport type BadgeWrapperPositionAnchorShape =\n (typeof BadgeWrapperPositionAnchorShape)[keyof typeof BadgeWrapperPositionAnchorShape];\n\n/**\n * BadgeWrapper - position\n * Convert from enum to const object (ADR-0003)\n */\nexport const BadgeWrapperPosition = {\n /**\n * Positions the badge at the top right\n */\n TopRight: 'top-right',\n /**\n * Positions the badge at the bottom right\n */\n BottomRight: 'bottom-right',\n /**\n * Positions the badge at the bottom left\n */\n BottomLeft: 'bottom-left',\n /**\n * Positions the badge at the top left\n */\n TopLeft: 'top-left',\n} as const;\nexport type BadgeWrapperPosition =\n (typeof BadgeWrapperPosition)[keyof typeof BadgeWrapperPosition];\n\n/**\n * BadgeWrapper - customPosition type (ADR-0004)\n * Platform-independent custom position definition\n */\nexport type BadgeWrapperCustomPosition = {\n top?: number | string | undefined;\n right?: number | string | undefined;\n bottom?: number | string | undefined;\n left?: number | string | undefined;\n};\n\n/**\n * BadgeWrapper component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native\n */\nexport type BadgeWrapperPropsShared = {\n /**\n * Optional prop to determine the shape of the anchoring element.\n * This prop gets used along with position, positionXOffset, and positionYOffset\n * to determine the final position.\n * Possible values:\n * - BadgeWrapperPositionAnchorShape.Circular\n * - BadgeWrapperPositionAnchorShape.Rectangular\n *\n * @default BadgeWrapperPositionAnchorShape.Circular\n */\n positionAnchorShape?: BadgeWrapperPositionAnchorShape;\n /**\n * Optional prop to control the preset position of the badge.\n * This prop gets used along with positionAnchorShape, positionXOffset, and positionYOffset\n * to determine the final position.\n *\n * @default BadgeWrapperPosition.TopRight\n */\n position?: BadgeWrapperPosition;\n /**\n * Optional prop to move the preset position horizontally.\n *\n * @default 0\n */\n positionXOffset?: number;\n /**\n * Optional prop to move the preset position vertically.\n *\n * @default 0\n */\n positionYOffset?: number;\n /**\n * Optional prop to customize the position through the position object.\n * Position object - {top: 0, right: 0, bottom: 0, left: 0}\n */\n customPosition?: BadgeWrapperCustomPosition;\n /**\n * The element that the badge will attach itself to.\n */\n children: React.ReactNode;\n /**\n * Any element that will be placed in the position of the badge.\n */\n badge: React.ReactNode;\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BadgeWrapperPosition = exports.BadgeWrapperPositionAnchorShape = void 0;
|
|
4
|
+
var BadgeWrapper_types_1 = require("./BadgeWrapper.types.cjs");
|
|
5
|
+
Object.defineProperty(exports, "BadgeWrapperPositionAnchorShape", { enumerable: true, get: function () { return BadgeWrapper_types_1.BadgeWrapperPositionAnchorShape; } });
|
|
6
|
+
Object.defineProperty(exports, "BadgeWrapperPosition", { enumerable: true, get: function () { return BadgeWrapper_types_1.BadgeWrapperPosition; } });
|
|
7
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/BadgeWrapper/index.ts"],"names":[],"mappings":";;;AAAA,+DAK8B;AAJ5B,qIAAA,+BAA+B,OAAA;AAC/B,0HAAA,oBAAoB,OAAA","sourcesContent":["export {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './BadgeWrapper.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,iCAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,iCAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EAGrB,iCAA6B","sourcesContent":["export {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './BadgeWrapper.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxHorizontal.types.cjs","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/BoxHorizontal.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxHorizontal component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxHorizontalPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered before the text/children (e.g. icon, avatar).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node rendered after the text/children (e.g. icon, badge).\n */\n endAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* BoxHorizontal component shared props (ADR-0004)
|
|
5
|
+
* Platform-independent properties shared across React and React Native.
|
|
6
|
+
*/
|
|
7
|
+
export type BoxHorizontalPropsShared = TextOrChildrenPropsShared & {
|
|
8
|
+
/**
|
|
9
|
+
* Optional node rendered before the text/children (e.g. icon, avatar).
|
|
10
|
+
*/
|
|
11
|
+
startAccessory?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional node rendered after the text/children (e.g. icon, badge).
|
|
14
|
+
*/
|
|
15
|
+
endAccessory?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=BoxHorizontal.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxHorizontal.types.d.cts","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/BoxHorizontal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,GAAG;IACjE;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* BoxHorizontal component shared props (ADR-0004)
|
|
5
|
+
* Platform-independent properties shared across React and React Native.
|
|
6
|
+
*/
|
|
7
|
+
export type BoxHorizontalPropsShared = TextOrChildrenPropsShared & {
|
|
8
|
+
/**
|
|
9
|
+
* Optional node rendered before the text/children (e.g. icon, avatar).
|
|
10
|
+
*/
|
|
11
|
+
startAccessory?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional node rendered after the text/children (e.g. icon, badge).
|
|
14
|
+
*/
|
|
15
|
+
endAccessory?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=BoxHorizontal.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxHorizontal.types.d.mts","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/BoxHorizontal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,GAAG;IACjE;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxHorizontal.types.mjs","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/BoxHorizontal.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxHorizontal component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxHorizontalPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered before the text/children (e.g. icon, avatar).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node rendered after the text/children (e.g. icon, badge).\n */\n endAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type BoxHorizontalPropsShared } from './BoxHorizontal.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,kCAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,kCAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/BoxHorizontal/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type BoxHorizontalPropsShared } from './BoxHorizontal.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxVertical.types.cjs","sourceRoot":"","sources":["../../../src/types/BoxVertical/BoxVertical.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxVertical component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxVerticalPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered above the text/children.\n */\n topAccessory?: ReactNode;\n /**\n * Optional node rendered below the text/children.\n */\n bottomAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* BoxVertical component shared props (ADR-0004)
|
|
5
|
+
* Platform-independent properties shared across React and React Native.
|
|
6
|
+
*/
|
|
7
|
+
export type BoxVerticalPropsShared = TextOrChildrenPropsShared & {
|
|
8
|
+
/**
|
|
9
|
+
* Optional node rendered above the text/children.
|
|
10
|
+
*/
|
|
11
|
+
topAccessory?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional node rendered below the text/children.
|
|
14
|
+
*/
|
|
15
|
+
bottomAccessory?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=BoxVertical.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxVertical.types.d.cts","sourceRoot":"","sources":["../../../src/types/BoxVertical/BoxVertical.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,yBAAyB,GAAG;IAC/D;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TextOrChildrenPropsShared } from "../TextOrChildren/index.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* BoxVertical component shared props (ADR-0004)
|
|
5
|
+
* Platform-independent properties shared across React and React Native.
|
|
6
|
+
*/
|
|
7
|
+
export type BoxVerticalPropsShared = TextOrChildrenPropsShared & {
|
|
8
|
+
/**
|
|
9
|
+
* Optional node rendered above the text/children.
|
|
10
|
+
*/
|
|
11
|
+
topAccessory?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional node rendered below the text/children.
|
|
14
|
+
*/
|
|
15
|
+
bottomAccessory?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=BoxVertical.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxVertical.types.d.mts","sourceRoot":"","sources":["../../../src/types/BoxVertical/BoxVertical.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAA0B;AAEnE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,yBAAyB,GAAG;IAC/D;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxVertical.types.mjs","sourceRoot":"","sources":["../../../src/types/BoxVertical/BoxVertical.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { TextOrChildrenPropsShared } from '../TextOrChildren';\n\n/**\n * BoxVertical component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type BoxVerticalPropsShared = TextOrChildrenPropsShared & {\n /**\n * Optional node rendered above the text/children.\n */\n topAccessory?: ReactNode;\n /**\n * Optional node rendered below the text/children.\n */\n bottomAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/BoxVertical/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type BoxVerticalPropsShared } from './BoxVertical.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/BoxVertical/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,gCAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/BoxVertical/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,gCAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/BoxVertical/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type BoxVerticalPropsShared } from './BoxVertical.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.types.cjs","sourceRoot":"","sources":["../../../src/types/TextOrChildren/TextOrChildren.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * Shared content contract for components that render either a string (via platform `Text`) or a React node (ADR-0004).\n * Platform packages extend this with `textProps` for their `Text` component.\n */\nexport type TextOrChildrenPropsShared = {\n /**\n * Main content: a string or any React node. When a string, platform implementations typically apply `textProps` from the platform layer.\n */\n children: ReactNode | string;\n};\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Shared content contract for components that render either a string (via platform `Text`) or a React node (ADR-0004).
|
|
4
|
+
* Platform packages extend this with `textProps` for their `Text` component.
|
|
5
|
+
*/
|
|
6
|
+
export type TextOrChildrenPropsShared = {
|
|
7
|
+
/**
|
|
8
|
+
* Main content: a string or any React node. When a string, platform implementations typically apply `textProps` from the platform layer.
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode | string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=TextOrChildren.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.types.d.cts","sourceRoot":"","sources":["../../../src/types/TextOrChildren/TextOrChildren.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Shared content contract for components that render either a string (via platform `Text`) or a React node (ADR-0004).
|
|
4
|
+
* Platform packages extend this with `textProps` for their `Text` component.
|
|
5
|
+
*/
|
|
6
|
+
export type TextOrChildrenPropsShared = {
|
|
7
|
+
/**
|
|
8
|
+
* Main content: a string or any React node. When a string, platform implementations typically apply `textProps` from the platform layer.
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode | string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=TextOrChildren.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.types.d.mts","sourceRoot":"","sources":["../../../src/types/TextOrChildren/TextOrChildren.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextOrChildren.types.mjs","sourceRoot":"","sources":["../../../src/types/TextOrChildren/TextOrChildren.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * Shared content contract for components that render either a string (via platform `Text`) or a React node (ADR-0004).\n * Platform packages extend this with `textProps` for their `Text` component.\n */\nexport type TextOrChildrenPropsShared = {\n /**\n * Main content: a string or any React node. When a string, platform implementations typically apply `textProps` from the platform layer.\n */\n children: ReactNode | string;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/TextOrChildren/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type TextOrChildrenPropsShared } from './TextOrChildren.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/TextOrChildren/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAAE,mCAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/TextOrChildren/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAAE,mCAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/TextOrChildren/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type TextOrChildrenPropsShared } from './TextOrChildren.types';\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isReactNodeRenderable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether a React child value should be treated as renderable content for
|
|
6
|
+
* conditional slots (for example `children`, optional `title`).
|
|
7
|
+
*
|
|
8
|
+
* `null`, `undefined`, and booleans are treated as non-renderable so patterns like
|
|
9
|
+
* `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean
|
|
10
|
+
* or spurious layout when the condition is false. React does not render `true` or
|
|
11
|
+
* `false` as visible output.
|
|
12
|
+
*
|
|
13
|
+
* @param node - A React child value (for example `children` or an optional slot prop).
|
|
14
|
+
* @returns `true` when the value should be treated as renderable; otherwise `false`.
|
|
15
|
+
*/
|
|
16
|
+
function isReactNodeRenderable(node) {
|
|
17
|
+
return node !== null && node !== undefined && typeof node !== 'boolean';
|
|
18
|
+
}
|
|
19
|
+
exports.isReactNodeRenderable = isReactNodeRenderable;
|
|
20
|
+
//# sourceMappingURL=isReactNodeRenderable.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isReactNodeRenderable.cjs","sourceRoot":"","sources":["../../src/utils/isReactNodeRenderable.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;GAWG;AACH,SAAgB,qBAAqB,CAAC,IAAe;IACnD,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC;AAFD,sDAEC","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * Returns whether a React child value should be treated as renderable content for\n * conditional slots (for example `children`, optional `title`).\n *\n * `null`, `undefined`, and booleans are treated as non-renderable so patterns like\n * `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean\n * or spurious layout when the condition is false. React does not render `true` or\n * `false` as visible output.\n *\n * @param node - A React child value (for example `children` or an optional slot prop).\n * @returns `true` when the value should be treated as renderable; otherwise `false`.\n */\nexport function isReactNodeRenderable(node: ReactNode): boolean {\n return node !== null && node !== undefined && typeof node !== 'boolean';\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether a React child value should be treated as renderable content for
|
|
4
|
+
* conditional slots (for example `children`, optional `title`).
|
|
5
|
+
*
|
|
6
|
+
* `null`, `undefined`, and booleans are treated as non-renderable so patterns like
|
|
7
|
+
* `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean
|
|
8
|
+
* or spurious layout when the condition is false. React does not render `true` or
|
|
9
|
+
* `false` as visible output.
|
|
10
|
+
*
|
|
11
|
+
* @param node - A React child value (for example `children` or an optional slot prop).
|
|
12
|
+
* @returns `true` when the value should be treated as renderable; otherwise `false`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isReactNodeRenderable(node: ReactNode): boolean;
|
|
15
|
+
//# sourceMappingURL=isReactNodeRenderable.d.cts.map
|