@atom-learning/components 6.16.0-beta.1 → 6.16.0-beta.3

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 (356) hide show
  1. package/dist/components/accordion/Accordion.js.map +1 -1
  2. package/dist/components/accordion/AccordionContent.js.map +1 -1
  3. package/dist/components/accordion/AccordionItem.js.map +1 -1
  4. package/dist/components/accordion/AccordionTrigger.js.map +1 -1
  5. package/dist/components/action-icon/ActionIcon.constants.js.map +1 -1
  6. package/dist/components/action-icon/ActionIcon.js.map +1 -1
  7. package/dist/components/alert-dialog/AlertDialog.js.map +1 -1
  8. package/dist/components/alert-dialog/AlertDialogContent.js.map +1 -1
  9. package/dist/components/alert-dialog/alert-context/AlertContext.js.map +1 -1
  10. package/dist/components/alert-dialog/alert-context/AlertDialog.js.map +1 -1
  11. package/dist/components/alert-dialog/alert-context/AlertDialogIcon.js.map +1 -1
  12. package/dist/components/alert-dialog/alert-context/reducer.js.map +1 -1
  13. package/dist/components/avatar/Avatar.js.map +1 -1
  14. package/dist/components/avatar/AvatarContext.js.map +1 -1
  15. package/dist/components/avatar/AvatarIcon.js.map +1 -1
  16. package/dist/components/avatar/AvatarImage.js.map +1 -1
  17. package/dist/components/avatar/AvatarInitial.js.map +1 -1
  18. package/dist/components/avatar/AvatarPlaceholder.js.map +1 -1
  19. package/dist/components/badge/Badge.colorscheme.config.js.map +1 -1
  20. package/dist/components/badge/Badge.context.js.map +1 -1
  21. package/dist/components/badge/Badge.js.map +1 -1
  22. package/dist/components/badge/BadgeIcon.js.map +1 -1
  23. package/dist/components/badge/BadgeText.js.map +1 -1
  24. package/dist/components/banner/Banner.js.map +1 -1
  25. package/dist/components/banner/BannerContainer.js.map +1 -1
  26. package/dist/components/banner/BannerContext.js.map +1 -1
  27. package/dist/components/banner/banner-regular/BannerRegular.js.map +1 -1
  28. package/dist/components/banner/banner-regular/BannerRegularActions.js.map +1 -1
  29. package/dist/components/banner/banner-regular/BannerRegularButton.js.map +1 -1
  30. package/dist/components/banner/banner-regular/BannerRegularContainer.js.map +1 -1
  31. package/dist/components/banner/banner-regular/BannerRegularContent.js.map +1 -1
  32. package/dist/components/banner/banner-regular/BannerRegularDismiss.js.map +1 -1
  33. package/dist/components/banner/banner-regular/BannerRegularHeading.js.map +1 -1
  34. package/dist/components/banner/banner-regular/BannerRegularImage.js.map +1 -1
  35. package/dist/components/banner/banner-regular/BannerRegularText.js.map +1 -1
  36. package/dist/components/banner/banner-slim/BannerSlim.js.map +1 -1
  37. package/dist/components/banner/banner-slim/BannerSlimActions.js.map +1 -1
  38. package/dist/components/banner/banner-slim/BannerSlimButton.js.map +1 -1
  39. package/dist/components/banner/banner-slim/BannerSlimContainer.js.map +1 -1
  40. package/dist/components/banner/banner-slim/BannerSlimContent.js.map +1 -1
  41. package/dist/components/banner/banner-slim/BannerSlimDismiss.js.map +1 -1
  42. package/dist/components/banner/banner-slim/BannerSlimImage.js.map +1 -1
  43. package/dist/components/banner/banner-slim/BannerSlimText.js.map +1 -1
  44. package/dist/components/box/Box.js.map +1 -1
  45. package/dist/components/button/Button.js.map +1 -1
  46. package/dist/components/calendar/Calendar.js.map +1 -1
  47. package/dist/components/calendar/Day.js.map +1 -1
  48. package/dist/components/calendar/constants.js.map +1 -1
  49. package/dist/components/carousel/Carousel.js.map +1 -1
  50. package/dist/components/carousel/CarouselArrows.js.map +1 -1
  51. package/dist/components/carousel/CarouselPagination.js.map +1 -1
  52. package/dist/components/carousel/CarouselSlide.js.map +1 -1
  53. package/dist/components/carousel/CarouselSlider.js.map +1 -1
  54. package/dist/components/checkbox/Checkbox.js.map +1 -1
  55. package/dist/components/checkbox-field/CheckboxField.js +1 -6
  56. package/dist/components/checkbox-field/CheckboxField.js.map +1 -1
  57. package/dist/components/checkbox-group/CheckboxGroup.js.map +1 -1
  58. package/dist/components/checkbox-group/CheckboxGroupAllItem.js.map +1 -1
  59. package/dist/components/checkbox-group/CheckboxGroupItem.js.map +1 -1
  60. package/dist/components/checkbox-group/CheckboxGroupSub.js.map +1 -1
  61. package/dist/components/checkbox-group/context/CheckboxGroupChecked.context.js.map +1 -1
  62. package/dist/components/checkbox-group/context/CheckboxGroupMounted.context.js.map +1 -1
  63. package/dist/components/checkbox-tree/CheckboxTree.js.map +1 -1
  64. package/dist/components/checkbox-tree/CheckboxTreeCollapsible.js.map +1 -1
  65. package/dist/components/checkbox-tree/CheckboxTreeCollapsibleContent.js.map +1 -1
  66. package/dist/components/checkbox-tree/CheckboxTreeCollapsibleTrigger.js.map +1 -1
  67. package/dist/components/checkbox-tree/CheckboxTreeItem.js.map +1 -1
  68. package/dist/components/checkbox-tree/CheckboxTreeItemContent.js.map +1 -1
  69. package/dist/components/chip/Chip.js.map +1 -1
  70. package/dist/components/chip/ChipGroup.js.map +1 -1
  71. package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.js.map +1 -1
  72. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js.map +1 -1
  73. package/dist/components/chip-toggle-group/ChipToggleGroupItem.js.map +1 -1
  74. package/dist/components/chip-toggle-group/ChipToggleGroupRoot.js.map +1 -1
  75. package/dist/components/combobox/Combobox.js.map +1 -1
  76. package/dist/components/combobox/ComboboxInput.js.map +1 -1
  77. package/dist/components/combobox/ComboboxList.js.map +1 -1
  78. package/dist/components/combobox/ComboboxOption.js.map +1 -1
  79. package/dist/components/combobox/ComboboxPopover.js.map +1 -1
  80. package/dist/components/create-password-field/CreatePasswordField.js.map +1 -1
  81. package/dist/components/data-table/DataTable.js +88 -0
  82. package/dist/components/data-table/DataTable.js.map +1 -1
  83. package/dist/components/data-table/DataTable.types.js.map +1 -1
  84. package/dist/components/data-table/DataTableBody.js.map +1 -1
  85. package/dist/components/data-table/DataTableBulkActions.js.map +1 -1
  86. package/dist/components/data-table/DataTableBulkActionsFloating.js.map +1 -1
  87. package/dist/components/data-table/DataTableBulkActionsSelectedRowActions.js.map +1 -1
  88. package/dist/components/data-table/DataTableContext.js.map +1 -1
  89. package/dist/components/data-table/DataTableDataCell.js.map +1 -1
  90. package/dist/components/data-table/DataTableEmptyState.js.map +1 -1
  91. package/dist/components/data-table/DataTableError.js.map +1 -1
  92. package/dist/components/data-table/DataTableGlobalFilter.js.map +1 -1
  93. package/dist/components/data-table/DataTableHead.js.map +1 -1
  94. package/dist/components/data-table/DataTableHeaderCell.js.map +1 -1
  95. package/dist/components/data-table/DataTableLoading.js.map +1 -1
  96. package/dist/components/data-table/DataTableMetaData.js.map +1 -1
  97. package/dist/components/data-table/DataTableRow.js.map +1 -1
  98. package/dist/components/data-table/DataTableRowSelectionCheckbox.js.map +1 -1
  99. package/dist/components/data-table/DataTableSelectAllRowsCheckbox.js.map +1 -1
  100. package/dist/components/data-table/DataTableTable.js.map +1 -1
  101. package/dist/components/data-table/drag-and-drop/DragAndDropTable.js.map +1 -1
  102. package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.js.map +1 -1
  103. package/dist/components/data-table/drag-and-drop/DragAndDropTableRow.js.map +1 -1
  104. package/dist/components/data-table/getNewAsyncData.js.map +1 -1
  105. package/dist/components/data-table/pagination/Pagination.js.map +1 -1
  106. package/dist/components/data-table/usePagination.js.map +1 -1
  107. package/dist/components/data-table/useSorting.js.map +1 -1
  108. package/dist/components/date-field/DateField.js.map +1 -1
  109. package/dist/components/date-input/DateInput.js.map +1 -1
  110. package/dist/components/dialog/Dialog.js.map +1 -1
  111. package/dist/components/dialog/DialogActionBar.js.map +1 -1
  112. package/dist/components/dialog/DialogBackground.js.map +1 -1
  113. package/dist/components/dialog/DialogContent.js.map +1 -1
  114. package/dist/components/dialog/DialogFooter.js.map +1 -1
  115. package/dist/components/dialog/DialogHeading.js.map +1 -1
  116. package/dist/components/dialog/DialogNavigationBar.js.map +1 -1
  117. package/dist/components/dialog/DialogScrollableContent.js.map +1 -1
  118. package/dist/components/dismissible/DismissibleRoot.js.map +1 -1
  119. package/dist/components/dismissible/DismissibleTrigger.js.map +1 -1
  120. package/dist/components/dismissible/index.js.map +1 -1
  121. package/dist/components/dismissible-group/DismissibleGroupItem.js.map +1 -1
  122. package/dist/components/dismissible-group/DismissibleGroupRoot.js.map +1 -1
  123. package/dist/components/dismissible-group/index.js.map +1 -1
  124. package/dist/components/divider/Divider.js.map +1 -1
  125. package/dist/components/drawer/Drawer.context.js.map +1 -1
  126. package/dist/components/drawer/Drawer.js.map +1 -1
  127. package/dist/components/drawer/DrawerClose.js.map +1 -1
  128. package/dist/components/drawer/DrawerContent.js.map +1 -1
  129. package/dist/components/drawer/DrawerFooter.js.map +1 -1
  130. package/dist/components/drawer/DrawerHeader.js.map +1 -1
  131. package/dist/components/drawer/DrawerMain.js.map +1 -1
  132. package/dist/components/drawer/DrawerOverlay.js.map +1 -1
  133. package/dist/components/dropdown-menu/DropdownMenu.js.map +1 -1
  134. package/dist/components/dropdown-menu/DropdownMenuContent.js.map +1 -1
  135. package/dist/components/dropdown-menu/DropdownMenuItem.js.map +1 -1
  136. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
  137. package/dist/components/dropdown-menu/DropdownMenuSeparator.js.map +1 -1
  138. package/dist/components/dropdown-menu/DropdownMenuTrigger.js.map +1 -1
  139. package/dist/components/empty-state/EmptyState.context.js.map +1 -1
  140. package/dist/components/empty-state/EmptyState.js.map +1 -1
  141. package/dist/components/empty-state/EmptyStateBody.js.map +1 -1
  142. package/dist/components/empty-state/EmptyStateImage.js.map +1 -1
  143. package/dist/components/empty-state/EmptyStateTitle.js.map +1 -1
  144. package/dist/components/field-wrapper/FieldDescription.js.map +1 -1
  145. package/dist/components/field-wrapper/FieldWrapper.js.map +1 -1
  146. package/dist/components/field-wrapper/InlineFieldWrapper.js.map +1 -1
  147. package/dist/components/file-drop/FileDrop.js.map +1 -1
  148. package/dist/components/file-drop/FileDropContext.js.map +1 -1
  149. package/dist/components/file-drop/useFileDrop.js.map +1 -1
  150. package/dist/components/file-input/FileInput.js.map +1 -1
  151. package/dist/components/flex/Flex.js.map +1 -1
  152. package/dist/components/form/Form.js.map +1 -1
  153. package/dist/components/form/useFieldError.js.map +1 -1
  154. package/dist/components/form/useFormCustomContext.js.map +1 -1
  155. package/dist/components/grid/Grid.js.map +1 -1
  156. package/dist/components/heading/Heading.js.map +1 -1
  157. package/dist/components/icon/Icon.js.map +1 -1
  158. package/dist/components/image/Image.js.map +1 -1
  159. package/dist/components/inline-message/InlineMessage.config.js.map +1 -1
  160. package/dist/components/inline-message/InlineMessage.js.map +1 -1
  161. package/dist/components/input/Input.js.map +1 -1
  162. package/dist/components/input-field/InputField.js.map +1 -1
  163. package/dist/components/keyboard-shortcut/KeyboardShortcut.js.map +1 -1
  164. package/dist/components/keyboard-shortcut/index.js.map +1 -1
  165. package/dist/components/label/Label.js.map +1 -1
  166. package/dist/components/link/Link.js.map +1 -1
  167. package/dist/components/list/List.js.map +1 -1
  168. package/dist/components/loader/Loader.js.map +1 -1
  169. package/dist/components/markdown-content/MarkdownContent.js.map +1 -1
  170. package/dist/components/markdown-content/components/MarkdownCode.js.map +1 -1
  171. package/dist/components/markdown-content/components/MarkdownEmphasis.js.map +1 -1
  172. package/dist/components/markdown-content/components/MarkdownHeading.js.map +1 -1
  173. package/dist/components/markdown-content/components/MarkdownImage.js.map +1 -1
  174. package/dist/components/markdown-content/components/MarkdownInlineCode.js.map +1 -1
  175. package/dist/components/markdown-content/components/MarkdownLink.js.map +1 -1
  176. package/dist/components/markdown-content/components/MarkdownList.js.map +1 -1
  177. package/dist/components/markdown-content/components/MarkdownListItem.js.map +1 -1
  178. package/dist/components/markdown-content/components/MarkdownParagraph.js.map +1 -1
  179. package/dist/components/markdown-content/components/MarkdownStrong.js.map +1 -1
  180. package/dist/components/markdown-content/components/MarkdownThematicBreak.js.map +1 -1
  181. package/dist/components/navigation/NavigationMenu.colorscheme.config.js.map +1 -1
  182. package/dist/components/navigation/NavigationMenu.d.ts +2 -0
  183. package/dist/components/navigation/NavigationMenu.js.map +1 -1
  184. package/dist/components/navigation/NavigationMenu.styles.js.map +1 -1
  185. package/dist/components/navigation/NavigationMenuContext.js.map +1 -1
  186. package/dist/components/navigation/NavigationMenuDropdown.js.map +1 -1
  187. package/dist/components/navigation/NavigationMenuDropdownContent.js.map +1 -1
  188. package/dist/components/navigation/NavigationMenuDropdownItem.d.ts +1 -0
  189. package/dist/components/navigation/NavigationMenuDropdownItem.js.map +1 -1
  190. package/dist/components/navigation/NavigationMenuDropdownTrigger.js.map +1 -1
  191. package/dist/components/navigation/NavigationMenuLink.d.ts +1 -0
  192. package/dist/components/navigation/NavigationMenuLink.js +22 -11
  193. package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
  194. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.colorscheme.config.js.map +1 -1
  195. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.js.map +1 -1
  196. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js.map +1 -1
  197. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordion.js.map +1 -1
  198. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionContent.js.map +1 -1
  199. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js.map +1 -1
  200. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalIcon.js.map +1 -1
  201. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItem.js.map +1 -1
  202. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.js.map +1 -1
  203. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
  204. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalList.js.map +1 -1
  205. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.js.map +1 -1
  206. package/dist/components/notification-badge/NotificationBadge.js.map +1 -1
  207. package/dist/components/number-input/NumberInput.js.map +1 -1
  208. package/dist/components/number-input/NumberInputStepper.js.map +1 -1
  209. package/dist/components/number-input-field/NumberInputField.js.map +1 -1
  210. package/dist/components/pagination/Pagination.js.map +1 -1
  211. package/dist/components/pagination/PaginationItems.js.map +1 -1
  212. package/dist/components/pagination/PaginationNextButton.js.map +1 -1
  213. package/dist/components/pagination/PaginationPage.js.map +1 -1
  214. package/dist/components/pagination/PaginationPopover.js.map +1 -1
  215. package/dist/components/pagination/PaginationPreviousButton.js.map +1 -1
  216. package/dist/components/pagination/pagination-context/PaginationContext.js.map +1 -1
  217. package/dist/components/pagination/pagination.constants.js.map +1 -1
  218. package/dist/components/pagination/pagination.helper.js.map +1 -1
  219. package/dist/components/pagination/usePagination.js.map +1 -1
  220. package/dist/components/password-field/PasswordField.js.map +1 -1
  221. package/dist/components/password-input/PasswordInput.js.map +1 -1
  222. package/dist/components/popover/Popover.js.map +1 -1
  223. package/dist/components/popover/PopoverContent.js.map +1 -1
  224. package/dist/components/progress-bar/ProgressBar.js.map +1 -1
  225. package/dist/components/radio-button/RadioButton.js.map +1 -1
  226. package/dist/components/radio-button/RadioButtonGroup.js.map +1 -1
  227. package/dist/components/radio-button-field/RadioButtonField.js.map +1 -1
  228. package/dist/components/radio-button-field/RadioField.js.map +1 -1
  229. package/dist/components/radio-card/RadioCard.js.map +1 -1
  230. package/dist/components/radio-card/RadioCardGroup.js.map +1 -1
  231. package/dist/components/router-provider/RouterProvider.js +6 -2
  232. package/dist/components/router-provider/RouterProvider.js.map +1 -1
  233. package/dist/components/search-field/SearchField.js.map +1 -1
  234. package/dist/components/search-input/SearchInput.js +4 -9
  235. package/dist/components/search-input/SearchInput.js.map +1 -1
  236. package/dist/components/section-message/SectionMessage.js.map +1 -1
  237. package/dist/components/section-message/SectionMessageContext.js.map +1 -1
  238. package/dist/components/section-message/SectionMessageDescription.js.map +1 -1
  239. package/dist/components/section-message/SectionMessageDismiss.js.map +1 -1
  240. package/dist/components/section-message/SectionMessageIcon.js.map +1 -1
  241. package/dist/components/section-message/SectionMessageLayout.js.map +1 -1
  242. package/dist/components/section-message/SectionMessageTitle.js.map +1 -1
  243. package/dist/components/segmented-control/SegmentedControl.js.map +1 -1
  244. package/dist/components/segmented-control/SegmentedControlBadge.js.map +1 -1
  245. package/dist/components/segmented-control/SegmentedControlContext.js.map +1 -1
  246. package/dist/components/segmented-control/SegmentedControlDescription.js.map +1 -1
  247. package/dist/components/segmented-control/SegmentedControlHeading.js.map +1 -1
  248. package/dist/components/segmented-control/SegmentedControlIcon.js.map +1 -1
  249. package/dist/components/segmented-control/SegmentedControlItem.js.map +1 -1
  250. package/dist/components/segmented-control/SegmentedControlItemList.js.map +1 -1
  251. package/dist/components/segmented-control/SegmentedControlRoot.js.map +1 -1
  252. package/dist/components/select/Select.js.map +1 -1
  253. package/dist/components/select-field/SelectField.js.map +1 -1
  254. package/dist/components/side-bar/SideBar.js.map +1 -1
  255. package/dist/components/side-bar/SideBarComponents.js.map +1 -1
  256. package/dist/components/side-bar/SideBarContext.js.map +1 -1
  257. package/dist/components/skeleton-loader/Skeleton.js.map +1 -1
  258. package/dist/components/skeleton-loader/SkeletonBarChart.js.map +1 -1
  259. package/dist/components/skeleton-loader/SkeletonButton.js.map +1 -1
  260. package/dist/components/skeleton-loader/SkeletonCard.js.map +1 -1
  261. package/dist/components/skeleton-loader/SkeletonColumnChart.js.map +1 -1
  262. package/dist/components/skeleton-loader/SkeletonDoughnutChart.js.map +1 -1
  263. package/dist/components/skeleton-loader/SkeletonHeading.js.map +1 -1
  264. package/dist/components/skeleton-loader/SkeletonPanelList.js.map +1 -1
  265. package/dist/components/skeleton-loader/SkeletonSubjectList.js.map +1 -1
  266. package/dist/components/skeleton-loader/SkeletonTable.js.map +1 -1
  267. package/dist/components/skeleton-loader/SkeletonTabs.js.map +1 -1
  268. package/dist/components/slider/Slider.js.map +1 -1
  269. package/dist/components/slider/SliderSteps.js.map +1 -1
  270. package/dist/components/slider/SliderValue.js.map +1 -1
  271. package/dist/components/slider-field/SliderField.js.map +1 -1
  272. package/dist/components/sortable/Handle.js.map +1 -1
  273. package/dist/components/sortable/SortableHandle.js.map +1 -1
  274. package/dist/components/sortable/SortableItem.js.map +1 -1
  275. package/dist/components/sortable/SortableRoot.js.map +1 -1
  276. package/dist/components/spacer/Spacer.js.map +1 -1
  277. package/dist/components/stepper/Stepper.js.map +1 -1
  278. package/dist/components/stepper/StepperStepBack.js.map +1 -1
  279. package/dist/components/stepper/StepperStepBullet.js.map +1 -1
  280. package/dist/components/stepper/StepperStepContainer.js.map +1 -1
  281. package/dist/components/stepper/StepperStepForward.js.map +1 -1
  282. package/dist/components/stepper/StepperStepLabel.js.map +1 -1
  283. package/dist/components/stepper/StepperSteps.js.map +1 -1
  284. package/dist/components/stepper/stepper-context/StepperContext.js.map +1 -1
  285. package/dist/components/stepper/types.js.map +1 -1
  286. package/dist/components/switch/Switch.js.map +1 -1
  287. package/dist/components/table/Table.js.map +1 -1
  288. package/dist/components/table/TableBody.js.map +1 -1
  289. package/dist/components/table/TableCell.js.map +1 -1
  290. package/dist/components/table/TableFooter.js.map +1 -1
  291. package/dist/components/table/TableFooterCell.js.map +1 -1
  292. package/dist/components/table/TableHeader.js.map +1 -1
  293. package/dist/components/table/TableHeaderCell.js.map +1 -1
  294. package/dist/components/table/TableRow.js.map +1 -1
  295. package/dist/components/table/TableStickyColumnsContainer.js.map +1 -1
  296. package/dist/components/table/useStickyColumnsCss.js.map +1 -1
  297. package/dist/components/tabs/Tabs.js.map +1 -1
  298. package/dist/components/tabs/TabsContent.js.map +1 -1
  299. package/dist/components/tabs/TabsTrigger.js.map +1 -1
  300. package/dist/components/tabs/TabsTriggerList.js.map +1 -1
  301. package/dist/components/text/Text.js.map +1 -1
  302. package/dist/components/textarea/Textarea.js.map +1 -1
  303. package/dist/components/textarea-field/TextareaField.js.map +1 -1
  304. package/dist/components/tile/Tile.js.map +1 -1
  305. package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
  306. package/dist/components/tile-toggle-group/TileToggleGroupItem.js.map +1 -1
  307. package/dist/components/tile-toggle-group/TileToggleGroupRoot.js.map +1 -1
  308. package/dist/components/toast/Toast.js.map +1 -1
  309. package/dist/components/toast/ToastCloseButton.js.map +1 -1
  310. package/dist/components/toast/ToastContext.js.map +1 -1
  311. package/dist/components/toast/ToastIcon.js.map +1 -1
  312. package/dist/components/toast/ToastProvider.js.map +1 -1
  313. package/dist/components/toggle-group/ToggleGroupButton.js.map +1 -1
  314. package/dist/components/toggle-group/ToggleGroupItem.js.map +1 -1
  315. package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -1
  316. package/dist/components/toggle-group/index.js.map +1 -1
  317. package/dist/components/tooltip/Tooltip.js.map +1 -1
  318. package/dist/components/tooltip/TooltipContent.js.map +1 -1
  319. package/dist/components/top-bar/TopBar.colorscheme.config.js.map +1 -1
  320. package/dist/components/top-bar/TopBar.js.map +1 -1
  321. package/dist/components/top-bar/TopBarActionIcon.js.map +1 -1
  322. package/dist/components/top-bar/TopBarBrand.js.map +1 -1
  323. package/dist/components/tree/Tree.js.map +1 -1
  324. package/dist/components/tree/TreeCollapsible.js.map +1 -1
  325. package/dist/components/tree/TreeCollapsibleContent.js.map +1 -1
  326. package/dist/components/tree/TreeCollapsibleTrigger.js.map +1 -1
  327. package/dist/components/tree/TreeIcon.js.map +1 -1
  328. package/dist/components/tree/TreeItem.js.map +1 -1
  329. package/dist/components/tree/TreeItemContent.js.map +1 -1
  330. package/dist/components/tree/TreeList.js.map +1 -1
  331. package/dist/components/tree/TreeListItem.js.map +1 -1
  332. package/dist/components/tree/TreeText.js.map +1 -1
  333. package/dist/components/video/Video.js.map +1 -1
  334. package/dist/docgen.json +1 -1
  335. package/dist/experiments/color-scheme/ColorScheme.config.js.map +1 -1
  336. package/dist/experiments/color-scheme/ColorScheme.js.map +1 -1
  337. package/dist/index.cjs.js +139 -48
  338. package/dist/index.cjs.js.map +1 -1
  339. package/dist/styled.js +1 -2
  340. package/dist/styled.js.map +1 -1
  341. package/dist/utilities/css-wrapper/CSSWrapper.js.map +1 -1
  342. package/dist/utilities/event/preventEvent.js.map +1 -1
  343. package/dist/utilities/hooks/useCallbackRef.js.map +1 -1
  344. package/dist/utilities/hooks/useIsMountedRef.js.map +1 -1
  345. package/dist/utilities/hooks/useResizeObserver.js.map +1 -1
  346. package/dist/utilities/hooks/useScrollPosition.js.map +1 -1
  347. package/dist/utilities/hooks/useSize.js.map +1 -1
  348. package/dist/utilities/hooks/useWindowScrollPosition.js.map +1 -1
  349. package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js.map +1 -1
  350. package/dist/utilities/override-styled-variant-value/overrideStyledVariantValue.js.map +1 -1
  351. package/dist/utilities/radix-overrides/toggle-group/ToggleGroupRoot.js.map +1 -1
  352. package/dist/utilities/radix-overrides/toggle-group/index.js.map +1 -1
  353. package/dist/utilities/style/backdrop-overlay.js.map +1 -1
  354. package/dist/utilities/style/get-icon-size.js.map +1 -1
  355. package/dist/utilities/uri/index.js.map +1 -1
  356. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.js","names":[],"sources":["../../../src/components/empty-state/EmptyState.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;AASA,IAAM,sBAAsB,OAC1B,OACA;CACE,MAAM;EAAC;EAAQ;EAAY;EAAgB;EAAe;EAAc;CACxE,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,MAAM;EACX,IAAI,CAAC,MAAM;EACX,IAAI,CAAC,MAAM;EACX,IAAI,CAAC,MAAM;EACX,IAAI,CAAC,OAAO;EACb,EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAID,IAAM,uBAAuB,EAAE,OAAO,MAAM,GAAG,WAC7C,wBAAA,cAAC,oBAAD,EAA0B,MAEL,EADnB,wBAAA,cAAC,qBAAD;CAA2B;CAAM,GAAI;CAAQ,CAAA,CAC1B;AAGvB,IAAa,aAAa,OAAO,OAAO,qBAAqB;CAC3D,OAAO;CACP,OAAO;CACP,MAAM;CACP,CAAC;AAEF,oBAAoB,cAAc"}
