@cdx-ui/components 0.0.1-alpha.10 → 0.0.1-alpha.12
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/Checkbox/styles.js +1 -1
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Heading/index.js +35 -0
- package/lib/commonjs/components/Heading/index.js.map +1 -0
- package/lib/commonjs/components/Heading/styles.js +23 -0
- package/lib/commonjs/components/Heading/styles.js.map +1 -0
- package/lib/commonjs/components/Link/index.js +38 -0
- package/lib/commonjs/components/Link/index.js.map +1 -0
- package/lib/commonjs/components/Link/styles.js +9 -0
- package/lib/commonjs/components/Link/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +18 -9
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +23 -0
- package/lib/commonjs/components/Text/styles.js.map +1 -0
- package/lib/commonjs/components/index.js +24 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +1 -1
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Heading/index.js +31 -0
- package/lib/module/components/Heading/index.js.map +1 -0
- package/lib/module/components/Heading/styles.js +19 -0
- package/lib/module/components/Heading/styles.js.map +1 -0
- package/lib/module/components/Link/index.js +29 -0
- package/lib/module/components/Link/index.js.map +1 -0
- package/lib/module/components/Link/styles.js +5 -0
- package/lib/module/components/Link/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +19 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +19 -0
- package/lib/module/components/Text/styles.js.map +1 -0
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +2 -2
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
- package/lib/typescript/components/Heading/index.d.ts +6 -0
- package/lib/typescript/components/Heading/index.d.ts.map +1 -0
- package/lib/typescript/components/Heading/styles.d.ts +6 -0
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
- package/lib/typescript/components/Input/styles.d.ts +4 -4
- package/lib/typescript/components/Link/index.d.ts +8 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -0
- package/lib/typescript/components/Link/styles.d.ts +2 -0
- package/lib/typescript/components/Link/styles.d.ts.map +1 -0
- package/lib/typescript/components/Select/styles.d.ts +5 -5
- package/lib/typescript/components/Stack/styles.d.ts +2 -2
- package/lib/typescript/components/Switch/styles.d.ts +2 -2
- package/lib/typescript/components/Text/index.d.ts +5 -1
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +6 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +2 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/components/Checkbox/styles.ts +1 -1
- package/src/components/Heading/index.tsx +33 -0
- package/src/components/Heading/styles.tsx +25 -0
- package/src/components/Link/index.tsx +27 -0
- package/src/components/Link/styles.ts +7 -0
- package/src/components/Text/index.tsx +15 -0
- package/src/components/Text/styles.tsx +25 -0
- package/src/components/index.ts +2 -0
- package/lib/commonjs/components/Text/Text.js +0 -30
- package/lib/commonjs/components/Text/Text.js.map +0 -1
- package/lib/module/components/Text/Text.js +0 -26
- package/lib/module/components/Text/Text.js.map +0 -1
- package/lib/typescript/components/Text/Text.d.ts +0 -11
- package/lib/typescript/components/Text/Text.d.ts.map +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -1
|
@@ -18,7 +18,7 @@ const checkboxRootVariants = exports.checkboxRootVariants = (0, _classVarianceAu
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
const checkboxIndicatorVariants = exports.checkboxIndicatorVariants = (0, _classVarianceAuthority.cva)(['items-center justify-center', 'rounded', 'border-2 border-neutral-border-strong', 'data-[checked=true]:bg-blue-500 data-[checked=true]:border-blue-500', 'data-[disabled=true]:opacity-60', 'data-[invalid=true]:border-red-500', 'data-[checked=true]:data-[invalid=true]:bg-red-500 data-[checked=true]:data-[invalid=true]:border-red-500', _reactNative.Platform.select({
|
|
21
|
-
web: ['transition-colors duration-150', 'data-[hover=true]:border-zinc-500 data-[hover=true]:bg-zinc-50', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-blue-300/50 data-[focus-visible=true]:ring-offset-1', 'data-[invalid=true]:data-[hover=true]:border-red-400', 'data-[invalid=true]:data-[focus-visible=true]:ring-red-300/50'].join(' '),
|
|
21
|
+
web: ['transition-colors duration-150', 'data-[hover=true]:data-[checked=false]:border-zinc-500 data-[hover=true]:data-[checked=false]:bg-zinc-50', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-blue-300/50 data-[focus-visible=true]:ring-offset-1', 'data-[invalid=true]:data-[hover=true]:border-red-400', 'data-[invalid=true]:data-[focus-visible=true]:ring-red-300/50'].join(' '),
|
|
22
22
|
default: ''
|
|
23
23
|
})], {
|
|
24
24
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","checkboxRootVariants","exports","cva","variants","size","sm","md","defaultVariants","checkboxIndicatorVariants","Platform","select","web","join","default","checkboxIconVariants","checkboxLabelVariants","checkboxGroupVariants","direction","column","row"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAEO,MAAME,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAAE,2BAAG,EACrC,CACE,uBAAuB,EACvB,yEAAyE,CAC1E,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAEM,MAAMI,yBAAyB,GAAAP,OAAA,CAAAO,yBAAA,GAAG,IAAAN,2BAAG,EAC1C,CACE,6BAA6B,EAC7B,SAAS,EACT,uCAAuC,EACvC,qEAAqE,EACrE,iCAAiC,EACjC,oCAAoC,EACpC,2GAA2G,EAC3GO,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,CACH,gCAAgC,EAChC,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","checkboxRootVariants","exports","cva","variants","size","sm","md","defaultVariants","checkboxIndicatorVariants","Platform","select","web","join","default","checkboxIconVariants","checkboxLabelVariants","checkboxGroupVariants","direction","column","row"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAEO,MAAME,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAAE,2BAAG,EACrC,CACE,uBAAuB,EACvB,yEAAyE,CAC1E,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAEM,MAAMI,yBAAyB,GAAAP,OAAA,CAAAO,yBAAA,GAAG,IAAAN,2BAAG,EAC1C,CACE,6BAA6B,EAC7B,SAAS,EACT,uCAAuC,EACvC,qEAAqE,EACrE,iCAAiC,EACjC,oCAAoC,EACpC,2GAA2G,EAC3GO,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,CACH,gCAAgC,EAChC,0GAA0G,EAC1G,qHAAqH,EACrH,sDAAsD,EACtD,+DAA+D,CAChE,CAACC,IAAI,CAAC,GAAG,CAAC;EACXC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEV,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAEM,MAAMU,oBAAoB,GAAAb,OAAA,CAAAa,oBAAA,GAAG,IAAAZ,2BAAG,EAAC,CAAC,YAAY,CAAC,EAAE;EACtDC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEK,MAAMW,qBAAqB,GAAAd,OAAA,CAAAc,qBAAA,GAAG,IAAAb,2BAAG,EACtC,CAAC,2BAA2B,EAAE,iDAAiD,CAAC,EAChF;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAEM,MAAMY,qBAAqB,GAAAf,OAAA,CAAAe,qBAAA,GAAG,IAAAd,2BAAG,EAAC,EAAE,EAAE;EAC3CC,QAAQ,EAAE;IACRc,SAAS,EAAE;MACTC,MAAM,EAAE,OAAO;MACfC,GAAG,EAAE;IACP;EACF,CAAC;EACDZ,eAAe,EAAE;IACfU,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Heading = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _htmlElements = require("@expo/html-elements");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const sizeToLevel = {
|
|
13
|
+
xl: 1,
|
|
14
|
+
lg: 2,
|
|
15
|
+
md: 3,
|
|
16
|
+
sm: 4,
|
|
17
|
+
xs: 5
|
|
18
|
+
};
|
|
19
|
+
const Heading = exports.Heading = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.forwardRef)(function Heading({
|
|
20
|
+
className,
|
|
21
|
+
size = 'lg',
|
|
22
|
+
...props
|
|
23
|
+
}, ref) {
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_htmlElements.Span, {
|
|
25
|
+
role: "heading",
|
|
26
|
+
"aria-level": sizeToLevel[size ?? 'lg'],
|
|
27
|
+
className: (0, _utils.cn)((0, _styles.headingStyle)({
|
|
28
|
+
size
|
|
29
|
+
}), className),
|
|
30
|
+
...props,
|
|
31
|
+
ref: ref
|
|
32
|
+
});
|
|
33
|
+
}));
|
|
34
|
+
Heading.displayName = 'Heading';
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_htmlElements","_utils","_styles","_jsxRuntime","sizeToLevel","xl","lg","md","sm","xs","Heading","exports","memo","forwardRef","className","size","props","ref","jsx","Span","role","cn","headingStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,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,aAAA,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":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.headingStyle = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
+
const headingStyle = exports.headingStyle = (0, _classVarianceAuthority.cva)(['font-sans text-foreground font-bold font-heading tracking-sm my-0', _reactNative.Platform.select({
|
|
10
|
+
web: 'bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word',
|
|
11
|
+
default: ''
|
|
12
|
+
})], {
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xl: 'text-6xl',
|
|
16
|
+
lg: 'text-5xl',
|
|
17
|
+
md: 'text-4xl',
|
|
18
|
+
sm: 'text-3xl',
|
|
19
|
+
xs: 'text-2xl'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","headingStyle","exports","cva","Platform","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Heading/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,2BAAG,EAC7B,CACE,mEAAmE,EACnEC,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,mKAAmK;EACxKC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Link = void 0;
|
|
7
|
+
Object.defineProperty(exports, "LinkProvider", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _primitives.LinkProvider;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _react = require("react");
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
16
|
+
var _utils = require("@cdx-ui/utils");
|
|
17
|
+
var _styles = require("./styles");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
const LinkPrimitive = (0, _primitives.createLink)({
|
|
20
|
+
Root: _reactNative.Pressable
|
|
21
|
+
});
|
|
22
|
+
const Link = exports.Link = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
style,
|
|
26
|
+
...props
|
|
27
|
+
}, ref) => {
|
|
28
|
+
const rootClassName = (0, _utils.cn)((0, _styles.linkRootVariants)(), className);
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkPrimitive, {
|
|
30
|
+
ref: ref,
|
|
31
|
+
className: rootClassName,
|
|
32
|
+
style: style,
|
|
33
|
+
...props,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
Link.displayName = 'Link';
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_styles","_jsxRuntime","LinkPrimitive","createLink","Root","Pressable","Link","exports","forwardRef","className","children","style","props","ref","rootClassName","cn","linkRootVariants","jsx","displayName"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAA4C,IAAAK,WAAA,GAAAL,OAAA;AAI5C,MAAMM,aAAa,GAAG,IAAAC,sBAAU,EAAC;EAC/BC,IAAI,EAAEC;AACR,CAAC,CAAC;AAMK,MAAMC,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,iBAAU,EAAkB,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjG,MAAMC,aAAa,GAAG,IAAAC,SAAE,EAAC,IAAAC,wBAAgB,EAAC,CAAC,EAAEP,SAAS,CAAC;EAEvD,oBACE,IAAAR,WAAA,CAAAgB,GAAA,EAACf,aAAa;IAACW,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,aAAc;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EACvEA;EAAQ,CACI,CAAC;AAEpB,CAAC,CAAC;AAEFJ,IAAI,CAACY,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.linkRootVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const linkRootVariants = exports.linkRootVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-blue-300/50']);
|
|
9
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","linkRootVariants","exports","cva"],"sourceRoot":"../../../../src","sources":["components/Link/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,IAAAE,2BAAG,EAAC,CAClC,uBAAuB,EACvB,wEAAwE,EACxE,qFAAqF,CACtF,CAAC","ignoreList":[]}
|
|
@@ -3,15 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
exports.Text = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _htmlElements = require("@expo/html-elements");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const Text = exports.Text = /*#__PURE__*/(0, _react.forwardRef)(function Text({
|
|
13
|
+
className,
|
|
14
|
+
size = 'md',
|
|
15
|
+
...props
|
|
16
|
+
}, ref) {
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_htmlElements.Span, {
|
|
18
|
+
className: (0, _utils.cn)((0, _styles.textStyle)({
|
|
19
|
+
size
|
|
20
|
+
}), className),
|
|
21
|
+
...props,
|
|
22
|
+
ref: ref
|
|
15
23
|
});
|
|
16
24
|
});
|
|
25
|
+
Text.displayName = 'Text';
|
|
17
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","require","_htmlElements","_utils","_styles","_jsxRuntime","Text","exports","forwardRef","className","size","props","ref","jsx","Span","cn","textStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,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,EAAuC,SAASF,IAAIA,CAChF;EAAEG,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBAAO,IAAAP,WAAA,CAAAQ,GAAA,EAACX,aAAA,CAAAY,IAAI;IAACL,SAAS,EAAE,IAAAM,SAAE,EAAC,IAAAC,iBAAS,EAAC;MAAEN;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AACrF,CAAC,CAAC;AAEFN,IAAI,CAACW,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.textStyle = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
+
const textStyle = exports.textStyle = (0, _classVarianceAuthority.cva)(['text-foreground font-body', _reactNative.Platform.select({
|
|
10
|
+
web: 'font-sans tracking-sm my-0 bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word',
|
|
11
|
+
default: ''
|
|
12
|
+
})], {
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xl: 'text-xl',
|
|
16
|
+
lg: 'text-lg',
|
|
17
|
+
md: 'text-base',
|
|
18
|
+
sm: 'text-sm',
|
|
19
|
+
xs: 'text-xs'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","textStyle","exports","cva","Platform","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAEO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,2BAAG,EAC1B,CACE,2BAA2B,EAC3BC,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,8LAA8L;EACnMC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,WAAW;MACfC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -67,6 +67,18 @@ Object.keys(_Input).forEach(function (key) {
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
+
var _Link = require("./Link");
|
|
71
|
+
Object.keys(_Link).forEach(function (key) {
|
|
72
|
+
if (key === "default" || key === "__esModule") return;
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
74
|
+
if (key in exports && exports[key] === _Link[key]) return;
|
|
75
|
+
Object.defineProperty(exports, key, {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () {
|
|
78
|
+
return _Link[key];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
70
82
|
var _Select = require("./Select");
|
|
71
83
|
Object.keys(_Select).forEach(function (key) {
|
|
72
84
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -92,6 +104,18 @@ Object.keys(_Switch).forEach(function (key) {
|
|
|
92
104
|
});
|
|
93
105
|
});
|
|
94
106
|
var _Stack = require("./Stack");
|
|
107
|
+
var _Heading = require("./Heading");
|
|
108
|
+
Object.keys(_Heading).forEach(function (key) {
|
|
109
|
+
if (key === "default" || key === "__esModule") return;
|
|
110
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
111
|
+
if (key in exports && exports[key] === _Heading[key]) return;
|
|
112
|
+
Object.defineProperty(exports, key, {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () {
|
|
115
|
+
return _Heading[key];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
95
119
|
var _Text = require("./Text");
|
|
96
120
|
Object.keys(_Text).forEach(function (key) {
|
|
97
121
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Box","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Button","_Checkbox","_Input","_Select","_Switch","_Stack","_Text"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,IAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,IAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,IAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,OAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,OAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,OAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,OAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,SAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,SAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,SAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,SAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,MAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,MAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAW,MAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,MAAA,CAAAX,GAAA;IAAA;EAAA;AAAA;AACA,IAAAY,
|
|
1
|
+
{"version":3,"names":["_Box","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Button","_Checkbox","_Input","_Link","_Select","_Switch","_Stack","_Heading","_Text"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -14,7 +14,7 @@ export const checkboxRootVariants = cva(['flex-row items-center', 'data-[disable
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
export const checkboxIndicatorVariants = cva(['items-center justify-center', 'rounded', 'border-2 border-neutral-border-strong', 'data-[checked=true]:bg-blue-500 data-[checked=true]:border-blue-500', 'data-[disabled=true]:opacity-60', 'data-[invalid=true]:border-red-500', 'data-[checked=true]:data-[invalid=true]:bg-red-500 data-[checked=true]:data-[invalid=true]:border-red-500', Platform.select({
|
|
17
|
-
web: ['transition-colors duration-150', 'data-[hover=true]:border-zinc-500 data-[hover=true]:bg-zinc-50', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-blue-300/50 data-[focus-visible=true]:ring-offset-1', 'data-[invalid=true]:data-[hover=true]:border-red-400', 'data-[invalid=true]:data-[focus-visible=true]:ring-red-300/50'].join(' '),
|
|
17
|
+
web: ['transition-colors duration-150', 'data-[hover=true]:data-[checked=false]:border-zinc-500 data-[hover=true]:data-[checked=false]:bg-zinc-50', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-blue-300/50 data-[focus-visible=true]:ring-offset-1', 'data-[invalid=true]:data-[hover=true]:border-red-400', 'data-[invalid=true]:data-[focus-visible=true]:ring-red-300/50'].join(' '),
|
|
18
18
|
default: ''
|
|
19
19
|
})], {
|
|
20
20
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","checkboxRootVariants","variants","size","sm","md","defaultVariants","checkboxIndicatorVariants","select","web","join","default","checkboxIconVariants","checkboxLabelVariants","checkboxGroupVariants","direction","column","row"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,oBAAoB,GAAGD,GAAG,CACrC,CACE,uBAAuB,EACvB,yEAAyE,CAC1E,EACD;EACEE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMI,yBAAyB,GAAGP,GAAG,CAC1C,CACE,6BAA6B,EAC7B,SAAS,EACT,uCAAuC,EACvC,qEAAqE,EACrE,iCAAiC,EACjC,oCAAoC,EACpC,2GAA2G,EAC3GD,QAAQ,CAACS,MAAM,CAAC;EACdC,GAAG,EAAE,CACH,gCAAgC,EAChC,
|
|
1
|
+
{"version":3,"names":["Platform","cva","checkboxRootVariants","variants","size","sm","md","defaultVariants","checkboxIndicatorVariants","select","web","join","default","checkboxIconVariants","checkboxLabelVariants","checkboxGroupVariants","direction","column","row"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,oBAAoB,GAAGD,GAAG,CACrC,CACE,uBAAuB,EACvB,yEAAyE,CAC1E,EACD;EACEE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMI,yBAAyB,GAAGP,GAAG,CAC1C,CACE,6BAA6B,EAC7B,SAAS,EACT,uCAAuC,EACvC,qEAAqE,EACrE,iCAAiC,EACjC,oCAAoC,EACpC,2GAA2G,EAC3GD,QAAQ,CAACS,MAAM,CAAC;EACdC,GAAG,EAAE,CACH,gCAAgC,EAChC,0GAA0G,EAC1G,qHAAqH,EACrH,sDAAsD,EACtD,+DAA+D,CAChE,CAACC,IAAI,CAAC,GAAG,CAAC;EACXC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACET,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMS,oBAAoB,GAAGZ,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE;EACtDE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMU,qBAAqB,GAAGb,GAAG,CACtC,CAAC,2BAA2B,EAAE,iDAAiD,CAAC,EAChF;EACEE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMW,qBAAqB,GAAGd,GAAG,CAAC,EAAE,EAAE;EAC3CE,QAAQ,EAAE;IACRa,SAAS,EAAE;MACTC,MAAM,EAAE,OAAO;MACfC,GAAG,EAAE;IACP;EACF,CAAC;EACDX,eAAe,EAAE;IACfS,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, memo } from 'react';
|
|
4
|
+
import { Span } from '@expo/html-elements';
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { headingStyle } from './styles';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const sizeToLevel = {
|
|
9
|
+
xl: 1,
|
|
10
|
+
lg: 2,
|
|
11
|
+
md: 3,
|
|
12
|
+
sm: 4,
|
|
13
|
+
xs: 5
|
|
14
|
+
};
|
|
15
|
+
export const Heading = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Heading({
|
|
16
|
+
className,
|
|
17
|
+
size = 'lg',
|
|
18
|
+
...props
|
|
19
|
+
}, ref) {
|
|
20
|
+
return /*#__PURE__*/_jsx(Span, {
|
|
21
|
+
role: "heading",
|
|
22
|
+
"aria-level": sizeToLevel[size ?? 'lg'],
|
|
23
|
+
className: cn(headingStyle({
|
|
24
|
+
size
|
|
25
|
+
}), className),
|
|
26
|
+
...props,
|
|
27
|
+
ref: ref
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
Heading.displayName = 'Heading';
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","Span","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,qBAAqB;AAC1C,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":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
export const headingStyle = cva(['font-sans text-foreground font-bold font-heading tracking-sm my-0', Platform.select({
|
|
6
|
+
web: 'bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word',
|
|
7
|
+
default: ''
|
|
8
|
+
})], {
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xl: 'text-6xl',
|
|
12
|
+
lg: 'text-5xl',
|
|
13
|
+
md: 'text-4xl',
|
|
14
|
+
sm: 'text-3xl',
|
|
15
|
+
xs: 'text-2xl'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","headingStyle","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Heading/styles.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,YAAY,GAAGD,GAAG,CAC7B,CACE,mEAAmE,EACnED,QAAQ,CAACG,MAAM,CAAC;EACdC,GAAG,EAAE,mKAAmK;EACxKC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE,UAAU;MACdC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable } from 'react-native';
|
|
5
|
+
import { createLink } from '@cdx-ui/primitives';
|
|
6
|
+
import { cn } from '@cdx-ui/utils';
|
|
7
|
+
import { linkRootVariants } from './styles';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
export { LinkProvider } from '@cdx-ui/primitives';
|
|
10
|
+
const LinkPrimitive = createLink({
|
|
11
|
+
Root: Pressable
|
|
12
|
+
});
|
|
13
|
+
export const Link = /*#__PURE__*/forwardRef(({
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
style,
|
|
17
|
+
...props
|
|
18
|
+
}, ref) => {
|
|
19
|
+
const rootClassName = cn(linkRootVariants(), className);
|
|
20
|
+
return /*#__PURE__*/_jsx(LinkPrimitive, {
|
|
21
|
+
ref: ref,
|
|
22
|
+
className: rootClassName,
|
|
23
|
+
style: style,
|
|
24
|
+
...props,
|
|
25
|
+
children: children
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
Link.displayName = 'Link';
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","createLink","cn","linkRootVariants","jsx","_jsx","LinkProvider","LinkPrimitive","Root","Link","className","children","style","props","ref","rootClassName","displayName"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,SAAS,QAAmB,cAAc;AACnD,SAASC,UAAU,QAAyB,oBAAoB;AAChE,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,gBAAgB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5C,SAASC,YAAY,QAA0C,oBAAoB;AAEnF,MAAMC,aAAa,GAAGN,UAAU,CAAC;EAC/BO,IAAI,EAAER;AACR,CAAC,CAAC;AAMF,OAAO,MAAMS,IAAI,gBAAGV,UAAU,CAAkB,CAAC;EAAEW,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjG,MAAMC,aAAa,GAAGb,EAAE,CAACC,gBAAgB,CAAC,CAAC,EAAEO,SAAS,CAAC;EAEvD,oBACEL,IAAA,CAACE,aAAa;IAACO,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,aAAc;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EACvEA;EAAQ,CACI,CAAC;AAEpB,CAAC,CAAC;AAEFF,IAAI,CAACO,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
export const linkRootVariants = cva(['flex-row items-center', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-blue-300/50']);
|
|
5
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","linkRootVariants"],"sourceRoot":"../../../../src","sources":["components/Link/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAE9C,OAAO,MAAMC,gBAAgB,GAAGD,GAAG,CAAC,CAClC,uBAAuB,EACvB,wEAAwE,EACxE,qFAAqF,CACtF,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Span } from '@expo/html-elements';
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { textStyle } from './styles';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const Text = /*#__PURE__*/forwardRef(function Text({
|
|
9
|
+
className,
|
|
10
|
+
size = 'md',
|
|
11
|
+
...props
|
|
12
|
+
}, ref) {
|
|
13
|
+
return /*#__PURE__*/_jsx(Span, {
|
|
14
|
+
className: cn(textStyle({
|
|
15
|
+
size
|
|
16
|
+
}), className),
|
|
17
|
+
...props,
|
|
18
|
+
ref: ref
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
Text.displayName = 'Text';
|
|
4
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Text/index.
|
|
1
|
+
{"version":3,"names":["forwardRef","Span","cn","textStyle","jsx","_jsx","Text","className","size","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAA0D,OAAO;AACpF,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,SAAS,QAA0B,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIvD,OAAO,MAAMC,IAAI,gBAAGN,UAAU,CAAuC,SAASM,IAAIA,CAChF;EAAEC,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBAAOL,IAAA,CAACJ,IAAI;IAACM,SAAS,EAAEL,EAAE,CAACC,SAAS,CAAC;MAAEK;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AACrF,CAAC,CAAC;AAEFJ,IAAI,CAACK,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
export const textStyle = cva(['text-foreground font-body', Platform.select({
|
|
6
|
+
web: 'font-sans tracking-sm my-0 bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word',
|
|
7
|
+
default: ''
|
|
8
|
+
})], {
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xl: 'text-xl',
|
|
12
|
+
lg: 'text-lg',
|
|
13
|
+
md: 'text-base',
|
|
14
|
+
sm: 'text-sm',
|
|
15
|
+
xs: 'text-xs'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","textStyle","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,SAAS,GAAGD,GAAG,CAC1B,CACE,2BAA2B,EAC3BD,QAAQ,CAACG,MAAM,CAAC;EACdC,GAAG,EAAE,8LAA8L;EACnMC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,WAAW;MACfC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -4,8 +4,10 @@ export * from './Box';
|
|
|
4
4
|
export * from './Button';
|
|
5
5
|
export * from './Checkbox';
|
|
6
6
|
export * from './Input';
|
|
7
|
+
export * from './Link';
|
|
7
8
|
export * from './Select';
|
|
8
9
|
export * from './Switch';
|
|
9
10
|
export { HStack, VStack } from './Stack';
|
|
11
|
+
export * from './Heading';
|
|
10
12
|
export * from './Text';
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ","ignoreList":[]}
|
|
@@ -2,13 +2,13 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
export declare const buttonRootVariants: (props?: ({
|
|
3
3
|
variant?: "solid" | "subtle" | "outline" | "ghost" | null | undefined;
|
|
4
4
|
color?: "primary" | "secondary" | "success" | "danger" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
6
6
|
fullWidth?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export declare const buttonTextVariants: (props?: ({
|
|
9
9
|
variant?: "solid" | "subtle" | "outline" | "ghost" | null | undefined;
|
|
10
10
|
color?: "primary" | "secondary" | "success" | "danger" | null | undefined;
|
|
11
|
-
size?: "
|
|
11
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
export declare const buttonSpinnerVariants: (props?: ({
|
|
14
14
|
variant?: "solid" | "subtle" | "outline" | "ghost" | null | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const checkboxRootVariants: (props?: ({
|
|
3
|
-
size?: "
|
|
3
|
+
size?: "md" | "sm" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export declare const checkboxIndicatorVariants: (props?: ({
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "md" | "sm" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export declare const checkboxIconVariants: (props?: ({
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "md" | "sm" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
export declare const checkboxLabelVariants: (props?: ({
|
|
12
|
-
size?: "
|
|
12
|
+
size?: "md" | "sm" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export declare const checkboxGroupVariants: (props?: ({
|
|
15
15
|
direction?: "row" | "column" | null | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { Span } from '@expo/html-elements';
|
|
3
|
+
import { type HeadingVariantProps } from './styles';
|
|
4
|
+
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof Span>;
|
|
5
|
+
export declare const Heading: import("react").NamedExoticComponent<HeadingVariantProps & Omit<Omit<import("react-native").TextProps & import("react").ClassAttributes<typeof import("react-native").Text>, "style"> & import("@expo/html-elements/build/primitives/Text").WebTextProps, "ref"> & import("react").RefAttributes<never>>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,qBAAqB,CAAC;AAE3C,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,0SAenB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const headingStyle: (props?: ({
|
|
3
|
+
size?: "xl" | "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export type HeadingVariantProps = VariantProps<typeof headingStyle>;
|
|
6
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Heading/styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;8EAmBxB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const inputRootVariants: (props?: ({
|
|
3
3
|
variant?: "outline" | "underlined" | null | undefined;
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export declare const inputFieldVariants: (props?: ({
|
|
7
|
-
size?: "
|
|
7
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export declare const inputSlotVariants: (props?: ({
|
|
10
|
-
size?: "
|
|
10
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
export declare const inputIconVariants: (props?: ({
|
|
13
|
-
size?: "
|
|
13
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
export declare const inputFieldPlaceholderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
16
|
export type InputVariantProps = VariantProps<typeof inputRootVariants>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type View } from 'react-native';
|
|
2
|
+
import { type ILinkProps } from '@cdx-ui/primitives';
|
|
3
|
+
export { LinkProvider, type LinkConfig, type LinkAction } from '@cdx-ui/primitives';
|
|
4
|
+
export interface LinkProps extends ILinkProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<View>>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIjE,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;CACpB;AAED,eAAO,MAAM,IAAI,4FAQf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,oFAI3B,CAAC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const selectTriggerVariants: (props?: ({
|
|
3
3
|
variant?: "outline" | "ghost" | "filled" | null | undefined;
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export declare const selectValueVariants: (props?: ({
|
|
7
7
|
variant?: "outline" | "ghost" | "filled" | null | undefined;
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
export declare const selectIconVariants: (props?: ({
|
|
11
11
|
variant?: "outline" | "ghost" | "filled" | null | undefined;
|
|
12
|
-
size?: "
|
|
12
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export declare const selectContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
15
|
export declare const selectItemVariants: (props?: ({
|
|
16
|
-
size?: "
|
|
16
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
17
17
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
18
|
export declare const selectItemLabelVariants: (props?: ({
|
|
19
|
-
size?: "
|
|
19
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
20
20
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
21
|
export type SelectVariantProps = VariantProps<typeof selectTriggerVariants>;
|
|
22
22
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export type StackSpace = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
2
|
export declare const hStackRootVariants: (props?: ({
|
|
3
3
|
reversed?: boolean | null | undefined;
|
|
4
|
-
space?: "
|
|
4
|
+
space?: "xl" | "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export declare const vStackRootVariants: (props?: ({
|
|
7
7
|
reversed?: boolean | null | undefined;
|
|
8
|
-
space?: "
|
|
8
|
+
space?: "xl" | "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -12,14 +12,14 @@ export declare const switchIosBgVariants: (props?: ({
|
|
|
12
12
|
isInvalid?: boolean | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export declare const switchTrackVariants: (props?: ({
|
|
15
|
-
size?: "
|
|
15
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
16
16
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
17
|
export declare const switchWebTrackColorVariants: (props?: ({
|
|
18
18
|
isChecked?: boolean | null | undefined;
|
|
19
19
|
isInvalid?: boolean | null | undefined;
|
|
20
20
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
21
|
export declare const switchThumbVariants: (props?: ({
|
|
22
|
-
size?: "
|
|
22
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
23
23
|
isChecked?: boolean | null | undefined;
|
|
24
24
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
25
25
|
export type SwitchVariantProps = VariantProps<typeof switchTrackVariants>;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { Span } from '@expo/html-elements';
|
|
3
|
+
import { TextVariantProps } from './styles';
|
|
4
|
+
export type TextProps = TextVariantProps & ComponentPropsWithoutRef<typeof Span>;
|
|
5
|
+
export declare const Text: import("react").ForwardRefExoticComponent<TextVariantProps & Omit<Omit<import("react-native").TextProps & import("react").ClassAttributes<typeof import("react-native").Text>, "style"> & import("@expo/html-elements/build/primitives/Text").WebTextProps, "ref"> & import("react").RefAttributes<never>>;
|
|
2
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/index.
|
|
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,qBAAqB,CAAC;AAE3C,OAAO,EAAa,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,CAAC;AAEjF,eAAO,MAAM,IAAI,4SAKf,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const textStyle: (props?: ({
|
|
3
|
+
size?: "xl" | "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export type TextVariantProps = VariantProps<typeof textStyle>;
|
|
6
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,SAAS;;8EAmBrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -2,8 +2,10 @@ export * from './Box';
|
|
|
2
2
|
export * from './Button';
|
|
3
3
|
export * from './Checkbox';
|
|
4
4
|
export * from './Input';
|
|
5
|
+
export * from './Link';
|
|
5
6
|
export * from './Select';
|
|
6
7
|
export * from './Switch';
|
|
7
8
|
export { HStack, VStack } from './Stack';
|
|
9
|
+
export * from './Heading';
|
|
8
10
|
export * from './Text';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,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.12",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -58,10 +58,11 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
+
"@expo/html-elements": "55.0.3",
|
|
61
62
|
"class-variance-authority": "^0.7.1",
|
|
62
63
|
"uniwind": "1.4.1",
|
|
63
|
-
"@cdx-ui/primitives": "0.0.1-alpha.
|
|
64
|
-
"@cdx-ui/utils": "0.0.1-alpha.
|
|
64
|
+
"@cdx-ui/primitives": "0.0.1-alpha.12",
|
|
65
|
+
"@cdx-ui/utils": "0.0.1-alpha.12"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
68
|
"@types/react": "*",
|
|
@@ -31,7 +31,7 @@ export const checkboxIndicatorVariants = cva(
|
|
|
31
31
|
Platform.select({
|
|
32
32
|
web: [
|
|
33
33
|
'transition-colors duration-150',
|
|
34
|
-
'data-[hover=true]:border-zinc-500 data-[hover=true]:bg-zinc-50',
|
|
34
|
+
'data-[hover=true]:data-[checked=false]:border-zinc-500 data-[hover=true]:data-[checked=false]:bg-zinc-50',
|
|
35
35
|
'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-blue-300/50 data-[focus-visible=true]:ring-offset-1',
|
|
36
36
|
'data-[invalid=true]:data-[hover=true]:border-red-400',
|
|
37
37
|
'data-[invalid=true]:data-[focus-visible=true]:ring-red-300/50',
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { forwardRef, memo, type ComponentRef, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { Span } from '@expo/html-elements';
|
|
3
|
+
import { cn } from '@cdx-ui/utils';
|
|
4
|
+
import { headingStyle, type HeadingVariantProps } from './styles';
|
|
5
|
+
|
|
6
|
+
const sizeToLevel = {
|
|
7
|
+
xl: 1,
|
|
8
|
+
lg: 2,
|
|
9
|
+
md: 3,
|
|
10
|
+
sm: 4,
|
|
11
|
+
xs: 5,
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof Span>;
|
|
15
|
+
|
|
16
|
+
export const Heading = memo(
|
|
17
|
+
forwardRef<ComponentRef<typeof Span>, HeadingProps>(function Heading(
|
|
18
|
+
{ className, size = 'lg', ...props },
|
|
19
|
+
ref,
|
|
20
|
+
) {
|
|
21
|
+
return (
|
|
22
|
+
<Span
|
|
23
|
+
role="heading"
|
|
24
|
+
aria-level={sizeToLevel[size ?? 'lg']}
|
|
25
|
+
className={cn(headingStyle({ size }), className)}
|
|
26
|
+
{...props}
|
|
27
|
+
ref={ref}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
Heading.displayName = 'Heading';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
export const headingStyle = cva(
|
|
5
|
+
[
|
|
6
|
+
'font-sans text-foreground font-bold font-heading tracking-sm my-0',
|
|
7
|
+
Platform.select({
|
|
8
|
+
web: 'bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word',
|
|
9
|
+
default: '',
|
|
10
|
+
}),
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xl: 'text-6xl',
|
|
16
|
+
lg: 'text-5xl',
|
|
17
|
+
md: 'text-4xl',
|
|
18
|
+
sm: 'text-3xl',
|
|
19
|
+
xs: 'text-2xl',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export type HeadingVariantProps = VariantProps<typeof headingStyle>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { Pressable, type View } from 'react-native';
|
|
3
|
+
import { createLink, type ILinkProps } from '@cdx-ui/primitives';
|
|
4
|
+
import { cn } from '@cdx-ui/utils';
|
|
5
|
+
import { linkRootVariants } from './styles';
|
|
6
|
+
|
|
7
|
+
export { LinkProvider, type LinkConfig, type LinkAction } from '@cdx-ui/primitives';
|
|
8
|
+
|
|
9
|
+
const LinkPrimitive = createLink({
|
|
10
|
+
Root: Pressable,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export interface LinkProps extends ILinkProps {
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const Link = forwardRef<View, LinkProps>(({ className, children, style, ...props }, ref) => {
|
|
18
|
+
const rootClassName = cn(linkRootVariants(), className);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<LinkPrimitive ref={ref} className={rootClassName} style={style} {...props}>
|
|
22
|
+
{children}
|
|
23
|
+
</LinkPrimitive>
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
Link.displayName = 'Link';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
export const linkRootVariants = cva([
|
|
4
|
+
'flex-row items-center',
|
|
5
|
+
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
6
|
+
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-blue-300/50',
|
|
7
|
+
]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { forwardRef, type ComponentPropsWithoutRef, type ComponentRef } from 'react';
|
|
2
|
+
import { Span } from '@expo/html-elements';
|
|
3
|
+
import { cn } from '@cdx-ui/utils';
|
|
4
|
+
import { textStyle, TextVariantProps } from './styles';
|
|
5
|
+
|
|
6
|
+
export type TextProps = TextVariantProps & ComponentPropsWithoutRef<typeof Span>;
|
|
7
|
+
|
|
8
|
+
export const Text = forwardRef<ComponentRef<typeof Span>, TextProps>(function Text(
|
|
9
|
+
{ className, size = 'md', ...props },
|
|
10
|
+
ref,
|
|
11
|
+
) {
|
|
12
|
+
return <Span className={cn(textStyle({ size }), className)} {...props} ref={ref} />;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
Text.displayName = 'Text';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
export const textStyle = cva(
|
|
5
|
+
[
|
|
6
|
+
'text-foreground font-body',
|
|
7
|
+
Platform.select({
|
|
8
|
+
web: 'font-sans tracking-sm my-0 bg-transparent border-0 box-border display-inline list-none margin-0 padding-0 position-relative text-start no-underline whitespace-pre-wrap word-wrap-break-word',
|
|
9
|
+
default: '',
|
|
10
|
+
}),
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xl: 'text-xl',
|
|
16
|
+
lg: 'text-lg',
|
|
17
|
+
md: 'text-base',
|
|
18
|
+
sm: 'text-sm',
|
|
19
|
+
xs: 'text-xs',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export type TextVariantProps = VariantProps<typeof textStyle>;
|
package/src/components/index.ts
CHANGED
|
@@ -2,7 +2,9 @@ export * from './Box';
|
|
|
2
2
|
export * from './Button';
|
|
3
3
|
export * from './Checkbox';
|
|
4
4
|
export * from './Input';
|
|
5
|
+
export * from './Link';
|
|
5
6
|
export * from './Select';
|
|
6
7
|
export * from './Switch';
|
|
7
8
|
export { HStack, VStack } from './Stack';
|
|
9
|
+
export * from './Heading';
|
|
8
10
|
export * from './Text';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Text = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
const joinClassNames = (...parts) => parts.filter(Boolean).join(' ');
|
|
11
|
-
const buildTypographyClassName = variant => joinClassNames(`[font-family:var(--type-${variant}-family)]`, `[font-weight:var(--type-${variant}-weight)]`, `text-[var(--type-${variant}-size)]`, `leading-[var(--type-${variant}-lineHeight)]`, `tracking-[var(--type-${variant}-letterSpacing)]`, variant === 'overline' ? 'uppercase' : 'normal-case');
|
|
12
|
-
const Text = exports.Text = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
-
variant,
|
|
14
|
-
children,
|
|
15
|
-
style,
|
|
16
|
-
className,
|
|
17
|
-
...restProps
|
|
18
|
-
}, ref) => {
|
|
19
|
-
const variantKey = variant ?? 'body1';
|
|
20
|
-
const variantClassName = buildTypographyClassName(variantKey);
|
|
21
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
22
|
-
ref: ref,
|
|
23
|
-
className: joinClassNames(variantClassName, className),
|
|
24
|
-
style: style,
|
|
25
|
-
...restProps,
|
|
26
|
-
children: children
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
Text.displayName = 'Text';
|
|
30
|
-
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_jsxRuntime","joinClassNames","parts","filter","Boolean","join","buildTypographyClassName","variant","Text","exports","forwardRef","children","style","className","restProps","ref","variantKey","variantClassName","jsx","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/Text.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA6E,IAAAE,WAAA,GAAAF,OAAA;AA0B7E,MAAMG,cAAc,GAAGA,CAAC,GAAGC,KAAqC,KAC9DA,KAAK,CAACC,MAAM,CAACC,OAAO,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;AAEjC,MAAMC,wBAAwB,GAAIC,OAA0B,IAC1DN,cAAc,CACZ,2BAA2BM,OAAO,WAAW,EAC7C,2BAA2BA,OAAO,WAAW,EAC7C,oBAAoBA,OAAO,SAAS,EACpC,uBAAuBA,OAAO,eAAe,EAC7C,wBAAwBA,OAAO,kBAAkB,EACjDA,OAAO,KAAK,UAAU,GAAG,WAAW,GAAG,aACzC,CAAC;AAEI,MAAMC,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,iBAAU,EAC5B,CAAC;EAAEH,OAAO;EAAEI,QAAQ;EAAEC,KAAK;EAAEC,SAAS;EAAE,GAAGC;AAAU,CAAC,EAAEC,GAAG,KAAK;EAC9D,MAAMC,UAAU,GAAGT,OAAO,IAAI,OAAO;EACrC,MAAMU,gBAAgB,GAAGX,wBAAwB,CAACU,UAAU,CAAC;EAC7D,oBACE,IAAAhB,WAAA,CAAAkB,GAAA,EAACnB,YAAA,CAAAS,IAAM;IACLO,GAAG,EAAEA,GAAI;IACTF,SAAS,EAAEZ,cAAc,CAACgB,gBAAgB,EAAEJ,SAAS,CAAE;IACvDD,KAAK,EAAEA,KAAM;IAAA,GACTE,SAAS;IAAAH,QAAA,EAEZA;EAAQ,CACH,CAAC;AAEb,CACF,CAAC;AAEDH,IAAI,CAACW,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import { Text as RNText } from 'react-native';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const joinClassNames = (...parts) => parts.filter(Boolean).join(' ');
|
|
7
|
-
const buildTypographyClassName = variant => joinClassNames(`[font-family:var(--type-${variant}-family)]`, `[font-weight:var(--type-${variant}-weight)]`, `text-[var(--type-${variant}-size)]`, `leading-[var(--type-${variant}-lineHeight)]`, `tracking-[var(--type-${variant}-letterSpacing)]`, variant === 'overline' ? 'uppercase' : 'normal-case');
|
|
8
|
-
export const Text = /*#__PURE__*/forwardRef(({
|
|
9
|
-
variant,
|
|
10
|
-
children,
|
|
11
|
-
style,
|
|
12
|
-
className,
|
|
13
|
-
...restProps
|
|
14
|
-
}, ref) => {
|
|
15
|
-
const variantKey = variant ?? 'body1';
|
|
16
|
-
const variantClassName = buildTypographyClassName(variantKey);
|
|
17
|
-
return /*#__PURE__*/_jsx(RNText, {
|
|
18
|
-
ref: ref,
|
|
19
|
-
className: joinClassNames(variantClassName, className),
|
|
20
|
-
style: style,
|
|
21
|
-
...restProps,
|
|
22
|
-
children: children
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
Text.displayName = 'Text';
|
|
26
|
-
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Text","RNText","jsx","_jsx","joinClassNames","parts","filter","Boolean","join","buildTypographyClassName","variant","children","style","className","restProps","ref","variantKey","variantClassName","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/Text.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,IAAIC,MAAM,QAAuC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AA0B7E,MAAMC,cAAc,GAAGA,CAAC,GAAGC,KAAqC,KAC9DA,KAAK,CAACC,MAAM,CAACC,OAAO,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;AAEjC,MAAMC,wBAAwB,GAAIC,OAA0B,IAC1DN,cAAc,CACZ,2BAA2BM,OAAO,WAAW,EAC7C,2BAA2BA,OAAO,WAAW,EAC7C,oBAAoBA,OAAO,SAAS,EACpC,uBAAuBA,OAAO,eAAe,EAC7C,wBAAwBA,OAAO,kBAAkB,EACjDA,OAAO,KAAK,UAAU,GAAG,WAAW,GAAG,aACzC,CAAC;AAEH,OAAO,MAAMV,IAAI,gBAAGD,UAAU,CAC5B,CAAC;EAAEW,OAAO;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,SAAS;EAAE,GAAGC;AAAU,CAAC,EAAEC,GAAG,KAAK;EAC9D,MAAMC,UAAU,GAAGN,OAAO,IAAI,OAAO;EACrC,MAAMO,gBAAgB,GAAGR,wBAAwB,CAACO,UAAU,CAAC;EAC7D,oBACEb,IAAA,CAACF,MAAM;IACLc,GAAG,EAAEA,GAAI;IACTF,SAAS,EAAET,cAAc,CAACa,gBAAgB,EAAEJ,SAAS,CAAE;IACvDD,KAAK,EAAEA,KAAM;IAAA,GACTE,SAAS;IAAAH,QAAA,EAEZA;EAAQ,CACH,CAAC;AAEb,CACF,CAAC;AAEDX,IAAI,CAACkB,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Text as RNText, type TextProps as RNTextProps } from 'react-native';
|
|
2
|
-
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'button' | 'overline' | 'display1' | 'display2';
|
|
3
|
-
interface VariantProps {
|
|
4
|
-
variant?: TypographyVariant;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface TextProps extends RNTextProps, VariantProps {
|
|
8
|
-
}
|
|
9
|
-
export declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAE7E,KAAK,iBAAiB,GAClB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,WAAW,GACX,WAAW,GACX,OAAO,GACP,OAAO,GACP,SAAS,GACT,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEf,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAU,SAAQ,WAAW,EAAE,YAAY;CAAG;AAe/D,eAAO,MAAM,IAAI,8FAehB,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
2
|
-
import { Text as RNText, type TextProps as RNTextProps } from 'react-native';
|
|
3
|
-
|
|
4
|
-
type TypographyVariant =
|
|
5
|
-
| 'h1'
|
|
6
|
-
| 'h2'
|
|
7
|
-
| 'h3'
|
|
8
|
-
| 'h4'
|
|
9
|
-
| 'h5'
|
|
10
|
-
| 'h6'
|
|
11
|
-
| 'subtitle1'
|
|
12
|
-
| 'subtitle2'
|
|
13
|
-
| 'body1'
|
|
14
|
-
| 'body2'
|
|
15
|
-
| 'caption'
|
|
16
|
-
| 'button'
|
|
17
|
-
| 'overline'
|
|
18
|
-
| 'display1'
|
|
19
|
-
| 'display2';
|
|
20
|
-
|
|
21
|
-
interface VariantProps {
|
|
22
|
-
variant?: TypographyVariant;
|
|
23
|
-
className?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface TextProps extends RNTextProps, VariantProps {}
|
|
27
|
-
|
|
28
|
-
const joinClassNames = (...parts: (string | undefined | false)[]) =>
|
|
29
|
-
parts.filter(Boolean).join(' ');
|
|
30
|
-
|
|
31
|
-
const buildTypographyClassName = (variant: TypographyVariant) =>
|
|
32
|
-
joinClassNames(
|
|
33
|
-
`[font-family:var(--type-${variant}-family)]`,
|
|
34
|
-
`[font-weight:var(--type-${variant}-weight)]`,
|
|
35
|
-
`text-[var(--type-${variant}-size)]`,
|
|
36
|
-
`leading-[var(--type-${variant}-lineHeight)]`,
|
|
37
|
-
`tracking-[var(--type-${variant}-letterSpacing)]`,
|
|
38
|
-
variant === 'overline' ? 'uppercase' : 'normal-case',
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export const Text = forwardRef<RNText, TextProps>(
|
|
42
|
-
({ variant, children, style, className, ...restProps }, ref) => {
|
|
43
|
-
const variantKey = variant ?? 'body1';
|
|
44
|
-
const variantClassName = buildTypographyClassName(variantKey);
|
|
45
|
-
return (
|
|
46
|
-
<RNText
|
|
47
|
-
ref={ref}
|
|
48
|
-
className={joinClassNames(variantClassName, className)}
|
|
49
|
-
style={style}
|
|
50
|
-
{...restProps}
|
|
51
|
-
>
|
|
52
|
-
{children}
|
|
53
|
-
</RNText>
|
|
54
|
-
);
|
|
55
|
-
},
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
Text.displayName = 'Text';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Text';
|