@cdx-ui/components 0.0.1-alpha.2 → 0.0.1-alpha.21

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 (262) hide show
  1. package/README.md +2 -2
  2. package/lib/commonjs/components/Avatar/index.js +156 -0
  3. package/lib/commonjs/components/Avatar/index.js.map +1 -0
  4. package/lib/commonjs/components/Avatar/styles.js +80 -0
  5. package/lib/commonjs/components/Avatar/styles.js.map +1 -0
  6. package/lib/commonjs/components/BottomSheet/index.js +248 -0
  7. package/lib/commonjs/components/BottomSheet/index.js.map +1 -0
  8. package/lib/commonjs/components/BottomSheet/styles.js +61 -0
  9. package/lib/commonjs/components/BottomSheet/styles.js.map +1 -0
  10. package/lib/commonjs/components/Box/Box.js +1 -0
  11. package/lib/commonjs/components/Box/Box.js.map +1 -1
  12. package/lib/commonjs/components/Button/index.js +28 -13
  13. package/lib/commonjs/components/Button/index.js.map +1 -1
  14. package/lib/commonjs/components/Button/styles.js +323 -139
  15. package/lib/commonjs/components/Button/styles.js.map +1 -1
  16. package/lib/commonjs/components/Card/index.js +104 -0
  17. package/lib/commonjs/components/Card/index.js.map +1 -0
  18. package/lib/commonjs/components/Card/styles.js +28 -0
  19. package/lib/commonjs/components/Card/styles.js.map +1 -0
  20. package/lib/commonjs/components/Checkbox/index.js +180 -0
  21. package/lib/commonjs/components/Checkbox/index.js.map +1 -0
  22. package/lib/commonjs/components/Checkbox/styles.js +68 -0
  23. package/lib/commonjs/components/Checkbox/styles.js.map +1 -0
  24. package/lib/commonjs/components/Chip/index.js +103 -0
  25. package/lib/commonjs/components/Chip/index.js.map +1 -0
  26. package/lib/commonjs/components/Chip/styles.js +50 -0
  27. package/lib/commonjs/components/Chip/styles.js.map +1 -0
  28. package/lib/commonjs/components/Heading/index.js +35 -0
  29. package/lib/commonjs/components/Heading/index.js.map +1 -0
  30. package/lib/commonjs/components/Heading/styles.js +24 -0
  31. package/lib/commonjs/components/Heading/styles.js.map +1 -0
  32. package/lib/commonjs/components/Icon/index.js +61 -0
  33. package/lib/commonjs/components/Icon/index.js.map +1 -0
  34. package/lib/commonjs/components/Input/index.js +10 -16
  35. package/lib/commonjs/components/Input/index.js.map +1 -1
  36. package/lib/commonjs/components/Input/styles.js +16 -30
  37. package/lib/commonjs/components/Input/styles.js.map +1 -1
  38. package/lib/commonjs/components/Link/index.js +94 -0
  39. package/lib/commonjs/components/Link/index.js.map +1 -0
  40. package/lib/commonjs/components/Link/styles.js +16 -0
  41. package/lib/commonjs/components/Link/styles.js.map +1 -0
  42. package/lib/commonjs/components/Select/index.js +11 -12
  43. package/lib/commonjs/components/Select/index.js.map +1 -1
  44. package/lib/commonjs/components/Select/styles.js +29 -53
  45. package/lib/commonjs/components/Select/styles.js.map +1 -1
  46. package/lib/commonjs/components/Stack/HStack.js +8 -21
  47. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  48. package/lib/commonjs/components/Stack/VStack.js +8 -21
  49. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  50. package/lib/commonjs/components/Stack/styles.js +39 -0
  51. package/lib/commonjs/components/Stack/styles.js.map +1 -0
  52. package/lib/commonjs/components/Switch/BaseSwitch.js +46 -0
  53. package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -0
  54. package/lib/commonjs/components/Switch/BaseSwitch.web.js +56 -0
  55. package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -0
  56. package/lib/commonjs/components/Switch/index.js +13 -0
  57. package/lib/commonjs/components/Switch/index.js.map +1 -0
  58. package/lib/commonjs/components/Switch/styles.js +128 -0
  59. package/lib/commonjs/components/Switch/styles.js.map +1 -0
  60. package/lib/commonjs/components/Text/index.js +18 -9
  61. package/lib/commonjs/components/Text/index.js.map +1 -1
  62. package/lib/commonjs/components/Text/styles.js +24 -0
  63. package/lib/commonjs/components/Text/styles.js.map +1 -0
  64. package/lib/commonjs/components/VirtualizedList/index.js +19 -0
  65. package/lib/commonjs/components/VirtualizedList/index.js.map +1 -0
  66. package/lib/commonjs/components/index.js +120 -0
  67. package/lib/commonjs/components/index.js.map +1 -1
  68. package/lib/commonjs/metro/withCdxMetroConfig.js +24 -0
  69. package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -0
  70. package/lib/commonjs/styles/index.js +17 -0
  71. package/lib/commonjs/styles/index.js.map +1 -0
  72. package/lib/commonjs/styles/primitives.js +123 -0
  73. package/lib/commonjs/styles/primitives.js.map +1 -0
  74. package/lib/module/components/Avatar/index.js +152 -0
  75. package/lib/module/components/Avatar/index.js.map +1 -0
  76. package/lib/module/components/Avatar/styles.js +77 -0
  77. package/lib/module/components/Avatar/styles.js.map +1 -0
  78. package/lib/module/components/BottomSheet/index.js +242 -0
  79. package/lib/module/components/BottomSheet/index.js.map +1 -0
  80. package/lib/module/components/BottomSheet/styles.js +58 -0
  81. package/lib/module/components/BottomSheet/styles.js.map +1 -0
  82. package/lib/module/components/Box/Box.js +1 -0
  83. package/lib/module/components/Box/Box.js.map +1 -1
  84. package/lib/module/components/Button/index.js +29 -14
  85. package/lib/module/components/Button/index.js.map +1 -1
  86. package/lib/module/components/Button/styles.js +322 -138
  87. package/lib/module/components/Button/styles.js.map +1 -1
  88. package/lib/module/components/Card/index.js +100 -0
  89. package/lib/module/components/Card/index.js.map +1 -0
  90. package/lib/module/components/Card/styles.js +25 -0
  91. package/lib/module/components/Card/styles.js.map +1 -0
  92. package/lib/module/components/Checkbox/index.js +176 -0
  93. package/lib/module/components/Checkbox/index.js.map +1 -0
  94. package/lib/module/components/Checkbox/styles.js +64 -0
  95. package/lib/module/components/Checkbox/styles.js.map +1 -0
  96. package/lib/module/components/Chip/index.js +99 -0
  97. package/lib/module/components/Chip/index.js.map +1 -0
  98. package/lib/module/components/Chip/styles.js +46 -0
  99. package/lib/module/components/Chip/styles.js.map +1 -0
  100. package/lib/module/components/Heading/index.js +31 -0
  101. package/lib/module/components/Heading/index.js.map +1 -0
  102. package/lib/module/components/Heading/styles.js +20 -0
  103. package/lib/module/components/Heading/styles.js.map +1 -0
  104. package/lib/module/components/Icon/index.js +57 -0
  105. package/lib/module/components/Icon/index.js.map +1 -0
  106. package/lib/module/components/Input/index.js +10 -16
  107. package/lib/module/components/Input/index.js.map +1 -1
  108. package/lib/module/components/Input/styles.js +16 -30
  109. package/lib/module/components/Input/styles.js.map +1 -1
  110. package/lib/module/components/Link/index.js +85 -0
  111. package/lib/module/components/Link/index.js.map +1 -0
  112. package/lib/module/components/Link/styles.js +12 -0
  113. package/lib/module/components/Link/styles.js.map +1 -0
  114. package/lib/module/components/Select/index.js +12 -13
  115. package/lib/module/components/Select/index.js.map +1 -1
  116. package/lib/module/components/Select/styles.js +29 -53
  117. package/lib/module/components/Select/styles.js.map +1 -1
  118. package/lib/module/components/Stack/HStack.js +8 -21
  119. package/lib/module/components/Stack/HStack.js.map +1 -1
  120. package/lib/module/components/Stack/VStack.js +8 -21
  121. package/lib/module/components/Stack/VStack.js.map +1 -1
  122. package/lib/module/components/Stack/styles.js +35 -0
  123. package/lib/module/components/Stack/styles.js.map +1 -0
  124. package/lib/module/components/Switch/BaseSwitch.js +42 -0
  125. package/lib/module/components/Switch/BaseSwitch.js.map +1 -0
  126. package/lib/module/components/Switch/BaseSwitch.web.js +52 -0
  127. package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -0
  128. package/lib/module/components/Switch/index.js +9 -0
  129. package/lib/module/components/Switch/index.js.map +1 -0
  130. package/lib/module/components/Switch/styles.js +125 -0
  131. package/lib/module/components/Switch/styles.js.map +1 -0
  132. package/lib/module/components/Text/index.js +19 -1
  133. package/lib/module/components/Text/index.js.map +1 -1
  134. package/lib/module/components/Text/styles.js +20 -0
  135. package/lib/module/components/Text/styles.js.map +1 -0
  136. package/lib/module/components/VirtualizedList/index.js +15 -0
  137. package/lib/module/components/VirtualizedList/index.js.map +1 -0
  138. package/lib/module/components/index.js +10 -0
  139. package/lib/module/components/index.js.map +1 -1
  140. package/lib/module/metro/withCdxMetroConfig.js +20 -0
  141. package/lib/module/metro/withCdxMetroConfig.js.map +1 -0
  142. package/lib/module/styles/index.js +4 -0
  143. package/lib/module/styles/index.js.map +1 -0
  144. package/lib/module/styles/primitives.js +119 -0
  145. package/lib/module/styles/primitives.js.map +1 -0
  146. package/lib/typescript/components/Avatar/index.d.ts +40 -0
  147. package/lib/typescript/components/Avatar/index.d.ts.map +1 -0
  148. package/lib/typescript/components/Avatar/styles.d.ts +16 -0
  149. package/lib/typescript/components/Avatar/styles.d.ts.map +1 -0
  150. package/lib/typescript/components/BottomSheet/index.d.ts +61 -0
  151. package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -0
  152. package/lib/typescript/components/BottomSheet/styles.d.ts +16 -0
  153. package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -0
  154. package/lib/typescript/components/Box/Box.d.ts +1 -0
  155. package/lib/typescript/components/Box/Box.d.ts.map +1 -1
  156. package/lib/typescript/components/Button/index.d.ts +6 -3
  157. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  158. package/lib/typescript/components/Button/styles.d.ts +14 -8
  159. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  160. package/lib/typescript/components/Card/index.d.ts +30 -0
  161. package/lib/typescript/components/Card/index.d.ts.map +1 -0
  162. package/lib/typescript/components/Card/styles.d.ts +6 -0
  163. package/lib/typescript/components/Card/styles.d.ts.map +1 -0
  164. package/lib/typescript/components/Checkbox/index.d.ts +46 -0
  165. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -0
  166. package/lib/typescript/components/Checkbox/styles.d.ts +18 -0
  167. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -0
  168. package/lib/typescript/components/Chip/index.d.ts +27 -0
  169. package/lib/typescript/components/Chip/index.d.ts.map +1 -0
  170. package/lib/typescript/components/Chip/styles.d.ts +12 -0
  171. package/lib/typescript/components/Chip/styles.d.ts.map +1 -0
  172. package/lib/typescript/components/Heading/index.d.ts +10 -0
  173. package/lib/typescript/components/Heading/index.d.ts.map +1 -0
  174. package/lib/typescript/components/Heading/styles.d.ts +6 -0
  175. package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
  176. package/lib/typescript/components/Icon/index.d.ts +27 -0
  177. package/lib/typescript/components/Icon/index.d.ts.map +1 -0
  178. package/lib/typescript/components/Input/index.d.ts +6 -4
  179. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  180. package/lib/typescript/components/Input/styles.d.ts +5 -7
  181. package/lib/typescript/components/Input/styles.d.ts.map +1 -1
  182. package/lib/typescript/components/Link/index.d.ts +26 -0
  183. package/lib/typescript/components/Link/index.d.ts.map +1 -0
  184. package/lib/typescript/components/Link/styles.d.ts +4 -0
  185. package/lib/typescript/components/Link/styles.d.ts.map +1 -0
  186. package/lib/typescript/components/Select/index.d.ts +6 -3
  187. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  188. package/lib/typescript/components/Select/styles.d.ts +6 -8
  189. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  190. package/lib/typescript/components/Stack/HStack.d.ts +1 -12
  191. package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
  192. package/lib/typescript/components/Stack/VStack.d.ts +1 -12
  193. package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
  194. package/lib/typescript/components/Stack/styles.d.ts +10 -0
  195. package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
  196. package/lib/typescript/components/Switch/BaseSwitch.d.ts +9 -0
  197. package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -0
  198. package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +15 -0
  199. package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -0
  200. package/lib/typescript/components/Switch/index.d.ts +8 -0
  201. package/lib/typescript/components/Switch/index.d.ts.map +1 -0
  202. package/lib/typescript/components/Switch/styles.d.ts +26 -0
  203. package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
  204. package/lib/typescript/components/Text/index.d.ts +9 -1
  205. package/lib/typescript/components/Text/index.d.ts.map +1 -1
  206. package/lib/typescript/components/Text/styles.d.ts +6 -0
  207. package/lib/typescript/components/Text/styles.d.ts.map +1 -0
  208. package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
  209. package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
  210. package/lib/typescript/components/index.d.ts +10 -0
  211. package/lib/typescript/components/index.d.ts.map +1 -1
  212. package/lib/typescript/metro/withCdxMetroConfig.d.ts +19 -0
  213. package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -0
  214. package/lib/typescript/styles/index.d.ts +2 -0
  215. package/lib/typescript/styles/index.d.ts.map +1 -0
  216. package/lib/typescript/styles/primitives.d.ts +85 -0
  217. package/lib/typescript/styles/primitives.d.ts.map +1 -0
  218. package/package.json +22 -13
  219. package/src/components/Avatar/index.tsx +174 -0
  220. package/src/components/Avatar/styles.ts +83 -0
  221. package/src/components/BottomSheet/index.tsx +316 -0
  222. package/src/components/BottomSheet/styles.ts +79 -0
  223. package/src/components/Box/Box.tsx +1 -0
  224. package/src/components/Button/index.tsx +23 -15
  225. package/src/components/Button/styles.ts +353 -144
  226. package/src/components/Card/index.tsx +115 -0
  227. package/src/components/Card/styles.ts +41 -0
  228. package/src/components/Checkbox/index.tsx +209 -0
  229. package/src/components/Checkbox/styles.ts +103 -0
  230. package/src/components/Chip/index.tsx +91 -0
  231. package/src/components/Chip/styles.ts +51 -0
  232. package/src/components/Heading/index.tsx +36 -0
  233. package/src/components/Heading/styles.tsx +26 -0
  234. package/src/components/Icon/index.tsx +54 -0
  235. package/src/components/Input/index.tsx +9 -20
  236. package/src/components/Input/styles.ts +42 -37
  237. package/src/components/Link/index.tsx +83 -0
  238. package/src/components/Link/styles.ts +20 -0
  239. package/src/components/Select/index.tsx +12 -11
  240. package/src/components/Select/styles.ts +63 -74
  241. package/src/components/Stack/HStack.tsx +8 -19
  242. package/src/components/Stack/VStack.tsx +8 -23
  243. package/src/components/Stack/styles.ts +37 -0
  244. package/src/components/Switch/BaseSwitch.tsx +38 -0
  245. package/src/components/Switch/BaseSwitch.web.tsx +69 -0
  246. package/src/components/Switch/index.tsx +13 -0
  247. package/src/components/Switch/styles.ts +120 -0
  248. package/src/components/Text/index.tsx +16 -0
  249. package/src/components/Text/styles.tsx +26 -0
  250. package/src/components/VirtualizedList/index.tsx +19 -0
  251. package/src/components/index.ts +10 -0
  252. package/src/metro/withCdxMetroConfig.ts +29 -0
  253. package/src/styles/index.ts +1 -0
  254. package/src/styles/primitives.ts +107 -0
  255. package/lib/commonjs/components/Text/Text.js +0 -30
  256. package/lib/commonjs/components/Text/Text.js.map +0 -1
  257. package/lib/module/components/Text/Text.js +0 -26
  258. package/lib/module/components/Text/Text.js.map +0 -1
  259. package/lib/typescript/components/Text/Text.d.ts +0 -11
  260. package/lib/typescript/components/Text/Text.d.ts.map +0 -1
  261. package/src/components/Text/Text.tsx +0 -58
  262. package/src/components/Text/index.ts +0 -1
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import { cn } from '@cdx-ui/utils';
6
+ import { cardContentVariants, cardFooterVariants, cardHeaderVariants, cardRootVariants } from './styles';
7
+
8
+ // =============================================================================
9
+ // STYLED ROOT COMPONENT
10
+ // =============================================================================
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ const CardRoot = /*#__PURE__*/forwardRef(({
13
+ className,
14
+ children,
15
+ style,
16
+ ...props
17
+ }, ref) => {
18
+ const computedClassName = cn(cardRootVariants(), className);
19
+ return /*#__PURE__*/_jsx(View, {
20
+ ref: ref,
21
+ className: computedClassName,
22
+ style: style,
23
+ ...props,
24
+ children: children
25
+ });
26
+ });
27
+ CardRoot.displayName = 'Card';
28
+
29
+ // =============================================================================
30
+ // STYLED HEADER COMPONENT
31
+ // =============================================================================
32
+
33
+ const CardHeader = /*#__PURE__*/forwardRef(({
34
+ className,
35
+ children,
36
+ style,
37
+ ...props
38
+ }, ref) => {
39
+ const computedClassName = cn(cardHeaderVariants(), className);
40
+ return /*#__PURE__*/_jsx(View, {
41
+ ref: ref,
42
+ className: computedClassName,
43
+ style: style,
44
+ ...props,
45
+ children: children
46
+ });
47
+ });
48
+ CardHeader.displayName = 'Card.Header';
49
+
50
+ // =============================================================================
51
+ // STYLED CONTENT COMPONENT
52
+ // =============================================================================
53
+
54
+ const CardContent = /*#__PURE__*/forwardRef(({
55
+ className,
56
+ children,
57
+ style,
58
+ ...props
59
+ }, ref) => {
60
+ const computedClassName = cn(cardContentVariants(), className);
61
+ return /*#__PURE__*/_jsx(View, {
62
+ ref: ref,
63
+ className: computedClassName,
64
+ style: style,
65
+ ...props,
66
+ children: children
67
+ });
68
+ });
69
+ CardContent.displayName = 'Card.Content';
70
+
71
+ // =============================================================================
72
+ // STYLED FOOTER COMPONENT
73
+ // =============================================================================
74
+
75
+ const CardFooter = /*#__PURE__*/forwardRef(({
76
+ className,
77
+ children,
78
+ style,
79
+ ...props
80
+ }, ref) => {
81
+ const computedClassName = cn(cardFooterVariants(), className);
82
+ return /*#__PURE__*/_jsx(View, {
83
+ ref: ref,
84
+ className: computedClassName,
85
+ style: style,
86
+ ...props,
87
+ children: children
88
+ });
89
+ });
90
+ CardFooter.displayName = 'Card.Footer';
91
+
92
+ // =============================================================================
93
+ // COMPOUND COMPONENT
94
+ // =============================================================================
95
+
96
+ export const Card = CardRoot;
97
+ Card.Header = CardHeader;
98
+ Card.Content = CardContent;
99
+ Card.Footer = CardFooter;
100
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","cn","cardContentVariants","cardFooterVariants","cardHeaderVariants","cardRootVariants","jsx","_jsx","CardRoot","className","children","style","props","ref","computedClassName","displayName","CardHeader","CardContent","CardFooter","Card","Header","Content","Footer"],"sourceRoot":"../../../../src","sources":["components/Card/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAAQ,eAAe;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C,CAAC,EAAEO,SAAS,CAAC;EAE9D,oBACEF,IAAA,CAACP,IAAI;IAACa,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EAClEA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDO,WAAW,CAACF,WAAW,GAAG,cAAc;;AAExC;AACA;AACA;;AAOA,MAAMG,UAAU,gBAAGnB,UAAU,CAC3B,CAAC;EAAEU,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAMC,iBAAiB,GAAGb,EAAE,CAACE,kBAAkB,CAAC,CAAC,EAAEM,SAAS,CAAC;EAE7D,oBACEF,IAAA,CAACP,IAAI;IAACa,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EAClEA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDQ,UAAU,CAACH,WAAW,GAAG,aAAa;;AAEtC;AACA;AACA;;AAQA,OAAO,MAAMI,IAAI,GAAGX,QAAiC;AAErDW,IAAI,CAACC,MAAM,GAAGJ,UAAU;AACxBG,IAAI,CAACE,OAAO,GAAGJ,WAAW;AAC1BE,IAAI,CAACG,MAAM,GAAGJ,UAAU","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ import { cva } from 'class-variance-authority';
4
+ import { COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, COLOR_TEXT_PRIMARY, RADIUS_SM, SHADOW_SM } from '../../styles/primitives';
5
+
6
+ // ── Root ────────────────────────────────────────────────────
7
+
8
+ export const cardRootVariants = cva([COLOR_BG_PRIMARY, `border ${COLOR_BORDER_DEFAULT}`, RADIUS_SM, SHADOW_SM, 'overflow-hidden']);
9
+
10
+ // ── Header ──────────────────────────────────────────────────
11
+
12
+ export const cardHeaderVariants = cva(['flex-row items-center justify-between p-4 border-b border-t-8', COLOR_BORDER_DEFAULT]);
13
+
14
+ // ── Title ───────────────────────────────────────────────────
15
+
16
+ export const cardTitleVariants = cva(['flex-1']);
17
+
18
+ // ── Content ─────────────────────────────────────────────────
19
+
20
+ export const cardContentVariants = cva([COLOR_TEXT_PRIMARY, 'p-4']);
21
+
22
+ // ── Footer ──────────────────────────────────────────────────
23
+
24
+ export const cardFooterVariants = cva(['p-4 border-t', COLOR_BORDER_DEFAULT, 'flex-row items-center gap-2']);
25
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cva","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","COLOR_TEXT_PRIMARY","RADIUS_SM","SHADOW_SM","cardRootVariants","cardHeaderVariants","cardTitleVariants","cardContentVariants","cardFooterVariants"],"sourceRoot":"../../../../src","sources":["components/Card/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SACEC,gBAAgB,EAChBC,oBAAoB,EACpBC,kBAAkB,EAClBC,SAAS,EACTC,SAAS,QACJ,yBAAyB;;AAEhC;;AAEA,OAAO,MAAMC,gBAAgB,GAAGN,GAAG,CAAC,CAClCC,gBAAgB,EAChB,UAAUC,oBAAoB,EAAE,EAChCE,SAAS,EACTC,SAAS,EACT,iBAAiB,CAClB,CAAC;;AAEF;;AAEA,OAAO,MAAME,kBAAkB,GAAGP,GAAG,CAAC,CACpC,+DAA+D,EAC/DE,oBAAoB,CACrB,CAAC;;AAEF;;AAEA,OAAO,MAAMM,iBAAiB,GAAGR,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;;AAEhD;;AAEA,OAAO,MAAMS,mBAAmB,GAAGT,GAAG,CAAC,CAACG,kBAAkB,EAAE,KAAK,CAAC,CAAC;;AAEnE;;AAEA,OAAO,MAAMO,kBAAkB,GAAGV,GAAG,CAAC,CACpC,cAAc,EACdE,oBAAoB,EACpB,6BAA6B,CAC9B,CAAC","ignoreList":[]}
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { Pressable, Text, View } from 'react-native';
5
+ import { Check, CheckIndeterminateSmall } from '@cdx-ui/icons';
6
+ import { createCheckbox } from '@cdx-ui/primitives';
7
+ import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
8
+ import { Icon } from '../Icon';
9
+ import { checkboxGroupVariants, checkboxIconVariants, checkboxIndicatorVariants, checkboxLabelVariants, checkboxRootVariants } from './styles';
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const SCOPE = 'CHECKBOX';
12
+ const Root = withStyleContext(Pressable, SCOPE);
13
+ const useCheckboxStyleContext = () => useStyleContext(SCOPE);
14
+ const CheckboxPrimitive = createCheckbox({
15
+ Root,
16
+ Indicator: View,
17
+ Icon: View,
18
+ Label: Text,
19
+ Group: View
20
+ });
21
+
22
+ // =============================================================================
23
+ // CHECKBOX ROOT
24
+ // =============================================================================
25
+
26
+ const CheckboxRoot = /*#__PURE__*/forwardRef(({
27
+ size = 'default',
28
+ className,
29
+ isIndeterminate,
30
+ children,
31
+ style,
32
+ ...props
33
+ }, ref) => {
34
+ const computedClassName = cn(checkboxRootVariants({
35
+ size
36
+ }), className);
37
+ return /*#__PURE__*/_jsxs(CheckboxPrimitive, {
38
+ ref: ref,
39
+ className: computedClassName,
40
+ isIndeterminate: isIndeterminate,
41
+ style: style,
42
+ context: {
43
+ size
44
+ },
45
+ ...props,
46
+ children: [/*#__PURE__*/_jsx(CheckboxIndicator, {
47
+ children: /*#__PURE__*/_jsx(CheckboxPrimitive.Icon, {
48
+ children: /*#__PURE__*/_jsx(CheckboxIcon, {
49
+ as: isIndeterminate ? CheckIndeterminateSmall : Check
50
+ })
51
+ })
52
+ }), children]
53
+ });
54
+ });
55
+ CheckboxRoot.displayName = 'Checkbox';
56
+
57
+ // =============================================================================
58
+ // CHECKBOX INDICATOR
59
+ // =============================================================================
60
+
61
+ const CheckboxIndicator = /*#__PURE__*/forwardRef(({
62
+ className,
63
+ children,
64
+ style,
65
+ ...props
66
+ }, ref) => {
67
+ const {
68
+ size
69
+ } = useCheckboxStyleContext();
70
+ const computedClassName = cn(checkboxIndicatorVariants({
71
+ size
72
+ }), className);
73
+ return /*#__PURE__*/_jsx(CheckboxPrimitive.Indicator, {
74
+ ref: ref,
75
+ className: computedClassName,
76
+ style: style,
77
+ ...props,
78
+ children: children
79
+ });
80
+ });
81
+ CheckboxIndicator.displayName = 'Checkbox.Indicator';
82
+
83
+ // =============================================================================
84
+ // CHECKBOX ICON
85
+ // =============================================================================
86
+
87
+ const CheckboxIcon = ({
88
+ className,
89
+ style,
90
+ ...props
91
+ }) => {
92
+ const {
93
+ size
94
+ } = useCheckboxStyleContext();
95
+ const computedClassName = cn(checkboxIconVariants({
96
+ size
97
+ }), className);
98
+ return /*#__PURE__*/_jsx(Icon, {
99
+ className: computedClassName,
100
+ style: style,
101
+ ...props
102
+ });
103
+ };
104
+ CheckboxIcon.displayName = 'Checkbox.Icon';
105
+
106
+ // =============================================================================
107
+ // CHECKBOX LABEL
108
+ // =============================================================================
109
+
110
+ const CheckboxLabel = /*#__PURE__*/forwardRef(({
111
+ className,
112
+ children,
113
+ style,
114
+ ...props
115
+ }, ref) => {
116
+ const {
117
+ size
118
+ } = useCheckboxStyleContext();
119
+ const computedClassName = cn(checkboxLabelVariants({
120
+ size
121
+ }), className);
122
+ return /*#__PURE__*/_jsx(CheckboxPrimitive.Label, {
123
+ ref: ref,
124
+ className: computedClassName,
125
+ style: style,
126
+ ...props,
127
+ children: children
128
+ });
129
+ });
130
+ CheckboxLabel.displayName = 'Checkbox.Label';
131
+
132
+ // =============================================================================
133
+ // CHECKBOX GROUP
134
+ // =============================================================================
135
+
136
+ const CheckboxGroup = /*#__PURE__*/forwardRef(({
137
+ className,
138
+ children,
139
+ style,
140
+ direction = 'column',
141
+ value,
142
+ onChange,
143
+ isDisabled,
144
+ isInvalid,
145
+ isReadOnly,
146
+ ...viewProps
147
+ }, ref) => {
148
+ const computedClassName = cn(checkboxGroupVariants({
149
+ direction
150
+ }), className);
151
+ return /*#__PURE__*/_jsx(CheckboxPrimitive.Group, {
152
+ ref: ref,
153
+ className: computedClassName,
154
+ style: style,
155
+ value: value ?? [],
156
+ onChange: onChange,
157
+ isDisabled: isDisabled,
158
+ isInvalid: isInvalid,
159
+ isReadOnly: isReadOnly,
160
+ ...viewProps,
161
+ children: children
162
+ });
163
+ });
164
+ CheckboxGroup.displayName = 'Checkbox.Group';
165
+
166
+ // =============================================================================
167
+ // COMPOUND COMPONENT
168
+ // =============================================================================
169
+
170
+ export const Checkbox = Object.assign(CheckboxRoot, {
171
+ Indicator: CheckboxIndicator,
172
+ Icon: CheckboxIcon,
173
+ Label: CheckboxLabel,
174
+ Group: CheckboxGroup
175
+ });
176
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","Pressable","Text","View","Check","CheckIndeterminateSmall","createCheckbox","cn","useStyleContext","withStyleContext","Icon","checkboxGroupVariants","checkboxIconVariants","checkboxIndicatorVariants","checkboxLabelVariants","checkboxRootVariants","jsx","_jsx","jsxs","_jsxs","SCOPE","Root","useCheckboxStyleContext","CheckboxPrimitive","Indicator","Label","Group","CheckboxRoot","size","className","isIndeterminate","children","style","props","ref","computedClassName","context","CheckboxIndicator","CheckboxIcon","as","displayName","CheckboxLabel","CheckboxGroup","direction","value","onChange","isDisabled","isInvalid","isReadOnly","viewProps","Checkbox","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Checkbox/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAkBC,IAAI,QAAwB,cAAc;AACpF,SAASC,KAAK,EAAEC,uBAAuB,QAAQ,eAAe;AAC9D,SAASC,cAAc,QAA6B,oBAAoB;AACxE,SAASC,EAAE,EAAEC,eAAe,EA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AAGC,MAAM,CAACC,MAAM,CAACzB,YAAY,EAAE;EAClDH,SAAS,EAAEa,iBAAiB;EAC5B3B,IAAI,EAAE4B,YAAY;EAClBb,KAAK,EAAEgB,aAAa;EACpBf,KAAK,EAAEgB;AACT,CAAC,CAA8B","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ import { Platform } from 'react-native';
4
+ import { cva } from 'class-variance-authority';
5
+ import { COLOR_BG_PRIMARY, COLOR_BORDER_STRONG, COLOR_TEXT_PRIMARY, DISABLED_CURSOR, DISABLED_OPACITY, TRANSITION_COLORS } from '../../styles/primitives';
6
+ export const checkboxRootVariants = cva(['flex-row items-center', DISABLED_OPACITY, DISABLED_CURSOR], {
7
+ variants: {
8
+ size: {
9
+ small: 'gap-2',
10
+ default: 'gap-2.5'
11
+ }
12
+ },
13
+ defaultVariants: {
14
+ size: 'default'
15
+ }
16
+ });
17
+ export const checkboxIndicatorVariants = cva(['items-center justify-center', 'rounded', 'border-2', COLOR_BORDER_STRONG, COLOR_BG_PRIMARY, 'data-[checked=true]:bg-slate-900 data-[checked=true]:border-slate-900', 'data-[indeterminate=true]:bg-slate-900 data-[indeterminate=true]:border-slate-900', 'data-[disabled=true]:opacity-50', 'data-[invalid=true]:border-red-500', 'data-[checked=true]:data-[invalid=true]:bg-red-500 data-[checked=true]:data-[invalid=true]:border-red-500', 'data-[indeterminate=true]:data-[invalid=true]:bg-red-500 data-[indeterminate=true]:data-[invalid=true]:border-red-500', Platform.select({
18
+ web: [TRANSITION_COLORS, 'data-[hover=true]:data-[checked=false]:data-[indeterminate=false]:border-slate-400 data-[hover=true]:data-[checked=false]:data-[indeterminate=false]:bg-slate-50', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2', 'data-[invalid=true]:data-[hover=true]:border-red-400', 'data-[invalid=true]:data-[focus-visible=true]:ring-red-400/50'].join(' '),
19
+ default: ''
20
+ })], {
21
+ variants: {
22
+ size: {
23
+ small: 'h-4 w-4',
24
+ default: 'h-5 w-5'
25
+ }
26
+ },
27
+ defaultVariants: {
28
+ size: 'default'
29
+ }
30
+ });
31
+ export const checkboxIconVariants = cva(['text-white'], {
32
+ variants: {
33
+ size: {
34
+ small: 'h-3 w-3',
35
+ default: 'h-3.5 w-3.5'
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ size: 'default'
40
+ }
41
+ });
42
+ export const checkboxLabelVariants = cva([COLOR_TEXT_PRIMARY, 'data-[disabled=true]:text-slate-400'], {
43
+ variants: {
44
+ size: {
45
+ small: 'text-sm',
46
+ default: 'text-base'
47
+ }
48
+ },
49
+ defaultVariants: {
50
+ size: 'default'
51
+ }
52
+ });
53
+ export const checkboxGroupVariants = cva([], {
54
+ variants: {
55
+ direction: {
56
+ column: 'gap-2',
57
+ row: 'flex-row gap-4'
58
+ }
59
+ },
60
+ defaultVariants: {
61
+ direction: 'column'
62
+ }
63
+ });
64
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","cva","COLOR_BG_PRIMARY","COLOR_BORDER_STRONG","COLOR_TEXT_PRIMARY","DISABLED_CURSOR","DISABLED_OPACITY","TRANSITION_COLORS","checkboxRootVariants","variants","size","small","default","defaultVariants","checkboxIndicatorVariants","select","web","join","checkboxIconVariants","checkboxLabelVariants","checkboxGroupVariants","direction","column","row"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,kBAAkB,EAClBC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,QACZ,yBAAyB;AAEhC,OAAO,MAAMC,oBAAoB,GAAGP,GAAG,CACrC,CAAC,uBAAuB,EAAEK,gBAAgB,EAAED,eAAe,CAAC,EAC5D;EACEI,QAAQ,EAAE;IACRC,IAAI,EAAE;MAC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AS,EAAE;MACTC,MAAM,EAAE,OAAO;MACfC,GAAG,EAAE;IACP;EACF,CAAC;EACDV,eAAe,EAAE;IACfQ,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View, Text as RNText } from 'react-native';
5
+ import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
6
+ import { Icon } from '../Icon';
7
+ import { chipRootVariants, chipLabelVariants, chipIconVariants } from './styles';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const SCOPE = 'CHIP';
10
+ const Root = withStyleContext(View, SCOPE);
11
+ const useChipStyleContext = () => useStyleContext(SCOPE);
12
+
13
+ // =============================================================================
14
+ // STYLED ROOT COMPONENT
15
+ // =============================================================================
16
+
17
+ const ChipRoot = /*#__PURE__*/forwardRef(({
18
+ children,
19
+ color = 'default',
20
+ className,
21
+ style,
22
+ ...props
23
+ }, ref) => {
24
+ const computedClassName = cn(chipRootVariants({
25
+ color
26
+ }), className);
27
+ return /*#__PURE__*/_jsx(Root, {
28
+ ref: ref,
29
+ className: computedClassName,
30
+ style: style,
31
+ context: {
32
+ color
33
+ },
34
+ ...props,
35
+ children: children
36
+ });
37
+ });
38
+ ChipRoot.displayName = 'Chip';
39
+
40
+ // =============================================================================
41
+ // STYLED LABEL COMPONENT
42
+ // =============================================================================
43
+
44
+ const ChipLabel = /*#__PURE__*/forwardRef(({
45
+ className,
46
+ children,
47
+ style,
48
+ ...props
49
+ }, ref) => {
50
+ const {
51
+ color
52
+ } = useChipStyleContext();
53
+ const computedClassName = cn(chipLabelVariants({
54
+ color
55
+ }), className);
56
+ return /*#__PURE__*/_jsx(RNText, {
57
+ ref: ref,
58
+ className: computedClassName,
59
+ style: style,
60
+ ...props,
61
+ children: children
62
+ });
63
+ });
64
+ ChipLabel.displayName = 'Chip.Label';
65
+
66
+ // =============================================================================
67
+ // STYLED ICON COMPONENT
68
+ // =============================================================================
69
+
70
+ const ChipIcon = ({
71
+ className,
72
+ style,
73
+ as,
74
+ ...props
75
+ }) => {
76
+ const {
77
+ color
78
+ } = useChipStyleContext();
79
+ const computedClassName = cn(chipIconVariants({
80
+ color
81
+ }), className);
82
+ return /*#__PURE__*/_jsx(Icon, {
83
+ as: as,
84
+ className: computedClassName,
85
+ style: style,
86
+ ...props
87
+ });
88
+ };
89
+ ChipIcon.displayName = 'Chip.Icon';
90
+
91
+ // =============================================================================
92
+ // COMPOUND COMPONENT EXPORT
93
+ // =============================================================================
94
+
95
+ export const Chip = Object.assign(ChipRoot, {
96
+ Label: ChipLabel,
97
+ Icon: ChipIcon
98
+ });
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","Text","RNText","cn","useStyleContext","withStyleContext","Icon","chipRootVariants","chipLabelVariants","chipIconVariants","jsx","_jsx","SCOPE","Root","useChipStyleContext","ChipRoot","children","color","className","style","props","ref","computedClassName","context","displayName","ChipLabel","ChipIcon","as","Chip","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Chip/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,IAAI,EAAEC,IAAI,IAAIC,MAAM,QAAwC,cAAc;AACnF,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,QAAwB,SAAS;AAC9C,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAsB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/F,MAAMC,KAAK,GAAG,MAAM;AAEpB,MAAMC,IAAI,GAAGR,gBAAgB,CAACL,IAAI,EAAEY,KAAK,CAAC;AAE1C,MAAME,mBAAmB,GAAGA,CAAA,KAAMV,eAAe,CAACQ,KAAK,CAAiB;;AAExE;AACA;AACA;;AAOA,MAAMG,QAAQ,gBAAGhB,UAAU,CACzB,CAAC;EAAEiB,QA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,gBAAgB,CAAC;IAAEQ;EAAM,CAAC,CAAC,EAAEC,SAAS,CAAC;EAEpE,oBAAOP,IAAA,CAACL,IAAI;IAACqB,EAAE,EAAEA,EAAG;IAACT,SAAS,EAAEI,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDM,QAAQ,CAACF,WAAW,GAAG,WAAW;;AAElC;AACA;AACA;;AAOA,OAAO,MAAMI,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACf,QAAQ,EAAE;EAC1CgB,KAAK,EAAEN,SAAS;EAChBnB,IAAI,EAAEoB;AACR,CAAC,CAA0B","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ import { cva } from 'class-variance-authority';
4
+ export const chipRootVariants = cva(['flex-row items-center justify-center rounded-full px-2.5 py-0.5 gap-1.5 self-start'], {
5
+ variants: {
6
+ color: {
7
+ default: 'bg-slate-200',
8
+ error: 'bg-red-200',
9
+ info: 'bg-blue-200',
10
+ success: 'bg-green-200',
11
+ warning: 'bg-yellow-200'
12
+ }
13
+ },
14
+ defaultVariants: {
15
+ color: 'default'
16
+ }
17
+ });
18
+ export const chipLabelVariants = cva(['text-sm font-medium tracking-wider'], {
19
+ variants: {
20
+ color: {
21
+ default: 'text-slate-900',
22
+ error: 'text-red-900',
23
+ info: 'text-blue-900',
24
+ success: 'text-green-900',
25
+ warning: 'text-yellow-900'
26
+ }
27
+ },
28
+ defaultVariants: {
29
+ color: 'default'
30
+ }
31
+ });
32
+ export const chipIconVariants = cva(['size-4'], {
33
+ variants: {
34
+ color: {
35
+ default: 'text-slate-900',
36
+ error: 'text-red-900',
37
+ info: 'text-blue-900',
38
+ success: 'text-green-900',
39
+ warning: 'text-yellow-900'
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ color: 'default'
44
+ }
45
+ });
46
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cva","chipRootVariants","variants","color","default","error","info","success","warning","defaultVariants","chipLabelVariants","chipIconVariants"],"sourceRoot":"../../../../src","sources":["components/Chip/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,gBAAgB,GAAGD,GAAG,CACjC,CAAC,oFAAoF,CAAC,EACtF;EACEE,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,OAAO,EAAE,cAAc;MACvBC,KAAK,EAAE,YAAY;MACnBC,IAAI,EAAE,aAAa;MACnBC,OAAO,EAAE,cAAc;MACvBC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,KAAK,EAAE;EACT;AACF,CACF,CAAC;AAED,OAAO,MAAMO,iBAAiB,GAAGV,GAAG,CAAC,CAAC,oCAAoC,CAAC,EAAE;EAC3EE,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,OAAO,EAAE,gBAAgB;MACzBC,KAAK,EAAE,cAAc;MACrBC,IAAI,EAAE,eAAe;MACrBC,OAAO,EAAE,gBAAgB;MACzBC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,OAAO,MAAMQ,gBAAgB,GAAGX,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE;EAC9CE,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,OAAO,EAAE,gBAAgB;MACzBC,KAAK,EAAE,cAAc;MACrBC,IAAI,EAAE,eAAe;MACrBC,OAAO,EAAE,gBAAgB;MACzBC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ import { forwardRef, memo } from 'react';
4
+ import { Text } from 'react-native';
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(Text, {
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","Text","cn","headingStyle","jsx","_jsx","sizeToLevel","xl","lg","md","sm","xs","Heading","className","size","props","ref","role","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAA0D,OAAO;AAC1F,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,YAAY,QAAkC,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElE,MAAMC,WAAW,GAAG;EAClBC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE;AACN,CAAU;AAOV,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,20 @@
1
+ "use strict";
2
+
3
+ import { Platform } from 'react-native';
4
+ import { cva } from 'class-variance-authority';
5
+ import { COLOR_TEXT_PRIMARY } from '../../styles/primitives';
6
+ export const headingStyle = cva([`${COLOR_TEXT_PRIMARY} font-semibold tracking-tight my-0`, Platform.select({
7
+ web: 'font-sans bg-transparent display-inline no-underline',
8
+ default: ''
9
+ })], {
10
+ variants: {
11
+ size: {
12
+ xl: 'text-6xl',
13
+ lg: 'text-5xl',
14
+ md: 'text-4xl',
15
+ sm: 'text-3xl',
16
+ xs: 'text-2xl'
17
+ }
18
+ }
19
+ });
20
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","cva","COLOR_TEXT_PRIMARY","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;AACjE,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,MAAMC,YAAY,GAAGF,GAAG,CAC7B,CACE,GAAGC,kBAAkB,oCAAoC,EACzDF,QAAQ,CAACI,MAAM,CAAC;EACdC,GAAG,EAAE,sDAAsD;EAC3DC,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,57 @@
1
+ "use strict";
2
+
3
+ import { withUniwind } from 'uniwind';
4
+ import { cn } from '@cdx-ui/utils';
5
+ import { COLOR_TEXT_PRIMARY } from '../../styles/primitives';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ function IconImpl({
8
+ as: IconComponent,
9
+ ...props
10
+ }) {
11
+ return /*#__PURE__*/_jsx(IconComponent, {
12
+ ...props
13
+ });
14
+ }
15
+ const StyledIcon = withUniwind(IconImpl, {
16
+ size: {
17
+ fromClassName: 'className',
18
+ styleProperty: 'width'
19
+ },
20
+ color: {
21
+ fromClassName: 'className',
22
+ styleProperty: 'color'
23
+ }
24
+ });
25
+
26
+ /**
27
+ * A wrapper component for CDX icons with Uniwind `className` support via `withUniwind`.
28
+ *
29
+ * This component allows you to render any CDX icon while applying utility classes
30
+ * using `uniwind`. It avoids the need to wrap or configure each icon individually.
31
+ *
32
+ * @component
33
+ * @example
34
+ * ```tsx
35
+ * import { Icon } from '@cdx-ui/components';
36
+ * import { ArrowRight } from '@cdx-ui/icons';
37
+ *
38
+ * <Icon as={ArrowRight} className="text-red-500 size-4" />
39
+ * ```
40
+ *
41
+ * @param {CdxIcon} as - The CDX icon component to render.
42
+ * @param {string} className - Utility classes to style the icon using Uniwind.
43
+ * @param {number} size - Icon size (overrides the size class).
44
+ * @param {...CdxIconProps} ...props - Additional icon props passed to the "as" icon.
45
+ */
46
+ export function Icon({
47
+ as: IconComponent,
48
+ className,
49
+ ...props
50
+ }) {
51
+ return /*#__PURE__*/_jsx(StyledIcon, {
52
+ as: IconComponent,
53
+ className: cn(COLOR_TEXT_PRIMARY, 'size-5', className),
54
+ ...props
55
+ });
56
+ }
57
+ //# sourceMappingURL=index.js.map