@cimpress-ui/react 0.0.0

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 (286) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +17 -0
  3. package/dist/commonjs/components/button/button.d.ts +6 -0
  4. package/dist/commonjs/components/button/button.d.ts.map +1 -0
  5. package/dist/commonjs/components/button/button.js +18 -0
  6. package/dist/commonjs/components/button/button.js.map +1 -0
  7. package/dist/commonjs/components/button/icon-button.d.ts +6 -0
  8. package/dist/commonjs/components/button/icon-button.d.ts.map +1 -0
  9. package/dist/commonjs/components/button/icon-button.js +18 -0
  10. package/dist/commonjs/components/button/icon-button.js.map +1 -0
  11. package/dist/commonjs/components/button/icon-link-button.d.ts +7 -0
  12. package/dist/commonjs/components/button/icon-link-button.d.ts.map +1 -0
  13. package/dist/commonjs/components/button/icon-link-button.js +17 -0
  14. package/dist/commonjs/components/button/icon-link-button.js.map +1 -0
  15. package/dist/commonjs/components/button/link-button.d.ts +7 -0
  16. package/dist/commonjs/components/button/link-button.d.ts.map +1 -0
  17. package/dist/commonjs/components/button/link-button.js +17 -0
  18. package/dist/commonjs/components/button/link-button.js.map +1 -0
  19. package/dist/commonjs/components/button/types.d.ts +62 -0
  20. package/dist/commonjs/components/button/types.d.ts.map +1 -0
  21. package/dist/commonjs/components/button/types.js +3 -0
  22. package/dist/commonjs/components/button/types.js.map +1 -0
  23. package/dist/commonjs/components/checkbox/checkbox-group.d.ts +11 -0
  24. package/dist/commonjs/components/checkbox/checkbox-group.d.ts.map +1 -0
  25. package/dist/commonjs/components/checkbox/checkbox-group.js +31 -0
  26. package/dist/commonjs/components/checkbox/checkbox-group.js.map +1 -0
  27. package/dist/commonjs/components/checkbox/checkbox.d.ts +9 -0
  28. package/dist/commonjs/components/checkbox/checkbox.d.ts.map +1 -0
  29. package/dist/commonjs/components/checkbox/checkbox.js +26 -0
  30. package/dist/commonjs/components/checkbox/checkbox.js.map +1 -0
  31. package/dist/commonjs/components/combo-box/combo-box.d.ts +33 -0
  32. package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -0
  33. package/dist/commonjs/components/combo-box/combo-box.js +45 -0
  34. package/dist/commonjs/components/combo-box/combo-box.js.map +1 -0
  35. package/dist/commonjs/components/form/form.d.ts +7 -0
  36. package/dist/commonjs/components/form/form.d.ts.map +1 -0
  37. package/dist/commonjs/components/form/form.js +17 -0
  38. package/dist/commonjs/components/form/form.js.map +1 -0
  39. package/dist/commonjs/components/form-field/form-field.d.ts +13 -0
  40. package/dist/commonjs/components/form-field/form-field.d.ts.map +1 -0
  41. package/dist/commonjs/components/form-field/form-field.js +36 -0
  42. package/dist/commonjs/components/form-field/form-field.js.map +1 -0
  43. package/dist/commonjs/components/menu/menu.d.ts +38 -0
  44. package/dist/commonjs/components/menu/menu.d.ts.map +1 -0
  45. package/dist/commonjs/components/menu/menu.js +43 -0
  46. package/dist/commonjs/components/menu/menu.js.map +1 -0
  47. package/dist/commonjs/components/radio/radio-group.d.ts +11 -0
  48. package/dist/commonjs/components/radio/radio-group.d.ts.map +1 -0
  49. package/dist/commonjs/components/radio/radio-group.js +31 -0
  50. package/dist/commonjs/components/radio/radio-group.js.map +1 -0
  51. package/dist/commonjs/components/radio/radio.d.ts +9 -0
  52. package/dist/commonjs/components/radio/radio.d.ts.map +1 -0
  53. package/dist/commonjs/components/radio/radio.js +25 -0
  54. package/dist/commonjs/components/radio/radio.js.map +1 -0
  55. package/dist/commonjs/components/select/select.d.ts +28 -0
  56. package/dist/commonjs/components/select/select.d.ts.map +1 -0
  57. package/dist/commonjs/components/select/select.js +34 -0
  58. package/dist/commonjs/components/select/select.js.map +1 -0
  59. package/dist/commonjs/components/spacing/box/box.d.ts +8 -0
  60. package/dist/commonjs/components/spacing/box/box.d.ts.map +1 -0
  61. package/dist/commonjs/components/spacing/box/box.js +12 -0
  62. package/dist/commonjs/components/spacing/box/box.js.map +1 -0
  63. package/dist/commonjs/components/spacing/stack/stack.d.ts +11 -0
  64. package/dist/commonjs/components/spacing/stack/stack.d.ts.map +1 -0
  65. package/dist/commonjs/components/spacing/stack/stack.js +23 -0
  66. package/dist/commonjs/components/spacing/stack/stack.js.map +1 -0
  67. package/dist/commonjs/components/spacing/types.d.ts +23 -0
  68. package/dist/commonjs/components/spacing/types.d.ts.map +1 -0
  69. package/dist/commonjs/components/spacing/types.js +40 -0
  70. package/dist/commonjs/components/spacing/types.js.map +1 -0
  71. package/dist/commonjs/components/spinner/spinner.d.ts +9 -0
  72. package/dist/commonjs/components/spinner/spinner.d.ts.map +1 -0
  73. package/dist/commonjs/components/spinner/spinner.js +26 -0
  74. package/dist/commonjs/components/spinner/spinner.js.map +1 -0
  75. package/dist/commonjs/components/sr-only/sr-only.d.ts +8 -0
  76. package/dist/commonjs/components/sr-only/sr-only.d.ts.map +1 -0
  77. package/dist/commonjs/components/sr-only/sr-only.js +10 -0
  78. package/dist/commonjs/components/sr-only/sr-only.js.map +1 -0
  79. package/dist/commonjs/components/text-inputs/text-area.d.ts +7 -0
  80. package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -0
  81. package/dist/commonjs/components/text-inputs/text-area.js +19 -0
  82. package/dist/commonjs/components/text-inputs/text-area.js.map +1 -0
  83. package/dist/commonjs/components/text-inputs/text-field.d.ts +7 -0
  84. package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -0
  85. package/dist/commonjs/components/text-inputs/text-field.js +19 -0
  86. package/dist/commonjs/components/text-inputs/text-field.js.map +1 -0
  87. package/dist/commonjs/components/types.d.ts +79 -0
  88. package/dist/commonjs/components/types.d.ts.map +1 -0
  89. package/dist/commonjs/components/types.js +3 -0
  90. package/dist/commonjs/components/types.js.map +1 -0
  91. package/dist/commonjs/components/typography/link.d.ts +13 -0
  92. package/dist/commonjs/components/typography/link.d.ts.map +1 -0
  93. package/dist/commonjs/components/typography/link.js +17 -0
  94. package/dist/commonjs/components/typography/link.js.map +1 -0
  95. package/dist/commonjs/components/typography/text.d.ts +10 -0
  96. package/dist/commonjs/components/typography/text.d.ts.map +1 -0
  97. package/dist/commonjs/components/typography/text.js +22 -0
  98. package/dist/commonjs/components/typography/text.js.map +1 -0
  99. package/dist/commonjs/components/typography/types.d.ts +21 -0
  100. package/dist/commonjs/components/typography/types.d.ts.map +1 -0
  101. package/dist/commonjs/components/typography/types.js +3 -0
  102. package/dist/commonjs/components/typography/types.js.map +1 -0
  103. package/dist/commonjs/components/typography/utils.d.ts +3 -0
  104. package/dist/commonjs/components/typography/utils.d.ts.map +1 -0
  105. package/dist/commonjs/components/typography/utils.js +17 -0
  106. package/dist/commonjs/components/typography/utils.js.map +1 -0
  107. package/dist/commonjs/forward-ref.d.ts +3 -0
  108. package/dist/commonjs/forward-ref.d.ts.map +1 -0
  109. package/dist/commonjs/forward-ref.js +20 -0
  110. package/dist/commonjs/forward-ref.js.map +1 -0
  111. package/dist/commonjs/icons/add.d.ts +7 -0
  112. package/dist/commonjs/icons/add.d.ts.map +1 -0
  113. package/dist/commonjs/icons/add.js +7 -0
  114. package/dist/commonjs/icons/add.js.map +1 -0
  115. package/dist/commonjs/icons/alert-triangle.d.ts +7 -0
  116. package/dist/commonjs/icons/alert-triangle.d.ts.map +1 -0
  117. package/dist/commonjs/icons/alert-triangle.js +7 -0
  118. package/dist/commonjs/icons/alert-triangle.js.map +1 -0
  119. package/dist/commonjs/icons/checkmark-small.d.ts +7 -0
  120. package/dist/commonjs/icons/checkmark-small.d.ts.map +1 -0
  121. package/dist/commonjs/icons/checkmark-small.js +7 -0
  122. package/dist/commonjs/icons/checkmark-small.js.map +1 -0
  123. package/dist/commonjs/icons/index.d.ts +5 -0
  124. package/dist/commonjs/icons/index.d.ts.map +1 -0
  125. package/dist/commonjs/icons/index.js +15 -0
  126. package/dist/commonjs/icons/index.js.map +1 -0
  127. package/dist/commonjs/icons/minus-small.d.ts +7 -0
  128. package/dist/commonjs/icons/minus-small.d.ts.map +1 -0
  129. package/dist/commonjs/icons/minus-small.js +7 -0
  130. package/dist/commonjs/icons/minus-small.js.map +1 -0
  131. package/dist/commonjs/index.d.ts +23 -0
  132. package/dist/commonjs/index.d.ts.map +1 -0
  133. package/dist/commonjs/index.js +38 -0
  134. package/dist/commonjs/index.js.map +1 -0
  135. package/dist/commonjs/package.json +3 -0
  136. package/dist/commonjs/providers/ssr/ssr-provider.d.ts +13 -0
  137. package/dist/commonjs/providers/ssr/ssr-provider.d.ts.map +1 -0
  138. package/dist/commonjs/providers/ssr/ssr-provider.js +18 -0
  139. package/dist/commonjs/providers/ssr/ssr-provider.js.map +1 -0
  140. package/dist/commonjs/with-style-props.d.ts +15 -0
  141. package/dist/commonjs/with-style-props.d.ts.map +1 -0
  142. package/dist/commonjs/with-style-props.js +29 -0
  143. package/dist/commonjs/with-style-props.js.map +1 -0
  144. package/dist/esm/components/button/button.d.ts +6 -0
  145. package/dist/esm/components/button/button.d.ts.map +1 -0
  146. package/dist/esm/components/button/button.js +12 -0
  147. package/dist/esm/components/button/button.js.map +1 -0
  148. package/dist/esm/components/button/icon-button.d.ts +6 -0
  149. package/dist/esm/components/button/icon-button.d.ts.map +1 -0
  150. package/dist/esm/components/button/icon-button.js +12 -0
  151. package/dist/esm/components/button/icon-button.js.map +1 -0
  152. package/dist/esm/components/button/icon-link-button.d.ts +7 -0
  153. package/dist/esm/components/button/icon-link-button.d.ts.map +1 -0
  154. package/dist/esm/components/button/icon-link-button.js +11 -0
  155. package/dist/esm/components/button/icon-link-button.js.map +1 -0
  156. package/dist/esm/components/button/link-button.d.ts +7 -0
  157. package/dist/esm/components/button/link-button.d.ts.map +1 -0
  158. package/dist/esm/components/button/link-button.js +11 -0
  159. package/dist/esm/components/button/link-button.js.map +1 -0
  160. package/dist/esm/components/button/types.d.ts +62 -0
  161. package/dist/esm/components/button/types.d.ts.map +1 -0
  162. package/dist/esm/components/button/types.js +2 -0
  163. package/dist/esm/components/button/types.js.map +1 -0
  164. package/dist/esm/components/checkbox/checkbox-group.d.ts +11 -0
  165. package/dist/esm/components/checkbox/checkbox-group.d.ts.map +1 -0
  166. package/dist/esm/components/checkbox/checkbox-group.js +25 -0
  167. package/dist/esm/components/checkbox/checkbox-group.js.map +1 -0
  168. package/dist/esm/components/checkbox/checkbox.d.ts +9 -0
  169. package/dist/esm/components/checkbox/checkbox.d.ts.map +1 -0
  170. package/dist/esm/components/checkbox/checkbox.js +20 -0
  171. package/dist/esm/components/checkbox/checkbox.js.map +1 -0
  172. package/dist/esm/components/combo-box/combo-box.d.ts +33 -0
  173. package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -0
  174. package/dist/esm/components/combo-box/combo-box.js +39 -0
  175. package/dist/esm/components/combo-box/combo-box.js.map +1 -0
  176. package/dist/esm/components/form/form.d.ts +7 -0
  177. package/dist/esm/components/form/form.d.ts.map +1 -0
  178. package/dist/esm/components/form/form.js +11 -0
  179. package/dist/esm/components/form/form.js.map +1 -0
  180. package/dist/esm/components/form-field/form-field.d.ts +13 -0
  181. package/dist/esm/components/form-field/form-field.d.ts.map +1 -0
  182. package/dist/esm/components/form-field/form-field.js +28 -0
  183. package/dist/esm/components/form-field/form-field.js.map +1 -0
  184. package/dist/esm/components/menu/menu.d.ts +38 -0
  185. package/dist/esm/components/menu/menu.d.ts.map +1 -0
  186. package/dist/esm/components/menu/menu.js +34 -0
  187. package/dist/esm/components/menu/menu.js.map +1 -0
  188. package/dist/esm/components/radio/radio-group.d.ts +11 -0
  189. package/dist/esm/components/radio/radio-group.d.ts.map +1 -0
  190. package/dist/esm/components/radio/radio-group.js +25 -0
  191. package/dist/esm/components/radio/radio-group.js.map +1 -0
  192. package/dist/esm/components/radio/radio.d.ts +9 -0
  193. package/dist/esm/components/radio/radio.d.ts.map +1 -0
  194. package/dist/esm/components/radio/radio.js +19 -0
  195. package/dist/esm/components/radio/radio.js.map +1 -0
  196. package/dist/esm/components/select/select.d.ts +28 -0
  197. package/dist/esm/components/select/select.d.ts.map +1 -0
  198. package/dist/esm/components/select/select.js +28 -0
  199. package/dist/esm/components/select/select.js.map +1 -0
  200. package/dist/esm/components/spacing/box/box.d.ts +8 -0
  201. package/dist/esm/components/spacing/box/box.d.ts.map +1 -0
  202. package/dist/esm/components/spacing/box/box.js +9 -0
  203. package/dist/esm/components/spacing/box/box.js.map +1 -0
  204. package/dist/esm/components/spacing/stack/stack.d.ts +11 -0
  205. package/dist/esm/components/spacing/stack/stack.d.ts.map +1 -0
  206. package/dist/esm/components/spacing/stack/stack.js +17 -0
  207. package/dist/esm/components/spacing/stack/stack.js.map +1 -0
  208. package/dist/esm/components/spacing/types.d.ts +23 -0
  209. package/dist/esm/components/spacing/types.d.ts.map +1 -0
  210. package/dist/esm/components/spacing/types.js +37 -0
  211. package/dist/esm/components/spacing/types.js.map +1 -0
  212. package/dist/esm/components/spinner/spinner.d.ts +9 -0
  213. package/dist/esm/components/spinner/spinner.d.ts.map +1 -0
  214. package/dist/esm/components/spinner/spinner.js +20 -0
  215. package/dist/esm/components/spinner/spinner.js.map +1 -0
  216. package/dist/esm/components/sr-only/sr-only.d.ts +8 -0
  217. package/dist/esm/components/sr-only/sr-only.d.ts.map +1 -0
  218. package/dist/esm/components/sr-only/sr-only.js +7 -0
  219. package/dist/esm/components/sr-only/sr-only.js.map +1 -0
  220. package/dist/esm/components/text-inputs/text-area.d.ts +7 -0
  221. package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -0
  222. package/dist/esm/components/text-inputs/text-area.js +13 -0
  223. package/dist/esm/components/text-inputs/text-area.js.map +1 -0
  224. package/dist/esm/components/text-inputs/text-field.d.ts +7 -0
  225. package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -0
  226. package/dist/esm/components/text-inputs/text-field.js +13 -0
  227. package/dist/esm/components/text-inputs/text-field.js.map +1 -0
  228. package/dist/esm/components/types.d.ts +79 -0
  229. package/dist/esm/components/types.d.ts.map +1 -0
  230. package/dist/esm/components/types.js +2 -0
  231. package/dist/esm/components/types.js.map +1 -0
  232. package/dist/esm/components/typography/link.d.ts +13 -0
  233. package/dist/esm/components/typography/link.d.ts.map +1 -0
  234. package/dist/esm/components/typography/link.js +11 -0
  235. package/dist/esm/components/typography/link.js.map +1 -0
  236. package/dist/esm/components/typography/text.d.ts +10 -0
  237. package/dist/esm/components/typography/text.d.ts.map +1 -0
  238. package/dist/esm/components/typography/text.js +16 -0
  239. package/dist/esm/components/typography/text.js.map +1 -0
  240. package/dist/esm/components/typography/types.d.ts +21 -0
  241. package/dist/esm/components/typography/types.d.ts.map +1 -0
  242. package/dist/esm/components/typography/types.js +2 -0
  243. package/dist/esm/components/typography/types.js.map +1 -0
  244. package/dist/esm/components/typography/utils.d.ts +3 -0
  245. package/dist/esm/components/typography/utils.d.ts.map +1 -0
  246. package/dist/esm/components/typography/utils.js +11 -0
  247. package/dist/esm/components/typography/utils.js.map +1 -0
  248. package/dist/esm/forward-ref.d.ts +3 -0
  249. package/dist/esm/forward-ref.d.ts.map +1 -0
  250. package/dist/esm/forward-ref.js +19 -0
  251. package/dist/esm/forward-ref.js.map +1 -0
  252. package/dist/esm/icons/add.d.ts +7 -0
  253. package/dist/esm/icons/add.d.ts.map +1 -0
  254. package/dist/esm/icons/add.js +5 -0
  255. package/dist/esm/icons/add.js.map +1 -0
  256. package/dist/esm/icons/alert-triangle.d.ts +7 -0
  257. package/dist/esm/icons/alert-triangle.d.ts.map +1 -0
  258. package/dist/esm/icons/alert-triangle.js +5 -0
  259. package/dist/esm/icons/alert-triangle.js.map +1 -0
  260. package/dist/esm/icons/checkmark-small.d.ts +7 -0
  261. package/dist/esm/icons/checkmark-small.d.ts.map +1 -0
  262. package/dist/esm/icons/checkmark-small.js +5 -0
  263. package/dist/esm/icons/checkmark-small.js.map +1 -0
  264. package/dist/esm/icons/index.d.ts +5 -0
  265. package/dist/esm/icons/index.d.ts.map +1 -0
  266. package/dist/esm/icons/index.js +5 -0
  267. package/dist/esm/icons/index.js.map +1 -0
  268. package/dist/esm/icons/minus-small.d.ts +7 -0
  269. package/dist/esm/icons/minus-small.d.ts.map +1 -0
  270. package/dist/esm/icons/minus-small.js +5 -0
  271. package/dist/esm/icons/minus-small.js.map +1 -0
  272. package/dist/esm/index.d.ts +23 -0
  273. package/dist/esm/index.d.ts.map +1 -0
  274. package/dist/esm/index.js +22 -0
  275. package/dist/esm/index.js.map +1 -0
  276. package/dist/esm/package.json +3 -0
  277. package/dist/esm/providers/ssr/ssr-provider.d.ts +13 -0
  278. package/dist/esm/providers/ssr/ssr-provider.d.ts.map +1 -0
  279. package/dist/esm/providers/ssr/ssr-provider.js +15 -0
  280. package/dist/esm/providers/ssr/ssr-provider.js.map +1 -0
  281. package/dist/esm/with-style-props.d.ts +15 -0
  282. package/dist/esm/with-style-props.d.ts.map +1 -0
  283. package/dist/esm/with-style-props.js +23 -0
  284. package/dist/esm/with-style-props.js.map +1 -0
  285. package/dist-styles/styles.css +2 -0
  286. package/package.json +104 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # Cimpress UI
