@cimpress-ui/react 0.0.1 → 0.2.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 (582) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +5 -1
  3. package/dist/commonjs/components/breadcrumbs/breadcrumbs.d.ts +22 -0
  4. package/dist/commonjs/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  5. package/dist/commonjs/components/breadcrumbs/breadcrumbs.js +37 -0
  6. package/dist/commonjs/components/breadcrumbs/breadcrumbs.js.map +1 -0
  7. package/dist/commonjs/components/button/button.d.ts +1 -1
  8. package/dist/commonjs/components/button/button.js +2 -2
  9. package/dist/commonjs/components/button/button.js.map +1 -1
  10. package/dist/commonjs/components/button/icon-button.d.ts +1 -1
  11. package/dist/commonjs/components/button/icon-button.js +2 -2
  12. package/dist/commonjs/components/button/icon-button.js.map +1 -1
  13. package/dist/commonjs/components/button/icon-link-button.d.ts +2 -2
  14. package/dist/commonjs/components/button/icon-link-button.d.ts.map +1 -1
  15. package/dist/commonjs/components/button/icon-link-button.js +1 -1
  16. package/dist/commonjs/components/button/icon-link-button.js.map +1 -1
  17. package/dist/commonjs/components/button/link-button.d.ts +2 -2
  18. package/dist/commonjs/components/button/link-button.d.ts.map +1 -1
  19. package/dist/commonjs/components/button/link-button.js +1 -1
  20. package/dist/commonjs/components/button/link-button.js.map +1 -1
  21. package/dist/commonjs/components/button/types.d.ts +1 -1
  22. package/dist/commonjs/components/button/types.d.ts.map +1 -1
  23. package/dist/commonjs/components/button/types.js.map +1 -1
  24. package/dist/commonjs/components/card/card-context.d.ts +4 -0
  25. package/dist/commonjs/components/card/card-context.d.ts.map +1 -0
  26. package/dist/commonjs/components/card/card-context.js +6 -0
  27. package/dist/commonjs/components/card/card-context.js.map +1 -0
  28. package/dist/commonjs/components/card/card.d.ts +15 -0
  29. package/dist/commonjs/components/card/card.d.ts.map +1 -0
  30. package/dist/commonjs/components/card/card.js +24 -0
  31. package/dist/commonjs/components/card/card.js.map +1 -0
  32. package/dist/commonjs/components/checkbox/checkbox-group.d.ts +1 -1
  33. package/dist/commonjs/components/checkbox/checkbox-group.js +1 -1
  34. package/dist/commonjs/components/checkbox/checkbox-group.js.map +1 -1
  35. package/dist/commonjs/components/checkbox/checkbox.d.ts +2 -2
  36. package/dist/commonjs/components/checkbox/checkbox.d.ts.map +1 -1
  37. package/dist/commonjs/components/checkbox/checkbox.js +1 -1
  38. package/dist/commonjs/components/checkbox/checkbox.js.map +1 -1
  39. package/dist/commonjs/components/combo-box/combo-box.d.ts +8 -4
  40. package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -1
  41. package/dist/commonjs/components/combo-box/combo-box.js +7 -7
  42. package/dist/commonjs/components/combo-box/combo-box.js.map +1 -1
  43. package/dist/commonjs/components/disclosure/disclosure-group.d.ts +10 -0
  44. package/dist/commonjs/components/disclosure/disclosure-group.d.ts.map +1 -0
  45. package/dist/commonjs/components/disclosure/disclosure-group.js +18 -0
  46. package/dist/commonjs/components/disclosure/disclosure-group.js.map +1 -0
  47. package/dist/commonjs/components/disclosure/disclosure.d.ts +14 -0
  48. package/dist/commonjs/components/disclosure/disclosure.d.ts.map +1 -0
  49. package/dist/commonjs/components/disclosure/disclosure.js +20 -0
  50. package/dist/commonjs/components/disclosure/disclosure.js.map +1 -0
  51. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts +0 -14
  52. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -1
  53. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js +2 -4
  54. package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js.map +1 -1
  55. package/dist/commonjs/components/internal/form-field/form-field.d.ts +1 -28
  56. package/dist/commonjs/components/internal/form-field/form-field.d.ts.map +1 -1
  57. package/dist/commonjs/components/internal/form-field/form-field.js +10 -0
  58. package/dist/commonjs/components/internal/form-field/form-field.js.map +1 -1
  59. package/dist/commonjs/components/internal/spinner/spinner.d.ts +0 -16
  60. package/dist/commonjs/components/internal/spinner/spinner.d.ts.map +1 -1
  61. package/dist/commonjs/components/menu/menu.d.ts +5 -4
  62. package/dist/commonjs/components/menu/menu.d.ts.map +1 -1
  63. package/dist/commonjs/components/menu/menu.js +3 -3
  64. package/dist/commonjs/components/menu/menu.js.map +1 -1
  65. package/dist/commonjs/components/modal/modal.d.ts +19 -0
  66. package/dist/commonjs/components/modal/modal.d.ts.map +1 -0
  67. package/dist/commonjs/components/modal/modal.js +25 -0
  68. package/dist/commonjs/components/modal/modal.js.map +1 -0
  69. package/dist/commonjs/components/nav-tabs/nav-tabs.d.ts +23 -0
  70. package/dist/commonjs/components/nav-tabs/nav-tabs.d.ts.map +1 -0
  71. package/dist/commonjs/components/nav-tabs/nav-tabs.js +27 -0
  72. package/dist/commonjs/components/nav-tabs/nav-tabs.js.map +1 -0
  73. package/dist/commonjs/components/number-field/number-field.d.ts +10 -0
  74. package/dist/commonjs/components/number-field/number-field.d.ts.map +1 -0
  75. package/dist/commonjs/components/number-field/number-field.js +32 -0
  76. package/dist/commonjs/components/number-field/number-field.js.map +1 -0
  77. package/dist/commonjs/components/pagination/pagination.d.ts +14 -0
  78. package/dist/commonjs/components/pagination/pagination.d.ts.map +1 -0
  79. package/dist/commonjs/components/pagination/pagination.js +69 -0
  80. package/dist/commonjs/components/pagination/pagination.js.map +1 -0
  81. package/dist/commonjs/components/radio/radio-group.d.ts +1 -1
  82. package/dist/commonjs/components/radio/radio-group.js +1 -1
  83. package/dist/commonjs/components/radio/radio-group.js.map +1 -1
  84. package/dist/commonjs/components/radio/radio.d.ts +2 -2
  85. package/dist/commonjs/components/radio/radio.d.ts.map +1 -1
  86. package/dist/commonjs/components/radio/radio.js +1 -1
  87. package/dist/commonjs/components/radio/radio.js.map +1 -1
  88. package/dist/commonjs/components/select/select.d.ts +4 -4
  89. package/dist/commonjs/components/select/select.d.ts.map +1 -1
  90. package/dist/commonjs/components/select/select.js +3 -3
  91. package/dist/commonjs/components/select/select.js.map +1 -1
  92. package/dist/commonjs/components/spinner/spinner.d.ts +5 -1
  93. package/dist/commonjs/components/spinner/spinner.d.ts.map +1 -1
  94. package/dist/commonjs/components/spinner/spinner.js +5 -2
  95. package/dist/commonjs/components/spinner/spinner.js.map +1 -1
  96. package/dist/commonjs/components/table/contexts/focus.d.ts +13 -0
  97. package/dist/commonjs/components/table/contexts/focus.d.ts.map +1 -0
  98. package/dist/commonjs/components/table/contexts/focus.js +51 -0
  99. package/dist/commonjs/components/table/contexts/focus.js.map +1 -0
  100. package/dist/commonjs/components/table/contexts/row-state.d.ts +10 -0
  101. package/dist/commonjs/components/table/contexts/row-state.d.ts.map +1 -0
  102. package/dist/commonjs/components/table/contexts/row-state.js +22 -0
  103. package/dist/commonjs/components/table/contexts/row-state.js.map +1 -0
  104. package/dist/commonjs/components/table/hooks/use-table-cell.d.ts +7 -0
  105. package/dist/commonjs/components/table/hooks/use-table-cell.d.ts.map +1 -0
  106. package/dist/commonjs/components/table/hooks/use-table-cell.js +125 -0
  107. package/dist/commonjs/components/table/hooks/use-table-cell.js.map +1 -0
  108. package/dist/commonjs/components/table/hooks/use-table.d.ts +7 -0
  109. package/dist/commonjs/components/table/hooks/use-table.d.ts.map +1 -0
  110. package/dist/commonjs/components/table/hooks/use-table.js +142 -0
  111. package/dist/commonjs/components/table/hooks/use-table.js.map +1 -0
  112. package/dist/commonjs/components/table/table-body-cell.d.ts +26 -0
  113. package/dist/commonjs/components/table/table-body-cell.d.ts.map +1 -0
  114. package/dist/commonjs/components/table/table-body-cell.js +17 -0
  115. package/dist/commonjs/components/table/table-body-cell.js.map +1 -0
  116. package/dist/commonjs/components/table/table-body.d.ts +8 -0
  117. package/dist/commonjs/components/table/table-body.d.ts.map +1 -0
  118. package/dist/commonjs/components/table/table-body.js +11 -0
  119. package/dist/commonjs/components/table/table-body.js.map +1 -0
  120. package/dist/commonjs/components/table/table-container.d.ts +8 -0
  121. package/dist/commonjs/components/table/table-container.d.ts.map +1 -0
  122. package/dist/commonjs/components/table/table-container.js +40 -0
  123. package/dist/commonjs/components/table/table-container.js.map +1 -0
  124. package/dist/commonjs/components/table/table-header-cell.d.ts +26 -0
  125. package/dist/commonjs/components/table/table-header-cell.d.ts.map +1 -0
  126. package/dist/commonjs/components/table/table-header-cell.js +17 -0
  127. package/dist/commonjs/components/table/table-header-cell.js.map +1 -0
  128. package/dist/commonjs/components/table/table-header.d.ts +8 -0
  129. package/dist/commonjs/components/table/table-header.d.ts.map +1 -0
  130. package/dist/commonjs/components/table/table-header.js +11 -0
  131. package/dist/commonjs/components/table/table-header.js.map +1 -0
  132. package/dist/commonjs/components/table/table-row.d.ts +21 -0
  133. package/dist/commonjs/components/table/table-row.d.ts.map +1 -0
  134. package/dist/commonjs/components/table/table-row.js +14 -0
  135. package/dist/commonjs/components/table/table-row.js.map +1 -0
  136. package/dist/commonjs/components/table/table.d.ts +26 -0
  137. package/dist/commonjs/components/table/table.d.ts.map +1 -0
  138. package/dist/commonjs/components/table/table.js +27 -0
  139. package/dist/commonjs/components/table/table.js.map +1 -0
  140. package/dist/commonjs/components/table/utils/focus-table-child.d.ts +4 -0
  141. package/dist/commonjs/components/table/utils/focus-table-child.d.ts.map +1 -0
  142. package/dist/commonjs/components/table/utils/focus-table-child.js +14 -0
  143. package/dist/commonjs/components/table/utils/focus-table-child.js.map +1 -0
  144. package/dist/commonjs/components/tag/tag-group.d.ts +18 -0
  145. package/dist/commonjs/components/tag/tag-group.d.ts.map +1 -0
  146. package/dist/commonjs/components/tag/tag-group.js +27 -0
  147. package/dist/commonjs/components/tag/tag-group.js.map +1 -0
  148. package/dist/commonjs/components/tag/tag.d.ts +17 -0
  149. package/dist/commonjs/components/tag/tag.d.ts.map +1 -0
  150. package/dist/commonjs/components/tag/tag.js +20 -0
  151. package/dist/commonjs/components/tag/tag.js.map +1 -0
  152. package/dist/commonjs/components/text-inputs/text-area.d.ts +1 -1
  153. package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -1
  154. package/dist/commonjs/components/text-inputs/text-area.js +1 -1
  155. package/dist/commonjs/components/text-inputs/text-area.js.map +1 -1
  156. package/dist/commonjs/components/text-inputs/text-field.d.ts +2 -2
  157. package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -1
  158. package/dist/commonjs/components/text-inputs/text-field.js +2 -2
  159. package/dist/commonjs/components/text-inputs/text-field.js.map +1 -1
  160. package/dist/commonjs/components/tooltip/tooltip.d.ts +9 -0
  161. package/dist/commonjs/components/tooltip/tooltip.d.ts.map +1 -0
  162. package/dist/commonjs/components/tooltip/tooltip.js +15 -0
  163. package/dist/commonjs/components/tooltip/tooltip.js.map +1 -0
  164. package/dist/commonjs/components/types.d.ts +32 -6
  165. package/dist/commonjs/components/types.d.ts.map +1 -1
  166. package/dist/commonjs/components/types.js.map +1 -1
  167. package/dist/commonjs/components/typography/link.d.ts +7 -3
  168. package/dist/commonjs/components/typography/link.d.ts.map +1 -1
  169. package/dist/commonjs/components/typography/link.js +8 -4
  170. package/dist/commonjs/components/typography/link.js.map +1 -1
  171. package/dist/commonjs/components/typography/text.d.ts +5 -1
  172. package/dist/commonjs/components/typography/text.d.ts.map +1 -1
  173. package/dist/commonjs/components/typography/text.js +5 -2
  174. package/dist/commonjs/components/typography/text.js.map +1 -1
  175. package/dist/commonjs/components/typography/types.d.ts +3 -2
  176. package/dist/commonjs/components/typography/types.d.ts.map +1 -1
  177. package/dist/commonjs/components/typography/types.js.map +1 -1
  178. package/dist/commonjs/components/typography/utils.d.ts.map +1 -1
  179. package/dist/commonjs/components/typography/utils.js +2 -2
  180. package/dist/commonjs/components/typography/utils.js.map +1 -1
  181. package/dist/commonjs/components/visually-hidden/visually-hidden.d.ts +17 -0
  182. package/dist/commonjs/components/visually-hidden/visually-hidden.d.ts.map +1 -0
  183. package/dist/commonjs/components/visually-hidden/visually-hidden.js +20 -0
  184. package/dist/commonjs/components/visually-hidden/visually-hidden.js.map +1 -0
  185. package/dist/commonjs/icons/accounting-document.d.ts +8 -0
  186. package/dist/commonjs/icons/accounting-document.d.ts.map +1 -0
  187. package/dist/commonjs/icons/accounting-document.js +24 -0
  188. package/dist/commonjs/icons/accounting-document.js.map +1 -0
  189. package/dist/commonjs/icons/add-circle-fill.d.ts +8 -0
  190. package/dist/commonjs/icons/add-circle-fill.d.ts.map +1 -0
  191. package/dist/commonjs/icons/add-circle-fill.js +24 -0
  192. package/dist/commonjs/icons/add-circle-fill.js.map +1 -0
  193. package/dist/commonjs/icons/add-circle.d.ts +8 -0
  194. package/dist/commonjs/icons/add-circle.d.ts.map +1 -0
  195. package/dist/commonjs/icons/add-circle.js +24 -0
  196. package/dist/commonjs/icons/add-circle.js.map +1 -0
  197. package/dist/commonjs/icons/add.d.ts +1 -1
  198. package/dist/commonjs/icons/add.d.ts.map +1 -1
  199. package/dist/commonjs/icons/add.js +6 -3
  200. package/dist/commonjs/icons/add.js.map +1 -1
  201. package/dist/commonjs/icons/alert-triangle.d.ts +1 -1
  202. package/dist/commonjs/icons/alert-triangle.d.ts.map +1 -1
  203. package/dist/commonjs/icons/alert-triangle.js +6 -3
  204. package/dist/commonjs/icons/alert-triangle.js.map +1 -1
  205. package/dist/commonjs/icons/calculator-alt.d.ts +8 -0
  206. package/dist/commonjs/icons/calculator-alt.d.ts.map +1 -0
  207. package/dist/commonjs/icons/calculator-alt.js +24 -0
  208. package/dist/commonjs/icons/calculator-alt.js.map +1 -0
  209. package/dist/commonjs/icons/calculator.d.ts +8 -0
  210. package/dist/commonjs/icons/calculator.d.ts.map +1 -0
  211. package/dist/commonjs/icons/calculator.js +24 -0
  212. package/dist/commonjs/icons/calculator.js.map +1 -0
  213. package/dist/commonjs/icons/checkmark-circle-fill.d.ts +1 -1
  214. package/dist/commonjs/icons/checkmark-circle-fill.d.ts.map +1 -1
  215. package/dist/commonjs/icons/checkmark-circle-fill.js +6 -3
  216. package/dist/commonjs/icons/checkmark-circle-fill.js.map +1 -1
  217. package/dist/commonjs/icons/checkmark-circle.d.ts +8 -0
  218. package/dist/commonjs/icons/checkmark-circle.d.ts.map +1 -0
  219. package/dist/commonjs/icons/checkmark-circle.js +24 -0
  220. package/dist/commonjs/icons/checkmark-circle.js.map +1 -0
  221. package/dist/commonjs/icons/checkmark-small.d.ts +1 -1
  222. package/dist/commonjs/icons/checkmark-small.d.ts.map +1 -1
  223. package/dist/commonjs/icons/checkmark-small.js +6 -3
  224. package/dist/commonjs/icons/checkmark-small.js.map +1 -1
  225. package/dist/commonjs/icons/checkmark.d.ts +1 -1
  226. package/dist/commonjs/icons/checkmark.d.ts.map +1 -1
  227. package/dist/commonjs/icons/checkmark.js +6 -3
  228. package/dist/commonjs/icons/checkmark.js.map +1 -1
  229. package/dist/commonjs/icons/chevron-down-fill.d.ts +1 -1
  230. package/dist/commonjs/icons/chevron-down-fill.d.ts.map +1 -1
  231. package/dist/commonjs/icons/chevron-down-fill.js +6 -3
  232. package/dist/commonjs/icons/chevron-down-fill.js.map +1 -1
  233. package/dist/commonjs/icons/error-circle-fill.d.ts +1 -1
  234. package/dist/commonjs/icons/error-circle-fill.d.ts.map +1 -1
  235. package/dist/commonjs/icons/error-circle-fill.js +6 -3
  236. package/dist/commonjs/icons/error-circle-fill.js.map +1 -1
  237. package/dist/commonjs/icons/index.d.ts +14 -0
  238. package/dist/commonjs/icons/index.d.ts.map +1 -1
  239. package/dist/commonjs/icons/index.js +29 -1
  240. package/dist/commonjs/icons/index.js.map +1 -1
  241. package/dist/commonjs/icons/info-circle-fill.d.ts +8 -0
  242. package/dist/commonjs/icons/info-circle-fill.d.ts.map +1 -0
  243. package/dist/commonjs/icons/info-circle-fill.js +24 -0
  244. package/dist/commonjs/icons/info-circle-fill.js.map +1 -0
  245. package/dist/commonjs/icons/minus-small.d.ts +1 -1
  246. package/dist/commonjs/icons/minus-small.d.ts.map +1 -1
  247. package/dist/commonjs/icons/minus-small.js +6 -3
  248. package/dist/commonjs/icons/minus-small.js.map +1 -1
  249. package/dist/commonjs/icons/minus.d.ts +8 -0
  250. package/dist/commonjs/icons/minus.d.ts.map +1 -0
  251. package/dist/commonjs/icons/minus.js +24 -0
  252. package/dist/commonjs/icons/minus.js.map +1 -0
  253. package/dist/commonjs/icons/unstable-chevron-left-fill.d.ts +8 -0
  254. package/dist/commonjs/icons/unstable-chevron-left-fill.d.ts.map +1 -0
  255. package/dist/commonjs/icons/unstable-chevron-left-fill.js +24 -0
  256. package/dist/commonjs/icons/unstable-chevron-left-fill.js.map +1 -0
  257. package/dist/commonjs/icons/unstable-chevron-right-fill.d.ts +8 -0
  258. package/dist/commonjs/icons/unstable-chevron-right-fill.d.ts.map +1 -0
  259. package/dist/commonjs/icons/unstable-chevron-right-fill.js +24 -0
  260. package/dist/commonjs/icons/unstable-chevron-right-fill.js.map +1 -0
  261. package/dist/commonjs/icons/unstable-close.d.ts +8 -0
  262. package/dist/commonjs/icons/unstable-close.d.ts.map +1 -0
  263. package/dist/commonjs/icons/unstable-close.js +24 -0
  264. package/dist/commonjs/icons/unstable-close.js.map +1 -0
  265. package/dist/commonjs/icons/unstable-info-circle.d.ts +8 -0
  266. package/dist/commonjs/icons/unstable-info-circle.d.ts.map +1 -0
  267. package/dist/commonjs/icons/unstable-info-circle.js +24 -0
  268. package/dist/commonjs/icons/unstable-info-circle.js.map +1 -0
  269. package/dist/commonjs/icons/unstable-placeholder.d.ts +8 -0
  270. package/dist/commonjs/icons/unstable-placeholder.d.ts.map +1 -0
  271. package/dist/commonjs/icons/unstable-placeholder.js +24 -0
  272. package/dist/commonjs/icons/unstable-placeholder.js.map +1 -0
  273. package/dist/commonjs/icons/warning-circle-fill.d.ts +8 -0
  274. package/dist/commonjs/icons/warning-circle-fill.d.ts.map +1 -0
  275. package/dist/commonjs/icons/warning-circle-fill.js +24 -0
  276. package/dist/commonjs/icons/warning-circle-fill.js.map +1 -0
  277. package/dist/commonjs/index.d.ts +21 -1
  278. package/dist/commonjs/index.d.ts.map +1 -1
  279. package/dist/commonjs/index.js +19 -0
  280. package/dist/commonjs/index.js.map +1 -1
  281. package/dist/commonjs/utils/style/tone.d.ts +3 -0
  282. package/dist/commonjs/utils/style/tone.d.ts.map +1 -0
  283. package/dist/commonjs/utils/style/tone.js +7 -0
  284. package/dist/commonjs/utils/style/tone.js.map +1 -0
  285. package/dist/commonjs/utils/style/types.d.ts +2 -0
  286. package/dist/commonjs/utils/style/types.d.ts.map +1 -0
  287. package/dist/commonjs/utils/style/types.js +3 -0
  288. package/dist/commonjs/utils/style/types.js.map +1 -0
  289. package/dist/commonjs/with-style-props.d.ts +1 -1
  290. package/dist/commonjs/with-style-props.d.ts.map +1 -1
  291. package/dist/commonjs/with-style-props.js.map +1 -1
  292. package/dist/esm/components/breadcrumbs/breadcrumbs.d.ts +22 -0
  293. package/dist/esm/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  294. package/dist/esm/components/breadcrumbs/breadcrumbs.js +30 -0
  295. package/dist/esm/components/breadcrumbs/breadcrumbs.js.map +1 -0
  296. package/dist/esm/components/button/button.d.ts +1 -1
  297. package/dist/esm/components/button/button.js +2 -2
  298. package/dist/esm/components/button/button.js.map +1 -1
  299. package/dist/esm/components/button/icon-button.d.ts +1 -1
  300. package/dist/esm/components/button/icon-button.js +2 -2
  301. package/dist/esm/components/button/icon-button.js.map +1 -1
  302. package/dist/esm/components/button/icon-link-button.d.ts +2 -2
  303. package/dist/esm/components/button/icon-link-button.d.ts.map +1 -1
  304. package/dist/esm/components/button/icon-link-button.js +1 -1
  305. package/dist/esm/components/button/icon-link-button.js.map +1 -1
  306. package/dist/esm/components/button/link-button.d.ts +2 -2
  307. package/dist/esm/components/button/link-button.d.ts.map +1 -1
  308. package/dist/esm/components/button/link-button.js +1 -1
  309. package/dist/esm/components/button/link-button.js.map +1 -1
  310. package/dist/esm/components/button/types.d.ts +1 -1
  311. package/dist/esm/components/button/types.d.ts.map +1 -1
  312. package/dist/esm/components/button/types.js.map +1 -1
  313. package/dist/esm/components/card/card-context.d.ts +4 -0
  314. package/dist/esm/components/card/card-context.d.ts.map +1 -0
  315. package/dist/esm/components/card/card-context.js +3 -0
  316. package/dist/esm/components/card/card-context.js.map +1 -0
  317. package/dist/esm/components/card/card.d.ts +15 -0
  318. package/dist/esm/components/card/card.d.ts.map +1 -0
  319. package/dist/esm/components/card/card.js +17 -0
  320. package/dist/esm/components/card/card.js.map +1 -0
  321. package/dist/esm/components/checkbox/checkbox-group.d.ts +1 -1
  322. package/dist/esm/components/checkbox/checkbox-group.js +1 -1
  323. package/dist/esm/components/checkbox/checkbox-group.js.map +1 -1
  324. package/dist/esm/components/checkbox/checkbox.d.ts +2 -2
  325. package/dist/esm/components/checkbox/checkbox.d.ts.map +1 -1
  326. package/dist/esm/components/checkbox/checkbox.js +1 -1
  327. package/dist/esm/components/checkbox/checkbox.js.map +1 -1
  328. package/dist/esm/components/combo-box/combo-box.d.ts +8 -4
  329. package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -1
  330. package/dist/esm/components/combo-box/combo-box.js +8 -8
  331. package/dist/esm/components/combo-box/combo-box.js.map +1 -1
  332. package/dist/esm/components/disclosure/disclosure-group.d.ts +10 -0
  333. package/dist/esm/components/disclosure/disclosure-group.d.ts.map +1 -0
  334. package/dist/esm/components/disclosure/disclosure-group.js +12 -0
  335. package/dist/esm/components/disclosure/disclosure-group.js.map +1 -0
  336. package/dist/esm/components/disclosure/disclosure.d.ts +14 -0
  337. package/dist/esm/components/disclosure/disclosure.d.ts.map +1 -0
  338. package/dist/esm/components/disclosure/disclosure.js +14 -0
  339. package/dist/esm/components/disclosure/disclosure.js.map +1 -0
  340. package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts +0 -14
  341. package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -1
  342. package/dist/esm/components/internal/collapsible-list/collapsible-list.js +2 -4
  343. package/dist/esm/components/internal/collapsible-list/collapsible-list.js.map +1 -1
  344. package/dist/esm/components/internal/form-field/form-field.d.ts +1 -28
  345. package/dist/esm/components/internal/form-field/form-field.d.ts.map +1 -1
  346. package/dist/esm/components/internal/form-field/form-field.js +10 -1
  347. package/dist/esm/components/internal/form-field/form-field.js.map +1 -1
  348. package/dist/esm/components/internal/spinner/spinner.d.ts +0 -16
  349. package/dist/esm/components/internal/spinner/spinner.d.ts.map +1 -1
  350. package/dist/esm/components/menu/menu.d.ts +5 -4
  351. package/dist/esm/components/menu/menu.d.ts.map +1 -1
  352. package/dist/esm/components/menu/menu.js +3 -3
  353. package/dist/esm/components/menu/menu.js.map +1 -1
  354. package/dist/esm/components/modal/modal.d.ts +19 -0
  355. package/dist/esm/components/modal/modal.d.ts.map +1 -0
  356. package/dist/esm/components/modal/modal.js +18 -0
  357. package/dist/esm/components/modal/modal.js.map +1 -0
  358. package/dist/esm/components/nav-tabs/nav-tabs.d.ts +23 -0
  359. package/dist/esm/components/nav-tabs/nav-tabs.d.ts.map +1 -0
  360. package/dist/esm/components/nav-tabs/nav-tabs.js +20 -0
  361. package/dist/esm/components/nav-tabs/nav-tabs.js.map +1 -0
  362. package/dist/esm/components/number-field/number-field.d.ts +10 -0
  363. package/dist/esm/components/number-field/number-field.d.ts.map +1 -0
  364. package/dist/esm/components/number-field/number-field.js +26 -0
  365. package/dist/esm/components/number-field/number-field.js.map +1 -0
  366. package/dist/esm/components/pagination/pagination.d.ts +14 -0
  367. package/dist/esm/components/pagination/pagination.d.ts.map +1 -0
  368. package/dist/esm/components/pagination/pagination.js +66 -0
  369. package/dist/esm/components/pagination/pagination.js.map +1 -0
  370. package/dist/esm/components/radio/radio-group.d.ts +1 -1
  371. package/dist/esm/components/radio/radio-group.js +1 -1
  372. package/dist/esm/components/radio/radio-group.js.map +1 -1
  373. package/dist/esm/components/radio/radio.d.ts +2 -2
  374. package/dist/esm/components/radio/radio.d.ts.map +1 -1
  375. package/dist/esm/components/radio/radio.js +1 -1
  376. package/dist/esm/components/radio/radio.js.map +1 -1
  377. package/dist/esm/components/select/select.d.ts +4 -4
  378. package/dist/esm/components/select/select.d.ts.map +1 -1
  379. package/dist/esm/components/select/select.js +3 -3
  380. package/dist/esm/components/select/select.js.map +1 -1
  381. package/dist/esm/components/spinner/spinner.d.ts +5 -1
  382. package/dist/esm/components/spinner/spinner.d.ts.map +1 -1
  383. package/dist/esm/components/spinner/spinner.js +5 -2
  384. package/dist/esm/components/spinner/spinner.js.map +1 -1
  385. package/dist/esm/components/table/contexts/focus.d.ts +13 -0
  386. package/dist/esm/components/table/contexts/focus.d.ts.map +1 -0
  387. package/dist/esm/components/table/contexts/focus.js +47 -0
  388. package/dist/esm/components/table/contexts/focus.js.map +1 -0
  389. package/dist/esm/components/table/contexts/row-state.d.ts +10 -0
  390. package/dist/esm/components/table/contexts/row-state.d.ts.map +1 -0
  391. package/dist/esm/components/table/contexts/row-state.js +18 -0
  392. package/dist/esm/components/table/contexts/row-state.js.map +1 -0
  393. package/dist/esm/components/table/hooks/use-table-cell.d.ts +7 -0
  394. package/dist/esm/components/table/hooks/use-table-cell.d.ts.map +1 -0
  395. package/dist/esm/components/table/hooks/use-table-cell.js +122 -0
  396. package/dist/esm/components/table/hooks/use-table-cell.js.map +1 -0
  397. package/dist/esm/components/table/hooks/use-table.d.ts +7 -0
  398. package/dist/esm/components/table/hooks/use-table.d.ts.map +1 -0
  399. package/dist/esm/components/table/hooks/use-table.js +139 -0
  400. package/dist/esm/components/table/hooks/use-table.js.map +1 -0
  401. package/dist/esm/components/table/table-body-cell.d.ts +26 -0
  402. package/dist/esm/components/table/table-body-cell.d.ts.map +1 -0
  403. package/dist/esm/components/table/table-body-cell.js +14 -0
  404. package/dist/esm/components/table/table-body-cell.js.map +1 -0
  405. package/dist/esm/components/table/table-body.d.ts +8 -0
  406. package/dist/esm/components/table/table-body.d.ts.map +1 -0
  407. package/dist/esm/components/table/table-body.js +8 -0
  408. package/dist/esm/components/table/table-body.js.map +1 -0
  409. package/dist/esm/components/table/table-container.d.ts +8 -0
  410. package/dist/esm/components/table/table-container.d.ts.map +1 -0
  411. package/dist/esm/components/table/table-container.js +34 -0
  412. package/dist/esm/components/table/table-container.js.map +1 -0
  413. package/dist/esm/components/table/table-header-cell.d.ts +26 -0
  414. package/dist/esm/components/table/table-header-cell.d.ts.map +1 -0
  415. package/dist/esm/components/table/table-header-cell.js +14 -0
  416. package/dist/esm/components/table/table-header-cell.js.map +1 -0
  417. package/dist/esm/components/table/table-header.d.ts +8 -0
  418. package/dist/esm/components/table/table-header.d.ts.map +1 -0
  419. package/dist/esm/components/table/table-header.js +8 -0
  420. package/dist/esm/components/table/table-header.js.map +1 -0
  421. package/dist/esm/components/table/table-row.d.ts +21 -0
  422. package/dist/esm/components/table/table-row.d.ts.map +1 -0
  423. package/dist/esm/components/table/table-row.js +11 -0
  424. package/dist/esm/components/table/table-row.js.map +1 -0
  425. package/dist/esm/components/table/table.d.ts +26 -0
  426. package/dist/esm/components/table/table.d.ts.map +1 -0
  427. package/dist/esm/components/table/table.js +24 -0
  428. package/dist/esm/components/table/table.js.map +1 -0
  429. package/dist/esm/components/table/utils/focus-table-child.d.ts +4 -0
  430. package/dist/esm/components/table/utils/focus-table-child.d.ts.map +1 -0
  431. package/dist/esm/components/table/utils/focus-table-child.js +11 -0
  432. package/dist/esm/components/table/utils/focus-table-child.js.map +1 -0
  433. package/dist/esm/components/tag/tag-group.d.ts +18 -0
  434. package/dist/esm/components/tag/tag-group.d.ts.map +1 -0
  435. package/dist/esm/components/tag/tag-group.js +21 -0
  436. package/dist/esm/components/tag/tag-group.js.map +1 -0
  437. package/dist/esm/components/tag/tag.d.ts +17 -0
  438. package/dist/esm/components/tag/tag.d.ts.map +1 -0
  439. package/dist/esm/components/tag/tag.js +14 -0
  440. package/dist/esm/components/tag/tag.js.map +1 -0
  441. package/dist/esm/components/text-inputs/text-area.d.ts +1 -1
  442. package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -1
  443. package/dist/esm/components/text-inputs/text-area.js +3 -3
  444. package/dist/esm/components/text-inputs/text-area.js.map +1 -1
  445. package/dist/esm/components/text-inputs/text-field.d.ts +2 -2
  446. package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -1
  447. package/dist/esm/components/text-inputs/text-field.js +4 -4
  448. package/dist/esm/components/text-inputs/text-field.js.map +1 -1
  449. package/dist/esm/components/tooltip/tooltip.d.ts +9 -0
  450. package/dist/esm/components/tooltip/tooltip.d.ts.map +1 -0
  451. package/dist/esm/components/tooltip/tooltip.js +9 -0
  452. package/dist/esm/components/tooltip/tooltip.js.map +1 -0
  453. package/dist/esm/components/types.d.ts +32 -6
  454. package/dist/esm/components/types.d.ts.map +1 -1
  455. package/dist/esm/components/types.js.map +1 -1
  456. package/dist/esm/components/typography/link.d.ts +7 -3
  457. package/dist/esm/components/typography/link.d.ts.map +1 -1
  458. package/dist/esm/components/typography/link.js +8 -4
  459. package/dist/esm/components/typography/link.js.map +1 -1
  460. package/dist/esm/components/typography/text.d.ts +5 -1
  461. package/dist/esm/components/typography/text.d.ts.map +1 -1
  462. package/dist/esm/components/typography/text.js +5 -2
  463. package/dist/esm/components/typography/text.js.map +1 -1
  464. package/dist/esm/components/typography/types.d.ts +3 -2
  465. package/dist/esm/components/typography/types.d.ts.map +1 -1
  466. package/dist/esm/components/typography/types.js.map +1 -1
  467. package/dist/esm/components/typography/utils.d.ts.map +1 -1
  468. package/dist/esm/components/typography/utils.js +2 -2
  469. package/dist/esm/components/typography/utils.js.map +1 -1
  470. package/dist/esm/components/visually-hidden/visually-hidden.d.ts +17 -0
  471. package/dist/esm/components/visually-hidden/visually-hidden.d.ts.map +1 -0
  472. package/dist/esm/components/visually-hidden/visually-hidden.js +14 -0
  473. package/dist/esm/components/visually-hidden/visually-hidden.js.map +1 -0
  474. package/dist/esm/icons/accounting-document.d.ts +8 -0
  475. package/dist/esm/icons/accounting-document.d.ts.map +1 -0
  476. package/dist/esm/icons/accounting-document.js +19 -0
  477. package/dist/esm/icons/accounting-document.js.map +1 -0
  478. package/dist/esm/icons/add-circle-fill.d.ts +8 -0
  479. package/dist/esm/icons/add-circle-fill.d.ts.map +1 -0
  480. package/dist/esm/icons/add-circle-fill.js +19 -0
  481. package/dist/esm/icons/add-circle-fill.js.map +1 -0
  482. package/dist/esm/icons/add-circle.d.ts +8 -0
  483. package/dist/esm/icons/add-circle.d.ts.map +1 -0
  484. package/dist/esm/icons/add-circle.js +19 -0
  485. package/dist/esm/icons/add-circle.js.map +1 -0
  486. package/dist/esm/icons/add.d.ts +1 -1
  487. package/dist/esm/icons/add.d.ts.map +1 -1
  488. package/dist/esm/icons/add.js +6 -3
  489. package/dist/esm/icons/add.js.map +1 -1
  490. package/dist/esm/icons/alert-triangle.d.ts +1 -1
  491. package/dist/esm/icons/alert-triangle.d.ts.map +1 -1
  492. package/dist/esm/icons/alert-triangle.js +6 -3
  493. package/dist/esm/icons/alert-triangle.js.map +1 -1
  494. package/dist/esm/icons/calculator-alt.d.ts +8 -0
  495. package/dist/esm/icons/calculator-alt.d.ts.map +1 -0
  496. package/dist/esm/icons/calculator-alt.js +19 -0
  497. package/dist/esm/icons/calculator-alt.js.map +1 -0
  498. package/dist/esm/icons/calculator.d.ts +8 -0
  499. package/dist/esm/icons/calculator.d.ts.map +1 -0
  500. package/dist/esm/icons/calculator.js +19 -0
  501. package/dist/esm/icons/calculator.js.map +1 -0
  502. package/dist/esm/icons/checkmark-circle-fill.d.ts +1 -1
  503. package/dist/esm/icons/checkmark-circle-fill.d.ts.map +1 -1
  504. package/dist/esm/icons/checkmark-circle-fill.js +6 -3
  505. package/dist/esm/icons/checkmark-circle-fill.js.map +1 -1
  506. package/dist/esm/icons/checkmark-circle.d.ts +8 -0
  507. package/dist/esm/icons/checkmark-circle.d.ts.map +1 -0
  508. package/dist/esm/icons/checkmark-circle.js +19 -0
  509. package/dist/esm/icons/checkmark-circle.js.map +1 -0
  510. package/dist/esm/icons/checkmark-small.d.ts +1 -1
  511. package/dist/esm/icons/checkmark-small.d.ts.map +1 -1
  512. package/dist/esm/icons/checkmark-small.js +6 -3
  513. package/dist/esm/icons/checkmark-small.js.map +1 -1
  514. package/dist/esm/icons/checkmark.d.ts +1 -1
  515. package/dist/esm/icons/checkmark.d.ts.map +1 -1
  516. package/dist/esm/icons/checkmark.js +6 -3
  517. package/dist/esm/icons/checkmark.js.map +1 -1
  518. package/dist/esm/icons/chevron-down-fill.d.ts +1 -1
  519. package/dist/esm/icons/chevron-down-fill.d.ts.map +1 -1
  520. package/dist/esm/icons/chevron-down-fill.js +6 -3
  521. package/dist/esm/icons/chevron-down-fill.js.map +1 -1
  522. package/dist/esm/icons/error-circle-fill.d.ts +1 -1
  523. package/dist/esm/icons/error-circle-fill.d.ts.map +1 -1
  524. package/dist/esm/icons/error-circle-fill.js +7 -4
  525. package/dist/esm/icons/error-circle-fill.js.map +1 -1
  526. package/dist/esm/icons/index.d.ts +14 -0
  527. package/dist/esm/icons/index.d.ts.map +1 -1
  528. package/dist/esm/icons/index.js +14 -0
  529. package/dist/esm/icons/index.js.map +1 -1
  530. package/dist/esm/icons/info-circle-fill.d.ts +8 -0
  531. package/dist/esm/icons/info-circle-fill.d.ts.map +1 -0
  532. package/dist/esm/icons/info-circle-fill.js +19 -0
  533. package/dist/esm/icons/info-circle-fill.js.map +1 -0
  534. package/dist/esm/icons/minus-small.d.ts +1 -1
  535. package/dist/esm/icons/minus-small.d.ts.map +1 -1
  536. package/dist/esm/icons/minus-small.js +6 -3
  537. package/dist/esm/icons/minus-small.js.map +1 -1
  538. package/dist/esm/icons/minus.d.ts +8 -0
  539. package/dist/esm/icons/minus.d.ts.map +1 -0
  540. package/dist/esm/icons/minus.js +19 -0
  541. package/dist/esm/icons/minus.js.map +1 -0
  542. package/dist/esm/icons/unstable-chevron-left-fill.d.ts +8 -0
  543. package/dist/esm/icons/unstable-chevron-left-fill.d.ts.map +1 -0
  544. package/dist/esm/icons/unstable-chevron-left-fill.js +19 -0
  545. package/dist/esm/icons/unstable-chevron-left-fill.js.map +1 -0
  546. package/dist/esm/icons/unstable-chevron-right-fill.d.ts +8 -0
  547. package/dist/esm/icons/unstable-chevron-right-fill.d.ts.map +1 -0
  548. package/dist/esm/icons/unstable-chevron-right-fill.js +19 -0
  549. package/dist/esm/icons/unstable-chevron-right-fill.js.map +1 -0
  550. package/dist/esm/icons/unstable-close.d.ts +8 -0
  551. package/dist/esm/icons/unstable-close.d.ts.map +1 -0
  552. package/dist/esm/icons/unstable-close.js +19 -0
  553. package/dist/esm/icons/unstable-close.js.map +1 -0
  554. package/dist/esm/icons/unstable-info-circle.d.ts +8 -0
  555. package/dist/esm/icons/unstable-info-circle.d.ts.map +1 -0
  556. package/dist/esm/icons/unstable-info-circle.js +19 -0
  557. package/dist/esm/icons/unstable-info-circle.js.map +1 -0
  558. package/dist/esm/icons/unstable-placeholder.d.ts +8 -0
  559. package/dist/esm/icons/unstable-placeholder.d.ts.map +1 -0
  560. package/dist/esm/icons/unstable-placeholder.js +19 -0
  561. package/dist/esm/icons/unstable-placeholder.js.map +1 -0
  562. package/dist/esm/icons/warning-circle-fill.d.ts +8 -0
  563. package/dist/esm/icons/warning-circle-fill.d.ts.map +1 -0
  564. package/dist/esm/icons/warning-circle-fill.js +19 -0
  565. package/dist/esm/icons/warning-circle-fill.js.map +1 -0
  566. package/dist/esm/index.d.ts +21 -1
  567. package/dist/esm/index.d.ts.map +1 -1
  568. package/dist/esm/index.js +19 -0
  569. package/dist/esm/index.js.map +1 -1
  570. package/dist/esm/utils/style/tone.d.ts +3 -0
  571. package/dist/esm/utils/style/tone.d.ts.map +1 -0
  572. package/dist/esm/utils/style/tone.js +4 -0
  573. package/dist/esm/utils/style/tone.js.map +1 -0
  574. package/dist/esm/utils/style/types.d.ts +2 -0
  575. package/dist/esm/utils/style/types.d.ts.map +1 -0
  576. package/dist/esm/utils/style/types.js +2 -0
  577. package/dist/esm/utils/style/types.js.map +1 -0
  578. package/dist/esm/with-style-props.d.ts +1 -1
  579. package/dist/esm/with-style-props.d.ts.map +1 -1
  580. package/dist/esm/with-style-props.js.map +1 -1
  581. package/dist-styles/styles.css +1 -1
  582. package/package.json +28 -25
