@cdx-ui/components 0.0.1-alpha.10 → 0.0.1-alpha.11

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.
Files changed (55) hide show
  1. package/lib/commonjs/components/Checkbox/styles.js +1 -1
  2. package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
  3. package/lib/commonjs/components/Heading/index.js +35 -0
  4. package/lib/commonjs/components/Heading/index.js.map +1 -0
  5. package/lib/commonjs/components/Heading/styles.js +23 -0
  6. package/lib/commonjs/components/Heading/styles.js.map +1 -0
  7. package/lib/commonjs/components/Text/index.js +18 -9
  8. package/lib/commonjs/components/Text/index.js.map +1 -1
  9. package/lib/commonjs/components/Text/styles.js +23 -0
  10. package/lib/commonjs/components/Text/styles.js.map +1 -0
  11. package/lib/commonjs/components/index.js +12 -0
  12. package/lib/commonjs/components/index.js.map +1 -1
  13. package/lib/module/components/Checkbox/styles.js +1 -1
  14. package/lib/module/components/Checkbox/styles.js.map +1 -1
  15. package/lib/module/components/Heading/index.js +31 -0
  16. package/lib/module/components/Heading/index.js.map +1 -0
  17. package/lib/module/components/Heading/styles.js +19 -0
  18. package/lib/module/components/Heading/styles.js.map +1 -0
  19. package/lib/module/components/Text/index.js +19 -1
  20. package/lib/module/components/Text/index.js.map +1 -1
  21. package/lib/module/components/Text/styles.js +19 -0
  22. package/lib/module/components/Text/styles.js.map +1 -0
  23. package/lib/module/components/index.js +1 -0
  24. package/lib/module/components/index.js.map +1 -1
  25. package/lib/typescript/components/Button/styles.d.ts +2 -2
  26. package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
  27. package/lib/typescript/components/Heading/index.d.ts +6 -0
  28. package/lib/typescript/components/Heading/index.d.ts.map +1 -0
  29. package/lib/typescript/components/Heading/styles.d.ts +6 -0
  30. package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
  31. package/lib/typescript/components/Input/styles.d.ts +4 -4
  32. package/lib/typescript/components/Select/styles.d.ts +5 -5
  33. package/lib/typescript/components/Stack/styles.d.ts +2 -2
  34. package/lib/typescript/components/Switch/styles.d.ts +2 -2
  35. package/lib/typescript/components/Text/index.d.ts +5 -1
  36. package/lib/typescript/components/Text/index.d.ts.map +1 -1
  37. package/lib/typescript/components/Text/styles.d.ts +6 -0
  38. package/lib/typescript/components/Text/styles.d.ts.map +1 -0
  39. package/lib/typescript/components/index.d.ts +1 -0
  40. package/lib/typescript/components/index.d.ts.map +1 -1
  41. package/package.json +4 -3
  42. package/src/components/Checkbox/styles.ts +1 -1
  43. package/src/components/Heading/index.tsx +33 -0
  44. package/src/components/Heading/styles.tsx +25 -0
  45. package/src/components/Text/index.tsx +15 -0
  46. package/src/components/Text/styles.tsx +25 -0
  47. package/src/components/index.ts +1 -0
  48. package/lib/commonjs/components/Text/Text.js +0 -30
  49. package/lib/commonjs/components/Text/Text.js.map +0 -1
  50. package/lib/module/components/Text/Text.js +0 -26
  51. package/lib/module/components/Text/Text.js.map +0 -1
  52. package/lib/typescript/components/Text/Text.d.ts +0 -11
  53. package/lib/typescript/components/Text/Text.d.ts.map +0 -1
  54. package/src/components/Text/Text.tsx +0 -58
  55. 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,gEAAgE,EAChE,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":[]}
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,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,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":[]}
@@ -3,15 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _Text = require("./Text");
7
- Object.keys(_Text).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _Text[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _Text[key];
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":["_Text","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["components/Text/index.ts"],"mappings":";;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
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":[]}
@@ -92,6 +92,18 @@ Object.keys(_Switch).forEach(function (key) {
92
92
  });
93
93
  });
94
94
  var _Stack = require("./Stack");
95
+ var _Heading = require("./Heading");
96
+ Object.keys(_Heading).forEach(function (key) {
97
+ if (key === "default" || key === "__esModule") return;
98
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
99
+ if (key in exports && exports[key] === _Heading[key]) return;
100
+ Object.defineProperty(exports, key, {
101
+ enumerable: true,
102
+ get: function () {
103
+ return _Heading[key];
104
+ }
105
+ });
106
+ });
95
107
  var _Text = require("./Text");
96
108
  Object.keys(_Text).forEach(function (key) {
97
109
  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,OA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;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAe,KAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,KAAA,CAAAf,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_Box","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Button","_Checkbox","_Input","_Select","_Switch","_Stack","_Heading","_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,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C,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,MAAAgB,KAAA,CAAAhB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,KAAA,CAAAhB,GAAA;IAAA;EAAA;AAAA","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,gEAAgE,EAChE,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":[]}
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":[]}
@@ -1,4 +1,22 @@
1
1
  "use strict";
2
2
 
3
- export * from './Text';
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.ts"],"mappings":";;AAAA,cAAc,QAAQ","ignoreList":[]}
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":[]}
@@ -7,5 +7,6 @@ export * from './Input';
7
7
  export * from './Select';
8
8
  export * from './Switch';
9
9
  export { HStack, VStack } from './Stack';
10
+ export * from './Heading';
10
11
  export * from './Text';
11
12
  //# 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,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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | null | undefined;
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?: "sm" | "md" | null | undefined;
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?: "sm" | "md" | null | undefined;
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?: "sm" | "md" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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>;
@@ -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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
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?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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?: "sm" | "md" | "lg" | null | undefined;
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
- export * from './Text';
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.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
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"}
@@ -5,5 +5,6 @@ export * from './Input';
5
5
  export * from './Select';
6
6
  export * from './Switch';
7
7
  export { HStack, VStack } from './Stack';
8
+ export * from './Heading';
8
9
  export * from './Text';
9
10
  //# 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,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.10",
3
+ "version": "0.0.1-alpha.11",
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.10",
64
- "@cdx-ui/utils": "0.0.1-alpha.10"
64
+ "@cdx-ui/primitives": "0.0.1-alpha.11",
65
+ "@cdx-ui/utils": "0.0.1-alpha.11"
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,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>;
@@ -5,4 +5,5 @@ export * from './Input';
5
5
  export * from './Select';
6
6
  export * from './Switch';
7
7
  export { HStack, VStack } from './Stack';
8
+ export * from './Heading';
8
9
  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';