@cimpress-ui/react 0.0.0 → 0.0.1

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 (348) hide show
  1. package/README.md +1 -1
  2. package/dist/commonjs/components/button/button.d.ts +6 -1
  3. package/dist/commonjs/components/button/button.d.ts.map +1 -1
  4. package/dist/commonjs/components/button/button.js +16 -3
  5. package/dist/commonjs/components/button/button.js.map +1 -1
  6. package/dist/commonjs/components/button/constants.d.ts +3 -0
  7. package/dist/commonjs/components/button/constants.d.ts.map +1 -0
  8. package/dist/commonjs/components/button/constants.js +9 -0
  9. package/dist/commonjs/components/button/constants.js.map +1 -0
  10. package/dist/commonjs/components/button/icon-button.d.ts +6 -1
  11. package/dist/commonjs/components/button/icon-button.d.ts.map +1 -1
  12. package/dist/commonjs/components/button/icon-button.js +16 -3
  13. package/dist/commonjs/components/button/icon-button.js.map +1 -1
  14. package/dist/commonjs/components/button/icon-link-button.d.ts +9 -3
  15. package/dist/commonjs/components/button/icon-link-button.d.ts.map +1 -1
  16. package/dist/commonjs/components/button/icon-link-button.js +6 -0
  17. package/dist/commonjs/components/button/icon-link-button.js.map +1 -1
  18. package/dist/commonjs/components/button/link-button.d.ts +9 -3
  19. package/dist/commonjs/components/button/link-button.d.ts.map +1 -1
  20. package/dist/commonjs/components/button/link-button.js +6 -0
  21. package/dist/commonjs/components/button/link-button.js.map +1 -1
  22. package/dist/commonjs/components/button/types.d.ts +11 -5
  23. package/dist/commonjs/components/button/types.d.ts.map +1 -1
  24. package/dist/commonjs/components/button/types.js.map +1 -1
  25. package/dist/commonjs/components/checkbox/checkbox-group.d.ts +14 -4
  26. package/dist/commonjs/components/checkbox/checkbox-group.d.ts.map +1 -1
  27. package/dist/commonjs/components/checkbox/checkbox-group.js +16 -10
  28. package/dist/commonjs/components/checkbox/checkbox-group.js.map +1 -1
  29. package/dist/commonjs/components/checkbox/checkbox.d.ts +9 -4
  30. package/dist/commonjs/components/checkbox/checkbox.d.ts.map +1 -1
  31. package/dist/commonjs/components/checkbox/checkbox.js +7 -1
  32. package/dist/commonjs/components/checkbox/checkbox.js.map +1 -1
  33. package/dist/commonjs/components/combo-box/combo-box.d.ts +25 -24
  34. package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -1
  35. package/dist/commonjs/components/combo-box/combo-box.js +31 -16
  36. package/dist/commonjs/components/combo-box/combo-box.js.map +1 -1
  37. package/dist/commonjs/components/form/form.d.ts +8 -3
  38. package/dist/commonjs/components/form/form.d.ts.map +1 -1
  39. package/dist/commonjs/components/form/form.js +6 -0
  40. package/dist/commonjs/components/form/form.js.map +1 -1
  41. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts +16 -0
  42. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -0
  43. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js +17 -0
  44. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js.map +1 -0
  45. package/dist/commonjs/components/internal/form-field/form-field.d.ts +29 -0
  46. package/dist/commonjs/components/internal/form-field/form-field.d.ts.map +1 -0
  47. package/dist/commonjs/components/internal/form-field/form-field.js +56 -0
  48. package/dist/commonjs/components/internal/form-field/form-field.js.map +1 -0
  49. package/dist/commonjs/components/internal/spinner/spinner.d.ts +18 -0
  50. package/dist/commonjs/components/internal/spinner/spinner.d.ts.map +1 -0
  51. package/dist/commonjs/components/internal/spinner/spinner.js +19 -0
  52. package/dist/commonjs/components/internal/spinner/spinner.js.map +1 -0
  53. package/dist/commonjs/components/menu/menu.d.ts +24 -14
  54. package/dist/commonjs/components/menu/menu.d.ts.map +1 -1
  55. package/dist/commonjs/components/menu/menu.js +38 -15
  56. package/dist/commonjs/components/menu/menu.js.map +1 -1
  57. package/dist/commonjs/components/radio/radio-group.d.ts +14 -4
  58. package/dist/commonjs/components/radio/radio-group.d.ts.map +1 -1
  59. package/dist/commonjs/components/radio/radio-group.js +16 -10
  60. package/dist/commonjs/components/radio/radio-group.js.map +1 -1
  61. package/dist/commonjs/components/radio/radio.d.ts +9 -4
  62. package/dist/commonjs/components/radio/radio.d.ts.map +1 -1
  63. package/dist/commonjs/components/radio/radio.js +6 -0
  64. package/dist/commonjs/components/radio/radio.js.map +1 -1
  65. package/dist/commonjs/components/select/select.d.ts +27 -24
  66. package/dist/commonjs/components/select/select.d.ts.map +1 -1
  67. package/dist/commonjs/components/select/select.js +33 -14
  68. package/dist/commonjs/components/select/select.js.map +1 -1
  69. package/dist/commonjs/components/spacing/box/box.d.ts +5 -3
  70. package/dist/commonjs/components/spacing/box/box.d.ts.map +1 -1
  71. package/dist/commonjs/components/spacing/box/box.js +2 -0
  72. package/dist/commonjs/components/spacing/box/box.js.map +1 -1
  73. package/dist/commonjs/components/spacing/stack/stack.d.ts +28 -4
  74. package/dist/commonjs/components/spacing/stack/stack.d.ts.map +1 -1
  75. package/dist/commonjs/components/spacing/stack/stack.js +11 -3
  76. package/dist/commonjs/components/spacing/stack/stack.js.map +1 -1
  77. package/dist/commonjs/components/spacing/types.d.ts +9 -0
  78. package/dist/commonjs/components/spacing/types.d.ts.map +1 -1
  79. package/dist/commonjs/components/spacing/types.js +6 -0
  80. package/dist/commonjs/components/spacing/types.js.map +1 -1
  81. package/dist/commonjs/components/spinner/spinner.d.ts +8 -5
  82. package/dist/commonjs/components/spinner/spinner.d.ts.map +1 -1
  83. package/dist/commonjs/components/spinner/spinner.js +23 -14
  84. package/dist/commonjs/components/spinner/spinner.js.map +1 -1
  85. package/dist/commonjs/components/text-inputs/text-area.d.ts +4 -3
  86. package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -1
  87. package/dist/commonjs/components/text-inputs/text-area.js +13 -3
  88. package/dist/commonjs/components/text-inputs/text-area.js.map +1 -1
  89. package/dist/commonjs/components/text-inputs/text-field.d.ts +8 -3
  90. package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -1
  91. package/dist/commonjs/components/text-inputs/text-field.js +14 -1
  92. package/dist/commonjs/components/text-inputs/text-field.js.map +1 -1
  93. package/dist/commonjs/components/types.d.ts +67 -11
  94. package/dist/commonjs/components/types.d.ts.map +1 -1
  95. package/dist/commonjs/components/types.js.map +1 -1
  96. package/dist/commonjs/components/typography/link.d.ts +4 -3
  97. package/dist/commonjs/components/typography/link.d.ts.map +1 -1
  98. package/dist/commonjs/components/typography/link.js +6 -1
  99. package/dist/commonjs/components/typography/link.js.map +1 -1
  100. package/dist/commonjs/components/typography/text.d.ts +3 -2
  101. package/dist/commonjs/components/typography/text.d.ts.map +1 -1
  102. package/dist/commonjs/components/typography/text.js +3 -0
  103. package/dist/commonjs/components/typography/text.js.map +1 -1
  104. package/dist/commonjs/components/typography/types.d.ts +3 -2
  105. package/dist/commonjs/components/typography/types.d.ts.map +1 -1
  106. package/dist/commonjs/components/typography/types.js.map +1 -1
  107. package/dist/commonjs/components/typography/utils.d.ts +1 -0
  108. package/dist/commonjs/components/typography/utils.d.ts.map +1 -1
  109. package/dist/commonjs/components/typography/utils.js +1 -0
  110. package/dist/commonjs/components/typography/utils.js.map +1 -1
  111. package/dist/commonjs/forward-ref.d.ts +2 -2
  112. package/dist/commonjs/forward-ref.d.ts.map +1 -1
  113. package/dist/commonjs/forward-ref.js +1 -0
  114. package/dist/commonjs/forward-ref.js.map +1 -1
  115. package/dist/commonjs/icons/add.d.ts +3 -2
  116. package/dist/commonjs/icons/add.d.ts.map +1 -1
  117. package/dist/commonjs/icons/add.js +16 -2
  118. package/dist/commonjs/icons/add.js.map +1 -1
  119. package/dist/commonjs/icons/alert-triangle.d.ts +3 -2
  120. package/dist/commonjs/icons/alert-triangle.d.ts.map +1 -1
  121. package/dist/commonjs/icons/alert-triangle.js +16 -2
  122. package/dist/commonjs/icons/alert-triangle.js.map +1 -1
  123. package/dist/commonjs/icons/checkmark-circle-fill.d.ts +8 -0
  124. package/dist/commonjs/icons/checkmark-circle-fill.d.ts.map +1 -0
  125. package/dist/commonjs/icons/checkmark-circle-fill.js +21 -0
  126. package/dist/commonjs/icons/checkmark-circle-fill.js.map +1 -0
  127. package/dist/commonjs/icons/checkmark-small.d.ts +3 -2
  128. package/dist/commonjs/icons/checkmark-small.d.ts.map +1 -1
  129. package/dist/commonjs/icons/checkmark-small.js +16 -2
  130. package/dist/commonjs/icons/checkmark-small.js.map +1 -1
  131. package/dist/commonjs/icons/checkmark.d.ts +8 -0
  132. package/dist/commonjs/icons/checkmark.d.ts.map +1 -0
  133. package/dist/commonjs/icons/checkmark.js +21 -0
  134. package/dist/commonjs/icons/checkmark.js.map +1 -0
  135. package/dist/commonjs/icons/chevron-down-fill.d.ts +8 -0
  136. package/dist/commonjs/icons/chevron-down-fill.d.ts.map +1 -0
  137. package/dist/commonjs/icons/chevron-down-fill.js +21 -0
  138. package/dist/commonjs/icons/chevron-down-fill.js.map +1 -0
  139. package/dist/commonjs/icons/error-circle-fill.d.ts +8 -0
  140. package/dist/commonjs/icons/error-circle-fill.d.ts.map +1 -0
  141. package/dist/commonjs/icons/error-circle-fill.js +21 -0
  142. package/dist/commonjs/icons/error-circle-fill.js.map +1 -0
  143. package/dist/commonjs/icons/index.d.ts +5 -0
  144. package/dist/commonjs/icons/index.d.ts.map +1 -1
  145. package/dist/commonjs/icons/index.js +9 -1
  146. package/dist/commonjs/icons/index.js.map +1 -1
  147. package/dist/commonjs/icons/minus-small.d.ts +3 -2
  148. package/dist/commonjs/icons/minus-small.d.ts.map +1 -1
  149. package/dist/commonjs/icons/minus-small.js +16 -2
  150. package/dist/commonjs/icons/minus-small.js.map +1 -1
  151. package/dist/commonjs/index.d.ts +13 -11
  152. package/dist/commonjs/index.d.ts.map +1 -1
  153. package/dist/commonjs/index.js +11 -10
  154. package/dist/commonjs/index.js.map +1 -1
  155. package/dist/commonjs/providers/router/router-provider.d.ts +20 -0
  156. package/dist/commonjs/providers/router/router-provider.d.ts.map +1 -0
  157. package/dist/commonjs/providers/router/router-provider.js +15 -0
  158. package/dist/commonjs/providers/router/router-provider.js.map +1 -0
  159. package/dist/commonjs/providers/ssr/ssr-provider.d.ts +7 -3
  160. package/dist/commonjs/providers/ssr/ssr-provider.d.ts.map +1 -1
  161. package/dist/commonjs/providers/ssr/ssr-provider.js +3 -1
  162. package/dist/commonjs/providers/ssr/ssr-provider.js.map +1 -1
  163. package/dist/commonjs/with-style-props.d.ts +17 -11
  164. package/dist/commonjs/with-style-props.d.ts.map +1 -1
  165. package/dist/commonjs/with-style-props.js.map +1 -1
  166. package/dist/esm/components/button/button.d.ts +6 -1
  167. package/dist/esm/components/button/button.d.ts.map +1 -1
  168. package/dist/esm/components/button/button.js +16 -3
  169. package/dist/esm/components/button/button.js.map +1 -1
  170. package/dist/esm/components/button/constants.d.ts +3 -0
  171. package/dist/esm/components/button/constants.d.ts.map +1 -0
  172. package/dist/esm/components/button/constants.js +6 -0
  173. package/dist/esm/components/button/constants.js.map +1 -0
  174. package/dist/esm/components/button/icon-button.d.ts +6 -1
  175. package/dist/esm/components/button/icon-button.d.ts.map +1 -1
  176. package/dist/esm/components/button/icon-button.js +16 -3
  177. package/dist/esm/components/button/icon-button.js.map +1 -1
  178. package/dist/esm/components/button/icon-link-button.d.ts +9 -3
  179. package/dist/esm/components/button/icon-link-button.d.ts.map +1 -1
  180. package/dist/esm/components/button/icon-link-button.js +6 -0
  181. package/dist/esm/components/button/icon-link-button.js.map +1 -1
  182. package/dist/esm/components/button/link-button.d.ts +9 -3
  183. package/dist/esm/components/button/link-button.d.ts.map +1 -1
  184. package/dist/esm/components/button/link-button.js +6 -0
  185. package/dist/esm/components/button/link-button.js.map +1 -1
  186. package/dist/esm/components/button/types.d.ts +11 -5
  187. package/dist/esm/components/button/types.d.ts.map +1 -1
  188. package/dist/esm/components/button/types.js.map +1 -1
  189. package/dist/esm/components/checkbox/checkbox-group.d.ts +14 -4
  190. package/dist/esm/components/checkbox/checkbox-group.d.ts.map +1 -1
  191. package/dist/esm/components/checkbox/checkbox-group.js +16 -10
  192. package/dist/esm/components/checkbox/checkbox-group.js.map +1 -1
  193. package/dist/esm/components/checkbox/checkbox.d.ts +9 -4
  194. package/dist/esm/components/checkbox/checkbox.d.ts.map +1 -1
  195. package/dist/esm/components/checkbox/checkbox.js +7 -1
  196. package/dist/esm/components/checkbox/checkbox.js.map +1 -1
  197. package/dist/esm/components/combo-box/combo-box.d.ts +25 -24
  198. package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -1
  199. package/dist/esm/components/combo-box/combo-box.js +35 -22
  200. package/dist/esm/components/combo-box/combo-box.js.map +1 -1
  201. package/dist/esm/components/form/form.d.ts +8 -3
  202. package/dist/esm/components/form/form.d.ts.map +1 -1
  203. package/dist/esm/components/form/form.js +6 -0
  204. package/dist/esm/components/form/form.js.map +1 -1
  205. package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts +16 -0
  206. package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -0
  207. package/dist/esm/components/internal/collapsible-list/collapsible-list.js +14 -0
  208. package/dist/esm/components/internal/collapsible-list/collapsible-list.js.map +1 -0
  209. package/dist/esm/components/internal/form-field/form-field.d.ts +29 -0
  210. package/dist/esm/components/internal/form-field/form-field.d.ts.map +1 -0
  211. package/dist/esm/components/internal/form-field/form-field.js +48 -0
  212. package/dist/esm/components/internal/form-field/form-field.js.map +1 -0
  213. package/dist/esm/components/internal/spinner/spinner.d.ts +18 -0
  214. package/dist/esm/components/internal/spinner/spinner.d.ts.map +1 -0
  215. package/dist/esm/components/internal/spinner/spinner.js +14 -0
  216. package/dist/esm/components/internal/spinner/spinner.js.map +1 -0
  217. package/dist/esm/components/menu/menu.d.ts +24 -14
  218. package/dist/esm/components/menu/menu.d.ts.map +1 -1
  219. package/dist/esm/components/menu/menu.js +39 -16
  220. package/dist/esm/components/menu/menu.js.map +1 -1
  221. package/dist/esm/components/radio/radio-group.d.ts +14 -4
  222. package/dist/esm/components/radio/radio-group.d.ts.map +1 -1
  223. package/dist/esm/components/radio/radio-group.js +16 -10
  224. package/dist/esm/components/radio/radio-group.js.map +1 -1
  225. package/dist/esm/components/radio/radio.d.ts +9 -4
  226. package/dist/esm/components/radio/radio.d.ts.map +1 -1
  227. package/dist/esm/components/radio/radio.js +6 -0
  228. package/dist/esm/components/radio/radio.js.map +1 -1
  229. package/dist/esm/components/select/select.d.ts +27 -24
  230. package/dist/esm/components/select/select.d.ts.map +1 -1
  231. package/dist/esm/components/select/select.js +35 -18
  232. package/dist/esm/components/select/select.js.map +1 -1
  233. package/dist/esm/components/spacing/box/box.d.ts +5 -3
  234. package/dist/esm/components/spacing/box/box.d.ts.map +1 -1
  235. package/dist/esm/components/spacing/box/box.js +2 -0
  236. package/dist/esm/components/spacing/box/box.js.map +1 -1
  237. package/dist/esm/components/spacing/stack/stack.d.ts +28 -4
  238. package/dist/esm/components/spacing/stack/stack.d.ts.map +1 -1
  239. package/dist/esm/components/spacing/stack/stack.js +11 -3
  240. package/dist/esm/components/spacing/stack/stack.js.map +1 -1
  241. package/dist/esm/components/spacing/types.d.ts +9 -0
  242. package/dist/esm/components/spacing/types.d.ts.map +1 -1
  243. package/dist/esm/components/spacing/types.js +6 -0
  244. package/dist/esm/components/spacing/types.js.map +1 -1
  245. package/dist/esm/components/spinner/spinner.d.ts +8 -5
  246. package/dist/esm/components/spinner/spinner.d.ts.map +1 -1
  247. package/dist/esm/components/spinner/spinner.js +25 -13
  248. package/dist/esm/components/spinner/spinner.js.map +1 -1
  249. package/dist/esm/components/text-inputs/text-area.d.ts +4 -3
  250. package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -1
  251. package/dist/esm/components/text-inputs/text-area.js +13 -3
  252. package/dist/esm/components/text-inputs/text-area.js.map +1 -1
  253. package/dist/esm/components/text-inputs/text-field.d.ts +8 -3
  254. package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -1
  255. package/dist/esm/components/text-inputs/text-field.js +14 -1
  256. package/dist/esm/components/text-inputs/text-field.js.map +1 -1
  257. package/dist/esm/components/types.d.ts +67 -11
  258. package/dist/esm/components/types.d.ts.map +1 -1
  259. package/dist/esm/components/types.js.map +1 -1
  260. package/dist/esm/components/typography/link.d.ts +4 -3
  261. package/dist/esm/components/typography/link.d.ts.map +1 -1
  262. package/dist/esm/components/typography/link.js +7 -2
  263. package/dist/esm/components/typography/link.js.map +1 -1
  264. package/dist/esm/components/typography/text.d.ts +3 -2
  265. package/dist/esm/components/typography/text.d.ts.map +1 -1
  266. package/dist/esm/components/typography/text.js +3 -0
  267. package/dist/esm/components/typography/text.js.map +1 -1
  268. package/dist/esm/components/typography/types.d.ts +3 -2
  269. package/dist/esm/components/typography/types.d.ts.map +1 -1
  270. package/dist/esm/components/typography/types.js.map +1 -1
  271. package/dist/esm/components/typography/utils.d.ts +1 -0
  272. package/dist/esm/components/typography/utils.d.ts.map +1 -1
  273. package/dist/esm/components/typography/utils.js +1 -0
  274. package/dist/esm/components/typography/utils.js.map +1 -1
  275. package/dist/esm/forward-ref.d.ts +2 -2
  276. package/dist/esm/forward-ref.d.ts.map +1 -1
  277. package/dist/esm/forward-ref.js +1 -0
  278. package/dist/esm/forward-ref.js.map +1 -1
  279. package/dist/esm/icons/add.d.ts +3 -2
  280. package/dist/esm/icons/add.d.ts.map +1 -1
  281. package/dist/esm/icons/add.js +14 -3
  282. package/dist/esm/icons/add.js.map +1 -1
  283. package/dist/esm/icons/alert-triangle.d.ts +3 -2
  284. package/dist/esm/icons/alert-triangle.d.ts.map +1 -1
  285. package/dist/esm/icons/alert-triangle.js +13 -2
  286. package/dist/esm/icons/alert-triangle.js.map +1 -1
  287. package/dist/esm/icons/checkmark-circle-fill.d.ts +8 -0
  288. package/dist/esm/icons/checkmark-circle-fill.d.ts.map +1 -0
  289. package/dist/esm/icons/checkmark-circle-fill.js +16 -0
  290. package/dist/esm/icons/checkmark-circle-fill.js.map +1 -0
  291. package/dist/esm/icons/checkmark-small.d.ts +3 -2
  292. package/dist/esm/icons/checkmark-small.d.ts.map +1 -1
  293. package/dist/esm/icons/checkmark-small.js +13 -2
  294. package/dist/esm/icons/checkmark-small.js.map +1 -1
  295. package/dist/esm/icons/checkmark.d.ts +8 -0
  296. package/dist/esm/icons/checkmark.d.ts.map +1 -0
  297. package/dist/esm/icons/checkmark.js +16 -0
  298. package/dist/esm/icons/checkmark.js.map +1 -0
  299. package/dist/esm/icons/chevron-down-fill.d.ts +8 -0
  300. package/dist/esm/icons/chevron-down-fill.d.ts.map +1 -0
  301. package/dist/esm/icons/chevron-down-fill.js +16 -0
  302. package/dist/esm/icons/chevron-down-fill.js.map +1 -0
  303. package/dist/esm/icons/error-circle-fill.d.ts +8 -0
  304. package/dist/esm/icons/error-circle-fill.d.ts.map +1 -0
  305. package/dist/esm/icons/error-circle-fill.js +16 -0
  306. package/dist/esm/icons/error-circle-fill.js.map +1 -0
  307. package/dist/esm/icons/index.d.ts +5 -0
  308. package/dist/esm/icons/index.d.ts.map +1 -1
  309. package/dist/esm/icons/index.js +4 -0
  310. package/dist/esm/icons/index.js.map +1 -1
  311. package/dist/esm/icons/minus-small.d.ts +3 -2
  312. package/dist/esm/icons/minus-small.d.ts.map +1 -1
  313. package/dist/esm/icons/minus-small.js +13 -2
  314. package/dist/esm/icons/minus-small.js.map +1 -1
  315. package/dist/esm/index.d.ts +13 -11
  316. package/dist/esm/index.d.ts.map +1 -1
  317. package/dist/esm/index.js +11 -10
  318. package/dist/esm/index.js.map +1 -1
  319. package/dist/esm/providers/router/router-provider.d.ts +20 -0
  320. package/dist/esm/providers/router/router-provider.d.ts.map +1 -0
  321. package/dist/esm/providers/router/router-provider.js +12 -0
  322. package/dist/esm/providers/router/router-provider.js.map +1 -0
  323. package/dist/esm/providers/ssr/ssr-provider.d.ts +7 -3
  324. package/dist/esm/providers/ssr/ssr-provider.d.ts.map +1 -1
  325. package/dist/esm/providers/ssr/ssr-provider.js +3 -1
  326. package/dist/esm/providers/ssr/ssr-provider.js.map +1 -1
  327. package/dist/esm/with-style-props.d.ts +17 -11
  328. package/dist/esm/with-style-props.d.ts.map +1 -1
  329. package/dist/esm/with-style-props.js.map +1 -1
  330. package/dist-styles/styles.css +1 -1
  331. package/package.json +74 -29
  332. package/LICENSE +0 -201
  333. package/dist/commonjs/components/form-field/form-field.d.ts +0 -13
  334. package/dist/commonjs/components/form-field/form-field.d.ts.map +0 -1
  335. package/dist/commonjs/components/form-field/form-field.js +0 -36
  336. package/dist/commonjs/components/form-field/form-field.js.map +0 -1
  337. package/dist/commonjs/components/sr-only/sr-only.d.ts +0 -8
  338. package/dist/commonjs/components/sr-only/sr-only.d.ts.map +0 -1
  339. package/dist/commonjs/components/sr-only/sr-only.js +0 -10
  340. package/dist/commonjs/components/sr-only/sr-only.js.map +0 -1
  341. package/dist/esm/components/form-field/form-field.d.ts +0 -13
  342. package/dist/esm/components/form-field/form-field.d.ts.map +0 -1
  343. package/dist/esm/components/form-field/form-field.js +0 -28
  344. package/dist/esm/components/form-field/form-field.js.map +0 -1
  345. package/dist/esm/components/sr-only/sr-only.d.ts +0 -8
  346. package/dist/esm/components/sr-only/sr-only.d.ts.map +0 -1
  347. package/dist/esm/components/sr-only/sr-only.js +0 -7
  348. package/dist/esm/components/sr-only/sr-only.js.map +0 -1
