@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":"StepperStepLabel.js","names":[],"sources":["../../../src/components/stepper/StepperStepLabel.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nexport const StepperStepLabel = styled(Text, {\n base: ['font-semibold'],\n variants: {\n direction: {\n vertical: ['ml-3', 'text-left'],\n horizontal: ['mt-3', 'text-center']\n },\n status: {\n default: ['font-normal', 'text-grey-700'],\n active: ['text-primary-900'],\n viewed: ['text-grey-1000'],\n completed: ['text-primary-800'],\n success: ['text-success'],\n reviewed: []\n }\n }\n})\n"],"mappings":";;;AAIA,IAAa,mBAAmB,OAAO,MAAM;CAC3C,MAAM,CAAC,gBAAgB;CACvB,UAAU;EACR,WAAW;GACT,UAAU,CAAC,QAAQ,YAAY;GAC/B,YAAY,CAAC,QAAQ,cAAc;GACpC;EACD,QAAQ;GACN,SAAS,CAAC,eAAe,gBAAgB;GACzC,QAAQ,CAAC,mBAAmB;GAC5B,QAAQ,CAAC,iBAAiB;GAC1B,WAAW,CAAC,mBAAmB;GAC/B,SAAS,CAAC,eAAe;GACzB,UAAU,EAAE;GACb;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"StepperStepLabel.js","names":[],"sources":["../../../src/components/stepper/StepperStepLabel.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nexport const StepperStepLabel = styled(Text, {\n base: ['font-semibold'],\n variants: {\n direction: {\n vertical: ['ml-3', 'text-left'],\n horizontal: ['mt-3', 'text-center']\n },\n status: {\n default: ['font-normal', 'text-grey-700'],\n active: ['text-primary-900'],\n viewed: ['text-grey-1000'],\n completed: ['text-primary-800'],\n success: ['text-success'],\n reviewed: []\n }\n }\n})\n"],"mappings":";;;AAIA,IAAa,mBAAmB,OAAO,MAAM;CAC3C,MAAM,CAAC,eAAe;CACtB,UAAU;EACR,WAAW;GACT,UAAU,CAAC,QAAQ,WAAW;GAC9B,YAAY,CAAC,QAAQ,aAAa;EACpC;EACA,QAAQ;GACN,SAAS,CAAC,eAAe,eAAe;GACxC,QAAQ,CAAC,kBAAkB;GAC3B,QAAQ,CAAC,gBAAgB;GACzB,WAAW,CAAC,kBAAkB;GAC9B,SAAS,CAAC,cAAc;GACxB,UAAU,CAAC;EACb;CACF;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StepperSteps.js","names":[],"sources":["../../../src/components/stepper/StepperSteps.tsx"],"sourcesContent":["import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './stepper-context/StepperContext'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { IStepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled('div', {\n base: ['flex', 'justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: IStepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedSteps.includes(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedSteps.includes(index)) return Status.COMPLETED\n if (viewedSteps.includes(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedSteps.includes(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedSteps.includes(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n"],"mappings":";;;;;;;;;;AAYA,IAAM,wBAAwB,OAAO,OAAO;CAC1C,MAAM,CAAC,QAAQ,kBAAkB;CACjC,UAAU,EACR,WAAW;EACT,UAAU,CAAC,WAAW;EACtB,YAAY,CAAC,WAAW;EACzB,EACF;CACF,CAAC;AAEF,IAAa,gBAAgB,EAAE,gBAAoC;CACjE,MAAM,EACJ,OACA,UACA,YACA,aACA,WACA,WACA,YACA,gBACA,uBACE,YAAY;CAEhB,MAAM,mBAAmB,UAAkB;EACzC,MAAM,eAAe,MAAM;AAE3B,MAAI,aAAa,OAAQ,QAAO,aAAa;AAC7C,MAAI,eAAe,WAAW,MAAM,OAAQ,QAAO,OAAO;AAC1D,MAAI,eAAe,SAAS,eAAe,SAAS,WAAW,CAC7D,QAAO,OAAO;AAChB,MAAI,eAAe,MAAO,QAAO,OAAO;AACxC,MAAI,eAAe,SAAS,MAAM,CAAE,QAAO,OAAO;AAClD,MAAI,YAAY,SAAS,MAAM,CAAE,QAAO,OAAO;AAC/C,SAAO,OAAO;;CAGhB,MAAM,sBAAsB,UAAkB;EAC5C,MAAM,eAAe,MAAM,QAAQ;AAEnC,MAAI,eAAe,WAAW,MAAM,OAClC,QAAO,OAAO;AAGhB,MAAI,iBAAiB,OAAO,QAC1B,QAAO,OAAO;AAGhB,MAAI,iBAAiB,OAAO,aAAa,QAAQ,KAAK,IAAI,GAAG,YAAY,CACvE,QAAO,OAAO;AAGhB,MAAI,iBAAiB,OAAO,OAC1B,QAAO,OAAO;AAGhB,SAAO,OAAO;;AAGhB,QACE,wBAAA,cAAC,uBAAD;EAAkC;EAAsB;EA0DhC,EAzDrB,MAAM,KAAK,MAAM,UAAU;EAC1B,MAAM,eAAe,gBAAgB,MAAM;EAC3C,MAAM,kBAAkB,mBAAmB,MAAM;AAEjD,SACE,wBAAA,cAAC,sBAAD;GACE,UAAU;GACV,KAAK,QAAQ;GACF;GACX,WAAW;GACX,QAAQ;GACR,OAAO,EAAE,WAAW,MAAM,UAAU,GAAG;GACvC,WACE,cAAc,eACV,gCACA;GAEN,aAAa;GAqCQ,EAnCrB,wBAAA,cAAC,mBAAD;GACE,IAAI,YAAY,WAAW;GAC3B,eACE,aAAa,YAAY,SAAS,MAAM,GACpC,WAAW,MAAM,GACjB,KAAA;GAEN,QAAQ;GACR,gBAAc,UAAU,aAAa,SAAS,KAAA;GAC9C,cAAY,CAAC,KAAK,QAAQ,QAAQ,QAAQ,MAAM;GAChD,mBAAiB,KAAK,QAAQ,QAAQ,UAAU,KAAA;GAChD,WACE,aAAa,YAAY,SAAS,MAAM,GACpC,mBACA;GASY,EANjB,KAAK,WAAW,OAAO,WACvB,sBAAsB,iBAAiB,OAAO,YAC7C,wBAAA,cAAC,MAAD,EAAM,IAAI,IAAM,CAAA,GAEhB,QAAQ,EAEQ,EAEnB,KAAK,SAAS,CAAC,cACd,wBAAA,cAAC,kBAAD;GACE,IAAG;GACH,IAAI,QAAQ;GACD;GACX,QAAQ;GAGS,EADhB,KAAK,MACW,CAEA;GAEzB,CACoB"}
1
+ {"version":3,"file":"StepperSteps.js","names":[],"sources":["../../../src/components/stepper/StepperSteps.tsx"],"sourcesContent":["import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './stepper-context/StepperContext'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { IStepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled('div', {\n base: ['flex', 'justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: IStepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedSteps.includes(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedSteps.includes(index)) return Status.COMPLETED\n if (viewedSteps.includes(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedSteps.includes(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedSteps.includes(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n"],"mappings":";;;;;;;;;;AAYA,IAAM,wBAAwB,OAAO,OAAO;CAC1C,MAAM,CAAC,QAAQ,iBAAiB;CAChC,UAAU,EACR,WAAW;EACT,UAAU,CAAC,UAAU;EACrB,YAAY,CAAC,UAAU;CACzB,EACF;AACF,CAAC;AAED,IAAa,gBAAgB,EAAE,gBAAoC;CACjE,MAAM,EACJ,OACA,UACA,YACA,aACA,WACA,WACA,YACA,gBACA,uBACE,WAAW;CAEf,MAAM,mBAAmB,UAAkB;EACzC,MAAM,eAAe,MAAM;EAE3B,IAAI,aAAa,QAAQ,OAAO,aAAa;EAC7C,IAAI,eAAe,WAAW,MAAM,QAAQ,OAAO,OAAO;EAC1D,IAAI,eAAe,SAAS,eAAe,SAAS,UAAU,GAC5D,OAAO,OAAO;EAChB,IAAI,eAAe,OAAO,OAAO,OAAO;EACxC,IAAI,eAAe,SAAS,KAAK,GAAG,OAAO,OAAO;EAClD,IAAI,YAAY,SAAS,KAAK,GAAG,OAAO,OAAO;EAC/C,OAAO,OAAO;CAChB;CAEA,MAAM,sBAAsB,UAAkB;EAC5C,MAAM,eAAe,MAAM,QAAQ;EAEnC,IAAI,eAAe,WAAW,MAAM,QAClC,OAAO,OAAO;EAGhB,IAAI,iBAAiB,OAAO,SAC1B,OAAO,OAAO;EAGhB,IAAI,iBAAiB,OAAO,aAAa,QAAQ,KAAK,IAAI,GAAG,WAAW,GACtE,OAAO,OAAO;EAGhB,IAAI,iBAAiB,OAAO,QAC1B,OAAO,OAAO;EAGhB,OAAO,OAAO;CAChB;CAEA,OACE,wBAAA,cAAC,uBAAD;EAAkC;EAAsB;CA0DjC,GAzDpB,MAAM,KAAK,MAAM,UAAU;EAC1B,MAAM,eAAe,gBAAgB,KAAK;EAC1C,MAAM,kBAAkB,mBAAmB,KAAK;EAEhD,OACE,wBAAA,cAAC,sBAAD;GACE,UAAU;GACV,KAAK,QAAQ;GACF;GACX,WAAW;GACX,QAAQ;GACR,OAAO,EAAE,WAAW,MAAM,UAAU,EAAE;GACtC,WACE,cAAc,eACV,gCACA;GAEN,aAAa;EAqCO,GAnCpB,wBAAA,cAAC,mBAAD;GACE,IAAI,YAAY,WAAW;GAC3B,eACE,aAAa,YAAY,SAAS,KAAK,IACnC,WAAW,KAAK,IAChB,KAAA;GAEN,QAAQ;GACR,gBAAc,UAAU,aAAa,SAAS,KAAA;GAC9C,cAAY,CAAC,KAAK,QAAQ,QAAQ,QAAQ,MAAM;GAChD,mBAAiB,KAAK,QAAQ,QAAQ,UAAU,KAAA;GAChD,WACE,aAAa,YAAY,SAAS,KAAK,IACnC,mBACA;EASW,GANhB,KAAK,WAAW,OAAO,WACvB,sBAAsB,iBAAiB,OAAO,YAC7C,wBAAA,cAAC,MAAD,EAAM,IAAI,GAAK,CAAA,IAEf,QAAQ,CAEO,GAElB,KAAK,SAAS,CAAC,cACd,wBAAA,cAAC,kBAAD;GACE,IAAG;GACH,IAAI,QAAQ;GACD;GACX,QAAQ;EAGQ,GADf,KAAK,KACU,CAEA;CAE1B,CAAC,CACoB;AAE3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"StepperContext.js","names":[],"sources":["../../../../src/components/stepper/stepper-context/StepperContext.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Context, StepperProviderProps } from '../types'\n\nconst StepperContext = React.createContext<Context>({\n steps: [],\n goToPreviousStep: () => null,\n goToNextStep: () => null,\n goToStep: () => null,\n activeStep: 0,\n viewedSteps: [],\n allowSkip: false,\n direction: 'horizontal',\n hideLabels: false,\n completedSteps: [],\n showCompletedIcons: false\n})\n\nexport const StepperProvider = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction,\n steps,\n hideLabels,\n showCompletedIcons\n}: React.PropsWithChildren<StepperProviderProps>) => {\n const [activeStep, setActiveStep] = React.useState(0)\n\n const [viewedSteps, setviewedSteps] = React.useState<number[]>([0])\n const [completedSteps, setCompletedSteps] = React.useState<number[]>([])\n\n const isControlled = !stepCount\n\n React.useEffect(() => {\n setviewedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n\n onStepChange?.(activeStep)\n }, [activeStep, onStepChange])\n\n const goToNextStep = () => {\n const isCompleted = onComplete && activeStep === stepCount - 1\n const isNextStep = activeStep < stepCount - 1\n\n if (onComplete || isNextStep) {\n setCompletedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n }\n\n if (isCompleted) {\n return onComplete?.()\n }\n if (isNextStep) {\n return setActiveStep((current) => current + 1)\n }\n }\n\n const goToPreviousStep = () => {\n setActiveStep((current) => current - 1)\n }\n\n const goToStep = (index: number) => {\n setActiveStep(index)\n }\n\n return (\n <StepperContext.Provider\n value={{\n steps: steps || Array(stepCount).fill(''),\n goToPreviousStep: isControlled ? undefined : goToPreviousStep,\n goToNextStep: isControlled ? undefined : goToNextStep,\n goToStep: isControlled ? undefined : goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n }}\n >\n {children}\n </StepperContext.Provider>\n )\n}\n\nexport const useStepper = (): Context => {\n const context = React.useContext(StepperContext)\n if (!context)\n throw new Error(\n 'Ensure that you wrap any components with the root component Stepper'\n )\n\n return context\n}\n"],"mappings":";;AAIA,IAAM,iBAAiB,QAAM,cAAuB;CAClD,OAAO,EAAE;CACT,wBAAwB;CACxB,oBAAoB;CACpB,gBAAgB;CAChB,YAAY;CACZ,aAAa,EAAE;CACf,WAAW;CACX,WAAW;CACX,YAAY;CACZ,gBAAgB,EAAE;CAClB,oBAAoB;CACrB,CAAC;AAEF,IAAa,mBAAmB,EAC9B,UACA,WACA,WACA,YACA,cACA,WACA,OACA,YACA,yBACmD;CACnD,MAAM,CAAC,YAAY,iBAAiB,QAAM,SAAS,EAAE;CAErD,MAAM,CAAC,aAAa,kBAAkB,QAAM,SAAmB,CAAC,EAAE,CAAC;CACnE,MAAM,CAAC,gBAAgB,qBAAqB,QAAM,SAAmB,EAAE,CAAC;CAExE,MAAM,eAAe,CAAC;AAEtB,SAAM,gBAAgB;AACpB,kBAAgB,SACd,KAAK,SAAS,WAAW,GAAG,OAAO,CAAC,GAAG,MAAM,WAAW,CACzD;AAED,iBAAe,WAAW;IACzB,CAAC,YAAY,aAAa,CAAC;CAE9B,MAAM,qBAAqB;EACzB,MAAM,cAAc,cAAc,eAAe,YAAY;EAC7D,MAAM,aAAa,aAAa,YAAY;AAE5C,MAAI,cAAc,WAChB,oBAAmB,SACjB,KAAK,SAAS,WAAW,GAAG,OAAO,CAAC,GAAG,MAAM,WAAW,CACzD;AAGH,MAAI,YACF,QAAO,cAAc;AAEvB,MAAI,WACF,QAAO,eAAe,YAAY,UAAU,EAAE;;CAIlD,MAAM,yBAAyB;AAC7B,iBAAe,YAAY,UAAU,EAAE;;CAGzC,MAAM,YAAY,UAAkB;AAClC,gBAAc,MAAM;;AAGtB,QACE,wBAAA,cAAC,eAAe,UAAhB,EACE,OAAO;EACL,OAAO,SAAS,MAAM,UAAU,CAAC,KAAK,GAAG;EACzC,kBAAkB,eAAe,KAAA,IAAY;EAC7C,cAAc,eAAe,KAAA,IAAY;EACzC,UAAU,eAAe,KAAA,IAAY;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EAGuB,EADvB,SACuB;;AAI9B,IAAa,mBAA4B;CACvC,MAAM,UAAU,QAAM,WAAW,eAAe;AAChD,KAAI,CAAC,QACH,OAAM,IAAI,MACR,sEACD;AAEH,QAAO"}
1
+ {"version":3,"file":"StepperContext.js","names":[],"sources":["../../../../src/components/stepper/stepper-context/StepperContext.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Context, StepperProviderProps } from '../types'\n\nconst StepperContext = React.createContext<Context>({\n steps: [],\n goToPreviousStep: () => null,\n goToNextStep: () => null,\n goToStep: () => null,\n activeStep: 0,\n viewedSteps: [],\n allowSkip: false,\n direction: 'horizontal',\n hideLabels: false,\n completedSteps: [],\n showCompletedIcons: false\n})\n\nexport const StepperProvider = ({\n children,\n stepCount,\n allowSkip,\n onComplete,\n onStepChange,\n direction,\n steps,\n hideLabels,\n showCompletedIcons\n}: React.PropsWithChildren<StepperProviderProps>) => {\n const [activeStep, setActiveStep] = React.useState(0)\n\n const [viewedSteps, setviewedSteps] = React.useState<number[]>([0])\n const [completedSteps, setCompletedSteps] = React.useState<number[]>([])\n\n const isControlled = !stepCount\n\n React.useEffect(() => {\n setviewedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n\n onStepChange?.(activeStep)\n }, [activeStep, onStepChange])\n\n const goToNextStep = () => {\n const isCompleted = onComplete && activeStep === stepCount - 1\n const isNextStep = activeStep < stepCount - 1\n\n if (onComplete || isNextStep) {\n setCompletedSteps((prev) =>\n prev.includes(activeStep) ? prev : [...prev, activeStep]\n )\n }\n\n if (isCompleted) {\n return onComplete?.()\n }\n if (isNextStep) {\n return setActiveStep((current) => current + 1)\n }\n }\n\n const goToPreviousStep = () => {\n setActiveStep((current) => current - 1)\n }\n\n const goToStep = (index: number) => {\n setActiveStep(index)\n }\n\n return (\n <StepperContext.Provider\n value={{\n steps: steps || Array(stepCount).fill(''),\n goToPreviousStep: isControlled ? undefined : goToPreviousStep,\n goToNextStep: isControlled ? undefined : goToNextStep,\n goToStep: isControlled ? undefined : goToStep,\n activeStep,\n viewedSteps,\n completedSteps,\n allowSkip,\n direction,\n hideLabels,\n showCompletedIcons\n }}\n >\n {children}\n </StepperContext.Provider>\n )\n}\n\nexport const useStepper = (): Context => {\n const context = React.useContext(StepperContext)\n if (!context)\n throw new Error(\n 'Ensure that you wrap any components with the root component Stepper'\n )\n\n return context\n}\n"],"mappings":";;AAIA,IAAM,iBAAiB,QAAM,cAAuB;CAClD,OAAO,CAAC;CACR,wBAAwB;CACxB,oBAAoB;CACpB,gBAAgB;CAChB,YAAY;CACZ,aAAa,CAAC;CACd,WAAW;CACX,WAAW;CACX,YAAY;CACZ,gBAAgB,CAAC;CACjB,oBAAoB;AACtB,CAAC;AAED,IAAa,mBAAmB,EAC9B,UACA,WACA,WACA,YACA,cACA,WACA,OACA,YACA,yBACmD;CACnD,MAAM,CAAC,YAAY,iBAAiB,QAAM,SAAS,CAAC;CAEpD,MAAM,CAAC,aAAa,kBAAkB,QAAM,SAAmB,CAAC,CAAC,CAAC;CAClE,MAAM,CAAC,gBAAgB,qBAAqB,QAAM,SAAmB,CAAC,CAAC;CAEvE,MAAM,eAAe,CAAC;CAEtB,QAAM,gBAAgB;EACpB,gBAAgB,SACd,KAAK,SAAS,UAAU,IAAI,OAAO,CAAC,GAAG,MAAM,UAAU,CACzD;EAEA,eAAe,UAAU;CAC3B,GAAG,CAAC,YAAY,YAAY,CAAC;CAE7B,MAAM,qBAAqB;EACzB,MAAM,cAAc,cAAc,eAAe,YAAY;EAC7D,MAAM,aAAa,aAAa,YAAY;EAE5C,IAAI,cAAc,YAChB,mBAAmB,SACjB,KAAK,SAAS,UAAU,IAAI,OAAO,CAAC,GAAG,MAAM,UAAU,CACzD;EAGF,IAAI,aACF,OAAO,aAAa;EAEtB,IAAI,YACF,OAAO,eAAe,YAAY,UAAU,CAAC;CAEjD;CAEA,MAAM,yBAAyB;EAC7B,eAAe,YAAY,UAAU,CAAC;CACxC;CAEA,MAAM,YAAY,UAAkB;EAClC,cAAc,KAAK;CACrB;CAEA,OACE,wBAAA,cAAC,eAAe,UAAhB,EACE,OAAO;EACL,OAAO,SAAS,MAAM,SAAS,EAAE,KAAK,EAAE;EACxC,kBAAkB,eAAe,KAAA,IAAY;EAC7C,cAAc,eAAe,KAAA,IAAY;EACzC,UAAU,eAAe,KAAA,IAAY;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EAGuB,GADtB,QACsB;AAE7B;AAEA,IAAa,mBAA4B;CACvC,MAAM,UAAU,QAAM,WAAW,cAAc;CAC/C,IAAI,CAAC,SACH,MAAM,IAAI,MACR,qEACF;CAEF,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/components/stepper/types.ts"],"sourcesContent":["export enum Status {\n ACTIVE = 'active',\n VIEWED = 'viewed',\n SUCCESS = 'success',\n DEFAULT = 'default',\n COMPLETED = 'completed',\n REVIEWED = 'reviewed'\n}\nexport interface Step {\n label?: string\n status: `${Status}`\n}\n\nexport type Direction = 'vertical' | 'horizontal'\n\nexport type Context = {\n steps: Step[]\n goToPreviousStep?: () => void\n goToNextStep?: () => void\n goToStep?: (index: number) => void\n activeStep: number\n viewedSteps: number[]\n completedSteps: number[]\n allowSkip?: boolean\n direction?: Direction\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport type StepperProviderProps = {\n stepCount: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps: Step[]\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport interface IStepperProps {\n className?: string\n stepCount?: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps?: Step[]\n hideLabels?: boolean\n showCompletedIcons?: boolean\n}\n\nexport interface IStepperNavigateProps {\n label?: (currentStep?: number) => string\n onClick?: (next: () => void) => void\n}\n\nexport interface IStepperStepsProps {\n className?: string\n}\n"],"mappings":";AAAA,IAAY,SAAL,yBAAA,QAAA;AACL,QAAA,YAAA;AACA,QAAA,YAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;;KACD"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/components/stepper/types.ts"],"sourcesContent":["export enum Status {\n ACTIVE = 'active',\n VIEWED = 'viewed',\n SUCCESS = 'success',\n DEFAULT = 'default',\n COMPLETED = 'completed',\n REVIEWED = 'reviewed'\n}\nexport interface Step {\n label?: string\n status: `${Status}`\n}\n\nexport type Direction = 'vertical' | 'horizontal'\n\nexport type Context = {\n steps: Step[]\n goToPreviousStep?: () => void\n goToNextStep?: () => void\n goToStep?: (index: number) => void\n activeStep: number\n viewedSteps: number[]\n completedSteps: number[]\n allowSkip?: boolean\n direction?: Direction\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport type StepperProviderProps = {\n stepCount: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps: Step[]\n hideLabels: boolean\n showCompletedIcons: boolean\n}\n\nexport interface IStepperProps {\n className?: string\n stepCount?: number\n allowSkip?: boolean\n onComplete?: () => void\n onStepChange?: (activeStep: number) => void\n direction?: Direction\n steps?: Step[]\n hideLabels?: boolean\n showCompletedIcons?: boolean\n}\n\nexport interface IStepperNavigateProps {\n label?: (currentStep?: number) => string\n onClick?: (next: () => void) => void\n}\n\nexport interface IStepperStepsProps {\n className?: string\n}\n"],"mappings":";AAAA,IAAY,SAAL,yBAAA,QAAA;CACL,OAAA,YAAA;CACA,OAAA,YAAA;CACA,OAAA,aAAA;CACA,OAAA,aAAA;CACA,OAAA,eAAA;CACA,OAAA,cAAA;;AACF,EAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","names":[],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'border-none',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n"],"mappings":";;;;AAKA,IAAM,eAAe,OAAO,YAAY,MAAM;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,SAAS,OAAO;EACrB,IAAI,CAAC,OAAO,OAAO;EACpB,EACF;CACF,CAAC;AAEF,IAAM,cAAc,OAAO,YAAY,OAAO;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,sCAAsC,SAAS;EACpD,IAAI,CAAC,sCAAsC,SAAS;EACrD,EACF;CACF,CAAC;AAIF,IAAa,UAAU,EAAE,OAAO,MAAM,GAAG,WACvC,wBAAA,cAAC,cAAD;CAAoB;CAAM,GAAI;CAEf,EADb,wBAAA,cAAC,aAAD,EAAmB,MAAQ,CAAA,CACd;AAGjB,OAAO,cAAc"}
1
+ {"version":3,"file":"Switch.js","names":[],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import * as RadixSwitch from '@radix-ui/react-switch'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledSwitch = styled(RadixSwitch.Root, {\n base: [\n 'appearance-none',\n 'bg-grey-600',\n 'border-none',\n 'rounded-full',\n 'cursor-pointer',\n 'flex',\n 'overflow-hidden',\n 'relative',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'hover:bg-grey-700',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:hover:bg-primary-900',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n size: {\n md: ['p-0.5', 'w-10'],\n lg: ['p-1', 'w-16']\n }\n }\n})\n\nconst StyledThumb = styled(RadixSwitch.Thumb, {\n base: [\n 'bg-white',\n 'rounded-full',\n 'block',\n 'transition-transform',\n 'duration-50',\n 'will-change-transform'\n ],\n variants: {\n size: {\n md: ['data-[state=checked]:translate-x-5', 'size-4'],\n lg: ['data-[state=checked]:translate-x-8', 'size-6']\n }\n }\n})\n\ntype SwitchProps = React.ComponentProps<typeof StyledSwitch>\n\nexport const Switch = ({ size = 'md', ...rest }: SwitchProps) => (\n <StyledSwitch size={size} {...rest}>\n <StyledThumb size={size} />\n </StyledSwitch>\n)\n\nSwitch.displayName = 'Switch'\n"],"mappings":";;;;AAKA,IAAM,eAAe,OAAO,YAAY,MAAM;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,SAAS,MAAM;EACpB,IAAI,CAAC,OAAO,MAAM;CACpB,EACF;AACF,CAAC;AAED,IAAM,cAAc,OAAO,YAAY,OAAO;CAC5C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,sCAAsC,QAAQ;EACnD,IAAI,CAAC,sCAAsC,QAAQ;CACrD,EACF;AACF,CAAC;AAID,IAAa,UAAU,EAAE,OAAO,MAAM,GAAG,WACvC,wBAAA,cAAC,cAAD;CAAoB;CAAM,GAAI;AAEhB,GADZ,wBAAA,cAAC,aAAD,EAAmB,KAAO,CAAA,CACd;AAGhB,OAAO,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","names":[],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n base: [\n 'border-separate',\n 'border-spacing-0',\n 'font-sans',\n 'text-sm',\n 'w-full',\n 'relative',\n 'z-0'\n ],\n variants: {\n size: {\n md: ['[&_td,&_th]:h-10', '[&_td,&_th]:px-3', '[&_td,&_th]:py-1'],\n lg: [\n '[&_td,&_th]:h-12',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ],\n xl: [\n '[&_th]:h-12',\n '[&_td]:h-16',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ]\n },\n corners: {\n round: ['rounded-md'],\n square: []\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n scrollContainerkey?: string\n maxRowDepth?: number\n}\n\nconst TableComponent = React.forwardRef<HTMLTableElement, TableProps>(\n (\n {\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCls,\n scrollContainerkey,\n ...rest\n },\n ref\n ) => {\n const tableComponent = (\n <StyledTable ref={ref} size={size} corners={corners} {...rest} />\n )\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n key={scrollContainerkey}\n className={cn(scrollContainerCls)}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n }\n)\n\nexport const Table = Object.assign(TableComponent, {\n Body: TableBody,\n Cell: TableCell,\n Footer: TableFooter,\n FooterCell: TableFooterCell,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Row: TableRow,\n StickyColumnsContainer: TableStickyColumnsContainer\n})\n\nTableComponent.displayName = 'Table'\n"],"mappings":";;;;;;;;;;;AAcA,IAAM,cAAc,OAAO,SAAS;CAClC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAoB;IAAoB;IAAmB;GAChE,IAAI;IACF;IACA;IACA;IACA;IACA;IACD;GACD,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,SAAS;GACP,OAAO,CAAC,aAAa;GACrB,QAAQ,EAAE;GACX;EACF;CACF,CAAC;AASF,IAAM,iBAAiB,QAAM,YAEzB,EACE,OAAO,MACP,UAAU,SACV,wBAAwB,GACxB,oBACA,oBACA,GAAG,QAEL,QACG;CACH,MAAM,iBACJ,wBAAA,cAAC,aAAD;EAAkB;EAAW;EAAe;EAAS,GAAI;EAAQ,CAAA;AAGnE,KAAI,sBACF,QACE,wBAAA,cAAC,6BAAD;EACE,KAAK;EACL,WAAW,GAAG,mBAAmB;EACV;EAGK,EAD3B,eAC2B;AAIlC,QAAO;EAEV;AAED,IAAa,QAAQ,OAAO,OAAO,gBAAgB;CACjD,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,KAAK;CACL,wBAAwB;CACzB,CAAC;AAEF,eAAe,cAAc"}
1
+ {"version":3,"file":"Table.js","names":[],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n base: [\n 'border-separate',\n 'border-spacing-0',\n 'font-sans',\n 'text-sm',\n 'w-full',\n 'relative',\n 'z-0'\n ],\n variants: {\n size: {\n md: ['[&_td,&_th]:h-10', '[&_td,&_th]:px-3', '[&_td,&_th]:py-1'],\n lg: [\n '[&_td,&_th]:h-12',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ],\n xl: [\n '[&_th]:h-12',\n '[&_td]:h-16',\n '[&_td,&_th]:py-0',\n '[&_td,&_th]:pr-0',\n '[&_td,&_th]:pl-3',\n '[&_td,&_th]:last:pr-3'\n ]\n },\n corners: {\n round: ['rounded-md'],\n square: []\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCls?: string | string[]\n scrollContainerkey?: string\n maxRowDepth?: number\n}\n\nconst TableComponent = React.forwardRef<HTMLTableElement, TableProps>(\n (\n {\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCls,\n scrollContainerkey,\n ...rest\n },\n ref\n ) => {\n const tableComponent = (\n <StyledTable ref={ref} size={size} corners={corners} {...rest} />\n )\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n key={scrollContainerkey}\n className={cn(scrollContainerCls)}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n }\n)\n\nexport const Table = Object.assign(TableComponent, {\n Body: TableBody,\n Cell: TableCell,\n Footer: TableFooter,\n FooterCell: TableFooterCell,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Row: TableRow,\n StickyColumnsContainer: TableStickyColumnsContainer\n})\n\nTableComponent.displayName = 'Table'\n"],"mappings":";;;;;;;;;;;AAcA,IAAM,cAAc,OAAO,SAAS;CAClC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAoB;IAAoB;GAAkB;GAC/D,IAAI;IACF;IACA;IACA;IACA;IACA;GACF;GACA,IAAI;IACF;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,SAAS;GACP,OAAO,CAAC,YAAY;GACpB,QAAQ,CAAC;EACX;CACF;AACF,CAAC;AASD,IAAM,iBAAiB,QAAM,YAEzB,EACE,OAAO,MACP,UAAU,SACV,wBAAwB,GACxB,oBACA,oBACA,GAAG,QAEL,QACG;CACH,MAAM,iBACJ,wBAAA,cAAC,aAAD;EAAkB;EAAW;EAAe;EAAS,GAAI;CAAO,CAAA;CAGlE,IAAI,uBACF,OACE,wBAAA,cAAC,6BAAD;EACE,KAAK;EACL,WAAW,GAAG,kBAAkB;EACT;CAGI,GAD1B,cAC0B;CAIjC,OAAO;AACT,CACF;AAEA,IAAa,QAAQ,OAAO,OAAO,gBAAgB;CACjD,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,KAAK;CACL,wBAAwB;AAC1B,CAAC;AAED,eAAe,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.js","names":[],"sources":["../../../src/components/table/TableBody.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTableBody = styled('tbody', {\n base: [],\n variants: {\n striped: {\n true: ['[&_tr]:even:bg-grey-100', '[&_tr]:odd:bg-white'],\n false: ['[&_tr]:bg-white']\n }\n }\n})\n\ntype TableBodyProps = React.ComponentProps<typeof StyledTableBody>\n\nexport const TableBody = ({ striped = true, ...rest }: TableBodyProps) => (\n <StyledTableBody striped={striped} {...rest} />\n)\n\nTableBody.displayName = 'TableBody'\n"],"mappings":";;;AAIA,IAAM,kBAAkB,OAAO,SAAS;CACtC,MAAM,EAAE;CACR,UAAU,EACR,SAAS;EACP,MAAM,CAAC,2BAA2B,sBAAsB;EACxD,OAAO,CAAC,kBAAkB;EAC3B,EACF;CACF,CAAC;AAIF,IAAa,aAAa,EAAE,UAAU,MAAM,GAAG,WAC7C,wBAAA,cAAC,iBAAD;CAA0B;CAAS,GAAI;CAAQ,CAAA;AAGjD,UAAU,cAAc"}
1
+ {"version":3,"file":"TableBody.js","names":[],"sources":["../../../src/components/table/TableBody.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTableBody = styled('tbody', {\n base: [],\n variants: {\n striped: {\n true: ['[&_tr]:even:bg-grey-100', '[&_tr]:odd:bg-white'],\n false: ['[&_tr]:bg-white']\n }\n }\n})\n\ntype TableBodyProps = React.ComponentProps<typeof StyledTableBody>\n\nexport const TableBody = ({ striped = true, ...rest }: TableBodyProps) => (\n <StyledTableBody striped={striped} {...rest} />\n)\n\nTableBody.displayName = 'TableBody'\n"],"mappings":";;;AAIA,IAAM,kBAAkB,OAAO,SAAS;CACtC,MAAM,CAAC;CACP,UAAU,EACR,SAAS;EACP,MAAM,CAAC,2BAA2B,qBAAqB;EACvD,OAAO,CAAC,iBAAiB;CAC3B,EACF;AACF,CAAC;AAID,IAAa,aAAa,EAAE,UAAU,MAAM,GAAG,WAC7C,wBAAA,cAAC,iBAAD;CAA0B;CAAS,GAAI;AAAO,CAAA;AAGhD,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","names":[],"sources":["../../../src/components/table/TableCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'box-border',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n"],"mappings":";;AAEA,IAAa,YAAY,OAAO,MAAM,EACpC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,UAAU,cAAc"}
1
+ {"version":3,"file":"TableCell.js","names":[],"sources":["../../../src/components/table/TableCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableCell = styled('td', {\n base: [\n 'border-t',\n 'border-t-grey-100',\n 'box-border',\n 'text-grey-800',\n 'font-body',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n 'first:font-semibold'\n ]\n})\n\nTableCell.displayName = 'TableCell'\n"],"mappings":";;AAEA,IAAa,YAAY,OAAO,MAAM,EACpC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableFooter.js","names":[],"sources":["../../../src/components/table/TableFooter.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableFooter = styled('tfoot', {\n base: []\n})\n\nTableFooter.displayName = 'TableFooter'\n"],"mappings":";;AAEA,IAAa,cAAc,OAAO,SAAS,EACzC,MAAM,EAAE,EACT,CAAC;AAEF,YAAY,cAAc"}
1
+ {"version":3,"file":"TableFooter.js","names":[],"sources":["../../../src/components/table/TableFooter.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableFooter = styled('tfoot', {\n base: []\n})\n\nTableFooter.displayName = 'TableFooter'\n"],"mappings":";;AAEA,IAAa,cAAc,OAAO,SAAS,EACzC,MAAM,CAAC,EACT,CAAC;AAED,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableFooterCell.js","names":[],"sources":["../../../src/components/table/TableFooterCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableFooterCell = styled('td', {\n base: [\n 'text-grey-800',\n 'font-body',\n 'font-semibold',\n 'text-left',\n 'align-middle'\n ]\n})\n\nTableFooterCell.displayName = 'TableFooterCell'\n"],"mappings":";;AAEA,IAAa,kBAAkB,OAAO,MAAM,EAC1C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,gBAAgB,cAAc"}
1
+ {"version":3,"file":"TableFooterCell.js","names":[],"sources":["../../../src/components/table/TableFooterCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableFooterCell = styled('td', {\n base: [\n 'text-grey-800',\n 'font-body',\n 'font-semibold',\n 'text-left',\n 'align-middle'\n ]\n})\n\nTableFooterCell.displayName = 'TableFooterCell'\n"],"mappings":";;AAEA,IAAa,kBAAkB,OAAO,MAAM,EAC1C,MAAM;CACJ;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeader.js","names":[],"sources":["../../../src/components/table/TableHeader.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const TABLE_HEADER_THEMES = {\n PRIMARY: 'primary',\n PRIMARY_DARK: 'primaryDark',\n PRIMARY_LIGHT: 'primaryLight',\n LIGHT: 'light',\n WHITE: 'white'\n} as const\n\nconst StyledTableHeader = styled('thead', {\n base: [],\n variants: {\n theme: {\n [TABLE_HEADER_THEMES.PRIMARY]: ['[&_th]:bg-primary-800'],\n [TABLE_HEADER_THEMES.PRIMARY_DARK]: ['[&_th]:bg-primary-1000'],\n [TABLE_HEADER_THEMES.PRIMARY_LIGHT]: [\n '[&_th]:bg-primary-200',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.LIGHT]: [\n '[&_th]:bg-grey-100',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.WHITE]: ['[&_th]:bg-white', '[&_th]:text-grey-1000']\n },\n isSticky: {\n true: ['sticky', 'top-0', 'z-3']\n }\n }\n})\n\ntype TableHeaderProps = React.ComponentProps<typeof StyledTableHeader>\n\nexport const TableHeader = ({\n theme = 'primaryDark',\n isSticky = false,\n ...rest\n}: TableHeaderProps) => {\n return <StyledTableHeader theme={theme} isSticky={isSticky} {...rest} />\n}\n\nTableHeader.displayName = 'TableHeader'\n"],"mappings":";;;AAIA,IAAa,sBAAsB;CACjC,SAAS;CACT,cAAc;CACd,eAAe;CACf,OAAO;CACP,OAAO;CACR;AAED,IAAM,oBAAoB,OAAO,SAAS;CACxC,MAAM,EAAE;CACR,UAAU;EACR,OAAO;IACJ,oBAAoB,UAAU,CAAC,wBAAwB;IACvD,oBAAoB,eAAe,CAAC,yBAAyB;IAC7D,oBAAoB,gBAAgB,CACnC,yBACA,wBACD;IACA,oBAAoB,QAAQ,CAC3B,sBACA,wBACD;IACA,oBAAoB,QAAQ,CAAC,mBAAmB,wBAAwB;GAC1E;EACD,UAAU,EACR,MAAM;GAAC;GAAU;GAAS;GAAM,EACjC;EACF;CACF,CAAC;AAIF,IAAa,eAAe,EAC1B,QAAQ,eACR,WAAW,OACX,GAAG,WACmB;AACtB,QAAO,sBAAA,cAAC,mBAAD;EAA0B;EAAiB;EAAU,GAAI;EAAQ,CAAA;;AAG1E,YAAY,cAAc"}
1
+ {"version":3,"file":"TableHeader.js","names":[],"sources":["../../../src/components/table/TableHeader.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const TABLE_HEADER_THEMES = {\n PRIMARY: 'primary',\n PRIMARY_DARK: 'primaryDark',\n PRIMARY_LIGHT: 'primaryLight',\n LIGHT: 'light',\n WHITE: 'white'\n} as const\n\nconst StyledTableHeader = styled('thead', {\n base: [],\n variants: {\n theme: {\n [TABLE_HEADER_THEMES.PRIMARY]: ['[&_th]:bg-primary-800'],\n [TABLE_HEADER_THEMES.PRIMARY_DARK]: ['[&_th]:bg-primary-1000'],\n [TABLE_HEADER_THEMES.PRIMARY_LIGHT]: [\n '[&_th]:bg-primary-200',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.LIGHT]: [\n '[&_th]:bg-grey-100',\n '[&_th]:text-grey-1000'\n ],\n [TABLE_HEADER_THEMES.WHITE]: ['[&_th]:bg-white', '[&_th]:text-grey-1000']\n },\n isSticky: {\n true: ['sticky', 'top-0', 'z-3']\n }\n }\n})\n\ntype TableHeaderProps = React.ComponentProps<typeof StyledTableHeader>\n\nexport const TableHeader = ({\n theme = 'primaryDark',\n isSticky = false,\n ...rest\n}: TableHeaderProps) => {\n return <StyledTableHeader theme={theme} isSticky={isSticky} {...rest} />\n}\n\nTableHeader.displayName = 'TableHeader'\n"],"mappings":";;;AAIA,IAAa,sBAAsB;CACjC,SAAS;CACT,cAAc;CACd,eAAe;CACf,OAAO;CACP,OAAO;AACT;AAEA,IAAM,oBAAoB,OAAO,SAAS;CACxC,MAAM,CAAC;CACP,UAAU;EACR,OAAO;IACJ,oBAAoB,UAAU,CAAC,uBAAuB;IACtD,oBAAoB,eAAe,CAAC,wBAAwB;IAC5D,oBAAoB,gBAAgB,CACnC,yBACA,uBACF;IACC,oBAAoB,QAAQ,CAC3B,sBACA,uBACF;IACC,oBAAoB,QAAQ,CAAC,mBAAmB,uBAAuB;EAC1E;EACA,UAAU,EACR,MAAM;GAAC;GAAU;GAAS;EAAK,EACjC;CACF;AACF,CAAC;AAID,IAAa,eAAe,EAC1B,QAAQ,eACR,WAAW,OACX,GAAG,WACmB;CACtB,OAAO,sBAAA,cAAC,mBAAD;EAA0B;EAAiB;EAAU,GAAI;CAAO,CAAA;AACzE;AAEA,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeaderCell.js","names":[],"sources":["../../../src/components/table/TableHeaderCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableHeaderCell = styled('th', {\n base: [\n 'text-white',\n 'font-body',\n 'font-semibold',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n '[[colspan]]:text-center'\n ]\n})\n\nTableHeaderCell.displayName = 'TableHeaderCell'\n"],"mappings":";;AAEA,IAAa,kBAAkB,OAAO,MAAM,EAC1C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,gBAAgB,cAAc"}
1
+ {"version":3,"file":"TableHeaderCell.js","names":[],"sources":["../../../src/components/table/TableHeaderCell.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const TableHeaderCell = styled('th', {\n base: [\n 'text-white',\n 'font-body',\n 'font-semibold',\n 'leading-normal',\n 'text-left',\n 'align-middle',\n '[[colspan]]:text-center'\n ]\n})\n\nTableHeaderCell.displayName = 'TableHeaderCell'\n"],"mappings":";;AAEA,IAAa,kBAAkB,OAAO,MAAM,EAC1C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableRow.js","names":[],"sources":["../../../src/components/table/TableRow.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledRow = styled('tr', {\n base: ['bg-[unset]']\n})\n\nexport const TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.ComponentProps<typeof StyledRow>\n>((props, ref) => <StyledRow {...props} ref={ref} />)\n\nTableRow.displayName = 'TableRow'\n"],"mappings":";;;AAIA,IAAM,YAAY,OAAO,MAAM,EAC7B,MAAM,CAAC,aAAa,EACrB,CAAC;AAEF,IAAa,WAAW,QAAM,YAG3B,OAAO,QAAQ,wBAAA,cAAC,WAAD;CAAW,GAAI;CAAY;CAAO,CAAA,CAAC;AAErD,SAAS,cAAc"}
1
+ {"version":3,"file":"TableRow.js","names":[],"sources":["../../../src/components/table/TableRow.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledRow = styled('tr', {\n base: ['bg-[unset]']\n})\n\nexport const TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.ComponentProps<typeof StyledRow>\n>((props, ref) => <StyledRow {...props} ref={ref} />)\n\nTableRow.displayName = 'TableRow'\n"],"mappings":";;;AAIA,IAAM,YAAY,OAAO,MAAM,EAC7B,MAAM,CAAC,YAAY,EACrB,CAAC;AAED,IAAa,WAAW,QAAM,YAG3B,OAAO,QAAQ,wBAAA,cAAC,WAAD;CAAW,GAAI;CAAY;AAAM,CAAA,CAAC;AAEpD,SAAS,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableStickyColumnsContainer.js","names":[],"sources":["../../../src/components/table/TableStickyColumnsContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useStickyColumnsStyle } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n className,\n ...restProps\n}: React.PropsWithChildren<{\n numberOfStickyColumns?: number\n className?: string\n}>) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const wrapperRef = React.useRef(null)\n const { columnsStyle } = useStickyColumnsStyle({\n numberOfStickyColumns,\n wrapperRef\n })\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll = event.currentTarget.scrollLeft > 0\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <div\n onScroll={handleScroll}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"scrollbar\"\n ref={wrapperRef}\n style={columnsStyle}\n className={cn(\n 'overflow-auto',\n 'max-w-full',\n 'relative',\n 'overscroll-x-contain',\n '[&_td,&_th]:bg-inherit',\n className,\n numberOfStickyColumns >= 1 && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:sticky',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:left-(--sticky-offset-left-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:min-w-(--sticky-column-width-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:z-2'\n ],\n numberOfStickyColumns >= 2 && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:sticky',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:left-(--sticky-offset-left-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:min-w-(--sticky-column-width-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:z-2'\n ],\n numberOfStickyColumns >= 3 && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:sticky',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:left-(--sticky-offset-left-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:min-w-(--sticky-column-width-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:z-2'\n ],\n numberOfStickyColumns >= 4 && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:sticky',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:left-(--sticky-offset-left-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:min-w-(--sticky-column-width-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:z-2'\n ],\n numberOfStickyColumns === 1 &&\n hasScroll && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 2 &&\n hasScroll && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 3 &&\n hasScroll && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 4 &&\n hasScroll && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ]\n )}\n {...restProps}\n >\n {children}\n </div>\n )\n}\n"],"mappings":";;;;AAMA,IAAa,+BAA+B,EAC1C,UACA,wBAAwB,GACxB,WACA,GAAG,gBAIE;CACL,MAAM,CAAC,WAAW,gBAAgB,MAAM,SAAkB,MAAM;CAChE,MAAM,aAAa,MAAM,OAAO,KAAK;CACrC,MAAM,EAAE,iBAAiB,sBAAsB;EAC7C;EACA;EACD,CAAC;CAEF,MAAM,gBAAgB,UAAyC;EAC7D,MAAM,eAAe,MAAM,cAAc,aAAa;AACtD,MAAI,iBAAiB,UACnB,cAAa,aAAa;;AAI9B,QACE,sBAAA,cAAC,OAAD;EACE,UAAU;EAEV,MAAK;EACL,KAAK;EACL,OAAO;EACP,WAAW,GACT,iBACA,cACA,YACA,wBACA,0BACA,WACA,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;GACD,EACD,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;GACD,EACD,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;GACD,EACD,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;GACD,EACD,0BAA0B,KACxB,aAAa,CACX,+FACA,mFACD,EACH,0BAA0B,KACxB,aAAa,CACX,+FACA,mFACD,EACH,0BAA0B,KACxB,aAAa,CACX,+FACA,mFACD,EACH,0BAA0B,KACxB,aAAa,CACX,+FACA,mFACD,CACJ;EACD,GAAI;EAGA,EADH,SACG"}
1
+ {"version":3,"file":"TableStickyColumnsContainer.js","names":[],"sources":["../../../src/components/table/TableStickyColumnsContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { useStickyColumnsStyle } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n className,\n ...restProps\n}: React.PropsWithChildren<{\n numberOfStickyColumns?: number\n className?: string\n}>) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const wrapperRef = React.useRef(null)\n const { columnsStyle } = useStickyColumnsStyle({\n numberOfStickyColumns,\n wrapperRef\n })\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll = event.currentTarget.scrollLeft > 0\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <div\n onScroll={handleScroll}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"scrollbar\"\n ref={wrapperRef}\n style={columnsStyle}\n className={cn(\n 'overflow-auto',\n 'max-w-full',\n 'relative',\n 'overscroll-x-contain',\n '[&_td,&_th]:bg-inherit',\n className,\n numberOfStickyColumns >= 1 && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:sticky',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:left-(--sticky-offset-left-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:min-w-(--sticky-column-width-1)',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:z-2'\n ],\n numberOfStickyColumns >= 2 && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:sticky',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:left-(--sticky-offset-left-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:min-w-(--sticky-column-width-2)',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:z-2'\n ],\n numberOfStickyColumns >= 3 && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:sticky',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:left-(--sticky-offset-left-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:min-w-(--sticky-column-width-3)',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:z-2'\n ],\n numberOfStickyColumns >= 4 && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:sticky',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:left-(--sticky-offset-left-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:min-w-(--sticky-column-width-4)',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:z-2'\n ],\n numberOfStickyColumns === 1 &&\n hasScroll && [\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(1),&_th:nth-of-type(1)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 2 &&\n hasScroll && [\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(2),&_th:nth-of-type(2)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 3 &&\n hasScroll && [\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(3),&_th:nth-of-type(3)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ],\n numberOfStickyColumns === 4 &&\n hasScroll && [\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:shadow-[var(--color-alpha-200)_-2px_-3px_9px_1px]',\n '[&_td:nth-of-type(4),&_th:nth-of-type(4)]:[clip-path:inset(-1px_-10px_-1px_0px)]'\n ]\n )}\n {...restProps}\n >\n {children}\n </div>\n )\n}\n"],"mappings":";;;;AAMA,IAAa,+BAA+B,EAC1C,UACA,wBAAwB,GACxB,WACA,GAAG,gBAIE;CACL,MAAM,CAAC,WAAW,gBAAgB,MAAM,SAAkB,KAAK;CAC/D,MAAM,aAAa,MAAM,OAAO,IAAI;CACpC,MAAM,EAAE,iBAAiB,sBAAsB;EAC7C;EACA;CACF,CAAC;CAED,MAAM,gBAAgB,UAAyC;EAC7D,MAAM,eAAe,MAAM,cAAc,aAAa;EACtD,IAAI,iBAAiB,WACnB,aAAa,YAAY;CAE7B;CAEA,OACE,sBAAA,cAAC,OAAD;EACE,UAAU;EAEV,MAAK;EACL,KAAK;EACL,OAAO;EACP,WAAW,GACT,iBACA,cACA,YACA,wBACA,0BACA,WACA,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;EACF,GACA,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;EACF,GACA,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;EACF,GACA,yBAAyB,KAAK;GAC5B;GACA;GACA;GACA;EACF,GACA,0BAA0B,KACxB,aAAa,CACX,+FACA,kFACF,GACF,0BAA0B,KACxB,aAAa,CACX,+FACA,kFACF,GACF,0BAA0B,KACxB,aAAa,CACX,+FACA,kFACF,GACF,0BAA0B,KACxB,aAAa,CACX,+FACA,kFACF,CACJ;EACA,GAAI;CAGD,GADF,QACE;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"useStickyColumnsCss.js","names":[],"sources":["../../../src/components/table/useStickyColumnsCss.ts"],"sourcesContent":["import * as React from 'react'\n\ntype ColumnStyle = Record<\n `--sticky-column-width-${number}` | `--sticky-offset-left-${number}`,\n string\n>\n\ninterface IUseStickyColumnsCss {\n columnsStyle?: ColumnStyle\n}\n\nexport const useStickyColumnsStyle = ({\n numberOfStickyColumns,\n wrapperRef\n}: {\n numberOfStickyColumns: number\n wrapperRef: React.RefObject<HTMLTableSectionElement>\n}): IUseStickyColumnsCss => {\n const [columnsStyle, setColumnsStyle] = React.useState<ColumnStyle>({})\n\n const generateColumnsStyle = React.useCallback(() => {\n let accWidth = 0\n\n // Getting the table header cells elements to use their width to set the left position in the sticky columns.\n const tableHeaderCells = wrapperRef.current?.querySelectorAll('th')\n const tableHeaderElements = Array.from(tableHeaderCells || [])\n\n // Getting only the number of sticky columns from the elements array that is what we are interested in.\n const stickyColumns = tableHeaderElements.slice(0, numberOfStickyColumns)\n\n const newColumnsStyle = stickyColumns.reduce((acc, column, index) => {\n const elementNumber = index + 1\n const styleObject = {\n ...acc,\n [`--sticky-column-width-${elementNumber}`]: `${column.offsetWidth}px`,\n [`--sticky-offset-left-${elementNumber}`]: `${accWidth}px`\n }\n\n accWidth += tableHeaderCells?.item(index).clientWidth || 0\n\n return styleObject\n }, {})\n\n return newColumnsStyle\n }, [numberOfStickyColumns, wrapperRef])\n\n React.useLayoutEffect(() => {\n if (!numberOfStickyColumns) return\n const newColumnsStyle = generateColumnsStyle()\n\n setColumnsStyle(newColumnsStyle)\n }, [numberOfStickyColumns, wrapperRef, generateColumnsStyle])\n\n return {\n columnsStyle\n }\n}\n"],"mappings":";;AAWA,IAAa,yBAAyB,EACpC,uBACA,iBAI0B;CAC1B,MAAM,CAAC,cAAc,mBAAmB,QAAM,SAAsB,EAAE,CAAC;CAEvE,MAAM,uBAAuB,QAAM,kBAAkB;EACnD,IAAI,WAAW;EAGf,MAAM,mBAAmB,WAAW,SAAS,iBAAiB,KAAK;AAmBnE,SAlB4B,MAAM,KAAK,oBAAoB,EAAE,CAAC,CAGpB,MAAM,GAAG,sBAAsB,CAEnC,QAAQ,KAAK,QAAQ,UAAU;GACnE,MAAM,gBAAgB,QAAQ;GAC9B,MAAM,cAAc;IAClB,GAAG;KACF,yBAAyB,kBAAkB,GAAG,OAAO,YAAY;KACjE,wBAAwB,kBAAkB,GAAG,SAAS;IACxD;AAED,eAAY,kBAAkB,KAAK,MAAM,CAAC,eAAe;AAEzD,UAAO;KACN,EAAE,CAAC;IAGL,CAAC,uBAAuB,WAAW,CAAC;AAEvC,SAAM,sBAAsB;AAC1B,MAAI,CAAC,sBAAuB;AAG5B,kBAFwB,sBAAsB,CAEd;IAC/B;EAAC;EAAuB;EAAY;EAAqB,CAAC;AAE7D,QAAO,EACL,cACD"}
1
+ {"version":3,"file":"useStickyColumnsCss.js","names":[],"sources":["../../../src/components/table/useStickyColumnsCss.ts"],"sourcesContent":["import * as React from 'react'\n\ntype ColumnStyle = Record<\n `--sticky-column-width-${number}` | `--sticky-offset-left-${number}`,\n string\n>\n\ninterface IUseStickyColumnsCss {\n columnsStyle?: ColumnStyle\n}\n\nexport const useStickyColumnsStyle = ({\n numberOfStickyColumns,\n wrapperRef\n}: {\n numberOfStickyColumns: number\n wrapperRef: React.RefObject<HTMLTableSectionElement>\n}): IUseStickyColumnsCss => {\n const [columnsStyle, setColumnsStyle] = React.useState<ColumnStyle>({})\n\n const generateColumnsStyle = React.useCallback(() => {\n let accWidth = 0\n\n // Getting the table header cells elements to use their width to set the left position in the sticky columns.\n const tableHeaderCells = wrapperRef.current?.querySelectorAll('th')\n const tableHeaderElements = Array.from(tableHeaderCells || [])\n\n // Getting only the number of sticky columns from the elements array that is what we are interested in.\n const stickyColumns = tableHeaderElements.slice(0, numberOfStickyColumns)\n\n const newColumnsStyle = stickyColumns.reduce((acc, column, index) => {\n const elementNumber = index + 1\n const styleObject = {\n ...acc,\n [`--sticky-column-width-${elementNumber}`]: `${column.offsetWidth}px`,\n [`--sticky-offset-left-${elementNumber}`]: `${accWidth}px`\n }\n\n accWidth += tableHeaderCells?.item(index).clientWidth || 0\n\n return styleObject\n }, {})\n\n return newColumnsStyle\n }, [numberOfStickyColumns, wrapperRef])\n\n React.useLayoutEffect(() => {\n if (!numberOfStickyColumns) return\n const newColumnsStyle = generateColumnsStyle()\n\n setColumnsStyle(newColumnsStyle)\n }, [numberOfStickyColumns, wrapperRef, generateColumnsStyle])\n\n return {\n columnsStyle\n }\n}\n"],"mappings":";;AAWA,IAAa,yBAAyB,EACpC,uBACA,iBAI0B;CAC1B,MAAM,CAAC,cAAc,mBAAmB,QAAM,SAAsB,CAAC,CAAC;CAEtE,MAAM,uBAAuB,QAAM,kBAAkB;EACnD,IAAI,WAAW;EAGf,MAAM,mBAAmB,WAAW,SAAS,iBAAiB,IAAI;EAmBlE,OAlB4B,MAAM,KAAK,oBAAoB,CAAC,CAGtC,EAAoB,MAAM,GAAG,qBAE3B,EAAc,QAAQ,KAAK,QAAQ,UAAU;GACnE,MAAM,gBAAgB,QAAQ;GAC9B,MAAM,cAAc;IAClB,GAAG;KACF,yBAAyB,kBAAkB,GAAG,OAAO,YAAY;KACjE,wBAAwB,kBAAkB,GAAG,SAAS;GACzD;GAEA,YAAY,kBAAkB,KAAK,KAAK,EAAE,eAAe;GAEzD,OAAO;EACT,GAAG,CAAC,CAEG;CACT,GAAG,CAAC,uBAAuB,UAAU,CAAC;CAEtC,QAAM,sBAAsB;EAC1B,IAAI,CAAC,uBAAuB;EAG5B,gBAFwB,qBAER,CAAe;CACjC,GAAG;EAAC;EAAuB;EAAY;CAAoB,CAAC;CAE5D,OAAO,EACL,aACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","names":[],"sources":["../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { Root } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { TabsContent } from './TabsContent'\nimport { TabsTrigger } from './TabsTrigger'\nimport { TabsTriggerList } from './TabsTriggerList'\n\nconst StyledRoot = styled(Root, {\n base: ['w-full']\n})\n\nexport const Tabs = Object.assign(StyledRoot, {\n TriggerList: TabsTriggerList,\n Trigger: TabsTrigger,\n Content: TabsContent\n})\n\nStyledRoot.displayName = 'Tabs'\n"],"mappings":";;;;;;AASA,IAAM,aAAa,OAAO,MAAM,EAC9B,MAAM,CAAC,SAAS,EACjB,CAAC;AAEF,IAAa,OAAO,OAAO,OAAO,YAAY;CAC5C,aAAa;CACb,SAAS;CACT,SAAS;CACV,CAAC;AAEF,WAAW,cAAc"}
1
+ {"version":3,"file":"Tabs.js","names":[],"sources":["../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { Root } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { TabsContent } from './TabsContent'\nimport { TabsTrigger } from './TabsTrigger'\nimport { TabsTriggerList } from './TabsTriggerList'\n\nconst StyledRoot = styled(Root, {\n base: ['w-full']\n})\n\nexport const Tabs = Object.assign(StyledRoot, {\n TriggerList: TabsTriggerList,\n Trigger: TabsTrigger,\n Content: TabsContent\n})\n\nStyledRoot.displayName = 'Tabs'\n"],"mappings":";;;;;;AASA,IAAM,aAAa,OAAO,MAAM,EAC9B,MAAM,CAAC,QAAQ,EACjB,CAAC;AAED,IAAa,OAAO,OAAO,OAAO,YAAY;CAC5C,aAAa;CACb,SAAS;CACT,SAAS;AACX,CAAC;AAED,WAAW,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TabsContent.js","names":[],"sources":["../../../src/components/tabs/TabsContent.tsx"],"sourcesContent":["import { Content } from '@radix-ui/react-tabs'\n\nimport { styled } from '~/styled'\n\nconst StyledTabsContent = styled(Content, {\n base: ['grow', 'font-body']\n})\n\nexport const TabsContent = StyledTabsContent\n\nTabsContent.displayName = 'TabsContent'\n"],"mappings":";;AAQA,IAAa,cAJa,OAAO,SAAS,EACxC,MAAM,CAAC,QAAQ,YAAY,EAC5B,CAAC;AAIF,YAAY,cAAc"}
1
+ {"version":3,"file":"TabsContent.js","names":[],"sources":["../../../src/components/tabs/TabsContent.tsx"],"sourcesContent":["import { Content } from '@radix-ui/react-tabs'\n\nimport { styled } from '~/styled'\n\nconst StyledTabsContent = styled(Content, {\n base: ['grow', 'font-body']\n})\n\nexport const TabsContent = StyledTabsContent\n\nTabsContent.displayName = 'TabsContent'\n"],"mappings":";;AAQA,IAAa,cAJa,OAAO,SAAS,EACxC,MAAM,CAAC,QAAQ,WAAW,EAC5B,CAE2B;AAE3B,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TabsTrigger.js","names":[],"sources":["../../../src/components/tabs/TabsTrigger.tsx"],"sourcesContent":["import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n base: [\n 'absolute',\n 'inset-0',\n 'h-[calc(100%+2px)]',\n 'opacity-0',\n 'bg-(--interactive-1)'\n ]\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n base: [\n 'bg-none',\n 'cursor-pointer',\n 'shrink-0',\n 'p-4',\n 'select-none',\n 'border-b-2',\n 'border-b-transparent',\n 'relative',\n 'data-[state=active]:border-current',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:text-(--interactive-1)',\n 'data-[state=active]:tracking-[-0.005em]',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:text-(--interactive-3)',\n 'not-disabled:focus-visible:[&_div]:opacity-7',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:text-(--interactive-2)',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:[&_div]:opacity-7',\n 'not-disabled:hover:text-(--interactive-2)'\n ]\n})\n\nexport const TabsTrigger = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledTabsTrigger> & { value: string }\n>(({ children, ...rest }, ref) => (\n <StyledTabsTrigger {...rest} ref={ref}>\n <Text size=\"sm\" as=\"span\">\n {children}\n </Text>\n <StyledTabsTriggerHoverBackground />\n </StyledTabsTrigger>\n))\n\nTabsTrigger.displayName = 'TabsTrigger'\n"],"mappings":";;;;;AAOA,IAAM,mCAAmC,OAAO,OAAO,EACrD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAM,oBAAoB,OAAO,SAAS,EACxC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAa,cAAc,QAAM,YAG9B,EAAE,UAAU,GAAG,QAAQ,QACxB,wBAAA,cAAC,mBAAD;CAAmB,GAAI;CAAW;CAKd,EAJlB,wBAAA,cAAC,MAAD;CAAM,MAAK;CAAK,IAAG;CAEZ,EADJ,SACI,EACP,wBAAA,cAAC,kCAAA,KAAmC,CAClB,CACpB;AAEF,YAAY,cAAc"}
1
+ {"version":3,"file":"TabsTrigger.js","names":[],"sources":["../../../src/components/tabs/TabsTrigger.tsx"],"sourcesContent":["import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n base: [\n 'absolute',\n 'inset-0',\n 'h-[calc(100%+2px)]',\n 'opacity-0',\n 'bg-(--interactive-1)'\n ]\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n base: [\n 'bg-none',\n 'cursor-pointer',\n 'shrink-0',\n 'p-4',\n 'select-none',\n 'border-b-2',\n 'border-b-transparent',\n 'relative',\n 'data-[state=active]:border-current',\n 'data-[state=active]:font-semibold',\n 'data-[state=active]:text-(--interactive-1)',\n 'data-[state=active]:tracking-[-0.005em]',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:text-(--interactive-3)',\n 'not-disabled:focus-visible:[&_div]:opacity-7',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:text-(--interactive-2)',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:[&_div]:opacity-7',\n 'not-disabled:hover:text-(--interactive-2)'\n ]\n})\n\nexport const TabsTrigger = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledTabsTrigger> & { value: string }\n>(({ children, ...rest }, ref) => (\n <StyledTabsTrigger {...rest} ref={ref}>\n <Text size=\"sm\" as=\"span\">\n {children}\n </Text>\n <StyledTabsTriggerHoverBackground />\n </StyledTabsTrigger>\n))\n\nTabsTrigger.displayName = 'TabsTrigger'\n"],"mappings":";;;;;AAOA,IAAM,mCAAmC,OAAO,OAAO,EACrD,MAAM;CACJ;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,IAAM,oBAAoB,OAAO,SAAS,EACxC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,IAAa,cAAc,QAAM,YAG9B,EAAE,UAAU,GAAG,QAAQ,QACxB,wBAAA,cAAC,mBAAD;CAAmB,GAAI;CAAW;AAKf,GAJjB,wBAAA,cAAC,MAAD;CAAM,MAAK;CAAK,IAAG;AAEb,GADH,QACG,GACN,wBAAA,cAAC,kCAAA,IAAkC,CAClB,CACpB;AAED,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TabsTriggerList.js","names":[],"sources":["../../../src/components/tabs/TabsTriggerList.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport { List } from '@radix-ui/react-tabs'\nimport React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { useScrollPosition } from '~/utilities/hooks/useScrollPosition'\nimport { useSize } from '~/utilities/hooks/useSize'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContainer = styled(ColorScheme, {\n base: ['relative', 'border-b', 'border-b-(--base-4)', 'w-full']\n})\n\nconst StyledTriggerList = styled(List, {\n base: [\n 'shrink-0',\n 'flex',\n 'w-full',\n 'overflow-x-auto',\n '-webkit-scrollbar:hidden',\n '[scrollbar-width:none]'\n ]\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n base: [\n 'h-full!',\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'cursor-pointer',\n 'bg-(--base-1)!',\n 'text-(--interactive-1)!',\n 'rounded-none',\n 'opacity-90'\n ]\n})\n\nconst SCROLL_STEP = 0.8 // Used to scroll 80% of clientWidth\n\nexport const TabsTriggerList = ({\n children,\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: TcolorScheme\n}) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width } = useSize({ element: listRef, delay: 500 })\n const { left } = useScrollPosition({\n element: listRef,\n delay: 100,\n delayMethod: 'debounce'\n })\n\n const canScrollXAxis = React.useMemo(() => {\n if (!listRef) return false\n return listRef.scrollWidth > listRef.clientWidth\n }, [width, listRef])\n\n const canScrollLeft = React.useMemo(() => {\n if (!canScrollXAxis) return false\n return left > 0\n }, [left, canScrollXAxis])\n\n const canScrollRight = React.useMemo(() => {\n if (!listRef || !canScrollXAxis) return false\n return listRef.scrollWidth - left - listRef.clientWidth > 1 // 1 rather than 0 to account for sub-pixel widths and calculations\n }, [listRef, left, canScrollXAxis])\n\n const scrollList = React.useCallback(\n (stepModifier) => {\n if (!listRef) return\n listRef.scroll({\n left: listRef.scrollLeft + listRef.clientWidth * stepModifier,\n behavior: 'smooth'\n })\n },\n [listRef]\n )\n\n return (\n <StyledContainer\n base=\"grey1\"\n accent=\"primary1\"\n interactive=\"hiContrast\"\n {...colorScheme}\n {...rest}\n >\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {canScrollLeft && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n onClick={() => scrollList(-SCROLL_STEP)}\n tabIndex={-1}\n className=\"left-0\"\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n {canScrollRight && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n onClick={() => scrollList(SCROLL_STEP)}\n tabIndex={-1}\n className=\"right-0\"\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n"],"mappings":";;;;;;;;;;;AAgBA,IAAM,kBAAkB,OAAO,aAAa,EAC1C,MAAM;CAAC;CAAY;CAAY;CAAuB;CAAS,EAChE,CAAC;AAEF,IAAM,oBAAoB,OAAO,MAAM,EACrC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAM,0BAA0B,OAAO,YAAY,EACjD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAM,cAAc;AAEpB,IAAa,mBAAmB,EAC9B,UACA,cAAc,EAAE,EAChB,GAAG,WAGC;CACJ,MAAM,CAAC,SAAS,sBAAsB,qBAAqB;CAE3D,MAAM,EAAE,UAAU,QAAQ;EAAE,SAAS;EAAS,OAAO;EAAK,CAAC;CAC3D,MAAM,EAAE,SAAS,kBAAkB;EACjC,SAAS;EACT,OAAO;EACP,aAAa;EACd,CAAC;CAEF,MAAM,iBAAiB,MAAM,cAAc;AACzC,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,QAAQ,cAAc,QAAQ;IACpC,CAAC,OAAO,QAAQ,CAAC;CAEpB,MAAM,gBAAgB,MAAM,cAAc;AACxC,MAAI,CAAC,eAAgB,QAAO;AAC5B,SAAO,OAAO;IACb,CAAC,MAAM,eAAe,CAAC;CAE1B,MAAM,iBAAiB,MAAM,cAAc;AACzC,MAAI,CAAC,WAAW,CAAC,eAAgB,QAAO;AACxC,SAAO,QAAQ,cAAc,OAAO,QAAQ,cAAc;IACzD;EAAC;EAAS;EAAM;EAAe,CAAC;CAEnC,MAAM,aAAa,MAAM,aACtB,iBAAiB;AAChB,MAAI,CAAC,QAAS;AACd,UAAQ,OAAO;GACb,MAAM,QAAQ,aAAa,QAAQ,cAAc;GACjD,UAAU;GACX,CAAC;IAEJ,CAAC,QAAQ,CACV;AAED,QACE,sBAAA,cAAC,iBAAD;EACE,MAAK;EACL,QAAO;EACP,aAAY;EACZ,GAAI;EACJ,GAAI;EA2BY,EAzBhB,sBAAA,cAAC,mBAAD,EAAmB,KAAK,oBAAkD,EAA7B,SAA6B,EAEzE,iBACC,sBAAA,cAAC,yBAAD;EACE,OAAM;EACN,MAAK;EACL,eAAe,WAAW,CAAC,YAAY;EACvC,UAAU;EACV,WAAU;EAGc,EADxB,sBAAA,cAAC,MAAD,EAAM,IAAI,aAAe,CAAA,CACD,EAG3B,kBACC,sBAAA,cAAC,yBAAD;EACE,OAAM;EACN,MAAK;EACL,eAAe,WAAW,YAAY;EACtC,UAAU;EACV,WAAU;EAGc,EADxB,sBAAA,cAAC,MAAD,EAAM,IAAI,cAAgB,CAAA,CACF,CAEZ;;AAItB,gBAAgB,cAAc"}
1
+ {"version":3,"file":"TabsTriggerList.js","names":[],"sources":["../../../src/components/tabs/TabsTriggerList.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport { List } from '@radix-ui/react-tabs'\nimport React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { useScrollPosition } from '~/utilities/hooks/useScrollPosition'\nimport { useSize } from '~/utilities/hooks/useSize'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContainer = styled(ColorScheme, {\n base: ['relative', 'border-b', 'border-b-(--base-4)', 'w-full']\n})\n\nconst StyledTriggerList = styled(List, {\n base: [\n 'shrink-0',\n 'flex',\n 'w-full',\n 'overflow-x-auto',\n '-webkit-scrollbar:hidden',\n '[scrollbar-width:none]'\n ]\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n base: [\n 'h-full!',\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'cursor-pointer',\n 'bg-(--base-1)!',\n 'text-(--interactive-1)!',\n 'rounded-none',\n 'opacity-90'\n ]\n})\n\nconst SCROLL_STEP = 0.8 // Used to scroll 80% of clientWidth\n\nexport const TabsTriggerList = ({\n children,\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: TcolorScheme\n}) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width } = useSize({ element: listRef, delay: 500 })\n const { left } = useScrollPosition({\n element: listRef,\n delay: 100,\n delayMethod: 'debounce'\n })\n\n const canScrollXAxis = React.useMemo(() => {\n if (!listRef) return false\n return listRef.scrollWidth > listRef.clientWidth\n }, [width, listRef])\n\n const canScrollLeft = React.useMemo(() => {\n if (!canScrollXAxis) return false\n return left > 0\n }, [left, canScrollXAxis])\n\n const canScrollRight = React.useMemo(() => {\n if (!listRef || !canScrollXAxis) return false\n return listRef.scrollWidth - left - listRef.clientWidth > 1 // 1 rather than 0 to account for sub-pixel widths and calculations\n }, [listRef, left, canScrollXAxis])\n\n const scrollList = React.useCallback(\n (stepModifier) => {\n if (!listRef) return\n listRef.scroll({\n left: listRef.scrollLeft + listRef.clientWidth * stepModifier,\n behavior: 'smooth'\n })\n },\n [listRef]\n )\n\n return (\n <StyledContainer\n base=\"grey1\"\n accent=\"primary1\"\n interactive=\"hiContrast\"\n {...colorScheme}\n {...rest}\n >\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {canScrollLeft && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n onClick={() => scrollList(-SCROLL_STEP)}\n tabIndex={-1}\n className=\"left-0\"\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n {canScrollRight && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n onClick={() => scrollList(SCROLL_STEP)}\n tabIndex={-1}\n className=\"right-0\"\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n"],"mappings":";;;;;;;;;;;AAgBA,IAAM,kBAAkB,OAAO,aAAa,EAC1C,MAAM;CAAC;CAAY;CAAY;CAAuB;AAAQ,EAChE,CAAC;AAED,IAAM,oBAAoB,OAAO,MAAM,EACrC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,IAAM,0BAA0B,OAAO,YAAY,EACjD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAED,IAAM,cAAc;AAEpB,IAAa,mBAAmB,EAC9B,UACA,cAAc,CAAC,GACf,GAAG,WAGC;CACJ,MAAM,CAAC,SAAS,sBAAsB,oBAAoB;CAE1D,MAAM,EAAE,UAAU,QAAQ;EAAE,SAAS;EAAS,OAAO;CAAI,CAAC;CAC1D,MAAM,EAAE,SAAS,kBAAkB;EACjC,SAAS;EACT,OAAO;EACP,aAAa;CACf,CAAC;CAED,MAAM,iBAAiB,MAAM,cAAc;EACzC,IAAI,CAAC,SAAS,OAAO;EACrB,OAAO,QAAQ,cAAc,QAAQ;CACvC,GAAG,CAAC,OAAO,OAAO,CAAC;CAEnB,MAAM,gBAAgB,MAAM,cAAc;EACxC,IAAI,CAAC,gBAAgB,OAAO;EAC5B,OAAO,OAAO;CAChB,GAAG,CAAC,MAAM,cAAc,CAAC;CAEzB,MAAM,iBAAiB,MAAM,cAAc;EACzC,IAAI,CAAC,WAAW,CAAC,gBAAgB,OAAO;EACxC,OAAO,QAAQ,cAAc,OAAO,QAAQ,cAAc;CAC5D,GAAG;EAAC;EAAS;EAAM;CAAc,CAAC;CAElC,MAAM,aAAa,MAAM,aACtB,iBAAiB;EAChB,IAAI,CAAC,SAAS;EACd,QAAQ,OAAO;GACb,MAAM,QAAQ,aAAa,QAAQ,cAAc;GACjD,UAAU;EACZ,CAAC;CACH,GACA,CAAC,OAAO,CACV;CAEA,OACE,sBAAA,cAAC,iBAAD;EACE,MAAK;EACL,QAAO;EACP,aAAY;EACZ,GAAI;EACJ,GAAI;CA2BW,GAzBf,sBAAA,cAAC,mBAAD,EAAmB,KAAK,mBAAiD,GAA5B,QAA4B,GAExE,iBACC,sBAAA,cAAC,yBAAD;EACE,OAAM;EACN,MAAK;EACL,eAAe,WAAW,CAAC,WAAW;EACtC,UAAU;EACV,WAAU;CAGa,GADvB,sBAAA,cAAC,MAAD,EAAM,IAAI,YAAc,CAAA,CACD,GAG1B,kBACC,sBAAA,cAAC,yBAAD;EACE,OAAM;EACN,MAAK;EACL,eAAe,WAAW,WAAW;EACrC,UAAU;EACV,WAAU;CAGa,GADvB,sBAAA,cAAC,MAAD,EAAM,IAAI,aAAe,CAAA,CACF,CAEZ;AAErB;AAEA,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","names":[],"sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport type { Override } from '~/utilities/types'\n\nexport const StyledText = styled(\n 'p',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]'],\n '2xl': ['text-2xl', 'leading-[1.40]', 'capsize-[0.3336]'],\n '3xl': ['text-3xl', 'leading-[1.28]', 'capsize-[0.2709]'],\n '4xl': ['text-4xl', 'leading-none', 'capsize-[0.1309]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n normal: ['font-normal'],\n bold: ['font-semibold']\n },\n family: {\n body: ['font-body'],\n display: ['font-display'],\n mono: ['font-mono']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\ntype TextProps = Override<\n React.ComponentProps<typeof StyledText>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Text = React.forwardRef<HTMLParagraphElement, TextProps>(\n ({ size = 'md', family = 'body', ...remainingProps }, ref) => (\n <StyledText size={size} family={family} {...remainingProps} ref={ref} />\n )\n)\n\nText.displayName = 'Text'\n"],"mappings":";;;AAKA,IAAa,aAAa,OACxB,KACA;CACE,MAAM,CAAC,MAAM;CACb,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;GACrD,OAAO;IAAC;IAAY;IAAkB;IAAmB;GACzD,OAAO;IAAC;IAAY;IAAkB;IAAmB;GACzD,OAAO;IAAC;IAAY;IAAgB;IAAmB;GACxD;EACD,WAAW,EACT,MAAM,CAAC,eAAe,EACvB;EACD,QAAQ;GACN,QAAQ,CAAC,cAAc;GACvB,MAAM,CAAC,gBAAgB;GACxB;EACD,QAAQ;GACN,MAAM,CAAC,YAAY;GACnB,SAAS,CAAC,eAAe;GACzB,MAAM,CAAC,YAAY;GACpB;EACF;CACF,EACD,EACE,2BAA2B,MAC5B,CACF;AAoBD,IAAa,OAAO,QAAM,YACvB,EAAE,OAAO,MAAM,SAAS,QAAQ,GAAG,kBAAkB,QACpD,wBAAA,cAAC,YAAD;CAAkB;CAAc;CAAQ,GAAI;CAAqB;CAAO,CAAA,CAE3E;AAED,KAAK,cAAc"}
1
+ {"version":3,"file":"Text.js","names":[],"sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport type { Override } from '~/utilities/types'\n\nexport const StyledText = styled(\n 'p',\n {\n base: ['m-0'],\n variants: {\n size: {\n xs: ['text-xs', 'leading-[1.6]', 'capsize-[0.4364]'],\n sm: ['text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['text-md', 'leading-normal', 'capsize-[0.3864]'],\n lg: ['text-lg', 'leading-[1.52]', 'capsize-[0.3983]'],\n xl: ['text-xl', 'leading-[1.42]', 'capsize-[0.3506]'],\n '2xl': ['text-2xl', 'leading-[1.40]', 'capsize-[0.3336]'],\n '3xl': ['text-3xl', 'leading-[1.28]', 'capsize-[0.2709]'],\n '4xl': ['text-4xl', 'leading-none', 'capsize-[0.1309]']\n },\n noCapsize: {\n true: ['capsize-none']\n },\n weight: {\n normal: ['font-normal'],\n bold: ['font-semibold']\n },\n family: {\n body: ['font-body'],\n display: ['font-display'],\n mono: ['font-mono']\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\ntype TextProps = Override<\n React.ComponentProps<typeof StyledText>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Text = React.forwardRef<HTMLParagraphElement, TextProps>(\n ({ size = 'md', family = 'body', ...remainingProps }, ref) => (\n <StyledText size={size} family={family} {...remainingProps} ref={ref} />\n )\n)\n\nText.displayName = 'Text'\n"],"mappings":";;;AAKA,IAAa,aAAa,OACxB,KACA;CACE,MAAM,CAAC,KAAK;CACZ,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;GACpD,OAAO;IAAC;IAAY;IAAkB;GAAkB;GACxD,OAAO;IAAC;IAAY;IAAkB;GAAkB;GACxD,OAAO;IAAC;IAAY;IAAgB;GAAkB;EACxD;EACA,WAAW,EACT,MAAM,CAAC,cAAc,EACvB;EACA,QAAQ;GACN,QAAQ,CAAC,aAAa;GACtB,MAAM,CAAC,eAAe;EACxB;EACA,QAAQ;GACN,MAAM,CAAC,WAAW;GAClB,SAAS,CAAC,cAAc;GACxB,MAAM,CAAC,WAAW;EACpB;CACF;AACF,GACA,EACE,2BAA2B,KAC7B,CACF;AAoBA,IAAa,OAAO,QAAM,YACvB,EAAE,OAAO,MAAM,SAAS,QAAQ,GAAG,kBAAkB,QACpD,wBAAA,cAAC,YAAD;CAAkB;CAAc;CAAQ,GAAI;CAAqB;AAAM,CAAA,CAE3E;AAEA,KAAK,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","names":[],"sources":["../../../src/components/textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTextarea = styled('textarea', {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'm-0',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'resize-y',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nexport type TextareaProps = React.ComponentProps<typeof StyledTextarea>\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (props, ref) => <StyledTextarea {...props} ref={ref} />\n)\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";;;AAIA,IAAM,iBAAiB,OAAO,YAAY;CACxC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;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;IACD;GACF;EACD,OAAO,EACL,OAAO,EAAE,EACV;EACD,OAAO;GACL,OAAO,EAAE;GACT,MAAM,EAAE;GACT;EACF;CACD,iBAAiB,EACf,YAAY,YACb;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;AAIF,IAAa,WAAW,QAAM,YAC3B,OAAO,QAAQ,wBAAA,cAAC,gBAAD;CAAgB,GAAI;CAAY;CAAO,CAAA,CACxD;AAED,SAAS,cAAc"}
1
+ {"version":3,"file":"Textarea.js","names":[],"sources":["../../../src/components/textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledTextarea = styled('textarea', {\n base: [\n 'shadow-none',\n 'appearance-none',\n 'rounded-md',\n 'box-border',\n 'text-grey-1000',\n 'font-body',\n 'font-normal',\n 'text-md',\n 'leading-[1.4]',\n 'm-0',\n 'min-h-24',\n 'px-3',\n 'py-3',\n 'resize-y',\n 'w-full',\n 'disabled:bg-grey-200',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800',\n 'placeholder:opacity-100',\n 'placeholder:text-grey-700'\n ],\n variants: {\n appearance: {\n standard: [\n 'bg-white',\n 'border',\n 'border-grey-800',\n 'focus-within:border-primary-800',\n 'focus-within:outline-none'\n ],\n modern: [\n 'bg-grey-100',\n 'border-none',\n 'focus-within:outline-2',\n 'focus-within:outline-blue-800',\n 'focus-within:outline-offset-1',\n 'focus-within:outline-solid',\n 'focus-within:z-1'\n ]\n },\n state: {\n error: []\n },\n theme: {\n white: [],\n grey: []\n }\n },\n defaultVariants: {\n appearance: 'standard'\n },\n compoundVariants: [\n {\n state: 'error',\n appearance: 'standard',\n class: ['border-danger']\n },\n {\n state: 'error',\n appearance: 'modern',\n class: ['bg-danger-light', 'focus-within:outline-danger']\n },\n {\n appearance: 'modern',\n theme: 'white',\n class: ['bg-white']\n },\n {\n appearance: 'modern',\n theme: 'grey',\n class: ['bg-grey-100']\n }\n ]\n})\n\nexport type TextareaProps = React.ComponentProps<typeof StyledTextarea>\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (props, ref) => <StyledTextarea {...props} ref={ref} />\n)\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";;;AAIA,IAAM,iBAAiB,OAAO,YAAY;CACxC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;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;GACF;EACF;EACA,OAAO,EACL,OAAO,CAAC,EACV;EACA,OAAO;GACL,OAAO,CAAC;GACR,MAAM,CAAC;EACT;CACF;CACA,iBAAiB,EACf,YAAY,WACd;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;AAID,IAAa,WAAW,QAAM,YAC3B,OAAO,QAAQ,wBAAA,cAAC,gBAAD;CAAgB,GAAI;CAAY;AAAM,CAAA,CACxD;AAEA,SAAS,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaField.js","names":[],"sources":["../../../src/components/textarea-field/TextareaField.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 { Textarea, TextareaProps } from '~/components/textarea/Textarea'\n\ntype TextareaFieldProps = TextareaProps & FieldElementWrapperProps\n\nexport const TextareaField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...remainingProps\n}: TextareaFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Textarea\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nTextareaField.displayName = 'TextareaField'\n"],"mappings":";;;;;;;AAaA,IAAa,iBAAiB,EAC5B,WACA,WACA,OACA,MACA,YACA,QACA,aACA,YACA,OACA,GAAG,qBACqB;CACxB,MAAM,EAAE,aAAa,gBAAgB;CACrC,MAAM,UAAU,sBAAsB;CACtC,MAAM,EAAE,UAAU,cAAc,KAAK;CACrC,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,UAAD;EACE,IAAI;EACE;EACD;EACL,YAAY;EACZ,OAAO;EACP,GAAK,SAAS,EAAE,OAAO,SAAS;EAChC,GAAI;EACJ,CAAA,CACW;;AAInB,cAAc,cAAc"}
1
+ {"version":3,"file":"TextareaField.js","names":[],"sources":["../../../src/components/textarea-field/TextareaField.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 { Textarea, TextareaProps } from '~/components/textarea/Textarea'\n\ntype TextareaFieldProps = TextareaProps & FieldElementWrapperProps\n\nexport const TextareaField = ({\n className,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n theme,\n ...remainingProps\n}: TextareaFieldProps) => {\n const { register } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n const formAppearance = context?.appearance || appearance\n const formTheme = context?.theme ?? theme\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={formAppearance}\n >\n <Textarea\n id={name}\n name={name}\n ref={ref}\n appearance={formAppearance}\n theme={formTheme}\n {...(error && { state: 'error' })}\n {...remainingProps}\n />\n </FieldWrapper>\n )\n}\n\nTextareaField.displayName = 'TextareaField'\n"],"mappings":";;;;;;;AAaA,IAAa,iBAAiB,EAC5B,WACA,WACA,OACA,MACA,YACA,QACA,aACA,YACA,OACA,GAAG,qBACqB;CACxB,MAAM,EAAE,aAAa,eAAe;CACpC,MAAM,UAAU,qBAAqB;CACrC,MAAM,EAAE,UAAU,cAAc,IAAI;CACpC,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,UAAD;EACE,IAAI;EACE;EACD;EACL,YAAY;EACZ,OAAO;EACP,GAAK,SAAS,EAAE,OAAO,QAAQ;EAC/B,GAAI;CACL,CAAA,CACW;AAElB;AAEA,cAAc,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tile.js","names":[],"sources":["../../../src/components/tile/Tile.tsx"],"sourcesContent":["import React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype TTileProps = React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}\n\nexport const Tile = React.forwardRef<HTMLDivElement, TTileProps>(\n ({ children, borderRadius = 'lg', colorScheme = {}, ...rest }, ref) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n )\n)\n\nTile.displayName = 'Tile'\n"],"mappings":";;;;AAQA,IAAa,aAAa,OACxB,OACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,cAAc;GACZ,IAAI,CAAC,aAAa;GAClB,IAAI,CAAC,aAAa;GAClB,IAAI,CAAC,aAAa;GACnB;EACD,QAAQ,EACN,MAAM,CAAC,oBAAoB,EAC5B;EACD,UAAU,EACR,MAAM,CACJ,wEACA,sCACD,EACF;EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAMD,IAAa,OAAO,MAAM,YACvB,EAAE,UAAU,eAAe,MAAM,cAAc,EAAE,EAAE,GAAG,QAAQ,QAC7D,sBAAA,cAAC,aAAD;CACE,SAAA;CACA,MAAK;CACL,QAAO;CACP,aAAY;CACZ,GAAI;CAKQ,EAHZ,sBAAA,cAAC,YAAD;CAAiB;CAAmB;CAAc,GAAI;CAEzC,EADV,SACU,CACD,CAEjB;AAED,KAAK,cAAc"}
1
+ {"version":3,"file":"Tile.js","names":[],"sources":["../../../src/components/tile/Tile.tsx"],"sourcesContent":["import React from 'react'\n\nimport {\n ColorScheme,\n TcolorScheme\n} from '~/experiments/color-scheme/ColorScheme'\nimport { styled } from '~/styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype TTileProps = React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}\n\nexport const Tile = React.forwardRef<HTMLDivElement, TTileProps>(\n ({ children, borderRadius = 'lg', colorScheme = {}, ...rest }, ref) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n )\n)\n\nTile.displayName = 'Tile'\n"],"mappings":";;;;AAQA,IAAa,aAAa,OACxB,OACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,cAAc;GACZ,IAAI,CAAC,YAAY;GACjB,IAAI,CAAC,YAAY;GACjB,IAAI,CAAC,YAAY;EACnB;EACA,QAAQ,EACN,MAAM,CAAC,mBAAmB,EAC5B;EACA,UAAU,EACR,MAAM,CACJ,wEACA,qCACF,EACF;CACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAMA,IAAa,OAAO,MAAM,YACvB,EAAE,UAAU,eAAe,MAAM,cAAc,CAAC,GAAG,GAAG,QAAQ,QAC7D,sBAAA,cAAC,aAAD;CACE,SAAA;CACA,MAAK;CACL,QAAO;CACP,aAAY;CACZ,GAAI;AAKO,GAHX,sBAAA,cAAC,YAAD;CAAiB;CAAmB;CAAc,GAAI;AAE1C,GADT,QACS,CACD,CAEjB;AAEA,KAAK,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TileInteractive.js","names":[],"sources":["../../../src/components/tile-interactive/TileInteractive.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Tile } from '~/components/tile/Tile'\nimport { useRouterLinkProps } from '~/components/router-provider/RouterProvider'\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TTileInteractiveProps = React.ComponentProps<\n typeof StyledTileInteractive\n> &\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n NavigatorActions & { reloadDocument?: boolean }\n\nexport const TileInteractive = React.forwardRef<\n HTMLDivElement,\n TTileInteractiveProps\n>(({ onClick, href, type = 'button', as, reloadDocument, ...rest }, ref) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || routerLinkProps.as || ('a' as React.ElementType),\n href,\n onClick: undefined\n }\n : {\n as: as || ('button' as React.ElementType),\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n})\n\nTileInteractive.displayName = 'TileInteractive'\n"],"mappings":";;;;;AAOA,IAAM,wBAAwB,OAAO,MAAM,EACzC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAQF,IAAa,kBAAkB,MAAM,YAGlC,EAAE,SAAS,MAAM,OAAO,UAAU,IAAI,gBAAgB,GAAG,QAAQ,QAAQ;CAC1E,MAAM,kBAAkB,mBAAmB,MAAM,EAAE,gBAAgB,CAAC;CAEpE,MAAM,uBADS,CAAC,CAAC,OAEb;EACE,IAAI,MAAM,gBAAgB,MAAO;EACjC;EACA,SAAS,KAAA;EACV,GACD;EACE,IAAI,MAAO;EACX;EACA;EACD;AAEL,QAAO,sBAAA,cAAC,uBAAD;EAAuB,GAAI;EAAM,GAAI;EAA2B;EAAO,CAAA;EAC9E;AAEF,gBAAgB,cAAc"}
1
+ {"version":3,"file":"TileInteractive.js","names":[],"sources":["../../../src/components/tile-interactive/TileInteractive.tsx"],"sourcesContent":["import React from 'react'\n\nimport { useRouterLinkProps } from '~/components/router-provider/RouterProvider'\nimport { Tile } from '~/components/tile/Tile'\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TTileInteractiveProps = React.ComponentProps<\n typeof StyledTileInteractive\n> &\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n NavigatorActions & { reloadDocument?: boolean }\n\nexport const TileInteractive = React.forwardRef<\n HTMLDivElement,\n TTileInteractiveProps\n>(({ onClick, href, type = 'button', as, reloadDocument, ...rest }, ref) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || routerLinkProps.as || ('a' as React.ElementType),\n href,\n onClick: undefined\n }\n : {\n as: as || ('button' as React.ElementType),\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n})\n\nTileInteractive.displayName = 'TileInteractive'\n"],"mappings":";;;;;AAOA,IAAM,wBAAwB,OAAO,MAAM,EACzC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAQD,IAAa,kBAAkB,MAAM,YAGlC,EAAE,SAAS,MAAM,OAAO,UAAU,IAAI,gBAAgB,GAAG,QAAQ,QAAQ;CAC1E,MAAM,kBAAkB,mBAAmB,MAAM,EAAE,eAAe,CAAC;CAEnE,MAAM,uBAAuB,CADb,CAAC,OAEb;EACE,IAAI,MAAM,gBAAgB,MAAO;EACjC;EACA,SAAS,KAAA;CACX,IACA;EACE,IAAI,MAAO;EACX;EACA;CACF;CAEJ,OAAO,sBAAA,cAAC,uBAAD;EAAuB,GAAI;EAAM,GAAI;EAA2B;CAAM,CAAA;AAC/E,CAAC;AAED,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TileToggleGroupItem.js","names":[],"sources":["../../../src/components/tile-toggle-group/TileToggleGroupItem.tsx"],"sourcesContent":["import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { TileInteractive } from '~/components/tile-interactive/TileInteractive'\nimport { styled } from '~/styled'\n\nconst StyledTileToggleGroupItem = styled(TileInteractive, {\n base: [\n 'text-left',\n 'not-disabled:data-[state=on]:active:bg-(--interactive-3)',\n 'not-disabled:data-[state=on]:hover:bg-(--interactive-2)',\n 'data-[state=on]:before:-inset-px',\n 'data-[state=on]:before:absolute',\n 'data-[state=on]:before:rounded-[inherit]',\n 'data-[state=on]:before:inset-shadow-[var(--accent-8)_0px_0px_0px_2px]',\n 'data-[state=on]:before:z-1',\n 'data-[state=on]:bg-(--interactive-1)',\n 'data-[state=on]:border-(--accent-8)'\n ]\n})\n\ntype TTileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledTileToggleGroupItem>\n\nexport const TileToggleGroupItem = ({\n children,\n ...rest\n}: TTileToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledTileToggleGroupItem as=\"button\">\n {children}\n </StyledTileToggleGroupItem>\n </ToggleGroup.Item>\n)\n"],"mappings":";;;;;AAMA,IAAM,4BAA4B,OAAO,iBAAiB,EACxD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAKF,IAAa,uBAAuB,EAClC,UACA,GAAG,WAEH,wBAAA,cAAC,YAAY,MAAb;CAAkB,GAAI;CAAM,SAAA;CAIT,EAHjB,wBAAA,cAAC,2BAAD,EAA2B,IAAG,UAEF,EADzB,SACyB,CACX"}
1
+ {"version":3,"file":"TileToggleGroupItem.js","names":[],"sources":["../../../src/components/tile-toggle-group/TileToggleGroupItem.tsx"],"sourcesContent":["import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { TileInteractive } from '~/components/tile-interactive/TileInteractive'\nimport { styled } from '~/styled'\n\nconst StyledTileToggleGroupItem = styled(TileInteractive, {\n base: [\n 'text-left',\n 'not-disabled:data-[state=on]:active:bg-(--interactive-3)',\n 'not-disabled:data-[state=on]:hover:bg-(--interactive-2)',\n 'data-[state=on]:before:-inset-px',\n 'data-[state=on]:before:absolute',\n 'data-[state=on]:before:rounded-[inherit]',\n 'data-[state=on]:before:inset-shadow-[var(--accent-8)_0px_0px_0px_2px]',\n 'data-[state=on]:before:z-1',\n 'data-[state=on]:bg-(--interactive-1)',\n 'data-[state=on]:border-(--accent-8)'\n ]\n})\n\ntype TTileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> &\n React.ComponentProps<typeof StyledTileToggleGroupItem>\n\nexport const TileToggleGroupItem = ({\n children,\n ...rest\n}: TTileToggleGroupItem) => (\n <ToggleGroup.Item {...rest} asChild>\n <StyledTileToggleGroupItem as=\"button\">\n {children}\n </StyledTileToggleGroupItem>\n </ToggleGroup.Item>\n)\n"],"mappings":";;;;;AAMA,IAAM,4BAA4B,OAAO,iBAAiB,EACxD,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAKD,IAAa,uBAAuB,EAClC,UACA,GAAG,WAEH,wBAAA,cAAC,YAAY,MAAb;CAAkB,GAAI;CAAM,SAAA;AAIV,GAHhB,wBAAA,cAAC,2BAAD,EAA2B,IAAG,SAEH,GADxB,QACwB,CACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"TileToggleGroupRoot.js","names":[],"sources":["../../../src/components/tile-toggle-group/TileToggleGroupRoot.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype TTileToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n TTileToggleGroupRootProps\n>((props, ref) => (\n <ToggleGroup.Root\n ref={ref}\n {...props}\n className={cn(\n props.className,\n 'flex',\n 'gap-2',\n props.orientation === 'horizontal' && 'flex-row',\n props.orientation === 'vertical' && 'flex-col',\n 'flex-wrap'\n )}\n />\n))\n"],"mappings":";;;;AAOA,IAAa,sBAAsB,QAAM,YAGtC,OAAO,QACR,wBAAA,cAAC,YAAY,MAAb;CACO;CACL,GAAI;CACJ,WAAW,GACT,MAAM,WACN,QACA,SACA,MAAM,gBAAgB,gBAAgB,YACtC,MAAM,gBAAgB,cAAc,YACpC,YACD;CACD,CAAA,CACF"}
1
+ {"version":3,"file":"TileToggleGroupRoot.js","names":[],"sources":["../../../src/components/tile-toggle-group/TileToggleGroupRoot.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype TTileToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n TTileToggleGroupRootProps\n>((props, ref) => (\n <ToggleGroup.Root\n ref={ref}\n {...props}\n className={cn(\n props.className,\n 'flex',\n 'gap-2',\n props.orientation === 'horizontal' && 'flex-row',\n props.orientation === 'vertical' && 'flex-col',\n 'flex-wrap'\n )}\n />\n))\n"],"mappings":";;;;AAOA,IAAa,sBAAsB,QAAM,YAGtC,OAAO,QACR,wBAAA,cAAC,YAAY,MAAb;CACO;CACL,GAAI;CACJ,WAAW,GACT,MAAM,WACN,QACA,SACA,MAAM,gBAAgB,gBAAgB,YACtC,MAAM,gBAAgB,cAAc,YACpC,WACF;AACD,CAAA,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { useToastContext } from './ToastContext'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nexport const Toast = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n return <StyledToast type={props.type || type} {...props} />\n}\n\nToast.Icon = ToastIcon\nToast.Close = ToastCloseButton\n"],"mappings":";;;;;;AAQA,IAAa,cAAc,OAAO,OAAO;CACvC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,SAAS,CAAC,UAAU;EACpB,OAAO,CAAC,UAAU;EAClB,SAAS,CAAC,aAAa;EACvB,OAAO,CAAC,YAAY;EACrB,EACF;CACF,CAAC;AAEF,IAAa,SAAS,UAAoD;CACxE,MAAM,EAAE,SAAS,iBAAiB;AAClC,QAAO,wBAAA,cAAC,aAAD;EAAa,MAAM,MAAM,QAAQ;EAAM,GAAI;EAAS,CAAA;;AAG7D,MAAM,OAAO;AACb,MAAM,QAAQ"}
1
+ {"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { useToastContext } from './ToastContext'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'box-border',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nexport const Toast = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n return <StyledToast type={props.type || type} {...props} />\n}\n\nToast.Icon = ToastIcon\nToast.Close = ToastCloseButton\n"],"mappings":";;;;;;AAQA,IAAa,cAAc,OAAO,OAAO;CACvC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,EACR,MAAM;EACJ,SAAS,CAAC,SAAS;EACnB,OAAO,CAAC,SAAS;EACjB,SAAS,CAAC,YAAY;EACtB,OAAO,CAAC,WAAW;CACrB,EACF;AACF,CAAC;AAED,IAAa,SAAS,UAAoD;CACxE,MAAM,EAAE,SAAS,gBAAgB;CACjC,OAAO,wBAAA,cAAC,aAAD;EAAa,MAAM,MAAM,QAAQ;EAAM,GAAI;CAAQ,CAAA;AAC5D;AAEA,MAAM,OAAO;AACb,MAAM,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToastCloseButton.js","names":[],"sources":["../../../src/components/toast/ToastCloseButton.tsx"],"sourcesContent":["import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { toast } from 'react-hot-toast'\n\nimport { cn } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { useToastContext } from './ToastContext'\n\nexport interface ToastCloseButtonProps extends Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'label' | 'children'\n> {\n onDismiss?: () => void\n label?: string\n}\n\nexport const ToastCloseButton = ({\n onDismiss,\n label = 'Close alert',\n ...rest\n}: ToastCloseButtonProps): JSX.Element => {\n const { id } = useToastContext()\n\n return (\n <ActionIcon\n label={label}\n onClick={() => {\n toast.dismiss(id)\n onDismiss?.()\n }}\n {...rest}\n className={cn(\n 'text-white',\n '-mr-2',\n 'hover:opacity-80',\n 'hover:text-white',\n 'focus:opacity-80',\n 'focus:text-white'\n )}\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n}\n"],"mappings":";;;;;;;;AAkBA,IAAa,oBAAoB,EAC/B,WACA,QAAQ,eACR,GAAG,WACqC;CACxC,MAAM,EAAE,OAAO,iBAAiB;AAEhC,QACE,wBAAA,cAAC,YAAD;EACS;EACP,eAAe;AACb,SAAM,QAAQ,GAAG;AACjB,gBAAa;;EAEf,GAAI;EACJ,WAAW,GACT,cACA,SACA,oBACA,oBACA,oBACA,mBACD;EAGU,EADX,wBAAA,cAAC,MAAD,EAAM,IAAI,OAAS,CAAA,CACR"}
1
+ {"version":3,"file":"ToastCloseButton.js","names":[],"sources":["../../../src/components/toast/ToastCloseButton.tsx"],"sourcesContent":["import { Close } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { toast } from 'react-hot-toast'\n\nimport { cn } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { useToastContext } from './ToastContext'\n\nexport interface ToastCloseButtonProps extends Omit<\n React.ComponentProps<typeof ActionIcon>,\n 'label' | 'children'\n> {\n onDismiss?: () => void\n label?: string\n}\n\nexport const ToastCloseButton = ({\n onDismiss,\n label = 'Close alert',\n ...rest\n}: ToastCloseButtonProps): JSX.Element => {\n const { id } = useToastContext()\n\n return (\n <ActionIcon\n label={label}\n onClick={() => {\n toast.dismiss(id)\n onDismiss?.()\n }}\n {...rest}\n className={cn(\n 'text-white',\n '-mr-2',\n 'hover:opacity-80',\n 'hover:text-white',\n 'focus:opacity-80',\n 'focus:text-white'\n )}\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n}\n"],"mappings":";;;;;;;;AAkBA,IAAa,oBAAoB,EAC/B,WACA,QAAQ,eACR,GAAG,WACqC;CACxC,MAAM,EAAE,OAAO,gBAAgB;CAE/B,OACE,wBAAA,cAAC,YAAD;EACS;EACP,eAAe;GACb,MAAM,QAAQ,EAAE;GAChB,YAAY;EACd;EACA,GAAI;EACJ,WAAW,GACT,cACA,SACA,oBACA,oBACA,oBACA,kBACF;CAGU,GADV,wBAAA,cAAC,MAAD,EAAM,IAAI,MAAQ,CAAA,CACR;AAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToastContext.js","names":[],"sources":["../../../src/components/toast/ToastContext.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Toast } from 'react-hot-toast/dist/core/types'\n\nexport const ToastContext = React.createContext<Pick<\n Toast,\n 'type' | 'id' | 'message'\n> | null>(null)\n\nexport const useToastContext = () => {\n const context = React.useContext(ToastContext)\n\n if (!context) {\n throw new Error('useToastContext must be used within a ToastProvider')\n }\n\n return context\n}\n"],"mappings":";;AAGA,IAAa,eAAe,QAAM,cAGxB,KAAK;AAEf,IAAa,wBAAwB;CACnC,MAAM,UAAU,QAAM,WAAW,aAAa;AAE9C,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,sDAAsD;AAGxE,QAAO"}
1
+ {"version":3,"file":"ToastContext.js","names":[],"sources":["../../../src/components/toast/ToastContext.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Toast } from 'react-hot-toast/dist/core/types'\n\nexport const ToastContext = React.createContext<Pick<\n Toast,\n 'type' | 'id' | 'message'\n> | null>(null)\n\nexport const useToastContext = () => {\n const context = React.useContext(ToastContext)\n\n if (!context) {\n throw new Error('useToastContext must be used within a ToastProvider')\n }\n\n return context\n}\n"],"mappings":";;AAGA,IAAa,eAAe,QAAM,cAGxB,IAAI;AAEd,IAAa,wBAAwB;CACnC,MAAM,UAAU,QAAM,WAAW,YAAY;CAE7C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD;CAGvE,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToastIcon.js","names":[],"sources":["../../../src/components/toast/ToastIcon.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const ToastIcon = (\n props: React.ComponentProps<typeof Icon>\n): JSX.Element => <Icon size=\"sm\" {...props} className=\"mr-3 flex-[0_0_auto]\" />\n"],"mappings":";;;AAIA,IAAa,aACX,UACgB,sBAAA,cAAC,MAAD;CAAM,MAAK;CAAK,GAAI;CAAO,WAAU;CAAyB,CAAA"}
1
+ {"version":3,"file":"ToastIcon.js","names":[],"sources":["../../../src/components/toast/ToastIcon.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Icon } from '../icon/Icon'\n\nexport const ToastIcon = (\n props: React.ComponentProps<typeof Icon>\n): JSX.Element => <Icon size=\"sm\" {...props} className=\"mr-3 flex-[0_0_auto]\" />\n"],"mappings":";;;AAIA,IAAa,aACX,UACgB,sBAAA,cAAC,MAAD;CAAM,MAAK;CAAK,GAAI;CAAO,WAAU;AAAwB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToastProvider.js","names":[],"sources":["../../../src/components/toast/ToastProvider.tsx"],"sourcesContent":["import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '~/styled'\n\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './ToastContext'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './ToastContext'\n\nconst ToastProviderBase = styled('div', {\n base: ['fixed', 'z-2147483647', 'inset-2', 'pointer-events-none', 'sm:top-3']\n})\n\nconst ToastWrapper = styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast.id, {\n reverseOrder: true,\n margin: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.role}\n aria-live={toast.ariaLive}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n"],"mappings":";;;;;;;;;AAcA,IAAM,oBAAoB,OAAO,OAAO,EACtC,MAAM;CAAC;CAAS;CAAgB;CAAW;CAAuB;CAAW,EAC9E,CAAC;AAEF,IAAM,eAAe,OAAO,OAAO;CACjC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,SAAS;EACP,MAAM,CAAC,yCAAyC;EAChD,OAAO,CAAC,aAAa,0CAA0C;EAChE,EACF;CACF,CAAC;AAEF,IAAa,iBAAiB,EAC5B,UACA,gBACqD;CACrD,MAAM,EAAE,QAAQ,aAAa,YAAY;CACzC,MAAM,EAAE,YAAY,UAAU,iBAAiB,iBAAiB;AAEhE,QACE,wBAAA,cAAA,QAAA,UAAA,MACE,wBAAA,cAAC,mBAAD;EACE,cAAc;EACd,cAAc;EACH;EA2CO,EAzCjB,OAAO,KAAK,UAAU;EACrB,MAAM,EAAE,SAAS,aAAa;EAE9B,MAAM,SAAS,gBAAgB,MAAM,IAAI;GACvC,cAAc;GACd,QAAQ;GACT,CAAC;EAEF,MAAM,OAAO,OAA8B;AACzC,OAAI,MAAM,MAAM,WAAW,KAAA,EACzB,cAAa,MAAM,IAAI,GAAG,uBAAuB,CAAC,OAAO;;AAI7D,SACE,wBAAA,cAAC,cAAD;GACE,KAAK,MAAM;GACN;GACL,SAAS,MAAM;GACf,MAAM,MAAM;GACZ,aAAW,MAAM;GACjB,OAAO,EAAE,YAAY,GAAG,OAAO,KAAK;GACpC,WAAU;GAgBG,EAdb,wBAAA,cAAC,aAAa,UAAd,EAAuB,OAAO,OAaN,EAZrB,OAAO,aAAa,aACnB,SAAS,MAAM,GACb,QAAM,eAAe,SAAS,GAChC,WAEA,wBAAA,cAAC,OAAD,EAAO,WAAU,SAKT,EAJL,MAAM,SAAS,WAAW,wBAAA,cAAC,MAAM,MAAP,EAAY,IAAI,OAAS,CAAA,EACpD,wBAAA,cAAC,MAAA,MAAM,SAAgB,EACvB,wBAAA,cAAC,QAAA,KAAS,EACV,wBAAA,cAAC,MAAM,OAAA,KAAQ,CACT,CAEY,CACX;GAEjB,CACgB,EACnB,SACA;;AAIP,cAAc,cAAc"}
1
+ {"version":3,"file":"ToastProvider.js","names":[],"sources":["../../../src/components/toast/ToastProvider.tsx"],"sourcesContent":["import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '~/styled'\n\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './ToastContext'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './ToastContext'\n\nconst ToastProviderBase = styled('div', {\n base: ['fixed', 'z-2147483647', 'inset-2', 'pointer-events-none', 'sm:top-3']\n})\n\nconst ToastWrapper = styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast.id, {\n reverseOrder: true,\n margin: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.role}\n aria-live={toast.ariaLive}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n"],"mappings":";;;;;;;;;AAcA,IAAM,oBAAoB,OAAO,OAAO,EACtC,MAAM;CAAC;CAAS;CAAgB;CAAW;CAAuB;AAAU,EAC9E,CAAC;AAED,IAAM,eAAe,OAAO,OAAO;CACjC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,EACR,SAAS;EACP,MAAM,CAAC,wCAAwC;EAC/C,OAAO,CAAC,aAAa,yCAAyC;CAChE,EACF;AACF,CAAC;AAED,IAAa,iBAAiB,EAC5B,UACA,gBACqD;CACrD,MAAM,EAAE,QAAQ,aAAa,WAAW;CACxC,MAAM,EAAE,YAAY,UAAU,iBAAiB,iBAAiB;CAEhE,OACE,wBAAA,cAAA,QAAA,UAAA,MACE,wBAAA,cAAC,mBAAD;EACE,cAAc;EACd,cAAc;EACH;CA2CM,GAzChB,OAAO,KAAK,UAAU;EACrB,MAAM,EAAE,SAAS,aAAa;EAE9B,MAAM,SAAS,gBAAgB,MAAM,IAAI;GACvC,cAAc;GACd,QAAQ;EACV,CAAC;EAED,MAAM,OAAO,OAA8B;GACzC,IAAI,MAAM,MAAM,WAAW,KAAA,GACzB,aAAa,MAAM,IAAI,GAAG,sBAAsB,EAAE,MAAM;EAE5D;EAEA,OACE,wBAAA,cAAC,cAAD;GACE,KAAK,MAAM;GACN;GACL,SAAS,MAAM;GACf,MAAM,MAAM;GACZ,aAAW,MAAM;GACjB,OAAO,EAAE,YAAY,GAAG,OAAO,IAAI;GACnC,WAAU;EAgBE,GAdZ,wBAAA,cAAC,aAAa,UAAd,EAAuB,OAAO,MAaP,GAZpB,OAAO,aAAa,aACnB,SAAS,KAAK,IACZ,QAAM,eAAe,QAAQ,IAC/B,WAEA,wBAAA,cAAC,OAAD,EAAO,WAAU,QAKV,GAJJ,MAAM,SAAS,WAAW,wBAAA,cAAC,MAAM,MAAP,EAAY,IAAI,MAAQ,CAAA,GACnD,wBAAA,cAAC,MAAA,MAAM,QAAe,GACtB,wBAAA,cAAC,QAAA,IAAQ,GACT,wBAAA,cAAC,MAAM,OAAA,IAAO,CACT,CAEY,CACX;CAElB,CAAC,CACgB,GAClB,QACD;AAEN;AAEA,cAAc,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroupButton.js","names":[],"sources":["../../../src/components/toggle-group/ToggleGroupButton.tsx"],"sourcesContent":["import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { modernVariant, standardVariant } from './ToggleGroupItem'\n\nexport const StyledButton = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'grow',\n 'flex',\n 'items-center',\n 'justify-center',\n 'font-semibold',\n 'leading-none',\n 'py-1'\n ],\n variants: {\n size: {\n sm: ['*:not-last:mr-2', 'min-h-8', 'px-4', 'text-sm'],\n md: ['*:not-last:mr-3', 'min-h-10', 'px-8', 'text-md'],\n lg: ['*:not-last:mr-3', 'min-h-12', 'px-8', 'text-lg']\n },\n isIconOnly: {\n true: []\n },\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n compoundVariants: [\n {\n isIconOnly: true,\n size: 'sm',\n class: ['min-w-8', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'sm',\n theme: 'modern',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n theme: 'modern',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n theme: 'modern',\n class: ['min-w-15', 'p-0']\n }\n ]\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const ToggleGroupButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledButton>\n>(({ size = 'md', theme = 'standard', children, ...rest }, ref) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n const isIconOnly =\n isSingleChild &&\n React.isValidElement(childrenArray[0]) &&\n childrenArray[0]?.type === Icon\n\n return (\n <StyledButton\n ref={ref}\n size={size}\n isIconOnly={isIconOnly}\n theme={theme}\n {...rest}\n >\n {\n childrenArray.map((child) => {\n if (\n !isSingleChild &&\n (typeof child === 'string' || typeof child === 'number')\n )\n return <span key={child}>{child}</span>\n if (React.isValidElement(child)) {\n if (child?.type === Icon)\n return React.cloneElement(child, { ...child.props, size })\n }\n return child\n }) as React.ReactElement[]\n }\n </StyledButton>\n )\n})\n"],"mappings":";;;;;;AAQA,IAAa,eAAe,OAC1B,YAAY,MACZ;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAmB;IAAW;IAAQ;IAAU;GACrD,IAAI;IAAC;IAAmB;IAAY;IAAQ;IAAU;GACtD,IAAI;IAAC;IAAmB;IAAY;IAAQ;IAAU;GACvD;EACD,YAAY,EACV,MAAM,EAAE,EACT;EACD,OAAO;GACL,UAAU;GACV,QAAQ;GACT;EACF;CACD,kBAAkB;EAChB;GACE,YAAY;GACZ,MAAM;GACN,OAAO,CAAC,WAAW,MAAM;GAC1B;EACD;GACE,YAAY;GACZ,MAAM;GACN,OAAO,CAAC,YAAY,MAAM;GAC3B;EACD;GACE,YAAY;GACZ,MAAM;GACN,OAAO,CAAC,YAAY,MAAM;GAC3B;EACD;GACE,YAAY;GACZ,MAAM;GACN,OAAO;GACP,OAAO,CAAC,YAAY,MAAM;GAC3B;EACD;GACE,YAAY;GACZ,MAAM;GACN,OAAO;GACP,OAAO,CAAC,YAAY,MAAM;GAC3B;EACD;GACE,YAAY;GACZ,MAAM;GACN,OAAO;GACP,OAAO,CAAC,YAAY,MAAM;GAC3B;EACF;CACF,EACD,EAAE,2BAA2B,MAAM,CACpC;AAED,IAAa,oBAAoB,QAAM,YAGpC,EAAE,OAAO,MAAM,QAAQ,YAAY,UAAU,GAAG,QAAQ,QAAQ;CACjE,MAAM,gBAAgB,QAAM,SAAS,QAAQ,SAAS;CACtD,MAAM,gBAAgB,cAAc,UAAU;CAC9C,MAAM,aACJ,iBACA,QAAM,eAAe,cAAc,GAAG,IACtC,cAAc,IAAI,SAAS;AAE7B,QACE,wBAAA,cAAC,cAAD;EACO;EACC;EACM;EACL;EACP,GAAI;EAgBS,EAbX,cAAc,KAAK,UAAU;AAC3B,MACE,CAAC,kBACA,OAAO,UAAU,YAAY,OAAO,UAAU,UAE/C,QAAO,wBAAA,cAAC,QAAD,EAAM,KAAK,OAAqB,EAAb,MAAa;AACzC,MAAI,QAAM,eAAe,MAAM;OACzB,OAAO,SAAS,KAClB,QAAO,QAAM,aAAa,OAAO;IAAE,GAAG,MAAM;IAAO;IAAM,CAAC;;AAE9D,SAAO;GACP,CAES;EAEjB"}
1
+ {"version":3,"file":"ToggleGroupButton.js","names":[],"sources":["../../../src/components/toggle-group/ToggleGroupButton.tsx"],"sourcesContent":["import * as ToggleGroup from '@radix-ui/react-toggle-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { modernVariant, standardVariant } from './ToggleGroupItem'\n\nexport const StyledButton = styled(\n ToggleGroup.Item,\n {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'grow',\n 'flex',\n 'items-center',\n 'justify-center',\n 'font-semibold',\n 'leading-none',\n 'py-1'\n ],\n variants: {\n size: {\n sm: ['*:not-last:mr-2', 'min-h-8', 'px-4', 'text-sm'],\n md: ['*:not-last:mr-3', 'min-h-10', 'px-8', 'text-md'],\n lg: ['*:not-last:mr-3', 'min-h-12', 'px-8', 'text-lg']\n },\n isIconOnly: {\n true: []\n },\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n compoundVariants: [\n {\n isIconOnly: true,\n size: 'sm',\n class: ['min-w-8', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'sm',\n theme: 'modern',\n class: ['min-w-10', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'md',\n theme: 'modern',\n class: ['min-w-12', 'p-0']\n },\n {\n isIconOnly: true,\n size: 'lg',\n theme: 'modern',\n class: ['min-w-15', 'p-0']\n }\n ]\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const ToggleGroupButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof StyledButton>\n>(({ size = 'md', theme = 'standard', children, ...rest }, ref) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n const isIconOnly =\n isSingleChild &&\n React.isValidElement(childrenArray[0]) &&\n childrenArray[0]?.type === Icon\n\n return (\n <StyledButton\n ref={ref}\n size={size}\n isIconOnly={isIconOnly}\n theme={theme}\n {...rest}\n >\n {\n childrenArray.map((child) => {\n if (\n !isSingleChild &&\n (typeof child === 'string' || typeof child === 'number')\n )\n return <span key={child}>{child}</span>\n if (React.isValidElement(child)) {\n if (child?.type === Icon)\n return React.cloneElement(child, { ...child.props, size })\n }\n return child\n }) as React.ReactElement[]\n }\n </StyledButton>\n )\n})\n"],"mappings":";;;;;;AAQA,IAAa,eAAe,OAC1B,YAAY,MACZ;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAmB;IAAW;IAAQ;GAAS;GACpD,IAAI;IAAC;IAAmB;IAAY;IAAQ;GAAS;GACrD,IAAI;IAAC;IAAmB;IAAY;IAAQ;GAAS;EACvD;EACA,YAAY,EACV,MAAM,CAAC,EACT;EACA,OAAO;GACL,UAAU;GACV,QAAQ;EACV;CACF;CACA,kBAAkB;EAChB;GACE,YAAY;GACZ,MAAM;GACN,OAAO,CAAC,WAAW,KAAK;EAC1B;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO,CAAC,YAAY,KAAK;EAC3B;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO,CAAC,YAAY,KAAK;EAC3B;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;GACP,OAAO,CAAC,YAAY,KAAK;EAC3B;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;GACP,OAAO,CAAC,YAAY,KAAK;EAC3B;EACA;GACE,YAAY;GACZ,MAAM;GACN,OAAO;GACP,OAAO,CAAC,YAAY,KAAK;EAC3B;CACF;AACF,GACA,EAAE,2BAA2B,KAAK,CACpC;AAEA,IAAa,oBAAoB,QAAM,YAGpC,EAAE,OAAO,MAAM,QAAQ,YAAY,UAAU,GAAG,QAAQ,QAAQ;CACjE,MAAM,gBAAgB,QAAM,SAAS,QAAQ,QAAQ;CACrD,MAAM,gBAAgB,cAAc,UAAU;CAC9C,MAAM,aACJ,iBACA,QAAM,eAAe,cAAc,EAAE,KACrC,cAAc,IAAI,SAAS;CAE7B,OACE,wBAAA,cAAC,cAAD;EACO;EACC;EACM;EACL;EACP,GAAI;CAgBQ,GAbV,cAAc,KAAK,UAAU;EAC3B,IACE,CAAC,kBACA,OAAO,UAAU,YAAY,OAAO,UAAU,WAE/C,OAAO,wBAAA,cAAC,QAAD,EAAM,KAAK,MAAoB,GAAZ,KAAY;EACxC,IAAI,QAAM,eAAe,KAAK;OACxB,OAAO,SAAS,MAClB,OAAO,QAAM,aAAa,OAAO;IAAE,GAAG,MAAM;IAAO;GAAK,CAAC;EAAA;EAE7D,OAAO;CACT,CAAC,CAES;AAElB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroupItem.js","names":[],"sources":["../../../src/components/toggle-group/ToggleGroupItem.tsx"],"sourcesContent":["import * as ToggleGroup from '@radix-ui/react-toggle-group'\n\nimport { styled } from '~/styled'\n\nexport const standardVariant = [\n 'before:bg-grey-600',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'text-grey-800',\n 'data-[state=on]:border-current!',\n 'data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'data-[state=on]:text-primary-800',\n 'not-disabled:data-[state=on]:before:bg-none',\n 'not-disabled:focus-visible:before:bg-none',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:before:bg-none',\n 'not-disabled:hover:border-current!',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const modernVariant = [\n 'bg-grey-200',\n 'border-0',\n 'text-grey-800',\n 'overflow-hidden',\n 'rounded-md',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:border!',\n 'data-[state=on]:border-grey-200!',\n 'data-[state=on]:shadow-none!',\n 'data-[state=on]:text-grey-900',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px_white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const ToggleGroupItem = styled(ToggleGroup.Item, {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n defaultVariants: {\n theme: 'standard'\n }\n})\n"],"mappings":";;;AAIA,IAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,IAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,IAAa,kBAAkB,OAAO,YAAY,MAAM;CACtD,MAAM;EACJ;EACA;EACA;EACD;CACD,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;EACT,EACF;CACD,iBAAiB,EACf,OAAO,YACR;CACF,CAAC"}
1
+ {"version":3,"file":"ToggleGroupItem.js","names":[],"sources":["../../../src/components/toggle-group/ToggleGroupItem.tsx"],"sourcesContent":["import * as ToggleGroup from '@radix-ui/react-toggle-group'\n\nimport { styled } from '~/styled'\n\nexport const standardVariant = [\n 'before:bg-grey-600',\n 'bg-white',\n 'border',\n 'border-grey-600',\n 'text-grey-800',\n 'data-[state=on]:border-current!',\n 'data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'data-[state=on]:text-primary-800',\n 'not-disabled:data-[state=on]:before:bg-none',\n 'not-disabled:focus-visible:before:bg-none',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px]',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:before:bg-none',\n 'not-disabled:hover:border-current!',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const modernVariant = [\n 'bg-grey-200',\n 'border-0',\n 'text-grey-800',\n 'overflow-hidden',\n 'rounded-md',\n 'data-[state=on]:bg-white',\n 'data-[state=on]:border!',\n 'data-[state=on]:border-grey-200!',\n 'data-[state=on]:shadow-none!',\n 'data-[state=on]:text-grey-900',\n 'not-disabled:focus-visible:data-[state=off]:border-grey-600!',\n 'not-disabled:focus-visible:data-[state=on]:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:data-[state=on]:inset-shadow-[currentColor_0px_0px_0px_1px_white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:text-primary-900'\n]\n\nexport const ToggleGroupItem = styled(ToggleGroup.Item, {\n base: [\n 'cursor-pointer',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30'\n ],\n variants: {\n theme: {\n standard: standardVariant,\n modern: modernVariant\n }\n },\n defaultVariants: {\n theme: 'standard'\n }\n})\n"],"mappings":";;;AAIA,IAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,IAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,IAAa,kBAAkB,OAAO,YAAY,MAAM;CACtD,MAAM;EACJ;EACA;EACA;CACF;CACA,UAAU,EACR,OAAO;EACL,UAAU;EACV,QAAQ;CACV,EACF;CACA,iBAAiB,EACf,OAAO,WACT;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroupRoot.js","names":[],"sources":["../../../src/components/toggle-group/ToggleGroupRoot.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n gap?: 0 | 1 | 2 | 3\n wrap?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst gapClassMap = {\n 0: 'gap-0.5',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3'\n}\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof StyledRoot> & RootType\n>(\n (\n {\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n },\n ref\n ) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n hasGap && gapClassMap[gap],\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap ? 'flex-wrap' : 'flex-nowrap'\n )}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement[]\n }\n </div>\n </StyledRoot>\n )\n }\n)\n"],"mappings":";;;;AAaA,IAAa,aAAa,OAAO,YAAY,MAAM;CACjD,MAAM,CAAC,QAAQ;CACf,UAAU;EACR,aAAa;GACX,MAAM;IACJ;IACA;IACA;IACD;GACD,OAAO,CAAC,SAAS;GAClB;EACD,QAAQ;GACN,MAAM,CAAC,2CAA2C;GAClD,OAAO;IACL;IACA;IACA;IACA;IACD;GACF;EACD,WAAW;GACT,QAAQ,EAAE;GACV,KAAK,EAAE;GACR;EACD,OAAO;GACL,UAAU,EAAE;GACZ,QAAQ,CAAC,cAAc;GACxB;EACF;CACD,kBAAkB;EAChB;GACE,QAAQ;GACR,WAAW;GACX,OAAO;GACP,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD;GACE,QAAQ;GACR,WAAW;GACX,OAAO;GACP,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD;GACE,QAAQ;GACR,OAAO;GACP,OAAO,EAAE;GACV;EACD;GACE,QAAQ;GACR,OAAO;GACP,OAAO;IACL;IACA;IACA;IACD;GACF;EACF;CACF,CAAC;AAEF,IAAM,cAAc;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;AAED,IAAM,0BAA0B,gBAC9B,gBAAgB,eAAe,QAAQ;AAEzC,IAAa,kBAAkB,QAAM,YAKjC,EACE,cAAc,cACd,KACA,aACA,UACA,QAAQ,YACR,MACA,GAAG,QAEL,QACG;CACH,MAAM,SAAS,OAAO,QAAQ;CAC9B,MAAM,YAAY,uBAAuB,YAAY;AAErD,QACE,wBAAA,cAAC,YAAD;EACO;EACM;EACH;EACK;EACA;EACN;EACP,GAAI;EAmBO,EAjBX,wBAAA,cAAC,OAAD,EACE,WAAW,GACT,QACA,UAAU,YAAY,MACtB,gBAAgB,eAAe,aAAa,YAC5C,OAAO,cAAc,cACtB,EAUG,EAPF,QAAM,SAAS,QAAQ,SAAS,CAAC,KAAK,UAAU;AAC9C,MAAI,QAAM,eAAe,MAAM,CAC7B,QAAO,QAAM,aAAa,OAAO;GAAE,GAAG,MAAM;GAAO;GAAO,CAAC;AAE7D,SAAO;GACP,CAEA,CACK;EAGlB"}
1
+ {"version":3,"file":"ToggleGroupRoot.js","names":[],"sources":["../../../src/components/toggle-group/ToggleGroupRoot.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n gap?: 0 | 1 | 2 | 3\n wrap?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst gapClassMap = {\n 0: 'gap-0.5',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3'\n}\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof StyledRoot> & RootType\n>(\n (\n {\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n },\n ref\n ) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <div\n className={cn(\n 'flex',\n hasGap && gapClassMap[gap],\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap ? 'flex-wrap' : 'flex-nowrap'\n )}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement[]\n }\n </div>\n </StyledRoot>\n )\n }\n)\n"],"mappings":";;;;AAaA,IAAa,aAAa,OAAO,YAAY,MAAM;CACjD,MAAM,CAAC,OAAO;CACd,UAAU;EACR,aAAa;GACX,MAAM;IACJ;IACA;IACA;GACF;GACA,OAAO,CAAC,QAAQ;EAClB;EACA,QAAQ;GACN,MAAM,CAAC,0CAA0C;GACjD,OAAO;IACL;IACA;IACA;IACA;GACF;EACF;EACA,WAAW;GACT,QAAQ,CAAC;GACT,KAAK,CAAC;EACR;EACA,OAAO;GACL,UAAU,CAAC;GACX,QAAQ,CAAC,aAAa;EACxB;CACF;CACA,kBAAkB;EAChB;GACE,QAAQ;GACR,WAAW;GACX,OAAO;GACP,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA;GACE,QAAQ;GACR,WAAW;GACX,OAAO;GACP,OAAO;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;EACF;EACA;GACE,QAAQ;GACR,OAAO;GACP,OAAO,CAAC;EACV;EACA;GACE,QAAQ;GACR,OAAO;GACP,OAAO;IACL;IACA;IACA;GACF;EACF;CACF;AACF,CAAC;AAED,IAAM,cAAc;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAEA,IAAM,0BAA0B,gBAC9B,gBAAgB,eAAe,QAAQ;AAEzC,IAAa,kBAAkB,QAAM,YAKjC,EACE,cAAc,cACd,KACA,aACA,UACA,QAAQ,YACR,MACA,GAAG,QAEL,QACG;CACH,MAAM,SAAS,OAAO,QAAQ;CAC9B,MAAM,YAAY,uBAAuB,WAAW;CAEpD,OACE,wBAAA,cAAC,YAAD;EACO;EACM;EACH;EACK;EACA;EACN;EACP,GAAI;CAmBM,GAjBV,wBAAA,cAAC,OAAD,EACE,WAAW,GACT,QACA,UAAU,YAAY,MACtB,gBAAgB,eAAe,aAAa,YAC5C,OAAO,cAAc,aACvB,EAUG,GAPD,QAAM,SAAS,QAAQ,QAAQ,EAAE,KAAK,UAAU;EAC9C,IAAI,QAAM,eAAe,KAAK,GAC5B,OAAO,QAAM,aAAa,OAAO;GAAE,GAAG,MAAM;GAAO;EAAM,CAAC;EAE5D,OAAO;CACT,CAAC,CAEA,CACK;AAEhB,CACF"}