@atom-learning/components 8.0.2 → 9.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (932) hide show
  1. package/README.md +0 -2
  2. package/dist/components/accordion/Accordion.d.ts +9 -9
  3. package/dist/components/accordion/Accordion.js +10 -9
  4. package/dist/components/accordion/Accordion.js.map +1 -1
  5. package/dist/components/accordion/AccordionContent.d.ts +3 -5
  6. package/dist/components/accordion/AccordionContent.js +3 -3
  7. package/dist/components/accordion/AccordionContent.js.map +1 -1
  8. package/dist/components/accordion/AccordionItem.d.ts +2 -4
  9. package/dist/components/accordion/AccordionItem.js +2 -1
  10. package/dist/components/accordion/AccordionItem.js.map +1 -1
  11. package/dist/components/accordion/AccordionTrigger.d.ts +4 -6
  12. package/dist/components/accordion/AccordionTrigger.js +4 -4
  13. package/dist/components/accordion/AccordionTrigger.js.map +1 -1
  14. package/dist/components/action-icon/ActionIcon.constants.js.map +1 -1
  15. package/dist/components/action-icon/ActionIcon.d.ts +11 -12
  16. package/dist/components/action-icon/ActionIcon.js +7 -8
  17. package/dist/components/action-icon/ActionIcon.js.map +1 -1
  18. package/dist/components/alert-dialog/{alert-context/AlertContext.d.ts → AlertDialog.context.d.ts} +1 -1
  19. package/dist/components/alert-dialog/{alert-context/AlertContext.js → AlertDialog.context.js} +5 -5
  20. package/dist/components/alert-dialog/AlertDialog.context.js.map +1 -0
  21. package/dist/components/alert-dialog/AlertDialog.d.ts +2 -4
  22. package/dist/components/alert-dialog/AlertDialog.js +2 -1
  23. package/dist/components/alert-dialog/AlertDialog.js.map +1 -1
  24. package/dist/components/alert-dialog/AlertDialogContent.d.ts +3 -5
  25. package/dist/components/alert-dialog/AlertDialogContent.js +2 -2
  26. package/dist/components/alert-dialog/AlertDialogContent.js.map +1 -1
  27. package/dist/components/alert-dialog/alert-context/AlertDialog.d.ts +1 -1
  28. package/dist/components/alert-dialog/alert-context/AlertDialog.js +3 -3
  29. package/dist/components/alert-dialog/alert-context/AlertDialog.js.map +1 -1
  30. package/dist/components/alert-dialog/alert-context/AlertDialogIcon.js.map +1 -1
  31. package/dist/components/alert-dialog/alert-context/reducer.d.ts +1 -1
  32. package/dist/components/alert-dialog/alert-context/reducer.js.map +1 -1
  33. package/dist/components/alert-dialog/alert-context/types.d.ts +1 -1
  34. package/dist/components/avatar/Avatar.context.d.ts +6 -0
  35. package/dist/components/avatar/{AvatarContext.js → Avatar.context.js} +2 -2
  36. package/dist/components/avatar/Avatar.context.js.map +1 -0
  37. package/dist/components/avatar/Avatar.d.ts +17 -21
  38. package/dist/components/avatar/Avatar.js +5 -5
  39. package/dist/components/avatar/Avatar.js.map +1 -1
  40. package/dist/components/avatar/AvatarIcon.d.ts +5 -4
  41. package/dist/components/avatar/AvatarIcon.js +1 -1
  42. package/dist/components/avatar/AvatarIcon.js.map +1 -1
  43. package/dist/components/avatar/AvatarImage.js.map +1 -1
  44. package/dist/components/avatar/AvatarInitial.js +1 -1
  45. package/dist/components/avatar/AvatarInitial.js.map +1 -1
  46. package/dist/components/avatar/AvatarPlaceholder.js +7 -9
  47. package/dist/components/avatar/AvatarPlaceholder.js.map +1 -1
  48. package/dist/components/badge/Badge.colorscheme.config.js.map +1 -1
  49. package/dist/components/badge/Badge.context.d.ts +8 -7
  50. package/dist/components/badge/Badge.context.js.map +1 -1
  51. package/dist/components/badge/Badge.d.ts +20 -24
  52. package/dist/components/badge/Badge.js +15 -15
  53. package/dist/components/badge/Badge.js.map +1 -1
  54. package/dist/components/badge/Badge.types.d.ts +1 -0
  55. package/dist/components/badge/BadgeIcon.d.ts +1 -1
  56. package/dist/components/badge/BadgeIcon.js.map +1 -1
  57. package/dist/components/badge/BadgeText.d.ts +9 -15
  58. package/dist/components/badge/BadgeText.js.map +1 -1
  59. package/dist/components/banner/Banner.context.d.ts +19 -0
  60. package/dist/components/banner/{BannerContext.js → Banner.context.js} +3 -3
  61. package/dist/components/banner/Banner.context.js.map +1 -0
  62. package/dist/components/banner/Banner.d.ts +2 -2
  63. package/dist/components/banner/Banner.js +2 -2
  64. package/dist/components/banner/Banner.js.map +1 -1
  65. package/dist/components/banner/BannerContainer.d.ts +6 -8
  66. package/dist/components/banner/BannerContainer.js +4 -4
  67. package/dist/components/banner/BannerContainer.js.map +1 -1
  68. package/dist/components/banner/banner-regular/BannerRegular.d.ts +138 -134
  69. package/dist/components/banner/banner-regular/BannerRegular.js +1 -1
  70. package/dist/components/banner/banner-regular/BannerRegular.js.map +1 -1
  71. package/dist/components/banner/banner-regular/BannerRegularActions.d.ts +4 -4
  72. package/dist/components/banner/banner-regular/BannerRegularActions.js +3 -3
  73. package/dist/components/banner/banner-regular/BannerRegularActions.js.map +1 -1
  74. package/dist/components/banner/banner-regular/BannerRegularButton.d.ts +7 -4
  75. package/dist/components/banner/banner-regular/BannerRegularButton.js +1 -1
  76. package/dist/components/banner/banner-regular/BannerRegularButton.js.map +1 -1
  77. package/dist/components/banner/banner-regular/BannerRegularContainer.d.ts +2 -2
  78. package/dist/components/banner/banner-regular/BannerRegularContainer.js.map +1 -1
  79. package/dist/components/banner/banner-regular/BannerRegularContent.d.ts +6 -8
  80. package/dist/components/banner/banner-regular/BannerRegularContent.js +2 -2
  81. package/dist/components/banner/banner-regular/BannerRegularContent.js.map +1 -1
  82. package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +12 -13
  83. package/dist/components/banner/banner-regular/BannerRegularDismiss.js +1 -1
  84. package/dist/components/banner/banner-regular/BannerRegularDismiss.js.map +1 -1
  85. package/dist/components/banner/banner-regular/BannerRegularHeading.d.ts +4 -4
  86. package/dist/components/banner/banner-regular/BannerRegularHeading.js +2 -2
  87. package/dist/components/banner/banner-regular/BannerRegularHeading.js.map +1 -1
  88. package/dist/components/banner/banner-regular/BannerRegularImage.d.ts +4 -4
  89. package/dist/components/banner/banner-regular/BannerRegularImage.js +2 -2
  90. package/dist/components/banner/banner-regular/BannerRegularImage.js.map +1 -1
  91. package/dist/components/banner/banner-regular/BannerRegularText.d.ts +4 -4
  92. package/dist/components/banner/banner-regular/BannerRegularText.js +2 -2
  93. package/dist/components/banner/banner-regular/BannerRegularText.js.map +1 -1
  94. package/dist/components/banner/banner-slim/BannerSlim.d.ts +138 -138
  95. package/dist/components/banner/banner-slim/BannerSlim.js +1 -1
  96. package/dist/components/banner/banner-slim/BannerSlim.js.map +1 -1
  97. package/dist/components/banner/banner-slim/BannerSlimActions.d.ts +6 -8
  98. package/dist/components/banner/banner-slim/BannerSlimActions.js +4 -4
  99. package/dist/components/banner/banner-slim/BannerSlimActions.js.map +1 -1
  100. package/dist/components/banner/banner-slim/BannerSlimButton.d.ts +4 -4
  101. package/dist/components/banner/banner-slim/BannerSlimButton.js +3 -3
  102. package/dist/components/banner/banner-slim/BannerSlimButton.js.map +1 -1
  103. package/dist/components/banner/banner-slim/BannerSlimContainer.d.ts +7 -18
  104. package/dist/components/banner/banner-slim/BannerSlimContainer.js +2 -2
  105. package/dist/components/banner/banner-slim/BannerSlimContainer.js.map +1 -1
  106. package/dist/components/banner/banner-slim/BannerSlimContent.d.ts +1 -3
  107. package/dist/components/banner/banner-slim/BannerSlimContent.js.map +1 -1
  108. package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +15 -16
  109. package/dist/components/banner/banner-slim/BannerSlimDismiss.js +2 -2
  110. package/dist/components/banner/banner-slim/BannerSlimDismiss.js.map +1 -1
  111. package/dist/components/banner/banner-slim/BannerSlimImage.d.ts +4 -4
  112. package/dist/components/banner/banner-slim/BannerSlimImage.js +2 -2
  113. package/dist/components/banner/banner-slim/BannerSlimImage.js.map +1 -1
  114. package/dist/components/banner/banner-slim/BannerSlimText.d.ts +4 -4
  115. package/dist/components/banner/banner-slim/BannerSlimText.js +2 -2
  116. package/dist/components/banner/banner-slim/BannerSlimText.js.map +1 -1
  117. package/dist/components/box/Box.d.ts +1 -3
  118. package/dist/components/box/Box.js.map +1 -1
  119. package/dist/components/button/Button.d.ts +14 -13
  120. package/dist/components/button/Button.js +6 -6
  121. package/dist/components/button/Button.js.map +1 -1
  122. package/dist/components/calendar/Calendar.d.ts +4 -4
  123. package/dist/components/calendar/Calendar.js +4 -4
  124. package/dist/components/calendar/Calendar.js.map +1 -1
  125. package/dist/components/calendar/Day.d.ts +1 -3
  126. package/dist/components/calendar/Day.js.map +1 -1
  127. package/dist/components/calendar/constants.js.map +1 -1
  128. package/dist/components/carousel/Carousel.d.ts +9 -13
  129. package/dist/components/carousel/Carousel.js +3 -4
  130. package/dist/components/carousel/Carousel.js.map +1 -1
  131. package/dist/components/carousel/CarouselArrows.d.ts +1 -3
  132. package/dist/components/carousel/CarouselArrows.js +1 -1
  133. package/dist/components/carousel/CarouselArrows.js.map +1 -1
  134. package/dist/components/carousel/CarouselPagination.js.map +1 -1
  135. package/dist/components/carousel/CarouselSlide.js +1 -2
  136. package/dist/components/carousel/CarouselSlide.js.map +1 -1
  137. package/dist/components/carousel/CarouselSlider.d.ts +4 -4
  138. package/dist/components/carousel/CarouselSlider.js.map +1 -1
  139. package/dist/components/checkbox/Checkbox.d.ts +5 -5
  140. package/dist/components/checkbox/Checkbox.js +2 -3
  141. package/dist/components/checkbox/Checkbox.js.map +1 -1
  142. package/dist/components/checkbox-field/CheckboxField.d.ts +6 -6
  143. package/dist/components/checkbox-field/CheckboxField.js +3 -8
  144. package/dist/components/checkbox-field/CheckboxField.js.map +1 -1
  145. package/dist/components/checkbox-group/CheckboxGroup.d.ts +129 -129
  146. package/dist/components/checkbox-group/CheckboxGroup.js +3 -3
  147. package/dist/components/checkbox-group/CheckboxGroup.js.map +1 -1
  148. package/dist/components/checkbox-group/CheckboxGroupAllItem.js +2 -2
  149. package/dist/components/checkbox-group/CheckboxGroupAllItem.js.map +1 -1
  150. package/dist/components/checkbox-group/{context/CheckboxGroupChecked.context.d.ts → CheckboxGroupChecked.context.d.ts} +1 -1
  151. package/dist/components/checkbox-group/{context/CheckboxGroupChecked.context.js → CheckboxGroupChecked.context.js} +1 -1
  152. package/dist/components/checkbox-group/CheckboxGroupChecked.context.js.map +1 -0
  153. package/dist/components/checkbox-group/CheckboxGroupItem.js +2 -2
  154. package/dist/components/checkbox-group/CheckboxGroupItem.js.map +1 -1
  155. package/dist/components/checkbox-group/{context/CheckboxGroupMounted.context.d.ts → CheckboxGroupMounted.context.d.ts} +1 -1
  156. package/dist/components/checkbox-group/{context/CheckboxGroupMounted.context.js → CheckboxGroupMounted.context.js} +1 -1
  157. package/dist/components/checkbox-group/CheckboxGroupMounted.context.js.map +1 -0
  158. package/dist/components/checkbox-group/CheckboxGroupSub.js +1 -1
  159. package/dist/components/checkbox-group/CheckboxGroupSub.js.map +1 -1
  160. package/dist/components/checkbox-tree/CheckboxTree.d.ts +1 -1
  161. package/dist/components/checkbox-tree/CheckboxTree.js +2 -2
  162. package/dist/components/checkbox-tree/CheckboxTree.js.map +1 -1
  163. package/dist/components/checkbox-tree/CheckboxTreeCollapsible.d.ts +1 -1
  164. package/dist/components/checkbox-tree/CheckboxTreeCollapsible.js +7 -9
  165. package/dist/components/checkbox-tree/CheckboxTreeCollapsible.js.map +1 -1
  166. package/dist/components/checkbox-tree/CheckboxTreeCollapsibleContent.d.ts +1 -1
  167. package/dist/components/checkbox-tree/CheckboxTreeCollapsibleContent.js +8 -10
  168. package/dist/components/checkbox-tree/CheckboxTreeCollapsibleContent.js.map +1 -1
  169. package/dist/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.d.ts +1 -1
  170. package/dist/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.js.map +1 -1
  171. package/dist/components/checkbox-tree/CheckboxTreeItem.d.ts +1 -1
  172. package/dist/components/checkbox-tree/CheckboxTreeItem.js.map +1 -1
  173. package/dist/components/checkbox-tree/CheckboxTreeItemContent.d.ts +1 -3
  174. package/dist/components/checkbox-tree/CheckboxTreeItemContent.js +11 -10
  175. package/dist/components/checkbox-tree/CheckboxTreeItemContent.js.map +1 -1
  176. package/dist/components/chip/Chip.d.ts +15 -24
  177. package/dist/components/chip/Chip.js +12 -12
  178. package/dist/components/chip/Chip.js.map +1 -1
  179. package/dist/components/chip/ChipGroup.d.ts +1 -3
  180. package/dist/components/chip/ChipGroup.js.map +1 -1
  181. package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.d.ts +11 -11
  182. package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.js +16 -18
  183. package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.js.map +1 -1
  184. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.d.ts +4 -4
  185. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +3 -3
  186. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js.map +1 -1
  187. package/dist/components/chip-dismissible-group/index.d.ts +2 -2
  188. package/dist/components/chip-dismissible-group/index.js +0 -1
  189. package/dist/components/chip-dismissible-group/index.js.map +1 -1
  190. package/dist/components/chip-toggle-group/ChipToggleGroupItem.d.ts +11 -11
  191. package/dist/components/chip-toggle-group/ChipToggleGroupItem.js +12 -14
  192. package/dist/components/chip-toggle-group/ChipToggleGroupItem.js.map +1 -1
  193. package/dist/components/chip-toggle-group/ChipToggleGroupRoot.d.ts +5 -9
  194. package/dist/components/chip-toggle-group/ChipToggleGroupRoot.js +6 -8
  195. package/dist/components/chip-toggle-group/ChipToggleGroupRoot.js.map +1 -1
  196. package/dist/components/chip-toggle-group/index.d.ts +2 -2
  197. package/dist/components/chip-toggle-group/index.js +0 -1
  198. package/dist/components/chip-toggle-group/index.js.map +1 -1
  199. package/dist/components/combobox/Combobox.d.ts +5 -26
  200. package/dist/components/combobox/Combobox.js +1 -1
  201. package/dist/components/combobox/Combobox.js.map +1 -1
  202. package/dist/components/combobox/ComboboxInput.d.ts +4 -17
  203. package/dist/components/combobox/ComboboxInput.js +4 -4
  204. package/dist/components/combobox/ComboboxInput.js.map +1 -1
  205. package/dist/components/combobox/ComboboxList.d.ts +1 -5
  206. package/dist/components/combobox/ComboboxList.js +1 -1
  207. package/dist/components/combobox/ComboboxList.js.map +1 -1
  208. package/dist/components/combobox/ComboboxOption.d.ts +1 -5
  209. package/dist/components/combobox/ComboboxOption.js +1 -1
  210. package/dist/components/combobox/ComboboxOption.js.map +1 -1
  211. package/dist/components/combobox/ComboboxPopover.d.ts +1 -5
  212. package/dist/components/combobox/ComboboxPopover.js +1 -1
  213. package/dist/components/combobox/ComboboxPopover.js.map +1 -1
  214. package/dist/components/create-password-field/CreatePasswordField.d.ts +6 -6
  215. package/dist/components/create-password-field/CreatePasswordField.js +2 -2
  216. package/dist/components/create-password-field/CreatePasswordField.js.map +1 -1
  217. package/dist/components/data-table/{DataTableContext.d.ts → DataTable.context.d.ts} +3 -3
  218. package/dist/components/data-table/{DataTableContext.js → DataTable.context.js} +2 -2
  219. package/dist/components/data-table/DataTable.context.js.map +1 -0
  220. package/dist/components/data-table/DataTable.d.ts +74 -46
  221. package/dist/components/data-table/DataTable.js +90 -2
  222. package/dist/components/data-table/DataTable.js.map +1 -1
  223. package/dist/components/data-table/DataTable.types.d.ts +9 -9
  224. package/dist/components/data-table/DataTable.types.js +1 -0
  225. package/dist/components/data-table/DataTable.types.js.map +1 -1
  226. package/dist/components/data-table/DataTableBody.d.ts +1 -1
  227. package/dist/components/data-table/DataTableBody.js +3 -3
  228. package/dist/components/data-table/DataTableBody.js.map +1 -1
  229. package/dist/components/data-table/DataTableBulkActions.js +2 -2
  230. package/dist/components/data-table/DataTableBulkActions.js.map +1 -1
  231. package/dist/components/data-table/DataTableBulkActionsFloating.d.ts +1 -3
  232. package/dist/components/data-table/DataTableBulkActionsFloating.js +3 -3
  233. package/dist/components/data-table/DataTableBulkActionsFloating.js.map +1 -1
  234. package/dist/components/data-table/DataTableBulkActionsSelectedRowActions.js +1 -1
  235. package/dist/components/data-table/DataTableBulkActionsSelectedRowActions.js.map +1 -1
  236. package/dist/components/data-table/DataTableDataCell.js +1 -3
  237. package/dist/components/data-table/DataTableDataCell.js.map +1 -1
  238. package/dist/components/data-table/DataTableEmptyState.js +1 -1
  239. package/dist/components/data-table/DataTableEmptyState.js.map +1 -1
  240. package/dist/components/data-table/DataTableError.d.ts +2 -2
  241. package/dist/components/data-table/DataTableError.js +2 -1
  242. package/dist/components/data-table/DataTableError.js.map +1 -1
  243. package/dist/components/data-table/DataTableGlobalFilter.d.ts +1 -1
  244. package/dist/components/data-table/DataTableGlobalFilter.js +3 -3
  245. package/dist/components/data-table/DataTableGlobalFilter.js.map +1 -1
  246. package/dist/components/data-table/DataTableHead.d.ts +1 -1
  247. package/dist/components/data-table/DataTableHead.js +3 -3
  248. package/dist/components/data-table/DataTableHead.js.map +1 -1
  249. package/dist/components/data-table/DataTableHeaderCell.d.ts +1 -1
  250. package/dist/components/data-table/DataTableHeaderCell.js +4 -4
  251. package/dist/components/data-table/DataTableHeaderCell.js.map +1 -1
  252. package/dist/components/data-table/DataTableLoading.d.ts +3 -5
  253. package/dist/components/data-table/DataTableLoading.js +1 -1
  254. package/dist/components/data-table/DataTableLoading.js.map +1 -1
  255. package/dist/components/data-table/DataTableMetaData.js +1 -1
  256. package/dist/components/data-table/DataTableMetaData.js.map +1 -1
  257. package/dist/components/data-table/DataTableRow.js +1 -1
  258. package/dist/components/data-table/DataTableRow.js.map +1 -1
  259. package/dist/components/data-table/DataTableRowSelectionCheckbox.d.ts +1 -1
  260. package/dist/components/data-table/DataTableRowSelectionCheckbox.js +1 -1
  261. package/dist/components/data-table/DataTableRowSelectionCheckbox.js.map +1 -1
  262. package/dist/components/data-table/DataTableSelectAllRowsCheckbox.js +1 -1
  263. package/dist/components/data-table/DataTableSelectAllRowsCheckbox.js.map +1 -1
  264. package/dist/components/data-table/DataTableTable.d.ts +1 -1
  265. package/dist/components/data-table/DataTableTable.js +4 -4
  266. package/dist/components/data-table/DataTableTable.js.map +1 -1
  267. package/dist/components/data-table/drag-and-drop/DragAndDropTable.d.ts +3 -3
  268. package/dist/components/data-table/drag-and-drop/DragAndDropTable.js +4 -4
  269. package/dist/components/data-table/drag-and-drop/DragAndDropTable.js.map +1 -1
  270. package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.d.ts +1 -1
  271. package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.js +3 -3
  272. package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.js.map +1 -1
  273. package/dist/components/data-table/drag-and-drop/DragAndDropTableRow.js.map +1 -1
  274. package/dist/components/data-table/getNewAsyncData.d.ts +2 -2
  275. package/dist/components/data-table/getNewAsyncData.js.map +1 -1
  276. package/dist/components/data-table/pagination/Pagination.d.ts +6 -9
  277. package/dist/components/data-table/pagination/Pagination.js +3 -3
  278. package/dist/components/data-table/pagination/Pagination.js.map +1 -1
  279. package/dist/components/data-table/usePagination.d.ts +1 -1
  280. package/dist/components/data-table/usePagination.js +4 -4
  281. package/dist/components/data-table/usePagination.js.map +1 -1
  282. package/dist/components/data-table/useSorting.d.ts +3 -3
  283. package/dist/components/data-table/useSorting.js +3 -3
  284. package/dist/components/data-table/useSorting.js.map +1 -1
  285. package/dist/components/date-field/DateField.d.ts +6 -6
  286. package/dist/components/date-field/DateField.js +2 -2
  287. package/dist/components/date-field/DateField.js.map +1 -1
  288. package/dist/components/date-input/DateInput.d.ts +3 -11
  289. package/dist/components/date-input/DateInput.js +4 -5
  290. package/dist/components/date-input/DateInput.js.map +1 -1
  291. package/dist/components/dialog/Dialog.d.ts +11 -21
  292. package/dist/components/dialog/Dialog.js +1 -1
  293. package/dist/components/dialog/Dialog.js.map +1 -1
  294. package/dist/components/dialog/DialogActionBar.d.ts +1 -3
  295. package/dist/components/dialog/DialogActionBar.js.map +1 -1
  296. package/dist/components/dialog/DialogBackground.d.ts +1 -3
  297. package/dist/components/dialog/DialogBackground.js.map +1 -1
  298. package/dist/components/dialog/DialogContent.d.ts +4 -6
  299. package/dist/components/dialog/DialogContent.js +5 -5
  300. package/dist/components/dialog/DialogContent.js.map +1 -1
  301. package/dist/components/dialog/DialogFooter.d.ts +1 -3
  302. package/dist/components/dialog/DialogFooter.js.map +1 -1
  303. package/dist/components/dialog/DialogHeading.d.ts +2 -2
  304. package/dist/components/dialog/DialogHeading.js.map +1 -1
  305. package/dist/components/dialog/DialogNavigationBar.d.ts +1 -3
  306. package/dist/components/dialog/DialogNavigationBar.js.map +1 -1
  307. package/dist/components/dialog/DialogScrollableContent.d.ts +1 -3
  308. package/dist/components/dialog/DialogScrollableContent.js.map +1 -1
  309. package/dist/components/dismissible/DismissibleRoot.d.ts +9 -9
  310. package/dist/components/dismissible/DismissibleRoot.js +1 -1
  311. package/dist/components/dismissible/DismissibleRoot.js.map +1 -1
  312. package/dist/components/dismissible/DismissibleTrigger.d.ts +2 -2
  313. package/dist/components/dismissible/DismissibleTrigger.js.map +1 -1
  314. package/dist/components/dismissible/index.d.ts +2 -2
  315. package/dist/components/dismissible/index.js +1 -1
  316. package/dist/components/dismissible/index.js.map +1 -1
  317. package/dist/components/dismissible-group/DismissibleGroupItem.d.ts +3 -3
  318. package/dist/components/dismissible-group/DismissibleGroupItem.js.map +1 -1
  319. package/dist/components/dismissible-group/DismissibleGroupRoot.d.ts +10 -9
  320. package/dist/components/dismissible-group/DismissibleGroupRoot.js +6 -8
  321. package/dist/components/dismissible-group/DismissibleGroupRoot.js.map +1 -1
  322. package/dist/components/dismissible-group/index.d.ts +3 -3
  323. package/dist/components/dismissible-group/index.js +1 -1
  324. package/dist/components/dismissible-group/index.js.map +1 -1
  325. package/dist/components/divider/Divider.d.ts +2 -10
  326. package/dist/components/divider/Divider.js +4 -12
  327. package/dist/components/divider/Divider.js.map +1 -1
  328. package/dist/components/drawer/Drawer.context.d.ts +3 -3
  329. package/dist/components/drawer/Drawer.context.js.map +1 -1
  330. package/dist/components/drawer/Drawer.d.ts +7 -14
  331. package/dist/components/drawer/Drawer.js +16 -16
  332. package/dist/components/drawer/Drawer.js.map +1 -1
  333. package/dist/components/drawer/DrawerClose.d.ts +2 -2
  334. package/dist/components/drawer/DrawerClose.js +2 -1
  335. package/dist/components/drawer/DrawerClose.js.map +1 -1
  336. package/dist/components/drawer/DrawerContent.d.ts +3 -5
  337. package/dist/components/drawer/DrawerContent.js +4 -4
  338. package/dist/components/drawer/DrawerContent.js.map +1 -1
  339. package/dist/components/drawer/DrawerFooter.d.ts +1 -3
  340. package/dist/components/drawer/DrawerFooter.js.map +1 -1
  341. package/dist/components/drawer/DrawerHeader.d.ts +1 -3
  342. package/dist/components/drawer/DrawerHeader.js.map +1 -1
  343. package/dist/components/drawer/DrawerMain.d.ts +1 -3
  344. package/dist/components/drawer/DrawerMain.js.map +1 -1
  345. package/dist/components/drawer/DrawerOverlay.d.ts +1 -3
  346. package/dist/components/drawer/DrawerOverlay.js +1 -1
  347. package/dist/components/drawer/DrawerOverlay.js.map +1 -1
  348. package/dist/components/dropdown-menu/DropdownMenu.d.ts +7 -15
  349. package/dist/components/dropdown-menu/DropdownMenu.js +2 -1
  350. package/dist/components/dropdown-menu/DropdownMenu.js.map +1 -1
  351. package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +1 -3
  352. package/dist/components/dropdown-menu/DropdownMenuContent.js +1 -1
  353. package/dist/components/dropdown-menu/DropdownMenuContent.js.map +1 -1
  354. package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +1 -3
  355. package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -1
  356. package/dist/components/dropdown-menu/DropdownMenuItem.js.map +1 -1
  357. package/dist/components/dropdown-menu/DropdownMenuLabel.d.ts +4 -4
  358. package/dist/components/dropdown-menu/DropdownMenuLabel.js +2 -2
  359. package/dist/components/dropdown-menu/DropdownMenuLabel.js.map +1 -1
  360. package/dist/components/dropdown-menu/DropdownMenuLinkItem.d.ts +2 -2
  361. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +2 -2
  362. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
  363. package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +1 -3
  364. package/dist/components/dropdown-menu/DropdownMenuSeparator.js +1 -1
  365. package/dist/components/dropdown-menu/DropdownMenuSeparator.js.map +1 -1
  366. package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +1 -3
  367. package/dist/components/dropdown-menu/DropdownMenuTrigger.js +1 -1
  368. package/dist/components/dropdown-menu/DropdownMenuTrigger.js.map +1 -1
  369. package/dist/components/empty-state/EmptyState.context.js.map +1 -1
  370. package/dist/components/empty-state/EmptyState.d.ts +23 -29
  371. package/dist/components/empty-state/EmptyState.js +2 -2
  372. package/dist/components/empty-state/EmptyState.js.map +1 -1
  373. package/dist/components/empty-state/EmptyStateBody.d.ts +7 -13
  374. package/dist/components/empty-state/EmptyStateBody.js +1 -1
  375. package/dist/components/empty-state/EmptyStateBody.js.map +1 -1
  376. package/dist/components/empty-state/EmptyStateImage.d.ts +12 -10
  377. package/dist/components/empty-state/EmptyStateImage.js +3 -3
  378. package/dist/components/empty-state/EmptyStateImage.js.map +1 -1
  379. package/dist/components/empty-state/EmptyStateTitle.d.ts +5 -6
  380. package/dist/components/empty-state/EmptyStateTitle.js +1 -1
  381. package/dist/components/empty-state/EmptyStateTitle.js.map +1 -1
  382. package/dist/components/field-wrapper/FieldDescription.js.map +1 -1
  383. package/dist/components/field-wrapper/FieldWrapper.d.ts +5 -5
  384. package/dist/components/field-wrapper/FieldWrapper.js +1 -1
  385. package/dist/components/field-wrapper/FieldWrapper.js.map +1 -1
  386. package/dist/components/field-wrapper/InlineFieldWrapper.d.ts +4 -4
  387. package/dist/components/field-wrapper/InlineFieldWrapper.js.map +1 -1
  388. package/dist/components/file-drop/FileDrop.context.d.ts +3 -0
  389. package/dist/components/file-drop/FileDrop.context.js +10 -0
  390. package/dist/components/file-drop/FileDrop.context.js.map +1 -0
  391. package/dist/components/file-drop/FileDrop.d.ts +4 -4
  392. package/dist/components/file-drop/FileDrop.js +3 -3
  393. package/dist/components/file-drop/FileDrop.js.map +1 -1
  394. package/dist/components/file-drop/useFileDrop.d.ts +1 -1
  395. package/dist/components/file-drop/useFileDrop.js +3 -3
  396. package/dist/components/file-drop/useFileDrop.js.map +1 -1
  397. package/dist/components/file-input/FileInput.d.ts +6 -5
  398. package/dist/components/file-input/FileInput.js +1 -1
  399. package/dist/components/file-input/FileInput.js.map +1 -1
  400. package/dist/components/flex/Flex.d.ts +6 -8
  401. package/dist/components/flex/Flex.js +1 -1
  402. package/dist/components/flex/Flex.js.map +1 -1
  403. package/dist/components/form/Form.d.ts +4 -4
  404. package/dist/components/form/Form.js.map +1 -1
  405. package/dist/components/form/useFieldError.js.map +1 -1
  406. package/dist/components/form/useFormCustomContext.js.map +1 -1
  407. package/dist/components/grid/Grid.d.ts +6 -8
  408. package/dist/components/grid/Grid.js +3 -3
  409. package/dist/components/grid/Grid.js.map +1 -1
  410. package/dist/components/heading/Heading.d.ts +5 -8
  411. package/dist/components/heading/Heading.js +7 -11
  412. package/dist/components/heading/Heading.js.map +1 -1
  413. package/dist/components/icon/Icon.d.ts +4 -6
  414. package/dist/components/icon/Icon.js +6 -6
  415. package/dist/components/icon/Icon.js.map +1 -1
  416. package/dist/components/image/Image.d.ts +10 -6
  417. package/dist/components/image/Image.js +21 -8
  418. package/dist/components/image/Image.js.map +1 -1
  419. package/dist/components/image/ImageCredit.d.ts +15 -0
  420. package/dist/components/image/ImageCredit.js +69 -0
  421. package/dist/components/image/ImageCredit.js.map +1 -0
  422. package/dist/components/index.d.ts +8 -6
  423. package/dist/components/index.js +105 -0
  424. package/dist/components/index.js.map +1 -0
  425. package/dist/components/inline-message/InlineMessage.config.d.ts +1 -1
  426. package/dist/components/inline-message/InlineMessage.config.js +1 -0
  427. package/dist/components/inline-message/InlineMessage.config.js.map +1 -1
  428. package/dist/components/inline-message/InlineMessage.d.ts +4 -6
  429. package/dist/components/inline-message/InlineMessage.js +1 -1
  430. package/dist/components/inline-message/InlineMessage.js.map +1 -1
  431. package/dist/components/input/Input.d.ts +13 -20
  432. package/dist/components/input/Input.js +16 -19
  433. package/dist/components/input/Input.js.map +1 -1
  434. package/dist/components/input-field/InputField.d.ts +6 -6
  435. package/dist/components/input-field/InputField.js +2 -2
  436. package/dist/components/input-field/InputField.js.map +1 -1
  437. package/dist/components/keyboard-shortcut/KeyboardShortcut.d.ts +11 -18
  438. package/dist/components/keyboard-shortcut/KeyboardShortcut.js +3 -5
  439. package/dist/components/keyboard-shortcut/KeyboardShortcut.js.map +1 -1
  440. package/dist/components/keyboard-shortcut/index.d.ts +15 -19
  441. package/dist/components/keyboard-shortcut/index.js +1 -2
  442. package/dist/components/keyboard-shortcut/index.js.map +1 -1
  443. package/dist/components/label/Label.d.ts +9 -11
  444. package/dist/components/label/Label.js.map +1 -1
  445. package/dist/components/link/Link.d.ts +11 -10
  446. package/dist/components/link/Link.js +3 -4
  447. package/dist/components/link/Link.js.map +1 -1
  448. package/dist/components/list/List.d.ts +5 -10
  449. package/dist/components/list/List.js +6 -6
  450. package/dist/components/list/List.js.map +1 -1
  451. package/dist/components/loader/Loader.d.ts +1 -1
  452. package/dist/components/loader/Loader.js +2 -2
  453. package/dist/components/loader/Loader.js.map +1 -1
  454. package/dist/components/markdown-content/MarkdownContent.d.ts +5 -7
  455. package/dist/components/markdown-content/MarkdownContent.js.map +1 -1
  456. package/dist/components/markdown-content/components/MarkdownCode.js.map +1 -1
  457. package/dist/components/markdown-content/components/MarkdownEmphasis.d.ts +1 -3
  458. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  459. package/dist/components/markdown-content/components/MarkdownEmphasis.js.map +1 -1
  460. package/dist/components/markdown-content/components/MarkdownHeading.js.map +1 -1
  461. package/dist/components/markdown-content/components/MarkdownImage.js.map +1 -1
  462. package/dist/components/markdown-content/components/MarkdownInlineCode.js.map +1 -1
  463. package/dist/components/markdown-content/components/MarkdownLink.js.map +1 -1
  464. package/dist/components/markdown-content/components/MarkdownList.js.map +1 -1
  465. package/dist/components/markdown-content/components/MarkdownListItem.js.map +1 -1
  466. package/dist/components/markdown-content/components/MarkdownParagraph.js.map +1 -1
  467. package/dist/components/markdown-content/components/MarkdownStrong.js.map +1 -1
  468. package/dist/components/markdown-content/components/MarkdownText.js +1 -0
  469. package/dist/components/markdown-content/components/MarkdownText.js.map +1 -1
  470. package/dist/components/markdown-content/components/MarkdownThematicBreak.js.map +1 -1
  471. package/dist/components/navigation/NavigationMenu.colorscheme.config.js.map +1 -1
  472. package/dist/components/navigation/{NavigationMenuContext.d.ts → NavigationMenu.context.d.ts} +1 -1
  473. package/dist/components/navigation/NavigationMenu.context.js +12 -0
  474. package/dist/components/navigation/NavigationMenu.context.js.map +1 -0
  475. package/dist/components/navigation/NavigationMenu.d.ts +25 -48
  476. package/dist/components/navigation/NavigationMenu.js +12 -12
  477. package/dist/components/navigation/NavigationMenu.js.map +1 -1
  478. package/dist/components/navigation/NavigationMenu.styles.js.map +1 -1
  479. package/dist/components/navigation/NavigationMenuDropdown.d.ts +4 -4
  480. package/dist/components/navigation/NavigationMenuDropdown.js +3 -3
  481. package/dist/components/navigation/NavigationMenuDropdown.js.map +1 -1
  482. package/dist/components/navigation/NavigationMenuDropdownContent.d.ts +6 -8
  483. package/dist/components/navigation/NavigationMenuDropdownContent.js.map +1 -1
  484. package/dist/components/navigation/NavigationMenuDropdownItem.d.ts +9 -25
  485. package/dist/components/navigation/NavigationMenuDropdownItem.js +5 -8
  486. package/dist/components/navigation/NavigationMenuDropdownItem.js.map +1 -1
  487. package/dist/components/navigation/NavigationMenuDropdownTrigger.d.ts +5 -5
  488. package/dist/components/navigation/NavigationMenuDropdownTrigger.js +5 -6
  489. package/dist/components/navigation/NavigationMenuDropdownTrigger.js.map +1 -1
  490. package/dist/components/navigation/NavigationMenuLink.d.ts +7 -12
  491. package/dist/components/navigation/NavigationMenuLink.js +5 -6
  492. package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
  493. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.colorscheme.config.js.map +1 -1
  494. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +254 -260
  495. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.js +1 -1
  496. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.js.map +1 -1
  497. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js.map +1 -1
  498. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.d.ts +4 -4
  499. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.js.map +1 -1
  500. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.d.ts +3 -3
  501. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.js +2 -2
  502. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.js.map +1 -1
  503. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.d.ts +5 -7
  504. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js +2 -2
  505. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js.map +1 -1
  506. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalIcon.d.ts +5 -7
  507. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalIcon.js.map +1 -1
  508. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItem.d.ts +3 -3
  509. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItem.js.map +1 -1
  510. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.d.ts +2 -2
  511. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.js.map +1 -1
  512. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +3 -5
  513. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
  514. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalList.d.ts +1 -3
  515. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalList.js.map +1 -1
  516. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.d.ts +9 -15
  517. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.js +1 -1
  518. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.js.map +1 -1
  519. package/dist/components/notification-badge/NotificationBadge.d.ts +1 -1
  520. package/dist/components/notification-badge/NotificationBadge.js.map +1 -1
  521. package/dist/components/number-input/NumberInput.d.ts +3 -1
  522. package/dist/components/number-input/NumberInput.js +3 -4
  523. package/dist/components/number-input/NumberInput.js.map +1 -1
  524. package/dist/components/number-input/NumberInputStepper.d.ts +10 -11
  525. package/dist/components/number-input/NumberInputStepper.js +4 -5
  526. package/dist/components/number-input/NumberInputStepper.js.map +1 -1
  527. package/dist/components/number-input-field/NumberInputField.d.ts +5 -5
  528. package/dist/components/number-input-field/NumberInputField.js +2 -2
  529. package/dist/components/number-input-field/NumberInputField.js.map +1 -1
  530. package/dist/components/pagination/{pagination-context/PaginationContext.d.ts → Pagination.context.d.ts} +1 -1
  531. package/dist/components/pagination/{pagination-context/PaginationContext.js → Pagination.context.js} +4 -4
  532. package/dist/components/pagination/Pagination.context.js.map +1 -0
  533. package/dist/components/pagination/Pagination.js +2 -2
  534. package/dist/components/pagination/Pagination.js.map +1 -1
  535. package/dist/components/pagination/PaginationItems.js.map +1 -1
  536. package/dist/components/pagination/PaginationNextButton.d.ts +8 -9
  537. package/dist/components/pagination/PaginationNextButton.js.map +1 -1
  538. package/dist/components/pagination/PaginationPage.js.map +1 -1
  539. package/dist/components/pagination/PaginationPopover.d.ts +1 -1
  540. package/dist/components/pagination/PaginationPopover.js +2 -2
  541. package/dist/components/pagination/PaginationPopover.js.map +1 -1
  542. package/dist/components/pagination/PaginationPreviousButton.d.ts +8 -9
  543. package/dist/components/pagination/PaginationPreviousButton.js.map +1 -1
  544. package/dist/components/pagination/pagination.constants.js.map +1 -1
  545. package/dist/components/pagination/pagination.helper.d.ts +1 -1
  546. package/dist/components/pagination/pagination.helper.js.map +1 -1
  547. package/dist/components/pagination/types.d.ts +3 -3
  548. package/dist/components/pagination/usePagination.js +1 -1
  549. package/dist/components/pagination/usePagination.js.map +1 -1
  550. package/dist/components/password-field/PasswordField.d.ts +6 -6
  551. package/dist/components/password-field/PasswordField.js +2 -2
  552. package/dist/components/password-field/PasswordField.js.map +1 -1
  553. package/dist/components/password-input/PasswordInput.d.ts +2 -2
  554. package/dist/components/password-input/PasswordInput.js +3 -4
  555. package/dist/components/password-input/PasswordInput.js.map +1 -1
  556. package/dist/components/popover/Popover.d.ts +4 -4
  557. package/dist/components/popover/Popover.js +1 -1
  558. package/dist/components/popover/Popover.js.map +1 -1
  559. package/dist/components/popover/PopoverContent.d.ts +3 -5
  560. package/dist/components/popover/PopoverContent.js +2 -2
  561. package/dist/components/popover/PopoverContent.js.map +1 -1
  562. package/dist/components/progress-bar/ProgressBar.d.ts +7 -9
  563. package/dist/components/progress-bar/ProgressBar.js +3 -3
  564. package/dist/components/progress-bar/ProgressBar.js.map +1 -1
  565. package/dist/components/radio-button/RadioButton.d.ts +7 -11
  566. package/dist/components/radio-button/RadioButton.js +10 -9
  567. package/dist/components/radio-button/RadioButton.js.map +1 -1
  568. package/dist/components/radio-button/RadioButtonGroup.d.ts +2 -4
  569. package/dist/components/radio-button/RadioButtonGroup.js +1 -1
  570. package/dist/components/radio-button/RadioButtonGroup.js.map +1 -1
  571. package/dist/components/radio-button-field/RadioButtonField.d.ts +7 -11
  572. package/dist/components/radio-button-field/RadioButtonField.js +3 -3
  573. package/dist/components/radio-button-field/RadioButtonField.js.map +1 -1
  574. package/dist/components/radio-button-field/RadioField.d.ts +6 -6
  575. package/dist/components/radio-button-field/RadioField.js +2 -2
  576. package/dist/components/radio-button-field/RadioField.js.map +1 -1
  577. package/dist/components/radio-card/RadioCard.d.ts +2 -4
  578. package/dist/components/radio-card/RadioCard.js.map +1 -1
  579. package/dist/components/radio-card/RadioCardGroup.js.map +1 -1
  580. package/dist/components/search-field/SearchField.d.ts +6 -6
  581. package/dist/components/search-field/SearchField.js +2 -2
  582. package/dist/components/search-field/SearchField.js.map +1 -1
  583. package/dist/components/search-input/SearchInput.d.ts +2 -2
  584. package/dist/components/search-input/SearchInput.js +8 -14
  585. package/dist/components/search-input/SearchInput.js.map +1 -1
  586. package/dist/components/section-message/{SectionMessageContext.d.ts → SectionMessage.context.d.ts} +1 -1
  587. package/dist/components/section-message/{SectionMessageContext.js → SectionMessage.context.js} +9 -9
  588. package/dist/components/section-message/SectionMessage.context.js.map +1 -0
  589. package/dist/components/section-message/SectionMessage.d.ts +17 -19
  590. package/dist/components/section-message/SectionMessage.js +10 -8
  591. package/dist/components/section-message/SectionMessage.js.map +1 -1
  592. package/dist/components/section-message/SectionMessageDescription.d.ts +1 -1
  593. package/dist/components/section-message/SectionMessageDescription.js.map +1 -1
  594. package/dist/components/section-message/SectionMessageDismiss.js +1 -1
  595. package/dist/components/section-message/SectionMessageDismiss.js.map +1 -1
  596. package/dist/components/section-message/SectionMessageIcon.js +1 -1
  597. package/dist/components/section-message/SectionMessageIcon.js.map +1 -1
  598. package/dist/components/section-message/SectionMessageLayout.d.ts +3 -5
  599. package/dist/components/section-message/SectionMessageLayout.js.map +1 -1
  600. package/dist/components/section-message/SectionMessageTitle.d.ts +3 -3
  601. package/dist/components/section-message/SectionMessageTitle.js.map +1 -1
  602. package/dist/components/segmented-control/{SegmentedControlContext.js → SegmentedControl.context.js} +2 -2
  603. package/dist/components/segmented-control/SegmentedControl.context.js.map +1 -0
  604. package/dist/components/segmented-control/SegmentedControl.d.ts +26 -44
  605. package/dist/components/segmented-control/SegmentedControl.js.map +1 -1
  606. package/dist/components/segmented-control/SegmentedControlBadge.d.ts +1 -1
  607. package/dist/components/segmented-control/SegmentedControlBadge.js +3 -3
  608. package/dist/components/segmented-control/SegmentedControlBadge.js.map +1 -1
  609. package/dist/components/segmented-control/SegmentedControlContent.d.ts +1 -3
  610. package/dist/components/segmented-control/SegmentedControlContent.js +1 -0
  611. package/dist/components/segmented-control/SegmentedControlContent.js.map +1 -1
  612. package/dist/components/segmented-control/SegmentedControlDescription.d.ts +8 -14
  613. package/dist/components/segmented-control/SegmentedControlDescription.js +2 -2
  614. package/dist/components/segmented-control/SegmentedControlDescription.js.map +1 -1
  615. package/dist/components/segmented-control/SegmentedControlHeading.d.ts +8 -14
  616. package/dist/components/segmented-control/SegmentedControlHeading.js +2 -2
  617. package/dist/components/segmented-control/SegmentedControlHeading.js.map +1 -1
  618. package/dist/components/segmented-control/SegmentedControlIcon.d.ts +1 -1
  619. package/dist/components/segmented-control/SegmentedControlIcon.js +1 -1
  620. package/dist/components/segmented-control/SegmentedControlIcon.js.map +1 -1
  621. package/dist/components/segmented-control/SegmentedControlItem.d.ts +6 -6
  622. package/dist/components/segmented-control/SegmentedControlItem.js +5 -6
  623. package/dist/components/segmented-control/SegmentedControlItem.js.map +1 -1
  624. package/dist/components/segmented-control/SegmentedControlItemList.js +1 -1
  625. package/dist/components/segmented-control/SegmentedControlItemList.js.map +1 -1
  626. package/dist/components/segmented-control/SegmentedControlRoot.d.ts +15 -7
  627. package/dist/components/segmented-control/SegmentedControlRoot.js +9 -9
  628. package/dist/components/segmented-control/SegmentedControlRoot.js.map +1 -1
  629. package/dist/components/select/Select.d.ts +7 -10
  630. package/dist/components/select/Select.js +9 -7
  631. package/dist/components/select/Select.js.map +1 -1
  632. package/dist/components/select-field/SelectField.d.ts +6 -6
  633. package/dist/components/select-field/SelectField.js +2 -2
  634. package/dist/components/select-field/SelectField.js.map +1 -1
  635. package/dist/components/select-menu/{SelectMenuContext.js → SelectMenu.context.js} +2 -2
  636. package/dist/components/select-menu/SelectMenu.context.js.map +1 -0
  637. package/dist/components/select-menu/SelectMenu.d.ts +7 -9
  638. package/dist/components/select-menu/SelectMenu.js +4 -4
  639. package/dist/components/select-menu/SelectMenu.js.map +1 -1
  640. package/dist/components/select-menu/SelectMenuContent.d.ts +3 -1
  641. package/dist/components/select-menu/SelectMenuContent.js +4 -5
  642. package/dist/components/select-menu/SelectMenuContent.js.map +1 -1
  643. package/dist/components/select-menu/SelectMenuItem.d.ts +3 -1
  644. package/dist/components/select-menu/SelectMenuItem.js +5 -6
  645. package/dist/components/select-menu/SelectMenuItem.js.map +1 -1
  646. package/dist/components/select-menu/SelectMenuLabel.d.ts +4 -4
  647. package/dist/components/select-menu/SelectMenuLabel.js +2 -2
  648. package/dist/components/select-menu/SelectMenuLabel.js.map +1 -1
  649. package/dist/components/select-menu/SelectMenuSeparator.d.ts +1 -3
  650. package/dist/components/select-menu/SelectMenuSeparator.js +1 -1
  651. package/dist/components/select-menu/SelectMenuSeparator.js.map +1 -1
  652. package/dist/components/select-menu/SelectMenuTrigger.d.ts +1 -1
  653. package/dist/components/select-menu/SelectMenuTrigger.js +5 -6
  654. package/dist/components/select-menu/SelectMenuTrigger.js.map +1 -1
  655. package/dist/components/select-menu-field/SelectMenuField.d.ts +5 -5
  656. package/dist/components/select-menu-field/SelectMenuField.js +2 -2
  657. package/dist/components/select-menu-field/SelectMenuField.js.map +1 -1
  658. package/dist/components/side-bar/{SideBarContext.js → SideBar.context.js} +2 -2
  659. package/dist/components/side-bar/SideBar.context.js.map +1 -0
  660. package/dist/components/side-bar/SideBar.d.ts +24 -35
  661. package/dist/components/side-bar/SideBar.js +14 -12
  662. package/dist/components/side-bar/SideBar.js.map +1 -1
  663. package/dist/components/side-bar/SideBarComponents.d.ts +20 -28
  664. package/dist/components/side-bar/SideBarComponents.js +2 -1
  665. package/dist/components/side-bar/SideBarComponents.js.map +1 -1
  666. package/dist/components/skeleton-loader/Skeleton.d.ts +1 -3
  667. package/dist/components/skeleton-loader/Skeleton.js.map +1 -1
  668. package/dist/components/skeleton-loader/SkeletonBarChart.d.ts +1 -1
  669. package/dist/components/skeleton-loader/SkeletonBarChart.js.map +1 -1
  670. package/dist/components/skeleton-loader/SkeletonButton.d.ts +2 -2
  671. package/dist/components/skeleton-loader/SkeletonButton.js.map +1 -1
  672. package/dist/components/skeleton-loader/SkeletonCard.d.ts +1 -1
  673. package/dist/components/skeleton-loader/SkeletonCard.js.map +1 -1
  674. package/dist/components/skeleton-loader/SkeletonColumnChart.d.ts +1 -1
  675. package/dist/components/skeleton-loader/SkeletonColumnChart.js.map +1 -1
  676. package/dist/components/skeleton-loader/SkeletonDoughnutChart.d.ts +1 -1
  677. package/dist/components/skeleton-loader/SkeletonDoughnutChart.js.map +1 -1
  678. package/dist/components/skeleton-loader/SkeletonHeading.d.ts +2 -2
  679. package/dist/components/skeleton-loader/SkeletonHeading.js.map +1 -1
  680. package/dist/components/skeleton-loader/SkeletonPanelList.d.ts +1 -1
  681. package/dist/components/skeleton-loader/SkeletonPanelList.js.map +1 -1
  682. package/dist/components/skeleton-loader/SkeletonSubjectList.d.ts +1 -1
  683. package/dist/components/skeleton-loader/SkeletonSubjectList.js.map +1 -1
  684. package/dist/components/skeleton-loader/SkeletonTable.d.ts +1 -1
  685. package/dist/components/skeleton-loader/SkeletonTable.js +21 -23
  686. package/dist/components/skeleton-loader/SkeletonTable.js.map +1 -1
  687. package/dist/components/skeleton-loader/SkeletonTabs.d.ts +1 -1
  688. package/dist/components/skeleton-loader/SkeletonTabs.js.map +1 -1
  689. package/dist/components/skeleton-loader/index.js +1 -1
  690. package/dist/components/slider/Slider.d.ts +10 -12
  691. package/dist/components/slider/Slider.js +7 -6
  692. package/dist/components/slider/Slider.js.map +1 -1
  693. package/dist/components/slider/SliderSteps.js.map +1 -1
  694. package/dist/components/slider/SliderValue.js +4 -6
  695. package/dist/components/slider/SliderValue.js.map +1 -1
  696. package/dist/components/slider-field/SliderField.d.ts +9 -9
  697. package/dist/components/slider-field/SliderField.js +4 -4
  698. package/dist/components/slider-field/SliderField.js.map +1 -1
  699. package/dist/components/sortable/Handle.d.ts +12 -11
  700. package/dist/components/sortable/Handle.js +10 -13
  701. package/dist/components/sortable/Handle.js.map +1 -1
  702. package/dist/components/sortable/SortableHandle.d.ts +7 -7
  703. package/dist/components/sortable/SortableHandle.js.map +1 -1
  704. package/dist/components/sortable/SortableItem.d.ts +5 -5
  705. package/dist/components/sortable/SortableItem.js.map +1 -1
  706. package/dist/components/sortable/SortableRoot.d.ts +5 -5
  707. package/dist/components/sortable/SortableRoot.js.map +1 -1
  708. package/dist/components/sortable/index.js +1 -1
  709. package/dist/components/spacer/Spacer.d.ts +1 -3
  710. package/dist/components/spacer/Spacer.js.map +1 -1
  711. package/dist/components/stepper/{stepper-context/StepperContext.d.ts → Stepper.context.d.ts} +1 -1
  712. package/dist/components/stepper/{stepper-context/StepperContext.js → Stepper.context.js} +2 -2
  713. package/dist/components/stepper/Stepper.context.js.map +1 -0
  714. package/dist/components/stepper/Stepper.d.ts +5 -5
  715. package/dist/components/stepper/Stepper.js +2 -2
  716. package/dist/components/stepper/Stepper.js.map +1 -1
  717. package/dist/components/stepper/StepperStepBack.d.ts +2 -2
  718. package/dist/components/stepper/StepperStepBack.js +1 -1
  719. package/dist/components/stepper/StepperStepBack.js.map +1 -1
  720. package/dist/components/stepper/StepperStepBullet.d.ts +2 -4
  721. package/dist/components/stepper/StepperStepBullet.js.map +1 -1
  722. package/dist/components/stepper/StepperStepContainer.d.ts +3 -5
  723. package/dist/components/stepper/StepperStepContainer.js.map +1 -1
  724. package/dist/components/stepper/StepperStepForward.d.ts +2 -2
  725. package/dist/components/stepper/StepperStepForward.js +1 -1
  726. package/dist/components/stepper/StepperStepForward.js.map +1 -1
  727. package/dist/components/stepper/StepperStepLabel.d.ts +7 -13
  728. package/dist/components/stepper/StepperStepLabel.js.map +1 -1
  729. package/dist/components/stepper/StepperSteps.d.ts +2 -2
  730. package/dist/components/stepper/StepperSteps.js +1 -1
  731. package/dist/components/stepper/StepperSteps.js.map +1 -1
  732. package/dist/components/stepper/types.d.ts +3 -3
  733. package/dist/components/stepper/types.js.map +1 -1
  734. package/dist/components/switch/Switch.d.ts +6 -8
  735. package/dist/components/switch/Switch.js.map +1 -1
  736. package/dist/components/table/Table.d.ts +15 -27
  737. package/dist/components/table/Table.js +4 -5
  738. package/dist/components/table/Table.js.map +1 -1
  739. package/dist/components/table/TableBody.d.ts +5 -7
  740. package/dist/components/table/TableBody.js.map +1 -1
  741. package/dist/components/table/TableCell.d.ts +1 -3
  742. package/dist/components/table/TableCell.js.map +1 -1
  743. package/dist/components/table/TableFooter.d.ts +1 -3
  744. package/dist/components/table/TableFooter.js.map +1 -1
  745. package/dist/components/table/TableFooterCell.d.ts +1 -3
  746. package/dist/components/table/TableFooterCell.js.map +1 -1
  747. package/dist/components/table/TableHeader.d.ts +12 -14
  748. package/dist/components/table/TableHeader.js +2 -2
  749. package/dist/components/table/TableHeader.js.map +1 -1
  750. package/dist/components/table/TableHeaderCell.d.ts +1 -3
  751. package/dist/components/table/TableHeaderCell.js.map +1 -1
  752. package/dist/components/table/TableRow.d.ts +3 -3
  753. package/dist/components/table/TableRow.js +2 -6
  754. package/dist/components/table/TableRow.js.map +1 -1
  755. package/dist/components/table/TableStickyColumnsContainer.d.ts +1 -1
  756. package/dist/components/table/TableStickyColumnsContainer.js +3 -3
  757. package/dist/components/table/TableStickyColumnsContainer.js.map +1 -1
  758. package/dist/components/table/useStickyColumnsCss.d.ts +2 -2
  759. package/dist/components/table/useStickyColumnsCss.js.map +1 -1
  760. package/dist/components/tabs/Tabs.d.ts +7 -15
  761. package/dist/components/tabs/Tabs.js +4 -4
  762. package/dist/components/tabs/Tabs.js.map +1 -1
  763. package/dist/components/tabs/TabsContent.d.ts +1 -3
  764. package/dist/components/tabs/TabsContent.js.map +1 -1
  765. package/dist/components/tabs/TabsTrigger.d.ts +4 -4
  766. package/dist/components/tabs/TabsTrigger.js +3 -4
  767. package/dist/components/tabs/TabsTrigger.js.map +1 -1
  768. package/dist/components/tabs/TabsTriggerList.d.ts +9 -11
  769. package/dist/components/tabs/TabsTriggerList.js +8 -9
  770. package/dist/components/tabs/TabsTriggerList.js.map +1 -1
  771. package/dist/components/text/Text.d.ts +6 -10
  772. package/dist/components/text/Text.js +7 -11
  773. package/dist/components/text/Text.js.map +1 -1
  774. package/dist/components/textarea/Textarea.d.ts +3 -13
  775. package/dist/components/textarea/Textarea.js +3 -9
  776. package/dist/components/textarea/Textarea.js.map +1 -1
  777. package/dist/components/textarea-field/TextareaField.d.ts +6 -6
  778. package/dist/components/textarea-field/TextareaField.js +2 -2
  779. package/dist/components/textarea-field/TextareaField.js.map +1 -1
  780. package/dist/components/tile/Tile.d.ts +8 -10
  781. package/dist/components/tile/Tile.js +5 -6
  782. package/dist/components/tile/Tile.js.map +1 -1
  783. package/dist/components/tile-interactive/TileInteractive.d.ts +12 -11
  784. package/dist/components/tile-interactive/TileInteractive.js +3 -4
  785. package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
  786. package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +12 -12
  787. package/dist/components/tile-toggle-group/TileToggleGroupItem.js.map +1 -1
  788. package/dist/components/tile-toggle-group/TileToggleGroupRoot.d.ts +4 -5
  789. package/dist/components/tile-toggle-group/TileToggleGroupRoot.js +3 -3
  790. package/dist/components/tile-toggle-group/TileToggleGroupRoot.js.map +1 -1
  791. package/dist/components/tile-toggle-group/index.d.ts +2 -2
  792. package/dist/components/tile-toggle-group/index.js +0 -1
  793. package/dist/components/tile-toggle-group/index.js.map +1 -1
  794. package/dist/components/toast/{ToastContext.d.ts → Toast.context.d.ts} +2 -2
  795. package/dist/components/toast/{ToastContext.js → Toast.context.js} +2 -2
  796. package/dist/components/toast/Toast.context.js.map +1 -0
  797. package/dist/components/toast/Toast.d.ts +3 -6
  798. package/dist/components/toast/Toast.js +7 -5
  799. package/dist/components/toast/Toast.js.map +1 -1
  800. package/dist/components/toast/ToastCloseButton.js +1 -1
  801. package/dist/components/toast/ToastCloseButton.js.map +1 -1
  802. package/dist/components/toast/ToastIcon.d.ts +1 -1
  803. package/dist/components/toast/ToastIcon.js.map +1 -1
  804. package/dist/components/toast/ToastProvider.d.ts +7 -7
  805. package/dist/components/toast/ToastProvider.js +3 -3
  806. package/dist/components/toast/ToastProvider.js.map +1 -1
  807. package/dist/components/toast/index.d.ts +12 -0
  808. package/dist/components/toast/index.js +8 -0
  809. package/dist/components/toast/index.js.map +1 -0
  810. package/dist/components/toggle-group/ToggleGroupButton.d.ts +5 -13
  811. package/dist/components/toggle-group/ToggleGroupButton.js +4 -4
  812. package/dist/components/toggle-group/ToggleGroupButton.js.map +1 -1
  813. package/dist/components/toggle-group/ToggleGroupItem.d.ts +2 -4
  814. package/dist/components/toggle-group/ToggleGroupItem.js +1 -1
  815. package/dist/components/toggle-group/ToggleGroupItem.js.map +1 -1
  816. package/dist/components/toggle-group/ToggleGroupRoot.d.ts +5 -20
  817. package/dist/components/toggle-group/ToggleGroupRoot.js +3 -3
  818. package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -1
  819. package/dist/components/toggle-group/index.d.ts +6 -25
  820. package/dist/components/toggle-group/index.js.map +1 -1
  821. package/dist/components/tooltip/Tooltip.d.ts +5 -5
  822. package/dist/components/tooltip/Tooltip.js +3 -3
  823. package/dist/components/tooltip/Tooltip.js.map +1 -1
  824. package/dist/components/tooltip/TooltipContent.d.ts +3 -5
  825. package/dist/components/tooltip/TooltipContent.js +2 -2
  826. package/dist/components/tooltip/TooltipContent.js.map +1 -1
  827. package/dist/components/top-bar/TopBar.colorscheme.config.js.map +1 -1
  828. package/dist/components/top-bar/TopBar.d.ts +23 -34
  829. package/dist/components/top-bar/TopBar.js +2 -2
  830. package/dist/components/top-bar/TopBar.js.map +1 -1
  831. package/dist/components/top-bar/TopBarActionIcon.d.ts +2 -2
  832. package/dist/components/top-bar/TopBarActionIcon.js +8 -10
  833. package/dist/components/top-bar/TopBarActionIcon.js.map +1 -1
  834. package/dist/components/top-bar/TopBarBrand.d.ts +9 -17
  835. package/dist/components/top-bar/TopBarBrand.js +5 -7
  836. package/dist/components/top-bar/TopBarBrand.js.map +1 -1
  837. package/dist/components/tree/Tree.d.ts +30 -29
  838. package/dist/components/tree/Tree.js +8 -10
  839. package/dist/components/tree/Tree.js.map +1 -1
  840. package/dist/components/tree/TreeCollapsible.d.ts +4 -4
  841. package/dist/components/tree/TreeCollapsible.js +4 -6
  842. package/dist/components/tree/TreeCollapsible.js.map +1 -1
  843. package/dist/components/tree/TreeCollapsibleContent.d.ts +5 -3
  844. package/dist/components/tree/TreeCollapsibleContent.js +4 -4
  845. package/dist/components/tree/TreeCollapsibleContent.js.map +1 -1
  846. package/dist/components/tree/TreeCollapsibleTrigger.d.ts +3 -3
  847. package/dist/components/tree/TreeCollapsibleTrigger.js +4 -4
  848. package/dist/components/tree/TreeCollapsibleTrigger.js.map +1 -1
  849. package/dist/components/tree/TreeIcon.d.ts +2 -2
  850. package/dist/components/tree/TreeIcon.js +2 -2
  851. package/dist/components/tree/TreeIcon.js.map +1 -1
  852. package/dist/components/tree/TreeItem.d.ts +1 -1
  853. package/dist/components/tree/TreeItem.js +4 -6
  854. package/dist/components/tree/TreeItem.js.map +1 -1
  855. package/dist/components/tree/TreeItemContent.d.ts +4 -3
  856. package/dist/components/tree/TreeItemContent.js +6 -3
  857. package/dist/components/tree/TreeItemContent.js.map +1 -1
  858. package/dist/components/tree/TreeList.d.ts +1 -3
  859. package/dist/components/tree/TreeList.js.map +1 -1
  860. package/dist/components/tree/TreeListItem.d.ts +3 -1
  861. package/dist/components/tree/TreeListItem.js +4 -4
  862. package/dist/components/tree/TreeListItem.js.map +1 -1
  863. package/dist/components/tree/TreeText.d.ts +4 -4
  864. package/dist/components/tree/TreeText.js.map +1 -1
  865. package/dist/components/video/Video.d.ts +3 -2
  866. package/dist/components/video/Video.js +4 -5
  867. package/dist/components/video/Video.js.map +1 -1
  868. package/dist/docgen.json +1 -1
  869. package/dist/experiments/color-scheme/ColorScheme.config.js +1 -1
  870. package/dist/experiments/color-scheme/ColorScheme.config.js.map +1 -1
  871. package/dist/experiments/color-scheme/ColorScheme.d.ts +7 -3
  872. package/dist/experiments/color-scheme/ColorScheme.js +3 -4
  873. package/dist/experiments/color-scheme/ColorScheme.js.map +1 -1
  874. package/dist/index.cjs.js +1919 -1817
  875. package/dist/index.cjs.js.map +1 -1
  876. package/dist/index.d.ts +1 -1
  877. package/dist/index.js +14 -13
  878. package/dist/styled.d.ts +43 -9
  879. package/dist/styled.js +9 -7
  880. package/dist/styled.js.map +1 -1
  881. package/dist/types/navigatorActions.types.d.ts +1 -1
  882. package/dist/types/polymorphicComponentProp.types.d.ts +15 -32
  883. package/dist/utilities/css-wrapper/CSSWrapper.d.ts +4 -4
  884. package/dist/utilities/css-wrapper/CSSWrapper.js.map +1 -1
  885. package/dist/utilities/event/preventEvent.js.map +1 -1
  886. package/dist/utilities/hooks/useCallbackRef.js +5 -1
  887. package/dist/utilities/hooks/useCallbackRef.js.map +1 -1
  888. package/dist/utilities/hooks/useIsMountedRef.js.map +1 -1
  889. package/dist/utilities/hooks/useResizeObserver.d.ts +3 -3
  890. package/dist/utilities/hooks/useResizeObserver.js.map +1 -1
  891. package/dist/utilities/hooks/useScrollPosition.d.ts +3 -3
  892. package/dist/utilities/hooks/useScrollPosition.js.map +1 -1
  893. package/dist/utilities/hooks/useSize.js.map +1 -1
  894. package/dist/utilities/hooks/useWindowScrollPosition.d.ts +3 -3
  895. package/dist/utilities/hooks/useWindowScrollPosition.js.map +1 -1
  896. package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.d.ts +5 -5
  897. package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js.map +1 -1
  898. package/dist/utilities/override-styled-variant-value/overrideStyledVariantValue.js.map +1 -1
  899. package/dist/utilities/radix-overrides/toggle-group/ToggleGroupRoot.d.ts +2 -1
  900. package/dist/utilities/radix-overrides/toggle-group/ToggleGroupRoot.js +2 -2
  901. package/dist/utilities/radix-overrides/toggle-group/ToggleGroupRoot.js.map +1 -1
  902. package/dist/utilities/radix-overrides/toggle-group/index.d.ts +2 -4
  903. package/dist/utilities/radix-overrides/toggle-group/index.js.map +1 -1
  904. package/dist/utilities/style/backdrop-overlay.js.map +1 -1
  905. package/dist/utilities/style/get-icon-size.js.map +1 -1
  906. package/dist/utilities/uri/index.js +5 -3
  907. package/dist/utilities/uri/index.js.map +1 -1
  908. package/package.json +12 -14
  909. package/scripts/generate-responsive-variant-classes.mjs +1 -1
  910. package/dist/components/alert-dialog/alert-context/AlertContext.js.map +0 -1
  911. package/dist/components/avatar/AvatarContext.d.ts +0 -6
  912. package/dist/components/avatar/AvatarContext.js.map +0 -1
  913. package/dist/components/banner/BannerContext.d.ts +0 -19
  914. package/dist/components/banner/BannerContext.js.map +0 -1
  915. package/dist/components/checkbox-group/context/CheckboxGroupChecked.context.js.map +0 -1
  916. package/dist/components/checkbox-group/context/CheckboxGroupMounted.context.js.map +0 -1
  917. package/dist/components/data-table/DataTableContext.js.map +0 -1
  918. package/dist/components/file-drop/FileDropContext.d.ts +0 -3
  919. package/dist/components/file-drop/FileDropContext.js +0 -10
  920. package/dist/components/file-drop/FileDropContext.js.map +0 -1
  921. package/dist/components/navigation/NavigationMenuContext.js +0 -12
  922. package/dist/components/navigation/NavigationMenuContext.js.map +0 -1
  923. package/dist/components/pagination/pagination-context/PaginationContext.js.map +0 -1
  924. package/dist/components/section-message/SectionMessageContext.js.map +0 -1
  925. package/dist/components/segmented-control/SegmentedControlContext.js.map +0 -1
  926. package/dist/components/select-menu/SelectMenuContext.js.map +0 -1
  927. package/dist/components/side-bar/SideBarContext.js.map +0 -1
  928. package/dist/components/stepper/stepper-context/StepperContext.js.map +0 -1
  929. package/dist/components/toast/ToastContext.js.map +0 -1
  930. /package/dist/components/segmented-control/{SegmentedControlContext.d.ts → SegmentedControl.context.d.ts} +0 -0
  931. /package/dist/components/select-menu/{SelectMenuContext.d.ts → SelectMenu.context.d.ts} +0 -0
  932. /package/dist/components/side-bar/{SideBarContext.d.ts → SideBar.context.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","names":[],"sources":["../src/styled.tsx","../src/utilities/css-wrapper/CSSWrapper.tsx","../src/components/accordion/AccordionContent.tsx","../src/components/accordion/AccordionItem.tsx","../src/experiments/color-scheme/ColorScheme.config.ts","../src/experiments/color-scheme/ColorScheme.tsx","../src/components/icon/Icon.tsx","../src/components/accordion/AccordionTrigger.tsx","../src/components/accordion/Accordion.tsx","../src/components/tooltip/TooltipContent.tsx","../src/components/tooltip/Tooltip.tsx","../src/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.tsx","../src/utilities/uri/index.ts","../src/components/action-icon/ActionIcon.constants.ts","../src/components/action-icon/ActionIcon.tsx","../src/components/alert-dialog/AlertDialogContent.tsx","../src/components/alert-dialog/AlertDialog.tsx","../src/utilities/hooks/useIsMountedRef.ts","../src/components/loader/Loader.tsx","../src/components/button/Button.tsx","../src/components/heading/Heading.tsx","../src/components/text/Text.tsx","../src/components/alert-dialog/alert-context/AlertDialogIcon.tsx","../src/components/alert-dialog/alert-context/AlertDialog.tsx","../src/components/alert-dialog/alert-context/reducer.ts","../src/components/alert-dialog/alert-context/AlertContext.tsx","../src/components/avatar/AvatarContext.tsx","../src/utilities/override-styled-variant-value/overrideStyledVariantValue.ts","../src/components/avatar/AvatarIcon.tsx","../src/components/image/Image.tsx","../src/components/avatar/AvatarPlaceholder.tsx","../src/components/avatar/AvatarInitial.tsx","../src/components/avatar/AvatarImage.tsx","../src/components/avatar/Avatar.tsx","../src/utilities/hooks/useCallbackRef.ts","../src/components/badge/Badge.colorscheme.config.ts","../src/components/badge/Badge.context.tsx","../src/components/badge/BadgeIcon.tsx","../src/utilities/hooks/useResizeObserver.ts","../src/components/badge/BadgeText.tsx","../src/components/badge/Badge.tsx","../src/components/dismissible/DismissibleRoot.tsx","../src/components/dismissible/DismissibleTrigger.tsx","../src/components/dismissible/index.ts","../src/components/banner/BannerContext.tsx","../src/components/banner/Banner.tsx","../src/components/banner/banner-regular/BannerRegularButton.tsx","../src/components/banner/banner-regular/BannerRegularActions.tsx","../src/components/banner/BannerContainer.tsx","../src/components/banner/banner-regular/BannerRegularContainer.tsx","../src/components/banner/banner-regular/BannerRegularContent.tsx","../src/components/banner/banner-regular/BannerRegularDismiss.tsx","../src/components/banner/banner-regular/BannerRegularHeading.tsx","../src/components/banner/banner-regular/BannerRegularImage.tsx","../src/components/banner/banner-regular/BannerRegularText.tsx","../src/components/banner/banner-regular/BannerRegular.tsx","../src/components/banner/banner-slim/BannerSlimActions.tsx","../src/components/banner/banner-slim/BannerSlimButton.tsx","../src/components/banner/banner-slim/BannerSlimContainer.tsx","../src/components/banner/banner-slim/BannerSlimContent.tsx","../src/components/banner/banner-slim/BannerSlimDismiss.tsx","../src/components/banner/banner-slim/BannerSlimImage.tsx","../src/components/banner/banner-slim/BannerSlimText.tsx","../src/components/banner/banner-slim/BannerSlim.tsx","../src/components/box/Box.tsx","../src/components/carousel/CarouselArrows.tsx","../src/components/carousel/CarouselPagination.tsx","../src/components/carousel/CarouselSlider.tsx","../src/components/carousel/CarouselSlide.tsx","../src/components/carousel/Carousel.tsx","../src/components/checkbox/Checkbox.tsx","../src/components/checkbox-group/context/CheckboxGroupChecked.context.tsx","../src/components/checkbox-group/context/CheckboxGroupMounted.context.tsx","../src/components/checkbox-group/CheckboxGroupAllItem.tsx","../src/components/checkbox-group/CheckboxGroupItem.tsx","../src/components/checkbox-group/CheckboxGroupSub.tsx","../src/components/checkbox-group/CheckboxGroup.tsx","../src/components/tree/TreeListItem.tsx","../src/components/tree/TreeCollapsible.tsx","../src/components/tree/TreeList.tsx","../src/components/tree/TreeCollapsibleContent.tsx","../src/components/tree/TreeIcon.tsx","../src/components/tree/TreeText.tsx","../src/components/tree/TreeItemContent.tsx","../src/components/tree/TreeCollapsibleTrigger.tsx","../src/components/tree/TreeItem.tsx","../src/components/tree/Tree.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsible.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleContent.tsx","../src/components/checkbox-tree/CheckboxTreeItemContent.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.tsx","../src/components/checkbox-tree/CheckboxTreeItem.tsx","../src/components/checkbox-tree/CheckboxTree.tsx","../src/components/inline-message/InlineMessage.config.ts","../src/components/inline-message/InlineMessage.tsx","../src/components/label/Label.tsx","../src/components/radio-button/RadioButton.tsx","../src/components/field-wrapper/FieldDescription.tsx","../src/components/field-wrapper/InlineFieldWrapper.tsx","../src/components/form/useFieldError.ts","../src/components/checkbox-field/CheckboxField.tsx","../src/components/chip/Chip.tsx","../src/components/chip/ChipGroup.tsx","../src/components/dismissible-group/DismissibleGroupRoot.tsx","../src/components/dismissible-group/DismissibleGroupItem.tsx","../src/components/dismissible-group/index.ts","../src/components/chip-dismissible-group/ChipDismissibleGroupItem.tsx","../src/components/chip-dismissible-group/ChipDismissibleGroupRoot.tsx","../src/components/chip-dismissible-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupItem.tsx","../src/utilities/radix-overrides/toggle-group/ToggleGroupRoot.tsx","../src/utilities/radix-overrides/toggle-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupRoot.tsx","../src/components/chip-toggle-group/index.ts","../src/components/combobox/ComboboxInput.tsx","../src/components/combobox/ComboboxList.tsx","../src/components/combobox/ComboboxOption.tsx","../src/components/combobox/ComboboxPopover.tsx","../src/components/combobox/Combobox.tsx","../src/components/link/Link.tsx","../src/components/field-wrapper/FieldWrapper.tsx","../src/components/form/useFormCustomContext.ts","../src/components/input/Input.tsx","../src/utilities/style/get-icon-size.ts","../src/components/password-input/PasswordInput.tsx","../src/components/password-field/PasswordField.tsx","../src/components/create-password-field/CreatePasswordField.tsx","../src/components/table/TableBody.tsx","../src/components/table/TableCell.tsx","../src/components/table/TableFooter.tsx","../src/components/table/TableFooterCell.tsx","../src/components/table/TableHeader.tsx","../src/components/table/TableHeaderCell.tsx","../src/components/table/TableRow.tsx","../src/components/table/useStickyColumnsCss.ts","../src/components/table/TableStickyColumnsContainer.tsx","../src/components/table/Table.tsx","../src/components/data-table/DataTable.types.ts","../src/components/data-table/getNewAsyncData.ts","../src/components/data-table/usePagination.ts","../src/components/data-table/useSorting.ts","../src/components/data-table/DataTableContext.tsx","../src/components/data-table/DataTableDataCell.tsx","../src/components/data-table/DataTableRowSelectionCheckbox.tsx","../src/components/data-table/DataTableRow.tsx","../src/components/data-table/DataTableBody.tsx","../src/components/divider/Divider.tsx","../src/components/data-table/DataTableMetaData.tsx","../src/components/data-table/DataTableBulkActions.tsx","../src/components/data-table/DataTableBulkActionsSelectedRowActions.tsx","../src/components/data-table/DataTableBulkActionsFloating.tsx","../src/components/empty-state/EmptyState.context.tsx","../src/components/empty-state/EmptyStateBody.tsx","../src/components/empty-state/EmptyStateImage.tsx","../src/components/empty-state/EmptyStateTitle.tsx","../src/components/empty-state/EmptyState.tsx","../src/components/data-table/DataTableEmptyState.tsx","../src/components/data-table/DataTableError.tsx","../src/components/search-input/SearchInput.tsx","../src/components/data-table/DataTableGlobalFilter.tsx","../src/components/data-table/DataTableHeaderCell.tsx","../src/components/data-table/DataTableSelectAllRowsCheckbox.tsx","../src/components/data-table/DataTableHead.tsx","../src/components/data-table/DataTableLoading.tsx","../src/components/data-table/DataTableTable.tsx","../src/components/sortable/Handle.tsx","../src/components/sortable/SortableHandle.tsx","../src/components/sortable/SortableItem.tsx","../src/components/sortable/SortableRoot.tsx","../src/components/sortable/index.ts","../src/components/data-table/drag-and-drop/DragAndDropTableRow.tsx","../src/components/data-table/drag-and-drop/DragAndDropTableBody.tsx","../src/components/data-table/drag-and-drop/DragAndDropTable.tsx","../src/components/pagination/pagination.constants.ts","../src/components/pagination/pagination.helper.ts","../src/components/pagination/pagination-context/PaginationContext.tsx","../src/components/pagination/usePagination.tsx","../src/components/pagination/PaginationNextButton.tsx","../src/components/pagination/PaginationPage.tsx","../src/components/popover/PopoverContent.tsx","../src/components/popover/Popover.tsx","../src/components/pagination/PaginationPopover.tsx","../src/components/pagination/PaginationPreviousButton.tsx","../src/components/pagination/PaginationItems.tsx","../src/components/pagination/Pagination.tsx","../src/components/data-table/pagination/Pagination.tsx","../src/components/data-table/DataTable.tsx","../src/components/calendar/constants.ts","../src/components/calendar/Day.tsx","../src/components/calendar/Calendar.tsx","../src/components/date-input/constants.ts","../src/components/date-input/DateInput.tsx","../src/components/date-field/DateField.tsx","../src/components/dialog/DialogActionBar.tsx","../src/components/dialog/DialogBackground.tsx","../src/components/dialog/DialogClose.tsx","../src/utilities/style/backdrop-overlay.ts","../src/components/dialog/DialogContent.tsx","../src/components/dialog/DialogFooter.tsx","../src/components/dialog/DialogHeading.tsx","../src/components/dialog/DialogNavigationBar.tsx","../src/components/dialog/DialogScrollableContent.tsx","../src/components/dialog/Dialog.tsx","../src/components/drawer/Drawer.context.tsx","../src/components/drawer/DrawerClose.tsx","../src/components/drawer/DrawerOverlay.tsx","../src/components/drawer/DrawerContent.tsx","../src/components/drawer/DrawerFooter.tsx","../src/components/drawer/DrawerHeader.tsx","../src/components/drawer/DrawerMain.tsx","../src/components/drawer/DrawerTrigger.tsx","../src/components/drawer/Drawer.tsx","../src/components/dropdown-menu/DropdownMenuContent.tsx","../src/components/dropdown-menu/DropdownMenuItem.tsx","../src/components/dropdown-menu/DropdownMenuLabel.tsx","../src/components/dropdown-menu/DropdownMenuLinkItem.tsx","../src/components/dropdown-menu/DropdownMenuSeparator.tsx","../src/components/dropdown-menu/DropdownMenuTrigger.tsx","../src/components/dropdown-menu/DropdownMenu.tsx","../src/components/file-input/FileInput.tsx","../src/components/flex/Flex.tsx","../src/components/form/Form.tsx","../src/components/grid/Grid.tsx","../src/components/input-field/InputField.tsx","../src/components/list/List.tsx","../src/components/markdown-content/components/MarkdownCode.tsx","../src/components/markdown-content/components/MarkdownEmphasis.tsx","../src/components/markdown-content/components/MarkdownHeading.tsx","../src/components/markdown-content/components/MarkdownImage.tsx","../src/components/markdown-content/components/MarkdownInlineCode.tsx","../src/components/markdown-content/components/MarkdownLink.tsx","../src/components/markdown-content/components/MarkdownList.tsx","../src/components/markdown-content/components/MarkdownListItem.tsx","../src/components/markdown-content/components/MarkdownParagraph.tsx","../src/components/markdown-content/components/MarkdownStrong.tsx","../src/components/markdown-content/components/MarkdownText.tsx","../src/components/markdown-content/components/MarkdownThematicBreak.tsx","../src/components/markdown-content/MarkdownContent.tsx","../src/components/navigation/NavigationMenu.colorscheme.config.ts","../src/components/navigation/NavigationMenuContext.tsx","../src/utilities/event/preventEvent.ts","../src/components/navigation/NavigationMenuDropdownContent.tsx","../src/components/navigation/NavigationMenu.styles.ts","../src/components/navigation/NavigationMenuDropdownTrigger.tsx","../src/components/navigation/NavigationMenuDropdown.tsx","../src/components/navigation/NavigationMenuLink.tsx","../src/components/navigation/NavigationMenuDropdownItem.tsx","../src/components/navigation/NavigationMenu.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.colorscheme.config.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalItem.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalList.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalIcon.tsx","../src/components/side-bar/SideBarContext.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalText.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.tsx","../src/components/notification-badge/NotificationBadge.tsx","../src/components/number-input/NumberInputStepper.tsx","../src/components/number-input/NumberInput.tsx","../src/components/number-input-field/NumberInputField.tsx","../src/components/progress-bar/ProgressBar.tsx","../src/components/radio-button/RadioButtonGroup.tsx","../src/components/radio-button-field/RadioField.tsx","../src/components/radio-button-field/RadioButtonField.tsx","../src/components/radio-card/RadioCard.tsx","../src/components/radio-card/RadioCardGroup.tsx","../src/components/search-field/SearchField.tsx","../src/components/section-message/SectionMessageContext.tsx","../src/components/section-message/SectionMessageDescription.tsx","../src/components/section-message/SectionMessageDismiss.tsx","../src/components/section-message/SectionMessageIcon.tsx","../src/components/section-message/SectionMessageLayout.tsx","../src/components/section-message/SectionMessageTitle.tsx","../src/components/section-message/SectionMessage.tsx","../src/components/select/Select.tsx","../src/components/select-field/SelectField.tsx","../src/components/select-menu/SelectMenuContent.tsx","../src/components/select-menu/SelectMenuContext.tsx","../src/components/select-menu/SelectMenuItem.tsx","../src/components/select-menu/SelectMenuLabel.tsx","../src/components/select-menu/SelectMenuSeparator.tsx","../src/components/select-menu/SelectMenuTrigger.tsx","../src/components/select-menu/SelectMenu.tsx","../src/components/select-menu-field/SelectMenuField.tsx","../src/components/side-bar/SideBarComponents.tsx","../src/components/side-bar/SideBar.tsx","../src/components/slider/SliderSteps.tsx","../src/components/slider/SliderValue.tsx","../src/components/slider/Slider.tsx","../src/components/slider-field/SliderField.tsx","../src/components/skeleton-loader/Skeleton.tsx","../src/components/skeleton-loader/SkeletonHeading.tsx","../src/components/skeleton-loader/SkeletonButton.tsx","../src/components/tile/Tile.tsx","../src/components/skeleton-loader/SkeletonTabs.tsx","../src/components/skeleton-loader/SkeletonDoughnutChart.tsx","../src/components/skeleton-loader/SkeletonTable.tsx","../src/components/skeleton-loader/SkeletonCard.tsx","../src/components/skeleton-loader/SkeletonColumnChart.tsx","../src/components/skeleton-loader/SkeletonBarChart.tsx","../src/components/skeleton-loader/SkeletonPanelList.tsx","../src/components/skeleton-loader/SkeletonSubjectList.tsx","../src/components/skeleton-loader/index.ts","../src/components/spacer/Spacer.tsx","../src/components/stepper/stepper-context/StepperContext.tsx","../src/components/stepper/StepperStepBack.tsx","../src/components/stepper/StepperStepForward.tsx","../src/components/stepper/StepperStepBullet.tsx","../src/components/stepper/StepperStepContainer.tsx","../src/components/stepper/StepperStepLabel.tsx","../src/components/stepper/types.ts","../src/components/stepper/StepperSteps.tsx","../src/components/stepper/Stepper.tsx","../src/components/switch/Switch.tsx","../src/components/tabs/TabsContent.tsx","../src/components/tabs/TabsTrigger.tsx","../src/utilities/hooks/useScrollPosition.ts","../src/utilities/hooks/useSize.ts","../src/components/tabs/TabsTriggerList.tsx","../src/components/tabs/Tabs.tsx","../src/components/textarea/Textarea.tsx","../src/components/textarea-field/TextareaField.tsx","../src/components/tile-interactive/TileInteractive.tsx","../src/components/tile-toggle-group/TileToggleGroupItem.tsx","../src/components/tile-toggle-group/TileToggleGroupRoot.tsx","../src/components/tile-toggle-group/index.ts","../src/components/toast/ToastContext.tsx","../src/components/toast/ToastCloseButton.tsx","../src/components/toast/ToastIcon.tsx","../src/components/toast/Toast.tsx","../src/components/toast/ToastProvider.tsx","../src/components/toggle-group/ToggleGroupItem.tsx","../src/components/toggle-group/ToggleGroupButton.tsx","../src/components/toggle-group/ToggleGroupRoot.tsx","../src/components/toggle-group/index.ts","../src/utilities/hooks/useWindowScrollPosition.ts","../src/components/top-bar/TopBar.colorscheme.config.ts","../src/components/top-bar/TopBarActionIcon.tsx","../src/components/top-bar/TopBarBrand.tsx","../src/components/top-bar/TopBar.tsx","../src/components/video/Video.tsx","../src/components/keyboard-shortcut/KeyboardShortcut.tsx","../src/components/keyboard-shortcut/index.ts","../src/components/segmented-control/SegmentedControlContext.tsx","../src/components/segmented-control/SegmentedControlBadge.tsx","../src/components/segmented-control/SegmentedControlContent.tsx","../src/components/segmented-control/SegmentedControlDescription.tsx","../src/components/segmented-control/SegmentedControlHeading.tsx","../src/components/segmented-control/SegmentedControlIcon.tsx","../src/components/segmented-control/SegmentedControlItem.tsx","../src/components/segmented-control/SegmentedControlItemList.tsx","../src/components/segmented-control/SegmentedControlRoot.tsx","../src/components/segmented-control/SegmentedControl.tsx","../src/components/file-drop/FileDropContext.ts","../src/components/file-drop/FileDrop.tsx","../src/components/file-drop/useFileDrop.ts"],"sourcesContent":["import clsx, { type ClassValue } from 'clsx'\nimport React, { ElementType, ReactElement } from 'react'\nimport { extendTailwindMerge } from 'tailwind-merge'\nimport { defaultConfig, tv } from 'tailwind-variants'\n\ndefaultConfig.twMerge = false\n\nconst isArbitraryNumber = (value: string) =>\n /^\\[[\\d.]+\\]$/.test(value) || !Number.isNaN(Number(value))\n\nconst twMerge = extendTailwindMerge<\n 'capsize' | 'capsize-before' | 'capsize-after'\n>({\n extend: {\n classGroups: {\n capsize: [{ capsize: ['none', isArbitraryNumber] }],\n 'capsize-before': [{ 'capsize-before': [isArbitraryNumber] }],\n 'capsize-after': [{ 'capsize-after': [isArbitraryNumber] }]\n },\n conflictingClassGroups: {\n capsize: ['capsize-before', 'capsize-after'],\n 'capsize-before': ['capsize'],\n 'capsize-after': ['capsize']\n }\n }\n})\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs))\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\n\nexport const Theme = ({\n children,\n theme\n}: React.PropsWithChildren<{ theme?: Record<string, string> }>) => (\n <div className=\"contents\" style={theme}>\n {children}\n </div>\n)\n\nexport const createTheme = (config: Record<string, Record<string, string>>) =>\n Object.fromEntries(\n Object.values(config).flatMap((tokens) =>\n Object.entries(tokens).map(([token, value]) => [`--${token}`, value])\n )\n )\n\n// ---------------------------------------------------------------------------\n// Local typing for styled()\n// ---------------------------------------------------------------------------\n\n// Responsive variant prop: either a single value or a per-breakpoint map\n// Each breakpoint can have a different value from the union type V\ntype ResponsiveVariant<V extends string | number | boolean> =\n | V\n | Partial<Record<Breakpoint, V>>\n\n// Helpers to derive value type from variant config keys\ntype Keys<V> = keyof V\ntype StringKeys<V> = Extract<Keys<V>, string>\ntype NumberKeys<V> = Extract<Keys<V>, number>\n// Booleans are represented as string keys \"true\"/\"false\" in our VariantConfig,\n// so we only need to detect those in StringKeys.\ntype BooleanKeys<V> = Extract<StringKeys<V>, 'true' | 'false'>\n\ntype HasBoolLikeKeys<V> =\n BooleanKeys<V> extends never\n ? Extract<StringKeys<V>, 'true' | 'false'> extends never\n ? false\n : true\n : true\n\n// If a variant's keys are boolean-like, expose the prop as boolean.\n// If it has numeric keys, allow those numbers and their string forms.\n// Otherwise use a string union of the keys.\ntype VariantValueType<V> =\n HasBoolLikeKeys<V> extends true\n ? boolean\n : [NumberKeys<V>] extends [never]\n ? StringKeys<V>\n : NumberKeys<V> | `${NumberKeys<V>}`\n\n// Shape of the `variants` section passed to styled()\ntype VariantConfig = Record<string, Record<string | number, string | string[]>>\n\n// Options for styled() function\ntype StyledOptions = {\n enabledResponsiveVariants?: boolean\n}\n\n// Helper to check if responsive variants are enabled\ntype AreResponsiveVariantsEnabled<O> = O extends {\n enabledResponsiveVariants: true\n}\n ? true\n : false\n\n// Props derived from a `variants` config\n// If enabledResponsiveVariants is true, all variants support responsive values\n// If enabledResponsiveVariants is not provided or false, variants do not support responsive values\ntype VariantProps<\n V extends VariantConfig | undefined,\n R extends boolean = false\n> = V extends VariantConfig\n ? R extends true\n ? {\n [K in keyof V]?: ResponsiveVariant<VariantValueType<V[K]>>\n }\n : {\n [K in keyof V]?: VariantValueType<V[K]>\n }\n : unknown\n\n// Typed config for our styled helper.\n// We intentionally *don't* rely on tailwind-variants' TS types here;\n// we only care about enough structure to derive props.\ntype StyledConfig<V extends VariantConfig | undefined = undefined> = {\n base?: string | string[]\n variants?: V\n compoundVariants?: Array<\n {\n class?: string | string[]\n } & (V extends VariantConfig\n ? {\n [K in keyof V]?: VariantValueType<V[K]> | VariantValueType<V[K]>[]\n }\n : Record<string, never>)\n >\n defaultVariants?: V extends VariantConfig\n ? { [K in keyof V]?: VariantValueType<V[K]> }\n : Record<string, never>\n}\n\n// Function overloads for better type inference\nexport function styled<TElement extends ElementType, V extends VariantConfig>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enabledResponsiveVariants: true }\n): React.ForwardRefExoticComponent<\n Omit<React.ComponentPropsWithRef<TElement>, keyof V> &\n VariantProps<V, true> & { as?: ElementType }\n>\n\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>\n): React.ForwardRefExoticComponent<\n Omit<\n React.ComponentPropsWithRef<TElement>,\n V extends VariantConfig ? keyof V : never\n > &\n VariantProps<V, false> & { as?: ElementType }\n>\n\n// Implementation\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined,\n O extends StyledOptions | undefined = undefined\n>(el: TElement, styles: StyledConfig<V>, options?: O) {\n const variantKeys = Object.keys(styles.variants || {})\n const enabledResponsiveVariants = options?.enabledResponsiveVariants === true\n const tvFn = tv(styles as any)\n\n type ResponsiveVariantsEnabled = AreResponsiveVariantsEnabled<O>\n type VariantPropsType = VariantProps<V, ResponsiveVariantsEnabled>\n type BaseProps = React.ComponentPropsWithRef<TElement>\n // Extract variant keys to omit from BaseProps so variant props override native HTML attributes\n type VariantKeys = V extends VariantConfig ? keyof V : never\n type StyledProps = Omit<BaseProps, VariantKeys> &\n VariantPropsType & { as?: ElementType }\n\n const Comp = React.forwardRef<React.ComponentRef<TElement>, StyledProps>(\n (props, ref) => {\n const additionalStyles = enabledResponsiveVariants\n ? variantKeys\n .map((variantKey) => {\n const responsiveVariantConfig:\n | Record<Breakpoint, string | number>\n | undefined = props[variantKey]\n const variantStyles: Record<string, string | string[]> =\n styles.variants![variantKey]\n\n if (\n typeof responsiveVariantConfig === 'object' &&\n responsiveVariantConfig &&\n !Array.isArray(responsiveVariantConfig)\n ) {\n return Object.entries(responsiveVariantConfig).flatMap(\n ([key, val]: [Breakpoint, string | number]) => {\n const valStr = String(val)\n const styleArr: string | string[] =\n variantStyles && variantStyles[valStr]\n\n if (styleArr && Array.isArray(styleArr)) {\n return styleArr.flatMap((cls: string) => {\n if (key === '@initial') return cls\n return `${key.replace('@', '')}:${cls}`\n })\n }\n return []\n }\n )\n }\n\n return []\n })\n .flat()\n : []\n\n // Filter out variant props that don't belong to this component before calling tvFn\n // This prevents tailwind-variants from processing props meant for wrapped components\n // Only pass props that are in this component's variant keys\n // For boolean variants, only include them if the value is explicitly true or false (not null/undefined)\n // Note: tailwind-variants treats null as \"no variant\" but undefined/missing as \"apply false variant\"\n // So we need to convert undefined to null for boolean variants to prevent default behavior\n const propsForTv =\n variantKeys.length > 0\n ? Object.fromEntries(\n Object.entries(props)\n .filter(([key]) => variantKeys.includes(key))\n .map(([key, value]) => {\n // Check if this is a boolean variant (has both 'true' and 'false' keys)\n const variantConfig = styles.variants?.[key]\n if (\n variantConfig &&\n 'true' in variantConfig &&\n 'false' in variantConfig\n ) {\n // For boolean variants, only include if value is explicitly true or false\n // Convert undefined to null to prevent tailwind-variants from applying false variant\n if (value === true || value === false) {\n return [key, value]\n }\n // For null/undefined, pass null to prevent tailwind-variants from applying defaults\n // This ensures that when a boolean prop is explicitly null/undefined, no variant is applied\n return [key, null]\n }\n // For non-boolean variants, pass value as-is (including null/undefined)\n return [key, value]\n })\n )\n : {}\n\n const cls = tvFn(propsForTv)\n\n const filteredProps = Object.fromEntries(\n Object.entries(props).filter(\n ([key]) =>\n !variantKeys.includes(key) &&\n key !== 'as' &&\n key !== '__wrapperClasses'\n )\n )\n\n const mergedClassName = clsx(cls, additionalStyles).trim()\n const propsClassName = (props as any).className\n // Check for wrapper classes passed from a parent styled component\n const wrapperClasses = (props as any).__wrapperClasses\n\n if (\n typeof el === 'string' ||\n typeof el === 'function' ||\n (el && typeof el === 'object')\n ) {\n const elementType = el as ElementType\n\n // If el is a host string ('div', 'span', etc.) we must not pass variant props to the DOM.\n if (typeof el === 'string') {\n const { className: _, ...restFilteredProps } = filteredProps as any\n // Merge order: wrapper classes (lowest priority) < component classes < user's className (highest priority)\n // This ensures variant classes from this component override base classes from wrapper\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure child's classes win\n // over parent classes, but user's className should still have highest priority.\n // Strategy: Only apply special merge when wrapperClasses exist (nested styled component scenario).\n // For regular cases (no wrapperClasses), use standard merge order so user's className has highest priority.\n const finalClassName =\n wrapperClasses && propsClassName\n ? twMerge(wrapperClasses, propsClassName, mergedClassName) // This component's classes win by being merged last\n : wrapperClasses\n ? twMerge(wrapperClasses, mergedClassName, propsClassName) // Standard merge when no propsClassName\n : propsClassName\n ? (() => {\n // When propsClassName comes from asChild (Radix), we want this component's classes to win\n // When propsClassName is a regular className prop, the user's className should win (highest priority)\n // We can detect asChild scenario by checking if propsClassName contains classes that look like they came from a parent component\n // (e.g., data attribute variants like data-[state=closed]:rounded-sm)\n // If it does, treat it as asChild and let component classes win. Otherwise, let user's className win.\n const hasDataAttributeVariants = propsClassName\n .split(' ')\n .some((cls) => /^data-\\[state=[^\\]]+\\]:/.test(cls))\n\n if (hasDataAttributeVariants) {\n // This is likely from asChild - component's classes should win\n return twMerge(propsClassName, mergedClassName)\n } else {\n // Regular className prop - user's className should win (highest priority)\n return twMerge(mergedClassName, propsClassName)\n }\n })()\n : twMerge(mergedClassName) // Always merge mergedClassName to resolve conflicts within it (e.g., bg-[unset] vs bg-(--base))\n\n return React.createElement(\n (props as { as?: ElementType }).as || elementType,\n {\n ...restFilteredProps,\n ref,\n className: finalClassName\n }\n )\n }\n\n // If el is a function component (including forwardRef), pass ALL props through\n // (the wrapped component may expect variant props), but ensure className and ref are forwarded.\n // We need to pass all props (not filteredProps) because the underlying component may have its own variants\n //\n // For className merging with wrapped styled components:\n // Solution: Pass wrapper's classes via __wrapperClasses prop for styled components to merge correctly.\n // For regular function components, merge wrapper classes with our classes and pass as className.\n // This ensures:\n // - Styled components can merge: wrapper classes < wrapped component classes < user's className\n // - Regular components get merged classes directly and don't receive __wrapperClasses\n // Filter out variant props and __wrapperClasses from props passed to function components\n // This prevents them from ending up in the DOM.\n // Note: We filter out variant props that belong to THIS component. Variant props that belong to\n // the wrapped component will be passed through (they're not in variantKeys), and the wrapped\n // component will filter them if it's a styled component.\n // Note: 'as' prop is filtered from filteredProps to prevent it from going to DOM for string elements,\n // but we add it back for function components since they need it for polymorphism.\n const { className: _, ...restFilteredProps } = filteredProps as any\n const asProp = (props as any).as // Extract 'as' prop separately\n // Note: __wrapperClasses is already filtered out in filteredProps, so restFilteredProps doesn't include it\n\n // For styled components: Pass wrapper classes via __wrapperClasses so they can merge correctly.\n // Styled components extract __wrapperClasses from props (before filteredProps) and filter it in filteredProps.\n // For regular function components: We merge wrapper classes into className, but also pass __wrapperClasses\n // which they may spread. To prevent it in DOM, we need to ensure it's filtered, but we can't control that.\n // However, styled components that wrap regular components will filter __wrapperClasses in their filteredProps.\n if (wrapperClasses) {\n // We have wrapper classes from parent - this is a nested styled component scenario\n // Merge order: wrapper classes (base) < this component's classes (variants) < user's className\n // This ensures variant classes override base classes via twMerge\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure this component's classes win.\n // Strategy: Merge wrapperClasses with propsClassName first, then merge with mergedClassName last.\n // This ensures: wrapperClasses < propsClassName < mergedClassName (this component's classes win)\n // This is critical when propsClassName contains parent classes from asChild merge.\n const finalClassName = propsClassName\n ? twMerge(wrapperClasses, propsClassName, mergedClassName) // This component's classes win by being merged last\n : twMerge(wrapperClasses, mergedClassName)\n\n // Check if the wrapped component is a styled component\n // React.forwardRef components are objects, not functions\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Base props (filters THIS component's variant props, __wrapperClasses, 'as')\n ...(asProp ? { as: asProp } : {}), // Add 'as' prop back for function components (polymorphic support)\n // Note: We don't add variant props back - they're already filtered by filteredProps.\n ref\n }\n\n if (isStyledComponent) {\n // Wrapped component is a styled component - pass __wrapperClasses so variant classes win\n // IMPORTANT: When propsClassName exists (could be from asChild), it may contain both parent and child classes.\n // We should NOT merge propsClassName with mergedClassName here, because that would remove child classes.\n // Instead, pass propsClassName as-is (or merge only wrapperClasses with mergedClassName) so the child\n // can merge its own classes last. The child will merge: twMerge(__wrapperClasses, propsClassName, child's mergedClassName).\n // This ensures child's classes win by being merged last.\n // Merge wrapperClasses with mergedClassName to create the wrapper classes for the child\n const combinedWrapperClasses = twMerge(\n wrapperClasses,\n mergedClassName\n )\n propsForComponent.__wrapperClasses = combinedWrapperClasses\n propsForComponent.className = propsClassName || undefined\n } else {\n // Wrapped component is not a styled component - merge wrapper classes into className\n // and don't pass __wrapperClasses (it would end up in DOM)\n propsForComponent.className = finalClassName\n }\n return React.createElement(elementType, propsForComponent)\n } else {\n // No wrapper classes from parent - we're top-level\n // For function components: Pass __wrapperClasses so styled components can merge correctly.\n // Styled components extract __wrapperClasses from their props (before filteredProps) and filter it in filteredProps.\n // Regular function components will receive __wrapperClasses but should filter it out themselves.\n // We also merge wrapper classes into className for regular function components.\n // Note: We pass __wrapperClasses in props (not filteredProps) so styled components can access it,\n // but styled components filter it in their filteredProps so it won't go to DOM.\n // Regular function components that spread all props will pass __wrapperClasses to DOM, which is a problem.\n // But we can't distinguish them, so we rely on styled components filtering it.\n // Check if the wrapped component is a styled component\n // elementType is the component itself (e.g., Inner when Outer extends Inner)\n // React.forwardRef components are objects, not functions, but we can still check the flag\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Filters out __wrapperClasses, variant props, 'as'\n ...(asProp ? { as: asProp } : {}),\n ref\n }\n\n if (isStyledComponent) {\n // Styled component - pass wrapper classes via __wrapperClasses so variant classes can take precedence\n // IMPORTANT: When propsClassName exists, we need to distinguish between:\n // 1. User's className (should win - highest priority)\n // 2. className from asChild/parent component (component's classes should win)\n // We detect asChild by checking for data attribute variants (e.g., data-[state=closed]:rounded-sm)\n const hasDataAttributeVariants = propsClassName\n ? propsClassName\n .split(' ')\n .some((cls) => /^data-\\[state=[^\\]]+\\]:/.test(cls))\n : false\n\n const mergedPropsAndComponent = propsClassName\n ? hasDataAttributeVariants\n ? // This is likely from asChild - component's classes should win\n twMerge(propsClassName, mergedClassName)\n : // Regular user className - user's className should win (highest priority)\n twMerge(mergedClassName, propsClassName)\n : mergedClassName\n propsForComponent.__wrapperClasses = mergedClassName\n propsForComponent.className = mergedPropsAndComponent || undefined\n } else {\n // Regular function component - merge wrapper classes into className\n // Standard merge order: component classes < user's className (highest priority)\n propsForComponent.className = twMerge(\n mergedClassName,\n propsClassName\n )\n }\n return React.createElement(elementType, propsForComponent)\n }\n }\n\n if (React.isValidElement(el)) {\n const element = el as ReactElement<unknown>\n // Merge existing element className, incoming filteredProps.className and our computed class\n const existingClass = (element.props as any).className\n const incomingClass = (filteredProps as any).className\n const finalClassName = cn(\n existingClass,\n incomingClass,\n mergedClassName\n ).trim()\n\n const cloneProps: any = {\n // ...element.props,\n ...filteredProps,\n as:\n (props as { as?: ElementType }).as ||\n (element.props as { as?: ElementType }).as,\n className: finalClassName\n }\n\n // Forward the ref if provided\n if (ref) {\n cloneProps.ref = ref\n }\n\n return React.cloneElement(element, cloneProps)\n }\n\n throw Error('Something is wrong')\n }\n )\n\n // Mark the component as a styled component so we can detect it later\n ;(Comp as any).__isStyledComponent = true\n\n return Comp\n}\n","import * as React from 'react'\n\ntype CssWrapperProps = {\n className?: string\n children: React.ReactNode\n}\n\nexport const CSSWrapper = ({\n className,\n children\n}: CssWrapperProps): React.ReactElement<unknown> =>\n className ? (\n <div className={className}>{children}</div>\n ) : (\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n <>{children}</>\n )\n\nCSSWrapper.displayName = 'CSSWrapper'\n","import { Content } from '@radix-ui/react-accordion'\nimport React from 'react'\n\nimport { styled } from '~/styled'\nimport { CSSWrapper } from '~/utilities/css-wrapper/CSSWrapper'\n\nconst StyledContent = styled(Content, {\n base: [\n 'border-none',\n 'w-full',\n 'bg-(--base-1)',\n 'overflow-hidden',\n 'data-[state=open]:rounded-b-sm',\n 'data-[state=open]:rounded-t-none',\n 'motion-safe:data-[state=open]:animate-accordion-open',\n 'motion-safe:data-[state=closed]:animate-accordion-close'\n ]\n})\n\nexport const AccordionContent = ({\n children,\n className,\n ...remainingProps\n}: React.ComponentProps<typeof StyledContent>) => (\n <StyledContent {...remainingProps}>\n <CSSWrapper className={className}>{children}</CSSWrapper>\n </StyledContent>\n)\n","import { Item } from '@radix-ui/react-accordion'\nimport React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const AccordionItem = styled(Item, {\n base: ['w-full', 'not-last:mb-1']\n})\n","type ColorSchemeKeys = 'interactive' | 'base' | 'accent' | 'foreground'\n\n// ColorScheme is a partial record, but values are always strings (never undefined)\ntype ColorScheme = Partial<\n Record<`--${ColorSchemeKeys}` | `--${ColorSchemeKeys}-${string}`, string>\n>\n\ntype ColorSchemeConfig = { colorName: string; color0?: string }\n\nconst generateColors = ({\n prefix,\n colorName,\n color0 = ''\n}: {\n prefix: ColorSchemeKeys\n colorName: string\n color0?: string\n}): ColorScheme => {\n const colors: Record<string, string> = {}\n let i = 1\n if (color0) {\n colors[`--${prefix}-${i}`] = `var(--color-${color0})`\n i++\n }\n let k = 1\n for (i; i <= 11; i++) {\n colors[`--${prefix}-${i}`] = `var(--color-${colorName}-${k * 100})`\n k++\n }\n return colors as ColorScheme\n}\n\nexport const colorSchemes: Record<string, ColorScheme> = {} as Record<\n string,\n ColorScheme\n>\n\ncolorSchemes['interactive-loContrast'] = {\n '--interactive-foreground': 'var(--foreground)',\n '--interactive-1': 'var(--accent-1)',\n '--interactive-2': 'var(--accent-2)',\n '--interactive-3': 'var(--accent-3)'\n}\n\ncolorSchemes['interactive-hiContrast'] = {\n '--interactive-foreground': 'var(--foreground-7-plus)',\n '--interactive-1': 'var(--accent-9)',\n '--interactive-2': 'var(--accent-10)',\n '--interactive-3': 'var(--accent-11)'\n}\n\nconst colorNames = [\n 'primary',\n 'grey',\n 'blue',\n 'pink',\n 'purple',\n 'cyan',\n 'green',\n 'magenta',\n 'red',\n 'teal',\n 'orange',\n 'yellow',\n 'lime'\n]\n\nconst createVariants = () =>\n Object.fromEntries(\n colorNames.flatMap((c) => [\n [`${c}1`, { colorName: c, color0: 'white' }],\n [`${c}2`, { colorName: c }]\n ])\n ) as Record<string, ColorSchemeConfig>\n\nexport const bases = createVariants()\nexport const accents = bases\n;(() => {\n Object.entries(bases).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n const themeName = `base-${name}`\n colorSchemes[themeName] = {\n '--foreground': 'var(--color-grey-1000)',\n '--foreground-7-plus': 'var(--color-white)',\n ...generateColors({\n prefix: 'base',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n }\n )\n\n Object.entries(accents).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n colorSchemes[`accent-${name}`] = generateColors({\n prefix: 'accent',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n )\n})()\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { accents, bases, colorSchemes } from './ColorScheme.config'\n\nexport type TcolorScheme = {\n base?: keyof typeof bases\n accent?: keyof typeof accents\n interactive?: 'loContrast' | 'hiContrast'\n}\n\ntype TColorSchemeOwnProps = TcolorScheme & {\n asChild?: boolean\n}\n\ntype TColorSchemeProps = React.HTMLAttributes<HTMLDivElement> &\n TColorSchemeOwnProps\n\n/**\n * @experimental Component has not been finalised. Further design input required. Use with caution.\n */\nexport const ColorScheme = React.forwardRef<HTMLDivElement, TColorSchemeProps>(\n (\n { base = '', accent = '', interactive = '', asChild = false, ...rest },\n ref\n ) => {\n const Component = asChild ? Slot : 'div'\n\n // Build style object - config ensures values are always strings (never undefined)\n const style = {\n ...(interactive && colorSchemes[`interactive-${interactive}`]),\n ...(accent && colorSchemes[`accent-${accent}`]),\n ...(base && colorSchemes[`base-${base}`])\n } as React.CSSProperties\n\n return <Component {...rest} ref={ref} style={style} />\n }\n)\n\nColorScheme.displayName = 'ColorScheme'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { Override } from '~/utilities/types'\n\nexport const StyledIcon = styled(\n 'svg',\n {\n base: [\n 'inline-block',\n 'fill-none',\n 'shrink-0',\n 'stroke-current',\n '[stroke-linecap:round]',\n '[stroke-linejoin:round]',\n 'align-middle'\n ],\n variants: {\n size: {\n sm: ['size-4', 'stroke-[1.5]'],\n md: ['size-6', 'stroke-[1.75]'],\n lg: ['size-8', 'stroke-2']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype IconProps = Override<\n React.ComponentProps<typeof StyledIcon>,\n {\n is: React.FC<React.SVGProps<SVGSVGElement>>\n as?: never\n }\n>\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ is: SVG, size = 'md', ...remainingProps }, ref) => (\n <StyledIcon\n size={size}\n aria-hidden=\"true\"\n {...remainingProps}\n as={SVG}\n ref={ref}\n />\n )\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-accordion'\nimport React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\n\nconst RotatingIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180',\n '[[data-state=closed]>&]:rotate-0'\n ]\n})\n\nconst StyledTrigger = styled(Trigger, {\n base: [\n 'border-none',\n 'py-3',\n 'px-4',\n 'w-full',\n 'flex',\n 'justify-between',\n 'items-center',\n 'cursor-pointer',\n 'bg-(--interactive-2)',\n 'text-(--interactive-foreground)',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--interactive-3)',\n 'not-disabled:focus-visible:bg-(--interactive-3)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--interactive-3)',\n 'data-[state=open]:rounded-b-none',\n 'data-[state=open]:rounded-t-sm',\n 'data-[state=closed]:rounded-sm'\n ],\n variants: {\n arrowPosition: {\n left: ['flex-row-reverse', 'gap-2', 'justify-end'],\n right: []\n }\n }\n})\n\nexport const AccordionTrigger = ({\n children,\n colorScheme = {},\n asChild,\n arrowPosition = 'right',\n ...remainingProps\n}: React.ComponentProps<typeof StyledTrigger> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme asChild accent=\"grey1\" interactive=\"loContrast\" {...colorScheme}>\n <StyledTrigger\n asChild={asChild}\n arrowPosition={arrowPosition}\n {...remainingProps}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <RotatingIcon is={ChevronDown} data-testid=\"accordion-chevron\" />\n </>\n )}\n </StyledTrigger>\n </ColorScheme>\n)\n","import { Root } from '@radix-ui/react-accordion'\nimport React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { AccordionContent } from './AccordionContent'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionTrigger } from './AccordionTrigger'\n\ntype AccordionProps = React.ComponentProps<typeof Root> & {\n type: 'single' | 'multiple'\n}\n\ntype AccordionType = ReturnType<\n typeof React.forwardRef<HTMLDivElement, AccordionProps>\n> & {\n Item: typeof AccordionItem\n Content: typeof AccordionContent\n Trigger: typeof AccordionTrigger\n}\n\nexport const Accordion = React.forwardRef<HTMLDivElement, AccordionProps>(\n ({ type = 'single', className, children, ...remainingProps }, ref) => (\n // eslint-disable-next-line\n // @ts-ignore TODO: Radix has an TS error that throws a warning if you pass multiple in. Needs to be fixed by the owner\n <Root\n ref={ref}\n type={type}\n className={cn('w-full', className)}\n {...remainingProps}\n >\n {children}\n </Root>\n )\n) as AccordionType\n\nAccordion.Item = AccordionItem\nAccordion.Content = AccordionContent\nAccordion.Trigger = AccordionTrigger\n\nAccordion.displayName = 'Accordion'\n","import { Arrow, Content } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-grey-900',\n 'rounded-sm',\n 'shadow-sm',\n 'text-white',\n 'font-body',\n 'text-sm',\n 'leading-normal',\n 'whitespace-normal',\n 'px-3',\n 'py-2',\n 'z-10',\n 'will-change-transform',\n 'will-change-[opacity]',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=delayed-open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-25'],\n md: ['max-w-[250px]'],\n lg: ['max-w-100']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: [\n 'fill-grey-900',\n 'in-data-[align=end]:mr-2',\n 'in-data-[align=start]:ml-2'\n ]\n})\n\ntype TooltipContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content>\n\nexport const TooltipContent = ({\n children,\n side = 'top',\n sideOffset = 4,\n size = 'md',\n ...remainingProps\n}: TooltipContentProps) => (\n <StyledContent\n side={side}\n sideOffset={sideOffset}\n size={size}\n {...remainingProps}\n >\n {children}\n <StyledArrow />\n </StyledContent>\n)\n","import { Portal, Provider, Root, Trigger } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { TooltipContent } from './TooltipContent'\n\ntype TooltipProps = React.ComponentProps<typeof Root>\n\nconst TooltipComponent = ({\n children,\n delayDuration = 350,\n ...remainingProps\n}: TooltipProps) => (\n <Root delayDuration={delayDuration} {...remainingProps}>\n {children}\n </Root>\n)\n\nexport const Tooltip = Object.assign(TooltipComponent, {\n Content: TooltipContent,\n Trigger: Trigger,\n Portal: Portal,\n Provider: Provider\n})\n\nTooltipComponent.displayName = 'Tooltip'\n","import * as React from 'react'\n\nimport { Tooltip } from '~/components/tooltip/Tooltip'\n\nexport type TOptionalTooltipWrapperProps = {\n hasTooltip?: boolean\n label?: React.ReactNode\n tooltipSide?: React.ComponentProps<typeof Tooltip.Content>['side']\n}\n\nexport const OptionalTooltipWrapper = ({\n hasTooltip,\n label,\n tooltipSide,\n children\n}: React.PropsWithChildren<TOptionalTooltipWrapperProps>) => {\n if (hasTooltip) {\n return (\n <Tooltip>\n <Tooltip.Trigger\n asChild\n onFocus={(e: React.FocusEvent) => {\n // Only show the tooltip on keyboard focus, not programmatic focus\n // (e.g. when a dialog auto-focuses this element on open).\n // The browser sets :focus-visible during keyboard navigation,\n // so if it is absent we know the focus was not from the keyboard\n // and call preventDefault() to tell Radix to skip opening the tooltip.\n if (!(e.currentTarget as Element).matches(':focus-visible')) {\n e.preventDefault()\n }\n }}\n >\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content side={tooltipSide}>{label}</Tooltip.Content>\n </Tooltip>\n )\n }\n\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>\n}\n\nOptionalTooltipWrapper.displayName = 'OptionalTooltipWrapper'\n","export const isExternalUrl = (url?: string) => {\n if (typeof window === 'undefined' || !url) return false\n\n const isAbsoluteUrl = /^https?:\\/\\//.test(url)\n return isAbsoluteUrl && new URL(url).origin !== window.location.origin\n}\n\nexport const getExternalAnchorProps = (url?: string) =>\n isExternalUrl(url) ? { target: '_blank', rel: 'noopener noreferrer' } : {}\n","export const ActionIconSizeMap = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'lg'\n}\n","import invariant from 'invariant'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\nimport type { TOptionalTooltipWrapperProps } from '~/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { OptionalTooltipWrapper } from '~/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { Override } from '~/utilities/types'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport { Icon } from '../icon/Icon'\nimport { ActionIconSizeMap } from './ActionIcon.constants'\n\nconst StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-white',\n 'rounded-md',\n 'box-border',\n 'cursor-pointer',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n neutral: [\n '[--solid-base:var(--color-white)]',\n '[--solid-interact:var(--color-grey-100)]',\n '[--solid-active:var(--color-grey-200)]',\n '[--solid-text:var(--color-grey-1200)]',\n '[--base:var(--color-grey-700)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1100)]'\n ],\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n primaryDark: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n white: [\n '[--base:var(--color-white)]',\n '[--interact:var(--color-white)]',\n '[--active:var(--color-white)]'\n ]\n },\n appearance: {\n simple: [\n 'bg-transparent',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n outline: [\n 'bg-[unset]',\n 'border',\n 'border-current',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n solid: [\n 'bg-(--solid-base,var(--base))',\n 'text-(--solid-text,white)',\n 'not-disabled:hover:bg-(--solid-interact,var(--interact))',\n 'not-disabled:hover:text-(--solid-text,white)',\n 'not-disabled:focus:bg-(--solid-interact,var(--interact))',\n 'not-disabled:focus:text-(--solid-text,white)',\n 'not-disabled:active:bg-(--solid-active,var(--active))'\n ]\n },\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12']\n },\n isRounded: {\n true: ['rounded-full']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\ntype ActionIconProps = Override<\n React.ComponentProps<typeof StyledButton>,\n {\n children: React.ReactNode\n label: string\n } & Omit<TOptionalTooltipWrapperProps, 'label'> &\n NavigatorActions\n>\n\nexport const ActionIcon = React.forwardRef<HTMLButtonElement, ActionIconProps>(\n (\n {\n children,\n theme = 'primary',\n appearance = 'simple',\n size = 'sm',\n label,\n href,\n disabled,\n hasTooltip = true,\n tooltipSide,\n ...remainingProps\n },\n ref\n ) => {\n const INVALID_CHILDREN_MESSAGE = `A single ${Icon.displayName} component is permitted as a child of ${ActionIcon.displayName}`\n\n invariant(React.Children.count(children) === 1, INVALID_CHILDREN_MESSAGE)\n\n // Polymorphic props: can be either button or anchor element\n // Type assertion needed due to TypeScript limitations with polymorphic components\n const optionalLinkProps = href\n ? ({\n as: 'a',\n href: disabled ? undefined : href,\n onClick: undefined,\n 'aria-disabled': !!disabled\n } as const)\n : ({ type: 'button' } as const)\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={hasTooltip}\n label={label}\n tooltipSide={tooltipSide}\n >\n <StyledButton\n {...(optionalLinkProps as any)}\n {...getExternalAnchorProps(href)}\n {...remainingProps}\n aria-label={label}\n theme={theme}\n appearance={appearance}\n size={size}\n ref={ref as any}\n disabled={disabled}\n >\n {React.Children.map(children, (child) => {\n // TS needs this check for any following code to access child.type\n // even with optional chaining\n if (!React.isValidElement(child)) {\n throw new Error(INVALID_CHILDREN_MESSAGE)\n }\n\n invariant(\n child.type === Icon,\n `Children of type ${child?.type} aren't permitted. Only an ${Icon.displayName} component is allowed in ${ActionIcon.displayName}`\n )\n\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof Icon>>,\n {\n size: ActionIconSizeMap[size as string]\n }\n )\n })}\n </StyledButton>\n </OptionalTooltipWrapper>\n )\n }\n)\n\nActionIcon.displayName = 'ActionIcon'\n","import { Content, Overlay, Portal } from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledAlertDialogOverlay = styled(Overlay, {\n base: [\n 'bg-alpha-600',\n 'top-0',\n 'right-0',\n 'bottom-0',\n 'left-0',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n ]\n})\nconst StyledAlertDialogContent = styled(Content, {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'rounded-md',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'max-w-[90vw]',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'focus:outline-none',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n sm: ['w-95'],\n md: ['w-120'],\n lg: ['w-150']\n }\n }\n})\n\nexport const AlertDialogContent = ({\n size = 'sm',\n ...remainingProps\n}: React.ComponentProps<typeof StyledAlertDialogContent>) => (\n <Portal>\n <StyledAlertDialogOverlay />\n <StyledAlertDialogContent size={size} {...remainingProps} />\n </Portal>\n)\n","import {\n Action,\n Cancel,\n Description,\n Root,\n Title,\n Trigger\n} from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { AlertDialogContent } from './AlertDialogContent'\n\nexport const AlertDialog = Object.assign(Root, {\n Description: Description,\n Title: Title,\n Action: Action,\n Cancel: Cancel,\n Content: AlertDialogContent,\n Trigger: Trigger\n})\n\nAlertDialog.displayName = 'AlertDialog'\n","import { useEffect, useRef } from 'react'\n\nexport const useIsMountedRef = () => {\n const isMountedRef = useRef<boolean | undefined>(undefined)\n\n useEffect(() => {\n isMountedRef.current = true\n return () => {\n isMountedRef.current = false\n }\n })\n\n return isMountedRef\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nconst Dot = styled('div', {\n base: [\n 'animate-pulse',\n 'bg-current',\n 'rounded-full',\n 'animation-duration-900',\n 'nth-3:animation-delay-300',\n 'nth-4:animation-delay-600'\n ],\n variants: {\n size: {\n sm: ['size-1', 'mx-0.5'],\n md: ['size-1.5', 'mx-0.5'],\n lg: ['size-2', 'mx-[3px]']\n }\n }\n})\n\ntype LoaderProps = React.ComponentProps<'div'> & {\n message?: string\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport const Loader = ({\n className,\n message = 'Loading',\n size = 'md',\n ...props\n}: LoaderProps) => (\n <div\n className={cn('flex', 'justify-center', className)}\n role=\"alert\"\n {...props}\n >\n <span className=\"sr-only\">{message}</span>\n <Dot size={size} />\n <Dot size={size} />\n <Dot size={size} />\n </div>\n)\n","import * as React from 'react'\n\nimport { Loader } from '~/components/loader/Loader'\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\nimport { Override } from '~/utilities/types'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nexport const StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'bg-[unset]',\n 'rounded-md',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-semibold',\n 'justify-center',\n 'no-underline',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'whitespace-nowrap',\n 'w-max',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n secondary: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]',\n '[--text:var(--color-grey-800)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n neutral: [\n '[--base:white]',\n '[--interact:rgba(255,255,255,0.9)]',\n '[--active:rgba(255,255,255,0.75)]',\n '[--text:var(--color-primary-800)]'\n ]\n },\n appearance: {\n solid: [\n 'bg-(--base)',\n 'text-(--text,white)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:bg-(--interact)',\n 'not-disabled:hover:text-(--text,white)',\n 'not-disabled:focus:bg-(--interact)',\n 'not-disabled:focus:text-(--text,white)',\n 'not-disabled:active:bg-(--active)'\n ],\n outline: [\n 'border',\n 'border-current',\n 'text-(--base)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:no-underline',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:no-underline',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ]\n },\n size: {\n sm: [\n 'text-sm',\n 'leading-[1.53]',\n 'h-8',\n 'px-4',\n 'gap-2',\n '[&_svg]:size-4'\n ],\n md: [\n 'text-md',\n 'leading-normal',\n 'h-10',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-5'\n ],\n lg: [\n 'text-lg',\n 'leading-normal',\n 'h-12',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ],\n xl: [\n 'text-lg',\n 'leading-normal',\n 'h-16',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ]\n },\n isLoading: {\n true: ['cursor-not-allowed opacity-60 pointer-events-none']\n },\n fullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n },\n defaultVariants: {\n appearance: 'solid',\n size: 'md',\n theme: 'primary'\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nconst LoaderContentsWrapper = styled(\n 'span',\n {\n base: ['items-center', 'flex', 'justify-center', 'invisible'],\n variants: {\n size: {\n sm: ['gap-2'],\n md: ['gap-3'],\n lg: ['gap-3'],\n xl: ['gap-3']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nconst WithLoader = ({\n size,\n children\n}: React.ComponentProps<typeof LoaderContentsWrapper>) => (\n <>\n <Loader className=\"absolute\" />\n <LoaderContentsWrapper size={size}>{children}</LoaderContentsWrapper>\n </>\n)\n\ntype ButtonProps = Override<\n React.ComponentProps<typeof StyledButton>,\n {\n children: React.ReactNode\n href?: string\n isLoading?: boolean\n } & NavigatorActions\n>\n\nexport const Button = React.forwardRef<HTMLElement, ButtonProps>(\n (\n { children, as, href, isLoading = false, onClick, disabled, ...rest },\n ref\n ) => (\n <StyledButton\n as={as || (href ? 'a' : undefined)}\n {...(!disabled && !isLoading && { href, onClick })}\n isLoading={isLoading}\n type={!href ? 'button' : undefined}\n disabled={disabled}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref as any}\n >\n {isLoading ? (\n <WithLoader size={rest.size}>{children}</WithLoader>\n ) : (\n children\n )}\n </StyledButton>\n )\n)\n\nButton.displayName = 'Button'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport type { Override } from '~/utilities/types'\n\nexport const StyledHeading = styled(\n 'h2',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['font-body', 'text-md', 'leading-normal', 'capsize-[0.3864]'],\n sm: ['font-body', 'text-lg', 'leading-[1.14]', 'capsize-[0.2078]'],\n md: [\n 'font-display',\n 'text-xl',\n 'leading-[1.14]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.2114]',\n 'capsize-after-[0.2634]'\n ],\n lg: [\n 'font-display',\n 'text-2xl',\n 'leading-[1.08]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.1405]',\n 'capsize-after-[0.2405]'\n ],\n xl: [\n 'font-display',\n 'text-3xl',\n 'leading-[1.12]',\n 'capsize-before-[0.16]',\n 'capsize-after-[0.26]'\n ],\n xxl: [\n 'font-display',\n 'text-4xl',\n 'leading-none',\n 'capsize-before-[0.1]',\n 'capsize-after-[0.2]'\n ]\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n medium: ['font-medium'],\n bold: ['font-bold']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nexport type HeadingProps = Override<\n React.ComponentProps<typeof StyledHeading>,\n {\n as?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(\n ({ size = 'md', weight = 'bold', ...remainingProps }, ref) => (\n <StyledHeading ref={ref} size={size} weight={weight} {...remainingProps} />\n )\n)\n\nHeading.displayName = 'Heading'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport type { Override } from '~/utilities/types'\n\nexport const StyledText = styled(\n 'p',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]'],\n '2xl': ['text-2xl', 'leading-[1.40]', 'capsize-[0.3336]'],\n '3xl': ['text-3xl', 'leading-[1.28]', 'capsize-[0.2709]'],\n '4xl': ['text-4xl', 'leading-none', 'capsize-[0.1309]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n normal: ['font-normal'],\n bold: ['font-semibold']\n },\n family: {\n body: ['font-body'],\n display: ['font-display'],\n mono: ['font-mono']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\ntype TextProps = Override<\n React.ComponentProps<typeof StyledText>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Text = React.forwardRef<HTMLParagraphElement, TextProps>(\n ({ size = 'md', family = 'body', ...remainingProps }, ref) => (\n <StyledText size={size} family={family} {...remainingProps} ref={ref} />\n )\n)\n\nText.displayName = 'Text'\n","import { Danger, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../../icon/Icon'\n\nexport type AlertDialogTheme = 'info' | 'warning' | 'danger' | 'success'\n\nconst StyledIcon = styled(Icon, {\n base: ['self-start'],\n variants: {\n theme: {\n info: ['text-info'],\n warning: ['text-warning-mid'],\n danger: ['rotate-180', 'text-danger'],\n success: ['text-success']\n }\n }\n})\n\nconst iconMap: Record<\n AlertDialogTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n info: Info,\n warning: Danger,\n danger: Info,\n success: OkCircle\n}\n\nexport const AlertDialogIcon = ({ theme }: { theme: AlertDialogTheme }) => (\n <StyledIcon theme={theme} is={iconMap[theme]} />\n)\n","import * as React from 'react'\n\nimport { Button } from '../../button/Button'\nimport { Heading } from '../../heading/Heading'\nimport { Text } from '../../text/Text'\nimport { AlertDialog } from '../AlertDialog'\nimport { AlertDialogIcon } from './AlertDialogIcon'\nimport type { alert } from './types'\n\ntype AlertDialogContentProps = React.ComponentProps<typeof AlertDialog> & {\n className?: string\n onClose: () => void\n} & alert\n\nexport const Alert = ({\n title,\n size,\n theme,\n description,\n onAction,\n cancelActionText,\n confirmActionText,\n onClose,\n confirmElement,\n cancelElement,\n ...remainingProps\n}: AlertDialogContentProps) => (\n <AlertDialog defaultOpen>\n <AlertDialog.Content\n size={size}\n onEscapeKeyDown={(e) => e.preventDefault()}\n onCloseAutoFocus={onClose}\n {...remainingProps}\n className=\"flex max-h-[90vh] flex-col gap-8\"\n >\n <div className=\"flex items-center gap-2\">\n {theme && <AlertDialogIcon theme={theme} />}\n <Heading as={AlertDialog.Title} size=\"sm\" className=\"mr-4\">\n {title}\n </Heading>\n </div>\n {description && (\n <Text as={AlertDialog.Description} className=\"flex overflow-y-auto\">\n {description}\n </Text>\n )}\n <div className=\"flex flex-wrap justify-end gap-2\">\n <AlertDialog.Cancel asChild>\n {cancelElement ||\n (cancelActionText && (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n onClick={() => onAction?.(false)}\n >\n {cancelActionText}\n </Button>\n ))}\n </AlertDialog.Cancel>\n <AlertDialog.Action asChild>\n {confirmElement || (\n <Button size=\"sm\" onClick={() => onAction?.(true)}>\n {confirmActionText}\n </Button>\n )}\n </AlertDialog.Action>\n </div>\n </AlertDialog.Content>\n </AlertDialog>\n)\n","import { uid } from 'uid'\n\nimport { alert } from './types'\n\ntype State = alert[]\ntype Action =\n | { type: 'ADD'; payload: alert }\n | { type: 'REMOVE'; payload: string }\n\nexport const initialState = []\n\nexport const reducer = (state: State, action: Action): alert[] => {\n switch (action.type) {\n case 'ADD':\n return [...state, { ...action.payload, id: uid() }]\n case 'REMOVE':\n return state.filter(({ id }) => id !== action.payload)\n default:\n return state\n }\n}\n","import * as React from 'react'\n\nimport { useIsMountedRef } from '~/utilities/hooks/useIsMountedRef'\n\nimport { Alert } from './AlertDialog'\nimport { initialState, reducer } from './reducer'\nimport type { alert } from './types'\n\ntype context = {\n showAlert: (data: alert) => void\n}\n\nconst AlertContext = React.createContext<context>({\n showAlert: () => null\n})\n\nexport const AlertProvider = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const [alerts, dispatch] = React.useReducer(reducer, initialState)\n const isMountedRef = useIsMountedRef()\n\n return (\n <AlertContext.Provider\n value={{\n showAlert: (content: alert) =>\n dispatch({\n payload: content,\n type: 'ADD'\n })\n }}\n >\n {Boolean(alerts.length) && (\n <Alert\n {...alerts[0]}\n key={alerts[0].id}\n onClose={() => {\n if (isMountedRef.current)\n dispatch({\n payload: alerts[0].id,\n type: 'REMOVE'\n })\n }}\n />\n )}\n {children}\n </AlertContext.Provider>\n )\n}\n\nexport const useAlert = (): context => {\n const context = React.useContext(AlertContext)\n\n if (context === undefined) {\n throw new Error('useAlert must be used within a AlertProvider')\n }\n\n return context\n}\n","import * as React from 'react'\n\nexport type TAvatarRootContext = {\n name?: string\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'\n}\n\nexport const AvatarRootContext = React.createContext<TAvatarRootContext>({\n name: undefined,\n size: 'lg'\n})\n","/*\n * Utility function to allow for overriding responsive variants using logic provided via the `overrideFunction` argument.\n *\n * It was developed out of a design requirement to override and pass through size properties to the <Icon /> component; depending\n * on the size of its parent component. It could be used for various other props where we want to tweak the value but\n * maintain the flexibility of a stitches variant property (which allows for use either via a string or a breakpoint object)\n * Documentation on stitches responsive variants: https://stitches.dev/docs/breakpoints#responsive-variants\n *\n */\nexport const overrideStyledVariantValue = (\n prop: any,\n overrideFunction: (any) => any\n) => {\n let overrideValue\n switch (typeof prop) {\n case 'object':\n overrideValue = {}\n Object.keys(prop).forEach((breakpoint) => {\n const propAtBreakpoint = prop[breakpoint]\n overrideValue[breakpoint] = propAtBreakpoint\n ? overrideFunction(propAtBreakpoint)\n : propAtBreakpoint\n })\n break\n default:\n overrideValue = overrideFunction(prop)\n }\n\n return overrideValue\n}\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { Icon } from '../icon/Icon'\nimport { AvatarRootContext } from './AvatarContext'\n\nconst toIconSize = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg',\n xxl: 'lg'\n}\n\nexport const AvatarIcon = ({ is }: { is: typeof Icon }) => {\n const rootContext = React.useContext(AvatarRootContext)\n const { size } = rootContext\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n\n return <Icon size={iconSize} is={is} />\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { Override } from '~/utilities/types'\n\n// default styling lifted from https://www.zachleat.com/web/fluid-images/#copy-and-paste\n// (potentially unnecessary now we've moved to Tailwind)\nexport const StyledImage = styled('img', {\n base: ['align-middle', 'max-w-full'],\n variants: {\n fluid: {\n true: [\n \"[[src$='.svg']]:h-auto\",\n \"[[src$='.svg']]:max-w-none\",\n \"[[src$='.svg']]:w-full\",\n '[[width]]:[[height]]:h-auto',\n '[[width]]:w-auto'\n ]\n }\n }\n})\n\ntype ImageProps = Override<\n React.ComponentProps<typeof StyledImage>,\n { as?: never }\n>\n\nexport const Image = React.forwardRef<HTMLImageElement, ImageProps>(\n (props, ref) => <StyledImage {...props} ref={ref} />\n)\n\nImage.displayName = 'Image'\n","import { User } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const AvatarPlaceholder = () => {\n return (\n <div className=\"relative size-full\">\n <Icon is={User} className=\"size-full\" />\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { Text } from '../text/Text'\nimport { AvatarRootContext } from './AvatarContext'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst toTextSize = {\n xs: 'xs',\n sm: 'sm',\n md: 'sm',\n lg: 'md',\n xl: 'md',\n xxl: 'lg'\n}\n\nexport const AvatarInitial = () => {\n const rootContext = React.useContext(AvatarRootContext)\n const { name, size } = rootContext\n const textSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toTextSize[s]),\n [size]\n )\n\n if (!name) {\n return <AvatarPlaceholder />\n }\n\n return (\n <Text size={textSize} className=\"text-grey-800\">\n {name[0].toUpperCase()}\n </Text>\n )\n}\n","import * as React from 'react'\n\nimport { Image } from '../image/Image'\nimport { AvatarInitial } from './AvatarInitial'\n\nexport const AvatarImage = ({ src, alt }: { src: string; alt: string }) => {\n if (!src) {\n return <AvatarInitial />\n }\n\n return <Image className=\"size-full object-cover\" src={src} alt={alt} />\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport type { TAvatarRootContext } from './AvatarContext'\nimport { AvatarRootContext } from './AvatarContext'\nimport { AvatarIcon } from './AvatarIcon'\nimport { AvatarImage } from './AvatarImage'\nimport { AvatarInitial } from './AvatarInitial'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst avatarRootStyles = [\n 'flex',\n 'justify-center',\n 'items-center',\n 'text-grey-800',\n 'rounded-full',\n 'border-2',\n 'border-grey-200',\n 'bg-(--bg-color)',\n 'overflow-hidden'\n]\n\nconst StyledDiv = styled('div', {\n base: avatarRootStyles,\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\nconst StyledButton = styled('button', {\n base: [\n ...avatarRootStyles,\n 'not-disabled:active:bg-grey-200',\n 'not-disabled:active:border-primary-800',\n 'not-disabled:hover:bg-grey-100',\n 'not-disabled:hover:border-grey-800',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\ntype TAvatarProps = React.ComponentProps<\n typeof StyledDiv | typeof StyledButton\n> & {\n name?: string\n} & (\n | {\n onClick: React.MouseEventHandler<HTMLButtonElement>\n disabled?: boolean\n }\n | { onClick?: never; disabled?: never }\n )\n\nexport { AvatarRootContext }\nexport type { TAvatarRootContext }\n\nexport const AvatarRootProvider = ({ children, name, size }: TAvatarProps) => {\n const value = React.useMemo<TAvatarRootContext>(\n () => ({ name, size }),\n [name, size]\n )\n\n return (\n <AvatarRootContext.Provider value={value}>\n {children}\n </AvatarRootContext.Provider>\n )\n}\n\nconst DS_COLORS = [\n 'maroon',\n 'red',\n 'magenta',\n 'pink',\n 'purple',\n 'lapis',\n 'blue',\n 'cyan',\n 'teal',\n 'green',\n 'lime',\n 'yellow',\n 'orange'\n] as const\n\nconst getBackgroundColor = ({\n emphasis,\n name\n}: Pick<TAvatarProps, 'emphasis' | 'name'>) => {\n if (emphasis === 'white' || !name) return 'white'\n const index = name.toLocaleUpperCase().charCodeAt(0) % DS_COLORS.length\n return `var(--color-${DS_COLORS[index]}-${emphasis === 'bold' ? 700 : 300})`\n}\n\nexport const AvatarRoot = ({\n children,\n size = 'lg',\n name,\n emphasis = 'white',\n disabled = false,\n onClick\n}: TAvatarProps) => {\n const backgroundColor = getBackgroundColor({ emphasis, name })\n return (\n <AvatarRootProvider name={name} size={size}>\n {onClick ? (\n <StyledButton\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n disabled={disabled}\n onClick={disabled ? undefined : onClick}\n className={cn(disabled ? 'cursor-auto' : 'cursor-pointer')}\n emphasis={emphasis}\n >\n {children}\n </StyledButton>\n ) : (\n <StyledDiv\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n emphasis={emphasis}\n >\n {children}\n </StyledDiv>\n )}\n </AvatarRootProvider>\n )\n}\n\nexport const Avatar = Object.assign(AvatarRoot, {\n Image: AvatarImage,\n Initial: AvatarInitial,\n Placeholder: AvatarPlaceholder,\n Icon: AvatarIcon\n})\n\nAvatarRoot.displayName = 'Avatar'\n","import * as React from 'react'\n\nexport const useCallbackRef: () => [\n React.MutableRefObject<HTMLElement | null>,\n (HTMLElement) => void\n] = () => {\n const elRef = React.useRef<HTMLElement | null>(null)\n\n const setElRefCallback = React.useCallback((el) => {\n if (el) elRef.current = el\n }, [])\n\n return [elRef, setElRefCallback]\n}\n\nexport const useCallbackRefState: () => [\n HTMLElement | null,\n (HTMLElement) => void\n] = () => {\n const [elRef, setElRef] = React.useState<HTMLElement | null>(null)\n\n const setElRefCallback = React.useCallback((el) => {\n if (el) setElRef((prev) => (prev === el ? prev : el))\n }, [])\n\n return [elRef, setElRefCallback]\n}\n","/*\n\t•\tFactory for non-semantic color schemes\n*/\nconst createScheme = (c: string, overrides: Record<string, string> = {}) => ({\n '--text-subtle': `var(--color-${c}-1000)`,\n '--background-subtle': `var(--color-${c}-200)`,\n '--text-subtle-hover': `var(--color-${c}-1100)`,\n '--background-subtle-hover': `var(--color-${c}-300)`,\n '--text-bold': 'white',\n '--background-bold': `var(--color-${c}-800)`,\n '--background-bold-hover': `var(--color-${c}-900)`,\n '--text-on-white': `var(--color-${c}-800)`,\n ...overrides\n})\n\n/*\n\t•\tSemantic themes\n*/\nconst info = {\n '--text-subtle': 'var(--color-info-mid)',\n '--background-subtle': 'var(--color-info-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-info)',\n '--text-on-white': 'var(--color-info)'\n}\nconst neutral = {\n '--text-subtle': 'var(--color-grey-900)',\n '--background-subtle': 'var(--color-grey-100)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-grey-800)',\n '--text-on-white': 'var(--color-grey-800)'\n}\nconst success = {\n '--text-subtle': 'var(--color-success-mid)',\n '--background-subtle': 'var(--color-success-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-success)',\n '--text-on-white': 'var(--color-success)'\n}\nconst danger = {\n '--text-subtle': 'var(--color-danger-mid)',\n '--background-subtle': 'var(--color-danger-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-danger)',\n '--text-on-white': 'var(--color-danger)'\n}\nconst warning = {\n '--text-subtle': 'var(--color-warning-text)',\n '--background-subtle': 'var(--color-warning-light)',\n '--text-bold': 'var(--color-grey-1000)',\n '--background-bold': 'var(--color-warning)',\n '--text-on-white': 'var(--color-warning)'\n}\n\n/*\n\t•\tNon-semantic themes\n*/\nexport const badgeSemanticNames = [\n 'info',\n 'neutral',\n 'success',\n 'danger',\n 'warning'\n]\nexport const colorSchemes = {\n info,\n neutral,\n success,\n danger,\n warning,\n primary: createScheme('primary'),\n grey: createScheme('grey'),\n blue: createScheme('blue'),\n pink: createScheme('pink'),\n purple: createScheme('purple', {\n '--text-on-white': 'var(--color-purple-700)'\n }),\n cyan: createScheme('cyan'),\n green: createScheme('green'),\n magenta: createScheme('magenta'),\n red: createScheme('red', {\n '--background-subtle-hover': 'var(--color-red-400)'\n }),\n teal: createScheme('teal'),\n orange: createScheme('orange', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-orange-600)',\n '--background-bold-hover': 'var(--color-orange-700)',\n '--text-on-white': 'var(--color-orange-1000)'\n }),\n yellow: createScheme('yellow', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-yellow-500)',\n '--background-bold-hover': 'var(--color-yellow-600)',\n '--text-on-white': 'var(--color-yellow-900)'\n }),\n lime: createScheme('lime', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-lime-600)',\n '--background-bold-hover': 'var(--color-lime-700)',\n '--text-on-white': 'var(--color-lime-900)'\n }),\n lapis: createScheme('lapis', {\n '--background-bold': 'var(--color-lapis-700)',\n '--text-on-white': 'var(--color-lapis-700)'\n }),\n maroon: createScheme('maroon', {\n '--text-on-white': 'var(--color-maroon-700)'\n }),\n marsh: createScheme('marsh', { '--text-on-white': 'var(--color-marsh-700)' })\n}\n","import * as React from 'react'\n\nimport type { TBadgeProps } from './Badge'\n\ntype TBadgeProviderProps = {\n size?: TBadgeProps['size']\n overflow?: TBadgeProps['overflow']\n}\n\ntype TBadgeContext = TBadgeProviderProps & {\n isOverflowing?: boolean\n setIsOverflowing?: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BadgeContext = React.createContext<TBadgeContext>({})\n\nexport const BadgeProvider = ({\n size,\n overflow,\n children\n}: React.PropsWithChildren<TBadgeProviderProps>) => {\n const [isOverflowing, setIsOverflowing] = React.useState(false)\n\n const value = React.useMemo<TBadgeContext>(\n () => ({ size, overflow, isOverflowing, setIsOverflowing }),\n [size, overflow, isOverflowing, setIsOverflowing]\n )\n return <BadgeContext.Provider value={value}>{children}</BadgeContext.Provider>\n}\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\n\nexport const BadgeIcon = (props: React.ComponentProps<typeof Icon>) => (\n <Icon size=\"sm\" {...props} />\n)\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\ntype TUseResizeObserverOptions = {\n elements: (HTMLElement | undefined | null)[]\n onResize: (entries: ResizeObserverEntry[]) => void\n delay?: number\n}\n\ntype TUseResizeObserverOutput = ResizeObserver | null\n\nconst createResizeObserver = (\n callback: (entries: ResizeObserverEntry[]) => void\n) => {\n try {\n return new ResizeObserver(callback)\n } catch {\n return null\n }\n}\n\nexport const useResizeObserver = ({\n delay = 500,\n elements,\n onResize\n}: TUseResizeObserverOptions): TUseResizeObserverOutput => {\n // Keep the latest `onResize` in a ref so the observer is only recreated when\n // `delay` changes. Otherwise a callback whose identity changes on render (e.g.\n // `useSize`'s `handleResize`, which depends on `element`) would recreate and\n // re-subscribe the observer, and `ResizeObserver` fires its initial callback\n // on every `observe()` — a measure → setState → re-render → re-subscribe loop\n // that surfaces as \"Maximum update depth exceeded\".\n const onResizeRef = React.useRef(onResize)\n React.useLayoutEffect(() => {\n onResizeRef.current = onResize\n })\n\n const observer = React.useMemo(\n () =>\n createResizeObserver(\n debounce(delay, (entries: ResizeObserverEntry[]) =>\n onResizeRef.current(entries)\n )\n ),\n [delay]\n )\n\n React.useEffect(() => {\n elements.forEach((element) => {\n if (element) {\n observer?.observe(element)\n }\n })\n\n return () => {\n elements.forEach((element) => element && observer?.unobserve(element))\n }\n }, [observer, elements])\n\n return observer\n}\n","import * as React from 'react'\n\nimport { Text } from '~/components/text/Text'\nimport { styled } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { useResizeObserver } from '~/utilities/hooks/useResizeObserver'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { BadgeContext } from './Badge.context'\n\n/*\n * Instead of sticking a resize observer on every `BadgeText`\n * regardless of overflow type, split the resize logic into a component.\n * Basically call the hook conditionally, only for the version with\n * the `overflow === 'ellipsis'` which needs it.\n * This saves us from initialising a resize observer for any badge which doesn't need it.\n */\nconst ObserveBadgeTextOverflow: React.FC<{ elRef: HTMLElement | null }> = ({\n elRef\n}) => {\n const { setIsOverflowing } = React.useContext(BadgeContext)\n\n useResizeObserver({\n delay: 0,\n elements: [elRef],\n onResize: () => {\n if (!elRef?.scrollWidth || !elRef?.clientWidth) return\n setIsOverflowing?.(elRef.scrollWidth > elRef.clientWidth)\n }\n })\n\n return null\n}\n\nconst StyledBadgeText = styled(Text, {\n base: ['py-0.5', 'capsize-none'],\n variants: {\n overflow: {\n ellipsis: ['overflow-x-hidden', 'text-ellipsis', 'whitespace-nowrap'],\n wrap: ['whitespace-normal']\n }\n }\n})\n\ntype TBadgeTextProps = React.ComponentProps<typeof StyledBadgeText>\n\nconst toTextSize = {\n xs: 'sm',\n sm: 'md',\n md: 'md'\n}\n\nexport const BadgeText = ({\n children,\n ...rest\n}: TBadgeTextProps): React.JSX.Element => {\n // We need the return type here. Otherwise typsecript breaks when this type is used in Badge. Do not remove unless you want to tackle that issue again.\n const { size: badgeSize, overflow } = React.useContext(BadgeContext)\n\n const size = React.useMemo(\n () => overrideStyledVariantValue(badgeSize, (s) => toTextSize[s]),\n [badgeSize]\n )\n\n const [elRef, setElRef] = useCallbackRefState()\n\n return (\n <>\n {overflow === 'ellipsis' && <ObserveBadgeTextOverflow elRef={elRef} />}\n <StyledBadgeText size={size} overflow={overflow} ref={setElRef} {...rest}>\n {children}\n </StyledBadgeText>\n </>\n )\n}\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { OptionalTooltipWrapper } from '~/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\n\nimport {\n badgeSemanticNames,\n colorSchemes as badgeColorSchemes\n} from './Badge.colorscheme.config'\nimport { BadgeContext, BadgeProvider } from './Badge.context'\nimport { BadgeIcon } from './BadgeIcon'\nimport { BadgeText } from './BadgeText'\n\nconst StyledBadge = styled(\n 'div',\n {\n base: [\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'min-w-0',\n 'border',\n 'border-white',\n 'font-body',\n '*:not-last:mr-1'\n ],\n variants: {\n emphasis: {\n white: ['text-(--text-on-white)', 'bg-white'],\n subtle: ['text-(--text-subtle)', 'bg-(--background-subtle)'],\n bold: ['text-(--text-bold)', 'bg-(--background-bold)']\n },\n size: {\n xs: ['px-1', 'py-0'],\n sm: ['px-1', 'py-0.5'],\n md: ['px-2', 'py-1']\n },\n isClickable: {\n true: ['cursor-pointer']\n },\n highlighted: {\n true: []\n }\n },\n compoundVariants: [\n {\n isClickable: true,\n emphasis: 'white',\n class: [\n 'hover:text-(--text-on-white)',\n 'hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n isClickable: true,\n emphasis: 'subtle',\n class: [\n 'hover:bg-(--background-subtle-hover)',\n 'hover:text-(--text-subtle-hover)'\n ]\n },\n {\n isClickable: true,\n emphasis: 'bold',\n class: [\n 'hover:bg-(--background-bold-hover)',\n 'hover:text-(--text-bold)'\n ]\n },\n {\n emphasis: 'white',\n highlighted: true,\n class: [\n 'text-(--text-on-white)',\n 'bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n emphasis: 'subtle',\n highlighted: true,\n class: ['text-(--text-subtle-hover)', '(--bg-background-subtle-hover)']\n },\n {\n emphasis: 'bold',\n highlighted: true,\n class: ['text-(--text-bold)', 'bg-(--background-bold-hover)']\n }\n ]\n },\n { enabledResponsiveVariants: true }\n)\n\nexport type TBadgeProps = React.ComponentProps<typeof StyledBadge> & {\n theme?: keyof typeof badgeColorSchemes\n overflow?: React.ComponentProps<typeof BadgeText>['overflow']\n}\n\ntype TBadgeInnerProps = Omit<TBadgeProps, 'size' | 'overflow'>\n\nconst BadgeInner = React.forwardRef<HTMLDivElement, TBadgeInnerProps>(\n ({ theme = 'info', emphasis = 'subtle', children, style, ...rest }, ref) => {\n const { size, overflow, isOverflowing } = React.useContext(BadgeContext)\n const [badgeElRef, setBadgeElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => badgeElRef as HTMLDivElement)\n\n const label = badgeElRef?.textContent\n\n const isInfoOnly = badgeSemanticNames.includes(theme)\n\n const isClickable =\n Object.keys(rest).includes('onClick') ||\n Object.keys(rest).includes('href')\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={overflow === 'ellipsis' && isOverflowing}\n label={label}\n >\n <StyledBadge\n role=\"status\"\n emphasis={emphasis}\n size={size}\n style={{\n ...badgeColorSchemes[theme],\n ...style\n }}\n {...rest}\n ref={setBadgeElRef}\n isClickable={isClickable && !isInfoOnly}\n >\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <BadgeText>{child}</BadgeText>\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <BadgeIcon {...child.props} />\n }\n return child\n })}\n </StyledBadge>\n </OptionalTooltipWrapper>\n )\n }\n)\n\nconst BadgeComponent = React.forwardRef<HTMLDivElement, TBadgeProps>(\n ({ size = 'sm', overflow = 'wrap', ...rest }, ref) => {\n return (\n <BadgeProvider size={size} overflow={overflow}>\n <BadgeInner {...rest} ref={ref} />\n </BadgeProvider>\n )\n }\n)\n\nexport const Badge = Object.assign(BadgeComponent, {\n Icon: BadgeIcon,\n Text: BadgeText\n})\n\nBadgeComponent.displayName = 'Badge'\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nexport interface IDismissibleRootContext {\n disabled?: boolean\n isDismissed: boolean\n setIsDismissed: (boolean) => void\n onDismiss: () => void\n}\n\nexport const DismissibleRootContext =\n React.createContext<IDismissibleRootContext>({\n isDismissed: false,\n setIsDismissed: () => undefined,\n onDismiss: () => undefined\n })\n\nexport interface IDismissibleRootProps {\n disabled?: boolean\n dismissed?: boolean\n onDismiss?: () => void\n}\n\nexport const DismissibleRootProvider = ({\n dismissed: controlledIsDismissed,\n children,\n disabled,\n onDismiss = () => null\n}: React.PropsWithChildren<IDismissibleRootProps>) => {\n const [isDismissed, setIsDismissed] = React.useState(false)\n\n const value = React.useMemo<IDismissibleRootContext>(() => {\n const isControlled = typeof controlledIsDismissed === 'boolean'\n return {\n disabled,\n isDismissed: isControlled\n ? (controlledIsDismissed as boolean)\n : isDismissed,\n setIsDismissed: isControlled ? () => null : setIsDismissed,\n onDismiss\n }\n }, [disabled, isDismissed, onDismiss, controlledIsDismissed])\n\n return (\n <DismissibleRootContext.Provider value={value}>\n {children}\n </DismissibleRootContext.Provider>\n )\n}\n\nexport interface IDismissibleRootInternalProps {\n asChild?: boolean\n}\n\nconst DismissibleRootInternal = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<IDismissibleRootInternalProps>) => {\n const rootContext = React.useContext(DismissibleRootContext)\n\n const { isDismissed, disabled } = rootContext\n\n if (isDismissed) return null\n\n const props = { ...(disabled && { [`data-disabled`]: '' }), ...rest }\n const Component = asChild ? Slot : 'div'\n return <Component {...props} />\n}\n\nexport const DismissibleRoot = ({\n disabled = false,\n dismissed,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<\n IDismissibleRootInternalProps & IDismissibleRootProps\n>) => (\n <DismissibleRootProvider\n dismissed={dismissed}\n disabled={disabled}\n onDismiss={onDismiss}\n >\n <DismissibleRootInternal {...rest} />\n </DismissibleRootProvider>\n)\n\nDismissibleRoot.displayName = 'Dismissible'\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { DismissibleRootContext } from './DismissibleRoot'\n\nexport interface IDismissibleTriggerProps {\n asChild?: boolean\n}\n\nconst DefaultTrigger = (props) => (\n <button type=\"button\" {...props}>\n Dismiss\n </button>\n)\n\nexport const DismissibleTrigger = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<IDismissibleTriggerProps>) => {\n const context = React.useContext(DismissibleRootContext)\n if (context === undefined) {\n throw new Error(\n 'Dismissible.Trigger can only be used within a Dismissible.Item'\n )\n }\n\n const { setIsDismissed, disabled, onDismiss } = context\n\n const handleDismiss = () => {\n setIsDismissed(true)\n onDismiss?.()\n }\n\n const props = {\n disabled: disabled,\n onClick: handleDismiss,\n ...rest\n }\n\n const Component = asChild ? Slot : DefaultTrigger\n return <Component {...props} />\n}\n","import { DismissibleRoot } from './DismissibleRoot'\nimport { DismissibleTrigger } from './DismissibleTrigger'\n\nexport const Dismissible = Object.assign(DismissibleRoot, {\n Trigger: DismissibleTrigger\n})\n","import * as React from 'react'\n\nimport { TBannerContainerProps } from './BannerContainer'\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\ntype ResponsiveSize = 'sm' | 'md' | Partial<Record<Breakpoint, 'sm' | 'md'>>\n\n// Extract size and emphasis props, preserving responsive variant types\nexport type TBannerProviderProps = {\n size?: ResponsiveSize\n emphasis?: TBannerContainerProps['emphasis']\n}\n\ntype TBannerContextValue = TBannerProviderProps & {\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BannerContext = React.createContext<TBannerContextValue>({\n emphasis: 'minimal',\n size: {\n '@initial': 'sm',\n '@md': 'md'\n } as unknown as TBannerProviderProps['size'],\n hasDismiss: false,\n setHasDismiss: () => null\n})\n\nexport const useBannerContext = (): TBannerContextValue => {\n const context = React.useContext(BannerContext)\n\n if (context === undefined) {\n throw new Error('useBannerContext must be used within a BannerProvider')\n }\n\n return context\n}\n\nexport const BannerProvider = ({\n emphasis = 'minimal',\n size = {\n '@initial': 'sm',\n '@md': 'md'\n } as unknown as TBannerProviderProps['size'],\n children\n}: React.PropsWithChildren<TBannerProviderProps>) => {\n const [hasDismiss, setHasDismiss] = React.useState(false)\n const value = React.useMemo<TBannerContextValue>(\n () => ({ emphasis, size, hasDismiss, setHasDismiss }),\n [emphasis, size, hasDismiss, setHasDismiss]\n )\n return (\n <BannerContext.Provider value={value}>{children}</BannerContext.Provider>\n )\n}\n\nBannerProvider.displayName = 'Banner'\n","import { Dismissible } from '../dismissible'\nimport { BannerProvider } from './BannerContext'\n\nexport const Banner = Object.assign(BannerProvider, {\n Dismiss: Dismissible.Trigger\n})\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../BannerContext'\n\nexport const BannerRegularButton = (\n props: React.ComponentProps<typeof Button>\n) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => s === 'sm'),\n [size]\n )\n\n return (\n <Button\n size={size}\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...props}\n />\n )\n}\n\nBannerRegularButton.displayName = 'BannerRegularButton'\n","import invariant from 'invariant'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useBannerContext } from '../BannerContext'\nimport { BannerRegularButton } from './BannerRegularButton'\n\nconst MAX_ALLOWED_CHILDREN = 2\n\nconst toGap = {\n sm: 'gap-2',\n md: 'gap-4'\n}\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nexport const BannerRegularActions = ({\n children,\n className,\n ...props\n}: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n const { size } = useBannerContext()\n\n const gap = React.useMemo(() => {\n if (typeof size === 'string') {\n return toGap[size]\n }\n return 'gap-2 md:gap-4'\n }, [size])\n\n const direction = React.useMemo(() => {\n if (typeof size === 'string') {\n return toDirection[size]\n }\n return 'flex-col md:flex-row'\n }, [size])\n\n invariant(\n React.Children.count(children) <= MAX_ALLOWED_CHILDREN,\n `A maximum of ${MAX_ALLOWED_CHILDREN} ${BannerRegularButton.displayName} component(s) are permitted as children of ${BannerRegularActions.displayName}`\n )\n\n return (\n <div className={cn('flex', gap, direction, className)} {...props}>\n {React.Children.map(children, (child, index) => {\n // if child is undefined or null, React.isValidElement returns false and hence error is thrown.\n // This line will prevent that from happening\n if (child == null) return child\n\n if (!React.isValidElement(child)) {\n throw new Error(\n `Child passed to ${BannerRegularActions.displayName} is not a valid element`\n )\n }\n\n invariant(\n child.type === BannerRegularButton,\n `Children of type ${child?.type} aren't permitted. Only an ${BannerRegularButton.displayName} component is allowed in ${BannerRegularActions.displayName}`\n )\n\n const propsToInject: Partial<\n React.ComponentProps<typeof BannerRegularButton>\n > = {\n // Override button appearance - make the second button outlined\n appearance: index > 0 ? 'outline' : undefined\n }\n\n return React.cloneElement(\n child as React.ReactElement<\n React.ComponentProps<typeof BannerRegularButton>\n >,\n propsToInject\n )\n })}\n </div>\n )\n}\n\nBannerRegularActions.displayName = 'BannerRegularActions'\n","import * as React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nimport { Dismissible } from '../dismissible'\nimport { useBannerContext } from './BannerContext'\n\nconst StyledBannerContainer = styled(\n 'section',\n {\n base: [\n 'flex',\n 'relative',\n 'w-full',\n 'rounded-lg',\n 'overflow-hidden',\n 'text-(--foreground)',\n '[--banner-heading-color:var(--color-foreground)]',\n '[--banner-text-color:var(--color-grey-900)]'\n ],\n variants: {\n emphasis: {\n bold: [\n '[--banner-heading-color:var(--color-foreground-7-plus)]',\n '[--banner-text-color:var(--color-grey-100)]',\n 'bg-(--base-11)',\n 'text-(--foreground-7-plus)'\n ],\n subtle: ['bg-(--base-3)'],\n minimal: ['bg-(--base-1)']\n },\n size: {\n sm: [],\n md: []\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nexport type TBannerContainerProps = React.ComponentProps<\n typeof StyledBannerContainer\n> & {\n colorScheme?: TcolorScheme\n} & React.ComponentProps<typeof Dismissible>\n\nexport const BannerContainer = ({\n colorScheme = {},\n onDismiss,\n dismissed,\n ...props\n}: TBannerContainerProps): React.JSX.Element => {\n const { emphasis } = useBannerContext()\n\n return (\n <ColorScheme {...colorScheme} asChild>\n <Dismissible asChild onDismiss={onDismiss} dismissed={dismissed}>\n <StyledBannerContainer role=\"banner\" emphasis={emphasis} {...props} />\n </Dismissible>\n </ColorScheme>\n )\n}\n","import * as React from 'react'\n\nimport { BannerContainer } from '../BannerContainer'\n\ntype TBannerRegularContainerProps = Omit<\n React.ComponentProps<typeof BannerContainer>,\n 'direction' | 'align' | 'wrap' | 'gap' | 'justify'\n>\n\nexport const BannerRegularContainer = (props: TBannerRegularContainerProps) => (\n <BannerContainer {...props} />\n)\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { useBannerContext } from '../BannerContext'\n\nconst Container = styled(\n 'div',\n {\n base: ['w-31/50', 'grow'],\n variants: {\n size: {\n sm: ['p-4'],\n md: ['p-6', 'pr-8']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nexport const BannerRegularContent = (\n props: React.ComponentProps<typeof Container>\n) => {\n const { size } = useBannerContext()\n\n return <Container size={size} {...props} />\n}\n\nBannerRegularContent.displayName = 'BannerRegularContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../BannerContext'\n\nconst toActionIconSize = {\n sm: 'md',\n md: 'sm'\n}\n\nconst StyledDismiss = styled(ActionIcon, {\n base: ['z-1', 'absolute', 'top-3', 'right-3']\n})\n\ntype BannerRegularDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerRegularDismiss = ({\n label = 'dismiss',\n ...rest\n}: BannerRegularDismissProps) => {\n const { size, setHasDismiss } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n const actionIconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toActionIconSize[s]),\n [size]\n )\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size={actionIconSize}\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n appearance=\"solid\"\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerRegularDismiss.displayName = 'BannerRegularDismiss'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Heading } from '../../heading/Heading'\nimport { useBannerContext } from '../BannerContext'\n\nconst StyledHeading = styled(\n Heading,\n {\n base: ['mb-4', 'text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nexport const BannerRegularHeading = (\n props: React.ComponentPropsWithoutRef<typeof Heading>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledHeading\n size=\"md\"\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularHeading.displayName = 'BannerRegularHeading'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../BannerContext'\n\nconst Container = styled(\n 'div',\n {\n base: ['relative', 'overflow-hidden', 'w-19/50'],\n variants: {\n size: {\n sm: ['hidden'],\n md: ['block']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['absolute', 'max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerRegularImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerRegularImage.displayName = 'BannerRegularImage'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../BannerContext'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-text-color)'],\n variants: {\n containerSize: {\n sm: ['mb-4'],\n md: ['mb-6']\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nexport const BannerRegularText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size={size}\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularText.displayName = 'BannerRegularText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerRegularActions } from './BannerRegularActions'\nimport { BannerRegularButton } from './BannerRegularButton'\nimport { BannerRegularContainer } from './BannerRegularContainer'\nimport { BannerRegularContent } from './BannerRegularContent'\nimport { BannerRegularDismiss } from './BannerRegularDismiss'\nimport { BannerRegularHeading } from './BannerRegularHeading'\nimport { BannerRegularImage } from './BannerRegularImage'\nimport { BannerRegularText } from './BannerRegularText'\n\nconst BannerRegularComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof BannerRegularContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerRegularContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerRegular = Object.assign(BannerRegularComponent, {\n Content: BannerRegularContent,\n Heading: BannerRegularHeading,\n Text: BannerRegularText,\n Actions: BannerRegularActions,\n Image: BannerRegularImage,\n Button: BannerRegularButton,\n Dismiss: BannerRegularDismiss\n})\n\nBannerRegularComponent.displayName = 'BannerRegular'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { useBannerContext } from '../BannerContext'\n\nconst StyledBannerSlimActions = styled(\n 'div',\n {\n base: ['flex', 'gap-4'],\n variants: {\n size: {\n sm: ['w-full'],\n md: ['w-auto']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nexport const BannerSlimActions = ({\n children,\n ...props\n}: React.ComponentProps<typeof StyledBannerSlimActions>) => {\n const { size } = useBannerContext()\n return (\n <StyledBannerSlimActions size={size} {...props}>\n {children}\n </StyledBannerSlimActions>\n )\n}\n\nBannerSlimActions.displayName = 'BannerSlimActions'\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../BannerContext'\n\nexport const BannerSlimButton = ({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => s === 'sm'),\n [size]\n )\n\n return (\n <Button\n size=\"md\"\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...props}\n className={cn('ml-auto', className)}\n />\n )\n}\n\nBannerSlimButton.displayName = 'BannerSlimButton'\n","import * as React from 'react'\n\nimport { styled, cn } from '~/styled'\n\nimport { BannerContainer } from '../BannerContainer'\nimport { useBannerContext } from '../BannerContext'\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nconst toAlign = {\n sm: 'items-start',\n md: 'items-center'\n}\n\nconst toWrap = {\n sm: 'flex-wrap',\n md: 'flex-nowrap'\n}\n\nconst StyledBannerSlimContainer = styled(\n BannerContainer,\n {\n base: ['p-4'],\n variants: {\n sizeWorkaround: {\n sm: [],\n md: ['px-6']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\ntype TBannerSlimContainerProps = React.ComponentProps<\n typeof StyledBannerSlimContainer\n>\n\nexport const BannerSlimContainer = ({\n className,\n ...rest\n}: TBannerSlimContainerProps): React.JSX.Element => {\n const { size } = useBannerContext()\n\n const direction = React.useMemo(() => {\n if (typeof size === 'string') {\n return toDirection[size]\n }\n return 'flex-col md:flex-row'\n }, [size])\n\n const align = React.useMemo(() => {\n if (typeof size === 'string') {\n return toAlign[size]\n }\n return 'items-start md:items-center'\n }, [size])\n\n const wrap = React.useMemo(() => {\n if (typeof size === 'string') {\n return toWrap[size]\n }\n return 'flex-wrap md:flex-nowrap'\n }, [size])\n\n return (\n <StyledBannerSlimContainer\n {...rest}\n sizeWorkaround={size}\n className={cn(direction, align, 'gap-4', wrap, className)}\n />\n )\n}\n\nBannerSlimContainer.displayName = 'BannerSlimContainer'\n","import { styled } from '~/styled'\n\nexport const BannerSlimContent = styled('div', {\n base: ['w-full', 'flex', 'items-center', 'gap-4']\n})\n\nBannerSlimContent.displayName = 'BannerSlimContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../BannerContext'\n\nconst StyledDismiss = styled(\n ActionIcon,\n {\n base: [],\n variants: {\n emphasis: {\n bold: ['text-white!']\n },\n containerSize: {\n sm: ['absolute', 'right-4', 'top-4'],\n md: ['static']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\ntype TBannerSlimDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerSlimDismiss = ({\n label = 'dismiss',\n ...rest\n}: TBannerSlimDismissProps): React.JSX.Element => {\n const { size, setHasDismiss, emphasis } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size=\"md\"\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n containerSize={size}\n emphasis={emphasis as TBannerSlimDismissProps['emphasis']}\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerSlimDismiss.displayName = 'BannerSlimDismiss'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../BannerContext'\n\nconst Container = styled(\n 'div',\n {\n base: ['overflow-hidden', 'rounded-full', 'self-start', 'shrink-0'],\n variants: {\n size: {\n sm: ['size-10'],\n md: ['size-12']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerSlimImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerSlimImage.displayName = 'BannerSlimImage'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../BannerContext'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nexport const BannerSlimText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size=\"md\"\n weight=\"bold\"\n containerSize={size}\n hasDismiss={hasDismiss}\n noCapsize\n {...props}\n />\n )\n}\n\nBannerSlimText.displayName = 'BannerSlimText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerContainer } from '../BannerContainer'\nimport { BannerSlimActions } from './BannerSlimActions'\nimport { BannerSlimButton } from './BannerSlimButton'\nimport { BannerSlimContainer } from './BannerSlimContainer'\nimport { BannerSlimContent } from './BannerSlimContent'\nimport { BannerSlimDismiss } from './BannerSlimDismiss'\nimport { BannerSlimImage } from './BannerSlimImage'\nimport { BannerSlimText } from './BannerSlimText'\n\nconst BannerSlimComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof Banner> &\n React.ComponentProps<typeof BannerContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerSlimContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerSlim = Object.assign(BannerSlimComponent, {\n Content: BannerSlimContent,\n Text: BannerSlimText,\n Image: BannerSlimImage,\n Button: BannerSlimButton,\n Dismiss: BannerSlimDismiss,\n Actions: BannerSlimActions\n})\n\nBannerSlimComponent.displayName = 'BannerSlim'\n","import { styled } from '~/styled'\n\nexport const Box = styled('div', {\n base: []\n})\n\nBox.displayName = 'Box'\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\n\nimport { useCarousel } from './Carousel'\n\nconst ArrowButton = styled('button', {\n base: [\n 'items-center',\n 'text-primary-800',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'size-12',\n 'top-1/2',\n '-translate-y-1/2',\n 'transition-colors',\n 'duration-150',\n 'ease-in-out',\n 'hover:text-primary-900',\n 'active:text-primary-1000',\n 'disabled:text-grey-200',\n 'disabled:cursor-not-allowed'\n ]\n})\n\nexport const CarouselArrowPrevious = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollPrev}\n disabled={!canScrollPrev}\n aria-label=\"Previous slide\"\n {...props}\n >\n <Icon is={ChevronLeft} />\n </ArrowButton>\n )\n}\n\nexport const CarouselArrowNext = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollNext, canScrollNext } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollNext}\n disabled={!canScrollNext}\n aria-label=\"Next slide\"\n {...props}\n >\n <Icon is={ChevronRight} />\n </ArrowButton>\n )\n}\n","import * as React from 'react'\n\nimport { cn, styled } from '~/styled'\n\nimport { useCarousel } from './Carousel'\n\nconst Dot = styled('button', {\n base: [\n 'bg-grey-600',\n 'cursor-pointer',\n 'duration-100',\n 'ease-in',\n 'focus:bg-primary-900',\n 'hover:bg-primary-900',\n 'mx-1',\n 'p-1',\n 'rounded-full',\n 'size-3',\n 'transition-all',\n 'disabled:bg-primary-800',\n 'disabled:cursor-default'\n ]\n})\n\nexport const CarouselPagination = ({\n className,\n ...rest\n}: React.HTMLAttributes<HTMLDivElement>) => {\n const { scrollSnaps, selectedIndex, scrollTo } = useCarousel()\n\n const dots = Array.from({ length: scrollSnaps.length }, (_, i) => i)\n\n return (\n <div className={cn('flex', 'justify-center', className)} {...rest}>\n {dots.map((index) => (\n <Dot\n key={index}\n type=\"button\"\n onClick={() => scrollTo(index)}\n disabled={index === selectedIndex}\n aria-label=\"slide dot\"\n />\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useCarousel } from './Carousel'\n\nexport type TCarouselSlideGap = 'none' | 0 | 1 | 2 | 3 | 4\n\n// Horizontal padding applied around each slide's content, on the same\n// spacing scale as Flex/ToggleGroup's gap. 'none' renders full-bleed slides.\nexport const toSlideGapClass: Record<TCarouselSlideGap, string> = {\n none: '',\n 0: 'px-0.5',\n 1: 'px-1',\n 2: 'px-2',\n 3: 'px-3',\n 4: 'px-4'\n}\n\n// Slides read the gap via context so it is configured once on the slider.\nexport const CarouselSlideGapContext = React.createContext<TCarouselSlideGap>(3)\n\ntype CarouselSliderProps = {\n children?: React.ReactNode\n className?: string\n gap?: TCarouselSlideGap\n overflow?: boolean\n tabIndex?: number\n}\n\nexport const CarouselSlider = ({\n children,\n className,\n gap = 3,\n overflow,\n tabIndex = 0,\n ...rest\n}: CarouselSliderProps) => {\n const { emblaRef } = useCarousel()\n\n return (\n <div\n ref={emblaRef}\n className={cn(\n 'ml-[50%]',\n '-translate-x-1/2',\n 'cursor-grab',\n overflow ? 'overflow-visible' : 'overflow-hidden',\n className\n )}\n role=\"listbox\"\n aria-live=\"polite\"\n tabIndex={tabIndex}\n {...rest}\n >\n <div className=\"flex\">\n <CarouselSlideGapContext.Provider value={gap}>\n {children}\n </CarouselSlideGapContext.Provider>\n </div>\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useCarousel } from './Carousel'\nimport { CarouselSlideGapContext, toSlideGapClass } from './CarouselSlider'\n\nexport const CarouselSlide = ({\n children,\n className,\n index,\n ...rest\n}: React.PropsWithChildren<\n { index: number } & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const { selectedIndex } = useCarousel()\n const gap = React.useContext(CarouselSlideGapContext)\n const isSelected = selectedIndex === index\n\n return (\n <div\n role=\"option\"\n aria-selected={isSelected}\n // min-w-0 so basis-full wins over the content's min-content size and\n // the slide never outgrows the slider viewport\n className={cn('min-w-0', 'basis-full', 'shrink-0', className)}\n {...rest}\n >\n {/* padding to create the gap between slides; gap=\"none\" for full-bleed */}\n <div\n className={cn('flex items-center justify-center', toSlideGapClass[gap])}\n >\n {children}\n </div>\n </div>\n )\n}\n","import useEmblaCarousel from 'embla-carousel-react'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { CarouselArrowNext, CarouselArrowPrevious } from './CarouselArrows'\nimport { CarouselPagination } from './CarouselPagination'\nimport { CarouselSlide } from './CarouselSlide'\nimport { CarouselSlider } from './CarouselSlider'\n\ntype EmblaApi = ReturnType<typeof useEmblaCarousel>[1]\n\ntype CarouselContextValue = {\n emblaRef: React.RefCallback<HTMLDivElement>\n emblaApi: EmblaApi\n selectedIndex: number\n scrollSnaps: number[]\n canScrollPrev: boolean\n canScrollNext: boolean\n scrollPrev: () => void\n scrollNext: () => void\n scrollTo: (index: number) => void\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\ntype CarouselProps = {\n currentSlide?: number\n}\n\nexport const CarouselComponent = ({\n children,\n currentSlide = 0,\n ...props\n}: React.PropsWithChildren<\n CarouselProps & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const [emblaRef, emblaApi] = useEmblaCarousel({\n startIndex: currentSlide,\n align: 'center'\n })\n\n const [selectedIndex, setSelectedIndex] = React.useState(currentSlide)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const scrollPrev = React.useCallback(() => {\n emblaApi?.scrollPrev()\n }, [emblaApi])\n\n const scrollNext = React.useCallback(() => {\n emblaApi?.scrollNext()\n }, [emblaApi])\n\n const scrollTo = React.useCallback(\n (index: number) => {\n emblaApi?.scrollTo(index)\n },\n [emblaApi]\n )\n\n const onSelect = React.useCallback(() => {\n if (!emblaApi) return\n setSelectedIndex(emblaApi.selectedScrollSnap())\n setCanScrollPrev(emblaApi.canScrollPrev())\n setCanScrollNext(emblaApi.canScrollNext())\n }, [emblaApi])\n\n const onInit = React.useCallback(() => {\n if (!emblaApi) return\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [emblaApi])\n\n React.useEffect(() => {\n if (!emblaApi) return\n\n onInit()\n onSelect()\n\n emblaApi.on('reInit', onInit)\n emblaApi.on('reInit', onSelect)\n emblaApi.on('select', onSelect)\n\n return () => {\n emblaApi.off('reInit', onInit)\n emblaApi.off('reInit', onSelect)\n emblaApi.off('select', onSelect)\n }\n }, [emblaApi, onInit, onSelect])\n\n const contextValue = React.useMemo<CarouselContextValue>(\n () => ({\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n }),\n [\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n ]\n )\n\n const { className, ...rest } = props\n\n return (\n <div className={cn('relative', 'w-full', className)} {...rest}>\n <CarouselContext.Provider value={contextValue}>\n {children}\n </CarouselContext.Provider>\n </div>\n )\n}\n\nexport const useCarousel = () => {\n const context = React.useContext(CarouselContext)\n if (!context) {\n throw new Error('useCarousel must be used within a Carousel')\n }\n\n return {\n ...context,\n // Alias for backward compatibility\n currentSlide: context.selectedIndex\n }\n}\n\nexport const Carousel = Object.assign(CarouselComponent, {\n ArrowNext: CarouselArrowNext,\n ArrowPrevious: CarouselArrowPrevious,\n Pagination: CarouselPagination,\n Slide: CarouselSlide,\n Slider: CarouselSlider\n})\n\nCarouselComponent.displayName = 'Carousel'\n","import { Minus, Ok } from '@atom-learning/icons'\nimport * as RadixCheckbox from '@radix-ui/react-checkbox'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { Icon } from '../icon/Icon'\n\nconst StyledCheckbox = styled(RadixCheckbox.Root, {\n base: [\n 'appearance-none',\n 'relative',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-[3px]',\n 'text-white',\n 'bg-white',\n 'cursor-pointer',\n 'size-4',\n 'p-0',\n 'flex',\n 'items-center',\n 'justify-center',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'shrink-0',\n 'not-disabled:before:-inset-2',\n 'not-disabled:before:-z-1',\n 'not-disabled:before:absolute',\n 'not-disabled:before:bg-primary-300',\n \"not-disabled:before:content-['']\",\n 'not-disabled:before:duration-125',\n 'not-disabled:before:ease-in-out',\n 'not-disabled:before:opacity-0',\n 'not-disabled:before:rounded-[50%]',\n 'not-disabled:before:scale-0',\n 'not-disabled:before:transition-[opacity,scale]',\n 'not-disabled:hover:before:opacity-100',\n 'not-disabled:hover:before:scale-100',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'data-[state=indeterminate]:bg-primary-800',\n 'data-[state=indeterminate]:border-primary-800',\n 'focus:-outline-offset-1',\n 'focus:outline-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n state: {\n error: ['border-danger']\n },\n size: {\n md: ['size-4'],\n lg: ['mt-px', 'size-6']\n }\n }\n})\n\nconst toIconSize = {\n md: 'sm',\n lg: 'sm'\n}\n\nexport const Checkbox = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledCheckbox>\n>(({ size = 'md', checked, ...rest }, ref) => {\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n\n return (\n <div className=\"relative z-1\">\n <StyledCheckbox ref={ref} checked={checked} size={size} {...rest}>\n <div className=\"absolute -inset-3 opacity-50\" />\n <RadixCheckbox.Indicator asChild>\n <Icon\n is={checked === 'indeterminate' ? Minus : Ok}\n size={iconSize}\n className=\"stroke-3\"\n />\n </RadixCheckbox.Indicator>\n </StyledCheckbox>\n </div>\n )\n})\n\nCheckbox.displayName = 'Checkbox'\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from '../CheckboxGroup.types'\n\ntype CheckboxGroupCheckedContextValue = {\n checked: CheckboxGroupItemValue[]\n handleItemCheckedChange: (\n newItemChecked: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\ntype CheckboxGroupCheckedContextProps = {\n checked?: CheckboxGroupCheckedContextValue['checked']\n defaultChecked?: CheckboxGroupCheckedContextValue['checked']\n onCheckedChange?: (\n checked: CheckboxGroupCheckedContextValue['checked']\n ) => void\n}\n\nexport const CheckboxGroupCheckedContext =\n React.createContext<CheckboxGroupCheckedContextValue>({\n checked: [],\n handleItemCheckedChange: () => null\n })\n\nconst generateNewCheckedFn = (\n currentChecked: CheckboxGroupCheckedContextValue['checked']\n) => {\n return (newItemChecked, itemValue) => {\n const newCheckedSet = new Set(currentChecked)\n if (newItemChecked) {\n newCheckedSet.add(itemValue)\n } else {\n newCheckedSet.delete(itemValue)\n }\n const newChecked = Array.from(newCheckedSet)\n return newChecked\n }\n}\n\nexport const CheckboxGroupCheckedProvider = ({\n checked: controlledChecked,\n defaultChecked = [],\n onCheckedChange,\n ...rest\n}: React.PropsWithChildren<CheckboxGroupCheckedContextProps>) => {\n const [checked, setChecked] = React.useState(defaultChecked)\n\n const handleItemControlledCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n if (!controlledChecked) return () => null\n const newCheckedFn = generateNewCheckedFn(controlledChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n },\n [onCheckedChange, controlledChecked]\n )\n\n const handleItemCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n setChecked((prevChecked) => {\n const newCheckedFn = generateNewCheckedFn(prevChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n return newChecked\n })\n },\n [onCheckedChange]\n )\n\n const value = React.useMemo<CheckboxGroupCheckedContextValue>(() => {\n const isControlled = Array.isArray(controlledChecked)\n return {\n checked: isControlled\n ? (controlledChecked as CheckboxGroupCheckedContextValue['checked']) // We're literally JUST checking it above but TS still flags it, wrongly, so casting\n : checked,\n handleItemCheckedChange: isControlled\n ? handleItemControlledCheckedChange\n : handleItemCheckedChange\n }\n }, [\n checked,\n handleItemCheckedChange,\n handleItemControlledCheckedChange,\n controlledChecked\n ])\n\n return <CheckboxGroupCheckedContext.Provider value={value} {...rest} />\n}\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from '../CheckboxGroup.types'\n\ntype CheckboxGroupMountedContextValue = {\n mounted: CheckboxGroupItemValue[]\n handleItemMountedChange: (\n newItemMounted: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\nexport const CheckboxGroupMountedContext =\n React.createContext<CheckboxGroupMountedContextValue>({\n mounted: [],\n handleItemMountedChange: () => null\n })\n\nexport const CheckboxGroupMountedProvider = (props) => {\n const { handleItemMountedChange: handleItemMountedChangeFurtherUpContext } =\n React.useContext(CheckboxGroupMountedContext)\n\n const [mounted, setMounted] = React.useState<CheckboxGroupItemValue[]>([])\n const handleItemMountedChange = React.useCallback(\n (newItemMounted, itemValue) => {\n handleItemMountedChangeFurtherUpContext?.(newItemMounted, itemValue)\n setMounted((prevMounted) => {\n const newMountedSet = new Set(prevMounted)\n if (newItemMounted) {\n newMountedSet.add(itemValue)\n } else {\n newMountedSet.delete(itemValue)\n }\n const newMounted = Array.from(newMountedSet)\n return newMounted\n })\n },\n [handleItemMountedChangeFurtherUpContext]\n )\n\n const value = React.useMemo<CheckboxGroupMountedContextValue>(\n () => ({ mounted, handleItemMountedChange }),\n [mounted, handleItemMountedChange]\n )\n\n return <CheckboxGroupMountedContext.Provider value={value} {...props} />\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './context/CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './context/CheckboxGroupMounted.context'\n\ntype CheckboxGroupAllItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'checked' | 'defaultChecked'\n>\n\nexport const CheckboxGroupAllItem = ({\n onCheckedChange,\n title = 'all',\n ...rest\n}: CheckboxGroupAllItemProps): React.JSX.Element => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.useContext(CheckboxGroupCheckedContext)\n const { mounted: mountedItems } = React.useContext(\n CheckboxGroupMountedContext\n )\n\n const handleItemCheckedChange = (newChecked) => {\n mountedItems.forEach((value) => {\n handleItemCheckedChangeContext(newChecked, value)\n })\n onCheckedChange?.(newChecked)\n }\n\n const isAllChecked = (() => {\n if (!checkedItems.length || !mountedItems.length) return false\n\n if (mountedItems.every((mountedItem) => checkedItems.includes(mountedItem)))\n return true\n\n if (mountedItems.some((mountedItem) => checkedItems.includes(mountedItem)))\n return 'indeterminate'\n\n return false\n })()\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={isAllChecked}\n title={title}\n {...rest}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './context/CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './context/CheckboxGroupMounted.context'\n\ntype CheckboxGroupItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'onCheckedChange' | 'checked' | 'defaultChecked'\n> & {\n onCheckedChange?: (newChecked: boolean) => void\n}\n\nexport const CheckboxGroupItem = ({\n value,\n title,\n onCheckedChange,\n ...rest\n}: CheckboxGroupItemProps): React.JSX.Element => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.useContext(CheckboxGroupCheckedContext)\n const { handleItemMountedChange } = React.useContext(\n CheckboxGroupMountedContext\n )\n\n const handleItemCheckedChange = (newChecked) => {\n handleItemCheckedChangeContext(newChecked, value)\n onCheckedChange?.(newChecked)\n }\n\n React.useEffect(() => {\n handleItemMountedChange(true, value)\n return () => {\n handleItemMountedChange(false, value)\n }\n }, [handleItemMountedChange, value])\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={checkedItems.includes(value)}\n title={title ?? String(value)}\n {...rest}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { CheckboxGroupMountedProvider } from './context/CheckboxGroupMounted.context'\n\ntype CheckboxGroupSubProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n}\n\nexport const CheckboxGroupSub = ({\n asChild = false,\n ...rest\n}: CheckboxGroupSubProps): React.JSX.Element => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\nimport { CheckboxGroupAllItem } from './CheckboxGroupAllItem'\nimport { CheckboxGroupItem } from './CheckboxGroupItem'\nimport { CheckboxGroupSub } from './CheckboxGroupSub'\nimport { CheckboxGroupCheckedProvider } from './context/CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedProvider } from './context/CheckboxGroupMounted.context'\n\ntype CheckboxGroupRootProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'defaultChecked'\n> & {\n checked?: CheckboxGroupItemValue[]\n onCheckedChange?: (checked: CheckboxGroupItemValue[]) => void\n defaultChecked?: CheckboxGroupItemValue[]\n asChild?: boolean\n}\n\nconst CheckboxGroupRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n asChild = false,\n ...rest\n}: CheckboxGroupRootProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupCheckedProvider\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n >\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n </CheckboxGroupCheckedProvider>\n )\n}\n\nexport const CheckboxGroup = Object.assign(CheckboxGroupRoot, {\n Item: CheckboxGroupItem,\n AllItem: CheckboxGroupAllItem,\n Sub: CheckboxGroupSub\n})\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = React.forwardRef<HTMLLIElement, TreeListItemProps>(\n ({ className, ...props }, ref) => (\n <li\n {...props}\n ref={ref}\n role=\"treeitem\"\n className={cn(\n 'flex',\n 'items-center',\n 'gap-2',\n 'not-first:mt-0.5',\n className\n )}\n />\n )\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { useCallbackRef } from '~/utilities/hooks/useCallbackRef'\n\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeCollapsibleContextValue = {\n triggerRef?: React.MutableRefObject<HTMLElement | null>\n setTriggerRef?: (HTMLElement) => void\n}\nexport const TreeCollapsibleContext =\n React.createContext<TreeCollapsibleContextValue>({})\nconst TreeCollapsibleProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n return (\n <TreeCollapsibleContext.Provider value={{ triggerRef, setTriggerRef }}>\n {children}\n </TreeCollapsibleContext.Provider>\n )\n}\n\nconst StyledCollapsibleTreeItemRoot = styled(Root, {\n base: ['w-full']\n})\n\ntype TreeCollapsibleProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof StyledCollapsibleTreeItemRoot>\nexport const TreeCollapsible = React.forwardRef(\n (\n props: TreeCollapsibleProps,\n ref: React.ForwardedRef<HTMLLIElement>\n ): React.JSX.Element => {\n return (\n <TreeListItem ref={ref}>\n <TreeCollapsibleProvider>\n <StyledCollapsibleTreeItemRoot {...props} />\n </TreeCollapsibleProvider>\n </TreeListItem>\n )\n }\n)\n","import { styled } from '~/styled'\n\nexport const TreeList = styled('ul', {\n base: ['flex', 'flex-col', 'p-0', 'm-0', 'list-none', 'w-full', '[&_&]:pl-4']\n})\n","import { Content } from '@radix-ui/react-collapsible'\nimport React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeList } from './TreeList'\n\ntype TreeCollapsibleContentProps = React.ComponentProps<typeof Content> &\n React.ComponentProps<typeof TreeList>\n\nexport const TreeCollapsibleContent = React.forwardRef<\n HTMLUListElement,\n TreeCollapsibleContentProps\n>(({ children, className, ...rest }, ref): React.JSX.Element => {\n const { triggerRef } = React.useContext(TreeCollapsibleContext)\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <Content\n className={cn('data-[state=closed]:hidden', className)}\n onKeyDown={handleOnKeydown}\n {...rest}\n asChild\n >\n <TreeList ref={ref} role=\"group\">\n {children}\n </TreeList>\n </Content>\n )\n})\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { cn } from '~/styled'\n\nexport const TreeIcon = ({\n className,\n ...props\n}: React.ComponentProps<typeof Icon>): React.JSX.Element => (\n <Icon\n size=\"md\"\n {...props}\n className={cn('my-1', 'shrink-0', 'self-start', className)}\n />\n)\n","import React from 'react'\n\nimport { Text } from '~/components/text/Text'\nimport { cn } from '~/styled'\n\ntype TStyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = ({\n className,\n ...rest\n}: TStyledTreeTextProps): React.JSX.Element => (\n <Text\n as=\"span\"\n {...rest}\n className={cn(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n className\n )}\n size=\"md\"\n />\n)\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\n\nimport { TreeIcon } from './TreeIcon'\nimport { TreeText } from './TreeText'\n\nconst StyledItemContent = styled('div', {\n base: [\n 'w-full',\n 'relative',\n 'min-h-8',\n 'pl-10',\n 'flex',\n 'items-center',\n 'gap-2'\n ]\n})\n\ntype TreeItemContentProps = React.ComponentProps<typeof StyledItemContent>\n\nexport const TreeItemContent = React.forwardRef<\n HTMLDivElement,\n TreeItemContentProps\n>(({ children, ...rest }, ref) => (\n <StyledItemContent ref={ref} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <TreeText>{child}</TreeText>\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <TreeIcon {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n))\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport React from 'react'\n\nimport { ActionIcon } from '~/components/action-icon/ActionIcon'\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeItemContent } from './TreeItemContent'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: [\n 'absolute',\n 'left-0',\n 'top-0',\n 'pointer-events-none',\n '[&_svg]:duration-300',\n '[&_svg]:transition-transform',\n '[&[data-state=closed]>svg]:-rotate-90',\n '[&[data-state=open]>svg]:rotate-0'\n ]\n})\n\ntype TNavigationMenuCollapsibleTriggerProps = React.ComponentProps<\n typeof TreeItemContent\n> & {\n label: string\n}\n\nexport const TreeCollapsibleTrigger = ({\n children,\n label,\n className,\n ...rest\n}: TNavigationMenuCollapsibleTriggerProps) => {\n const { setTriggerRef, triggerRef } = React.useContext(TreeCollapsibleContext)\n\n return (\n <TreeItemContent\n {...rest}\n className={cn('cursor-pointer', className)}\n onClick={(event) => {\n rest.onClick?.(event)\n triggerRef?.current?.click()\n }}\n >\n <Trigger asChild>\n <StyledActionIcon\n size=\"sm\"\n ref={setTriggerRef}\n label={label}\n theme=\"neutral\"\n hasTooltip={false}\n onClick={(e) => e.stopPropagation()}\n >\n <Icon is={ChevronDown} />\n </StyledActionIcon>\n </Trigger>\n {children}\n </TreeItemContent>\n )\n}\n","import React from 'react'\n\nimport { TreeItemContent } from './TreeItemContent'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeItemProps = React.ComponentProps<typeof TreeItemContent>\n\nexport const TreeItem = ({\n children,\n ...rest\n}: TreeItemProps): React.JSX.Element => {\n return (\n <TreeListItem>\n <TreeItemContent {...rest}>{children}</TreeItemContent>\n </TreeListItem>\n )\n}\n","import React from 'react'\n\nimport { TreeCollapsible } from './TreeCollapsible'\nimport { TreeCollapsibleContent } from './TreeCollapsibleContent'\nimport { TreeCollapsibleTrigger } from './TreeCollapsibleTrigger'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeItem } from './TreeItem'\nimport { TreeList } from './TreeList'\nimport { TreeText } from './TreeText'\n\ntype TreeProps = React.ComponentProps<typeof TreeList>\n\nexport const TreeRoot = React.forwardRef<HTMLUListElement, TreeProps>(\n ({ children, ...rest }, ref) => {\n return (\n <TreeList {...rest} ref={ref} role=\"tree\">\n {children}\n </TreeList>\n )\n }\n)\n\nexport const Tree = Object.assign(TreeRoot, {\n Collapsible: TreeCollapsible,\n CollapsibleContent: TreeCollapsibleContent,\n CollapsibleTrigger: TreeCollapsibleTrigger,\n Item: TreeItem,\n Icon: TreeIcon,\n Text: TreeText\n})\n","import React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleProps = Omit<\n React.ComponentProps<typeof Tree.Collapsible> &\n React.ComponentProps<typeof CheckboxGroup.Sub>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsible = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleProps): React.JSX.Element => {\n return (\n <CheckboxGroup.Sub asChild>\n <Tree.Collapsible {...rest}>{children}</Tree.Collapsible>\n </CheckboxGroup.Sub>\n )\n}\n","import React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleContentProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleContent>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleContent = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleContentProps): React.JSX.Element => {\n return (\n <CheckboxGroup.Sub asChild>\n <Tree.CollapsibleContent {...rest} forceMount>\n {children}\n </Tree.CollapsibleContent>\n </CheckboxGroup.Sub>\n )\n}\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { Tree } from '~/components/tree/Tree'\nimport { styled } from '~/styled'\n\nconst StyledItemContent = styled('label', {\n base: ['max-w-full', 'flex', 'items-center', 'gap-2']\n})\n\ntype CheckboxTreeItemContentProps = React.ComponentProps<\n typeof StyledItemContent\n>\n\nexport const CheckboxTreeItemContent = ({\n children,\n ...rest\n}: CheckboxTreeItemContentProps): React.JSX.Element => {\n return (\n <StyledItemContent {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <Tree.Text>{child}</Tree.Text>\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <Tree.Icon {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n )\n}\n","import React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxGroupCollapsibleTriggerProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleTrigger> &\n React.ComponentProps<typeof CheckboxGroup.AllItem>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleTrigger = ({\n onCheckedChange,\n title,\n label,\n children,\n disabled,\n ...rest\n}: CheckboxGroupCollapsibleTriggerProps): React.JSX.Element => {\n const treeCollapsibleTriggerProps = { label }\n const checkboxAllItemProps = { onCheckedChange, title, disabled }\n return (\n <Tree.CollapsibleTrigger {...treeCollapsibleTriggerProps} {...rest}>\n <CheckboxTreeItemContent\n onClick={\n // Don't propagate click and don't open/close the collapsible when the label/checkbox are clicked\n (e) => e.stopPropagation()\n }\n >\n <CheckboxGroup.AllItem {...checkboxAllItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.CollapsibleTrigger>\n )\n}\n","import React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxTreeItemProps = Omit<\n React.ComponentProps<typeof Tree.Item> &\n React.ComponentProps<typeof CheckboxGroup.Item>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeItem = ({\n value,\n title,\n onCheckedChange,\n children,\n disabled,\n ...rest\n}: CheckboxTreeItemProps): React.JSX.Element => {\n const checkboxItemProps = { value, title, onCheckedChange, disabled }\n return (\n <Tree.Item {...rest}>\n <CheckboxTreeItemContent>\n <CheckboxGroup.Item {...checkboxItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.Item>\n )\n}\n","import React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeCollapsible } from './CheckboxTreeCollapsible'\nimport { CheckboxTreeCollapsibleContent } from './CheckboxTreeCollapsibleContent'\nimport { CheckboxTreeCollapsibleTrigger } from './CheckboxTreeCollapsibleTrigger'\nimport { CheckboxTreeItem } from './CheckboxTreeItem'\n\ntype CheckboxTreeRootProps = Omit<\n React.ComponentProps<typeof CheckboxGroup> &\n React.ComponentProps<typeof Tree>,\n 'asChild'\n>\n\nexport const CheckboxTreeRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n ...rest\n}: CheckboxTreeRootProps): React.ReactElement<unknown> => {\n const checkboxGroupProps = { checked, defaultChecked, onCheckedChange }\n return (\n <CheckboxGroup {...checkboxGroupProps} asChild>\n <Tree {...rest} />\n </CheckboxGroup>\n )\n}\n\ntype CheckboxTreeType = typeof CheckboxTreeRoot & {\n Collapsible: typeof CheckboxTreeCollapsible\n CollapsibleContent: typeof CheckboxTreeCollapsibleContent\n CollapsibleTrigger: typeof CheckboxTreeCollapsibleTrigger\n Item: typeof CheckboxTreeItem\n}\n\nexport const CheckboxTree: CheckboxTreeType = Object.assign(CheckboxTreeRoot, {\n Collapsible: CheckboxTreeCollapsible,\n CollapsibleContent: CheckboxTreeCollapsibleContent,\n CollapsibleTrigger: CheckboxTreeCollapsibleTrigger,\n Item: CheckboxTreeItem\n})\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { InlineMessageTheme } from './InlineMessage.types'\n\nexport const INLINE_MESSAGE_ICONS: Record<\n InlineMessageTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n success: OkCircle,\n warning: Danger,\n info: Info,\n neutral: Info,\n error: Error\n}\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { Text } from '~/components/text/Text'\nimport { styled } from '~/styled'\n\nimport { INLINE_MESSAGE_ICONS } from './InlineMessage.config'\nimport { InlineMessageTheme } from './InlineMessage.types'\n\nconst InlineMessageContainer = styled('div', {\n base: ['flex'],\n variants: {\n theme: {\n success: ['text-success'],\n warning: ['[&_svg]:text-warning-dark', 'text-warning-text'],\n info: ['text-info'],\n neutral: ['text-grey-800'],\n error: ['text-danger']\n }\n }\n})\n\ntype TInlineMessageProps = React.ComponentProps<\n typeof InlineMessageContainer\n> & {\n showIcon?: boolean\n size?: 'xs' | 'sm' | 'md'\n}\n\nexport const InlineMessage = ({\n className,\n showIcon = true,\n theme = 'error',\n size = 'sm',\n children,\n ...rest\n}: TInlineMessageProps) => (\n <InlineMessageContainer theme={theme} className={className} {...rest}>\n {showIcon && (\n <Icon\n size=\"sm\"\n is={INLINE_MESSAGE_ICONS[theme as InlineMessageTheme]}\n className=\"mr-2\"\n />\n )}\n <Text as=\"span\" size={size} className=\"translate-y-0.5\">\n {children}\n </Text>\n </InlineMessageContainer>\n)\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport type { Override } from '~/utilities/types'\n\nconst StyledLabel = styled('label', {\n base: ['text-grey-900', 'font-body', 'm-0'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n type: {\n block: ['block', 'font-semibold'],\n inline: ['flex', 'font-normal', 'max-w-max']\n },\n align: { start: [], center: [] },\n direction: { reverse: [], row: [] },\n appearance: { standard: [], modern: [] }\n },\n compoundVariants: [\n {\n type: 'inline',\n align: 'start',\n class: ['items-start']\n },\n {\n type: 'inline',\n align: 'center',\n class: ['items-center']\n },\n {\n type: 'inline',\n direction: 'reverse',\n class: ['flex-row-reverse']\n },\n {\n type: 'inline',\n direction: 'row',\n class: ['flex-row']\n },\n {\n type: 'block',\n appearance: 'modern',\n class: ['font-normal']\n }\n ]\n})\n\nexport type LabelProps = Override<\n React.ComponentPropsWithoutRef<typeof StyledLabel>,\n {\n as?: 'label' | 'legend'\n required?: boolean\n }\n>\n\nexport const Label = ({\n align = 'start',\n as = 'label',\n direction = 'row',\n size = 'md',\n type = 'block',\n children,\n required,\n ...rest\n}: LabelProps) => (\n <StyledLabel\n as={as}\n size={size}\n type={type}\n align={align}\n direction={direction}\n {...rest}\n >\n {children}\n {required && (\n <span className=\"text-danger ml-1 font-normal\" aria-hidden>\n *\n </span>\n )}\n </StyledLabel>\n)\n\nLabel.displayName = 'Label'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { Override } from '~/utilities/types'\n\nconst StyledRadioButton = styled(\n RadioGroup.Item,\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-full',\n 'text-white',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'disabled:bg-grey-200',\n 'disabled:border-grey-800',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'disabled:data-[state=checked]:bg-grey-800',\n 'disabled:data-[state=checked]:border-grey-800'\n ],\n variants: {\n size: {\n md: ['size-4'],\n lg: ['-mt-1', 'size-6']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(\n RadioGroup.Indicator,\n {\n base: ['size-1.5', 'rounded-full', 'bg-current', 'absolute'],\n variants: {\n size: {\n md: ['size-1.5'],\n lg: ['size-3']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype RadioButtonProps = Override<\n React.ComponentProps<typeof StyledRadioButton>,\n {\n as?: never\n } & {\n 'aria-label'?: string\n }\n>\n\nexport const RadioButton = ({ size, ...props }: RadioButtonProps) => {\n return (\n <StyledRadioButton {...props} size={size}>\n <StyledIndicator size={size} />\n </StyledRadioButton>\n )\n}\n\nRadioButton.displayName = 'RadioButton'\n","import * as React from 'react'\n\nimport { Text } from '~/components/text/Text'\nimport { cn } from '~/styled'\n\nexport const Description = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => (\n <Text size=\"sm\" className={cn('text-grey-700', 'max-w-[80ch]', className)}>\n {children}\n </Text>\n)\n","import * as React from 'react'\n\nimport { Checkbox } from '~/components/checkbox/Checkbox'\nimport { InlineMessage } from '~/components/inline-message/InlineMessage'\nimport { Label } from '~/components/label/Label'\nimport { RadioButton } from '~/components/radio-button/RadioButton'\nimport { cn } from '~/styled'\n\nimport { Description } from './FieldDescription'\n\ntype InlineFieldWrapperProps = {\n className?: string\n error?: string\n label: string\n required?: boolean\n align?: 'start' | 'center'\n direction?: 'row' | 'reverse'\n description?: string\n}\n\nexport const InlineFieldWrapper = ({\n align = 'start',\n children,\n className,\n description,\n direction = 'row',\n error,\n label,\n required\n}: React.PropsWithChildren<InlineFieldWrapperProps>) => (\n <div className={className}>\n <Label\n align={align}\n direction={direction}\n required={required}\n type=\"inline\"\n >\n {React.Children.map(children, (child: any) => (\n <div\n className={cn(\n direction === 'reverse' && 'ml-3',\n direction === 'row' && 'mr-3',\n (child?.type === Checkbox || child?.type === RadioButton) &&\n child?.props?.size !== 'lg' &&\n 'translate-y-1'\n )}\n >\n {child}\n </div>\n ))}\n {label}\n </Label>\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n {description && (\n <Description\n className={cn(\n 'mt-2',\n direction === 'reverse' && 'mr-7',\n direction === 'row' && 'ml-7'\n )}\n >\n {description}\n </Description>\n )}\n </div>\n)\n\nInlineFieldWrapper.displayName = 'InlineFieldWrapper'\n","import delve from 'dlv'\nimport { useFormContext } from 'react-hook-form'\n\nexport const useFieldError = (fieldName: string) => {\n const { errors } = useFormContext()\n\n // in case of migration to a newer version of react-hook-form the path needs to updated to account for dynamic fields naming convention\n const fieldPath = fieldName.split(/[,[\\].]+?/).filter(Boolean)\n\n const getErrors = () => delve(errors, fieldPath)\n\n return {\n error: getErrors()?.message\n }\n}\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { Checkbox } from '~/components/checkbox/Checkbox'\nimport { FieldElementWrapperProps } from '~/components/field-wrapper/FieldWrapper'\nimport { InlineFieldWrapper } from '~/components/field-wrapper/InlineFieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\n\nenum CheckboxValue {\n ON = 'on',\n OFF = 'off'\n}\n\nexport const CheckboxField = ({\n className,\n label,\n name,\n validation,\n description,\n defaultChecked = false,\n checked,\n onCheckedChange,\n ...remainingProps\n}: React.ComponentProps<typeof Checkbox> & FieldElementWrapperProps) => {\n const { control } = useFormContext()\n const { error } = useFieldError(name)\n const {\n field: { ref, onChange, value: innerChecked, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: defaultChecked\n })\n\n React.useEffect(() => {\n // Update the react-hook-form inner checked to match what is passed in.\n if (typeof checked !== 'undefined') onChange(checked)\n }, [checked])\n\n return (\n <InlineFieldWrapper\n className={className}\n description={description}\n error={error}\n label={label}\n required={Boolean(validation?.required)}\n >\n <Checkbox\n ref={ref}\n name={innerName}\n {...remainingProps}\n onCheckedChange={(newChecked) => {\n onChange(newChecked)\n onCheckedChange?.(newChecked)\n }}\n value={innerChecked ? CheckboxValue.ON : CheckboxValue.OFF}\n checked={innerChecked}\n {...(error && { state: 'error' })}\n />\n </InlineFieldWrapper>\n )\n}\n\nCheckboxField.displayName = 'CheckboxField'\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nexport const StyledChipContent = styled('span', {\n base: [\n 'inline-flex',\n 'items-center',\n 'px-1',\n 'grow',\n 'overflow-hidden',\n 'text-ellipsis',\n 'whitespace-nowrap',\n '*:not-last:mr-1'\n ]\n})\n\nconst toIconSize = { sm: 'sm', md: 'sm', lg: 'md' }\n\nexport const ChipIcon = (props: React.ComponentProps<typeof Icon>) => {\n const rootContext = React.useContext(ChipRootContext)\n const { size } = rootContext\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n return <Icon {...props} size={iconSize} />\n}\n\nconst ChipContent = ({ children, ...rest }) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n return (\n <StyledChipContent {...rest}>\n {\n childrenArray.map((child, index) => {\n if (!isSingleChild && typeof child === 'string')\n return (\n <span\n key={child}\n className=\"overflow-hidden text-ellipsis whitespace-nowrap\"\n >\n {child}\n </span>\n )\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <ChipIcon key={`icon-${index}`} {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledChipContent>\n )\n}\n\nexport const StyledRoot = styled('div', {\n base: [\n 'flex',\n 'px-2',\n 'border',\n 'rounded-md',\n 'items-center',\n 'font-body',\n 'max-w-full',\n 'border-primary-800',\n 'text-primary-900',\n 'bg-primary-100',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n sm: ['h-6', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['h-8', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n lg: ['h-10', 'text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n appearance: {\n standard: [],\n modern: ['border-grey-900', 'text-grey-900', 'bg-grey-100']\n }\n }\n})\n\nexport type TChipRootContext = React.ComponentProps<typeof StyledRoot>\nexport type TChipRootProviderProps = TChipRootContext\n\nexport const ChipRootContext = React.createContext<TChipRootContext>({})\n\nexport const ChipRootProvider = ({\n size,\n children\n}: TChipRootProviderProps) => {\n const value = React.useMemo<TChipRootContext>(() => ({ size }), [size])\n return (\n <ChipRootContext.Provider value={value}>\n {children}\n </ChipRootContext.Provider>\n )\n}\n\nexport type TChipRootProps = TChipRootProviderProps\n\nconst ChipRoot = React.forwardRef<HTMLDivElement, TChipRootProps>(\n ({ size = 'md', ...rest }, ref) => {\n return (\n <ChipRootProvider size={size}>\n <StyledRoot ref={ref} size={size} {...rest} />\n </ChipRootProvider>\n )\n }\n)\n\nexport const Chip = Object.assign(ChipRoot, {\n Content: ChipContent,\n Icon: ChipIcon\n})\n\nChipRoot.displayName = 'Chip'\n","import { styled } from '~/styled'\n\nexport const ChipGroup = styled('div', {\n base: ['flex', 'flex-row', 'flex-wrap', 'gap-2']\n})\n","import * as React from 'react'\n\nexport interface IDismissibleGroupContext {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\nexport const DismissibleGroupContext =\n React.createContext<IDismissibleGroupContext>({\n onDismiss: () => null\n })\n\nexport interface IDismissibleGroupProps {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\n\nexport const DismissibleGroupProvider = ({\n children,\n disabled,\n onDismiss\n}: React.PropsWithChildren<IDismissibleGroupProps>) => {\n const value = React.useMemo<IDismissibleGroupContext>(\n () => ({ disabled, onDismiss }),\n [disabled, onDismiss]\n )\n return (\n <DismissibleGroupContext.Provider value={value}>\n {children}\n </DismissibleGroupContext.Provider>\n )\n}\n\nexport interface IDismissibleGroupRootProps extends IDismissibleGroupProps {\n as?: React.ElementType\n}\n\nexport const DismissibleGroupRoot = ({\n as: Component = 'div',\n disabled,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<IDismissibleGroupRootProps>) => {\n return (\n <DismissibleGroupProvider disabled={disabled} onDismiss={onDismiss}>\n <Component {...rest} />\n </DismissibleGroupProvider>\n )\n}\n\nDismissibleGroupRoot.displayName = 'DismissibleGroup'\n","import * as React from 'react'\n\nimport { Dismissible } from '~/components/dismissible'\n\nimport { DismissibleGroupContext } from './DismissibleGroupRoot'\n\nexport type TDismissibleGroupItemProps = React.ComponentProps<\n typeof Dismissible\n> & {\n value: string | number\n disabled?: boolean\n}\n\nexport const DismissibleGroupItem = ({\n children,\n value,\n disabled: itemDisabled = false,\n ...rest\n}: React.PropsWithChildren<TDismissibleGroupItemProps>) => {\n const groupContext = React.useContext(DismissibleGroupContext)\n if (groupContext === undefined) {\n throw new Error(\n 'DismissibleGroup.Item can only be used within a DismissibleGroup'\n )\n }\n const { onDismiss, disabled: groupDisabled } = groupContext\n return (\n <Dismissible\n disabled={groupDisabled || itemDisabled}\n {...rest}\n onDismiss={() => onDismiss(value)}\n >\n {children}\n </Dismissible>\n )\n}\n","import { DismissibleTrigger } from '~/components/dismissible/DismissibleTrigger'\n\nimport { DismissibleGroupItem } from './DismissibleGroupItem'\nimport { DismissibleGroupRoot } from './DismissibleGroupRoot'\n\nexport const DismissibleGroup = Object.assign(DismissibleGroupRoot, {\n Item: DismissibleGroupItem,\n Trigger: DismissibleTrigger\n})\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Chip } from '~/components/chip/Chip'\nimport { DismissibleGroup } from '~/components/dismissible-group'\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledChipDismissibleGroupItem = styled(Chip, {\n base: ['flex', 'px-1']\n})\n\nexport type TChipDismissibleGroupItem = React.ComponentProps<\n typeof DismissibleGroup.Item\n> &\n React.ComponentProps<typeof StyledChipDismissibleGroupItem> & {\n dismissActionLabel: string\n }\n\nexport const ChipDismissibleGroupItem = ({\n size = 'md',\n children,\n dismissActionLabel = 'Dismiss',\n ...rest\n}: TChipDismissibleGroupItem) => {\n return (\n <DismissibleGroup.Item asChild {...rest}>\n <StyledChipDismissibleGroupItem size={size}>\n <Chip.Content>{children}</Chip.Content>\n <DismissibleGroup.Trigger asChild>\n <ActionIcon\n label={dismissActionLabel}\n size={size === 'sm' ? 'xs' : 'sm'}\n className=\"text-grey-600\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </DismissibleGroup.Trigger>\n </StyledChipDismissibleGroupItem>\n </DismissibleGroup.Item>\n )\n}\n","import * as React from 'react'\n\nimport { ChipGroup } from '~/components/chip/ChipGroup'\nimport { DismissibleGroup } from '~/components/dismissible-group'\n\ntype TChipDismissibleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof DismissibleGroup>\n\nexport const ChipDismissibleGroupRoot = React.forwardRef<\n HTMLDivElement,\n TChipDismissibleGroupRootProps\n>((props, ref) => {\n return <ChipGroup as={DismissibleGroup} ref={ref as any} {...props} />\n})\n","import { ChipDismissibleGroupItem } from './ChipDismissibleGroupItem'\nimport { ChipDismissibleGroupRoot } from './ChipDismissibleGroupRoot'\n\ntype TChipDismissibleGroup = typeof ChipDismissibleGroupRoot & {\n Item: typeof ChipDismissibleGroupItem\n}\n\nexport const ChipDismissibleGroup =\n ChipDismissibleGroupRoot as TChipDismissibleGroup\nChipDismissibleGroup.Item = ChipDismissibleGroupItem\nChipDismissibleGroup.displayName = 'ChipDismissibleGroup'\n","import { Ok } from '@atom-learning/icons'\nimport * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { Chip } from '~/components/chip/Chip'\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\n\nconst StyledChipToggleIcon = styled(Icon, {\n base: ['hidden']\n})\n\nconst StyledChipToggleGroupItem = styled(Chip, {\n base: [\n 'flex',\n 'not-disabled:cursor-pointer',\n 'not-disabled:data-[state=on]:hover:bg-white',\n 'not-disabled:data-[state=on]:hover:text-primary-1000',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-grey-200',\n 'not-disabled:hover:border-current',\n 'not-disabled:hover:text-grey-1000',\n 'data-[state=off]:bg-white',\n 'data-[state=off]:border-grey-600',\n 'data-[state=off]:text-grey-800',\n 'data-[state=on]:[&_svg]:block'\n ],\n variants: {\n appearance: {\n standard: [],\n modern: [\n 'data-[state=off]:bg-grey-100',\n 'data-[state=off]:border-transparent',\n 'data-[state=on]:border-grey-900',\n 'data-[state=on]:text-grey-900',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:font-bold'\n ]\n }\n }\n})\n\ntype TChipToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledChipToggleGroupItem>\n\nexport const ChipToggleGroupItem = ({\n size = 'md',\n appearance,\n children,\n ...rest\n}: TChipToggleGroupItem) => {\n return (\n <ToggleGroup.Item {...rest} asChild>\n <StyledChipToggleGroupItem as=\"button\" appearance={appearance}>\n <StyledChipToggleIcon is={Ok} size={size === 'lg' ? 'md' : 'sm'} />\n <Chip.Content>{children}</Chip.Content>\n </StyledChipToggleGroupItem>\n </ToggleGroup.Item>\n )\n}\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\ntype RootType = {\n disableDeselect?: boolean\n}\n\ntype ToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root> &\n RootType\n\nexport const ToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n ToggleGroupRootProps\n>(({ disableDeselect = false, onValueChange, defaultValue, ...rest }, ref) => {\n const [internalValue, setInternalValue] =\n React.useState<ToggleGroupRootProps['value']>(defaultValue)\n const handleValueChange: ToggleGroupRootProps['onValueChange'] = (\n newValue\n ) => {\n if (disableDeselect && (newValue === '' || newValue?.length === 0)) return\n setInternalValue(newValue)\n onValueChange?.(newValue)\n }\n\n return (\n // eslint-disable-next-line\n // @ts-ignore Radix types complain on properties depending on whether `type=\"single\"` or `\"multiple\"`. Works correctly so muting.\n <ToggleGroup.Root\n ref={ref}\n onValueChange={handleValueChange}\n value={internalValue}\n {...rest}\n />\n )\n})\n","import { ToggleGroupRoot } from './ToggleGroupRoot'\n\nexport const ToggleGroup = {\n Root: ToggleGroupRoot\n}\n","import * as React from 'react'\n\nimport { ChipGroup } from '~/components/chip/ChipGroup'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype TChipToggleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const ChipToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n TChipToggleGroupRootProps\n>((props, ref) => {\n return (\n <ChipGroup\n ref={ref}\n as={ToggleGroup.Root}\n orientation=\"horizontal\"\n {...props}\n />\n )\n})\n","import { ChipToggleGroupItem } from './ChipToggleGroupItem'\nimport { ChipToggleGroupRoot } from './ChipToggleGroupRoot'\n\ntype TChipToggleGroup = typeof ChipToggleGroupRoot & {\n Item: typeof ChipToggleGroupItem\n}\n\nexport const ChipToggleGroup = ChipToggleGroupRoot as TChipToggleGroup\nChipToggleGroup.Item = ChipToggleGroupItem\nChipToggleGroup.displayName = 'ChipToggleGroupItem'\n","import { ComboboxInput as BaseComboboxInput } from '@reach/combobox'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const StyledComboboxInput = styled(BaseComboboxInput, {\n base: [\n 'bg-(image:--bg-chevron)',\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n '[background-repeat:no-repeat,repeat-x]',\n 'bg-size-[--spacing(5)_auto,100%]',\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'cursor-text',\n 'block',\n 'font-body',\n 'h-10',\n 'pl-3',\n 'pr-10',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'w-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800'\n ],\n\n variants: {\n size: {\n sm: ['h-8', 'text-sm', 'leading-[1.7]'],\n md: ['h-10', 'text-md', 'leading-loose'],\n lg: ['h-12', 'text-md', 'leading-loose']\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n theme: {\n white: [],\n grey: []\n },\n state: {\n error: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border', 'border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nexport type ComboboxInputProps = React.ComponentProps<\n typeof StyledComboboxInput\n>\n\nexport const ComboboxInput = React.forwardRef<\n HTMLInputElement,\n ComboboxInputProps\n>(({ size = 'md', appearance = 'standard', ...rest }, ref) => (\n <StyledComboboxInput\n size={size}\n appearance={appearance}\n {...rest}\n ref={ref}\n />\n))\n","import { ComboboxList as BaseComboboxList } from '@reach/combobox'\n\nimport { styled } from '~/styled'\n\nexport const ComboboxList = styled(BaseComboboxList, {\n base: ['list-none', 'm-0', 'p-0', 'select-none']\n})\n","import { ComboboxOption as BaseComboboxOption } from '@reach/combobox'\n\nimport { styled } from '~/styled'\n\nexport const ComboboxOption = styled(BaseComboboxOption, {\n base: [\n 'text-grey-900',\n 'cursor-pointer',\n 'm-0',\n 'p-2',\n 'hover:bg-grey-100',\n 'hover:rounded-sm',\n 'aria-selected:bg-grey-100',\n 'aria-selected:rounded-sm',\n 'data-user-value:text-primary-800'\n ]\n})\n","import { ComboboxPopover as BaseComboboxPopover } from '@reach/combobox'\n\nimport { styled } from '~/styled'\n\nexport const ComboboxPopover = styled(BaseComboboxPopover, {\n base: [\n 'bg-white',\n 'border',\n 'border-grey-200',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'font-body',\n 'text-md',\n 'outline-none',\n 'p-1',\n 'translate-y-2'\n ]\n})\n","import { Combobox as BaseCombobox, ComboboxOptionText } from '@reach/combobox'\n\nimport { ComboboxInput } from './ComboboxInput'\nimport { ComboboxList } from './ComboboxList'\nimport { ComboboxOption } from './ComboboxOption'\nimport { ComboboxPopover } from './ComboboxPopover'\n\n// ':root': { '--reach-combobox': 1 }\n\nexport const Combobox = Object.assign(BaseCombobox, {\n displayName: 'Combobox',\n Option: ComboboxOption,\n Input: ComboboxInput,\n Popover: ComboboxPopover,\n List: ComboboxList,\n OptionText: ComboboxOptionText\n})\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\nimport { Override } from '~/utilities/types'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nexport const StyledLink = styled(\n 'a',\n {\n base: [\n 'bg-[unset]',\n 'text-primary-800',\n 'cursor-pointer',\n 'font-body',\n 'no-underline',\n 'focus:text-primary-900',\n 'focus:underline',\n 'hover:text-primary-900',\n 'hover:underline',\n 'active:text-primary-1000',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:after:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:before:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:text-[100%]/none'\n ],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype LinkProps = Override<\n React.ComponentProps<typeof StyledLink>,\n NavigatorActions & { disabled?: boolean }\n>\n\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n ({ as, disabled, href, ...rest }, ref) => (\n <StyledLink\n as={as || (!href ? 'button' : undefined)}\n noCapsize={!href ? true : undefined}\n href={href}\n {...(disabled && { disabled: true })}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref as any}\n />\n )\n)\n\nLink.displayName = 'Link'\n","import * as React from 'react'\n\nimport { ValidationOptions } from '~/components/form/validation'\nimport { InlineMessage } from '~/components/inline-message/InlineMessage'\nimport { Label } from '~/components/label/Label'\nimport { Link } from '~/components/link/Link'\nimport { cn } from '~/styled'\n\nimport { type LabelProps } from '../label/Label'\nimport { Description } from './FieldDescription'\n\nexport type FieldWrapperProps = {\n className?: string\n error?: string\n fieldId: string\n label: string\n prompt?: { link?: string; label: string; onClick?: () => void }\n description?: string\n required?: boolean\n hideLabel?: boolean\n appearance?: LabelProps['appearance']\n}\n\nexport type FieldElementWrapperProps = Omit<FieldWrapperProps, 'fieldId'> & {\n name: string\n validation?: ValidationOptions\n}\n\nexport const FieldWrapper = ({\n children,\n error,\n fieldId,\n label,\n prompt,\n description,\n required,\n hideLabel,\n appearance,\n ...rest\n}: React.PropsWithChildren<FieldWrapperProps>) => (\n <div {...rest}>\n <div\n className={cn(\n 'mb-3',\n 'flex',\n 'items-center',\n 'justify-between',\n hideLabel && 'sr-only'\n )}\n >\n <Label htmlFor={fieldId} required={required} appearance={appearance}>\n {label}\n </Label>\n {prompt && (\n <Link href={prompt?.link} onClick={prompt?.onClick} size=\"sm\">\n {prompt.label}\n </Link>\n )}\n </div>\n {description && <Description className=\"mb-3\">{description}</Description>}\n {children}\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </div>\n)\n\nFieldWrapper.displayName = 'FieldWrapper'\n","import * as React from 'react'\n\nimport type { InputProps } from '../input/Input'\n\nexport type FormCustomContextType =\n | {\n appearance?: InputProps['appearance']\n theme?: InputProps['theme']\n }\n | undefined\n\nexport const FormCustomContext = React.createContext<FormCustomContextType>({\n appearance: 'standard'\n})\n\nexport const useFormCustomContext = () => React.useContext(FormCustomContext)\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nimport { Text } from '../text/Text'\n\nexport const InputBackground = styled('div', {\n base: [\n 'flex',\n 'text-grey-1000',\n 'transition-[background,border-color]',\n 'duration-100',\n 'ease-out',\n 'w-full'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-blue-800',\n 'rounded-md'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1',\n 'rounded-md'\n ]\n },\n size: {\n sm: ['h-8'],\n md: ['h-10'],\n lg: ['h-12'],\n xl: ['h-16']\n },\n disabled: {\n true: ['cursor-not-allowed', 'opacity-30']\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nInputBackground.displayName = 'InputBackground'\n\nconst StyledInputText = styled(Text, {\n base: [\n 'appearance-none',\n 'border-none',\n 'bg-none',\n 'bg-transparent',\n 'shadow-none',\n 'box-border',\n 'focus:outline-none',\n 'px-3',\n 'size-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ]\n})\n\nexport type InputTextProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> &\n Omit<React.ComponentProps<typeof StyledInputText>, 'type' | 'as'> & {\n // override default 'type' property to prevent Input from being used to render\n // checkboxes, radios etc — we have dedicated components for them\n type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'\n as?: never\n disabled?: boolean\n }\n\nconst toTextSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg'\n}\n\nexport const InputText = React.forwardRef<HTMLInputElement, InputTextProps>(\n ({ type = 'text', size, ...rest }, ref) => {\n const textSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toTextSize[s]),\n [size]\n )\n\n return (\n <StyledInputText\n ref={ref}\n as=\"input\"\n type={type === 'number' ? 'text' : type}\n inputMode={type === 'number' ? 'numeric' : undefined}\n pattern={type === 'number' ? '[0-9]*' : undefined}\n size={textSize}\n {...(rest as any)}\n />\n )\n }\n)\n\nInputText.displayName = 'InputText'\n\ntype InputBackgroundProps = React.ComponentProps<typeof InputBackground>\nexport type InputProps = Omit<\n React.ComponentProps<typeof InputText>,\n 'size' | 'state' | 'appearance'\n> & {\n size?: InputBackgroundProps['size']\n state?: InputBackgroundProps['state']\n appearance?: InputBackgroundProps['appearance']\n theme?: InputBackgroundProps['theme']\n disabled?: boolean\n name?: string\n readOnly?: boolean\n value?: string | number\n onChange?: React.ChangeEventHandler<HTMLInputElement>\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n size = 'md',\n appearance = 'standard',\n theme,\n state,\n disabled,\n style,\n ...rest\n },\n ref\n ) => {\n return (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n disabled={disabled}\n state={state}\n className={className}\n style={style}\n >\n <InputText size={size} ref={ref} disabled={disabled} {...rest} />\n </InputBackground>\n )\n }\n)\n\nInput.displayName = 'Input'\n","import { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nconst toIconSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const getFieldIconSize = (size: any) =>\n overrideStyledVariantValue(size, (s) => toIconSize[s])\n","import { Eye, EyeCrossed } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useState } from 'react'\n\nimport { ActionIcon } from '~/components/action-icon/ActionIcon'\nimport { Icon } from '~/components/icon/Icon'\nimport type { InputProps } from '~/components/input/Input'\nimport { Input } from '~/components/input/Input'\nimport { cn } from '~/styled'\nimport { getFieldIconSize } from '~/utilities/style/get-icon-size'\n\ntype PasswordInputProps = Omit<InputProps, 'type'> & {\n hidePasswordText?: string\n showPasswordText?: string\n}\n\nexport const PasswordInput = React.forwardRef<\n HTMLInputElement,\n PasswordInputProps\n>(\n (\n {\n className,\n hidePasswordText = 'Hide password',\n showPasswordText = 'Show password',\n size = 'md',\n ...restProps\n },\n ref\n ) => {\n const [isPasswordVisible, setIsPasswordVisible] = useState<boolean>(false)\n const togglePasswordVisibility = () =>\n setIsPasswordVisible((currentState) => !currentState)\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n return (\n <div className={cn('relative', className)}>\n <Input\n {...restProps}\n size={size}\n type={isPasswordVisible ? 'text' : 'password'}\n ref={ref}\n className=\"pr-6\"\n />\n <ActionIcon\n appearance=\"simple\"\n theme=\"neutral\"\n label={isPasswordVisible ? hidePasswordText : showPasswordText}\n onClick={togglePasswordVisibility}\n onMouseDown={(e) => e.preventDefault()} // prevent focus being lost from password input\n size={iconSize}\n className={cn(\n size === 'lg' ? 'bottom-1' : 'bottom-0',\n 'absolute',\n 'right-0'\n )}\n >\n <Icon is={isPasswordVisible ? Eye : EyeCrossed} />\n </ActionIcon>\n </div>\n )\n }\n)\n\nPasswordInput.displayName = 'PasswordInput'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport { PasswordInput } from '~/components/password-input/PasswordInput'\nimport { cn } from '~/styled'\n\ntype PasswordFieldProps = React.ComponentProps<typeof PasswordInput> &\n Omit<FieldElementWrapperProps, 'label'> & {\n label?: string\n }\n\nexport const PasswordField = ({\n className,\n hideLabel,\n label = 'Password',\n name,\n prompt = undefined,\n description,\n validation,\n appearance,\n theme,\n ...remainingProps\n}: PasswordFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n className={cn('relative', className)}\n >\n <PasswordInput\n autoComplete=\"current-password\"\n name={name}\n id={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error !== undefined && { state: 'error' })}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nPasswordField.displayName = 'PasswordField'\n","import invariant from 'invariant'\nimport * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { throttle } from 'throttle-debounce'\n\nimport { Override } from '~/utilities/types'\n\nimport { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { PasswordField } from '../password-field/PasswordField'\nimport { PasswordInput } from '../password-input/PasswordInput'\n\ntype ValidationResult = Record<string, boolean>\n\ntype CreatePasswordFieldProps = Override<\n React.ComponentProps<typeof PasswordInput> & FieldElementWrapperProps,\n {\n label?: string\n name?: string\n validate: (\n password: string\n ) => Promise<ValidationResult | undefined> | ValidationResult\n defaultValidation: ValidationResult\n messageDirection?: 'row' | 'column'\n }\n>\n\nexport const CreatePasswordField = ({\n validate,\n defaultValidation,\n messageDirection = 'row',\n label = 'Create a password',\n name = 'password',\n className,\n validation,\n appearance,\n ...remainingProps\n}: CreatePasswordFieldProps) => {\n const { formState, control } = useFormContext()\n const [isFocused, setIsFocused] = React.useState<boolean>(false)\n const [validationResult, setValidationResult] =\n React.useState<ValidationResult>(defaultValidation)\n\n const touched: boolean = formState.touched[name]\n const error =\n formState.errors[name]?.type === 'validate' ||\n Object.values(validationResult).every((isValid) => !isValid)\n\n const validatePassword = React.useCallback(\n async (password: string) => {\n const result = await validate(password)\n\n if (result) {\n invariant(\n typeof result === 'object',\n 'The validate function must return an object'\n )\n\n setValidationResult(result)\n return Object.values(result).every((isValid) => isValid)\n }\n\n return false\n },\n [setValidationResult]\n )\n\n const handleChange = React.useCallback(throttle(500, validatePassword), [\n validatePassword\n ])\n\n const getMessageTheme = (result: boolean, isFocused: boolean) => {\n if (result) return 'success'\n\n return isFocused ? 'neutral' : 'error'\n }\n\n const showValidation: boolean =\n (control.mode.isOnBlur && (isFocused || touched)) ||\n (control.mode.isOnSubmit && (isFocused || (formState.isSubmitted && error)))\n\n return (\n <div className={className}>\n <PasswordField\n label={label}\n name={name}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n handleChange(e.target.value)\n }\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n validation={{ ...validation, validate: validatePassword }}\n appearance={appearance}\n {...remainingProps}\n />\n {showValidation && (\n <div\n style={{ '--direction': messageDirection }}\n className=\"direction-(--direction) mt-2 flex flex-wrap gap-2\"\n >\n {Object.entries(validationResult).map(([message, result]) => (\n <InlineMessage\n key={message}\n theme={getMessageTheme(result, isFocused)}\n >\n {message}\n </InlineMessage>\n ))}\n </div>\n )}\n </div>\n )\n}\n\nCreatePasswordField.displayName = 'CreatePasswordField'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTableBody = styled('tbody', {\n base: [],\n variants: {\n striped: {\n true: ['[&_tr]:even:bg-grey-100', '[&_tr]:odd:bg-white'],\n false: ['[&_tr]:bg-white']\n }\n }\n})\n\ntype TableBodyProps = React.ComponentProps<typeof StyledTableBody>\n\nexport const TableBody = ({ striped = true, ...rest }: TableBodyProps) => (\n <StyledTableBody striped={striped} {...rest} />\n)\n\nTableBody.displayName = 'TableBody'\n","import { styled } from '~/styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'box-border',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n","import { styled } from '~/styled'\n\nexport const TableFooter = styled('tfoot', {\n base: []\n})\n\nTableFooter.displayName = 'TableFooter'\n","import { styled } from '~/styled'\n\nexport const TableFooterCell = styled('td', {\n base: [\n 'text-grey-800',\n 'font-body',\n 'font-semibold',\n 'text-left',\n 'align-middle'\n ]\n})\n\nTableFooterCell.displayName = 'TableFooterCell'\n","import React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const TABLE_HEADER_THEMES = {\n PRIMARY: 'primary',\n PRIMARY_DARK: 'primaryDark',\n PRIMARY_LIGHT: 'primaryLight',\n LIGHT: 'light',\n WHITE: 'white'\n} as const\n\nconst StyledTableHeader = styled('thead', {\n base: [],\n variants: {\n theme: {\n [TABLE_HEADER_THEMES.PRIMARY]: ['[&_th]:bg-primary-800'],\n [TABLE_HEADER_THEMES.PRIMARY_DARK]: ['[&_th]:bg-primary-1000'],\n [TABLE_HEADER_THEMES.PRIMARY_LIGHT]: [\n '[&_th]:bg-primary-200',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.LIGHT]: [\n '[&_th]:bg-grey-100',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.WHITE]: ['[&_th]:bg-white', '[&_th]:text-grey-1000']\n },\n isSticky: {\n true: ['sticky', 'top-0', 'z-3']\n }\n }\n})\n\ntype TableHeaderProps = React.ComponentProps<typeof StyledTableHeader>\n\nexport const TableHeader = ({\n theme = 'primaryDark',\n isSticky = false,\n ...rest\n}: TableHeaderProps) => {\n return <StyledTableHeader theme={theme} isSticky={isSticky} {...rest} />\n}\n\nTableHeader.displayName = 'TableHeader'\n","import { styled } from '~/styled'\n\nexport const TableHeaderCell = styled('th', {\n base: [\n 'text-white',\n 'font-body',\n 'font-semibold',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n '[[colspan]]:text-center'\n ]\n})\n\nTableHeaderCell.displayName = 'TableHeaderCell'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledRow = styled('tr', {\n base: ['bg-[unset]']\n})\n\nexport const TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.ComponentProps<typeof StyledRow>\n>((props, ref) => <StyledRow {...props} ref={ref} />)\n\nTableRow.displayName = 'TableRow'\n","import * as React from 'react'\n\ntype ColumnStyle = Record<\n `--sticky-column-width-${number}` | `--sticky-offset-left-${number}`,\n string\n>\n\ninterface IUseStickyColumnsCss {\n columnsStyle?: ColumnStyle\n}\n\nexport const useStickyColumnsStyle = ({\n numberOfStickyColumns,\n wrapperRef\n}: {\n numberOfStickyColumns: number\n wrapperRef: React.RefObject<HTMLDivElement | null>\n}): IUseStickyColumnsCss => {\n const [columnsStyle, setColumnsStyle] = React.useState<ColumnStyle>({})\n\n const generateColumnsStyle = React.useCallback(() => {\n let accWidth = 0\n\n // Getting the table header cells elements to use their width to set the left position in the sticky columns.\n const tableHeaderCells = wrapperRef.current?.querySelectorAll('th')\n const tableHeaderElements = Array.from(tableHeaderCells || [])\n\n // Getting only the number of sticky columns from the elements array that is what we are interested in.\n const stickyColumns = tableHeaderElements.slice(0, numberOfStickyColumns)\n\n const newColumnsStyle = stickyColumns.reduce((acc, column, index) => {\n const elementNumber = index + 1\n const styleObject = {\n ...acc,\n [`--sticky-column-width-${elementNumber}`]: `${column.offsetWidth}px`,\n [`--sticky-offset-left-${elementNumber}`]: `${accWidth}px`\n }\n\n accWidth += tableHeaderCells?.item(index).clientWidth || 0\n\n return styleObject\n }, {})\n\n return newColumnsStyle\n }, [numberOfStickyColumns, wrapperRef])\n\n React.useLayoutEffect(() => {\n if (!numberOfStickyColumns) return\n const newColumnsStyle = generateColumnsStyle()\n\n setColumnsStyle(newColumnsStyle)\n }, [numberOfStickyColumns, wrapperRef, generateColumnsStyle])\n\n return {\n columnsStyle\n }\n}\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useStickyColumnsStyle } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n className,\n ...restProps\n}: React.PropsWithChildren<{\n numberOfStickyColumns?: number\n className?: string\n}>) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const wrapperRef = React.useRef<HTMLDivElement | null>(null)\n const { columnsStyle } = useStickyColumnsStyle({\n numberOfStickyColumns,\n wrapperRef\n })\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll = event.currentTarget.scrollLeft > 0\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <div\n onScroll={handleScroll}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"scrollbar\"\n ref={wrapperRef}\n style={columnsStyle}\n className={cn(\n 'overflow-auto',\n 'max-w-full',\n 'relative',\n 'overscroll-x-contain',\n '[&_td,&_th]:bg-inherit',\n className,\n numberOfStickyColumns >= 1 && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:sticky',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:left-(--sticky-offset-left-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:min-w-(--sticky-column-width-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:z-2'\n ],\n numberOfStickyColumns >= 2 && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:sticky',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:left-(--sticky-offset-left-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:min-w-(--sticky-column-width-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:z-2'\n ],\n numberOfStickyColumns >= 3 && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:sticky',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:left-(--sticky-offset-left-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:min-w-(--sticky-column-width-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:z-2'\n ],\n numberOfStickyColumns >= 4 && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:sticky',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:left-(--sticky-offset-left-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:min-w-(--sticky-column-width-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:z-2'\n ],\n numberOfStickyColumns === 1 &&\n hasScroll && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 2 &&\n hasScroll && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 3 &&\n hasScroll && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 4 &&\n hasScroll && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ]\n )}\n {...restProps}\n >\n {children}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n base: [\n 'border-separate',\n 'border-spacing-0',\n 'font-sans',\n 'text-sm',\n 'w-full',\n 'relative',\n 'z-0'\n ],\n variants: {\n size: {\n md: ['[&_td,&_th]:h-10', '[&_td,&_th]:px-3', '[&_td,&_th]:py-1'],\n lg: [\n '[&_td,&_th]:h-12',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ],\n xl: [\n '[&_th]:h-12',\n '[&_td]:h-16',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ]\n },\n corners: {\n round: ['rounded-md'],\n square: []\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n scrollContainerkey?: string\n maxRowDepth?: number\n}\n\nconst TableComponent = React.forwardRef<HTMLTableElement, TableProps>(\n (\n {\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCls,\n scrollContainerkey,\n ...rest\n },\n ref\n ) => {\n const tableComponent = (\n <StyledTable ref={ref} size={size} corners={corners} {...rest} />\n )\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n key={scrollContainerkey}\n className={cn(scrollContainerCls)}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n }\n)\n\nexport const Table = Object.assign(TableComponent, {\n Body: TableBody,\n Cell: TableCell,\n Footer: TableFooter,\n FooterCell: TableFooterCell,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Row: TableRow,\n StickyColumnsContainer: TableStickyColumnsContainer\n})\n\nTableComponent.displayName = 'Table'\n","import type {\n ColumnOrderTableState,\n ColumnPinningTableState,\n ColumnSizingTableState,\n ExpandedTableState,\n FiltersTableState,\n GroupingTableState,\n PaginationTableState,\n Row,\n RowSelectionState,\n RowSelectionTableState,\n SortDirection,\n SortingTableState,\n Table,\n VisibilityTableState\n} from '@tanstack/react-table'\nimport * as React from 'react'\n\nexport enum AsyncDataState {\n NONE = 'none',\n PENDING = 'pending',\n FULFILLED = 'fulfilled',\n REJECTED = 'rejected'\n}\n\nexport type TAsyncDataResult = {\n total: number\n results: TableData\n}\n\nexport type TAsyncDataOptions = {\n pageIndex: number\n pageSize: number\n sortBy?: string\n sortDirection?: SortDirection\n globalFilter?: string\n}\n\nexport type TGetAsyncData = (\n options: TAsyncDataOptions\n) => Promise<TAsyncDataResult | undefined>\n\nexport type TablePosition = {\n top: number | null\n bottom: number | null\n offsetTop: number\n isVisible: boolean\n}\n\nexport type DataTableContextType<T = unknown> = Table<T> & {\n setIsSortable: React.Dispatch<React.SetStateAction<boolean>>\n applyPagination: () => void\n getTotalRows: () => number\n isSortable: boolean\n asyncDataState?: AsyncDataState\n runAsyncData?: (options: Partial<TAsyncDataOptions>) => Promise<void>\n hasAsyncData: boolean\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n rowSelection: RowSelectionState\n tablePosition?: TablePosition\n setTablePosition: React.Dispatch<React.SetStateAction<TablePosition>>\n data: TAsyncDataResult\n columns: any\n tableId: string\n /**\n * Directly update the data array that the table rows are built from.\n * This is useful when re-ordering rows, but is high-risk if you're not sure what you're doing!\n *\n * Note in particular that this value is also updated if you update the value of the `DataTable`'s `data` prop\n * — it's probably best to only use one of those two methods for any given table.\n */\n setData: React.Dispatch<React.SetStateAction<TAsyncDataResult>>\n}\n\nexport type TableData = Array<Record<string, unknown>>\n\nexport type InitialState = Partial<\n VisibilityTableState &\n ColumnOrderTableState &\n ColumnPinningTableState &\n FiltersTableState &\n SortingTableState &\n ExpandedTableState &\n GroupingTableState &\n ColumnSizingTableState &\n PaginationTableState &\n RowSelectionTableState\n>\n\nexport type TDefaultSort = { column: string; direction: SortDirection }\n","import type {\n PaginationState,\n SortDirection,\n SortingState\n} from '@tanstack/react-table'\nimport invariant from 'invariant'\n\nimport type {\n TAsyncDataOptions,\n TAsyncDataResult,\n TGetAsyncData\n} from './DataTable.types'\n\nconst getSortDirection = (sorting: SortingState): SortDirection | undefined => {\n if (sorting[0]) {\n return sorting[0].desc ? 'desc' : 'asc'\n }\n return undefined\n}\n\nexport const getNewAsyncData = async (\n getAsyncData: TGetAsyncData,\n asyncDataOptions: Partial<TAsyncDataOptions>,\n paginationState: PaginationState,\n sorting: SortingState,\n globalFilter: string\n): Promise<TAsyncDataResult | undefined> => {\n const { pageIndex, pageSize } = paginationState\n const params = {\n pageIndex: asyncDataOptions?.pageIndex ?? pageIndex,\n pageSize: asyncDataOptions?.pageSize ?? pageSize,\n sortBy: asyncDataOptions?.sortBy ?? sorting[0]?.id,\n sortDirection: asyncDataOptions?.sortDirection ?? getSortDirection(sorting),\n globalFilter: asyncDataOptions.globalFilter ?? globalFilter\n }\n\n const newData = await getAsyncData(params)\n\n invariant(\n Array.isArray(newData?.results),\n 'The getAsyncData function must return an object with a property `result` which must be an array'\n )\n invariant(\n newData && Number.isInteger(newData.total) && newData.total >= 0,\n 'The getAsyncData function must return an object with a property `total` which must be a positive integer or zero'\n )\n\n return newData\n}\n","import type { PaginationState } from '@tanstack/react-table'\nimport React from 'react'\n\nconst defaultPaginationState: PaginationState = { pageIndex: 0, pageSize: 10 }\nexport const usePagination = (\n initialPaginationState: PaginationState | undefined\n) => {\n const [isPaginated, setIsPaginated] = React.useState<boolean>(\n !!initialPaginationState\n )\n\n const [paginationState, setPaginationState] = React.useState<\n PaginationState | undefined\n >({\n ...defaultPaginationState,\n ...(initialPaginationState || {})\n })\n\n const applyPagination = React.useCallback(() => {\n setIsPaginated(true)\n }, [])\n\n return {\n isPaginated,\n paginationState,\n setPaginationState,\n applyPagination\n }\n}\n","import type { SortingState } from '@tanstack/react-table'\nimport React from 'react'\n\nimport { TDefaultSort } from './DataTable.types'\n\nexport const useSortByColumn = (defaultSort: TDefaultSort | undefined) => {\n const [isSortable, setIsSortable] = React.useState<boolean>(false)\n\n const [sorting, setSorting] = React.useState<SortingState>(\n defaultSort\n ? [\n {\n id: defaultSort.column,\n desc: defaultSort.direction === 'desc'\n }\n ]\n : []\n )\n\n return { isSortable, setIsSortable, sorting, setSorting }\n}\n","import { v4 as uuid } from '@lukeed/uuid'\nimport type {\n ExpandedState,\n OnChangeFn,\n PaginationState,\n Row,\n RowSelectionState\n} from '@tanstack/react-table'\nimport {\n getCoreRowModel,\n getExpandedRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable\n} from '@tanstack/react-table'\nimport * as React from 'react'\nimport useDeepCompareEffect from 'use-deep-compare-effect'\n\nimport {\n AsyncDataState,\n DataTableContextType,\n InitialState,\n TableData,\n TablePosition,\n TAsyncDataOptions,\n TAsyncDataResult,\n TDefaultSort,\n TGetAsyncData\n} from './DataTable.types'\nimport { getNewAsyncData } from './getNewAsyncData'\nimport { usePagination } from './usePagination'\nimport { useSortByColumn } from './useSorting'\n\nconst DataTableContext =\n React.createContext<DataTableContextType<unknown> | null>(null)\n\ntype DataTableProviderProps = {\n columns\n defaultSort?: TDefaultSort\n children: React.ReactNode\n initialState?: InitialState\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n onRowSelectionChange?: OnChangeFn<RowSelectionState>\n} & (\n | { data: TableData; getAsyncData?: never }\n | { data?: never; getAsyncData: TGetAsyncData }\n)\n\nexport const DataTableProvider = ({\n columns,\n data: dataProp = [],\n getAsyncData,\n defaultSort,\n initialState = undefined,\n disabledRows,\n enableRowSelection,\n onRowSelectionChange,\n children\n}: DataTableProviderProps): React.JSX.Element => {\n const tableId = React.useRef(uuid())\n\n const [data, setData] = React.useState<TAsyncDataResult>({\n results: dataProp ?? [],\n total: dataProp?.length ?? 0\n })\n\n const [rowSelection, setRowSelection] = React.useState<RowSelectionState>({})\n const [expanded, setExpanded] = React.useState<ExpandedState>({})\n\n const [tablePosition, setTablePosition] = React.useState<TablePosition>({\n top: null,\n bottom: null,\n offsetTop: 0,\n isVisible: true\n })\n\n const { isPaginated, applyPagination, paginationState, setPaginationState } =\n usePagination(initialState?.pagination)\n\n const [asyncDataState, setAsyncDataState] = React.useState<AsyncDataState>(\n AsyncDataState.NONE\n )\n\n const [globalFilter, setGlobalFilter] = React.useState<string>('')\n\n const { setIsSortable, isSortable, sorting, setSorting } =\n useSortByColumn(defaultSort)\n\n const runAsyncData = React.useCallback(\n async (overrideAsyncDataOptions: Partial<TAsyncDataOptions>) => {\n if (!getAsyncData) return\n\n try {\n setAsyncDataState(AsyncDataState.PENDING)\n\n const newData = await getNewAsyncData(\n getAsyncData,\n overrideAsyncDataOptions,\n paginationState as PaginationState,\n sorting,\n globalFilter\n )\n\n setData(newData as TAsyncDataResult)\n setAsyncDataState(AsyncDataState.FULFILLED)\n } catch (_error) {\n setAsyncDataState(AsyncDataState.REJECTED)\n }\n },\n [\n getAsyncData,\n paginationState?.pageIndex,\n paginationState?.pageSize,\n sorting,\n globalFilter\n ]\n )\n\n React.useEffect(() => {\n runAsyncData({})\n }, [runAsyncData])\n\n useDeepCompareEffect(() => {\n if (!dataProp) return\n\n setData({ results: dataProp, total: dataProp.length })\n }, [dataProp])\n\n const getTotalRows = () => data.total\n\n const table = useReactTable<unknown>({\n columns,\n data: data.results,\n pageCount:\n getAsyncData && paginationState\n ? Math.ceil(getTotalRows() / paginationState.pageSize)\n : -1,\n initialState: initialState,\n state: {\n sorting,\n globalFilter,\n pagination: paginationState,\n rowSelection,\n expanded\n },\n manualPagination: getAsyncData && isPaginated,\n manualSorting: getAsyncData && isPaginated,\n enableSorting: asyncDataState !== AsyncDataState.PENDING,\n enableGlobalFilter: !getAsyncData,\n enableRowSelection,\n onExpandedChange: setExpanded,\n getSubRows: (row: Row<unknown>) => row.subRows,\n onRowSelectionChange: (updaterOrValue) => {\n if (onRowSelectionChange) onRowSelectionChange(updaterOrValue)\n setRowSelection(updaterOrValue)\n },\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: isPaginated ? getPaginationRowModel() : undefined,\n getSortedRowModel:\n isSortable || sorting.length ? getSortedRowModel() : undefined,\n getFilteredRowModel: getFilteredRowModel(),\n getExpandedRowModel: getExpandedRowModel(),\n onPaginationChange: isPaginated ? setPaginationState : undefined,\n onSortingChange: setSorting,\n onGlobalFilterChange: setGlobalFilter,\n globalFilterFn: (row, columnId, filterValue) => {\n const checkFilterMatchesCell = (cellValue: string) =>\n cellValue.toLowerCase().includes(filterValue.toLowerCase())\n\n const isSubRow = row.depth > 0\n\n if (isSubRow) return true\n\n const value = row.getValue(columnId)\n switch (typeof value) {\n case 'string':\n return checkFilterMatchesCell(value)\n case 'boolean':\n case 'number':\n return checkFilterMatchesCell(String(value))\n default:\n return false\n }\n }\n })\n\n const value: DataTableContextType = React.useMemo(() => {\n return {\n ...table,\n columns,\n data,\n setData,\n setIsSortable,\n applyPagination,\n getTotalRows,\n isSortable,\n asyncDataState,\n runAsyncData,\n hasAsyncData: !!getAsyncData,\n disabledRows,\n enableRowSelection,\n rowSelection,\n tablePosition,\n setTablePosition,\n tableId: tableId.current\n }\n }, [\n table,\n applyPagination,\n getTotalRows,\n isSortable,\n enableRowSelection,\n tableId,\n getAsyncData\n ])\n\n return (\n <DataTableContext.Provider value={value}>\n {children}\n </DataTableContext.Provider>\n )\n}\n\nexport const useDataTable = <T extends Record<string, unknown>>() => {\n const context = React.useContext(DataTableContext) as DataTableContextType<T>\n\n if (!context)\n throw new Error(\n 'useDataTable can only be called from inside a DataTableProvider'\n )\n\n return context\n}\n","import type { Cell } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Table } from '../table/Table'\n\ntype DataTableDataCellProps = {\n cell: Cell<Record<string, unknown>, unknown>\n}\n\nexport const DataTableDataCell = ({ cell }: DataTableDataCellProps) => {\n return (\n <Table.Cell key={cell.id}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n )\n}\n","import type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTableContext'\n\nexport const DataTableRowSelectionCheckbox = ({\n row,\n checked,\n onCheckedChange,\n label = `Row ${row.id} selection`\n}: {\n row: Row<Record<string, unknown>>\n checked: boolean | 'indeterminate'\n onCheckedChange: (value: boolean) => void\n label?: string\n}): React.ReactElement<unknown> => {\n const { tableId } = useDataTable()\n\n return (\n <>\n <label htmlFor={`${tableId}_row_${row.id}_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n style={{ '--depth': row.depth }}\n checked={checked}\n onCheckedChange={onCheckedChange}\n name={`${tableId}_row_${row.id}_selection`}\n disabled={!row.getCanSelect()}\n className=\"mr-3 ml-[calc((var(--depth,0)*2)*4px)]\"\n />\n </>\n )\n}\n","import { ChevronDown, ChevronRight } from '@atom-learning/icons'\nimport type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\n\nexport type DataTableRowProps = React.ComponentProps<typeof Table.Row> & {\n row: Row<Record<string, unknown>>\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nconst StyledRow = styled(Table.Row, {\n base: ['bg-[initial]', 'relative'],\n variants: {\n isSelected: {\n true: ['bg-primary-100!']\n },\n isDisabled: {\n true: ['opacity-30']\n },\n isFocusable: {\n true: [\n 'translate-y-0',\n 'duration-200',\n 'ease-out',\n 'transition-shadow',\n 'transition-transform',\n 'hover:shadow-[0px_4px_11px_0px_hsla(0,0%,12%,0.12)]',\n 'hover:-translate-y-px',\n 'hover:z-3',\n 'focus:outline-2',\n 'focus:outline-primary-500',\n 'focus:outline-solid',\n 'focus:-outline-offset-4',\n 'focus:[&_td]:bg-transparent'\n ]\n }\n }\n})\n\nconst isElementInteractive = (element: Element | null): boolean => {\n if (!element) return false\n if (element.closest('button, a, input, select, textarea')) return true\n if (element.getAttribute('role') === 'button') return true\n return false\n}\n\nexport const DataTableRow = ({ row, rowAction }: DataTableRowProps) => {\n const { enableRowSelection, disabledRows, getCanSomeRowsExpand } =\n useDataTable()\n\n const isDisabled = !!disabledRows?.[row.id]\n\n const toggleExpandHandler = row.getToggleExpandedHandler()\n const toggleSelectHandler = row.getToggleSelectedHandler()\n\n const getCheckedState = (): boolean | 'indeterminate' => {\n if (row.getIsSomeSelected()) return 'indeterminate'\n return row.getIsSelected()\n }\n\n const handleRowClick = (\n rowData: Row<Record<string, unknown>>,\n event: React.MouseEvent<HTMLTableRowElement>\n ) => {\n if (!rowAction) return\n\n // Skip if clicking on an interactive element\n const rowElement = (event.target as Element).closest('tr')\n if (!rowElement || isElementInteractive(event.target as Element)) {\n return\n }\n\n rowAction(rowData.original, event)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n if (isElementInteractive(event.target as Element)) {\n return\n }\n event.preventDefault()\n handleRowClick(\n row,\n event as unknown as React.MouseEvent<HTMLTableRowElement>\n )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const nextRow = currentRow?.nextElementSibling as HTMLElement\n if (nextRow && nextRow.tagName === 'TR') {\n nextRow.focus()\n }\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const previousRow = currentRow?.previousElementSibling as HTMLElement\n if (previousRow && previousRow.tagName === 'TR') {\n previousRow.focus()\n }\n }\n }\n\n return (\n <StyledRow\n isSelected={row.getIsSelected()}\n isDisabled={isDisabled}\n isFocusable={!!rowAction && !isDisabled}\n {...(rowAction && {\n onClick: (event) => handleRowClick(row, event),\n tabIndex: 0,\n className: 'cursor-pointer',\n onKeyDown: handleKeyDown\n })}\n >\n {getCanSomeRowsExpand() && (\n <Table.Cell\n data-testid={`expand-icon-${row.id}`}\n onClick={toggleExpandHandler}\n className={cn(\n 'w-10',\n row.getCanExpand() ? 'cursor-pointer' : 'cursor-auto'\n )}\n >\n {row.getCanExpand() && (\n <Icon is={row.getIsExpanded() ? ChevronDown : ChevronRight} />\n )}\n </Table.Cell>\n )}\n\n {enableRowSelection && (\n <Table.Cell className=\"w-10\">\n <DataTableRowSelectionCheckbox\n row={row}\n checked={getCheckedState()}\n onCheckedChange={toggleSelectHandler}\n />\n </Table.Cell>\n )}\n {row.getVisibleCells().map((cell) => {\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </StyledRow>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableRow } from './DataTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nexport const DataTableBody = ({\n striped = false,\n rowAction,\n ...props\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n\n return (\n <Table.Body {...props} striped={striped}>\n {getRowModel().rows.map((row) => {\n return <DataTableRow row={row} key={row.id} rowAction={rowAction} />\n })}\n </Table.Body>\n )\n}\n","import React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const StyledDivider = styled(\n 'hr',\n {\n base: ['border-none', 'bg-grey-200'],\n variants: {\n orientation: {\n horizontal: ['h-px', 'w-full'],\n vertical: ['h-full', 'min-h-8', 'w-px']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const Divider = React.forwardRef<\n HTMLHRElement,\n React.ComponentProps<typeof StyledDivider>\n>(({ orientation = 'horizontal', ...rest }, ref) => {\n return <StyledDivider ref={ref} orientation={orientation} {...rest} />\n})\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTableContext'\n\nconst defaultCopy = {\n sorted_by: 'Sorted by',\n ascending: 'ascending',\n descending: 'descending',\n separator: '-'\n}\n\nexport const DataTableMetaData = ({\n copy,\n ...rest\n}: React.ComponentProps<typeof Text> & {\n copy?: {\n sorted_by?: string\n ascending?: string\n descending?: string\n separator?: string\n }\n sortLabel?: string\n}) => {\n const { getState, columns, getRowModel, rowSelection } = useDataTable()\n const { sorting } = getState()\n const isSorted = sorting.length > 0\n\n const totalRows = getRowModel()?.rows?.length\n\n const selectedRows = Object.keys(rowSelection || {}).length\n\n const copyMerged = { ...defaultCopy, ...copy }\n\n const getColumnDisplayName = (id: string) => {\n const sortedColumn = columns.find((col) => col.id === id)\n return sortedColumn?.header || id\n }\n\n const getSortingString = (sorting) => {\n return `${copyMerged.separator} ${\n copyMerged.sorted_by\n } ${getColumnDisplayName(sorting[0].id)} ${\n sorting[0].desc ? copyMerged.descending : copyMerged.ascending\n }`\n }\n\n return (\n <Text weight=\"bold\" {...rest}>{`${selectedRows || totalRows} ${\n (selectedRows || totalRows) === 1 ? 'item' : 'items'\n } ${selectedRows ? 'selected' : ''} ${\n isSorted ? getSortingString(sorting) : ''\n }`}</Text>\n )\n}\n","import * as React from 'react'\n\nimport { Button } from '~/components/button/Button'\nimport { Divider } from '~/components/divider/Divider'\nimport { styled } from '~/styled'\n\nimport { useDataTable } from './DataTableContext'\nimport { DataTableMetaData } from './DataTableMetaData'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement<unknown>\n}): React.ReactElement<unknown> | null => {\n const { rowSelection } = useDataTable()\n\n if (Object.keys(rowSelection || {}).length > 0) return null\n\n return children\n}\n\nconst BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n children\n}: {\n cancelLabel?: string\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n\nexport const DataTableBulkActions = Object.assign(\n ({\n children,\n ...rest\n }: {\n children:\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n | [\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >,\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n ]\n }) => {\n const { rowSelection } = useDataTable()\n\n const isRowSelected = Object.keys(rowSelection || {}).length > 0\n\n return (\n <StyledContainer isRowSelected={isRowSelected} {...rest}>\n <DataTableMetaData />\n <div className=\"flex items-center justify-end\">{children}</div>\n </StyledContainer>\n )\n },\n {\n DefaultActions: BulkActionsDefaultActions,\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { Divider } from '../divider/Divider'\nimport { useDataTable } from './DataTableContext'\n\nexport const BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n showDividers = true,\n children\n}: {\n cancelLabel?: string\n showDividers?: boolean\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {showDividers && React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { BulkActionsSelectedRowActions } from './DataTableBulkActionsSelectedRowActions'\nimport { useDataTable } from './DataTableContext'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'pl-3',\n 'pr-1',\n 'py-2',\n 'mb-4',\n 'mt-2',\n 'justify-between',\n 'items-center',\n 'rounded-lg',\n 'bg-primary-800',\n 'pointer-events-auto',\n 'z-2',\n 'w-full',\n 'mx-4',\n 'shadow-lg',\n 'sm:max-w-200',\n 'lg:max-w-250',\n 'lg:mb-8',\n 'lg:pl-4',\n 'lg:pr-1',\n 'lg:py-3',\n 'xl:max-w-350',\n 'xl:mb-8',\n 'xl:pl-6',\n 'xl:pr-2',\n 'xl:py-4'\n ]\n})\n\nexport const DataTableBulkActionsFloating = Object.assign(\n ({\n children,\n ...rest\n }: React.PropsWithChildren<React.ComponentProps<typeof StyledContainer>>) => {\n const { rowSelection, toggleAllPageRowsSelected } = useDataTable()\n\n const actionBarRef = React.useRef<HTMLDivElement>(null)\n\n const numberOfSelectedRows = React.useMemo(() => {\n return Object.keys(rowSelection || {}).length\n }, [rowSelection])\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (numberOfSelectedRows === 0) return null\n\n return (\n <section\n ref={actionBarRef}\n className=\"pointer-events-none sticky bottom-0 left-0 flex justify-center\"\n >\n <StyledContainer {...rest}>\n <div className=\"flex flex-auto items-center justify-start gap-2\">\n <Badge\n theme=\"success\"\n size=\"xs\"\n emphasis=\"subtle\"\n className=\"h-6 min-w-6\"\n >\n {numberOfSelectedRows}\n </Badge>\n <Text size=\"sm\" weight=\"bold\" className=\"text-white\">\n selected\n </Text>\n </div>\n <div className=\"flex flex-auto items-center justify-end gap-3\">\n {children}\n <ActionIcon\n appearance=\"simple\"\n theme=\"white\"\n size=\"md\"\n onClick={handleDeselectAllPageRows}\n label=\"close\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </div>\n </StyledContainer>\n </section>\n )\n },\n {\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport type { EmptyStateProps } from './EmptyState'\n\ntype EmptyStateProviderProps = {\n size?: EmptyStateProps['size']\n}\n\ntype EmptyStateContextValue = EmptyStateProviderProps\n\nexport const EmptyStateContext = React.createContext<EmptyStateContextValue>({})\n\nexport const EmptyStateProvider = ({\n size,\n children\n}: React.PropsWithChildren<EmptyStateProviderProps>) => {\n const value = React.useMemo<EmptyStateContextValue>(() => ({ size }), [size])\n return (\n <EmptyStateContext.Provider value={value}>\n {children}\n </EmptyStateContext.Provider>\n )\n}\n","import * as React from 'react'\n\nimport { Text } from '~/components/text/Text'\nimport { styled } from '~/styled'\n\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateBody = styled(\n Text,\n {\n base: ['text-grey-800', 'font-normal'],\n variants: {\n size: {\n xs: ['mb-4', 'text-sm'],\n sm: ['mb-4', 'text-sm'],\n md: ['mb-4', 'text-sm'],\n lg: ['mb-6', 'text-md'],\n xl: ['mb-6', 'text-md']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype EmptyStateBodyProps = React.ComponentProps<typeof StyledEmptyStateBody>\n\nexport const EmptyStateBody = (props: EmptyStateBodyProps) => {\n const { size } = React.useContext(EmptyStateContext)\n return <StyledEmptyStateBody {...props} size={size} />\n}\n","import React from 'react'\n\nimport { Image } from '~/components/image/Image'\nimport { styled } from '~/styled'\n\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateImage = styled(\n Image,\n {\n base: [],\n variants: {\n size: {\n xs: ['max-h-8', 'max-w-14', 'mb-4'],\n sm: ['max-h-12', 'max-w-21', 'mb-4'],\n md: ['max-h-18', 'max-w-[126px]', 'mb-4'],\n lg: ['max-h-[142px]', 'max-w-[190px]', 'mb-6'],\n xl: ['max-h-[213px]', 'max-w-[285px]', 'mb-6']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype EmptyStateImageProps = React.ComponentProps<typeof StyledEmptyStateImage>\n\nexport const EmptyStateImage = (props: EmptyStateImageProps) => {\n const { size } = React.useContext(EmptyStateContext)\n return <StyledEmptyStateImage size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateTitle = styled(\n 'h2',\n {\n base: ['text-grey-800', 'font-body', 'font-semibold', 'm-0'],\n variants: {\n size: {\n xs: ['mb-3', 'text-md'],\n sm: ['mb-3', 'text-md'],\n md: ['mb-3', 'text-md'],\n lg: ['mb-4', 'text-lg'],\n xl: ['mb-4', 'text-lg']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype EmptyStateTitleProps = React.ComponentProps<\n typeof StyledEmptyStateTitle\n> & {\n as?: React.ComponentType | React.ElementType\n}\n\nexport const EmptyStateTitle = (props: EmptyStateTitleProps) => {\n const { size } = React.useContext(EmptyStateContext)\n return <StyledEmptyStateTitle size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { EmptyStateProvider } from './EmptyState.context'\nimport { EmptyStateBody } from './EmptyStateBody'\nimport { EmptyStateImage } from './EmptyStateImage'\nimport { EmptyStateTitle } from './EmptyStateTitle'\n\nconst EmptyStateContainer = styled(\n 'div',\n {\n base: ['flex', 'flex-col', 'items-center', 'text-center', '*:last:mb-0'],\n variants: {\n size: {\n xs: ['p-2'],\n sm: ['p-3'],\n md: ['p-4'],\n lg: ['p-8'],\n xl: ['p-10']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport type EmptyStateProps = React.ComponentProps<typeof EmptyStateContainer>\n\nconst EmptyStateComponent = ({ size = 'sm', ...rest }: EmptyStateProps) => (\n <EmptyStateProvider size={size}>\n <EmptyStateContainer size={size} {...rest} />\n </EmptyStateProvider>\n)\n\nexport const EmptyState = Object.assign(EmptyStateComponent, {\n Image: EmptyStateImage,\n Title: EmptyStateTitle,\n Body: EmptyStateBody\n})\n\nEmptyStateComponent.displayName = 'EmptyState'\n","import * as React from 'react'\n\nimport { EmptyState } from '../empty-state/EmptyState'\nimport { AsyncDataState } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\n\ntype DataTableEmptyStateProps = React.ComponentProps<typeof EmptyState>\n\nexport const DataTableEmptyState = ({\n children,\n ...rest\n}: DataTableEmptyStateProps) => {\n const { asyncDataState, getTotalRows } = useDataTable()\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (!isEmpty) return null\n\n return <EmptyState {...rest}>{children}</EmptyState>\n}\n","import * as React from 'react'\n\nimport { AsyncDataState, DataTableContextType } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\n\nexport const DataTableError = ({\n children\n}: {\n children: (\n retry?: DataTableContextType['runAsyncData']\n ) => React.ReactElement<unknown>\n}) => {\n const { asyncDataState, runAsyncData } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.REJECTED) return null\n\n return children(runAsyncData)\n}\n","import { Close, Search } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { ActionIcon } from '~/components/action-icon/ActionIcon'\nimport { Icon } from '~/components/icon/Icon'\nimport { Input, InputBackground, InputText } from '~/components/input/Input'\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\nimport { useCallbackRef } from '~/utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '~/utilities/style/get-icon-size'\n\nexport type SearchInputProps = React.ComponentProps<typeof Input> & {\n size?: 'sm' | 'md' | 'lg'\n className?: string\n value?: string\n defaultValue?: string\n onValueChange?: (newValue: string) => void\n clearText?: string\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n}\n\nenum INPUT_ICON {\n SEARCH = 'SEARCH',\n CLEAR = 'CLEAR'\n}\n\nconst StyledIcon = styled(Icon, {\n base: ['text-grey-700', 'absolute', 'pointer-events-none'],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-2.5', 'size-5'],\n lg: ['right-2.5', 'size-5']\n }\n }\n})\n\nexport const SearchInput = React.forwardRef<HTMLInputElement, SearchInputProps>(\n (\n {\n size = 'md',\n appearance = 'standard',\n theme,\n className,\n value,\n defaultValue = '',\n onValueChange,\n clearText = 'Clear',\n onChange,\n ...remainingProps\n },\n ref\n ) => {\n const [inputElRef, setInputElRef] = useCallbackRef()\n const [innerValue, setInnerValue] = React.useState(defaultValue)\n const [activeIcon, setActiveIcon] = React.useState<INPUT_ICON>(\n defaultValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH\n )\n React.useEffect(() => {\n if (typeof value === 'undefined') return\n setInnerValue(value)\n setActiveIcon(value ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH)\n }, [value])\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n React.useImperativeHandle(ref, () => inputElRef.current as HTMLInputElement)\n\n const handleClear = () => {\n const inputEl = inputElRef.current\n if (!inputEl) return\n\n // https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call?.(inputEl, '')\n const ev2 = new Event('input', {\n bubbles: true\n })\n inputEl.dispatchEvent(ev2)\n inputEl.focus()\n onValueChange?.('')\n }\n\n const handleOnChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event)\n\n const newValue = event.target.value\n setInnerValue(newValue)\n onValueChange?.(newValue)\n setActiveIcon(newValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH)\n }\n\n const getIcon = () => {\n if (activeIcon === INPUT_ICON.SEARCH)\n return (\n <StyledIcon\n is={Search}\n size={size}\n className={cn(\n size == 'sm' ? 'size-4' : 'size-5',\n 'top-1/2',\n '-translate-y-1/2'\n )}\n />\n )\n\n return (\n <ActionIcon\n label={clearText}\n theme=\"neutral\"\n size={iconSize}\n onClick={handleClear}\n className=\"absolute top-1/2 right-1 -translate-y-1/2\"\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n }\n\n return (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n className={cn('relative', 'w-auto', className)}\n >\n <InputText\n ref={setInputElRef}\n size={size}\n type=\"search\"\n {...remainingProps}\n value={innerValue}\n onChange={handleOnChange}\n className={cn(\n size === 'sm' ? 'pr-8' : 'pr-10',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none'\n )}\n />\n {getIcon()}\n </InputBackground>\n )\n }\n)\n\nSearchInput.displayName = 'SearchInput'\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\nimport { cn } from '~/styled'\n\nimport { Label } from '../label/Label'\nimport { SearchInput } from '../search-input/SearchInput'\nimport { AsyncDataState } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\n\ntype DataTableSearchProps = React.ComponentProps<typeof SearchInput> & {\n label: string\n hideLabel?: boolean\n}\nexport const DataTableGlobalFilter = ({\n onChange,\n label,\n hideLabel = false,\n ...props\n}: DataTableSearchProps) => {\n const {\n setGlobalFilter,\n getState,\n resetPagination,\n getTotalRows,\n asyncDataState\n } = useDataTable()\n const { globalFilter } = getState()\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (isEmpty) return null\n\n const handleChange = debounce(250, (event) => {\n const {\n target: { value }\n } = event\n\n onChange?.(event)\n resetPagination()\n setGlobalFilter(value)\n })\n\n return (\n <>\n <Label htmlFor={label} className={cn('mb-3', hideLabel && 'sr-only')}>\n {label}\n </Label>\n <SearchInput\n {...props}\n defaultValue={globalFilter}\n onChange={handleChange}\n name={label}\n />\n </>\n )\n}\n","import { ArrowDown, ArrowUp } from '@atom-learning/icons'\nimport type { Header } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\nimport { useHover } from 'react-aria'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTableContext'\n\ntype DataTableHeaderProps = React.ComponentProps<typeof Table.HeaderCell> & {\n header: Header<Record<string, unknown>, unknown>\n includeTotal?: boolean\n totalSuffix?: string\n}\n\nconst StyledCount = styled(Text, {\n base: ['text-grey-600', 'whitespace-nowrap', 'hidden', 'min-[800px]:block']\n})\n\nconst StyledTableHeaderCell = styled(Table.HeaderCell, {\n base: [],\n variants: {\n isSortable: {\n true: [\n '*:relative',\n 'before:absolute',\n 'before:bg-primary-100',\n 'before:duration-200',\n 'before:ease-in',\n 'before:inset-0',\n 'before:opacity-0',\n 'before:transition-opacity',\n 'cursor-pointer',\n 'hover:before:opacity-50',\n 'relative'\n ]\n }\n }\n})\n\nconst sortIcons = {\n asc: ArrowUp,\n desc: ArrowDown\n}\n\nconst SortIcon = ({ direction }: { direction: 'asc' | 'desc' }) => (\n <Icon\n is={sortIcons[direction]}\n size=\"sm\"\n className=\"stroke-primary-900 absolute left-1\"\n />\n)\n\nexport const DataTableHeaderCell = ({\n header,\n includeTotal = false,\n totalSuffix = 'items',\n children,\n className,\n ...props\n}: DataTableHeaderProps) => {\n const sortDirection = header.column.getIsSorted()\n const { isSortable: isSortableTable, getRowModel } = useDataTable()\n // false for display columns, e.g. \"Actions\"\n const isDataColumn = header.column.getCanSort()\n\n const totalRows = getRowModel()?.rows?.length\n\n const { hoverProps, isHovered } = useHover({})\n\n const handleKeyDown = (\n event: React.KeyboardEvent<HTMLTableCellElement>,\n callback: (event: unknown) => void | undefined\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n callback(event as unknown)\n }\n }\n\n const headerSortingHandler = header.column.getToggleSortingHandler()\n\n return (\n <StyledTableHeaderCell\n isSortable={isSortableTable && isDataColumn}\n colSpan={header.colSpan}\n onClick={\n isSortableTable && isDataColumn && headerSortingHandler\n ? headerSortingHandler\n : undefined\n }\n onKeyDown={(event) =>\n isSortableTable &&\n isDataColumn &&\n headerSortingHandler &&\n handleKeyDown(event, headerSortingHandler)\n }\n tabIndex={isSortableTable && isDataColumn ? 0 : -1}\n {...hoverProps}\n className={className}\n {...props}\n >\n <div\n className={cn(\n 'flex',\n 'gap-1',\n 'items-center',\n header.colSpan > 1 ? 'justify-center' : 'justify-start'\n )}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n {sortDirection && isSortableTable && (\n <div\n className={cn(\n 'flex',\n 'items-center',\n 'relative',\n 'size-6',\n 'ml-2',\n isHovered ? 'bg-primary-200' : 'bg-primary-100',\n 'rounded-sm'\n )}\n >\n <SortIcon direction={sortDirection} />\n </div>\n )}\n {includeTotal && (\n <StyledCount size=\"sm\" weight=\"normal\">\n ({totalRows} {totalSuffix})\n </StyledCount>\n )}\n </div>\n </StyledTableHeaderCell>\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { Label } from '../label/Label'\nimport { useDataTable } from './DataTableContext'\n\nexport const DataTableSelectAllRowsCheckbox = ({\n label = 'All rows selection'\n}: {\n label?: string\n}) => {\n const {\n getIsAllPageRowsSelected,\n getIsSomePageRowsSelected,\n toggleAllPageRowsSelected,\n tableId\n } = useDataTable()\n\n const getCheckedState = () => {\n if (getIsSomePageRowsSelected()) return 'indeterminate'\n if (getIsAllPageRowsSelected()) return true\n return false\n }\n\n const updateCheckedState = () => {\n if (getIsSomePageRowsSelected()) {\n return toggleAllPageRowsSelected(false)\n }\n return toggleAllPageRowsSelected(!getIsAllPageRowsSelected())\n }\n\n return (\n <>\n <label htmlFor={`${tableId}_all_rows_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n checked={getCheckedState()}\n onCheckedChange={updateCheckedState}\n name={`${tableId}_allRowsSelection`}\n />\n </>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...props\n}: DataTableHeadProps): React.ReactElement<unknown> => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition,\n setTablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const headerOffsetRef = React.useRef(0)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n const tableHeadElement = tableHeaderRowRef?.current?.closest('thead')\n\n if (tableHeadElement && tablePosition?.offsetTop === null) {\n const tableHeadHeight = tableHeadElement.getBoundingClientRect().height\n const intersectionOffset = stickyOffset + tableHeadHeight\n if (tablePosition) {\n setTablePosition({ ...tablePosition, offsetTop: intersectionOffset || 0 })\n }\n }\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n headerOffsetRef.current = newOffset\n setHeaderOffset(newOffset)\n\n requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...props}\n className={cn(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup) => {\n return (\n <Table.Row\n key={headerGroup.id}\n ref={tableHeaderRowRef}\n className={\n isSticky && headerOffset !== 0\n ? cn(\n 'translate-y-(--header-offset)',\n headerHide\n ? 'delay-0ms opacity-0 transition-none'\n : 'delay-150ms opacity-100 transition-opacity duration-100',\n '[&_th]:last:before:absolute',\n '[&_th]:last:before:bottom-0',\n '[&_th]:last:before:pointer-events-none',\n '[&_th]:last:before:right-0',\n '[&_th]:last:before:shadow-sm',\n '[&_th]:last:before:top-0',\n '[&_th]:last:before:w-full'\n )\n : undefined\n }\n >\n {getCanSomeRowsExpand() && <Table.HeaderCell className=\"w-10\" />}\n {enableRowSelection && (\n <Table.HeaderCell className=\"w-10\">\n <DataTableSelectAllRowsCheckbox />\n </Table.HeaderCell>\n )}\n {headerGroup.headers.map((header, index) => (\n <DataTableHeaderCell\n header={header}\n key={header.id}\n includeTotal={index === 0 && showTotalInFirstColumn}\n totalSuffix={totalSuffix}\n />\n ))}\n </Table.Row>\n )\n })}\n </Table.Header>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Loader } from '../loader/Loader'\nimport { AsyncDataState } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\n\nconst PendingState = styled(Loader, {\n base: [\n 'absolute',\n 'left-1/2',\n 'top-1/2',\n '-translate-x-1/2',\n '-translate-y-1/2',\n 'z-1'\n ]\n})\n\nexport const DataTableLoading = (\n props: React.ComponentProps<typeof PendingState>\n) => {\n const { asyncDataState } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.PENDING) return null\n\n return <PendingState {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { Table } from '../table/Table'\nimport { TableBody } from '../table/TableBody'\nimport { AsyncDataState } from './DataTable.types'\nimport { DataTableBody } from './DataTableBody'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableLoading } from './DataTableLoading'\n\nconst TableContainer = styled('div', {\n base: ['p-2', 'bg-white', 'rounded-lg']\n})\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children' | 'numberOfStickyColumns'\n> &\n Partial<\n Pick<React.ComponentProps<typeof DataTableHead>, 'theme' | 'sortable'>\n > &\n Partial<Pick<React.ComponentProps<typeof TableBody>, 'striped'>> & {\n scrollOptions?: {\n hasStickyHeader?: boolean\n stickyHeaderOffset?: number\n headerCss?: string\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n }\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n withContainer?: boolean\n }\n\nexport const DataTableTable = ({\n sortable,\n striped,\n theme = 'white',\n className,\n scrollOptions = {\n numberOfStickyColumns: 0,\n stickyHeaderOffset: 0,\n hasStickyHeader: false,\n showTotalInFirstColumn: true,\n totalSuffix: 'items'\n },\n rowAction,\n withContainer = false,\n ...props\n}: DataTableTableProps): React.JSX.Element | null => {\n const {\n asyncDataState,\n getTotalRows,\n getCanSomeRowsExpand,\n rowSelection,\n enableRowSelection,\n tableId,\n setTablePosition\n } = useDataTable()\n\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const isTableVisible = React.useRef(false)\n const isScrolling = React.useRef<boolean>(false)\n\n const scrollTarget = React.useMemo(() => {\n if (typeof window === 'undefined') return null\n return window\n }, [])\n\n React.useEffect(() => {\n if (!scrollTarget || typeof IntersectionObserver === 'undefined') {\n return\n }\n\n const updatePosition = () => {\n if (tableRef.current) {\n const tableTop = tableRef.current.getBoundingClientRect().top\n const tableBottom = tableRef.current.getBoundingClientRect().bottom\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n top: tableTop,\n bottom: tableBottom\n }))\n }\n isScrolling.current = false\n }\n\n const handleScroll = () => {\n if (!isScrolling.current) {\n requestAnimationFrame(updatePosition)\n isScrolling.current = true\n }\n }\n\n if (!tableRef.current) return\n\n const observerOffset = scrollOptions?.stickyHeaderOffset || 0\n\n const observerOptions = {\n rootMargin: `-${observerOffset}px 0px -${observerOffset}px 0px`,\n threshold: 0\n }\n\n const handleTableIntersection = (entries: IntersectionObserverEntry[]) => {\n if (!entries || entries.length === 0) return\n const entry = entries[0]\n\n isTableVisible.current = entry.isIntersecting\n\n if (scrollTarget) {\n if (entry.isIntersecting) {\n // add scroll listener\n scrollTarget?.addEventListener('scroll', handleScroll)\n } else {\n // remove scroll listener\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n isVisible: entry.isIntersecting\n }))\n }\n\n const tableObserver = new IntersectionObserver(\n handleTableIntersection,\n observerOptions\n )\n\n //only track table position if we have a sticky header or bulk actions active\n if (\n tableRef.current &&\n (scrollOptions.hasStickyHeader ||\n Object.keys(rowSelection || {}).length > 0)\n ) {\n tableObserver.observe(tableRef.current)\n }\n\n return () => {\n tableObserver.disconnect()\n if (scrollTarget) {\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n }, [\n rowSelection,\n scrollOptions.hasStickyHeader,\n scrollOptions?.stickyHeaderOffset,\n scrollTarget,\n setTablePosition\n ])\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n const buildScrollContainerKey = (): string => {\n let controlColumnCount = 0\n\n if (getCanSomeRowsExpand() && !!enableRowSelection) {\n controlColumnCount = 2\n } else if (getCanSomeRowsExpand() || !!enableRowSelection) {\n controlColumnCount = 1\n }\n\n return `${tableId}_${controlColumnCount}_control_columns`\n }\n\n if (isEmpty) return null\n\n const tableComponent = (\n <Table\n corners=\"round\"\n size=\"lg\"\n {...props}\n ref={tableRef}\n numberOfStickyColumns={scrollOptions.numberOfStickyColumns}\n scrollContainerCls={scrollOptions.scrollContainerCls}\n scrollContainerkey={buildScrollContainerKey()}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead\n theme={theme}\n sortable={sortable}\n isSticky={scrollOptions.hasStickyHeader}\n stickyOffset={scrollOptions.stickyHeaderOffset}\n className={scrollOptions.headerCss}\n showTotalInFirstColumn={scrollOptions.showTotalInFirstColumn}\n totalSuffix={scrollOptions.totalSuffix}\n />\n <DataTableBody striped={striped} rowAction={rowAction} />\n </Table>\n )\n\n return (\n <>\n <DataTableLoading />\n {withContainer ? (\n <TableContainer\n className={cn(\n scrollOptions.numberOfStickyColumns === 0 && 'overflow-x-auto'\n )}\n >\n {tableComponent}\n </TableContainer>\n ) : (\n tableComponent\n )}\n </>\n )\n}\n","import { DragHandle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const StyledHandle = styled(ActionIcon, {\n base: [\n 'text-inherit!',\n 'fill-current',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n isDragging: {\n true: ['cursor-grabbing'],\n false: ['cursor-grab']\n }\n }\n})\n\nexport type THandleProps = Omit<\n React.ComponentProps<typeof StyledHandle>,\n 'children'\n> &\n Pick<React.ComponentProps<typeof Icon>, 'size'>\n\nexport const Handle = React.forwardRef<HTMLButtonElement, THandleProps>(\n ({ isDragging, size, ...rest }, ref) => {\n return (\n <StyledHandle\n ref={ref}\n isDragging={isDragging}\n appearance=\"simple\"\n hasTooltip={false}\n size={size}\n {...rest}\n >\n <Icon is={DragHandle} />\n </StyledHandle>\n )\n }\n)\n\nHandle.displayName = 'Handle'\n","import { useSortable } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { Handle as DragHandle, THandleProps } from './Handle'\n\nexport type TSortableHandleProps = {\n targetId: string | number\n disabled?: boolean\n label?: string\n} & Omit<THandleProps, 'label'>\n\nexport const SortableHandle = ({\n targetId,\n disabled = false,\n label = 'drag handle',\n ...rest\n}: TSortableHandleProps) => {\n const { attributes, listeners, isDragging, setActivatorNodeRef } =\n useSortable({ id: targetId })\n\n return (\n <DragHandle\n ref={setActivatorNodeRef}\n isDragging={isDragging}\n label={label}\n disabled={disabled}\n {...(!disabled ? listeners : {})}\n {...(!disabled ? attributes : {})}\n {...rest}\n />\n )\n}\n\nSortableHandle.displayName = 'SortableHandle'\n","import type { UniqueIdentifier } from '@dnd-kit/core'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nexport type TSortableItemProps = {\n id: UniqueIdentifier\n asChild?: boolean\n isDragHandle?: boolean\n disabled?: boolean\n className?: string\n style?: Pick<React.HTMLAttributes<HTMLDivElement>, 'style'>\n}\n\nexport const SortableItem = ({\n id,\n asChild = false,\n className,\n style,\n isDragHandle = false,\n disabled,\n ...rest\n}: React.PropsWithChildren<TSortableItemProps>) => {\n const { transform, setNodeRef, isDragging, listeners, attributes } =\n useSortable({ id })\n\n const Component = asChild ? Slot : 'div'\n return (\n <Component\n ref={setNodeRef}\n style={{\n ...style,\n '--scale': 1,\n '--translate-x': transform?.x || 0,\n '--translate-y': transform?.y || 0\n }}\n data-dragging={isDragging}\n data-disabled={disabled}\n {...(isDragHandle && !disabled ? listeners : {})}\n {...(isDragHandle && !disabled ? attributes : {})}\n {...rest}\n className={cn(\n 'translate-x-[calc(var(--translate-x)*1px)]',\n 'translate-y-[calc(var(--translate-y)*1px)]',\n 'scale-(--scale)',\n isDragging && 'z-5',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n isDragHandle && (isDragging ? 'cursor-grabbing' : 'cursor-grab'),\n className\n )}\n />\n )\n}\n\nSortableItem.displayName = 'SortableItem'\n","import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core'\nimport {\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors\n} from '@dnd-kit/core'\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates\n} from '@dnd-kit/sortable'\nimport * as React from 'react'\n\ntype TSortableRootProps = {\n sortableIds: (string | number)[]\n onSortChange: (onSortChangeData: {\n order: UniqueIdentifier[]\n oldIndex: number\n newIndex: number\n }) => void\n}\n\nexport const SortableRoot = ({\n sortableIds,\n onSortChange,\n children\n}: React.PropsWithChildren<TSortableRootProps>) => {\n const [order, setOrder] = React.useState<(string | number)[]>(sortableIds)\n React.useEffect(() => {\n setOrder(sortableIds)\n }, [sortableIds])\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n })\n )\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event\n if (active.id && over?.id && active.id !== over?.id) {\n setOrder((order) => {\n const oldIndex = order.indexOf(active.id)\n const newIndex = order.indexOf(over.id)\n const newOrder = arrayMove(order, oldIndex, newIndex)\n onSortChange({ order: newOrder, oldIndex, newIndex })\n return newOrder\n })\n }\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext items={order}>{children}</SortableContext>\n </DndContext>\n )\n}\n\nSortableRoot.displayName = 'SortableRoot'\n","export { SortableHandle as Handle } from './SortableHandle'\nexport { SortableItem as Item } from './SortableItem'\nexport { SortableRoot as Root } from './SortableRoot'\n","import type { Row } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { DataTableDataCell } from '../DataTableDataCell'\n\nexport type DataTableDraggableRowProps = React.ComponentProps<\n typeof Table.Row\n> & {\n row: Row<Record<string, unknown>>\n idColumn?: string\n}\n\nexport const DragAndDropTableRow = ({\n row,\n idColumn = 'id'\n}: DataTableDraggableRowProps) => {\n const rowId = row.original[idColumn] as string | number\n return (\n <Sortable.Item id={rowId} asChild>\n <Table.Row>\n {row.getVisibleCells().map((cell, i) => {\n if (i === 0) {\n return (\n <Table.Cell key={cell.id}>\n <Sortable.Handle targetId={rowId} className=\"inline-block\" />\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n )\n }\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </Table.Row>\n </Sortable.Item>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../../table/Table'\nimport { useDataTable } from '../DataTableContext'\nimport { DragAndDropTableRow } from './DragAndDropTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n idColumn?: string\n}\n\nexport const DragAndDropTableBody = ({\n striped = false,\n idColumn = 'id',\n ...props\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n return (\n <Table.Body {...props} striped={striped}>\n {getRowModel().rows.map((row) => {\n return (\n <DragAndDropTableRow row={row} key={row.id} idColumn={idColumn} />\n )\n })}\n </Table.Body>\n )\n}\n","import { arrayMove } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { AsyncDataState, TAsyncDataResult } from '../DataTable.types'\nimport { useDataTable } from '../DataTableContext'\nimport { DataTableHead } from '../DataTableHead'\nimport { DataTableLoading } from '../DataTableLoading'\nimport type { DataTableTableProps } from '../DataTableTable'\nimport { DragAndDropTableBody } from './DragAndDropTableBody'\n\ntype DragAndDropTableProps = DataTableTableProps & {\n className?: string\n idColumn?: string\n onDragAndDrop?: (onDragAndDropData: {\n oldIndex: number\n newIndex: number\n newData: TAsyncDataResult\n }) => void\n}\n\nexport const DragAndDropTable = ({\n idColumn = 'id',\n onDragAndDrop,\n sortable,\n striped,\n theme,\n className,\n ...props\n}: DragAndDropTableProps) => {\n const { asyncDataState, data, setData } = useDataTable()\n const isPending = asyncDataState === AsyncDataState.PENDING\n\n const rowIds = React.useMemo(\n () =>\n data.results.map((row) => {\n return row[idColumn] as string | number\n }),\n [data]\n )\n const handleSortChange = React.useCallback(\n ({ oldIndex, newIndex }) => {\n const sortedResults = arrayMove(data.results, oldIndex, newIndex)\n const newData = { results: sortedResults, total: data.total }\n setData({ results: sortedResults, total: data.total })\n onDragAndDrop?.({ oldIndex, newIndex, newData })\n },\n [data, onDragAndDrop]\n )\n\n return (\n <Sortable.Root onSortChange={handleSortChange} sortableIds={rowIds}>\n <DataTableLoading />\n <Table\n {...props}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead theme={theme} sortable={sortable} />\n <DragAndDropTableBody striped={striped} idColumn={idColumn} />\n </Table>\n </Sortable.Root>\n )\n}\n","export enum VisibleElementsAmount {\n LESS = 6,\n MORE = 8\n}\n\nexport const VIEW_ALL_POPOVER = 'VIEW_ALL_POPOVER'\nexport const GO_TO_PREVIOUS_PAGE = 'GO_TO_PREVIOUS_PAGE'\nexport const GO_TO_NEXT_PAGE = 'GO_TO_NEXT_PAGE'\n","import {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport { PaginationItemsToRender } from './types'\n\nexport const getPaginationElementsToRender = (\n currentPage: number,\n pagesCount: number,\n visibleElementsCount: number\n): PaginationItemsToRender => {\n const paginationPages = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n /*\n * As we always show the `<` `>` arrows,\n * subtract 2 from `visibleElementsCount` (one for each of the GO_TO_PREVIOUS/NEXT_PAGE arrows)\n * to get the `visiblePagesCount`\n */\n let visiblePagesCount = visibleElementsCount - 2\n const withPreviousNextPageArrows = (paginationPages) => [\n GO_TO_PREVIOUS_PAGE,\n ...paginationPages,\n GO_TO_NEXT_PAGE\n ]\n\n /**\n * If fewer pages than threshold for truncating render them all.\n *\n * pagesCount: 6\n * visibleElementsCount: >=6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, 3, 4, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | 3 | | 4 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (pagesCount <= visiblePagesCount) {\n return withPreviousNextPageArrows(paginationPages)\n }\n\n /**\n * If current page is either at the very start or at the very end of the pages\n */\n const canFitEdgePage = visibleElementsCount >= 5\n const canFitViewAllPopover = visibleElementsCount >= 4\n const canFitPages = visibleElementsCount >= 3\n\n if (canFitViewAllPopover) {\n // Subtract one from visiblePagesCount to accomodate for us adding the `[…]` VIEW_ALL_POPOVER\n visiblePagesCount -= 1\n }\n\n if (canFitEdgePage) {\n // Subtract one more from visiblePagesCount to accomodate for us adding the GO_TO_PREVIOUS/NEXT_PAGE arrows\n visiblePagesCount -= 1\n }\n\n const firstPage = paginationPages[0]\n const lastPage = paginationPages[paginationPages.length - 1]\n\n /**\n * If we're truncating and current page is at the start of the page list,\n * render the initial truncated page list, e.g.\n *\n * pagesCount: 8\n * currentPage: 1/2\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | … | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage < visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitPages) {\n newPaginationItems.push(...paginationPages.slice(0, visiblePagesCount))\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitEdgePage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page is towards the end of the\n * page list (depending on visibleElementsCount),\n * render a truncated page list from the end, e.g.\n *\n * pagesCount: 8\n * currentPage: 7/8\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, VIEW_ALL_POPOVER, 7, 8, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | … | | 7 | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage > pagesCount - visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitEdgePage) {\n newPaginationItems.push(firstPage)\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitPages) {\n newPaginationItems.push(\n ...paginationPages.slice(pagesCount - visiblePagesCount, pagesCount)\n )\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page doesn't meet any of the previous conditions\n * (we're in the middle)\n * render a truncated page list from a specific index relative to `currentPage`, e.g.\n *\n * currentPage: 4\n * visibleElementsCount: 6 // VisibleElementsAmount.LESS\n * returns [GO_TO_PREVIOUS_PAGE, 3, 4, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 3 | | 4 | | … | | 6 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n * currentPage: 6\n * visibleElementsCount: 8 // VisibleElementsAmount.MORE\n * returns [GO_TO_PREVIOUS_PAGE, 4, 5, 6, 7, VIEW_ALL_POPOVER, 10, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 4 | | 5 | | 6 | | 7 | | … | | 10 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n */\n const canFitCurrentPage = canFitPages\n const canFitCurrentPageAndPreviousPage = visibleElementsCount >= 6\n const canFitCurrentPageAndPreviousPageAndNextPage = visibleElementsCount >= 7\n const canFitLastPage = canFitEdgePage\n\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitCurrentPageAndPreviousPageAndNextPage) {\n newPaginationItems.push(\n ...paginationPages.slice(\n currentPage + 1 - visiblePagesCount,\n currentPage + 1\n )\n )\n } else if (canFitCurrentPageAndPreviousPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - visiblePagesCount, currentPage)\n )\n } else if (canFitCurrentPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - 1, currentPage - 1 + 1)\n )\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitLastPage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n}\n\nexport const findNextAvailablePage = (\n startPage: number,\n disabledPages: number[],\n pagesCount: number\n): number | undefined => {\n if (startPage > pagesCount) return\n let nextPage = startPage\n while (disabledPages.includes(nextPage)) {\n nextPage++\n }\n return nextPage\n}\n\nexport const findPreviousAvailablePage = (\n startPage: number,\n disabledPages: number[]\n): number | undefined => {\n if (startPage < 1) return\n let previousPage = startPage\n while (disabledPages.includes(previousPage)) {\n previousPage--\n }\n return previousPage\n}\n","import * as React from 'react'\n\nimport { VisibleElementsAmount } from '../pagination.constants'\nimport {\n findNextAvailablePage,\n findPreviousAvailablePage,\n getPaginationElementsToRender\n} from '../pagination.helper'\nimport type { PaginationContextValue, PaginationProviderProps } from '../types'\n\nexport const PaginationContext = React.createContext<PaginationContextValue>({\n goToPage: () => null,\n goToPreviousPage: () => null,\n goToNextPage: () => null,\n currentPage: 1,\n pagesCount: 0,\n onItemHover: () => null,\n paginationItems: [],\n labels: {},\n indicatedPages: [],\n disabledPages: []\n})\n\nexport const PaginationProvider = ({\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children\n}: React.PropsWithChildren<PaginationProviderProps>) => {\n const [internalCurrentPage, setInternalCurrentPage] = React.useState(1)\n\n const currentPage = selectedPage || internalCurrentPage\n\n const goToPage = React.useCallback(\n (pageNumber: number) => {\n setInternalCurrentPage(pageNumber)\n onSelectedPageChange?.(pageNumber)\n },\n [onSelectedPageChange]\n )\n\n const previousPage = currentPage - 1\n const previousAvailablePage = findPreviousAvailablePage(\n previousPage,\n disabledPages\n )\n\n const goToPreviousPage = React.useCallback(() => {\n if (previousAvailablePage) goToPage(previousAvailablePage)\n }, [goToPage, previousAvailablePage])\n\n const nextPage = currentPage + 1\n const nextAvailablePage = findNextAvailablePage(\n nextPage,\n disabledPages,\n pagesCount\n )\n const goToNextPage = React.useCallback(() => {\n if (nextAvailablePage) goToPage(nextAvailablePage)\n }, [goToPage, nextAvailablePage])\n\n const paginationItems = getPaginationElementsToRender(\n currentPage,\n pagesCount,\n visibleElementsCount\n )\n\n const value = React.useMemo(() => {\n return {\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n paginationItems,\n indicatedPages,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n }\n }, [\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n indicatedPages,\n paginationItems,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n ])\n\n return (\n <PaginationContext.Provider value={value}>\n {children}\n </PaginationContext.Provider>\n )\n}\n","import * as React from 'react'\n\nimport { PaginationContext } from './pagination-context/PaginationContext'\nimport type { PaginationContextValue } from './types'\n\nexport const usePagination = (): PaginationContextValue => {\n const context = React.useContext(PaginationContext)\n\n if (!context) {\n throw new Error(\n 'Ensure that you wrap any components with the PaginationProvider component'\n )\n }\n\n return context\n}\n","import { ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['ml-1', 'disabled:opacity-30']\n})\n\nexport const PaginationNextButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToNextPage, labels, nextAvailablePage } = usePagination()\n\n const isDisabled = !nextAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToNextPage}\n disabled={isDisabled}\n {...props}\n label={labels?.nextPageButtonLabel || 'Next page'}\n >\n <Icon is={ChevronRight} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport type { PaginationPageProps } from './types'\nimport { usePagination } from './usePagination'\n\nconst StyledButton = styled('button', {\n base: [\n 'items-center',\n 'border',\n 'border-transparent',\n 'rounded-sm',\n 'cursor-pointer',\n 'font-body',\n 'justify-center',\n 'whitespace-nowrap',\n 'w-max',\n 'flex',\n 'flex-col',\n 'p-0',\n 'font-normal',\n 'text-text-subtle',\n 'bg-(--base-1)',\n 'relative',\n 'not-disabled:active:bg-(--base-3)',\n 'not-disabled:active:text-(--text-bold)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--base-2)',\n 'not-disabled:hover:text-text-regular',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n md: ['size-10']\n },\n selected: {\n true: [\n 'border',\n 'border-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:border-(--accent-11)',\n 'not-disabled:active:text-(--accent-11)',\n 'not-disabled:hover:border-(--accent-10)',\n 'not-disabled:hover:text-(--accent-10)',\n 'text-(--accent-9)'\n ]\n },\n indicated: {\n true: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'text-white'\n ]\n }\n },\n compoundVariants: [\n {\n selected: true,\n indicated: true,\n class: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'not-focus-visible:border-white!',\n 'shadow-[var(--accent-9)_0px_0px_0px_1px]',\n 'text-white'\n ]\n }\n ]\n})\n\nexport const PaginationPage = ({\n pageNumber,\n className,\n onClick\n}: PaginationPageProps) => {\n const { currentPage, goToPage, indicatedPages, disabledPages, onItemHover } =\n usePagination()\n\n const isIndicated = indicatedPages.includes(pageNumber)\n const isDisabled = disabledPages.includes(pageNumber)\n\n const isSelected = currentPage === pageNumber\n\n const handleOnHover = () => {\n if (isSelected || isDisabled) return\n onItemHover?.(pageNumber)\n }\n\n const handleOnClick = (pageNumber) => {\n onClick?.()\n goToPage(pageNumber)\n }\n\n return (\n <StyledButton\n selected={isSelected}\n size=\"md\"\n onClick={() => handleOnClick(pageNumber)}\n className={className}\n indicated={isIndicated}\n disabled={isDisabled}\n aria-current={isSelected && 'page'}\n aria-disabled={isDisabled}\n onMouseOver={handleOnHover}\n >\n {pageNumber}\n </StyledButton>\n )\n}\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Arrow, Close, Content } from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'max-w-[90vw]',\n 'p-6',\n 'pr-10',\n 'relative',\n 'z-10',\n 'will-change-transform',\n 'will-change-opacity',\n 'animation-duration-75',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-50'],\n md: ['max-w-100'],\n lg: ['max-w-150']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: ['fill-white', 'z-1', 'in-data-[align=end]:mx-6']\n})\n\ntype PopoverContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content> & {\n closePopoverText?: string\n showCloseButton?: boolean\n }\n\nexport const PopoverContent = ({\n children,\n side = 'top',\n sideOffset = 8,\n closePopoverText = 'Close popover',\n showCloseButton = true,\n size = 'md',\n ...remainingProps\n}: PopoverContentProps) => (\n <StyledContent\n size={size}\n side={side}\n sideOffset={sideOffset}\n {...remainingProps}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closePopoverText}\n size=\"md\"\n hasTooltip={false}\n theme=\"neutral\"\n className=\"absolute top-0.5 right-0.5\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {children}\n <StyledArrow width={16} height={8} />\n </StyledContent>\n)\n","import { Anchor, Portal, Root, Trigger } from '@radix-ui/react-popover'\n\nimport { PopoverContent } from './PopoverContent'\n\nexport const Popover = Object.assign(Root, {\n Content: PopoverContent,\n Portal,\n Anchor,\n Trigger\n})\n\nRoot.displayName = 'Popover'\n","import { Ellypsis } from '@atom-learning/icons'\nimport React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Popover } from '../popover/Popover'\nimport { PaginationPage } from './PaginationPage'\nimport { usePagination } from './usePagination'\n\nexport const PaginationPopover = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const { pagesCount, labels } = usePagination()\n const paginationItems = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n const [isOpen, setIsOpen] = React.useState<boolean>(false)\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen} defaultOpen={false}>\n <Popover.Trigger asChild>\n {children || (\n <ActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n label={labels?.popoverTriggerLabel || 'Open pagination popover'}\n data-testid=\"pagination_popover_trigger\"\n >\n <Icon is={Ellypsis} />\n </ActionIcon>\n )}\n </Popover.Trigger>\n <Popover.Content size=\"md\" showCloseButton={false} className=\"p-0\">\n <div className=\"flex flex-wrap justify-center gap-1 p-4\">\n {paginationItems?.map((pageNumber) => {\n return (\n <PaginationPage\n key={pageNumber}\n pageNumber={pageNumber}\n onClick={() => setIsOpen(false)}\n />\n )\n })}\n </div>\n </Popover.Content>\n </Popover>\n )\n}\n","import { ChevronLeft } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['mr-1', 'disabled:opacity-30']\n})\n\nexport const PaginationPreviousButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToPreviousPage, labels, previousAvailablePage } = usePagination()\n\n const isDisabled = !previousAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToPreviousPage}\n disabled={isDisabled}\n {...props}\n label={labels?.previousPageButtonLabel || 'Previous page'}\n >\n <Icon is={ChevronLeft} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport { PaginationNextButton } from './PaginationNextButton'\nimport { PaginationPage } from './PaginationPage'\nimport { PaginationPopover } from './PaginationPopover'\nimport { PaginationPreviousButton } from './PaginationPreviousButton'\nimport { usePagination } from './usePagination'\n\nexport const PaginationItems = (): React.JSX.Element => {\n const { paginationItems } = usePagination()\n\n return (\n <>\n {paginationItems.map((paginationItem, i) => {\n switch (paginationItem) {\n case VIEW_ALL_POPOVER:\n return <PaginationPopover key={paginationItem + i} />\n case GO_TO_PREVIOUS_PAGE:\n return <PaginationPreviousButton key={paginationItem} />\n case GO_TO_NEXT_PAGE:\n return <PaginationNextButton key={paginationItem} />\n default:\n return (\n <PaginationPage\n key={paginationItem}\n pageNumber={paginationItem}\n />\n )\n }\n })}\n </>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { PaginationProvider } from './pagination-context/PaginationContext'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n className,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <div {...rest} className={cn('flex', 'gap-1', className)}>\n {children || <PaginationItems />}\n </div>\n </ColorScheme>\n </PaginationProvider>\n )\n}\n\nexport const Pagination = Object.assign(PaginationComponent, {\n Popover: PaginationPopover\n})\n\nPaginationComponent.displayName = 'Pagination'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { TcolorScheme } from '../../../experiments/color-scheme/ColorScheme'\nimport { Pagination as PaginationComponent } from '../../pagination/Pagination'\nimport { Text } from '../../text/Text'\nimport { AsyncDataState } from '../DataTable.types'\nimport { useDataTable } from '../DataTableContext'\n\nconst StyledNav = styled('nav', {\n base: [\n 'flex',\n 'flex-col',\n 'justify-between',\n 'items-center',\n 'tabular-nums',\n 'flex-wrap',\n 'w-full',\n 'gap-4',\n 'mt-4',\n 'md:flex-row'\n ]\n})\n\ntype PaginationProps = React.ComponentProps<typeof StyledNav> & {\n colorScheme?: TcolorScheme\n}\n\n/** Applies pagination to parent DataTableProvider and renders UI to switch pages etc */\nexport const Pagination = ({ colorScheme, ...props }: PaginationProps) => {\n const {\n applyPagination,\n getState,\n getExpandedRowModel,\n getRowModel,\n setPageIndex,\n getTotalRows,\n getPageCount,\n asyncDataState,\n hasAsyncData\n } = useDataTable()\n\n React.useEffect(() => {\n applyPagination()\n }, [applyPagination])\n\n const { pagination: paginationState } = getState()\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n // Show pagination only if total pages are more than 1\n const showPagination = hasAsyncData\n ? getPageCount() > 1\n : getExpandedRowModel().rows.length / paginationState.pageSize > 1\n\n if (isEmpty || !showPagination) return null\n const totalVisibleRows = getExpandedRowModel().rows.length\n\n const start =\n totalVisibleRows === 0\n ? 0\n : paginationState.pageIndex * paginationState.pageSize + 1\n\n const asyncRowCount = getRowModel().rows.length\n const end = hasAsyncData\n ? asyncRowCount === 0\n ? start\n : start + asyncRowCount - 1\n : Math.min(start + paginationState.pageSize - 1, totalVisibleRows)\n\n // indexing for the pagination component is 1 based\n const setPage = (index: number) => {\n setPageIndex(index - 1)\n }\n\n const pageCount = hasAsyncData\n ? getPageCount()\n : Math.max(1, Math.ceil(totalVisibleRows / paginationState.pageSize))\n\n return (\n <StyledNav {...props}>\n <Text size=\"sm\">{`${start} - ${end} of ${\n hasAsyncData ? getTotalRows() : totalVisibleRows\n } items`}</Text>\n <PaginationComponent\n colorScheme={colorScheme}\n selectedPage={paginationState.pageIndex + 1}\n pagesCount={pageCount}\n onSelectedPageChange={setPage}\n />\n </StyledNav>\n )\n}\n\nPagination.displayName = 'Pagination'\n","import { DataTableBody } from './DataTableBody'\nimport { DataTableBulkActions } from './DataTableBulkActions'\nimport { DataTableBulkActionsFloating } from './DataTableBulkActionsFloating'\nimport { DataTableProvider } from './DataTableContext'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableEmptyState } from './DataTableEmptyState'\nimport { DataTableError } from './DataTableError'\nimport { DataTableGlobalFilter } from './DataTableGlobalFilter'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableLoading } from './DataTableLoading'\nimport { DataTableMetaData } from './DataTableMetaData'\nimport { DataTableRow } from './DataTableRow'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\nimport { DataTableTable } from './DataTableTable'\nimport { DragAndDropTable } from './drag-and-drop/DragAndDropTable'\nimport { Pagination } from './pagination/Pagination'\n\n/** Context provider for DataTable state and logic.\n *\n * Children can call `useDataTable` to access everything provided by `@tanstack/react-table` plus\n * the functionality we've built on top.\n */\nexport const DataTable = Object.assign(DataTableProvider, {\n /** Default table body implementation for `DataTable`.\n *\n * Can be configured with alternating colours of rows. If you need more customisation options,\n * you can build your own implementation with `useDataTable()` and the UI-only `Table` components.\n */\n Body: DataTableBody,\n\n /** Default table data cell implementation for `DataTable`\n *\n *\n */\n DataCell: DataTableDataCell,\n\n /**\n * Used in place of `DataTable.Table` to render a table with rows that the user can sort by drag-and-drop\n */\n DragAndDropTable: DragAndDropTable,\n\n /** Default global search implementation for `DataTable`\n *\n * If you need more customisation options, you can compose your own implementation with our UI-only input components and `useDataTable`.\n */\n GlobalFilter: DataTableGlobalFilter,\n\n /** Default table head implementation\n *\n * Can be configured to be sortable and with different visual themes.\n * If you need more customisation options, you can build your own implementation\n * with `useDataTable` and the UI-only `Table` components.\n */\n Head: DataTableHead,\n\n /** Default header implementation for `DataTable`\n *\n * Can be configured to make the column sortable. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n HeaderCell: DataTableHeaderCell,\n\n /** Default pagination implementation for `DataTable`\n *\n * Can navigate forward, backward, or to any specific page. If you need more customisation options,\n * you can build your own implementation with `useDataTable` and other UI components.\n *\n */\n MetaData: DataTableMetaData,\n\n /** Default display of amount of items and current sorting status for 'DataTable'\n *\n */\n Pagination: Pagination,\n\n /** Default row implementation for `DataTable`\n *\n * Renders all visible cells as `Table.Cell`. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n Row: DataTableRow,\n\n /** Default table implementation for `DataTable`.\n *\n * Can be configured with sortable columns and different visual themes.\n *\n * If you need more customisation options, you can compose your own implementation with\n * lower-level `DataTable` components or build the whole thing from\n * scratch with `useDataTable` and the UI-only `Table` components.\n *\n */\n Table: DataTableTable,\n\n /** Default loading implementation for remote data\n *\n * Renders a loading component while fetching the paginated data using `getAsyncData`.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState`\n * can be retrieved from `useDataTable`\n */\n Loading: DataTableLoading,\n\n /** Default error implementation for remote data\n *\n * Renders an error component when `getAsyncData` promise rejects.\n * Children are rendered as a function, it exposes a `runAsyncData` function to the children component.\n * `runAsyncData()` can be used to retry fetching the paginated data with the current pageIndex, pageSize\n * and sorting parameters or your own custom paginated options.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState` and `runAsyncData()`\n * can be retrieved from `useDataTable`\n *\n */\n Error: DataTableError,\n\n /** Empty state implementation for `DataTable`.\n *\n * Extends the EmptyState component\n */\n EmptyState: DataTableEmptyState,\n\n /** Select all rows checkbox.\n *\n * Renders a checkbox on the header, allowing for bulk selection/deselection of all selectable rows\n */\n SelectAllRowsCheckbox: DataTableSelectAllRowsCheckbox,\n\n /** Individual row selection checkbox.\n *\n * Renders a checkbox on each row, allowing for individual selection/deselection of any selectable row\n */\n RowSelectionCheckbox: DataTableRowSelectionCheckbox,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActions: DataTableBulkActions,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActionsFloating: DataTableBulkActionsFloating\n})\n","export const monthNamesShort = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n]\n\nexport const weekdayNamesShort = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat'\n]\n\nexport const DEFAULT_LABELS = {\n open: 'Open calendar',\n next: 'Next month',\n previous: 'Previous month',\n nextYear: 'Next year',\n previousYear: 'Previous year'\n}\n","import { styled } from '~/styled'\n\nexport const Day = styled('button', {\n base: [\n 'bg-transparent',\n 'border-none',\n 'rounded-full',\n 'text-grey-900',\n 'cursor-pointer',\n 'font-body',\n 'text-sm',\n 'size-8',\n 'p-0',\n 'transition-all',\n 'duration-75',\n 'hover:bg-grey-200',\n 'active:bg-primary-800',\n 'active:text-white',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-default',\n 'disabled:opacity-30'\n ],\n variants: {\n isSelected: {\n true: ['bg-primary-800', 'hover:bg-primary-800', 'text-white']\n },\n isToday: {\n true: ['bg-grey-200']\n },\n isOutsideMonth: {\n true: ['text-grey-600']\n }\n }\n})\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport { useDayzed } from 'dayzed'\nimport * as React from 'react'\n\nimport { ActionIcon } from '~/components/action-icon/ActionIcon'\nimport { Button } from '~/components/button/Button'\nimport { Icon } from '~/components/icon/Icon'\nimport { Text } from '~/components/text/Text'\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { DEFAULT_LABELS, monthNamesShort, weekdayNamesShort } from './constants'\nimport { Day } from './Day'\n\nconst StyledButton = styled(Button, {\n base: ['text-grey-1000', 'p-3', 'w-16'],\n variants: {\n selected: {\n false: [\n 'disabled:bg-white!',\n 'font-normal',\n 'hover:bg-grey-200!',\n 'hover:text-grey-1000!',\n 'text-grey-1000!'\n ]\n }\n }\n})\n\nexport type CalendarTranslationProps = {\n monthNames?: string[]\n weekdayNames?: string[]\n labels?: {\n open: string\n next: string\n previous: string\n nextYear: string\n previousYear: string\n }\n}\n\ntype CalendarProps = DayzedInterface &\n CalendarTranslationProps & {\n refDateToday?: React.RefObject<HTMLButtonElement | null>\n refDateSelected?: React.RefObject<HTMLButtonElement | null>\n setYear: (date: Date) => Promise<void>\n className?: string\n }\n\nconst offsetWeekdayNames = (\n weekdayNames: string[],\n firstDayOfWeek: number\n): string[] => {\n const start = weekdayNames.slice(0, firstDayOfWeek)\n const end = weekdayNames.slice(firstDayOfWeek)\n return end.concat(start)\n}\n\nexport const Calendar = ({\n className,\n refDateSelected,\n refDateToday,\n firstDayOfWeek = 0,\n monthNames = monthNamesShort,\n weekdayNames = weekdayNamesShort,\n labels = DEFAULT_LABELS,\n date = new Date(),\n minDate,\n maxDate,\n setYear,\n ...remainingProps\n}: CalendarProps) => {\n const [showYears, setShowYears] = React.useState<boolean>(false)\n const [currentYear, setCurrentYear] = React.useState<number>(\n date?.getFullYear()\n )\n\n const handleSetYear = (year: number): void => {\n const newDate = date\n newDate.setFullYear(year)\n setYear(newDate)\n setShowYears(false)\n }\n\n const isAtMinYear = minDate && currentYear - 16 <= minDate.getFullYear()\n const isAtMaxYear = maxDate && currentYear >= maxDate.getFullYear()\n\n const yearList = Array.from({ length: 16 }, (_, i) => {\n const year = currentYear - i\n if (\n (maxDate && year > maxDate.getFullYear()) ||\n (minDate && year < minDate.getFullYear())\n )\n return 0\n return year\n })\n\n const { calendars, getBackProps, getForwardProps, getDateProps } = useDayzed({\n firstDayOfWeek,\n showOutsideDays: true,\n date,\n minDate,\n maxDate,\n ...remainingProps\n })\n\n if (!calendars.length) return null\n\n return (\n <div className={cn('relative', 'w-fit', '-mt-1', className)}>\n <div className=\"absolute top-0 -right-1 flex\">\n <ActionIcon\n label={labels[showYears ? 'previousYear' : 'previous']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getBackProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear - 16)\n })}\n disabled={showYears && isAtMinYear}\n >\n <Icon is={ChevronLeft} />\n </ActionIcon>\n <ActionIcon\n label={labels[showYears ? 'nextYear' : 'next']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getForwardProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear + 16)\n })}\n disabled={showYears && isAtMaxYear}\n >\n <Icon is={ChevronRight} />\n </ActionIcon>\n </div>\n {showYears && (\n <div className=\"grid grid-cols-4 gap-x-1 gap-y-3 pt-12 [direction:rtl]\">\n {yearList.map((year, i) => {\n const isCurrentYear = year === date.getFullYear()\n if (!year) return <div key={i} className=\"h-10 w-16\" />\n\n return (\n <StyledButton\n key={`${year}${i}`}\n theme={isCurrentYear ? 'primary' : 'neutral'}\n onClick={() => handleSetYear(year)}\n selected={isCurrentYear}\n >\n {year}\n </StyledButton>\n )\n })}\n </div>\n )}\n {!showYears &&\n calendars.map(({ month, year, weeks }) => (\n <div key={`${month}${year}`}>\n <div className=\"mb-4 flex h-10 items-center\">\n <Button\n theme=\"neutral\"\n onClick={() => setShowYears(true)}\n className=\"text-grey-1000 px-0\"\n >\n {monthNames[month]} {year}\n </Button>\n </div>\n <div className=\"mb-3 grid grid-cols-7 gap-x-2 gap-y-1\">\n {offsetWeekdayNames(weekdayNames, firstDayOfWeek).map(\n (weekday) => (\n <Text\n as=\"span\"\n size=\"sm\"\n weight=\"bold\"\n key={`${month}${year}${weekday}`}\n className=\"text-center\"\n >\n {weekday}\n </Text>\n )\n )}\n </div>\n <div className=\"grid grid-cols-7 gap-x-2 gap-y-1\">\n {weeks.map((week, weekIndex) =>\n week.map((dateObj, index) => {\n const key = `${month}${year}${weekIndex}${index}`\n\n if (!dateObj) return <div key={key} />\n\n const { date, selected, today, prevMonth, nextMonth } =\n dateObj\n\n return (\n <Day\n isOutsideMonth={prevMonth || nextMonth}\n isSelected={selected}\n isToday={today}\n key={key}\n ref={\n selected ? refDateSelected : today ? refDateToday : null\n }\n {...getDateProps({ dateObj })}\n type=\"button\"\n >\n {date.getDate()}\n </Day>\n )\n })\n )}\n </div>\n </div>\n ))}\n </div>\n )\n}\n\nCalendar.displayName = 'Calendar'\n","export const DEFAULT_DATE_FORMAT = 'DD/MM/YYYY'\n","import { CalendarEvent } from '@atom-learning/icons'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport * as React from 'react'\n\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '~/utilities/style/get-icon-size'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Calendar, CalendarTranslationProps } from '../calendar/Calendar'\nimport { DEFAULT_LABELS } from '../calendar/constants'\nimport { Icon } from '../icon/Icon'\nimport { Input } from '../input/Input'\nimport { Popover } from '../popover/Popover'\nimport { DEFAULT_DATE_FORMAT } from './constants'\n\ndayjs.extend(customParseFormat)\n\nexport type DateInputProps = Omit<DayzedInterface, 'onDateSelected'> &\n CalendarTranslationProps & {\n initialDate?: Date\n dateFormat?: string\n disabled?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n revalidate?: () => Promise<boolean>\n onChange?: (value?: Date) => void\n }\n\nconst formatDateToString = (date?: Date, dateFormat = DEFAULT_DATE_FORMAT) =>\n date ? dayjs(date).format(dateFormat) : ''\n\nexport const DateInput = React.forwardRef<HTMLInputElement, DateInputProps>(\n (\n {\n initialDate,\n dateFormat = DEFAULT_DATE_FORMAT,\n firstDayOfWeek = 1,\n disabled,\n monthNames,\n weekdayNames,\n size = 'md',\n appearance,\n theme,\n labels,\n revalidate,\n onChange,\n minDate,\n maxDate,\n ...remainingProps\n },\n ref\n ) => {\n const [date, setDate] = React.useState(\n initialDate ? dayjs(initialDate).toDate() : undefined\n )\n\n const [inputElRef, setInputElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => inputElRef as HTMLInputElement)\n\n const dateString = formatDateToString(date, dateFormat)\n\n const handleInputChange = React.useCallback(\n (event) => {\n const newDateString = event.target.value\n const parsedInputDate = dayjs(newDateString, dateFormat)\n const newDate = parsedInputDate.isValid()\n ? parsedInputDate.toDate()\n : undefined\n setDate(newDate)\n onChange?.(newDate)\n },\n [dateFormat, onChange]\n )\n\n const handleCalendarChange = React.useCallback(\n (newDate) => {\n setDate(newDate)\n\n const mirrorChangeToInputElement = () => {\n if (!inputElRef) return\n\n // Call the `set` function on the input value directly to mirror the change.\n // Props to: https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call(\n inputElRef,\n formatDateToString(newDate, dateFormat)\n )\n const event = new Event('input', { bubbles: true })\n inputElRef.dispatchEvent(event)\n }\n mirrorChangeToInputElement()\n },\n [dateFormat, inputElRef]\n )\n\n const updatedLabels = {\n ...DEFAULT_LABELS,\n ...labels\n }\n\n const [calendarOpen, setCalendarOpen] = React.useState(false)\n\n const refDateToday = React.useRef<HTMLButtonElement>(null)\n const refDateSelected = React.useRef<HTMLButtonElement>(null)\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n return (\n <div className=\"relative h-max\">\n <Input\n name=\"date\"\n disabled={disabled}\n size={size}\n appearance={appearance}\n theme={theme}\n {...(remainingProps as React.ComponentProps<typeof Input>)}\n onChange={handleInputChange}\n ref={setInputElRef}\n defaultValue={dateString}\n />\n <Popover modal open={calendarOpen} onOpenChange={setCalendarOpen}>\n <Popover.Trigger asChild>\n <ActionIcon\n disabled={disabled}\n label={updatedLabels.open}\n size={iconSize}\n theme=\"neutral\"\n hasTooltip={false}\n className=\"absolute top-1/2 right-0 -translate-y-1/2\"\n >\n <Icon is={CalendarEvent} />\n </ActionIcon>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side=\"bottom\"\n align=\"end\"\n showCloseButton={false}\n onOpenAutoFocus={(e) => {\n e.preventDefault()\n if (date) {\n refDateSelected.current?.focus()\n } else {\n refDateToday.current?.focus()\n }\n }}\n className=\"z-1147483646 pr-6\"\n >\n <Calendar\n date={date || new Date()}\n selected={date}\n onDateSelected={async (date) => {\n setCalendarOpen(false)\n await handleCalendarChange(date.date)\n if (revalidate) revalidate()\n }}\n setYear={async (date) => {\n await handleCalendarChange(date)\n if (revalidate) revalidate()\n }}\n minDate={minDate}\n maxDate={maxDate}\n refDateToday={refDateToday}\n refDateSelected={refDateSelected}\n firstDayOfWeek={firstDayOfWeek}\n monthNames={monthNames}\n weekdayNames={weekdayNames}\n labels={updatedLabels}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover>\n </div>\n )\n }\n)\n\nDateInput.displayName = 'DateInput'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { DateInput, DateInputProps } from '~/components/date-input/DateInput'\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\n\ntype DateFieldProps = DateInputProps & FieldElementWrapperProps\n\nexport const DateField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...remainingProps\n}: DateFieldProps) => {\n const { register, trigger } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <DateInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...remainingProps}\n revalidate={trigger}\n />\n </FieldWrapper>\n )\n}\n\nDateField.displayName = 'DateField'\n","import { styled } from '~/styled'\n\nexport const DialogActionBar = styled('div', {\n base: [\n 'border-t',\n 'border-grey-300',\n 'p-4',\n 'flex',\n 'gap-4',\n 'shadow-[0_-6px_6px_-1px_rgba(51,51,51,0.05)]'\n ]\n})\n","import { styled } from '~/styled'\n\nexport const DialogBackground = styled('div', {\n base: ['w-screen', 'h-screen']\n})\n","import { Close } from '@radix-ui/react-dialog'\n\nexport const DialogClose = Close\n","export const backdropOverlay = [\n 'bg-alpha-600',\n 'fixed',\n 'inset-0',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n]\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Close, Content, Overlay, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { backdropOverlay } from '~/utilities/style/backdrop-overlay'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { DialogBackground } from './DialogBackground'\n\nconst modalOverlayId = 'modal_overlay'\n\nconst StyledDialogOverlay = styled(Overlay, {\n base: backdropOverlay\n})\n\nconst StyledDialogContent = styled(\n Content,\n {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'h-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'overflow-y-auto',\n 'rounded-md',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'z-1147483646',\n 'focus:outline-none',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n xs: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-95'\n ],\n sm: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-120'\n ],\n md: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-150'\n ],\n lg: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-200'\n ],\n xl: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-275'\n ],\n fullscreen: [\n 'rounded-none',\n 'w-screen',\n 'h-screen',\n 'max-w-screen',\n 'max-h-screen',\n 'supports-svh:h-svh',\n 'supports-svh:max-h-svh'\n ]\n },\n layout: {\n panel: ['flex', 'flex-col', 'p-0']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype DialogContentProps = React.ComponentProps<typeof StyledDialogContent> & {\n closeDialogText?: string\n showCloseButton?: boolean\n}\n\nexport const DialogContent = ({\n size = 'sm',\n children,\n closeDialogText = 'Close dialog',\n showCloseButton = true,\n ...remainingProps\n}: DialogContentProps) => (\n <Portal>\n <StyledDialogOverlay id={modalOverlayId}>\n {React.Children.map(\n children,\n (child?: React.ReactElement<unknown>) =>\n child?.type === DialogBackground && child\n )}\n <StyledDialogContent\n size={size}\n aria-label=\"Dialog\"\n onPointerDownOutside={(event) => {\n const element = event.target as HTMLElement\n if (element?.id !== modalOverlayId) {\n event.preventDefault()\n }\n }}\n {...remainingProps}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closeDialogText}\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n className=\"absolute top-4 right-4 size-12\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {React.Children.map(\n children,\n (child?: React.ReactElement<unknown>) =>\n child?.type !== DialogBackground && child\n )}\n </StyledDialogContent>\n </StyledDialogOverlay>\n </Portal>\n)\n","import { styled } from '~/styled'\n\nexport const DialogFooter = styled('footer', {\n base: ['flex', 'justify-end', 'gap-3', 'pt-4']\n})\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Heading } from '../heading/Heading'\n\nexport const DialogHeading = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Heading>) => (\n <Heading\n size=\"sm\"\n {...rest}\n className={cn(\n 'border-b',\n 'border-b-grey-200',\n 'pb-8',\n 'pt-0',\n 'px-8',\n 'mb-8',\n '-mx-8',\n 'box-content',\n className\n )}\n />\n)\n","import { styled } from '~/styled'\n\nexport const DialogNavigationBar = styled('div', {\n base: [\n 'flex',\n 'justify-between',\n 'items-center',\n 'border-b',\n 'border-grey-300',\n 'p-4'\n ]\n})\n","import { styled } from '~/styled'\n\nexport const DialogScrollableContent = styled('div', {\n base: ['overflow-scroll', 'flex-1', 'p-4']\n})\n","import { Description, Root, Title, Trigger } from '@radix-ui/react-dialog'\n\nimport { DialogActionBar } from './DialogActionBar'\nimport { DialogBackground } from './DialogBackground'\nimport { DialogClose } from './DialogClose'\nimport { DialogContent } from './DialogContent'\nimport { DialogFooter } from './DialogFooter'\nimport { DialogHeading } from './DialogHeading'\nimport { DialogNavigationBar } from './DialogNavigationBar'\nimport { DialogScrollableContent } from './DialogScrollableContent'\n\nexport const Dialog = Object.assign(Root, {\n ActionBar: DialogActionBar,\n Background: DialogBackground,\n Close: DialogClose,\n Content: DialogContent,\n Heading: DialogHeading,\n Footer: DialogFooter,\n NavigationBar: DialogNavigationBar,\n ScrollableContent: DialogScrollableContent,\n\n Description: Description,\n Title: Title,\n Trigger: Trigger\n})\n\nDialog.displayName = 'Dialog'\n","import * as React from 'react'\n\nimport { StyledContent } from './DrawerContent'\n\ntype TDrawerProviderProps = {\n position?: React.ComponentProps<typeof StyledContent>['position']\n}\n\ntype TDrawerContext = TDrawerProviderProps\n\nexport const DrawerContext = React.createContext<TDrawerContext>({\n position: 'left'\n})\n\nexport const DrawerProvider = ({\n position = 'left',\n ...rest\n}: React.PropsWithChildren<TDrawerProviderProps>): React.JSX.Element => {\n const value = React.useMemo<TDrawerContext>(() => ({ position }), [position])\n return <DrawerContext.Provider value={value} {...rest} />\n}\n","import { Close } from '@atom-learning/icons'\nimport { Close as DialogClose } from '@radix-ui/react-dialog'\nimport React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const DrawerClose = (\n props: Omit<React.ComponentProps<typeof ActionIcon>, 'children'>\n) => (\n <DialogClose asChild>\n <ActionIcon\n theme=\"neutral\"\n appearance=\"simple\"\n size=\"md\"\n hasTooltip={false}\n {...props}\n >\n <Icon is={Close} />\n </ActionIcon>\n </DialogClose>\n)\n","import { Overlay } from '@radix-ui/react-dialog'\n\nimport { styled } from '~/styled'\nimport { backdropOverlay } from '~/utilities/style/backdrop-overlay'\n\nexport const DrawerOverlay = styled(Overlay, { base: backdropOverlay })\n","import { Content, Portal } from '@radix-ui/react-dialog'\nimport React from 'react'\n\nimport { ColorScheme } from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nimport { DrawerContext } from './Drawer.context'\nimport { DrawerOverlay } from './DrawerOverlay'\n\nexport const StyledContent = styled(Content, {\n base: [\n 'bg-(--base-1)',\n 'shadow-lg',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n position: {\n top: [\n '[--slide-direction-out-y:-100%]',\n 'top-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n right: [\n '[--slide-direction-out-x:100%]',\n 'right-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ],\n bottom: [\n '[--slide-direction-out-y:100%]',\n 'bottom-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n left: [\n '[--slide-direction-out-x:-100%]',\n 'left-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ]\n },\n size: {\n xs: ['[--drawer-content-width:240px]'],\n sm: ['[--drawer-content-width:256px]'],\n md: ['[--drawer-content-width:288px]'],\n lg: ['[--drawer-content-width:304px]'],\n xl: ['[--drawer-content-width:320px]'],\n '2xl': ['[--drawer-content-width:720px]'],\n '3xl': ['[--drawer-content-width:1000px]']\n }\n }\n})\n\nexport const DrawerContent = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledContent>) => {\n const { position } = React.useContext(DrawerContext)\n\n return (\n <Portal>\n <DrawerOverlay />\n <ColorScheme base=\"grey1\" accent=\"primary1\" asChild>\n <StyledContent size=\"lg\" position={position} {...rest} asChild>\n <div className=\"flex flex-col\">{children}</div>\n </StyledContent>\n </ColorScheme>\n </Portal>\n )\n}\n","import { styled } from '~/styled'\n\nexport const DrawerFooter = styled('div', {\n base: ['p-4', 'w-full', 'border-t', 'border-t-(--base-3)']\n})\n","import { styled } from '~/styled'\n\nexport const DrawerHeader = styled('div', {\n base: ['p-4', 'w-full', 'min-h-16', 'border-b', 'border-b-(--base-3)']\n})\n","import { styled } from '~/styled'\n\nexport const DrawerMain = styled('div', {\n base: ['p-4', 'w-full', 'grow', 'overflow-y-auto']\n})\n","import { Trigger } from '@radix-ui/react-dialog'\n\nexport const DrawerTrigger = Trigger\n","import { Root } from '@radix-ui/react-dialog'\nimport React from 'react'\n\nimport { DrawerProvider } from './Drawer.context'\nimport { DrawerClose } from './DrawerClose'\nimport { DrawerContent } from './DrawerContent'\nimport { DrawerFooter } from './DrawerFooter'\nimport { DrawerHeader } from './DrawerHeader'\nimport { DrawerMain } from './DrawerMain'\nimport { DrawerTrigger } from './DrawerTrigger'\n\ntype TDrawerProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof DrawerProvider>\n\nexport const Drawer = ({\n children,\n position,\n ...rest\n}: TDrawerProps): React.JSX.Element => {\n return (\n <DrawerProvider position={position}>\n <Root {...rest}>{children}</Root>\n </DrawerProvider>\n )\n}\n\nDrawer.Close = DrawerClose\nDrawer.Content = DrawerContent\nDrawer.Main = DrawerMain\nDrawer.Header = DrawerHeader\nDrawer.Footer = DrawerFooter\nDrawer.Trigger = DrawerTrigger\n","import { Content } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '~/styled'\n\nexport const DropdownMenuContent = styled(Content, {\n base: [\n 'bg-white',\n 'rounded-sm',\n 'shadow-sm',\n 'py-2',\n 'z-10',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ]\n})\n","import { Item } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '~/styled'\n\nexport const DropdownMenuItem = styled(Item, {\n base: [\n 'items-center',\n 'text-grey-1000',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-normal',\n 'relative',\n 'px-3',\n 'py-2',\n 'data-disabled:cursor-not-allowed',\n 'data-disabled:opacity-30',\n 'data-disabled:pointer-events-none',\n 'aria-[current=page]:before:absolute',\n 'aria-[current=page]:before:border-l-2',\n 'aria-[current=page]:before:border-l-current',\n \"aria-[current=page]:before:content-['']\",\n 'aria-[current=page]:before:h-6',\n 'aria-[current=page]:before:left-0',\n 'aria-[current=page]:before:outline-none',\n 'aria-[current=page]:before:scale-100',\n 'focus:before:absolute',\n 'focus:before:border-l-2',\n 'focus:before:border-l-current',\n \"focus:before:content-['']\",\n 'focus:before:h-6',\n 'focus:before:left-0',\n 'focus:before:outline-none',\n 'focus:before:scale-100',\n 'focus:outline-none',\n 'focus:text-primary-900',\n 'hover:underline'\n ]\n})\n","import { Label } from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Text } from '../text/Text'\n\ntype DropdownMenuLabelProps = React.ComponentProps<typeof Label>\n\nexport const DropdownMenuLabel = ({\n className,\n ...props\n}: DropdownMenuLabelProps) => (\n <Text\n as={Label}\n size=\"sm\"\n className={cn('px-3', 'py-2', 'text-text-subtle', className)}\n {...props}\n />\n)\n\nDropdownMenuLabel.displayName = 'DropdownMenuLabel'\n","import React from 'react'\n\nimport { styled } from '~/styled'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport { DropdownMenuItem } from './DropdownMenuItem'\n\nconst StyledLink = styled('a', {\n base: ['no-underline']\n})\n\nexport const DropdownMenuLinkItem = ({\n children,\n href,\n ...props\n}: React.ComponentProps<typeof DropdownMenuItem> & { href: string }) => (\n <DropdownMenuItem {...props} asChild>\n <StyledLink href={href} role=\"menuitem\" {...getExternalAnchorProps(href)}>\n {children}\n </StyledLink>\n </DropdownMenuItem>\n)\n","import { Separator } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '~/styled'\n\nexport const DropdownMenuSeparator = styled(Separator, {\n base: ['h-px', 'bg-grey-600', 'my-2']\n})\n","import { Trigger } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '~/styled'\n\nexport const DropdownMenuTrigger = styled(Trigger, {\n base: ['disabled:cursor-not-allowed', 'disabled:opacity-30']\n})\n","import {\n Group,\n Portal,\n Root as DropdownMenuRoot\n} from '@radix-ui/react-dropdown-menu'\nimport React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLabel } from './DropdownMenuLabel'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Group: Group,\n Item: DropdownMenuItem,\n Label: DropdownMenuLabel,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n","import { Upload } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { Icon } from '../icon/Icon'\n\nexport type FileInputProps = React.ComponentProps<typeof Button> & {\n onFileSelect: (selection: FileList | null) => void\n accept?: string\n multiple?: boolean\n}\n\nexport const FileInput = ({\n accept,\n children,\n multiple = false,\n onFileSelect,\n ...rest\n}: FileInputProps) => {\n const handleFileSelect = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { files } = event.target\n\n onFileSelect(files)\n }\n\n return (\n <Button as=\"label\" {...rest}>\n <Icon is={Upload} />\n {children}\n <input\n type=\"file\"\n onChange={handleFileSelect}\n accept={accept}\n multiple={multiple}\n hidden\n />\n </Button>\n )\n}\n\nFileInput.displayName = 'FileInput'\n","import { styled } from '~/styled'\n\nexport const Flex = styled(\n 'div',\n {\n base: ['flex'],\n variants: {\n direction: {\n row: ['flex-row'],\n 'row-reverse': ['flex-row-reverse'],\n column: ['flex-col'],\n 'column-reverse': ['flex-col-reverse'],\n inherit: ['direction-[inherit]'],\n initial: ['direction-[initial]'],\n revert: ['direction-[revert]'],\n 'revert-layer': ['direction-[revert-layer]'],\n unset: ['direction-[unset]']\n },\n wrap: {\n nowrap: ['flex-nowrap'],\n wrap: ['flex-wrap'],\n 'wrap-reverse': ['flex-wrap-reverse'],\n inherit: ['[flex-wrap:inherit]'],\n initial: ['[flex-wrap:initial]'],\n revert: ['[flex-wrap:revert]'],\n 'revert-layer': ['[flex-wrap:revert-layer]'],\n unset: ['[flex-wrap:unset]']\n },\n justify: {\n normal: ['justify-normal'],\n unsafe: ['[justify-content:unsafe]'],\n safe: ['[justify-content:safe]'],\n start: ['justify-start'],\n center: ['justify-center'],\n end: ['justify-end'],\n 'flex-start': ['justify-start'],\n 'flex-end': ['justify-end'],\n left: ['[justify-content:left]'],\n right: ['[justify-content:right]'],\n 'space-between': ['justify-between'],\n 'space-around': ['justify-around'],\n 'space-evenly': ['justify-evenly'],\n stretch: ['justify-stretch'],\n inherit: ['[justify-content:inherit]'],\n initial: ['[justify-content:initial]'],\n revert: ['[justify-content:revert]'],\n 'revert-layer': ['[justify-content:revert-layer]'],\n unset: ['[justify-content:unset]']\n },\n align: {\n normal: ['[align-items:normal]'],\n unsafe: ['[align-items:unsafe]'],\n safe: ['[align-items:safe]'],\n center: ['items-center'],\n start: ['items-start'],\n end: ['items-end'],\n 'self-start': ['[align-items:self-start]'],\n 'self-end': ['[align-items:self-end]'],\n 'flex-start': ['items-start'],\n 'flex-end': ['items-end'],\n baseline: ['items-baseline'],\n 'first baseline': ['[align-items:first baseline]'],\n 'last baseline': ['[align-items:last baseline]'],\n stretch: ['items-stretch'],\n inherit: ['[align-items:inherit]'],\n initial: ['[align-items:initial]'],\n revert: ['[align-items:revert]'],\n 'revert-layer': ['[align-items:revert-layer]'],\n unset: ['[align-items:unset]']\n },\n gap: {\n 0: ['gap-0.5'],\n 1: ['gap-1'],\n 2: ['gap-2'],\n 3: ['gap-3'],\n 4: ['gap-4'],\n 24: ['gap-6'],\n 5: ['gap-8'],\n 6: ['gap-10'],\n 7: ['gap-12'],\n 8: ['gap-16'],\n 9: ['gap-20']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nFlex.displayName = 'Flex'\n","import * as React from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Mode,\n SubmitErrorHandler,\n SubmitHandler,\n UseFormMethods\n} from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\n\nimport {\n type FormCustomContextType,\n FormCustomContext\n} from './useFormCustomContext'\n\ntype FormProps<TFormData extends FieldValues> = Omit<\n React.HTMLAttributes<HTMLFormElement>,\n 'onSubmit' | 'onError' | 'children'\n> & {\n defaultValues?: DefaultValues<TFormData>\n validationMode?: Mode\n onSubmit: SubmitHandler<TFormData>\n onError?: SubmitErrorHandler<TFormData>\n noValidate?: boolean\n children:\n | React.ReactNode\n | ((methods: UseFormMethods<TFormData>) => React.ReactNode)\n}\n\nexport const Form = <TFormData extends FieldValues>(\n props: FormProps<TFormData> & FormCustomContextType\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n appearance,\n theme,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n return (\n <FormProvider {...methods}>\n <FormCustomContext.Provider value={{ appearance, theme }}>\n <form\n aria-label=\"form\"\n onSubmit={methods.handleSubmit(onSubmit, onError)}\n {...rest}\n >\n {typeof children === 'function' ? children(methods) : children}\n </form>\n </FormCustomContext.Provider>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nconst GridContainer = styled(\n 'div',\n {\n base: ['grid'],\n variants: {\n gap: {\n 0: ['gap-0.5'],\n 1: ['gap-1'],\n 2: ['gap-2'],\n 3: ['gap-3'],\n 4: ['gap-4'],\n 24: ['gap-6'],\n 5: ['gap-8'],\n 6: ['gap-10'],\n 7: ['gap-12'],\n 8: ['gap-16'],\n 9: ['gap-20']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype GridProps = React.ComponentProps<typeof GridContainer> & {\n minItemSize?: string\n maxItemSize?: string\n}\n\nexport const Grid = ({\n className,\n style,\n gap = '2',\n minItemSize,\n maxItemSize = '1fr',\n ...remainingProps\n}: GridProps) => (\n <GridContainer\n {...remainingProps}\n style={{\n ...style,\n ...(minItemSize && { '--min-item-size': minItemSize }),\n ...(maxItemSize && { '--max-item-size': maxItemSize })\n }}\n gap={gap}\n className={cn(\n minItemSize && [\n 'grid-cols-[repeat(auto-fit,minmax(var(--min-item-size,0),var(--max-item-size,0)))]'\n ],\n className\n )}\n />\n)\n\nGrid.displayName = 'Grid'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport { Input, InputProps } from '~/components/input/Input'\n\ntype InputFieldProps = InputProps & FieldElementWrapperProps\n\nexport const InputField = ({\n className,\n label,\n name,\n validation,\n prompt,\n description,\n hideLabel,\n appearance,\n theme,\n ...remainingProps\n}: InputFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Input\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nInputField.displayName = 'InputField'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const StyledLi = styled('li', {\n base: ['last:mb-0', 'not-last:mb-2']\n})\n\nexport const StyledList = styled('ul', {\n base: ['list-inside', 'font-body'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n ordered: {\n true: [\n 'pl-4',\n 'list-decimal',\n '[&_>_li]:pl-1',\n '[&_>_li::marker]:font-medium',\n '[&_>_li::marker]:text-sm'\n ],\n false: ['pl-3', 'list-disc', '[&_>_li]:pl-2']\n },\n theme: {\n primary: ['marker:text-primary-800']\n }\n }\n})\n\ntype ListProps = React.ComponentProps<typeof StyledList> & {\n ordered?: boolean\n}\n\ntype ListType = ReturnType<\n typeof React.forwardRef<HTMLUListElement, ListProps>\n> & {\n Item: typeof StyledLi\n}\n\nexport const List = React.forwardRef<HTMLUListElement, ListProps>(\n (\n { size = 'md', noCapsize = true, ordered = false, ...remainingProps },\n ref\n ) => (\n <StyledList\n ref={ref}\n as={ordered ? 'ol' : 'ul'}\n ordered={ordered}\n size={size}\n noCapsize={noCapsize}\n {...remainingProps}\n />\n )\n) as ListType\n\nList.Item = StyledLi\n","import type { Code } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\ntype MarkdownCodeProps = {\n node: Code\n}\n\nconst StyledMarkdownCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-md',\n 'text-grey-1000',\n 'font-mono',\n 'text-sm/[1.4]',\n 'my-4',\n 'p-3'\n ]\n})\n\nexport const MarkdownCode = ({ node }: MarkdownCodeProps) => (\n <StyledMarkdownCode as=\"pre\">{node.value}</StyledMarkdownCode>\n)\n","import type { Content, Emphasis } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\ntype MarkdownEmphasisProps = {\n node: Emphasis\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const StyledMarkdownEmphasis = styled('em', {\n base: ['italic']\n})\n\nexport const MarkdownEmphasis = ({\n node,\n handleNode\n}: MarkdownEmphasisProps) => (\n <StyledMarkdownEmphasis>\n {node.children?.map(handleNode)}\n </StyledMarkdownEmphasis>\n)\n","import type { Content, Heading as HeadingType } from 'mdast'\nimport * as React from 'react'\n\nimport { Heading, HeadingProps } from '../../heading/Heading'\n\ntype MarkdownHeadingProps = {\n node: HeadingType\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nconst getHeadingProps = (depth: number): HeadingProps => {\n switch (depth) {\n case 1:\n return { size: 'xl', as: 'h1' }\n case 2:\n return { size: 'lg', as: 'h2' }\n case 3:\n return { size: 'md', as: 'h3' }\n case 4:\n return { size: 'sm', as: 'h4' }\n case 5:\n return { size: 'xs', as: 'h5' }\n default:\n return { size: 'xs', as: 'h6' }\n }\n}\n\nexport const MarkdownHeading = ({\n node,\n handleNode,\n ...rest\n}: MarkdownHeadingProps) => {\n const { as, size } = getHeadingProps(node.depth)\n\n return (\n <Heading as={as} size={size} {...rest}>\n {node.children?.map(handleNode)}\n </Heading>\n )\n}\n","import type { Image as ImageType } from 'mdast'\nimport * as React from 'react'\n\nimport { Image } from '../../image/Image'\n\ntype MarkdownImageProps = {\n node: ImageType\n className?: string\n}\n\nexport const MarkdownImage = ({ node, className }: MarkdownImageProps) => (\n <Image src={node.url} alt={node.alt ?? undefined} className={className} />\n)\n","import type { InlineCode } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\ntype MarkdownInlineCodeProps = {\n node: InlineCode\n}\n\nconst StyledMarkdownInlineCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-sm',\n 'text-grey-1000',\n 'inline-block',\n 'font-mono',\n 'text-[85%]',\n 'px-1',\n 'py-0.5'\n ]\n})\n\nexport const MarkdownInlineCode = ({ node }: MarkdownInlineCodeProps) => (\n <StyledMarkdownInlineCode as=\"code\">{node.value}</StyledMarkdownInlineCode>\n)\n","import type { Content, Link as LinkType } from 'mdast'\nimport * as React from 'react'\n\nimport { Link } from '../../link/Link'\n\ntype MarkdownLinkProps = {\n node: LinkType\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const MarkdownLink = ({ node, handleNode }: MarkdownLinkProps) => (\n <Link title={node.title ?? undefined} href={node.url}>\n {node.children?.map(handleNode)}\n </Link>\n)\n","import type { Content, List as ListType } from 'mdast'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { List } from '../../list/List'\n\ntype MarkdownListProps = {\n node: ListType\n handleNode: (node: Content) => React.ReactElement<unknown>\n className?: string\n}\n\nexport const MarkdownList = ({\n node,\n handleNode,\n className\n}: MarkdownListProps) => (\n <List\n ordered={node.ordered || undefined}\n className={cn(\n '[&_p]:inline',\n '[&_p]:before:hidden',\n '[&_p]:after:hidden',\n className\n )}\n >\n {node.children?.map(handleNode)}\n </List>\n)\n","import type { Content, ListItem } from 'mdast'\nimport * as React from 'react'\n\nimport { List } from '../../list/List'\n\ntype MarkdownListItemProps = {\n node: ListItem\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const MarkdownListItem = ({\n node,\n handleNode\n}: MarkdownListItemProps) => (\n <List.Item>{node.children?.map(handleNode)}</List.Item>\n)\n","import type { Content, Paragraph } from 'mdast'\nimport * as React from 'react'\n\nimport { Text } from '../../text/Text'\n\ntype MarkdownParagraphProps = {\n node: Paragraph\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const MarkdownParagraph = ({\n node,\n handleNode,\n ...rest\n}: MarkdownParagraphProps) => (\n <Text {...rest}>{node.children?.map(handleNode)}</Text>\n)\n","import type { Content, Strong } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\ntype MarkdownStrongProps = {\n node: Strong\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nconst StyledMarkdownStrong = styled('strong', {\n base: ['font-semibold']\n})\n\nexport const MarkdownStrong = ({ node, handleNode }: MarkdownStrongProps) => (\n <StyledMarkdownStrong>{node.children?.map(handleNode)}</StyledMarkdownStrong>\n)\n","import type { Text as TextType } from 'mdast'\nimport * as React from 'react'\n\ntype MarkdownTextProps = {\n node: TextType\n}\n\nexport const MarkdownText = ({ node }: MarkdownTextProps): React.ReactNode =>\n node.value\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Divider } from '../../divider/Divider'\n\ntype MarkdownThematicBreakProps = {\n className?: string\n}\n\nexport const MarkdownThematicBreak = ({\n className\n}: MarkdownThematicBreakProps) => (\n <Divider className={cn('w-full', className)} />\n)\n","import directive from 'mdast-util-directive'\nimport fromMarkdown from 'mdast-util-from-markdown'\nimport syntax from 'micromark-extension-directive'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { MarkdownCode } from './components/MarkdownCode'\nimport { MarkdownEmphasis } from './components/MarkdownEmphasis'\nimport { MarkdownHeading } from './components/MarkdownHeading'\nimport { MarkdownImage } from './components/MarkdownImage'\nimport { MarkdownInlineCode } from './components/MarkdownInlineCode'\nimport { MarkdownLink } from './components/MarkdownLink'\nimport { MarkdownList } from './components/MarkdownList'\nimport { MarkdownListItem } from './components/MarkdownListItem'\nimport { MarkdownParagraph } from './components/MarkdownParagraph'\nimport { MarkdownStrong } from './components/MarkdownStrong'\nimport { MarkdownText } from './components/MarkdownText'\nimport { MarkdownThematicBreak } from './components/MarkdownThematicBreak'\n\ntype HandleNode = (node) => React.JSX.Element | null\n\nconst StyledMarkdownContent = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-8',\n '[&>h1]:max-w-[65ch]',\n '[&>h2]:max-w-[65ch]',\n '[&>h3]:max-w-[65ch]',\n '[&>h4]:max-w-[65ch]',\n '[&>p]:max-w-[75ch]',\n '[&>ul]:max-w-[75ch]'\n ]\n})\n\ntype MarkdownContentProps = React.ComponentProps<\n typeof StyledMarkdownContent\n> & {\n content: string\n customComponents?: {\n [key: string]: (props: {\n node: any\n handleNode: HandleNode\n }) => React.JSX.Element\n }\n}\n\nconst defaultComponentsMap = {\n code: MarkdownCode,\n emphasis: MarkdownEmphasis,\n heading: MarkdownHeading,\n inlineCode: MarkdownInlineCode,\n image: MarkdownImage,\n link: MarkdownLink,\n list: MarkdownList,\n listItem: MarkdownListItem,\n paragraph: MarkdownParagraph,\n strong: MarkdownStrong,\n text: MarkdownText,\n thematicBreak: MarkdownThematicBreak\n}\n\nconst generateNodeKey = (node) => {\n if (node.position?.start) {\n const { line, column, offset } = node.position.start\n return `${node.type}${line}${column}${offset}`\n }\n\n return `${node.type}${+new Date()}`\n}\n\nexport const MarkdownContent = ({\n content,\n customComponents = {},\n className\n}: MarkdownContentProps) => {\n const AST = fromMarkdown(content, {\n extensions: [syntax()],\n mdastExtensions: [directive.fromMarkdown]\n })\n\n const componentsMap = {\n ...defaultComponentsMap,\n ...customComponents\n }\n\n const handleNode: HandleNode = (node) => {\n const MarkdownComponent = componentsMap[node.type]\n\n return MarkdownComponent ? (\n <MarkdownComponent\n key={generateNodeKey(node)}\n node={node}\n handleNode={handleNode}\n />\n ) : null\n }\n\n return (\n <StyledMarkdownContent className={className}>\n {AST.children.map(handleNode)}\n </StyledMarkdownContent>\n )\n}\n\nMarkdownContent.displayName = 'MarkdownContent'\n","const light = {\n '--text': 'var(--color-text-subtle)',\n '--text-hover': 'var(--color-grey-1000)',\n '--text-active': 'var(--color-grey-1000)',\n '--text-selected': 'var(--color-primary-800)',\n '--text-selected-hover': 'var(--color-primary-800)',\n '--text-selected-pressed': 'var(--color-primary-800)',\n '--text-selected-focus': 'var(--color-primary-800)',\n '--background': 'white',\n '--background-hover': 'var(--color-grey-100)',\n '--background-active': 'var(--color-grey-200)',\n '--background-selected': 'var(--color-primary-100)',\n '--background-selected-hover': 'var(--color-grey-100)',\n '--background-selected-pressed': 'var(--color-grey-200)',\n '--item-text-selected': 'var(--color-grey-900)',\n '--item-background-selected': 'var(--color-grey-900)',\n '--trigger-background-open': 'var(--color-grey-200)',\n '--dropdown-background': 'white'\n}\n\nexport const colorSchemes = {\n light\n}\n","import React from 'react'\n\ninterface NavigationMenuContextValue {\n onNodeUpdate: (\n trigger: HTMLButtonElement,\n itemValue: string\n ) => HTMLButtonElement\n}\n\nexport const NavigationMenuContext = React.createContext<\n NavigationMenuContextValue | undefined\n>(undefined)\n\nexport const useNavigationMenuContext = (): NavigationMenuContextValue => {\n const context = React.useContext(NavigationMenuContext)\n\n if (context === undefined) {\n throw new Error(\n 'useNavigationMenuContext must be used within a NavigationMenuContextProvider'\n )\n }\n\n return context\n}\n","/*\nUsed to block default radix hover to open menu behaviour\nProps: https://github.com/radix-ui/primitives/issues/1630\n*/\nexport const preventEvent = (\n event: React.PointerEvent | Event | React.SyntheticEvent\n): void => {\n const e = event as Event\n e.preventDefault()\n}\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/styled'\nimport { preventEvent } from '~/utilities/event/preventEvent'\n\nconst StyledContent = styled(NavigationMenuPrimitive.Content, {\n base: ['p-3', 'bg-(--dropdown-background)', 'mt-1', 'shadow-md', 'rounded-md']\n})\n\ntype NavigationMenuDropdownContentProps = React.ComponentProps<\n typeof StyledContent\n>\n\nexport const NavigationMenuDropdownContent = ({\n children,\n ...rest\n}: NavigationMenuDropdownContentProps) => (\n <StyledContent\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n {...rest}\n >\n <ul>{children}</ul>\n </StyledContent>\n)\n\nNavigationMenuDropdownContent.displayName = 'NavigationMenuDropdownContent'\n","export const navigationMenuBaseItemStyles = [\n 'relative',\n 'text-(--text)',\n 'outline-none',\n 'cursor-pointer',\n 'font-body',\n 'select-none',\n 'p-3',\n 'rounded-md',\n 'bg-(--background)',\n 'hover:bg-(--background-hover)',\n 'hover:text-(--text-hover)',\n 'active:bg-(--background-active)',\n 'active:text-(--text-active)',\n 'focus-visible:inset-shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-[30%]',\n 'disabled:text-(--text)'\n]\n\nexport const navigationMenuActiveItemStyles = [\n 'font-semibold',\n 'text-item-(--background-selected)',\n 'after:-translate-x-1/2',\n 'after:absolute',\n 'after:bg-item-(--background-selected)',\n 'after:block',\n 'after:bottom-0',\n 'after:h-0.5',\n 'after:left-1/2',\n 'after:rounded-md',\n 'after:translate-y-0',\n 'after:w-6'\n]\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\nimport { preventEvent } from '~/utilities/event/preventEvent'\n\nimport { Icon } from '../icon/Icon'\nimport {\n navigationMenuActiveItemStyles,\n navigationMenuBaseItemStyles\n} from './NavigationMenu.styles'\n\nconst StyledTrigger = styled(NavigationMenuPrimitive.Trigger, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'flex',\n 'items-center',\n 'rounded-md',\n 'justify-between',\n 'data-[state=open]:bg-(--trigger-background-open)'\n ],\n variants: {\n active: {\n true: navigationMenuActiveItemStyles\n }\n }\n})\n\nexport const NavigationMenuDropdownTrigger = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledTrigger>\n>(({ children, active, ...props }, forwardedRef) => (\n <StyledTrigger\n active={active}\n {...props}\n ref={forwardedRef}\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n >\n {children}\n <Icon\n is={ChevronDown}\n size=\"sm\"\n className={cn(\n 'ml-1',\n 'in-data-[state=open]:-rotate-180',\n 'motion-safe:duration-200',\n 'motion-safe:ease-in',\n 'motion-safe:transition-transform'\n )}\n />\n </StyledTrigger>\n))\n\nNavigationMenuDropdownTrigger.displayName = 'NavigationMenuDropdownTrigger'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React, { ComponentProps, ReactElement } from 'react'\n\nimport { useNavigationMenuContext } from './NavigationMenuContext'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\n\ntype NavigationMenuDropdownProps = {\n active?: boolean\n className?: string\n id: string\n} & React.HTMLProps<HTMLButtonElement>\n\ntype DropdownTriggerProps = ComponentProps<typeof NavigationMenuDropdownTrigger>\n\nexport const NavigationMenuDropdown = ({\n children,\n id,\n ...props\n}: NavigationMenuDropdownProps) => {\n const { onNodeUpdate } = useNavigationMenuContext()\n\n return (\n <NavigationMenuPrimitive.Item value={id}>\n {React.Children.map(children, (child) => {\n const isTrigger =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownTrigger\n const isContent =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownContent\n\n if (!isTrigger && !isContent) {\n throw new Error(\n 'Only NavigationMenu.Trigger and NavigationMenu.Content can be the passed as a \"children\" of NavigationMenu.Dropdown'\n )\n }\n return isTrigger\n ? React.cloneElement(\n child as ReactElement<DropdownTriggerProps>,\n {\n ...props,\n ref: (node: HTMLButtonElement) => {\n onNodeUpdate(node, id)\n }\n } as React.PropsWithRef<DropdownTriggerProps>\n )\n : child\n })}\n </NavigationMenuPrimitive.Item>\n )\n}\n\nNavigationMenuDropdown.displayName = 'NavigationMenuDropdown'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/styled'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport { navigationMenuBaseItemStyles } from './NavigationMenu.styles'\n\nconst DisabledButton = styled('button', {\n base: [\n ...navigationMenuBaseItemStyles,\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-30',\n 'disabled:text-text'\n ]\n})\n\nconst ListItem = NavigationMenuPrimitive.Item\n\nconst StyledLink = styled(NavigationMenuPrimitive.Link, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'block',\n 'no-underline',\n 'leading-none'\n ],\n variants: {\n elementType: {\n dropdownItem: [\n 'data-active:bg-background-selected',\n 'data-active:text-text-selected',\n 'data-active:hover:bg-background-selected-hover',\n 'data-active:hover:text-text-selected-hover',\n 'data-active:active:bg-background-selected-pressed',\n 'data-active:active:text-text-selected-pressed',\n 'data-active:focus-visible:shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'data-active:focus-visible:text-text-selected-focus'\n ],\n link: [\n 'data-active:font-semibold',\n 'data-active:text-item-(--background-selected)',\n 'data-active:after:-translate-x-1/2',\n 'data-active:after:absolute',\n 'data-active:after:bg-item-(--background-selected)',\n 'data-active:after:block',\n 'data-active:after:bottom-0',\n 'data-active:after:h-0.5',\n 'data-active:after:left-1/2',\n 'data-active:after:rounded-md',\n 'data-active:after:translate-y-0',\n 'data-active:after:w-6'\n ]\n }\n }\n})\n\nexport const NavigationMenuLink = React.forwardRef<\n HTMLAnchorElement,\n Omit<React.ComponentProps<typeof StyledLink>, 'elementType'> & {\n disabled?: boolean\n variant?: React.ComponentProps<typeof StyledLink>['elementType']\n }\n>(\n (\n { children, href, disabled, className, variant = 'link', ...props },\n forwardedRef\n ) => (\n <ListItem>\n {disabled ? (\n <DisabledButton disabled className={className}>\n {children}\n </DisabledButton>\n ) : (\n <StyledLink\n href={href}\n ref={forwardedRef as any}\n elementType={variant}\n className={className}\n {...getExternalAnchorProps(href)}\n {...props}\n >\n {children}\n </StyledLink>\n )}\n </ListItem>\n )\n)\n\nNavigationMenuLink.displayName = 'NavigationMenuLink'\n","import React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nexport const NavigationMenuDropdownItem = React.forwardRef<\n HTMLAnchorElement,\n React.PropsWithChildren<React.ComponentProps<typeof NavigationMenuLink>>\n>((props, forwardedRef) => {\n return (\n <NavigationMenuLink ref={forwardedRef} variant=\"dropdownItem\" {...props} />\n )\n})\n\nexport const NavigationMenuDropdownItemTitle = styled(Text, {\n base: ['text-grey-900', 'font-semibold']\n})\n\nNavigationMenuDropdownItem.displayName = 'NavigationMenuDropdownItem'\nNavigationMenuDropdownItemTitle.displayName = 'NavigationMenuDropdownItemTitle'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { colorSchemes as navigationMenuColorSchemes } from './NavigationMenu.colorscheme.config'\nimport { NavigationMenuContext } from './NavigationMenuContext'\nimport { NavigationMenuDropdown } from './NavigationMenuDropdown'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport {\n NavigationMenuDropdownItem,\n NavigationMenuDropdownItemTitle\n} from './NavigationMenuDropdownItem'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nconst StyledMenu = styled(NavigationMenuPrimitive.Root, {\n base: ['flex', 'justify-center', 'relative']\n})\n\nconst StyledList = styled(NavigationMenuPrimitive.List, {\n base: ['flex', 'justify-center', 'items-center', 'gap-1', 'list-none']\n})\n\nconst StyledViewport = styled(NavigationMenuPrimitive.Viewport, {\n base: ['z-2147483647']\n})\n\nconst ViewportPosition = styled('div', {\n base: ['absolute', 'left-0', 'top-full', 'w-full', 'flex', 'justify-center']\n})\n\nconst NavigationMenuComponent = ({\n children,\n className,\n ...props\n}: React.ComponentProps<typeof StyledMenu>) => {\n const [offset, setOffset] = React.useState<number | null | undefined>()\n const [activeItem, setActiveItem] = React.useState<string | undefined>()\n const [listWidth, setListWidth] = React.useState(0)\n const listRef = React.useRef<HTMLUListElement>(null)\n\n React.useLayoutEffect(() => {\n if (listRef.current) {\n setListWidth(listRef.current.offsetWidth)\n }\n }, [React.Children.toArray(children).length])\n\n React.useEffect(() => {\n let timer: ReturnType<typeof setTimeout>\n\n // Delay transitioning back to initial position\n // to allow enough time for fadeOut animation to complete\n if (activeItem === '') {\n timer = setTimeout(() => setOffset(null), 200)\n }\n\n return () => {\n if (timer !== null) {\n clearTimeout(timer)\n }\n }\n }, [activeItem])\n\n // https://github.com/radix-ui/primitives/issues/1462\n const onNodeUpdate = (trigger: HTMLButtonElement, itemValue: string) => {\n if (trigger && listWidth && activeItem === itemValue) {\n const listCenter = listWidth / 2\n\n const triggerOffsetRight =\n listWidth -\n trigger.offsetLeft -\n trigger.offsetWidth +\n trigger.offsetWidth / 2\n\n setOffset(Math.round(listCenter - triggerOffsetRight))\n }\n\n return trigger\n }\n\n return (\n <NavigationMenuContext.Provider value={{ onNodeUpdate }}>\n <StyledMenu\n className={cn(className)}\n style={navigationMenuColorSchemes['light']}\n onValueChange={setActiveItem}\n {...props}\n >\n <StyledList ref={listRef}>{children}</StyledList>\n <ViewportPosition>\n <StyledViewport\n style={{ '--navigation-menu-viewport-offset': `${offset || 0}px` }}\n className={cn([\n 'data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-fade-out',\n 'translate-x-(--navigation-menu-viewport-offset)'\n ])}\n />\n </ViewportPosition>\n </StyledMenu>\n </NavigationMenuContext.Provider>\n )\n}\n\nexport const NavigationMenu = Object.assign(NavigationMenuComponent, {\n Link: NavigationMenuLink,\n Dropdown: NavigationMenuDropdown,\n DropdownContent: NavigationMenuDropdownContent,\n DropdownItem: NavigationMenuDropdownItem,\n DropdownItemTitle: NavigationMenuDropdownItemTitle,\n DropdownTrigger: NavigationMenuDropdownTrigger\n})\n\nNavigationMenuComponent.displayName = 'NavigationMenu'\n","const light = {\n '--text': 'var(--foreground)',\n '--background': 'var(--base-1)',\n '--background-hover': 'var(--base-2)',\n '--background-active': 'var(--base-3)',\n '--text-selected': 'var(--accent-9)',\n '--background-selected': 'var(--accent-2)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import { Item } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { cn } from '~/styled'\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the `value` prop does nothing, so removing it from typescript\n */\ntype TNavigationMenuVerticalItemProps = Omit<\n React.ComponentProps<typeof Item>,\n 'value'\n>\n\nexport const NavigationMenuVerticalItem = (\n props: TNavigationMenuVerticalItemProps\n): React.JSX.Element => (\n <Item\n className={cn(\n '[ul_li_&]:[--navigation-menu-vertical-item-pl:--spacing(8)]',\n '[ul_li_&_&]:[--navigation-menu-vertical-item-pl:--spacing(12)]',\n '[ul_li_&_&_&]:[--navigation-menu-vertical-item-pl:--spacing(16)]'\n )}\n {...props}\n />\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { useCallbackRef } from '~/utilities/hooks/useCallbackRef'\n\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\n\ntype TNavigationMenuVerticalAccordionContextValue = {\n triggerRef?: React.MutableRefObject<HTMLElement | null>\n setTriggerRef?: (HTMLElement) => void\n}\nexport const NavigationMenuVerticalAccordionContext =\n React.createContext<TNavigationMenuVerticalAccordionContextValue>({})\nconst NavigationMenuVerticalAccordionProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n return (\n <NavigationMenuVerticalAccordionContext.Provider\n value={{ triggerRef, setTriggerRef }}\n >\n {children}\n </NavigationMenuVerticalAccordionContext.Provider>\n )\n}\n\ntype TNavigationMenuVerticalAccordionProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof NavigationMenuVerticalItem>\nexport const NavigationMenuVerticalAccordion = ({\n defaultOpen,\n open,\n onOpenChange,\n disabled,\n ...rest\n}: TNavigationMenuVerticalAccordionProps): React.JSX.Element => {\n const collapsibleProps = { defaultOpen, open, onOpenChange, disabled }\n return (\n <NavigationMenuVerticalAccordionProvider>\n <Root {...collapsibleProps} asChild>\n <NavigationMenuVerticalItem {...rest} />\n </Root>\n </NavigationMenuVerticalAccordionProvider>\n )\n}\n","import { List } from '@radix-ui/react-navigation-menu'\n\nimport { styled } from '~/styled'\n\nconst StyledList = styled(List, {\n base: [\n '[--navigation-menu-vertical-item-pl:--spacing(4)]',\n '*:not-first:mt-0.5'\n ]\n})\n\nexport const NavigationMenuVerticalList = StyledList\n","import { Content } from '@radix-ui/react-collapsible'\nimport React from 'react'\n\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\n\nconst StyledNavigationMenuVerticalAccordionContent = Content\n\ntype TNavigationMenuVerticalAccordionContentProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionContent\n> &\n React.ComponentProps<typeof NavigationMenuVerticalList>\n\nexport const NavigationMenuVerticalAccordionContent = ({\n children,\n ...rest\n}: TNavigationMenuVerticalAccordionContentProps): React.JSX.Element => {\n const { triggerRef } = React.useContext(\n NavigationMenuVerticalAccordionContext\n )\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <StyledNavigationMenuVerticalAccordionContent\n onKeyDown={handleOnKeydown}\n {...rest}\n >\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledNavigationMenuVerticalAccordionContent>\n )\n}\n","export const navigationMenuVerticalItemStyles = [\n '[--navigation-menu-vertical-item-font-weight:400]',\n 'data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]',\n 'border-none',\n 'outline-none',\n 'bg-none',\n 'decoration-[inherit]',\n 'cursor-pointer',\n 'rounded-md',\n 'flex',\n 'items-center',\n 'p-2',\n 'pl-(--navigation-menu-vertical-item-pl)',\n 'w-full',\n 'text-(--text)',\n 'bg-(--background)',\n 'disabled:cursor-not-allowed',\n '[text-decoration:unset]',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--background-active)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--background-hover)',\n 'data-active:bg-(--background-selected)',\n 'data-active:text-(--text-selected)',\n 'data-active:[--navigation-menu-vertical-item-font-weight:600]'\n]\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\n\nconst StyledNavigationMenuVerticalIcon = styled(Icon, {\n base: ['self-start']\n})\n\nexport const NavigationMenuVerticalIcon = (\n props: React.ComponentProps<typeof StyledNavigationMenuVerticalIcon>\n): React.JSX.Element => (\n <StyledNavigationMenuVerticalIcon size=\"md\" {...props} />\n)\n","import * as React from 'react'\n\nexport const SideBarContext = React.createContext<{\n isExpanded?: boolean\n}>({\n isExpanded: undefined\n})\n\nexport const useSidebarState = () => React.useContext(SideBarContext)\n","import React from 'react'\n\nimport { Text } from '~/components/text/Text'\nimport { styled } from '~/styled'\n\nimport { useSidebarState } from '../side-bar/SideBarContext'\n\nconst StyledNavigationMenuVerticalText = styled(Text, {\n base: [\n 'font-(--navigation-menu-vertical-item-font-weight)',\n 'w-max',\n 'max-w-40',\n 'text-left',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[opacity,translate]'\n ],\n variants: {\n isExpanded: {\n true: ['opacity-100', 'motion-safe:translate-0'],\n false: ['opacity-0', 'motion-safe:translate-x-2']\n }\n }\n})\n\ntype TStyledNavigationMenuVerticalTextProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalText\n>\n\nexport const NavigationMenuVerticalText = (\n props: TStyledNavigationMenuVerticalTextProps\n): React.JSX.Element => {\n const { isExpanded } = useSidebarState()\n\n return (\n <StyledNavigationMenuVerticalText\n size=\"md\"\n as=\"span\"\n {...props}\n isExpanded={isExpanded}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { cn } from '~/styled'\n\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\ntype TNavigationMenuVerticalItemContentProps = React.ComponentProps<'div'>\n\nexport const NavigationMenuVerticalItemContent = ({\n children,\n className,\n ...rest\n}: TNavigationMenuVerticalItemContentProps): React.JSX.Element => (\n <div className={cn('flex', 'gap-2', 'items-center', className)} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return (\n <NavigationMenuVerticalText>{child}</NavigationMenuVerticalText>\n )\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <NavigationMenuVerticalIcon {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport { Link } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\n\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalAccordionTrigger = styled(Trigger, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\nconst StyledIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180'\n ]\n})\n\ntype TNavigationMenuAccordionTriggerProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionTrigger\n>\n\nexport const NavigationMenuVerticalAccordionTrigger = ({\n children,\n ...rest\n}: TNavigationMenuAccordionTriggerProps) => {\n const { setTriggerRef } = React.useContext(\n NavigationMenuVerticalAccordionContext\n )\n\n return (\n <Link asChild>\n <StyledNavigationMenuVerticalAccordionTrigger size=\"lg\" {...rest} asChild>\n <button\n type=\"button\"\n className=\"flex items-center justify-between gap-3\"\n ref={setTriggerRef}\n >\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n <StyledIcon size=\"sm\" is={ChevronDown} />\n </button>\n </StyledNavigationMenuVerticalAccordionTrigger>\n </Link>\n )\n}\n","import { Link } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/styled'\nimport { preventEvent } from '~/utilities/event/preventEvent'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalLink = styled(Link, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\ntype NavigationMenuVerticalItemProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalLink\n>\n\nexport const NavigationMenuVerticalLink = ({\n as,\n href,\n children,\n ...rest\n}: NavigationMenuVerticalItemProps) => {\n const Component = (as || (href ? 'a' : 'button')) as React.ElementType\n const componentProps = as\n ? {}\n : href\n ? getExternalAnchorProps(href)\n : { type: 'button' }\n\n return (\n <NavigationMenuVerticalItem>\n <StyledNavigationMenuVerticalLink\n size=\"lg\"\n href={href}\n {...rest}\n {...componentProps}\n onSelect={preventEvent}\n asChild // ?: Can't use `as` for this as we lose `data-active` etc. attributes when we try to. Using `asChild` and `Component` as a workaround.\n >\n <Component>\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n </Component>\n </StyledNavigationMenuVerticalLink>\n </NavigationMenuVerticalItem>\n )\n}\n","import { Root } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled, Theme } from '~/styled'\n\nimport { colorSchemes as navigationMenuVerticalColorSchemes } from './NavigationMenuVertical.colorscheme.config'\nimport { NavigationMenuVerticalAccordion } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalAccordionContent } from './NavigationMenuVerticalAccordionContent'\nimport { NavigationMenuVerticalAccordionTrigger } from './NavigationMenuVerticalAccordionTrigger'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\nimport { NavigationMenuVerticalLink } from './NavigationMenuVerticalLink'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\nconst StyledRoot = styled(Root, {\n base: ['w-full']\n})\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the below `value` based props and `Trigger`/`Content`\n * animations do nothing, so removing them from typescript\n */\ntype TNavigationVerticalProps = Omit<\n React.ComponentProps<typeof StyledRoot>,\n | 'delayDuration'\n | 'skipDelayDuration'\n | 'defaultValue'\n | 'value'\n | 'onValueChange'\n>\n\nexport const NavigationMenuVertical = Object.assign(\n ({ children, ...rest }: TNavigationVerticalProps) => (\n <Theme theme={navigationMenuVerticalColorSchemes['light']}>\n <StyledRoot {...rest} orientation=\"vertical\">\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledRoot>\n </Theme>\n ),\n {\n Link: NavigationMenuVerticalLink,\n Accordion: NavigationMenuVerticalAccordion,\n AccordionContent: NavigationMenuVerticalAccordionContent,\n AccordionTrigger: NavigationMenuVerticalAccordionTrigger,\n Item: NavigationMenuVerticalItem,\n ItemContent: NavigationMenuVerticalItemContent,\n Icon: NavigationMenuVerticalIcon,\n Text: NavigationMenuVerticalText\n }\n)\n","import React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\n\nconst StyledBadge = styled(Badge, {\n base: [\n 'font-body',\n 'text-sm',\n 'flex-row',\n 'justify-center',\n 'absolute',\n 'top-0',\n 'right-0',\n 'translate-x-3',\n '-translate-y-1/2',\n 'rounded-full',\n 'h-6',\n 'min-w-6',\n 'text-center'\n ]\n})\n\ntype BadgeProps = React.ComponentProps<typeof Badge>\n\ntype NotificationBadgeProps = {\n value: number | string\n emphasis?: BadgeProps['emphasis']\n theme?: BadgeProps['theme']\n icon?: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const NotificationBadge = ({\n value,\n emphasis = 'bold',\n theme = 'primary',\n icon,\n children\n}: React.PropsWithChildren<NotificationBadgeProps>) => (\n <div className=\"relative\">\n {!!value && (\n <StyledBadge role=\"status\" emphasis={emphasis} theme={theme}>\n {icon && <Icon is={icon} role=\"img\" aria-hidden=\"false\" />}\n {value}\n </StyledBadge>\n )}\n {children}\n </div>\n)\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Tooltip } from '../tooltip/Tooltip'\n\nconst StyledStepperButton = styled(ActionIcon, {\n base: [\n 'rounded-md',\n 'z-1',\n 'h-full!',\n 'hover:[&_svg]:text-grey-800',\n 'hover:bg-grey-100',\n '[&_svg]:text-grey-700',\n 'active:[&_svg]:text-grey-900',\n 'active:bg-grey-200',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n fieldAppearance: {\n standard: ['bg-white', 'border-grey-800!'],\n modern: ['bg-grey-100', 'border-grey-100!', 'hover:bg-grey-200!']\n },\n fieldTheme: {\n white: [],\n grey: []\n },\n emphasis: {\n bold: [\n '[&_svg]:text-primary-700',\n 'hover:bg-primary-100!',\n 'hover:[&_svg]:text-primary-800!',\n 'active:bg-primary-200!',\n 'active:[&_svg]:text-primary-900!'\n ]\n }\n },\n compoundVariants: [\n {\n fieldAppearance: 'modern',\n fieldTheme: 'white',\n class: ['bg-white']\n },\n {\n fieldAppearance: 'standard',\n emphasis: 'bold',\n class: ['bg-white', 'border-primary-800!']\n },\n {\n fieldAppearance: 'modern',\n emphasis: 'bold',\n class: ['bg-white!', 'hover:bg-primary-100!']\n }\n ]\n})\n\ntype NumberInputStepperProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'children'\n> &\n Omit<React.ComponentProps<typeof StyledStepperButton>, 'children'> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n showTooltip?: boolean\n disabledTooltipContent?: string\n }\n\nexport const NumberInputStepper = React.forwardRef<\n HTMLButtonElement,\n NumberInputStepperProps\n>((props, forwardedRef) => {\n const {\n icon,\n disabledTooltipContent,\n showTooltip,\n fieldAppearance = 'standard',\n fieldTheme,\n ...rest\n } = props\n\n /**\n * Focus has been removed from the button\n * as the increment and decrement buttons should be keyboard accessible via arrow keys.\n * see MDN docs https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/spinbutton_role\n */\n return (\n <Tooltip>\n <Tooltip.Trigger asChild>\n <span className=\"z-1\" tabIndex={-1}>\n <StyledStepperButton\n hasTooltip={false}\n tabIndex={-1}\n appearance=\"outline\"\n fieldAppearance={fieldAppearance}\n fieldTheme={fieldTheme}\n ref={forwardedRef}\n {...rest}\n >\n <Icon is={icon} />\n </StyledStepperButton>\n </span>\n </Tooltip.Trigger>\n {showTooltip && (\n <Tooltip.Content>{disabledTooltipContent}</Tooltip.Content>\n )}\n </Tooltip>\n )\n})\n","import { Minus, Plus } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\nimport { getFieldIconSize } from '~/utilities/style/get-icon-size'\n\nimport { Input } from '../input/Input'\nimport { NumberInputStepper } from './NumberInputStepper'\n\nexport interface NumberInputProps {\n name: string\n min?: number\n max?: number\n step?: number\n value?: number\n defaultValue?: number\n disabled?: boolean\n readonly?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n emphasis?: 'bold'\n onValueChange?: (value: number) => void\n stepperButtonLabels?: { increment?: string; decrement?: string }\n disabledTooltipContent?: { increment?: string; decrement?: string }\n className?: string\n}\n\nconst NumberInputContainer = styled('div', {\n base: ['flex'],\n variants: {\n appearance: {\n standard: [],\n modern: ['gap-px']\n },\n emphasis: {\n bold: ['gap-0']\n }\n }\n})\n\nexport const NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = Number.MAX_SAFE_INTEGER,\n step = 1,\n disabled: isDisabled = false,\n readonly: isReadOnly = false,\n size = 'md',\n stepperButtonLabels: stepperButtonLabelsProp,\n disabledTooltipContent: disabledTooltipContentProp,\n className,\n appearance = 'standard',\n theme,\n emphasis,\n ...rest\n },\n ref\n ): React.JSX.Element => {\n const [internalValue, setInternalValue] = React.useState<number>(\n value || defaultValue\n )\n React.useEffect(() => {\n // Update the internal value to match what is passed in.\n if (typeof value !== 'undefined') setInternalValue(value)\n }, [value])\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n React.useImperativeHandle(ref, () => inputRef.current as HTMLInputElement)\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n const stepperButtonLabels = {\n increment: 'increment',\n decrement: 'decrement',\n ...stepperButtonLabelsProp\n }\n\n const disabledTooltipContent = {\n decrement: `Cannot enter values below ${min}`,\n increment: `Cannot enter values above ${max}`,\n ...disabledTooltipContentProp\n }\n\n const isAtMax = internalValue >= max\n const isAtMin = internalValue <= min\n\n const clamp = React.useCallback(\n (internalValue: number) => Math.min(Math.max(internalValue, min), max),\n [max, min]\n )\n\n const updateValue = React.useCallback(\n (newValue: number) => {\n onValueChange?.(newValue)\n setInternalValue(newValue)\n },\n [onValueChange]\n )\n\n const onInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const parsedValue = Number(event.target.value.replace(/\\D/g, ''))\n updateValue(parsedValue)\n },\n [updateValue]\n )\n\n const increment = React.useCallback(() => {\n if (isAtMax || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(internalValue) + step\n updateValue(clamp(newValue))\n }, [clamp, isAtMax, isReadOnly, step, updateValue, internalValue])\n\n const decrement = React.useCallback(() => {\n if (isAtMin || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(internalValue) - step\n updateValue(clamp(newValue))\n }, [clamp, isAtMin, isReadOnly, min, step, updateValue, internalValue])\n\n const onKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.nativeEvent.isComposing) return\n\n /**\n * Keyboard Accessibility\n *\n * We want to increase or decrease the input's value\n * based on if the user the arrow keys.\n *\n * @see https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-17\n */\n const eventKey = event.key\n\n const keyMap: Record<string, React.KeyboardEventHandler> = {\n ArrowUp: increment,\n ArrowRight: increment,\n ArrowDown: decrement,\n ArrowLeft: decrement,\n Home: () => updateValue(min),\n End: () => updateValue(max)\n }\n\n const action = keyMap[eventKey]\n\n if (action) {\n event.preventDefault()\n action(event)\n }\n },\n [increment, decrement, updateValue, min, max]\n )\n\n const hasError = internalValue < min || internalValue > max\n const {\n state: externalState,\n 'aria-invalid': externalAriaInvalid,\n ...restProps\n } = rest as { state?: 'error'; 'aria-invalid'?: boolean } & typeof rest\n\n const inputProps: React.ComponentProps<typeof Input> = {\n type: 'number',\n value: internalValue,\n ...restProps,\n onChange: onInputChange,\n onKeyDown,\n size,\n appearance,\n theme,\n state: externalState || (hasError ? 'error' : undefined),\n 'aria-invalid': externalAriaInvalid || hasError || undefined,\n className: cn(\n 'rounded-none',\n 'w-16',\n '[&_>_input]:text-center',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n emphasis === 'bold' && [\n 'rounded-1',\n '[&_>_input[aria-invalid=true]]:text-danger',\n 'focus-within:[&_>_input]:text-grey-1000'\n ],\n emphasis === 'bold' &&\n appearance === 'standard' && [\n 'border-none',\n '[&:has([aria-invalid=true])]:border-2',\n '[&:has([aria-invalid=true])]:border-danger',\n 'focus-within:border-2',\n 'focus-within:border-blue-800'\n ]\n ),\n ref: inputRef,\n readOnly: isReadOnly,\n disabled: isDisabled,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuenow': internalValue,\n role: 'spinbutton'\n }\n\n return (\n <NumberInputContainer\n appearance={appearance}\n emphasis={emphasis}\n className={className}\n >\n <NumberInputStepper\n onClick={decrement}\n icon={Minus}\n className={cn(\n emphasis !== 'bold' && ['border-r-none', 'rounded-r-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMin || isDisabled}\n showTooltip={isAtMin && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.decrement}\n label={stepperButtonLabels.decrement}\n />\n <Input {...inputProps} />\n <NumberInputStepper\n onClick={increment}\n icon={Plus}\n className={cn(\n emphasis !== 'bold' && ['border-l-none', 'rounded-l-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMax || isDisabled}\n showTooltip={isAtMax && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.increment}\n label={stepperButtonLabels.increment}\n />\n </NumberInputContainer>\n )\n }\n)\n\nNumberInput.displayName = 'NumberInput'\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { FieldWrapper } from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport { ValidationOptions } from '~/components/form/validation'\n\nimport type { NumberInputProps } from '../number-input/NumberInput'\nimport { NumberInput } from '../number-input/NumberInput'\n\nexport interface NumberInputFieldProps extends NumberInputProps {\n className?: string\n hideLabel?: boolean\n description?: string\n label: string\n name: string\n prompt?: { link: string; label: string }\n validation?: ValidationOptions\n}\n\nexport const NumberInputField = ({\n className,\n defaultValue = 0,\n hideLabel,\n value,\n prompt,\n description,\n label,\n name,\n validation,\n onValueChange,\n appearance,\n theme,\n ...remainingProps\n}: NumberInputFieldProps) => {\n const { control } = useFormContext()\n const context = useFormCustomContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n React.useEffect(() => {\n // Update the react-hook-form inner value to match what is passed in.\n if (typeof value !== 'undefined') onChange(value)\n }, [value])\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <NumberInput\n id={name}\n name={innerName}\n ref={ref}\n {...(error && { state: 'error', 'aria-invalid': true })}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n appearance={formAppearance}\n theme={formTheme}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nNumberInputField.displayName = 'NumberInputField'\n","import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledProgressBar = styled(\n Progress.Root,\n {\n base: [\n 'rounded-full',\n 'bg-grey-200',\n 'relative',\n 'overflow-hidden',\n 'w-full'\n ],\n variants: {\n size: {\n sm: ['h-1'],\n md: ['h-2']\n },\n theme: {\n primary: ['text-primary-800'],\n info: ['text-info'],\n success: ['text-success'],\n warning: ['text-warning'],\n danger: ['text-danger'],\n neutral: ['bg-grey-400', 'text-grey-800']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(Progress.Indicator, {\n base: [\n 'bg-current',\n 'rounded-full',\n 'box-border',\n 'h-full',\n 'absolute',\n 'transition-all',\n 'duration-300',\n 'ease-out'\n ]\n})\n\ntype ProgressBarProps = React.ComponentPropsWithoutRef<\n typeof StyledProgressBar\n> &\n (\n | { id: string; 'aria-label'?: string }\n | { 'aria-label': string; id?: string }\n )\n\nexport const ProgressBar = ({\n value,\n max = 100,\n size = 'md',\n theme = 'primary',\n ...remainingProps\n}: ProgressBarProps) => (\n <StyledProgressBar\n value={value}\n max={max}\n theme={theme}\n size={size}\n {...remainingProps}\n >\n <StyledIndicator\n className=\"w-full translate-x-(--progress)\"\n style={{\n '--progress': `-${100 - ((value || 0) / max) * 100}%`\n }}\n />\n </StyledProgressBar>\n)\n\nProgressBar.displayName = 'ProgressBar'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\n\nimport { styled } from '~/styled'\n\nexport const RadioButtonGroup = styled(RadioGroup.Root, {\n base: ['flex', 'flex-wrap'],\n variants: {\n direction: {\n row: ['*:not-last:mr-8', 'flex-row'],\n column: ['flex-col']\n }\n }\n})\n\nRadioButtonGroup.displayName = 'RadioButtonGroup'\n","import * as React from 'react'\n\nimport { InlineFieldWrapper } from '~/components/field-wrapper/InlineFieldWrapper'\nimport { ValidationOptions } from '~/components/form/validation'\nimport { RadioButton } from '~/components/radio-button/RadioButton'\n\ntype RadioFieldProps = {\n className?: string\n defaultChecked?: boolean\n error?: string\n label: string\n validation?: ValidationOptions\n} & React.ComponentProps<typeof RadioButton>\n\nexport const RadioField = ({\n className,\n label,\n value,\n ...remainingProps\n}: RadioFieldProps) => (\n <InlineFieldWrapper className={className} label={label}>\n <RadioButton value={value} {...remainingProps} />\n </InlineFieldWrapper>\n)\n\nRadioField.displayName = 'RadioField'\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { Description as FieldDescription } from '~/components/field-wrapper/FieldDescription'\nimport { FieldElementWrapperProps } from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { InlineMessage } from '~/components/inline-message/InlineMessage'\nimport { Label } from '~/components/label/Label'\nimport { RadioButtonGroup } from '~/components/radio-button/RadioButtonGroup'\nimport { styled } from '~/styled'\n\nimport { RadioField } from './RadioField'\n\nconst Fieldset = styled('fieldset', {\n base: ['border-0', 'p-0', 'm-0', 'min-w-0']\n})\n\ntype RadioButtonFieldProps = React.ComponentProps<typeof RadioButtonGroup> &\n FieldElementWrapperProps\n\nconst RadioButtonFieldComponent = ({\n children,\n className,\n direction = 'column',\n defaultValue,\n value,\n description,\n label,\n name,\n validation,\n onValueChange,\n ...remainingProps\n}: RadioButtonFieldProps) => {\n const { control } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n React.useEffect(() => {\n // Update the react-hook-form inner value to match what is passed in.\n if (typeof value !== 'undefined') onChange(value)\n }, [value])\n\n return (\n <Fieldset className={className}>\n <Label\n as=\"legend\"\n required={Boolean(validation?.required)}\n className=\"mb-3 p-0\"\n >\n {label}\n </Label>\n {description && (\n <FieldDescription className=\"mb-3\">{description}</FieldDescription>\n )}\n\n <RadioButtonGroup\n ref={ref}\n direction={direction}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n {...remainingProps}\n >\n {children}\n </RadioButtonGroup>\n\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </Fieldset>\n )\n}\n\nexport const RadioButtonField = Object.assign(RadioButtonFieldComponent, {\n Item: RadioField\n})\n\nRadioButtonFieldComponent.displayName = 'RadioButtonField'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledRadioCard = styled(RadioGroup.Item, {\n base: [\n 'items-center',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'rounded-sm',\n 'cursor-pointer',\n 'flex',\n 'text-left',\n 'data-[state=checked]:-outline-offset-2',\n 'data-[state=checked]:outline-2',\n 'data-[state=checked]:outline-primary-800',\n 'data-[state=checked]:outline-solid'\n ],\n variants: {\n align: {\n left: ['flex-row'],\n right: ['flex-row-reverse']\n },\n size: {\n md: ['px-4', 'py-3'],\n lg: ['px-8', 'py-4']\n },\n isFullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n }\n})\n\nconst RadioButton = styled('div', {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-900',\n 'rounded-full',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'in-data-[state=checked]:bg-primary-800',\n 'in-data-[state=checked]:border-primary-800'\n ],\n variants: {\n containerIsFullWidth: {\n true: [],\n false: []\n },\n align: {\n left: ['mr-4'],\n right: []\n }\n },\n compoundVariants: [\n {\n containerIsFullWidth: true,\n align: 'right',\n class: ['ml-auto']\n },\n {\n containerIsFullWidth: false,\n align: 'right',\n class: ['ml-4']\n }\n ]\n})\n\nconst Indicator = styled(RadioGroup.Indicator, {\n base: ['bg-white', 'rounded-full', 'absolute', 'size-1.5']\n})\n\ntype RadioCardProps = React.ComponentProps<typeof StyledRadioCard>\n\nexport const RadioCard = ({\n children,\n isFullWidth = false,\n size = 'md',\n align = 'left',\n ...rest\n}: RadioCardProps) => (\n <StyledRadioCard\n {...rest}\n align={align}\n isFullWidth={isFullWidth}\n size={size}\n >\n <RadioButton align={align} containerIsFullWidth={isFullWidth}>\n <Indicator />\n </RadioButton>\n <div>{children}</div>\n </StyledRadioCard>\n)\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\nimport type { Override } from '~/utilities/types'\n\nimport { RadioCard } from './RadioCard'\n\ntype RadioCardGroupProps = Override<\n React.ComponentProps<typeof RadioCard>,\n React.ComponentProps<typeof RadioGroup.Root>\n>\n\nexport const RadioCardGroup = ({\n className,\n children,\n size,\n isFullWidth,\n align,\n ...rest\n}: RadioCardGroupProps) => (\n <RadioGroup.Root {...rest}>\n <div className={cn('flex', 'flex-row', 'flex-wrap', 'gap-3', className)}>\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child?.type === RadioCard) {\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof RadioCard>>,\n { size, isFullWidth, align }\n )\n }\n return child\n })}\n </div>\n </RadioGroup.Root>\n)\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport {\n SearchInput,\n SearchInputProps\n} from '~/components/search-input/SearchInput'\n\ntype SearchFieldProps = SearchInputProps & FieldElementWrapperProps\n\nexport const SearchField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...remainingProps\n}: SearchFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <SearchInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nSearchField.displayName = 'SearchField'\n","import React from 'react'\n\nimport type { SectionMessageTheme } from './SectionMessage'\n\nexport type SectionMessageContextValue = {\n theme: SectionMessageTheme\n hasIcon: boolean\n setHasIcon: React.Dispatch<React.SetStateAction<boolean>>\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\nexport type SectionMessageProviderProps = {\n theme: SectionMessageTheme\n children: React.ReactNode\n}\n\nexport const SectionMessageContext =\n React.createContext<SectionMessageContextValue | null>(null)\n\nexport const SectionMessageProvider = ({\n theme = 'info',\n children\n}: SectionMessageProviderProps): React.JSX.Element => {\n const [hasIcon, setHasIcon] = React.useState(false)\n const [hasDismiss, setHasDismiss] = React.useState(false)\n\n const value = React.useMemo<SectionMessageContextValue>(\n () => ({ theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss }),\n [theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss]\n )\n\n return (\n <SectionMessageContext.Provider value={value}>\n {children}\n </SectionMessageContext.Provider>\n )\n}\n\nexport const useSectionMessageContext = (): SectionMessageContextValue => {\n const context = React.useContext(SectionMessageContext)\n\n if (!context) {\n throw new Error(\n 'useSectionMessageContext must be used within a SectionMessageProvider'\n )\n }\n\n return context\n}\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nexport const SectionMessageDescription = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Text>): React.JSX.Element => (\n <Text size=\"sm\" {...rest} className={cn('text-grey-900', className)} />\n)\n","import { Close } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Dismissible } from '../dismissible'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessageContext'\n\nexport const SectionMessageDismiss = ({\n label = 'Dismiss',\n className,\n ...rest\n}: React.ComponentProps<typeof ActionIcon>): React.JSX.Element => {\n const { setHasDismiss } = useSectionMessageContext()\n\n useEffect(() => {\n setHasDismiss(true)\n return () => setHasDismiss(false)\n }, [setHasDismiss])\n\n return (\n <Dismissible.Trigger asChild>\n <ActionIcon\n label={label}\n size=\"sm\"\n appearance=\"simple\"\n theme=\"neutral\"\n {...rest}\n className={cn('m-auto', 'absolute', 'top-2', 'right-2', className)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </Dismissible.Trigger>\n )\n}\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessageContext'\n\nconst themeIcons = {\n success: OkCircle,\n warning: Danger,\n error: Error,\n neutral: Info,\n info: Info\n}\n\ntype SectionMessageIconProps = Partial<React.ComponentProps<typeof Icon>>\n\nexport const SectionMessageIcon = ({\n className,\n is,\n ...rest\n}: SectionMessageIconProps): React.JSX.Element => {\n const { theme, setHasIcon } = useSectionMessageContext()\n\n useEffect(() => {\n setHasIcon(true)\n return () => setHasIcon(false)\n }, [setHasIcon])\n\n return (\n <Icon\n is={is || themeIcons[theme]}\n size=\"sm\"\n {...rest}\n className={cn(\n 'm-auto',\n 'absolute',\n 'left-4',\n 'top-4',\n 'text-current',\n className\n )}\n />\n )\n}\n","import React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nexport const SectionMessageContent = styled('div', {\n base: ['max-w-full', 'shrink-0', 'pt-0.5', '*:not-last:mb-2']\n})\n\nexport const SectionMessageActions = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => (\n <div className={cn('max-w-full', 'shrink-0', className)}>\n <div className=\"flex flex-wrap gap-3\" {...rest} />\n </div>\n)\n","import React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport const SectionMessageTitle = (\n props: React.ComponentProps<typeof Text>\n): React.JSX.Element => <Text size=\"md\" weight=\"bold\" {...props} />\n","import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Dismissible } from '../dismissible'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessageContext'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n base: [\n 'relative',\n 'rounded-md',\n 'flex',\n 'shrink-0',\n 'min-h-12',\n 'p-4',\n 'border',\n 'border-white'\n ],\n variants: {\n theme: {\n success: ['bg-success-light', 'text-success-dark'],\n warning: ['bg-warning-light', 'text-warning-text'],\n error: ['bg-danger-light', 'text-danger-dark'],\n neutral: ['bg-grey-100', 'text-grey-1000'],\n info: ['bg-info-light', 'text-info-dark']\n },\n hasIcon: {\n true: ['pl-10']\n },\n hasDismiss: {\n true: ['pr-12']\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage> & {\n className?: string\n}) => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <div className=\"flex grow justify-between gap-3\">{children}</div>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport type SectionMessageProps = React.ComponentProps<\n typeof SectionMessageRoot\n> & {\n theme?: SectionMessageTheme\n}\n\nexport const SectionMessage = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps) => (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n)\n\nSectionMessage.Title = SectionMessageTitle\nSectionMessage.Description = SectionMessageDescription\nSectionMessage.Icon = SectionMessageIcon\nSectionMessage.Dismiss = SectionMessageDismiss\nSectionMessage.Content = SectionMessageContent\nSectionMessage.Actions = SectionMessageActions\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { Override } from '~/utilities/types'\n\nconst StyledSelect = styled(\n 'select',\n {\n base: [\n 'bg-(image:--bg-chevron)',\n 'appearance-none',\n '[background-repeat:no-repeat,repeat-x]',\n 'rounded-md',\n 'text-grey-1000',\n 'block',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'w-full',\n 'hover:cursor-pointer',\n '-ms-expand:hidden',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n '*[[disabled]]:opacity-30',\n '*[[disabled]]:cursor-not-allowed'\n ],\n variants: {\n size: {\n sm: [\n 'bg-position-[right_--spacing(2)_top_50%,0_0]',\n 'bg-size-[18px_auto,100%]',\n 'text-sm',\n 'h-8',\n 'pl-2',\n 'pr-8'\n ],\n md: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-10',\n 'pl-3',\n 'pr-10'\n ],\n lg: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-12',\n 'pl-3',\n 'pr-10'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus:border-primary-800',\n 'focus:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus:outline-2',\n 'focus:outline-blue-800',\n 'focus:outline-offset-1',\n 'focus:outline-solid',\n 'focus:z-1'\n ]\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n },\n { enabledResponsiveVariants: true }\n)\n\nexport type SelectProps = Override<\n React.ComponentProps<typeof StyledSelect>,\n {\n as?: never\n placeholder?: string\n }\n // TODO: figure out why uncommenting this causes TS errors in\n // component declaration\n // & (\n // | { id: string; 'aria-label'?: string }\n // | { 'aria-label': string; id?: string }\n // )\n>\n\nexport const Select = React.forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n placeholder,\n children,\n size = 'md',\n appearance = 'standard',\n ...remainingProps\n },\n ref\n ) => {\n // Type assertion needed due to responsive variant size prop compatibility\n const props: React.ComponentProps<typeof StyledSelect> = {\n size,\n appearance,\n ref,\n ...remainingProps\n }\n\n if (\n [remainingProps.value, remainingProps.defaultValue].every(\n (value) => value === undefined\n )\n ) {\n props.defaultValue = ''\n }\n\n return (\n <StyledSelect {...props}>\n {placeholder && (\n <option disabled hidden value=\"\">\n {placeholder}\n </option>\n )}\n {children}\n </StyledSelect>\n )\n }\n)\n\nSelect.displayName = 'Select'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport { Select, SelectProps } from '~/components/select/Select'\n\ntype SelectFieldProps = SelectProps & FieldElementWrapperProps\n\nexport const SelectField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...remainingProps\n}: SelectFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Select\n name={name}\n id={name}\n appearance={formAppearance}\n theme={formTheme}\n {...remainingProps}\n ref={ref}\n {...(error && { state: 'error' })}\n >\n {children}\n </Select>\n </FieldWrapper>\n )\n}\n\nSelectField.displayName = 'SelectField'\n","import { ChevronDown, ChevronUp } from '@atom-learning/icons'\nimport * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\n\nconst Content = styled(RadixSelect.Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'z-10',\n 'overflow-hidden',\n 'will-change-transform',\n 'will-change-opacity',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n position: {\n popper: [\n 'max-h-(--radix-select-content-available-height)',\n 'min-w-(--radix-select-trigger-width)'\n ],\n 'item-aligned': []\n }\n }\n})\n\nconst Viewport = styled(RadixSelect.Viewport, {\n base: ['p-1', 'w-full'],\n variants: {\n position: {\n popper: ['h-(--radix-select-content-available-height)'],\n 'item-aligned': []\n }\n }\n})\n\nconst ScrollUpButton = styled(RadixSelect.ScrollUpButton, {\n base: ['flex', 'items-center', 'justify-center', 'h-6', 'cursor-default']\n})\n\nconst ScrollDownButton = styled(RadixSelect.ScrollDownButton, {\n base: ['flex', 'items-center', 'justify-center', 'h-6', 'cursor-default']\n})\n\ntype SelectMenuContentProps = React.ComponentPropsWithRef<\n typeof RadixSelect.Content\n>\n\nexport const SelectMenuContent = React.forwardRef<\n HTMLDivElement,\n SelectMenuContentProps\n>(({ children, position = 'popper', sideOffset = 4, ...props }, ref) => (\n <RadixSelect.Portal>\n <Content ref={ref} position={position} sideOffset={sideOffset} {...props}>\n <ScrollUpButton>\n <Icon is={ChevronUp} className=\"text-grey-700 size-4\" />\n </ScrollUpButton>\n <Viewport position={position}>{children}</Viewport>\n <ScrollDownButton>\n <Icon is={ChevronDown} className=\"text-grey-700 size-4\" />\n </ScrollDownButton>\n </Content>\n </RadixSelect.Portal>\n))\n\nSelectMenuContent.displayName = 'SelectMenuContent'\n","import * as React from 'react'\n\ntype SelectMenuContextValue = {\n size: 'sm' | 'md' | 'lg'\n theme: 'white' | 'grey'\n state?: 'error'\n}\n\nexport const SelectMenuContext = React.createContext<SelectMenuContextValue>({\n size: 'md',\n theme: 'grey'\n})\n\nexport const useSelectMenuContext = () => React.useContext(SelectMenuContext)\n","import { Ok } from '@atom-learning/icons'\nimport * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenuContext'\n\nconst Item = styled(RadixSelect.Item, {\n base: [\n 'relative',\n 'flex',\n 'items-center',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'cursor-pointer',\n 'rounded-sm',\n 'outline-none',\n 'data-disabled:cursor-not-allowed',\n 'data-disabled:opacity-30',\n 'data-disabled:pointer-events-none',\n 'data-highlighted:bg-grey-100',\n 'data-highlighted:outline-none'\n ],\n variants: {\n size: {\n sm: ['py-1.5', 'pl-7', 'pr-4', 'text-sm'],\n md: ['py-2', 'pl-8', 'pr-6'],\n lg: ['py-2', 'pl-8', 'pr-6']\n }\n }\n})\n\ntype SelectMenuItemProps = React.ComponentPropsWithRef<typeof RadixSelect.Item>\n\nexport const SelectMenuItem = React.forwardRef<\n HTMLDivElement,\n SelectMenuItemProps\n>(({ children, ...props }, ref) => {\n const { size } = useSelectMenuContext()\n\n return (\n <Item ref={ref} size={size} {...props}>\n <RadixSelect.ItemIndicator className=\"absolute left-2 inline-flex items-center\">\n <Icon is={Ok} className={size === 'sm' ? 'size-3' : 'size-4'} />\n </RadixSelect.ItemIndicator>\n <RadixSelect.ItemText>{children}</RadixSelect.ItemText>\n </Item>\n )\n})\n\nSelectMenuItem.displayName = 'SelectMenuItem'\n","import * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Text } from '../text/Text'\n\ntype SelectMenuLabelProps = React.ComponentProps<typeof RadixSelect.Label>\n\nexport const SelectMenuLabel = ({\n className,\n ...props\n}: SelectMenuLabelProps) => (\n <Text\n as={RadixSelect.Label}\n size=\"sm\"\n className={cn('p-2', 'mb-1', 'text-text-subtle', className)}\n {...props}\n />\n)\n\nSelectMenuLabel.displayName = 'SelectMenuLabel'\n","import * as RadixSelect from '@radix-ui/react-select'\n\nimport { styled } from '~/styled'\n\nexport const SelectMenuSeparator = styled(RadixSelect.Separator, {\n base: ['h-px', 'bg-grey-200', 'my-2', 'mx-1']\n})\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenuContext'\n\nconst Trigger = styled(RadixSelect.Trigger, {\n base: [\n 'appearance-none',\n 'rounded-md',\n 'block',\n 'w-full',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'text-grey-1000',\n 'text-left',\n 'relative',\n 'inline-flex',\n 'items-center',\n 'border-none',\n 'hover:cursor-pointer',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'focus:outline-2',\n 'focus:outline-blue-800',\n 'focus:outline-offset-1',\n 'focus:outline-solid',\n 'focus:z-1'\n ],\n variants: {\n size: {\n sm: ['h-8', 'pl-2', 'pr-8', 'text-sm'],\n md: ['h-10', 'pl-3', 'pr-10', 'text-md'],\n lg: ['h-12', 'pl-3', 'pr-10', 'text-md']\n },\n theme: {\n white: ['bg-white'],\n grey: ['bg-grey-100']\n },\n state: {\n error: ['bg-danger-light', 'focus:outline-danger']\n }\n }\n})\n\nconst TriggerIcon = styled(Icon, {\n base: [\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'pointer-events-none',\n 'text-grey-700'\n ],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-3', 'size-5'],\n lg: ['right-3', 'size-5']\n }\n }\n})\n\ntype SelectMenuTriggerProps = React.ComponentPropsWithRef<\n typeof RadixSelect.Trigger\n> & {\n placeholder?: string\n}\n\nexport const SelectMenuTrigger = React.forwardRef<\n HTMLButtonElement,\n SelectMenuTriggerProps\n>(({ placeholder, children, ...props }, ref) => {\n const { size, theme, state } = useSelectMenuContext()\n\n return (\n <Trigger ref={ref} size={size} theme={theme} state={state} {...props}>\n <RadixSelect.Value placeholder={placeholder}>\n {children}\n </RadixSelect.Value>\n <TriggerIcon is={ChevronDown} size={size} />\n </Trigger>\n )\n})\n\nSelectMenuTrigger.displayName = 'SelectMenuTrigger'\n","import * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { SelectMenuContent } from './SelectMenuContent'\nimport { SelectMenuContext } from './SelectMenuContext'\nimport { SelectMenuItem } from './SelectMenuItem'\nimport { SelectMenuLabel } from './SelectMenuLabel'\nimport { SelectMenuSeparator } from './SelectMenuSeparator'\nimport { SelectMenuTrigger } from './SelectMenuTrigger'\n\ntype SelectMenuProps = React.ComponentProps<typeof RadixSelect.Root> & {\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n state?: 'error'\n}\n\nconst SelectMenuRoot = ({\n size = 'md',\n theme = 'grey',\n state,\n children,\n ...props\n}: SelectMenuProps) => (\n <SelectMenuContext.Provider value={{ size, theme, state }}>\n <RadixSelect.Root {...props}>{children}</RadixSelect.Root>\n </SelectMenuContext.Provider>\n)\n\nexport const SelectMenu = Object.assign(SelectMenuRoot, {\n Trigger: SelectMenuTrigger,\n Content: SelectMenuContent,\n Item: SelectMenuItem,\n Group: RadixSelect.Group,\n Label: SelectMenuLabel,\n Separator: SelectMenuSeparator\n})\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport { SelectMenu } from '~/components/select-menu/SelectMenu'\n\ntype SelectMenuFieldProps = React.PropsWithChildren<\n FieldElementWrapperProps & {\n placeholder?: string\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n disabled?: boolean\n className?: string\n }\n>\n\nexport const SelectMenuField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n theme,\n size,\n placeholder,\n disabled,\n ...remainingProps\n}: SelectMenuFieldProps) => {\n const { control } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const formTheme = context?.theme ?? theme\n\n const {\n field: { ref, onChange, value }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: ''\n })\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n >\n <SelectMenu\n value={value}\n onValueChange={onChange}\n size={size}\n theme={formTheme}\n disabled={disabled}\n {...(error && { state: 'error' })}\n {...remainingProps}\n >\n <SelectMenu.Trigger\n ref={ref}\n placeholder={placeholder}\n aria-label={label}\n />\n <SelectMenu.Content>{children}</SelectMenu.Content>\n </SelectMenu>\n </FieldWrapper>\n )\n}\n\nSelectMenuField.displayName = 'SelectMenuField'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const SideBarHeader = styled('div', {\n base: ['border-b', 'border-b-(--border)', 'p-4', 'w-full']\n})\n\nexport const SideBarBody = styled('div', {\n base: ['grow', 'overflow-y-auto', 'overflow-x-hidden', 'p-4', 'w-full']\n})\n\nexport const SideBarFooter = styled('div', {\n base: ['border-t', 'border-t-(--border)', 'p-4', 'w-full']\n})\n\nconst StyledSideBarBrand = styled('a', {\n base: [\n 'items-end',\n 'text-text',\n 'flex',\n 'gap-4',\n 'no-underline',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n\nexport const SideBarBrand =\n StyledSideBarBrand as React.ForwardRefExoticComponent<\n React.ComponentPropsWithRef<'a'> & { as?: React.ElementType }\n >\n\nexport const SideBarBrandLogo = Image\n\nexport const SideBarBrandName = styled(Text, {\n base: ['text-text', 'whitespace-nowrap']\n})\n","import React from 'react'\nimport { useFocusWithin, useHover, useInteractOutside } from 'react-aria'\n\nimport { styled, Theme } from '~/styled'\nimport { cn } from '~/styled'\n\nimport {\n SideBarBody,\n SideBarBrand,\n SideBarBrandLogo,\n SideBarBrandName,\n SideBarFooter,\n SideBarHeader\n} from './SideBarComponents'\nimport { SideBarContext } from './SideBarContext'\n\nconst light = {\n '--background': 'white',\n '--text': 'var(--color-grey-800)',\n '--border': 'var(--color-grey-200)'\n}\n\nconst Root = styled('div', {\n base: ['sticky', 'z-1'],\n variants: {\n type: {\n static: [],\n expandable: ['w-22']\n }\n }\n})\n\nconst Content = styled('div', {\n base: [\n 'bg-(--background)',\n 'border-r',\n 'border-r-(--border)',\n 'shadow-[4px_0_4px_-2px_rgba(31,31,31,0)]',\n 'flex',\n 'flex-col',\n 'h-full',\n 'overflow-hidden',\n 'will-change-width',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[shadow,width]'\n ],\n variants: {\n type: {\n static: [],\n expandable: []\n },\n isExpanded: {\n true: ['w-[16rem]'],\n false: ['w-22']\n }\n },\n compoundVariants: [\n {\n isExpanded: true,\n type: 'expandable',\n class: ['shadow-[4px_0_4px_-2px_rgba(31,31,31,0.1)]']\n }\n ]\n})\n\nconst PointerBlocker = styled('div', {\n base: [\n 'bottom-0',\n 'left-0',\n 'absolute',\n 'right-0',\n 'top-0',\n 'transition-all'\n ],\n variants: {\n isVisible: {\n true: ['delay-0', 'visible'],\n false: ['delay-50', 'invisible']\n }\n }\n})\n\ntype SideBarProps = React.ComponentProps<typeof Root> & {\n className?: string\n offset?: number | string\n} & React.ComponentProps<typeof Theme>\n\nexport const SideBar = ({\n theme,\n className,\n children,\n type = 'expandable',\n offset = '0px',\n style,\n ...rest\n}: SideBarProps) => {\n const [isExpanded, setIsExpanded] = React.useState(type === 'static')\n const ref = React.useRef<HTMLDivElement>(null)\n\n useInteractOutside({\n ref,\n onInteractOutside: () => setIsExpanded(false)\n })\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => setIsExpanded(true),\n onBlurWithin: () => setIsExpanded(false)\n })\n const { hoverProps, isHovered } = useHover({\n onHoverStart: () => setIsExpanded(true),\n onHoverEnd: () => setIsExpanded(false)\n })\n const touchProps = {\n onTouchEnd: () => setIsExpanded(true)\n }\n\n const expandableProps =\n type === 'expandable'\n ? {\n ...focusWithinProps,\n ...hoverProps,\n ...touchProps,\n ref\n }\n : {}\n\n return (\n <SideBarContext.Provider value={{ isExpanded }}>\n <Theme theme={theme || light}>\n <Root\n {...rest}\n style={{ ...style, '--offset': offset }}\n type={type}\n className={cn(\n 'h-[calc(100svh-var(--offset))]',\n 'top-(--offset)',\n className\n )}\n >\n <Content {...expandableProps} isExpanded={isExpanded} type={type}>\n {children}\n {/**\n * When the SideBar is collapsed, ensure that the initial tap event\n * is used to expand the nav first before making the items available\n */}\n {type === 'expandable' && (\n <PointerBlocker isVisible={!isHovered && !isExpanded} />\n )}\n </Content>\n </Root>\n </Theme>\n </SideBarContext.Provider>\n )\n}\n\nSideBar.Brand = SideBarBrand\nSideBar.BrandLogo = SideBarBrandLogo\nSideBar.BrandName = SideBarBrandName\nSideBar.Header = SideBarHeader\nSideBar.Body = SideBarBody\nSideBar.Footer = SideBarFooter\n\nSideBar.displayName = 'SideBar'\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderStepsType = {\n steps?: { label: string; value: number }[]\n}\n\ntype SliderStepsProps = {\n min: number\n max: number\n} & SliderStepsType\n\nconst getPercentValue = (value: number, min: number, max: number): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nconst getTransformValue = (value: number, min: number, max: number): number => {\n const percentage = getPercentValue(value, min, max)\n\n if (percentage <= 10) return 0\n if (percentage >= 90) return 100\n return 50\n}\n\nexport const SliderSteps = ({ min, max, steps = [] }: SliderStepsProps) => {\n if (steps.length === 0) return null\n\n return (\n <div className=\"relative mt-3 h-3 w-full\">\n {steps.map((step) => (\n <Text\n as=\"span\"\n key={step.value}\n style={{\n '--left': `${getPercentValue(step.value, min, max)}%`,\n '--translate-x': `-${getTransformValue(step.value, min, max)}%`\n }}\n className=\"text-grey-700 absolute left-(--left) translate-x-(--translate-x)\"\n >\n {step.label}\n </Text>\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderValueType = {\n outputLabel?: (value: number | number[]) => string\n}\n\ntype SliderValueProps = SliderValueType & {\n value?: number[]\n}\n\nexport const SliderValue = ({\n value = [],\n outputLabel = (value) => `Current value is ${value}`\n}: SliderValueProps) => {\n return (\n <Text className=\"text-grey-700 mt-4 w-full\">\n {outputLabel(value.length === 1 ? value[0] : value)}\n </Text>\n )\n}\n","import { Range, Root, Thumb, Track } from '@radix-ui/react-slider'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { CSSWrapper } from '~/utilities/css-wrapper/CSSWrapper'\n\nimport { SliderSteps } from './SliderSteps'\nimport { SliderValue } from './SliderValue'\n\nconst StyledTrack = styled(Track, {\n base: [\n 'rounded-full',\n 'grow',\n 'relative',\n 'data-[orientation=horizontal]:h-1',\n 'data-[orientation=vertical]:w-1'\n ],\n variants: {\n theme: {\n light: ['bg-white'],\n tonal: ['bg-grey-600']\n }\n }\n})\n\nconst StyledSlider = styled(Root, {\n base: [\n 'items-center',\n 'flex',\n 'relative',\n 'touch-none',\n 'select-none',\n 'cursor-pointer',\n 'data-[orientation=horizontal]:h-4',\n 'data-[orientation=vertical]:flex-col',\n 'data-[orientation=vertical]:w-4',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledRange = styled(Range, {\n base: [\n 'bg-primary-800',\n 'rounded-full',\n 'h-full',\n 'absolute',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledThumb = styled(Thumb, {\n base: [\n 'bg-primary-900',\n 'rounded-full',\n 'block',\n 'size-4',\n 'hover:bg-primary-1000',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-900',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nexport type SliderProps = React.ComponentProps<typeof StyledSlider> &\n Pick<React.ComponentProps<typeof StyledTrack>, 'theme'>\n\ntype SliderType = ReturnType<\n typeof React.forwardRef<HTMLSpanElement, SliderProps>\n> & {\n Value: typeof SliderValue\n Steps: typeof SliderSteps\n}\n\nexport const Slider = React.forwardRef<HTMLSpanElement, SliderProps>(\n (\n {\n value,\n defaultValue,\n min = 0,\n max = 100,\n theme = 'tonal',\n className,\n children,\n ...remainingProps\n },\n ref\n ) => {\n const values = value || defaultValue\n return (\n <CSSWrapper className={className}>\n <StyledSlider\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n ref={ref}\n {...remainingProps}\n >\n <StyledTrack theme={theme}>\n <StyledRange />\n </StyledTrack>\n {values?.length &&\n values.map((_, i) => <StyledThumb key={`thumb${i}`} />)}\n </StyledSlider>\n {children}\n </CSSWrapper>\n )\n }\n) as SliderType\n\nSlider.Value = SliderValue\nSlider.Steps = SliderSteps\n\nSlider.displayName = 'Slider'\n","import React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { Slider, SliderProps } from '~/components/slider/Slider'\nimport { SliderStepsType } from '~/components/slider/SliderSteps'\n\nimport { SliderValueType } from '../slider/SliderValue'\n\ntype SliderFieldProps = SliderProps &\n SliderStepsType &\n SliderValueType &\n FieldElementWrapperProps\n\nexport const SliderField = ({\n className,\n hideLabel,\n label,\n name,\n defaultValue,\n value,\n validation,\n outputLabel,\n min = 0,\n max = 100,\n steps = [],\n ...remainingProps\n}: SliderFieldProps) => {\n const { control } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n\n React.useEffect(() => {\n // Update the react-hook-form inner value to match what is passed in.\n if (value?.length) onChange(value)\n }, [JSON.stringify(value)])\n\n return (\n <FieldWrapper\n className={className}\n fieldId={name}\n label={label}\n hideLabel={hideLabel}\n >\n <Slider\n ref={ref}\n name={innerName}\n onValueChange={onChange}\n value={innerValue}\n min={min}\n max={max}\n {...remainingProps}\n >\n <Slider.Steps min={min} max={max} steps={steps} />\n\n <Slider.Value value={innerValue} outputLabel={outputLabel} />\n </Slider>\n </FieldWrapper>\n )\n}\n\nSliderField.displayName = 'SliderField'\n","import { styled } from '~/styled'\n\nexport const SkeletonLoader = styled('div', {\n base: ['bg-grey-300', 'size-16', 'animate-shimmer']\n})\n\nSkeletonLoader.displayName = 'Skeleton'\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonHeading = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => <SkeletonLoader className={cn('w-64', 'h-6', 'rounded-xl', className)} />\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonButton = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => (\n <SkeletonLoader className={cn('w-[10rem]', 'h-8', 'rounded-sm', className)} />\n)\n","import React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype TTileProps = React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}\n\nexport const Tile = React.forwardRef<HTMLDivElement, TTileProps>(\n ({ children, borderRadius = 'lg', colorScheme = {}, ...rest }, ref) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n )\n)\n\nTile.displayName = 'Tile'\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTabs = ({\n numberOfTabs,\n className,\n tabClassName\n}: {\n numberOfTabs: number\n className?: string\n tabClassName?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', className)}>\n {Array.from({ length: numberOfTabs }, (_, index) => `tab_${index}`).map(\n (key) => (\n <SkeletonLoader\n key={key}\n className={cn('w-32', 'h-6', 'rounded-sm', tabClassName)}\n />\n )\n )}\n </Tile>\n)\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\n\nconst buildConicGradient = () => {\n const numberOfSegments = 5\n const gap = 4\n const segmentAngle = (360 - numberOfSegments * gap) / numberOfSegments\n const stops: string[] = []\n let current = 0\n\n Array.from({ length: numberOfSegments }).forEach(() => {\n stops.push(\n `var(--color-grey-300) ${current}deg ${current + segmentAngle}deg`\n )\n current += segmentAngle\n stops.push(`white ${current}deg ${current + gap}deg`)\n current += gap\n })\n\n return `conic-gradient(${stops.join(', ')})`\n}\n\nexport const SkeletonDoughnutChart = ({\n className\n}: {\n className?: string\n}) => (\n <Tile className={cn('p-6', 'size-60', className)}>\n <div\n className=\"animate-shimmer aspect-square w-full rounded-full [background-image:var(--gradient)] bg-clip-padding\"\n style={{ '--gradient': buildConicGradient() }}\n >\n <div className=\"mt-[20%] ml-[20%] size-[60%] rounded-full bg-white\" />\n </div>\n </Tile>\n)\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Table } from '../table/Table'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTable = ({\n numberOfColumns = 4,\n numberOfRows = 4,\n columnWidth,\n className\n}: {\n numberOfColumns?: number\n numberOfRows?: number\n columnWidth?: Record<number, string>\n className?: string\n}) => {\n return (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', 'relative', className)}>\n <Table size=\"md\">\n <Table.Header theme=\"white\">\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.HeaderCell key={columnIndex}>\n <SkeletonLoader\n style={{ '--width': columnWidth?.[columnIndex] || '100px' }}\n className=\"h-4 w-(--width) rounded-xl\"\n />\n </Table.HeaderCell>\n )\n )}\n </Table.Header>\n <Table.Body striped={false}>\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowIndex) => (\n <Table.Row key={rowIndex}>\n {Array.from(\n { length: numberOfColumns },\n (_, index) => index\n ).map((columnIndex) => (\n <Table.Cell key={columnIndex} className=\"border-none\">\n <SkeletonLoader\n style={{\n '--width': columnWidth?.[columnIndex] || '100px'\n }}\n className=\"bg-grey-200 h-4 w-(--width) rounded-xl\"\n />\n </Table.Cell>\n ))}\n </Table.Row>\n )\n )}\n </Table.Body>\n </Table>\n </Tile>\n )\n}\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\nimport { SkeletonButton } from './SkeletonButton'\nimport { SkeletonDoughnutChart } from './SkeletonDoughnutChart'\n\nexport const SkeletonCard = ({\n numberOfRows = 3,\n withChart,\n className\n}: {\n numberOfRows?: number\n withChart?: boolean\n className?: string\n}) => (\n <Tile\n className={cn(\n 'relative',\n 'w-full',\n 'flex-col',\n 'items-center',\n 'gap-6',\n 'p-6',\n className\n )}\n >\n <div className=\"align-center flex w-full gap-6\">\n {withChart && <SkeletonDoughnutChart />}\n <div className=\"flex grow flex-col gap-6\">\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowNumber) => (\n <SkeletonLoader\n key={rowNumber}\n className=\"bg-grey-200 h-10 w-full min-w-25 rounded-md\"\n />\n )\n )}\n </div>\n </div>\n <SkeletonButton />\n </Tile>\n)\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarHeight = (groupIndex: number, columnIndex: number) =>\n Math.round(90 + Math.abs(Math.sin(groupIndex + columnIndex + 1)) * 30)\n\nconst ColumnGroup = ({\n numberOfColumns,\n groupIndex\n}: {\n numberOfColumns: number\n groupIndex: number\n}) => (\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"flex items-end gap-2\">\n {Array.from({ length: numberOfColumns }, (_, i) => (\n <SkeletonLoader\n key={i}\n className=\"h-(--height) w-5 rounded-t-full rounded-b-none\"\n style={{\n '--height': `${getBarHeight(groupIndex, i)}px`\n }}\n />\n ))}\n </div>\n <SkeletonLoader className=\"h-2 w-14 rounded-full\" />\n </div>\n)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonColumnChart = ({\n numberOfLabels = 2,\n numberOfGroups = 7,\n numberOfColumns = 1,\n className\n}: {\n numberOfLabels?: number\n numberOfGroups?: number\n numberOfColumns?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n </div>\n <div className=\"flex items-end justify-between gap-2\">\n {Array.from({ length: numberOfGroups }, (_, i) => (\n <ColumnGroup key={i} numberOfColumns={numberOfColumns} groupIndex={i} />\n ))}\n </div>\n </Tile>\n)\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarWidth = (rowIndex: number) =>\n Math.round(40 + Math.abs(Math.sin(rowIndex + 1)) * 55)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonBarChart = ({\n numberOfLabels = 3,\n numberOfRows = 4,\n numberOfTicks = 4,\n className\n}: {\n numberOfLabels?: number\n numberOfRows?: number\n numberOfTicks?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n <div className=\"flex flex-col justify-between gap-4\">\n {Array.from({ length: numberOfRows }, (_, i) => (\n <div key={i} className=\"flex items-center gap-5\">\n <SkeletonLoader className=\"h-3 w-20 shrink-0 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader\n className=\"h-5 w-(--width) rounded-full\"\n style={{\n '--width': `${getBarWidth(i)}%`\n }}\n />\n </div>\n </div>\n ))}\n <div className=\"flex justify-between pl-24\">\n {Array.from({ length: numberOfTicks }, (_, i) => (\n <SkeletonLoader key={i} className=\"h-2 w-8 rounded-full\" />\n ))}\n </div>\n </div>\n </Tile>\n)\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonPanelList = ({ className }: { className?: string }) => (\n <Tile className={cn('px-6', 'flex-col', 'w-full', className)}>\n <div className=\"border-grey-100 flex flex-wrap items-center gap-4 border-b py-4 last:border-b-0\">\n <SkeletonLoader className=\"size-10 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader className=\"h-4 w-2/3 rounded-full\" />\n </div>\n <SkeletonLoader className=\"h-8 w-28 rounded-md\" />\n </div>\n </Tile>\n)\n","import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonSubjectList = ({ className }: { className?: string }) => (\n <Tile\n className={cn(\n 'p-2',\n 'flex-row',\n 'flex-wrap',\n 'items-center',\n 'justify-between',\n 'gap-4',\n 'w-full',\n className\n )}\n >\n <SkeletonLoader className=\"h-22 max-w-xl grow rounded-xl\" />\n <SkeletonLoader className=\"size-10 shrink-0 rounded-md\" />\n </Tile>\n)\n","export { SkeletonLoader as Loader } from './Skeleton'\nexport { SkeletonHeading as Heading } from './SkeletonHeading'\nexport { SkeletonButton as Button } from './SkeletonButton'\nexport { SkeletonTabs as Tabs } from './SkeletonTabs'\nexport { SkeletonDoughnutChart as DoughnutChart } from './SkeletonDoughnutChart'\nexport { SkeletonTable as Table } from './SkeletonTable'\nexport { SkeletonCard as Card } from './SkeletonCard'\nexport { SkeletonColumnChart as ColumnChart } from './SkeletonColumnChart'\nexport { SkeletonBarChart as BarChart } from './SkeletonBarChart'\nexport { SkeletonPanelList as PanelList } from './SkeletonPanelList'\nexport { SkeletonSubjectList as SubjectList } from './SkeletonSubjectList'\n","import { styled } from '~/styled'\n\n/**\n * A flexible flex spacer that expands along the major axis of its containing flex layout.\n * It renders a `div` by default, and takes up any available space.\n */\nexport const Spacer = styled('div', {\n base: ['flex-1', 'justify-self-stretch', 'self-stretch']\n})\n\nSpacer.displayName = 'Spacer'\n","import * as React from 'react'\n\nimport { Context, StepperProviderProps } from '../types'\n\nconst StepperContext = React.createContext<Context>({\n steps: [],\n goToPreviousStep: () => null,\n goToNextStep: () => null,\n goToStep: () => null,\n activeStep: 0,\n viewedSteps: [],\n allowSkip: false,\n direction: 'horizontal',\n hideLabels: false,\n completedSteps: [],\n showCompletedIcons: false\n})\n\nexport const StepperProvider = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction,\n steps,\n hideLabels,\n showCompletedIcons\n}: React.PropsWithChildren<StepperProviderProps>) => {\n const [activeStep, setActiveStep] = React.useState(0)\n\n const [viewedSteps, setviewedSteps] = React.useState<number[]>([0])\n const [completedSteps, setCompletedSteps] = React.useState<number[]>([])\n\n const isControlled = !stepCount\n\n React.useEffect(() => {\n setviewedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n\n onStepChange?.(activeStep)\n }, [activeStep, onStepChange])\n\n const goToNextStep = () => {\n const isCompleted = onComplete && activeStep === stepCount - 1\n const isNextStep = activeStep < stepCount - 1\n\n if (onComplete || isNextStep) {\n setCompletedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n }\n\n if (isCompleted) {\n return onComplete?.()\n }\n if (isNextStep) {\n return setActiveStep((current) => current + 1)\n }\n }\n\n const goToPreviousStep = () => {\n setActiveStep((current) => current - 1)\n }\n\n const goToStep = (index: number) => {\n setActiveStep(index)\n }\n\n return (\n <StepperContext.Provider\n value={{\n steps: steps || Array(stepCount).fill(''),\n goToPreviousStep: isControlled ? undefined : goToPreviousStep,\n goToNextStep: isControlled ? undefined : goToNextStep,\n goToStep: isControlled ? undefined : goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n }}\n >\n {children}\n </StepperContext.Provider>\n )\n}\n\nexport const useStepper = (): Context => {\n const context = React.useContext(StepperContext)\n if (!context)\n throw new Error(\n 'Ensure that you wrap any components with the root component Stepper'\n )\n\n return context\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './stepper-context/StepperContext'\nimport { IStepperNavigateProps } from './types'\n\nexport const StepperStepBack = ({\n label,\n children,\n ...rest\n}: IStepperNavigateProps & React.ComponentProps<typeof Button>) => {\n const { activeStep, goToPreviousStep } = useStepper()\n return (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n {...rest}\n disabled={activeStep === 0}\n onClick={goToPreviousStep}\n >\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './stepper-context/StepperContext'\nimport { IStepperNavigateProps } from './types'\n\nexport const StepperStepForward = ({\n label,\n children,\n onClick,\n ...rest\n}: IStepperNavigateProps & Partial<React.ComponentProps<typeof Button>>) => {\n const { goToNextStep, activeStep } = useStepper()\n\n const handleClick = () => {\n if (onClick) {\n return onClick(() => goToNextStep?.())\n }\n goToNextStep?.()\n }\n\n return (\n <Button size=\"sm\" {...rest} onClick={handleClick} className=\"ml-auto\">\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import { styled } from '~/styled'\n\nexport const StepperStepBullet = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'p-2',\n 'justify-center',\n 'items-center',\n 'size-8',\n 'rounded-[50%]',\n 'border-0',\n 'bg-grey-200',\n 'z-1',\n 'flex-none'\n ],\n variants: {\n status: {\n default: ['bg-grey-200', 'text-grey-700'],\n active: ['bg-white', 'border-2', 'border-current', 'text-primary-900'],\n viewed: ['bg-white', 'border-2', 'border-grey-600', 'text-grey-1000'],\n completed: ['bg-primary-800', 'text-white'],\n reviewed: ['bg-primary-900', 'text-white'],\n success: ['bg-success', 'text-white']\n }\n }\n})\n","import { styled } from '~/styled'\n\nexport const StepperStepContainer = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'font-body',\n 'font-semibold',\n 'text-md',\n 'items-center',\n 'not-last:after:absolute',\n \"not-last:after:content-['']\",\n 'focus-visible:outline-none'\n ],\n variants: {\n canInteract: {\n true: []\n },\n direction: {\n vertical: [\n 'flex-row',\n 'not-last:after:h-full',\n 'not-last:after:left-3.5',\n 'not-last:after:top-1/2',\n 'not-last:after:w-1',\n 'py-3'\n ],\n horizontal: [\n 'flex-col',\n 'not-last:after:h-1',\n 'not-last:after:left-1/2',\n 'not-last:after:top-3.5',\n 'not-last:after:w-full',\n 'px-2'\n ]\n },\n separator: {\n default: ['not-last:after:bg-grey-200'],\n active: ['not-last:after:bg-primary-800'],\n success: ['not-last:after:bg-success'],\n viewed: ['not-last:after:bg-grey-600']\n },\n status: {\n completed: [],\n active: [],\n default: [],\n viewed: [],\n success: [],\n reviewed: []\n }\n },\n compoundVariants: [\n {\n canInteract: true,\n status: 'completed',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:bg-primary-900',\n 'hover:first:text-white!',\n 'hover:last:text-primary-900'\n ]\n },\n {\n canInteract: true,\n status: 'active',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'viewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'reviewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!'\n ]\n }\n ]\n})\n","import { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nexport const StepperStepLabel = styled(Text, {\n base: ['font-semibold'],\n variants: {\n direction: {\n vertical: ['ml-3', 'text-left'],\n horizontal: ['mt-3', 'text-center']\n },\n status: {\n default: ['font-normal', 'text-grey-700'],\n active: ['text-primary-900'],\n viewed: ['text-grey-1000'],\n completed: ['text-primary-800'],\n success: ['text-success'],\n reviewed: []\n }\n }\n})\n","export enum Status {\n ACTIVE = 'active',\n VIEWED = 'viewed',\n SUCCESS = 'success',\n DEFAULT = 'default',\n COMPLETED = 'completed',\n REVIEWED = 'reviewed'\n}\nexport interface Step {\n label?: string\n status: `${Status}`\n}\n\nexport type Direction = 'vertical' | 'horizontal'\n\nexport type Context = {\n steps: Step[]\n goToPreviousStep?: () => void\n goToNextStep?: () => void\n goToStep?: (index: number) => void\n activeStep: number\n viewedSteps: number[]\n completedSteps: number[]\n allowSkip?: boolean\n direction?: Direction\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport type StepperProviderProps = {\n stepCount: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps: Step[]\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport interface IStepperProps {\n className?: string\n stepCount?: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps?: Step[]\n hideLabels?: boolean\n showCompletedIcons?: boolean\n}\n\nexport interface IStepperNavigateProps {\n label?: (currentStep?: number) => string\n onClick?: (next: () => void) => void\n}\n\nexport interface IStepperStepsProps {\n className?: string\n}\n","import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './stepper-context/StepperContext'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { IStepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled('div', {\n base: ['flex', 'justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: IStepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedSteps.includes(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedSteps.includes(index)) return Status.COMPLETED\n if (viewedSteps.includes(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedSteps.includes(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedSteps.includes(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n","import invariant from 'invariant'\nimport * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { StepperProvider } from './stepper-context/StepperContext'\nimport { StepperStepBack } from './StepperStepBack'\nimport { StepperStepForward } from './StepperStepForward'\nimport { StepperSteps } from './StepperSteps'\nimport { IStepperProps } from './types'\n\nconst StepperComponent = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction = 'horizontal',\n steps,\n hideLabels = false,\n showCompletedIcons = false,\n className\n}: React.PropsWithChildren<IStepperProps>) => {\n invariant(\n !(stepCount && steps),\n '`Stepper` should only be given one of `stepCount` or `steps`. When both are provided, `steps` will be used and `stepCount` will be ignored.'\n )\n\n const count = steps?.length || stepCount || 0\n\n return (\n <StepperProvider\n stepCount={count}\n allowSkip={allowSkip}\n onComplete={onComplete}\n onStepChange={stepCount ? onStepChange : undefined}\n direction={direction}\n steps={steps || Array(count).fill('')}\n hideLabels={hideLabels}\n showCompletedIcons={showCompletedIcons}\n >\n <div aria-label=\"progress\" className={cn('w-full', className)}>\n {children}\n </div>\n </StepperProvider>\n )\n}\n\nexport const Stepper = Object.assign(StepperComponent, {\n StepBack: StepperStepBack,\n StepForward: StepperStepForward,\n Steps: StepperSteps\n})\n\nStepperComponent.displayName = 'Stepper'\n","import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'border-none',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n","import { Content } from '@radix-ui/react-tabs'\n\nimport { styled } from '~/styled'\n\nconst StyledTabsContent = styled(Content, {\n base: ['grow', 'font-body']\n})\n\nexport const TabsContent = StyledTabsContent\n\nTabsContent.displayName = 'TabsContent'\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n base: [\n 'absolute',\n 'inset-0',\n 'h-[calc(100%+2px)]',\n 'opacity-0',\n 'bg-(--interactive-1)'\n ]\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n base: [\n 'bg-none',\n 'cursor-pointer',\n 'shrink-0',\n 'p-4',\n 'select-none',\n 'border-b-2',\n 'border-b-transparent',\n 'relative',\n 'data-[state=active]:border-current',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:text-(--interactive-1)',\n 'data-[state=active]:tracking-[-0.005em]',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:text-(--interactive-3)',\n 'not-disabled:focus-visible:[&_div]:opacity-7',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:text-(--interactive-2)',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:[&_div]:opacity-7',\n 'not-disabled:hover:text-(--interactive-2)'\n ]\n})\n\nexport const TabsTrigger = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledTabsTrigger> & { value: string }\n>(({ children, ...rest }, ref) => (\n <StyledTabsTrigger {...rest} ref={ref}>\n <Text size=\"sm\" as=\"span\">\n {children}\n </Text>\n <StyledTabsTriggerHoverBackground />\n </StyledTabsTrigger>\n))\n\nTabsTrigger.displayName = 'TabsTrigger'\n","import { useEffect, useMemo, useState } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype TUseScrollPositionOptions = {\n element?: HTMLElement | null\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype TUseScrollPositionOutput = {\n left: number\n top: number\n}\n\nexport const useScrollPosition = ({\n element,\n delay = 500,\n delayMethod = 'throttle'\n}: TUseScrollPositionOptions): TUseScrollPositionOutput => {\n const [scrollPosition, setScrollPosition] = useState({ left: 0, top: 0 })\n\n const delayMethodFn = useMemo(\n () => (delayMethod === 'debounce' ? debounce : throttle),\n [delayMethod]\n )\n\n useEffect(() => {\n if (!element) return\n\n const handleScroll = delayMethodFn(delay, () => {\n setScrollPosition((prev) =>\n prev.left === element.scrollLeft && prev.top === element.scrollTop\n ? prev\n : { left: element.scrollLeft, top: element.scrollTop }\n )\n })\n\n element.addEventListener('scroll', handleScroll)\n\n return () => {\n element.removeEventListener('scroll', handleScroll)\n }\n }, [element, delayMethodFn, delay])\n\n return scrollPosition\n}\n","import { useCallback, useMemo, useState } from 'react'\n\nimport { useResizeObserver } from './useResizeObserver'\n\ninterface Size {\n width: number | undefined\n height: number | undefined\n}\n\nexport const useSize = ({\n element,\n delay = 500\n}: {\n element?: HTMLElement | null\n delay?: number\n}): Size => {\n const [size, setSize] = useState<Size>({\n width: undefined,\n height: undefined\n })\n\n const handleResize = useCallback(() => {\n const width = element?.clientWidth\n const height = element?.clientHeight\n setSize((prev) =>\n prev.width === width && prev.height === height ? prev : { width, height }\n )\n }, [element])\n\n const elements = useMemo(() => [element], [element])\n\n useResizeObserver({\n delay,\n elements: elements,\n onResize: handleResize\n })\n\n return size\n}\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport { List } from '@radix-ui/react-tabs'\nimport React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { useScrollPosition } from '~/utilities/hooks/useScrollPosition'\nimport { useSize } from '~/utilities/hooks/useSize'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContainer = styled(ColorScheme, {\n base: ['relative', 'border-b', 'border-b-(--base-4)', 'w-full']\n})\n\nconst StyledTriggerList = styled(List, {\n base: [\n 'shrink-0',\n 'flex',\n 'w-full',\n 'overflow-x-auto',\n '-webkit-scrollbar:hidden',\n '[scrollbar-width:none]'\n ]\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n base: [\n 'h-full!',\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'cursor-pointer',\n 'bg-(--base-1)!',\n 'text-(--interactive-1)!',\n 'rounded-none',\n 'opacity-90'\n ]\n})\n\nconst SCROLL_STEP = 0.8 // Used to scroll 80% of clientWidth\n\nexport const TabsTriggerList = ({\n children,\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: TcolorScheme\n}) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width } = useSize({ element: listRef, delay: 500 })\n const { left } = useScrollPosition({\n element: listRef,\n delay: 100,\n delayMethod: 'debounce'\n })\n\n const canScrollXAxis = React.useMemo(() => {\n if (!listRef) return false\n return listRef.scrollWidth > listRef.clientWidth\n }, [width, listRef])\n\n const canScrollLeft = React.useMemo(() => {\n if (!canScrollXAxis) return false\n return left > 0\n }, [left, canScrollXAxis])\n\n const canScrollRight = React.useMemo(() => {\n if (!listRef || !canScrollXAxis) return false\n return listRef.scrollWidth - left - listRef.clientWidth > 1 // 1 rather than 0 to account for sub-pixel widths and calculations\n }, [listRef, left, canScrollXAxis])\n\n const scrollList = React.useCallback(\n (stepModifier) => {\n if (!listRef) return\n listRef.scroll({\n left: listRef.scrollLeft + listRef.clientWidth * stepModifier,\n behavior: 'smooth'\n })\n },\n [listRef]\n )\n\n return (\n <StyledContainer\n base=\"grey1\"\n accent=\"primary1\"\n interactive=\"hiContrast\"\n {...colorScheme}\n {...rest}\n >\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {canScrollLeft && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n onClick={() => scrollList(-SCROLL_STEP)}\n tabIndex={-1}\n className=\"left-0\"\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n {canScrollRight && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n onClick={() => scrollList(SCROLL_STEP)}\n tabIndex={-1}\n className=\"right-0\"\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n","import { Root } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { TabsContent } from './TabsContent'\nimport { TabsTrigger } from './TabsTrigger'\nimport { TabsTriggerList } from './TabsTriggerList'\n\nconst StyledRoot = styled(Root, {\n base: ['w-full']\n})\n\nexport const Tabs = Object.assign(StyledRoot, {\n TriggerList: TabsTriggerList,\n Trigger: TabsTrigger,\n Content: TabsContent\n})\n\nStyledRoot.displayName = 'Tabs'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTextarea = styled('textarea', {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'm-0',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'resize-y',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nexport type TextareaProps = React.ComponentProps<typeof StyledTextarea>\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (props, ref) => <StyledTextarea {...props} ref={ref} />\n)\n\nTextarea.displayName = 'Textarea'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport { Textarea, TextareaProps } from '~/components/textarea/Textarea'\n\ntype TextareaFieldProps = TextareaProps & FieldElementWrapperProps\n\nexport const TextareaField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...remainingProps\n}: TextareaFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Textarea\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nTextareaField.displayName = 'TextareaField'\n","import React from 'react'\n\nimport { Tile } from '~/components/tile/Tile'\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TTileInteractiveProps = React.ComponentProps<\n typeof StyledTileInteractive\n> &\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n NavigatorActions\n\nexport const TileInteractive = React.forwardRef<\n HTMLDivElement,\n TTileInteractiveProps\n>(({ onClick, href, type = 'button', as, ...rest }, ref) => {\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || ('a' as React.ElementType),\n href,\n onClick: undefined\n }\n : {\n as: as || ('button' as React.ElementType),\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n})\n\nTileInteractive.displayName = 'TileInteractive'\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { TileInteractive } from '~/components/tile-interactive/TileInteractive'\nimport { styled } from '~/styled'\n\nconst StyledTileToggleGroupItem = styled(TileInteractive, {\n base: [\n 'text-left',\n 'not-disabled:data-[state=on]:active:bg-(--interactive-3)',\n 'not-disabled:data-[state=on]:hover:bg-(--interactive-2)',\n 'data-[state=on]:before:-inset-px',\n 'data-[state=on]:before:absolute',\n 'data-[state=on]:before:rounded-[inherit]',\n 'data-[state=on]:before:inset-shadow-[var(--accent-8)_0px_0px_0px_2px]',\n 'data-[state=on]:before:z-1',\n 'data-[state=on]:bg-(--interactive-1)',\n 'data-[state=on]:border-(--accent-8)'\n ]\n})\n\ntype TTileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledTileToggleGroupItem>\n\nexport const TileToggleGroupItem = ({\n children,\n ...rest\n}: TTileToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledTileToggleGroupItem as=\"button\">\n {children}\n </StyledTileToggleGroupItem>\n </ToggleGroup.Item>\n)\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype TTileToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n TTileToggleGroupRootProps\n>(({ orientation, className, ...rest }, ref) => (\n <ToggleGroup.Root\n ref={ref}\n {...rest}\n className={cn(\n 'flex',\n 'gap-2',\n orientation === 'horizontal' && 'flex-row',\n orientation === 'vertical' && 'flex-col',\n 'flex-wrap',\n className\n )}\n />\n))\n","import { TileToggleGroupItem } from './TileToggleGroupItem'\nimport { TileToggleGroupRoot } from './TileToggleGroupRoot'\n\ntype TTileToggleGroup = typeof TileToggleGroupRoot & {\n Item: typeof TileToggleGroupItem\n}\n\nexport const TileToggleGroup = TileToggleGroupRoot as TTileToggleGroup\nTileToggleGroup.Item = TileToggleGroupItem\nTileToggleGroup.displayName = 'TileToggleGroup'\n","import * as React from 'react'\nimport type { Toast } from 'react-hot-toast'\n\nexport const ToastContext = React.createContext<Pick<\n Toast,\n 'type' | 'id' | 'message'\n> | null>(null)\n\nexport const useToastContext = () => {\n const context = React.useContext(ToastContext)\n\n if (!context) {\n throw new Error('useToastContext must be used within a ToastProvider')\n }\n\n return context\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { toast } from 'react-hot-toast'\n\nimport { cn } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { useToastContext } from './ToastContext'\n\nexport interface ToastCloseButtonProps extends Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'label' | 'children'\n> {\n onDismiss?: () => void\n label?: string\n}\n\nexport const ToastCloseButton = ({\n onDismiss,\n label = 'Close alert',\n ...rest\n}: ToastCloseButtonProps): React.JSX.Element => {\n const { id } = useToastContext()\n\n return (\n <ActionIcon\n label={label}\n onClick={() => {\n toast.dismiss(id)\n onDismiss?.()\n }}\n {...rest}\n className={cn(\n 'text-white',\n '-mr-2',\n 'hover:opacity-80',\n 'hover:text-white',\n 'focus:opacity-80',\n 'focus:text-white'\n )}\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n}\n","import React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const ToastIcon = (\n props: React.ComponentProps<typeof Icon>\n): React.JSX.Element => (\n <Icon size=\"sm\" {...props} className=\"mr-3 flex-[0_0_auto]\" />\n)\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { useToastContext } from './ToastContext'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nexport const Toast = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n const styledType = type === 'custom' ? undefined : type\n return <StyledToast type={props.type || styledType} {...props} />\n}\n\nToast.Icon = ToastIcon\nToast.Close = ToastCloseButton\n","import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '~/styled'\n\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './ToastContext'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './ToastContext'\n\nconst ToastProviderBase = styled('div', {\n base: ['fixed', 'z-2147483647', 'inset-2', 'pointer-events-none', 'sm:top-3']\n})\n\nconst ToastWrapper = styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast, {\n reverseOrder: true,\n gutter: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.ariaProps.role}\n aria-live={toast.ariaProps['aria-live']}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\n\nimport { styled } from '~/styled'\n\nexport const standardVariant = [\n 'before:bg-grey-600',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'text-grey-800',\n 'data-[state=on]:border-current!',\n 'data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'data-[state=on]:text-primary-800',\n 'not-disabled:data-[state=on]:before:bg-none',\n 'not-disabled:focus-visible:before:bg-none',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:before:bg-none',\n 'not-disabled:hover:border-current!',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const modernVariant = [\n 'bg-grey-200',\n 'border-0',\n 'text-grey-800',\n 'overflow-hidden',\n 'rounded-md',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:border!',\n 'data-[state=on]:border-grey-200!',\n 'data-[state=on]:shadow-none!',\n 'data-[state=on]:text-grey-900',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px_white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const ToggleGroupItem = styled(ToggleGroup.Item, {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n defaultVariants: {\n theme: 'standard'\n }\n})\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { modernVariant, standardVariant } from './ToggleGroupItem'\n\nexport const StyledButton = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'grow',\n 'flex',\n 'items-center',\n 'justify-center',\n 'font-semibold',\n 'leading-none',\n 'py-1'\n ],\n variants: {\n size: {\n sm: ['*:not-last:mr-2', 'min-h-8', 'px-4', 'text-sm'],\n md: ['*:not-last:mr-3', 'min-h-10', 'px-8', 'text-md'],\n lg: ['*:not-last:mr-3', 'min-h-12', 'px-8', 'text-lg']\n },\n isIconOnly: {\n true: []\n },\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n compoundVariants: [\n {\n isIconOnly: true,\n size: 'sm',\n class: ['min-w-8', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'sm',\n theme: 'modern',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n theme: 'modern',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n theme: 'modern',\n class: ['min-w-15', 'p-0']\n }\n ]\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const ToggleGroupButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledButton>\n>(({ size = 'md', theme = 'standard', children, ...rest }, ref) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n const isIconOnly =\n isSingleChild &&\n React.isValidElement(childrenArray[0]) &&\n childrenArray[0]?.type === Icon\n\n return (\n <StyledButton\n ref={ref}\n size={size}\n isIconOnly={isIconOnly}\n theme={theme}\n {...rest}\n >\n {\n childrenArray.map((child) => {\n if (\n !isSingleChild &&\n (typeof child === 'string' || typeof child === 'number')\n )\n return <span key={child}>{child}</span>\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n )\n ) {\n if (child?.type === Icon)\n return React.cloneElement(child, { ...child.props, size })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledButton>\n )\n})\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n gap?: 0 | 1 | 2 | 3\n wrap?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst gapClassMap = {\n 0: 'gap-0.5',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3'\n}\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof StyledRoot> & RootType\n>(\n (\n {\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n },\n ref\n ) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n hasGap && gapClassMap[gap],\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap ? 'flex-wrap' : 'flex-nowrap'\n )}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement<{ theme?: typeof theme }>(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n </StyledRoot>\n )\n }\n)\n","import { ToggleGroupButton as Button } from './ToggleGroupButton'\nimport { ToggleGroupItem as Item } from './ToggleGroupItem'\nimport { ToggleGroupRoot as Root } from './ToggleGroupRoot'\n\nexport const ToggleGroup = { Item, Button, Root }\n","import { useEffect, useMemo, useState } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype TUseWindowScrollPositionOptions = {\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype TUseWindowScrollPositionOutput = {\n x: number\n y: number\n}\n\nexport const useWindowScrollPosition = ({\n delay = 500,\n delayMethod = 'throttle'\n}: TUseWindowScrollPositionOptions = {}): TUseWindowScrollPositionOutput => {\n const [scrollPosition, setScrollPosition] = useState({ x: 0, y: 0 })\n\n const delayMethodFn = useMemo(\n () => (delayMethod === 'debounce' ? debounce : throttle),\n [delayMethod]\n )\n\n useEffect(() => {\n const handleScroll = delayMethodFn(delay, () => {\n setScrollPosition({ x: window.scrollX, y: window.scrollY })\n })\n\n window.addEventListener('scroll', handleScroll)\n\n return () => {\n window.removeEventListener('scroll', handleScroll)\n }\n }, [delayMethodFn, delay])\n\n return scrollPosition\n}\n","const light = {\n '--background': 'white',\n '--divider': 'var(--color-grey-200)',\n '--border-bottom': 'var(--color-grey-200)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\ntype TopBarActionIconProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'size' | 'children'\n> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n label: string\n}\n\nexport const TopBarActionIcon = React.forwardRef<\n HTMLButtonElement,\n TopBarActionIconProps\n>(({ icon, ...rest }, forwardedRef) => {\n return (\n <ActionIcon\n size=\"md\"\n appearance=\"simple\"\n theme=\"neutral\"\n ref={forwardedRef}\n {...rest}\n >\n <Icon is={icon} />\n </ActionIcon>\n )\n})\n","import React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const TopBarBrandLogo = ({\n src,\n alt = 'Atom Learning logo',\n className\n}: Pick<React.ComponentProps<typeof Image>, 'src' | 'alt'> & {\n className?: string\n}): React.JSX.Element => {\n return (\n <Image\n src={src}\n alt={alt}\n className={cn('h-8', 'mr-3', 'w-auto', className)}\n />\n )\n}\n\nexport const TopBarBrandName = styled(Text, {\n base: ['text-grey-800']\n})\n\nexport const TopBarBrand = styled('a', {\n base: [\n 'flex',\n 'items-center',\n 'no-underline',\n 'text-grey-800',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n","import * as React from 'react'\n\nimport { styled, Theme } from '~/styled'\nimport { useWindowScrollPosition } from '~/utilities/hooks/useWindowScrollPosition'\n\nimport { Divider } from '../divider/Divider'\nimport { colorSchemes as topBarColorSchemes } from './TopBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" className=\"bg-divider h-6\" />\n)\n\nconst StyledRoot = styled(\n 'header',\n {\n base: [\n 'bg-(--background)',\n 'sticky',\n 'flex',\n 'items-center',\n 'z-15',\n 'transition-shadow',\n 'duration-200',\n 'ease-out'\n ],\n variants: {\n hasScrolled: {\n true: ['shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]']\n },\n size: {\n md: ['h-16'],\n lg: ['h-24']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n },\n appearance: {\n standard: [\n 'w-screen',\n 'max-w-full',\n 'top-0',\n 'border-b',\n 'border-b-(--border-bottom)'\n ],\n rounded: [\n 'w-full',\n 'top-2',\n 'p-2',\n 'border',\n 'border-white',\n 'rounded-full'\n ]\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nconst Container = styled('div', {\n base: ['flex', 'items-center', 'h-10', 'mx-4', 'w-full', 'md:mx-8']\n})\n\ntype TopBarProps = React.ComponentProps<typeof StyledRoot> &\n React.ComponentProps<typeof Container> &\n React.ComponentProps<typeof Theme>\n\nconst TopBarComponent = ({\n size = 'md',\n diffused,\n theme,\n appearance = 'standard',\n ...rest\n}: React.PropsWithChildren<TopBarProps>) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <Theme theme={theme || topBarColorSchemes['light']}>\n <StyledRoot\n hasScrolled={!!scrollPositionY}\n diffused={diffused}\n appearance={appearance}\n size={size}\n >\n <Container {...rest} />\n </StyledRoot>\n </Theme>\n )\n}\n\nexport const TopBar = Object.assign(TopBarComponent, {\n Brand: TopBarBrand,\n BrandLogo: TopBarBrandLogo,\n BrandName: TopBarBrandName,\n ActionIcon: TopBarActionIcon,\n Divider: TopBarDivider\n})\n\nTopBarComponent.displayName = 'TopBar'\n","import * as React from 'react'\n// Note: Only loading vimeo to reduce the bundle size https://www.npmjs.com/package/react-player\nimport ReactPlayer from 'react-player/vimeo.js'\n\nimport { CSSWrapper } from '~/utilities/css-wrapper/CSSWrapper'\nimport { Override } from '~/utilities/types'\n\ntype VideoProps = Override<\n React.ComponentProps<typeof ReactPlayer>,\n {\n id: string\n ratio?: number\n className?: string\n }\n>\n\nexport const Video = React.forwardRef<any, VideoProps>(\n ({ id, ratio = 9 / 16, className, ...remainingProps }, ref) => (\n <CSSWrapper className={className}>\n <div\n style={{ '--ratio': `${ratio * 100}%` }}\n className=\"relative h-0 w-full overflow-hidden rounded-sm pt-(--ratio)\"\n >\n <ReactPlayer\n {...remainingProps}\n role=\"figure\"\n url={`https://player.vimeo.com/video/${id}`}\n height=\"100%\"\n width=\"100%\"\n ref={ref}\n className=\"absolute top-0 left-0\"\n />\n </div>\n </CSSWrapper>\n )\n)\n\nVideo.displayName = 'Video'\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\n\nimport { Text } from '../text/Text'\n\ntype KeyboardEventWindowOrElement =\n | KeyboardEvent\n | React.KeyboardEvent<HTMLDivElement>\ntype ShortcutConfig = Partial<KeyboardEvent>\n\ntype KeyboardShortcutProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n config: {\n shortcut: ShortcutConfig\n action: ({\n event,\n shortcut\n }: {\n event: KeyboardEvent | React.KeyboardEvent<HTMLDivElement>\n shortcut: ShortcutConfig\n }) => void\n }[]\n targetWindow?: boolean\n onKeyDown?: (e: KeyboardEventWindowOrElement) => void\n}\n\nexport const KeyboardShortcut = React.forwardRef<\n HTMLDivElement,\n KeyboardShortcutProps\n>(({ asChild, config, targetWindow = false, onKeyDown, ...rest }, ref) => {\n const [targetElRef, setTargetElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => targetElRef as HTMLDivElement)\n\n const handleOnKeydown = React.useCallback(\n (e: KeyboardEventWindowOrElement) => {\n config.forEach(({ shortcut, action }) => {\n if (Object.entries(shortcut).every(([key, value]) => e[key] === value))\n action({ event: e, shortcut })\n })\n onKeyDown?.(e)\n },\n [config, onKeyDown]\n )\n\n React.useEffect(() => {\n if (targetWindow) window.addEventListener('keydown', handleOnKeydown)\n\n return () => {\n window.removeEventListener('keydown', handleOnKeydown)\n }\n }, [targetWindow, handleOnKeydown])\n\n const Component = asChild ? Slot : 'div'\n\n return (\n <Component\n onKeyDown={targetWindow ? undefined : (handleOnKeydown as any)}\n ref={setTargetElRef}\n {...rest}\n />\n )\n})\n\nKeyboardShortcut.displayName = 'KeyboardShortcut'\n\nconst StyledKeyboardShortcutIndicator = styled(Text, {\n base: [\n 'bg-grey-100',\n 'text-text-subtle',\n 'px-2',\n 'py-0.5',\n 'min-w-6',\n 'min-h-6',\n 'font-normal',\n 'inline-flex',\n 'justify-center',\n 'items-center',\n 'rounded-md',\n 'shrink-0',\n 'capsize-none'\n ]\n})\n\ntype KeyboardShortcutIndicatorProps = React.ComponentProps<\n typeof StyledKeyboardShortcutIndicator\n>\n\nexport const KeyboardShortcutIndicator = (\n props: KeyboardShortcutIndicatorProps\n) => {\n return <StyledKeyboardShortcutIndicator size=\"sm\" as=\"kbd\" {...props} />\n}\n\nKeyboardShortcutIndicator.displayName = 'KeyboardShortcut'\n","import {\n KeyboardShortcut as KeyboardShortcutComponent,\n KeyboardShortcutIndicator\n} from './KeyboardShortcut'\n\nexport const KeyboardShortcut = Object.assign(KeyboardShortcutComponent, {\n Indicator: KeyboardShortcutIndicator\n})\n\nKeyboardShortcut.displayName = 'KeyboardShortcut'\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\nimport type { SegmentedControlRootProps } from './SegmentedControlRoot'\n\nexport interface SegmentedControlContextValue extends Pick<\n React.ComponentProps<typeof Tabs>,\n 'defaultValue' | 'value' | 'onValueChange'\n> {\n size: SegmentedControlRootProps['size']\n theme: SegmentedControlTheme\n}\n\nexport const SegmentedControlContext =\n React.createContext<SegmentedControlContextValue>({\n size: 'md',\n theme: 'primary',\n defaultValue: '',\n value: '',\n onValueChange: () => null\n })\n","import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Badge } from '../badge/Badge'\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst badgeSizeMap = {\n sm: 'xs',\n md: 'xs',\n lg: 'sm'\n}\n\nexport const SegmentedControlBadge = ({\n className,\n ...props\n}: Omit<React.ComponentProps<typeof Badge>, 'size'>): React.JSX.Element => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return (\n <Badge\n {...props}\n size={badgeSizeMap[size as string]}\n className={cn('border-none', 'font-normal', className)}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\n\nexport const SegmentedControlContent = Tabs.Content\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst StyledText = styled(\n Text,\n {\n base: ['font-body', 'text-text-subtle', 'font-normal'],\n variants: {\n size: {\n sm: ['text-xs', 'leading-[1.6]'],\n md: ['text-sm', 'leading-[1.53]'],\n lg: ['text-md', 'leading-normal']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const SegmentedControlDescription = (\n props: Omit<React.ComponentProps<typeof StyledText>, 'size'>\n): React.JSX.Element => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return <StyledText {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst StyledHeading = styled(\n Text,\n {\n base: ['font-body', 'text-text-regular'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]'],\n md: ['text-md', 'leading-normal'],\n lg: ['text-lg', 'leading-[1.52]']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const SegmentedControlHeading = (\n props: Omit<React.ComponentProps<typeof StyledHeading>, 'size'>\n): React.JSX.Element => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return <StyledHeading {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst sizeMap = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const SegmentedControlIcon = (\n props: Omit<React.ComponentProps<typeof Icon>, 'size'>\n): React.JSX.Element => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return <Icon {...props} size={sizeMap[size as string]} />\n}\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst StyledItem = styled(\n Trigger,\n {\n base: [\n 'relative',\n 'bg-transparent',\n 'rounded-md',\n 'z-2',\n 'min-w-35',\n 'border-2',\n 'border-transparent',\n 'cursor-pointer',\n 'select-none',\n 'flex',\n 'flex-col',\n 'items-center',\n 'justify-center',\n 'data-[state=active]:border-2',\n 'data-[state=active]:border-transparent',\n 'data-[state=active]:focus-visible:border-primary-800',\n 'data-[state=active]:focus-visible:shadow-none',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:shadow-none',\n 'data-[state=active]:text-(--text-bold)',\n 'data-[state=inactive]:font-normal',\n 'data-[state=inactive]:text-grey-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'focus-visible:outline-none'\n ],\n variants: {\n theme: {\n primary: [\n 'data-[state=inactive]:hover:bg-primary-300',\n 'focus-visible:border-primary-800'\n ],\n marsh: [\n 'data-[state=inactive]:hover:bg-marsh-300',\n 'focus-visible:border-marsh-800'\n ]\n },\n size: {\n sm: ['flex-[unset]', 'gap-3', 'px-6', 'py-4'],\n md: ['flex-1', 'gap-4', 'px-4', 'py-6'],\n lg: ['flex-1', 'gap-4', 'px-4', 'py-6']\n }\n },\n defaultVariants: {\n size: 'md',\n theme: 'primary'\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const SegmentedControlItem = React.forwardRef<\n HTMLButtonElement,\n Omit<React.ComponentProps<typeof StyledItem>, 'size'>\n>(({ children, ...props }, ref) => {\n const { size, theme } = React.useContext(SegmentedControlContext)\n\n return (\n <StyledItem {...props} theme={theme} size={size} ref={ref}>\n {children}\n </StyledItem>\n )\n})\n\nSegmentedControlItem.displayName = 'SegmentedControlItem'\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Tabs } from '../tabs/Tabs'\nimport { SegmentedControlContext } from './SegmentedControlContext'\nimport { SegmentedControlItem } from './SegmentedControlItem'\n\nconst StyledTriggerList = styled(Tabs.TriggerList, {\n base: [\n 'relative',\n 'p-1',\n 'rounded-lg',\n 'overflow-hidden',\n '[&>div[role=tablist]]:relative',\n '[&>button]:z-2'\n ],\n variants: {\n theme: {\n primary: ['bg-primary-200'],\n marsh: ['bg-marsh-200']\n }\n }\n})\n\nconst SelectionIndicator = styled('div', {\n base: ['absolute', 'bg-white', 'rounded-md'],\n variants: {\n interacted: {\n true: ['duration-300', 'ease-in', 'transition-all'],\n false: ['transition-none']\n }\n }\n})\n\nexport const SegmentedControlItemList = (\n props: React.ComponentProps<typeof Tabs.TriggerList>\n): React.JSX.Element => {\n const { theme, defaultValue, value } = React.useContext(\n SegmentedControlContext\n )\n\n const tabsRef = React.useRef<(HTMLElement | null)[]>([])\n\n const selectedIndex = React.Children.toArray(props.children).findIndex(\n (child) =>\n (\n child as React.ReactElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >\n )?.props.value === value\n )\n\n const [indicatorStyles, setIndicatorStyles] = React.useState({\n left: 0,\n height: 0,\n width: 0\n })\n const [hasInteracted, setHasInteracted] = React.useState(false)\n\n const updateIndicatorPosition = React.useCallback(() => {\n const currentTab = tabsRef.current[selectedIndex]\n if (!currentTab) return\n\n const { width, height } = currentTab.getBoundingClientRect()\n setIndicatorStyles({\n left: Math.round(currentTab.offsetLeft),\n height: Math.round(height),\n width: Math.round(width)\n })\n }, [selectedIndex])\n\n React.useEffect(() => {\n const resizeObserver = new ResizeObserver(updateIndicatorPosition)\n const currentTabs = tabsRef.current\n currentTabs.forEach((tab) => {\n if (tab) resizeObserver.observe(tab)\n })\n\n return () => {\n currentTabs.forEach((tab) => {\n if (tab) resizeObserver.unobserve(tab)\n })\n resizeObserver.disconnect()\n }\n }, [selectedIndex, updateIndicatorPosition])\n\n React.useEffect(() => {\n window.addEventListener('resize', updateIndicatorPosition)\n return () => {\n window.removeEventListener('resize', updateIndicatorPosition)\n }\n }, [updateIndicatorPosition])\n\n React.useEffect(() => {\n updateIndicatorPosition()\n }, [selectedIndex, updateIndicatorPosition])\n\n return (\n <StyledTriggerList theme={theme} defaultValue={defaultValue} {...props}>\n <SelectionIndicator interacted={hasInteracted} style={indicatorStyles} />\n {React.Children.map(props.children, (child, index) => {\n if (\n !React.isValidElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >(child)\n ) {\n throw new Error(\n `Child passed to SegmentedControlItemList is not a valid element`\n )\n }\n\n return React.cloneElement(child, {\n onClick: (e) => {\n setHasInteracted(true)\n if (child.props.onClick) child.props.onClick(e)\n },\n ref: (el: HTMLElement | null) => {\n tabsRef.current[index] = el\n }\n })\n })}\n </StyledTriggerList>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Tabs } from '../tabs/Tabs'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst StyledSegmentedControlRoot = styled(\n Tabs,\n {\n base: ['[&>div]:border-none'],\n variants: {\n size: {\n sm: ['w-[unset]!'],\n md: [],\n lg: []\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport interface SegmentedControlRootProps extends React.ComponentProps<\n typeof StyledSegmentedControlRoot\n> {\n theme?: SegmentedControlTheme\n}\n\nexport const SegmentedControlRoot = ({\n size,\n theme = 'primary',\n defaultValue,\n children,\n ...props\n}: React.PropsWithChildren<SegmentedControlRootProps>): React.JSX.Element => {\n const isControlled = props.value !== undefined\n\n const [internalValue, setInternalValue] = React.useState(defaultValue)\n\n const currentValue = isControlled ? props.value : internalValue\n const handleValueChange = isControlled\n ? props.onValueChange\n : setInternalValue\n\n React.useEffect(() => {\n if (!isControlled && defaultValue) {\n setInternalValue(defaultValue)\n }\n }, [defaultValue, isControlled])\n\n const value = React.useMemo(\n () => ({\n size,\n theme,\n defaultValue,\n onValueChange: handleValueChange,\n value: currentValue\n }),\n [size, theme, defaultValue, handleValueChange, currentValue]\n )\n\n return (\n <SegmentedControlContext.Provider value={value}>\n <StyledSegmentedControlRoot\n size={size}\n value={currentValue}\n onValueChange={handleValueChange}\n {...props}\n >\n {children}\n </StyledSegmentedControlRoot>\n </SegmentedControlContext.Provider>\n )\n}\n","import { SegmentedControlBadge } from './SegmentedControlBadge'\nimport { SegmentedControlContent } from './SegmentedControlContent'\nimport { SegmentedControlDescription } from './SegmentedControlDescription'\nimport { SegmentedControlHeading } from './SegmentedControlHeading'\nimport { SegmentedControlIcon } from './SegmentedControlIcon'\nimport { SegmentedControlItem } from './SegmentedControlItem'\nimport { SegmentedControlItemList } from './SegmentedControlItemList'\nimport { SegmentedControlRoot } from './SegmentedControlRoot'\n\nexport const SegmentedControl = {\n Root: SegmentedControlRoot,\n Item: SegmentedControlItem,\n Heading: SegmentedControlHeading,\n Description: SegmentedControlDescription,\n Icon: SegmentedControlIcon,\n Content: SegmentedControlContent,\n Badge: SegmentedControlBadge,\n ItemList: SegmentedControlItemList\n}\n","import React from 'react'\n\nimport { FileDropContextValue } from './types'\n\nexport const FileDropContext = React.createContext<FileDropContextValue>({\n isDragging: false,\n files: []\n})\n","import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { FileDropContext } from './FileDropContext'\nimport { type FileDropContextValue } from './types'\n\ninterface FileDropProps extends Omit<\n React.ComponentProps<'div'>,\n 'onDrop' | 'ref' | 'children'\n> {\n onDrop: (files: File[]) => void\n children?:\n | React.ReactNode\n | ((value: FileDropContextValue) => React.ReactNode)\n accept?: React.InputHTMLAttributes<HTMLInputElement>['accept']\n multiple?: React.InputHTMLAttributes<HTMLInputElement>['multiple']\n}\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-6',\n 'items-center',\n 'border',\n 'border-dashed',\n 'border-grey-500',\n 'px-12',\n 'py-8',\n 'rounded-md',\n 'cursor-pointer',\n '**:pointer-events-none'\n ]\n})\n\nexport const FileDrop = ({\n children,\n accept,\n multiple,\n onDrop,\n ...props\n}: FileDropProps) => {\n const [isDragging, setIsDragging] = React.useState(false)\n const [files, setFiles] = React.useState<File[]>([])\n const fileUploadInputRef = React.useRef<HTMLInputElement>(null)\n\n const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {\n event.preventDefault()\n setIsDragging(true)\n }\n\n const handleDragLeave = () => setIsDragging(false)\n\n const handleDrop = (fileList: FileList | null) => {\n if (!fileList) return\n\n setIsDragging(false)\n\n const files = Array.from(fileList)\n onDrop(files)\n setFiles(files)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (['Space', 'Enter'].includes(event.key)) {\n fileUploadInputRef.current?.click()\n }\n }\n\n const value: FileDropContextValue = { isDragging, files }\n\n return (\n <FileDropContext.Provider value={value}>\n <StyledContainer\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={(event) => {\n event.preventDefault()\n handleDrop(event.dataTransfer.files)\n }}\n onClick={() => fileUploadInputRef.current?.click()}\n role=\"button\"\n onKeyDown={handleKeyDown}\n tabIndex={0}\n {...props}\n >\n {typeof children === 'function' ? children(value) : children}\n <input\n type=\"file\"\n ref={fileUploadInputRef}\n style={{ visibility: 'hidden' }}\n accept={accept}\n multiple={multiple}\n onChange={(event) => {\n handleDrop(event.target.files)\n }}\n />\n </StyledContainer>\n </FileDropContext.Provider>\n )\n}\n\nFileDrop.displayName = 'FileDrop'\n","import React from 'react'\n\nimport { FileDropContext } from './FileDropContext'\nimport { FileDropContextValue } from './types'\n\nexport const useFileDrop = (): FileDropContextValue =>\n React.useContext(FileDropContext)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,kBAAA,cAAc,UAAU;AAExB,IAAM,qBAAqB,UACzB,eAAe,KAAK,MAAM,IAAI,CAAC,OAAO,MAAM,OAAO,MAAM,CAAC;AAE5D,IAAM,WAAA,GAAA,eAAA,qBAEJ,EACA,QAAQ;CACN,aAAa;EACX,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,kBAAkB,EAAE,CAAC;EACnD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,kBAAkB,EAAE,CAAC;EAC7D,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,EAAE,CAAC;EAC5D;CACD,wBAAwB;EACtB,SAAS,CAAC,kBAAkB,gBAAgB;EAC5C,kBAAkB,CAAC,UAAU;EAC7B,iBAAiB,CAAC,UAAU;EAC7B;CACF,EACF,CAAC;AAEF,IAAa,MAAM,GAAG,WAAyB,SAAA,GAAA,KAAA,SAAa,OAAO,CAAC;AAIpE,IAAa,SAAS,EACpB,UACA,YAEA,iBAAA,GAAA,kBAAA,KAAC,OAAD;CAAK,WAAU;CAAW,OAAO;CAC9B;CACG,CAAA;AAGR,IAAa,eAAe,WAC1B,OAAO,YACL,OAAO,OAAO,OAAO,CAAC,SAAS,WAC7B,OAAO,QAAQ,OAAO,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,KAAK,SAAS,MAAM,CAAC,CACtE,CACF;AAiHH,SAAgB,OAId,IAAc,QAAyB,SAAa;CACpD,MAAM,cAAc,OAAO,KAAK,OAAO,YAAY,EAAE,CAAC;CACtD,MAAM,4BAA4B,SAAS,8BAA8B;CACzE,MAAM,QAAA,GAAA,kBAAA,IAAU,OAAc;CAU9B,M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,UAAU;EACR,OAAO;GACL,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACD;GACD,aAAa;IACX;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACD;GACD,QAAQ;IACN;IACA;IACA;IACD;GACD,OAAO;IACL;IACA;IACA;IACD;GACF;EACD,YAAY;GACV,QAAQ;IACN;IACA;IACA;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,MAAM;GACJ,IAAI,CAAC,SAAS;GACd,IAAI,CAAC,SAAS;GACd,IAAI,CAAC,UAAU;GACf,IAAI,CAAC,UAAU;GAChB;EACD,WAAW,EACT,MAAM,CAAC,eAAe,EACvB;EACF;CACF,EACD,EACE,2BAA2B,MAC5B,CACF;AAWD,IAAa,aAAa,MAAM,YAE5B,EACE,UACA,QAAQ,WACR,aAAa,UACb,OAAO,MACP,OACA,MACA,UACA,aAAa,MACb,aACA,GAAG,kBAEL,QACG;CACH,MAAM,2BAA2B,YAAY,KAAK,YAAY,wCAAwC,WAAW;AAEjH,EAAA,GAAA,UAAA,SAAU,MAAM,SAAS,MAAM,SAAS,KAAK,GAAG,yBAAyB;AAazE,QACE,iBAAA,GAAA,kBAAA,KAAC,wBAAD;EACc;EACL;EACM;YAEb,iBAAA,GAAA,kBAAA,KAAC,gBAAD;GACE,GAhBoB,OACrB;IACC,IAAI;IACJ,MAAM,WAAW,KAAA,IAAY;IAC7B,SAAS,KAAA;IACT,iBAAiB,CAAC,CAAC;IACpB,GACA,EAAE,MAAM,UAAU;GAUjB,GAAI,uBAAuB,KAAK;GAChC,GAAI;GACJ,cAAY;GACL;GACK;GACN;GACD;GACK;aAET,MAAM,SAAS,IAAI,WAAW,UAAU;AAGvC,QAAI,CAAC,MAAM,eAAe,MAAM,CAC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,OAAO;CACxB,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,UAAU,SAAS;EACxB,IAAI,CAAC,YAAY,SAAS;EAC1B,IAAI,CAAC,UAAU,WAAW;EAC3B,EACF;CACF,CAAC;AAOF,IAAa,UAAU,EACrB,WACA,UAAU,WACV,OAAO,MACP,GAAG,YAEH,iBAAA,GAAA,kBAAA,MAAC,OAAD;CACE,WAAW,GAAG,QAAQ,kBAAkB,UAAU;CAClD,MAAK;CACL,GAAI;WAHN;EAKE,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aAAW;GAAe,CAAA;EAC1C,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAW,MAAQ,CAAA;EACnB,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAW,MAAQ,CAAA;EACnB,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAW,MAAQ,CAAA;EACf;;;;ACnCR,IAAa,eAAe,OAC1B,UACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,OAAO;GACL,SAAS;IACP;IACA;IACA;IACD;GACD,WAAW;IACT;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACA;IACD;GACD,QAAQ;IACN;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACA;IACD;GACF;EACD,YAAY;GACV,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACD;G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CAED,MAAM,QAAQ,MAAM,cAAc;AAChC,SAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;IACA;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,iBAAA,GAAA,kBAAA,KAAC,kBAAkB,UAAnB;EAAmC;EAChC;EAC0B,CAAA;;;;ACpGjC,IAAa,sBAA8C;CACzD,MAAM,UAAU,MAAM,WAAW,kBAAkB;AAEnD,KAAI,CAAC,QACH,OAAM,IAAI,MACR,4EACD;AAGH,QAAO;;;;ACLT,IAAM,qBAAmB,OAAO,YAAY,EAC1C,MAAM,CAAC,QAAQ,sBAAsB,EACtC,CAAC;AAEF,IAAa,wBACX,UACG;CACH,MAAM,EAAE,cAAc,QAAQ,sBAAsB,eAAe;AAInE,QACE,iBAAA,GAAA,kBAAA,KAAC,oBAAD;EACE,YAAY;EACZ,MAAK;EACL,OAAM;EACN,SAAS;EACT,UARe,CAAC;EAShB,GAAI;EACJ,OAAO,QAAQ,uBAAuB;YAEtC,iBAAA,GAAA,kBAAA,KAAC,MAAD,EAAM,IAAI,qBAAA,cAAgB,CAAA;EACT,CAAA;;;;ACxBvB,IAAM,iBAAe,OAAO,UAAU;CACpC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM,EACJ,IAAI,CAAC,UAAU,EAChB;EACD,UAAU,EACR,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,EACF;EACD,WAAW,EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACD,EACF;EACF;CACD,kBAAkB,CAChB;EACE,UAAU;EACV,WAAW;EACX,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA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AS,EAAE,OAAO,SAAS;GAChC,GAAI;GACJ,YAAY;GACZ,CAAA;EACW,CAAA;;AAInB,UAAU,cAAc;;;ACzDxB,IAAa,kBAAkB,OAAO,OAAO,EAC3C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;;;ACTF,IAAa,mBAAmB,OAAO,OAAO,EAC5C,MAAM,CAAC,YAAY,WAAW,EAC/B,CAAC;;;ACFF,IAAa,gBAAc,uBAAA;;;ACF3B,IAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACD;;;ACID,IAAM,iBAAiB;AAEvB,IAAM,sBAAsB,OAAO,uBAAA,SAAS,EAC1C,MAAM,iBACP,CAAC;AAEF,IAAM,sBAAsB,OAC1B,uBAAA,SACA;CACE,MAAM;EAIJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,YAAY;IACV;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,QAAQ,EACN,OAAO;GAAC;GAAQ;GAAY;GAAM,EACnC;EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAOD,IAAa,iBAAiB,EAC5B,OAAO,MACP,UACA,kBAAkB,gBAClB,kBAAkB,MAClB,GAAG,qBAEH,iBAAA,GAAA,kBAAA,KAAC,uBAAA,QAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,MAAC,qBAAD;CAAqB,IAAI;WAAzB,CACG,MAAM,SAAS,IACd,WACC,UACC,OAAO,SAAS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ACjE,QAAM,gBAAgB;AACtB,gBAAc,KAAK;;CAGrB,MAAM,wBAAwB,cAAc,MAAM;CAElD,MAAM,cAAc,aAA8B;AAChD,MAAI,CAAC,SAAU;AAEf,gBAAc,MAAM;EAEpB,MAAM,QAAQ,MAAM,KAAK,SAAS;AAClC,SAAO,MAAM;AACb,WAAS,MAAM;;CAGjB,MAAM,iBAAiB,UAA+C;AACpE,MAAI,CAAC,SAAS,QAAQ,CAAC,SAAS,MAAM,IAAI,CACxC,oBAAmB,SAAS,OAAO;;CAIvC,MAAM,QAA8B;EAAE;EAAY;EAAO;AAEzD,QACE,iBAAA,GAAA,kBAAA,KAAC,gBAAgB,UAAjB;EAAiC;YAC/B,iBAAA,GAAA,kBAAA,MAAC,iBAAD;GACE,YAAY;GACZ,aAAa;GACb,SAAS,UAAU;AACjB,UAAM,gBAAgB;AACtB,eAAW,MAAM,aAAa,MAAM;;GAEtC,eAAe,mBAAmB,SAAS,OAAO;GAClD,MAAK;GACL,WAAW;GACX,UAAU;GACV,GAAI;aAXN,CAaG,OAAO,aAAa,aAAa,SAAS,MAAM,GAAG,UACpD,iBAAA,GAAA,kBAAA,KAAC,SAAD;IACE,MAAK;IACL,KAAK;IACL,OAAO,EAAE,YAAY,UAAU;IACvB;IACE;IACV,WAAW,UAAU;AACnB,gBAAW,MAAM,OAAO,MAAM;;IAEhC,CAAA,CACc;;EACO,CAAA;;AAI/B,SAAS,cAAc;;;AClGvB,IAAa,oBACX,MAAA,QAAM,WAAW,gBAAgB"}
1
+ {"version":3,"file":"index.cjs.js","names":[],"sources":["../src/utilities/hooks/useIsMountedRef.ts","../src/styled.tsx","../src/utilities/uri/index.ts","../src/components/loader/Loader.tsx","../src/components/button/Button.tsx","../src/components/heading/Heading.tsx","../src/components/text/Text.tsx","../src/components/alert-dialog/AlertDialogContent.tsx","../src/components/alert-dialog/AlertDialog.tsx","../src/components/icon/Icon.tsx","../src/components/alert-dialog/alert-context/AlertDialogIcon.tsx","../src/components/alert-dialog/alert-context/AlertDialog.tsx","../src/components/alert-dialog/alert-context/reducer.ts","../src/components/alert-dialog/AlertDialog.context.tsx","../src/utilities/css-wrapper/CSSWrapper.tsx","../src/components/accordion/AccordionContent.tsx","../src/components/accordion/AccordionItem.tsx","../src/experiments/color-scheme/ColorScheme.config.ts","../src/experiments/color-scheme/ColorScheme.tsx","../src/components/accordion/AccordionTrigger.tsx","../src/components/accordion/Accordion.tsx","../src/components/tooltip/TooltipContent.tsx","../src/components/tooltip/Tooltip.tsx","../src/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.tsx","../src/components/action-icon/ActionIcon.constants.ts","../src/components/action-icon/ActionIcon.tsx","../src/components/avatar/Avatar.context.tsx","../src/utilities/override-styled-variant-value/overrideStyledVariantValue.ts","../src/components/avatar/AvatarIcon.tsx","../src/components/link/Link.tsx","../src/components/image/ImageCredit.tsx","../src/components/image/Image.tsx","../src/components/avatar/AvatarPlaceholder.tsx","../src/components/avatar/AvatarInitial.tsx","../src/components/avatar/AvatarImage.tsx","../src/components/avatar/Avatar.tsx","../src/utilities/hooks/useCallbackRef.ts","../src/components/badge/Badge.colorscheme.config.ts","../src/components/badge/Badge.context.tsx","../src/components/badge/BadgeIcon.tsx","../src/utilities/hooks/useResizeObserver.ts","../src/components/badge/BadgeText.tsx","../src/components/badge/Badge.tsx","../src/components/dismissible/DismissibleRoot.tsx","../src/components/dismissible/DismissibleTrigger.tsx","../src/components/dismissible/index.ts","../src/components/banner/Banner.context.tsx","../src/components/banner/Banner.tsx","../src/components/banner/banner-regular/BannerRegularButton.tsx","../src/components/banner/banner-regular/BannerRegularActions.tsx","../src/components/banner/BannerContainer.tsx","../src/components/banner/banner-regular/BannerRegularContainer.tsx","../src/components/banner/banner-regular/BannerRegularContent.tsx","../src/components/banner/banner-regular/BannerRegularDismiss.tsx","../src/components/banner/banner-regular/BannerRegularHeading.tsx","../src/components/banner/banner-regular/BannerRegularImage.tsx","../src/components/banner/banner-regular/BannerRegularText.tsx","../src/components/banner/banner-regular/BannerRegular.tsx","../src/components/banner/banner-slim/BannerSlimActions.tsx","../src/components/banner/banner-slim/BannerSlimButton.tsx","../src/components/banner/banner-slim/BannerSlimContainer.tsx","../src/components/banner/banner-slim/BannerSlimContent.tsx","../src/components/banner/banner-slim/BannerSlimDismiss.tsx","../src/components/banner/banner-slim/BannerSlimImage.tsx","../src/components/banner/banner-slim/BannerSlimText.tsx","../src/components/banner/banner-slim/BannerSlim.tsx","../src/components/box/Box.tsx","../src/components/carousel/CarouselArrows.tsx","../src/components/carousel/CarouselPagination.tsx","../src/components/carousel/CarouselSlider.tsx","../src/components/carousel/CarouselSlide.tsx","../src/components/carousel/Carousel.tsx","../src/components/checkbox/Checkbox.tsx","../src/components/checkbox-group/CheckboxGroupChecked.context.tsx","../src/components/checkbox-group/CheckboxGroupMounted.context.tsx","../src/components/checkbox-group/CheckboxGroupAllItem.tsx","../src/components/checkbox-group/CheckboxGroupItem.tsx","../src/components/checkbox-group/CheckboxGroupSub.tsx","../src/components/checkbox-group/CheckboxGroup.tsx","../src/components/tree/TreeListItem.tsx","../src/components/tree/TreeCollapsible.tsx","../src/components/tree/TreeList.tsx","../src/components/tree/TreeCollapsibleContent.tsx","../src/components/tree/TreeIcon.tsx","../src/components/tree/TreeText.tsx","../src/components/tree/TreeItemContent.tsx","../src/components/tree/TreeCollapsibleTrigger.tsx","../src/components/tree/TreeItem.tsx","../src/components/tree/Tree.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsible.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleContent.tsx","../src/components/checkbox-tree/CheckboxTreeItemContent.tsx","../src/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.tsx","../src/components/checkbox-tree/CheckboxTreeItem.tsx","../src/components/checkbox-tree/CheckboxTree.tsx","../src/components/inline-message/InlineMessage.config.ts","../src/components/inline-message/InlineMessage.tsx","../src/components/label/Label.tsx","../src/components/radio-button/RadioButton.tsx","../src/components/field-wrapper/FieldDescription.tsx","../src/components/field-wrapper/InlineFieldWrapper.tsx","../src/components/form/useFieldError.ts","../src/components/checkbox-field/CheckboxField.tsx","../src/components/chip/Chip.tsx","../src/components/chip/ChipGroup.tsx","../src/components/dismissible-group/DismissibleGroupRoot.tsx","../src/components/dismissible-group/DismissibleGroupItem.tsx","../src/components/dismissible-group/index.ts","../src/components/chip-dismissible-group/ChipDismissibleGroupItem.tsx","../src/components/chip-dismissible-group/ChipDismissibleGroupRoot.tsx","../src/components/chip-dismissible-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupItem.tsx","../src/utilities/radix-overrides/toggle-group/ToggleGroupRoot.tsx","../src/utilities/radix-overrides/toggle-group/index.ts","../src/components/chip-toggle-group/ChipToggleGroupRoot.tsx","../src/components/chip-toggle-group/index.ts","../src/components/combobox/ComboboxInput.tsx","../src/components/combobox/ComboboxList.tsx","../src/components/combobox/ComboboxOption.tsx","../src/components/combobox/ComboboxPopover.tsx","../src/components/combobox/Combobox.tsx","../src/components/field-wrapper/FieldWrapper.tsx","../src/components/form/useFormCustomContext.ts","../src/utilities/style/get-icon-size.ts","../src/components/input/Input.tsx","../src/components/password-input/PasswordInput.tsx","../src/components/password-field/PasswordField.tsx","../src/components/create-password-field/CreatePasswordField.tsx","../src/components/data-table/DataTable.types.ts","../src/components/data-table/getNewAsyncData.ts","../src/components/data-table/usePagination.ts","../src/components/data-table/useSorting.ts","../src/components/data-table/DataTable.context.tsx","../src/components/table/TableBody.tsx","../src/components/table/TableCell.tsx","../src/components/table/TableFooter.tsx","../src/components/table/TableFooterCell.tsx","../src/components/table/TableHeader.tsx","../src/components/table/TableHeaderCell.tsx","../src/components/table/TableRow.tsx","../src/components/table/useStickyColumnsCss.ts","../src/components/table/TableStickyColumnsContainer.tsx","../src/components/table/Table.tsx","../src/components/data-table/DataTableDataCell.tsx","../src/components/data-table/DataTableRowSelectionCheckbox.tsx","../src/components/data-table/DataTableRow.tsx","../src/components/data-table/DataTableBody.tsx","../src/components/divider/Divider.tsx","../src/components/data-table/DataTableMetaData.tsx","../src/components/data-table/DataTableBulkActions.tsx","../src/components/data-table/DataTableBulkActionsSelectedRowActions.tsx","../src/components/data-table/DataTableBulkActionsFloating.tsx","../src/components/empty-state/EmptyState.context.tsx","../src/components/empty-state/EmptyStateBody.tsx","../src/components/empty-state/EmptyStateImage.tsx","../src/components/empty-state/EmptyStateTitle.tsx","../src/components/empty-state/EmptyState.tsx","../src/components/data-table/DataTableEmptyState.tsx","../src/components/data-table/DataTableError.tsx","../src/components/search-input/SearchInput.tsx","../src/components/data-table/DataTableGlobalFilter.tsx","../src/components/data-table/DataTableHeaderCell.tsx","../src/components/data-table/DataTableSelectAllRowsCheckbox.tsx","../src/components/data-table/DataTableHead.tsx","../src/components/data-table/DataTableLoading.tsx","../src/components/data-table/DataTableTable.tsx","../src/components/sortable/Handle.tsx","../src/components/sortable/SortableHandle.tsx","../src/components/sortable/SortableItem.tsx","../src/components/sortable/SortableRoot.tsx","../src/components/sortable/index.ts","../src/components/data-table/drag-and-drop/DragAndDropTableRow.tsx","../src/components/data-table/drag-and-drop/DragAndDropTableBody.tsx","../src/components/data-table/drag-and-drop/DragAndDropTable.tsx","../src/components/pagination/pagination.constants.ts","../src/components/pagination/pagination.helper.ts","../src/components/pagination/Pagination.context.tsx","../src/components/pagination/usePagination.tsx","../src/components/pagination/PaginationNextButton.tsx","../src/components/pagination/PaginationPage.tsx","../src/components/popover/PopoverContent.tsx","../src/components/popover/Popover.tsx","../src/components/pagination/PaginationPopover.tsx","../src/components/pagination/PaginationPreviousButton.tsx","../src/components/pagination/PaginationItems.tsx","../src/components/pagination/Pagination.tsx","../src/components/data-table/pagination/Pagination.tsx","../src/components/data-table/DataTable.tsx","../src/components/calendar/constants.ts","../src/components/calendar/Day.tsx","../src/components/calendar/Calendar.tsx","../src/components/date-input/constants.ts","../src/components/date-input/DateInput.tsx","../src/components/date-field/DateField.tsx","../src/components/dialog/DialogActionBar.tsx","../src/components/dialog/DialogBackground.tsx","../src/components/dialog/DialogClose.tsx","../src/utilities/style/backdrop-overlay.ts","../src/components/dialog/DialogContent.tsx","../src/components/dialog/DialogFooter.tsx","../src/components/dialog/DialogHeading.tsx","../src/components/dialog/DialogNavigationBar.tsx","../src/components/dialog/DialogScrollableContent.tsx","../src/components/dialog/Dialog.tsx","../src/components/drawer/DrawerOverlay.tsx","../src/components/drawer/DrawerContent.tsx","../src/components/drawer/Drawer.context.tsx","../src/components/drawer/DrawerClose.tsx","../src/components/drawer/DrawerFooter.tsx","../src/components/drawer/DrawerHeader.tsx","../src/components/drawer/DrawerMain.tsx","../src/components/drawer/DrawerTrigger.tsx","../src/components/drawer/Drawer.tsx","../src/components/dropdown-menu/DropdownMenuContent.tsx","../src/components/dropdown-menu/DropdownMenuItem.tsx","../src/components/dropdown-menu/DropdownMenuLabel.tsx","../src/components/dropdown-menu/DropdownMenuLinkItem.tsx","../src/components/dropdown-menu/DropdownMenuSeparator.tsx","../src/components/dropdown-menu/DropdownMenuTrigger.tsx","../src/components/dropdown-menu/DropdownMenu.tsx","../src/components/file-input/FileInput.tsx","../src/components/flex/Flex.tsx","../src/components/form/Form.tsx","../src/components/grid/Grid.tsx","../src/components/input-field/InputField.tsx","../src/components/list/List.tsx","../src/components/markdown-content/components/MarkdownCode.tsx","../src/components/markdown-content/components/MarkdownEmphasis.tsx","../src/components/markdown-content/components/MarkdownHeading.tsx","../src/components/markdown-content/components/MarkdownImage.tsx","../src/components/markdown-content/components/MarkdownInlineCode.tsx","../src/components/markdown-content/components/MarkdownLink.tsx","../src/components/markdown-content/components/MarkdownList.tsx","../src/components/markdown-content/components/MarkdownListItem.tsx","../src/components/markdown-content/components/MarkdownParagraph.tsx","../src/components/markdown-content/components/MarkdownStrong.tsx","../src/components/markdown-content/components/MarkdownText.tsx","../src/components/markdown-content/components/MarkdownThematicBreak.tsx","../src/components/markdown-content/MarkdownContent.tsx","../src/components/navigation/NavigationMenu.colorscheme.config.ts","../src/components/navigation/NavigationMenu.context.tsx","../src/utilities/event/preventEvent.ts","../src/components/navigation/NavigationMenuDropdownContent.tsx","../src/components/navigation/NavigationMenu.styles.ts","../src/components/navigation/NavigationMenuDropdownTrigger.tsx","../src/components/navigation/NavigationMenuDropdown.tsx","../src/components/navigation/NavigationMenuLink.tsx","../src/components/navigation/NavigationMenuDropdownItem.tsx","../src/components/navigation/NavigationMenu.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.colorscheme.config.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalItem.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalList.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts","../src/components/navigation-menu-vertical/NavigationMenuVerticalIcon.tsx","../src/components/side-bar/SideBar.context.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalText.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.tsx","../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx","../src/components/navigation-menu-vertical/NavigationMenuVertical.tsx","../src/components/notification-badge/NotificationBadge.tsx","../src/components/number-input/NumberInputStepper.tsx","../src/components/number-input/NumberInput.tsx","../src/components/number-input-field/NumberInputField.tsx","../src/components/progress-bar/ProgressBar.tsx","../src/components/radio-button/RadioButtonGroup.tsx","../src/components/radio-button-field/RadioField.tsx","../src/components/radio-button-field/RadioButtonField.tsx","../src/components/radio-card/RadioCard.tsx","../src/components/radio-card/RadioCardGroup.tsx","../src/components/search-field/SearchField.tsx","../src/components/section-message/SectionMessage.context.tsx","../src/components/section-message/SectionMessageDescription.tsx","../src/components/section-message/SectionMessageDismiss.tsx","../src/components/section-message/SectionMessageIcon.tsx","../src/components/section-message/SectionMessageLayout.tsx","../src/components/section-message/SectionMessageTitle.tsx","../src/components/section-message/SectionMessage.tsx","../src/components/select/Select.tsx","../src/components/select-field/SelectField.tsx","../src/components/select-menu/SelectMenu.context.tsx","../src/components/select-menu/SelectMenuContent.tsx","../src/components/select-menu/SelectMenuItem.tsx","../src/components/select-menu/SelectMenuLabel.tsx","../src/components/select-menu/SelectMenuSeparator.tsx","../src/components/select-menu/SelectMenuTrigger.tsx","../src/components/select-menu/SelectMenu.tsx","../src/components/select-menu-field/SelectMenuField.tsx","../src/components/side-bar/SideBarComponents.tsx","../src/components/side-bar/SideBar.tsx","../src/components/slider/SliderSteps.tsx","../src/components/slider/SliderValue.tsx","../src/components/slider/Slider.tsx","../src/components/slider-field/SliderField.tsx","../src/components/skeleton-loader/Skeleton.tsx","../src/components/skeleton-loader/SkeletonHeading.tsx","../src/components/skeleton-loader/SkeletonButton.tsx","../src/components/tile/Tile.tsx","../src/components/skeleton-loader/SkeletonTabs.tsx","../src/components/skeleton-loader/SkeletonDoughnutChart.tsx","../src/components/skeleton-loader/SkeletonTable.tsx","../src/components/skeleton-loader/SkeletonCard.tsx","../src/components/skeleton-loader/SkeletonColumnChart.tsx","../src/components/skeleton-loader/SkeletonBarChart.tsx","../src/components/skeleton-loader/SkeletonPanelList.tsx","../src/components/skeleton-loader/SkeletonSubjectList.tsx","../src/components/skeleton-loader/index.ts","../src/components/spacer/Spacer.tsx","../src/components/stepper/Stepper.context.tsx","../src/components/stepper/StepperStepBack.tsx","../src/components/stepper/StepperStepForward.tsx","../src/components/stepper/StepperStepBullet.tsx","../src/components/stepper/StepperStepContainer.tsx","../src/components/stepper/StepperStepLabel.tsx","../src/components/stepper/types.ts","../src/components/stepper/StepperSteps.tsx","../src/components/stepper/Stepper.tsx","../src/components/switch/Switch.tsx","../src/components/tabs/TabsContent.tsx","../src/components/tabs/TabsTrigger.tsx","../src/utilities/hooks/useScrollPosition.ts","../src/utilities/hooks/useSize.ts","../src/components/tabs/TabsTriggerList.tsx","../src/components/tabs/Tabs.tsx","../src/components/textarea/Textarea.tsx","../src/components/textarea-field/TextareaField.tsx","../src/components/tile-interactive/TileInteractive.tsx","../src/components/tile-toggle-group/TileToggleGroupItem.tsx","../src/components/tile-toggle-group/TileToggleGroupRoot.tsx","../src/components/tile-toggle-group/index.ts","../src/components/toast/Toast.context.tsx","../src/components/toast/ToastCloseButton.tsx","../src/components/toast/ToastIcon.tsx","../src/components/toast/Toast.tsx","../src/components/toast/ToastProvider.tsx","../src/components/toast/index.ts","../src/components/toggle-group/ToggleGroupItem.tsx","../src/components/toggle-group/ToggleGroupButton.tsx","../src/components/toggle-group/ToggleGroupRoot.tsx","../src/components/toggle-group/index.ts","../src/utilities/hooks/useWindowScrollPosition.ts","../src/components/top-bar/TopBar.colorscheme.config.ts","../src/components/top-bar/TopBarActionIcon.tsx","../src/components/top-bar/TopBarBrand.tsx","../src/components/top-bar/TopBar.tsx","../src/components/video/Video.tsx","../src/components/keyboard-shortcut/KeyboardShortcut.tsx","../src/components/keyboard-shortcut/index.ts","../src/components/segmented-control/SegmentedControl.context.tsx","../src/components/segmented-control/SegmentedControlBadge.tsx","../src/components/segmented-control/SegmentedControlContent.tsx","../src/components/segmented-control/SegmentedControlDescription.tsx","../src/components/segmented-control/SegmentedControlHeading.tsx","../src/components/segmented-control/SegmentedControlIcon.tsx","../src/components/segmented-control/SegmentedControlItem.tsx","../src/components/segmented-control/SegmentedControlItemList.tsx","../src/components/segmented-control/SegmentedControlRoot.tsx","../src/components/segmented-control/SegmentedControl.tsx","../src/components/file-drop/FileDrop.context.ts","../src/components/file-drop/FileDrop.tsx","../src/components/file-drop/useFileDrop.ts","../src/components/index.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nexport const useIsMountedRef = () => {\n const isMountedRef = useRef<boolean | undefined>(undefined)\n\n useEffect(() => {\n isMountedRef.current = true\n return () => {\n isMountedRef.current = false\n }\n })\n\n return isMountedRef\n}\n","import clsx, { type ClassValue } from 'clsx'\nimport React, { type ElementType, type ReactElement } from 'react'\nimport { extendTailwindMerge } from 'tailwind-merge'\nimport { defaultConfig, tv } from 'tailwind-variants'\n\ndefaultConfig.twMerge = false\n\nconst isArbitraryNumber = (value: string) =>\n /^\\[[\\d.]+\\]$/.test(value) || !Number.isNaN(Number(value))\n\nconst twMerge = extendTailwindMerge<\n 'capsize' | 'capsize-before' | 'capsize-after'\n>({\n extend: {\n classGroups: {\n capsize: [{ capsize: ['none', isArbitraryNumber] }],\n 'capsize-before': [{ 'capsize-before': [isArbitraryNumber] }],\n 'capsize-after': [{ 'capsize-after': [isArbitraryNumber] }]\n },\n conflictingClassGroups: {\n capsize: ['capsize-before', 'capsize-after'],\n 'capsize-before': ['capsize'],\n 'capsize-after': ['capsize']\n }\n }\n})\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs))\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\n\nexport const Theme = ({\n children,\n theme\n}: React.PropsWithChildren<{ theme?: Record<string, string> }>) => (\n <div className=\"contents\" style={theme}>\n {children}\n </div>\n)\n\nexport const createTheme = (config: Record<string, Record<string, string>>) =>\n Object.fromEntries(\n Object.values(config).flatMap((tokens) =>\n Object.entries(tokens).map(([token, value]) => [`--${token}`, value])\n )\n )\n\n// ---------------------------------------------------------------------------\n// Local typing for styled()\n// ---------------------------------------------------------------------------\n\n// Responsive variant prop: either a single value or a per-breakpoint map\n// Each breakpoint can have a different value from the union type V\ntype ResponsiveVariant<V extends string | number | boolean> =\n | V\n | Partial<Record<Breakpoint, V>>\n\n// Helpers to derive value type from variant config keys\ntype Keys<V> = keyof V\ntype StringKeys<V> = Extract<Keys<V>, string>\ntype NumberKeys<V> = Extract<Keys<V>, number>\n// Booleans are represented as string keys \"true\"/\"false\" in our VariantConfig,\n// so we only need to detect those in StringKeys.\ntype BooleanKeys<V> = Extract<StringKeys<V>, 'true' | 'false'>\n\ntype HasBoolLikeKeys<V> =\n BooleanKeys<V> extends never\n ? Extract<StringKeys<V>, 'true' | 'false'> extends never\n ? false\n : true\n : true\n\n// If a variant's keys are boolean-like, expose the prop as boolean.\n// If it has numeric keys, allow those numbers and their string forms.\n// Otherwise use a string union of the keys.\ntype VariantValueType<V> =\n HasBoolLikeKeys<V> extends true\n ? boolean\n : [NumberKeys<V>] extends [never]\n ? StringKeys<V>\n : NumberKeys<V> | `${NumberKeys<V>}`\n\n// Shape of the `variants` section passed to styled()\ntype VariantConfig = Record<string, Record<string | number, string | string[]>>\n\n// Options for styled() function\ntype StyledOptions = {\n enableResponsiveVariants?: boolean\n enablePolymorphism?: boolean\n}\n\n// Helper to check if responsive variants are enabled\ntype AreResponsiveVariantsEnabled<O> = O extends {\n enableResponsiveVariants: true\n}\n ? true\n : false\n\n// Props derived from a `variants` config\n// If enableResponsiveVariants is true, all variants support responsive values\n// If enableResponsiveVariants is not provided or false, variants do not support responsive values\ntype VariantProps<\n V extends VariantConfig | undefined,\n R extends boolean = false\n> = V extends VariantConfig\n ? R extends true\n ? {\n [K in keyof V]?: ResponsiveVariant<VariantValueType<V[K]>>\n }\n : {\n [K in keyof V]?: VariantValueType<V[K]>\n }\n : unknown\n\n// Typed config for our styled helper.\n// We intentionally *don't* rely on tailwind-variants' TS types here;\n// we only care about enough structure to derive props.\ntype StyledConfig<V extends VariantConfig | undefined = undefined> = {\n base?: string | string[]\n variants?: V\n compoundVariants?: Array<\n {\n class?: string | string[]\n } & (V extends VariantConfig\n ? {\n [K in keyof V]?: VariantValueType<V[K]> | VariantValueType<V[K]>[]\n }\n : Record<string, never>)\n >\n defaultVariants?: V extends VariantConfig\n ? { [K in keyof V]?: VariantValueType<V[K]> }\n : Record<string, never>\n}\n\n// Props of the default element. `as` is typed `never` so JSX usage with `as`\n// can only resolve through the generic polymorphic signature — signatures\n// built from this can never accept calls the generic one would reject.\ntype DefaultElementProps<\n TDefaultElement extends ElementType,\n OwnProps\n> = OwnProps & { as?: never } & Omit<\n React.ComponentPropsWithRef<TDefaultElement>,\n keyof OwnProps | 'as'\n >\n\n// Polymorphic component type: `as` prop narrows accepted props and ref type.\n//\n// The non-generic default-element signature appears twice on purpose. Tooling\n// that inspects call signatures disagrees on which one to read: props-table\n// generation (react-docgen-typescript) reads the FIRST, while type-level\n// inference (React.ComponentProps and friends) reads the LAST. If either\n// tool lands on the generic signature instead, TAs erases to its ElementType\n// constraint and the props collapse to `any` (docgen then also loses every\n// element-specific prop, e.g. Radix's asChild).\nexport interface PolymorphicComponent<\n TDefaultElement extends ElementType,\n OwnProps\n> {\n (\n props: DefaultElementProps<TDefaultElement, OwnProps>\n ): React.ReactElement | null\n <TAs extends ElementType = TDefaultElement>(\n props: OwnProps & { as?: TAs } & Omit<\n React.ComponentPropsWithRef<TAs>,\n keyof OwnProps | 'as'\n >\n ): React.ReactElement | null\n (\n props: DefaultElementProps<TDefaultElement, OwnProps>\n ): React.ReactElement | null\n displayName?: string\n __isStyledComponent?: boolean\n}\n\n// Non-polymorphic component type: no `as` prop. Single concrete call\n// signature, so React.ComponentProps and react-docgen-typescript both read\n// it directly — no sandwich needed.\nexport interface StyledComponent<\n TDefaultElement extends ElementType,\n OwnProps\n> {\n (\n props: OwnProps &\n Omit<React.ComponentPropsWithRef<TDefaultElement>, keyof OwnProps | 'as'>\n ): React.ReactElement | null\n displayName?: string\n __isStyledComponent?: boolean\n}\n\ntype PolymorphicElementProps<E extends ElementType, OwnProps> = OwnProps & {\n as?: E\n} & Omit<React.ComponentPropsWithRef<E>, keyof OwnProps | 'as'>\n\n/**\n * Extract the props a styled component accepts, optionally for a specific\n * `as` element. `React.ComponentProps<typeof Box>` only describes the default\n * element (with `as` unusable); use this to retarget or to build wrappers\n * that re-expose polymorphism:\n *\n * ```tsx\n * type AnchorBoxProps = StyledComponentProps<typeof Box, 'a'> // href, anchor ref…\n * ```\n */\nexport type StyledComponentProps<C, TAs extends ElementType = never> =\n C extends PolymorphicComponent<\n infer TDefault extends ElementType,\n infer OwnProps\n >\n ? PolymorphicElementProps<[TAs] extends [never] ? TDefault : TAs, OwnProps>\n : C extends ElementType\n ? React.ComponentPropsWithRef<[TAs] extends [never] ? C : TAs>\n : never\n\n// Function overloads for better type inference\n\n// enablePolymorphism: false — no `as` prop\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enablePolymorphism: false; enableResponsiveVariants: true }\n): StyledComponent<TElement, VariantProps<V, true>>\n\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enablePolymorphism: false }\n): StyledComponent<TElement, VariantProps<V, false>>\n\n// enablePolymorphism: true (default) — `as` prop available\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>,\n options: { enableResponsiveVariants: true }\n): PolymorphicComponent<TElement, VariantProps<V, true>>\n\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined\n>(\n el: TElement,\n styles: StyledConfig<V>\n): PolymorphicComponent<TElement, VariantProps<V, false>>\n\n// Implementation\nexport function styled<\n TElement extends ElementType,\n V extends VariantConfig | undefined = undefined,\n O extends StyledOptions | undefined = undefined\n>(el: TElement, styles: StyledConfig<V>, options?: O) {\n const variantKeys = Object.keys(styles.variants || {})\n const enableResponsiveVariants = options?.enableResponsiveVariants === true\n const tvFn = tv(styles as any)\n\n type ResponsiveVariantsEnabled = AreResponsiveVariantsEnabled<O>\n type VariantPropsType = VariantProps<V, ResponsiveVariantsEnabled>\n type BaseProps = React.ComponentPropsWithRef<TElement>\n // Extract variant keys to omit from BaseProps so variant props override native HTML attributes\n type VariantKeys = V extends VariantConfig ? keyof V : never\n type StyledProps = Omit<BaseProps, VariantKeys> &\n VariantPropsType & {\n as?: ElementType\n ref?: React.Ref<React.ComponentRef<TElement>>\n className?: string\n /** @internal wrapper classes passed between nested styled components */\n __wrapperClasses?: string\n }\n\n const Comp = (props: StyledProps) => {\n const { ref, ...propsWithoutRef } = props\n const additionalStyles = enableResponsiveVariants\n ? variantKeys\n .map((variantKey) => {\n const responsiveVariantConfig:\n | Record<Breakpoint, string | number>\n | undefined = props[variantKey]\n const variantStyles: Record<string, string | string[]> =\n styles.variants![variantKey]\n\n if (\n typeof responsiveVariantConfig === 'object' &&\n responsiveVariantConfig &&\n !Array.isArray(responsiveVariantConfig)\n ) {\n return Object.entries(responsiveVariantConfig).flatMap(\n ([key, val]) => {\n const valStr = String(val)\n const styleArr: string | string[] =\n variantStyles && variantStyles[valStr]\n\n if (styleArr && Array.isArray(styleArr)) {\n return styleArr.flatMap((cls: string) => {\n if (key === '@initial') return cls\n return `${key.replace('@', '')}:${cls}`\n })\n }\n return []\n }\n )\n }\n\n return []\n })\n .flat()\n : []\n\n // Filter out variant props that don't belong to this component before calling tvFn\n // This prevents tailwind-variants from processing props meant for wrapped components\n // Only pass props that are in this component's variant keys\n // For boolean variants, only include them if the value is explicitly true or false (not null/undefined)\n // Note: tailwind-variants treats null as \"no variant\" but undefined/missing as \"apply false variant\"\n // So we need to convert undefined to null for boolean variants to prevent default behavior\n const propsForTv =\n variantKeys.length > 0\n ? Object.fromEntries(\n Object.entries(props as Record<string, unknown>)\n .filter(([key]) => variantKeys.includes(key))\n .map(([key, value]) => {\n // Check if this is a boolean variant (has both 'true' and 'false' keys)\n const variantConfig = styles.variants?.[key]\n if (\n variantConfig &&\n 'true' in variantConfig &&\n 'false' in variantConfig\n ) {\n // For boolean variants, only include if value is explicitly true or false\n // Convert undefined to null to prevent tailwind-variants from applying false variant\n if (value === true || value === false) {\n return [key, value]\n }\n // For null/undefined, pass null to prevent tailwind-variants from applying defaults\n // This ensures that when a boolean prop is explicitly null/undefined, no variant is applied\n return [key, null]\n }\n // For non-boolean variants, pass value as-is (including null/undefined)\n return [key, value]\n })\n )\n : {}\n\n const cls = tvFn(propsForTv)\n\n const filteredProps = Object.fromEntries(\n Object.entries(props).filter(\n ([key]) =>\n !variantKeys.includes(key) &&\n key !== 'as' &&\n key !== '__wrapperClasses'\n )\n )\n\n const mergedClassName = clsx(cls, additionalStyles).trim()\n const propsClassName = props.className\n // Check for wrapper classes passed from a parent styled component\n const wrapperClasses = props.__wrapperClasses\n\n if (\n typeof el === 'string' ||\n typeof el === 'function' ||\n (el && typeof el === 'object')\n ) {\n const elementType = el as ElementType\n\n // If el is a host string ('div', 'span', etc.) we must not pass variant props to the DOM.\n if (typeof el === 'string') {\n const { className: _, ...restFilteredProps } = filteredProps as any\n // Merge order: wrapper classes (lowest priority) < component classes < user's className (highest priority)\n // This ensures variant classes from this component override base classes from wrapper\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure child's classes win\n // over parent classes, but user's className should still have highest priority.\n // Strategy: Only apply special merge when wrapperClasses exist (nested styled component scenario).\n // For regular cases (no wrapperClasses), use standard merge order so user's className has highest priority.\n const finalClassName =\n wrapperClasses && propsClassName\n ? twMerge(mergedClassName, wrapperClasses, propsClassName) // wrapper overrides base, user className wins\n : wrapperClasses\n ? twMerge(mergedClassName, wrapperClasses) // wrapper overrides base\n : propsClassName\n ? (() => {\n // When propsClassName comes from asChild (Radix), we want this component's classes to win\n // When propsClassName is a regular className prop, the user's className should win (highest priority)\n // We can detect asChild scenario by checking if propsClassName contains classes that look like they came from a parent component\n // (e.g., data attribute variants like data-[state=closed]:rounded-sm)\n // If it does, treat it as asChild and let component classes win. Otherwise, let user's className win.\n const hasDataAttributeVariants = propsClassName\n .split(' ')\n .some((cls) => /^data-\\[state=[^\\]]+\\]:/.test(cls))\n\n if (hasDataAttributeVariants) {\n // This is likely from asChild - component's classes should win\n return twMerge(propsClassName, mergedClassName)\n } else {\n // Regular className prop - user's className should win (highest priority)\n return twMerge(mergedClassName, propsClassName)\n }\n })()\n : twMerge(mergedClassName) // Always merge mergedClassName to resolve conflicts within it (e.g., bg-[unset] vs bg-(--base))\n\n return React.createElement(props.as || elementType, {\n ...restFilteredProps,\n ref,\n className: finalClassName\n })\n }\n\n // If el is a function component (including forwardRef), pass ALL props through\n // (the wrapped component may expect variant props), but ensure className and ref are forwarded.\n // We need to pass all props (not filteredProps) because the underlying component may have its own variants\n //\n // For className merging with wrapped styled components:\n // Solution: Pass wrapper's classes via __wrapperClasses prop for styled components to merge correctly.\n // For regular function components, merge wrapper classes with our classes and pass as className.\n // This ensures:\n // - Styled components can merge: wrapper classes < wrapped component classes < user's className\n // - Regular components get merged classes directly and don't receive __wrapperClasses\n // Filter out variant props and __wrapperClasses from props passed to function components\n // This prevents them from ending up in the DOM.\n // Note: We filter out variant props that belong to THIS component. Variant props that belong to\n // the wrapped component will be passed through (they're not in variantKeys), and the wrapped\n // component will filter them if it's a styled component.\n // Note: 'as' prop is filtered from filteredProps to prevent it from going to DOM for string elements,\n // but we add it back for function components since they need it for polymorphism.\n const { className: _, ...restFilteredProps } = filteredProps as any\n const asProp = props.as // Extract 'as' prop separately\n // Note: __wrapperClasses is already filtered out in filteredProps, so restFilteredProps doesn't include it\n\n // For styled components: Pass wrapper classes via __wrapperClasses so they can merge correctly.\n // Styled components extract __wrapperClasses from props (before filteredProps) and filter it in filteredProps.\n // For regular function components: We merge wrapper classes into className, but also pass __wrapperClasses\n // which they may spread. To prevent it in DOM, we need to ensure it's filtered, but we can't control that.\n // However, styled components that wrap regular components will filter __wrapperClasses in their filteredProps.\n if (wrapperClasses) {\n // We have wrapper classes from parent - this is a nested styled component scenario\n // Merge order: wrapper classes (base) < this component's classes (variants) < user's className\n // This ensures variant classes override base classes via twMerge\n // IMPORTANT: When propsClassName exists (could be from asChild), we need to ensure this component's classes win.\n // Strategy: Merge wrapperClasses with propsClassName first, then merge with mergedClassName last.\n // This ensures: wrapperClasses < propsClassName < mergedClassName (this component's classes win)\n // This is critical when propsClassName contains parent classes from asChild merge.\n const finalClassName = propsClassName\n ? twMerge(wrapperClasses, propsClassName, mergedClassName) // This component's classes win by being merged last\n : twMerge(wrapperClasses, mergedClassName)\n\n // Check if the wrapped component is a styled component\n // React.forwardRef components are objects, not functions\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Base props (filters THIS component's variant props, __wrapperClasses, 'as')\n ...(asProp ? { as: asProp } : {}), // Add 'as' prop back for function components (polymorphic support)\n // Note: We don't add variant props back - they're already filtered by filteredProps.\n ref\n }\n\n if (isStyledComponent) {\n // Wrapped component is a styled component - pass __wrapperClasses so variant classes win\n // IMPORTANT: When propsClassName exists (could be from asChild), it may contain both parent and child classes.\n // We should NOT merge propsClassName with mergedClassName here, because that would remove child classes.\n // Instead, pass propsClassName as-is (or merge only wrapperClasses with mergedClassName) so the child\n // can merge its own classes last. The child will merge: twMerge(__wrapperClasses, propsClassName, child's mergedClassName).\n // This ensures child's classes win by being merged last.\n // Merge wrapperClasses with mergedClassName to create the wrapper classes for the child\n const combinedWrapperClasses = twMerge(\n wrapperClasses,\n mergedClassName\n )\n propsForComponent.__wrapperClasses = combinedWrapperClasses\n propsForComponent.className = propsClassName || undefined\n } else {\n // Wrapped component is not a styled component - merge wrapper classes into className\n // and don't pass __wrapperClasses (it would end up in DOM)\n propsForComponent.className = finalClassName\n }\n return React.createElement(elementType, propsForComponent)\n } else {\n // No wrapper classes from parent - we're top-level\n // For function components: Pass __wrapperClasses so styled components can merge correctly.\n // Styled components extract __wrapperClasses from their props (before filteredProps) and filter it in filteredProps.\n // Regular function components will receive __wrapperClasses but should filter it out themselves.\n // We also merge wrapper classes into className for regular function components.\n // Note: We pass __wrapperClasses in props (not filteredProps) so styled components can access it,\n // but styled components filter it in their filteredProps so it won't go to DOM.\n // Regular function components that spread all props will pass __wrapperClasses to DOM, which is a problem.\n // But we can't distinguish them, so we rely on styled components filtering it.\n // Check if the wrapped component is a styled component\n // elementType is the component itself (e.g., Inner when Outer extends Inner)\n // React.forwardRef components are objects, not functions, but we can still check the flag\n const isStyledComponent =\n (typeof elementType === 'function' ||\n typeof elementType === 'object') &&\n elementType !== null &&\n (elementType as any).__isStyledComponent === true\n\n const propsForComponent: any = {\n ...restFilteredProps, // Filters out __wrapperClasses, variant props, 'as'\n ...(asProp ? { as: asProp } : {}),\n ref\n }\n\n if (isStyledComponent) {\n // Styled component - pass wrapper classes via __wrapperClasses so variant classes can take precedence\n // IMPORTANT: When propsClassName exists, we need to distinguish between:\n // 1. User's className (should win - highest priority)\n // 2. className from asChild/parent component (component's classes should win)\n // We detect asChild by checking for data attribute variants (e.g., data-[state=closed]:rounded-sm)\n const hasDataAttributeVariants = propsClassName\n ? propsClassName\n .split(' ')\n .some((cls) => /^data-\\[state=[^\\]]+\\]:/.test(cls))\n : false\n\n const mergedPropsAndComponent = propsClassName\n ? hasDataAttributeVariants\n ? // This is likely from asChild - component's classes should win\n twMerge(propsClassName, mergedClassName)\n : // Regular user className - user's className should win (highest priority)\n twMerge(mergedClassName, propsClassName)\n : mergedClassName\n propsForComponent.__wrapperClasses = mergedClassName\n propsForComponent.className = mergedPropsAndComponent || undefined\n } else {\n // Regular function component - merge wrapper classes into className\n // Standard merge order: component classes < user's className (highest priority)\n propsForComponent.className = twMerge(mergedClassName, propsClassName)\n }\n return React.createElement(elementType, propsForComponent)\n }\n }\n\n if (React.isValidElement(el)) {\n const element = el as ReactElement<unknown>\n // Merge existing element className, incoming filteredProps.className and our computed class\n const existingClass = (element.props as any).className\n const incomingClass = (filteredProps as any).className\n const finalClassName = cn(\n existingClass,\n incomingClass,\n mergedClassName\n ).trim()\n\n const cloneProps: any = {\n // ...element.props,\n ...filteredProps,\n as: props.as || (element.props as { as?: ElementType }).as,\n className: finalClassName\n }\n\n // Forward the ref if provided\n if (ref) {\n cloneProps.ref = ref\n }\n\n return React.cloneElement(element, cloneProps)\n }\n\n throw Error('Something is wrong')\n }\n\n // Mark the component as a styled component so we can detect it later\n ;(Comp as any).__isStyledComponent = true\n\n // Name the component for DevTools and error component stacks — without\n // this every styled component reads as the inner function name, \"Comp\"\n const baseName =\n typeof el === 'string'\n ? el\n : (el as any).displayName || (el as any).name || 'Component'\n Comp.displayName = baseName.startsWith('styled.')\n ? baseName\n : `styled.${baseName}`\n\n return Comp\n}\n","export const isExternalUrl = (url?: string) => {\n if (!url) return false\n\n const isAbsoluteUrl = /^https?:\\/\\//.test(url)\n if (typeof window === 'undefined') return isAbsoluteUrl\n return isAbsoluteUrl && new URL(url).origin !== window.location.origin\n}\n\nexport const getExternalAnchorProps = (url?: string) =>\n isExternalUrl(url) ? { target: '_blank', rel: 'noopener noreferrer' } : {}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\n\nconst Dot = styled('div', {\n base: [\n 'animate-pulse',\n 'bg-current',\n 'rounded-full',\n 'animation-duration-900',\n 'nth-3:animation-delay-300',\n 'nth-4:animation-delay-600'\n ],\n variants: {\n size: {\n sm: ['size-1', 'mx-0.5'],\n md: ['size-1.5', 'mx-0.5'],\n lg: ['size-2', 'mx-[3px]']\n }\n }\n})\n\ntype LoaderProps = React.ComponentProps<'div'> & {\n message?: string\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport const Loader = ({\n className,\n message = 'Loading',\n size = 'md',\n ...rest\n}: LoaderProps) => (\n <div\n className={cn('flex', 'justify-center', className)}\n role=\"alert\"\n {...rest}\n >\n <span className=\"sr-only\">{message}</span>\n <Dot size={size} />\n <Dot size={size} />\n <Dot size={size} />\n </div>\n)\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, styled } from '../../styled'\nimport type { NavigatorActions } from '../../types/navigatorActions.types'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { Loader } from '../loader/Loader'\n\nexport const StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'bg-[unset]',\n 'rounded-md',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-semibold',\n 'justify-center',\n 'no-underline',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'whitespace-nowrap',\n 'w-max',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n secondary: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]',\n '[--text:var(--color-grey-800)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n neutral: [\n '[--base:white]',\n '[--interact:rgba(255,255,255,0.9)]',\n '[--active:rgba(255,255,255,0.75)]',\n '[--text:var(--color-primary-800)]'\n ]\n },\n appearance: {\n solid: [\n 'bg-(--base)',\n 'text-(--text,white)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:bg-(--interact)',\n 'not-disabled:hover:text-(--text,white)',\n 'not-disabled:focus:bg-(--interact)',\n 'not-disabled:focus:text-(--text,white)',\n 'not-disabled:active:bg-(--active)'\n ],\n outline: [\n 'border',\n 'border-current',\n 'text-(--base)',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'not-disabled:hover:no-underline',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:no-underline',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ]\n },\n size: {\n sm: [\n 'text-sm',\n 'leading-[1.53]',\n 'h-8',\n 'px-4',\n 'gap-2',\n '[&_svg]:size-4'\n ],\n md: [\n 'text-md',\n 'leading-normal',\n 'h-10',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-5'\n ],\n lg: [\n 'text-lg',\n 'leading-normal',\n 'h-12',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ],\n xl: [\n 'text-lg',\n 'leading-normal',\n 'h-16',\n 'px-8',\n 'gap-3',\n '[&_svg]:size-[22px]'\n ]\n },\n isLoading: {\n true: ['cursor-not-allowed opacity-60 pointer-events-none']\n },\n fullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n },\n defaultVariants: {\n appearance: 'solid',\n size: 'md',\n theme: 'primary'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\n// @__PURE__ keeps this tree-shakable for consumers importing only\n// StyledButton from this module.\nconst LoaderContentsWrapper = /* @__PURE__ */ styled(\n 'span',\n {\n base: ['items-center', 'flex', 'justify-center', 'invisible'],\n variants: {\n size: {\n sm: ['gap-2'],\n md: ['gap-3'],\n lg: ['gap-3'],\n xl: ['gap-3']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst WithLoader = ({\n size,\n children\n}: React.ComponentProps<typeof LoaderContentsWrapper>) => (\n <>\n <Loader className=\"absolute\" />\n <LoaderContentsWrapper size={size}>{children}</LoaderContentsWrapper>\n </>\n)\n\ntype ButtonCustomProps = {\n children: React.ReactNode\n href?: string\n isLoading?: boolean\n} & NavigatorActions\n\ntype ButtonProps = Override<\n React.ComponentProps<typeof StyledButton>,\n ButtonCustomProps & { as?: React.ElementType }\n>\n\n// Re-expose StyledButton's variant props merged with our own, so the public\n// polymorphic type re-checks props against whatever `as` target is passed\ntype StyledButtonOwnProps =\n typeof StyledButton extends PolymorphicComponent<\n infer _Element extends React.ElementType,\n infer OwnProps\n >\n ? OwnProps\n : never\n\ntype ButtonOwnProps = Override<StyledButtonOwnProps, ButtonCustomProps>\n\nexport const Button = (({\n ref,\n children,\n as,\n href,\n isLoading = false,\n onClick,\n disabled,\n ...rest\n}: ButtonProps) => (\n <StyledButton\n as={as || (href ? 'a' : undefined)}\n {...(!disabled && !isLoading && { href, onClick })}\n isLoading={isLoading}\n type={!href ? 'button' : undefined}\n disabled={disabled}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n >\n {isLoading ? (\n <WithLoader size={rest.size}>{children}</WithLoader>\n ) : (\n children\n )}\n </StyledButton>\n)) as PolymorphicComponent<'button', ButtonOwnProps>\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const Heading = styled(\n 'h2',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['font-body', 'text-md', 'leading-normal', 'capsize-[0.3864]'],\n sm: ['font-body', 'text-lg', 'leading-[1.14]', 'capsize-[0.2078]'],\n md: [\n 'font-display',\n 'text-xl',\n 'leading-[1.14]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.2114]',\n 'capsize-after-[0.2634]'\n ],\n lg: [\n 'font-display',\n 'text-2xl',\n 'leading-[1.08]',\n 'tracking-[0.01em]',\n 'capsize-before-[0.1405]',\n 'capsize-after-[0.2405]'\n ],\n xl: [\n 'font-display',\n 'text-3xl',\n 'leading-[1.12]',\n 'capsize-before-[0.16]',\n 'capsize-after-[0.26]'\n ],\n xxl: [\n 'font-display',\n 'text-4xl',\n 'leading-none',\n 'capsize-before-[0.1]',\n 'capsize-after-[0.2]'\n ]\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n medium: ['font-medium'],\n bold: ['font-bold']\n }\n },\n defaultVariants: {\n size: 'md',\n weight: 'bold'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type HeadingProps = Override<\n React.ComponentProps<typeof Heading>,\n {\n as?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | React.ComponentType\n | React.ElementType\n }\n>\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const Text = styled(\n 'p',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]'],\n '2xl': ['text-2xl', 'leading-[1.40]', 'capsize-[0.3336]'],\n '3xl': ['text-3xl', 'leading-[1.28]', 'capsize-[0.2709]'],\n '4xl': ['text-4xl', 'leading-none', 'capsize-[0.1309]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n normal: ['font-normal'],\n bold: ['font-semibold']\n },\n family: {\n body: ['font-body'],\n display: ['font-display'],\n mono: ['font-mono']\n }\n },\n defaultVariants: {\n size: 'md',\n family: 'body'\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type TextProps = Override<\n React.ComponentProps<typeof Text>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n","import { Content, Overlay, Portal } from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledAlertDialogOverlay = styled(Overlay, {\n base: [\n 'bg-alpha-600',\n 'top-0',\n 'right-0',\n 'bottom-0',\n 'left-0',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n ]\n})\nconst StyledAlertDialogContent = styled(Content, {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'rounded-md',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'max-w-[90vw]',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'focus:outline-none',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n sm: ['w-95'],\n md: ['w-120'],\n lg: ['w-150']\n }\n }\n})\n\nexport const AlertDialogContent = ({\n size = 'sm',\n ...rest\n}: React.ComponentProps<typeof StyledAlertDialogContent>) => (\n <Portal>\n <StyledAlertDialogOverlay />\n <StyledAlertDialogContent size={size} {...rest} />\n </Portal>\n)\n","import {\n Action,\n Cancel,\n Description,\n Root,\n Title,\n Trigger\n} from '@radix-ui/react-alert-dialog'\nimport * as React from 'react'\n\nimport { AlertDialogContent } from './AlertDialogContent'\n\nexport const AlertDialog = /* @__PURE__ */ Object.assign(Root, {\n Description: Description,\n Title: Title,\n Action: Action,\n Cancel: Cancel,\n Content: AlertDialogContent,\n Trigger: Trigger\n})\n\nAlertDialog.displayName = 'AlertDialog'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nexport const StyledIcon = styled(\n 'svg',\n {\n base: [\n 'inline-block',\n 'fill-none',\n 'shrink-0',\n 'stroke-current',\n '[stroke-linecap:round]',\n '[stroke-linejoin:round]',\n 'align-middle'\n ],\n variants: {\n size: {\n sm: ['size-4', 'stroke-[1.5]'],\n md: ['size-6', 'stroke-[1.75]'],\n lg: ['size-8', 'stroke-2']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype IconProps = Override<\n React.ComponentProps<typeof StyledIcon>,\n {\n is: React.FC<React.SVGProps<SVGSVGElement>>\n as?: never\n }\n>\n\nexport const Icon = ({ ref, is: SVG, size = 'md', ...rest }: IconProps) => (\n <StyledIcon size={size} aria-hidden=\"true\" {...rest} as={SVG} ref={ref} />\n)\n","import { Danger, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Icon } from '../../icon/Icon'\n\nexport type AlertDialogTheme = 'info' | 'warning' | 'danger' | 'success'\n\nconst StyledIcon = styled(Icon, {\n base: ['self-start'],\n variants: {\n theme: {\n info: ['text-info'],\n warning: ['text-warning-mid'],\n danger: ['rotate-180', 'text-danger'],\n success: ['text-success']\n }\n }\n})\n\nconst iconMap: Record<\n AlertDialogTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n info: Info,\n warning: Danger,\n danger: Info,\n success: OkCircle\n}\n\nexport const AlertDialogIcon = ({ theme }: { theme: AlertDialogTheme }) => (\n <StyledIcon theme={theme} is={iconMap[theme]} />\n)\n","import * as React from 'react'\n\nimport { Button } from '../../button/Button'\nimport { Heading } from '../../heading/Heading'\nimport { Text } from '../../text/Text'\nimport { AlertDialog } from '../AlertDialog'\nimport { AlertDialogIcon } from './AlertDialogIcon'\nimport type { alert } from './types'\n\ntype AlertDialogContentProps = React.ComponentProps<typeof AlertDialog> & {\n className?: string\n onClose: () => void\n} & alert\n\nexport const Alert = ({\n title,\n size,\n theme,\n description,\n onAction,\n cancelActionText,\n confirmActionText,\n onClose,\n confirmElement,\n cancelElement,\n ...rest\n}: AlertDialogContentProps) => (\n <AlertDialog defaultOpen>\n <AlertDialog.Content\n size={size}\n onEscapeKeyDown={(e) => e.preventDefault()}\n onCloseAutoFocus={onClose}\n {...rest}\n className=\"flex max-h-[90vh] flex-col gap-8\"\n >\n <div className=\"flex items-center gap-2\">\n {theme && <AlertDialogIcon theme={theme} />}\n <Heading as={AlertDialog.Title} size=\"sm\" className=\"mr-4\">\n {title}\n </Heading>\n </div>\n {description && (\n <Text as={AlertDialog.Description} className=\"flex overflow-y-auto\">\n {description}\n </Text>\n )}\n <div className=\"flex flex-wrap justify-end gap-2\">\n <AlertDialog.Cancel asChild>\n {cancelElement ||\n (cancelActionText && (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n onClick={() => onAction?.(false)}\n >\n {cancelActionText}\n </Button>\n ))}\n </AlertDialog.Cancel>\n <AlertDialog.Action asChild>\n {confirmElement || (\n <Button size=\"sm\" onClick={() => onAction?.(true)}>\n {confirmActionText}\n </Button>\n )}\n </AlertDialog.Action>\n </div>\n </AlertDialog.Content>\n </AlertDialog>\n)\n","import { uid } from 'uid'\n\nimport type { alert } from './types'\n\ntype State = alert[]\ntype Action =\n | { type: 'ADD'; payload: alert }\n | { type: 'REMOVE'; payload: string }\n\nexport const initialState = []\n\nexport const reducer = (state: State, action: Action): alert[] => {\n switch (action.type) {\n case 'ADD':\n return [...state, { ...action.payload, id: uid() }]\n case 'REMOVE':\n return state.filter(({ id }) => id !== action.payload)\n default:\n return state\n }\n}\n","import * as React from 'react'\n\nimport { useIsMountedRef } from '../../utilities/hooks/useIsMountedRef'\nimport { Alert } from './alert-context/AlertDialog'\nimport { initialState, reducer } from './alert-context/reducer'\nimport type { alert } from './alert-context/types'\n\ntype context = {\n showAlert: (data: alert) => void\n}\n\nconst AlertContext = React.createContext<context>({\n showAlert: () => null\n})\n\nexport const AlertProvider = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const [alerts, dispatch] = React.useReducer(reducer, initialState)\n const isMountedRef = useIsMountedRef()\n\n return (\n <AlertContext.Provider\n value={{\n showAlert: (content: alert) =>\n dispatch({\n payload: content,\n type: 'ADD'\n })\n }}\n >\n {Boolean(alerts.length) && (\n <Alert\n {...alerts[0]}\n key={alerts[0].id}\n onClose={() => {\n if (isMountedRef.current)\n dispatch({\n payload: alerts[0].id,\n type: 'REMOVE'\n })\n }}\n />\n )}\n {children}\n </AlertContext.Provider>\n )\n}\n\nexport const useAlert = (): context => {\n const context = React.useContext(AlertContext)\n\n if (context === undefined) {\n throw new Error('useAlert must be used within a AlertProvider')\n }\n\n return context\n}\n","import * as React from 'react'\n\ntype CssWrapperProps = {\n className?: string\n children: React.ReactNode\n}\n\nexport const CSSWrapper = ({\n className,\n children\n}: CssWrapperProps): React.ReactElement<unknown> =>\n className ? (\n <div className={className}>{children}</div>\n ) : (\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n <>{children}</>\n )\n\nCSSWrapper.displayName = 'CSSWrapper'\n","import { Content } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\n\nconst StyledContent = styled(Content, {\n base: [\n 'border-none',\n 'w-full',\n 'bg-(--base-1)',\n 'overflow-hidden',\n 'data-[state=open]:rounded-b-sm',\n 'data-[state=open]:rounded-t-none',\n 'motion-safe:data-[state=open]:animate-accordion-open',\n 'motion-safe:data-[state=closed]:animate-accordion-close'\n ]\n})\n\nexport const AccordionContent = ({\n children,\n className,\n ...rest\n}: React.ComponentProps<typeof StyledContent>) => (\n <StyledContent {...rest}>\n <CSSWrapper className={className}>{children}</CSSWrapper>\n </StyledContent>\n)\n","import { Item } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const AccordionItem = styled(\n Item,\n {\n base: ['w-full', 'not-last:mb-1']\n },\n { enablePolymorphism: false }\n)\n","type ColorSchemeKeys = 'interactive' | 'base' | 'accent' | 'foreground'\n\n// ColorScheme is a partial record, but values are always strings (never undefined)\ntype ColorScheme = Partial<\n Record<`--${ColorSchemeKeys}` | `--${ColorSchemeKeys}-${string}`, string>\n>\n\ntype ColorSchemeConfig = { colorName: string; color0?: string }\n\nconst generateColors = ({\n prefix,\n colorName,\n color0 = ''\n}: {\n prefix: ColorSchemeKeys\n colorName: string\n color0?: string\n}): ColorScheme => {\n const colors: Record<string, string> = {}\n let i = 1\n if (color0) {\n colors[`--${prefix}-${i}`] = `var(--color-${color0})`\n i++\n }\n let k = 1\n for (i; i <= 11; i++) {\n colors[`--${prefix}-${i}`] = `var(--color-${colorName}-${k * 100})`\n k++\n }\n return colors as ColorScheme\n}\n\nexport const colorSchemes: Record<string, ColorScheme> = {} as Record<\n string,\n ColorScheme\n>\n\ncolorSchemes['interactive-loContrast'] = {\n '--interactive-foreground': 'var(--foreground)',\n '--interactive-1': 'var(--accent-1)',\n '--interactive-2': 'var(--accent-2)',\n '--interactive-3': 'var(--accent-3)'\n}\n\ncolorSchemes['interactive-hiContrast'] = {\n '--interactive-foreground': 'var(--foreground-7-plus)',\n '--interactive-1': 'var(--accent-9)',\n '--interactive-2': 'var(--accent-10)',\n '--interactive-3': 'var(--accent-11)'\n}\n\nconst colorNames = [\n 'primary',\n 'grey',\n 'blue',\n 'pink',\n 'purple',\n 'cyan',\n 'green',\n 'magenta',\n 'red',\n 'teal',\n 'orange',\n 'yellow',\n 'lime'\n]\n\nconst createVariants = () =>\n Object.fromEntries(\n colorNames.flatMap((c) => [\n [`${c}1`, { colorName: c, color0: 'white' }],\n [`${c}2`, { colorName: c }]\n ])\n ) as Record<string, ColorSchemeConfig>\n\nexport const bases = createVariants()\nexport const accents = bases\n;(() => {\n Object.entries(bases).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n const themeName = `base-${name}`\n colorSchemes[themeName] = {\n '--foreground': 'var(--color-grey-1000)',\n '--foreground-7-plus': 'var(--color-white)',\n ...generateColors({\n prefix: 'base',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n }\n )\n\n Object.entries(accents).forEach(\n ([name, config]: [string, ColorSchemeConfig]) => {\n colorSchemes[`accent-${name}`] = generateColors({\n prefix: 'accent',\n colorName: config.colorName,\n color0: config.color0\n })\n }\n )\n})()\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { accents, bases, colorSchemes } from './ColorScheme.config'\n\nexport type TcolorScheme = {\n base?: keyof typeof bases\n accent?: keyof typeof accents\n interactive?: 'loContrast' | 'hiContrast'\n}\n\ntype ColorSchemeOwnProps = TcolorScheme & {\n asChild?: boolean\n ref?: React.Ref<HTMLDivElement>\n}\n\ntype ColorSchemeProps = React.HTMLAttributes<HTMLDivElement> &\n ColorSchemeOwnProps\n\n/**\n * @experimental Component has not been finalised. Further design input required. Use with caution.\n */\nexport const ColorScheme = ({\n ref,\n base = '',\n accent = '',\n interactive,\n asChild = false,\n ...rest\n}: ColorSchemeProps) => {\n const Component = asChild ? Slot : 'div'\n\n // Build style object - config ensures values are always strings (never undefined)\n const style = {\n ...(interactive && colorSchemes[`interactive-${interactive}`]),\n ...(accent && colorSchemes[`accent-${accent}`]),\n ...(base && colorSchemes[`base-${base}`])\n } as React.CSSProperties\n\n return <Component {...rest} ref={ref} style={style} />\n}\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nconst RotatingIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180',\n '[[data-state=closed]>&]:rotate-0'\n ]\n})\n\nconst StyledTrigger = styled(Trigger, {\n base: [\n 'border-none',\n 'py-3',\n 'px-4',\n 'w-full',\n 'flex',\n 'justify-between',\n 'items-center',\n 'cursor-pointer',\n 'bg-(--interactive-2)',\n 'text-(--interactive-foreground)',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--interactive-3)',\n 'not-disabled:focus-visible:bg-(--interactive-3)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--interactive-3)',\n 'data-[state=open]:rounded-b-none',\n 'data-[state=open]:rounded-t-sm',\n 'data-[state=closed]:rounded-sm'\n ],\n variants: {\n arrowPosition: {\n left: ['flex-row-reverse', 'gap-2', 'justify-end'],\n right: []\n }\n }\n})\n\nexport const AccordionTrigger = ({\n children,\n colorScheme = {},\n asChild,\n arrowPosition = 'right',\n ...rest\n}: React.ComponentProps<typeof StyledTrigger> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme asChild accent=\"grey1\" interactive=\"loContrast\" {...colorScheme}>\n <StyledTrigger asChild={asChild} arrowPosition={arrowPosition} {...rest}>\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <RotatingIcon is={ChevronDown} data-testid=\"accordion-chevron\" />\n </>\n )}\n </StyledTrigger>\n </ColorScheme>\n)\n","import { Root } from '@radix-ui/react-accordion'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { AccordionContent } from './AccordionContent'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionTrigger } from './AccordionTrigger'\n\ntype AccordionProps = React.ComponentProps<typeof Root> & {\n type: 'single' | 'multiple'\n}\n\nconst AccordionBase = ({\n ref,\n type = 'single',\n className,\n children,\n ...rest\n}: AccordionProps) => (\n // eslint-disable-next-line\n // @ts-ignore TODO: Radix has an TS error that throws a warning if you pass multiple in. Needs to be fixed by the owner\n <Root ref={ref} type={type} className={cn('w-full', className)} {...rest}>\n {children}\n </Root>\n)\n\nexport const Accordion = /* @__PURE__ */ Object.assign(AccordionBase, {\n Item: AccordionItem,\n Content: AccordionContent,\n Trigger: AccordionTrigger\n})\n","import { Arrow, Content } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-grey-900',\n 'rounded-sm',\n 'shadow-sm',\n 'text-white',\n 'font-body',\n 'text-sm',\n 'leading-normal',\n 'whitespace-normal',\n 'px-3',\n 'py-2',\n 'z-10',\n 'will-change-transform',\n 'will-change-[opacity]',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=delayed-open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-25'],\n md: ['max-w-[250px]'],\n lg: ['max-w-100']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: [\n 'fill-grey-900',\n 'in-data-[align=end]:mr-2',\n 'in-data-[align=start]:ml-2'\n ]\n})\n\ntype TooltipContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content>\n\nexport const TooltipContent = ({\n children,\n side = 'top',\n sideOffset = 4,\n size = 'md',\n ...rest\n}: TooltipContentProps) => (\n <StyledContent side={side} sideOffset={sideOffset} size={size} {...rest}>\n {children}\n <StyledArrow />\n </StyledContent>\n)\n","import { Portal, Provider, Root, Trigger } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { TooltipContent } from './TooltipContent'\n\ntype TooltipProps = React.ComponentProps<typeof Root>\n\nconst TooltipComponent = ({\n children,\n delayDuration = 350,\n ...rest\n}: TooltipProps) => (\n <Root delayDuration={delayDuration} {...rest}>\n {children}\n </Root>\n)\n\nexport const Tooltip = /* @__PURE__ */ Object.assign(TooltipComponent, {\n Content: TooltipContent,\n Trigger: Trigger,\n Portal: Portal,\n Provider: Provider\n})\n\nTooltipComponent.displayName = 'Tooltip'\n","import * as React from 'react'\n\nimport { Tooltip } from '../../components/tooltip/Tooltip'\n\nexport type OptionalTooltipWrapperProps = {\n hasTooltip?: boolean\n label?: React.ReactNode\n tooltipSide?: React.ComponentProps<typeof Tooltip.Content>['side']\n}\n\nexport const OptionalTooltipWrapper = ({\n hasTooltip,\n label,\n tooltipSide,\n children\n}: React.PropsWithChildren<OptionalTooltipWrapperProps>) => {\n if (hasTooltip) {\n return (\n <Tooltip>\n <Tooltip.Trigger\n asChild\n onFocus={(e: React.FocusEvent) => {\n // Only show the tooltip on keyboard focus, not programmatic focus\n // (e.g. when a dialog auto-focuses this element on open).\n // The browser sets :focus-visible during keyboard navigation,\n // so if it is absent we know the focus was not from the keyboard\n // and call preventDefault() to tell Radix to skip opening the tooltip.\n if (!(e.currentTarget as Element).matches(':focus-visible')) {\n e.preventDefault()\n }\n }}\n >\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content side={tooltipSide}>{label}</Tooltip.Content>\n </Tooltip>\n )\n }\n\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>\n}\n\nOptionalTooltipWrapper.displayName = 'OptionalTooltipWrapper'\n","export const ActionIconSizeMap = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'lg'\n}\n","import invariant from 'invariant'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { NavigatorActions } from '../../types/navigatorActions.types'\nimport type { OptionalTooltipWrapperProps } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { OptionalTooltipWrapper } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { Icon } from '../icon/Icon'\nimport { ActionIconSizeMap } from './ActionIcon.constants'\n\nconst StyledButton = styled(\n 'button',\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-white',\n 'rounded-md',\n 'box-border',\n 'cursor-pointer',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n neutral: [\n '[--solid-base:var(--color-white)]',\n '[--solid-interact:var(--color-grey-100)]',\n '[--solid-active:var(--color-grey-200)]',\n '[--solid-text:var(--color-grey-1200)]',\n '[--base:var(--color-grey-700)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1100)]'\n ],\n primary: [\n '[--base:var(--color-primary-800)]',\n '[--interact:var(--color-primary-900)]',\n '[--active:var(--color-primary-1000)]'\n ],\n primaryDark: [\n '[--base:var(--color-primary-1000)]',\n '[--interact:var(--color-primary-1100)]',\n '[--active:var(--color-primary-1200)]'\n ],\n success: [\n '[--base:var(--color-success)]',\n '[--interact:var(--color-success-mid)]',\n '[--active:var(--color-success-dark)]'\n ],\n warning: [\n '[--base:var(--color-warning)]',\n '[--interact:var(--color-warning-mid)]',\n '[--active:var(--color-warning-dark)]'\n ],\n danger: [\n '[--base:var(--color-danger)]',\n '[--interact:var(--color-danger-mid)]',\n '[--active:var(--color-danger-dark)]'\n ],\n white: [\n '[--base:var(--color-white)]',\n '[--interact:var(--color-white)]',\n '[--active:var(--color-white)]'\n ]\n },\n appearance: {\n simple: [\n 'bg-transparent',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n outline: [\n 'bg-[unset]',\n 'border',\n 'border-current',\n 'text-(--base)',\n 'not-disabled:hover:text-(--interact)',\n 'not-disabled:focus:text-(--interact)',\n 'not-disabled:active:text-(--active)'\n ],\n solid: [\n 'bg-(--solid-base,var(--base))',\n 'text-(--solid-text,white)',\n 'not-disabled:hover:bg-(--solid-interact,var(--interact))',\n 'not-disabled:hover:text-(--solid-text,white)',\n 'not-disabled:focus:bg-(--solid-interact,var(--interact))',\n 'not-disabled:focus:text-(--solid-text,white)',\n 'not-disabled:active:bg-(--solid-active,var(--active))'\n ]\n },\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12']\n },\n isRounded: {\n true: ['rounded-full']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype ActionIconProps = Override<\n React.ComponentProps<typeof StyledButton>,\n {\n as?: React.ElementType\n children: React.ReactNode\n label: string\n } & Omit<OptionalTooltipWrapperProps, 'label'> &\n NavigatorActions\n>\n\nexport const ActionIcon = ({\n ref,\n children,\n theme = 'primary',\n appearance = 'simple',\n size = 'sm',\n label,\n href,\n disabled,\n hasTooltip = true,\n tooltipSide,\n ...rest\n}: ActionIconProps) => {\n const INVALID_CHILDREN_MESSAGE = `A single ${Icon.name} component is permitted as a child of ActionIcon`\n\n invariant(React.Children.count(children) === 1, INVALID_CHILDREN_MESSAGE)\n\n // Polymorphic props: can be either button or anchor element\n const optionalLinkProps = href\n ? ({\n as: 'a',\n href: disabled ? undefined : href,\n onClick: undefined,\n 'aria-disabled': !!disabled\n } as const)\n : ({ type: 'button' } as const)\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={hasTooltip}\n label={label}\n tooltipSide={tooltipSide}\n >\n <StyledButton\n {...optionalLinkProps}\n {...getExternalAnchorProps(href)}\n {...rest}\n aria-label={label}\n theme={theme}\n appearance={appearance}\n size={size}\n ref={ref}\n disabled={disabled}\n >\n {React.Children.map(children, (child) => {\n // TS needs this check for any following code to access child.type\n // even with optional chaining\n if (!React.isValidElement(child)) {\n throw new Error(INVALID_CHILDREN_MESSAGE)\n }\n\n invariant(\n child.type === Icon,\n `Children of type ${child?.type} aren't permitted. Only an ${Icon.name} component is allowed in ActionIcon`\n )\n\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof Icon>>,\n {\n size: ActionIconSizeMap[size as string]\n }\n )\n })}\n </StyledButton>\n </OptionalTooltipWrapper>\n )\n}\n","import * as React from 'react'\n\nexport type AvatarRootContextValue = {\n name?: string\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'\n}\n\nexport const AvatarRootContext = React.createContext<AvatarRootContextValue>({\n name: undefined,\n size: 'lg'\n})\n","/*\n * Utility function to allow for overriding responsive variants using logic provided via the `overrideFunction` argument.\n *\n * It was developed out of a design requirement to override and pass through size properties to the <Icon /> component; depending\n * on the size of its parent component. It could be used for various other props where we want to tweak the value but\n * maintain the flexibility of a stitches variant property (which allows for use either via a string or a breakpoint object)\n * Documentation on stitches responsive variants: https://stitches.dev/docs/breakpoints#responsive-variants\n *\n */\nexport const overrideStyledVariantValue = (\n prop: any,\n overrideFunction: (any) => any\n) => {\n let overrideValue\n switch (typeof prop) {\n case 'object':\n overrideValue = {}\n Object.keys(prop).forEach((breakpoint) => {\n const propAtBreakpoint = prop[breakpoint]\n overrideValue[breakpoint] = propAtBreakpoint\n ? overrideFunction(propAtBreakpoint)\n : propAtBreakpoint\n })\n break\n default:\n overrideValue = overrideFunction(prop)\n }\n\n return overrideValue\n}\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\nimport { AvatarRootContext } from './Avatar.context'\n\nconst toIconSize = {\n xs: 'sm',\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg',\n xxl: 'lg'\n}\n\ntype AvatarIcon = {\n is: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const AvatarIcon = ({ is }: AvatarIcon) => {\n const rootContext = React.useContext(AvatarRootContext)\n const { size } = rootContext\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n\n return <Icon size={iconSize} is={is} />\n}\n","import * as React from 'react'\n\nimport { type PolymorphicComponent, styled } from '../../styled'\nimport type { NavigatorActions } from '../../types/navigatorActions.types'\nimport type { Override } from '../../utilities/types'\nimport { getExternalAnchorProps } from '../../utilities/uri'\n\nexport const StyledLink = styled(\n 'a',\n {\n base: [\n 'bg-[unset]',\n 'text-primary-800',\n 'cursor-pointer',\n 'font-body',\n 'no-underline',\n 'focus:text-primary-900',\n 'focus:underline',\n 'hover:text-primary-900',\n 'hover:underline',\n 'active:text-primary-1000',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:after:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:before:content-none',\n '[p>&,h1>&,h2>&,h3>&,h4>&,li>&,em>&]:text-[100%]/none'\n ],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n }\n },\n defaultVariants: {\n size: 'md'\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype LinkCustomProps = NavigatorActions & { disabled?: boolean }\n\ntype LinkProps = Override<\n React.ComponentProps<typeof StyledLink>,\n LinkCustomProps & { as?: React.ElementType }\n>\n\n// Re-expose StyledLink's variant props merged with our own, so the public\n// polymorphic type re-checks props against whatever `as` target is passed\ntype StyledLinkOwnProps =\n typeof StyledLink extends PolymorphicComponent<\n infer _Element extends React.ElementType,\n infer OwnProps\n >\n ? OwnProps\n : never\n\ntype LinkOwnProps = Override<StyledLinkOwnProps, LinkCustomProps>\n\nexport const Link = (({ ref, as, disabled, href, ...rest }: LinkProps) => (\n <StyledLink\n as={as || (!href ? 'button' : undefined)}\n noCapsize={!href ? true : undefined}\n href={href}\n {...(disabled && { disabled: true })}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n />\n)) as PolymorphicComponent<'a', LinkOwnProps>\n","import { Close, Info } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Link } from '../link/Link'\n\nexport type ImageCreditProps = {\n /** Creator name, shown once the credit is revealed. */\n author: string\n /** Link to the author / image source. */\n sourceUrl?: string\n /** Human-readable license name, e.g. \"CC BY 4.0\". */\n licenseName?: string\n /** Link to the license terms. */\n licenseUrl?: string\n}\n\n// Shared surface/interaction styles for the controls overlaid on the image.\nconst overlayControlClasses = [\n 'not-disabled:hover:bg-black/75',\n 'focus:outline-none',\n 'focus-visible:ring-2',\n 'focus-visible:ring-white/70'\n]\nconst overlayLinkClasses = [\n 'text-white',\n 'underline-offset-2',\n 'hover:text-white',\n 'focus:text-white',\n 'active:text-white'\n]\n\nexport const ImageCredit = ({\n author,\n sourceUrl,\n licenseName,\n licenseUrl\n}: ImageCreditProps) => {\n const [expanded, setExpanded] = React.useState(false)\n\n if (!expanded) {\n return (\n <ActionIcon\n label=\"Show image credit\"\n theme=\"white\"\n isRounded\n hasTooltip={false}\n onClick={() => setExpanded(true)}\n className={cn(\n 'absolute',\n 'right-2',\n 'bottom-2',\n 'bg-black/60',\n 'backdrop-blur-sm',\n overlayControlClasses\n )}\n >\n <Icon is={Info} />\n </ActionIcon>\n )\n }\n\n return (\n <div\n className={cn(\n 'absolute',\n 'right-2',\n 'bottom-2',\n 'flex',\n 'max-w-[calc(100%-1rem)]',\n 'items-center',\n 'gap-1',\n 'rounded-md',\n 'bg-black/60',\n 'pl-2',\n 'text-xs',\n 'text-white',\n 'backdrop-blur-sm'\n )}\n >\n {/* Author and licence sit on one line when they fit, and wrap onto\n separate rows (each kept whole) when they don't. */}\n <figcaption className=\"flex min-w-0 flex-wrap items-center gap-x-1\">\n {sourceUrl ? (\n <Link href={sourceUrl} size=\"xs\" className={cn(overlayLinkClasses)}>\n {author}\n </Link>\n ) : (\n <span>{author}</span>\n )}\n {licenseName ? (\n <span className=\"flex items-center gap-x-1\">\n <span aria-hidden=\"true\">·</span>\n {licenseUrl ? (\n <Link\n href={licenseUrl}\n size=\"xs\"\n className={cn(overlayLinkClasses)}\n >\n {licenseName}\n </Link>\n ) : (\n <span>{licenseName}</span>\n )}\n </span>\n ) : null}\n </figcaption>\n <ActionIcon\n label=\"Hide credit\"\n theme=\"white\"\n isRounded\n hasTooltip={false}\n onClick={() => setExpanded(false)}\n className={cn(overlayControlClasses)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </div>\n )\n}\n\nImageCredit.displayName = 'Image.Credit'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { ImageCredit } from './ImageCredit'\n\n// default styling lifted from https://www.zachleat.com/web/fluid-images/#copy-and-paste\n// (potentially unnecessary now we've moved to Tailwind)\nexport const StyledImage = styled(\n 'img',\n {\n base: ['align-middle', 'max-w-full'],\n variants: {\n fluid: {\n true: [\n \"[[src$='.svg']]:h-auto\",\n \"[[src$='.svg']]:max-w-none\",\n \"[[src$='.svg']]:w-full\",\n '[[width]]:[[height]]:h-auto',\n '[[width]]:w-auto'\n ]\n }\n }\n },\n { enablePolymorphism: false }\n)\n\ntype ImageProps = Override<\n React.ComponentProps<typeof StyledImage>,\n { children?: React.ReactNode }\n>\n\nconst ImageComponent = ({ children, ref, ...props }: ImageProps) => {\n if (!children) {\n return <StyledImage {...props} ref={ref} />\n }\n\n return (\n <figure className=\"relative overflow-hidden\">\n <StyledImage {...props} ref={ref} />\n {children}\n </figure>\n )\n}\n\nexport const Image = /* @__PURE__ */ Object.assign(ImageComponent, {\n Credit: ImageCredit,\n displayName: 'Image'\n})\n","import { User } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const AvatarPlaceholder = () => (\n <div className=\"relative size-full\">\n <Icon is={User} className=\"size-full\" />\n </div>\n)\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\nimport { AvatarRootContext } from './Avatar.context'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst toTextSize = {\n xs: 'xs',\n sm: 'sm',\n md: 'sm',\n lg: 'md',\n xl: 'md',\n xxl: 'lg'\n}\n\nexport const AvatarInitial = () => {\n const rootContext = React.useContext(AvatarRootContext)\n const { name, size } = rootContext\n const textSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toTextSize[s]),\n [size]\n )\n\n if (!name) {\n return <AvatarPlaceholder />\n }\n\n return (\n <Text size={textSize} className=\"text-grey-800\">\n {name[0].toUpperCase()}\n </Text>\n )\n}\n","import * as React from 'react'\n\nimport { Image } from '../image/Image'\nimport { AvatarInitial } from './AvatarInitial'\n\nexport const AvatarImage = ({ src, alt }: { src: string; alt: string }) => {\n if (!src) {\n return <AvatarInitial />\n }\n\n return <Image className=\"size-full object-cover\" src={src} alt={alt} />\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport type { AvatarRootContextValue } from './Avatar.context'\nimport { AvatarRootContext } from './Avatar.context'\nimport { AvatarIcon } from './AvatarIcon'\nimport { AvatarImage } from './AvatarImage'\nimport { AvatarInitial } from './AvatarInitial'\nimport { AvatarPlaceholder } from './AvatarPlaceholder'\n\nconst avatarRootStyles = [\n 'flex',\n 'justify-center',\n 'items-center',\n 'text-grey-800',\n 'rounded-full',\n 'border-2',\n 'border-grey-200',\n 'bg-(--bg-color)',\n 'overflow-hidden'\n]\n\nconst StyledDiv = /* @__PURE__ */ styled('div', {\n base: avatarRootStyles,\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\nconst StyledButton = /* @__PURE__ */ styled('button', {\n base: [\n ...avatarRootStyles,\n 'not-disabled:active:bg-grey-200',\n 'not-disabled:active:border-primary-800',\n 'not-disabled:hover:bg-grey-100',\n 'not-disabled:hover:border-grey-800',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n xs: ['size-6'],\n sm: ['size-8'],\n md: ['size-10'],\n lg: ['size-12'],\n xl: ['size-16'],\n xxl: ['size-24']\n },\n emphasis: {\n bold: ['border-0', '[&>p]:text-white'],\n subtle: ['border-0'],\n white: []\n }\n }\n})\n\ntype AvatarProps = React.ComponentProps<\n typeof StyledDiv | typeof StyledButton\n> & {\n name?: string\n} & (\n | {\n onClick: React.MouseEventHandler<HTMLButtonElement>\n disabled?: boolean\n }\n | { onClick?: never; disabled?: never }\n )\n\nexport { AvatarRootContext }\nexport type { AvatarRootContextValue }\n\nexport const AvatarRootProvider = ({ children, name, size }: AvatarProps) => {\n const value = React.useMemo<AvatarRootContextValue>(\n () => ({ name, size }),\n [name, size]\n )\n\n return (\n <AvatarRootContext.Provider value={value}>\n {children}\n </AvatarRootContext.Provider>\n )\n}\n\nconst DS_COLORS = [\n 'maroon',\n 'red',\n 'magenta',\n 'pink',\n 'purple',\n 'lapis',\n 'blue',\n 'cyan',\n 'teal',\n 'green',\n 'lime',\n 'yellow',\n 'orange'\n] as const\n\nconst getBackgroundColor = ({\n emphasis,\n name\n}: Pick<AvatarProps, 'emphasis' | 'name'>) => {\n if (emphasis === 'white' || !name) return 'white'\n const index = name.toLocaleUpperCase().charCodeAt(0) % DS_COLORS.length\n return `var(--color-${DS_COLORS[index]}-${emphasis === 'bold' ? 700 : 300})`\n}\n\nexport const AvatarRoot = ({\n children,\n size = 'lg',\n name,\n emphasis = 'white',\n disabled = false,\n onClick\n}: AvatarProps) => {\n const backgroundColor = getBackgroundColor({ emphasis, name })\n return (\n <AvatarRootProvider name={name} size={size}>\n {onClick ? (\n <StyledButton\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n disabled={disabled}\n onClick={disabled ? undefined : onClick}\n className={cn(disabled ? 'cursor-auto' : 'cursor-pointer')}\n emphasis={emphasis}\n >\n {children}\n </StyledButton>\n ) : (\n <StyledDiv\n size={size}\n style={{\n '--bg-color': backgroundColor\n }}\n emphasis={emphasis}\n >\n {children}\n </StyledDiv>\n )}\n </AvatarRootProvider>\n )\n}\n\nexport const Avatar = /* @__PURE__ */ Object.assign(AvatarRoot, {\n Image: AvatarImage,\n Initial: AvatarInitial,\n Placeholder: AvatarPlaceholder,\n Icon: AvatarIcon\n})\n\nAvatarRoot.displayName = 'Avatar'\n","import * as React from 'react'\n\nexport const useCallbackRef: () => [\n React.MutableRefObject<HTMLElement | null>,\n (HTMLElement) => void\n] = () => {\n const elRef = React.useRef<HTMLElement | null>(null)\n\n const setElRefCallback = React.useCallback((el) => {\n if (el) elRef.current = el\n }, [])\n\n return [elRef, setElRefCallback]\n}\n\nexport const useCallbackRefState: () => [\n HTMLElement | null,\n (HTMLElement) => void\n] = () => {\n const [elRef, setElRef] = React.useState<HTMLElement | null>(null)\n const hasElement = React.useRef(false)\n\n const setElRefCallback = React.useCallback((el) => {\n // Commit the attached node to state exactly once — the first time one\n // becomes available — and never again. Under React 19 concurrent rendering\n // with heavy CPU contention, renders get interrupted and re-run, so the DOM\n // node attached via the callback ref churns: React commits and replaces the\n // node, firing this callback with a fresh identity each time. The previous\n // `prev === el ? prev : el` guard couldn't catch that — a new identity is\n // never `=== prev` — so every churn scheduled another render, which churned\n // the node again: an unbounded \"Maximum update depth exceeded\" loop.\n //\n // A one-shot setState makes the returned element reference stable and the\n // loop structurally impossible (later invocations are no-ops). All consumers\n // attach this to a single, always-mounted element, so the first node is the\n // node — there is no element swap to miss.\n if (el && !hasElement.current) {\n hasElement.current = true\n setElRef(el)\n }\n }, [])\n\n return [elRef, setElRefCallback]\n}\n","/*\n\t•\tFactory for non-semantic color schemes\n*/\nconst createScheme = (c: string, overrides: Record<string, string> = {}) => ({\n '--text-subtle': `var(--color-${c}-1000)`,\n '--background-subtle': `var(--color-${c}-200)`,\n '--text-subtle-hover': `var(--color-${c}-1100)`,\n '--background-subtle-hover': `var(--color-${c}-300)`,\n '--text-bold': 'white',\n '--background-bold': `var(--color-${c}-800)`,\n '--background-bold-hover': `var(--color-${c}-900)`,\n '--text-on-white': `var(--color-${c}-800)`,\n ...overrides\n})\n\n/*\n\t•\tSemantic themes\n*/\nconst info = {\n '--text-subtle': 'var(--color-info-mid)',\n '--background-subtle': 'var(--color-info-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-info)',\n '--text-on-white': 'var(--color-info)'\n}\nconst neutral = {\n '--text-subtle': 'var(--color-grey-900)',\n '--background-subtle': 'var(--color-grey-100)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-grey-800)',\n '--text-on-white': 'var(--color-grey-800)'\n}\nconst success = {\n '--text-subtle': 'var(--color-success-mid)',\n '--background-subtle': 'var(--color-success-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-success)',\n '--text-on-white': 'var(--color-success)'\n}\nconst danger = {\n '--text-subtle': 'var(--color-danger-mid)',\n '--background-subtle': 'var(--color-danger-light)',\n '--text-bold': 'white',\n '--background-bold': 'var(--color-danger)',\n '--text-on-white': 'var(--color-danger)'\n}\nconst warning = {\n '--text-subtle': 'var(--color-warning-text)',\n '--background-subtle': 'var(--color-warning-light)',\n '--text-bold': 'var(--color-grey-1000)',\n '--background-bold': 'var(--color-warning)',\n '--text-on-white': 'var(--color-warning)'\n}\n\n/*\n\t•\tNon-semantic themes\n*/\nexport const badgeSemanticNames = [\n 'info',\n 'neutral',\n 'success',\n 'danger',\n 'warning'\n]\nexport const colorSchemes = {\n info,\n neutral,\n success,\n danger,\n warning,\n primary: createScheme('primary'),\n grey: createScheme('grey'),\n blue: createScheme('blue'),\n pink: createScheme('pink'),\n purple: createScheme('purple', {\n '--text-on-white': 'var(--color-purple-700)'\n }),\n cyan: createScheme('cyan'),\n green: createScheme('green'),\n magenta: createScheme('magenta'),\n red: createScheme('red', {\n '--background-subtle-hover': 'var(--color-red-400)'\n }),\n teal: createScheme('teal'),\n orange: createScheme('orange', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-orange-600)',\n '--background-bold-hover': 'var(--color-orange-700)',\n '--text-on-white': 'var(--color-orange-1000)'\n }),\n yellow: createScheme('yellow', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-yellow-500)',\n '--background-bold-hover': 'var(--color-yellow-600)',\n '--text-on-white': 'var(--color-yellow-900)'\n }),\n lime: createScheme('lime', {\n '--text-bold': 'var(--color-grey-1200)',\n '--background-bold': 'var(--color-lime-600)',\n '--background-bold-hover': 'var(--color-lime-700)',\n '--text-on-white': 'var(--color-lime-900)'\n }),\n lapis: createScheme('lapis', {\n '--background-bold': 'var(--color-lapis-700)',\n '--text-on-white': 'var(--color-lapis-700)'\n }),\n maroon: createScheme('maroon', {\n '--text-on-white': 'var(--color-maroon-700)'\n }),\n marsh: createScheme('marsh', { '--text-on-white': 'var(--color-marsh-700)' })\n}\n","import * as React from 'react'\n\nimport type { BadgeProps } from './Badge'\nimport type { BadgeOverflow } from './Badge.types'\n\ntype BadgeProviderProps = {\n size?: BadgeProps['size']\n overflow?: BadgeOverflow\n}\n\ntype BadgeContext = BadgeProviderProps & {\n isOverflowing?: boolean\n setIsOverflowing?: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BadgeContext = React.createContext<BadgeContext>({})\n\nexport const BadgeProvider = ({\n size,\n overflow,\n children\n}: React.PropsWithChildren<BadgeProviderProps>) => {\n const [isOverflowing, setIsOverflowing] = React.useState(false)\n\n const value = React.useMemo<BadgeContext>(\n () => ({ size, overflow, isOverflowing, setIsOverflowing }),\n [size, overflow, isOverflowing, setIsOverflowing]\n )\n return <BadgeContext.Provider value={value}>{children}</BadgeContext.Provider>\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const BadgeIcon = (props: React.ComponentProps<typeof Icon>) => (\n <Icon size=\"sm\" {...props} />\n)\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\ntype UseResizeObserverOptions = {\n elements: (HTMLElement | undefined | null)[]\n onResize: (entries: ResizeObserverEntry[]) => void\n delay?: number\n}\n\ntype UseResizeObserverOutput = ResizeObserver | null\n\nconst createResizeObserver = (\n callback: (entries: ResizeObserverEntry[]) => void\n) => {\n try {\n return new ResizeObserver(callback)\n } catch {\n return null\n }\n}\n\nexport const useResizeObserver = ({\n delay = 500,\n elements,\n onResize\n}: UseResizeObserverOptions): UseResizeObserverOutput => {\n // Keep the latest `onResize` in a ref so the observer is only recreated when\n // `delay` changes. Otherwise a callback whose identity changes on render (e.g.\n // `useSize`'s `handleResize`, which depends on `element`) would recreate and\n // re-subscribe the observer, and `ResizeObserver` fires its initial callback\n // on every `observe()` — a measure → setState → re-render → re-subscribe loop\n // that surfaces as \"Maximum update depth exceeded\".\n const onResizeRef = React.useRef(onResize)\n React.useLayoutEffect(() => {\n onResizeRef.current = onResize\n })\n\n const observer = React.useMemo(\n () =>\n createResizeObserver(\n debounce(delay, (entries: ResizeObserverEntry[]) =>\n onResizeRef.current(entries)\n )\n ),\n [delay]\n )\n\n React.useEffect(() => {\n elements.forEach((element) => {\n if (element) {\n observer?.observe(element)\n }\n })\n\n return () => {\n elements.forEach((element) => element && observer?.unobserve(element))\n }\n }, [observer, elements])\n\n return observer\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { useResizeObserver } from '../../utilities/hooks/useResizeObserver'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\nimport { BadgeContext } from './Badge.context'\n\n/*\n * Instead of sticking a resize observer on every `BadgeText`\n * regardless of overflow type, split the resize logic into a component.\n * Basically call the hook conditionally, only for the version with\n * the `overflow === 'ellipsis'` which needs it.\n * This saves us from initialising a resize observer for any badge which doesn't need it.\n */\nconst ObserveBadgeTextOverflow: React.FC<{ elRef: HTMLElement | null }> = ({\n elRef\n}) => {\n const { setIsOverflowing } = React.useContext(BadgeContext)\n\n useResizeObserver({\n delay: 0,\n elements: [elRef],\n onResize: () => {\n if (!elRef?.scrollWidth || !elRef?.clientWidth) return\n setIsOverflowing?.(elRef.scrollWidth > elRef.clientWidth)\n }\n })\n\n return null\n}\n\nconst StyledBadgeText = styled(Text, {\n base: ['py-0.5', 'capsize-none'],\n variants: {\n overflow: {\n ellipsis: ['overflow-x-hidden', 'text-ellipsis', 'whitespace-nowrap'],\n wrap: ['whitespace-normal']\n }\n }\n})\n\ntype BadgeTextProps = React.ComponentProps<typeof StyledBadgeText>\n\nconst toTextSize = {\n xs: 'sm',\n sm: 'md',\n md: 'md'\n}\n\nexport const BadgeText = ({ children, ...rest }: BadgeTextProps) => {\n // We need the return type here. Otherwise typsecript breaks when this type is used in Badge. Do not remove unless you want to tackle that issue again.\n const { size: badgeSize, overflow } = React.useContext(BadgeContext)\n\n const size = React.useMemo(\n () => overrideStyledVariantValue(badgeSize, (s) => toTextSize[s]),\n [badgeSize]\n )\n\n const [elRef, setElRef] = useCallbackRefState()\n\n return (\n <>\n {overflow === 'ellipsis' && <ObserveBadgeTextOverflow elRef={elRef} />}\n <StyledBadgeText size={size} overflow={overflow} ref={setElRef} {...rest}>\n {children}\n </StyledBadgeText>\n </>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { OptionalTooltipWrapper } from '../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper'\nimport { Icon } from '../icon/Icon'\nimport {\n badgeSemanticNames,\n colorSchemes as badgeColorSchemes\n} from './Badge.colorscheme.config'\nimport { BadgeContext, BadgeProvider } from './Badge.context'\nimport type { BadgeOverflow } from './Badge.types'\nimport { BadgeIcon } from './BadgeIcon'\nimport { BadgeText } from './BadgeText'\n\nconst StyledBadge = styled(\n 'div',\n {\n base: [\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'min-w-0',\n 'border',\n 'border-white',\n 'font-body',\n '*:not-last:mr-1'\n ],\n variants: {\n emphasis: {\n white: ['text-(--text-on-white)', 'bg-white'],\n subtle: ['text-(--text-subtle)', 'bg-(--background-subtle)'],\n bold: ['text-(--text-bold)', 'bg-(--background-bold)']\n },\n size: {\n xs: ['px-1', 'py-0'],\n sm: ['px-1', 'py-0.5'],\n md: ['px-2', 'py-1']\n },\n isClickable: {\n true: ['cursor-pointer']\n },\n highlighted: {\n true: []\n }\n },\n compoundVariants: [\n {\n isClickable: true,\n emphasis: 'white',\n class: [\n 'hover:text-(--text-on-white)',\n 'hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n isClickable: true,\n emphasis: 'subtle',\n class: [\n 'hover:bg-(--background-subtle-hover)',\n 'hover:text-(--text-subtle-hover)'\n ]\n },\n {\n isClickable: true,\n emphasis: 'bold',\n class: [\n 'hover:bg-(--background-bold-hover)',\n 'hover:text-(--text-bold)'\n ]\n },\n {\n emphasis: 'white',\n highlighted: true,\n class: [\n 'text-(--text-on-white)',\n 'bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n emphasis: 'subtle',\n highlighted: true,\n class: ['text-(--text-subtle-hover)', '(--bg-background-subtle-hover)']\n },\n {\n emphasis: 'bold',\n highlighted: true,\n class: ['text-(--text-bold)', 'bg-(--background-bold-hover)']\n }\n ]\n },\n { enableResponsiveVariants: true }\n)\n\nexport type BadgeProps = React.ComponentProps<typeof StyledBadge> & {\n theme?: keyof typeof badgeColorSchemes\n overflow?: BadgeOverflow\n}\n\ntype BadgeInnerProps = Omit<BadgeProps, 'size' | 'overflow'>\n\nconst BadgeInner = ({\n ref,\n theme = 'info',\n emphasis = 'subtle',\n children,\n style,\n ...rest\n}: BadgeInnerProps) => {\n const { size, overflow, isOverflowing } = React.useContext(BadgeContext)\n const [badgeElRef, setBadgeElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => badgeElRef as HTMLDivElement)\n\n const label = badgeElRef?.textContent\n\n const isInfoOnly = badgeSemanticNames.includes(theme)\n\n const isClickable =\n Object.keys(rest).includes('onClick') || Object.keys(rest).includes('href')\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={overflow === 'ellipsis' && isOverflowing}\n label={label}\n >\n <StyledBadge\n role=\"status\"\n emphasis={emphasis}\n size={size}\n style={{\n ...badgeColorSchemes[theme],\n ...style\n }}\n {...rest}\n ref={setBadgeElRef}\n isClickable={isClickable && !isInfoOnly}\n >\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <BadgeText>{child}</BadgeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <BadgeIcon {...iconProps} />\n }\n return child\n })}\n </StyledBadge>\n </OptionalTooltipWrapper>\n )\n}\n\nconst BadgeComponent = ({\n ref,\n size = 'sm',\n overflow = 'wrap',\n ...rest\n}: BadgeProps) => (\n <BadgeProvider size={size} overflow={overflow}>\n <BadgeInner {...rest} ref={ref} />\n </BadgeProvider>\n)\n\nexport const Badge = /* @__PURE__ */ Object.assign(BadgeComponent, {\n Icon: BadgeIcon,\n Text: BadgeText\n})\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nexport interface DismissibleRootContextValue {\n disabled?: boolean\n isDismissed: boolean\n setIsDismissed: (boolean) => void\n onDismiss: () => void\n}\n\nexport const DismissibleRootContext =\n React.createContext<DismissibleRootContextValue>({\n isDismissed: false,\n setIsDismissed: () => undefined,\n onDismiss: () => undefined\n })\n\nexport interface DismissibleRootProps {\n disabled?: boolean\n dismissed?: boolean\n onDismiss?: () => void\n}\n\nexport const DismissibleRootProvider = ({\n dismissed: controlledIsDismissed,\n children,\n disabled,\n onDismiss = () => null\n}: React.PropsWithChildren<DismissibleRootProps>) => {\n const [isDismissed, setIsDismissed] = React.useState(false)\n\n const value = React.useMemo<DismissibleRootContextValue>(() => {\n const isControlled = typeof controlledIsDismissed === 'boolean'\n return {\n disabled,\n isDismissed: isControlled\n ? (controlledIsDismissed as boolean)\n : isDismissed,\n setIsDismissed: isControlled ? () => null : setIsDismissed,\n onDismiss\n }\n }, [disabled, isDismissed, onDismiss, controlledIsDismissed])\n\n return (\n <DismissibleRootContext.Provider value={value}>\n {children}\n </DismissibleRootContext.Provider>\n )\n}\n\nexport interface DismissibleRootInternalProps {\n asChild?: boolean\n}\n\nconst DismissibleRootInternal = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<DismissibleRootInternalProps>) => {\n const rootContext = React.useContext(DismissibleRootContext)\n\n const { isDismissed, disabled } = rootContext\n\n if (isDismissed) return null\n\n const props = { ...(disabled && { [`data-disabled`]: '' }), ...rest }\n const Component = asChild ? Slot : 'div'\n return <Component {...props} />\n}\n\nexport const DismissibleRoot = ({\n disabled = false,\n dismissed,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<\n DismissibleRootInternalProps & DismissibleRootProps\n>) => (\n <DismissibleRootProvider\n dismissed={dismissed}\n disabled={disabled}\n onDismiss={onDismiss}\n >\n <DismissibleRootInternal {...rest} />\n </DismissibleRootProvider>\n)\n\nDismissibleRoot.displayName = 'Dismissible'\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { DismissibleRootContext } from './DismissibleRoot'\n\nexport interface DismissibleTriggerProps {\n asChild?: boolean\n}\n\nconst DefaultTrigger = (props) => (\n <button type=\"button\" {...props}>\n Dismiss\n </button>\n)\n\nexport const DismissibleTrigger = ({\n asChild = false,\n ...rest\n}: React.PropsWithChildren<DismissibleTriggerProps>) => {\n const context = React.useContext(DismissibleRootContext)\n if (context === undefined) {\n throw new Error(\n 'Dismissible.Trigger can only be used within a Dismissible.Item'\n )\n }\n\n const { setIsDismissed, disabled, onDismiss } = context\n\n const handleDismiss = () => {\n setIsDismissed(true)\n onDismiss?.()\n }\n\n const props = {\n disabled: disabled,\n onClick: handleDismiss,\n ...rest\n }\n\n const Component = asChild ? Slot : DefaultTrigger\n return <Component {...props} />\n}\n","import { DismissibleRoot } from './DismissibleRoot'\nimport { DismissibleTrigger } from './DismissibleTrigger'\n\nexport const Dismissible = /* @__PURE__ */ Object.assign(DismissibleRoot, {\n Trigger: DismissibleTrigger\n})\n","import * as React from 'react'\n\nimport type { BannerContainerProps } from './BannerContainer'\n\ntype Breakpoint = '@initial' | '@sm' | '@md' | '@lg' | '@xl'\ntype ResponsiveSize = 'sm' | 'md' | Partial<Record<Breakpoint, 'sm' | 'md'>>\n\n// Extract size and emphasis props, preserving responsive variant types\nexport type BannerProviderProps = {\n size?: ResponsiveSize\n emphasis?: BannerContainerProps['emphasis']\n}\n\ntype BannerContextValue = BannerProviderProps & {\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\n\nexport const BannerContext = React.createContext<BannerContextValue>({\n emphasis: 'minimal',\n size: {\n '@initial': 'sm',\n '@md': 'md'\n },\n hasDismiss: false,\n setHasDismiss: () => null\n})\n\nexport const useBannerContext = (): BannerContextValue => {\n const context = React.useContext(BannerContext)\n\n if (context === undefined) {\n throw new Error('useBannerContext must be used within a BannerProvider')\n }\n\n return context\n}\n\nexport const BannerProvider = ({\n emphasis = 'minimal',\n size = {\n '@initial': 'sm',\n '@md': 'md'\n },\n children\n}: React.PropsWithChildren<BannerProviderProps>) => {\n const [hasDismiss, setHasDismiss] = React.useState(false)\n const value = React.useMemo<BannerContextValue>(\n () => ({ emphasis, size, hasDismiss, setHasDismiss }),\n [emphasis, size, hasDismiss, setHasDismiss]\n )\n return (\n <BannerContext.Provider value={value}>{children}</BannerContext.Provider>\n )\n}\n\nBannerProvider.displayName = 'Banner'\n","import { Dismissible } from '../dismissible'\nimport { BannerProvider } from './Banner.context'\n\nexport const Banner = /* @__PURE__ */ Object.assign(BannerProvider, {\n Dismiss: Dismissible.Trigger\n})\n","import * as React from 'react'\n\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport type { Override } from '../../../utilities/types'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\nexport const BannerRegularButton = (\n props: Override<\n React.ComponentProps<typeof Button>,\n { as?: React.ElementType }\n >\n) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => s === 'sm'),\n [size]\n )\n\n return (\n <Button\n size={size}\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...props}\n />\n )\n}\n\nBannerRegularButton.displayName = 'BannerRegularButton'\n","import invariant from 'invariant'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\nimport { BannerRegularButton } from './BannerRegularButton'\n\nconst MAX_ALLOWED_CHILDREN = 2\n\nconst toGap = {\n sm: 'gap-2',\n md: 'gap-4'\n}\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nexport const BannerRegularActions = ({\n children,\n className,\n ...rest\n}: React.PropsWithChildren<React.ComponentProps<'div'>>) => {\n const { size } = useBannerContext()\n\n const gap = React.useMemo(() => {\n if (typeof size === 'string') {\n return toGap[size]\n }\n return 'gap-2 md:gap-4'\n }, [size])\n\n const direction = React.useMemo(() => {\n if (typeof size === 'string') {\n return toDirection[size]\n }\n return 'flex-col md:flex-row'\n }, [size])\n\n invariant(\n React.Children.count(children) <= MAX_ALLOWED_CHILDREN,\n `A maximum of ${MAX_ALLOWED_CHILDREN} ${BannerRegularButton.displayName} component(s) are permitted as children of ${BannerRegularActions.displayName}`\n )\n\n return (\n <div className={cn('flex', gap, direction, className)} {...rest}>\n {React.Children.map(children, (child, index) => {\n // if child is undefined or null, React.isValidElement returns false and hence error is thrown.\n // This line will prevent that from happening\n if (child == null) return child\n\n if (!React.isValidElement(child)) {\n throw new Error(\n `Child passed to ${BannerRegularActions.displayName} is not a valid element`\n )\n }\n\n invariant(\n child.type === BannerRegularButton,\n `Children of type ${child?.type} aren't permitted. Only an ${BannerRegularButton.displayName} component is allowed in ${BannerRegularActions.displayName}`\n )\n\n const propsToInject: Partial<\n React.ComponentProps<typeof BannerRegularButton>\n > = {\n // Override button appearance - make the second button outlined\n appearance: index > 0 ? 'outline' : undefined\n }\n\n return React.cloneElement(\n child as React.ReactElement<\n React.ComponentProps<typeof BannerRegularButton>\n >,\n propsToInject\n )\n })}\n </div>\n )\n}\n\nBannerRegularActions.displayName = 'BannerRegularActions'\n","import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { Dismissible } from '../dismissible'\nimport { useBannerContext } from './Banner.context'\n\nconst StyledBannerContainer = styled(\n 'section',\n {\n base: [\n 'flex',\n 'relative',\n 'w-full',\n 'rounded-lg',\n 'overflow-hidden',\n 'text-(--foreground)',\n '[--banner-heading-color:var(--color-foreground)]',\n '[--banner-text-color:var(--color-grey-900)]'\n ],\n variants: {\n emphasis: {\n bold: [\n '[--banner-heading-color:var(--color-foreground-7-plus)]',\n '[--banner-text-color:var(--color-grey-100)]',\n 'bg-(--base-11)',\n 'text-(--foreground-7-plus)'\n ],\n subtle: ['bg-(--base-3)'],\n minimal: ['bg-(--base-1)']\n },\n size: {\n sm: [],\n md: []\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport type BannerContainerProps = React.ComponentProps<\n typeof StyledBannerContainer\n> & {\n colorScheme?: TcolorScheme\n} & React.ComponentProps<typeof Dismissible>\n\nexport const BannerContainer = ({\n colorScheme = {},\n onDismiss,\n dismissed,\n ...rest\n}: BannerContainerProps) => {\n const { emphasis } = useBannerContext()\n\n return (\n <ColorScheme {...colorScheme} asChild>\n <Dismissible asChild onDismiss={onDismiss} dismissed={dismissed}>\n <StyledBannerContainer role=\"banner\" emphasis={emphasis} {...rest} />\n </Dismissible>\n </ColorScheme>\n )\n}\n","import * as React from 'react'\n\nimport { BannerContainer } from '../BannerContainer'\n\ntype BannerRegularContainerProps = Omit<\n React.ComponentProps<typeof BannerContainer>,\n 'direction' | 'align' | 'wrap' | 'gap' | 'justify'\n>\n\nexport const BannerRegularContainer = (props: BannerRegularContainerProps) => (\n <BannerContainer {...props} />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['w-31/50', 'grow'],\n variants: {\n size: {\n sm: ['p-4'],\n md: ['p-6', 'pr-8']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularContent = (\n props: React.ComponentProps<typeof Container>\n) => {\n const { size } = useBannerContext()\n\n return <Container size={size} {...props} />\n}\n\nBannerRegularContent.displayName = 'BannerRegularContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../Banner.context'\n\nconst toActionIconSize = {\n sm: 'md',\n md: 'sm'\n}\n\nconst StyledDismiss = styled(ActionIcon, {\n base: ['z-1', 'absolute', 'top-3', 'right-3']\n})\n\ntype BannerRegularDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerRegularDismiss = ({\n label = 'dismiss',\n ...rest\n}: BannerRegularDismissProps) => {\n const { size, setHasDismiss } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n const actionIconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toActionIconSize[s]),\n [size]\n )\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size={actionIconSize}\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n appearance=\"solid\"\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerRegularDismiss.displayName = 'BannerRegularDismiss'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Heading } from '../../heading/Heading'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledHeading = styled(\n Heading,\n {\n base: ['mb-4', 'text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularHeading = (\n props: React.ComponentPropsWithoutRef<typeof Heading>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledHeading\n size=\"md\"\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularHeading.displayName = 'BannerRegularHeading'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['relative', 'overflow-hidden', 'w-19/50'],\n variants: {\n size: {\n sm: ['hidden'],\n md: ['block']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['absolute', 'max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerRegularImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerRegularImage.displayName = 'BannerRegularImage'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-text-color)'],\n variants: {\n containerSize: {\n sm: ['mb-4'],\n md: ['mb-6']\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerRegularText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size={size}\n containerSize={size}\n hasDismiss={hasDismiss}\n {...props}\n />\n )\n}\n\nBannerRegularText.displayName = 'BannerRegularText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerRegularActions } from './BannerRegularActions'\nimport { BannerRegularButton } from './BannerRegularButton'\nimport { BannerRegularContainer } from './BannerRegularContainer'\nimport { BannerRegularContent } from './BannerRegularContent'\nimport { BannerRegularDismiss } from './BannerRegularDismiss'\nimport { BannerRegularHeading } from './BannerRegularHeading'\nimport { BannerRegularImage } from './BannerRegularImage'\nimport { BannerRegularText } from './BannerRegularText'\n\nconst BannerRegularComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof BannerRegularContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerRegularContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerRegular = /* @__PURE__ */ Object.assign(\n BannerRegularComponent,\n {\n Content: BannerRegularContent,\n Heading: BannerRegularHeading,\n Text: BannerRegularText,\n Actions: BannerRegularActions,\n Image: BannerRegularImage,\n Button: BannerRegularButton,\n Dismiss: BannerRegularDismiss\n }\n)\n\nBannerRegularComponent.displayName = 'BannerRegular'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledBannerSlimActions = styled(\n 'div',\n {\n base: ['flex', 'gap-4'],\n variants: {\n size: {\n sm: ['w-full'],\n md: ['w-auto']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerSlimActions = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledBannerSlimActions>) => {\n const { size } = useBannerContext()\n return (\n <StyledBannerSlimActions size={size} {...rest}>\n {children}\n </StyledBannerSlimActions>\n )\n}\n\nBannerSlimActions.displayName = 'BannerSlimActions'\n","import * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\nexport const BannerSlimButton = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Button>) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => s === 'sm'),\n [size]\n )\n\n return (\n <Button\n size=\"md\"\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...rest}\n className={cn('ml-auto', className)}\n />\n )\n}\n\nBannerSlimButton.displayName = 'BannerSlimButton'\n","import * as React from 'react'\n\nimport { styled, cn } from '../../../styled'\nimport { useBannerContext } from '../Banner.context'\nimport { BannerContainer } from '../BannerContainer'\n\nconst toDirection = {\n sm: 'flex-col',\n md: 'flex-row'\n}\n\nconst toAlign = {\n sm: 'items-start',\n md: 'items-center'\n}\n\nconst toWrap = {\n sm: 'flex-wrap',\n md: 'flex-nowrap'\n}\n\nconst StyledBannerSlimContainer = styled(\n BannerContainer,\n {\n base: ['p-4'],\n variants: {\n sizeWorkaround: {\n sm: [],\n md: ['px-6']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype BannerSlimContainerProps = React.ComponentProps<\n typeof StyledBannerSlimContainer\n>\n\nexport const BannerSlimContainer = ({\n className,\n ...rest\n}: BannerSlimContainerProps) => {\n const { size } = useBannerContext()\n\n const direction = React.useMemo(() => {\n if (typeof size === 'string') {\n return toDirection[size]\n }\n return 'flex-col md:flex-row'\n }, [size])\n\n const align = React.useMemo(() => {\n if (typeof size === 'string') {\n return toAlign[size]\n }\n return 'items-start md:items-center'\n }, [size])\n\n const wrap = React.useMemo(() => {\n if (typeof size === 'string') {\n return toWrap[size]\n }\n return 'flex-wrap md:flex-nowrap'\n }, [size])\n\n return (\n <StyledBannerSlimContainer\n {...rest}\n sizeWorkaround={size}\n className={cn(direction, align, 'gap-4', wrap, className)}\n />\n )\n}\n\nBannerSlimContainer.displayName = 'BannerSlimContainer'\n","import { styled } from '../../../styled'\n\nexport const BannerSlimContent = styled('div', {\n base: ['w-full', 'flex', 'items-center', 'gap-4']\n})\n\nBannerSlimContent.displayName = 'BannerSlimContent'\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { ActionIcon } from '../../action-icon/ActionIcon'\nimport { Icon } from '../../icon/Icon'\nimport { Banner } from '../Banner'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledDismiss = styled(\n ActionIcon,\n {\n base: [],\n variants: {\n emphasis: {\n bold: ['text-white!']\n },\n containerSize: {\n sm: ['absolute', 'right-4', 'top-4'],\n md: ['static']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\ntype BannerSlimDismissProps = Omit<\n React.ComponentProps<typeof StyledDismiss>,\n 'children' | 'onClick' | 'href'\n>\n\nexport const BannerSlimDismiss = ({\n label = 'dismiss',\n ...rest\n}: BannerSlimDismissProps) => {\n const { size, setHasDismiss, emphasis } = useBannerContext()\n\n React.useEffect(() => {\n setHasDismiss(true)\n return () => {\n setHasDismiss(false)\n }\n }, [setHasDismiss])\n\n return (\n <Banner.Dismiss asChild>\n <StyledDismiss\n label={label}\n size=\"md\"\n hasTooltip={false}\n isRounded\n theme=\"neutral\"\n containerSize={size}\n emphasis={emphasis as BannerSlimDismissProps['emphasis']}\n {...rest}\n >\n <Icon is={Close} />\n </StyledDismiss>\n </Banner.Dismiss>\n )\n}\n\nBannerSlimDismiss.displayName = 'BannerSlimDismiss'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Image } from '../../image/Image'\nimport { useBannerContext } from '../Banner.context'\n\nconst Container = styled(\n 'div',\n {\n base: ['overflow-hidden', 'rounded-full', 'self-start', 'shrink-0'],\n variants: {\n size: {\n sm: ['size-10'],\n md: ['size-12']\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst StyledImage = styled(Image, {\n base: ['max-w-none', 'size-full', 'object-cover']\n})\n\nexport const BannerSlimImage = (\n props: React.ComponentPropsWithoutRef<typeof Image>\n) => {\n const { size } = useBannerContext()\n\n return (\n <Container size={size}>\n <StyledImage {...props} />\n </Container>\n )\n}\n\nBannerSlimImage.displayName = 'BannerSlimImage'\n","import * as React from 'react'\n\nimport { styled } from '../../../styled'\nimport { Text } from '../../text/Text'\nimport { useBannerContext } from '../Banner.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['text-(--banner-heading-color)'],\n variants: {\n containerSize: {\n sm: [],\n md: []\n },\n hasDismiss: {\n true: []\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n class: ['mr-10']\n }\n ]\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nexport const BannerSlimText = (\n props: React.ComponentPropsWithoutRef<typeof Text>\n) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size=\"md\"\n weight=\"bold\"\n containerSize={size}\n hasDismiss={hasDismiss}\n noCapsize\n {...props}\n />\n )\n}\n\nBannerSlimText.displayName = 'BannerSlimText'\n","import * as React from 'react'\n\nimport { Banner } from '../Banner'\nimport { BannerContainer } from '../BannerContainer'\nimport { BannerSlimActions } from './BannerSlimActions'\nimport { BannerSlimButton } from './BannerSlimButton'\nimport { BannerSlimContainer } from './BannerSlimContainer'\nimport { BannerSlimContent } from './BannerSlimContent'\nimport { BannerSlimDismiss } from './BannerSlimDismiss'\nimport { BannerSlimImage } from './BannerSlimImage'\nimport { BannerSlimText } from './BannerSlimText'\n\nconst BannerSlimComponent = ({\n colorScheme,\n size,\n emphasis,\n onDismiss,\n ...rest\n}: React.ComponentProps<typeof Banner> &\n React.ComponentProps<typeof BannerContainer>) => (\n <Banner size={size} emphasis={emphasis}>\n <BannerSlimContainer\n colorScheme={colorScheme}\n onDismiss={onDismiss}\n {...rest}\n />\n </Banner>\n)\n\nexport const BannerSlim = /* @__PURE__ */ Object.assign(BannerSlimComponent, {\n Content: BannerSlimContent,\n Text: BannerSlimText,\n Image: BannerSlimImage,\n Button: BannerSlimButton,\n Dismiss: BannerSlimDismiss,\n Actions: BannerSlimActions\n})\n\nBannerSlimComponent.displayName = 'BannerSlim'\n","import { styled } from '../../styled'\n\nexport const Box = styled('div', {\n base: []\n})\n\nBox.displayName = 'Box'\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useCarousel } from './Carousel'\n\nconst ArrowButton = /* @__PURE__ */ styled('button', {\n base: [\n 'items-center',\n 'text-primary-800',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'size-12',\n 'top-1/2',\n '-translate-y-1/2',\n 'transition-colors',\n 'duration-150',\n 'ease-in-out',\n 'hover:text-primary-900',\n 'active:text-primary-1000',\n 'disabled:text-grey-200',\n 'disabled:cursor-not-allowed'\n ]\n})\n\nexport const CarouselArrowPrevious = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollPrev}\n disabled={!canScrollPrev}\n aria-label=\"Previous slide\"\n {...props}\n >\n <Icon is={ChevronLeft} />\n </ArrowButton>\n )\n}\n\nexport const CarouselArrowNext = (\n props: React.ComponentProps<typeof ArrowButton>\n) => {\n const { scrollNext, canScrollNext } = useCarousel()\n\n return (\n <ArrowButton\n type=\"button\"\n onClick={scrollNext}\n disabled={!canScrollNext}\n aria-label=\"Next slide\"\n {...props}\n >\n <Icon is={ChevronRight} />\n </ArrowButton>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { useCarousel } from './Carousel'\n\nconst Dot = styled('button', {\n base: [\n 'bg-grey-600',\n 'cursor-pointer',\n 'duration-100',\n 'ease-in',\n 'focus:bg-primary-900',\n 'hover:bg-primary-900',\n 'mx-1',\n 'p-1',\n 'rounded-full',\n 'size-3',\n 'transition-all',\n 'disabled:bg-primary-800',\n 'disabled:cursor-default'\n ]\n})\n\nexport const CarouselPagination = ({\n className,\n ...rest\n}: React.HTMLAttributes<HTMLDivElement>) => {\n const { scrollSnaps, selectedIndex, scrollTo } = useCarousel()\n\n const dots = Array.from({ length: scrollSnaps.length }, (_, i) => i)\n\n return (\n <div className={cn('flex', 'justify-center', className)} {...rest}>\n {dots.map((index) => (\n <Dot\n key={index}\n type=\"button\"\n onClick={() => scrollTo(index)}\n disabled={index === selectedIndex}\n aria-label=\"slide dot\"\n />\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useCarousel } from './Carousel'\n\nexport type CarouselSlideGap = 'none' | 0 | 1 | 2 | 3 | 4\n\n// Horizontal padding applied around each slide's content, on the same\n// spacing scale as Flex/ToggleGroup's gap. 'none' renders full-bleed slides.\nexport const toSlideGapClass: Record<CarouselSlideGap, string> = {\n none: '',\n 0: 'px-0.5',\n 1: 'px-1',\n 2: 'px-2',\n 3: 'px-3',\n 4: 'px-4'\n}\n\n// Slides read the gap via context so it is configured once on the slider.\nexport const CarouselSlideGapContext = React.createContext<CarouselSlideGap>(3)\n\ntype CarouselSliderProps = {\n children?: React.ReactNode\n className?: string\n gap?: CarouselSlideGap\n overflow?: boolean\n tabIndex?: number\n}\n\nexport const CarouselSlider = ({\n children,\n className,\n gap = 3,\n overflow,\n tabIndex = 0,\n ...rest\n}: CarouselSliderProps) => {\n const { emblaRef } = useCarousel()\n\n return (\n <div\n ref={emblaRef}\n className={cn(\n 'ml-[50%]',\n '-translate-x-1/2',\n 'cursor-grab',\n overflow ? 'overflow-visible' : 'overflow-hidden',\n className\n )}\n role=\"listbox\"\n aria-live=\"polite\"\n tabIndex={tabIndex}\n {...rest}\n >\n <div className=\"flex\">\n <CarouselSlideGapContext.Provider value={gap}>\n {children}\n </CarouselSlideGapContext.Provider>\n </div>\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useCarousel } from './Carousel'\nimport { CarouselSlideGapContext, toSlideGapClass } from './CarouselSlider'\n\nexport const CarouselSlide = ({\n children,\n className,\n index,\n ...rest\n}: React.PropsWithChildren<\n { index: number } & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const { selectedIndex } = useCarousel()\n const gap = React.useContext(CarouselSlideGapContext)\n const isSelected = selectedIndex === index\n\n return (\n <div\n role=\"option\"\n aria-selected={isSelected}\n // min-w-0 so basis-full wins over the content's min-content size and\n // the slide never outgrows the slider viewport\n className={cn('min-w-0', 'basis-full', 'shrink-0', className)}\n {...rest}\n >\n {/* padding to create the gap between slides; gap=\"none\" for full-bleed */}\n <div\n className={cn('flex items-center justify-center', toSlideGapClass[gap])}\n >\n {children}\n </div>\n </div>\n )\n}\n","import useEmblaCarousel from 'embla-carousel-react'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\nimport { CarouselArrowNext, CarouselArrowPrevious } from './CarouselArrows'\nimport { CarouselPagination } from './CarouselPagination'\nimport { CarouselSlide } from './CarouselSlide'\nimport { CarouselSlider } from './CarouselSlider'\n\ntype EmblaApi = ReturnType<typeof useEmblaCarousel>[1]\n\ntype CarouselContextValue = {\n emblaRef: React.RefCallback<HTMLDivElement>\n emblaApi: EmblaApi\n selectedIndex: number\n scrollSnaps: number[]\n canScrollPrev: boolean\n canScrollNext: boolean\n scrollPrev: () => void\n scrollNext: () => void\n scrollTo: (index: number) => void\n}\n\nconst CarouselContext = React.createContext<CarouselContextValue | null>(null)\n\ntype CarouselProps = {\n currentSlide?: number\n}\n\nexport const CarouselComponent = ({\n children,\n currentSlide = 0,\n className,\n ...rest\n}: React.PropsWithChildren<\n CarouselProps & React.HTMLAttributes<HTMLDivElement>\n>) => {\n const [emblaRef, emblaApi] = useEmblaCarousel({\n startIndex: currentSlide,\n align: 'center'\n })\n\n const [selectedIndex, setSelectedIndex] = React.useState(currentSlide)\n const [scrollSnaps, setScrollSnaps] = React.useState<number[]>([])\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const scrollPrev = React.useCallback(() => {\n emblaApi?.scrollPrev()\n }, [emblaApi])\n\n const scrollNext = React.useCallback(() => {\n emblaApi?.scrollNext()\n }, [emblaApi])\n\n const scrollTo = React.useCallback(\n (index: number) => {\n emblaApi?.scrollTo(index)\n },\n [emblaApi]\n )\n\n const onSelect = React.useCallback(() => {\n if (!emblaApi) return\n setSelectedIndex(emblaApi.selectedScrollSnap())\n setCanScrollPrev(emblaApi.canScrollPrev())\n setCanScrollNext(emblaApi.canScrollNext())\n }, [emblaApi])\n\n const onInit = React.useCallback(() => {\n if (!emblaApi) return\n setScrollSnaps(emblaApi.scrollSnapList())\n }, [emblaApi])\n\n React.useEffect(() => {\n if (!emblaApi) return\n\n onInit()\n onSelect()\n\n emblaApi.on('reInit', onInit)\n emblaApi.on('reInit', onSelect)\n emblaApi.on('select', onSelect)\n\n return () => {\n emblaApi.off('reInit', onInit)\n emblaApi.off('reInit', onSelect)\n emblaApi.off('select', onSelect)\n }\n }, [emblaApi, onInit, onSelect])\n\n const contextValue = React.useMemo<CarouselContextValue>(\n () => ({\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n }),\n [\n emblaRef,\n emblaApi,\n selectedIndex,\n scrollSnaps,\n canScrollPrev,\n canScrollNext,\n scrollPrev,\n scrollNext,\n scrollTo\n ]\n )\n\n return (\n <div className={cn('relative', 'w-full', className)} {...rest}>\n <CarouselContext.Provider value={contextValue}>\n {children}\n </CarouselContext.Provider>\n </div>\n )\n}\n\nexport const useCarousel = () => {\n const context = React.useContext(CarouselContext)\n if (!context) {\n throw new Error('useCarousel must be used within a Carousel')\n }\n\n return {\n ...context,\n // Alias for backward compatibility\n currentSlide: context.selectedIndex\n }\n}\n\nexport const Carousel = /* @__PURE__ */ Object.assign(CarouselComponent, {\n ArrowNext: CarouselArrowNext,\n ArrowPrevious: CarouselArrowPrevious,\n Pagination: CarouselPagination,\n Slide: CarouselSlide,\n Slider: CarouselSlider\n})\n\nCarouselComponent.displayName = 'Carousel'\n","import { Minus, Ok } from '@atom-learning/icons'\nimport * as RadixCheckbox from '@radix-ui/react-checkbox'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\n\nconst StyledCheckbox = styled(RadixCheckbox.Root, {\n base: [\n 'appearance-none',\n 'relative',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-[3px]',\n 'text-white',\n 'bg-white',\n 'cursor-pointer',\n 'size-4',\n 'p-0',\n 'flex',\n 'items-center',\n 'justify-center',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'shrink-0',\n 'not-disabled:before:-inset-2',\n 'not-disabled:before:-z-1',\n 'not-disabled:before:absolute',\n 'not-disabled:before:bg-primary-300',\n \"not-disabled:before:content-['']\",\n 'not-disabled:before:duration-125',\n 'not-disabled:before:ease-in-out',\n 'not-disabled:before:opacity-0',\n 'not-disabled:before:rounded-[50%]',\n 'not-disabled:before:scale-0',\n 'not-disabled:before:transition-[opacity,scale]',\n 'not-disabled:hover:before:opacity-100',\n 'not-disabled:hover:before:scale-100',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'data-[state=indeterminate]:bg-primary-800',\n 'data-[state=indeterminate]:border-primary-800',\n 'focus:-outline-offset-1',\n 'focus:outline-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n state: {\n error: ['border-danger']\n },\n size: {\n md: ['size-4'],\n lg: ['mt-px', 'size-6']\n }\n }\n})\n\nconst toIconSize = {\n md: 'sm',\n lg: 'sm'\n}\n\nexport const Checkbox = ({\n ref,\n size = 'md',\n checked,\n ...rest\n}: React.ComponentProps<typeof StyledCheckbox>) => {\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n\n return (\n <div className=\"relative z-1\">\n <StyledCheckbox ref={ref} checked={checked} size={size} {...rest}>\n <div className=\"absolute -inset-3 opacity-50\" />\n <RadixCheckbox.Indicator asChild>\n <Icon\n is={checked === 'indeterminate' ? Minus : Ok}\n size={iconSize}\n className=\"stroke-3\"\n />\n </RadixCheckbox.Indicator>\n </StyledCheckbox>\n </div>\n )\n}\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\n\ntype CheckboxGroupCheckedContextValue = {\n checked: CheckboxGroupItemValue[]\n handleItemCheckedChange: (\n newItemChecked: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\ntype CheckboxGroupCheckedContextProps = {\n checked?: CheckboxGroupCheckedContextValue['checked']\n defaultChecked?: CheckboxGroupCheckedContextValue['checked']\n onCheckedChange?: (\n checked: CheckboxGroupCheckedContextValue['checked']\n ) => void\n}\n\nexport const CheckboxGroupCheckedContext =\n React.createContext<CheckboxGroupCheckedContextValue>({\n checked: [],\n handleItemCheckedChange: () => null\n })\n\nconst generateNewCheckedFn = (\n currentChecked: CheckboxGroupCheckedContextValue['checked']\n) => {\n return (newItemChecked, itemValue) => {\n const newCheckedSet = new Set(currentChecked)\n if (newItemChecked) {\n newCheckedSet.add(itemValue)\n } else {\n newCheckedSet.delete(itemValue)\n }\n const newChecked = Array.from(newCheckedSet)\n return newChecked\n }\n}\n\nexport const CheckboxGroupCheckedProvider = ({\n checked: controlledChecked,\n defaultChecked = [],\n onCheckedChange,\n ...rest\n}: React.PropsWithChildren<CheckboxGroupCheckedContextProps>) => {\n const [checked, setChecked] = React.useState(defaultChecked)\n\n const handleItemControlledCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n if (!controlledChecked) return () => null\n const newCheckedFn = generateNewCheckedFn(controlledChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n },\n [onCheckedChange, controlledChecked]\n )\n\n const handleItemCheckedChange = React.useCallback(\n (newItemChecked, itemValue) => {\n setChecked((prevChecked) => {\n const newCheckedFn = generateNewCheckedFn(prevChecked)\n const newChecked = newCheckedFn(newItemChecked, itemValue)\n onCheckedChange?.(newChecked)\n return newChecked\n })\n },\n [onCheckedChange]\n )\n\n const value = React.useMemo<CheckboxGroupCheckedContextValue>(() => {\n const isControlled = Array.isArray(controlledChecked)\n return {\n checked: isControlled\n ? (controlledChecked as CheckboxGroupCheckedContextValue['checked']) // We're literally JUST checking it above but TS still flags it, wrongly, so casting\n : checked,\n handleItemCheckedChange: isControlled\n ? handleItemControlledCheckedChange\n : handleItemCheckedChange\n }\n }, [\n checked,\n handleItemCheckedChange,\n handleItemControlledCheckedChange,\n controlledChecked\n ])\n\n return <CheckboxGroupCheckedContext.Provider value={value} {...rest} />\n}\n","import * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\n\ntype CheckboxGroupMountedContextValue = {\n mounted: CheckboxGroupItemValue[]\n handleItemMountedChange: (\n newItemMounted: boolean,\n itemValue: CheckboxGroupItemValue\n ) => void\n}\n\nexport const CheckboxGroupMountedContext =\n React.createContext<CheckboxGroupMountedContextValue>({\n mounted: [],\n handleItemMountedChange: () => null\n })\n\nexport const CheckboxGroupMountedProvider = (props) => {\n const { handleItemMountedChange: handleItemMountedChangeFurtherUpContext } =\n React.useContext(CheckboxGroupMountedContext)\n\n const [mounted, setMounted] = React.useState<CheckboxGroupItemValue[]>([])\n const handleItemMountedChange = React.useCallback(\n (newItemMounted, itemValue) => {\n handleItemMountedChangeFurtherUpContext?.(newItemMounted, itemValue)\n setMounted((prevMounted) => {\n const newMountedSet = new Set(prevMounted)\n if (newItemMounted) {\n newMountedSet.add(itemValue)\n } else {\n newMountedSet.delete(itemValue)\n }\n const newMounted = Array.from(newMountedSet)\n return newMounted\n })\n },\n [handleItemMountedChangeFurtherUpContext]\n )\n\n const value = React.useMemo<CheckboxGroupMountedContextValue>(\n () => ({ mounted, handleItemMountedChange }),\n [mounted, handleItemMountedChange]\n )\n\n return <CheckboxGroupMountedContext.Provider value={value} {...props} />\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupAllItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'checked' | 'defaultChecked'\n>\n\nexport const CheckboxGroupAllItem = ({\n onCheckedChange,\n title = 'all',\n ...rest\n}: CheckboxGroupAllItemProps) => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.useContext(CheckboxGroupCheckedContext)\n const { mounted: mountedItems } = React.useContext(\n CheckboxGroupMountedContext\n )\n\n const handleItemCheckedChange = (newChecked) => {\n mountedItems.forEach((value) => {\n handleItemCheckedChangeContext(newChecked, value)\n })\n onCheckedChange?.(newChecked)\n }\n\n const isAllChecked = (() => {\n if (!checkedItems.length || !mountedItems.length) return false\n\n if (mountedItems.every((mountedItem) => checkedItems.includes(mountedItem)))\n return true\n\n if (mountedItems.some((mountedItem) => checkedItems.includes(mountedItem)))\n return 'indeterminate'\n\n return false\n })()\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={isAllChecked}\n title={title}\n {...rest}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { CheckboxGroupCheckedContext } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupMountedContext } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupItemProps = Omit<\n React.ComponentProps<typeof Checkbox>,\n 'onCheckedChange' | 'checked' | 'defaultChecked'\n> & {\n onCheckedChange?: (newChecked: boolean) => void\n}\n\nexport const CheckboxGroupItem = ({\n value,\n title,\n onCheckedChange,\n ...rest\n}: CheckboxGroupItemProps) => {\n const {\n checked: checkedItems,\n handleItemCheckedChange: handleItemCheckedChangeContext\n } = React.useContext(CheckboxGroupCheckedContext)\n const { handleItemMountedChange } = React.useContext(\n CheckboxGroupMountedContext\n )\n\n const handleItemCheckedChange = (newChecked) => {\n handleItemCheckedChangeContext(newChecked, value)\n onCheckedChange?.(newChecked)\n }\n\n React.useEffect(() => {\n handleItemMountedChange(true, value)\n return () => {\n handleItemMountedChange(false, value)\n }\n }, [handleItemMountedChange, value])\n\n return (\n <Checkbox\n onCheckedChange={handleItemCheckedChange}\n checked={checkedItems.includes(value)}\n title={title ?? String(value)}\n {...rest}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { CheckboxGroupMountedProvider } from './CheckboxGroupMounted.context'\n\ntype CheckboxGroupSubProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n}\n\nexport const CheckboxGroupSub = ({\n asChild = false,\n ...rest\n}: CheckboxGroupSubProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport type { CheckboxGroupItemValue } from './CheckboxGroup.types'\nimport { CheckboxGroupAllItem } from './CheckboxGroupAllItem'\nimport { CheckboxGroupCheckedProvider } from './CheckboxGroupChecked.context'\nimport { CheckboxGroupItem } from './CheckboxGroupItem'\nimport { CheckboxGroupMountedProvider } from './CheckboxGroupMounted.context'\nimport { CheckboxGroupSub } from './CheckboxGroupSub'\n\ntype CheckboxGroupRootProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'defaultChecked'\n> & {\n checked?: CheckboxGroupItemValue[]\n onCheckedChange?: (checked: CheckboxGroupItemValue[]) => void\n defaultChecked?: CheckboxGroupItemValue[]\n asChild?: boolean\n}\n\nconst CheckboxGroupRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n asChild = false,\n ...rest\n}: CheckboxGroupRootProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <CheckboxGroupCheckedProvider\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n >\n <CheckboxGroupMountedProvider>\n <Component {...rest} />\n </CheckboxGroupMountedProvider>\n </CheckboxGroupCheckedProvider>\n )\n}\n\nexport const CheckboxGroup = /* @__PURE__ */ Object.assign(CheckboxGroupRoot, {\n Item: CheckboxGroupItem,\n AllItem: CheckboxGroupAllItem,\n Sub: CheckboxGroupSub\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = ({\n ref,\n className,\n ...rest\n}: TreeListItemProps) => (\n <li\n {...rest}\n ref={ref}\n role=\"treeitem\"\n className={cn(\n 'flex',\n 'items-center',\n 'gap-2',\n 'not-first:mt-0.5',\n className\n )}\n />\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeCollapsibleContextValue = {\n triggerRef?: React.MutableRefObject<HTMLElement | null>\n setTriggerRef?: (HTMLElement) => void\n}\nexport const TreeCollapsibleContext =\n React.createContext<TreeCollapsibleContextValue>({})\nconst TreeCollapsibleProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n return (\n <TreeCollapsibleContext.Provider value={{ triggerRef, setTriggerRef }}>\n {children}\n </TreeCollapsibleContext.Provider>\n )\n}\n\nconst StyledCollapsibleTreeItemRoot = /* @__PURE__ */ styled(Root, {\n base: ['w-full']\n})\n\ntype TreeCollapsibleProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof StyledCollapsibleTreeItemRoot>\nexport const TreeCollapsible = ({\n ref,\n ...props\n}: TreeCollapsibleProps & {\n ref?: React.Ref<HTMLLIElement>\n}) => (\n <TreeListItem ref={ref}>\n <TreeCollapsibleProvider>\n <StyledCollapsibleTreeItemRoot {...props} />\n </TreeCollapsibleProvider>\n </TreeListItem>\n)\n","import { styled } from '../../styled'\n\nexport const TreeList = styled('ul', {\n base: ['flex', 'flex-col', 'p-0', 'm-0', 'list-none', 'w-full', '[&_&]:pl-4']\n})\n","import { Content } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeList } from './TreeList'\n\ntype TreeCollapsibleContentProps = React.ComponentProps<typeof Content> &\n React.ComponentProps<typeof TreeList> & {\n ref?: React.Ref<HTMLUListElement>\n }\n\nexport const TreeCollapsibleContent = ({\n ref,\n children,\n className,\n ...rest\n}: TreeCollapsibleContentProps) => {\n const { triggerRef } = React.useContext(TreeCollapsibleContext)\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <Content\n className={cn('data-[state=closed]:hidden', className)}\n onKeyDown={handleOnKeydown}\n {...rest}\n asChild\n >\n <TreeList ref={ref} role=\"group\">\n {children}\n </TreeList>\n </Content>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nexport const TreeIcon = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Icon>) => (\n <Icon\n size=\"md\"\n {...rest}\n className={cn('my-1', 'shrink-0', 'self-start', className)}\n />\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype StyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = ({ className, ...rest }: StyledTreeTextProps) => (\n <Text\n as=\"span\"\n {...rest}\n className={cn(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n className\n )}\n size=\"md\"\n />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeText } from './TreeText'\n\nconst StyledItemContent = styled('div', {\n base: [\n 'w-full',\n 'relative',\n 'min-h-8',\n 'pl-10',\n 'flex',\n 'items-center',\n 'gap-2'\n ]\n})\n\ntype TreeItemContentProps = React.ComponentProps<typeof StyledItemContent>\n\nexport const TreeItemContent = ({\n ref,\n children,\n ...rest\n}: TreeItemContentProps) => (\n <StyledItemContent ref={ref} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <TreeText>{child}</TreeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <TreeIcon {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { TreeCollapsibleContext } from './TreeCollapsible'\nimport { TreeItemContent } from './TreeItemContent'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: [\n 'absolute',\n 'left-0',\n 'top-0',\n 'pointer-events-none',\n '[&_svg]:duration-300',\n '[&_svg]:transition-transform',\n '[&[data-state=closed]>svg]:-rotate-90',\n '[&[data-state=open]>svg]:rotate-0'\n ]\n})\n\ntype NavigationMenuCollapsibleTriggerProps = React.ComponentProps<\n typeof TreeItemContent\n> & {\n label: string\n}\n\nexport const TreeCollapsibleTrigger = ({\n children,\n label,\n className,\n onClick,\n ...rest\n}: NavigationMenuCollapsibleTriggerProps) => {\n const { setTriggerRef, triggerRef } = React.useContext(TreeCollapsibleContext)\n\n return (\n <TreeItemContent\n {...rest}\n className={cn('cursor-pointer', className)}\n onClick={(event) => {\n onClick?.(event)\n triggerRef?.current?.click()\n }}\n >\n <Trigger asChild>\n <StyledActionIcon\n size=\"sm\"\n ref={setTriggerRef}\n label={label}\n theme=\"neutral\"\n hasTooltip={false}\n onClick={(e) => e.stopPropagation()}\n >\n <Icon is={ChevronDown} />\n </StyledActionIcon>\n </Trigger>\n {children}\n </TreeItemContent>\n )\n}\n","import * as React from 'react'\n\nimport { TreeItemContent } from './TreeItemContent'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeItemProps = React.ComponentProps<typeof TreeItemContent>\n\nexport const TreeItem = ({ children, ...rest }: TreeItemProps) => (\n <TreeListItem>\n <TreeItemContent {...rest}>{children}</TreeItemContent>\n </TreeListItem>\n)\n","import * as React from 'react'\n\nimport { TreeCollapsible } from './TreeCollapsible'\nimport { TreeCollapsibleContent } from './TreeCollapsibleContent'\nimport { TreeCollapsibleTrigger } from './TreeCollapsibleTrigger'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeItem } from './TreeItem'\nimport { TreeList } from './TreeList'\nimport { TreeText } from './TreeText'\n\ntype TreeProps = React.ComponentProps<typeof TreeList>\n\nexport const TreeRoot = ({ ref, children, ...rest }: TreeProps) => (\n <TreeList {...rest} ref={ref} role=\"tree\">\n {children}\n </TreeList>\n)\n\nexport const Tree = /* @__PURE__ */ Object.assign(TreeRoot, {\n Collapsible: TreeCollapsible,\n CollapsibleContent: TreeCollapsibleContent,\n CollapsibleTrigger: TreeCollapsibleTrigger,\n Item: TreeItem,\n Icon: TreeIcon,\n Text: TreeText\n})\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleProps = Omit<\n React.ComponentProps<typeof Tree.Collapsible> &\n React.ComponentProps<typeof CheckboxGroup.Sub>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsible = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleProps) => (\n <CheckboxGroup.Sub asChild>\n <Tree.Collapsible {...rest}>{children}</Tree.Collapsible>\n </CheckboxGroup.Sub>\n)\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\n\ntype CheckboxTreeCollapsibleContentProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleContent>,\n 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleContent = ({\n children,\n ...rest\n}: CheckboxTreeCollapsibleContentProps) => (\n <CheckboxGroup.Sub asChild>\n <Tree.CollapsibleContent {...rest} forceMount>\n {children}\n </Tree.CollapsibleContent>\n </CheckboxGroup.Sub>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Tree } from '../tree/Tree'\n\nconst StyledItemContent = styled('label', {\n base: ['max-w-full', 'flex', 'items-center', 'gap-2']\n})\n\ntype CheckboxTreeItemContentProps = React.ComponentProps<\n typeof StyledItemContent\n>\n\nexport const CheckboxTreeItemContent = ({\n children,\n ...rest\n}: CheckboxTreeItemContentProps) => (\n <StyledItemContent {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <Tree.Text>{child}</Tree.Text>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <Tree.Icon {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n)\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxGroupCollapsibleTriggerProps = Omit<\n React.ComponentProps<typeof Tree.CollapsibleTrigger> &\n React.ComponentProps<typeof CheckboxGroup.AllItem>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeCollapsibleTrigger = ({\n onCheckedChange,\n title,\n label,\n children,\n disabled,\n ...rest\n}: CheckboxGroupCollapsibleTriggerProps) => {\n const treeCollapsibleTriggerProps = { label }\n const checkboxAllItemProps = { onCheckedChange, title, disabled }\n return (\n <Tree.CollapsibleTrigger {...treeCollapsibleTriggerProps} {...rest}>\n <CheckboxTreeItemContent\n onClick={\n // Don't propagate click and don't open/close the collapsible when the label/checkbox are clicked\n (e) => e.stopPropagation()\n }\n >\n <CheckboxGroup.AllItem {...checkboxAllItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.CollapsibleTrigger>\n )\n}\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeItemContent } from './CheckboxTreeItemContent'\n\ntype CheckboxTreeItemProps = Omit<\n React.ComponentProps<typeof Tree.Item> &\n React.ComponentProps<typeof CheckboxGroup.Item>,\n 'required' | 'asChild'\n>\n\nexport const CheckboxTreeItem = ({\n value,\n title,\n onCheckedChange,\n children,\n disabled,\n ...rest\n}: CheckboxTreeItemProps) => {\n const checkboxItemProps = { value, title, onCheckedChange, disabled }\n return (\n <Tree.Item {...rest}>\n <CheckboxTreeItemContent>\n <CheckboxGroup.Item {...checkboxItemProps} />\n {children}\n </CheckboxTreeItemContent>\n </Tree.Item>\n )\n}\n","import * as React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeCollapsible } from './CheckboxTreeCollapsible'\nimport { CheckboxTreeCollapsibleContent } from './CheckboxTreeCollapsibleContent'\nimport { CheckboxTreeCollapsibleTrigger } from './CheckboxTreeCollapsibleTrigger'\nimport { CheckboxTreeItem } from './CheckboxTreeItem'\n\ntype CheckboxTreeRootProps = Omit<\n React.ComponentProps<typeof CheckboxGroup> &\n React.ComponentProps<typeof Tree>,\n 'asChild'\n>\n\nexport const CheckboxTreeRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n ...rest\n}: CheckboxTreeRootProps): React.ReactElement<unknown> => {\n const checkboxGroupProps = { checked, defaultChecked, onCheckedChange }\n return (\n <CheckboxGroup {...checkboxGroupProps} asChild>\n <Tree {...rest} />\n </CheckboxGroup>\n )\n}\n\ntype CheckboxTreeType = typeof CheckboxTreeRoot & {\n Collapsible: typeof CheckboxTreeCollapsible\n CollapsibleContent: typeof CheckboxTreeCollapsibleContent\n CollapsibleTrigger: typeof CheckboxTreeCollapsibleTrigger\n Item: typeof CheckboxTreeItem\n}\n\nexport const CheckboxTree: CheckboxTreeType = /* @__PURE__ */ Object.assign(\n CheckboxTreeRoot,\n {\n Collapsible: CheckboxTreeCollapsible,\n CollapsibleContent: CheckboxTreeCollapsibleContent,\n CollapsibleTrigger: CheckboxTreeCollapsibleTrigger,\n Item: CheckboxTreeItem\n }\n)\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport type { InlineMessageTheme } from './InlineMessage.types'\n\nexport const INLINE_MESSAGE_ICONS: Record<\n InlineMessageTheme,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n success: OkCircle,\n warning: Danger,\n info: Info,\n neutral: Info,\n error: Error\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { INLINE_MESSAGE_ICONS } from './InlineMessage.config'\nimport type { InlineMessageTheme } from './InlineMessage.types'\n\nconst InlineMessageContainer = styled('div', {\n base: ['flex'],\n variants: {\n theme: {\n success: ['text-success'],\n warning: ['[&_svg]:text-warning-dark', 'text-warning-text'],\n info: ['text-info'],\n neutral: ['text-grey-800'],\n error: ['text-danger']\n }\n }\n})\n\ntype InlineMessageProps = React.ComponentProps<\n typeof InlineMessageContainer\n> & {\n showIcon?: boolean\n size?: 'xs' | 'sm' | 'md'\n}\n\nexport const InlineMessage = ({\n className,\n showIcon = true,\n theme = 'error',\n size = 'sm',\n children,\n ...rest\n}: InlineMessageProps) => (\n <InlineMessageContainer theme={theme} className={className} {...rest}>\n {showIcon && (\n <Icon\n size=\"sm\"\n is={INLINE_MESSAGE_ICONS[theme as InlineMessageTheme]}\n className=\"mr-2\"\n />\n )}\n <Text as=\"span\" size={size} className=\"translate-y-0.5\">\n {children}\n </Text>\n </InlineMessageContainer>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledLabel = styled('label', {\n base: ['text-grey-900', 'font-body', 'm-0'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n type: {\n block: ['block', 'font-semibold'],\n inline: ['flex', 'font-normal', 'max-w-max']\n },\n align: { start: [], center: [] },\n direction: { reverse: [], row: [] },\n appearance: { standard: [], modern: [] }\n },\n compoundVariants: [\n {\n type: 'inline',\n align: 'start',\n class: ['items-start']\n },\n {\n type: 'inline',\n align: 'center',\n class: ['items-center']\n },\n {\n type: 'inline',\n direction: 'reverse',\n class: ['flex-row-reverse']\n },\n {\n type: 'inline',\n direction: 'row',\n class: ['flex-row']\n },\n {\n type: 'block',\n appearance: 'modern',\n class: ['font-normal']\n }\n ]\n})\n\nexport type LabelProps = Override<\n React.ComponentPropsWithoutRef<typeof StyledLabel>,\n {\n as?: 'label' | 'legend'\n required?: boolean\n }\n>\n\nexport const Label = ({\n align = 'start',\n as = 'label',\n direction = 'row',\n size = 'md',\n type = 'block',\n children,\n required,\n ...rest\n}: LabelProps) => (\n <StyledLabel\n as={as}\n size={size}\n type={type}\n align={align}\n direction={direction}\n {...rest}\n >\n {children}\n {required && (\n <span className=\"text-danger ml-1 font-normal\" aria-hidden>\n *\n </span>\n )}\n </StyledLabel>\n)\n\nLabel.displayName = 'Label'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledRadioButton = styled(\n RadioGroup.Item,\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-full',\n 'text-white',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'disabled:bg-grey-200',\n 'disabled:border-grey-800',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'disabled:data-[state=checked]:bg-grey-800',\n 'disabled:data-[state=checked]:border-grey-800'\n ],\n variants: {\n size: {\n md: ['size-4'],\n lg: ['-mt-1', 'size-6']\n }\n }\n },\n { enablePolymorphism: false, enableResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(\n RadioGroup.Indicator,\n {\n base: ['size-1.5', 'rounded-full', 'bg-current', 'absolute'],\n variants: {\n size: {\n md: ['size-1.5'],\n lg: ['size-3']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype RadioButtonProps = Override<\n React.ComponentProps<typeof StyledRadioButton>,\n {\n 'aria-label'?: string\n }\n>\n\nexport const RadioButton = ({ size, ...rest }: RadioButtonProps) => (\n <StyledRadioButton {...rest} size={size}>\n <StyledIndicator size={size} />\n </StyledRadioButton>\n)\n\nRadioButton.displayName = 'RadioButton'\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const Description = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => (\n <Text size=\"sm\" className={cn('text-grey-700', 'max-w-[80ch]', className)}>\n {children}\n </Text>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { RadioButton } from '../radio-button/RadioButton'\nimport { Description } from './FieldDescription'\n\ntype InlineFieldWrapperProps = {\n className?: string\n error?: string\n label: string\n required?: boolean\n align?: 'start' | 'center'\n direction?: 'row' | 'reverse'\n description?: string\n}\n\nexport const InlineFieldWrapper = ({\n align = 'start',\n children,\n className,\n description,\n direction = 'row',\n error,\n label,\n required\n}: React.PropsWithChildren<InlineFieldWrapperProps>) => (\n <div className={className}>\n <Label\n align={align}\n direction={direction}\n required={required}\n type=\"inline\"\n >\n {React.Children.map(children, (child: any) => (\n <div\n className={cn(\n direction === 'reverse' && 'ml-3',\n direction === 'row' && 'mr-3',\n (child?.type === Checkbox || child?.type === RadioButton) &&\n child?.props?.size !== 'lg' &&\n 'translate-y-1'\n )}\n >\n {child}\n </div>\n ))}\n {label}\n </Label>\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n {description && (\n <Description\n className={cn(\n 'mt-2',\n direction === 'reverse' && 'mr-7',\n direction === 'row' && 'ml-7'\n )}\n >\n {description}\n </Description>\n )}\n </div>\n)\n\nInlineFieldWrapper.displayName = 'InlineFieldWrapper'\n","import delve from 'dlv'\nimport { useFormContext } from 'react-hook-form'\n\nexport const useFieldError = (fieldName: string) => {\n const { errors } = useFormContext()\n\n // in case of migration to a newer version of react-hook-form the path needs to updated to account for dynamic fields naming convention\n const fieldPath = fieldName.split(/[,[\\].]+?/).filter(Boolean)\n\n const getErrors = () => delve(errors, fieldPath)\n\n return {\n error: getErrors()?.message\n }\n}\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { InlineFieldWrapper } from '../field-wrapper/InlineFieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\n\nenum CheckboxValue {\n ON = 'on',\n OFF = 'off'\n}\n\nexport const CheckboxField = ({\n className,\n label,\n name,\n validation,\n description,\n defaultChecked = false,\n checked,\n onCheckedChange,\n ...rest\n}: React.ComponentProps<typeof Checkbox> & FieldElementWrapperProps) => {\n const { control } = useFormContext()\n const { error } = useFieldError(name)\n const {\n field: { ref, onChange, value: innerChecked, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: defaultChecked\n })\n\n React.useEffect(() => {\n // Update the react-hook-form inner checked to match what is passed in.\n if (typeof checked !== 'undefined') onChange(checked)\n }, [checked])\n\n return (\n <InlineFieldWrapper\n className={className}\n description={description}\n error={error}\n label={label}\n required={Boolean(validation?.required)}\n >\n <Checkbox\n ref={ref}\n name={innerName}\n {...rest}\n onCheckedChange={(newChecked) => {\n onChange(newChecked)\n onCheckedChange?.(newChecked)\n }}\n value={innerChecked ? CheckboxValue.ON : CheckboxValue.OFF}\n checked={innerChecked}\n {...(error && { state: 'error' })}\n />\n </InlineFieldWrapper>\n )\n}\n\nCheckboxField.displayName = 'CheckboxField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Icon } from '../icon/Icon'\n\nexport const StyledChipContent = styled('span', {\n base: [\n 'inline-flex',\n 'items-center',\n 'px-1',\n 'grow',\n 'overflow-hidden',\n 'text-ellipsis',\n 'whitespace-nowrap',\n '*:not-last:mr-1'\n ]\n})\n\nconst toIconSize = { sm: 'sm', md: 'sm', lg: 'md' }\n\nexport const ChipIcon = (props: React.ComponentProps<typeof Icon>) => {\n const rootContext = React.useContext(ChipRootContext)\n const { size } = rootContext\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n return <Icon {...props} size={iconSize} />\n}\n\nconst ChipContent = ({ children, ...rest }) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n return (\n <StyledChipContent {...rest}>\n {\n childrenArray.map((child, index) => {\n if (!isSingleChild && typeof child === 'string')\n return (\n <span\n key={child}\n className=\"overflow-hidden text-ellipsis whitespace-nowrap\"\n >\n {child}\n </span>\n )\n if (React.isValidElement(child) && child.type === Icon) {\n const iconProps = child.props as React.ComponentProps<typeof Icon>\n return <ChipIcon key={`icon-${index}`} {...iconProps} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledChipContent>\n )\n}\n\nexport const StyledRoot = styled('div', {\n base: [\n 'flex',\n 'px-2',\n 'border',\n 'rounded-md',\n 'items-center',\n 'font-body',\n 'max-w-full',\n 'border-primary-800',\n 'text-primary-900',\n 'bg-primary-100',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n sm: ['h-6', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['h-8', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n lg: ['h-10', 'text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n appearance: {\n standard: [],\n modern: ['border-grey-900', 'text-grey-900', 'bg-grey-100']\n }\n }\n})\n\nexport type ChipRootContext = React.ComponentProps<typeof StyledRoot>\nexport type ChipRootProviderProps = ChipRootContext\n\nexport const ChipRootContext = React.createContext<ChipRootContext>({})\n\nexport const ChipRootProvider = ({ size, children }: ChipRootProviderProps) => {\n const value = React.useMemo<ChipRootContext>(() => ({ size }), [size])\n return (\n <ChipRootContext.Provider value={value}>\n {children}\n </ChipRootContext.Provider>\n )\n}\n\nexport type ChipRootProps = ChipRootProviderProps\n\nconst ChipRoot = ({ ref, size = 'md', ...rest }: ChipRootProps) => (\n <ChipRootProvider size={size}>\n <StyledRoot ref={ref} size={size} {...rest} />\n </ChipRootProvider>\n)\n\nexport const Chip = /* @__PURE__ */ Object.assign(ChipRoot, {\n Content: ChipContent,\n Icon: ChipIcon\n})\n","import { styled } from '../../styled'\n\nexport const ChipGroup = styled('div', {\n base: ['flex', 'flex-row', 'flex-wrap', 'gap-2']\n})\n","import * as React from 'react'\n\nexport interface DismissibleGroupContextValue {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\nexport const DismissibleGroupContext =\n React.createContext<DismissibleGroupContextValue>({\n onDismiss: () => null\n })\n\nexport interface DismissibleGroupProps {\n disabled?: boolean\n onDismiss: (value: string | number) => void\n}\n\nexport const DismissibleGroupProvider = ({\n children,\n disabled,\n onDismiss\n}: React.PropsWithChildren<DismissibleGroupProps>) => {\n const value = React.useMemo<DismissibleGroupContextValue>(\n () => ({ disabled, onDismiss }),\n [disabled, onDismiss]\n )\n return (\n <DismissibleGroupContext.Provider value={value}>\n {children}\n </DismissibleGroupContext.Provider>\n )\n}\n\nexport interface DismissibleGroupRootProps extends DismissibleGroupProps {\n as?: React.ElementType\n ref?: React.Ref<HTMLDivElement>\n}\n\nexport const DismissibleGroupRoot = ({\n as: Component = 'div',\n disabled,\n onDismiss,\n ...rest\n}: React.PropsWithChildren<DismissibleGroupRootProps>) => (\n <DismissibleGroupProvider disabled={disabled} onDismiss={onDismiss}>\n <Component {...rest} />\n </DismissibleGroupProvider>\n)\n\nDismissibleGroupRoot.displayName = 'DismissibleGroup'\n","import * as React from 'react'\n\nimport { Dismissible } from '../dismissible'\nimport { DismissibleGroupContext } from './DismissibleGroupRoot'\n\nexport type DismissibleGroupItemProps = React.ComponentProps<\n typeof Dismissible\n> & {\n value: string | number\n disabled?: boolean\n}\n\nexport const DismissibleGroupItem = ({\n children,\n value,\n disabled: itemDisabled = false,\n ...rest\n}: React.PropsWithChildren<DismissibleGroupItemProps>) => {\n const groupContext = React.useContext(DismissibleGroupContext)\n if (groupContext === undefined) {\n throw new Error(\n 'DismissibleGroup.Item can only be used within a DismissibleGroup'\n )\n }\n const { onDismiss, disabled: groupDisabled } = groupContext\n return (\n <Dismissible\n disabled={groupDisabled || itemDisabled}\n {...rest}\n onDismiss={() => onDismiss(value)}\n >\n {children}\n </Dismissible>\n )\n}\n","import { DismissibleTrigger } from '../dismissible/DismissibleTrigger'\nimport { DismissibleGroupItem } from './DismissibleGroupItem'\nimport { DismissibleGroupRoot } from './DismissibleGroupRoot'\n\nexport const DismissibleGroup = /* @__PURE__ */ Object.assign(\n DismissibleGroupRoot,\n {\n Item: DismissibleGroupItem,\n Trigger: DismissibleTrigger\n }\n)\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Chip } from '../chip/Chip'\nimport { DismissibleGroup } from '../dismissible-group'\nimport { Icon } from '../icon/Icon'\n\nconst StyledChipDismissibleGroupItem = styled(Chip, {\n base: ['flex', 'px-1']\n})\n\nexport type ChipDismissibleGroupItem = React.ComponentProps<\n typeof DismissibleGroup.Item\n> &\n React.ComponentProps<typeof StyledChipDismissibleGroupItem> & {\n dismissActionLabel: string\n }\n\nexport const ChipDismissibleGroupItem = ({\n size = 'md',\n children,\n dismissActionLabel = 'Dismiss',\n ...rest\n}: ChipDismissibleGroupItem) => (\n <DismissibleGroup.Item asChild {...rest}>\n <StyledChipDismissibleGroupItem size={size}>\n <Chip.Content>{children}</Chip.Content>\n <DismissibleGroup.Trigger asChild>\n <ActionIcon\n label={dismissActionLabel}\n size={size === 'sm' ? 'xs' : 'sm'}\n className=\"text-grey-600\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </DismissibleGroup.Trigger>\n </StyledChipDismissibleGroupItem>\n </DismissibleGroup.Item>\n)\n","import * as React from 'react'\n\nimport { ChipGroup } from '../chip/ChipGroup'\nimport { DismissibleGroup } from '../dismissible-group'\n\ntype ChipDismissibleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof DismissibleGroup>\n\nexport const ChipDismissibleGroupRoot = ({\n ref,\n ...props\n}: ChipDismissibleGroupRootProps) => {\n return <ChipGroup as={DismissibleGroup} ref={ref} {...props} />\n}\n","import { ChipDismissibleGroupItem } from './ChipDismissibleGroupItem'\nimport { ChipDismissibleGroupRoot } from './ChipDismissibleGroupRoot'\n\ntype ChipDismissibleGroup = typeof ChipDismissibleGroupRoot & {\n Item: typeof ChipDismissibleGroupItem\n}\n\nexport const ChipDismissibleGroup =\n ChipDismissibleGroupRoot as ChipDismissibleGroup\nChipDismissibleGroup.Item = ChipDismissibleGroupItem\n","import { Ok } from '@atom-learning/icons'\nimport * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Chip } from '../chip/Chip'\nimport { Icon } from '../icon/Icon'\n\nconst StyledChipToggleIcon = styled(Icon, {\n base: ['hidden']\n})\n\nconst StyledChipToggleGroupItem = styled(Chip, {\n base: [\n 'flex',\n 'not-disabled:cursor-pointer',\n 'not-disabled:data-[state=on]:hover:bg-white',\n 'not-disabled:data-[state=on]:hover:text-primary-1000',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-grey-200',\n 'not-disabled:hover:border-current',\n 'not-disabled:hover:text-grey-1000',\n 'data-[state=off]:bg-white',\n 'data-[state=off]:border-grey-600',\n 'data-[state=off]:text-grey-800',\n 'data-[state=on]:[&_svg]:block'\n ],\n variants: {\n appearance: {\n standard: [],\n modern: [\n 'data-[state=off]:bg-grey-100',\n 'data-[state=off]:border-transparent',\n 'data-[state=on]:border-grey-900',\n 'data-[state=on]:text-grey-900',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:font-bold'\n ]\n }\n }\n})\n\ntype ChipToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledChipToggleGroupItem>\n\nexport const ChipToggleGroupItem = ({\n size = 'md',\n appearance,\n children,\n ...rest\n}: ChipToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledChipToggleGroupItem as=\"button\" appearance={appearance}>\n <StyledChipToggleIcon is={Ok} size={size === 'lg' ? 'md' : 'sm'} />\n <Chip.Content>{children}</Chip.Content>\n </StyledChipToggleGroupItem>\n </ToggleGroup.Item>\n)\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\ntype RootType = {\n disableDeselect?: boolean\n}\n\ntype ToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root> &\n RootType\n\nexport const ToggleGroupRoot = ({\n ref,\n disableDeselect = false,\n onValueChange,\n defaultValue,\n ...rest\n}: ToggleGroupRootProps) => {\n const [internalValue, setInternalValue] =\n React.useState<ToggleGroupRootProps['value']>(defaultValue)\n const handleValueChange: ToggleGroupRootProps['onValueChange'] = (\n newValue\n ) => {\n if (disableDeselect && (newValue === '' || newValue?.length === 0)) return\n setInternalValue(newValue)\n onValueChange?.(newValue)\n }\n\n return (\n // eslint-disable-next-line\n // @ts-ignore Radix types complain on properties depending on whether `type=\"single\"` or `\"multiple\"`. Works correctly so muting.\n <ToggleGroup.Root\n ref={ref}\n onValueChange={handleValueChange}\n value={internalValue}\n {...rest}\n />\n )\n}\n","import { ToggleGroupRoot } from './ToggleGroupRoot'\n\nexport const ToggleGroup = {\n Root: ToggleGroupRoot\n}\n","import * as React from 'react'\n\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\nimport { ChipGroup } from '../chip/ChipGroup'\n\ntype ChipToggleGroupRootProps = React.ComponentProps<typeof ChipGroup> &\n React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const ChipToggleGroupRoot = ({\n ref,\n ...props\n}: ChipToggleGroupRootProps) => (\n <ChipGroup\n ref={ref}\n as={ToggleGroup.Root}\n orientation=\"horizontal\"\n {...props}\n />\n)\n","import { ChipToggleGroupItem } from './ChipToggleGroupItem'\nimport { ChipToggleGroupRoot } from './ChipToggleGroupRoot'\n\ntype ChipToggleGroup = typeof ChipToggleGroupRoot & {\n Item: typeof ChipToggleGroupItem\n}\n\nexport const ChipToggleGroup = ChipToggleGroupRoot as ChipToggleGroup\nChipToggleGroup.Item = ChipToggleGroupItem\n","import { ComboboxInput as BaseComboboxInput } from '@reach/combobox'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const StyledComboboxInput = styled(BaseComboboxInput, {\n base: [\n 'bg-(image:--bg-chevron)',\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n '[background-repeat:no-repeat,repeat-x]',\n 'bg-size-[--spacing(5)_auto,100%]',\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'cursor-text',\n 'block',\n 'font-body',\n 'h-10',\n 'pl-3',\n 'pr-10',\n 'transition-all',\n 'duration-100',\n 'ease-out',\n 'w-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800'\n ],\n\n variants: {\n size: {\n sm: ['h-8', 'text-sm', 'leading-[1.7]'],\n md: ['h-10', 'text-md', 'leading-loose'],\n lg: ['h-12', 'text-md', 'leading-loose']\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n theme: {\n white: [],\n grey: []\n },\n state: {\n error: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border', 'border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nexport type ComboboxInputProps = React.ComponentProps<\n typeof StyledComboboxInput\n>\n\nexport const ComboboxInput = ({\n ref,\n size = 'md',\n appearance = 'standard',\n ...rest\n}: ComboboxInputProps) => (\n <StyledComboboxInput\n size={size}\n appearance={appearance}\n {...rest}\n ref={ref}\n />\n)\n","import { ComboboxList as BaseComboboxList } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxList = styled(\n BaseComboboxList,\n {\n base: ['list-none', 'm-0', 'p-0', 'select-none']\n },\n { enablePolymorphism: false }\n)\n","import { ComboboxOption as BaseComboboxOption } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxOption = styled(\n BaseComboboxOption,\n {\n base: [\n 'text-grey-900',\n 'cursor-pointer',\n 'm-0',\n 'p-2',\n 'hover:bg-grey-100',\n 'hover:rounded-sm',\n 'aria-selected:bg-grey-100',\n 'aria-selected:rounded-sm',\n 'data-user-value:text-primary-800'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { ComboboxPopover as BaseComboboxPopover } from '@reach/combobox'\n\nimport { styled } from '../../styled'\n\nexport const ComboboxPopover = styled(\n BaseComboboxPopover,\n {\n base: [\n 'bg-white',\n 'border',\n 'border-grey-200',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'font-body',\n 'text-md',\n 'outline-none',\n 'p-1',\n 'translate-y-2'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Combobox as BaseCombobox, ComboboxOptionText } from '@reach/combobox'\n\nimport { ComboboxInput } from './ComboboxInput'\nimport { ComboboxList } from './ComboboxList'\nimport { ComboboxOption } from './ComboboxOption'\nimport { ComboboxPopover } from './ComboboxPopover'\n\n// ':root': { '--reach-combobox': 1 }\n\nexport const Combobox = /* @__PURE__ */ Object.assign(BaseCombobox, {\n displayName: 'Combobox',\n Option: ComboboxOption,\n Input: ComboboxInput,\n Popover: ComboboxPopover,\n List: ComboboxList,\n OptionText: ComboboxOptionText\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport type { ValidationOptions } from '../form/validation'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { type LabelProps } from '../label/Label'\nimport { Link } from '../link/Link'\nimport { Description } from './FieldDescription'\n\nexport type FieldWrapperProps = {\n className?: string\n error?: string\n fieldId: string\n label: string\n prompt?: { link?: string; label: string; onClick?: () => void }\n description?: string\n required?: boolean\n hideLabel?: boolean\n appearance?: LabelProps['appearance']\n}\n\nexport type FieldElementWrapperProps = Omit<FieldWrapperProps, 'fieldId'> & {\n name: string\n validation?: ValidationOptions\n}\n\nexport const FieldWrapper = ({\n children,\n error,\n fieldId,\n label,\n prompt,\n description,\n required,\n hideLabel,\n appearance,\n ...rest\n}: React.PropsWithChildren<FieldWrapperProps>) => (\n <div {...rest}>\n <div\n className={cn(\n 'mb-3',\n 'flex',\n 'items-center',\n 'justify-between',\n hideLabel && 'sr-only'\n )}\n >\n <Label htmlFor={fieldId} required={required} appearance={appearance}>\n {label}\n </Label>\n {prompt && (\n <Link href={prompt?.link} onClick={prompt?.onClick} size=\"sm\">\n {prompt.label}\n </Link>\n )}\n </div>\n {description && <Description className=\"mb-3\">{description}</Description>}\n {children}\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </div>\n)\n\nFieldWrapper.displayName = 'FieldWrapper'\n","import * as React from 'react'\n\nimport type { InputProps } from '../input/Input'\n\nexport type FormCustomContextType =\n | {\n appearance?: InputProps['appearance']\n theme?: InputProps['theme']\n }\n | undefined\n\nexport const FormCustomContext = React.createContext<FormCustomContextType>({\n appearance: 'standard'\n})\n\nexport const useFormCustomContext = () => React.useContext(FormCustomContext)\n","import { overrideStyledVariantValue } from '../override-styled-variant-value/overrideStyledVariantValue'\n\nconst toIconSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const getFieldIconSize = (size: any) =>\n overrideStyledVariantValue(size, (s) => toIconSize[s])\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { overrideStyledVariantValue } from '../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Text } from '../text/Text'\n\nexport const InputBackground = styled('div', {\n base: [\n 'flex',\n 'text-grey-1000',\n 'transition-[background,border-color]',\n 'duration-100',\n 'ease-out',\n 'w-full'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-blue-800',\n 'rounded-md'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1',\n 'rounded-md'\n ]\n },\n size: {\n sm: ['h-8'],\n md: ['h-10'],\n lg: ['h-12'],\n xl: ['h-16']\n },\n disabled: {\n true: ['cursor-not-allowed', 'opacity-30']\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nInputBackground.displayName = 'InputBackground'\n\n// @__PURE__ keeps this tree-shakable for consumers importing only\n// InputBackground from this module.\nconst StyledInputText = /* @__PURE__ */ styled(Text, {\n base: [\n 'appearance-none',\n 'border-none',\n 'bg-none',\n 'bg-transparent',\n 'shadow-none',\n 'box-border',\n 'focus:outline-none',\n 'px-3',\n 'size-full',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ]\n})\n\nexport type InputTextProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> &\n Omit<React.ComponentProps<typeof StyledInputText>, 'type' | 'as' | 'ref'> & {\n // override default 'type' property to prevent Input from being used to render\n // checkboxes, radios etc — we have dedicated components for them\n type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'\n as?: never\n disabled?: boolean\n // StyledInputText wraps Text (default element 'p'), but InputText always\n // renders it as=\"input\", so the inherited paragraph ref must be overridden\n ref?: React.Ref<HTMLInputElement>\n }\n\nconst toTextSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg'\n}\n\nexport const InputText = ({\n ref,\n type = 'text',\n size,\n ...rest\n}: InputTextProps) => {\n const textSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toTextSize[s]),\n [size]\n )\n\n return (\n <StyledInputText\n ref={ref}\n as=\"input\"\n type={type === 'number' ? 'text' : type}\n inputMode={type === 'number' ? 'numeric' : undefined}\n pattern={type === 'number' ? '[0-9]*' : undefined}\n size={textSize}\n {...rest}\n />\n )\n}\n\ntype InputBackgroundProps = React.ComponentProps<typeof InputBackground>\nexport type InputProps = Omit<\n React.ComponentProps<typeof InputText>,\n 'size' | 'state' | 'appearance'\n> & {\n size?: InputBackgroundProps['size']\n state?: InputBackgroundProps['state']\n appearance?: InputBackgroundProps['appearance']\n theme?: InputBackgroundProps['theme']\n disabled?: boolean\n name?: string\n readOnly?: boolean\n value?: string | number\n onChange?: React.ChangeEventHandler<HTMLInputElement>\n}\n\nexport const Input = ({\n ref,\n className,\n size = 'md',\n appearance = 'standard',\n theme,\n state,\n disabled,\n style,\n ...rest\n}: InputProps) => (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n disabled={disabled}\n state={state}\n className={className}\n style={style}\n >\n <InputText size={size} ref={ref} disabled={disabled} {...rest} />\n </InputBackground>\n)\n","import { Eye, EyeCrossed } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useState } from 'react'\n\nimport { cn } from '../../styled'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport type { InputProps } from '../input/Input'\nimport { Input } from '../input/Input'\n\ntype PasswordInputProps = Omit<InputProps, 'type'> & {\n hidePasswordText?: string\n showPasswordText?: string\n}\n\nexport const PasswordInput = ({\n ref,\n className,\n hidePasswordText = 'Hide password',\n showPasswordText = 'Show password',\n size = 'md',\n ...restProps\n}: PasswordInputProps) => {\n const [isPasswordVisible, setIsPasswordVisible] = useState<boolean>(false)\n const togglePasswordVisibility = () =>\n setIsPasswordVisible((currentState) => !currentState)\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n return (\n <div className={cn('relative', className)}>\n <Input\n {...restProps}\n size={size}\n type={isPasswordVisible ? 'text' : 'password'}\n ref={ref}\n className=\"pr-6\"\n />\n <ActionIcon\n appearance=\"simple\"\n theme=\"neutral\"\n label={isPasswordVisible ? hidePasswordText : showPasswordText}\n onClick={togglePasswordVisibility}\n onMouseDown={(e) => e.preventDefault()} // prevent focus being lost from password input\n size={iconSize}\n className={cn(\n size === 'lg' ? 'bottom-1' : 'bottom-0',\n 'absolute',\n 'right-0'\n )}\n >\n <Icon is={isPasswordVisible ? Eye : EyeCrossed} />\n </ActionIcon>\n </div>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { cn } from '../../styled'\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { PasswordInput } from '../password-input/PasswordInput'\n\ntype PasswordFieldProps = React.ComponentProps<typeof PasswordInput> &\n Omit<FieldElementWrapperProps, 'label'> & {\n label?: string\n }\n\nexport const PasswordField = ({\n className,\n hideLabel,\n label = 'Password',\n name,\n prompt = undefined,\n description,\n validation,\n appearance,\n theme,\n ...rest\n}: PasswordFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n className={cn('relative', className)}\n >\n <PasswordInput\n autoComplete=\"current-password\"\n name={name}\n id={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error !== undefined && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nPasswordField.displayName = 'PasswordField'\n","import invariant from 'invariant'\nimport * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { throttle } from 'throttle-debounce'\n\nimport type { Override } from '../../utilities/types'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { PasswordField } from '../password-field/PasswordField'\nimport { PasswordInput } from '../password-input/PasswordInput'\n\ntype ValidationResult = Record<string, boolean>\n\ntype CreatePasswordFieldProps = Override<\n React.ComponentProps<typeof PasswordInput> & FieldElementWrapperProps,\n {\n label?: string\n name?: string\n validate: (\n password: string\n ) => Promise<ValidationResult | undefined> | ValidationResult\n defaultValidation: ValidationResult\n messageDirection?: 'row' | 'column'\n }\n>\n\nexport const CreatePasswordField = ({\n validate,\n defaultValidation,\n messageDirection = 'row',\n label = 'Create a password',\n name = 'password',\n className,\n validation,\n appearance,\n ...rest\n}: CreatePasswordFieldProps) => {\n const { formState, control } = useFormContext()\n const [isFocused, setIsFocused] = React.useState<boolean>(false)\n const [validationResult, setValidationResult] =\n React.useState<ValidationResult>(defaultValidation)\n\n const touched: boolean = formState.touched[name]\n const error =\n formState.errors[name]?.type === 'validate' ||\n Object.values(validationResult).every((isValid) => !isValid)\n\n const validatePassword = React.useCallback(\n async (password: string) => {\n const result = await validate(password)\n\n if (result) {\n invariant(\n typeof result === 'object',\n 'The validate function must return an object'\n )\n\n setValidationResult(result)\n return Object.values(result).every((isValid) => isValid)\n }\n\n return false\n },\n [setValidationResult]\n )\n\n const handleChange = React.useCallback(throttle(500, validatePassword), [\n validatePassword\n ])\n\n const getMessageTheme = (result: boolean, isFocused: boolean) => {\n if (result) return 'success'\n\n return isFocused ? 'neutral' : 'error'\n }\n\n const showValidation: boolean =\n (control.mode.isOnBlur && (isFocused || touched)) ||\n (control.mode.isOnSubmit && (isFocused || (formState.isSubmitted && error)))\n\n return (\n <div className={className}>\n <PasswordField\n label={label}\n name={name}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n handleChange(e.target.value)\n }\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n validation={{ ...validation, validate: validatePassword }}\n appearance={appearance}\n {...rest}\n />\n {showValidation && (\n <div\n style={{ '--direction': messageDirection }}\n className=\"direction-(--direction) mt-2 flex flex-wrap gap-2\"\n >\n {Object.entries(validationResult).map(([message, result]) => (\n <InlineMessage\n key={message}\n theme={getMessageTheme(result, isFocused)}\n >\n {message}\n </InlineMessage>\n ))}\n </div>\n )}\n </div>\n )\n}\n\nCreatePasswordField.displayName = 'CreatePasswordField'\n","import type {\n ColumnOrderTableState,\n ColumnPinningTableState,\n ColumnSizingTableState,\n ExpandedTableState,\n ColumnFiltersTableState,\n GlobalFilterTableState,\n GroupingTableState,\n PaginationTableState,\n Row,\n RowSelectionState,\n RowSelectionTableState,\n SortDirection,\n SortingTableState,\n Table,\n VisibilityTableState\n} from '@tanstack/react-table'\nimport * as React from 'react'\n\nexport enum AsyncDataState {\n NONE = 'none',\n PENDING = 'pending',\n FULFILLED = 'fulfilled',\n REJECTED = 'rejected'\n}\n\nexport type AsyncDataResult = {\n total: number\n results: TableData\n}\n\nexport type AsyncDataOptions = {\n pageIndex: number\n pageSize: number\n sortBy?: string\n sortDirection?: SortDirection\n globalFilter?: string\n}\n\nexport type GetAsyncData = (\n options: AsyncDataOptions\n) => Promise<AsyncDataResult | undefined>\n\nexport type TablePosition = {\n top: number | null\n bottom: number | null\n offsetTop: number\n isVisible: boolean\n}\n\nexport type DataTableContextType<T = unknown> = Table<T> & {\n setIsSortable: React.Dispatch<React.SetStateAction<boolean>>\n applyPagination: () => void\n getTotalRows: () => number\n isSortable: boolean\n asyncDataState?: AsyncDataState\n runAsyncData?: (options: Partial<AsyncDataOptions>) => Promise<void>\n hasAsyncData: boolean\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n rowSelection: RowSelectionState\n tablePosition?: TablePosition\n setTablePosition: React.Dispatch<React.SetStateAction<TablePosition>>\n data: AsyncDataResult\n columns: any\n tableId: string\n /**\n * Directly update the data array that the table rows are built from.\n * This is useful when re-ordering rows, but is high-risk if you're not sure what you're doing!\n *\n * Note in particular that this value is also updated if you update the value of the `DataTable`'s `data` prop\n * — it's probably best to only use one of those two methods for any given table.\n */\n setData: React.Dispatch<React.SetStateAction<AsyncDataResult>>\n}\n\nexport type TableData = Array<Record<string, unknown>>\n\nexport type InitialState = Partial<\n VisibilityTableState &\n ColumnOrderTableState &\n ColumnPinningTableState &\n ColumnFiltersTableState &\n GlobalFilterTableState &\n SortingTableState &\n ExpandedTableState &\n GroupingTableState &\n ColumnSizingTableState &\n PaginationTableState &\n RowSelectionTableState\n>\n\nexport type DefaultSort = { column: string; direction: SortDirection }\n","import type {\n PaginationState,\n SortDirection,\n SortingState\n} from '@tanstack/react-table'\nimport invariant from 'invariant'\n\nimport type {\n AsyncDataOptions,\n AsyncDataResult,\n GetAsyncData\n} from './DataTable.types'\n\nconst getSortDirection = (sorting: SortingState): SortDirection | undefined => {\n if (sorting[0]) {\n return sorting[0].desc ? 'desc' : 'asc'\n }\n return undefined\n}\n\nexport const getNewAsyncData = async (\n getAsyncData: GetAsyncData,\n asyncDataOptions: Partial<AsyncDataOptions>,\n paginationState: PaginationState,\n sorting: SortingState,\n globalFilter: string\n): Promise<AsyncDataResult | undefined> => {\n const { pageIndex, pageSize } = paginationState\n const params = {\n pageIndex: asyncDataOptions?.pageIndex ?? pageIndex,\n pageSize: asyncDataOptions?.pageSize ?? pageSize,\n sortBy: asyncDataOptions?.sortBy ?? sorting[0]?.id,\n sortDirection: asyncDataOptions?.sortDirection ?? getSortDirection(sorting),\n globalFilter: asyncDataOptions.globalFilter ?? globalFilter\n }\n\n const newData = await getAsyncData(params)\n\n invariant(\n Array.isArray(newData?.results),\n 'The getAsyncData function must return an object with a property `result` which must be an array'\n )\n invariant(\n newData && Number.isInteger(newData.total) && newData.total >= 0,\n 'The getAsyncData function must return an object with a property `total` which must be a positive integer or zero'\n )\n\n return newData\n}\n","import type { PaginationState } from '@tanstack/react-table'\nimport * as React from 'react'\n\nconst defaultPaginationState: PaginationState = { pageIndex: 0, pageSize: 10 }\nexport const usePagination = (\n initialPaginationState: PaginationState | undefined\n) => {\n const [isPaginated, setIsPaginated] = React.useState<boolean>(\n !!initialPaginationState\n )\n\n const [paginationState, setPaginationState] = React.useState<\n PaginationState | undefined\n >({\n ...defaultPaginationState,\n ...(initialPaginationState || {})\n })\n\n const applyPagination = React.useCallback(() => {\n setIsPaginated(true)\n }, [])\n\n return {\n isPaginated,\n paginationState,\n setPaginationState,\n applyPagination\n }\n}\n","import type { SortingState } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport type { DefaultSort } from './DataTable.types'\n\nexport const useSortByColumn = (defaultSort: DefaultSort | undefined) => {\n const [isSortable, setIsSortable] = React.useState<boolean>(false)\n\n const [sorting, setSorting] = React.useState<SortingState>(\n defaultSort\n ? [\n {\n id: defaultSort.column,\n desc: defaultSort.direction === 'desc'\n }\n ]\n : []\n )\n\n return { isSortable, setIsSortable, sorting, setSorting }\n}\n","import { v4 as uuid } from '@lukeed/uuid'\nimport type {\n ExpandedState,\n OnChangeFn,\n PaginationState,\n Row,\n RowSelectionState\n} from '@tanstack/react-table'\nimport {\n getCoreRowModel,\n getExpandedRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable\n} from '@tanstack/react-table'\nimport * as React from 'react'\nimport useDeepCompareEffect from 'use-deep-compare-effect'\n\nimport {\n AsyncDataState,\n type DataTableContextType,\n type InitialState,\n type TableData,\n type TablePosition,\n type AsyncDataOptions,\n type AsyncDataResult,\n type DefaultSort,\n type GetAsyncData\n} from './DataTable.types'\nimport { getNewAsyncData } from './getNewAsyncData'\nimport { usePagination } from './usePagination'\nimport { useSortByColumn } from './useSorting'\n\nconst DataTableContext =\n React.createContext<DataTableContextType<unknown> | null>(null)\n\ntype DataTableProviderProps = {\n columns\n defaultSort?: DefaultSort\n children: React.ReactNode\n initialState?: InitialState\n disabledRows?: Record<string, boolean>\n enableRowSelection?: boolean | ((row: Row<unknown>) => boolean)\n onRowSelectionChange?: OnChangeFn<RowSelectionState>\n} & (\n | { data: TableData; getAsyncData?: never }\n | { data?: never; getAsyncData: GetAsyncData }\n)\n\nexport const DataTableProvider = ({\n columns,\n data: dataProp = [],\n getAsyncData,\n defaultSort,\n initialState = undefined,\n disabledRows,\n enableRowSelection,\n onRowSelectionChange,\n children\n}: DataTableProviderProps) => {\n const tableId = React.useRef(uuid())\n\n const [data, setData] = React.useState<AsyncDataResult>({\n results: dataProp ?? [],\n total: dataProp?.length ?? 0\n })\n\n const [rowSelection, setRowSelection] = React.useState<RowSelectionState>({})\n const [expanded, setExpanded] = React.useState<ExpandedState>({})\n\n const [tablePosition, setTablePosition] = React.useState<TablePosition>({\n top: null,\n bottom: null,\n offsetTop: 0,\n isVisible: true\n })\n\n const { isPaginated, applyPagination, paginationState, setPaginationState } =\n usePagination(initialState?.pagination)\n\n const [asyncDataState, setAsyncDataState] = React.useState<AsyncDataState>(\n AsyncDataState.NONE\n )\n\n const [globalFilter, setGlobalFilter] = React.useState<string>('')\n\n const { setIsSortable, isSortable, sorting, setSorting } =\n useSortByColumn(defaultSort)\n\n const runAsyncData = React.useCallback(\n async (overrideAsyncDataOptions: Partial<AsyncDataOptions>) => {\n if (!getAsyncData) return\n\n try {\n setAsyncDataState(AsyncDataState.PENDING)\n\n const newData = await getNewAsyncData(\n getAsyncData,\n overrideAsyncDataOptions,\n paginationState as PaginationState,\n sorting,\n globalFilter\n )\n\n setData(newData as AsyncDataResult)\n setAsyncDataState(AsyncDataState.FULFILLED)\n } catch (_error) {\n setAsyncDataState(AsyncDataState.REJECTED)\n }\n },\n [\n getAsyncData,\n paginationState?.pageIndex,\n paginationState?.pageSize,\n sorting,\n globalFilter\n ]\n )\n\n React.useEffect(() => {\n runAsyncData({})\n }, [runAsyncData])\n\n useDeepCompareEffect(() => {\n if (!dataProp) return\n\n setData({ results: dataProp, total: dataProp.length })\n }, [dataProp])\n\n const getTotalRows = () => data.total\n\n const table = useReactTable<unknown>({\n columns,\n data: data.results,\n pageCount:\n getAsyncData && paginationState\n ? Math.ceil(getTotalRows() / paginationState.pageSize)\n : -1,\n initialState: initialState,\n state: {\n sorting,\n globalFilter,\n pagination: paginationState,\n rowSelection,\n expanded\n },\n manualPagination: getAsyncData && isPaginated,\n manualSorting: getAsyncData && isPaginated,\n enableSorting: asyncDataState !== AsyncDataState.PENDING,\n enableGlobalFilter: !getAsyncData,\n enableRowSelection,\n onExpandedChange: setExpanded,\n getSubRows: (row) => (row as Row<unknown>).subRows,\n onRowSelectionChange: (updaterOrValue) => {\n if (onRowSelectionChange) onRowSelectionChange(updaterOrValue)\n setRowSelection(updaterOrValue)\n },\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: isPaginated ? getPaginationRowModel() : undefined,\n getSortedRowModel:\n isSortable || sorting.length ? getSortedRowModel() : undefined,\n getFilteredRowModel: getFilteredRowModel(),\n getExpandedRowModel: getExpandedRowModel(),\n onPaginationChange: isPaginated\n ? (setPaginationState as OnChangeFn<PaginationState>)\n : undefined,\n onSortingChange: setSorting,\n onGlobalFilterChange: setGlobalFilter,\n globalFilterFn: (row, columnId, filterValue) => {\n const checkFilterMatchesCell = (cellValue: string) =>\n cellValue.toLowerCase().includes(filterValue.toLowerCase())\n\n const isSubRow = row.depth > 0\n\n if (isSubRow) return true\n\n const value = row.getValue(columnId)\n switch (typeof value) {\n case 'string':\n return checkFilterMatchesCell(value)\n case 'boolean':\n case 'number':\n return checkFilterMatchesCell(String(value))\n default:\n return false\n }\n }\n })\n\n const value: DataTableContextType = React.useMemo(() => {\n return {\n ...table,\n columns,\n data,\n setData,\n setIsSortable,\n applyPagination,\n getTotalRows,\n isSortable,\n asyncDataState,\n runAsyncData,\n hasAsyncData: !!getAsyncData,\n disabledRows,\n enableRowSelection,\n rowSelection,\n tablePosition,\n setTablePosition,\n tableId: tableId.current\n }\n }, [\n table,\n applyPagination,\n getTotalRows,\n isSortable,\n enableRowSelection,\n tableId,\n getAsyncData\n ])\n\n return (\n <DataTableContext.Provider value={value}>\n {children}\n </DataTableContext.Provider>\n )\n}\n\nexport const useDataTable = <T extends Record<string, unknown>>() => {\n const context = React.useContext(DataTableContext) as DataTableContextType<T>\n\n if (!context)\n throw new Error(\n 'useDataTable can only be called from inside a DataTableProvider'\n )\n\n return context\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledTableBody = styled('tbody', {\n base: [],\n variants: {\n striped: {\n true: ['[&_tr]:even:bg-grey-100', '[&_tr]:odd:bg-white'],\n false: ['[&_tr]:bg-white']\n }\n }\n})\n\ntype TableBodyProps = React.ComponentProps<typeof StyledTableBody>\n\nexport const TableBody = ({ striped = true, ...rest }: TableBodyProps) => (\n <StyledTableBody striped={striped} {...rest} />\n)\n\nTableBody.displayName = 'TableBody'\n","import { styled } from '../../styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'box-border',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n","import { styled } from '../../styled'\n\nexport const TableFooter = styled('tfoot', {\n base: []\n})\n\nTableFooter.displayName = 'TableFooter'\n","import { styled } from '../../styled'\n\nexport const TableFooterCell = styled('td', {\n base: [\n 'text-grey-800',\n 'font-body',\n 'font-semibold',\n 'text-left',\n 'align-middle'\n ]\n})\n\nTableFooterCell.displayName = 'TableFooterCell'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const TABLE_HEADER_THEMES = {\n PRIMARY: 'primary',\n PRIMARY_DARK: 'primaryDark',\n PRIMARY_LIGHT: 'primaryLight',\n LIGHT: 'light',\n WHITE: 'white'\n} as const\n\nconst StyledTableHeader = /* @__PURE__ */ styled('thead', {\n base: [],\n variants: {\n theme: {\n [TABLE_HEADER_THEMES.PRIMARY]: ['[&_th]:bg-primary-800'],\n [TABLE_HEADER_THEMES.PRIMARY_DARK]: ['[&_th]:bg-primary-1000'],\n [TABLE_HEADER_THEMES.PRIMARY_LIGHT]: [\n '[&_th]:bg-primary-200',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.LIGHT]: [\n '[&_th]:bg-grey-100',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.WHITE]: ['[&_th]:bg-white', '[&_th]:text-grey-1000']\n },\n isSticky: {\n true: ['sticky', 'top-0', 'z-3']\n }\n }\n})\n\ntype TableHeaderProps = React.ComponentProps<typeof StyledTableHeader>\n\nexport const TableHeader = ({\n theme = 'primaryDark',\n isSticky = false,\n ...rest\n}: TableHeaderProps) => {\n return <StyledTableHeader theme={theme} isSticky={isSticky} {...rest} />\n}\n\nTableHeader.displayName = 'TableHeader'\n","import { styled } from '../../styled'\n\nexport const TableHeaderCell = styled('th', {\n base: [\n 'text-white',\n 'font-body',\n 'font-semibold',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n '[[colspan]]:text-center'\n ]\n})\n\nTableHeaderCell.displayName = 'TableHeaderCell'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledRow = styled('tr', {\n base: ['bg-[unset]']\n})\n\nexport const TableRow = (props: React.ComponentProps<typeof StyledRow>) => (\n <StyledRow {...props} />\n)\n","import * as React from 'react'\n\ntype ColumnStyle = Record<\n `--sticky-column-width-${number}` | `--sticky-offset-left-${number}`,\n string\n>\n\ninterface UseStickyColumnsCss {\n columnsStyle?: ColumnStyle\n}\n\nexport const useStickyColumnsStyle = ({\n numberOfStickyColumns,\n wrapperRef\n}: {\n numberOfStickyColumns: number\n wrapperRef: React.RefObject<HTMLDivElement | null>\n}): UseStickyColumnsCss => {\n const [columnsStyle, setColumnsStyle] = React.useState<ColumnStyle>({})\n\n const generateColumnsStyle = React.useCallback(() => {\n let accWidth = 0\n\n // Getting the table header cells elements to use their width to set the left position in the sticky columns.\n const tableHeaderCells = wrapperRef.current?.querySelectorAll('th')\n const tableHeaderElements = Array.from(tableHeaderCells || [])\n\n // Getting only the number of sticky columns from the elements array that is what we are interested in.\n const stickyColumns = tableHeaderElements.slice(0, numberOfStickyColumns)\n\n const newColumnsStyle = stickyColumns.reduce((acc, column, index) => {\n const elementNumber = index + 1\n const styleObject = {\n ...acc,\n [`--sticky-column-width-${elementNumber}`]: `${column.offsetWidth}px`,\n [`--sticky-offset-left-${elementNumber}`]: `${accWidth}px`\n }\n\n accWidth += tableHeaderCells?.item(index).clientWidth || 0\n\n return styleObject\n }, {})\n\n return newColumnsStyle\n }, [numberOfStickyColumns, wrapperRef])\n\n React.useLayoutEffect(() => {\n if (!numberOfStickyColumns) return\n const newColumnsStyle = generateColumnsStyle()\n\n setColumnsStyle(newColumnsStyle)\n }, [numberOfStickyColumns, wrapperRef, generateColumnsStyle])\n\n return {\n columnsStyle\n }\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { useStickyColumnsStyle } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n className,\n ...restProps\n}: React.PropsWithChildren<{\n numberOfStickyColumns?: number\n className?: string\n}>) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const wrapperRef = React.useRef<HTMLDivElement | null>(null)\n const { columnsStyle } = useStickyColumnsStyle({\n numberOfStickyColumns,\n wrapperRef\n })\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll = event.currentTarget.scrollLeft > 0\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <div\n onScroll={handleScroll}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"scrollbar\"\n ref={wrapperRef}\n style={columnsStyle}\n className={cn(\n 'overflow-auto',\n 'max-w-full',\n 'relative',\n 'overscroll-x-contain',\n '[&_td,&_th]:bg-inherit',\n className,\n numberOfStickyColumns >= 1 && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:sticky',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:left-(--sticky-offset-left-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:min-w-(--sticky-column-width-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:z-2'\n ],\n numberOfStickyColumns >= 2 && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:sticky',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:left-(--sticky-offset-left-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:min-w-(--sticky-column-width-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:z-2'\n ],\n numberOfStickyColumns >= 3 && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:sticky',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:left-(--sticky-offset-left-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:min-w-(--sticky-column-width-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:z-2'\n ],\n numberOfStickyColumns >= 4 && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:sticky',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:left-(--sticky-offset-left-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:min-w-(--sticky-column-width-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:z-2'\n ],\n numberOfStickyColumns === 1 &&\n hasScroll && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 2 &&\n hasScroll && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 3 &&\n hasScroll && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 4 &&\n hasScroll && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ]\n )}\n {...restProps}\n >\n {children}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n base: [\n 'border-separate',\n 'border-spacing-0',\n 'font-sans',\n 'text-sm',\n 'w-full',\n 'relative',\n 'z-0'\n ],\n variants: {\n size: {\n md: ['[&_td,&_th]:h-10', '[&_td,&_th]:px-3', '[&_td,&_th]:py-1'],\n lg: [\n '[&_td,&_th]:h-12',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ],\n xl: [\n '[&_th]:h-12',\n '[&_td]:h-16',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ]\n },\n corners: {\n round: ['rounded-md'],\n square: []\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n scrollContainerkey?: string\n maxRowDepth?: number\n}\n\nconst TableComponent = ({\n ref,\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCls,\n scrollContainerkey,\n ...rest\n}: TableProps) => {\n const tableComponent = (\n <StyledTable ref={ref} size={size} corners={corners} {...rest} />\n )\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n key={scrollContainerkey}\n className={cn(scrollContainerCls)}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n}\n\nexport const Table = /* @__PURE__ */ Object.assign(TableComponent, {\n Body: TableBody,\n Cell: TableCell,\n Footer: TableFooter,\n FooterCell: TableFooterCell,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Row: TableRow,\n StickyColumnsContainer: TableStickyColumnsContainer\n})\n","import type { Cell } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Table } from '../table/Table'\n\ntype DataTableDataCellProps = {\n cell: Cell<Record<string, unknown>, unknown>\n}\n\nexport const DataTableDataCell = ({ cell }: DataTableDataCellProps) => (\n <Table.Cell key={cell.id}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n)\n","import type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTable.context'\n\nexport const DataTableRowSelectionCheckbox = ({\n row,\n checked,\n onCheckedChange,\n label = `Row ${row.id} selection`\n}: {\n row: Row<Record<string, unknown>>\n checked: boolean | 'indeterminate'\n onCheckedChange: (value: boolean) => void\n label?: string\n}): React.ReactElement<unknown> => {\n const { tableId } = useDataTable()\n\n return (\n <>\n <label htmlFor={`${tableId}_row_${row.id}_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n style={{ '--depth': row.depth }}\n checked={checked}\n onCheckedChange={onCheckedChange}\n name={`${tableId}_row_${row.id}_selection`}\n disabled={!row.getCanSelect()}\n className=\"mr-3 ml-[calc((var(--depth,0)*2)*4px)]\"\n />\n </>\n )\n}\n","import { ChevronDown, ChevronRight } from '@atom-learning/icons'\nimport type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\n\nexport type DataTableRowProps = React.ComponentProps<typeof Table.Row> & {\n row: Row<Record<string, unknown>>\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nconst StyledRow = styled(Table.Row, {\n base: ['bg-[initial]', 'relative'],\n variants: {\n isSelected: {\n true: ['bg-primary-100!']\n },\n isDisabled: {\n true: ['opacity-30']\n },\n isFocusable: {\n true: [\n 'translate-y-0',\n 'duration-200',\n 'ease-out',\n 'transition-shadow',\n 'transition-transform',\n 'hover:shadow-[0px_4px_11px_0px_hsla(0,0%,12%,0.12)]',\n 'hover:-translate-y-px',\n 'hover:z-3',\n 'focus:outline-2',\n 'focus:outline-primary-500',\n 'focus:outline-solid',\n 'focus:-outline-offset-4',\n 'focus:[&_td]:bg-transparent'\n ]\n }\n }\n})\n\nconst isElementInteractive = (element: Element | null): boolean => {\n if (!element) return false\n if (element.closest('button, a, input, select, textarea')) return true\n if (element.getAttribute('role') === 'button') return true\n return false\n}\n\nexport const DataTableRow = ({ row, rowAction }: DataTableRowProps) => {\n const { enableRowSelection, disabledRows, getCanSomeRowsExpand } =\n useDataTable()\n\n const isDisabled = !!disabledRows?.[row.id]\n\n const toggleExpandHandler = row.getToggleExpandedHandler()\n const toggleSelectHandler = row.getToggleSelectedHandler()\n\n const getCheckedState = (): boolean | 'indeterminate' => {\n if (row.getIsSomeSelected()) return 'indeterminate'\n return row.getIsSelected()\n }\n\n const handleRowClick = (\n rowData: Row<Record<string, unknown>>,\n event: React.MouseEvent<HTMLTableRowElement>\n ) => {\n if (!rowAction) return\n\n // Skip if clicking on an interactive element\n const rowElement = (event.target as Element).closest('tr')\n if (!rowElement || isElementInteractive(event.target as Element)) {\n return\n }\n\n rowAction(rowData.original, event)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n if (isElementInteractive(event.target as Element)) {\n return\n }\n event.preventDefault()\n handleRowClick(\n row,\n event as unknown as React.MouseEvent<HTMLTableRowElement>\n )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const nextRow = currentRow?.nextElementSibling as HTMLElement\n if (nextRow && nextRow.tagName === 'TR') {\n nextRow.focus()\n }\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n const currentRow = (event.target as HTMLElement).closest('tr')\n const previousRow = currentRow?.previousElementSibling as HTMLElement\n if (previousRow && previousRow.tagName === 'TR') {\n previousRow.focus()\n }\n }\n }\n\n return (\n <StyledRow\n isSelected={row.getIsSelected()}\n isDisabled={isDisabled}\n isFocusable={!!rowAction && !isDisabled}\n {...(rowAction && {\n onClick: (event) => handleRowClick(row, event),\n tabIndex: 0,\n className: 'cursor-pointer',\n onKeyDown: handleKeyDown\n })}\n >\n {getCanSomeRowsExpand() && (\n <Table.Cell\n data-testid={`expand-icon-${row.id}`}\n onClick={toggleExpandHandler}\n className={cn(\n 'w-10',\n row.getCanExpand() ? 'cursor-pointer' : 'cursor-auto'\n )}\n >\n {row.getCanExpand() && (\n <Icon is={row.getIsExpanded() ? ChevronDown : ChevronRight} />\n )}\n </Table.Cell>\n )}\n\n {enableRowSelection && (\n <Table.Cell className=\"w-10\">\n <DataTableRowSelectionCheckbox\n row={row}\n checked={getCheckedState()}\n onCheckedChange={toggleSelectHandler}\n />\n </Table.Cell>\n )}\n {row.getVisibleCells().map((cell) => {\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </StyledRow>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableRow } from './DataTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nexport const DataTableBody = ({\n striped = false,\n rowAction,\n ...rest\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n\n return (\n <Table.Body {...rest} striped={striped}>\n {getRowModel().rows.map((row) => {\n return <DataTableRow row={row} key={row.id} rowAction={rowAction} />\n })}\n </Table.Body>\n )\n}\n","import { styled } from '../../styled'\n\nexport const Divider = styled(\n 'hr',\n {\n base: ['border-none', 'bg-grey-200'],\n variants: {\n orientation: {\n horizontal: ['h-px', 'w-full'],\n vertical: ['h-full', 'min-h-8', 'w-px']\n }\n },\n defaultVariants: {\n orientation: 'horizontal'\n }\n },\n { enableResponsiveVariants: true }\n)\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\n\nconst defaultCopy = {\n sorted_by: 'Sorted by',\n ascending: 'ascending',\n descending: 'descending',\n separator: '-'\n}\n\nexport const DataTableMetaData = ({\n copy,\n ...rest\n}: React.ComponentProps<typeof Text> & {\n copy?: {\n sorted_by?: string\n ascending?: string\n descending?: string\n separator?: string\n }\n sortLabel?: string\n}) => {\n const { getState, columns, getRowModel, rowSelection } = useDataTable()\n const { sorting } = getState()\n const isSorted = sorting.length > 0\n\n const totalRows = getRowModel()?.rows?.length\n\n const selectedRows = Object.keys(rowSelection || {}).length\n\n const copyMerged = { ...defaultCopy, ...copy }\n\n const getColumnDisplayName = (id: string) => {\n const sortedColumn = columns.find((col) => col.id === id)\n return sortedColumn?.header || id\n }\n\n const getSortingString = (sorting) => {\n return `${copyMerged.separator} ${\n copyMerged.sorted_by\n } ${getColumnDisplayName(sorting[0].id)} ${\n sorting[0].desc ? copyMerged.descending : copyMerged.ascending\n }`\n }\n\n return (\n <Text weight=\"bold\" {...rest}>{`${selectedRows || totalRows} ${\n (selectedRows || totalRows) === 1 ? 'item' : 'items'\n } ${selectedRows ? 'selected' : ''} ${\n isSorted ? getSortingString(sorting) : ''\n }`}</Text>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Button } from '../button/Button'\nimport { Divider } from '../divider/Divider'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableMetaData } from './DataTableMetaData'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement<unknown>\n}): React.ReactElement<unknown> | null => {\n const { rowSelection } = useDataTable()\n\n if (Object.keys(rowSelection || {}).length > 0) return null\n\n return children\n}\n\nconst BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n children\n}: {\n cancelLabel?: string\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n\nexport const DataTableBulkActions = /* @__PURE__ */ Object.assign(\n ({\n children,\n ...rest\n }: {\n children:\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n | [\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >,\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n ]\n }) => {\n const { rowSelection } = useDataTable()\n\n const isRowSelected = Object.keys(rowSelection || {}).length > 0\n\n return (\n <StyledContainer isRowSelected={isRowSelected} {...rest}>\n <DataTableMetaData />\n <div className=\"flex items-center justify-end\">{children}</div>\n </StyledContainer>\n )\n },\n {\n DefaultActions: BulkActionsDefaultActions,\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { Divider } from '../divider/Divider'\nimport { useDataTable } from './DataTable.context'\n\nexport const BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n showDividers = true,\n children\n}: {\n cancelLabel?: string\n showDividers?: boolean\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {showDividers && React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\nimport { BulkActionsSelectedRowActions } from './DataTableBulkActionsSelectedRowActions'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'pl-3',\n 'pr-1',\n 'py-2',\n 'mb-4',\n 'mt-2',\n 'justify-between',\n 'items-center',\n 'rounded-lg',\n 'bg-primary-800',\n 'pointer-events-auto',\n 'z-2',\n 'w-full',\n 'mx-4',\n 'shadow-lg',\n 'sm:max-w-200',\n 'lg:max-w-250',\n 'lg:mb-8',\n 'lg:pl-4',\n 'lg:pr-1',\n 'lg:py-3',\n 'xl:max-w-350',\n 'xl:mb-8',\n 'xl:pl-6',\n 'xl:pr-2',\n 'xl:py-4'\n ]\n})\n\nexport const DataTableBulkActionsFloating = /* @__PURE__ */ Object.assign(\n ({\n children,\n ...rest\n }: React.PropsWithChildren<React.ComponentProps<typeof StyledContainer>>) => {\n const { rowSelection, toggleAllPageRowsSelected } = useDataTable()\n\n const actionBarRef = React.useRef<HTMLDivElement>(null)\n\n const numberOfSelectedRows = React.useMemo(() => {\n return Object.keys(rowSelection || {}).length\n }, [rowSelection])\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (numberOfSelectedRows === 0) return null\n\n return (\n <section\n ref={actionBarRef}\n className=\"pointer-events-none sticky bottom-0 left-0 flex justify-center\"\n >\n <StyledContainer {...rest}>\n <div className=\"flex flex-auto items-center justify-start gap-2\">\n <Badge\n theme=\"success\"\n size=\"xs\"\n emphasis=\"subtle\"\n className=\"h-6 min-w-6\"\n >\n {numberOfSelectedRows}\n </Badge>\n <Text size=\"sm\" weight=\"bold\" className=\"text-white\">\n selected\n </Text>\n </div>\n <div className=\"flex flex-auto items-center justify-end gap-3\">\n {children}\n <ActionIcon\n appearance=\"simple\"\n theme=\"white\"\n size=\"md\"\n onClick={handleDeselectAllPageRows}\n label=\"close\"\n >\n <Icon is={Close} />\n </ActionIcon>\n </div>\n </StyledContainer>\n </section>\n )\n },\n {\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n","import * as React from 'react'\n\nimport type { EmptyStateProps } from './EmptyState'\n\ntype EmptyStateProviderProps = {\n size?: EmptyStateProps['size']\n}\n\ntype EmptyStateContextValue = EmptyStateProviderProps\n\nexport const EmptyStateContext = React.createContext<EmptyStateContextValue>({})\n\nexport const EmptyStateProvider = ({\n size,\n children\n}: React.PropsWithChildren<EmptyStateProviderProps>) => {\n const value = React.useMemo<EmptyStateContextValue>(() => ({ size }), [size])\n return (\n <EmptyStateContext.Provider value={value}>\n {children}\n </EmptyStateContext.Provider>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateBody = styled(\n Text,\n {\n base: ['text-grey-800', 'font-normal'],\n variants: {\n size: {\n xs: ['mb-4', 'text-sm'],\n sm: ['mb-4', 'text-sm'],\n md: ['mb-4', 'text-sm'],\n lg: ['mb-6', 'text-md'],\n xl: ['mb-6', 'text-md']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype EmptyStateBodyProps = React.ComponentProps<typeof StyledEmptyStateBody>\n\nexport const EmptyStateBody = (props: EmptyStateBodyProps) => {\n const { size } = React.useContext(EmptyStateContext)\n return <StyledEmptyStateBody {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Image } from '../image/Image'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateImage = styled(\n Image,\n {\n base: [],\n variants: {\n size: {\n xs: ['max-h-8', 'max-w-14', 'mb-4'],\n sm: ['max-h-12', 'max-w-21', 'mb-4'],\n md: ['max-h-18', 'max-w-[126px]', 'mb-4'],\n lg: ['max-h-[142px]', 'max-w-[190px]', 'mb-6'],\n xl: ['max-h-[213px]', 'max-w-[285px]', 'mb-6']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype EmptyStateImageProps = React.ComponentProps<typeof StyledEmptyStateImage>\n\nexport const EmptyStateImage = (props: EmptyStateImageProps) => {\n const { size } = React.useContext(EmptyStateContext)\n return <StyledEmptyStateImage size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { EmptyStateContext } from './EmptyState.context'\n\nconst StyledEmptyStateTitle = styled(\n 'h2',\n {\n base: ['text-grey-800', 'font-body', 'font-semibold', 'm-0'],\n variants: {\n size: {\n xs: ['mb-3', 'text-md'],\n sm: ['mb-3', 'text-md'],\n md: ['mb-3', 'text-md'],\n lg: ['mb-4', 'text-lg'],\n xl: ['mb-4', 'text-lg']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\n// Override, not intersection: ComponentProps yields `as?: never`, and\n// intersecting that with ElementType silently collapses `as` to undefined\ntype EmptyStateTitleProps = Override<\n React.ComponentProps<typeof StyledEmptyStateTitle>,\n {\n as?: React.ComponentType | React.ElementType\n }\n>\n\nexport const EmptyStateTitle = (props: EmptyStateTitleProps) => {\n const { size } = React.useContext(EmptyStateContext)\n return <StyledEmptyStateTitle size={size} {...props} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { EmptyStateProvider } from './EmptyState.context'\nimport { EmptyStateBody } from './EmptyStateBody'\nimport { EmptyStateImage } from './EmptyStateImage'\nimport { EmptyStateTitle } from './EmptyStateTitle'\n\nconst EmptyStateContainer = styled(\n 'div',\n {\n base: ['flex', 'flex-col', 'items-center', 'text-center', '*:last:mb-0'],\n variants: {\n size: {\n xs: ['p-2'],\n sm: ['p-3'],\n md: ['p-4'],\n lg: ['p-8'],\n xl: ['p-10']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport type EmptyStateProps = React.ComponentProps<typeof EmptyStateContainer>\n\nconst EmptyStateComponent = ({ size = 'sm', ...rest }: EmptyStateProps) => (\n <EmptyStateProvider size={size}>\n <EmptyStateContainer size={size} {...rest} />\n </EmptyStateProvider>\n)\n\nexport const EmptyState = /* @__PURE__ */ Object.assign(EmptyStateComponent, {\n Image: EmptyStateImage,\n Title: EmptyStateTitle,\n Body: EmptyStateBody\n})\n\nEmptyStateComponent.displayName = 'EmptyState'\n","import * as React from 'react'\n\nimport { EmptyState } from '../empty-state/EmptyState'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\ntype DataTableEmptyStateProps = React.ComponentProps<typeof EmptyState>\n\nexport const DataTableEmptyState = ({\n children,\n ...rest\n}: DataTableEmptyStateProps) => {\n const { asyncDataState, getTotalRows } = useDataTable()\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (!isEmpty) return null\n\n return <EmptyState {...rest}>{children}</EmptyState>\n}\n","import * as React from 'react'\n\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState, type DataTableContextType } from './DataTable.types'\n\nexport const DataTableError = ({\n children\n}: {\n children: (\n retry?: DataTableContextType['runAsyncData']\n ) => React.ReactElement<unknown>\n}) => {\n const { asyncDataState, runAsyncData } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.REJECTED) return null\n\n return children(runAsyncData)\n}\n","import { Close, Search } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Input, InputBackground, InputText } from '../input/Input'\n\nexport type SearchInputProps = React.ComponentProps<typeof Input> & {\n size?: 'sm' | 'md' | 'lg'\n className?: string\n value?: string\n defaultValue?: string\n onValueChange?: (newValue: string) => void\n clearText?: string\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n}\n\nenum INPUT_ICON {\n SEARCH = 'SEARCH',\n CLEAR = 'CLEAR'\n}\n\nconst StyledIcon = styled(Icon, {\n base: ['text-grey-700', 'absolute', 'pointer-events-none'],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-2.5', 'size-5'],\n lg: ['right-2.5', 'size-5']\n }\n }\n})\n\nexport const SearchInput = ({\n ref,\n size = 'md',\n appearance = 'standard',\n theme,\n className,\n value,\n defaultValue = '',\n onValueChange,\n clearText = 'Clear',\n onChange,\n ...rest\n}: SearchInputProps) => {\n const [inputElRef, setInputElRef] = useCallbackRef()\n const [innerValue, setInnerValue] = React.useState(defaultValue)\n const [activeIcon, setActiveIcon] = React.useState<INPUT_ICON>(\n defaultValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH\n )\n React.useEffect(() => {\n if (typeof value === 'undefined') return\n setInnerValue(value)\n setActiveIcon(value ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH)\n }, [value])\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n React.useImperativeHandle(ref, () => inputElRef.current as HTMLInputElement)\n\n const handleClear = () => {\n const inputEl = inputElRef.current\n if (!inputEl) return\n\n // https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call?.(inputEl, '')\n const ev2 = new Event('input', {\n bubbles: true\n })\n inputEl.dispatchEvent(ev2)\n inputEl.focus()\n onValueChange?.('')\n }\n\n const handleOnChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event)\n\n const newValue = event.target.value\n setInnerValue(newValue)\n onValueChange?.(newValue)\n setActiveIcon(newValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH)\n }\n\n const getIcon = () => {\n if (activeIcon === INPUT_ICON.SEARCH)\n return (\n <StyledIcon\n is={Search}\n size={size}\n className={cn(\n size == 'sm' ? 'size-4' : 'size-5',\n 'top-1/2',\n '-translate-y-1/2'\n )}\n />\n )\n\n return (\n <ActionIcon\n label={clearText}\n theme=\"neutral\"\n size={iconSize}\n onClick={handleClear}\n className=\"absolute top-1/2 right-1 -translate-y-1/2\"\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n }\n\n return (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n className={cn('relative', 'w-auto', className)}\n >\n <InputText\n ref={setInputElRef}\n size={size}\n type=\"search\"\n {...rest}\n value={innerValue}\n onChange={handleOnChange}\n className={cn(\n size === 'sm' ? 'pr-8' : 'pr-10',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none'\n )}\n />\n {getIcon()}\n </InputBackground>\n )\n}\n","import * as React from 'react'\nimport { debounce } from 'throttle-debounce'\n\nimport { cn } from '../../styled'\nimport { Label } from '../label/Label'\nimport { SearchInput } from '../search-input/SearchInput'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\ntype DataTableSearchProps = React.ComponentProps<typeof SearchInput> & {\n label: string\n hideLabel?: boolean\n}\nexport const DataTableGlobalFilter = ({\n onChange,\n label,\n hideLabel = false,\n ...rest\n}: DataTableSearchProps) => {\n const {\n setGlobalFilter,\n getState,\n resetPagination,\n getTotalRows,\n asyncDataState\n } = useDataTable()\n const { globalFilter } = getState()\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (isEmpty) return null\n\n const handleChange = debounce(250, (event) => {\n const {\n target: { value }\n } = event\n\n onChange?.(event)\n resetPagination()\n setGlobalFilter(value)\n })\n\n return (\n <>\n <Label htmlFor={label} className={cn('mb-3', hideLabel && 'sr-only')}>\n {label}\n </Label>\n <SearchInput\n {...rest}\n defaultValue={globalFilter}\n onChange={handleChange}\n name={label}\n />\n </>\n )\n}\n","import { ArrowDown, ArrowUp } from '@atom-learning/icons'\nimport type { Header } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\nimport { useHover } from 'react-aria'\n\nimport { styled, cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { Table } from '../table/Table'\nimport { Text } from '../text/Text'\nimport { useDataTable } from './DataTable.context'\n\ntype DataTableHeaderProps = React.ComponentProps<typeof Table.HeaderCell> & {\n header: Header<Record<string, unknown>, unknown>\n includeTotal?: boolean\n totalSuffix?: string\n}\n\nconst StyledCount = styled(Text, {\n base: ['text-grey-600', 'whitespace-nowrap', 'hidden', 'min-[800px]:block']\n})\n\nconst StyledTableHeaderCell = styled(Table.HeaderCell, {\n base: [],\n variants: {\n isSortable: {\n true: [\n '*:relative',\n 'before:absolute',\n 'before:bg-primary-100',\n 'before:duration-200',\n 'before:ease-in',\n 'before:inset-0',\n 'before:opacity-0',\n 'before:transition-opacity',\n 'cursor-pointer',\n 'hover:before:opacity-50',\n 'relative'\n ]\n }\n }\n})\n\nconst sortIcons = {\n asc: ArrowUp,\n desc: ArrowDown\n}\n\nconst SortIcon = ({ direction }: { direction: 'asc' | 'desc' }) => (\n <Icon\n is={sortIcons[direction]}\n size=\"sm\"\n className=\"stroke-primary-900 absolute left-1\"\n />\n)\n\nexport const DataTableHeaderCell = ({\n header,\n includeTotal = false,\n totalSuffix = 'items',\n children,\n className,\n ...rest\n}: DataTableHeaderProps) => {\n const sortDirection = header.column.getIsSorted()\n const { isSortable: isSortableTable, getRowModel } = useDataTable()\n // false for display columns, e.g. \"Actions\"\n const isDataColumn = header.column.getCanSort()\n\n const totalRows = getRowModel()?.rows?.length\n\n const { hoverProps, isHovered } = useHover({})\n\n const handleKeyDown = (\n event: React.KeyboardEvent<HTMLTableCellElement>,\n callback: (event: unknown) => void | undefined\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n callback(event as unknown)\n }\n }\n\n const headerSortingHandler = header.column.getToggleSortingHandler()\n\n return (\n <StyledTableHeaderCell\n isSortable={isSortableTable && isDataColumn}\n colSpan={header.colSpan}\n onClick={\n isSortableTable && isDataColumn && headerSortingHandler\n ? headerSortingHandler\n : undefined\n }\n onKeyDown={(event) =>\n isSortableTable &&\n isDataColumn &&\n headerSortingHandler &&\n handleKeyDown(event, headerSortingHandler)\n }\n tabIndex={isSortableTable && isDataColumn ? 0 : -1}\n {...hoverProps}\n className={className}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n 'gap-1',\n 'items-center',\n header.colSpan > 1 ? 'justify-center' : 'justify-start'\n )}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n {sortDirection && isSortableTable && (\n <div\n className={cn(\n 'flex',\n 'items-center',\n 'relative',\n 'size-6',\n 'ml-2',\n isHovered ? 'bg-primary-200' : 'bg-primary-100',\n 'rounded-sm'\n )}\n >\n <SortIcon direction={sortDirection} />\n </div>\n )}\n {includeTotal && (\n <StyledCount size=\"sm\" weight=\"normal\">\n ({totalRows} {totalSuffix})\n </StyledCount>\n )}\n </div>\n </StyledTableHeaderCell>\n )\n}\n","import * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { Label } from '../label/Label'\nimport { useDataTable } from './DataTable.context'\n\nexport const DataTableSelectAllRowsCheckbox = ({\n label = 'All rows selection'\n}: {\n label?: string\n}) => {\n const {\n getIsAllPageRowsSelected,\n getIsSomePageRowsSelected,\n toggleAllPageRowsSelected,\n tableId\n } = useDataTable()\n\n const getCheckedState = () => {\n if (getIsSomePageRowsSelected()) return 'indeterminate'\n if (getIsAllPageRowsSelected()) return true\n return false\n }\n\n const updateCheckedState = () => {\n if (getIsSomePageRowsSelected()) {\n return toggleAllPageRowsSelected(false)\n }\n return toggleAllPageRowsSelected(!getIsAllPageRowsSelected())\n }\n\n return (\n <>\n <label htmlFor={`${tableId}_all_rows_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n checked={getCheckedState()}\n onCheckedChange={updateCheckedState}\n name={`${tableId}_allRowsSelection`}\n />\n </>\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTable.context'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...rest\n}: DataTableHeadProps): React.ReactElement<unknown> => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition,\n setTablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const headerOffsetRef = React.useRef(0)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n const tableHeadElement = tableHeaderRowRef?.current?.closest('thead')\n\n if (tableHeadElement && tablePosition?.offsetTop === null) {\n const tableHeadHeight = tableHeadElement.getBoundingClientRect().height\n const intersectionOffset = stickyOffset + tableHeadHeight\n if (tablePosition) {\n setTablePosition({ ...tablePosition, offsetTop: intersectionOffset || 0 })\n }\n }\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n headerOffsetRef.current = newOffset\n setHeaderOffset(newOffset)\n\n requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...rest}\n className={cn(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup) => {\n return (\n <Table.Row\n key={headerGroup.id}\n ref={tableHeaderRowRef}\n className={\n isSticky && headerOffset !== 0\n ? cn(\n 'translate-y-(--header-offset)',\n headerHide\n ? 'delay-0ms opacity-0 transition-none'\n : 'delay-150ms opacity-100 transition-opacity duration-100',\n '[&_th]:last:before:absolute',\n '[&_th]:last:before:bottom-0',\n '[&_th]:last:before:pointer-events-none',\n '[&_th]:last:before:right-0',\n '[&_th]:last:before:shadow-sm',\n '[&_th]:last:before:top-0',\n '[&_th]:last:before:w-full'\n )\n : undefined\n }\n >\n {getCanSomeRowsExpand() && <Table.HeaderCell className=\"w-10\" />}\n {enableRowSelection && (\n <Table.HeaderCell className=\"w-10\">\n <DataTableSelectAllRowsCheckbox />\n </Table.HeaderCell>\n )}\n {headerGroup.headers.map((header, index) => (\n <DataTableHeaderCell\n header={header}\n key={header.id}\n includeTotal={index === 0 && showTotalInFirstColumn}\n totalSuffix={totalSuffix}\n />\n ))}\n </Table.Row>\n )\n })}\n </Table.Header>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Loader } from '../loader/Loader'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\n\nconst PendingState = styled(Loader, {\n base: [\n 'absolute',\n 'left-1/2',\n 'top-1/2',\n '-translate-x-1/2',\n '-translate-y-1/2',\n 'z-1'\n ]\n})\n\nexport const DataTableLoading = (\n props: React.ComponentProps<typeof PendingState>\n) => {\n const { asyncDataState } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.PENDING) return null\n\n return <PendingState {...props} />\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { TableBody } from '../table/TableBody'\nimport { useDataTable } from './DataTable.context'\nimport { AsyncDataState } from './DataTable.types'\nimport { DataTableBody } from './DataTableBody'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableLoading } from './DataTableLoading'\n\nconst TableContainer = styled('div', {\n base: ['p-2', 'bg-white', 'rounded-lg']\n})\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children' | 'numberOfStickyColumns'\n> &\n Partial<\n Pick<React.ComponentProps<typeof DataTableHead>, 'theme' | 'sortable'>\n > &\n Partial<Pick<React.ComponentProps<typeof TableBody>, 'striped'>> & {\n scrollOptions?: {\n hasStickyHeader?: boolean\n stickyHeaderOffset?: number\n headerCss?: string\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n }\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n withContainer?: boolean\n }\n\nexport const DataTableTable = ({\n sortable,\n striped,\n theme = 'white',\n className,\n scrollOptions = {\n numberOfStickyColumns: 0,\n stickyHeaderOffset: 0,\n hasStickyHeader: false,\n showTotalInFirstColumn: true,\n totalSuffix: 'items'\n },\n rowAction,\n withContainer = false,\n ...rest\n}: DataTableTableProps): React.JSX.Element | null => {\n const {\n asyncDataState,\n getTotalRows,\n getCanSomeRowsExpand,\n rowSelection,\n enableRowSelection,\n tableId,\n setTablePosition\n } = useDataTable()\n\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const isTableVisible = React.useRef(false)\n const isScrolling = React.useRef<boolean>(false)\n\n const scrollTarget = React.useMemo(() => {\n if (typeof window === 'undefined') return null\n return window\n }, [])\n\n React.useEffect(() => {\n if (!scrollTarget || typeof IntersectionObserver === 'undefined') {\n return\n }\n\n const updatePosition = () => {\n if (tableRef.current) {\n const tableTop = tableRef.current.getBoundingClientRect().top\n const tableBottom = tableRef.current.getBoundingClientRect().bottom\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n top: tableTop,\n bottom: tableBottom\n }))\n }\n isScrolling.current = false\n }\n\n const handleScroll = () => {\n if (!isScrolling.current) {\n requestAnimationFrame(updatePosition)\n isScrolling.current = true\n }\n }\n\n if (!tableRef.current) return\n\n const observerOffset = scrollOptions?.stickyHeaderOffset || 0\n\n const observerOptions = {\n rootMargin: `-${observerOffset}px 0px -${observerOffset}px 0px`,\n threshold: 0\n }\n\n const handleTableIntersection = (entries: IntersectionObserverEntry[]) => {\n if (!entries || entries.length === 0) return\n const entry = entries[0]\n\n isTableVisible.current = entry.isIntersecting\n\n if (scrollTarget) {\n if (entry.isIntersecting) {\n // add scroll listener\n scrollTarget?.addEventListener('scroll', handleScroll)\n } else {\n // remove scroll listener\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n\n setTablePosition((prevPosition) => ({\n ...prevPosition,\n isVisible: entry.isIntersecting\n }))\n }\n\n const tableObserver = new IntersectionObserver(\n handleTableIntersection,\n observerOptions\n )\n\n //only track table position if we have a sticky header or bulk actions active\n if (\n tableRef.current &&\n (scrollOptions.hasStickyHeader ||\n Object.keys(rowSelection || {}).length > 0)\n ) {\n tableObserver.observe(tableRef.current)\n }\n\n return () => {\n tableObserver.disconnect()\n if (scrollTarget) {\n scrollTarget?.removeEventListener('scroll', handleScroll)\n }\n }\n }, [\n rowSelection,\n scrollOptions.hasStickyHeader,\n scrollOptions?.stickyHeaderOffset,\n scrollTarget,\n setTablePosition\n ])\n\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n const buildScrollContainerKey = (): string => {\n let controlColumnCount = 0\n\n if (getCanSomeRowsExpand() && !!enableRowSelection) {\n controlColumnCount = 2\n } else if (getCanSomeRowsExpand() || !!enableRowSelection) {\n controlColumnCount = 1\n }\n\n return `${tableId}_${controlColumnCount}_control_columns`\n }\n\n if (isEmpty) return null\n\n const tableComponent = (\n <Table\n corners=\"round\"\n size=\"lg\"\n {...rest}\n ref={tableRef}\n numberOfStickyColumns={scrollOptions.numberOfStickyColumns}\n scrollContainerCls={scrollOptions.scrollContainerCls}\n scrollContainerkey={buildScrollContainerKey()}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead\n theme={theme}\n sortable={sortable}\n isSticky={scrollOptions.hasStickyHeader}\n stickyOffset={scrollOptions.stickyHeaderOffset}\n className={scrollOptions.headerCss}\n showTotalInFirstColumn={scrollOptions.showTotalInFirstColumn}\n totalSuffix={scrollOptions.totalSuffix}\n />\n <DataTableBody striped={striped} rowAction={rowAction} />\n </Table>\n )\n\n return (\n <>\n <DataTableLoading />\n {withContainer ? (\n <TableContainer\n className={cn(\n scrollOptions.numberOfStickyColumns === 0 && 'overflow-x-auto'\n )}\n >\n {tableComponent}\n </TableContainer>\n ) : (\n tableComponent\n )}\n </>\n )\n}\n","import { DragHandle } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const StyledHandle = styled(ActionIcon, {\n base: [\n 'text-inherit!',\n 'fill-current',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n isDragging: {\n true: ['cursor-grabbing'],\n false: ['cursor-grab']\n }\n }\n})\n\nexport type HandleProps = Omit<\n React.ComponentProps<typeof StyledHandle>,\n 'children' | 'size'\n> & {\n size?: React.ComponentProps<typeof Icon>['size']\n}\n\nexport const Handle = ({ ref, isDragging, size, ...rest }: HandleProps) => (\n <StyledHandle\n ref={ref}\n isDragging={isDragging}\n appearance=\"simple\"\n hasTooltip={false}\n size={size}\n {...rest}\n >\n <Icon is={DragHandle} />\n </StyledHandle>\n)\n","import { useSortable } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { Handle as DragHandle, type HandleProps } from './Handle'\n\nexport type SortableHandleProps = {\n targetId: string | number\n disabled?: boolean\n label?: string\n} & Omit<HandleProps, 'label'>\n\nexport const SortableHandle = ({\n targetId,\n disabled = false,\n label = 'drag handle',\n ...rest\n}: SortableHandleProps) => {\n const { attributes, listeners, isDragging, setActivatorNodeRef } =\n useSortable({ id: targetId })\n\n return (\n <DragHandle\n ref={setActivatorNodeRef}\n isDragging={isDragging}\n label={label}\n disabled={disabled}\n {...(!disabled ? listeners : {})}\n {...(!disabled ? attributes : {})}\n {...rest}\n />\n )\n}\n\nSortableHandle.displayName = 'SortableHandle'\n","import type { UniqueIdentifier } from '@dnd-kit/core'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\n\nexport type SortableItemProps = {\n id: UniqueIdentifier\n asChild?: boolean\n isDragHandle?: boolean\n disabled?: boolean\n className?: string\n style?: Pick<React.HTMLAttributes<HTMLDivElement>, 'style'>\n}\n\nexport const SortableItem = ({\n id,\n asChild = false,\n className,\n style,\n isDragHandle = false,\n disabled,\n ...rest\n}: React.PropsWithChildren<SortableItemProps>) => {\n const { transform, setNodeRef, isDragging, listeners, attributes } =\n useSortable({ id })\n\n const Component = asChild ? Slot : 'div'\n return (\n <Component\n ref={setNodeRef}\n style={{\n ...style,\n '--scale': 1,\n '--translate-x': transform?.x || 0,\n '--translate-y': transform?.y || 0\n }}\n data-dragging={isDragging}\n data-disabled={disabled}\n {...(isDragHandle && !disabled ? listeners : {})}\n {...(isDragHandle && !disabled ? attributes : {})}\n {...rest}\n className={cn(\n 'translate-x-[calc(var(--translate-x)*1px)]',\n 'translate-y-[calc(var(--translate-y)*1px)]',\n 'scale-(--scale)',\n isDragging && 'z-5',\n 'disabled:**:pointer-events-none',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n isDragHandle && (isDragging ? 'cursor-grabbing' : 'cursor-grab'),\n className\n )}\n />\n )\n}\n\nSortableItem.displayName = 'SortableItem'\n","import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core'\nimport {\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors\n} from '@dnd-kit/core'\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates\n} from '@dnd-kit/sortable'\nimport * as React from 'react'\n\ntype SortableRootProps = {\n sortableIds: (string | number)[]\n onSortChange: (onSortChangeData: {\n order: UniqueIdentifier[]\n oldIndex: number\n newIndex: number\n }) => void\n}\n\nexport const SortableRoot = ({\n sortableIds,\n onSortChange,\n children\n}: React.PropsWithChildren<SortableRootProps>) => {\n const [order, setOrder] = React.useState<(string | number)[]>(sortableIds)\n React.useEffect(() => {\n setOrder(sortableIds)\n }, [sortableIds])\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n })\n )\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event\n if (active.id && over?.id && active.id !== over?.id) {\n setOrder((order) => {\n const oldIndex = order.indexOf(active.id)\n const newIndex = order.indexOf(over.id)\n const newOrder = arrayMove(order, oldIndex, newIndex)\n onSortChange({ order: newOrder, oldIndex, newIndex })\n return newOrder\n })\n }\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext items={order}>{children}</SortableContext>\n </DndContext>\n )\n}\n\nSortableRoot.displayName = 'SortableRoot'\n","export { SortableHandle as Handle } from './SortableHandle'\nexport { SortableItem as Item } from './SortableItem'\nexport { SortableRoot as Root } from './SortableRoot'\n","import type { Row } from '@tanstack/react-table'\nimport { flexRender } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { DataTableDataCell } from '../DataTableDataCell'\n\nexport type DataTableDraggableRowProps = React.ComponentProps<\n typeof Table.Row\n> & {\n row: Row<Record<string, unknown>>\n idColumn?: string\n}\n\nexport const DragAndDropTableRow = ({\n row,\n idColumn = 'id'\n}: DataTableDraggableRowProps) => {\n const rowId = row.original[idColumn] as string | number\n return (\n <Sortable.Item id={rowId} asChild>\n <Table.Row>\n {row.getVisibleCells().map((cell, i) => {\n if (i === 0) {\n return (\n <Table.Cell key={cell.id}>\n <Sortable.Handle targetId={rowId} className=\"inline-block\" />\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </Table.Cell>\n )\n }\n return <DataTableDataCell key={cell.id} cell={cell} />\n })}\n </Table.Row>\n </Sortable.Item>\n )\n}\n","import * as React from 'react'\n\nimport { Table } from '../../table/Table'\nimport { useDataTable } from '../DataTable.context'\nimport { DragAndDropTableRow } from './DragAndDropTableRow'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n idColumn?: string\n}\n\nexport const DragAndDropTableBody = ({\n striped = false,\n idColumn = 'id',\n ...rest\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n return (\n <Table.Body {...rest} striped={striped}>\n {getRowModel().rows.map((row) => {\n return (\n <DragAndDropTableRow row={row} key={row.id} idColumn={idColumn} />\n )\n })}\n </Table.Body>\n )\n}\n","import { arrayMove } from '@dnd-kit/sortable'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport * as Sortable from '../../sortable'\nimport { Table } from '../../table/Table'\nimport { useDataTable } from '../DataTable.context'\nimport { AsyncDataState, type AsyncDataResult } from '../DataTable.types'\nimport { DataTableHead } from '../DataTableHead'\nimport { DataTableLoading } from '../DataTableLoading'\nimport type { DataTableTableProps } from '../DataTableTable'\nimport { DragAndDropTableBody } from './DragAndDropTableBody'\n\ntype DragAndDropTableProps = DataTableTableProps & {\n className?: string\n idColumn?: string\n onDragAndDrop?: (onDragAndDropData: {\n oldIndex: number\n newIndex: number\n newData: AsyncDataResult\n }) => void\n}\n\nexport const DragAndDropTable = ({\n idColumn = 'id',\n onDragAndDrop,\n sortable,\n striped,\n theme,\n className,\n ...rest\n}: DragAndDropTableProps) => {\n const { asyncDataState, data, setData } = useDataTable()\n const isPending = asyncDataState === AsyncDataState.PENDING\n\n const rowIds = React.useMemo(\n () =>\n data.results.map((row) => {\n return row[idColumn] as string | number\n }),\n [data]\n )\n const handleSortChange = React.useCallback(\n ({ oldIndex, newIndex }) => {\n const sortedResults = arrayMove(data.results, oldIndex, newIndex)\n const newData = { results: sortedResults, total: data.total }\n setData({ results: sortedResults, total: data.total })\n onDragAndDrop?.({ oldIndex, newIndex, newData })\n },\n [data, onDragAndDrop]\n )\n\n return (\n <Sortable.Root onSortChange={handleSortChange} sortableIds={rowIds}>\n <DataTableLoading />\n <Table\n {...rest}\n className={cn(\n isPending && [\n 'opacity-50',\n 'pointer-events-none',\n 'transition-opacity',\n 'duration-250',\n 'linear',\n 'delay-150'\n ],\n className\n )}\n >\n <DataTableHead theme={theme} sortable={sortable} />\n <DragAndDropTableBody striped={striped} idColumn={idColumn} />\n </Table>\n </Sortable.Root>\n )\n}\n","export enum VisibleElementsAmount {\n LESS = 6,\n MORE = 8\n}\n\nexport const VIEW_ALL_POPOVER = 'VIEW_ALL_POPOVER'\nexport const GO_TO_PREVIOUS_PAGE = 'GO_TO_PREVIOUS_PAGE'\nexport const GO_TO_NEXT_PAGE = 'GO_TO_NEXT_PAGE'\n","import {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport type { PaginationItemsToRender } from './types'\n\nexport const getPaginationElementsToRender = (\n currentPage: number,\n pagesCount: number,\n visibleElementsCount: number\n): PaginationItemsToRender => {\n const paginationPages = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n /*\n * As we always show the `<` `>` arrows,\n * subtract 2 from `visibleElementsCount` (one for each of the GO_TO_PREVIOUS/NEXT_PAGE arrows)\n * to get the `visiblePagesCount`\n */\n let visiblePagesCount = visibleElementsCount - 2\n const withPreviousNextPageArrows = (paginationPages) => [\n GO_TO_PREVIOUS_PAGE,\n ...paginationPages,\n GO_TO_NEXT_PAGE\n ]\n\n /**\n * If fewer pages than threshold for truncating render them all.\n *\n * pagesCount: 6\n * visibleElementsCount: >=6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, 3, 4, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | 3 | | 4 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (pagesCount <= visiblePagesCount) {\n return withPreviousNextPageArrows(paginationPages)\n }\n\n /**\n * If current page is either at the very start or at the very end of the pages\n */\n const canFitEdgePage = visibleElementsCount >= 5\n const canFitViewAllPopover = visibleElementsCount >= 4\n const canFitPages = visibleElementsCount >= 3\n\n if (canFitViewAllPopover) {\n // Subtract one from visiblePagesCount to accomodate for us adding the `[…]` VIEW_ALL_POPOVER\n visiblePagesCount -= 1\n }\n\n if (canFitEdgePage) {\n // Subtract one more from visiblePagesCount to accomodate for us adding the GO_TO_PREVIOUS/NEXT_PAGE arrows\n visiblePagesCount -= 1\n }\n\n const firstPage = paginationPages[0]\n const lastPage = paginationPages[paginationPages.length - 1]\n\n /**\n * If we're truncating and current page is at the start of the page list,\n * render the initial truncated page list, e.g.\n *\n * pagesCount: 8\n * currentPage: 1/2\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, 2, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | 2 | | … | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage < visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitPages) {\n newPaginationItems.push(...paginationPages.slice(0, visiblePagesCount))\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitEdgePage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page is towards the end of the\n * page list (depending on visibleElementsCount),\n * render a truncated page list from the end, e.g.\n *\n * pagesCount: 8\n * currentPage: 7/8\n * visibleElementsCount: 6\n * returns [GO_TO_PREVIOUS_PAGE, 1, VIEW_ALL_POPOVER, 7, 8, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 1 | | … | | 7 | | 8 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n */\n if (currentPage > pagesCount - visiblePagesCount) {\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitEdgePage) {\n newPaginationItems.push(firstPage)\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitPages) {\n newPaginationItems.push(\n ...paginationPages.slice(pagesCount - visiblePagesCount, pagesCount)\n )\n }\n return withPreviousNextPageArrows(newPaginationItems)\n }\n\n /**\n * If we're truncating and the current page doesn't meet any of the previous conditions\n * (we're in the middle)\n * render a truncated page list from a specific index relative to `currentPage`, e.g.\n *\n * currentPage: 4\n * visibleElementsCount: 6 // VisibleElementsAmount.LESS\n * returns [GO_TO_PREVIOUS_PAGE, 3, 4, VIEW_ALL_POPOVER, 6, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 3 | | 4 | | … | | 6 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+\n *\n * currentPage: 6\n * visibleElementsCount: 8 // VisibleElementsAmount.MORE\n * returns [GO_TO_PREVIOUS_PAGE, 4, 5, 6, 7, VIEW_ALL_POPOVER, 10, GO_TO_NEXT_PAGE]\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n * | < | | 4 | | 5 | | 6 | | 7 | | … | | 10 | | > |\n * +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+\n */\n const canFitCurrentPage = canFitPages\n const canFitCurrentPageAndPreviousPage = visibleElementsCount >= 6\n const canFitCurrentPageAndPreviousPageAndNextPage = visibleElementsCount >= 7\n const canFitLastPage = canFitEdgePage\n\n const newPaginationItems = [] as PaginationItemsToRender\n if (canFitCurrentPageAndPreviousPageAndNextPage) {\n newPaginationItems.push(\n ...paginationPages.slice(\n currentPage + 1 - visiblePagesCount,\n currentPage + 1\n )\n )\n } else if (canFitCurrentPageAndPreviousPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - visiblePagesCount, currentPage)\n )\n } else if (canFitCurrentPage) {\n newPaginationItems.push(\n ...paginationPages.slice(currentPage - 1, currentPage - 1 + 1)\n )\n }\n if (canFitViewAllPopover) {\n newPaginationItems.push(VIEW_ALL_POPOVER)\n }\n if (canFitLastPage) {\n newPaginationItems.push(lastPage)\n }\n return withPreviousNextPageArrows(newPaginationItems)\n}\n\nexport const findNextAvailablePage = (\n startPage: number,\n disabledPages: number[],\n pagesCount: number\n): number | undefined => {\n if (startPage > pagesCount) return\n let nextPage = startPage\n while (disabledPages.includes(nextPage)) {\n nextPage++\n }\n return nextPage\n}\n\nexport const findPreviousAvailablePage = (\n startPage: number,\n disabledPages: number[]\n): number | undefined => {\n if (startPage < 1) return\n let previousPage = startPage\n while (disabledPages.includes(previousPage)) {\n previousPage--\n }\n return previousPage\n}\n","import * as React from 'react'\n\nimport { VisibleElementsAmount } from './pagination.constants'\nimport {\n findNextAvailablePage,\n findPreviousAvailablePage,\n getPaginationElementsToRender\n} from './pagination.helper'\nimport type { PaginationContextValue, PaginationProviderProps } from './types'\n\nexport const PaginationContext = React.createContext<PaginationContextValue>({\n goToPage: () => null,\n goToPreviousPage: () => null,\n goToNextPage: () => null,\n currentPage: 1,\n pagesCount: 0,\n onItemHover: () => null,\n paginationItems: [],\n labels: {},\n indicatedPages: [],\n disabledPages: []\n})\n\nexport const PaginationProvider = ({\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children\n}: React.PropsWithChildren<PaginationProviderProps>) => {\n const [internalCurrentPage, setInternalCurrentPage] = React.useState(1)\n\n const currentPage = selectedPage || internalCurrentPage\n\n const goToPage = React.useCallback(\n (pageNumber: number) => {\n setInternalCurrentPage(pageNumber)\n onSelectedPageChange?.(pageNumber)\n },\n [onSelectedPageChange]\n )\n\n const previousPage = currentPage - 1\n const previousAvailablePage = findPreviousAvailablePage(\n previousPage,\n disabledPages\n )\n\n const goToPreviousPage = React.useCallback(() => {\n if (previousAvailablePage) goToPage(previousAvailablePage)\n }, [goToPage, previousAvailablePage])\n\n const nextPage = currentPage + 1\n const nextAvailablePage = findNextAvailablePage(\n nextPage,\n disabledPages,\n pagesCount\n )\n const goToNextPage = React.useCallback(() => {\n if (nextAvailablePage) goToPage(nextAvailablePage)\n }, [goToPage, nextAvailablePage])\n\n const paginationItems = getPaginationElementsToRender(\n currentPage,\n pagesCount,\n visibleElementsCount\n )\n\n const value = React.useMemo(() => {\n return {\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n paginationItems,\n indicatedPages,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n }\n }, [\n goToNextPage,\n goToPreviousPage,\n goToPage,\n currentPage,\n indicatedPages,\n paginationItems,\n disabledPages,\n pagesCount,\n onItemHover,\n previousAvailablePage,\n nextAvailablePage,\n labels\n ])\n\n return (\n <PaginationContext.Provider value={value}>\n {children}\n </PaginationContext.Provider>\n )\n}\n","import * as React from 'react'\n\nimport { PaginationContext } from './Pagination.context'\nimport type { PaginationContextValue } from './types'\n\nexport const usePagination = (): PaginationContextValue => {\n const context = React.useContext(PaginationContext)\n\n if (!context) {\n throw new Error(\n 'Ensure that you wrap any components with the PaginationProvider component'\n )\n }\n\n return context\n}\n","import { ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['ml-1', 'disabled:opacity-30']\n})\n\nexport const PaginationNextButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToNextPage, labels, nextAvailablePage } = usePagination()\n\n const isDisabled = !nextAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToNextPage}\n disabled={isDisabled}\n {...props}\n label={labels?.nextPageButtonLabel || 'Next page'}\n >\n <Icon is={ChevronRight} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { PaginationPageProps } from './types'\nimport { usePagination } from './usePagination'\n\nconst StyledButton = styled('button', {\n base: [\n 'items-center',\n 'border',\n 'border-transparent',\n 'rounded-sm',\n 'cursor-pointer',\n 'font-body',\n 'justify-center',\n 'whitespace-nowrap',\n 'w-max',\n 'flex',\n 'flex-col',\n 'p-0',\n 'font-normal',\n 'text-text-subtle',\n 'bg-(--base-1)',\n 'relative',\n 'not-disabled:active:bg-(--base-3)',\n 'not-disabled:active:text-(--text-bold)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--base-2)',\n 'not-disabled:hover:text-text-regular',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n md: ['size-10']\n },\n selected: {\n true: [\n 'border',\n 'border-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:border-(--accent-11)',\n 'not-disabled:active:text-(--accent-11)',\n 'not-disabled:hover:border-(--accent-10)',\n 'not-disabled:hover:text-(--accent-10)',\n 'text-(--accent-9)'\n ]\n },\n indicated: {\n true: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'text-white'\n ]\n }\n },\n compoundVariants: [\n {\n selected: true,\n indicated: true,\n class: [\n 'bg-(--accent-9)',\n 'font-semibold',\n 'not-disabled:active:bg-(--accent-11)',\n 'not-disabled:active:text-white',\n 'not-disabled:hover:bg-(--accent-10)',\n 'not-disabled:hover:text-white',\n 'not-focus-visible:border-white!',\n 'shadow-[var(--accent-9)_0px_0px_0px_1px]',\n 'text-white'\n ]\n }\n ]\n})\n\nexport const PaginationPage = ({\n pageNumber,\n className,\n onClick\n}: PaginationPageProps) => {\n const { currentPage, goToPage, indicatedPages, disabledPages, onItemHover } =\n usePagination()\n\n const isIndicated = indicatedPages.includes(pageNumber)\n const isDisabled = disabledPages.includes(pageNumber)\n\n const isSelected = currentPage === pageNumber\n\n const handleOnHover = () => {\n if (isSelected || isDisabled) return\n onItemHover?.(pageNumber)\n }\n\n const handleOnClick = (pageNumber) => {\n onClick?.()\n goToPage(pageNumber)\n }\n\n return (\n <StyledButton\n selected={isSelected}\n size=\"md\"\n onClick={() => handleOnClick(pageNumber)}\n className={className}\n indicated={isIndicated}\n disabled={isDisabled}\n aria-current={isSelected && 'page'}\n aria-disabled={isDisabled}\n onMouseOver={handleOnHover}\n >\n {pageNumber}\n </StyledButton>\n )\n}\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Arrow, Close, Content } from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'max-w-[90vw]',\n 'p-6',\n 'pr-10',\n 'relative',\n 'z-10',\n 'will-change-transform',\n 'will-change-opacity',\n 'animation-duration-75',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-50'],\n md: ['max-w-100'],\n lg: ['max-w-150']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: ['fill-white', 'z-1', 'in-data-[align=end]:mx-6']\n})\n\ntype PopoverContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content> & {\n closePopoverText?: string\n showCloseButton?: boolean\n }\n\nexport const PopoverContent = ({\n children,\n side = 'top',\n sideOffset = 8,\n closePopoverText = 'Close popover',\n showCloseButton = true,\n size = 'md',\n ...rest\n}: PopoverContentProps) => (\n <StyledContent size={size} side={side} sideOffset={sideOffset} {...rest}>\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closePopoverText}\n size=\"md\"\n hasTooltip={false}\n theme=\"neutral\"\n className=\"absolute top-0.5 right-0.5\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {children}\n <StyledArrow width={16} height={8} />\n </StyledContent>\n)\n","import { Anchor, Portal, Root, Trigger } from '@radix-ui/react-popover'\n\nimport { PopoverContent } from './PopoverContent'\n\nexport const Popover = /* @__PURE__ */ Object.assign(Root, {\n Content: PopoverContent,\n Portal,\n Anchor,\n Trigger\n})\n\nRoot.displayName = 'Popover'\n","import { Ellypsis } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Popover } from '../popover/Popover'\nimport { PaginationPage } from './PaginationPage'\nimport { usePagination } from './usePagination'\n\nexport const PaginationPopover = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const { pagesCount, labels } = usePagination()\n const paginationItems = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n const [isOpen, setIsOpen] = React.useState<boolean>(false)\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen} defaultOpen={false}>\n <Popover.Trigger asChild>\n {children || (\n <ActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n label={labels?.popoverTriggerLabel || 'Open pagination popover'}\n data-testid=\"pagination_popover_trigger\"\n >\n <Icon is={Ellypsis} />\n </ActionIcon>\n )}\n </Popover.Trigger>\n <Popover.Content size=\"md\" showCloseButton={false} className=\"p-0\">\n <div className=\"flex flex-wrap justify-center gap-1 p-4\">\n {paginationItems?.map((pageNumber) => {\n return (\n <PaginationPage\n key={pageNumber}\n pageNumber={pageNumber}\n onClick={() => setIsOpen(false)}\n />\n )\n })}\n </div>\n </Popover.Content>\n </Popover>\n )\n}\n","import { ChevronLeft } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n base: ['mr-1', 'disabled:opacity-30']\n})\n\nexport const PaginationPreviousButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const { goToPreviousPage, labels, previousAvailablePage } = usePagination()\n\n const isDisabled = !previousAvailablePage\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToPreviousPage}\n disabled={isDisabled}\n {...props}\n label={labels?.previousPageButtonLabel || 'Previous page'}\n >\n <Icon is={ChevronLeft} />\n </StyledActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport {\n GO_TO_NEXT_PAGE,\n GO_TO_PREVIOUS_PAGE,\n VIEW_ALL_POPOVER\n} from './pagination.constants'\nimport { PaginationNextButton } from './PaginationNextButton'\nimport { PaginationPage } from './PaginationPage'\nimport { PaginationPopover } from './PaginationPopover'\nimport { PaginationPreviousButton } from './PaginationPreviousButton'\nimport { usePagination } from './usePagination'\n\nexport const PaginationItems = () => {\n const { paginationItems } = usePagination()\n\n return (\n <>\n {paginationItems.map((paginationItem, i) => {\n switch (paginationItem) {\n case VIEW_ALL_POPOVER:\n return <PaginationPopover key={paginationItem + i} />\n case GO_TO_PREVIOUS_PAGE:\n return <PaginationPreviousButton key={paginationItem} />\n case GO_TO_NEXT_PAGE:\n return <PaginationNextButton key={paginationItem} />\n default:\n return (\n <PaginationPage\n key={paginationItem}\n pageNumber={paginationItem}\n />\n )\n }\n })}\n </>\n )\n}\n","import * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { cn } from '../../styled'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationProvider } from './Pagination.context'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n className,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <div {...rest} className={cn('flex', 'gap-1', className)}>\n {children || <PaginationItems />}\n </div>\n </ColorScheme>\n </PaginationProvider>\n )\n}\n\nexport const Pagination = /* @__PURE__ */ Object.assign(PaginationComponent, {\n Popover: PaginationPopover\n})\n\nPaginationComponent.displayName = 'Pagination'\n","import * as React from 'react'\n\nimport type { TcolorScheme } from '../../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../../styled'\nimport { Pagination as PaginationComponent } from '../../pagination/Pagination'\nimport { Text } from '../../text/Text'\nimport { useDataTable } from '../DataTable.context'\nimport { AsyncDataState } from '../DataTable.types'\n\nconst StyledNav = styled('nav', {\n base: [\n 'flex',\n 'flex-col',\n 'justify-between',\n 'items-center',\n 'tabular-nums',\n 'flex-wrap',\n 'w-full',\n 'gap-4',\n 'mt-4',\n 'md:flex-row'\n ]\n})\n\ntype PaginationProps = React.ComponentProps<typeof StyledNav> & {\n colorScheme?: TcolorScheme\n}\n\n/** Applies pagination to parent DataTableProvider and renders UI to switch pages etc */\nexport const Pagination = ({ colorScheme, ...rest }: PaginationProps) => {\n const {\n applyPagination,\n getState,\n getExpandedRowModel,\n getRowModel,\n setPageIndex,\n getTotalRows,\n getPageCount,\n asyncDataState,\n hasAsyncData\n } = useDataTable()\n\n React.useEffect(() => {\n applyPagination()\n }, [applyPagination])\n\n const { pagination: paginationState } = getState()\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n // Show pagination only if total pages are more than 1\n const showPagination = hasAsyncData\n ? getPageCount() > 1\n : getExpandedRowModel().rows.length / paginationState.pageSize > 1\n\n if (isEmpty || !showPagination) return null\n const totalVisibleRows = getExpandedRowModel().rows.length\n\n const start =\n totalVisibleRows === 0\n ? 0\n : paginationState.pageIndex * paginationState.pageSize + 1\n\n const asyncRowCount = getRowModel().rows.length\n const end = hasAsyncData\n ? asyncRowCount === 0\n ? start\n : start + asyncRowCount - 1\n : Math.min(start + paginationState.pageSize - 1, totalVisibleRows)\n\n // indexing for the pagination component is 1 based\n const setPage = (index: number) => {\n setPageIndex(index - 1)\n }\n\n const pageCount = hasAsyncData\n ? getPageCount()\n : Math.max(1, Math.ceil(totalVisibleRows / paginationState.pageSize))\n\n return (\n <StyledNav {...rest}>\n <Text size=\"sm\">{`${start} - ${end} of ${\n hasAsyncData ? getTotalRows() : totalVisibleRows\n } items`}</Text>\n <PaginationComponent\n colorScheme={colorScheme}\n selectedPage={paginationState.pageIndex + 1}\n pagesCount={pageCount}\n onSelectedPageChange={setPage}\n />\n </StyledNav>\n )\n}\n\nPagination.displayName = 'Pagination'\n","import { DataTableProvider } from './DataTable.context'\nimport { DataTableBody } from './DataTableBody'\nimport { DataTableBulkActions } from './DataTableBulkActions'\nimport { DataTableBulkActionsFloating } from './DataTableBulkActionsFloating'\nimport { DataTableDataCell } from './DataTableDataCell'\nimport { DataTableEmptyState } from './DataTableEmptyState'\nimport { DataTableError } from './DataTableError'\nimport { DataTableGlobalFilter } from './DataTableGlobalFilter'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableLoading } from './DataTableLoading'\nimport { DataTableMetaData } from './DataTableMetaData'\nimport { DataTableRow } from './DataTableRow'\nimport { DataTableRowSelectionCheckbox } from './DataTableRowSelectionCheckbox'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\nimport { DataTableTable } from './DataTableTable'\nimport { DragAndDropTable } from './drag-and-drop/DragAndDropTable'\nimport { Pagination } from './pagination/Pagination'\n\n/** Context provider for DataTable state and logic.\n *\n * Children can call `useDataTable` to access everything provided by `@tanstack/react-table` plus\n * the functionality we've built on top.\n */\nexport const DataTable = /* @__PURE__ */ Object.assign(DataTableProvider, {\n /** Default table body implementation for `DataTable`.\n *\n * Can be configured with alternating colours of rows. If you need more customisation options,\n * you can build your own implementation with `useDataTable()` and the UI-only `Table` components.\n */\n Body: DataTableBody,\n\n /** Default table data cell implementation for `DataTable`\n *\n *\n */\n DataCell: DataTableDataCell,\n\n /**\n * Used in place of `DataTable.Table` to render a table with rows that the user can sort by drag-and-drop\n */\n DragAndDropTable: DragAndDropTable,\n\n /** Default global search implementation for `DataTable`\n *\n * If you need more customisation options, you can compose your own implementation with our UI-only input components and `useDataTable`.\n */\n GlobalFilter: DataTableGlobalFilter,\n\n /** Default table head implementation\n *\n * Can be configured to be sortable and with different visual themes.\n * If you need more customisation options, you can build your own implementation\n * with `useDataTable` and the UI-only `Table` components.\n */\n Head: DataTableHead,\n\n /** Default header implementation for `DataTable`\n *\n * Can be configured to make the column sortable. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n HeaderCell: DataTableHeaderCell,\n\n /** Default pagination implementation for `DataTable`\n *\n * Can navigate forward, backward, or to any specific page. If you need more customisation options,\n * you can build your own implementation with `useDataTable` and other UI components.\n *\n */\n MetaData: DataTableMetaData,\n\n /** Default display of amount of items and current sorting status for 'DataTable'\n *\n */\n Pagination: Pagination,\n\n /** Default row implementation for `DataTable`\n *\n * Renders all visible cells as `Table.Cell`. If you need more customisation options,\n * you can build your own implementation with the UI-only `Table` components.\n */\n Row: DataTableRow,\n\n /** Default table implementation for `DataTable`.\n *\n * Can be configured with sortable columns and different visual themes.\n *\n * If you need more customisation options, you can compose your own implementation with\n * lower-level `DataTable` components or build the whole thing from\n * scratch with `useDataTable` and the UI-only `Table` components.\n *\n */\n Table: DataTableTable,\n\n /** Default loading implementation for remote data\n *\n * Renders a loading component while fetching the paginated data using `getAsyncData`.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState`\n * can be retrieved from `useDataTable`\n */\n Loading: DataTableLoading,\n\n /** Default error implementation for remote data\n *\n * Renders an error component when `getAsyncData` promise rejects.\n * Children are rendered as a function, it exposes a `runAsyncData` function to the children component.\n * `runAsyncData()` can be used to retry fetching the paginated data with the current pageIndex, pageSize\n * and sorting parameters or your own custom paginated options.\n *\n * If you need more customisation, you can compose your own implentation, `asyncDataState` and `runAsyncData()`\n * can be retrieved from `useDataTable`\n *\n */\n Error: DataTableError,\n\n /** Empty state implementation for `DataTable`.\n *\n * Extends the EmptyState component\n */\n EmptyState: DataTableEmptyState,\n\n /** Select all rows checkbox.\n *\n * Renders a checkbox on the header, allowing for bulk selection/deselection of all selectable rows\n */\n SelectAllRowsCheckbox: DataTableSelectAllRowsCheckbox,\n\n /** Individual row selection checkbox.\n *\n * Renders a checkbox on each row, allowing for individual selection/deselection of any selectable row\n */\n RowSelectionCheckbox: DataTableRowSelectionCheckbox,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActions: DataTableBulkActions,\n\n /** Bulk actions for selected rows.\n *\n * Renders a toolbar with actions that can be applied to all selected rows\n */\n BulkActionsFloating: DataTableBulkActionsFloating\n})\n","export const monthNamesShort = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n]\n\nexport const weekdayNamesShort = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat'\n]\n\nexport const DEFAULT_LABELS = {\n open: 'Open calendar',\n next: 'Next month',\n previous: 'Previous month',\n nextYear: 'Next year',\n previousYear: 'Previous year'\n}\n","import { styled } from '../../styled'\n\nexport const Day = styled('button', {\n base: [\n 'bg-transparent',\n 'border-none',\n 'rounded-full',\n 'text-grey-900',\n 'cursor-pointer',\n 'font-body',\n 'text-sm',\n 'size-8',\n 'p-0',\n 'transition-all',\n 'duration-75',\n 'hover:bg-grey-200',\n 'active:bg-primary-800',\n 'active:text-white',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'disabled:cursor-default',\n 'disabled:opacity-30'\n ],\n variants: {\n isSelected: {\n true: ['bg-primary-800', 'hover:bg-primary-800', 'text-white']\n },\n isToday: {\n true: ['bg-grey-200']\n },\n isOutsideMonth: {\n true: ['text-grey-600']\n }\n }\n})\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport { useDayzed } from 'dayzed'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Button } from '../button/Button'\nimport { Icon } from '../icon/Icon'\nimport { Text } from '../text/Text'\nimport { DEFAULT_LABELS, monthNamesShort, weekdayNamesShort } from './constants'\nimport { Day } from './Day'\n\nconst StyledButton = styled(Button, {\n base: ['text-grey-1000', 'p-3', 'w-16'],\n variants: {\n selected: {\n false: [\n 'disabled:bg-white!',\n 'font-normal',\n 'hover:bg-grey-200!',\n 'hover:text-grey-1000!',\n 'text-grey-1000!'\n ]\n }\n }\n})\n\nexport type CalendarTranslationProps = {\n monthNames?: string[]\n weekdayNames?: string[]\n labels?: {\n open: string\n next: string\n previous: string\n nextYear: string\n previousYear: string\n }\n}\n\ntype CalendarProps = DayzedInterface &\n CalendarTranslationProps & {\n refDateToday?: React.RefObject<HTMLButtonElement | null>\n refDateSelected?: React.RefObject<HTMLButtonElement | null>\n setYear: (date: Date) => Promise<void>\n className?: string\n }\n\nconst offsetWeekdayNames = (\n weekdayNames: string[],\n firstDayOfWeek: number\n): string[] => {\n const start = weekdayNames.slice(0, firstDayOfWeek)\n const end = weekdayNames.slice(firstDayOfWeek)\n return end.concat(start)\n}\n\nexport const Calendar = ({\n className,\n refDateSelected,\n refDateToday,\n firstDayOfWeek = 0,\n monthNames = monthNamesShort,\n weekdayNames = weekdayNamesShort,\n labels = DEFAULT_LABELS,\n date = new Date(),\n minDate,\n maxDate,\n setYear,\n ...rest\n}: CalendarProps) => {\n const [showYears, setShowYears] = React.useState<boolean>(false)\n const [currentYear, setCurrentYear] = React.useState<number>(\n date?.getFullYear()\n )\n\n const handleSetYear = (year: number): void => {\n const newDate = date\n newDate.setFullYear(year)\n setYear(newDate)\n setShowYears(false)\n }\n\n const isAtMinYear = minDate && currentYear - 16 <= minDate.getFullYear()\n const isAtMaxYear = maxDate && currentYear >= maxDate.getFullYear()\n\n const yearList = Array.from({ length: 16 }, (_, i) => {\n const year = currentYear - i\n if (\n (maxDate && year > maxDate.getFullYear()) ||\n (minDate && year < minDate.getFullYear())\n )\n return 0\n return year\n })\n\n const { calendars, getBackProps, getForwardProps, getDateProps } = useDayzed({\n firstDayOfWeek,\n showOutsideDays: true,\n date,\n minDate,\n maxDate,\n ...rest\n })\n\n if (!calendars.length) return null\n\n return (\n <div className={cn('relative', 'w-fit', '-mt-1', className)}>\n <div className=\"absolute top-0 -right-1 flex\">\n <ActionIcon\n label={labels[showYears ? 'previousYear' : 'previous']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getBackProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear - 16)\n })}\n disabled={showYears && isAtMinYear}\n >\n <Icon is={ChevronLeft} />\n </ActionIcon>\n <ActionIcon\n label={labels[showYears ? 'nextYear' : 'next']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getForwardProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear + 16)\n })}\n disabled={showYears && isAtMaxYear}\n >\n <Icon is={ChevronRight} />\n </ActionIcon>\n </div>\n {showYears && (\n <div className=\"grid grid-cols-4 gap-x-1 gap-y-3 pt-12 [direction:rtl]\">\n {yearList.map((year, i) => {\n const isCurrentYear = year === date.getFullYear()\n if (!year) return <div key={i} className=\"h-10 w-16\" />\n\n return (\n <StyledButton\n key={`${year}${i}`}\n theme={isCurrentYear ? 'primary' : 'neutral'}\n onClick={() => handleSetYear(year)}\n selected={isCurrentYear}\n >\n {year}\n </StyledButton>\n )\n })}\n </div>\n )}\n {!showYears &&\n calendars.map(({ month, year, weeks }) => (\n <div key={`${month}${year}`}>\n <div className=\"mb-4 flex h-10 items-center\">\n <Button\n theme=\"neutral\"\n onClick={() => setShowYears(true)}\n className=\"text-grey-1000 px-0\"\n >\n {monthNames[month]} {year}\n </Button>\n </div>\n <div className=\"mb-3 grid grid-cols-7 gap-x-2 gap-y-1\">\n {offsetWeekdayNames(weekdayNames, firstDayOfWeek).map(\n (weekday) => (\n <Text\n as=\"span\"\n size=\"sm\"\n weight=\"bold\"\n key={`${month}${year}${weekday}`}\n className=\"text-center\"\n >\n {weekday}\n </Text>\n )\n )}\n </div>\n <div className=\"grid grid-cols-7 gap-x-2 gap-y-1\">\n {weeks.map((week, weekIndex) =>\n week.map((dateObj, index) => {\n const key = `${month}${year}${weekIndex}${index}`\n\n if (!dateObj) return <div key={key} />\n\n const { date, selected, today, prevMonth, nextMonth } =\n dateObj\n\n return (\n <Day\n isOutsideMonth={prevMonth || nextMonth}\n isSelected={selected}\n isToday={today}\n key={key}\n ref={\n selected ? refDateSelected : today ? refDateToday : null\n }\n {...getDateProps({ dateObj })}\n type=\"button\"\n >\n {date.getDate()}\n </Day>\n )\n })\n )}\n </div>\n </div>\n ))}\n </div>\n )\n}\n\nCalendar.displayName = 'Calendar'\n","export const DEFAULT_DATE_FORMAT = 'DD/MM/YYYY'\n","import { CalendarEvent } from '@atom-learning/icons'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport * as React from 'react'\n\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Calendar, type CalendarTranslationProps } from '../calendar/Calendar'\nimport { DEFAULT_LABELS } from '../calendar/constants'\nimport { Icon } from '../icon/Icon'\nimport { Input } from '../input/Input'\nimport { Popover } from '../popover/Popover'\nimport { DEFAULT_DATE_FORMAT } from './constants'\n\ndayjs.extend(customParseFormat)\n\nexport type DateInputProps = Omit<DayzedInterface, 'onDateSelected'> &\n CalendarTranslationProps & {\n initialDate?: Date\n dateFormat?: string\n disabled?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n revalidate?: () => Promise<boolean>\n onChange?: (value?: Date) => void\n ref?: React.Ref<HTMLInputElement>\n }\n\nconst formatDateToString = (date?: Date, dateFormat = DEFAULT_DATE_FORMAT) =>\n date ? dayjs(date).format(dateFormat) : ''\n\nexport const DateInput = ({\n ref,\n initialDate,\n dateFormat = DEFAULT_DATE_FORMAT,\n firstDayOfWeek = 1,\n disabled,\n monthNames,\n weekdayNames,\n size = 'md',\n appearance,\n theme,\n labels,\n revalidate,\n onChange,\n minDate,\n maxDate,\n ...rest\n}: DateInputProps) => {\n const [date, setDate] = React.useState(\n initialDate ? dayjs(initialDate).toDate() : undefined\n )\n\n const [inputElRef, setInputElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => inputElRef as HTMLInputElement)\n\n const dateString = formatDateToString(date, dateFormat)\n\n const handleInputChange = React.useCallback(\n (event) => {\n const newDateString = event.target.value\n const parsedInputDate = dayjs(newDateString, dateFormat)\n const newDate = parsedInputDate.isValid()\n ? parsedInputDate.toDate()\n : undefined\n setDate(newDate)\n onChange?.(newDate)\n },\n [dateFormat, onChange]\n )\n\n const handleCalendarChange = React.useCallback(\n (newDate) => {\n setDate(newDate)\n\n const mirrorChangeToInputElement = () => {\n if (!inputElRef) return\n\n // Call the `set` function on the input value directly to mirror the change.\n // Props to: https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call(\n inputElRef,\n formatDateToString(newDate, dateFormat)\n )\n const event = new Event('input', { bubbles: true })\n inputElRef.dispatchEvent(event)\n }\n mirrorChangeToInputElement()\n },\n [dateFormat, inputElRef]\n )\n\n const updatedLabels = {\n ...DEFAULT_LABELS,\n ...labels\n }\n\n const [calendarOpen, setCalendarOpen] = React.useState(false)\n\n const refDateToday = React.useRef<HTMLButtonElement>(null)\n const refDateSelected = React.useRef<HTMLButtonElement>(null)\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n return (\n <div className=\"relative h-max\">\n <Input\n name=\"date\"\n disabled={disabled}\n size={size}\n appearance={appearance}\n theme={theme}\n {...(rest as React.ComponentProps<typeof Input>)}\n onChange={handleInputChange}\n ref={setInputElRef}\n defaultValue={dateString}\n />\n <Popover modal open={calendarOpen} onOpenChange={setCalendarOpen}>\n <Popover.Trigger asChild>\n <ActionIcon\n disabled={disabled}\n label={updatedLabels.open}\n size={iconSize}\n theme=\"neutral\"\n hasTooltip={false}\n className=\"absolute top-1/2 right-0 -translate-y-1/2\"\n >\n <Icon is={CalendarEvent} />\n </ActionIcon>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side=\"bottom\"\n align=\"end\"\n showCloseButton={false}\n onOpenAutoFocus={(e) => {\n e.preventDefault()\n if (date) {\n refDateSelected.current?.focus()\n } else {\n refDateToday.current?.focus()\n }\n }}\n className=\"z-1147483646 pr-6\"\n >\n <Calendar\n date={date || new Date()}\n selected={date}\n onDateSelected={async (date) => {\n setCalendarOpen(false)\n await handleCalendarChange(date.date)\n if (revalidate) revalidate()\n }}\n setYear={async (date) => {\n await handleCalendarChange(date)\n if (revalidate) revalidate()\n }}\n minDate={minDate}\n maxDate={maxDate}\n refDateToday={refDateToday}\n refDateSelected={refDateSelected}\n firstDayOfWeek={firstDayOfWeek}\n monthNames={monthNames}\n weekdayNames={weekdayNames}\n labels={updatedLabels}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover>\n </div>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { DateInput, type DateInputProps } from '../date-input/DateInput'\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\n\ntype DateFieldProps = DateInputProps & FieldElementWrapperProps\n\nexport const DateField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: DateFieldProps) => {\n const { register, trigger } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <DateInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n revalidate={trigger}\n />\n </FieldWrapper>\n )\n}\n\nDateField.displayName = 'DateField'\n","import { styled } from '../../styled'\n\nexport const DialogActionBar = styled('div', {\n base: [\n 'border-t',\n 'border-grey-300',\n 'p-4',\n 'flex',\n 'gap-4',\n 'shadow-[0_-6px_6px_-1px_rgba(51,51,51,0.05)]'\n ]\n})\n","import { styled } from '../../styled'\n\nexport const DialogBackground = styled('div', {\n base: ['w-screen', 'h-screen']\n})\n","import { Close } from '@radix-ui/react-dialog'\n\nexport const DialogClose = Close\n","export const backdropOverlay = [\n 'bg-alpha-600',\n 'fixed',\n 'inset-0',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-fade-in',\n 'motion-safe:data-[state=closed]:animate-fade-out'\n]\n","import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Close, Content, Overlay, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { backdropOverlay } from '../../utilities/style/backdrop-overlay'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { DialogBackground } from './DialogBackground'\n\nconst modalOverlayId = 'modal_overlay'\n\nconst StyledDialogOverlay = styled(Overlay, {\n base: backdropOverlay\n})\n\nconst StyledDialogContent = styled(\n Content,\n {\n base: [\n // `transform: translate()` is required for `floating-ui` to\n // correctly position elements within the Dialog component.\n // we can't use the translate property directly\n 'transform-[translate(-50%,-50%)]',\n 'bg-white',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'h-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'overflow-y-auto',\n 'rounded-md',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'z-1147483646',\n 'focus:outline-none',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n xs: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-95'\n ],\n sm: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-120'\n ],\n md: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-150'\n ],\n lg: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-200'\n ],\n xl: [\n 'rounded-md',\n 'size-auto',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'supports-svh:h-auto',\n 'supports-svh:max-h-[90vh]',\n 'w-275'\n ],\n fullscreen: [\n 'rounded-none',\n 'w-screen',\n 'h-screen',\n 'max-w-screen',\n 'max-h-screen',\n 'supports-svh:h-svh',\n 'supports-svh:max-h-svh'\n ]\n },\n layout: {\n panel: ['flex', 'flex-col', 'p-0']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype DialogContentProps = React.ComponentProps<typeof StyledDialogContent> & {\n closeDialogText?: string\n showCloseButton?: boolean\n}\n\nexport const DialogContent = ({\n size = 'sm',\n children,\n closeDialogText = 'Close dialog',\n showCloseButton = true,\n ...rest\n}: DialogContentProps) => (\n <Portal>\n <StyledDialogOverlay id={modalOverlayId}>\n {React.Children.map(children, (child) =>\n React.isValidElement(child) && child.type === DialogBackground\n ? child\n : null\n )}\n <StyledDialogContent\n size={size}\n aria-label=\"Dialog\"\n onPointerDownOutside={(event) => {\n const element = event.target as HTMLElement\n if (element?.id !== modalOverlayId) {\n event.preventDefault()\n }\n }}\n {...rest}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closeDialogText}\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n className=\"absolute top-4 right-4 size-12\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {React.Children.map(children, (child) =>\n React.isValidElement(child) && child.type === DialogBackground\n ? null\n : child\n )}\n </StyledDialogContent>\n </StyledDialogOverlay>\n </Portal>\n)\n","import { styled } from '../../styled'\n\nexport const DialogFooter = styled('footer', {\n base: ['flex', 'justify-end', 'gap-3', 'pt-4']\n})\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Heading, type HeadingProps } from '../heading/Heading'\n\nexport const DialogHeading = ({ className, ...rest }: HeadingProps) => (\n <Heading\n size=\"sm\"\n {...rest}\n className={cn(\n 'border-b',\n 'border-b-grey-200',\n 'pb-8',\n 'pt-0',\n 'px-8',\n 'mb-8',\n '-mx-8',\n 'box-content',\n className\n )}\n />\n)\n","import { styled } from '../../styled'\n\nexport const DialogNavigationBar = styled('div', {\n base: [\n 'flex',\n 'justify-between',\n 'items-center',\n 'border-b',\n 'border-grey-300',\n 'p-4'\n ]\n})\n","import { styled } from '../../styled'\n\nexport const DialogScrollableContent = styled('div', {\n base: ['overflow-scroll', 'flex-1', 'p-4']\n})\n","import { Description, Root, Title, Trigger } from '@radix-ui/react-dialog'\n\nimport { DialogActionBar } from './DialogActionBar'\nimport { DialogBackground } from './DialogBackground'\nimport { DialogClose } from './DialogClose'\nimport { DialogContent } from './DialogContent'\nimport { DialogFooter } from './DialogFooter'\nimport { DialogHeading } from './DialogHeading'\nimport { DialogNavigationBar } from './DialogNavigationBar'\nimport { DialogScrollableContent } from './DialogScrollableContent'\n\nexport const Dialog = /* @__PURE__ */ Object.assign(Root, {\n ActionBar: DialogActionBar,\n Background: DialogBackground,\n Close: DialogClose,\n Content: DialogContent,\n Heading: DialogHeading,\n Footer: DialogFooter,\n NavigationBar: DialogNavigationBar,\n ScrollableContent: DialogScrollableContent,\n\n Description: Description,\n Title: Title,\n Trigger: Trigger\n})\n\nDialog.displayName = 'Dialog'\n","import { Overlay } from '@radix-ui/react-dialog'\n\nimport { styled } from '../../styled'\nimport { backdropOverlay } from '../../utilities/style/backdrop-overlay'\n\nexport const DrawerOverlay = styled(\n Overlay,\n { base: backdropOverlay },\n { enablePolymorphism: false }\n)\n","import { Content, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { DrawerContext } from './Drawer.context'\nimport { DrawerOverlay } from './DrawerOverlay'\n\nexport const StyledContent = styled(Content, {\n base: [\n 'bg-(--base-1)',\n 'shadow-lg',\n 'fixed',\n 'z-1147483646',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n position: {\n top: [\n '[--slide-direction-out-y:-100%]',\n 'top-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n right: [\n '[--slide-direction-out-x:100%]',\n 'right-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ],\n bottom: [\n '[--slide-direction-out-y:100%]',\n 'bottom-0',\n 'left-0',\n 'w-full',\n 'max-h-17/20'\n ],\n left: [\n '[--slide-direction-out-x:-100%]',\n 'left-0',\n 'top-0',\n 'h-full',\n 'w-(--drawer-content-width,100%)',\n 'max-w-full'\n ]\n },\n size: {\n xs: ['[--drawer-content-width:240px]'],\n sm: ['[--drawer-content-width:256px]'],\n md: ['[--drawer-content-width:288px]'],\n lg: ['[--drawer-content-width:304px]'],\n xl: ['[--drawer-content-width:320px]'],\n '2xl': ['[--drawer-content-width:720px]'],\n '3xl': ['[--drawer-content-width:1000px]']\n }\n }\n})\n\nexport const DrawerContent = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledContent>) => {\n const { position } = React.useContext(DrawerContext)\n\n return (\n <Portal>\n <DrawerOverlay />\n <ColorScheme base=\"grey1\" accent=\"primary1\" asChild>\n <StyledContent size=\"lg\" position={position} {...rest} asChild>\n <div className=\"flex flex-col\">{children}</div>\n </StyledContent>\n </ColorScheme>\n </Portal>\n )\n}\n","import * as React from 'react'\n\nimport { StyledContent } from './DrawerContent'\n\ntype DrawerProviderProps = {\n position?: React.ComponentProps<typeof StyledContent>['position']\n}\n\ntype DrawerContext = DrawerProviderProps\n\nexport const DrawerContext = React.createContext<DrawerContext>({\n position: 'left'\n})\n\nexport const DrawerProvider = ({\n position = 'left',\n ...rest\n}: React.PropsWithChildren<DrawerProviderProps>) => {\n const value = React.useMemo<DrawerContext>(() => ({ position }), [position])\n return <DrawerContext.Provider value={value} {...rest} />\n}\n","import { Close } from '@atom-learning/icons'\nimport { Close as DialogClose } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const DrawerClose = ({\n label = 'Close',\n ...props\n}: Omit<React.ComponentProps<typeof ActionIcon>, 'children'>) => (\n <DialogClose asChild>\n <ActionIcon\n theme=\"neutral\"\n appearance=\"simple\"\n size=\"md\"\n hasTooltip={false}\n label={label}\n {...props}\n >\n <Icon is={Close} />\n </ActionIcon>\n </DialogClose>\n)\n","import { styled } from '../../styled'\n\nexport const DrawerFooter = styled('div', {\n base: ['p-4', 'w-full', 'border-t', 'border-t-(--base-3)']\n})\n","import { styled } from '../../styled'\n\nexport const DrawerHeader = styled('div', {\n base: ['p-4', 'w-full', 'min-h-16', 'border-b', 'border-b-(--base-3)']\n})\n","import { styled } from '../../styled'\n\nexport const DrawerMain = styled('div', {\n base: ['p-4', 'w-full', 'grow', 'overflow-y-auto']\n})\n","import { Trigger } from '@radix-ui/react-dialog'\n\nexport const DrawerTrigger = Trigger\n","import { Root } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { DrawerProvider } from './Drawer.context'\nimport { DrawerClose } from './DrawerClose'\nimport { DrawerContent } from './DrawerContent'\nimport { DrawerFooter } from './DrawerFooter'\nimport { DrawerHeader } from './DrawerHeader'\nimport { DrawerMain } from './DrawerMain'\nimport { DrawerTrigger } from './DrawerTrigger'\n\ntype DrawerProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof DrawerProvider>\n\nconst DrawerComponent = ({ children, position, ...rest }: DrawerProps) => (\n <DrawerProvider position={position}>\n <Root {...rest}>{children}</Root>\n </DrawerProvider>\n)\n\nexport const Drawer = /* @__PURE__ */ Object.assign(DrawerComponent, {\n Close: DrawerClose,\n Content: DrawerContent,\n Main: DrawerMain,\n Header: DrawerHeader,\n Footer: DrawerFooter,\n Trigger: DrawerTrigger\n})\n","import { Content } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuContent = styled(\n Content,\n {\n base: [\n 'bg-white',\n 'rounded-sm',\n 'shadow-sm',\n 'py-2',\n 'z-10',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Item } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuItem = styled(\n Item,\n {\n base: [\n 'items-center',\n 'text-grey-1000',\n 'cursor-pointer',\n 'flex',\n 'font-body',\n 'font-normal',\n 'relative',\n 'px-3',\n 'py-2',\n 'data-disabled:cursor-not-allowed',\n 'data-disabled:opacity-30',\n 'data-disabled:pointer-events-none',\n 'aria-[current=page]:before:absolute',\n 'aria-[current=page]:before:border-l-2',\n 'aria-[current=page]:before:border-l-current',\n \"aria-[current=page]:before:content-['']\",\n 'aria-[current=page]:before:h-6',\n 'aria-[current=page]:before:left-0',\n 'aria-[current=page]:before:outline-none',\n 'aria-[current=page]:before:scale-100',\n 'focus:before:absolute',\n 'focus:before:border-l-2',\n 'focus:before:border-l-current',\n \"focus:before:content-['']\",\n 'focus:before:h-6',\n 'focus:before:left-0',\n 'focus:before:outline-none',\n 'focus:before:scale-100',\n 'focus:outline-none',\n 'focus:text-primary-900',\n 'hover:underline'\n ]\n },\n { enablePolymorphism: false }\n)\n","import { Label } from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype DropdownMenuLabelProps = React.ComponentProps<typeof Label>\n\nexport const DropdownMenuLabel = ({\n className,\n ...rest\n}: DropdownMenuLabelProps) => (\n <Text\n as={Label}\n size=\"sm\"\n className={cn('px-3', 'py-2', 'text-text-subtle', className)}\n {...rest}\n />\n)\n\nDropdownMenuLabel.displayName = 'DropdownMenuLabel'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { DropdownMenuItem } from './DropdownMenuItem'\n\nconst StyledLink = styled('a', {\n base: ['no-underline']\n})\n\nexport const DropdownMenuLinkItem = ({\n children,\n href,\n ...rest\n}: React.ComponentProps<typeof DropdownMenuItem> & { href: string }) => (\n <DropdownMenuItem {...rest} asChild>\n <StyledLink href={href} role=\"menuitem\" {...getExternalAnchorProps(href)}>\n {children}\n </StyledLink>\n </DropdownMenuItem>\n)\n","import { Separator } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuSeparator = styled(\n Separator,\n {\n base: ['h-px', 'bg-grey-600', 'my-2']\n },\n { enablePolymorphism: false }\n)\n","import { Trigger } from '@radix-ui/react-dropdown-menu'\n\nimport { styled } from '../../styled'\n\nexport const DropdownMenuTrigger = styled(\n Trigger,\n {\n base: ['disabled:cursor-not-allowed', 'disabled:opacity-30']\n },\n { enablePolymorphism: false }\n)\n","import {\n Group,\n Portal,\n Root as DropdownMenuRoot\n} from '@radix-ui/react-dropdown-menu'\nimport * as React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLabel } from './DropdownMenuLabel'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = /* @__PURE__ */ Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Group: Group,\n Item: DropdownMenuItem,\n Label: DropdownMenuLabel,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n","import { Upload } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport type { StyledComponentProps } from '../../styled'\nimport { Button } from '../button/Button'\nimport { Icon } from '../icon/Icon'\n\n// FileInput always renders the Button as a <label>, so its public props are\n// Button's own props retargeted to the label element\nexport type FileInputProps = Omit<\n StyledComponentProps<typeof Button, 'label'>,\n 'as'\n> & {\n onFileSelect: (selection: FileList | null) => void\n accept?: string\n multiple?: boolean\n}\n\nexport const FileInput = ({\n accept,\n children,\n multiple = false,\n onFileSelect,\n ...rest\n}: FileInputProps) => {\n const handleFileSelect = (event: React.ChangeEvent<HTMLInputElement>) => {\n const { files } = event.target\n\n onFileSelect(files)\n }\n\n return (\n <Button as=\"label\" {...rest}>\n <Icon is={Upload} />\n {children}\n <input\n type=\"file\"\n onChange={handleFileSelect}\n accept={accept}\n multiple={multiple}\n hidden\n />\n </Button>\n )\n}\n\nFileInput.displayName = 'FileInput'\n","import { styled } from '../../styled'\n\nexport const Flex = styled(\n 'div',\n {\n base: ['flex'],\n variants: {\n direction: {\n row: ['flex-row'],\n 'row-reverse': ['flex-row-reverse'],\n column: ['flex-col'],\n 'column-reverse': ['flex-col-reverse'],\n inherit: ['direction-[inherit]'],\n initial: ['direction-[initial]'],\n revert: ['direction-[revert]'],\n 'revert-layer': ['direction-[revert-layer]'],\n unset: ['direction-[unset]']\n },\n wrap: {\n nowrap: ['flex-nowrap'],\n wrap: ['flex-wrap'],\n 'wrap-reverse': ['flex-wrap-reverse'],\n inherit: ['[flex-wrap:inherit]'],\n initial: ['[flex-wrap:initial]'],\n revert: ['[flex-wrap:revert]'],\n 'revert-layer': ['[flex-wrap:revert-layer]'],\n unset: ['[flex-wrap:unset]']\n },\n justify: {\n normal: ['justify-normal'],\n unsafe: ['[justify-content:unsafe]'],\n safe: ['[justify-content:safe]'],\n start: ['justify-start'],\n center: ['justify-center'],\n end: ['justify-end'],\n 'flex-start': ['justify-start'],\n 'flex-end': ['justify-end'],\n left: ['[justify-content:left]'],\n right: ['[justify-content:right]'],\n 'space-between': ['justify-between'],\n 'space-around': ['justify-around'],\n 'space-evenly': ['justify-evenly'],\n stretch: ['justify-stretch'],\n inherit: ['[justify-content:inherit]'],\n initial: ['[justify-content:initial]'],\n revert: ['[justify-content:revert]'],\n 'revert-layer': ['[justify-content:revert-layer]'],\n unset: ['[justify-content:unset]']\n },\n align: {\n normal: ['[align-items:normal]'],\n unsafe: ['[align-items:unsafe]'],\n safe: ['[align-items:safe]'],\n center: ['items-center'],\n start: ['items-start'],\n end: ['items-end'],\n 'self-start': ['[align-items:self-start]'],\n 'self-end': ['[align-items:self-end]'],\n 'flex-start': ['items-start'],\n 'flex-end': ['items-end'],\n baseline: ['items-baseline'],\n 'first baseline': ['[align-items:first baseline]'],\n 'last baseline': ['[align-items:last baseline]'],\n stretch: ['items-stretch'],\n inherit: ['[align-items:inherit]'],\n initial: ['[align-items:initial]'],\n revert: ['[align-items:revert]'],\n 'revert-layer': ['[align-items:revert-layer]'],\n unset: ['[align-items:unset]']\n },\n gap: {\n 0: ['gap-0.5'],\n 1: ['gap-1'],\n 2: ['gap-2'],\n 3: ['gap-3'],\n 4: ['gap-4'],\n 24: ['gap-6'],\n 5: ['gap-8'],\n 6: ['gap-10'],\n 7: ['gap-12'],\n 8: ['gap-16'],\n 9: ['gap-20']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nFlex.displayName = 'Flex'\n","import * as React from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Mode,\n SubmitErrorHandler,\n SubmitHandler,\n UseFormMethods\n} from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\n\nimport {\n type FormCustomContextType,\n FormCustomContext\n} from './useFormCustomContext'\n\ntype FormProps<TFormData extends FieldValues> = Omit<\n React.HTMLAttributes<HTMLFormElement>,\n 'onSubmit' | 'onError' | 'children'\n> & {\n defaultValues?: DefaultValues<TFormData>\n validationMode?: Mode\n onSubmit: SubmitHandler<TFormData>\n onError?: SubmitErrorHandler<TFormData>\n noValidate?: boolean\n children:\n | React.ReactNode\n | ((methods: UseFormMethods<TFormData>) => React.ReactNode)\n}\n\nexport const Form = <TFormData extends FieldValues>(\n props: FormProps<TFormData> & FormCustomContextType\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n appearance,\n theme,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n return (\n <FormProvider {...methods}>\n <FormCustomContext.Provider value={{ appearance, theme }}>\n <form\n aria-label=\"form\"\n onSubmit={methods.handleSubmit(onSubmit, onError)}\n {...rest}\n >\n {typeof children === 'function' ? children(methods) : children}\n </form>\n </FormCustomContext.Provider>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\n\nconst GridContainer = styled(\n 'div',\n {\n base: ['grid'],\n variants: {\n gap: {\n 0: ['gap-0.5'],\n 1: ['gap-1'],\n 2: ['gap-2'],\n 3: ['gap-3'],\n 4: ['gap-4'],\n 24: ['gap-6'],\n 5: ['gap-8'],\n 6: ['gap-10'],\n 7: ['gap-12'],\n 8: ['gap-16'],\n 9: ['gap-20']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype GridProps = React.ComponentProps<typeof GridContainer> & {\n minItemSize?: string\n maxItemSize?: string\n}\n\nexport const Grid = ({\n className,\n style,\n gap = '2',\n minItemSize,\n maxItemSize = '1fr',\n ...rest\n}: GridProps) => (\n <GridContainer\n {...rest}\n style={{\n ...style,\n ...(minItemSize && { '--min-item-size': minItemSize }),\n ...(maxItemSize && { '--max-item-size': maxItemSize })\n }}\n gap={gap}\n className={cn(\n minItemSize && [\n 'grid-cols-[repeat(auto-fit,minmax(var(--min-item-size,0),var(--max-item-size,0)))]'\n ],\n className\n )}\n />\n)\n\nGrid.displayName = 'Grid'\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Input, type InputProps } from '../input/Input'\n\ntype InputFieldProps = InputProps & FieldElementWrapperProps\n\nexport const InputField = ({\n className,\n label,\n name,\n validation,\n prompt,\n description,\n hideLabel,\n appearance,\n theme,\n ...rest\n}: InputFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Input\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nInputField.displayName = 'InputField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const StyledLi = styled('li', {\n base: ['last:mb-0', 'not-last:mb-2']\n})\n\nexport const StyledList = styled('ul', {\n base: ['list-inside', 'font-body'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n ordered: {\n true: [\n 'pl-4',\n 'list-decimal',\n '[&_>_li]:pl-1',\n '[&_>_li::marker]:font-medium',\n '[&_>_li::marker]:text-sm'\n ],\n false: ['pl-3', 'list-disc', '[&_>_li]:pl-2']\n },\n theme: {\n primary: ['marker:text-primary-800']\n }\n }\n})\n\ntype ListProps = React.ComponentProps<typeof StyledList> & {\n ordered?: boolean\n}\n\nconst ListComponent = ({\n ref,\n size = 'md',\n noCapsize = true,\n ordered = false,\n ...rest\n}: ListProps) => (\n <StyledList\n ref={ref}\n as={ordered ? 'ol' : 'ul'}\n ordered={ordered}\n size={size}\n noCapsize={noCapsize}\n {...rest}\n />\n)\n\nexport const List = /* @__PURE__ */ Object.assign(ListComponent, {\n Item: StyledLi\n})\n","import type { Code } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownCodeProps = {\n node: Code\n}\n\nconst StyledMarkdownCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-md',\n 'text-grey-1000',\n 'font-mono',\n 'text-sm/[1.4]',\n 'my-4',\n 'p-3'\n ]\n})\n\nexport const MarkdownCode = ({ node }: MarkdownCodeProps) => (\n <StyledMarkdownCode as=\"pre\">{node.value}</StyledMarkdownCode>\n)\n","import type { Content, Emphasis } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownEmphasisProps = {\n node: Emphasis\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const StyledMarkdownEmphasis = styled('em', {\n base: ['italic']\n})\n\nexport const MarkdownEmphasis = ({\n node,\n handleNode\n}: MarkdownEmphasisProps) => (\n <StyledMarkdownEmphasis>\n {node.children?.map(handleNode)}\n </StyledMarkdownEmphasis>\n)\n","import type { Content, Heading as HeadingType } from 'mdast'\nimport * as React from 'react'\n\nimport { Heading, type HeadingProps } from '../../heading/Heading'\n\ntype MarkdownHeadingProps = {\n node: HeadingType\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nconst getHeadingProps = (depth: number): HeadingProps => {\n switch (depth) {\n case 1:\n return { size: 'xl', as: 'h1' }\n case 2:\n return { size: 'lg', as: 'h2' }\n case 3:\n return { size: 'md', as: 'h3' }\n case 4:\n return { size: 'sm', as: 'h4' }\n case 5:\n return { size: 'xs', as: 'h5' }\n default:\n return { size: 'xs', as: 'h6' }\n }\n}\n\nexport const MarkdownHeading = ({\n node,\n handleNode,\n ...rest\n}: MarkdownHeadingProps) => {\n const { as, size } = getHeadingProps(node.depth)\n\n return (\n <Heading as={as} size={size} {...rest}>\n {node.children?.map(handleNode)}\n </Heading>\n )\n}\n","import type { Image as ImageType } from 'mdast'\nimport * as React from 'react'\n\nimport { Image } from '../../image/Image'\n\ntype MarkdownImageProps = {\n node: ImageType\n className?: string\n}\n\nexport const MarkdownImage = ({ node, className }: MarkdownImageProps) => (\n <Image src={node.url} alt={node.alt ?? undefined} className={className} />\n)\n","import type { InlineCode } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownInlineCodeProps = {\n node: InlineCode\n}\n\nconst StyledMarkdownInlineCode = styled('div', {\n base: [\n 'bg-grey-200',\n 'rounded-sm',\n 'text-grey-1000',\n 'inline-block',\n 'font-mono',\n 'text-[85%]',\n 'px-1',\n 'py-0.5'\n ]\n})\n\nexport const MarkdownInlineCode = ({ node }: MarkdownInlineCodeProps) => (\n <StyledMarkdownInlineCode as=\"code\">{node.value}</StyledMarkdownInlineCode>\n)\n","import type { Content, Link as LinkType } from 'mdast'\nimport * as React from 'react'\n\nimport { Link } from '../../link/Link'\n\ntype MarkdownLinkProps = {\n node: LinkType\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const MarkdownLink = ({ node, handleNode }: MarkdownLinkProps) => (\n <Link title={node.title ?? undefined} href={node.url}>\n {node.children?.map(handleNode)}\n </Link>\n)\n","import type { Content, List as ListType } from 'mdast'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { List } from '../../list/List'\n\ntype MarkdownListProps = {\n node: ListType\n handleNode: (node: Content) => React.ReactElement<unknown>\n className?: string\n}\n\nexport const MarkdownList = ({\n node,\n handleNode,\n className\n}: MarkdownListProps) => (\n <List\n ordered={node.ordered || undefined}\n className={cn(\n '[&_p]:inline',\n '[&_p]:before:hidden',\n '[&_p]:after:hidden',\n className\n )}\n >\n {node.children?.map(handleNode)}\n </List>\n)\n","import type { Content, ListItem } from 'mdast'\nimport * as React from 'react'\n\nimport { List } from '../../list/List'\n\ntype MarkdownListItemProps = {\n node: ListItem\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const MarkdownListItem = ({\n node,\n handleNode\n}: MarkdownListItemProps) => (\n <List.Item>{node.children?.map(handleNode)}</List.Item>\n)\n","import type { Content, Paragraph } from 'mdast'\nimport * as React from 'react'\n\nimport { Text } from '../../text/Text'\n\ntype MarkdownParagraphProps = {\n node: Paragraph\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nexport const MarkdownParagraph = ({\n node,\n handleNode,\n ...rest\n}: MarkdownParagraphProps) => (\n <Text {...rest}>{node.children?.map(handleNode)}</Text>\n)\n","import type { Content, Strong } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownStrongProps = {\n node: Strong\n handleNode: (node: Content) => React.ReactElement<unknown>\n}\n\nconst StyledMarkdownStrong = styled('strong', {\n base: ['font-semibold']\n})\n\nexport const MarkdownStrong = ({ node, handleNode }: MarkdownStrongProps) => (\n <StyledMarkdownStrong>{node.children?.map(handleNode)}</StyledMarkdownStrong>\n)\n","import type { Text as TextType } from 'mdast'\nimport * as React from 'react'\n\ntype MarkdownTextProps = {\n node: TextType\n}\n\nexport const MarkdownText = ({ node }: MarkdownTextProps): React.ReactNode =>\n node.value\n","import * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { Divider } from '../../divider/Divider'\n\ntype MarkdownThematicBreakProps = {\n className?: string\n}\n\nexport const MarkdownThematicBreak = ({\n className\n}: MarkdownThematicBreakProps) => (\n <Divider className={cn('w-full', className)} />\n)\n","import directive from 'mdast-util-directive'\nimport fromMarkdown from 'mdast-util-from-markdown'\nimport syntax from 'micromark-extension-directive'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { MarkdownCode } from './components/MarkdownCode'\nimport { MarkdownEmphasis } from './components/MarkdownEmphasis'\nimport { MarkdownHeading } from './components/MarkdownHeading'\nimport { MarkdownImage } from './components/MarkdownImage'\nimport { MarkdownInlineCode } from './components/MarkdownInlineCode'\nimport { MarkdownLink } from './components/MarkdownLink'\nimport { MarkdownList } from './components/MarkdownList'\nimport { MarkdownListItem } from './components/MarkdownListItem'\nimport { MarkdownParagraph } from './components/MarkdownParagraph'\nimport { MarkdownStrong } from './components/MarkdownStrong'\nimport { MarkdownText } from './components/MarkdownText'\nimport { MarkdownThematicBreak } from './components/MarkdownThematicBreak'\n\ntype HandleNode = (node) => React.JSX.Element | null\n\nconst StyledMarkdownContent = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-8',\n '[&>h1]:max-w-[65ch]',\n '[&>h2]:max-w-[65ch]',\n '[&>h3]:max-w-[65ch]',\n '[&>h4]:max-w-[65ch]',\n '[&>p]:max-w-[75ch]',\n '[&>ul]:max-w-[75ch]'\n ]\n})\n\ntype MarkdownContentProps = React.ComponentProps<\n typeof StyledMarkdownContent\n> & {\n content: string\n customComponents?: {\n [key: string]: (props: {\n node: any\n handleNode: HandleNode\n }) => React.JSX.Element\n }\n}\n\nconst defaultComponentsMap = {\n code: MarkdownCode,\n emphasis: MarkdownEmphasis,\n heading: MarkdownHeading,\n inlineCode: MarkdownInlineCode,\n image: MarkdownImage,\n link: MarkdownLink,\n list: MarkdownList,\n listItem: MarkdownListItem,\n paragraph: MarkdownParagraph,\n strong: MarkdownStrong,\n text: MarkdownText,\n thematicBreak: MarkdownThematicBreak\n}\n\nconst generateNodeKey = (node) => {\n if (node.position?.start) {\n const { line, column, offset } = node.position.start\n return `${node.type}${line}${column}${offset}`\n }\n\n return `${node.type}${+new Date()}`\n}\n\nexport const MarkdownContent = ({\n content,\n customComponents = {},\n className\n}: MarkdownContentProps) => {\n const AST = fromMarkdown(content, {\n extensions: [syntax()],\n mdastExtensions: [directive.fromMarkdown]\n })\n\n const componentsMap = {\n ...defaultComponentsMap,\n ...customComponents\n }\n\n const handleNode: HandleNode = (node) => {\n const MarkdownComponent = componentsMap[node.type]\n\n return MarkdownComponent ? (\n <MarkdownComponent\n key={generateNodeKey(node)}\n node={node}\n handleNode={handleNode}\n />\n ) : null\n }\n\n return (\n <StyledMarkdownContent className={className}>\n {AST.children.map(handleNode)}\n </StyledMarkdownContent>\n )\n}\n\nMarkdownContent.displayName = 'MarkdownContent'\n","const light = {\n '--text': 'var(--color-text-subtle)',\n '--text-hover': 'var(--color-grey-1000)',\n '--text-active': 'var(--color-grey-1000)',\n '--text-selected': 'var(--color-primary-800)',\n '--text-selected-hover': 'var(--color-primary-800)',\n '--text-selected-pressed': 'var(--color-primary-800)',\n '--text-selected-focus': 'var(--color-primary-800)',\n '--background': 'white',\n '--background-hover': 'var(--color-grey-100)',\n '--background-active': 'var(--color-grey-200)',\n '--background-selected': 'var(--color-primary-100)',\n '--background-selected-hover': 'var(--color-grey-100)',\n '--background-selected-pressed': 'var(--color-grey-200)',\n '--item-text-selected': 'var(--color-grey-900)',\n '--item-background-selected': 'var(--color-grey-900)',\n '--trigger-background-open': 'var(--color-grey-200)',\n '--dropdown-background': 'white'\n}\n\nexport const colorSchemes = {\n light\n}\n","import * as React from 'react'\n\ninterface NavigationMenuContextValue {\n onNodeUpdate: (\n trigger: HTMLButtonElement,\n itemValue: string\n ) => HTMLButtonElement\n}\n\nexport const NavigationMenuContext = React.createContext<\n NavigationMenuContextValue | undefined\n>(undefined)\n\nexport const useNavigationMenuContext = (): NavigationMenuContextValue => {\n const context = React.useContext(NavigationMenuContext)\n\n if (context === undefined) {\n throw new Error(\n 'useNavigationMenuContext must be used within a NavigationMenuContextProvider'\n )\n }\n\n return context\n}\n","/*\nUsed to block default radix hover to open menu behaviour\nProps: https://github.com/radix-ui/primitives/issues/1630\n*/\nexport const preventEvent = (\n event: React.PointerEvent | Event | React.SyntheticEvent\n): void => {\n const e = event as Event\n e.preventDefault()\n}\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\n\nconst StyledContent = styled(NavigationMenuPrimitive.Content, {\n base: ['p-3', 'bg-(--dropdown-background)', 'mt-1', 'shadow-md', 'rounded-md']\n})\n\ntype NavigationMenuDropdownContentProps = React.ComponentProps<\n typeof StyledContent\n>\n\nexport const NavigationMenuDropdownContent = ({\n children,\n ...rest\n}: NavigationMenuDropdownContentProps) => (\n <StyledContent\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n {...rest}\n >\n <ul>{children}</ul>\n </StyledContent>\n)\n\nNavigationMenuDropdownContent.displayName = 'NavigationMenuDropdownContent'\n","export const navigationMenuBaseItemStyles = [\n 'relative',\n 'text-(--text)',\n 'outline-none',\n 'cursor-pointer',\n 'font-body',\n 'select-none',\n 'p-3',\n 'rounded-md',\n 'bg-(--background)',\n 'hover:bg-(--background-hover)',\n 'hover:text-(--text-hover)',\n 'active:bg-(--background-active)',\n 'active:text-(--text-active)',\n 'focus-visible:inset-shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-[30%]',\n 'disabled:text-(--text)'\n]\n\nexport const navigationMenuActiveItemStyles = [\n 'font-semibold',\n 'text-item-(--background-selected)',\n 'after:-translate-x-1/2',\n 'after:absolute',\n 'after:bg-item-(--background-selected)',\n 'after:block',\n 'after:bottom-0',\n 'after:h-0.5',\n 'after:left-1/2',\n 'after:rounded-md',\n 'after:translate-y-0',\n 'after:w-6'\n]\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\nimport { Icon } from '../icon/Icon'\nimport {\n navigationMenuActiveItemStyles,\n navigationMenuBaseItemStyles\n} from './NavigationMenu.styles'\n\nconst StyledTrigger = styled(NavigationMenuPrimitive.Trigger, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'flex',\n 'items-center',\n 'rounded-md',\n 'justify-between',\n 'data-[state=open]:bg-(--trigger-background-open)'\n ],\n variants: {\n active: {\n true: navigationMenuActiveItemStyles\n }\n }\n})\n\nexport const NavigationMenuDropdownTrigger = ({\n ref,\n children,\n active,\n ...rest\n}: React.ComponentProps<typeof StyledTrigger>) => (\n <StyledTrigger\n active={active}\n {...rest}\n ref={ref}\n onPointerMove={preventEvent}\n onPointerLeave={preventEvent}\n >\n {children}\n <Icon\n is={ChevronDown}\n size=\"sm\"\n className={cn(\n 'ml-1',\n 'in-data-[state=open]:-rotate-180',\n 'motion-safe:duration-200',\n 'motion-safe:ease-in',\n 'motion-safe:transition-transform'\n )}\n />\n </StyledTrigger>\n)\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React, { type ComponentProps, type ReactElement } from 'react'\n\nimport { useNavigationMenuContext } from './NavigationMenu.context'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\n\ntype NavigationMenuDropdownProps = {\n active?: boolean\n className?: string\n id: string\n} & React.HTMLProps<HTMLButtonElement>\n\ntype DropdownTriggerProps = ComponentProps<typeof NavigationMenuDropdownTrigger>\n\nexport const NavigationMenuDropdown = ({\n children,\n id,\n ...rest\n}: NavigationMenuDropdownProps) => {\n const { onNodeUpdate } = useNavigationMenuContext()\n\n return (\n <NavigationMenuPrimitive.Item value={id}>\n {React.Children.map(children, (child) => {\n const isTrigger =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownTrigger\n const isContent =\n React.isValidElement(child) &&\n child.type === NavigationMenuDropdownContent\n\n if (!isTrigger && !isContent) {\n throw new Error(\n 'Only NavigationMenu.Trigger and NavigationMenu.Content can be the passed as a \"children\" of NavigationMenu.Dropdown'\n )\n }\n return isTrigger\n ? React.cloneElement(\n child as ReactElement<DropdownTriggerProps>,\n {\n ...rest,\n ref: (node: HTMLButtonElement) => {\n onNodeUpdate(node, id)\n }\n } as React.PropsWithRef<DropdownTriggerProps>\n )\n : child\n })}\n </NavigationMenuPrimitive.Item>\n )\n}\n\nNavigationMenuDropdown.displayName = 'NavigationMenuDropdown'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { navigationMenuBaseItemStyles } from './NavigationMenu.styles'\n\nconst DisabledButton = styled('button', {\n base: [\n ...navigationMenuBaseItemStyles,\n 'disabled:bg-none',\n 'disabled:cursor-default',\n 'disabled:opacity-30',\n 'disabled:text-text'\n ]\n})\n\nconst ListItem = NavigationMenuPrimitive.Item\n\nconst StyledLink = styled(NavigationMenuPrimitive.Link, {\n base: [\n ...navigationMenuBaseItemStyles,\n 'block',\n 'no-underline',\n 'leading-none'\n ],\n variants: {\n elementType: {\n dropdownItem: [\n 'data-active:bg-background-selected',\n 'data-active:text-text-selected',\n 'data-active:hover:bg-background-selected-hover',\n 'data-active:hover:text-text-selected-hover',\n 'data-active:active:bg-background-selected-pressed',\n 'data-active:active:text-text-selected-pressed',\n 'data-active:focus-visible:shadow-[0_0_0_2px_var(--color-primary-800)]',\n 'data-active:focus-visible:text-text-selected-focus'\n ],\n link: [\n 'data-active:font-semibold',\n 'data-active:text-item-(--background-selected)',\n 'data-active:after:-translate-x-1/2',\n 'data-active:after:absolute',\n 'data-active:after:bg-item-(--background-selected)',\n 'data-active:after:block',\n 'data-active:after:bottom-0',\n 'data-active:after:h-0.5',\n 'data-active:after:left-1/2',\n 'data-active:after:rounded-md',\n 'data-active:after:translate-y-0',\n 'data-active:after:w-6'\n ]\n }\n }\n})\n\nexport const NavigationMenuLink = ({\n ref,\n children,\n href,\n disabled,\n className,\n variant = 'link',\n ...rest\n}: Omit<React.ComponentProps<typeof StyledLink>, 'elementType'> & {\n disabled?: boolean\n variant?: React.ComponentProps<typeof StyledLink>['elementType']\n ref?: React.Ref<HTMLAnchorElement>\n}) => (\n <ListItem>\n {disabled ? (\n <DisabledButton disabled className={className}>\n {children}\n </DisabledButton>\n ) : (\n <StyledLink\n href={href}\n ref={ref}\n elementType={variant}\n className={className}\n {...getExternalAnchorProps(href)}\n {...rest}\n >\n {children}\n </StyledLink>\n )}\n </ListItem>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nexport const NavigationMenuDropdownItem = ({\n ref,\n ...props\n}: React.PropsWithChildren<\n React.ComponentProps<typeof NavigationMenuLink>\n>) => <NavigationMenuLink ref={ref} variant=\"dropdownItem\" {...props} />\n\nexport const NavigationMenuDropdownItemTitle = styled(Text, {\n base: ['text-grey-900', 'font-semibold']\n})\n\nNavigationMenuDropdownItemTitle.displayName = 'NavigationMenuDropdownItemTitle'\n","import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { colorSchemes as navigationMenuColorSchemes } from './NavigationMenu.colorscheme.config'\nimport { NavigationMenuContext } from './NavigationMenu.context'\nimport { NavigationMenuDropdown } from './NavigationMenuDropdown'\nimport { NavigationMenuDropdownContent } from './NavigationMenuDropdownContent'\nimport {\n NavigationMenuDropdownItem,\n NavigationMenuDropdownItemTitle\n} from './NavigationMenuDropdownItem'\nimport { NavigationMenuDropdownTrigger } from './NavigationMenuDropdownTrigger'\nimport { NavigationMenuLink } from './NavigationMenuLink'\n\nconst StyledMenu = styled(NavigationMenuPrimitive.Root, {\n base: ['flex', 'justify-center', 'relative']\n})\n\nconst StyledList = styled(NavigationMenuPrimitive.List, {\n base: ['flex', 'justify-center', 'items-center', 'gap-1', 'list-none']\n})\n\nconst StyledViewport = styled(NavigationMenuPrimitive.Viewport, {\n base: ['z-2147483647']\n})\n\nconst ViewportPosition = styled('div', {\n base: ['absolute', 'left-0', 'top-full', 'w-full', 'flex', 'justify-center']\n})\n\nconst NavigationMenuComponent = ({\n children,\n className,\n ...rest\n}: React.ComponentProps<typeof StyledMenu>) => {\n const [offset, setOffset] = React.useState<number | null | undefined>()\n const [activeItem, setActiveItem] = React.useState<string | undefined>()\n const [listWidth, setListWidth] = React.useState(0)\n const listRef = React.useRef<HTMLUListElement>(null)\n\n React.useLayoutEffect(() => {\n if (listRef.current) {\n setListWidth(listRef.current.offsetWidth)\n }\n }, [React.Children.toArray(children).length])\n\n React.useEffect(() => {\n let timer: ReturnType<typeof setTimeout>\n\n // Delay transitioning back to initial position\n // to allow enough time for fadeOut animation to complete\n if (activeItem === '') {\n timer = setTimeout(() => setOffset(null), 200)\n }\n\n return () => {\n if (timer !== null) {\n clearTimeout(timer)\n }\n }\n }, [activeItem])\n\n // https://github.com/radix-ui/primitives/issues/1462\n const onNodeUpdate = (trigger: HTMLButtonElement, itemValue: string) => {\n if (trigger && listWidth && activeItem === itemValue) {\n const listCenter = listWidth / 2\n\n const triggerOffsetRight =\n listWidth -\n trigger.offsetLeft -\n trigger.offsetWidth +\n trigger.offsetWidth / 2\n\n setOffset(Math.round(listCenter - triggerOffsetRight))\n }\n\n return trigger\n }\n\n return (\n <NavigationMenuContext.Provider value={{ onNodeUpdate }}>\n <StyledMenu\n className={cn(className)}\n style={navigationMenuColorSchemes['light']}\n onValueChange={setActiveItem}\n {...rest}\n >\n <StyledList ref={listRef}>{children}</StyledList>\n <ViewportPosition>\n <StyledViewport\n style={{ '--navigation-menu-viewport-offset': `${offset || 0}px` }}\n className={cn([\n 'data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-fade-out',\n 'translate-x-(--navigation-menu-viewport-offset)'\n ])}\n />\n </ViewportPosition>\n </StyledMenu>\n </NavigationMenuContext.Provider>\n )\n}\n\nexport const NavigationMenu = /* @__PURE__ */ Object.assign(\n NavigationMenuComponent,\n {\n Link: NavigationMenuLink,\n Dropdown: NavigationMenuDropdown,\n DropdownContent: NavigationMenuDropdownContent,\n DropdownItem: NavigationMenuDropdownItem,\n DropdownItemTitle: NavigationMenuDropdownItemTitle,\n DropdownTrigger: NavigationMenuDropdownTrigger\n }\n)\n\nNavigationMenuComponent.displayName = 'NavigationMenu'\n","const light = {\n '--text': 'var(--foreground)',\n '--background': 'var(--base-1)',\n '--background-hover': 'var(--base-2)',\n '--background-active': 'var(--base-3)',\n '--text-selected': 'var(--accent-9)',\n '--background-selected': 'var(--accent-2)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import { Item } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the `value` prop does nothing, so removing it from typescript\n */\ntype NavigationMenuVerticalItemProps = Omit<\n React.ComponentProps<typeof Item>,\n 'value'\n>\n\nexport const NavigationMenuVerticalItem = (\n props: NavigationMenuVerticalItemProps\n) => (\n <Item\n className={cn(\n '[ul_li_&]:[--navigation-menu-vertical-item-pl:--spacing(8)]',\n '[ul_li_&_&]:[--navigation-menu-vertical-item-pl:--spacing(12)]',\n '[ul_li_&_&_&]:[--navigation-menu-vertical-item-pl:--spacing(16)]'\n )}\n {...props}\n />\n)\n","import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { useCallbackRef } from '../../utilities/hooks/useCallbackRef'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\n\ntype NavigationMenuVerticalAccordionContextValue = {\n triggerRef?: React.MutableRefObject<HTMLElement | null>\n setTriggerRef?: (HTMLElement) => void\n}\nexport const NavigationMenuVerticalAccordionContext =\n React.createContext<NavigationMenuVerticalAccordionContextValue>({})\nconst NavigationMenuVerticalAccordionProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n return (\n <NavigationMenuVerticalAccordionContext.Provider\n value={{ triggerRef, setTriggerRef }}\n >\n {children}\n </NavigationMenuVerticalAccordionContext.Provider>\n )\n}\n\ntype NavigationMenuVerticalAccordionProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof NavigationMenuVerticalItem>\nexport const NavigationMenuVerticalAccordion = ({\n defaultOpen,\n open,\n onOpenChange,\n disabled,\n ...rest\n}: NavigationMenuVerticalAccordionProps) => {\n const collapsibleProps = { defaultOpen, open, onOpenChange, disabled }\n return (\n <NavigationMenuVerticalAccordionProvider>\n <Root {...collapsibleProps} asChild>\n <NavigationMenuVerticalItem {...rest} />\n </Root>\n </NavigationMenuVerticalAccordionProvider>\n )\n}\n","import { List } from '@radix-ui/react-navigation-menu'\n\nimport { styled } from '../../styled'\n\nconst StyledList = styled(List, {\n base: [\n '[--navigation-menu-vertical-item-pl:--spacing(4)]',\n '*:not-first:mt-0.5'\n ]\n})\n\nexport const NavigationMenuVerticalList = StyledList\n","import { Content } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\n\nconst StyledNavigationMenuVerticalAccordionContent = Content\n\ntype NavigationMenuVerticalAccordionContentProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionContent\n> &\n React.ComponentProps<typeof NavigationMenuVerticalList>\n\nexport const NavigationMenuVerticalAccordionContent = ({\n children,\n ...rest\n}: NavigationMenuVerticalAccordionContentProps) => {\n const { triggerRef } = React.useContext(\n NavigationMenuVerticalAccordionContext\n )\n\n const handleOnKeydown = (e) => {\n if (!triggerRef?.current) return\n if (e.key === 'Escape') {\n e.stopPropagation()\n e.preventDefault()\n triggerRef.current.focus()\n triggerRef.current.click()\n }\n }\n\n return (\n <StyledNavigationMenuVerticalAccordionContent\n onKeyDown={handleOnKeydown}\n {...rest}\n >\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledNavigationMenuVerticalAccordionContent>\n )\n}\n","export const navigationMenuVerticalItemStyles = [\n '[--navigation-menu-vertical-item-font-weight:400]',\n 'data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]',\n 'border-none',\n 'outline-none',\n 'bg-none',\n 'decoration-[inherit]',\n 'cursor-pointer',\n 'rounded-md',\n 'flex',\n 'items-center',\n 'p-2',\n 'pl-(--navigation-menu-vertical-item-pl)',\n 'w-full',\n 'text-(--text)',\n 'bg-(--background)',\n 'disabled:cursor-not-allowed',\n '[text-decoration:unset]',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--background-active)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--background-hover)',\n 'data-active:bg-(--background-selected)',\n 'data-active:text-(--text-selected)',\n 'data-active:[--navigation-menu-vertical-item-font-weight:600]'\n]\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nconst StyledNavigationMenuVerticalIcon = styled(Icon, {\n base: ['self-start']\n})\n\nexport const NavigationMenuVerticalIcon = (\n props: React.ComponentProps<typeof StyledNavigationMenuVerticalIcon>\n) => <StyledNavigationMenuVerticalIcon size=\"md\" {...props} />\n","import * as React from 'react'\n\nexport const SideBarContext = React.createContext<{\n isExpanded?: boolean\n}>({\n isExpanded: undefined\n})\n\nexport const useSidebarState = () => React.useContext(SideBarContext)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useSidebarState } from '../side-bar/SideBar.context'\nimport { Text } from '../text/Text'\n\nconst StyledNavigationMenuVerticalText = styled(Text, {\n base: [\n 'font-(--navigation-menu-vertical-item-font-weight)',\n 'w-max',\n 'max-w-40',\n 'text-left',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[opacity,translate]'\n ],\n variants: {\n isExpanded: {\n true: ['opacity-100', 'motion-safe:translate-0'],\n false: ['opacity-0', 'motion-safe:translate-x-2']\n }\n }\n})\n\ntype StyledNavigationMenuVerticalTextProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalText\n>\n\nexport const NavigationMenuVerticalText = (\n props: StyledNavigationMenuVerticalTextProps\n) => {\n const { isExpanded } = useSidebarState()\n\n return (\n <StyledNavigationMenuVerticalText\n size=\"md\"\n as=\"span\"\n {...props}\n isExpanded={isExpanded}\n />\n )\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\ntype NavigationMenuVerticalItemContentProps = React.ComponentProps<'div'>\n\nexport const NavigationMenuVerticalItemContent = ({\n children,\n className,\n ...rest\n}: NavigationMenuVerticalItemContentProps) => (\n <div className={cn('flex', 'gap-2', 'items-center', className)} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return (\n <NavigationMenuVerticalText>{child}</NavigationMenuVerticalText>\n )\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <NavigationMenuVerticalIcon {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport { Link } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalAccordionTrigger = styled(Trigger, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\nconst StyledIcon = styled(Icon, {\n base: [\n 'transition-transform',\n 'duration-300',\n '[[data-state=open]>&]:rotate-180'\n ]\n})\n\ntype NavigationMenuAccordionTriggerProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionTrigger\n>\n\nexport const NavigationMenuVerticalAccordionTrigger = ({\n children,\n ...rest\n}: NavigationMenuAccordionTriggerProps) => {\n const { setTriggerRef } = React.useContext(\n NavigationMenuVerticalAccordionContext\n )\n\n return (\n <Link asChild>\n <StyledNavigationMenuVerticalAccordionTrigger size=\"lg\" {...rest} asChild>\n <button\n type=\"button\"\n className=\"flex items-center justify-between gap-3\"\n ref={setTriggerRef}\n >\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n <StyledIcon size=\"sm\" is={ChevronDown} />\n </button>\n </StyledNavigationMenuVerticalAccordionTrigger>\n </Link>\n )\n}\n","import { Link } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { preventEvent } from '../../utilities/event/preventEvent'\nimport { getExternalAnchorProps } from '../../utilities/uri'\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalLink = styled(Link, {\n base: navigationMenuVerticalItemStyles,\n variants: {\n size: {\n md: ['min-h-10'],\n lg: ['min-h-12']\n }\n }\n})\n\ntype NavigationMenuVerticalItemProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalLink\n>\n\nexport const NavigationMenuVerticalLink = ({\n as,\n href,\n children,\n ...rest\n}: NavigationMenuVerticalItemProps) => {\n const Component = (as || (href ? 'a' : 'button')) as React.ElementType\n const componentProps = as\n ? {}\n : href\n ? getExternalAnchorProps(href)\n : { type: 'button' }\n\n return (\n <NavigationMenuVerticalItem>\n <StyledNavigationMenuVerticalLink\n size=\"lg\"\n href={href}\n {...rest}\n {...componentProps}\n onSelect={preventEvent}\n asChild // ?: Can't use `as` for this as we lose `data-active` etc. attributes when we try to. Using `asChild` and `Component` as a workaround.\n >\n <Component>\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n </Component>\n </StyledNavigationMenuVerticalLink>\n </NavigationMenuVerticalItem>\n )\n}\n","import { Root } from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\n\nimport { styled, Theme } from '../../styled'\nimport { colorSchemes as navigationMenuVerticalColorSchemes } from './NavigationMenuVertical.colorscheme.config'\nimport { NavigationMenuVerticalAccordion } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalAccordionContent } from './NavigationMenuVerticalAccordionContent'\nimport { NavigationMenuVerticalAccordionTrigger } from './NavigationMenuVerticalAccordionTrigger'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\nimport { NavigationMenuVerticalLink } from './NavigationMenuVerticalLink'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\nconst StyledRoot = styled(Root, {\n base: ['w-full']\n})\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the below `value` based props and `Trigger`/`Content`\n * animations do nothing, so removing them from typescript\n */\ntype NavigationVerticalProps = Omit<\n React.ComponentProps<typeof StyledRoot>,\n | 'delayDuration'\n | 'skipDelayDuration'\n | 'defaultValue'\n | 'value'\n | 'onValueChange'\n>\n\nexport const NavigationMenuVertical = /* @__PURE__ */ Object.assign(\n ({ children, ...rest }: NavigationVerticalProps) => (\n <Theme theme={navigationMenuVerticalColorSchemes['light']}>\n <StyledRoot {...rest} orientation=\"vertical\">\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledRoot>\n </Theme>\n ),\n {\n Link: NavigationMenuVerticalLink,\n Accordion: NavigationMenuVerticalAccordion,\n AccordionContent: NavigationMenuVerticalAccordionContent,\n AccordionTrigger: NavigationMenuVerticalAccordionTrigger,\n Item: NavigationMenuVerticalItem,\n ItemContent: NavigationMenuVerticalItemContent,\n Icon: NavigationMenuVerticalIcon,\n Text: NavigationMenuVerticalText\n }\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Badge } from '../badge/Badge'\nimport { Icon } from '../icon/Icon'\n\nconst StyledBadge = styled(Badge, {\n base: [\n 'font-body',\n 'text-sm',\n 'flex-row',\n 'justify-center',\n 'absolute',\n 'top-0',\n 'right-0',\n 'translate-x-3',\n '-translate-y-1/2',\n 'rounded-full',\n 'h-6',\n 'min-w-6',\n 'text-center'\n ]\n})\n\ntype BadgeProps = React.ComponentProps<typeof Badge>\n\ntype NotificationBadgeProps = {\n value: number | string\n emphasis?: BadgeProps['emphasis']\n theme?: BadgeProps['theme']\n icon?: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const NotificationBadge = ({\n value,\n emphasis = 'bold',\n theme = 'primary',\n icon,\n children\n}: React.PropsWithChildren<NotificationBadgeProps>) => (\n <div className=\"relative\">\n {!!value && (\n <StyledBadge role=\"status\" emphasis={emphasis} theme={theme}>\n {icon && <Icon is={icon} role=\"img\" aria-hidden=\"false\" />}\n {value}\n </StyledBadge>\n )}\n {children}\n </div>\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { Tooltip } from '../tooltip/Tooltip'\n\nconst StyledStepperButton = styled(ActionIcon, {\n base: [\n 'rounded-md',\n 'z-1',\n 'h-full!',\n 'hover:[&_svg]:text-grey-800',\n 'hover:bg-grey-100',\n '[&_svg]:text-grey-700',\n 'active:[&_svg]:text-grey-900',\n 'active:bg-grey-200',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n fieldAppearance: {\n standard: ['bg-white', 'border-grey-800!'],\n modern: ['bg-grey-100', 'border-grey-100!', 'hover:bg-grey-200!']\n },\n fieldTheme: {\n white: [],\n grey: []\n },\n emphasis: {\n bold: [\n '[&_svg]:text-primary-700',\n 'hover:bg-primary-100!',\n 'hover:[&_svg]:text-primary-800!',\n 'active:bg-primary-200!',\n 'active:[&_svg]:text-primary-900!'\n ]\n }\n },\n compoundVariants: [\n {\n fieldAppearance: 'modern',\n fieldTheme: 'white',\n class: ['bg-white']\n },\n {\n fieldAppearance: 'standard',\n emphasis: 'bold',\n class: ['bg-white', 'border-primary-800!']\n },\n {\n fieldAppearance: 'modern',\n emphasis: 'bold',\n class: ['bg-white!', 'hover:bg-primary-100!']\n }\n ]\n})\n\ntype NumberInputStepperProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'children'\n> &\n Omit<React.ComponentProps<typeof StyledStepperButton>, 'children'> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n showTooltip?: boolean\n disabledTooltipContent?: string\n }\n\nexport const NumberInputStepper = ({\n ref,\n icon,\n disabledTooltipContent,\n showTooltip,\n fieldAppearance = 'standard',\n fieldTheme,\n ...rest\n}: NumberInputStepperProps) => {\n /**\n * Focus has been removed from the button\n * as the increment and decrement buttons should be keyboard accessible via arrow keys.\n * see MDN docs https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/spinbutton_role\n */\n return (\n <Tooltip>\n <Tooltip.Trigger asChild>\n <span className=\"z-1\" tabIndex={-1}>\n <StyledStepperButton\n hasTooltip={false}\n tabIndex={-1}\n appearance=\"outline\"\n fieldAppearance={fieldAppearance}\n fieldTheme={fieldTheme}\n ref={ref}\n {...rest}\n >\n <Icon is={icon} />\n </StyledStepperButton>\n </span>\n </Tooltip.Trigger>\n {showTooltip && (\n <Tooltip.Content>{disabledTooltipContent}</Tooltip.Content>\n )}\n </Tooltip>\n )\n}\n","import { Minus, Plus } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { getFieldIconSize } from '../../utilities/style/get-icon-size'\nimport { Input } from '../input/Input'\nimport { NumberInputStepper } from './NumberInputStepper'\n\nexport interface NumberInputProps {\n name: string\n min?: number\n max?: number\n step?: number\n value?: number\n defaultValue?: number\n disabled?: boolean\n readonly?: boolean\n size?: 'sm' | 'md' | 'lg'\n appearance?: 'standard' | 'modern'\n theme?: 'white' | 'grey'\n emphasis?: 'bold'\n onValueChange?: (value: number) => void\n stepperButtonLabels?: { increment?: string; decrement?: string }\n disabledTooltipContent?: { increment?: string; decrement?: string }\n className?: string\n}\n\nconst NumberInputContainer = styled('div', {\n base: ['flex'],\n variants: {\n appearance: {\n standard: [],\n modern: ['gap-px']\n },\n emphasis: {\n bold: ['gap-0']\n }\n }\n})\n\nexport const NumberInput = ({\n ref,\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = Number.MAX_SAFE_INTEGER,\n step = 1,\n disabled: isDisabled = false,\n readonly: isReadOnly = false,\n size = 'md',\n stepperButtonLabels: stepperButtonLabelsProp,\n disabledTooltipContent: disabledTooltipContentProp,\n className,\n appearance = 'standard',\n theme,\n emphasis,\n ...rest\n}: NumberInputProps & {\n ref?: React.Ref<HTMLInputElement>\n}) => {\n const [internalValue, setInternalValue] = React.useState<number>(\n value || defaultValue\n )\n React.useEffect(() => {\n // Update the internal value to match what is passed in.\n if (typeof value !== 'undefined') setInternalValue(value)\n }, [value])\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n React.useImperativeHandle(ref, () => inputRef.current as HTMLInputElement)\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n const stepperButtonLabels = {\n increment: 'increment',\n decrement: 'decrement',\n ...stepperButtonLabelsProp\n }\n\n const disabledTooltipContent = {\n decrement: `Cannot enter values below ${min}`,\n increment: `Cannot enter values above ${max}`,\n ...disabledTooltipContentProp\n }\n\n const isAtMax = internalValue >= max\n const isAtMin = internalValue <= min\n\n const clamp = React.useCallback(\n (internalValue: number) => Math.min(Math.max(internalValue, min), max),\n [max, min]\n )\n\n const updateValue = React.useCallback(\n (newValue: number) => {\n onValueChange?.(newValue)\n setInternalValue(newValue)\n },\n [onValueChange]\n )\n\n const onInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const parsedValue = Number(event.target.value.replace(/\\D/g, ''))\n updateValue(parsedValue)\n },\n [updateValue]\n )\n\n const increment = React.useCallback(() => {\n if (isAtMax || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(internalValue) + step\n updateValue(clamp(newValue))\n }, [clamp, isAtMax, isReadOnly, step, updateValue, internalValue])\n\n const decrement = React.useCallback(() => {\n if (isAtMin || isReadOnly) return\n inputRef?.current?.focus()\n const newValue = Number(internalValue) - step\n updateValue(clamp(newValue))\n }, [clamp, isAtMin, isReadOnly, min, step, updateValue, internalValue])\n\n const onKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.nativeEvent.isComposing) return\n\n /**\n * Keyboard Accessibility\n *\n * We want to increase or decrease the input's value\n * based on if the user the arrow keys.\n *\n * @see https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-17\n */\n const eventKey = event.key\n\n const keyMap: Record<string, React.KeyboardEventHandler> = {\n ArrowUp: increment,\n ArrowRight: increment,\n ArrowDown: decrement,\n ArrowLeft: decrement,\n Home: () => updateValue(min),\n End: () => updateValue(max)\n }\n\n const action = keyMap[eventKey]\n\n if (action) {\n event.preventDefault()\n action(event)\n }\n },\n [increment, decrement, updateValue, min, max]\n )\n\n const hasError = internalValue < min || internalValue > max\n const {\n state: externalState,\n 'aria-invalid': externalAriaInvalid,\n ...restProps\n } = rest as { state?: 'error'; 'aria-invalid'?: boolean } & typeof rest\n\n const inputProps: React.ComponentProps<typeof Input> = {\n type: 'number',\n value: internalValue,\n ...restProps,\n onChange: onInputChange,\n onKeyDown,\n size,\n appearance,\n theme,\n state: externalState || (hasError ? 'error' : undefined),\n 'aria-invalid': externalAriaInvalid || hasError || undefined,\n className: cn(\n 'rounded-none',\n 'w-16',\n '[&_>_input]:text-center',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none',\n emphasis === 'bold' && [\n 'rounded-1',\n '[&_>_input[aria-invalid=true]]:text-danger',\n 'focus-within:[&_>_input]:text-grey-1000'\n ],\n emphasis === 'bold' &&\n appearance === 'standard' && [\n 'border-none',\n '[&:has([aria-invalid=true])]:border-2',\n '[&:has([aria-invalid=true])]:border-danger',\n 'focus-within:border-2',\n 'focus-within:border-blue-800'\n ]\n ),\n ref: inputRef,\n readOnly: isReadOnly,\n disabled: isDisabled,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuenow': internalValue,\n role: 'spinbutton'\n }\n\n return (\n <NumberInputContainer\n appearance={appearance}\n emphasis={emphasis}\n className={className}\n >\n <NumberInputStepper\n onClick={decrement}\n icon={Minus}\n className={cn(\n emphasis !== 'bold' && ['border-r-none', 'rounded-r-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMin || isDisabled}\n showTooltip={isAtMin && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.decrement}\n label={stepperButtonLabels.decrement}\n />\n <Input {...inputProps} />\n <NumberInputStepper\n onClick={increment}\n icon={Plus}\n className={cn(\n emphasis !== 'bold' && ['border-l-none', 'rounded-l-none']\n )}\n size={iconSize}\n fieldAppearance={appearance}\n fieldTheme={theme}\n emphasis={emphasis}\n disabled={isAtMax || isDisabled}\n showTooltip={isAtMax && !isDisabled}\n disabledTooltipContent={disabledTooltipContent.increment}\n label={stepperButtonLabels.increment}\n />\n </NumberInputContainer>\n )\n}\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { FieldWrapper } from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport type { ValidationOptions } from '../form/validation'\nimport type { NumberInputProps } from '../number-input/NumberInput'\nimport { NumberInput } from '../number-input/NumberInput'\n\nexport interface NumberInputFieldProps extends NumberInputProps {\n className?: string\n hideLabel?: boolean\n description?: string\n label: string\n name: string\n prompt?: { link: string; label: string }\n validation?: ValidationOptions\n}\n\nexport const NumberInputField = ({\n className,\n defaultValue = 0,\n hideLabel,\n value,\n prompt,\n description,\n label,\n name,\n validation,\n onValueChange,\n appearance,\n theme,\n ...rest\n}: NumberInputFieldProps) => {\n const { control } = useFormContext()\n const context = useFormCustomContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n React.useEffect(() => {\n // Update the react-hook-form inner value to match what is passed in.\n if (typeof value !== 'undefined') onChange(value)\n }, [value])\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <NumberInput\n id={name}\n name={innerName}\n ref={ref}\n {...(error && { state: 'error', 'aria-invalid': true })}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n appearance={formAppearance}\n theme={formTheme}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nNumberInputField.displayName = 'NumberInputField'\n","import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledProgressBar = styled(\n Progress.Root,\n {\n base: [\n 'rounded-full',\n 'bg-grey-200',\n 'relative',\n 'overflow-hidden',\n 'w-full'\n ],\n variants: {\n size: {\n sm: ['h-1'],\n md: ['h-2']\n },\n theme: {\n primary: ['text-primary-800'],\n info: ['text-info'],\n success: ['text-success'],\n warning: ['text-warning'],\n danger: ['text-danger'],\n neutral: ['bg-grey-400', 'text-grey-800']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(Progress.Indicator, {\n base: [\n 'bg-current',\n 'rounded-full',\n 'box-border',\n 'h-full',\n 'absolute',\n 'transition-all',\n 'duration-300',\n 'ease-out'\n ]\n})\n\ntype ProgressBarProps = React.ComponentPropsWithoutRef<\n typeof StyledProgressBar\n> &\n (\n | { id: string; 'aria-label'?: string }\n | { 'aria-label': string; id?: string }\n )\n\nexport const ProgressBar = ({\n value,\n max = 100,\n size = 'md',\n theme = 'primary',\n ...rest\n}: ProgressBarProps) => (\n <StyledProgressBar\n value={value}\n max={max}\n theme={theme}\n size={size}\n {...rest}\n >\n <StyledIndicator\n className=\"w-full translate-x-(--progress)\"\n style={{\n '--progress': `-${100 - ((value || 0) / max) * 100}%`\n }}\n />\n </StyledProgressBar>\n)\n\nProgressBar.displayName = 'ProgressBar'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\n\nimport { styled } from '../../styled'\n\nexport const RadioButtonGroup = styled(\n RadioGroup.Root,\n {\n base: ['flex', 'flex-wrap'],\n variants: {\n direction: {\n row: ['*:not-last:mr-8', 'flex-row'],\n column: ['flex-col']\n }\n }\n },\n { enablePolymorphism: false }\n)\n\nRadioButtonGroup.displayName = 'RadioButtonGroup'\n","import * as React from 'react'\n\nimport { InlineFieldWrapper } from '../field-wrapper/InlineFieldWrapper'\nimport type { ValidationOptions } from '../form/validation'\nimport { RadioButton } from '../radio-button/RadioButton'\n\ntype RadioFieldProps = {\n className?: string\n defaultChecked?: boolean\n error?: string\n label: string\n validation?: ValidationOptions\n} & React.ComponentProps<typeof RadioButton>\n\nexport const RadioField = ({\n className,\n label,\n value,\n ...rest\n}: RadioFieldProps) => (\n <InlineFieldWrapper className={className} label={label}>\n <RadioButton value={value} {...rest} />\n </InlineFieldWrapper>\n)\n\nRadioField.displayName = 'RadioField'\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport { styled } from '../../styled'\nimport { Description as FieldDescription } from '../field-wrapper/FieldDescription'\nimport type { FieldElementWrapperProps } from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { InlineMessage } from '../inline-message/InlineMessage'\nimport { Label } from '../label/Label'\nimport { RadioButtonGroup } from '../radio-button/RadioButtonGroup'\nimport { RadioField } from './RadioField'\n\nconst Fieldset = styled('fieldset', {\n base: ['border-0', 'p-0', 'm-0', 'min-w-0']\n})\n\ntype RadioButtonFieldProps = React.ComponentProps<typeof RadioButtonGroup> &\n FieldElementWrapperProps\n\nconst RadioButtonFieldComponent = ({\n children,\n className,\n direction = 'column',\n defaultValue,\n value,\n description,\n label,\n name,\n validation,\n onValueChange,\n ...rest\n}: RadioButtonFieldProps) => {\n const { control } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n const { error } = useFieldError(name)\n\n React.useEffect(() => {\n // Update the react-hook-form inner value to match what is passed in.\n if (typeof value !== 'undefined') onChange(value)\n }, [value])\n\n return (\n <Fieldset className={className}>\n <Label\n as=\"legend\"\n required={Boolean(validation?.required)}\n className=\"mb-3 p-0\"\n >\n {label}\n </Label>\n {description && (\n <FieldDescription className=\"mb-3\">{description}</FieldDescription>\n )}\n\n <RadioButtonGroup\n ref={ref}\n direction={direction}\n defaultValue={defaultValue}\n onValueChange={(newValue) => {\n onChange(newValue)\n onValueChange?.(newValue)\n }}\n value={innerValue}\n {...rest}\n >\n {children}\n </RadioButtonGroup>\n\n {error && <InlineMessage className=\"mt-2\">{error}</InlineMessage>}\n </Fieldset>\n )\n}\n\nexport const RadioButtonField = /* @__PURE__ */ Object.assign(\n RadioButtonFieldComponent,\n {\n Item: RadioField\n }\n)\n\nRadioButtonFieldComponent.displayName = 'RadioButtonField'\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledRadioCard = styled(RadioGroup.Item, {\n base: [\n 'items-center',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'rounded-sm',\n 'cursor-pointer',\n 'flex',\n 'text-left',\n 'data-[state=checked]:-outline-offset-2',\n 'data-[state=checked]:outline-2',\n 'data-[state=checked]:outline-primary-800',\n 'data-[state=checked]:outline-solid'\n ],\n variants: {\n align: {\n left: ['flex-row'],\n right: ['flex-row-reverse']\n },\n size: {\n md: ['px-4', 'py-3'],\n lg: ['px-8', 'py-4']\n },\n isFullWidth: {\n true: ['w-full'],\n false: ['w-max']\n }\n }\n})\n\nconst RadioButton = styled('div', {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-900',\n 'rounded-full',\n 'flex',\n 'shrink-0',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'in-data-[state=checked]:bg-primary-800',\n 'in-data-[state=checked]:border-primary-800'\n ],\n variants: {\n containerIsFullWidth: {\n true: [],\n false: []\n },\n align: {\n left: ['mr-4'],\n right: []\n }\n },\n compoundVariants: [\n {\n containerIsFullWidth: true,\n align: 'right',\n class: ['ml-auto']\n },\n {\n containerIsFullWidth: false,\n align: 'right',\n class: ['ml-4']\n }\n ]\n})\n\nconst Indicator = styled(RadioGroup.Indicator, {\n base: ['bg-white', 'rounded-full', 'absolute', 'size-1.5']\n})\n\ntype RadioCardProps = React.ComponentProps<typeof StyledRadioCard>\n\nexport const RadioCard = ({\n children,\n isFullWidth = false,\n size = 'md',\n align = 'left',\n ...rest\n}: RadioCardProps) => (\n <StyledRadioCard\n {...rest}\n align={align}\n isFullWidth={isFullWidth}\n size={size}\n >\n <RadioButton align={align} containerIsFullWidth={isFullWidth}>\n <Indicator />\n </RadioButton>\n <div>{children}</div>\n </StyledRadioCard>\n)\n","import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport type { Override } from '../../utilities/types'\nimport { RadioCard } from './RadioCard'\n\ntype RadioCardGroupProps = Override<\n React.ComponentProps<typeof RadioCard>,\n React.ComponentProps<typeof RadioGroup.Root>\n>\n\nexport const RadioCardGroup = ({\n className,\n children,\n size,\n isFullWidth,\n align,\n ...rest\n}: RadioCardGroupProps) => (\n <RadioGroup.Root {...rest}>\n <div className={cn('flex', 'flex-row', 'flex-wrap', 'gap-3', className)}>\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child?.type === RadioCard) {\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof RadioCard>>,\n { size, isFullWidth, align }\n )\n }\n return child\n })}\n </div>\n </RadioGroup.Root>\n)\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { SearchInput, type SearchInputProps } from '../search-input/SearchInput'\n\ntype SearchFieldProps = SearchInputProps & FieldElementWrapperProps\n\nexport const SearchField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: SearchFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <SearchInput\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nSearchField.displayName = 'SearchField'\n","import * as React from 'react'\n\nimport type { SectionMessageTheme } from './SectionMessage'\n\nexport type SectionMessageContextValue = {\n theme: SectionMessageTheme\n hasIcon: boolean\n setHasIcon: React.Dispatch<React.SetStateAction<boolean>>\n hasDismiss: boolean\n setHasDismiss: React.Dispatch<React.SetStateAction<boolean>>\n}\nexport type SectionMessageProviderProps = {\n theme: SectionMessageTheme\n children: React.ReactNode\n}\n\nexport const SectionMessageContext =\n React.createContext<SectionMessageContextValue | null>(null)\n\nexport const SectionMessageProvider = ({\n theme = 'info',\n children\n}: SectionMessageProviderProps) => {\n const [hasIcon, setHasIcon] = React.useState(false)\n const [hasDismiss, setHasDismiss] = React.useState(false)\n\n const value = React.useMemo<SectionMessageContextValue>(\n () => ({ theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss }),\n [theme, hasIcon, setHasIcon, hasDismiss, setHasDismiss]\n )\n\n return (\n <SectionMessageContext.Provider value={value}>\n {children}\n </SectionMessageContext.Provider>\n )\n}\n\nexport const useSectionMessageContext = (): SectionMessageContextValue => {\n const context = React.useContext(SectionMessageContext)\n\n if (!context) {\n throw new Error(\n 'useSectionMessageContext must be used within a SectionMessageProvider'\n )\n }\n\n return context\n}\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const SectionMessageDescription = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Text>) => (\n <Text size=\"sm\" {...rest} className={cn('text-grey-900', className)} />\n)\n","import { Close } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Dismissible } from '../dismissible'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessage.context'\n\nexport const SectionMessageDismiss = ({\n label = 'Dismiss',\n className,\n ...rest\n}: React.ComponentProps<typeof ActionIcon>) => {\n const { setHasDismiss } = useSectionMessageContext()\n\n useEffect(() => {\n setHasDismiss(true)\n return () => setHasDismiss(false)\n }, [setHasDismiss])\n\n return (\n <Dismissible.Trigger asChild>\n <ActionIcon\n label={label}\n size=\"sm\"\n appearance=\"simple\"\n theme=\"neutral\"\n {...rest}\n className={cn('m-auto', 'absolute', 'top-2', 'right-2', className)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </Dismissible.Trigger>\n )\n}\n","import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessage.context'\n\nconst themeIcons = {\n success: OkCircle,\n warning: Danger,\n error: Error,\n neutral: Info,\n info: Info\n}\n\ntype SectionMessageIconProps = Partial<React.ComponentProps<typeof Icon>>\n\nexport const SectionMessageIcon = ({\n className,\n is,\n ...rest\n}: SectionMessageIconProps) => {\n const { theme, setHasIcon } = useSectionMessageContext()\n\n useEffect(() => {\n setHasIcon(true)\n return () => setHasIcon(false)\n }, [setHasIcon])\n\n return (\n <Icon\n is={is || themeIcons[theme]}\n size=\"sm\"\n {...rest}\n className={cn(\n 'm-auto',\n 'absolute',\n 'left-4',\n 'top-4',\n 'text-current',\n className\n )}\n />\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\n\nexport const SectionMessageContent = styled('div', {\n base: ['max-w-full', 'shrink-0', 'pt-0.5', '*:not-last:mb-2']\n})\n\nexport const SectionMessageActions = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => (\n <div className={cn('max-w-full', 'shrink-0', className)}>\n <div className=\"flex flex-wrap gap-3\" {...rest} />\n </div>\n)\n","import * as React from 'react'\n\nimport { Text, type TextProps } from '../text/Text'\n\nexport const SectionMessageTitle = (props: TextProps) => (\n <Text size=\"md\" weight=\"bold\" {...props} />\n)\n","import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Dismissible } from '../dismissible'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessage.context'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n base: [\n 'relative',\n 'rounded-md',\n 'flex',\n 'shrink-0',\n 'min-h-12',\n 'p-4',\n 'border',\n 'border-white'\n ],\n variants: {\n theme: {\n success: ['bg-success-light', 'text-success-dark'],\n warning: ['bg-warning-light', 'text-warning-text'],\n error: ['bg-danger-light', 'text-danger-dark'],\n neutral: ['bg-grey-100', 'text-grey-1000'],\n info: ['bg-info-light', 'text-info-dark']\n },\n hasIcon: {\n true: ['pl-10']\n },\n hasDismiss: {\n true: ['pr-12']\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage> & {\n className?: string\n}) => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <div className=\"flex grow justify-between gap-3\">{children}</div>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport type SectionMessageProps = React.ComponentProps<\n typeof SectionMessageRoot\n> & {\n theme?: SectionMessageTheme\n}\n\nconst SectionMessageComponent = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps) => (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n)\n\nexport const SectionMessage = /* @__PURE__ */ Object.assign(\n SectionMessageComponent,\n {\n Title: SectionMessageTitle,\n Description: SectionMessageDescription,\n Icon: SectionMessageIcon,\n Dismiss: SectionMessageDismiss,\n Content: SectionMessageContent,\n Actions: SectionMessageActions\n }\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { Override } from '../../utilities/types'\n\nconst StyledSelect = styled(\n 'select',\n {\n base: [\n 'bg-(image:--bg-chevron)',\n 'appearance-none',\n '[background-repeat:no-repeat,repeat-x]',\n 'rounded-md',\n 'text-grey-1000',\n 'block',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'w-full',\n 'hover:cursor-pointer',\n '-ms-expand:hidden',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n '*[[disabled]]:opacity-30',\n '*[[disabled]]:cursor-not-allowed'\n ],\n variants: {\n size: {\n sm: [\n 'bg-position-[right_--spacing(2)_top_50%,0_0]',\n 'bg-size-[18px_auto,100%]',\n 'text-sm',\n 'h-8',\n 'pl-2',\n 'pr-8'\n ],\n md: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-10',\n 'pl-3',\n 'pr-10'\n ],\n lg: [\n 'bg-position-[right_--spacing(3)_top_50%,0_0]',\n 'bg-size-[20px_auto,100%]',\n 'text-md',\n 'h-12',\n 'pl-3',\n 'pr-10'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n },\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-700',\n 'focus:border-primary-800',\n 'focus:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus:outline-2',\n 'focus:outline-blue-800',\n 'focus:outline-offset-1',\n 'focus:outline-solid',\n 'focus:z-1'\n ]\n }\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n },\n { enablePolymorphism: false, enableResponsiveVariants: true }\n)\n\nexport type SelectProps = Override<\n React.ComponentProps<typeof StyledSelect>,\n {\n placeholder?: string\n }\n // TODO: figure out why uncommenting this causes TS errors in\n // component declaration\n // & (\n // | { id: string; 'aria-label'?: string }\n // | { 'aria-label': string; id?: string }\n // )\n>\n\nexport const Select = ({\n ref,\n placeholder,\n children,\n size = 'md',\n appearance = 'standard',\n ...rest\n}: SelectProps) => {\n // Type assertion needed due to responsive variant size prop compatibility\n const props: React.ComponentProps<typeof StyledSelect> = {\n size,\n appearance,\n ref,\n ...rest\n }\n\n if ([rest.value, rest.defaultValue].every((value) => value === undefined)) {\n props.defaultValue = ''\n }\n\n return (\n <StyledSelect {...props}>\n {placeholder && (\n <option disabled hidden value=\"\">\n {placeholder}\n </option>\n )}\n {children}\n </StyledSelect>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Select, type SelectProps } from '../select/Select'\n\ntype SelectFieldProps = SelectProps & FieldElementWrapperProps\n\nexport const SelectField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: SelectFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Select\n name={name}\n id={name}\n appearance={formAppearance}\n theme={formTheme}\n {...rest}\n ref={ref}\n {...(error && { state: 'error' })}\n >\n {children}\n </Select>\n </FieldWrapper>\n )\n}\n\nSelectField.displayName = 'SelectField'\n","import * as React from 'react'\n\ntype SelectMenuContextValue = {\n size: 'sm' | 'md' | 'lg'\n theme: 'white' | 'grey'\n state?: 'error'\n}\n\nexport const SelectMenuContext = React.createContext<SelectMenuContextValue>({\n size: 'md',\n theme: 'grey'\n})\n\nexport const useSelectMenuContext = () => React.useContext(SelectMenuContext)\n","import { ChevronDown, ChevronUp } from '@atom-learning/icons'\nimport * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\n\nconst Content = styled(RadixSelect.Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'z-10',\n 'overflow-hidden',\n 'will-change-transform',\n 'will-change-opacity',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n position: {\n popper: [\n 'max-h-(--radix-select-content-available-height)',\n 'min-w-(--radix-select-trigger-width)'\n ],\n 'item-aligned': []\n }\n }\n})\n\nconst Viewport = styled(RadixSelect.Viewport, {\n base: ['p-1', 'w-full'],\n variants: {\n position: {\n popper: ['h-(--radix-select-content-available-height)'],\n 'item-aligned': []\n }\n }\n})\n\nconst ScrollUpButton = styled(RadixSelect.ScrollUpButton, {\n base: ['flex', 'items-center', 'justify-center', 'h-6', 'cursor-default']\n})\n\nconst ScrollDownButton = styled(RadixSelect.ScrollDownButton, {\n base: ['flex', 'items-center', 'justify-center', 'h-6', 'cursor-default']\n})\n\ntype SelectMenuContentProps = React.ComponentPropsWithRef<\n typeof RadixSelect.Content\n>\n\nexport const SelectMenuContent = ({\n ref,\n children,\n position = 'popper',\n sideOffset = 4,\n ...rest\n}: SelectMenuContentProps) => (\n <RadixSelect.Portal>\n <Content ref={ref} position={position} sideOffset={sideOffset} {...rest}>\n <ScrollUpButton>\n <Icon is={ChevronUp} className=\"text-grey-700 size-4\" />\n </ScrollUpButton>\n <Viewport position={position}>{children}</Viewport>\n <ScrollDownButton>\n <Icon is={ChevronDown} className=\"text-grey-700 size-4\" />\n </ScrollDownButton>\n </Content>\n </RadixSelect.Portal>\n)\n","import { Ok } from '@atom-learning/icons'\nimport * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenu.context'\n\nconst Item = styled(RadixSelect.Item, {\n base: [\n 'relative',\n 'flex',\n 'items-center',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'cursor-pointer',\n 'rounded-sm',\n 'outline-none',\n 'data-disabled:cursor-not-allowed',\n 'data-disabled:opacity-30',\n 'data-disabled:pointer-events-none',\n 'data-highlighted:bg-grey-100',\n 'data-highlighted:outline-none'\n ],\n variants: {\n size: {\n sm: ['py-1.5', 'pl-7', 'pr-4', 'text-sm'],\n md: ['py-2', 'pl-8', 'pr-6'],\n lg: ['py-2', 'pl-8', 'pr-6']\n }\n }\n})\n\ntype SelectMenuItemProps = React.ComponentPropsWithRef<typeof RadixSelect.Item>\n\nexport const SelectMenuItem = ({\n ref,\n children,\n ...rest\n}: SelectMenuItemProps) => {\n const { size } = useSelectMenuContext()\n\n return (\n <Item ref={ref} size={size} {...rest}>\n <RadixSelect.ItemIndicator className=\"absolute left-2 inline-flex items-center\">\n <Icon is={Ok} className={size === 'sm' ? 'size-3' : 'size-4'} />\n </RadixSelect.ItemIndicator>\n <RadixSelect.ItemText>{children}</RadixSelect.ItemText>\n </Item>\n )\n}\n","import * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Text } from '../text/Text'\n\ntype SelectMenuLabelProps = React.ComponentProps<typeof RadixSelect.Label>\n\nexport const SelectMenuLabel = ({\n className,\n ...rest\n}: SelectMenuLabelProps) => (\n <Text\n as={RadixSelect.Label}\n size=\"sm\"\n className={cn('p-2', 'mb-1', 'text-text-subtle', className)}\n {...rest}\n />\n)\n\nSelectMenuLabel.displayName = 'SelectMenuLabel'\n","import * as RadixSelect from '@radix-ui/react-select'\n\nimport { styled } from '../../styled'\n\nexport const SelectMenuSeparator = styled(\n RadixSelect.Separator,\n {\n base: ['h-px', 'bg-grey-200', 'my-2', 'mx-1']\n },\n { enablePolymorphism: false }\n)\n","import { ChevronDown } from '@atom-learning/icons'\nimport * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenu.context'\n\nconst Trigger = styled(RadixSelect.Trigger, {\n base: [\n 'appearance-none',\n 'rounded-md',\n 'block',\n 'w-full',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'text-grey-1000',\n 'text-left',\n 'relative',\n 'inline-flex',\n 'items-center',\n 'border-none',\n 'hover:cursor-pointer',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'focus:outline-2',\n 'focus:outline-blue-800',\n 'focus:outline-offset-1',\n 'focus:outline-solid',\n 'focus:z-1'\n ],\n variants: {\n size: {\n sm: ['h-8', 'pl-2', 'pr-8', 'text-sm'],\n md: ['h-10', 'pl-3', 'pr-10', 'text-md'],\n lg: ['h-12', 'pl-3', 'pr-10', 'text-md']\n },\n theme: {\n white: ['bg-white'],\n grey: ['bg-grey-100']\n },\n state: {\n error: ['bg-danger-light', 'focus:outline-danger']\n }\n }\n})\n\nconst TriggerIcon = styled(Icon, {\n base: [\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'pointer-events-none',\n 'text-grey-700'\n ],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-3', 'size-5'],\n lg: ['right-3', 'size-5']\n }\n }\n})\n\ntype SelectMenuTriggerProps = React.ComponentPropsWithRef<\n typeof RadixSelect.Trigger\n> & {\n placeholder?: string\n}\n\nexport const SelectMenuTrigger = ({\n ref,\n placeholder,\n children,\n ...rest\n}: SelectMenuTriggerProps) => {\n const { size, theme, state } = useSelectMenuContext()\n\n return (\n <Trigger ref={ref} size={size} theme={theme} state={state} {...rest}>\n <RadixSelect.Value placeholder={placeholder}>\n {children}\n </RadixSelect.Value>\n <TriggerIcon is={ChevronDown} size={size} />\n </Trigger>\n )\n}\n","import * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { SelectMenuContext } from './SelectMenu.context'\nimport { SelectMenuContent } from './SelectMenuContent'\nimport { SelectMenuItem } from './SelectMenuItem'\nimport { SelectMenuLabel } from './SelectMenuLabel'\nimport { SelectMenuSeparator } from './SelectMenuSeparator'\nimport { SelectMenuTrigger } from './SelectMenuTrigger'\n\ntype SelectMenuProps = React.ComponentProps<typeof RadixSelect.Root> & {\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n state?: 'error'\n}\n\nconst SelectMenuRoot = ({\n size = 'md',\n theme = 'grey',\n state,\n children,\n ...rest\n}: SelectMenuProps) => (\n <SelectMenuContext.Provider value={{ size, theme, state }}>\n <RadixSelect.Root {...rest}>{children}</RadixSelect.Root>\n </SelectMenuContext.Provider>\n)\n\nexport const SelectMenu = /* @__PURE__ */ Object.assign(SelectMenuRoot, {\n Trigger: SelectMenuTrigger,\n Content: SelectMenuContent,\n Item: SelectMenuItem,\n Group: RadixSelect.Group,\n Label: SelectMenuLabel,\n Separator: SelectMenuSeparator\n})\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { SelectMenu } from '../select-menu/SelectMenu'\n\ntype SelectMenuFieldProps = React.PropsWithChildren<\n FieldElementWrapperProps & {\n placeholder?: string\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n disabled?: boolean\n className?: string\n }\n>\n\nexport const SelectMenuField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n theme,\n size,\n placeholder,\n disabled,\n ...rest\n}: SelectMenuFieldProps) => {\n const { control } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const formTheme = context?.theme ?? theme\n\n const {\n field: { ref, onChange, value }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: ''\n })\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n >\n <SelectMenu\n value={value}\n onValueChange={onChange}\n size={size}\n theme={formTheme}\n disabled={disabled}\n {...(error && { state: 'error' })}\n {...rest}\n >\n <SelectMenu.Trigger\n ref={ref}\n placeholder={placeholder}\n aria-label={label}\n />\n <SelectMenu.Content>{children}</SelectMenu.Content>\n </SelectMenu>\n </FieldWrapper>\n )\n}\n\nSelectMenuField.displayName = 'SelectMenuField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const SideBarHeader = styled('div', {\n base: ['border-b', 'border-b-(--border)', 'p-4', 'w-full']\n})\n\nexport const SideBarBody = styled('div', {\n base: ['grow', 'overflow-y-auto', 'overflow-x-hidden', 'p-4', 'w-full']\n})\n\nexport const SideBarFooter = styled('div', {\n base: ['border-t', 'border-t-(--border)', 'p-4', 'w-full']\n})\n\nconst StyledSideBarBrand = /* @__PURE__ */ styled('a', {\n base: [\n 'items-end',\n 'text-text',\n 'flex',\n 'gap-4',\n 'no-underline',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n\nexport const SideBarBrand = StyledSideBarBrand as React.FC<\n React.ComponentPropsWithRef<'a'> & { as?: React.ElementType }\n>\n\nexport const SideBarBrandLogo = Image\n\nexport const SideBarBrandName = styled(Text, {\n base: ['text-text', 'whitespace-nowrap']\n})\n","import * as React from 'react'\nimport { useFocusWithin, useHover, useInteractOutside } from 'react-aria'\n\nimport { styled, Theme, cn } from '../../styled'\nimport { SideBarContext } from './SideBar.context'\nimport {\n SideBarBody,\n SideBarBrand,\n SideBarBrandLogo,\n SideBarBrandName,\n SideBarFooter,\n SideBarHeader\n} from './SideBarComponents'\n\nconst light = {\n '--background': 'white',\n '--text': 'var(--color-grey-800)',\n '--border': 'var(--color-grey-200)'\n}\n\nconst Root = styled('div', {\n base: ['sticky', 'z-1'],\n variants: {\n type: {\n static: [],\n expandable: ['w-22']\n }\n }\n})\n\nconst Content = styled('div', {\n base: [\n 'bg-(--background)',\n 'border-r',\n 'border-r-(--border)',\n 'shadow-[4px_0_4px_-2px_rgba(31,31,31,0)]',\n 'flex',\n 'flex-col',\n 'h-full',\n 'overflow-hidden',\n 'will-change-width',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[shadow,width]'\n ],\n variants: {\n type: {\n static: [],\n expandable: []\n },\n isExpanded: {\n true: ['w-[16rem]'],\n false: ['w-22']\n }\n },\n compoundVariants: [\n {\n isExpanded: true,\n type: 'expandable',\n class: ['shadow-[4px_0_4px_-2px_rgba(31,31,31,0.1)]']\n }\n ]\n})\n\nconst PointerBlocker = styled('div', {\n base: [\n 'bottom-0',\n 'left-0',\n 'absolute',\n 'right-0',\n 'top-0',\n 'transition-all'\n ],\n variants: {\n isVisible: {\n true: ['delay-0', 'visible'],\n false: ['delay-50', 'invisible']\n }\n }\n})\n\ntype SideBarProps = React.ComponentProps<typeof Root> & {\n className?: string\n offset?: number | string\n} & React.ComponentProps<typeof Theme>\n\nconst SideBarComponent = ({\n theme,\n className,\n children,\n type = 'expandable',\n offset = '0px',\n style,\n ...rest\n}: SideBarProps) => {\n const [isExpanded, setIsExpanded] = React.useState(type === 'static')\n const ref = React.useRef<HTMLDivElement>(null)\n\n useInteractOutside({\n ref,\n onInteractOutside: () => setIsExpanded(false)\n })\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => setIsExpanded(true),\n onBlurWithin: () => setIsExpanded(false)\n })\n const { hoverProps, isHovered } = useHover({\n onHoverStart: () => setIsExpanded(true),\n onHoverEnd: () => setIsExpanded(false)\n })\n const touchProps = {\n onTouchEnd: () => setIsExpanded(true)\n }\n\n const expandableProps =\n type === 'expandable'\n ? {\n ...focusWithinProps,\n ...hoverProps,\n ...touchProps,\n ref\n }\n : {}\n\n return (\n <SideBarContext.Provider value={{ isExpanded }}>\n <Theme theme={theme || light}>\n <Root\n {...rest}\n style={{ ...style, '--offset': offset }}\n type={type}\n className={cn(\n 'h-[calc(100svh-var(--offset))]',\n 'top-(--offset)',\n className\n )}\n >\n <Content {...expandableProps} isExpanded={isExpanded} type={type}>\n {children}\n {/**\n * When the SideBar is collapsed, ensure that the initial tap event\n * is used to expand the nav first before making the items available\n */}\n {type === 'expandable' && (\n <PointerBlocker isVisible={!isHovered && !isExpanded} />\n )}\n </Content>\n </Root>\n </Theme>\n </SideBarContext.Provider>\n )\n}\n\nexport const SideBar = /* @__PURE__ */ Object.assign(SideBarComponent, {\n Brand: SideBarBrand,\n BrandLogo: SideBarBrandLogo,\n BrandName: SideBarBrandName,\n Header: SideBarHeader,\n Body: SideBarBody,\n Footer: SideBarFooter,\n displayName: 'SideBar'\n})\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderStepsType = {\n steps?: { label: string; value: number }[]\n}\n\ntype SliderStepsProps = {\n min: number\n max: number\n} & SliderStepsType\n\nconst getPercentValue = (value: number, min: number, max: number): number => {\n return ((value - min) / (max - min)) * 100\n}\n\nconst getTransformValue = (value: number, min: number, max: number): number => {\n const percentage = getPercentValue(value, min, max)\n\n if (percentage <= 10) return 0\n if (percentage >= 90) return 100\n return 50\n}\n\nexport const SliderSteps = ({ min, max, steps = [] }: SliderStepsProps) => {\n if (steps.length === 0) return null\n\n return (\n <div className=\"relative mt-3 h-3 w-full\">\n {steps.map((step) => (\n <Text\n as=\"span\"\n key={step.value}\n style={{\n '--left': `${getPercentValue(step.value, min, max)}%`,\n '--translate-x': `-${getTransformValue(step.value, min, max)}%`\n }}\n className=\"text-grey-700 absolute left-(--left) translate-x-(--translate-x)\"\n >\n {step.label}\n </Text>\n ))}\n </div>\n )\n}\n","import * as React from 'react'\n\nimport { Text } from '../text/Text'\n\nexport type SliderValueType = {\n outputLabel?: (value: number | number[]) => string\n}\n\ntype SliderValueProps = SliderValueType & {\n value?: number[]\n}\n\nexport const SliderValue = ({\n value = [],\n outputLabel = (value) => `Current value is ${value}`\n}: SliderValueProps) => (\n <Text className=\"text-grey-700 mt-4 w-full\">\n {outputLabel(value.length === 1 ? value[0] : value)}\n </Text>\n)\n","import { Range, Root, Thumb, Track } from '@radix-ui/react-slider'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\nimport { SliderSteps } from './SliderSteps'\nimport { SliderValue } from './SliderValue'\n\nconst StyledTrack = styled(Track, {\n base: [\n 'rounded-full',\n 'grow',\n 'relative',\n 'data-[orientation=horizontal]:h-1',\n 'data-[orientation=vertical]:w-1'\n ],\n variants: {\n theme: {\n light: ['bg-white'],\n tonal: ['bg-grey-600']\n }\n }\n})\n\nconst StyledSlider = styled(Root, {\n base: [\n 'items-center',\n 'flex',\n 'relative',\n 'touch-none',\n 'select-none',\n 'cursor-pointer',\n 'data-[orientation=horizontal]:h-4',\n 'data-[orientation=vertical]:flex-col',\n 'data-[orientation=vertical]:w-4',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledRange = styled(Range, {\n base: [\n 'bg-primary-800',\n 'rounded-full',\n 'h-full',\n 'absolute',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nconst StyledThumb = styled(Thumb, {\n base: [\n 'bg-primary-900',\n 'rounded-full',\n 'block',\n 'size-4',\n 'hover:bg-primary-1000',\n 'focus:outline-2',\n 'focus:outline-offset-2',\n 'focus:outline-primary-900',\n 'focus:outline-solid',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ]\n})\n\nexport type SliderProps = React.ComponentProps<typeof StyledSlider> &\n Pick<React.ComponentProps<typeof StyledTrack>, 'theme'>\n\nconst SliderComponent = ({\n ref,\n value,\n defaultValue,\n min = 0,\n max = 100,\n theme = 'tonal',\n className,\n children,\n ...rest\n}: SliderProps) => {\n const values = value || defaultValue\n return (\n <CSSWrapper className={className}>\n <StyledSlider\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n ref={ref}\n {...rest}\n >\n <StyledTrack theme={theme}>\n <StyledRange />\n </StyledTrack>\n {values?.length &&\n values.map((_, i) => <StyledThumb key={`thumb${i}`} />)}\n </StyledSlider>\n {children}\n </CSSWrapper>\n )\n}\n\nexport const Slider = /* @__PURE__ */ Object.assign(SliderComponent, {\n Value: SliderValue,\n Steps: SliderSteps\n})\n","import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { Slider, type SliderProps } from '../slider/Slider'\nimport type { SliderStepsType } from '../slider/SliderSteps'\nimport type { SliderValueType } from '../slider/SliderValue'\n\ntype SliderFieldProps = SliderProps &\n SliderStepsType &\n SliderValueType &\n FieldElementWrapperProps\n\nexport const SliderField = ({\n className,\n hideLabel,\n label,\n name,\n defaultValue,\n value,\n validation,\n outputLabel,\n min = 0,\n max = 100,\n steps = [],\n ...rest\n}: SliderFieldProps) => {\n const { control } = useFormContext()\n const {\n field: { ref, onChange, value: innerValue, name: innerName }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue\n })\n\n React.useEffect(() => {\n // Update the react-hook-form inner value to match what is passed in.\n if (value?.length) onChange(value)\n }, [JSON.stringify(value)])\n\n return (\n <FieldWrapper\n className={className}\n fieldId={name}\n label={label}\n hideLabel={hideLabel}\n >\n <Slider\n ref={ref}\n name={innerName}\n onValueChange={onChange}\n value={innerValue}\n min={min}\n max={max}\n {...rest}\n >\n <Slider.Steps min={min} max={max} steps={steps} />\n\n <Slider.Value value={innerValue} outputLabel={outputLabel} />\n </Slider>\n </FieldWrapper>\n )\n}\n\nSliderField.displayName = 'SliderField'\n","import { styled } from '../../styled'\n\nexport const SkeletonLoader = styled('div', {\n base: ['bg-grey-300', 'size-16', 'animate-shimmer']\n})\n\nSkeletonLoader.displayName = 'Skeleton'\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonHeading = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => <SkeletonLoader className={cn('w-64', 'h-6', 'rounded-xl', className)} />\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonButton = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => (\n <SkeletonLoader className={cn('w-[10rem]', 'h-8', 'rounded-sm', className)} />\n)\n","import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\ntype TileProps = React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}\n\nexport const Tile = ({\n ref,\n children,\n borderRadius = 'lg',\n colorScheme = {},\n ...rest\n}: TileProps) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTabs = ({\n numberOfTabs,\n className,\n tabClassName\n}: {\n numberOfTabs: number\n className?: string\n tabClassName?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', className)}>\n {Array.from({ length: numberOfTabs }, (_, index) => `tab_${index}`).map(\n (key) => (\n <SkeletonLoader\n key={key}\n className={cn('w-32', 'h-6', 'rounded-sm', tabClassName)}\n />\n )\n )}\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\n\nconst buildConicGradient = () => {\n const numberOfSegments = 5\n const gap = 4\n const segmentAngle = (360 - numberOfSegments * gap) / numberOfSegments\n const stops: string[] = []\n let current = 0\n\n Array.from({ length: numberOfSegments }).forEach(() => {\n stops.push(\n `var(--color-grey-300) ${current}deg ${current + segmentAngle}deg`\n )\n current += segmentAngle\n stops.push(`white ${current}deg ${current + gap}deg`)\n current += gap\n })\n\n return `conic-gradient(${stops.join(', ')})`\n}\n\nexport const SkeletonDoughnutChart = ({\n className\n}: {\n className?: string\n}) => (\n <Tile className={cn('p-6', 'size-60', className)}>\n <div\n className=\"animate-shimmer aspect-square w-full rounded-full [background-image:var(--gradient)] bg-clip-padding\"\n style={{ '--gradient': buildConicGradient() }}\n >\n <div className=\"mt-[20%] ml-[20%] size-[60%] rounded-full bg-white\" />\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Table } from '../table/Table'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTable = ({\n numberOfColumns = 4,\n numberOfRows = 4,\n columnWidth,\n className\n}: {\n numberOfColumns?: number\n numberOfRows?: number\n columnWidth?: Record<number, string>\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', 'relative', className)}>\n <Table size=\"md\">\n <Table.Header theme=\"white\">\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.HeaderCell key={columnIndex}>\n <SkeletonLoader\n style={{ '--width': columnWidth?.[columnIndex] || '100px' }}\n className=\"h-4 w-(--width) rounded-xl\"\n />\n </Table.HeaderCell>\n )\n )}\n </Table.Header>\n <Table.Body striped={false}>\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowIndex) => (\n <Table.Row key={rowIndex}>\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.Cell key={columnIndex} className=\"border-none\">\n <SkeletonLoader\n style={{\n '--width': columnWidth?.[columnIndex] || '100px'\n }}\n className=\"bg-grey-200 h-4 w-(--width) rounded-xl\"\n />\n </Table.Cell>\n )\n )}\n </Table.Row>\n )\n )}\n </Table.Body>\n </Table>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Flex } from '../flex/Flex'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\nimport { SkeletonButton } from './SkeletonButton'\nimport { SkeletonDoughnutChart } from './SkeletonDoughnutChart'\n\nexport const SkeletonCard = ({\n numberOfRows = 3,\n withChart,\n className\n}: {\n numberOfRows?: number\n withChart?: boolean\n className?: string\n}) => (\n <Tile\n className={cn(\n 'relative',\n 'w-full',\n 'flex-col',\n 'items-center',\n 'gap-6',\n 'p-6',\n className\n )}\n >\n <div className=\"align-center flex w-full gap-6\">\n {withChart && <SkeletonDoughnutChart />}\n <div className=\"flex grow flex-col gap-6\">\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowNumber) => (\n <SkeletonLoader\n key={rowNumber}\n className=\"bg-grey-200 h-10 w-full min-w-25 rounded-md\"\n />\n )\n )}\n </div>\n </div>\n <SkeletonButton />\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarHeight = (groupIndex: number, columnIndex: number) =>\n Math.round(90 + Math.abs(Math.sin(groupIndex + columnIndex + 1)) * 30)\n\nconst ColumnGroup = ({\n numberOfColumns,\n groupIndex\n}: {\n numberOfColumns: number\n groupIndex: number\n}) => (\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"flex items-end gap-2\">\n {Array.from({ length: numberOfColumns }, (_, i) => (\n <SkeletonLoader\n key={i}\n className=\"h-(--height) w-5 rounded-t-full rounded-b-none\"\n style={{\n '--height': `${getBarHeight(groupIndex, i)}px`\n }}\n />\n ))}\n </div>\n <SkeletonLoader className=\"h-2 w-14 rounded-full\" />\n </div>\n)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonColumnChart = ({\n numberOfLabels = 2,\n numberOfGroups = 7,\n numberOfColumns = 1,\n className\n}: {\n numberOfLabels?: number\n numberOfGroups?: number\n numberOfColumns?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n </div>\n <div className=\"flex items-end justify-between gap-2\">\n {Array.from({ length: numberOfGroups }, (_, i) => (\n <ColumnGroup key={i} numberOfColumns={numberOfColumns} groupIndex={i} />\n ))}\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarWidth = (rowIndex: number) =>\n Math.round(40 + Math.abs(Math.sin(rowIndex + 1)) * 55)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonBarChart = ({\n numberOfLabels = 3,\n numberOfRows = 4,\n numberOfTicks = 4,\n className\n}: {\n numberOfLabels?: number\n numberOfRows?: number\n numberOfTicks?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n <div className=\"flex flex-col justify-between gap-4\">\n {Array.from({ length: numberOfRows }, (_, i) => (\n <div key={i} className=\"flex items-center gap-5\">\n <SkeletonLoader className=\"h-3 w-20 shrink-0 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader\n className=\"h-5 w-(--width) rounded-full\"\n style={{\n '--width': `${getBarWidth(i)}%`\n }}\n />\n </div>\n </div>\n ))}\n <div className=\"flex justify-between pl-24\">\n {Array.from({ length: numberOfTicks }, (_, i) => (\n <SkeletonLoader key={i} className=\"h-2 w-8 rounded-full\" />\n ))}\n </div>\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonPanelList = ({ className }: { className?: string }) => (\n <Tile className={cn('px-6', 'flex-col', 'w-full', className)}>\n <div className=\"border-grey-100 flex flex-wrap items-center gap-4 border-b py-4 last:border-b-0\">\n <SkeletonLoader className=\"size-10 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader className=\"h-4 w-2/3 rounded-full\" />\n </div>\n <SkeletonLoader className=\"h-8 w-28 rounded-md\" />\n </div>\n </Tile>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonSubjectList = ({ className }: { className?: string }) => (\n <Tile\n className={cn(\n 'p-2',\n 'flex-row',\n 'flex-wrap',\n 'items-center',\n 'justify-between',\n 'gap-4',\n 'w-full',\n className\n )}\n >\n <SkeletonLoader className=\"h-22 max-w-xl grow rounded-xl\" />\n <SkeletonLoader className=\"size-10 shrink-0 rounded-md\" />\n </Tile>\n)\n","export { SkeletonLoader as Loader } from './Skeleton'\nexport { SkeletonHeading as Heading } from './SkeletonHeading'\nexport { SkeletonButton as Button } from './SkeletonButton'\nexport { SkeletonTabs as Tabs } from './SkeletonTabs'\nexport { SkeletonDoughnutChart as DoughnutChart } from './SkeletonDoughnutChart'\nexport { SkeletonTable as Table } from './SkeletonTable'\nexport { SkeletonCard as Card } from './SkeletonCard'\nexport { SkeletonColumnChart as ColumnChart } from './SkeletonColumnChart'\nexport { SkeletonBarChart as BarChart } from './SkeletonBarChart'\nexport { SkeletonPanelList as PanelList } from './SkeletonPanelList'\nexport { SkeletonSubjectList as SubjectList } from './SkeletonSubjectList'\n","import { styled } from '../../styled'\n\n/**\n * A flexible flex spacer that expands along the major axis of its containing flex layout.\n * It renders a `div` by default, and takes up any available space.\n */\nexport const Spacer = styled('div', {\n base: ['flex-1', 'justify-self-stretch', 'self-stretch']\n})\n\nSpacer.displayName = 'Spacer'\n","import * as React from 'react'\n\nimport type { Context, StepperProviderProps } from './types'\n\nconst StepperContext = React.createContext<Context>({\n steps: [],\n goToPreviousStep: () => null,\n goToNextStep: () => null,\n goToStep: () => null,\n activeStep: 0,\n viewedSteps: [],\n allowSkip: false,\n direction: 'horizontal',\n hideLabels: false,\n completedSteps: [],\n showCompletedIcons: false\n})\n\nexport const StepperProvider = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction,\n steps,\n hideLabels,\n showCompletedIcons\n}: React.PropsWithChildren<StepperProviderProps>) => {\n const [activeStep, setActiveStep] = React.useState(0)\n\n const [viewedSteps, setviewedSteps] = React.useState<number[]>([0])\n const [completedSteps, setCompletedSteps] = React.useState<number[]>([])\n\n const isControlled = !stepCount\n\n React.useEffect(() => {\n setviewedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n\n onStepChange?.(activeStep)\n }, [activeStep, onStepChange])\n\n const goToNextStep = () => {\n const isCompleted = onComplete && activeStep === stepCount - 1\n const isNextStep = activeStep < stepCount - 1\n\n if (onComplete || isNextStep) {\n setCompletedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n }\n\n if (isCompleted) {\n return onComplete?.()\n }\n if (isNextStep) {\n return setActiveStep((current) => current + 1)\n }\n }\n\n const goToPreviousStep = () => {\n setActiveStep((current) => current - 1)\n }\n\n const goToStep = (index: number) => {\n setActiveStep(index)\n }\n\n return (\n <StepperContext.Provider\n value={{\n steps: steps || Array(stepCount).fill(''),\n goToPreviousStep: isControlled ? undefined : goToPreviousStep,\n goToNextStep: isControlled ? undefined : goToNextStep,\n goToStep: isControlled ? undefined : goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n }}\n >\n {children}\n </StepperContext.Provider>\n )\n}\n\nexport const useStepper = (): Context => {\n const context = React.useContext(StepperContext)\n if (!context)\n throw new Error(\n 'Ensure that you wrap any components with the root component Stepper'\n )\n\n return context\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './Stepper.context'\nimport type { StepperNavigateProps } from './types'\n\nexport const StepperStepBack = ({\n label,\n children,\n ...rest\n}: StepperNavigateProps & React.ComponentProps<typeof Button>) => {\n const { activeStep, goToPreviousStep } = useStepper()\n return (\n <Button\n size=\"sm\"\n appearance=\"outline\"\n {...rest}\n disabled={activeStep === 0}\n onClick={goToPreviousStep}\n >\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import * as React from 'react'\n\nimport { Button } from '../button/Button'\nimport { useStepper } from './Stepper.context'\nimport type { StepperNavigateProps } from './types'\n\nexport const StepperStepForward = ({\n label,\n children,\n onClick,\n ...rest\n}: StepperNavigateProps & Partial<React.ComponentProps<typeof Button>>) => {\n const { goToNextStep, activeStep } = useStepper()\n\n const handleClick = () => {\n if (onClick) {\n return onClick(() => goToNextStep?.())\n }\n goToNextStep?.()\n }\n\n return (\n <Button size=\"sm\" {...rest} onClick={handleClick} className=\"ml-auto\">\n {children || label?.(activeStep)}\n </Button>\n )\n}\n","import { styled } from '../../styled'\n\nexport const StepperStepBullet = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'p-2',\n 'justify-center',\n 'items-center',\n 'size-8',\n 'rounded-[50%]',\n 'border-0',\n 'bg-grey-200',\n 'z-1',\n 'flex-none'\n ],\n variants: {\n status: {\n default: ['bg-grey-200', 'text-grey-700'],\n active: ['bg-white', 'border-2', 'border-current', 'text-primary-900'],\n viewed: ['bg-white', 'border-2', 'border-grey-600', 'text-grey-1000'],\n completed: ['bg-primary-800', 'text-white'],\n reviewed: ['bg-primary-900', 'text-white'],\n success: ['bg-success', 'text-white']\n }\n }\n})\n","import { styled } from '../../styled'\n\nexport const StepperStepContainer = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'font-body',\n 'font-semibold',\n 'text-md',\n 'items-center',\n 'not-last:after:absolute',\n \"not-last:after:content-['']\",\n 'focus-visible:outline-none'\n ],\n variants: {\n canInteract: {\n true: []\n },\n direction: {\n vertical: [\n 'flex-row',\n 'not-last:after:h-full',\n 'not-last:after:left-3.5',\n 'not-last:after:top-1/2',\n 'not-last:after:w-1',\n 'py-3'\n ],\n horizontal: [\n 'flex-col',\n 'not-last:after:h-1',\n 'not-last:after:left-1/2',\n 'not-last:after:top-3.5',\n 'not-last:after:w-full',\n 'px-2'\n ]\n },\n separator: {\n default: ['not-last:after:bg-grey-200'],\n active: ['not-last:after:bg-primary-800'],\n success: ['not-last:after:bg-success'],\n viewed: ['not-last:after:bg-grey-600']\n },\n status: {\n completed: [],\n active: [],\n default: [],\n viewed: [],\n success: [],\n reviewed: []\n }\n },\n compoundVariants: [\n {\n canInteract: true,\n status: 'completed',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:bg-primary-900',\n 'hover:first:text-white!',\n 'hover:last:text-primary-900'\n ]\n },\n {\n canInteract: true,\n status: 'active',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'viewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'reviewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!'\n ]\n }\n ]\n})\n","import { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\nexport const StepperStepLabel = styled(Text, {\n base: ['font-semibold'],\n variants: {\n direction: {\n vertical: ['ml-3', 'text-left'],\n horizontal: ['mt-3', 'text-center']\n },\n status: {\n default: ['font-normal', 'text-grey-700'],\n active: ['text-primary-900'],\n viewed: ['text-grey-1000'],\n completed: ['text-primary-800'],\n success: ['text-success'],\n reviewed: []\n }\n }\n})\n","export enum Status {\n ACTIVE = 'active',\n VIEWED = 'viewed',\n SUCCESS = 'success',\n DEFAULT = 'default',\n COMPLETED = 'completed',\n REVIEWED = 'reviewed'\n}\nexport interface Step {\n label?: string\n status: `${Status}`\n}\n\nexport type Direction = 'vertical' | 'horizontal'\n\nexport type Context = {\n steps: Step[]\n goToPreviousStep?: () => void\n goToNextStep?: () => void\n goToStep?: (index: number) => void\n activeStep: number\n viewedSteps: number[]\n completedSteps: number[]\n allowSkip?: boolean\n direction?: Direction\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport type StepperProviderProps = {\n stepCount: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps: Step[]\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport interface StepperProps {\n className?: string\n stepCount?: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps?: Step[]\n hideLabels?: boolean\n showCompletedIcons?: boolean\n}\n\nexport interface StepperNavigateProps {\n label?: (currentStep?: number) => string\n onClick?: (next: () => void) => void\n}\n\nexport interface StepperStepsProps {\n className?: string\n}\n","import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './Stepper.context'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { type StepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled('div', {\n base: ['flex', 'justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: StepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedSteps.includes(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedSteps.includes(index)) return Status.COMPLETED\n if (viewedSteps.includes(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedSteps.includes(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedSteps.includes(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n","import invariant from 'invariant'\nimport * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { StepperProvider } from './Stepper.context'\nimport { StepperStepBack } from './StepperStepBack'\nimport { StepperStepForward } from './StepperStepForward'\nimport { StepperSteps } from './StepperSteps'\nimport type { StepperProps } from './types'\n\nconst StepperComponent = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction = 'horizontal',\n steps,\n hideLabels = false,\n showCompletedIcons = false,\n className\n}: React.PropsWithChildren<StepperProps>) => {\n invariant(\n !(stepCount && steps),\n '`Stepper` should only be given one of `stepCount` or `steps`. When both are provided, `steps` will be used and `stepCount` will be ignored.'\n )\n\n const count = steps?.length || stepCount || 0\n\n return (\n <StepperProvider\n stepCount={count}\n allowSkip={allowSkip}\n onComplete={onComplete}\n onStepChange={stepCount ? onStepChange : undefined}\n direction={direction}\n steps={steps || Array(count).fill('')}\n hideLabels={hideLabels}\n showCompletedIcons={showCompletedIcons}\n >\n <div aria-label=\"progress\" className={cn('w-full', className)}>\n {children}\n </div>\n </StepperProvider>\n )\n}\n\nexport const Stepper = /* @__PURE__ */ Object.assign(StepperComponent, {\n StepBack: StepperStepBack,\n StepForward: StepperStepForward,\n Steps: StepperSteps\n})\n\nStepperComponent.displayName = 'Stepper'\n","import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'border-none',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n","import { Content } from '@radix-ui/react-tabs'\n\nimport { styled } from '../../styled'\n\nconst StyledTabsContent = styled(Content, {\n base: ['grow', 'font-body']\n})\n\nexport const TabsContent = StyledTabsContent\n\nTabsContent.displayName = 'TabsContent'\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n base: [\n 'absolute',\n 'inset-0',\n 'h-[calc(100%+2px)]',\n 'opacity-0',\n 'bg-(--interactive-1)'\n ]\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n base: [\n 'bg-none',\n 'cursor-pointer',\n 'shrink-0',\n 'p-4',\n 'select-none',\n 'border-b-2',\n 'border-b-transparent',\n 'relative',\n 'data-[state=active]:border-current',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:text-(--interactive-1)',\n 'data-[state=active]:tracking-[-0.005em]',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:text-(--interactive-3)',\n 'not-disabled:focus-visible:[&_div]:opacity-7',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:text-(--interactive-2)',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:[&_div]:opacity-7',\n 'not-disabled:hover:text-(--interactive-2)'\n ]\n})\n\nexport const TabsTrigger = ({\n ref,\n children,\n ...rest\n}: React.ComponentProps<typeof StyledTabsTrigger> & { value: string }) => (\n <StyledTabsTrigger {...rest} ref={ref}>\n <Text size=\"sm\" as=\"span\">\n {children}\n </Text>\n <StyledTabsTriggerHoverBackground />\n </StyledTabsTrigger>\n)\n","import { useEffect, useMemo, useState } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype UseScrollPositionOptions = {\n element?: HTMLElement | null\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype UseScrollPositionOutput = {\n left: number\n top: number\n}\n\nexport const useScrollPosition = ({\n element,\n delay = 500,\n delayMethod = 'throttle'\n}: UseScrollPositionOptions): UseScrollPositionOutput => {\n const [scrollPosition, setScrollPosition] = useState({ left: 0, top: 0 })\n\n const delayMethodFn = useMemo(\n () => (delayMethod === 'debounce' ? debounce : throttle),\n [delayMethod]\n )\n\n useEffect(() => {\n if (!element) return\n\n const handleScroll = delayMethodFn(delay, () => {\n setScrollPosition((prev) =>\n prev.left === element.scrollLeft && prev.top === element.scrollTop\n ? prev\n : { left: element.scrollLeft, top: element.scrollTop }\n )\n })\n\n element.addEventListener('scroll', handleScroll)\n\n return () => {\n element.removeEventListener('scroll', handleScroll)\n }\n }, [element, delayMethodFn, delay])\n\n return scrollPosition\n}\n","import { useCallback, useMemo, useState } from 'react'\n\nimport { useResizeObserver } from './useResizeObserver'\n\ninterface Size {\n width: number | undefined\n height: number | undefined\n}\n\nexport const useSize = ({\n element,\n delay = 500\n}: {\n element?: HTMLElement | null\n delay?: number\n}): Size => {\n const [size, setSize] = useState<Size>({\n width: undefined,\n height: undefined\n })\n\n const handleResize = useCallback(() => {\n const width = element?.clientWidth\n const height = element?.clientHeight\n setSize((prev) =>\n prev.width === width && prev.height === height ? prev : { width, height }\n )\n }, [element])\n\n const elements = useMemo(() => [element], [element])\n\n useResizeObserver({\n delay,\n elements: elements,\n onResize: handleResize\n })\n\n return size\n}\n","import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport { List } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { useScrollPosition } from '../../utilities/hooks/useScrollPosition'\nimport { useSize } from '../../utilities/hooks/useSize'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContainer = styled(ColorScheme, {\n base: ['relative', 'border-b', 'border-b-(--base-4)', 'w-full']\n})\n\nconst StyledTriggerList = styled(List, {\n base: ['shrink-0', 'flex', 'w-full', 'overflow-x-auto', 'scrollbar-none']\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n base: [\n 'h-full!',\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'cursor-pointer',\n 'bg-(--base-1)!',\n 'text-(--interactive-1)!',\n 'rounded-none',\n 'opacity-90'\n ]\n})\n\nconst SCROLL_STEP = 0.8 // Used to scroll 80% of clientWidth\n\nexport const TabsTriggerList = ({\n children,\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: TcolorScheme\n}) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width } = useSize({ element: listRef, delay: 500 })\n const { left } = useScrollPosition({\n element: listRef,\n delay: 100,\n delayMethod: 'debounce'\n })\n\n const canScrollXAxis = React.useMemo(() => {\n if (!listRef) return false\n return listRef.scrollWidth > listRef.clientWidth\n }, [width, listRef])\n\n const canScrollLeft = React.useMemo(() => {\n if (!canScrollXAxis) return false\n return left > 0\n }, [left, canScrollXAxis])\n\n const canScrollRight = React.useMemo(() => {\n if (!listRef || !canScrollXAxis) return false\n return listRef.scrollWidth - left - listRef.clientWidth > 1 // 1 rather than 0 to account for sub-pixel widths and calculations\n }, [listRef, left, canScrollXAxis])\n\n const scrollList = React.useCallback(\n (stepModifier) => {\n if (!listRef) return\n listRef.scroll({\n left: listRef.scrollLeft + listRef.clientWidth * stepModifier,\n behavior: 'smooth'\n })\n },\n [listRef]\n )\n\n return (\n <StyledContainer\n base=\"grey1\"\n accent=\"primary1\"\n interactive=\"hiContrast\"\n {...colorScheme}\n {...rest}\n >\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {canScrollLeft && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n onClick={() => scrollList(-SCROLL_STEP)}\n tabIndex={-1}\n className=\"left-0\"\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n {canScrollRight && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n onClick={() => scrollList(SCROLL_STEP)}\n tabIndex={-1}\n className=\"right-0\"\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n","import { Root } from '@radix-ui/react-tabs'\n\nimport { styled } from '../../styled'\nimport { TabsContent } from './TabsContent'\nimport { TabsTrigger } from './TabsTrigger'\nimport { TabsTriggerList } from './TabsTriggerList'\n\n// Non-polymorphic: Root is a Radix behavioural primitive, so retargeting it\n// via `as` would discard its keyboard/aria handling. This also gives the\n// component a single call signature, so React.ComponentProps infers cleanly\n// from the Object.assign intersection without a hand-written interface.\nconst StyledRoot = styled(\n Root,\n {\n base: ['w-full']\n },\n { enablePolymorphism: false }\n)\n\nexport const Tabs = /* @__PURE__ */ Object.assign(StyledRoot, {\n TriggerList: TabsTriggerList,\n Trigger: TabsTrigger,\n Content: TabsContent,\n displayName: 'Tabs'\n})\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\n\nexport const Textarea = styled(\n 'textarea',\n {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'm-0',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'resize-y',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n },\n { enablePolymorphism: false }\n)\n\nexport type TextareaProps = React.ComponentProps<typeof Textarea>\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n type FieldElementWrapperProps,\n FieldWrapper\n} from '../field-wrapper/FieldWrapper'\nimport { useFieldError } from '../form/useFieldError'\nimport { useFormCustomContext } from '../form/useFormCustomContext'\nimport { Textarea, type TextareaProps } from '../textarea/Textarea'\n\ntype TextareaFieldProps = TextareaProps & FieldElementWrapperProps\n\nexport const TextareaField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...rest\n}: TextareaFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Textarea\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...rest}\n />\n </FieldWrapper>\n )\n}\n\nTextareaField.displayName = 'TextareaField'\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport type { NavigatorActions } from '../../types/navigatorActions.types'\nimport type { Override } from '../../utilities/types'\nimport { Tile } from '../tile/Tile'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TileInteractiveProps = Override<\n React.ComponentProps<typeof StyledTileInteractive> &\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n NavigatorActions,\n { as?: React.ElementType }\n>\n\nexport const TileInteractive = ({\n ref,\n onClick,\n href,\n type = 'button',\n as,\n ...rest\n}: TileInteractiveProps) => {\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || 'a',\n href,\n onClick: undefined\n }\n : {\n as: as || 'button',\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n}\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { TileInteractive } from '../tile-interactive/TileInteractive'\n\nconst StyledTileToggleGroupItem = styled(TileInteractive, {\n base: [\n 'text-left',\n 'not-disabled:data-[state=on]:active:bg-(--interactive-3)',\n 'not-disabled:data-[state=on]:hover:bg-(--interactive-2)',\n 'data-[state=on]:before:-inset-px',\n 'data-[state=on]:before:absolute',\n 'data-[state=on]:before:rounded-[inherit]',\n 'data-[state=on]:before:inset-shadow-[var(--accent-8)_0px_0px_0px_2px]',\n 'data-[state=on]:before:z-1',\n 'data-[state=on]:bg-(--interactive-1)',\n 'data-[state=on]:border-(--accent-8)'\n ]\n})\n\ntype TileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledTileToggleGroupItem>\n\nexport const TileToggleGroupItem = ({\n children,\n ...rest\n}: TileToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledTileToggleGroupItem as=\"button\">\n {children}\n </StyledTileToggleGroupItem>\n </ToggleGroup.Item>\n)\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\n\ntype TileToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = ({\n ref,\n orientation,\n className,\n ...rest\n}: TileToggleGroupRootProps) => (\n <ToggleGroup.Root\n ref={ref}\n {...rest}\n className={cn(\n 'flex',\n 'gap-2',\n orientation === 'horizontal' && 'flex-row',\n orientation === 'vertical' && 'flex-col',\n 'flex-wrap',\n className\n )}\n />\n)\n","import { TileToggleGroupItem } from './TileToggleGroupItem'\nimport { TileToggleGroupRoot } from './TileToggleGroupRoot'\n\ntype TileToggleGroup = typeof TileToggleGroupRoot & {\n Item: typeof TileToggleGroupItem\n}\n\nexport const TileToggleGroup = TileToggleGroupRoot as TileToggleGroup\nTileToggleGroup.Item = TileToggleGroupItem\n","import * as React from 'react'\nimport type { Toast } from 'react-hot-toast'\n\nexport const ToastContext = React.createContext<Pick<\n Toast,\n 'type' | 'id' | 'message'\n> | null>(null)\n\nexport const useToastContext = () => {\n const context = React.useContext(ToastContext)\n\n if (!context) {\n throw new Error('useToastContext must be used within a ToastProvider')\n }\n\n return context\n}\n","import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { toast } from 'react-hot-toast'\n\nimport { cn } from '../../styled'\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { useToastContext } from './Toast.context'\n\nexport interface ToastCloseButtonProps extends Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'label' | 'children'\n> {\n onDismiss?: () => void\n label?: string\n}\n\nexport const ToastCloseButton = ({\n onDismiss,\n label = 'Close alert',\n ...rest\n}: ToastCloseButtonProps) => {\n const { id } = useToastContext()\n\n return (\n <ActionIcon\n label={label}\n onClick={() => {\n toast.dismiss(id)\n onDismiss?.()\n }}\n {...rest}\n className={cn(\n 'text-white',\n '-mr-2',\n 'hover:opacity-80',\n 'hover:text-white',\n 'focus:opacity-80',\n 'focus:text-white'\n )}\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const ToastIcon = (props: React.ComponentProps<typeof Icon>) => (\n <Icon size=\"sm\" {...props} className=\"mr-3 flex-[0_0_auto]\" />\n)\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useToastContext } from './Toast.context'\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nconst ToastComponent = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n const styledType = type === 'custom' ? undefined : type\n return <StyledToast type={props.type || styledType} {...props} />\n}\n\nexport const Toast = /* @__PURE__ */ Object.assign(ToastComponent, {\n Icon: ToastIcon,\n Close: ToastCloseButton\n})\n","import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '../../styled'\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './Toast.context'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './Toast.context'\n\nconst ToastProviderBase = /* @__PURE__ */ styled('div', {\n base: ['fixed', 'z-2147483647', 'inset-2', 'pointer-events-none', 'sm:top-3']\n})\n\nconst ToastWrapper = /* @__PURE__ */ styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast, {\n reverseOrder: true,\n gutter: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.ariaProps.role}\n aria-live={toast.ariaProps['aria-live']}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n","import { Toast as ToastBase } from './Toast'\nimport { ToastProvider } from './ToastProvider'\n\nexport { toast } from './ToastProvider'\n\n// Assembled here rather than in Toast.tsx: ToastProvider imports Toast to\n// render it, so attaching Provider inside Toast.tsx would create a circular\n// import whose init order depends on the entry module. This module sits\n// above both files in the import graph, so no cycle.\nexport const Toast = /* @__PURE__ */ Object.assign(ToastBase, {\n Provider: ToastProvider\n})\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\n\nimport { styled } from '../../styled'\n\nexport const standardVariant = [\n 'before:bg-grey-600',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'text-grey-800',\n 'data-[state=on]:border-current!',\n 'data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'data-[state=on]:text-primary-800',\n 'not-disabled:data-[state=on]:before:bg-none',\n 'not-disabled:focus-visible:before:bg-none',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:before:bg-none',\n 'not-disabled:hover:border-current!',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const modernVariant = [\n 'bg-grey-200',\n 'border-0',\n 'text-grey-800',\n 'overflow-hidden',\n 'rounded-md',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:border!',\n 'data-[state=on]:border-grey-200!',\n 'data-[state=on]:shadow-none!',\n 'data-[state=on]:text-grey-900',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px_white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const ToggleGroupItem = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n defaultVariants: {\n theme: 'standard'\n }\n },\n { enablePolymorphism: false }\n)\n","import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Icon } from '../icon/Icon'\nimport { modernVariant, standardVariant } from './ToggleGroupItem'\n\nexport const StyledButton = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'grow',\n 'flex',\n 'items-center',\n 'justify-center',\n 'font-semibold',\n 'leading-none',\n 'py-1'\n ],\n variants: {\n size: {\n sm: ['*:not-last:mr-2', 'min-h-8', 'px-4', 'text-sm'],\n md: ['*:not-last:mr-3', 'min-h-10', 'px-8', 'text-md'],\n lg: ['*:not-last:mr-3', 'min-h-12', 'px-8', 'text-lg']\n },\n isIconOnly: {\n true: []\n },\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n compoundVariants: [\n {\n isIconOnly: true,\n size: 'sm',\n class: ['min-w-8', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'sm',\n theme: 'modern',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n theme: 'modern',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n theme: 'modern',\n class: ['min-w-15', 'p-0']\n }\n ]\n },\n { enableResponsiveVariants: true }\n)\n\nexport const ToggleGroupButton = ({\n ref,\n size = 'md',\n theme = 'standard',\n children,\n ...rest\n}: React.ComponentProps<typeof StyledButton>) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n const isIconOnly =\n isSingleChild &&\n React.isValidElement(childrenArray[0]) &&\n childrenArray[0]?.type === Icon\n\n return (\n <StyledButton\n ref={ref}\n size={size}\n isIconOnly={isIconOnly}\n theme={theme}\n {...rest}\n >\n {\n childrenArray.map((child) => {\n if (\n !isSingleChild &&\n (typeof child === 'string' || typeof child === 'number')\n )\n return <span key={child}>{child}</span>\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n )\n ) {\n if (child?.type === Icon)\n return React.cloneElement(child, { ...child.props, size })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledButton>\n )\n}\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { ToggleGroup } from '../../utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n gap?: 0 | 1 | 2 | 3\n wrap?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst gapClassMap = {\n 0: 'gap-0.5',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3'\n}\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = ({\n ref,\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n}: React.ComponentProps<typeof StyledRoot> & RootType) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n hasGap && gapClassMap[gap],\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap ? 'flex-wrap' : 'flex-nowrap'\n )}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement<{ theme?: typeof theme }>(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </div>\n </StyledRoot>\n )\n}\n","import { ToggleGroupButton as Button } from './ToggleGroupButton'\nimport { ToggleGroupItem as Item } from './ToggleGroupItem'\nimport { ToggleGroupRoot as Root } from './ToggleGroupRoot'\n\nexport const ToggleGroup = { Item, Button, Root }\n","import { useEffect, useMemo, useState } from 'react'\nimport { debounce, throttle } from 'throttle-debounce'\n\ntype UseWindowScrollPositionOptions = {\n delay?: number\n delayMethod?: 'throttle' | 'debounce'\n}\n\ntype UseWindowScrollPositionOutput = {\n x: number\n y: number\n}\n\nexport const useWindowScrollPosition = ({\n delay = 500,\n delayMethod = 'throttle'\n}: UseWindowScrollPositionOptions = {}): UseWindowScrollPositionOutput => {\n const [scrollPosition, setScrollPosition] = useState({ x: 0, y: 0 })\n\n const delayMethodFn = useMemo(\n () => (delayMethod === 'debounce' ? debounce : throttle),\n [delayMethod]\n )\n\n useEffect(() => {\n const handleScroll = delayMethodFn(delay, () => {\n setScrollPosition({ x: window.scrollX, y: window.scrollY })\n })\n\n window.addEventListener('scroll', handleScroll)\n\n return () => {\n window.removeEventListener('scroll', handleScroll)\n }\n }, [delayMethodFn, delay])\n\n return scrollPosition\n}\n","const light = {\n '--background': 'white',\n '--divider': 'var(--color-grey-200)',\n '--border-bottom': 'var(--color-grey-200)'\n}\n\nexport const colorSchemes = {\n light\n}\n","import * as React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\ntype TopBarActionIconProps = Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'size' | 'children'\n> & {\n icon: React.FC<React.SVGProps<SVGSVGElement>>\n label: string\n}\n\nexport const TopBarActionIcon = ({\n ref,\n icon,\n ...rest\n}: TopBarActionIconProps) => (\n <ActionIcon size=\"md\" appearance=\"simple\" theme=\"neutral\" ref={ref} {...rest}>\n <Icon is={icon} />\n </ActionIcon>\n)\n","import * as React from 'react'\n\nimport { styled, cn } from '../../styled'\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const TopBarBrandLogo = ({\n src,\n alt = 'Atom Learning logo',\n className\n}: Pick<React.ComponentProps<typeof Image>, 'src' | 'alt'> & {\n className?: string\n}) => (\n <Image\n src={src}\n alt={alt}\n className={cn('h-8', 'mr-3', 'w-auto', className)}\n />\n)\n\nexport const TopBarBrandName = styled(Text, {\n base: ['text-grey-800']\n})\n\nexport const TopBarBrand = styled('a', {\n base: [\n 'flex',\n 'items-center',\n 'no-underline',\n 'text-grey-800',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n","import * as React from 'react'\n\nimport { styled, Theme } from '../../styled'\nimport { useWindowScrollPosition } from '../../utilities/hooks/useWindowScrollPosition'\nimport { Divider } from '../divider/Divider'\nimport { colorSchemes as topBarColorSchemes } from './TopBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" className=\"bg-divider h-6\" />\n)\n\nconst StyledRoot = styled(\n 'header',\n {\n base: [\n 'bg-(--background)',\n 'sticky',\n 'flex',\n 'items-center',\n 'z-15',\n 'transition-shadow',\n 'duration-200',\n 'ease-out'\n ],\n variants: {\n hasScrolled: {\n true: ['shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]']\n },\n size: {\n md: ['h-16'],\n lg: ['h-24']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n },\n appearance: {\n standard: [\n 'w-screen',\n 'max-w-full',\n 'top-0',\n 'border-b',\n 'border-b-(--border-bottom)'\n ],\n rounded: [\n 'w-full',\n 'top-2',\n 'p-2',\n 'border',\n 'border-white',\n 'rounded-full'\n ]\n }\n }\n },\n {\n enableResponsiveVariants: true\n }\n)\n\nconst Container = styled('div', {\n base: ['flex', 'items-center', 'h-10', 'mx-4', 'w-full', 'md:mx-8']\n})\n\ntype TopBarProps = React.ComponentProps<typeof StyledRoot> &\n React.ComponentProps<typeof Container> &\n React.ComponentProps<typeof Theme>\n\nconst TopBarComponent = ({\n size = 'md',\n diffused,\n theme,\n appearance = 'standard',\n ...rest\n}: React.PropsWithChildren<TopBarProps>) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <Theme theme={theme || topBarColorSchemes['light']}>\n <StyledRoot\n hasScrolled={!!scrollPositionY}\n diffused={diffused}\n appearance={appearance}\n size={size}\n >\n <Container {...rest} />\n </StyledRoot>\n </Theme>\n )\n}\n\nexport const TopBar = /* @__PURE__ */ Object.assign(TopBarComponent, {\n Brand: TopBarBrand,\n BrandLogo: TopBarBrandLogo,\n BrandName: TopBarBrandName,\n ActionIcon: TopBarActionIcon,\n Divider: TopBarDivider\n})\n\nTopBarComponent.displayName = 'TopBar'\n","import * as React from 'react'\n// Note: Only loading vimeo to reduce the bundle size https://www.npmjs.com/package/react-player\nimport ReactPlayer from 'react-player/vimeo.js'\n\nimport { CSSWrapper } from '../../utilities/css-wrapper/CSSWrapper'\nimport type { Override } from '../../utilities/types'\n\ntype VideoProps = Override<\n React.ComponentProps<typeof ReactPlayer>,\n {\n id: string\n ratio?: number\n className?: string\n ref?: React.Ref<ReactPlayer>\n }\n>\n\nexport const Video = ({\n ref,\n id,\n ratio = 9 / 16,\n className,\n ...rest\n}: VideoProps) => (\n <CSSWrapper className={className}>\n <div\n style={{ '--ratio': `${ratio * 100}%` }}\n className=\"relative h-0 w-full overflow-hidden rounded-sm pt-(--ratio)\"\n >\n <ReactPlayer\n {...rest}\n role=\"figure\"\n url={`https://player.vimeo.com/video/${id}`}\n height=\"100%\"\n width=\"100%\"\n ref={ref}\n className=\"absolute top-0 left-0\"\n />\n </div>\n </CSSWrapper>\n)\n","import { Slot } from '@radix-ui/react-slot'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { useCallbackRefState } from '../../utilities/hooks/useCallbackRef'\nimport { Text } from '../text/Text'\n\ntype KeyboardEventWindowOrElement =\n | KeyboardEvent\n | React.KeyboardEvent<HTMLDivElement>\ntype ShortcutConfig = Partial<KeyboardEvent>\n\ntype KeyboardShortcutProps = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean\n config: {\n shortcut: ShortcutConfig\n action: ({\n event,\n shortcut\n }: {\n event: KeyboardEvent | React.KeyboardEvent<HTMLDivElement>\n shortcut: ShortcutConfig\n }) => void\n }[]\n targetWindow?: boolean\n onKeyDown?: (e: KeyboardEventWindowOrElement) => void\n ref?: React.Ref<HTMLDivElement>\n}\n\nexport const KeyboardShortcut = ({\n ref,\n asChild,\n config,\n targetWindow = false,\n onKeyDown,\n ...rest\n}: KeyboardShortcutProps) => {\n const [targetElRef, setTargetElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => targetElRef as HTMLDivElement)\n\n const handleOnKeydown = React.useCallback(\n (e: KeyboardEventWindowOrElement) => {\n config.forEach(({ shortcut, action }) => {\n if (Object.entries(shortcut).every(([key, value]) => e[key] === value))\n action({ event: e, shortcut })\n })\n onKeyDown?.(e)\n },\n [config, onKeyDown]\n )\n\n React.useEffect(() => {\n if (targetWindow) window.addEventListener('keydown', handleOnKeydown)\n\n return () => {\n window.removeEventListener('keydown', handleOnKeydown)\n }\n }, [targetWindow, handleOnKeydown])\n\n const Component = asChild ? Slot : 'div'\n\n return (\n <Component\n onKeyDown={targetWindow ? undefined : handleOnKeydown}\n ref={setTargetElRef}\n {...rest}\n />\n )\n}\n\nconst StyledKeyboardShortcutIndicator = /* @__PURE__ */ styled(Text, {\n base: [\n 'bg-grey-100',\n 'text-text-subtle',\n 'px-2',\n 'py-0.5',\n 'min-w-6',\n 'min-h-6',\n 'font-normal',\n 'inline-flex',\n 'justify-center',\n 'items-center',\n 'rounded-md',\n 'shrink-0',\n 'capsize-none'\n ]\n})\n\ntype KeyboardShortcutIndicatorProps = React.ComponentProps<\n typeof StyledKeyboardShortcutIndicator\n>\n\nexport const KeyboardShortcutIndicator = (\n props: KeyboardShortcutIndicatorProps\n) => {\n return <StyledKeyboardShortcutIndicator size=\"sm\" as=\"kbd\" {...props} />\n}\n","import {\n KeyboardShortcut as KeyboardShortcutComponent,\n KeyboardShortcutIndicator\n} from './KeyboardShortcut'\n\nexport const KeyboardShortcut = /* @__PURE__ */ Object.assign(\n KeyboardShortcutComponent,\n {\n Indicator: KeyboardShortcutIndicator\n }\n)\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\nimport type { SegmentedControlRootProps } from './SegmentedControlRoot'\n\nexport interface SegmentedControlContextValue extends Pick<\n React.ComponentProps<typeof Tabs>,\n 'defaultValue' | 'value' | 'onValueChange'\n> {\n size: SegmentedControlRootProps['size']\n theme: SegmentedControlTheme\n}\n\nexport const SegmentedControlContext =\n React.createContext<SegmentedControlContextValue>({\n size: 'md',\n theme: 'primary',\n defaultValue: '',\n value: '',\n onValueChange: () => null\n })\n","import * as React from 'react'\n\nimport { cn } from '../../styled'\nimport { Badge } from '../badge/Badge'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst badgeSizeMap = {\n sm: 'xs',\n md: 'xs',\n lg: 'sm'\n}\n\nexport const SegmentedControlBadge = ({\n className,\n ...rest\n}: Omit<React.ComponentProps<typeof Badge>, 'size'>) => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return (\n <Badge\n {...rest}\n size={badgeSizeMap[size as string]}\n className={cn('border-none', 'font-normal', className)}\n />\n )\n}\n","import * as React from 'react'\n\nimport { Tabs } from '../tabs/Tabs'\n\nexport const SegmentedControlContent = Tabs.Content\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledText = styled(\n Text,\n {\n base: ['font-body', 'text-text-subtle', 'font-normal'],\n variants: {\n size: {\n sm: ['text-xs', 'leading-[1.6]'],\n md: ['text-sm', 'leading-[1.53]'],\n lg: ['text-md', 'leading-normal']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlDescription = (\n props: Omit<React.ComponentProps<typeof StyledText>, 'size'>\n) => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return <StyledText {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Text } from '../text/Text'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledHeading = styled(\n Text,\n {\n base: ['font-body', 'text-text-regular'],\n variants: {\n size: {\n sm: ['text-sm', 'leading-[1.53]'],\n md: ['text-md', 'leading-normal'],\n lg: ['text-lg', 'leading-[1.52]']\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlHeading = (\n props: Omit<React.ComponentProps<typeof StyledHeading>, 'size'>\n) => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return <StyledHeading {...props} size={size} />\n}\n","import * as React from 'react'\n\nimport { Icon } from '../icon/Icon'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst sizeMap = {\n sm: 'sm',\n md: 'md',\n lg: 'md'\n}\n\nexport const SegmentedControlIcon = (\n props: Omit<React.ComponentProps<typeof Icon>, 'size'>\n) => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return (\n <Icon\n {...(props as React.ComponentProps<typeof Icon>)}\n size={sizeMap[size as string]}\n />\n )\n}\n","import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { SegmentedControlContext } from './SegmentedControl.context'\n\nconst StyledItem = styled(\n Trigger,\n {\n base: [\n 'relative',\n 'bg-transparent',\n 'rounded-md',\n 'z-2',\n 'min-w-35',\n 'border-2',\n 'border-transparent',\n 'cursor-pointer',\n 'select-none',\n 'flex',\n 'flex-col',\n 'items-center',\n 'justify-center',\n 'data-[state=active]:border-2',\n 'data-[state=active]:border-transparent',\n 'data-[state=active]:focus-visible:border-primary-800',\n 'data-[state=active]:focus-visible:shadow-none',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:shadow-none',\n 'data-[state=active]:text-(--text-bold)',\n 'data-[state=inactive]:font-normal',\n 'data-[state=inactive]:text-grey-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'focus-visible:outline-none'\n ],\n variants: {\n theme: {\n primary: [\n 'data-[state=inactive]:hover:bg-primary-300',\n 'focus-visible:border-primary-800'\n ],\n marsh: [\n 'data-[state=inactive]:hover:bg-marsh-300',\n 'focus-visible:border-marsh-800'\n ]\n },\n size: {\n sm: ['flex-[unset]', 'gap-3', 'px-6', 'py-4'],\n md: ['flex-1', 'gap-4', 'px-4', 'py-6'],\n lg: ['flex-1', 'gap-4', 'px-4', 'py-6']\n }\n },\n defaultVariants: {\n size: 'md',\n theme: 'primary'\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport const SegmentedControlItem = ({\n ref,\n children,\n ...rest\n}: Omit<React.ComponentProps<typeof StyledItem>, 'size'>) => {\n const { size, theme } = React.useContext(SegmentedControlContext)\n\n return (\n <StyledItem {...rest} theme={theme} size={size} ref={ref}>\n {children}\n </StyledItem>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Tabs } from '../tabs/Tabs'\nimport { SegmentedControlContext } from './SegmentedControl.context'\nimport { SegmentedControlItem } from './SegmentedControlItem'\n\nconst StyledTriggerList = styled(Tabs.TriggerList, {\n base: [\n 'relative',\n 'p-1',\n 'rounded-lg',\n 'overflow-hidden',\n '[&>div[role=tablist]]:relative',\n '[&>button]:z-2'\n ],\n variants: {\n theme: {\n primary: ['bg-primary-200'],\n marsh: ['bg-marsh-200']\n }\n }\n})\n\nconst SelectionIndicator = styled('div', {\n base: ['absolute', 'bg-white', 'rounded-md'],\n variants: {\n interacted: {\n true: ['duration-300', 'ease-in', 'transition-all'],\n false: ['transition-none']\n }\n }\n})\n\nexport const SegmentedControlItemList = (\n props: React.ComponentProps<typeof Tabs.TriggerList>\n) => {\n const { theme, defaultValue, value } = React.useContext(\n SegmentedControlContext\n )\n\n const tabsRef = React.useRef<(HTMLElement | null)[]>([])\n\n const selectedIndex = React.Children.toArray(props.children).findIndex(\n (child) =>\n (\n child as React.ReactElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >\n )?.props.value === value\n )\n\n const [indicatorStyles, setIndicatorStyles] = React.useState({\n left: 0,\n height: 0,\n width: 0\n })\n const [hasInteracted, setHasInteracted] = React.useState(false)\n\n const updateIndicatorPosition = React.useCallback(() => {\n const currentTab = tabsRef.current[selectedIndex]\n if (!currentTab) return\n\n const { width, height } = currentTab.getBoundingClientRect()\n setIndicatorStyles({\n left: Math.round(currentTab.offsetLeft),\n height: Math.round(height),\n width: Math.round(width)\n })\n }, [selectedIndex])\n\n React.useEffect(() => {\n const resizeObserver = new ResizeObserver(updateIndicatorPosition)\n const currentTabs = tabsRef.current\n currentTabs.forEach((tab) => {\n if (tab) resizeObserver.observe(tab)\n })\n\n return () => {\n currentTabs.forEach((tab) => {\n if (tab) resizeObserver.unobserve(tab)\n })\n resizeObserver.disconnect()\n }\n }, [selectedIndex, updateIndicatorPosition])\n\n React.useEffect(() => {\n window.addEventListener('resize', updateIndicatorPosition)\n return () => {\n window.removeEventListener('resize', updateIndicatorPosition)\n }\n }, [updateIndicatorPosition])\n\n React.useEffect(() => {\n updateIndicatorPosition()\n }, [selectedIndex, updateIndicatorPosition])\n\n return (\n <StyledTriggerList theme={theme} defaultValue={defaultValue} {...props}>\n <SelectionIndicator interacted={hasInteracted} style={indicatorStyles} />\n {React.Children.map(props.children, (child, index) => {\n if (\n !React.isValidElement<\n React.ComponentProps<typeof SegmentedControlItem>\n >(child)\n ) {\n throw new Error(\n `Child passed to SegmentedControlItemList is not a valid element`\n )\n }\n\n return React.cloneElement(child, {\n onClick: (e) => {\n setHasInteracted(true)\n if (child.props.onClick) child.props.onClick(e)\n },\n ref: (el: HTMLElement | null) => {\n tabsRef.current[index] = el\n }\n })\n })}\n </StyledTriggerList>\n )\n}\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { Tabs } from '../tabs/Tabs'\nimport { SegmentedControlContext } from './SegmentedControl.context'\nimport type { SegmentedControlTheme } from './SegmentedControl.types'\n\nconst StyledSegmentedControlRoot = styled(\n Tabs,\n {\n base: ['[&>div]:border-none'],\n variants: {\n size: {\n sm: ['w-[unset]!'],\n md: [],\n lg: []\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\nexport interface SegmentedControlRootProps extends React.ComponentProps<\n typeof StyledSegmentedControlRoot\n> {\n theme?: SegmentedControlTheme\n}\n\nexport const SegmentedControlRoot = ({\n size,\n theme = 'primary',\n defaultValue,\n children,\n value,\n onValueChange,\n ...rest\n}: React.PropsWithChildren<SegmentedControlRootProps>) => {\n const isControlled = value !== undefined\n\n const [internalValue, setInternalValue] = React.useState(defaultValue)\n\n const currentValue = isControlled ? value : internalValue\n const handleValueChange = isControlled ? onValueChange : setInternalValue\n\n React.useEffect(() => {\n if (!isControlled && defaultValue) {\n setInternalValue(defaultValue)\n }\n }, [defaultValue, isControlled])\n\n const contextValue = React.useMemo(\n () => ({\n size,\n theme,\n defaultValue,\n onValueChange: handleValueChange,\n value: currentValue\n }),\n [size, theme, defaultValue, handleValueChange, currentValue]\n )\n\n return (\n <SegmentedControlContext.Provider value={contextValue}>\n <StyledSegmentedControlRoot\n size={size}\n value={currentValue}\n onValueChange={handleValueChange}\n {...rest}\n >\n {children}\n </StyledSegmentedControlRoot>\n </SegmentedControlContext.Provider>\n )\n}\n","import { SegmentedControlBadge } from './SegmentedControlBadge'\nimport { SegmentedControlContent } from './SegmentedControlContent'\nimport { SegmentedControlDescription } from './SegmentedControlDescription'\nimport { SegmentedControlHeading } from './SegmentedControlHeading'\nimport { SegmentedControlIcon } from './SegmentedControlIcon'\nimport { SegmentedControlItem } from './SegmentedControlItem'\nimport { SegmentedControlItemList } from './SegmentedControlItemList'\nimport { SegmentedControlRoot } from './SegmentedControlRoot'\n\nexport const SegmentedControl = {\n Root: SegmentedControlRoot,\n Item: SegmentedControlItem,\n Heading: SegmentedControlHeading,\n Description: SegmentedControlDescription,\n Icon: SegmentedControlIcon,\n Content: SegmentedControlContent,\n Badge: SegmentedControlBadge,\n ItemList: SegmentedControlItemList\n}\n","import * as React from 'react'\n\nimport type { FileDropContextValue } from './types'\n\nexport const FileDropContext = React.createContext<FileDropContextValue>({\n isDragging: false,\n files: []\n})\n","import * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { FileDropContext } from './FileDrop.context'\nimport { type FileDropContextValue } from './types'\n\ninterface FileDropProps extends Omit<\n React.ComponentProps<'div'>,\n 'onDrop' | 'ref' | 'children'\n> {\n onDrop: (files: File[]) => void\n children?:\n | React.ReactNode\n | ((value: FileDropContextValue) => React.ReactNode)\n accept?: React.InputHTMLAttributes<HTMLInputElement>['accept']\n multiple?: React.InputHTMLAttributes<HTMLInputElement>['multiple']\n}\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-6',\n 'items-center',\n 'border',\n 'border-dashed',\n 'border-grey-500',\n 'px-12',\n 'py-8',\n 'rounded-md',\n 'cursor-pointer',\n '**:pointer-events-none'\n ]\n})\n\nexport const FileDrop = ({\n children,\n accept,\n multiple,\n onDrop,\n ...rest\n}: FileDropProps) => {\n const [isDragging, setIsDragging] = React.useState(false)\n const [files, setFiles] = React.useState<File[]>([])\n const fileUploadInputRef = React.useRef<HTMLInputElement>(null)\n\n const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {\n event.preventDefault()\n setIsDragging(true)\n }\n\n const handleDragLeave = () => setIsDragging(false)\n\n const handleDrop = (fileList: FileList | null) => {\n if (!fileList) return\n\n setIsDragging(false)\n\n const files = Array.from(fileList)\n onDrop(files)\n setFiles(files)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (['Space', 'Enter'].includes(event.key)) {\n fileUploadInputRef.current?.click()\n }\n }\n\n const value: FileDropContextValue = { isDragging, files }\n\n return (\n <FileDropContext.Provider value={value}>\n <StyledContainer\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={(event) => {\n event.preventDefault()\n handleDrop(event.dataTransfer.files)\n }}\n onClick={() => fileUploadInputRef.current?.click()}\n role=\"button\"\n onKeyDown={handleKeyDown}\n tabIndex={0}\n {...rest}\n >\n {typeof children === 'function' ? children(value) : children}\n <input\n type=\"file\"\n ref={fileUploadInputRef}\n style={{ visibility: 'hidden' }}\n accept={accept}\n multiple={multiple}\n onChange={(event) => {\n handleDrop(event.target.files)\n }}\n />\n </StyledContainer>\n </FileDropContext.Provider>\n )\n}\n\nFileDrop.displayName = 'FileDrop'\n","import * as React from 'react'\n\nimport { FileDropContext } from './FileDrop.context'\nimport type { FileDropContextValue } from './types'\n\nexport const useFileDrop = (): FileDropContextValue =>\n React.useContext(FileDropContext)\n","import { AlertProvider } from './alert-dialog/AlertDialog.context'\n\nexport type { ValidationOptions } from './form/validation'\n\nexport { Accordion } from './accordion/Accordion'\nexport { ActionIcon } from './action-icon/ActionIcon'\nexport { AlertDialog } from './alert-dialog/AlertDialog'\nexport { useAlert } from './alert-dialog/AlertDialog.context'\n\n// The alert system's provider lives under the `Alert` name; the alert UI\n// itself is imperative (`useAlert`), so there is no root component to render.\nexport const Alert = { Provider: AlertProvider }\nexport { Avatar } from './avatar/Avatar'\nexport { Badge, type BadgeProps } from './badge/Badge'\nexport { BannerRegular } from './banner/banner-regular/BannerRegular'\nexport { BannerSlim } from './banner/banner-slim/BannerSlim'\nexport { Box } from './box/Box'\nexport { Button, StyledButton } from './button/Button'\nexport { Carousel, useCarousel } from './carousel/Carousel'\nexport { Checkbox } from './checkbox/Checkbox'\nexport { CheckboxGroup } from './checkbox-group/CheckboxGroup'\nexport { CheckboxTree } from './checkbox-tree/CheckboxTree'\nexport { CheckboxField } from './checkbox-field/CheckboxField'\nexport { Chip } from './chip/Chip'\nexport { ChipGroup } from './chip/ChipGroup'\nexport { ChipDismissibleGroup } from './chip-dismissible-group'\nexport { ChipToggleGroup } from './chip-toggle-group'\nexport { Combobox } from './combobox/Combobox'\nexport { CreatePasswordField } from './create-password-field/CreatePasswordField'\nexport { DataTable } from './data-table/DataTable'\nexport { useDataTable } from './data-table/DataTable.context'\nexport { DateField } from './date-field/DateField'\nexport { DateInput } from './date-input/DateInput'\nexport { Dialog } from './dialog/Dialog'\nexport { Dismissible } from './dismissible'\nexport { DismissibleGroup } from './dismissible-group'\nexport { Divider } from './divider/Divider'\nexport { Drawer } from './drawer/Drawer'\nexport { DropdownMenu } from './dropdown-menu/DropdownMenu'\nexport { EmptyState } from './empty-state/EmptyState'\nexport { FieldWrapper } from './field-wrapper/FieldWrapper'\nexport { InlineFieldWrapper } from './field-wrapper/InlineFieldWrapper'\nexport { FileInput } from './file-input/FileInput'\nexport { Flex } from './flex/Flex'\nexport { Form } from './form/Form'\nexport { Grid } from './grid/Grid'\nexport { Heading, type HeadingProps } from './heading/Heading'\nexport { Icon } from './icon/Icon'\nexport { Image } from './image/Image'\nexport { InlineMessage } from './inline-message/InlineMessage'\nexport { Input, InputBackground, InputText } from './input/Input'\nexport { InputField } from './input-field/InputField'\nexport { Label } from './label/Label'\nexport { Link, StyledLink } from './link/Link'\nexport { List } from './list/List'\nexport { Loader } from './loader/Loader'\nexport { MarkdownContent } from './markdown-content/MarkdownContent'\nexport { NavigationMenu } from './navigation/NavigationMenu'\nexport { NavigationMenuVertical } from './navigation-menu-vertical/NavigationMenuVertical'\nexport { NotificationBadge } from './notification-badge/NotificationBadge'\nexport { NumberInput } from './number-input/NumberInput'\nexport { NumberInputField } from './number-input-field/NumberInputField'\nexport { Pagination } from './pagination/Pagination'\nexport { PasswordField } from './password-field/PasswordField'\nexport { PasswordInput } from './password-input/PasswordInput'\nexport { Popover } from './popover/Popover'\nexport { ProgressBar } from './progress-bar/ProgressBar'\nexport { RadioButton } from './radio-button/RadioButton'\nexport { RadioButtonGroup } from './radio-button/RadioButtonGroup'\nexport { RadioButtonField } from './radio-button-field/RadioButtonField'\nexport { RadioCard } from './radio-card/RadioCard'\nexport { RadioCardGroup } from './radio-card/RadioCardGroup'\nexport { SearchField } from './search-field/SearchField'\nexport { SearchInput } from './search-input/SearchInput'\nexport { SectionMessage } from './section-message/SectionMessage'\nexport { Select } from './select/Select'\nexport { SelectField } from './select-field/SelectField'\nexport { SelectMenu } from './select-menu/SelectMenu'\nexport { SelectMenuField } from './select-menu-field/SelectMenuField'\nexport { SideBar } from './side-bar/SideBar'\nexport { useSidebarState } from './side-bar/SideBar.context'\nexport { Slider } from './slider/Slider'\nexport { SliderField } from './slider-field/SliderField'\nexport * as Sortable from './sortable'\nexport * as Skeleton from './skeleton-loader'\nexport { Spacer } from './spacer/Spacer'\nexport { Stepper } from './stepper/Stepper'\nexport { Switch } from './switch/Switch'\nexport { Table } from './table/Table'\nexport { Tabs } from './tabs/Tabs'\nexport { Text } from './text/Text'\nexport { Textarea } from './textarea/Textarea'\nexport { TextareaField } from './textarea-field/TextareaField'\nexport { Tile } from './tile/Tile'\nexport { TileInteractive } from './tile-interactive/TileInteractive'\nexport { TileToggleGroup } from './tile-toggle-group'\nexport { Toast, toast } from './toast'\nexport { ToggleGroup } from './toggle-group'\nexport { Tooltip } from './tooltip/Tooltip'\nexport { TopBar } from './top-bar/TopBar'\nexport { Tree } from './tree/Tree'\nexport { Video } from './video/Video'\nexport { KeyboardShortcut } from './keyboard-shortcut'\nexport { SegmentedControl } from './segmented-control/SegmentedControl'\nexport { FileDrop } from './file-drop/FileDrop'\nexport { useFileDrop } from './file-drop/useFileDrop'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAa,wBAAwB;CACnC,MAAM,gBAAA,GAAA,MAAA,OAAA,CAA2C,KAAA,CAAS;CAE1D,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,aAAa,UAAU;EACvB,aAAa;GACX,aAAa,UAAU;EACzB;CACF,CAAC;CAED,OAAO;AACT;;;ACRA,kBAAA,cAAc,UAAU;AAExB,IAAM,qBAAqB,UACzB,eAAe,KAAK,KAAK,KAAK,CAAC,OAAO,MAAM,OAAO,KAAK,CAAC;AAE3D,IAAM,WAAA,GAAA,eAAA,oBAAA,CAEJ,EACA,QAAQ;CACN,aAAa;EACX,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,iBAAiB,EAAE,CAAC;EAClD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,iBAAiB,EAAE,CAAC;EAC5D,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,CAAC;CAC5D;CACA,wBAAwB;EACtB,SAAS,CAAC,kBAAkB,eAAe;EAC3C,kBAAkB,CAAC,SAAS;EAC5B,iBAAiB,CAAC,SAAS;CAC7B;AACF,EACF,CAAC;AAED,IAAa,MAAM,GAAG,WAAyB,SAAA,GAAA,KAAA,QAAA,CAAa,MAAM,CAAC;AAInE,IAAa,SAAS,EACpB,UACA,YAEA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CAAK,WAAU;CAAW,OAAO;CAC9B;AACE,CAAA;AAGP,IAAa,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A,UAAU;EACR,OAAO;GACL,SAAS;IACP;IACA;IACA;GACF;GACA,WAAW;IACT;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;GACF;EACF;EACA,YAAY;GACV,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,WAAW,EACT,MAAM,CAAC,mDAAmD,EAC5D;EACA,WAAW;GACT,MAAM,CAAC,QAAQ;GACf,OAAO,CAAC,OAAO;EACjB;CACF;CACA,iBAAiB;EACf,YAAY;EACZ,MAAM;EACN,OAAO;CACT;AACF,GACA,EACE,0BAA0B,KAC5B,CACF;;AAIA,IAAM,wBAAwC,uBAC5C,QACA;CACE,MAAM;EAAC;EAAgB;EAAQ;EAAkB;CAAW;CAC5D,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,OAAO;EACZ,IAAI,CAAC,OAAO;EACZ,IAAI,CAAC,OAAO;EACZ,IAAI,CAAC,OAAO;CACd,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,GACA,EACE,0BAA0B,KAC5B,CACF;AAEA,IAAM,cAAc,EAClB,MACA,eAEA,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAQ,WAAU,WAAY,CAAA,GAC9B,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAD;CAA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A,kBAAA,UAAA,EAAG,SAAW,CAAA;AACvB;AAEA,uBAAuB,cAAc;;;AC7CrC,IAAa,oBAAoB;CAC/B,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;;ACOA,IAAM,iBAAe,OACnB,UACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,OAAO;GACL,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,aAAa;IACX;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;GACF;EACF;EACA,YAAY;GACV,QAAQ;IACN;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,IAAI,CAAC,QAAQ;GACb,IAAI,CAAC,QAAQ;GACb,IAAI,CAAC,SAAS;GACd,IAAI,CAAC,SAAS;EAChB;EACA,WAAW,EACT,MAAM,CAAC,cAAc,EACvB;CACF;AACF,GACA,EACE,0BAA0B,KAC5B,CACF;AAYA,IAAa,cAAc,EACzB,KACA,UACA,QAAQ,WACR,aAAa,UACb,OAAO,MACP,OACA,MACA,UACA,aAAa,MACb,aACA,GAAG,WACkB;CACrB,MAAM,2BAA2B,YAAY,KAAK,KAAK;CAEvD,CAAA,GAAA,UAAA,QAAA,CAAU,MAAM,SAAS,MAAM,QAAQ,MAAM,GAAG,wBAAwB;CAYxE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAD;EACc;EACL;EACM;YAEb,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD;GACE,GAhBoB,OACrB;IACC,IAAI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ElB;AAEA,UAAU,cAAc;;;ACzDxB,IAAa,kBAAkB,OAAO,OAAO,EAC3C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;;;ACTD,IAAa,mBAAmB,OAAO,OAAO,EAC5C,MAAM,CAAC,YAAY,UAAU,EAC/B,CAAC;;;ACFD,IAAa,gBAAc,uBAAA;;;ACF3B,IAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;AACF;;;ACGA,IAAM,iBAAiB;AAEvB,IAAM,sBAAsB,OAAO,uBAAA,SAAS,EAC1C,MAAM,gBACR,CAAC;AAED,IAAM,sBAAsB,OAC1B,uBAAA,SACA;CACE,MAAM;EAIJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,YAAY;IACV;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,QAAQ,EACN,OAAO;GAAC;GAAQ;GAAY;EAAK,EACnC;CACF;AACF,GACA,EAAE,0BAA0B,KAAK,CACnC;AAOA,IAAa,iBAAiB,EAC5B,OAAO,MACP,UACA,kBAAkB,gBAClB,kBAAkB,MAClB,GAAG,WAEH,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAA,QAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,qBAAD;CAAqB,IAAI;WAAzB,CACG,MAAM,SAAS,IAAI,WAAW,UAC7B,MAAM,eAAe,KAAK,KAAK,MAAM,SAAS,mBAC1C,QACA,IACN,GACA,iB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O,OACnD,yBACA;CACE,OAAO;CACP,aAAa;CACb,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;AACX,CACF;;;AC/FA,IAAM,eAAe,OACnB,UACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,OAAO,EACL,OAAO,CAAC,EACV;EACA,OAAO;GACL,OAAO,CAAC;GACR,MAAM,CAAC;EACT;EACA,YAAY;GACV,UAAU;IACR;IACA;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,eAAe;EACzB;EACA;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,mBAAmB,sBAAsB;EACnD;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,UAAU;EACpB;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,aAAa;EACvB;CACF;AACF,GACA;CAAE,oBAAoB;CAAO,0BAA0B;AAAK,CAC9D;AAeA,IAAa,UAAU,EACrB,KACA,aACA,UACA,OAAO,MACP,aAAa,YACb,GAAG,WACc;CAEjB,MAAM,QAAmD;EACvD;EACA;EACA;EACA,GAAG;CACL;CAEA,IAAI,CAAC,KAAK,OAAO,KAAK,YAAY,CAAC,CAAC,OAAO,UAAU,UAAU,KAAA,CAAS,GACtE,MAAM,eAAe;CAGvB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,cAAD;EAAc,GAAI;YAAlB,CACG,eACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;GAAQ,UAAA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