@@ -1,13 +1,23 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import clsx from 'clsx';
4
+ import { useEffect } from 'react';
3
5
  import { TextArea as RACTextArea, TextField as RACTextField, } from 'react-aria-components';
4
6
  import { forwardRef } from '../../forward-ref.js';
5
7
  import { withStyleProps } from '../../with-style-props.js';
6
- import { FormFieldDescription, FormFieldError, FormFieldLabel } from '../form-field/form-field.js';
8
+ import { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';
7
9
  import { textStyle } from '../typography/utils.js';
8
- function TextArea({ label, description, error: errorMessage, placeholder, autoCapitalize, autoCorrect, spellCheck, wrap, UNSAFE_className, UNSAFE_style, ...props }, ref) {
9
- return (_jsxs(RACTextField, { ...props, ref: ref, className: clsx('cim-text-area', UNSAFE_className), style: UNSAFE_style, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsx(RACTextArea, { className: clsx('cim-text-area-input', textStyle({ variant: 'medium', tone: 'base' })), placeholder: placeholder, autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, spellCheck: spellCheck, wrap: wrap }), _jsx(FormFieldError, { children: errorMessage }), _jsx(FormFieldDescription, { children: description })] }));
10
+ function TextArea({ label, description, error: errorMessage, placeholder, autoCapitalize, autoCorrect, rows, spellCheck, wrap, UNSAFE_className, UNSAFE_style, ...props }, ref) {
11
+ const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
12
+ useEffect(() => {
13
+ if (!label && !ariaLabel && !ariaLabelledBy) {
14
+ console.warn('TextArea requires one of label / aria-label / aria-labelledby for accessibility');
15
+ }
16
+ }, [label, ariaLabel, ariaLabelledBy]);
17
+ return (_jsxs(RACTextField, { ...props, ref: ref, className: clsx('cim-text-area', UNSAFE_className), style: UNSAFE_style, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsx(RACTextArea, { className: clsx('cim-text-area-input', textStyle({ variant: 'medium', tone: 'base' })), placeholder: placeholder, autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, rows: rows, spellCheck: spellCheck, wrap: wrap }), _jsx(FormFieldError, { children: errorMessage }), _jsx(FormFieldDescription, { children: description })] }));
10
18
  }