2
+
3
+ :warning: **This project is a work in progress. Not ready for production use.** :warning:
4
+
5
+ Cimpress UI is a library of React components for building user interfaces of Cimpress apps. It's a next-generation replacement of `@cimpress/react-components`.
6
+
7
+ ## Installation and usage
8
+
9
+ Visit the [documentation website](https://cimpress-ui.pages.dev/) to learn how to use this library.
10
+
11
+ ## Development
12
+
13
+ See the [contribution guide](./CONTRIBUTING.md) for details.
14
+
15
+ ## Support
16
+
17
+ For support queries and/or feedback, write us a message in the [#component-library](https://cimpress.slack.com/archives/C5SD7ME0G) Slack channel.
@@ -0,0 +1,6 @@
1
+ import type { ActionButtonProps, BaseButtonProps, TextButtonProps } from './types.js';
2
+ export interface ButtonProps extends BaseButtonProps, TextButtonProps, ActionButtonProps {
3
+ }
4
+ declare const _Button: (props: ButtonProps & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").ReactNode;
5
+ export { _Button as Button };
6
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEtF,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,eAAe,EAAE,iBAAiB;CAAG;AA6C3F,QAAA,MAAM,OAAO,uJAA+C,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Button = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const clsx_1 = __importDefault(require("clsx"));
9
+ const react_aria_components_1 = require("react-aria-components");
10
+ const forward_ref_js_1 = require("../../forward-ref.js");
11
+ const with_style_props_js_1 = require("../../with-style-props.js");
12
+ const spinner_js_1 = require("../spinner/spinner.js");
13
+ function Button({ children, variant = 'secondary', tone = 'base', size = 'medium', iconStart, iconEnd, isLoading = false, isDisabled = false, fullWidth = false, UNSAFE_className, UNSAFE_style, ...props }, ref) {
14
+ return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { ...props, ref: ref, className: (0, clsx_1.default)('cim-button', UNSAFE_className), style: UNSAFE_style, "data-variant": variant, "data-tone": tone, "data-size": size, "data-full-width": fullWidth ? true : undefined, isDisabled: isDisabled, isPending: isLoading, children: ({ isPending }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [iconStart, (0, jsx_runtime_1.jsx)("span", { children: children }), iconEnd, isPending && (0, jsx_runtime_1.jsx)(spinner_js_1.Spinner, { "aria-label": "in progress" })] })) }));
15
+ }
16
+ const _Button = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Button), 'Button');
17
+ exports.Button = _Button;
18
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":";;;;;;;AAAA,gDAAwB;AAExB,iEAA4D;AAC5D,yDAAkD;AAClD,mEAA2D;AAC3D,sDAAgD;AAKhD,SAAS,MAAM,CACb,EACE,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACI,EACd,GAAoC;IAEpC,OAAO,CACL,uBAAC,8BAAS,OACJ,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,YAAY,EAAE,gBAAgB,CAAC,EAC/C,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,YAEnB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClB,6DACG,SAAS,EACV,2CAAO,QAAQ,GAAQ,EACtB,OAAO,EAEP,SAAS,IAAI,uBAAC,oBAAO,kBAAY,aAAa,GAAG,IACjD,CACJ,GACS,CACb,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEzC,yBAAM","sourcesContent":["import clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Button as RACButton } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Spinner } from '../spinner/spinner.js';\nimport type { ActionButtonProps, BaseButtonProps, TextButtonProps } from './types.js';\n\nexport interface ButtonProps extends BaseButtonProps, TextButtonProps, ActionButtonProps {}\n\nfunction Button(\n {\n children,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n iconStart,\n iconEnd,\n isLoading = false,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n return (\n <RACButton\n {...props}\n ref={ref}\n className={clsx('cim-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n isPending={isLoading}\n >\n {({ isPending }) => (\n <>\n {iconStart}\n <span>{children}</span>\n {iconEnd}\n {/* TODO: i18n */}\n {isPending && <Spinner aria-label=\"in progress\" />}\n </>\n )}\n </RACButton>\n );\n}\n\nconst _Button = withStyleProps(forwardRef(Button), 'Button');\n\nexport { _Button as Button };\n"]}
@@ -0,0 +1,6 @@
1
+ import type { ActionButtonProps, BaseButtonProps, SingleIconButtonProps } from './types.js';
2
+ export interface IconButtonProps extends BaseButtonProps, SingleIconButtonProps, ActionButtonProps {
3
+ }
4
+ declare const _IconButton: (props: IconButtonProps & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").ReactNode;
5
+ export { _IconButton as IconButton };
6
+ //# sourceMappingURL=icon-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/icon-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE5F,MAAM,WAAW,eAAgB,SAAQ,eAAe,EAAE,qBAAqB,EAAE,iBAAiB;CAAG;AAyCrG,QAAA,MAAM,WAAW,2JAAuD,CAAC;AAEzE,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.IconButton = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const clsx_1 = __importDefault(require("clsx"));
9
+ const react_aria_components_1 = require("react-aria-components");
10
+ const forward_ref_js_1 = require("../../forward-ref.js");
11
+ const with_style_props_js_1 = require("../../with-style-props.js");
12
+ const spinner_js_1 = require("../spinner/spinner.js");
13
+ function IconButton({ icon, variant = 'secondary', tone = 'base', size = 'medium', isLoading = false, isDisabled = false, fullWidth = false, UNSAFE_className, UNSAFE_style, ...props }, ref) {
14
+ return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { ...props, ref: ref, className: (0, clsx_1.default)('cim-icon-button', UNSAFE_className), style: UNSAFE_style, "data-variant": variant, "data-tone": tone, "data-size": size, "data-full-width": fullWidth ? true : undefined, isDisabled: isDisabled, isPending: isLoading, children: ({ isPending }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [icon, isPending && (0, jsx_runtime_1.jsx)(spinner_js_1.Spinner, { "aria-label": "in progress" })] })) }));
15
+ }
16
+ const _IconButton = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(IconButton), 'IconButton');
17
+ exports.IconButton = _IconButton;
18
+ //# sourceMappingURL=icon-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/components/button/icon-button.tsx"],"names":[],"mappings":";;;;;;;AAAA,gDAAwB;AAExB,iEAA4D;AAC5D,yDAAkD;AAClD,mEAA2D;AAC3D,sDAAgD;AAKhD,SAAS,UAAU,CACjB,EACE,IAAI,EACJ,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACQ,EAClB,GAAoC;IAEpC,OAAO,CACL,uBAAC,8BAAS,OACJ,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,EACpD,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,YAEnB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClB,6DACG,IAAI,EAEJ,SAAS,IAAI,uBAAC,oBAAO,kBAAY,aAAa,GAAG,IACjD,CACJ,GACS,CACb,CAAC;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AAEjD,iCAAU","sourcesContent":["import clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Button as RACButton } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Spinner } from '../spinner/spinner.js';\nimport type { ActionButtonProps, BaseButtonProps, SingleIconButtonProps } from './types.js';\n\nexport interface IconButtonProps extends BaseButtonProps, SingleIconButtonProps, ActionButtonProps {}\n\nfunction IconButton(\n {\n icon,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n isLoading = false,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: IconButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n return (\n <RACButton\n {...props}\n ref={ref}\n className={clsx('cim-icon-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n isPending={isLoading}\n >\n {({ isPending }) => (\n <>\n {icon}\n {/* TODO: i18n */}\n {isPending && <Spinner aria-label=\"in progress\" />}\n </>\n )}\n </RACButton>\n );\n}\n\nconst _IconButton = withStyleProps(forwardRef(IconButton), 'IconButton');\n\nexport { _IconButton as IconButton };\n"]}
@@ -0,0 +1,7 @@
1
+ import type { NavigationProps } from '../types.js';
2
+ import type { BaseButtonProps, SingleIconButtonProps } from './types.js';
3
+ export interface IconLinkButtonProps extends Omit<BaseButtonProps, 'id'>, SingleIconButtonProps, NavigationProps {
4
+ }
5
+ declare const _IconLinkButton: (props: IconLinkButtonProps & import("react").RefAttributes<HTMLAnchorElement> & import("../../with-style-props.js").StyleProps) => import("react").ReactNode;
6
+ export { _IconLinkButton as IconLinkButton };
7
+ //# sourceMappingURL=icon-link-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-link-button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/icon-link-button.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,EAAE,qBAAqB,EAAE,eAAe;CAAG;AAiCnH,QAAA,MAAM,eAAe,+JAA+D,CAAC;AAErF,OAAO,EAAE,eAAe,IAAI,cAAc,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.IconLinkButton = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const clsx_1 = __importDefault(require("clsx"));
9
+ const react_aria_components_1 = require("react-aria-components");
10
+ const forward_ref_js_1 = require("../../forward-ref.js");
11
+ const with_style_props_js_1 = require("../../with-style-props.js");
12
+ function IconLinkButton({ icon, variant = 'secondary', tone = 'base', size = 'medium', isDisabled = false, fullWidth = false, UNSAFE_className, UNSAFE_style, ...props }, ref) {
13
+ return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Link, { ...props, ref: ref, className: (0, clsx_1.default)('cim-icon-button', UNSAFE_className), style: UNSAFE_style, "data-variant": variant, "data-tone": tone, "data-size": size, "data-full-width": fullWidth ? true : undefined, isDisabled: isDisabled, children: icon }));
14
+ }
15
+ const _IconLinkButton = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(IconLinkButton), 'IconLinkButton');
16
+ exports.IconLinkButton = _IconLinkButton;
17
+ //# sourceMappingURL=icon-link-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-link-button.js","sourceRoot":"","sources":["../../../../src/components/button/icon-link-button.tsx"],"names":[],"mappings":";;;;;;;AAAA,gDAAwB;AAExB,iEAAwD;AACxD,yDAAkD;AAClD,mEAA2D;AAM3D,SAAS,cAAc,CACrB,EACE,IAAI,EACJ,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACY,EACtB,GAAoC;IAEpC,OAAO,CACL,uBAAC,4BAAO,OACF,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,EACpD,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,YAErB,IAAI,GACG,CACX,CAAC;AACJ,CAAC;AAED,MAAM,eAAe,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAEzD,yCAAc","sourcesContent":["import clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps } from '../types.js';\nimport type { BaseButtonProps, SingleIconButtonProps } from './types.js';\n\nexport interface IconLinkButtonProps extends Omit<BaseButtonProps, 'id'>, SingleIconButtonProps, NavigationProps {}\n\nfunction IconLinkButton(\n {\n icon,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: IconLinkButtonProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-icon-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n >\n {icon}\n </RACLink>\n );\n}\n\nconst _IconLinkButton = withStyleProps(forwardRef(IconLinkButton), 'IconLinkButton');\n\nexport { _IconLinkButton as IconLinkButton };\n"]}
@@ -0,0 +1,7 @@
1
+ import type { NavigationProps } from '../types.js';
2
+ import type { BaseButtonProps, TextButtonProps } from './types.js';
3
+ export interface LinkButtonProps extends Omit<BaseButtonProps, 'id'>, TextButtonProps, NavigationProps {
4
+ }
5
+ declare const _LinkButton: (props: LinkButtonProps & import("react").RefAttributes<HTMLAnchorElement> & import("../../with-style-props.js").StyleProps) => import("react").ReactNode;
6
+ export { _LinkButton as LinkButton };
7
+ //# sourceMappingURL=link-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/link-button.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,EAAE,eAAe,EAAE,eAAe;CAAG;AAqCzG,QAAA,MAAM,WAAW,2JAAuD,CAAC;AAEzE,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LinkButton = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const clsx_1 = __importDefault(require("clsx"));
9
+ const react_aria_components_1 = require("react-aria-components");
10
+ const forward_ref_js_1 = require("../../forward-ref.js");
11
+ const with_style_props_js_1 = require("../../with-style-props.js");
12
+ function LinkButton({ children, variant = 'secondary', tone = 'base', size = 'medium', iconStart, iconEnd, isDisabled = false, fullWidth = false, UNSAFE_className, UNSAFE_style, ...props }, ref) {
13
+ return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.Link, { ...props, ref: ref, className: (0, clsx_1.default)('cim-button', UNSAFE_className), style: UNSAFE_style, "data-variant": variant, "data-tone": tone, "data-size": size, "data-full-width": fullWidth ? true : undefined, isDisabled: isDisabled, children: [iconStart, (0, jsx_runtime_1.jsx)("span", { children: children }), iconEnd] }));
14
+ }
15
+ const _LinkButton = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(LinkButton), 'LinkButton');
16
+ exports.LinkButton = _LinkButton;
17
+ //# sourceMappingURL=link-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-button.js","sourceRoot":"","sources":["../../../../src/components/button/link-button.tsx"],"names":[],"mappings":";;;;;;;AAAA,gDAAwB;AAExB,iEAAwD;AACxD,yDAAkD;AAClD,mEAA2D;AAM3D,SAAS,UAAU,CACjB,EACE,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACQ,EAClB,GAAoC;IAEpC,OAAO,CACL,wBAAC,4BAAO,OACF,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,YAAY,EAAE,gBAAgB,CAAC,EAC/C,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,aAErB,SAAS,EACV,2CAAO,QAAQ,GAAQ,EACtB,OAAO,IACA,CACX,CAAC;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AAEjD,iCAAU","sourcesContent":["import clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps } from '../types.js';\nimport type { BaseButtonProps, TextButtonProps } from './types.js';\n\nexport interface LinkButtonProps extends Omit<BaseButtonProps, 'id'>, TextButtonProps, NavigationProps {}\n\nfunction LinkButton(\n {\n children,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n iconStart,\n iconEnd,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: LinkButtonProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n >\n {iconStart}\n <span>{children}</span>\n {iconEnd}\n </RACLink>\n );\n}\n\nconst _LinkButton = withStyleProps(forwardRef(LinkButton), 'LinkButton');\n\nexport { _LinkButton as LinkButton };\n"]}
@@ -0,0 +1,62 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ButtonProps as RACButtonProps } from 'react-aria-components';
3
+ import type { DOMProps } from '../types.js';
4
+ /**
5
+ * Props available on all buttons.
6
+ */
7
+ export interface BaseButtonProps extends DOMProps {
8
+ /**
9
+ * Determines the visual appearance of the button.
10
+ * @default 'secondary'
11
+ */
12
+ variant?: 'primary' | 'secondary' | 'tertiary';
13
+ /**
14
+ * Determines the color tone of the button.
15
+ * @default 'base'
16
+ */
17
+ tone?: 'base' | 'critical';
18
+ /**
19
+ * The size of the button.
20
+ * @default 'medium'
21
+ */
22
+ size?: 'small' | 'medium' | 'large';
23
+ /**
24
+ * Whether the button should take up the whole available width.
25
+ *
26
+ * @default false
27
+ */
28
+ fullWidth?: boolean;
29
+ }
30
+ /**
31
+ * Props available on buttons containing text.
32
+ */
33
+ export interface TextButtonProps {
34
+ /** The text displayed on the button. */
35
+ children: string;
36
+ /** An icon displayed before the button text. */
37
+ iconStart?: ReactNode;
38
+ /** An icon displayed after the button text. */
39
+ iconEnd?: ReactNode;
40
+ }
41
+ /**
42
+ * Props available on buttons containing a single icon.
43
+ */
44
+ export interface SingleIconButtonProps {
45
+ /** The icon displayed on the button. */
46
+ icon: ReactNode;
47
+ /** The label describing the function of this button for assistive technologies. */
48
+ 'aria-label': string;
49
+ }
50
+ /**
51
+ * Props available on buttons that perform an action (non-navigational).
52
+ */
53
+ export interface ActionButtonProps extends Pick<RACButtonProps, 'form' | 'name' | 'value' | 'onPress' | 'type' | 'isDisabled'> {
54
+ /**
55
+ * Whether the button is in a loading state.
56
+ * This disables the button and replaces its contents with a spinner.
57
+ *
58
+ * @default false
59
+ */
60
+ isLoading?: boolean;
61
+ }
62
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,mFAAmF;IACnF,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,CAAC;IAC3F;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/button/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ButtonProps as RACButtonProps } from 'react-aria-components';\nimport type { DOMProps } from '../types.js';\n\n/**\n * Props available on all buttons.\n */\nexport interface BaseButtonProps extends DOMProps {\n /**\n * Determines the visual appearance of the button.\n * @default 'secondary'\n */\n variant?: 'primary' | 'secondary' | 'tertiary';\n /**\n * Determines the color tone of the button.\n * @default 'base'\n */\n tone?: 'base' | 'critical';\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Whether the button should take up the whole available width.\n *\n * @default false\n */\n fullWidth?: boolean;\n}\n\n/**\n * Props available on buttons containing text.\n */\nexport interface TextButtonProps {\n /** The text displayed on the button. */\n children: string;\n /** An icon displayed before the button text. */\n iconStart?: ReactNode;\n /** An icon displayed after the button text. */\n iconEnd?: ReactNode;\n}\n\n/**\n * Props available on buttons containing a single icon.\n */\nexport interface SingleIconButtonProps {\n /** The icon displayed on the button. */\n icon: ReactNode;\n /** The label describing the function of this button for assistive technologies. */\n 'aria-label': string;\n}\n\n/**\n * Props available on buttons that perform an action (non-navigational).\n */\nexport interface ActionButtonProps\n extends Pick<RACButtonProps, 'form' | 'name' | 'value' | 'onPress' | 'type' | 'isDisabled'> {\n /**\n * Whether the button is in a loading state.\n * This disables the button and replaces its contents with a spinner.\n *\n * @default false\n */\n isLoading?: boolean;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type CheckboxGroupProps as RACCheckboxGroupProps } from 'react-aria-components';
3
+ import { type StackProps } from '../spacing/stack/stack.js';
4
+ import type { DOMProps, FieldProps, WithRequired } from '../types.js';
5
+ export interface CheckboxGroupProps extends DOMProps, WithRequired<FieldProps<string[]>, 'label'>, Pick<RACCheckboxGroupProps, 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'>, Pick<StackProps, 'inline'> {
6
+ /** Checkboxes belonging to the group. Each checkbox must have a `value` prop defined. */
7
+ children: ReactNode;
8
+ }
9
+ declare const _CheckboxGroup: (props: CheckboxGroupProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => ReactNode;
10
+ export { _CheckboxGroup as CheckboxGroup };
11
+ //# sourceMappingURL=checkbox-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,KAAK,kBAAkB,IAAI,qBAAqB,EACjD,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEtE,MAAM,WAAW,kBACf,SAAQ,QAAQ,EACd,YAAY,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAC3C,IAAI,CACF,qBAAqB,EACrB,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,CAC1G,EACD,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,yFAAyF;IACzF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAgCD,QAAA,MAAM,cAAc,2IAA6D,CAAC;AAElF,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CheckboxGroup = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const clsx_1 = __importDefault(require("clsx"));
9
+ const react_aria_components_1 = require("react-aria-components");
10
+ const forward_ref_js_1 = require("../../forward-ref.js");
11
+ const with_style_props_js_1 = require("../../with-style-props.js");
12
+ const form_field_js_1 = require("../form-field/form-field.js");
13
+ const stack_js_1 = require("../spacing/stack/stack.js");
14
+ function CheckboxGroup({ label, description, error: errorMessage, inline = false, children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
15
+ return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.CheckboxGroup, { ...props, ref: ref, className: (0, clsx_1.default)('cim-checkbox-group', UNSAFE_className), style: UNSAFE_style, children: [(0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldLabel, { isRequired: props.isRequired, children: label }), (0, jsx_runtime_1.jsx)(stack_js_1.Stack, { gap: getGapFromInline(inline), inline: inline, children: children }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldError, { children: errorMessage }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldDescription, { children: description })] }));
16
+ }
17
+ const _CheckboxGroup = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(CheckboxGroup), 'CheckboxGroup');
18
+ exports.CheckboxGroup = _CheckboxGroup;
19
+ // Make sure that checkboxes are spaced by 16px when stacked inline, and 4px otherwise.
20
+ function getGapFromInline(inline) {
21
+ if (typeof inline === 'object') {
22
+ const gap = { xs: inline.xs ? 16 : 4 };
23
+ Object.entries(inline).reduce((acc, curr) => {
24
+ gap[curr[0]] = curr[1] ? 16 : 4;
25
+ return acc;
26
+ }, gap);
27
+ return gap;
28
+ }
29
+ return inline ? 16 : 4;
30
+ }
31
+ //# sourceMappingURL=checkbox-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"names":[],"mappings":";;;;;;;AAAA,gDAAwB;AAGxB,iEAG+B;AAC/B,yDAAkD;AAClD,mEAA2D;AAC3D,+DAAmG;AACnG,wDAAmE;AAgBnE,SAAS,aAAa,CACpB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,MAAM,GAAG,KAAK,EACd,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACW,EACrB,GAAiC;IAEjC,OAAO,CACL,wBAAC,qCAAgB,OACX,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,oBAAoB,EAAE,gBAAgB,CAAC,EACvD,KAAK,EAAE,YAAY,aAEnB,uBAAC,8BAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,YAAG,KAAK,GAAkB,EACtE,uBAAC,gBAAK,IAAC,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,YACjD,QAAQ,GACH,EACR,uBAAC,8BAAc,cAAE,YAAY,GAAkB,EAC/C,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,IACzC,CACpB,CAAC;AACJ,CAAC;AAED,MAAM,cAAc,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,aAAa,CAAC,EAAE,eAAe,CAAC,CAAC;AAEvD,uCAAa;AAExC,uFAAuF;AACvF,SAAS,gBAAgB,CAAC,MAA2B;IACnD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAwB,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAE3D,MAAM,CAAC,OAAO,CAAC,MAAM,CAA6B,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACvE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAChC,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,OAAO,GAAG,CAAC;IACb,CAAC;IAED,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { ReactNode } from 'react';\nimport type { ForwardedRef } from 'react';\nimport {\n CheckboxGroup as RACCheckboxGroup,\n type CheckboxGroupProps as RACCheckboxGroupProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../form-field/form-field.js';\nimport { Stack, type StackProps } from '../spacing/stack/stack.js';\nimport type { Breakpoint, Responsive, Spacing } from '../spacing/types.js';\nimport type { DOMProps, FieldProps, WithRequired } from '../types.js';\n\nexport interface CheckboxGroupProps\n extends DOMProps,\n WithRequired<FieldProps<string[]>, 'label'>,\n Pick<\n RACCheckboxGroupProps,\n 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'\n >,\n Pick<StackProps, 'inline'> {\n /** Checkboxes belonging to the group. Each checkbox must have a `value` prop defined. */\n children: ReactNode;\n}\n\nfunction CheckboxGroup(\n {\n label,\n description,\n error: errorMessage,\n inline = false,\n children,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: CheckboxGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACCheckboxGroup\n {...props}\n ref={ref}\n className={clsx('cim-checkbox-group', UNSAFE_className)}\n style={UNSAFE_style}\n >\n <FormFieldLabel isRequired={props.isRequired}>{label}</FormFieldLabel>\n <Stack gap={getGapFromInline(inline)} inline={inline}>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACCheckboxGroup>\n );\n}\n\nconst _CheckboxGroup = withStyleProps(forwardRef(CheckboxGroup), 'CheckboxGroup');\n\nexport { _CheckboxGroup as CheckboxGroup };\n\n// Make sure that checkboxes are spaced by 16px when stacked inline, and 4px otherwise.\nfunction getGapFromInline(inline: Responsive<boolean>): Responsive<Spacing> {\n if (typeof inline === 'object') {\n const gap: Responsive<Spacing> = { xs: inline.xs ? 16 : 4 };\n\n (Object.entries(inline) as [Breakpoint, boolean][]).reduce((acc, curr) => {\n gap[curr[0]] = curr[1] ? 16 : 4;\n return acc;\n }, gap);\n\n return gap;\n }\n\n return inline ? 16 : 4;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import { type CheckboxProps as RACCheckboxProps } from 'react-aria-components';
2
+ import type { DOMProps, LabellableProps } from '../types.js';
3
+ export interface CheckboxProps extends DOMProps, Omit<LabellableProps, 'label'>, Pick<RACCheckboxProps, 'onChange' | 'isSelected' | 'isIndeterminate' | 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'name' | 'value' | 'defaultSelected'> {
4
+ /** The label rendered next to the checkbox. */
5
+ children?: string;
6
+ }
7
+ declare const _Checkbox: (props: CheckboxProps & import("react").RefAttributes<HTMLLabelElement> & import("../../with-style-props.js").StyleProps) => import("react").ReactNode;
8
+ export { _Checkbox as Checkbox };
9
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,aAAa,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIxG,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG7D,MAAM,WAAW,aACf,SAAQ,QAAQ,EACd,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EAC9B,IAAI,CACF,gBAAgB,EACd,UAAU,GACV,YAAY,GACZ,iBAAiB,GACjB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,MAAM,GACN,OAAO,GACP,iBAAiB,CACpB;IACH,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAkCD,QAAA,MAAM,SAAS,wJAAmD,CAAC;AAEnE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Checkbox = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const clsx_1 = __importDefault(require("clsx"));
9
+ const react_1 = require("react");
10
+ const react_aria_components_1 = require("react-aria-components");
11
+ const forward_ref_js_1 = require("../../forward-ref.js");
12
+ const index_js_1 = require("../../icons/index.js");
13
+ const with_style_props_js_1 = require("../../with-style-props.js");
14
+ const text_js_1 = require("../typography/text.js");
15
+ function Checkbox({ children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
16
+ const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
17
+ (0, react_1.useEffect)(() => {
18
+ if (!children && !ariaLabel && !ariaLabelledBy) {
19
+ console.warn('Checkbox requires one of children / aria-label / aria-labelledby for accessibility');
20
+ }
21
+ }, [children, ariaLabel, ariaLabelledBy]);
22
+ return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Checkbox, { ...props, ref: ref, className: (0, clsx_1.default)('cim-checkbox', UNSAFE_className), style: UNSAFE_style, children: ({ isIndeterminate }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "cim-checkbox-toggle-wrapper", children: (0, jsx_runtime_1.jsx)("div", { className: "cim-checkbox-toggle", children: isIndeterminate ? (0, jsx_runtime_1.jsx)(index_js_1.IconMinusSmall, { "aria-hidden": "true" }) : (0, jsx_runtime_1.jsx)(index_js_1.IconCheckmarkSmall, { "aria-hidden": "true" }) }) }), children && ((0, jsx_runtime_1.jsx)(text_js_1.Text, { as: "span", variant: "body", children: children }))] })) }));
23
+ }
24
+ const _Checkbox = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Checkbox), 'Checkbox');
25
+ exports.Checkbox = _Checkbox;
26
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":";;;;;;;AAAA,gDAAwB;AACxB,iCAAqD;AACrD,iEAAwG;AACxG,yDAAkD;AAClD,mDAA0E;AAC1E,mEAA2D;AAE3D,mDAA6C;AAsB7C,SAAS,QAAQ,CACf,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAiB,EACrE,GAAmC;IAEnC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;QACrG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,uBAAC,gCAAW,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,YACrG,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CACxB,6DACE,gCAAK,SAAS,EAAC,6BAA6B,YAC1C,gCAAK,SAAS,EAAC,qBAAqB,YACjC,eAAe,CAAC,CAAC,CAAC,uBAAC,yBAAc,mBAAa,MAAM,GAAG,CAAC,CAAC,CAAC,uBAAC,6BAAkB,mBAAa,MAAM,GAAG,GAChG,GACF,EACL,QAAQ,IAAI,CACX,uBAAC,cAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,YAC3B,QAAQ,GACJ,CACR,IACA,CACJ,GACW,CACf,CAAC;AACJ,CAAC;AAED,MAAM,SAAS,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAE7C,6BAAQ","sourcesContent":["import clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Checkbox as RACCheckbox, type CheckboxProps as RACCheckboxProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmarkSmall, IconMinusSmall } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { DOMProps, LabellableProps } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface CheckboxProps\n extends DOMProps,\n Omit<LabellableProps, 'label'>,\n Pick<\n RACCheckboxProps,\n | 'onChange'\n | 'isSelected'\n | 'isIndeterminate'\n | 'isDisabled'\n | 'isReadOnly'\n | 'isRequired'\n | 'isInvalid'\n | 'name'\n | 'value'\n | 'defaultSelected'\n > {\n /** The label rendered next to the checkbox. */\n children?: string;\n}\n\nfunction Checkbox(\n { children, UNSAFE_className, UNSAFE_style, ...props }: CheckboxProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Checkbox requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACCheckbox {...props} ref={ref} className={clsx('cim-checkbox', UNSAFE_className)} style={UNSAFE_style}>\n {({ isIndeterminate }) => (\n <>\n <div className=\"cim-checkbox-toggle-wrapper\">\n <div className=\"cim-checkbox-toggle\">\n {isIndeterminate ? <IconMinusSmall aria-hidden=\"true\" /> : <IconCheckmarkSmall aria-hidden=\"true\" />}\n </div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"body\">\n {children}\n </Text>\n )}\n </>\n )}\n </RACCheckbox>\n );\n}\n\nconst _Checkbox = withStyleProps(forwardRef(Checkbox), 'Checkbox');\n\nexport { _Checkbox as Checkbox };\n"]}
@@ -0,0 +1,33 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ComboBoxProps as RACComboBoxProps } from 'react-aria-components';
3
+ import type { DOMProps, FieldWithPlaceholderProps, Key } from '../types.js';
4
+ export interface ComboBoxOption {
5
+ /** The unique id of the item. When integrated with a form, this will be the value of the option. */
6
+ id: string;
7
+ /** The content to display as the label of the option. */
8
+ label: string;
9
+ /** Whether the option is disabled. */
10
+ isDisabled?: boolean;
11
+ }
12
+ export interface ComboBoxOptionGroup {
13
+ /** The unique id of the group. */
14
+ id: string;
15
+ /** The content to display as the title of the group. */
16
+ label: string;
17
+ /** The options available for selection within the group. */
18
+ options: ComboBoxOption[];
19
+ isDisabled?: never;
20
+ }
21
+ export interface ComboBoxValidationValue {
22
+ /** The selected key in the ComboBox. */
23
+ selectedKey: Key | null;
24
+ /** The value of the ComboBox input. */
25
+ inputValue: string;
26
+ }
27
+ export interface ComboBoxProps<T extends object> extends Pick<RACComboBoxProps<T>, 'name' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onSelectionChange' | 'onInputChange'>, DOMProps, FieldWithPlaceholderProps<ComboBoxValidationValue> {
28
+ /** The options available for selection. Supports groups with a single level of nesting. */
29
+ options: Array<ComboBoxOption | ComboBoxOptionGroup>;
30
+ }
31
+ declare const _ComboBox: <T extends object>(props: ComboBoxProps<T> & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => ReactNode;
32
+ export { _ComboBox as ComboBox };
33
+ //# sourceMappingURL=combo-box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyC,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAClG,OAAO,EAWL,KAAK,aAAa,IAAI,gBAAgB,EAEvC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAG5E,MAAM,WAAW,cAAc;IAC7B,oGAAoG;IACpG,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,WAAW,EAAE,GAAG,GAAG,IAAI,CAAC;IACxB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAC7C,SAAQ,IAAI,CACR,gBAAgB,CAAC,CAAC,CAAC,EACjB,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,aAAa,GACb,oBAAoB,GACpB,YAAY,GACZ,mBAAmB,GACnB,WAAW,GACX,mBAAmB,GACnB,eAAe,CAClB,EACD,QAAQ,EACR,yBAAyB,CAAC,uBAAuB,CAAC;IACpD,2FAA2F;IAC3F,OAAO,EAAE,KAAK,CAAC,cAAc,GAAG,mBAAmB,CAAC,CAAC;CACtD;AAyCD,QAAA,MAAM,SAAS,GAvCG,CAAC,SAAS,MAAM,wIAuCgC,CAAC;AAEnE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC"}