@cdx-ui/components 0.0.1-beta.111 → 0.0.1-beta.112
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/lib/commonjs/components/Box/Box.js +1 -11
- package/lib/commonjs/components/Box/Box.js.map +1 -1
- package/lib/commonjs/components/Link/index.js.map +1 -1
- package/lib/module/components/Box/Box.js +1 -11
- package/lib/module/components/Box/Box.js.map +1 -1
- package/lib/module/components/Link/index.js.map +1 -1
- package/lib/typescript/components/Box/Box.d.ts +0 -3
- package/lib/typescript/components/Box/Box.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +1 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/Box/Box.tsx +3 -7
- package/src/components/Link/index.tsx +1 -0
- package/lib/commonjs/utils/WrapStringChild.js +0 -22
- package/lib/commonjs/utils/WrapStringChild.js.map +0 -1
- package/lib/module/utils/WrapStringChild.js +0 -18
- package/lib/module/utils/WrapStringChild.js.map +0 -1
- package/lib/typescript/utils/WrapStringChild.d.ts +0 -10
- package/lib/typescript/utils/WrapStringChild.d.ts.map +0 -1
- package/src/utils/WrapStringChild.tsx +0 -25
|
@@ -6,25 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Box = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _WrapStringChild = require("../../utils/WrapStringChild");
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
/** @deprecated Use View instead */
|
|
12
10
|
const Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
-
style,
|
|
14
|
-
className,
|
|
15
11
|
children,
|
|
16
|
-
textProps,
|
|
17
12
|
...restProps
|
|
18
13
|
}, ref) => {
|
|
19
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
20
15
|
ref: ref,
|
|
21
|
-
style: style,
|
|
22
|
-
className: className,
|
|
23
16
|
...restProps,
|
|
24
|
-
children:
|
|
25
|
-
textProps: textProps,
|
|
26
|
-
children: children
|
|
27
|
-
})
|
|
17
|
+
children: children
|
|
28
18
|
});
|
|
29
19
|
});
|
|
30
20
|
Box.displayName = 'Box';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_jsxRuntime","Box","exports","forwardRef","children","restProps","ref","jsx","View","displayName"],"sourceRoot":"../../../../src","sources":["components/Box/Box.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAoD,IAAAE,WAAA,GAAAF,OAAA;AAM7C,MAAMG,GAAG,GAAAC,OAAA,CAAAD,GAAA,gBAAG,IAAAE,iBAAU,EAC3B,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EAAEC,GAAuB,KAAK;EACvD,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACR,YAAA,CAAAS,IAAI;IAACF,GAAG,EAAEA,GAAI;IAAA,GAAKD,SAAS;IAAAD,QAAA,EAC1BA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDH,GAAG,CAACQ,WAAW,GAAG,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_Icon","_styles","_jsxRuntime","LinkRoot","forwardRef","className","children","style","props","ref","rootClassName","cn","linkRootVariants","jsx","mergeDataAttributes","dataAttributes","slot","displayName","LinkLabel","asChild","visited","useLinkInteractionContext","computedClassName","linkLabelVariants","Comp","Slot","Text","textElement","Platform","OS","View","linkNativeUnderlineVariants","LinkIcon","as","linkIconVariants","Icon","Link","exports","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAQA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKkB,IAAAM,WAAA,GAAAN,OAAA;AAIlB;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_Icon","_styles","_jsxRuntime","LinkRoot","forwardRef","className","children","style","props","ref","rootClassName","cn","linkRootVariants","jsx","mergeDataAttributes","dataAttributes","slot","displayName","LinkLabel","asChild","visited","useLinkInteractionContext","computedClassName","linkLabelVariants","Comp","Slot","Text","textElement","Platform","OS","View","linkNativeUnderlineVariants","LinkIcon","as","linkIconVariants","Icon","Link","exports","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAQA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKkB,IAAAM,WAAA,GAAAN,OAAA;AAIlB;AACA;AACA;;AAQA,MAAMO,QAAQ,gBAAG,IAAAC,iBAAU,EAAkB,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC9F,MAAMC,aAAa,GAAG,IAAAC,SAAE,EAAC,IAAAC,wBAAgB,EAAC,CAAC,EAAEP,SAAS,CAAC;EAEvD,oBACE,IAAAH,WAAA,CAAAW,GAAA,EAACf,WAAA,CAAAK,QAAiB;IAChBM,GAAG,EAAEA,GAAI;IACTJ,SAAS,EAAEK,aAAc;IACzBH,KAAK,EAAEA,KAAM;IAAA,GACTC,KAAK;IAAA,GACL,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AS,CAACD,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAIA,MAAMe,QAAQ,GAAGA,CAAC;EAAE3B,SAAS;EAAEE,KAAK;EAAE0B,EAAE;EAAE,GAAGzB;AAAqB,CAAC,KAAK;EACtE,MAAM;IAAEY;EAAQ,CAAC,GAAG,IAAAC,qCAAyB,EAAC,CAAC;EAC/C,MAAMC,iBAAiB,GAAG,IAAAX,SAAE,EAAC,IAAAuB,wBAAgB,EAAC;IAAEd;EAAQ,CAAC,CAAC,EAAEf,SAAS,CAAC;EAEtE,oBACE,IAAAH,WAAA,CAAAW,GAAA,EAACb,KAAA,CAAAmC,IAAI;IACHF,EAAE,EAAEA,EAAG;IACP5B,SAAS,EAAEiB,iBAAkB;IAC7Bf,KAAK,EAAEA,KAAM;IAAA,GACTC,KAAK;IAAA,GACL,IAAAM,+BAAmB,EAACN,KAAK,EAAE,IAAAO,0BAAc,EAAC;MAAEC,IAAI,EAAE;IAAY,CAAC,CAAC;EAAC,CACtE,CAAC;AAEN,CAAC;AAEDgB,QAAQ,CAACf,WAAW,GAAG,WAAW;;AAElC;AACA;AACA;;AAOO,MAAMmB,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAGE,MAAM,CAACC,MAAM,CAACpC,QAAQ,EAAE;EAC1CqC,KAAK,EAAEtB,SAAS;EAChBiB,IAAI,EAAEH;AACR,CAAC,CAA0B","ignoreList":[]}
|
|
@@ -2,25 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
import { WrapStringChild } from '../../utils/WrapStringChild';
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
/** @deprecated Use View instead */
|
|
8
6
|
export const Box = /*#__PURE__*/forwardRef(({
|
|
9
|
-
style,
|
|
10
|
-
className,
|
|
11
7
|
children,
|
|
12
|
-
textProps,
|
|
13
8
|
...restProps
|
|
14
9
|
}, ref) => {
|
|
15
10
|
return /*#__PURE__*/_jsx(View, {
|
|
16
11
|
ref: ref,
|
|
17
|
-
style: style,
|
|
18
|
-
className: className,
|
|
19
12
|
...restProps,
|
|
20
|
-
children:
|
|
21
|
-
textProps: textProps,
|
|
22
|
-
children: children
|
|
23
|
-
})
|
|
13
|
+
children: children
|
|
24
14
|
});
|
|
25
15
|
});
|
|
26
16
|
Box.displayName = 'Box';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","
|
|
1
|
+
{"version":3,"names":["forwardRef","View","jsx","_jsx","Box","children","restProps","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Box/Box.tsx"],"mappings":";;AAAA,SAA4BA,UAAU,QAAQ,OAAO;AACrD,SAASC,IAAI,QAAwB,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMpD,OAAO,MAAMC,GAAG,gBAAGJ,UAAU,CAC3B,CAAC;EAAEK,QAAQ;EAAE,GAAGC;AAAU,CAAC,EAAEC,GAAuB,KAAK;EACvD,oBACEJ,IAAA,CAACF,IAAI;IAACM,GAAG,EAAEA,GAAI;IAAA,GAAKD,SAAS;IAAAD,QAAA,EAC1BA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDD,GAAG,CAACI,WAAW,GAAG,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Platform","Text","View","LinkRoot","LinkRootPrimitive","Slot","dataAttributes","mergeDataAttributes","useLinkInteractionContext","cn","Icon","linkIconVariants","linkLabelVariants","linkNativeUnderlineVariants","linkRootVariants","jsx","_jsx","LinkProvider","className","children","style","props","ref","rootClassName","slot","displayName","LinkLabel","asChild","visited","computedClassName","Comp","textElement","OS","LinkIcon","as","Link","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAwB,cAAc;AACnE,SACEC,QAAQ,IAAIC,iBAAiB,EAC7BC,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,yBAAyB,QAEpB,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,IAAI,QAAwB,SAAS;AAC9C,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gBAAgB,QACX,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElB,SAASC,YAAY,QAA0C,oBAAoB;;AAEnF;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["forwardRef","Platform","Text","View","LinkRoot","LinkRootPrimitive","Slot","dataAttributes","mergeDataAttributes","useLinkInteractionContext","cn","Icon","linkIconVariants","linkLabelVariants","linkNativeUnderlineVariants","linkRootVariants","jsx","_jsx","LinkProvider","className","children","style","props","ref","rootClassName","slot","displayName","LinkLabel","asChild","visited","computedClassName","Comp","textElement","OS","LinkIcon","as","Link","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAwB,cAAc;AACnE,SACEC,QAAQ,IAAIC,iBAAiB,EAC7BC,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,yBAAyB,QAEpB,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,IAAI,QAAwB,SAAS;AAC9C,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gBAAgB,QACX,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElB,SAASC,YAAY,QAA0C,oBAAoB;;AAEnF;AACA;AACA;;AAQA,MAAMd,QAAQ,gBAAGJ,UAAU,CAAkB,CAAC;EAAEmB,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC9F,MA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Ee;IAAQ,CAAC,CAAC,CAAE;IAAAT,QAAA,EAAEY;EAAW,CAAO,CAAC;AAC5F,CACF,CAAC;AAEDL,SAAS,CAACD,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAIA,MAAMQ,QAAQ,GAAGA,CAAC;EAAEf,SAAS;EAAEE,KAAK;EAAEc,EAAE;EAAE,GAAGb;AAAqB,CAAC,KAAK;EACtE,MAAM;IAAEO;EAAQ,CAAC,GAAGpB,yBAAyB,CAAC,CAAC;EAC/C,MAAMqB,iBAAiB,GAAGpB,EAAE,CAACE,gBAAgB,CAAC;IAAEiB;EAAQ,CAAC,CAAC,EAAEV,SAAS,CAAC;EAEtE,oBACEF,IAAA,CAACN,IAAI;IACHwB,EAAE,EAAEA,EAAG;IACPhB,SAAS,EAAEW,iBAAkB;IAC7BT,KAAK,EAAEA,KAAM;IAAA,GACTC,KAAK;IAAA,GACLd,mBAAmB,CAACc,KAAK,EAAEf,cAAc,CAAC;MAAEkB,IAAI,EAAE;IAAY,CAAC,CAAC;EAAC,CACtE,CAAC;AAEN,CAAC;AAEDS,QAAQ,CAACR,WAAW,GAAG,WAAW;;AAElC;AACA;AACA;;AAOA,OAAO,MAAMU,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAClC,QAAQ,EAAE;EAC1CmC,KAAK,EAAEZ,SAAS;EAChBhB,IAAI,EAAEuB;AACR,CAAC,CAA0B","ignoreList":[]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { View, type ViewProps } from 'react-native';
|
|
2
|
-
import type { TextProps } from '../Text';
|
|
3
2
|
export interface BoxProps extends ViewProps {
|
|
4
3
|
className?: string;
|
|
5
|
-
textProps?: TextProps;
|
|
6
4
|
}
|
|
7
|
-
/** @deprecated Use View instead */
|
|
8
5
|
export declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<View>>;
|
|
9
6
|
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,GAAG,2FAQf,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { type ILinkProps } from '@cdx-ui/primitives';
|
|
|
4
4
|
import { type IconProps } from '../Icon';
|
|
5
5
|
export { LinkProvider, type LinkConfig, type LinkAction } from '@cdx-ui/primitives';
|
|
6
6
|
export interface LinkProps extends ILinkProps {
|
|
7
|
+
asChild?: boolean;
|
|
7
8
|
className?: string;
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAY,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAQ/C,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMpF,MAAM,WAAW,SAAU,SAAQ,UAAU;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACt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S,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,iGAwBd,CAAC;AAQF,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;CAAG;AAErE,QAAA,MAAM,QAAQ;yCAAwC,aAAa;;CAalE,CAAC;AAQF,KAAK,qBAAqB,GAAG,OAAO,QAAQ,GAAG;IAC7C,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,IAAI,EAAE,OAAO,QAAQ,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,IAAI,EAGX,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.112",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"class-variance-authority": "^0.7.1",
|
|
69
69
|
"react-native-reanimated-carousel": "5.0.0-beta.5",
|
|
70
70
|
"uniwind": "1.10.0",
|
|
71
|
-
"@cdx-ui/
|
|
72
|
-
"@cdx-ui/
|
|
73
|
-
"@cdx-ui/
|
|
71
|
+
"@cdx-ui/utils": "0.0.1-beta.112",
|
|
72
|
+
"@cdx-ui/icons": "0.0.1-beta.112",
|
|
73
|
+
"@cdx-ui/primitives": "0.0.1-beta.112"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@react-navigation/bottom-tabs": "*",
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { type ForwardedRef, forwardRef } from 'react';
|
|
2
2
|
import { View, type ViewProps } from 'react-native';
|
|
3
|
-
import { WrapStringChild } from '../../utils/WrapStringChild';
|
|
4
|
-
import type { TextProps } from '../Text';
|
|
5
3
|
|
|
6
4
|
export interface BoxProps extends ViewProps {
|
|
7
5
|
className?: string;
|
|
8
|
-
textProps?: TextProps;
|
|
9
6
|
}
|
|
10
7
|
|
|
11
|
-
/** @deprecated Use View instead */
|
|
12
8
|
export const Box = forwardRef<View, BoxProps>(
|
|
13
|
-
({
|
|
9
|
+
({ children, ...restProps }, ref: ForwardedRef<View>) => {
|
|
14
10
|
return (
|
|
15
|
-
<View ref={ref}
|
|
16
|
-
|
|
11
|
+
<View ref={ref} {...restProps}>
|
|
12
|
+
{children}
|
|
17
13
|
</View>
|
|
18
14
|
);
|
|
19
15
|
},
|
|
@@ -24,6 +24,7 @@ export { LinkProvider, type LinkConfig, type LinkAction } from '@cdx-ui/primitiv
|
|
|
24
24
|
// =============================================================================
|
|
25
25
|
|
|
26
26
|
export interface LinkProps extends ILinkProps {
|
|
27
|
+
asChild?: boolean;
|
|
27
28
|
className?: string;
|
|
28
29
|
children?: ReactNode;
|
|
29
30
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.WrapStringChild = WrapStringChild;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _Text = require("../components/Text");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/** @deprecated Users should wrap their own children in a Text component themselves */
|
|
11
|
-
function WrapStringChild({
|
|
12
|
-
children,
|
|
13
|
-
textProps
|
|
14
|
-
}) {
|
|
15
|
-
return _react.Children.map(children, child => {
|
|
16
|
-
return typeof child === 'string' || typeof child === 'number' || /*#__PURE__*/(0, _react.isValidElement)(child) && child.type === _react.Fragment && child.props && typeof child.props === 'object' && 'children' in child.props && (typeof child.props.children === 'string' || typeof child.props.children === 'number') ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
17
|
-
...textProps,
|
|
18
|
-
children: child
|
|
19
|
-
}) : child;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=WrapStringChild.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_Text","_jsxRuntime","WrapStringChild","children","textProps","Children","map","child","isValidElement","type","Fragment","props","jsx","Text"],"sourceRoot":"../../../src","sources":["utils/WrapStringChild.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAA0D,IAAAE,WAAA,GAAAF,OAAA;AAO1D;AACO,SAASG,eAAeA,CAAC;EAAEC,QAAQ;EAAEC;AAAgC,CAAC,EAAa;EACxF,OAAOC,eAAQ,CAACC,GAAG,CAACH,QAAQ,EAAGI,KAAK,IAAK;IACvC,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IACxB,iBAAAC,qBAAc,EAACD,KAAK,CAAC,IACpBA,KAAK,CAACE,IAAI,KAAKC,eAAQ,IACvBH,KAAK,CAACI,KAAK,IACX,OAAOJ,KAAK,CAACI,KAAK,KAAK,QAAQ,IAC/B,UAAU,IAAIJ,KAAK,CAACI,KAAK,KACxB,OAAOJ,KAAK,CAACI,KAAK,CAACR,QAAQ,KAAK,QAAQ,IAAI,OAAOI,KAAK,CAACI,KAAK,CAACR,QAAQ,KAAK,QAAQ,CAAE,gBACzF,IAAAF,WAAA,CAAAW,GAAA,EAACZ,KAAA,CAAAa,IAAI;MAAA,GAAKT,SAAS;MAAAD,QAAA,EAAGI;IAAK,CAAO,CAAC,GAEnCA,KACD;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Children, Fragment, isValidElement } from 'react';
|
|
4
|
-
import { Text } from '../components/Text';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
/** @deprecated Users should wrap their own children in a Text component themselves */
|
|
7
|
-
export function WrapStringChild({
|
|
8
|
-
children,
|
|
9
|
-
textProps
|
|
10
|
-
}) {
|
|
11
|
-
return Children.map(children, child => {
|
|
12
|
-
return typeof child === 'string' || typeof child === 'number' || /*#__PURE__*/isValidElement(child) && child.type === Fragment && child.props && typeof child.props === 'object' && 'children' in child.props && (typeof child.props.children === 'string' || typeof child.props.children === 'number') ? /*#__PURE__*/_jsx(Text, {
|
|
13
|
-
...textProps,
|
|
14
|
-
children: child
|
|
15
|
-
}) : child;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=WrapStringChild.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Children","Fragment","isValidElement","Text","jsx","_jsx","WrapStringChild","children","textProps","map","child","type","props"],"sourceRoot":"../../../src","sources":["utils/WrapStringChild.tsx"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,QAAwB,OAAO;AAC1E,SAASC,IAAI,QAAwB,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO1D;AACA,OAAO,SAASC,eAAeA,CAAC;EAAEC,QAAQ;EAAEC;AAAgC,CAAC,EAAa;EACxF,OAAOR,QAAQ,CAACS,GAAG,CAACF,QAAQ,EAAGG,KAAK,IAAK;IACvC,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IACxB,aAAAR,cAAc,CAACQ,KAAK,CAAC,IACpBA,KAAK,CAACC,IAAI,KAAKV,QAAQ,IACvBS,KAAK,CAACE,KAAK,IACX,OAAOF,KAAK,CAACE,KAAK,KAAK,QAAQ,IAC/B,UAAU,IAAIF,KAAK,CAACE,KAAK,KACxB,OAAOF,KAAK,CAACE,KAAK,CAACL,QAAQ,KAAK,QAAQ,IAAI,OAAOG,KAAK,CAACE,KAAK,CAACL,QAAQ,KAAK,QAAQ,CAAE,gBACzFF,IAAA,CAACF,IAAI;MAAA,GAAKK,SAAS;MAAAD,QAAA,EAAGG;IAAK,CAAO,CAAC,GAEnCA,KACD;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type TextProps } from '../components/Text';
|
|
3
|
-
interface WrapStringChildProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
textProps?: TextProps;
|
|
6
|
-
}
|
|
7
|
-
/** @deprecated Users should wrap their own children in a Text component themselves */
|
|
8
|
-
export declare function WrapStringChild({ children, textProps }: WrapStringChildProps): ReactNode;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=WrapStringChild.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WrapStringChild.d.ts","sourceRoot":"","sources":["../../../src/utils/WrapStringChild.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,oBAAoB,GAAG,SAAS,CAexF"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Children, Fragment, isValidElement, type ReactNode } from 'react';
|
|
2
|
-
import { Text, type TextProps } from '../components/Text';
|
|
3
|
-
|
|
4
|
-
interface WrapStringChildProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
textProps?: TextProps;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** @deprecated Users should wrap their own children in a Text component themselves */
|
|
10
|
-
export function WrapStringChild({ children, textProps }: WrapStringChildProps): ReactNode {
|
|
11
|
-
return Children.map(children, (child) => {
|
|
12
|
-
return typeof child === 'string' ||
|
|
13
|
-
typeof child === 'number' ||
|
|
14
|
-
(isValidElement(child) &&
|
|
15
|
-
child.type === Fragment &&
|
|
16
|
-
child.props &&
|
|
17
|
-
typeof child.props === 'object' &&
|
|
18
|
-
'children' in child.props &&
|
|
19
|
-
(typeof child.props.children === 'string' || typeof child.props.children === 'number')) ? (
|
|
20
|
-
<Text {...textProps}>{child}</Text>
|
|
21
|
-
) : (
|
|
22
|
-
child
|
|
23
|
-
);
|
|
24
|
-
});
|
|
25
|
-
}
|