19
+ // TODO: add link to usage guidelines
20
+ /** Allows users to enter multiple lines of text with a keyboard. */
11
21
  const _TextArea = withStyleProps(forwardRef(TextArea), 'TextArea');
12
22
  export { _TextArea as TextArea };
13
23
  //# sourceMappingURL=text-area.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.js","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-area.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,QAAQ,IAAI,WAAW,EACvB,SAAS,IAAI,YAAY,GAG1B,MAAM,uBAAu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} from 'react';\nimport {\n TextArea as RACTextArea,\n TextField as RACTextField,\n type TextAreaProps as RACTextAreaProps,\n type TextFieldProps as RACTextFieldProps,\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 type { DOMProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextAreaProps\n extends DOMProps,\n FieldWithPlaceholderProps<string>,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'name'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n >,\n Pick<RACTextAreaProps, 'autoCapitalize' | 'autoCorrect' | 'spellCheck' | 'wrap'> {}\n\nfunction TextArea(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n autoCapitalize,\n autoCorrect,\n spellCheck,\n wrap,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: TextAreaProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACTextField {...props} ref={ref} className={clsx('cim-text-area', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACTextArea\n className={clsx('cim-text-area-input', textStyle({ variant: 'medium', tone: 'base' }))}\n placeholder={placeholder}\n autoCapitalize={autoCapitalize}\n autoCorrect={autoCorrect}\n spellCheck={spellCheck}\n wrap={wrap}\n />\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACTextField>\n );\n}\n\nconst _TextArea = withStyleProps(forwardRef(TextArea), 'TextArea');\n\nexport { _TextArea as TextArea };\n"]}
1
+ {"version":3,"file":"text-area.js","sourceRoot":"","sources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ACvE,KAAK,GACS,EACjB,KAAC,WAAW,IACV,SAAS,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EACtF,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,GACV,EACF,KAAC,cAAc,cAAE,YAAY,GAAkB,EAC/C,KAAC,oBAAoB,cAAE,WAAW,GAAwB,IAC7C,CAChB,CAAC;AACJ,CAAC;AAED,qCAAqC;AACrC,oEAAoE;AACpE,MAAM,SAAS,GAAG,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAEnE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport {\n TextArea as RACTextArea,\n TextField as RACTextField,\n type TextAreaProps as RACTextAreaProps,\n type TextFieldProps as RACTextFieldProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextAreaProps\n extends CommonProps,\n FieldWithPlaceholderProps<string>,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'name'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n >,\n Pick<RACTextAreaProps, 'autoCapitalize' | 'autoCorrect' | 'rows' | 'spellCheck' | 'wrap'> {}\n\nfunction TextArea(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n autoCapitalize,\n autoCorrect,\n rows,\n spellCheck,\n wrap,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: TextAreaProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('TextArea requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACTextField {...props} ref={ref} className={clsx('cim-text-area', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACTextArea\n className={clsx('cim-text-area-input', textStyle({ variant: 'medium', tone: 'base' }))}\n placeholder={placeholder}\n autoCapitalize={autoCapitalize}\n autoCorrect={autoCorrect}\n rows={rows}\n spellCheck={spellCheck}\n wrap={wrap}\n />\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACTextField>\n );\n}\n\n// TODO: add link to usage guidelines\n/** Allows users to enter multiple lines of text with a keyboard. */\nconst _TextArea = withStyleProps(forwardRef(TextArea), 'TextArea');\n\nexport { _TextArea as TextArea };\n"]}
@@ -1,7 +1,12 @@
1
1
  import { type TextFieldProps as RACTextFieldProps } from 'react-aria-components';