1
+ {"version":3,"file":"EmptyState.js","names":[],"sources":["../../../src/components/empty-state/EmptyState.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;AASA,IAAM,sBAAsB,OAC1B,OACA;CACE,MAAM;EAAC;EAAQ;EAAY;EAAgB;EAAe;CAAa;CACvE,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,KAAK;EACV,IAAI,CAAC,KAAK;EACV,IAAI,CAAC,KAAK;EACV,IAAI,CAAC,KAAK;EACV,IAAI,CAAC,MAAM;CACb,EACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAIA,IAAM,uBAAuB,EAAE,OAAO,MAAM,GAAG,WAC7C,wBAAA,cAAC,oBAAD,EAA0B,KAEN,GADlB,wBAAA,cAAC,qBAAD;CAA2B;CAAM,GAAI;AAAO,CAAA,CAC1B;AAGtB,IAAa,aAAa,OAAO,OAAO,qBAAqB;CAC3D,OAAO;CACP,OAAO;CACP,MAAM;AACR,CAAC;AAED,oBAAoB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateBody.js","names":[],"sources":["../../../src/components/empty-state/EmptyStateBody.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAOA,IAAM,uBAAuB,OAC3B,MACA;CACE,MAAM,CAAC,iBAAiB,cAAc;CACtC,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACxB,EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAID,IAAa,kBAAkB,UAA+B;CAC5D,MAAM,EAAE,SAAS,QAAM,WAAW,kBAAkB;AACpD,QAAO,wBAAA,cAAC,sBAAD;EAAsB,GAAI;EAAa;EAAQ,CAAA"}
1
+ {"version":3,"file":"EmptyStateBody.js","names":[],"sources":["../../../src/components/empty-state/EmptyStateBody.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAOA,IAAM,uBAAuB,OAC3B,MACA;CACE,MAAM,CAAC,iBAAiB,aAAa;CACrC,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;CACxB,EACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAIA,IAAa,kBAAkB,UAA+B;CAC5D,MAAM,EAAE,SAAS,QAAM,WAAW,iBAAiB;CACnD,OAAO,wBAAA,cAAC,sBAAD;EAAsB,GAAI;EAAa;CAAO,CAAA;AACvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateImage.js","names":[],"sources":["../../../src/components/empty-state/EmptyStateImage.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAOA,IAAM,wBAAwB,OAC5B,OACA;CACE,MAAM,EAAE;CACR,UAAU,EACR,MAAM;EACJ,IAAI;GAAC;GAAW;GAAY;GAAO;EACnC,IAAI;GAAC;GAAY;GAAY;GAAO;EACpC,IAAI;GAAC;GAAY;GAAiB;GAAO;EACzC,IAAI;GAAC;GAAiB;GAAiB;GAAO;EAC9C,IAAI;GAAC;GAAiB;GAAiB;GAAO;EAC/C,EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAID,IAAa,mBAAmB,UAAgC;CAC9D,MAAM,EAAE,SAAS,MAAM,WAAW,kBAAkB;AACpD,QAAO,sBAAA,cAAC,uBAAD;EAA6B;EAAM,GAAI;EAAS,CAAA"}
1
+ {"version":3,"file":"EmptyStateImage.js","names":[],"sources":["../../../src/components/empty-state/EmptyStateImage.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAOA,IAAM,wBAAwB,OAC5B,OACA;CACE,MAAM,CAAC;CACP,UAAU,EACR,MAAM;EACJ,IAAI;GAAC;GAAW;GAAY;EAAM;EAClC,IAAI;GAAC;GAAY;GAAY;EAAM;EACnC,IAAI;GAAC;GAAY;GAAiB;EAAM;EACxC,IAAI;GAAC;GAAiB;GAAiB;EAAM;EAC7C,IAAI;GAAC;GAAiB;GAAiB;EAAM;CAC/C,EACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAIA,IAAa,mBAAmB,UAAgC;CAC9D,MAAM,EAAE,SAAS,MAAM,WAAW,iBAAiB;CACnD,OAAO,sBAAA,cAAC,uBAAD;EAA6B;EAAM,GAAI;CAAQ,CAAA;AACxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyStateTitle.js","names":[],"sources":["../../../src/components/empty-state/EmptyStateTitle.tsx"],"sourcesContent":["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"],"mappings":";;;;AAMA,IAAM,wBAAwB,OAC5B,MACA;CACE,MAAM;EAAC;EAAiB;EAAa;EAAiB;EAAM;CAC5D,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACvB,IAAI,CAAC,QAAQ,UAAU;EACxB,EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAQD,IAAa,mBAAmB,UAAgC;CAC9D,MAAM,EAAE,SAAS,QAAM,WAAW,kBAAkB;AACpD,QAAO,wBAAA,cAAC,uBAAD;EAA6B;EAAM,GAAI;EAAS,CAAA"}
1
+ {"version":3,"file":"EmptyStateTitle.js","names":[],"sources":["../../../src/components/empty-state/EmptyStateTitle.tsx"],"sourcesContent":["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"],"mappings":";;;;AAMA,IAAM,wBAAwB,OAC5B,MACA;CACE,MAAM;EAAC;EAAiB;EAAa;EAAiB;CAAK;CAC3D,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;EACtB,IAAI,CAAC,QAAQ,SAAS;CACxB,EACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAQA,IAAa,mBAAmB,UAAgC;CAC9D,MAAM,EAAE,SAAS,QAAM,WAAW,iBAAiB;CACnD,OAAO,wBAAA,cAAC,uBAAD;EAA6B;EAAM,GAAI;CAAQ,CAAA;AACxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldDescription.js","names":[],"sources":["../../../src/components/field-wrapper/FieldDescription.tsx"],"sourcesContent":["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"],"mappings":";;;;AAKA,IAAa,eAAe,EAC1B,UACA,gBAEA,wBAAA,cAAC,MAAD;CAAM,MAAK;CAAK,WAAW,GAAG,iBAAiB,gBAAgB,UAAU;CAElE,EADJ,SACI"}
1
+ {"version":3,"file":"FieldDescription.js","names":[],"sources":["../../../src/components/field-wrapper/FieldDescription.tsx"],"sourcesContent":["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"],"mappings":";;;;AAKA,IAAa,eAAe,EAC1B,UACA,gBAEA,wBAAA,cAAC,MAAD;CAAM,MAAK;CAAK,WAAW,GAAG,iBAAiB,gBAAgB,SAAS;AAElE,GADH,QACG"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldWrapper.js","names":[],"sources":["../../../src/components/field-wrapper/FieldWrapper.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;AA4BA,IAAa,gBAAgB,EAC3B,UACA,OACA,SACA,OACA,QACA,aACA,UACA,WACA,YACA,GAAG,WAEH,wBAAA,cAAC,OAAQ,MACP,wBAAA,cAAC,OAAD,EACE,WAAW,GACT,QACA,QACA,gBACA,mBACA,aAAa,UACd,EAUG,EARJ,wBAAA,cAAC,OAAD;CAAO,SAAS;CAAmB;CAAsB;CAEjD,EADL,MACK,EACP,UACC,wBAAA,cAAC,MAAD;CAAM,MAAM,QAAQ;CAAM,SAAS,QAAQ;CAAS,MAAK;CAElD,EADJ,OAAO,MACH,CAEL,EACL,eAAe,wBAAA,cAAC,aAAD,EAAa,WAAU,QAAkC,EAA1B,YAA0B,EACxE,UACA,SAAS,wBAAA,cAAC,eAAD,EAAe,WAAU,QAA8B,EAAtB,MAAsB,CAC7D;AAGR,aAAa,cAAc"}
1
+ {"version":3,"file":"FieldWrapper.js","names":[],"sources":["../../../src/components/field-wrapper/FieldWrapper.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;AA4BA,IAAa,gBAAgB,EAC3B,UACA,OACA,SACA,OACA,QACA,aACA,UACA,WACA,YACA,GAAG,WAEH,wBAAA,cAAC,OAAQ,MACP,wBAAA,cAAC,OAAD,EACE,WAAW,GACT,QACA,QACA,gBACA,mBACA,aAAa,SACf,EAUG,GARH,wBAAA,cAAC,OAAD;CAAO,SAAS;CAAmB;CAAsB;AAElD,GADJ,KACI,GACN,UACC,wBAAA,cAAC,MAAD;CAAM,MAAM,QAAQ;CAAM,SAAS,QAAQ;CAAS,MAAK;AAEnD,GADH,OAAO,KACJ,CAEL,GACJ,eAAe,wBAAA,cAAC,aAAD,EAAa,WAAU,OAAiC,GAAzB,WAAyB,GACvE,UACA,SAAS,wBAAA,cAAC,eAAD,EAAe,WAAU,OAA6B,GAArB,KAAqB,CAC7D;AAGP,aAAa,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"InlineFieldWrapper.js","names":[],"sources":["../../../src/components/field-wrapper/InlineFieldWrapper.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;AAoBA,IAAa,sBAAsB,EACjC,QAAQ,SACR,UACA,WACA,aACA,YAAY,OACZ,OACA,OACA,eAEA,wBAAA,cAAC,OAAD,EAAgB,WAkCV,EAjCJ,wBAAA,cAAC,OAAD;CACS;CACI;CACD;CACV,MAAK;CAgBC,EAdL,QAAM,SAAS,IAAI,WAAW,UAC7B,wBAAA,cAAC,OAAD,EACE,WAAW,GACT,cAAc,aAAa,QAC3B,cAAc,SAAS,SACtB,OAAO,SAAS,YAAY,OAAO,SAAS,gBAC3C,OAAO,OAAO,SAAS,QACvB,gBACH,EAGG,EADH,MACG,CACN,EACD,MACK,EACP,SAAS,wBAAA,cAAC,eAAD,EAAe,WAAU,QAA8B,EAAtB,MAAsB,EAChE,eACC,wBAAA,cAAC,aAAD,EACE,WAAW,GACT,QACA,cAAc,aAAa,QAC3B,cAAc,SAAS,OACxB,EAGW,EADX,YACW,CAEZ;AAGR,mBAAmB,cAAc"}
1
+ {"version":3,"file":"InlineFieldWrapper.js","names":[],"sources":["../../../src/components/field-wrapper/InlineFieldWrapper.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;AAoBA,IAAa,sBAAsB,EACjC,QAAQ,SACR,UACA,WACA,aACA,YAAY,OACZ,OACA,OACA,eAEA,wBAAA,cAAC,OAAD,EAAgB,UAkCX,GAjCH,wBAAA,cAAC,OAAD;CACS;CACI;CACD;CACV,MAAK;AAgBA,GAdJ,QAAM,SAAS,IAAI,WAAW,UAC7B,wBAAA,cAAC,OAAD,EACE,WAAW,GACT,cAAc,aAAa,QAC3B,cAAc,SAAS,SACtB,OAAO,SAAS,YAAY,OAAO,SAAS,gBAC3C,OAAO,OAAO,SAAS,QACvB,eACJ,EAGG,GADF,KACE,CACN,GACA,KACI,GACN,SAAS,wBAAA,cAAC,eAAD,EAAe,WAAU,OAA6B,GAArB,KAAqB,GAC/D,eACC,wBAAA,cAAC,aAAD,EACE,WAAW,GACT,QACA,cAAc,aAAa,QAC3B,cAAc,SAAS,MACzB,EAGW,GADV,WACU,CAEZ;AAGP,mBAAmB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileDrop.js","names":[],"sources":["../../../src/components/file-drop/FileDrop.tsx"],"sourcesContent":["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'\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"],"mappings":";;;;AAmBA,IAAM,kBAAkB,OAAO,OAAO,EACpC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAa,YAAY,EACvB,UACA,QACA,UACA,QACA,GAAG,YACgB;CACnB,MAAM,CAAC,YAAY,iBAAiB,QAAM,SAAS,MAAM;CACzD,MAAM,CAAC,OAAO,YAAY,QAAM,SAAiB,EAAE,CAAC;CACpD,MAAM,qBAAqB,QAAM,OAAyB,KAAK;CAE/D,MAAM,kBAAkB,UAA2C;AACjE,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,wBAAA,cAAC,gBAAgB,UAAjB,EAAiC,OA0BN,EAzBzB,wBAAA,cAAC,iBAAD;EACE,YAAY;EACZ,aAAa;EACb,SAAS,UAAU;AACjB,SAAM,gBAAgB;AACtB,cAAW,MAAM,aAAa,MAAM;;EAEtC,eAAe,mBAAmB,SAAS,OAAO;EAClD,MAAK;EACL,WAAW;EACX,UAAU;EACV,GAAI;EAaY,EAXf,OAAO,aAAa,aAAa,SAAS,MAAM,GAAG,UACpD,wBAAA,cAAC,SAAD;EACE,MAAK;EACL,KAAK;EACL,OAAO,EAAE,YAAY,UAAU;EACvB;EACE;EACV,WAAW,UAAU;AACnB,cAAW,MAAM,OAAO,MAAM;;EAEhC,CAAA,CACc,CACO;;AAI/B,SAAS,cAAc"}
1
+ {"version":3,"file":"FileDrop.js","names":[],"sources":["../../../src/components/file-drop/FileDrop.tsx"],"sourcesContent":["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'\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"],"mappings":";;;;AAmBA,IAAM,kBAAkB,OAAO,OAAO,EACpC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,IAAa,YAAY,EACvB,UACA,QACA,UACA,QACA,GAAG,YACgB;CACnB,MAAM,CAAC,YAAY,iBAAiB,QAAM,SAAS,KAAK;CACxD,MAAM,CAAC,OAAO,YAAY,QAAM,SAAiB,CAAC,CAAC;CACnD,MAAM,qBAAqB,QAAM,OAAyB,IAAI;CAE9D,MAAM,kBAAkB,UAA2C;EACjE,MAAM,eAAe;EACrB,cAAc,IAAI;CACpB;CAEA,MAAM,wBAAwB,cAAc,KAAK;CAEjD,MAAM,cAAc,aAA8B;EAChD,IAAI,CAAC,UAAU;EAEf,cAAc,KAAK;EAEnB,MAAM,QAAQ,MAAM,KAAK,QAAQ;EACjC,OAAO,KAAK;EACZ,SAAS,KAAK;CAChB;CAEA,MAAM,iBAAiB,UAA+C;EACpE,IAAI,CAAC,SAAS,OAAO,EAAE,SAAS,MAAM,GAAG,GACvC,mBAAmB,SAAS,MAAM;CAEtC;CAEA,MAAM,QAA8B;EAAE;EAAY;CAAM;CAExD,OACE,wBAAA,cAAC,gBAAgB,UAAjB,EAAiC,MA0BP,GAzBxB,wBAAA,cAAC,iBAAD;EACE,YAAY;EACZ,aAAa;EACb,SAAS,UAAU;GACjB,MAAM,eAAe;GACrB,WAAW,MAAM,aAAa,KAAK;EACrC;EACA,eAAe,mBAAmB,SAAS,MAAM;EACjD,MAAK;EACL,WAAW;EACX,UAAU;EACV,GAAI;CAaW,GAXd,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI,UACpD,wBAAA,cAAC,SAAD;EACE,MAAK;EACL,KAAK;EACL,OAAO,EAAE,YAAY,SAAS;EACtB;EACE;EACV,WAAW,UAAU;GACnB,WAAW,MAAM,OAAO,KAAK;EAC/B;CACD,CAAA,CACc,CACO;AAE9B;AAEA,SAAS,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileDropContext.js","names":[],"sources":["../../../src/components/file-drop/FileDropContext.ts"],"sourcesContent":["import React from 'react'\n\nimport { FileDropContextValue } from './types'\n\nexport const FileDropContext = React.createContext<FileDropContextValue>({\n isDragging: false,\n files: []\n})\n"],"mappings":";;AAIA,IAAa,kBAAkB,MAAM,cAAoC;CACvE,YAAY;CACZ,OAAO,EAAE;CACV,CAAC"}
1
+ {"version":3,"file":"FileDropContext.js","names":[],"sources":["../../../src/components/file-drop/FileDropContext.ts"],"sourcesContent":["import React from 'react'\n\nimport { FileDropContextValue } from './types'\n\nexport const FileDropContext = React.createContext<FileDropContextValue>({\n isDragging: false,\n files: []\n})\n"],"mappings":";;AAIA,IAAa,kBAAkB,MAAM,cAAoC;CACvE,YAAY;CACZ,OAAO,CAAC;AACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFileDrop.js","names":[],"sources":["../../../src/components/file-drop/useFileDrop.ts"],"sourcesContent":["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,IAAa,oBACX,MAAM,WAAW,gBAAgB"}
1
+ {"version":3,"file":"useFileDrop.js","names":[],"sources":["../../../src/components/file-drop/useFileDrop.ts"],"sourcesContent":["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,IAAa,oBACX,MAAM,WAAW,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.js","names":[],"sources":["../../../src/components/file-input/FileInput.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAYA,IAAa,aAAa,EACxB,QACA,UACA,WAAW,OACX,cACA,GAAG,WACiB;CACpB,MAAM,oBAAoB,UAA+C;EACvE,MAAM,EAAE,UAAU,MAAM;AAExB,eAAa,MAAM;;AAGrB,QACE,wBAAA,cAAC,QAAD;EAAQ,IAAG;EAAQ,GAAI;EAUd,EATP,wBAAA,cAAC,MAAD,EAAM,IAAI,QAAU,CAAA,EACnB,UACD,wBAAA,cAAC,SAAD;EACE,MAAK;EACL,UAAU;EACF;EACE;EACV,QAAA;EACA,CAAA,CACK;;AAIb,UAAU,cAAc"}
1
+ {"version":3,"file":"FileInput.js","names":[],"sources":["../../../src/components/file-input/FileInput.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAYA,IAAa,aAAa,EACxB,QACA,UACA,WAAW,OACX,cACA,GAAG,WACiB;CACpB,MAAM,oBAAoB,UAA+C;EACvE,MAAM,EAAE,UAAU,MAAM;EAExB,aAAa,KAAK;CACpB;CAEA,OACE,wBAAA,cAAC,QAAD;EAAQ,IAAG;EAAQ,GAAI;CAUf,GATN,wBAAA,cAAC,MAAD,EAAM,IAAI,OAAS,CAAA,GAClB,UACD,wBAAA,cAAC,SAAD;EACE,MAAK;EACL,UAAU;EACF;EACE;EACV,QAAA;CACD,CAAA,CACK;AAEZ;AAEA,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.js","names":[],"sources":["../../../src/components/flex/Flex.tsx"],"sourcesContent":["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"],"mappings":";;AAEA,IAAa,OAAO,OAClB,OACA;CACE,MAAM,CAAC,OAAO;CACd,UAAU;EACR,WAAW;GACT,KAAK,CAAC,WAAW;GACjB,eAAe,CAAC,mBAAmB;GACnC,QAAQ,CAAC,WAAW;GACpB,kBAAkB,CAAC,mBAAmB;GACtC,SAAS,CAAC,sBAAsB;GAChC,SAAS,CAAC,sBAAsB;GAChC,QAAQ,CAAC,qBAAqB;GAC9B,gBAAgB,CAAC,2BAA2B;GAC5C,OAAO,CAAC,oBAAoB;GAC7B;EACD,MAAM;GACJ,QAAQ,CAAC,cAAc;GACvB,MAAM,CAAC,YAAY;GACnB,gBAAgB,CAAC,oBAAoB;GACrC,SAAS,CAAC,sBAAsB;GAChC,SAAS,CAAC,sBAAsB;GAChC,QAAQ,CAAC,qBAAqB;GAC9B,gBAAgB,CAAC,2BAA2B;GAC5C,OAAO,CAAC,oBAAoB;GAC7B;EACD,SAAS;GACP,QAAQ,CAAC,iBAAiB;GAC1B,QAAQ,CAAC,2BAA2B;GACpC,MAAM,CAAC,yBAAyB;GAChC,OAAO,CAAC,gBAAgB;GACxB,QAAQ,CAAC,iBAAiB;GAC1B,KAAK,CAAC,cAAc;GACpB,cAAc,CAAC,gBAAgB;GAC/B,YAAY,CAAC,cAAc;GAC3B,MAAM,CAAC,yBAAyB;GAChC,OAAO,CAAC,0BAA0B;GAClC,iBAAiB,CAAC,kBAAkB;GACpC,gBAAgB,CAAC,iBAAiB;GAClC,gBAAgB,CAAC,iBAAiB;GAClC,SAAS,CAAC,kBAAkB;GAC5B,SAAS,CAAC,4BAA4B;GACtC,SAAS,CAAC,4BAA4B;GACtC,QAAQ,CAAC,2BAA2B;GACpC,gBAAgB,CAAC,iCAAiC;GAClD,OAAO,CAAC,0BAA0B;GACnC;EACD,OAAO;GACL,QAAQ,CAAC,uBAAuB;GAChC,QAAQ,CAAC,uBAAuB;GAChC,MAAM,CAAC,qBAAqB;GAC5B,QAAQ,CAAC,eAAe;GACxB,OAAO,CAAC,cAAc;GACtB,KAAK,CAAC,YAAY;GAClB,cAAc,CAAC,2BAA2B;GAC1C,YAAY,CAAC,yBAAyB;GACtC,cAAc,CAAC,cAAc;GAC7B,YAAY,CAAC,YAAY;GACzB,UAAU,CAAC,iBAAiB;GAC5B,kBAAkB,CAAC,+BAA+B;GAClD,iBAAiB,CAAC,8BAA8B;GAChD,SAAS,CAAC,gBAAgB;GAC1B,SAAS,CAAC,wBAAwB;GAClC,SAAS,CAAC,wBAAwB;GAClC,QAAQ,CAAC,uBAAuB;GAChC,gBAAgB,CAAC,6BAA6B;GAC9C,OAAO,CAAC,sBAAsB;GAC/B;EACD,KAAK;GACH,GAAG,CAAC,UAAU;GACd,GAAG,CAAC,QAAQ;GACZ,GAAG,CAAC,QAAQ;GACZ,GAAG,CAAC,QAAQ;GACZ,GAAG,CAAC,QAAQ;GACZ,IAAI,CAAC,QAAQ;GACb,GAAG,CAAC,QAAQ;GACZ,GAAG,CAAC,SAAS;GACb,GAAG,CAAC,SAAS;GACb,GAAG,CAAC,SAAS;GACb,GAAG,CAAC,SAAS;GACd;EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAED,KAAK,cAAc"}
1
+ {"version":3,"file":"Flex.js","names":[],"sources":["../../../src/components/flex/Flex.tsx"],"sourcesContent":["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"],"mappings":";;AAEA,IAAa,OAAO,OAClB,OACA;CACE,MAAM,CAAC,MAAM;CACb,UAAU;EACR,WAAW;GACT,KAAK,CAAC,UAAU;GAChB,eAAe,CAAC,kBAAkB;GAClC,QAAQ,CAAC,UAAU;GACnB,kBAAkB,CAAC,kBAAkB;GACrC,SAAS,CAAC,qBAAqB;GAC/B,SAAS,CAAC,qBAAqB;GAC/B,QAAQ,CAAC,oBAAoB;GAC7B,gBAAgB,CAAC,0BAA0B;GAC3C,OAAO,CAAC,mBAAmB;EAC7B;EACA,MAAM;GACJ,QAAQ,CAAC,aAAa;GACtB,MAAM,CAAC,WAAW;GAClB,gBAAgB,CAAC,mBAAmB;GACpC,SAAS,CAAC,qBAAqB;GAC/B,SAAS,CAAC,qBAAqB;GAC/B,QAAQ,CAAC,oBAAoB;GAC7B,gBAAgB,CAAC,0BAA0B;GAC3C,OAAO,CAAC,mBAAmB;EAC7B;EACA,SAAS;GACP,QAAQ,CAAC,gBAAgB;GACzB,QAAQ,CAAC,0BAA0B;GACnC,MAAM,CAAC,wBAAwB;GAC/B,OAAO,CAAC,eAAe;GACvB,QAAQ,CAAC,gBAAgB;GACzB,KAAK,CAAC,aAAa;GACnB,cAAc,CAAC,eAAe;GAC9B,YAAY,CAAC,aAAa;GAC1B,MAAM,CAAC,wBAAwB;GAC/B,OAAO,CAAC,yBAAyB;GACjC,iBAAiB,CAAC,iBAAiB;GACnC,gBAAgB,CAAC,gBAAgB;GACjC,gBAAgB,CAAC,gBAAgB;GACjC,SAAS,CAAC,iBAAiB;GAC3B,SAAS,CAAC,2BAA2B;GACrC,SAAS,CAAC,2BAA2B;GACrC,QAAQ,CAAC,0BAA0B;GACnC,gBAAgB,CAAC,gCAAgC;GACjD,OAAO,CAAC,yBAAyB;EACnC;EACA,OAAO;GACL,QAAQ,CAAC,sBAAsB;GAC/B,QAAQ,CAAC,sBAAsB;GAC/B,MAAM,CAAC,oBAAoB;GAC3B,QAAQ,CAAC,cAAc;GACvB,OAAO,CAAC,aAAa;GACrB,KAAK,CAAC,WAAW;GACjB,cAAc,CAAC,0BAA0B;GACzC,YAAY,CAAC,wBAAwB;GACrC,cAAc,CAAC,aAAa;GAC5B,YAAY,CAAC,WAAW;GACxB,UAAU,CAAC,gBAAgB;GAC3B,kBAAkB,CAAC,8BAA8B;GACjD,iBAAiB,CAAC,6BAA6B;GAC/C,SAAS,CAAC,eAAe;GACzB,SAAS,CAAC,uBAAuB;GACjC,SAAS,CAAC,uBAAuB;GACjC,QAAQ,CAAC,sBAAsB;GAC/B,gBAAgB,CAAC,4BAA4B;GAC7C,OAAO,CAAC,qBAAqB;EAC/B;EACA,KAAK;GACH,GAAG,CAAC,SAAS;GACb,GAAG,CAAC,OAAO;GACX,GAAG,CAAC,OAAO;GACX,GAAG,CAAC,OAAO;GACX,GAAG,CAAC,OAAO;GACX,IAAI,CAAC,OAAO;GACZ,GAAG,CAAC,OAAO;GACX,GAAG,CAAC,QAAQ;GACZ,GAAG,CAAC,QAAQ;GACZ,GAAG,CAAC,QAAQ;GACZ,GAAG,CAAC,QAAQ;EACd;CACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAEA,KAAK,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","names":[],"sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["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"],"mappings":";;;;AA8BA,IAAa,QACX,UACG;CACH,MAAM,EACJ,UACA,eACA,iBAAiB,UACjB,UACA,SACA,YACA,OACA,GAAG,SACD;CAEJ,MAAM,UAAU,QAAmB;EACjC;EACA,MAAM;EACP,CAAC;AAEF,QACE,wBAAA,cAAC,cAAiB,SAChB,wBAAA,cAAC,kBAAkB,UAAnB,EAA4B,OAAO;EAAE;EAAY;EAAO,EAQ3B,EAP3B,wBAAA,cAAC,QAAD;EACE,cAAW;EACX,UAAU,QAAQ,aAAa,UAAU,QAAQ;EACjD,GAAI;EAGC,EADJ,OAAO,aAAa,aAAa,SAAS,QAAQ,GAAG,SACjD,CACoB,CAChB;;AAInB,KAAK,cAAc"}
1
+ {"version":3,"file":"Form.js","names":[],"sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["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"],"mappings":";;;;AA8BA,IAAa,QACX,UACG;CACH,MAAM,EACJ,UACA,eACA,iBAAiB,UACjB,UACA,SACA,YACA,OACA,GAAG,SACD;CAEJ,MAAM,UAAU,QAAmB;EACjC;EACA,MAAM;CACR,CAAC;CAED,OACE,wBAAA,cAAC,cAAiB,SAChB,wBAAA,cAAC,kBAAkB,UAAnB,EAA4B,OAAO;EAAE;EAAY;CAAM,EAQ3B,GAP1B,wBAAA,cAAC,QAAD;EACE,cAAW;EACX,UAAU,QAAQ,aAAa,UAAU,OAAO;EAChD,GAAI;CAGA,GADH,OAAO,aAAa,aAAa,SAAS,OAAO,IAAI,QAClD,CACoB,CAChB;AAElB;AAEA,KAAK,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFieldError.js","names":[],"sources":["../../../src/components/form/useFieldError.ts"],"sourcesContent":["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"],"mappings":";;;AAGA,IAAa,iBAAiB,cAAsB;CAClD,MAAM,EAAE,WAAW,gBAAgB;CAGnC,MAAM,YAAY,UAAU,MAAM,YAAY,CAAC,OAAO,QAAQ;CAE9D,MAAM,kBAAkB,MAAM,QAAQ,UAAU;AAEhD,QAAO,EACL,OAAO,WAAW,EAAE,SACrB"}
1
+ {"version":3,"file":"useFieldError.js","names":[],"sources":["../../../src/components/form/useFieldError.ts"],"sourcesContent":["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"],"mappings":";;;AAGA,IAAa,iBAAiB,cAAsB;CAClD,MAAM,EAAE,WAAW,eAAe;CAGlC,MAAM,YAAY,UAAU,MAAM,WAAW,EAAE,OAAO,OAAO;CAE7D,MAAM,kBAAkB,MAAM,QAAQ,SAAS;CAE/C,OAAO,EACL,OAAO,UAAU,GAAG,QACtB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFormCustomContext.js","names":[],"sources":["../../../src/components/form/useFormCustomContext.ts"],"sourcesContent":["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"],"mappings":";;AAWA,IAAa,oBAAoB,QAAM,cAAqC,EAC1E,YAAY,YACb,CAAC;AAEF,IAAa,6BAA6B,QAAM,WAAW,kBAAkB"}
1
+ {"version":3,"file":"useFormCustomContext.js","names":[],"sources":["../../../src/components/form/useFormCustomContext.ts"],"sourcesContent":["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"],"mappings":";;AAWA,IAAa,oBAAoB,QAAM,cAAqC,EAC1E,YAAY,WACd,CAAC;AAED,IAAa,6BAA6B,QAAM,WAAW,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","names":[],"sources":["../../../src/components/grid/Grid.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAM,gBAAgB,OACpB,OACA;CACE,MAAM,CAAC,OAAO;CACd,UAAU,EACR,KAAK;EACH,GAAG,CAAC,UAAU;EACd,GAAG,CAAC,QAAQ;EACZ,GAAG,CAAC,QAAQ;EACZ,GAAG,CAAC,QAAQ;EACZ,GAAG,CAAC,QAAQ;EACZ,IAAI,CAAC,QAAQ;EACb,GAAG,CAAC,QAAQ;EACZ,GAAG,CAAC,SAAS;EACb,GAAG,CAAC,SAAS;EACb,GAAG,CAAC,SAAS;EACb,GAAG,CAAC,SAAS;EACd,EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAOD,IAAa,QAAQ,EACnB,WACA,OACA,MAAM,KACN,aACA,cAAc,OACd,GAAG,qBAEH,wBAAA,cAAC,eAAD;CACE,GAAI;CACJ,OAAO;EACL,GAAG;EACH,GAAI,eAAe,EAAE,mBAAmB,aAAa;EACrD,GAAI,eAAe,EAAE,mBAAmB,aAAa;EACtD;CACI;CACL,WAAW,GACT,eAAe,CACb,qFACD,EACD,UACD;CACD,CAAA;AAGJ,KAAK,cAAc"}
1
+ {"version":3,"file":"Grid.js","names":[],"sources":["../../../src/components/grid/Grid.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAM,gBAAgB,OACpB,OACA;CACE,MAAM,CAAC,MAAM;CACb,UAAU,EACR,KAAK;EACH,GAAG,CAAC,SAAS;EACb,GAAG,CAAC,OAAO;EACX,GAAG,CAAC,OAAO;EACX,GAAG,CAAC,OAAO;EACX,GAAG,CAAC,OAAO;EACX,IAAI,CAAC,OAAO;EACZ,GAAG,CAAC,OAAO;EACX,GAAG,CAAC,QAAQ;EACZ,GAAG,CAAC,QAAQ;EACZ,GAAG,CAAC,QAAQ;EACZ,GAAG,CAAC,QAAQ;CACd,EACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAOA,IAAa,QAAQ,EACnB,WACA,OACA,MAAM,KACN,aACA,cAAc,OACd,GAAG,qBAEH,wBAAA,cAAC,eAAD;CACE,GAAI;CACJ,OAAO;EACL,GAAG;EACH,GAAI,eAAe,EAAE,mBAAmB,YAAY;EACpD,GAAI,eAAe,EAAE,mBAAmB,YAAY;CACtD;CACK;CACL,WAAW,GACT,eAAe,CACb,oFACF,GACA,SACF;AACD,CAAA;AAGH,KAAK,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.js","names":[],"sources":["../../../src/components/heading/Heading.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAa,gBAAgB,OAC3B,MACA;CACE,MAAM,CAAC,MAAM;CACb,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAa;IAAW;IAAkB;IAAmB;GAClE,IAAI;IAAC;IAAa;IAAW;IAAkB;IAAmB;GAClE,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACD;GACD,KAAK;IACH;IACA;IACA;IACA;IACA;IACD;GACF;EACD,WAAW,EACT,MAAM,CAAC,eAAe,EACvB;EACD,QAAQ;GACN,QAAQ,CAAC,cAAc;GACvB,MAAM,CAAC,YAAY;GACpB;EACF;CACF,EACD,EACE,2BAA2B,MAC5B,CACF;AAiBD,IAAa,UAAU,QAAM,YAC1B,EAAE,OAAO,MAAM,SAAS,QAAQ,GAAG,kBAAkB,QACpD,wBAAA,cAAC,eAAD;CAAoB;CAAW;CAAc;CAAQ,GAAI;CAAkB,CAAA,CAE9E;AAED,QAAQ,cAAc"}
1
+ {"version":3,"file":"Heading.js","names":[],"sources":["../../../src/components/heading/Heading.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAa,gBAAgB,OAC3B,MACA;CACE,MAAM,CAAC,KAAK;CACZ,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAa;IAAW;IAAkB;GAAkB;GACjE,IAAI;IAAC;IAAa;IAAW;IAAkB;GAAkB;GACjE,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;GACF;GACA,KAAK;IACH;IACA;IACA;IACA;IACA;GACF;EACF;EACA,WAAW,EACT,MAAM,CAAC,cAAc,EACvB;EACA,QAAQ;GACN,QAAQ,CAAC,aAAa;GACtB,MAAM,CAAC,WAAW;EACpB;CACF;AACF,GACA,EACE,2BAA2B,KAC7B,CACF;AAiBA,IAAa,UAAU,QAAM,YAC1B,EAAE,OAAO,MAAM,SAAS,QAAQ,GAAG,kBAAkB,QACpD,wBAAA,cAAC,eAAD;CAAoB;CAAW;CAAc;CAAQ,GAAI;AAAiB,CAAA,CAE9E;AAEA,QAAQ,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","names":[],"sources":["../../../src/components/icon/Icon.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAa,aAAa,OACxB,OACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,UAAU,eAAe;EAC9B,IAAI,CAAC,UAAU,gBAAgB;EAC/B,IAAI,CAAC,UAAU,WAAW;EAC3B,EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAUD,IAAa,OAAO,QAAM,YACvB,EAAE,IAAI,KAAK,OAAO,MAAM,GAAG,kBAAkB,QAC5C,wBAAA,cAAC,YAAD;CACQ;CACN,eAAY;CACZ,GAAI;CACJ,IAAI;CACC;CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"Icon.js","names":[],"sources":["../../../src/components/icon/Icon.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAa,aAAa,OACxB,OACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,UAAU,cAAc;EAC7B,IAAI,CAAC,UAAU,eAAe;EAC9B,IAAI,CAAC,UAAU,UAAU;CAC3B,EACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAUA,IAAa,OAAO,QAAM,YACvB,EAAE,IAAI,KAAK,OAAO,MAAM,GAAG,kBAAkB,QAC5C,wBAAA,cAAC,YAAD;CACQ;CACN,eAAY;CACZ,GAAI;CACJ,IAAI;CACC;AACN,CAAA,CAEL"}
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","names":[],"sources":["../../../src/components/image/Image.tsx"],"sourcesContent":["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"],"mappings":";;;AAOA,IAAa,cAAc,OAAO,OAAO;CACvC,MAAM,CAAC,gBAAgB,aAAa;CACpC,UAAU,EACR,OAAO,EACL,MAAM;EACJ;EACA;EACA;EACA;EACA;EACD,EACF,EACF;CACF,CAAC;AAOF,IAAa,QAAQ,QAAM,YACxB,OAAO,QAAQ,wBAAA,cAAC,aAAD;CAAa,GAAI;CAAY;CAAO,CAAA,CACrD;AAED,MAAM,cAAc"}
1
+ {"version":3,"file":"Image.js","names":[],"sources":["../../../src/components/image/Image.tsx"],"sourcesContent":["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"],"mappings":";;;AAOA,IAAa,cAAc,OAAO,OAAO;CACvC,MAAM,CAAC,gBAAgB,YAAY;CACnC,UAAU,EACR,OAAO,EACL,MAAM;EACJ;EACA;EACA;EACA;EACA;CACF,EACF,EACF;AACF,CAAC;AAOD,IAAa,QAAQ,QAAM,YACxB,OAAO,QAAQ,wBAAA,cAAC,aAAD;CAAa,GAAI;CAAY;AAAM,CAAA,CACrD;AAEA,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"InlineMessage.config.js","names":[],"sources":["../../../src/components/inline-message/InlineMessage.config.ts"],"sourcesContent":["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"],"mappings":";;AAKA,IAAa,uBAGT;CACF,SAAS;CACT,SAAS;CACT,MAAM;CACN,SAAS;CACT,OAAO;CACR"}
1
+ {"version":3,"file":"InlineMessage.config.js","names":[],"sources":["../../../src/components/inline-message/InlineMessage.config.ts"],"sourcesContent":["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"],"mappings":";;AAKA,IAAa,uBAGT;CACF,SAAS;CACT,SAAS;CACT,MAAM;CACN,SAAS;CACT,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"InlineMessage.js","names":[],"sources":["../../../src/components/inline-message/InlineMessage.tsx"],"sourcesContent":["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"],"mappings":";;;;;;AASA,IAAM,yBAAyB,OAAO,OAAO;CAC3C,MAAM,CAAC,OAAO;CACd,UAAU,EACR,OAAO;EACL,SAAS,CAAC,eAAe;EACzB,SAAS,CAAC,6BAA6B,oBAAoB;EAC3D,MAAM,CAAC,YAAY;EACnB,SAAS,CAAC,gBAAgB;EAC1B,OAAO,CAAC,cAAc;EACvB,EACF;CACF,CAAC;AASF,IAAa,iBAAiB,EAC5B,WACA,WAAW,MACX,QAAQ,SACR,OAAO,MACP,UACA,GAAG,WAEH,wBAAA,cAAC,wBAAD;CAA+B;CAAkB;CAAW,GAAI;CAWvC,EAVtB,YACC,wBAAA,cAAC,MAAD;CACE,MAAK;CACL,IAAI,qBAAqB;CACzB,WAAU;CACV,CAAA,EAEJ,wBAAA,cAAC,MAAD;CAAM,IAAG;CAAa;CAAM,WAAU;CAE/B,EADJ,SACI,CACgB"}
1
+ {"version":3,"file":"InlineMessage.js","names":[],"sources":["../../../src/components/inline-message/InlineMessage.tsx"],"sourcesContent":["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"],"mappings":";;;;;;AASA,IAAM,yBAAyB,OAAO,OAAO;CAC3C,MAAM,CAAC,MAAM;CACb,UAAU,EACR,OAAO;EACL,SAAS,CAAC,cAAc;EACxB,SAAS,CAAC,6BAA6B,mBAAmB;EAC1D,MAAM,CAAC,WAAW;EAClB,SAAS,CAAC,eAAe;EACzB,OAAO,CAAC,aAAa;CACvB,EACF;AACF,CAAC;AASD,IAAa,iBAAiB,EAC5B,WACA,WAAW,MACX,QAAQ,SACR,OAAO,MACP,UACA,GAAG,WAEH,wBAAA,cAAC,wBAAD;CAA+B;CAAkB;CAAW,GAAI;AAWxC,GAVrB,YACC,wBAAA,cAAC,MAAD;CACE,MAAK;CACL,IAAI,qBAAqB;CACzB,WAAU;AACX,CAAA,GAEH,wBAAA,cAAC,MAAD;CAAM,IAAG;CAAa;CAAM,WAAU;AAEhC,GADH,QACG,CACgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","names":[],"sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAOA,IAAa,kBAAkB,OAAO,OAAO;CAC3C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,YAAY;GACV,UAAU;IACR;IACA;IACA;IACA;IACA;IACD;GACD,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,MAAM;GACJ,IAAI,CAAC,MAAM;GACX,IAAI,CAAC,OAAO;GACZ,IAAI,CAAC,OAAO;GACZ,IAAI,CAAC,OAAO;GACb;EACD,UAAU,EACR,MAAM,CAAC,sBAAsB,aAAa,EAC3C;EACD,OAAO,EACL,OAAO,EAAE,EACV;EACD,OAAO;GACL,OAAO,EAAE;GACT,MAAM,EAAE;GACT;EACF;CACD,kBAAkB;EAChB;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,gBAAgB;GACzB;EACD;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,mBAAmB,8BAA8B;GAC1D;EACD;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,WAAW;GACpB;EACD;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,cAAc;GACvB;EACF;CACF,CAAC;AAEF,gBAAgB,cAAc;AAE9B,IAAM,kBAAkB,OAAO,MAAM,EACnC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAcF,IAAM,aAAa;CACjB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,IAAa,YAAY,QAAM,YAC5B,EAAE,OAAO,QAAQ,MAAM,GAAG,QAAQ,QAAQ;CACzC,MAAM,WAAW,QAAM,cACf,2BAA2B,OAAO,MAAM,WAAW,GAAG,EAC5D,CAAC,KAAK,CACP;AAED,QACE,wBAAA,cAAC,iBAAD;EACO;EACL,IAAG;EACH,MAAM,SAAS,WAAW,SAAS;EACnC,WAAW,SAAS,WAAW,YAAY,KAAA;EAC3C,SAAS,SAAS,WAAW,WAAW,KAAA;EACxC,MAAM;EACN,GAAK;EACL,CAAA;EAGP;AAED,UAAU,cAAc;AAkBxB,IAAa,QAAQ,QAAM,YAEvB,EACE,WACA,OAAO,MACP,aAAa,YACb,OACA,OACA,UACA,OACA,GAAG,QAEL,QACG;AACH,QACE,wBAAA,cAAC,iBAAD;EACQ;EACM;EACL;EACG;EACH;EACI;EACJ;EAGS,EADhB,wBAAA,cAAC,WAAD;EAAiB;EAAW;EAAe;EAAU,GAAI;EAAQ,CAAA,CACjD;EAGvB;AAED,MAAM,cAAc"}
1
+ {"version":3,"file":"Input.js","names":[],"sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAOA,IAAa,kBAAkB,OAAO,OAAO;CAC3C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,YAAY;GACV,UAAU;IACR;IACA;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,IAAI,CAAC,KAAK;GACV,IAAI,CAAC,MAAM;GACX,IAAI,CAAC,MAAM;GACX,IAAI,CAAC,MAAM;EACb;EACA,UAAU,EACR,MAAM,CAAC,sBAAsB,YAAY,EAC3C;EACA,OAAO,EACL,OAAO,CAAC,EACV;EACA,OAAO;GACL,OAAO,CAAC;GACR,MAAM,CAAC;EACT;CACF;CACA,kBAAkB;EAChB;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,eAAe;EACzB;EACA;GACE,OAAO;GACP,YAAY;GACZ,OAAO,CAAC,mBAAmB,6BAA6B;EAC1D;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,UAAU;EACpB;EACA;GACE,YAAY;GACZ,OAAO;GACP,OAAO,CAAC,aAAa;EACvB;CACF;AACF,CAAC;AAED,gBAAgB,cAAc;AAE9B,IAAM,kBAAkB,OAAO,MAAM,EACnC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAcD,IAAM,aAAa;CACjB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,IAAa,YAAY,QAAM,YAC5B,EAAE,OAAO,QAAQ,MAAM,GAAG,QAAQ,QAAQ;CACzC,MAAM,WAAW,QAAM,cACf,2BAA2B,OAAO,MAAM,WAAW,EAAE,GAC3D,CAAC,IAAI,CACP;CAEA,OACE,wBAAA,cAAC,iBAAD;EACO;EACL,IAAG;EACH,MAAM,SAAS,WAAW,SAAS;EACnC,WAAW,SAAS,WAAW,YAAY,KAAA;EAC3C,SAAS,SAAS,WAAW,WAAW,KAAA;EACxC,MAAM;EACN,GAAK;CACN,CAAA;AAEL,CACF;AAEA,UAAU,cAAc;AAkBxB,IAAa,QAAQ,QAAM,YAEvB,EACE,WACA,OAAO,MACP,aAAa,YACb,OACA,OACA,UACA,OACA,GAAG,QAEL,QACG;CACH,OACE,wBAAA,cAAC,iBAAD;EACQ;EACM;EACL;EACG;EACH;EACI;EACJ;CAGQ,GADf,wBAAA,cAAC,WAAD;EAAiB;EAAW;EAAe;EAAU,GAAI;CAAO,CAAA,CACjD;AAErB,CACF;AAEA,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"InputField.js","names":[],"sources":["../../../src/components/input-field/InputField.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;AAaA,IAAa,cAAc,EACzB,WACA,OACA,MACA,YACA,QACA,aACA,WACA,YACA,OACA,GAAG,qBACkB;CACrB,MAAM,EAAE,aAAa,gBAAgB;CACrC,MAAM,UAAU,sBAAsB;CACtC,MAAM,EAAE,UAAU,cAAc,KAAK;CAErC,MAAM,MAAM,aAAa,SAAS,WAAW,GAAG;CAChD,MAAM,iBAAiB,SAAS,cAAc;CAC9C,MAAM,YAAY,SAAS,SAAS;AAEpC,QACE,wBAAA,cAAC,cAAD;EACa;EACE;EACN;EACP,SAAS;EACE;EACJ;EACC;EACR,UAAU,QAAQ,YAAY,SAAS;EACvC,YAAY;EAWC,EATb,wBAAA,cAAC,OAAD;EACE,IAAI;EACE;EACD;EACL,YAAY;EACZ,OAAO;EACP,GAAK,SAAS,EAAE,OAAO,SAAS;EAChC,GAAI;EACJ,CAAA,CACW;;AAInB,WAAW,cAAc"}
1
+ {"version":3,"file":"InputField.js","names":[],"sources":["../../../src/components/input-field/InputField.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;AAaA,IAAa,cAAc,EACzB,WACA,OACA,MACA,YACA,QACA,aACA,WACA,YACA,OACA,GAAG,qBACkB;CACrB,MAAM,EAAE,aAAa,eAAe;CACpC,MAAM,UAAU,qBAAqB;CACrC,MAAM,EAAE,UAAU,cAAc,IAAI;CAEpC,MAAM,MAAM,aAAa,SAAS,UAAU,IAAI;CAChD,MAAM,iBAAiB,SAAS,cAAc;CAC9C,MAAM,YAAY,SAAS,SAAS;CAEpC,OACE,wBAAA,cAAC,cAAD;EACa;EACE;EACN;EACP,SAAS;EACE;EACJ;EACC;EACR,UAAU,QAAQ,YAAY,QAAQ;EACtC,YAAY;CAWA,GATZ,wBAAA,cAAC,OAAD;EACE,IAAI;EACE;EACD;EACL,YAAY;EACZ,OAAO;EACP,GAAK,SAAS,EAAE,OAAO,QAAQ;EAC/B,GAAI;CACL,CAAA,CACW;AAElB;AAEA,WAAW,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"KeyboardShortcut.js","names":[],"sources":["../../../src/components/keyboard-shortcut/KeyboardShortcut.tsx"],"sourcesContent":["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"],"mappings":";;;;;;AA6BA,IAAa,mBAAmB,QAAM,YAGnC,EAAE,SAAS,QAAQ,eAAe,OAAO,WAAW,GAAG,QAAQ,QAAQ;CACxE,MAAM,CAAC,aAAa,kBAAkB,qBAAqB;AAC3D,SAAM,oBAAoB,WAAW,YAA8B;CAEnE,MAAM,kBAAkB,QAAM,aAC3B,MAAoC;AACnC,SAAO,SAAS,EAAE,UAAU,aAAa;AACvC,OAAI,OAAO,QAAQ,SAAS,CAAC,OAAO,CAAC,KAAK,WAAW,EAAE,SAAS,MAAM,CACpE,QAAO;IAAE,OAAO;IAAG;IAAU,CAAC;IAChC;AACF,cAAY,EAAE;IAEhB,CAAC,QAAQ,UAAU,CACpB;AAED,SAAM,gBAAgB;AACpB,MAAI,aAAc,QAAO,iBAAiB,WAAW,gBAAgB;AAErE,eAAa;AACX,UAAO,oBAAoB,WAAW,gBAAgB;;IAEvD,CAAC,cAAc,gBAAgB,CAAC;CAEnC,MAAM,YAAY,UAAU,OAAO;AAEnC,QACE,wBAAA,cAAC,WAAD;EACE,WAAW,eAAe,KAAA,IAAa;EACvC,KAAK;EACL,GAAI;EACJ,CAAA;EAEJ;AAEF,iBAAiB,cAAc;AAE/B,IAAM,kCAAkC,OAAO,MAAM,EACnD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAMF,IAAa,6BACX,UACG;AACH,QAAO,wBAAA,cAAC,iCAAD;EAAiC,MAAK;EAAK,IAAG;EAAM,GAAI;EAAS,CAAA;;AAG1E,0BAA0B,cAAc"}
1
+ {"version":3,"file":"KeyboardShortcut.js","names":[],"sources":["../../../src/components/keyboard-shortcut/KeyboardShortcut.tsx"],"sourcesContent":["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"],"mappings":";;;;;;AA6BA,IAAa,mBAAmB,QAAM,YAGnC,EAAE,SAAS,QAAQ,eAAe,OAAO,WAAW,GAAG,QAAQ,QAAQ;CACxE,MAAM,CAAC,aAAa,kBAAkB,oBAAoB;CAC1D,QAAM,oBAAoB,WAAW,WAA6B;CAElE,MAAM,kBAAkB,QAAM,aAC3B,MAAoC;EACnC,OAAO,SAAS,EAAE,UAAU,aAAa;GACvC,IAAI,OAAO,QAAQ,QAAQ,EAAE,OAAO,CAAC,KAAK,WAAW,EAAE,SAAS,KAAK,GACnE,OAAO;IAAE,OAAO;IAAG;GAAS,CAAC;EACjC,CAAC;EACD,YAAY,CAAC;CACf,GACA,CAAC,QAAQ,SAAS,CACpB;CAEA,QAAM,gBAAgB;EACpB,IAAI,cAAc,OAAO,iBAAiB,WAAW,eAAe;EAEpE,aAAa;GACX,OAAO,oBAAoB,WAAW,eAAe;EACvD;CACF,GAAG,CAAC,cAAc,eAAe,CAAC;CAElC,MAAM,YAAY,UAAU,OAAO;CAEnC,OACE,wBAAA,cAAC,WAAD;EACE,WAAW,eAAe,KAAA,IAAa;EACvC,KAAK;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,iBAAiB,cAAc;AAE/B,IAAM,kCAAkC,OAAO,MAAM,EACnD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAMD,IAAa,6BACX,UACG;CACH,OAAO,wBAAA,cAAC,iCAAD;EAAiC,MAAK;EAAK,IAAG;EAAM,GAAI;CAAQ,CAAA;AACzE;AAEA,0BAA0B,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/keyboard-shortcut/index.ts"],"sourcesContent":["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"],"mappings":";;AAKA,IAAa,mBAAmB,OAAO,OAAO,oBAA2B,EACvE,WAAW,2BACZ,CAAC;AAEF,iBAAiB,cAAc"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/keyboard-shortcut/index.ts"],"sourcesContent":["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"],"mappings":";;AAKA,IAAa,mBAAmB,OAAO,OAAO,oBAA2B,EACvE,WAAW,0BACb,CAAC;AAED,iBAAiB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","names":[],"sources":["../../../src/components/label/Label.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAM,cAAc,OAAO,SAAS;CAClC,MAAM;EAAC;EAAiB;EAAa;EAAM;CAC3C,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACrD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACtD;EACD,MAAM;GACJ,OAAO,CAAC,SAAS,gBAAgB;GACjC,QAAQ;IAAC;IAAQ;IAAe;IAAY;GAC7C;EACD,OAAO;GAAE,OAAO,EAAE;GAAE,QAAQ,EAAE;GAAE;EAChC,WAAW;GAAE,SAAS,EAAE;GAAE,KAAK,EAAE;GAAE;EACnC,YAAY;GAAE,UAAU,EAAE;GAAE,QAAQ,EAAE;GAAE;EACzC;CACD,kBAAkB;EAChB;GACE,MAAM;GACN,OAAO;GACP,OAAO,CAAC,cAAc;GACvB;EACD;GACE,MAAM;GACN,OAAO;GACP,OAAO,CAAC,eAAe;GACxB;EACD;GACE,MAAM;GACN,WAAW;GACX,OAAO,CAAC,mBAAmB;GAC5B;EACD;GACE,MAAM;GACN,WAAW;GACX,OAAO,CAAC,WAAW;GACpB;EACD;GACE,MAAM;GACN,YAAY;GACZ,OAAO,CAAC,cAAc;GACvB;EACF;CACF,CAAC;AAUF,IAAa,SAAS,EACpB,QAAQ,SACR,KAAK,SACL,YAAY,OACZ,OAAO,MACP,OAAO,SACP,UACA,UACA,GAAG,WAEH,wBAAA,cAAC,aAAD;CACM;CACE;CACA;CACC;CACI;CACX,GAAI;CAQQ,EANX,UACA,YACC,wBAAA,cAAC,QAAD;CAAM,WAAU;CAA+B,eAAA;CAExC,EAFoD,IAEpD,CAEG;AAGhB,MAAM,cAAc"}
1
+ {"version":3,"file":"Label.js","names":[],"sources":["../../../src/components/label/Label.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAM,cAAc,OAAO,SAAS;CAClC,MAAM;EAAC;EAAiB;EAAa;CAAK;CAC1C,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAW;IAAkB;GAAkB;GACpD,IAAI;IAAC;IAAW;IAAkB;GAAkB;EACtD;EACA,MAAM;GACJ,OAAO,CAAC,SAAS,eAAe;GAChC,QAAQ;IAAC;IAAQ;IAAe;GAAW;EAC7C;EACA,OAAO;GAAE,OAAO,CAAC;GAAG,QAAQ,CAAC;EAAE;EAC/B,WAAW;GAAE,SAAS,CAAC;GAAG,KAAK,CAAC;EAAE;EAClC,YAAY;GAAE,UAAU,CAAC;GAAG,QAAQ,CAAC;EAAE;CACzC;CACA,kBAAkB;EAChB;GACE,MAAM;GACN,OAAO;GACP,OAAO,CAAC,aAAa;EACvB;EACA;GACE,MAAM;GACN,OAAO;GACP,OAAO,CAAC,cAAc;EACxB;EACA;GACE,MAAM;GACN,WAAW;GACX,OAAO,CAAC,kBAAkB;EAC5B;EACA;GACE,MAAM;GACN,WAAW;GACX,OAAO,CAAC,UAAU;EACpB;EACA;GACE,MAAM;GACN,YAAY;GACZ,OAAO,CAAC,aAAa;EACvB;CACF;AACF,CAAC;AAUD,IAAa,SAAS,EACpB,QAAQ,SACR,KAAK,SACL,YAAY,OACZ,OAAO,MACP,OAAO,SACP,UACA,UACA,GAAG,WAEH,wBAAA,cAAC,aAAD;CACM;CACE;CACA;CACC;CACI;CACX,GAAI;AAQO,GANV,UACA,YACC,wBAAA,cAAC,QAAD;CAAM,WAAU;CAA+B,eAAA;AAEzC,GAFqD,GAErD,CAEG;AAGf,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","names":[],"sources":["../../../src/components/link/Link.tsx"],"sourcesContent":["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\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\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; reloadDocument?: boolean }\n>\n\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n ({ as, disabled, href, reloadDocument, ...rest }, ref) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n <StyledLink\n as={as || routerLinkProps.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)\n\nLink.displayName = 'Link'\n"],"mappings":";;;;;AASA,IAAa,aAAa,OACxB,KACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAW;IAAiB;IAAmB;GACpD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACrD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACrD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACrD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACtD;EACD,WAAW,EACT,MAAM,CAAC,eAAe,EACvB;EACF;CACD,iBAAiB,EACf,MAAM,MACP;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAOD,IAAa,OAAO,QAAM,YACvB,EAAE,IAAI,UAAU,MAAM,gBAAgB,GAAG,QAAQ,QAAQ;CACxD,MAAM,kBAAkB,mBAAmB,MAAM,EAAE,gBAAgB,CAAC;AAEpE,QACE,wBAAA,cAAC,YAAD;EACE,IAAI,MAAM,gBAAgB,OAAO,CAAC,OAAO,WAAW,KAAA;EACpD,WAAW,CAAC,OAAO,OAAO,KAAA;EACpB;EACN,GAAK,YAAY,EAAE,UAAU,MAAM;EACnC,GAAI;EACJ,GAAI,uBAAuB,KAAK;EAC3B;EACL,CAAA;EAGP;AAED,KAAK,cAAc"}
1
+ {"version":3,"file":"Link.js","names":[],"sources":["../../../src/components/link/Link.tsx"],"sourcesContent":["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\nimport { useRouterLinkProps } from '../router-provider/RouterProvider'\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; reloadDocument?: boolean }\n>\n\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n ({ as, disabled, href, reloadDocument, ...rest }, ref) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n\n return (\n <StyledLink\n as={as || routerLinkProps.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)\n\nLink.displayName = 'Link'\n"],"mappings":";;;;;AASA,IAAa,aAAa,OACxB,KACA;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;IAAC;IAAW;IAAiB;GAAkB;GACnD,IAAI;IAAC;IAAW;IAAkB;GAAkB;GACpD,IAAI;IAAC;IAAW;IAAkB;GAAkB;GACpD,IAAI;IAAC;IAAW;IAAkB;GAAkB;GACpD,IAAI;IAAC;IAAW;IAAkB;GAAkB;EACtD;EACA,WAAW,EACT,MAAM,CAAC,cAAc,EACvB;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAOA,IAAa,OAAO,QAAM,YACvB,EAAE,IAAI,UAAU,MAAM,gBAAgB,GAAG,QAAQ,QAAQ;CACxD,MAAM,kBAAkB,mBAAmB,MAAM,EAAE,eAAe,CAAC;CAEnE,OACE,wBAAA,cAAC,YAAD;EACE,IAAI,MAAM,gBAAgB,OAAO,CAAC,OAAO,WAAW,KAAA;EACpD,WAAW,CAAC,OAAO,OAAO,KAAA;EACpB;EACN,GAAK,YAAY,EAAE,UAAU,KAAK;EAClC,GAAI;EACJ,GAAI,uBAAuB,IAAI;EAC1B;CACN,CAAA;AAEL,CACF;AAEA,KAAK,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","names":[],"sources":["../../../src/components/list/List.tsx"],"sourcesContent":["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"],"mappings":";;;AAIA,IAAa,WAAW,OAAO,MAAM,EACnC,MAAM,CAAC,aAAa,gBAAgB,EACrC,CAAC;AAEF,IAAa,aAAa,OAAO,MAAM;CACrC,MAAM,CAAC,eAAe,YAAY;CAClC,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAW;IAAiB;IAAmB;GACpD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACrD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACrD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACrD,IAAI;IAAC;IAAW;IAAkB;IAAmB;GACtD;EACD,WAAW,EACT,MAAM,CAAC,eAAe,EACvB;EACD,SAAS;GACP,MAAM;IACJ;IACA;IACA;IACA;IACA;IACD;GACD,OAAO;IAAC;IAAQ;IAAa;IAAgB;GAC9C;EACD,OAAO,EACL,SAAS,CAAC,0BAA0B,EACrC;EACF;CACF,CAAC;AAYF,IAAa,OAAO,QAAM,YAEtB,EAAE,OAAO,MAAM,YAAY,MAAM,UAAU,OAAO,GAAG,kBACrD,QAEA,wBAAA,cAAC,YAAD;CACO;CACL,IAAI,UAAU,OAAO;CACZ;CACH;CACK;CACX,GAAI;CACJ,CAAA,CAEL;AAED,KAAK,OAAO"}
1
+ {"version":3,"file":"List.js","names":[],"sources":["../../../src/components/list/List.tsx"],"sourcesContent":["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"],"mappings":";;;AAIA,IAAa,WAAW,OAAO,MAAM,EACnC,MAAM,CAAC,aAAa,eAAe,EACrC,CAAC;AAED,IAAa,aAAa,OAAO,MAAM;CACrC,MAAM,CAAC,eAAe,WAAW;CACjC,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAW;IAAiB;GAAkB;GACnD,IAAI;IAAC;IAAW;IAAkB;GAAkB;GACpD,IAAI;IAAC;IAAW;IAAkB;GAAkB;GACpD,IAAI;IAAC;IAAW;IAAkB;GAAkB;GACpD,IAAI;IAAC;IAAW;IAAkB;GAAkB;EACtD;EACA,WAAW,EACT,MAAM,CAAC,cAAc,EACvB;EACA,SAAS;GACP,MAAM;IACJ;IACA;IACA;IACA;IACA;GACF;GACA,OAAO;IAAC;IAAQ;IAAa;GAAe;EAC9C;EACA,OAAO,EACL,SAAS,CAAC,yBAAyB,EACrC;CACF;AACF,CAAC;AAYD,IAAa,OAAO,QAAM,YAEtB,EAAE,OAAO,MAAM,YAAY,MAAM,UAAU,OAAO,GAAG,kBACrD,QAEA,wBAAA,cAAC,YAAD;CACO;CACL,IAAI,UAAU,OAAO;CACZ;CACH;CACK;CACX,GAAI;AACL,CAAA,CAEL;AAEA,KAAK,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"Loader.js","names":[],"sources":["../../../src/components/loader/Loader.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAM,MAAM,OAAO,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,wBAAA,cAAC,OAAD;CACE,WAAW,GAAG,QAAQ,kBAAkB,UAAU;CAClD,MAAK;CACL,GAAI;CAMA,EAJJ,wBAAA,cAAC,QAAD,EAAM,WAAU,WAA0B,EAAf,QAAe,EAC1C,wBAAA,cAAC,KAAD,EAAW,MAAQ,CAAA,EACnB,wBAAA,cAAC,KAAD,EAAW,MAAQ,CAAA,EACnB,wBAAA,cAAC,KAAD,EAAW,MAAQ,CAAA,CACf"}
1
+ {"version":3,"file":"Loader.js","names":[],"sources":["../../../src/components/loader/Loader.tsx"],"sourcesContent":["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"],"mappings":";;;AAKA,IAAM,MAAM,OAAO,OAAO;CACxB,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,UAAU,QAAQ;EACvB,IAAI,CAAC,YAAY,QAAQ;EACzB,IAAI,CAAC,UAAU,UAAU;CAC3B,EACF;AACF,CAAC;AAOD,IAAa,UAAU,EACrB,WACA,UAAU,WACV,OAAO,MACP,GAAG,YAEH,wBAAA,cAAC,OAAD;CACE,WAAW,GAAG,QAAQ,kBAAkB,SAAS;CACjD,MAAK;CACL,GAAI;AAMD,GAJH,wBAAA,cAAC,QAAD,EAAM,WAAU,UAAyB,GAAd,OAAc,GACzC,wBAAA,cAAC,KAAD,EAAW,KAAO,CAAA,GAClB,wBAAA,cAAC,KAAD,EAAW,KAAO,CAAA,GAClB,wBAAA,cAAC,KAAD,EAAW,KAAO,CAAA,CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownContent.js","names":[],"sources":["../../../src/components/markdown-content/MarkdownContent.tsx"],"sourcesContent":["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) => 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: { node: any; handleNode: HandleNode }) => 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"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAM,wBAAwB,OAAO,OAAO,EAC1C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAWF,IAAM,uBAAuB;CAC3B,MAAM;CACN,UAAU;CACV,SAAS;CACT,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;CACN,UAAU;CACV,WAAW;CACX,QAAQ;CACR,MAAM;CACN,eAAe;CAChB;AAED,IAAM,mBAAmB,SAAS;AAChC,KAAI,KAAK,UAAU,OAAO;EACxB,MAAM,EAAE,MAAM,QAAQ,WAAW,KAAK,SAAS;AAC/C,SAAO,GAAG,KAAK,OAAO,OAAO,SAAS;;AAGxC,QAAO,GAAG,KAAK,OAAO,iBAAC,IAAI,MAAM;;AAGnC,IAAa,mBAAmB,EAC9B,SACA,mBAAmB,EAAE,EACrB,gBAC0B;CAC1B,MAAM,MAAM,aAAa,SAAS;EAChC,YAAY,CAAC,QAAQ,CAAC;EACtB,iBAAiB,CAAC,UAAU,aAAa;EAC1C,CAAC;CAEF,MAAM,gBAAgB;EACpB,GAAG;EACH,GAAG;EACJ;CAED,MAAM,cAA0B,SAAS;EACvC,MAAM,oBAAoB,cAAc,KAAK;AAE7C,SAAO,oBACL,wBAAA,cAAC,mBAAD;GACE,KAAK,gBAAgB,KAAK;GACpB;GACM;GACZ,CAAA,GACA;;AAGN,QACE,wBAAA,cAAC,uBAAD,EAAkC,WAEV,EADrB,IAAI,SAAS,IAAI,WAAW,CACP;;AAI5B,gBAAgB,cAAc"}
1
+ {"version":3,"file":"MarkdownContent.js","names":[],"sources":["../../../src/components/markdown-content/MarkdownContent.tsx"],"sourcesContent":["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) => 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: { node: any; handleNode: HandleNode }) => 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"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAM,wBAAwB,OAAO,OAAO,EAC1C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAWD,IAAM,uBAAuB;CAC3B,MAAM;CACN,UAAU;CACV,SAAS;CACT,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;CACN,UAAU;CACV,WAAW;CACX,QAAQ;CACR,MAAM;CACN,eAAe;AACjB;AAEA,IAAM,mBAAmB,SAAS;CAChC,IAAI,KAAK,UAAU,OAAO;EACxB,MAAM,EAAE,MAAM,QAAQ,WAAW,KAAK,SAAS;EAC/C,OAAO,GAAG,KAAK,OAAO,OAAO,SAAS;CACxC;CAEA,OAAO,GAAG,KAAK,OAAO,iBAAC,IAAI,KAAK;AAClC;AAEA,IAAa,mBAAmB,EAC9B,SACA,mBAAmB,CAAC,GACpB,gBAC0B;CAC1B,MAAM,MAAM,aAAa,SAAS;EAChC,YAAY,CAAC,OAAO,CAAC;EACrB,iBAAiB,CAAC,UAAU,YAAY;CAC1C,CAAC;CAED,MAAM,gBAAgB;EACpB,GAAG;EACH,GAAG;CACL;CAEA,MAAM,cAA0B,SAAS;EACvC,MAAM,oBAAoB,cAAc,KAAK;EAE7C,OAAO,oBACL,wBAAA,cAAC,mBAAD;GACE,KAAK,gBAAgB,IAAI;GACnB;GACM;EACb,CAAA,IACC;CACN;CAEA,OACE,wBAAA,cAAC,uBAAD,EAAkC,UAEX,GADpB,IAAI,SAAS,IAAI,UAAU,CACP;AAE3B;AAEA,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownCode.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownCode.tsx"],"sourcesContent":["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"],"mappings":";;;AASA,IAAM,qBAAqB,OAAO,OAAO,EACvC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAa,gBAAgB,EAAE,WAC7B,wBAAA,cAAC,oBAAD,EAAoB,IAAG,OAAuC,EAAhC,KAAK,MAA2B"}
1
+ {"version":3,"file":"MarkdownCode.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownCode.tsx"],"sourcesContent":["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"],"mappings":";;;AASA,IAAM,qBAAqB,OAAO,OAAO,EACvC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,IAAa,gBAAgB,EAAE,WAC7B,wBAAA,cAAC,oBAAD,EAAoB,IAAG,MAAsC,GAA/B,KAAK,KAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownEmphasis.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownEmphasis.tsx"],"sourcesContent":["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\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"],"mappings":";;;AAUA,IAAa,yBAAyB,OAAO,MAAM,EACjD,MAAM,CAAC,SAAS,EACjB,CAAC;AAEF,IAAa,oBAAoB,EAC/B,MACA,iBAEA,wBAAA,cAAC,wBAAA,MACE,KAAK,UAAU,IAAI,WAAW,CACR"}
1
+ {"version":3,"file":"MarkdownEmphasis.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownEmphasis.tsx"],"sourcesContent":["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\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"],"mappings":";;;AAUA,IAAa,yBAAyB,OAAO,MAAM,EACjD,MAAM,CAAC,QAAQ,EACjB,CAAC;AAED,IAAa,oBAAoB,EAC/B,MACA,iBAEA,wBAAA,cAAC,wBAAA,MACE,KAAK,UAAU,IAAI,UAAU,CACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownHeading.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownHeading.tsx"],"sourcesContent":["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\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"],"mappings":";;;AAUA,IAAM,mBAAmB,UAAgC;AACvD,SAAQ,OAAR;EACE,KAAK,EACH,QAAO;GAAE,MAAM;GAAM,IAAI;GAAM;EACjC,KAAK,EACH,QAAO;GAAE,MAAM;GAAM,IAAI;GAAM;EACjC,KAAK,EACH,QAAO;GAAE,MAAM;GAAM,IAAI;GAAM;EACjC,KAAK,EACH,QAAO;GAAE,MAAM;GAAM,IAAI;GAAM;EACjC,KAAK,EACH,QAAO;GAAE,MAAM;GAAM,IAAI;GAAM;EACjC,QACE,QAAO;GAAE,MAAM;GAAM,IAAI;GAAM;;;AAIrC,IAAa,mBAAmB,EAC9B,MACA,YACA,GAAG,WACuB;CAC1B,MAAM,EAAE,IAAI,SAAS,gBAAgB,KAAK,MAAM;AAEhD,QACE,wBAAA,cAAC,SAAD;EAAa;EAAU;EAAM,GAAI;EAEvB,EADP,KAAK,UAAU,IAAI,WAAW,CACvB"}
1
+ {"version":3,"file":"MarkdownHeading.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownHeading.tsx"],"sourcesContent":["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\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"],"mappings":";;;AAUA,IAAM,mBAAmB,UAAgC;CACvD,QAAQ,OAAR;EACE,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,SACE,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;CAClC;AACF;AAEA,IAAa,mBAAmB,EAC9B,MACA,YACA,GAAG,WACuB;CAC1B,MAAM,EAAE,IAAI,SAAS,gBAAgB,KAAK,KAAK;CAE/C,OACE,wBAAA,cAAC,SAAD;EAAa;EAAU;EAAM,GAAI;CAExB,GADN,KAAK,UAAU,IAAI,UAAU,CACvB;AAEb"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownImage.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownImage.tsx"],"sourcesContent":["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"],"mappings":";;;AAUA,IAAa,iBAAiB,EAAE,MAAM,gBACpC,wBAAA,cAAC,OAAD;CAAO,KAAK,KAAK;CAAK,KAAK,KAAK,OAAO,KAAA;CAAsB;CAAa,CAAA"}
1
+ {"version":3,"file":"MarkdownImage.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownImage.tsx"],"sourcesContent":["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"],"mappings":";;;AAUA,IAAa,iBAAiB,EAAE,MAAM,gBACpC,wBAAA,cAAC,OAAD;CAAO,KAAK,KAAK;CAAK,KAAK,KAAK,OAAO,KAAA;CAAsB;AAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownInlineCode.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownInlineCode.tsx"],"sourcesContent":["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"],"mappings":";;;AASA,IAAM,2BAA2B,OAAO,OAAO,EAC7C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAa,sBAAsB,EAAE,WACnC,wBAAA,cAAC,0BAAD,EAA0B,IAAG,QAA8C,EAAtC,KAAK,MAAiC"}
1
+ {"version":3,"file":"MarkdownInlineCode.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownInlineCode.tsx"],"sourcesContent":["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"],"mappings":";;;AASA,IAAM,2BAA2B,OAAO,OAAO,EAC7C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,IAAa,sBAAsB,EAAE,WACnC,wBAAA,cAAC,0BAAD,EAA0B,IAAG,OAA6C,GAArC,KAAK,KAAgC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownLink.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownLink.tsx"],"sourcesContent":["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\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"],"mappings":";;;AAUA,IAAa,gBAAgB,EAAE,MAAM,iBACnC,wBAAA,cAAC,MAAD;CAAM,OAAO,KAAK,SAAS,KAAA;CAAW,MAAM,KAAK;CAE1C,EADJ,KAAK,UAAU,IAAI,WAAW,CAC1B"}
1
+ {"version":3,"file":"MarkdownLink.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownLink.tsx"],"sourcesContent":["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\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"],"mappings":";;;AAUA,IAAa,gBAAgB,EAAE,MAAM,iBACnC,wBAAA,cAAC,MAAD;CAAM,OAAO,KAAK,SAAS,KAAA;CAAW,MAAM,KAAK;AAE3C,GADH,KAAK,UAAU,IAAI,UAAU,CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownList.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownList.tsx"],"sourcesContent":["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\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"],"mappings":";;;;AAaA,IAAa,gBAAgB,EAC3B,MACA,YACA,gBAEA,wBAAA,cAAC,MAAD;CACE,SAAS,KAAK,WAAW,KAAA;CACzB,WAAW,GACT,gBACA,uBACA,sBACA,UACD;CAGI,EADJ,KAAK,UAAU,IAAI,WAAW,CAC1B"}
1
+ {"version":3,"file":"MarkdownList.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownList.tsx"],"sourcesContent":["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\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"],"mappings":";;;;AAaA,IAAa,gBAAgB,EAC3B,MACA,YACA,gBAEA,wBAAA,cAAC,MAAD;CACE,SAAS,KAAK,WAAW,KAAA;CACzB,WAAW,GACT,gBACA,uBACA,sBACA,SACF;AAGI,GADH,KAAK,UAAU,IAAI,UAAU,CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownListItem.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownListItem.tsx"],"sourcesContent":["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\n}\n\nexport const MarkdownListItem = ({\n node,\n handleNode\n}: MarkdownListItemProps) => (\n <List.Item>{node.children?.map(handleNode)}</List.Item>\n)\n"],"mappings":";;;AAUA,IAAa,oBAAoB,EAC/B,MACA,iBAEA,wBAAA,cAAC,KAAK,MAAA,MAAM,KAAK,UAAU,IAAI,WAAW,CAAa"}
1
+ {"version":3,"file":"MarkdownListItem.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownListItem.tsx"],"sourcesContent":["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\n}\n\nexport const MarkdownListItem = ({\n node,\n handleNode\n}: MarkdownListItemProps) => (\n <List.Item>{node.children?.map(handleNode)}</List.Item>\n)\n"],"mappings":";;;AAUA,IAAa,oBAAoB,EAC/B,MACA,iBAEA,wBAAA,cAAC,KAAK,MAAA,MAAM,KAAK,UAAU,IAAI,UAAU,CAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownParagraph.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownParagraph.tsx"],"sourcesContent":["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\n}\n\nexport const MarkdownParagraph = ({\n node,\n handleNode,\n ...rest\n}: MarkdownParagraphProps) => (\n <Text {...rest}>{node.children?.map(handleNode)}</Text>\n)\n"],"mappings":";;;AAUA,IAAa,qBAAqB,EAChC,MACA,YACA,GAAG,WAEH,wBAAA,cAAC,MAAS,MAAO,KAAK,UAAU,IAAI,WAAW,CAAQ"}
1
+ {"version":3,"file":"MarkdownParagraph.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownParagraph.tsx"],"sourcesContent":["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\n}\n\nexport const MarkdownParagraph = ({\n node,\n handleNode,\n ...rest\n}: MarkdownParagraphProps) => (\n <Text {...rest}>{node.children?.map(handleNode)}</Text>\n)\n"],"mappings":";;;AAUA,IAAa,qBAAqB,EAChC,MACA,YACA,GAAG,WAEH,wBAAA,cAAC,MAAS,MAAO,KAAK,UAAU,IAAI,UAAU,CAAQ"}