@cdx-ui/components 0.0.1-alpha.12 → 0.0.1-alpha.13
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/Heading/index.js +2 -2
- package/lib/commonjs/components/Heading/index.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +2 -2
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/module/components/Heading/index.js +2 -2
- package/lib/module/components/Heading/index.js.map +1 -1
- package/lib/module/components/Text/index.js +2 -2
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/typescript/components/Heading/index.d.ts +3 -3
- package/lib/typescript/components/Heading/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/index.d.ts +3 -3
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/components/Heading/index.tsx +4 -4
- package/src/components/Text/index.tsx +4 -4
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Heading = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
9
|
var _utils = require("@cdx-ui/utils");
|
|
10
10
|
var _styles = require("./styles");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -21,7 +21,7 @@ const Heading = exports.Heading = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0,
|
|
|
21
21
|
size = 'lg',
|
|
22
22
|
...props
|
|
23
23
|
}, ref) {
|
|
24
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
25
25
|
role: "heading",
|
|
26
26
|
"aria-level": sizeToLevel[size ?? 'lg'],
|
|
27
27
|
className: (0, _utils.cn)((0, _styles.headingStyle)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","sizeToLevel","xl","lg","md","sm","xs","Heading","exports","memo","forwardRef","className","size","props","ref","jsx","Text","role","cn","headingStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAkE,IAAAI,WAAA,GAAAJ,OAAA;AAElE,MAAMK,WAAW,GAAG;EAClBC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE;AACN,CAAU;AAIH,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAG,IAAAE,WAAI,eACzB,IAAAC,iBAAU,EAA0C,SAASH,OAAOA,CAClE;EAAEI,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBACE,IAAAd,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IACHC,IAAI,EAAC,SAAS;IACd,cAAYhB,WAAW,CAACW,IAAI,IAAI,IAAI,CAAE;IACtCD,SAAS,EAAE,IAAAO,SAAE,EAAC,IAAAC,oBAAY,EAAC;MAAEP;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAC7CE,KAAK;IACTC,GAAG,EAAEA;EAAI,CACV,CAAC;AAEN,CAAC,CACH,CAAC;AAEDP,OAAO,CAACa,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Text = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
9
|
var _utils = require("@cdx-ui/utils");
|
|
10
10
|
var _styles = require("./styles");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -14,7 +14,7 @@ const Text = exports.Text = /*#__PURE__*/(0, _react.forwardRef)(function Text({
|
|
|
14
14
|
size = 'md',
|
|
15
15
|
...props
|
|
16
16
|
}, ref) {
|
|
17
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
18
18
|
className: (0, _utils.cn)((0, _styles.textStyle)({
|
|
19
19
|
size
|
|
20
20
|
}), className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","Text","exports","forwardRef","className","size","props","ref","jsx","cn","textStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAuD,IAAAI,WAAA,GAAAJ,OAAA;AAIhD,MAAMK,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,iBAAU,EAAyC,SAASF,IAAIA,CAClF;EAAEG,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBAAO,IAAAP,WAAA,CAAAQ,GAAA,EAACX,YAAA,CAAAI,IAAM;IAACG,SAAS,EAAE,IAAAK,SAAE,EAAC,IAAAC,iBAAS,EAAC;MAAEL;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AACvF,CAAC,CAAC;AAEFN,IAAI,CAACU,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { forwardRef, memo } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { Text } from 'react-native';
|
|
5
5
|
import { cn } from '@cdx-ui/utils';
|
|
6
6
|
import { headingStyle } from './styles';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -17,7 +17,7 @@ export const Heading = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Headin
|
|
|
17
17
|
size = 'lg',
|
|
18
18
|
...props
|
|
19
19
|
}, ref) {
|
|
20
|
-
return /*#__PURE__*/_jsx(
|
|
20
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
21
21
|
role: "heading",
|
|
22
22
|
"aria-level": sizeToLevel[size ?? 'lg'],
|
|
23
23
|
className: cn(headingStyle({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","Text","cn","headingStyle","jsx","_jsx","sizeToLevel","xl","lg","md","sm","xs","Heading","className","size","props","ref","role","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAA0D,OAAO;AAC1F,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,YAAY,QAAkC,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElE,MAAMC,WAAW,GAAG;EAClBC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE;AACN,CAAU;AAIV,OAAO,MAAMC,OAAO,gBAAGZ,IAAI,cACzBD,UAAU,CAA0C,SAASa,OAAOA,CAClE;EAAEC,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBACEX,IAAA,CAACJ,IAAI;IACHgB,IAAI,EAAC,SAAS;IACd,cAAYX,WAAW,CAACQ,IAAI,IAAI,IAAI,CAAE;IACtCD,SAAS,EAAEX,EAAE,CAACC,YAAY,CAAC;MAAEW;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAC7CE,KAAK;IACTC,GAAG,EAAEA;EAAI,CACV,CAAC;AAEN,CAAC,CACH,CAAC;AAEDJ,OAAO,CAACM,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { Text as RNText } from 'react-native';
|
|
5
5
|
import { cn } from '@cdx-ui/utils';
|
|
6
6
|
import { textStyle } from './styles';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -10,7 +10,7 @@ export const Text = /*#__PURE__*/forwardRef(function Text({
|
|
|
10
10
|
size = 'md',
|
|
11
11
|
...props
|
|
12
12
|
}, ref) {
|
|
13
|
-
return /*#__PURE__*/_jsx(
|
|
13
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
14
14
|
className: cn(textStyle({
|
|
15
15
|
size
|
|
16
16
|
}), className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","
|
|
1
|
+
{"version":3,"names":["forwardRef","Text","RNText","cn","textStyle","jsx","_jsx","className","size","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAA0D,OAAO;AACpF,SAASC,IAAI,IAAIC,MAAM,QAAQ,cAAc;AAC7C,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,SAAS,QAA0B,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIvD,OAAO,MAAML,IAAI,gBAAGD,UAAU,CAAyC,SAASC,IAAIA,CAClF;EAAEM,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBAAOJ,IAAA,CAACJ,MAAM;IAACK,SAAS,EAAEJ,EAAE,CAACC,SAAS,CAAC;MAAEI;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AACvF,CAAC,CAAC;AAEFT,IAAI,CAACU,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
3
|
import { type HeadingVariantProps } from './styles';
|
|
4
|
-
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof
|
|
5
|
-
export declare const Heading: import("react").NamedExoticComponent<HeadingVariantProps &
|
|
4
|
+
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof Text>;
|
|
5
|
+
export declare const Heading: import("react").NamedExoticComponent<HeadingVariantProps & import("react-native").TextProps & import("react").RefAttributes<Text>>;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Heading/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Heading/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAUlE,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,CAAC;AAEvF,eAAO,MAAM,OAAO,oIAenB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Text as RNText } from 'react-native';
|
|
3
3
|
import { TextVariantProps } from './styles';
|
|
4
|
-
export type TextProps = TextVariantProps & ComponentPropsWithoutRef<typeof
|
|
5
|
-
export declare const Text: import("react").ForwardRefExoticComponent<TextVariantProps &
|
|
4
|
+
export type TextProps = TextVariantProps & ComponentPropsWithoutRef<typeof RNText>;
|
|
5
|
+
export declare const Text: import("react").ForwardRefExoticComponent<TextVariantProps & import("react-native").TextProps & import("react").RefAttributes<RNText>>;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAqB,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAqB,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAa,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,wBAAwB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEnF,eAAO,MAAM,IAAI,wIAKf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.13",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -58,11 +58,10 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@expo/html-elements": "55.0.3",
|
|
62
61
|
"class-variance-authority": "^0.7.1",
|
|
63
62
|
"uniwind": "1.4.1",
|
|
64
|
-
"@cdx-ui/primitives": "0.0.1-alpha.
|
|
65
|
-
"@cdx-ui/utils": "0.0.1-alpha.
|
|
63
|
+
"@cdx-ui/primitives": "0.0.1-alpha.13",
|
|
64
|
+
"@cdx-ui/utils": "0.0.1-alpha.13"
|
|
66
65
|
},
|
|
67
66
|
"devDependencies": {
|
|
68
67
|
"@types/react": "*",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef, memo, type ComponentRef, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
3
|
import { cn } from '@cdx-ui/utils';
|
|
4
4
|
import { headingStyle, type HeadingVariantProps } from './styles';
|
|
5
5
|
|
|
@@ -11,15 +11,15 @@ const sizeToLevel = {
|
|
|
11
11
|
xs: 5,
|
|
12
12
|
} as const;
|
|
13
13
|
|
|
14
|
-
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof
|
|
14
|
+
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof Text>;
|
|
15
15
|
|
|
16
16
|
export const Heading = memo(
|
|
17
|
-
forwardRef<ComponentRef<typeof
|
|
17
|
+
forwardRef<ComponentRef<typeof Text>, HeadingProps>(function Heading(
|
|
18
18
|
{ className, size = 'lg', ...props },
|
|
19
19
|
ref,
|
|
20
20
|
) {
|
|
21
21
|
return (
|
|
22
|
-
<
|
|
22
|
+
<Text
|
|
23
23
|
role="heading"
|
|
24
24
|
aria-level={sizeToLevel[size ?? 'lg']}
|
|
25
25
|
className={cn(headingStyle({ size }), className)}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { forwardRef, type ComponentPropsWithoutRef, type ComponentRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Text as RNText } from 'react-native';
|
|
3
3
|
import { cn } from '@cdx-ui/utils';
|
|
4
4
|
import { textStyle, TextVariantProps } from './styles';
|
|
5
5
|
|
|
6
|
-
export type TextProps = TextVariantProps & ComponentPropsWithoutRef<typeof
|
|
6
|
+
export type TextProps = TextVariantProps & ComponentPropsWithoutRef<typeof RNText>;
|
|
7
7
|
|
|
8
|
-
export const Text = forwardRef<ComponentRef<typeof
|
|
8
|
+
export const Text = forwardRef<ComponentRef<typeof RNText>, TextProps>(function Text(
|
|
9
9
|
{ className, size = 'md', ...props },
|
|
10
10
|
ref,
|
|
11
11
|
) {
|
|
12
|
-
return <
|
|
12
|
+
return <RNText className={cn(textStyle({ size }), className)} {...props} ref={ref} />;
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
Text.displayName = 'Text';
|