@@ -1 +1 @@
1
- {"version":3,"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AAC;AACvD,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ReactNode, type ForwardedRef, useEffect, type Ref } from 'react';\nimport {\n Header as RACHeader,\n Menu as RACMenu,\n MenuItem as RACMenuItem,\n type MenuItemProps as RACMenuItemProps,\n MenuTrigger as RACMenuTrigger,\n MenuSection as RACMenuSection,\n Separator as RACSeparator,\n Collection as RACCollection,\n Text as RACText,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport type {\n CommonProps,\n Key,\n LabellableProps,\n NavigationProps,\n CollectionProps,\n CollectionItem,\n StringLikeChildren,\n} from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface MenuProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n CollectionProps<T>,\n LabellableProps {\n /** Whether the menu trigger is disabled. */\n isDisabled?: boolean;\n /** Handler that is called when an item is selected. When using `onAction`, all items must have an `id` prop defined. */\n onAction?: (key: Key) => void;\n}\n\nfunction Menu<T extends CollectionItem>(\n { children, isDisabled, onAction, items, ...props }: MenuProps<T>,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const { label, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('`Menu` requires one of `label` / `aria-label` / `aria-labelledby` for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`Menu` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuTrigger>\n <MenuTrigger {...props} triggerRef={ref} isDisabled={isDisabled} />\n <CollapsibleList\n placement=\"bottom start\"\n offset={1} // Account for border\n maxHeight={315}\n >\n <RACMenu className=\"cim-menu\" onAction={onAction} items={items}>\n {children}\n </RACMenu>\n </CollapsibleList>\n </RACMenuTrigger>\n );\n}\n\n/**\n * Displays a collapsible list of options and actions that users can choose from.\n *\n * See [menu usage guidelines](https://ui.cimpress.io/components/menu/usage-guidelines/).\n */\nconst _Menu = withStyleProps(forwardRef(Menu), 'Menu');\n\nexport { _Menu as Menu };\n\ninterface MenuTriggerProps extends CommonProps, LabellableProps {\n triggerRef: Ref<HTMLButtonElement>;\n isDisabled?: boolean;\n}\n\nfunction MenuTrigger({ label, triggerRef, ...props }: MenuTriggerProps) {\n if (label) {\n return (\n <Button\n {...props}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n iconEnd={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n >\n {label}\n </Button>\n );\n }\n\n return (\n <IconButton\n {...props}\n // The warning for missing aria-label would have been already emitted in the <Menu> component, so this is fine\n aria-label={props['aria-label'] ?? ''}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n icon={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n />\n );\n}\n\nexport interface MenuSectionProps<T extends CollectionItem = CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `Menu` into a section. */\nexport function MenuSection<T extends CollectionItem>({ title, children, items, ...props }: MenuSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`MenuSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuSection {...props} className=\"cim-menu-section\">\n <RACHeader className={clsx('cim-menu-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}>\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACMenuSection>\n );\n}\n\nMenuSection.displayName = 'MenuSection';\n\nexport interface MenuItemProps extends NavigationProps, Pick<RACMenuItemProps, 'isDisabled' | 'onAction'> {\n /** The ID of the item. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the label. */\n children: StringLikeChildren;\n /** Additional description for the menu item. */\n description?: string;\n /** An icon representing the menu item. */\n icon?: ReactNode;\n}\n\n/** Renders a single list item within `Menu`. */\nexport function MenuItem({ children, description, icon, ...props }: MenuItemProps) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACMenuItem {...props} className=\"cim-menu-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n {icon}\n\n <div className=\"cim-menu-item-text\">\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n\n {description && (\n <RACText\n slot=\"description\"\n className={textStyle({ variant: 'small', tone: isDisabled ? 'muted' : 'subtle' })}\n >\n {description}\n </RACText>\n )}\n </div>\n </>\n )}\n </RACMenuItem>\n );\n}\n\nMenuItem.displayName = 'MenuItem';\n\n/** Renders a horizontal divider between list items within `Menu`. */\nexport function MenuDivider() {\n return <RACSeparator className=\"cim-menu-divider\" />;\n}\n\nMenuDivider.displayName = 'MenuDivider';\n"]}
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AAqIb,kCAaC;AAkBD,4BA4BC;AAKD,kCAEC;;AArMD,gDAAwB;AACxB,iCAA+E;AAC/E,iEAY+B;AAC/B,yDAAkD;AAClD,mDAA2D;AAC3D,mEAA2D;AAC3D,mDAA6C;AAC7C,6DAAsD;AAEtD,0FAAmF;AAUnF,qDAAmD;AAenD,SAAS,IAAI,CACX,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgB,EACzF,GAAoC;IAEpC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,E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CAAC,EAAE,CAAC,CAAC;IAEhH,OAAO,CACL,uBAAC,gCAAW,OAAK,KAAK,EAAE,SAAS,EAAC,eAAe,EAAC,SAAS,EAAE,SAAS,YACnE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CACnB,6DACG,IAAI,EAEL,iCAAK,SAAS,EAAC,oBAAoB,aACjC,uBAAC,4BAAO,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,YACjG,QAAQ,GACD,EAET,WAAW,IAAI,CACd,uBAAC,4BAAO,IACN,IAAI,EAAC,aAAa,EAClB,SAAS,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,YAEhF,WAAW,GACJ,CACX,IACG,IACL,CACJ,GACW,CACf,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,qEAAqE;AACrE,SAAgB,WAAW;IACzB,OAAO,uBAAC,iCAAY,IAAC,SAAS,EAAC,kBAAkB,GAAG,CAAC;AACvD,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ReactNode, type ForwardedRef, useEffect, type Ref } from 'react';\nimport {\n Header as RACHeader,\n Menu as RACMenu,\n type MenuProps as RACMenuProps,\n MenuItem as RACMenuItem,\n type MenuItemProps as RACMenuItemProps,\n MenuTrigger as RACMenuTrigger,\n type MenuTriggerProps as RACMenuTriggerProps,\n MenuSection as RACMenuSection,\n Separator as RACSeparator,\n Collection as RACCollection,\n Text as RACText,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport type { ActionButtonProps } from '../button/types.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport type {\n CommonProps,\n Key,\n LabellableProps,\n NavigationProps,\n CollectionProps,\n CollectionItem,\n StringLikeChildren,\n} from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface MenuProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n CollectionProps<T>,\n LabellableProps,\n Pick<RACMenuTriggerProps, 'onOpenChange'>,\n Pick<RACMenuProps<T>, 'onScroll'>,\n Pick<ActionButtonProps, 'onHoverStart' | 'onHoverEnd'> {\n /** Whether the menu trigger is disabled. */\n isDisabled?: boolean;\n /** Handler that is called when an item is selected. When using `onAction`, all items must have an `id` prop defined. */\n onAction?: (key: Key) => void;\n}\n\nfunction Menu<T extends CollectionItem>(\n { children, isDisabled, onAction, items, onOpenChange, onScroll, ...props }: MenuProps<T>,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const { label, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('`Menu` requires one of `label` / `aria-label` / `aria-labelledby` for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`Menu` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuTrigger onOpenChange={onOpenChange}>\n <MenuTrigger {...props} triggerRef={ref} isDisabled={isDisabled} />\n <CollapsibleList\n placement=\"bottom start\"\n offset={5} // 1px border + 4px actual offset\n maxHeight={315}\n >\n <RACMenu className=\"cim-menu\" onAction={onAction} onScroll={onScroll} items={items}>\n {children}\n </RACMenu>\n </CollapsibleList>\n </RACMenuTrigger>\n );\n}\n\n/**\n * Displays a collapsible list of options and actions that users can choose from.\n *\n * See [menu usage guidelines](https://ui.cimpress.io/components/menu/).\n */\nconst _Menu = withStyleProps(forwardRef(Menu), 'Menu');\n\nexport { _Menu as Menu };\n\ninterface MenuTriggerProps\n extends CommonProps,\n LabellableProps,\n Pick<ActionButtonProps, 'onHoverStart' | 'onHoverEnd'> {\n triggerRef: Ref<HTMLButtonElement>;\n isDisabled?: boolean;\n}\n\nfunction MenuTrigger({ label, triggerRef, ...props }: MenuTriggerProps) {\n if (label) {\n return (\n <Button\n {...props}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n iconEnd={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n >\n {label}\n </Button>\n );\n }\n\n return (\n <IconButton\n {...props}\n // The warning for missing aria-label would have been already emitted in the <Menu> component, so this is fine\n aria-label={props['aria-label'] ?? ''}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n icon={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n />\n );\n}\n\nexport interface MenuSectionProps<T extends CollectionItem = CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `Menu` into a section. */\nexport function MenuSection<T extends CollectionItem>({ title, children, items, ...props }: MenuSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`MenuSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuSection {...props} className=\"cim-menu-section\">\n <RACHeader className={clsx('cim-menu-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}>\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACMenuSection>\n );\n}\n\nMenuSection.displayName = 'MenuSection';\n\nexport interface MenuItemProps\n extends NavigationProps,\n Pick<RACMenuItemProps, 'isDisabled' | 'onAction' | 'onHoverStart' | 'onHoverEnd'> {\n /** The ID of the item. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the label. */\n children: StringLikeChildren;\n /** Additional description for the menu item. */\n description?: string;\n /** An icon representing the menu item. */\n icon?: ReactNode;\n}\n\n/** Renders a single list item within `Menu`. */\nexport function MenuItem({ children, description, icon, ...props }: MenuItemProps) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACMenuItem {...props} className=\"cim-menu-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n {icon}\n\n <div className=\"cim-menu-item-text\">\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n\n {description && (\n <RACText\n slot=\"description\"\n className={textStyle({ variant: 'small', tone: isDisabled ? 'muted' : 'subtle' })}\n >\n {description}\n </RACText>\n )}\n </div>\n </>\n )}\n </RACMenuItem>\n );\n}\n\nMenuItem.displayName = 'MenuItem';\n\n/** Renders a horizontal divider between list items within `Menu`. */\nexport function MenuDivider() {\n return <RACSeparator className=\"cim-menu-divider\" />;\n}\n\nMenuDivider.displayName = 'MenuDivider';\n"]}
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type ModalOverlayProps as RACModalOverlayProps } from 'react-aria-components';
3
+ import type { CommonProps } from '../types.js';
4
+ export interface UNSTABLE_ModalProps extends CommonProps, Pick<RACModalOverlayProps, 'isDismissable'> {
5
+ children: ReactNode;
6
+ title?: string;
7
+ size?: 'small' | 'medium' | 'large';
8
+ /** Whether the modal is open (controlled). */
9
+ isOpen?: boolean;
10
+ /** Whether the modal is open by default (uncontrolled). */
11
+ defaultOpen?: boolean;
12
+ /** Handler that is called when the modal's open state changes. */
13
+ onOpenChange?: (isOpen: boolean) => void;
14
+ }
15
+ export declare function UNSTABLE_DialogTrigger({ children }: {
16
+ children: ReactNode;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ export declare function UNSTABLE_Modal({ children, title, size, UNSAFE_className, UNSAFE_style, isDismissable, isOpen, defaultOpen, onOpenChange, ...props }: UNSTABLE_ModalProps): import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAML,KAAK,iBAAiB,IAAI,oBAAoB,EAC/C,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,mBAAoB,SAAQ,WAAW,EAAE,IAAI,CAAC,oBAAoB,EAAE,eAAe,CAAC;IACnG,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kEAAkE;IAClE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAE3E;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,IAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,aAAoB,EACpB,MAAM,EACN,WAAW,EACX,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAsCrB"}
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.UNSTABLE_DialogTrigger = UNSTABLE_DialogTrigger;
8
+ exports.UNSTABLE_Modal = UNSTABLE_Modal;
9
+ const jsx_runtime_1 = require("react/jsx-runtime");
10
+ const clsx_1 = __importDefault(require("clsx"));
11
+ const react_aria_components_1 = require("react-aria-components");
12
+ const index_js_1 = require("../../icons/index.js");
13
+ const icon_button_js_1 = require("../button/icon-button.js");
14
+ const utils_js_1 = require("../typography/utils.js");
15
+ function UNSTABLE_DialogTrigger({ children }) {
16
+ return (0, jsx_runtime_1.jsx)(react_aria_components_1.DialogTrigger, { children: children });
17
+ }
18
+ function UNSTABLE_Modal({ children, title, size = 'medium', UNSAFE_className, UNSAFE_style, isDismissable = true, isOpen, defaultOpen, onOpenChange, ...props }) {
19
+ return ((0, jsx_runtime_1.jsx)(react_aria_components_1.ModalOverlay, { className: "cim-modal-overlay", isDismissable: isDismissable, isOpen: isOpen, defaultOpen: defaultOpen, onOpenChange: onOpenChange, "data-cim-style-root": true, children: (0, jsx_runtime_1.jsx)(react_aria_components_1.Modal, { className: (0, clsx_1.default)('cim-modal', UNSAFE_className, {
20
+ 'cim-modal-small': size === 'small',
21
+ 'cim-modal-medium': size === 'medium',
22
+ 'cim-modal-large': size === 'large',
23
+ }), children: (0, jsx_runtime_1.jsxs)(react_aria_components_1.Dialog, { ...props, className: (0, clsx_1.default)('cim-modal-dialog'), style: UNSAFE_style, children: [(0, jsx_runtime_1.jsxs)("div", { className: "cim-modal-header", children: [title && ((0, jsx_runtime_1.jsx)(react_aria_components_1.Heading, { slot: "title", className: (0, clsx_1.default)('cim-modal-title', (0, utils_js_1.textStyle)({ variant: 'title-3' })), children: title })), (0, jsx_runtime_1.jsx)(icon_button_js_1.IconButton, { slot: "close", icon: (0, jsx_runtime_1.jsx)(index_js_1.UNSTABLE_IconClose, {}), variant: "tertiary", size: "small", "aria-label": "Close modal", UNSAFE_className: "cim-modal-close-button" })] }), (0, jsx_runtime_1.jsx)("div", { className: "cim-modal-content", children: children })] }) }) }));
24
+ }
25
+ //# sourceMappingURL=modal.js.map
@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D,uBAAC,2BAAU,IACT,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,uBAAC,6BAAkB,KAAG,EAC5B,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,gBACD,aAAa,EACxB,gBAAgB,EAAC,wBAAwB,GACzC,IACE,EACN,gCAAK,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAO,IACzC,GACH,GACK,CACnB,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\nimport {\n Heading as RACHeading,\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type ModalOverlayProps as RACModalOverlayProps,\n} from 'react-aria-components';\nimport { UNSTABLE_IconClose } from '../../icons/index.js';\nimport { IconButton } from '../button/icon-button.js';\nimport type { CommonProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface UNSTABLE_ModalProps extends CommonProps, Pick<RACModalOverlayProps, 'isDismissable'> {\n children: ReactNode;\n title?: string;\n size?: 'small' | 'medium' | 'large';\n /** Whether the modal is open (controlled). */\n isOpen?: boolean;\n /** Whether the modal is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** Handler that is called when the modal's open state changes. */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport function UNSTABLE_DialogTrigger({ children }: { children: ReactNode }) {\n return <RACDialogTrigger>{children}</RACDialogTrigger>;\n}\n\nexport function UNSTABLE_Modal({\n children,\n title,\n size = 'medium',\n UNSAFE_className,\n UNSAFE_style,\n isDismissable = true,\n isOpen,\n defaultOpen,\n onOpenChange,\n ...props\n}: UNSTABLE_ModalProps) {\n return (\n <RACModalOverlay\n className=\"cim-modal-overlay\"\n isDismissable={isDismissable}\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n data-cim-style-root\n >\n <RACModal\n className={clsx('cim-modal', UNSAFE_className, {\n 'cim-modal-small': size === 'small',\n 'cim-modal-medium': size === 'medium',\n 'cim-modal-large': size === 'large',\n })}\n >\n <RACDialog {...props} className={clsx('cim-modal-dialog')} style={UNSAFE_style}>\n <div className=\"cim-modal-header\">\n {title && (\n <RACHeading slot=\"title\" className={clsx('cim-modal-title', textStyle({ variant: 'title-3' }))}>\n {title}\n </RACHeading>\n )}\n <IconButton\n slot=\"close\"\n icon={<UNSTABLE_IconClose />}\n variant=\"tertiary\"\n size=\"small\"\n aria-label=\"Close modal\"\n UNSAFE_className=\"cim-modal-close-button\"\n />\n </div>\n <div className=\"cim-modal-content\">{children}</div>\n </RACDialog>\n </RACModal>\n </RACModalOverlay>\n );\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type LinkProps as RACLinkProps } from 'react-aria-components';
3
+ import type { CommonProps, LabellableProps, NavigationProps, StringLikeChildren, WithRequired } from '../types.js';
4
+ export interface UNSTABLE_NavTabsProps extends CommonProps, Omit<LabellableProps, 'label'> {
5
+ children: ReactNode;
6
+ /**
7
+ * Whether to display the navigation tabs horizontally or vertically.
8
+ * @default 'horizontal'
9
+ */
10
+ orientation?: 'horizontal' | 'vertical';
11
+ }
12
+ export interface UNSTABLE_NavTabItemProps extends Omit<CommonProps, 'id'>, WithRequired<NavigationProps, 'href'>, Pick<RACLinkProps, 'children' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
13
+ children: StringLikeChildren;
14
+ isCurrent?: boolean;
15
+ }
16
+ /** Renders a single navigation tab within `NavTabs`. */
17
+ export declare function UNSTABLE_NavTabItem({ children, isCurrent, UNSAFE_className, UNSAFE_style, ...props }: UNSTABLE_NavTabItemProps): import("react/jsx-runtime").JSX.Element;
18
+ /**
19
+ * Displays a list of navigation tabs to help users navigate through a website.
20
+ */
21
+ declare const _UNSTABLE_NavTabs: (props: UNSTABLE_NavTabsProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
22
+ export { _UNSTABLE_NavTabs as UNSTABLE_NavTabs };
23
+ //# sourceMappingURL=nav-tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/nav-tabs/nav-tabs.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AACrD,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAInH,MAAM,WAAW,qBAAsB,SAAQ,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IACxF,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC;AAmBD,MAAM,WAAW,wBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAC7B,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;IAC/E,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAW1B;AAED;;GAEG;AACH,QAAA,MAAM,iBAAiB,uKAA0D,CAAC;AAElF,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.UNSTABLE_NavTabs = void 0;
8
+ exports.UNSTABLE_NavTabItem = UNSTABLE_NavTabItem;
9
+ const jsx_runtime_1 = require("react/jsx-runtime");
10
+ const clsx_1 = __importDefault(require("clsx"));
11
+ const react_aria_components_1 = require("react-aria-components");
12
+ const forward_ref_js_1 = require("../../forward-ref.js");
13
+ const with_style_props_js_1 = require("../../with-style-props.js");
14
+ const utils_js_1 = require("../typography/utils.js");
15
+ function UNSTABLE_NavTabs({ children, orientation = 'horizontal', UNSAFE_className, UNSAFE_style, ...props }, ref) {
16
+ return ((0, jsx_runtime_1.jsx)("div", { ...props, ref: ref, className: (0, clsx_1.default)('cim-nav-tabs', UNSAFE_className), style: UNSAFE_style, "data-orientation": orientation, children: children }));
17
+ }
18
+ /** Renders a single navigation tab within `NavTabs`. */
19
+ function UNSTABLE_NavTabItem({ children, isCurrent = false, UNSAFE_className, UNSAFE_style, ...props }) {
20
+ return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Link, { ...props, className: (0, clsx_1.default)('cim-nav-tab-item', (0, utils_js_1.textStyle)({ variant: 'body' }), UNSAFE_className), style: UNSAFE_style, "aria-current": isCurrent ? 'page' : undefined, children: children }));
21
+ }
22
+ /**
23
+ * Displays a list of navigation tabs to help users navigate through a website.
24
+ */
25
+ const _UNSTABLE_NavTabs = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(UNSTABLE_NavTabs), 'NavTabs');
26
+ exports.UNSTABLE_NavTabs = _UNSTABLE_NavTabs;
27
+ //# sourceMappingURL=nav-tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-tabs.js","sourceRoot":"","sources":["../../../../src/components/nav-tabs/nav-tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AA8Cb,kDAiBC;;AA7DD,gDAAwB;AAExB,iEAAwF;AACxF,yDAAkD;AAClD,mEAA2D;AAE3D,qDAAmD;AAYnD,SAAS,gBAAgB,CACvB,EAAE,QAAQ,EAAE,WAAW,GAAG,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAyB,EACzG,GAAiC;IAEjC,OAAO,CACL,mCACM,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,cAAc,EAAE,gBAAgB,CAAC,EACjD,KAAK,EAAE,YAAY,sBACD,WAAW,YAE5B,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAUD,wDAAwD;AACxD,SAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACiB;IACzB,OAAO,CACL,uBAAC,4BAAO,OACF,KAAK,EACT,SAAS,EAAE,IAAA,cAAI,EAAC,kBAAkB,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,gBAAgB,CAAC,EACrF,KAAK,EAAE,YAAY,kBACL,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAE3C,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,iBAAiB,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,CAAC;AAEpD,6CAAgB","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ReactNode, ForwardedRef } 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 { CommonProps, LabellableProps, NavigationProps, StringLikeChildren, WithRequired } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\n// TODO: maybe add a `currentHref` prop that would be used to decide which NavTabItem is marked as current\nexport interface UNSTABLE_NavTabsProps extends CommonProps, Omit<LabellableProps, 'label'> {\n children: ReactNode;\n /**\n * Whether to display the navigation tabs horizontally or vertically.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n}\n\nfunction UNSTABLE_NavTabs(\n { children, orientation = 'horizontal', UNSAFE_className, UNSAFE_style, ...props }: UNSTABLE_NavTabsProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={clsx('cim-nav-tabs', UNSAFE_className)}\n style={UNSAFE_style}\n data-orientation={orientation}\n >\n {children}\n </div>\n );\n}\n\nexport interface UNSTABLE_NavTabItemProps\n extends Omit<CommonProps, 'id'>,\n WithRequired<NavigationProps, 'href'>,\n Pick<RACLinkProps, 'children' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n children: StringLikeChildren;\n isCurrent?: boolean;\n}\n\n/** Renders a single navigation tab within `NavTabs`. */\nexport function UNSTABLE_NavTabItem({\n children,\n isCurrent = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n}: UNSTABLE_NavTabItemProps) {\n return (\n <RACLink\n {...props}\n className={clsx('cim-nav-tab-item', textStyle({ variant: 'body' }), UNSAFE_className)}\n style={UNSAFE_style}\n aria-current={isCurrent ? 'page' : undefined}\n >\n {children}\n </RACLink>\n );\n}\n\n/**\n * Displays a list of navigation tabs to help users navigate through a website.\n */\nconst _UNSTABLE_NavTabs = withStyleProps(forwardRef(UNSTABLE_NavTabs), 'NavTabs');\n\nexport { _UNSTABLE_NavTabs as UNSTABLE_NavTabs };\n"]}
@@ -0,0 +1,10 @@
1
+ import { type NumberFieldProps as RACNumberFieldProps } from 'react-aria-components';
2
+ import type { CommonProps, FieldWithPlaceholderProps } from '../types.js';
3
+ export interface UNSTABLE_NumberFieldProps extends CommonProps, FieldWithPlaceholderProps<number>, Pick<RACNumberFieldProps, 'value' | 'defaultValue' | 'onChange' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'name' | 'autoFocus' | 'minValue' | 'maxValue' | 'step' | 'formatOptions' | 'onFocus' | 'onBlur'> {
4
+ }
5
+ /**
6
+ * Allows users to enter a number with a keyboard or increment/decrement buttons.
7
+ */
8
+ declare const _NumberField: (props: UNSTABLE_NumberFieldProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
9
+ export { _NumberField as UNSTABLE_NumberField };
10
+ //# sourceMappingURL=number-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-field.d.ts","sourceRoot":"","sources":["../../../../src/components/number-field/number-field.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,gBAAgB,IAAI,mBAAmB,EAE7C,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAG1E,MAAM,WAAW,yBACf,SAAQ,WAAW,EACjB,yBAAyB,CAAC,MAAM,CAAC,EACjC,IAAI,CACF,mBAAmB,EACjB,OAAO,GACP,cAAc,GACd,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,MAAM,GACN,WAAW,GACX,UAAU,GACV,UAAU,GACV,MAAM,GACN,eAAe,GACf,SAAS,GACT,QAAQ,CACX;CAAG;AA8CR;;GAEG;AACH,QAAA,MAAM,YAAY,2KAAkE,CAAC;AAErF,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.UNSTABLE_NumberField = void 0;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const clsx_1 = __importDefault(require("clsx"));
10
+ const react_1 = require("react");
11
+ const react_aria_components_1 = require("react-aria-components");
12
+ const forward_ref_js_1 = require("../../forward-ref.js");
13
+ const index_js_1 = require("../../icons/index.js");
14
+ const with_style_props_js_1 = require("../../with-style-props.js");
15
+ const icon_button_js_1 = require("../button/icon-button.js");
16
+ const form_field_js_1 = require("../internal/form-field/form-field.js");
17
+ const utils_js_1 = require("../typography/utils.js");
18
+ function UNSTABLE_NumberField({ label, description, error: errorMessage, placeholder, UNSAFE_className, UNSAFE_style, ...props }, ref) {
19
+ const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
20
+ (0, react_1.useEffect)(() => {
21
+ if (!label && !ariaLabel && !ariaLabelledBy) {
22
+ console.warn('NumberField requires one of label / aria-label / aria-labelledby for accessibility');
23
+ }
24
+ }, [label, ariaLabel, ariaLabelledBy]);
25
+ return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.NumberField, { ...props, ref: ref, className: (0, clsx_1.default)('cim-number-field', UNSAFE_className), style: UNSAFE_style, children: [(0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Group, { className: "cim-number-field-input-group", children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.Input, { className: (0, clsx_1.default)('cim-number-field-input', (0, utils_js_1.textStyle)({ variant: 'medium' })), placeholder: placeholder }), (0, jsx_runtime_1.jsxs)("div", { className: "cim-number-field-spinner", children: [(0, jsx_runtime_1.jsx)(icon_button_js_1.IconButton, { slot: "decrement", icon: (0, jsx_runtime_1.jsx)(index_js_1.IconMinus, {}), "aria-label": "Decrement", variant: "tertiary" }), (0, jsx_runtime_1.jsx)("div", { className: "cim-number-field-spinner-separator" }), (0, jsx_runtime_1.jsx)(icon_button_js_1.IconButton, { slot: "increment", icon: (0, jsx_runtime_1.jsx)(index_js_1.IconAdd, {}), "aria-label": "Increment", variant: "tertiary" })] })] }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldError, { children: errorMessage }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldDescription, { children: description })] }));
26
+ }
27
+ /**
28
+ * Allows users to enter a number with a keyboard or increment/decrement buttons.
29
+ */
30
+ const _NumberField = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(UNSTABLE_NumberField), 'NumberField');
31
+ exports.UNSTABLE_NumberField = _NumberField;
32
+ //# sourceMappingURL=number-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-field.js","sourceRoot":"","sources":["../../../../src/components/number-field/number-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAK+B;AAC/B,yDAAkD;AAClD,mDAA0D;AAC1D,mEAA2D;AAC3D,6DAAsD;AACtD,wEAA4G;AAE5G,qDAAmD;AAwBnD,SAAS,oBAAoB,CAC3B,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACkB,EAC5B,GAAiC;IAEjC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;QACrG,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAEvC,OAAO,CACL,wBAAC,mCAAc,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,kBAAkB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aAC7G,uBAAC,8BAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,YACvE,KAAK,GACS,EACjB,wBAAC,6BAAQ,IAAC,SAAS,EAAC,8BAA8B,aAChD,uBAAC,6BAAQ,IACP,SAAS,EAAE,IAAA,cAAI,EAAC,wBAAwB,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,EAC3E,WAAW,EAAE,WAAW,GACxB,EACF,iCAAK,SAAS,EAAC,0BAA0B,aAEvC,uBAAC,2BAAU,IAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAE,uBAAC,oBAAS,KAAG,gBAAa,WAAW,EAAC,OAAO,EAAC,UAAU,GAAG,EAC9F,gCAAK,SAAS,EAAC,oCAAoC,GAAG,EAEtD,uBAAC,2BAAU,IAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAE,uBAAC,kBAAO,KAAG,gBAAa,WAAW,EAAC,OAAO,EAAC,UAAU,GAAG,IACxF,IACG,EACX,uBAAC,8BAAc,cAAE,YAAY,GAAkB,EAC/C,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,IAC3C,CAClB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,YAAY,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,oBAAoB,CAAC,EAAE,aAAa,CAAC,CAAC;AAE5D,4CAAoB","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport {\n Input as RACInput,\n NumberField as RACNumberField,\n type NumberFieldProps as RACNumberFieldProps,\n Group as RACGroup,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconAdd, IconMinus } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { IconButton } from '../button/icon-button.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 UNSTABLE_NumberFieldProps\n extends CommonProps,\n FieldWithPlaceholderProps<number>,\n Pick<\n RACNumberFieldProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'name'\n | 'autoFocus'\n | 'minValue'\n | 'maxValue'\n | 'step'\n | 'formatOptions'\n | 'onFocus'\n | 'onBlur'\n > {}\n\nfunction UNSTABLE_NumberField(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: UNSTABLE_NumberFieldProps,\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('NumberField requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACNumberField {...props} ref={ref} className={clsx('cim-number-field', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-number-field-input-group\">\n <RACInput\n className={clsx('cim-number-field-input', textStyle({ variant: 'medium' }))}\n placeholder={placeholder}\n />\n <div className=\"cim-number-field-spinner\">\n {/* TODO: i18n */}\n <IconButton slot=\"decrement\" icon={<IconMinus />} aria-label=\"Decrement\" variant=\"tertiary\" />\n <div className=\"cim-number-field-spinner-separator\" />\n {/* TODO: i18n */}\n <IconButton slot=\"increment\" icon={<IconAdd />} aria-label=\"Increment\" variant=\"tertiary\" />\n </div>\n </RACGroup>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACNumberField>\n );\n}\n\n/**\n * Allows users to enter a number with a keyboard or increment/decrement buttons.\n */\nconst _NumberField = withStyleProps(forwardRef(UNSTABLE_NumberField), 'NumberField');\n\nexport { _NumberField as UNSTABLE_NumberField };\n"]}
@@ -0,0 +1,14 @@
1
+ export interface PaginationProps {
2
+ /** The current page number. */
3
+ value: number;
4
+ /** The total number of pages. */
5
+ count: number;
6
+ /** The accessibility label for the pagination navigation, must be unique to the page. */
7
+ 'aria-label': string;
8
+ /** A callback function that is called when the page number changes. */
9
+ onPageChange?: (page: number) => void;
10
+ /** A function that returns a URL for a given page number. */
11
+ href?: (page: number) => string;
12
+ }
13
+ export declare function UNSTABLE_Pagination({ value, count, onPageChange, href, 'aria-label': ariaLabel }: PaginationProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/pagination/pagination.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,YAAY,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACjC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,eAAe,2CA+DjH"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNSTABLE_Pagination = UNSTABLE_Pagination;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const index_js_1 = require("../../icons/index.js");
6
+ const button_js_1 = require("../button/button.js");
7
+ const icon_button_js_1 = require("../button/icon-button.js");
8
+ const icon_link_button_js_1 = require("../button/icon-link-button.js");
9
+ const link_button_js_1 = require("../button/link-button.js");
10
+ function UNSTABLE_Pagination({ value, count, onPageChange, href, 'aria-label': ariaLabel }) {
11
+ const visiblePages = getVisiblePages(value, count);
12
+ const previousButtonProps = {
13
+ // TODO: icon doesn't look optically centered, see: https://www.figma.com/design/JVWmaCjDeOlrYAkLlJD5gr?node-id=10376-1487#1082340181
14
+ icon: (0, jsx_runtime_1.jsx)(index_js_1.UNSTABLE_IconChevronLeftFill, {}),
15
+ isDisabled: value === 1,
16
+ // TODO: internationalization
17
+ 'aria-label': 'Previous',
18
+ };
19
+ const nextButtonProps = {
20
+ // TODO: icon doesn't look optically centered, see: https://www.figma.com/design/JVWmaCjDeOlrYAkLlJD5gr?node-id=10376-1487#1082340181
21
+ icon: (0, jsx_runtime_1.jsx)(index_js_1.UNSTABLE_IconChevronRightFill, {}),
22
+ isDisabled: value === count,
23
+ // TODO: internationalization
24
+ 'aria-label': 'Next',
25
+ };
26
+ return ((0, jsx_runtime_1.jsx)("nav", { className: "cim-pagination", "aria-label": ariaLabel, children: (0, jsx_runtime_1.jsxs)("ul", { className: "cim-pagination-list", children: [(0, jsx_runtime_1.jsx)("li", { children: href ? ((0, jsx_runtime_1.jsx)(icon_link_button_js_1.IconLinkButton, { ...previousButtonProps, href: href?.(value - 1) })) : ((0, jsx_runtime_1.jsx)(icon_button_js_1.IconButton, { ...previousButtonProps, onPress: () => onPageChange?.(value - 1) })) }), visiblePages.map((page) => {
27
+ const isCurrentPage = typeof page === 'number' && page === value;
28
+ const pageNumber = typeof page === 'number' ? page : page.page;
29
+ const pageButtonProps = {
30
+ // TODO: internationalization
31
+ // TODO: review if "Current page" is needed once we put `aria-current` on the `button`/`link`
32
+ 'aria-label': isCurrentPage ? `Current page, page ${pageNumber}` : `Go to page ${pageNumber}`,
33
+ children: typeof page === 'number' ? page : '…',
34
+ };
35
+ return (
36
+ // TODO: Put `aria-current` on the `button`/`link` instead of the `li` for better accessibility/screen reader support
37
+ // RAC Button doesn't support `aria-current` as of now
38
+ (0, jsx_runtime_1.jsx)("li", { "aria-current": isCurrentPage && href != null ? 'page' : isCurrentPage, children: href ? ((0, jsx_runtime_1.jsx)(link_button_js_1.LinkButton, { href: href?.(pageNumber), ...pageButtonProps })) : ((0, jsx_runtime_1.jsx)(button_js_1.Button, { onPress: () => onPageChange?.(pageNumber), ...pageButtonProps })) }, pageNumber));
39
+ }), (0, jsx_runtime_1.jsx)("li", { children: href ? ((0, jsx_runtime_1.jsx)(icon_link_button_js_1.IconLinkButton, { ...nextButtonProps, href: href?.(value + 1) })) : ((0, jsx_runtime_1.jsx)(icon_button_js_1.IconButton, { ...nextButtonProps, onPress: () => onPageChange?.(value + 1) })) })] }) }));
40
+ }
41
+ function getVisiblePages(currentPage, totalPages) {
42
+ if (totalPages <= 7) {
43
+ return Array.from({ length: totalPages }, (_, index) => index + 1);
44
+ }
45
+ if (currentPage <= 4) {
46
+ return [1, 2, 3, 4, { type: 'ellipsis', page: 5 }, totalPages - 1, totalPages];
47
+ }
48
+ if (currentPage >= totalPages - 3) {
49
+ return [
50
+ 1,
51
+ 2,
52
+ { type: 'ellipsis', page: totalPages - 4 },
53
+ totalPages - 3,
54
+ totalPages - 2,
55
+ totalPages - 1,
56
+ totalPages,
57
+ ];
58
+ }
59
+ return [
60
+ 1,
61
+ { type: 'ellipsis', page: currentPage - 2 },
62
+ currentPage - 1,
63
+ currentPage,
64
+ currentPage + 1,
65
+ { type: 'ellipsis', page: currentPage + 2 },
66
+ totalPages,
67
+ ];
68
+ }
69
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../../src/components/pagination/pagination.tsx"],"names":[],"mappings":";;AAmBA,kDA+DC;;AAlFD,mDAAmG;AACnG,mDAA6C;AAC7C,6DAAsD;AACtD,uEAA+D;AAC/D,6DAAsD;AAetD,SAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAmB;IAChH,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,EAAE,KAAK,CAA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;IAED,IAAI,WAAW,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QAClC,OAAO;YACL,CAAC;YACD,CAAC;YACD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,CAAC,EAAE;YAC1C,UAAU,GAAG,CAAC;YACd,UAAU,GAAG,CAAC;YACd,UAAU,GAAG,CAAC;YACd,UAAU;SACX,CAAC;IACJ,CAAC;IAED,OAAO;QACL,CAAC;QACD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,GAAG,CAAC,EAAE;QAC3C,WAAW,GAAG,CAAC;QACf,WAAW;QACX,WAAW,GAAG,CAAC;QACf,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,GAAG,CAAC,EAAE;QAC3C,UAAU;KACX,CAAC;AACJ,CAAC","sourcesContent":["import { UNSTABLE_IconChevronLeftFill, UNSTABLE_IconChevronRightFill } from '../../icons/index.js';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { IconLinkButton } from '../button/icon-link-button.js';\nimport { LinkButton } from '../button/link-button.js';\n\nexport interface PaginationProps {\n /** The current page number. */\n value: number;\n /** The total number of pages. */\n count: number;\n /** The accessibility label for the pagination navigation, must be unique to the page. */\n 'aria-label': string;\n /** A callback function that is called when the page number changes. */\n onPageChange?: (page: number) => void;\n /** A function that returns a URL for a given page number. */\n href?: (page: number) => string;\n}\n\nexport function UNSTABLE_Pagination({ value, count, onPageChange, href, 'aria-label': ariaLabel }: PaginationProps) {\n const visiblePages = getVisiblePages(value, count);\n\n const previousButtonProps = {\n // TODO: icon doesn't look optically centered, see: https://www.figma.com/design/JVWmaCjDeOlrYAkLlJD5gr?node-id=10376-1487#1082340181\n icon: <UNSTABLE_IconChevronLeftFill />,\n isDisabled: value === 1,\n // TODO: internationalization\n 'aria-label': 'Previous',\n };\n\n const nextButtonProps = {\n // TODO: icon doesn't look optically centered, see: https://www.figma.com/design/JVWmaCjDeOlrYAkLlJD5gr?node-id=10376-1487#1082340181\n icon: <UNSTABLE_IconChevronRightFill />,\n isDisabled: value === count,\n // TODO: internationalization\n 'aria-label': 'Next',\n };\n\n return (\n <nav className=\"cim-pagination\" aria-label={ariaLabel}>\n <ul className=\"cim-pagination-list\">\n <li>\n {href ? (\n <IconLinkButton {...previousButtonProps} href={href?.(value - 1)} />\n ) : (\n <IconButton {...previousButtonProps} onPress={() => onPageChange?.(value - 1)} />\n )}\n </li>\n\n {visiblePages.map((page) => {\n const isCurrentPage = typeof page === 'number' && page === value;\n const pageNumber = typeof page === 'number' ? page : page.page;\n const pageButtonProps = {\n // TODO: internationalization\n // TODO: review if \"Current page\" is needed once we put `aria-current` on the `button`/`link`\n 'aria-label': isCurrentPage ? `Current page, page ${pageNumber}` : `Go to page ${pageNumber}`,\n children: typeof page === 'number' ? page : '…',\n };\n\n return (\n // TODO: Put `aria-current` on the `button`/`link` instead of the `li` for better accessibility/screen reader support\n // RAC Button doesn't support `aria-current` as of now\n <li key={pageNumber} aria-current={isCurrentPage && href != null ? 'page' : isCurrentPage}>\n {href ? (\n <LinkButton href={href?.(pageNumber)} {...pageButtonProps} />\n ) : (\n <Button onPress={() => onPageChange?.(pageNumber)} {...pageButtonProps} />\n )}\n </li>\n );\n })}\n\n <li>\n {href ? (\n <IconLinkButton {...nextButtonProps} href={href?.(value + 1)} />\n ) : (\n <IconButton {...nextButtonProps} onPress={() => onPageChange?.(value + 1)} />\n )}\n </li>\n </ul>\n </nav>\n );\n}\n\nfunction getVisiblePages(currentPage: number, totalPages: number): (number | { type: 'ellipsis'; page: number })[] {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, index) => index + 1);\n }\n\n if (currentPage <= 4) {\n return [1, 2, 3, 4, { type: 'ellipsis', page: 5 }, totalPages - 1, totalPages];\n }\n\n if (currentPage >= totalPages - 3) {\n return [\n 1,\n 2,\n { type: 'ellipsis', page: totalPages - 4 },\n totalPages - 3,\n totalPages - 2,\n totalPages - 1,\n totalPages,\n ];\n }\n\n return [\n 1,\n { type: 'ellipsis', page: currentPage - 2 },\n currentPage - 1,\n currentPage,\n currentPage + 1,\n { type: 'ellipsis', page: currentPage + 2 },\n totalPages,\n ];\n}\n"]}
@@ -14,7 +14,7 @@ export interface RadioGroupProps extends CommonProps, WithRequired<FieldProps<st
14
14
  /**
15
15
  * Allows users to select a single item from a visible list.
16
16
  *
17
- * See [radio usage guidelines](https://ui.cimpress.io/components/radio/usage-guidelines/).
17
+ * See [radio group usage guidelines](https://ui.cimpress.io/components/radio-group/).
18
18
  */
19
19
  declare const _RadioGroup: (props: RadioGroupProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
20
20
  export { _RadioGroup as RadioGroup };
@@ -18,7 +18,7 @@ function RadioGroup({ label, description, error: errorMessage, direction = 'vert
18
18
  /**
19
19
  * Allows users to select a single item from a visible list.
20
20
  *
21
- * See [radio usage guidelines](https://ui.cimpress.io/components/radio/usage-guidelines/).
21
+ * See [radio group usage guidelines](https://ui.cimpress.io/components/radio-group/).
22
22
  */
23
23
  const _RadioGroup = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(RadioGroup), 'RadioGroup');
24
24
  exports.RadioGroup = _RadioGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../src/components/radio/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAExB,iEAAgH;AAChH,yDAAkD;AAClD,mEAA2D;AAC3D,wEAA4G;AAC5G,wDAAkD;AAoBlD,SAAS,UAAU,CACjB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,SAAS,GAAG,UAAU,EACtB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACQ,EAClB,GAAiC;IAEjC,OAAO,CACL,wBAAC,kCAAa,OAAK,KAAK,EAAE,GAAG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ForwardedRef, ReactNode } from 'react';\nimport { RadioGroup as RACRadioGroup, type RadioGroupProps as RACRadioGroupProps } 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 { Stack } from '../spacing/stack/stack.js';\nimport type { Breakpoint, Responsive, Spacing } from '../spacing/types.js';\nimport type { Direction, CommonProps, FieldProps, WithRequired } from '../types.js';\n\nexport interface RadioGroupProps\n extends CommonProps,\n WithRequired<FieldProps<string | null>, 'label'>,\n Pick<\n RACRadioGroupProps,\n 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'\n > {\n /** Radio buttons belonging to the group. */\n children: ReactNode;\n /**\n * Determines the direction in which radio buttons will be stacked.\n * @default 'vertical'\n */\n direction?: Responsive<Direction>;\n}\n\nfunction RadioGroup(\n {\n label,\n description,\n error: errorMessage,\n direction = 'vertical',\n children,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: RadioGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACRadioGroup {...props} ref={ref} className={clsx('cim-radio-group', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired}>{label}</FormFieldLabel>\n <Stack gap={getGapFromDirection(direction)} direction={direction}>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACRadioGroup>\n );\n}\n\n/**\n * Allows users to select a single item from a visible list.\n *\n * See [radio usage guidelines](https://ui.cimpress.io/components/radio/usage-guidelines/).\n */\nconst _RadioGroup = withStyleProps(forwardRef(RadioGroup), 'RadioGroup');\n\nexport { _RadioGroup as RadioGroup };\n\n// Make sure that radio buttons are spaced by 16px when stacked horizontally, and 8px otherwise.\nfunction getGapFromDirection(direction: Responsive<Direction>): Responsive<Spacing> {\n if (typeof direction === 'object') {\n const gap: Responsive<Spacing> = { xs: direction.xs === 'horizontal' ? 16 : 8 };\n\n (Object.entries(direction) as [Breakpoint, Direction][]).reduce((acc, curr) => {\n gap[curr[0]] = curr[1] === 'horizontal' ? 16 : 8;\n return acc;\n }, gap);\n\n return gap;\n }\n\n return direction === 'horizontal' ? 16 : 8;\n}\n"]}
1
+ {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../src/components/radio/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAExB,iEAAgH;AAChH,yDAAkD;AAClD,mEAA2D;AAC3D,wEAA4G;AAC5G,wDAAkD;AAoBlD,SAAS,UAAU,CACjB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,SAAS,GAAG,UAAU,EACtB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACQ,EAClB,GAAiC;IAEjC,OAAO,CACL,wBAAC,kCAAa,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aAC3G,uBAAC,8BAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,YAAG,KAAK,GAAkB,EACtE,uBAAC,gBAAK,IAAC,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,SAAS,YAC7D,QAAQ,GACH,EACR,uBAAC,8BAAc,cAAE,YAAY,GAAkB,EAC/C,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,IAC5C,CACjB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AAEjD,iCAAU;AAElC,gGAAgG;AAChG,SAAS,mBAAmB,CAAC,SAAgC;IAC3D,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,GAAG,GAAwB,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAE/E,MAAM,CAAC,OAAO,CAAC,SAAS,CAA+B,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5E,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,OAAO,GAAG,CAAC;IACb,CAAC;IAED,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport { RadioGroup as RACRadioGroup, type RadioGroupProps as RACRadioGroupProps } 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 { Stack } from '../spacing/stack/stack.js';\nimport type { Breakpoint, Responsive, Spacing } from '../spacing/types.js';\nimport type { Direction, CommonProps, FieldProps, WithRequired } from '../types.js';\n\nexport interface RadioGroupProps\n extends CommonProps,\n WithRequired<FieldProps<string | null>, 'label'>,\n Pick<\n RACRadioGroupProps,\n 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'\n > {\n /** Radio buttons belonging to the group. */\n children: ReactNode;\n /**\n * Determines the direction in which radio buttons will be stacked.\n * @default 'vertical'\n */\n direction?: Responsive<Direction>;\n}\n\nfunction RadioGroup(\n {\n label,\n description,\n error: errorMessage,\n direction = 'vertical',\n children,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: RadioGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACRadioGroup {...props} ref={ref} className={clsx('cim-radio-group', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired}>{label}</FormFieldLabel>\n <Stack gap={getGapFromDirection(direction)} direction={direction}>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACRadioGroup>\n );\n}\n\n/**\n * Allows users to select a single item from a visible list.\n *\n * See [radio group usage guidelines](https://ui.cimpress.io/components/radio-group/).\n */\nconst _RadioGroup = withStyleProps(forwardRef(RadioGroup), 'RadioGroup');\n\nexport { _RadioGroup as RadioGroup };\n\n// Make sure that radio buttons are spaced by 16px when stacked horizontally, and 8px otherwise.\nfunction getGapFromDirection(direction: Responsive<Direction>): Responsive<Spacing> {\n if (typeof direction === 'object') {\n const gap: Responsive<Spacing> = { xs: direction.xs === 'horizontal' ? 16 : 8 };\n\n (Object.entries(direction) as [Breakpoint, Direction][]).reduce((acc, curr) => {\n gap[curr[0]] = curr[1] === 'horizontal' ? 16 : 8;\n return acc;\n }, gap);\n\n return gap;\n }\n\n return direction === 'horizontal' ? 16 : 8;\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  import { type RadioProps as RACRadioProps } from 'react-aria-components';
2
2
  import type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';
3
- export interface RadioProps extends CommonProps, Omit<LabellableProps, 'label'>, Pick<RACRadioProps, 'value' | 'isDisabled'> {
3
+ export interface RadioProps extends CommonProps, Omit<LabellableProps, 'label'>, Pick<RACRadioProps, 'value' | 'isDisabled' | 'autoFocus'> {
4
4
  /** The label rendered next to the radio. */
5
5
  children?: StringLikeChildren;
6
6
  }
7
7
  /**
8
8
  * Renders a single option within `RadioGroup`.
9
9
  *
10
- * See [radio usage guidelines](https://ui.cimpress.io/components/radio/usage-guidelines/).
10
+ * See [radio group usage guidelines](https://ui.cimpress.io/components/radio-group/).
11
11
  */
12
12
  declare const _Radio: (props: RadioProps & import("react").RefAttributes<HTMLLabelElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
13
13
  export { _Radio as Radio };
@@ -1 +1 @@
1
- {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,UAAU,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG5F,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGpF,MAAM,WAAW,UACf,SAAQ,WAAW,EACjB,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EAC9B,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,YAAY,CAAC;IAC7C,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AA8BD;;;;GAIG;AACH,QAAA,MAAM,MAAM,8JAA6C,CAAC;AAE1D,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,UAAU,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG5F,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGpF,MAAM,WAAW,UACf,SAAQ,WAAW,EACjB,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EAC9B,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,YAAY,GAAG,WAAW,CAAC;IAC3D,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AA8BD;;;;GAIG;AACH,QAAA,MAAM,MAAM,8JAA6C,CAAC;AAE1D,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CAAC"}
@@ -24,7 +24,7 @@ function Radio({ children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
24
24
  /**
25
25
  * Renders a single option within `RadioGroup`.
26
26
  *
27
- * See [radio usage guidelines](https://ui.cimpress.io/components/radio/usage-guidelines/).
27
+ * See [radio group usage guidelines](https://ui.cimpress.io/components/radio-group/).
28
28
  */
29
29
  const _Radio = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Radio), 'Radio');
30
30
  exports.Radio = _Radio;
@@ -1 +1 @@
1
- {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAA4F;AAC5F,yDAAkD;AAClD,mEAA2D;AAE3D,mDAA6C;AAU7C,SAAS,KAAK,CACZ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAc,EAClE,GAAmC;IAEnC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QAClG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,wBAAC,6BAAQ,OAAK,KAAK,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,WAAW,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,aAChG,gCAAK,SAAS,EAAC,0BAA0B,YACvC,gCAAK,SAAS,EAAC,kBAAkB,YAC/B,gCAAK,SAAS,EAAC,wBAAwB,GAAG,GACtC,GACF,EACL,QAAQ,IAAI,CACX,uBAAC,cAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,YAC3B,QAAQ,GACJ,CACR,IACQ,CACZ,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,MAAM,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAEvC,uBAAK","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Radio as RACRadio, type RadioProps as RACRadioProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface RadioProps\n extends CommonProps,\n Omit<LabellableProps, 'label'>,\n Pick<RACRadioProps, 'value' | 'isDisabled'> {\n /** The label rendered next to the radio. */\n children?: StringLikeChildren;\n}\n\nfunction Radio(\n { children, UNSAFE_className, UNSAFE_style, ...props }: RadioProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Radio requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACRadio {...props} className={clsx('cim-radio', UNSAFE_className)} style={UNSAFE_style} ref={ref}>\n <div className=\"cim-radio-toggle-wrapper\">\n <div className=\"cim-radio-toggle\">\n <div className=\"cim-radio-toggle-inner\" />\n </div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"body\">\n {children}\n </Text>\n )}\n </RACRadio>\n );\n}\n\n/**\n * Renders a single option within `RadioGroup`.\n *\n * See [radio usage guidelines](https://ui.cimpress.io/components/radio/usage-guidelines/).\n */\nconst _Radio = withStyleProps(forwardRef(Radio), 'Radio');\n\nexport { _Radio as Radio };\n"]}
1
+ {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAA4F;AAC5F,yDAAkD;AAClD,mEAA2D;AAE3D,mDAA6C;AAU7C,SAAS,KAAK,CACZ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAc,EAClE,GAAmC;IAEnC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QAClG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,wBAAC,6BAAQ,OAAK,KAAK,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,WAAW,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,aAChG,gCAAK,SAAS,EAAC,0BAA0B,YACvC,gCAAK,SAAS,EAAC,kBAAkB,YAC/B,gCAAK,SAAS,EAAC,wBAAwB,GAAG,GACtC,GACF,EACL,QAAQ,IAAI,CACX,uBAAC,cAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,YAC3B,QAAQ,GACJ,CACR,IACQ,CACZ,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,MAAM,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAEvC,uBAAK","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Radio as RACRadio, type RadioProps as RACRadioProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface RadioProps\n extends CommonProps,\n Omit<LabellableProps, 'label'>,\n Pick<RACRadioProps, 'value' | 'isDisabled' | 'autoFocus'> {\n /** The label rendered next to the radio. */\n children?: StringLikeChildren;\n}\n\nfunction Radio(\n { children, UNSAFE_className, UNSAFE_style, ...props }: RadioProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Radio requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACRadio {...props} className={clsx('cim-radio', UNSAFE_className)} style={UNSAFE_style} ref={ref}>\n <div className=\"cim-radio-toggle-wrapper\">\n <div className=\"cim-radio-toggle\">\n <div className=\"cim-radio-toggle-inner\" />\n </div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"body\">\n {children}\n </Text>\n )}\n </RACRadio>\n );\n}\n\n/**\n * Renders a single option within `RadioGroup`.\n *\n * See [radio group usage guidelines](https://ui.cimpress.io/components/radio-group/).\n */\nconst _Radio = withStyleProps(forwardRef(Radio), 'Radio');\n\nexport { _Radio as Radio };\n"]}
@@ -1,15 +1,15 @@
1
- import { type ListBoxItemProps as RACListBoxItemProps, type SelectProps as RACSelectProps } from 'react-aria-components';
1
+ import { type ListBoxProps as RACListBoxProps, type ListBoxItemProps as RACListBoxItemProps, type SelectProps as RACSelectProps } from 'react-aria-components';
2
2
  import type { CollectionItem, CollectionProps, CommonProps, FieldProps, Key, StringLikeChildren } from '../types.js';
3
- export interface SelectProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldProps<Key>, CollectionProps<T>, Pick<RACSelectProps<T>, 'name' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'selectedKey' | 'defaultSelectedKey' | 'autoComplete' | 'autoFocus' | 'onSelectionChange' | 'placeholder'> {
3
+ export interface SelectProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldProps<Key>, CollectionProps<T>, Pick<RACSelectProps<T>, 'name' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'selectedKey' | 'defaultSelectedKey' | 'autoComplete' | 'autoFocus' | 'onSelectionChange' | 'placeholder' | 'onFocus' | 'onBlur' | 'onOpenChange'>, Pick<RACListBoxProps<T>, 'onScroll'> {
4
4
  }
5
5
  /**
6
6
  * Allows users to select one item from a collapsible list.
7
7
  *
8
- * See [select usage guidelines](https://ui.cimpress.io/components/select/usage-guidelines/).
8
+ * See [select usage guidelines](https://ui.cimpress.io/components/select/).
9
9
  */
10
10
  declare const _Select: <T extends CollectionItem>(props: SelectProps<T> & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
11
11
  export { _Select as Select };
12
- export interface SelectItemProps extends Pick<RACListBoxItemProps, 'id' | 'isDisabled'> {
12
+ export interface SelectItemProps extends Pick<RACListBoxItemProps, 'id' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
13
13
  children: StringLikeChildren;
14
14
  }
15
15
  /** Renders a single list item within `Select`. */
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/components/select/select.tsx"],"names":[],"mappings":"AAIA,OAAO,EAUL,KAAK,gBAAgB,IAAI,mBAAmB,EAC5C,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,E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AE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAelH;yBAfe,aAAa"}
@@ -17,7 +17,7 @@ const with_style_props_js_1 = require("../../with-style-props.js");
17
17
  const collapsible_list_js_1 = require("../internal/collapsible-list/collapsible-list.js");
18
18
  const form_field_js_1 = require("../internal/form-field/form-field.js");
19
19
  const utils_js_1 = require("../typography/utils.js");
20
- function Select({ children, items, label, description, error, UNSAFE_className, UNSAFE_style, ...props }, ref) {
20
+ function Select({ children, items, label, description, error, UNSAFE_className, UNSAFE_style, onScroll, ...props }, ref) {
21
21
  const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
22
22
  (0, react_1.useEffect)(() => {
23
23
  if (!label && !ariaLabel && !ariaLabelledBy) {
@@ -27,12 +27,12 @@ function Select({ children, items, label, description, error, UNSAFE_className,
27
27
  if (items != null && typeof children !== 'function') {
28
28
  console.warn('`Select` requires `children` to be a function when using `items` prop');
29
29
  }
30
- return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.Select, { ...props, ref: ref, className: (0, clsx_1.default)('cim-select', UNSAFE_className), style: UNSAFE_style, children: [(0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Button, { className: "cim-select-button", children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.SelectValue, { className: (values) => (0, clsx_1.default)(values.defaultClassName, (0, utils_js_1.textStyle)({ variant: 'medium', alignment: 'start' })), children: ({ selectedText }) => selectedText }), (0, jsx_runtime_1.jsx)(index_js_1.IconChevronDownFill, {})] }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldError, { children: error }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldDescription, { children: description }), (0, jsx_runtime_1.jsx)(collapsible_list_js_1.CollapsibleList, { offset: 5, maxHeight: 315, children: (0, jsx_runtime_1.jsx)(react_aria_components_1.ListBox, { className: "cim-select-listbox", items: items, children: children }) })] }));
30
+ return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.Select, { ...props, ref: ref, className: (0, clsx_1.default)('cim-select', UNSAFE_className), style: UNSAFE_style, children: [(0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Button, { className: "cim-select-button", children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.SelectValue, { className: (values) => (0, clsx_1.default)(values.defaultClassName, (0, utils_js_1.textStyle)({ variant: 'medium', alignment: 'start' })), children: ({ selectedText }) => selectedText }), (0, jsx_runtime_1.jsx)(index_js_1.IconChevronDownFill, {})] }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldError, { children: error }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldDescription, { children: description }), (0, jsx_runtime_1.jsx)(collapsible_list_js_1.CollapsibleList, { offset: 5, maxHeight: 315, children: (0, jsx_runtime_1.jsx)(react_aria_components_1.ListBox, { className: "cim-select-listbox", onScroll: onScroll, items: items, children: children }) })] }));
31
31
  }
32
32
  /**
33
33
  * Allows users to select one item from a collapsible list.
34
34
  *
35
- * See [select usage guidelines](https://ui.cimpress.io/components/select/usage-guidelines/).
35
+ * See [select usage guidelines](https://ui.cimpress.io/components/select/).
36
36
  */
37
37
  const _Select = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Select), 'Select');
38
38
  exports.Select = _Select;
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AAoGb,gCAiBC;AAYD,sCAeC;;AA9ID,gDAAwB;AACxB,iCAAqD;AACrD,iEAY+B;AAC/B,yDAAkD;AAClD,mDAA0E;AAC1E,mEAA2D;AAC3D,0FAAm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AE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAyB;IACjH,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;IAC/F,CAAC;IAED,OAAO,CACL,wBAAC,sCAAiB,OAAK,KAAK,EAAE,SAAS,EAAC,oBAAoB,aAC1D,uBAAC,8BAAS,IACR,SAAS,EAAE,IAAA,cAAI,EAAC,2BAA2B,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,YAErG,KAAK,GACI,EACZ,uBAAC,kCAAa,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAiB,IACrC,CACrB,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport {\n Button as RACButton,\n Collection as RACCollection,\n Header as RACHeader,\n ListBox as RACListBox,\n ListBoxItem as RACListBoxItem,\n ListBoxSection as RACListBoxSection,\n Select as RACSelect,\n SelectValue as RACSelectValue,\n Text as RACText,\n type ListBoxItemProps as RACListBoxItemProps,\n type SelectProps as RACSelectProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmark, IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { CollectionItem, CollectionProps, CommonProps, FieldProps, Key, StringLikeChildren } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface SelectProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n FieldProps<Key>,\n CollectionProps<T>,\n Pick<\n RACSelectProps<T>,\n | 'name'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'autoComplete'\n | 'autoFocus'\n | 'onSelectionChange'\n | 'placeholder'\n > {}\n\nfunction Select<T extends CollectionItem>(\n { children, items, label, description, error, UNSAFE_className, UNSAFE_style, ...props }: SelectProps<T>,\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('Select requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`Select` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACSelect {...props} ref={ref} className={clsx('cim-select', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACButton className=\"cim-select-button\">\n <RACSelectValue\n className={(values) => clsx(values.defaultClassName, textStyle({ variant: 'medium', alignment: 'start' }))}\n >\n {({ selectedText }) => selectedText}\n </RACSelectValue>\n <IconChevronDownFill />\n </RACButton>\n <FormFieldError>{error}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n <CollapsibleList\n offset={5} // 1px border + 4px actual offset\n maxHeight={315}\n >\n <RACListBox className=\"cim-select-listbox\" items={items}>\n {children}\n </RACListBox>\n </CollapsibleList>\n </RACSelect>\n );\n}\n\n/**\n * Allows users to select one item from a collapsible list.\n *\n * See [select usage guidelines](https://ui.cimpress.io/components/select/usage-guidelines/).\n */\nconst _Select = withStyleProps(forwardRef(Select), 'Select');\n\nexport { _Select as Select };\n\nexport interface SelectItemProps extends Pick<RACListBoxItemProps, 'id' | 'isDisabled'> {\n children: StringLikeChildren;\n}\n\n/** Renders a single list item within `Select`. */\nexport function SelectItem({ children, ...props }: SelectItemProps) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACListBoxItem {...props} className=\"cim-select-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n <IconCheckmark />\n\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n </>\n )}\n </RACListBoxItem>\n );\n}\n\nSelectItem.displayName = 'SelectItem';\n\nexport interface SelectSectionProps<T extends CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `Select` into a section. */\nexport function SelectSection<T extends CollectionItem>({ title, children, items, ...props }: SelectSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`SelectSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACListBoxSection {...props} className=\"cim-select-section\">\n <RACHeader\n className={clsx('cim-select-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}\n >\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACListBoxSection>\n );\n}\n\nSelectSection.displayName = 'SelectSection';\n"]}
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AA0Gb,gCAiBC;AAYD,sCAeC;;AApJD,gDAAwB;AACxB,iCAAqD;AACrD,iEAa+B;AAC/B,yDAAkD;AAClD,mDAA0E;AAC1E,mEAA2D;AAC3D,0FAAmF;AACnF,wEAA4G;AAE5G,qDAAmD;AAwBnD,SAAS,MAAM,CACb,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB,EAClH,GAAiC;IAEjC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cA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C,sCAAiB,OAAK,KAAK,EAAE,SAAS,EAAC,oBAAoB,aAC1D,uBAAC,8BAAS,IACR,SAAS,EAAE,IAAA,cAAI,EAAC,2BAA2B,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,YAErG,KAAK,GACI,EACZ,uBAAC,kCAAa,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAiB,IACrC,CACrB,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport {\n Button as RACButton,\n Collection as RACCollection,\n Header as RACHeader,\n ListBox as RACListBox,\n type ListBoxProps as RACListBoxProps,\n ListBoxItem as RACListBoxItem,\n ListBoxSection as RACListBoxSection,\n Select as RACSelect,\n SelectValue as RACSelectValue,\n Text as RACText,\n type ListBoxItemProps as RACListBoxItemProps,\n type SelectProps as RACSelectProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmark, IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { CollectionItem, CollectionProps, CommonProps, FieldProps, Key, StringLikeChildren } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface SelectProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n FieldProps<Key>,\n CollectionProps<T>,\n Pick<\n RACSelectProps<T>,\n | 'name'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'autoComplete'\n | 'autoFocus'\n | 'onSelectionChange'\n | 'placeholder'\n | 'onFocus'\n | 'onBlur'\n | 'onOpenChange'\n >,\n Pick<RACListBoxProps<T>, 'onScroll'> {}\n\nfunction Select<T extends CollectionItem>(\n { children, items, label, description, error, UNSAFE_className, UNSAFE_style, onScroll, ...props }: SelectProps<T>,\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('Select requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`Select` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACSelect {...props} ref={ref} className={clsx('cim-select', UNSAFE_className)} style={UNSAFE_style}>\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACButton className=\"cim-select-button\">\n <RACSelectValue\n className={(values) => clsx(values.defaultClassName, textStyle({ variant: 'medium', alignment: 'start' }))}\n >\n {({ selectedText }) => selectedText}\n </RACSelectValue>\n <IconChevronDownFill />\n </RACButton>\n <FormFieldError>{error}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n <CollapsibleList\n offset={5} // 1px border + 4px actual offset\n maxHeight={315}\n >\n <RACListBox className=\"cim-select-listbox\" onScroll={onScroll} items={items}>\n {children}\n </RACListBox>\n </CollapsibleList>\n </RACSelect>\n );\n}\n\n/**\n * Allows users to select one item from a collapsible list.\n *\n * See [select usage guidelines](https://ui.cimpress.io/components/select/).\n */\nconst _Select = withStyleProps(forwardRef(Select), 'Select');\n\nexport { _Select as Select };\n\nexport interface SelectItemProps\n extends Pick<RACListBoxItemProps, 'id' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n children: StringLikeChildren;\n}\n\n/** Renders a single list item within `Select`. */\nexport function SelectItem({ children, ...props }: SelectItemProps) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACListBoxItem {...props} className=\"cim-select-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n <IconCheckmark />\n\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n </>\n )}\n </RACListBoxItem>\n );\n}\n\nSelectItem.displayName = 'SelectItem';\n\nexport interface SelectSectionProps<T extends CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `Select` into a section. */\nexport function SelectSection<T extends CollectionItem>({ title, children, items, ...props }: SelectSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`SelectSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACListBoxSection {...props} className=\"cim-select-section\">\n <RACHeader\n className={clsx('cim-select-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}\n >\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACListBoxSection>\n );\n}\n\nSelectSection.displayName = 'SelectSection';\n"]}
@@ -6,7 +6,11 @@ export interface SpinnerProps extends CommonProps, LabellableProps {
6
6
  */
7
7
  size?: 'small' | 'medium' | 'large';
8
8
  }
9
- /** Displays a loading indicator to represent an ongoing operation. */
9
+ /**
10
+ * Displays a loading indicator to represent an ongoing operation.
11
+ *
12
+ * See [spinner usage guidelines](https://ui.cimpress.io/components/spinner/).
13
+ */
10
14
  declare const _Spinner: (props: SpinnerProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
11
15
  export { _Spinner as Spinner };
12
16
  //# sourceMappingURL=spinner.d.ts.map