2
- import type { DOMProps, FieldWithPlaceholderProps } from '../types.js';
3
- export interface TextFieldProps extends DOMProps, FieldWithPlaceholderProps<string>, Pick<RACTextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'name' | 'type' | 'autoFocus' | 'autoComplete' | 'inputMode' | 'minLength' | 'maxLength' | 'pattern'> {
2
+ import type { CommonProps, FieldWithPlaceholderProps } from '../types.js';
3
+ export interface TextFieldProps extends CommonProps, FieldWithPlaceholderProps<string>, Pick<RACTextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'name' | 'type' | 'autoFocus' | 'autoComplete' | 'inputMode' | 'minLength' | 'maxLength' | 'pattern'> {
4
4
  }
5
- declare const _TextField: (props: TextFieldProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").ReactNode;
5
+ /**
6
+ * Allows users to enter a single line of text with a keyboard.
7
+ *
8
+ * See [text field usage guidelines](https://ui.cimpress.io/components/text-field/usage-guidelines/).
9
+ */
10
+ declare const _TextField: (props: TextFieldProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
6
11
  export { _TextField as TextField };
7
12
  //# sourceMappingURL=text-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,cAAc,IAAI,iBAAiB,EACzC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGvE,MAAM,WAAW,cACf,SAAQ,QAAQ,EACd,yBAAyB,CAAC,MAAM,CAAC,EACjC,IAAI,CACF,iBAAiB,EACf,OAAO,GACP,cAAc,GACd,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,MAAM,GACN,MAAM,GACN,WAAW,GACX,cAAc,GACd,WAAW,GACX,WAAW,GACX,WAAW,GACX,SAAS,CACZ;CAAG;AAqBR,QAAA,MAAM,UAAU,uJAAqD,CAAC;AAEtE,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,cAAc,IAAI,iBAAiB,EACzC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAG1E,MAAM,WAAW,cACf,SAAQ,WAAW,EACjB,yBAAyB,CAAC,MAAM,CAAC,EACjC,IAAI,CACF,iBAAiB,EACf,OAAO,GACP,cAAc,GACd,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,MAAM,GACN,MAAM,GACN,WAAW,GACX,cAAc,GACd,WAAW,GACX,WAAW,GACX,WAAW,GACX,SAAS,CACZ;CAAG;AA6BR;;;;GAIG;AACH,QAAA,MAAM,UAAU,gKAAqD,CAAC;AAEtE,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC"}
@@ -1,13 +1,26 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import clsx from 'clsx';
4
+ import { useEffect } from 'react';
3
5
  import { Input as RACInput, TextField as RACTextField, } from 'react-aria-components';
4
6
  import { forwardRef } from '../../forward-ref.js';
5
7
  import { withStyleProps } from '../../with-style-props.js';
6
- import { FormFieldDescription, FormFieldError, FormFieldLabel } from '../form-field/form-field.js';
8
+ import { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';
7
9
  import { textStyle } from '../typography/utils.js';
8
10
  function TextField({ label, description, error: errorMessage, placeholder, UNSAFE_className, UNSAFE_style, ...props }, ref) {
11
+ const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
12
+ useEffect(() => {
13
+ if (!label && !ariaLabel && !ariaLabelledBy) {
14
+ console.warn('TextField requires one of label / aria-label / aria-labelledby for accessibility');
15
+ }
16
+ }, [label, ariaLabel, ariaLabelledBy]);
9
17
  return (_jsxs(RACTextField, { ...props, ref: ref, className: clsx('cim-text-field', UNSAFE_className), style: UNSAFE_style, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsx(RACInput, { className: clsx('cim-text-field-input', textStyle({ variant: 'medium', tone: 'base' })), placeholder: placeholder }), _jsx(FormFieldError, { children: errorMessage }), _jsx(FormFieldDescription, { children: description })] }));
10
18
  }
19
+ /**
20
+ * Allows users to enter a single line of text with a keyboard.
21
+ *
22
+ * See [text field usage guidelines](https://ui.cimpress.io/components/text-field/usage-guidelines/).
23
+ */
11
24
  const _TextField = withStyleProps(forwardRef(TextField), 'TextField');
12
25
  export { _TextField as TextField };
13
26
  //# sourceMappingURL=text-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,KAAK,IAAI,QAAQ,EACjB,SAAS,IAAI,YAAY,GAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEnG,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAwBnD,SAAS,SAAS,CAChB,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAkB,EAClH,GAAiC;IAEjC,OAAO,CACL,MAAC,YAAY,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aACzG,KAAC,cAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,YACvE,KAAK,GACS,EACjB,KAAC,QAAQ,IACP,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EACvF,WAAW,EAAE,WAAW,GACxB,EACF,KAAC,cAAc,cAAE,YAAY,GAAkB,EAC/C,KAAC,oBAAoB,cAAE,WAAW,GAAwB,IAC7C,CAChB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AAEtE,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport {\n Input as RACInput,\n TextField as RACTextField,\n type TextFieldProps as RACTextFieldProps,\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 type { DOMProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextFieldProps\n extends DOMProps,\n FieldWithPlaceholderProps<string>,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'name'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n | 'pattern'\n > {}\n\nfunction TextField(\n { label, description, error: errorMessage, placeholder, UNSAFE_className, UNSAFE_style, ...props }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACTextField {...props} ref={ref} className={clsx('cim-text-field', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACInput\n className={clsx('cim-text-field-input', textStyle({ variant: 'medium', tone: 'base' }))}\n placeholder={placeholder}\n />\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACTextField>\n );\n}\n\nconst _TextField = withStyleProps(forwardRef(TextField), 'TextField');\n\nexport { _TextField as TextField };\n"]}
1
+ {"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/text-inputs/text-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AACrD,OAAO,EACL,KAAK,IAAI,QAAQ,EACjB,SAAS,IAAI,YAAY,GAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAE5G,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAwBnD,SAAS,SAAS,CAChB,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAkB,EAClH,GAAiC;IAEjC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;QACnG,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAEvC,OAAO,CACL,MAAC,YAAY,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aACzG,KAAC,cAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,YACvE,KAAK,GACS,EACjB,KAAC,QAAQ,IACP,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EACvF,WAAW,EAAE,WAAW,GACxB,EACF,KAAC,cAAc,cAAE,YAAY,GAAkB,EAC/C,KAAC,oBAAoB,cAAE,WAAW,GAAwB,IAC7C,CAChB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AAEtE,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport {\n Input as RACInput,\n TextField as RACTextField,\n type TextFieldProps as RACTextFieldProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface TextFieldProps\n extends CommonProps,\n FieldWithPlaceholderProps<string>,\n Pick<\n RACTextFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'name'\n | 'type'\n | 'autoFocus'\n | 'autoComplete'\n | 'inputMode'\n | 'minLength'\n | 'maxLength'\n | 'pattern'\n > {}\n\nfunction TextField(\n { label, description, error: errorMessage, placeholder, UNSAFE_className, UNSAFE_style, ...props }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('TextField requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACTextField {...props} ref={ref} className={clsx('cim-text-field', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACInput\n className={clsx('cim-text-field-input', textStyle({ variant: 'medium', tone: 'base' }))}\n placeholder={placeholder}\n />\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACTextField>\n );\n}\n\n/**\n * Allows users to enter a single line of text with a keyboard.\n *\n * See [text field usage guidelines](https://ui.cimpress.io/components/text-field/usage-guidelines/).\n */\nconst _TextField = withStyleProps(forwardRef(TextField), 'TextField');\n\nexport { _TextField as TextField };\n"]}
@@ -1,10 +1,18 @@
1
- import type { CSSProperties } from 'react';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
2
  import type { LinkProps as RACLinkProps, PressEvent as RACPressEvent, ValidationResult as RACValidationResult } from 'react-aria-components';
3
+ /** Represents an identifier for a collection item. */
3
4
  export type Key = string | number;
5
+ /** Represents a direction (vertical or horizontal). */
6
+ export type Direction = 'vertical' | 'horizontal';
4
7
  /**
5
- * A set of common DOM props that are allowed on any component
8
+ * Use this type when you want to restrict `children` to a string,
9
+ * but also want to allow expressions that resolve to strings.
6
10
  */
7
- export interface DOMProps {
11
+ export type StringLikeChildren = string | number | (string | number)[];
12
+ /**
13
+ * A set of common props that are allowed on every component
14
+ */
15
+ export interface CommonProps {
8
16
  /**
9
17
  * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
10
18
  */
@@ -12,10 +20,10 @@ export interface DOMProps {
12
20
  /**
13
21
  * Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
14
22
  */
15
- 'data-experimental-cim-style-root'?: boolean;
16
- /** Sets the CSS className for the element. Only use as a last resort. Use style props instead. */
23
+ 'data-cim-style-root'?: boolean;
24
+ /** Sets the CSS className for the element. Only use as a **last resort**. Use style props instead. */
17
25
  UNSAFE_className?: string;
18
- /** Sets the CSS style for the element. Only use as a last resort. Use style props instead. */
26
+ /** Sets the CSS style for the element. Only use as a **last resort**. Use style props instead. */
19
27
  UNSAFE_style?: CSSProperties;
20
28
  }
21
29
  /**
@@ -26,11 +34,6 @@ export interface DOMProps {
26
34
  * it can call `continuePropagation()` to allow a parent to handle it.
27
35
  */
28
36
  export type PressEvent = RACPressEvent;
29
- /**
30
- * Props available on components that perform navigation.
31
- */
32
- export interface NavigationProps extends Pick<WithRequired<RACLinkProps, 'href'>, 'href' | 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy' | 'routerOptions' | 'isDisabled'> {
33
- }
34
37
  /**
35
38
  * Props for components that require a label, which can be hidden if necessary.
36
39
  */
@@ -54,8 +57,11 @@ export interface LabellableProps {
54
57
  */
55
58
  'aria-details'?: string;
56
59
  }
60
+ /** Provides details about the validation state of a form field. */
57
61
  export type ValidationResult = RACValidationResult;
62
+ /** Represents the error message(s) for a form field. */
58
63
  export type FieldError = string | string[] | undefined | ((validation: ValidationResult) => string | string[] | undefined);
64
+ /** Props available on form field components. */
59
65
  export interface FieldProps<T> extends LabellableProps {
60
66
  /** A description for the field. Provides a hint such as specific requirements for what to choose. */
61
67
  description?: string;
@@ -68,6 +74,7 @@ export interface FieldProps<T> extends LabellableProps {
68
74
  */
69
75
  validate?: (value: T) => string | string[] | true | undefined;
70
76
  }
77
+ /** Props available on form field components with text inputs. */
71
78
  export interface FieldWithPlaceholderProps<T> extends FieldProps<T> {
72
79
  /** The placeholder text displayed in the input field. */
73
80
  placeholder?: string;
@@ -76,4 +83,53 @@ export interface FieldWithPlaceholderProps<T> extends FieldProps<T> {
76
83
  export type WithRequired<T, K extends keyof T> = T & {
77
84
  [P in K]-?: T[P];
78
85
  };
86
+ /**
87
+ * This interface allows configuring navigation props with router options and type-safe URLs via TypeScript module augmentation.
88
+ * By default, this is an empty interface. Extend with `href` and `routerOptions` properties to configure your router.
89
+ */
90
+ export interface RouterConfig {
91
+ }
92
+ /**
93
+ * Represents a URL for navigation components.
94
+ * This type can be configured by augmenting `RouterConfig` with an `href` property.
95
+ */
96
+ export type Href = RouterConfig extends {
97
+ href: infer H;
98
+ } ? H : string;
99
+ /**
100
+ * Represents router options for navigation components.
101
+ * This type can be configured by augmenting `RouterConfig` with a `routerOptions` property.
102
+ */
103
+ export type RouterOptions = RouterConfig extends {
104
+ routerOptions: infer O;
105
+ } ? O : never;
106
+ /**
107
+ * Props available on components that perform navigation.
108
+ */
109
+ export interface NavigationProps extends Pick<RACLinkProps, 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy'> {
110
+ /** A URL to link to. */
111
+ href?: Href;
112
+ /** Options for the configured client side router. */
113
+ routerOptions?: RouterOptions;
114
+ }
115
+ /** Represents a minimal data shape of a dynamic item in collection components. */
116
+ export interface CollectionItem {
117
+ /** Unique identifier for the item or group. */
118
+ id: Key;
119
+ }
120
+ /** Props available on components that render collections. */
121
+ export interface CollectionProps<T extends CollectionItem> {
122
+ /** The contents of the collection. */
123
+ children?: ReactNode | ((item: T) => ReactNode);
124
+ /** The items to display in the collection. */
125
+ items?: Iterable<T>;
126
+ }
127
+ /** Props available on icons. */
128
+ export interface IconProps extends CommonProps, Pick<LabellableProps, 'aria-label' | 'aria-labelledby'> {
129
+ /**
130
+ * Whether the icon is hidden from assistive technologies.
131
+ * @default true
132
+ */
133
+ 'aria-hidden'?: boolean;
134
+ }
79
135
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAA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types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CSSProperties } from 'react';\nimport type {\n LinkProps as RACLinkProps,\n PressEvent as RACPressEvent,\n ValidationResult as RACValidationResult,\n} from 'react-aria-components';\n\nexport type Key = string | number;\n\n/**\n * A set of common DOM props that are allowed on any component\n */\nexport interface DOMProps {\n /**\n * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).\n */\n id?: string;\n /**\n * Use this attribute to \"claim\" the component tree for exclusive Cimpress UI usage.\n */\n 'data-experimental-cim-style-root'?: boolean;\n /** Sets the CSS className for the element. Only use as a last resort. Use style props instead. */\n UNSAFE_className?: string;\n /** Sets the CSS style for the element. Only use as a last resort. Use style props instead. */\n UNSAFE_style?: CSSProperties;\n}\n\n/**\n * An event fired when a component is pressed.\n *\n * By default, press events stop propagation to parent elements.\n * In cases where a handler decides not to handle a specific event,\n * it can call `continuePropagation()` to allow a parent to handle it.\n */\nexport type PressEvent = RACPressEvent;\n\n/**\n * Props available on components that perform navigation.\n */\nexport interface NavigationProps\n extends Pick<\n WithRequired<RACLinkProps, 'href'>,\n 'href' | 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy' | 'routerOptions' | 'isDisabled'\n > {}\n\n/**\n * Props for components that require a label, which can be hidden if necessary.\n */\n// Copied and modified from AriaLabelingProps from @react-types/shared\nexport interface LabellableProps {\n /** The content to display as the label. */\n label?: string;\n\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string;\n\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string;\n\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string;\n}\n\nexport type ValidationResult = RACValidationResult;\n\nexport type FieldError =\n | string\n | string[]\n | undefined\n | ((validation: ValidationResult) => string | string[] | undefined);\n\nexport interface FieldProps<T> extends LabellableProps {\n /** A description for the field. Provides a hint such as specific requirements for what to choose. */\n description?: string;\n /** An error message for the field. */\n error?: FieldError;\n /**\n * A function that returns an error message (or `true`) if a given value is invalid.\n * Validation errors are displayed to the user when the form is submitted.\n * For real-time validation, use the `error` prop instead.\n */\n validate?: (value: T) => string | string[] | true | undefined;\n}\n\nexport interface FieldWithPlaceholderProps<T> extends FieldProps<T> {\n /** The placeholder text displayed in the input field. */\n placeholder?: string;\n}\n\n/** Changes specified optional properties within the provided type to be required. */\nexport type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport type {\n LinkProps as RACLinkProps,\n PressEvent as RACPressEvent,\n ValidationResult as RACValidationResult,\n} from 'react-aria-components';\n\n/** Represents an identifier for a collection item. */\nexport type Key = string | number;\n\n/** Represents a direction (vertical or horizontal). */\nexport type Direction = 'vertical' | 'horizontal';\n\n/**\n * Use this type when you want to restrict `children` to a string,\n * but also want to allow expressions that resolve to strings.\n */\nexport type StringLikeChildren = string | number | (string | number)[];\n\n/**\n * A set of common props that are allowed on every component\n */\nexport interface CommonProps {\n /**\n * The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).\n */\n id?: string;\n /**\n * Use this attribute to \"claim\" the component tree for exclusive Cimpress UI usage.\n */\n 'data-cim-style-root'?: boolean;\n /** Sets the CSS className for the element. Only use as a **last resort**. Use style props instead. */\n UNSAFE_className?: string;\n /** Sets the CSS style for the element. Only use as a **last resort**. Use style props instead. */\n UNSAFE_style?: CSSProperties;\n}\n\n/**\n * An event fired when a component is pressed.\n *\n * By default, press events stop propagation to parent elements.\n * In cases where a handler decides not to handle a specific event,\n * it can call `continuePropagation()` to allow a parent to handle it.\n */\nexport type PressEvent = RACPressEvent;\n\n/**\n * Props for components that require a label, which can be hidden if necessary.\n */\n// Copied and modified from AriaLabelingProps from @react-types/shared\nexport interface LabellableProps {\n /** The content to display as the label. */\n label?: string;\n\n /**\n * Defines a string value that labels the current element.\n */\n 'aria-label'?: string;\n\n /**\n * Identifies the element (or elements) that labels the current element.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Identifies the element (or elements) that describes the object.\n */\n 'aria-describedby'?: string;\n\n /**\n * Identifies the element (or elements) that provide a detailed, extended description for the object.\n */\n 'aria-details'?: string;\n}\n\n/** Provides details about the validation state of a form field. */\nexport type ValidationResult = RACValidationResult;\n\n/** Represents the error message(s) for a form field. */\nexport type FieldError =\n | string\n | string[]\n | undefined\n | ((validation: ValidationResult) => string | string[] | undefined);\n\n/** Props available on form field components. */\nexport interface FieldProps<T> extends LabellableProps {\n /** A description for the field. Provides a hint such as specific requirements for what to choose. */\n description?: string;\n /** An error message for the field. */\n error?: FieldError;\n /**\n * A function that returns an error message (or `true`) if a given value is invalid.\n * Validation errors are displayed to the user when the form is submitted.\n * For real-time validation, use the `error` prop instead.\n */\n validate?: (value: T) => string | string[] | true | undefined;\n}\n\n/** Props available on form field components with text inputs. */\nexport interface FieldWithPlaceholderProps<T> extends FieldProps<T> {\n /** The placeholder text displayed in the input field. */\n placeholder?: string;\n}\n\n/** Changes specified optional properties within the provided type to be required. */\nexport type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n\n/**\n * This interface allows configuring navigation props with router options and type-safe URLs via TypeScript module augmentation.\n * By default, this is an empty interface. Extend with `href` and `routerOptions` properties to configure your router.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RouterConfig {}\n\n/**\n * Represents a URL for navigation components.\n * This type can be configured by augmenting `RouterConfig` with an `href` property.\n */\nexport type Href = RouterConfig extends { href: infer H } ? H : string;\n\n/**\n * Represents router options for navigation components.\n * This type can be configured by augmenting `RouterConfig` with a `routerOptions` property.\n */\nexport type RouterOptions = RouterConfig extends { routerOptions: infer O } ? O : never;\n\n/**\n * Props available on components that perform navigation.\n */\nexport interface NavigationProps\n extends Pick<RACLinkProps, 'hrefLang' | 'target' | 'rel' | 'download' | 'ping' | 'referrerPolicy'> {\n /** A URL to link to. */\n href?: Href;\n /** Options for the configured client side router. */\n routerOptions?: RouterOptions;\n}\n\n/** Represents a minimal data shape of a dynamic item in collection components. */\nexport interface CollectionItem {\n /** Unique identifier for the item or group. */\n id: Key;\n}\n\n/** Props available on components that render collections. */\nexport interface CollectionProps<T extends CollectionItem> {\n /** The contents of the collection. */\n children?: ReactNode | ((item: T) => ReactNode);\n /** The items to display in the collection. */\n items?: Iterable<T>;\n}\n\n/** Props available on icons. */\nexport interface IconProps extends CommonProps, Pick<LabellableProps, 'aria-label' | 'aria-labelledby'> {\n /**\n * Whether the icon is hidden from assistive technologies.\n * @default true\n */\n 'aria-hidden'?: boolean;\n}\n"]}
@@ -1,13 +1,14 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { type LinkProps as RACLinkProps } from 'react-aria-components';
3
- import type { NavigationProps } from '../types.js';
3
+ import type { NavigationProps, WithRequired } from '../types.js';
4
4
  import type { BaseTypographyProps } from './types.js';
5
- export interface LinkProps extends Omit<BaseTypographyProps, 'id'>, NavigationProps, Pick<RACLinkProps, 'isDisabled'> {
5
+ export interface LinkProps extends Omit<BaseTypographyProps, 'id'>, WithRequired<NavigationProps, 'href'>, Pick<RACLinkProps, 'isDisabled'> {
6
6
  /** An icon displayed before the link text. */
7
7
  iconStart?: ReactNode;
8
8
  /** An icon displayed after the link text. */
9
9
  iconEnd?: ReactNode;
10
10
  }
11
- declare const _Link: (props: LinkProps & import("react").RefAttributes<HTMLAnchorElement> & import("../../with-style-props.js").StyleProps) => ReactNode;
11
+ /** Displays a textual link that allows users to navigate to another page or resource. */
12
+ declare const _Link: (props: LinkProps & import("react").RefAttributes<HTMLAnchorElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
12
13
  export { _Link as Link };
13
14
  //# sourceMappingURL=link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;IACnH,8CAA8C;IAC9C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAeD,QAAA,MAAM,KAAK,qIAA2C,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/link.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAKtD,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,EACrC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;IAClC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AA0BD,yFAAyF;AACzF,QAAA,MAAM,KAAK,8JAA2C,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}
@@ -1,11 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import clsx from 'clsx';
3
4
  import { Link as RACLink } from 'react-aria-components';
4
5
  import { forwardRef } from '../../forward-ref.js';
5
6
  import { withStyleProps } from '../../with-style-props.js';
7
+ // Used to prevent word wrap between icons and text
8
+ const WORD_JOINER = '\u2060';
6
9
  function Link({ children, iconStart, iconEnd, UNSAFE_className, UNSAFE_style, ...props }, ref) {
7
- return (_jsxs(RACLink, { ...props, ref: ref, className: clsx('cim-link', UNSAFE_className), style: UNSAFE_style, children: [iconStart && _jsx("span", { className: "cim-link-icon", children: iconStart }), _jsx("span", { className: "cim-link-text", children: children }), iconEnd && _jsx("span", { className: "cim-link-icon", children: iconEnd })] }));
10
+ return (_jsxs(RACLink, { ...props, ref: ref, className: clsx('cim-link', UNSAFE_className), style: UNSAFE_style, children: [iconStart && (_jsxs(_Fragment, { children: [_jsx("span", { className: "cim-link-icon", children: iconStart }), WORD_JOINER] })), _jsx("span", { className: "cim-link-text", children: children }), iconEnd && (_jsxs(_Fragment, { children: [WORD_JOINER, _jsx("span", { className: "cim-link-icon", children: iconEnd })] }))] }));
8
11
  }
12
+ // TODO: add link to usage guidelines or a dev guide
13
+ /** Displays a textual link that allows users to navigate to another page or resource. */
9
14
  const _Link = withStyleProps(forwardRef(Link), 'Link');
10
15
  export { _Link as Link };
11
16
  //# sourceMappingURL=link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../src/components/typography/link.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,IAAI,IAAI,OAAO,EAAkC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAW3D,SAAS,IAAI,CACX,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAa,EACrF,GAAoC;IAEpC,OAAO,CACL,MAAC,OAAO,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aAC7F,SAAS,IAAI,eAAM,SAAS,EAAC,eAAe,YAAE,SAAS,GAAQ,EAChE,eAAM,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAQ,EAChD,OAAO,IAAI,eAAM,SAAS,EAAC,eAAe,YAAE,OAAO,GAAQ,IACpD,CACX,CAAC;AACJ,CAAC;AAED,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } 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 { BaseTypographyProps } from './types.js';\n\nexport interface LinkProps extends Omit<BaseTypographyProps, 'id'>, NavigationProps, Pick<RACLinkProps, 'isDisabled'> {\n /** An icon displayed before the link text. */\n iconStart?: ReactNode;\n /** An icon displayed after the link text. */\n iconEnd?: ReactNode;\n}\n\nfunction Link(\n { children, iconStart, iconEnd, UNSAFE_className, UNSAFE_style, ...props }: LinkProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink {...props} ref={ref} className={clsx('cim-link', UNSAFE_className)} style={UNSAFE_style}>\n {iconStart && <span className=\"cim-link-icon\">{iconStart}</span>}\n <span className=\"cim-link-text\">{children}</span>\n {iconEnd && <span className=\"cim-link-icon\">{iconEnd}</span>}\n </RACLink>\n );\n}\n\nconst _Link = withStyleProps(forwardRef(Link), 'Link');\n\nexport { _Link as Link };\n"]}
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../src/components/typography/link.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,IAAI,IAAI,OAAO,EAAkC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAI3D,mDAAmD;AACnD,MAAM,WAAW,GAAG,QAAQ,CAAC;AAY7B,SAAS,IAAI,CACX,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAa,EACrF,GAAoC;IAEpC,OAAO,CACL,MAAC,OAAO,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aAC7F,SAAS,IAAI,CACZ,8BACE,eAAM,SAAS,EAAC,eAAe,YAAE,SAAS,GAAQ,EACjD,WAAW,IACX,CACJ,EACD,eAAM,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAQ,EAChD,OAAO,IAAI,CACV,8BACG,WAAW,EACZ,eAAM,SAAS,EAAC,eAAe,YAAE,OAAO,GAAQ,IAC/C,CACJ,IACO,CACX,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,yFAAyF;AACzF,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps, WithRequired } from '../types.js';\nimport type { BaseTypographyProps } from './types.js';\n\n// Used to prevent word wrap between icons and text\nconst WORD_JOINER = '\\u2060';\n\nexport interface LinkProps\n extends Omit<BaseTypographyProps, 'id'>,\n WithRequired<NavigationProps, 'href'>,\n Pick<RACLinkProps, 'isDisabled'> {\n /** An icon displayed before the link text. */\n iconStart?: ReactNode;\n /** An icon displayed after the link text. */\n iconEnd?: ReactNode;\n}\n\nfunction Link(\n { children, iconStart, iconEnd, UNSAFE_className, UNSAFE_style, ...props }: LinkProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink {...props} ref={ref} className={clsx('cim-link', UNSAFE_className)} style={UNSAFE_style}>\n {iconStart && (\n <>\n <span className=\"cim-link-icon\">{iconStart}</span>\n {WORD_JOINER}\n </>\n )}\n <span className=\"cim-link-text\">{children}</span>\n {iconEnd && (\n <>\n {WORD_JOINER}\n <span className=\"cim-link-icon\">{iconEnd}</span>\n </>\n )}\n </RACLink>\n );\n}\n\n// TODO: add link to usage guidelines or a dev guide\n/** Displays a textual link that allows users to navigate to another page or resource. */\nconst _Link = withStyleProps(forwardRef(Link), 'Link');\n\nexport { _Link as Link };\n"]}
@@ -1,10 +1,11 @@
1
- import { type ElementRef } from 'react';
1
+ import { type ElementRef, type JSX } from 'react';
2
2
  import type { BaseTypographyProps, TextStyleOptions } from './types.js';
3
3
  type TextElement = Exclude<keyof JSX.IntrinsicElements, 'a'>;
4
4
  export interface TextProps<T extends TextElement> extends BaseTypographyProps, TextStyleOptions {
5
5
  /** The HTML element to render as. */
6
6
  as: T;
7
7
  }
8
- declare const _Text: <T extends TextElement>(props: TextProps<T> & import("react").RefAttributes<ElementRef<T>> & import("../../with-style-props.js").StyleProps) => import("react").ReactNode;
8
+ /** Renders the provided text contents in a specified style. */
9
+ declare const _Text: <T extends TextElement>(props: TextProps<T> & import("react").RefAttributes<ElementRef<T>> & import("../../with-style-props.js").StyleProps) => JSX.Element | null;
9
10
  export { _Text as Text };
10
11
  //# sourceMappingURL=text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/text.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGxE,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAE7D,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,mBAAmB,EAAE,gBAAgB;IAC7F,qCAAqC;IACrC,EAAE,EAAE,CAAC,CAAC;CACP;AA6BD,QAAA,MAAM,KAAK,GA3BG,CAAC,SAAS,WAAW,mJA2BmB,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/text.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAGpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGxE,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAE7D,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,mBAAmB,EAAE,gBAAgB;IAC7F,qCAAqC;IACrC,EAAE,EAAE,CAAC,CAAC;CACP;AA8BD,+DAA+D;AAC/D,QAAA,MAAM,KAAK,GA7BG,CAAC,SAAS,WAAW,4IA6BmB,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import clsx from 'clsx';
2
3
  import { createElement } from 'react';
3
4
  import { forwardRef } from '../../forward-ref.js';
@@ -11,6 +12,8 @@ function Text({ children, as, variant, fontStyle, alignment, textDecoration, ton
11
12
  style: UNSAFE_style,
12
13
  }, children);
13
14
  }
15
+ // TODO: add link to usage guidelines or a dev guide
16
+ /** Renders the provided text contents in a specified style. */
14
17
  const _Text = withStyleProps(forwardRef(Text), 'Text');
15
18
  export { _Text as Text };
16
19
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/components/typography/text.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAsC,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AASvC,SAAS,IAAI,CACX,EACE,QAAQ,EACR,EAAE,EACF,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACK,EACf,GAAgC;IAEhC,OAAO,aAAa,CAClB,EAAE,EACF;QACE,GAAG,KAAK;QACR,GAAG;QACH,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACrG,KAAK,EAAE,YAAY;KACpB,EACD,QAAQ,CACT,CAAC;AACJ,CAAC;AAED,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC","sourcesContent":["import clsx from 'clsx';\nimport { createElement, type ForwardedRef, type ElementRef } from 'react';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { BaseTypographyProps, TextStyleOptions } from './types.js';\nimport { textStyle } from './utils.js';\n\ntype TextElement = Exclude<keyof JSX.IntrinsicElements, 'a'>;\n\nexport interface TextProps<T extends TextElement> extends BaseTypographyProps, TextStyleOptions {\n /** The HTML element to render as. */\n as: T;\n}\n\nfunction Text<T extends TextElement>(\n {\n children,\n as,\n variant,\n fontStyle,\n alignment,\n textDecoration,\n tone,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: TextProps<T>,\n ref: ForwardedRef<ElementRef<T>>,\n) {\n return createElement(\n as,\n {\n ...props,\n ref,\n className: clsx(textStyle({ variant, fontStyle, alignment, textDecoration, tone }), UNSAFE_className),\n style: UNSAFE_style,\n },\n children,\n );\n}\n\nconst _Text = withStyleProps(forwardRef(Text), 'Text');\n\nexport { _Text as Text };\n"]}
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/components/typography/text.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAgD,MAAM,OAAO,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AASvC,SAAS,IAAI,CACX,EACE,QAAQ,EACR,EAAE,EACF,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACK,EACf,GAAgC;IAEhC,OAAO,aAAa,CAClB,EAAE,EACF;QACE,GAAG,KAAK;QACR,GAAG;QACH,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACrG,KAAK,EAAE,YAAY;KACpB,EACD,QAAQ,CACT,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,+DAA+D;AAC/D,MAAM,KAAK,GAAG,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { createElement, type ForwardedRef, type ElementRef, type JSX } from 'react';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { BaseTypographyProps, TextStyleOptions } from './types.js';\nimport { textStyle } from './utils.js';\n\ntype TextElement = Exclude<keyof JSX.IntrinsicElements, 'a'>;\n\nexport interface TextProps<T extends TextElement> extends BaseTypographyProps, TextStyleOptions {\n /** The HTML element to render as. */\n as: T;\n}\n\nfunction Text<T extends TextElement>(\n {\n children,\n as,\n variant,\n fontStyle,\n alignment,\n textDecoration,\n tone,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: TextProps<T>,\n ref: ForwardedRef<ElementRef<T>>,\n) {\n return createElement(\n as,\n {\n ...props,\n ref,\n className: clsx(textStyle({ variant, fontStyle, alignment, textDecoration, tone }), UNSAFE_className),\n style: UNSAFE_style,\n },\n children,\n );\n}\n\n// TODO: add link to usage guidelines or a dev guide\n/** Renders the provided text contents in a specified style. */\nconst _Text = withStyleProps(forwardRef(Text), 'Text');\n\nexport { _Text as Text };\n"]}
@@ -1,9 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { DOMProps } from '../types.js';
2
+ import type { CommonProps, LabellableProps } from '../types.js';
3
3
  /**
4
4
  * Props available on all typography components.
5
5
  */
6
- export interface BaseTypographyProps extends DOMProps {
6
+ export interface BaseTypographyProps extends CommonProps, Omit<LabellableProps, 'label'> {
7
7
  /** Text to display. Allows nesting other typography components. */
8
8
  children: ReactNode;
9
9
  }
@@ -16,6 +16,7 @@ export interface TextStyleOptions {
16
16
  alignment?: 'start' | 'center' | 'end' | 'justify';
17
17
  /** The kind of decorative line applied to the text. */
18
18
  textDecoration?: 'none' | 'strikethrough' | 'underline';
19
+ /** Determines the color tone of the text. */
19
20
  tone?: 'title' | 'base' | 'subtle' | 'muted' | 'inverse' | 'action' | 'info' | 'success' | 'warning' | 'critical';
20
21
  }
21
22
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACnD,mEAAmE;IACnE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,OAAO,CAAC,EACJ,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,MAAM,GACN,eAAe,GACf,QAAQ,GACR,iBAAiB,GACjB,OAAO,GACP,gBAAgB,GAChB,aAAa,GACb,sBAAsB,CAAC;IAC3B,sEAAsE;IACtE,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,oCAAoC;IACpC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACnD,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,WAAW,CAAC;IAExD,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;CACnH"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IACtF,mEAAmE;IACnE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,OAAO,CAAC,EACJ,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,MAAM,GACN,eAAe,GACf,QAAQ,GACR,iBAAiB,GACjB,OAAO,GACP,gBAAgB,GAChB,aAAa,GACb,sBAAsB,CAAC;IAC3B,sEAAsE;IACtE,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,oCAAoC;IACpC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACnD,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,WAAW,CAAC;IACxD,6CAA6C;IAC7C,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;CACnH"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/typography/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\nimport type { DOMProps } from '../types.js';\n\n/**\n * Props available on all typography components.\n */\nexport interface BaseTypographyProps extends DOMProps {\n /** Text to display. Allows nesting other typography components. */\n children: ReactNode;\n}\n\nexport interface TextStyleOptions {\n /** Determines the visual variant of text. */\n variant?:\n | 'title-1'\n | 'title-2'\n | 'title-3'\n | 'title-4'\n | 'title-5'\n | 'title-6'\n | 'body'\n | 'body-semibold'\n | 'medium'\n | 'medium-semibold'\n | 'small'\n | 'small-semibold'\n | 'extra-small'\n | 'extra-small-semibold';\n /** Whether the font should be styled with a normal or italic face. */\n fontStyle?: 'normal' | 'italic';\n /** Horizontal alignment of text. */\n alignment?: 'start' | 'center' | 'end' | 'justify';\n /** The kind of decorative line applied to the text. */\n textDecoration?: 'none' | 'strikethrough' | 'underline';\n /* Determines the color tone of the text. */\n tone?: 'title' | 'base' | 'subtle' | 'muted' | 'inverse' | 'action' | 'info' | 'success' | 'warning' | 'critical';\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/typography/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\nimport type { CommonProps, LabellableProps } from '../types.js';\n\n/**\n * Props available on all typography components.\n */\nexport interface BaseTypographyProps extends CommonProps, Omit<LabellableProps, 'label'> {\n /** Text to display. Allows nesting other typography components. */\n children: ReactNode;\n}\n\nexport interface TextStyleOptions {\n /** Determines the visual variant of text. */\n variant?:\n | 'title-1'\n | 'title-2'\n | 'title-3'\n | 'title-4'\n | 'title-5'\n | 'title-6'\n | 'body'\n | 'body-semibold'\n | 'medium'\n | 'medium-semibold'\n | 'small'\n | 'small-semibold'\n | 'extra-small'\n | 'extra-small-semibold';\n /** Whether the font should be styled with a normal or italic face. */\n fontStyle?: 'normal' | 'italic';\n /** Horizontal alignment of text. */\n alignment?: 'start' | 'center' | 'end' | 'justify';\n /** The kind of decorative line applied to the text. */\n textDecoration?: 'none' | 'strikethrough' | 'underline';\n /** Determines the color tone of the text. */\n tone?: 'title' | 'base' | 'subtle' | 'muted' | 'inverse' | 'action' | 'info' | 'success' | 'warning' | 'critical';\n}\n"]}
@@ -1,3 +1,4 @@
1
1
  import type { TextStyleOptions } from './types.js';
2
+ /** Returns a string of classNames that apply the specified text style. */
2
3
  export declare function textStyle({ variant, fontStyle, alignment, textDecoration, tone }: TextStyleOptions): string;
3
4
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,gBAAgB,UAQlG"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,0EAA0E;AAC1E,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,gBAAgB,UAQlG"}
@@ -1,4 +1,5 @@
1
1
  import clsx from 'clsx';
2
+ /** Returns a string of classNames that apply the specified text style. */
2
3
  export function textStyle({ variant, fontStyle, alignment, textDecoration, tone }) {
3
4
  return clsx('cim-text', {
4
5
  [`cim-text-variant-${variant}`]: variant,
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/typography/utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,UAAU,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAoB;IACjG,OAAO,IAAI,CAAC,UAAU,EAAE;QACtB,CAAC,oBAAoB,OAAO,EAAE,CAAC,EAAE,OAAO;QACxC,CAAC,eAAe,SAAS,EAAE,CAAC,EAAE,SAAS;QACvC,CAAC,sBAAsB,SAAS,EAAE,CAAC,EAAE,SAAS;QAC9C,CAAC,uBAAuB,cAAc,EAAE,CAAC,EAAE,cAAc;QACzD,CAAC,iBAAiB,IAAI,EAAE,CAAC,EAAE,IAAI;KAChC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { TextStyleOptions } from './types.js';\n\nexport function textStyle({ variant, fontStyle, alignment, textDecoration, tone }: TextStyleOptions) {\n return clsx('cim-text', {\n [`cim-text-variant-${variant}`]: variant,\n [`cim-text-fs-${fontStyle}`]: fontStyle,\n [`cim-text-alignment-${alignment}`]: alignment,\n [`cim-text-decoration-${textDecoration}`]: textDecoration,\n [`cim-text-tone-${tone}`]: tone,\n });\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/typography/utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,0EAA0E;AAC1E,MAAM,UAAU,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAoB;IACjG,OAAO,IAAI,CAAC,UAAU,EAAE;QACtB,CAAC,oBAAoB,OAAO,EAAE,CAAC,EAAE,OAAO;QACxC,CAAC,eAAe,SAAS,EAAE,CAAC,EAAE,SAAS;QACvC,CAAC,sBAAsB,SAAS,EAAE,CAAC,EAAE,SAAS;QAC9C,CAAC,uBAAuB,cAAc,EAAE,CAAC,EAAE,cAAc;QACzD,CAAC,iBAAiB,IAAI,EAAE,CAAC,EAAE,IAAI;KAChC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { TextStyleOptions } from './types.js';\n\n/** Returns a string of classNames that apply the specified text style. */\nexport function textStyle({ variant, fontStyle, alignment, textDecoration, tone }: TextStyleOptions) {\n return clsx('cim-text', {\n [`cim-text-variant-${variant}`]: variant,\n [`cim-text-fs-${fontStyle}`]: fontStyle,\n [`cim-text-alignment-${alignment}`]: alignment,\n [`cim-text-decoration-${textDecoration}`]: textDecoration,\n [`cim-text-tone-${tone}`]: tone,\n });\n}\n"]}
@@ -1,3 +1,3 @@
1
- import { type ReactNode, type Ref, type RefAttributes } from 'react';
2
- export declare function forwardRef<T, R>(Component: (props: T, ref: Ref<R>) => ReactNode, displayName?: string): (props: T & RefAttributes<R>) => ReactNode;
1
+ import { type Ref, type RefAttributes, type JSX } from 'react';
2
+ export declare function forwardRef<T, R>(Component: (props: T, ref: Ref<R>) => JSX.Element | null, displayName?: string): (props: T & RefAttributes<R>) => JSX.Element | null;
3
3
  //# sourceMappingURL=forward-ref.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forward-ref.d.ts","sourceRoot":"","sources":["../../src/forward-ref.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAQf,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAC7B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,EAC/C,WAAW,CAAC,EAAE,MAAM,GACnB,CAAC,KAAK,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,CAS5C"}
1
+ {"version":3,"file":"forward-ref.d.ts","sourceRoot":"","sources":["../../src/forward-ref.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAQf,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAC7B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,EACxD,WAAW,CAAC,EAAE,MAAM,GACnB,CAAC,KAAK,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAUrD"}
@@ -14,6 +14,7 @@ export function forwardRef(Component, displayName) {
14
14
  // @ts-expect-error missing type definition for displayName
15
15
  const existingDisplayName = Component.displayName || Component.name || 'Component';
16
16
  WrappedComponent.displayName = displayName || `ForwardRef(${existingDisplayName})`;
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
18
  return WrappedComponent;
18
19
  }
19
20
  //# sourceMappingURL=forward-ref.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"forward-ref.js","sourceRoot":"","sources":["../../src/forward-ref.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,OAAO;AACL,iDAAiD;AACjD,UAAU,IAAI,kBAAkB,GAIjC,MAAM,OAAO,CAAC;AAEf;;;;;EAKE;AACF,MAAM,UAAU,UAAU,CACxB,SAA+C,EAC/C,WAAoB;IAEpB,8DAA8D;IAC9D,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,SAAgB,CAAC,CAAC;IAE9D,2DAA2D;IAC3D,MAAM,mBAAmB,GAAG,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,CAAC;IACnF,gBAAgB,CAAC,WAAW,GAAG,WAAW,IAAI,cAAc,mBAAmB,GAAG,CAAC;IAEnF,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["// Override forwardRef types so that generic components retain their generics.\n\nimport {\n // eslint-disable-next-line no-restricted-imports\n forwardRef as originalForwardRef,\n type ReactNode,\n type Ref,\n type RefAttributes,\n} from 'react';\n\n/*\nIn order for generic components to retain their generics,\n`forwardRef` must return a simple function.\nWe cannot therefore expose `displayName` as a property on the return type.\nAs a workaround, our `forwardRef` accepts a `displayName` parameter and sets it on the component internally.\n*/\nexport function forwardRef<T, R>(\n Component: (props: T, ref: Ref<R>) => ReactNode,\n displayName?: string,\n): (props: T & RefAttributes<R>) => ReactNode {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const WrappedComponent = originalForwardRef(Component as any);\n\n // @ts-expect-error missing type definition for displayName\n const existingDisplayName = Component.displayName || Component.name || 'Component';\n WrappedComponent.displayName = displayName || `ForwardRef(${existingDisplayName})`;\n\n return WrappedComponent;\n}\n"]}
1
+ {"version":3,"file":"forward-ref.js","sourceRoot":"","sources":["../../src/forward-ref.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,OAAO;AACL,iDAAiD;AACjD,UAAU,IAAI,kBAAkB,GAIjC,MAAM,OAAO,CAAC;AAEf;;;;;EAKE;AACF,MAAM,UAAU,UAAU,CACxB,SAAwD,EACxD,WAAoB;IAEpB,8DAA8D;IAC9D,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,SAAgB,CAAC,CAAC;IAE9D,2DAA2D;IAC3D,MAAM,mBAAmB,GAAG,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,CAAC;IACnF,gBAAgB,CAAC,WAAW,GAAG,WAAW,IAAI,cAAc,mBAAmB,GAAG,CAAC;IAEnF,8DAA8D;IAC9D,OAAO,gBAAuB,CAAC;AACjC,CAAC","sourcesContent":["// Override forwardRef types so that generic components retain their generics.\n\nimport {\n // eslint-disable-next-line no-restricted-imports\n forwardRef as originalForwardRef,\n type Ref,\n type RefAttributes,\n type JSX,\n} from 'react';\n\n/*\nIn order for generic components to retain their generics,\n`forwardRef` must return a simple function.\nWe cannot therefore expose `displayName` as a property on the return type.\nAs a workaround, our `forwardRef` accepts a `displayName` parameter and sets it on the component internally.\n*/\nexport function forwardRef<T, R>(\n Component: (props: T, ref: Ref<R>) => JSX.Element | null,\n displayName?: string,\n): (props: T & RefAttributes<R>) => JSX.Element | null {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const WrappedComponent = originalForwardRef(Component as any);\n\n // @ts-expect-error missing type definition for displayName\n const existingDisplayName = Component.displayName || Component.name || 'Component';\n WrappedComponent.displayName = displayName || `ForwardRef(${existingDisplayName})`;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return WrappedComponent as any;\n}\n"]}
@@ -1,6 +1,7 @@
1
- import type { SVGProps } from 'react';
1
+ import type { IconProps } from '../components/types.js';
2
+ /** Renders an SVG icon. */
2
3
  declare const SvgAdd: {
3
- (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
+ ({ "aria-hidden": ariaHidden, UNSAFE_className, UNSAFE_style, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
4
5
  displayName: string;
5
6
  };
6
7
  export default SvgAdd;
@@ -1 +1 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/icons/add.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,QAAA,MAAM,MAAM;YAAW,QAAQ,CAAC,aAAa,CAAC;;CAa7C,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/icons/add.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,2BAA2B;AAC3B,QAAA,MAAM,MAAM;6EAA4E,SAAS;;CAuBhG,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,5 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const SvgAdd = (props) => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", className: "cim-icon", "data-icon": "true", fill: "currentColor", ...props, children: _jsx("path", { d: "M0 12a1.5 1.5 0 0 0 1.5 1.5h8.75a.25.25 0 0 1 .25.25v8.75a1.5 1.5 0 0 0 3 0v-8.75a.25.25 0 0 1 .25-.25h8.75a1.5 1.5 0 0 0 0-3h-8.75a.25.25 0 0 1-.25-.25V1.5a1.5 1.5 0 0 0-3 0v8.75a.25.25 0 0 1-.25.25H1.5A1.5 1.5 0 0 0 0 12" }) }));
3
- SvgAdd.displayName = 'IconAdd';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ const displayName = 'IconAdd';
4
+ /** Renders an SVG icon. */
5
+ const SvgAdd = ({ 'aria-hidden': ariaHidden, UNSAFE_className, UNSAFE_style, ...rest }) => {
6
+ const props = {
7
+ ...rest,
8
+ 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),
9
+ className: clsx('cim-icon', UNSAFE_className),
10
+ style: UNSAFE_style,
11
+ };
12
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", width: "1em", height: "1em", "data-icon": "true", fill: "currentColor", ...props, children: _jsxs("g", { fillRule: "evenodd", clipRule: "evenodd", children: [_jsx("path", { d: "M5 16a2 2 0 0 1 2-2h18a2 2 0 1 1 0 4H7a2 2 0 0 1-2-2" }), _jsx("path", { d: "M16 5a2 2 0 0 1 2 2v18a2 2 0 1 1-4 0V7a2 2 0 0 1 2-2" })] }) }));
13
+ };
14
+ SvgAdd.displayName = displayName;
4
15
  export default SvgAdd;
5
16
  //# sourceMappingURL=add.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/icons/add.tsx"],"names":[],"mappings":";AACA,MAAM,MAAM,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CACjD,cACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,KAAK,EACZ,SAAS,EAAC,UAAU,eACV,MAAM,EAChB,IAAI,EAAC,cAAc,KACf,KAAK,YAET,eAAM,CAAC,EAAC,gOAAgO,GAAG,GACvO,CACP,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC;AAC/B,eAAe,MAAM,CAAC","sourcesContent":["import type { SVGProps } from 'react';\nconst SvgAdd = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width=\"1em\"\n height=\"1em\"\n className=\"cim-icon\"\n data-icon=\"true\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M0 12a1.5 1.5 0 0 0 1.5 1.5h8.75a.25.25 0 0 1 .25.25v8.75a1.5 1.5 0 0 0 3 0v-8.75a.25.25 0 0 1 .25-.25h8.75a1.5 1.5 0 0 0 0-3h-8.75a.25.25 0 0 1-.25-.25V1.5a1.5 1.5 0 0 0-3 0v8.75a.25.25 0 0 1-.25.25H1.5A1.5 1.5 0 0 0 0 12\" />\n </svg>\n);\nSvgAdd.displayName = 'IconAdd';\nexport default SvgAdd;\n"]}
1
+ {"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/icons/add.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,2BAA2B;AAC3B,MAAM,MAAM,GAAG,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAa,EAAE,EAAE;IACnG,MAAM,KAAK,GAAG;QACZ,GAAG,IAAI;QACP,aAAa,EAAE,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC;QAC5F,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC;QAC7C,KAAK,EAAE,YAAY;KACpB,CAAC;IACF,OAAO,CACL,cACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,KAAK,eACF,MAAM,EAChB,IAAI,EAAC,cAAc,KACf,KAAK,YAET,aAAG,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,aACtC,eAAM,CAAC,EAAC,sDAAsD,GAAG,EACjE,eAAM,CAAC,EAAC,sDAAsD,GAAG,IAC/D,GACA,CACP,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;AACjC,eAAe,MAAM,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { IconProps } from '../components/types.js';\nconst displayName = 'IconAdd';\n/** Renders an SVG icon. */\nconst SvgAdd = ({ 'aria-hidden': ariaHidden, UNSAFE_className, UNSAFE_style, ...rest }: IconProps) => {\n const props = {\n ...rest,\n 'aria-hidden': ariaHidden ?? (rest['aria-label'] == null && rest['aria-labelledby'] == null),\n className: clsx('cim-icon', UNSAFE_className),\n style: UNSAFE_style,\n };\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 32 32\"\n width=\"1em\"\n height=\"1em\"\n data-icon=\"true\"\n fill=\"currentColor\"\n {...props}\n >\n <g fillRule=\"evenodd\" clipRule=\"evenodd\">\n <path d=\"M5 16a2 2 0 0 1 2-2h18a2 2 0 1 1 0 4H7a2 2 0 0 1-2-2\" />\n <path d=\"M16 5a2 2 0 0 1 2 2v18a2 2 0 1 1-4 0V7a2 2 0 0 1 2-2\" />\n </g>\n </svg>\n );\n};\nSvgAdd.displayName = displayName;\nexport default SvgAdd;\n"]}
@@ -1,6 +1,7 @@
1
- import type { SVGProps } from 'react';
1
+ import type { IconProps } from '../components/types.js';
2
+ /** Renders an SVG icon. */
2
3
  declare const SvgAlertTriangle: {
3
- (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
+ ({ "aria-hidden": ariaHidden, UNSAFE_className, UNSAFE_style, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
4
5
  displayName: string;
5
6
  };
6
7
  export default SvgAlertTriangle;
@@ -1 +1 @@
1
- {"version":3,"file":"alert-triangle.d.ts","sourceRoot":"","sources":["../../../src/icons/alert-triangle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,QAAA,MAAM,gBAAgB;YAAW,QAAQ,CAAC,aAAa,CAAC;;CAmBvD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"alert-triangle.d.ts","sourceRoot":"","sources":["../../../src/icons/alert-triangle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,2BAA2B;AAC3B,QAAA,MAAM,gBAAgB;6EAA4E,SAAS;;CA0B1G,CAAC;AAEF,eAAe,gBAAgB,CAAC"}