@algolia/satellite 1.0.0-beta.147 → 1.0.0-beta.149

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 (417) hide show
  1. package/cjs/AnnouncementBadge/AnnouncementBadge.js +7 -24
  2. package/cjs/AnnouncementBadge/index.js +0 -5
  3. package/cjs/AutoComplete/AutoComplete.js +68 -163
  4. package/cjs/AutoComplete/AutoComplete.tailwind.js +2 -5
  5. package/cjs/AutoComplete/components/AutoCompleteEmptyState.js +5 -14
  6. package/cjs/AutoComplete/components/DefaultOptionItem.js +2 -11
  7. package/cjs/AutoComplete/index.js +0 -11
  8. package/cjs/AutoComplete/utils.js +0 -8
  9. package/cjs/Avatars/ApplicationAvatar.js +3 -13
  10. package/cjs/Avatars/UserAvatar.js +6 -20
  11. package/cjs/Avatars/index.js +0 -7
  12. package/cjs/Avatars/utils.js +6 -37
  13. package/cjs/Badge/Badge.js +13 -36
  14. package/cjs/Badge/index.js +0 -5
  15. package/cjs/Banners/Alert/Alert.js +18 -28
  16. package/cjs/Banners/Alert/index.js +0 -5
  17. package/cjs/Banners/BigBertha/BigBertha.js +5 -12
  18. package/cjs/Banners/BigBertha/index.js +0 -5
  19. package/cjs/Banners/Promote/Promote.js +8 -19
  20. package/cjs/Banners/Promote/index.js +0 -5
  21. package/cjs/Banners/index.js +0 -6
  22. package/cjs/Button/Button.js +14 -34
  23. package/cjs/Button/Button.tailwind.js +3 -5
  24. package/cjs/Button/ButtonGroup.js +3 -11
  25. package/cjs/Button/IconButton.js +13 -36
  26. package/cjs/Button/index.js +0 -11
  27. package/cjs/Button/styles.js +1 -10
  28. package/cjs/Button/types.js +0 -1
  29. package/cjs/Card/Card.js +6 -21
  30. package/cjs/Card/Card.tailwind.js +1 -2
  31. package/cjs/Card/components/CardHeader.js +1 -14
  32. package/cjs/Card/components/CardTitle.js +2 -15
  33. package/cjs/Card/index.js +0 -9
  34. package/cjs/Checkbox/Checkbox.js +14 -38
  35. package/cjs/Checkbox/Checkbox.tailwind.js +1 -3
  36. package/cjs/Checkbox/index.js +0 -5
  37. package/cjs/ClickAwayContainer/ClickAwayContainer.js +11 -23
  38. package/cjs/ClickAwayContainer/index.js +0 -2
  39. package/cjs/DatePicker/DatePicker/DatePicker.js +13 -46
  40. package/cjs/DatePicker/DatePicker/datePickerReducer.js +0 -15
  41. package/cjs/DatePicker/DatePicker/index.js +0 -7
  42. package/cjs/DatePicker/DatePicker.tailwind.js +2 -12
  43. package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +29 -72
  44. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -14
  45. package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +8 -32
  46. package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +0 -6
  47. package/cjs/DatePicker/DateRangePicker/index.js +0 -9
  48. package/cjs/DatePicker/components/Calendar.js +5 -16
  49. package/cjs/DatePicker/components/Display.js +3 -9
  50. package/cjs/DatePicker/components/Footer.js +0 -7
  51. package/cjs/DatePicker/components/FooterActions.js +3 -11
  52. package/cjs/DatePicker/components/Modal.js +17 -39
  53. package/cjs/DatePicker/components/NavBar.js +12 -34
  54. package/cjs/DatePicker/components/SidePanel.js +0 -7
  55. package/cjs/DatePicker/components/index.js +0 -7
  56. package/cjs/DatePicker/index.js +0 -9
  57. package/cjs/DatePicker/utils.js +0 -4
  58. package/cjs/Dropdown/Dropdown.js +23 -58
  59. package/cjs/Dropdown/DropdownButton.js +3 -20
  60. package/cjs/Dropdown/DropdownContext.d.ts +3 -3
  61. package/cjs/Dropdown/DropdownContext.js +0 -6
  62. package/cjs/Dropdown/components/DropdownButtonItem.js +6 -21
  63. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -25
  64. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -6
  65. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +3 -3
  66. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -6
  67. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -16
  68. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -15
  69. package/cjs/Dropdown/components/DropdownCollapsibleItem/index.js +0 -9
  70. package/cjs/Dropdown/components/DropdownDivider.js +0 -7
  71. package/cjs/Dropdown/components/DropdownFooterItem.js +2 -15
  72. package/cjs/Dropdown/components/DropdownLinkItem.js +7 -23
  73. package/cjs/Dropdown/components/DropdownRadioItem.js +5 -20
  74. package/cjs/Dropdown/components/DropdownTitle.js +1 -14
  75. package/cjs/Dropdown/components/DropdownToggleItem.js +6 -22
  76. package/cjs/Dropdown/index.js +0 -27
  77. package/cjs/Dropdown/useDropdownItemProps.js +1 -14
  78. package/cjs/Dropzone/Dropzone.js +27 -62
  79. package/cjs/Dropzone/index.js +0 -5
  80. package/cjs/EmptyState/EmptyState.js +12 -23
  81. package/cjs/EmptyState/EmptyState.tailwind.js +0 -1
  82. package/cjs/EmptyState/index.js +0 -7
  83. package/cjs/Field/Field.js +8 -21
  84. package/cjs/Field/FieldStateContext.js +0 -2
  85. package/cjs/Field/index.js +0 -9
  86. package/cjs/Field/useFieldState.js +0 -7
  87. package/cjs/Flag/Flag.js +17 -40
  88. package/cjs/Flag/Flag.tailwind.js +0 -1
  89. package/cjs/Flag/Flags.js +4 -19
  90. package/cjs/Flag/index.js +0 -9
  91. package/cjs/FlexGrid/FlexGrid.js +13 -24
  92. package/cjs/FlexGrid/FlexGrid.tailwind.js +4 -11
  93. package/cjs/FlexGrid/index.js +0 -5
  94. package/cjs/HelpUnderline/HelpUnderline.js +5 -14
  95. package/cjs/HelpUnderline/HelpUnderline.tailwind.js +1 -2
  96. package/cjs/HelpUnderline/index.js +0 -5
  97. package/cjs/Input/Input.d.ts +1 -0
  98. package/cjs/Input/Input.js +27 -70
  99. package/cjs/Input/Input.tailwind.js +1 -4
  100. package/cjs/Input/index.js +0 -5
  101. package/cjs/Insert/Insert.js +7 -17
  102. package/cjs/Insert/index.js +0 -5
  103. package/cjs/InstantSearch/InstantSearch.tailwind.js +4 -10
  104. package/cjs/KeyboardKey/KeyboardKey.js +1 -12
  105. package/cjs/KeyboardKey/KeyboardKey.tailwind.js +1 -2
  106. package/cjs/KeyboardKey/index.js +0 -2
  107. package/cjs/Link/BaseLink.js +2 -12
  108. package/cjs/Link/ButtonLink.js +3 -17
  109. package/cjs/Link/IconButtonLink.js +2 -13
  110. package/cjs/Link/Link.js +6 -23
  111. package/cjs/Link/index.js +0 -11
  112. package/cjs/Medallion/Medallion.js +5 -14
  113. package/cjs/Medallion/Medallion.tailwind.js +3 -6
  114. package/cjs/Medallion/index.js +0 -7
  115. package/cjs/Modal/Modal.js +21 -57
  116. package/cjs/Modal/Modal.tailwind.js +3 -3
  117. package/cjs/Modal/components/ModalFooter.js +2 -16
  118. package/cjs/Modal/components/ModalSection.js +3 -11
  119. package/cjs/Modal/index.js +0 -9
  120. package/cjs/Pagination/CompactPagination/CompactPagination.js +1 -22
  121. package/cjs/Pagination/CompactPagination/index.js +0 -5
  122. package/cjs/Pagination/DotPagination/DotPagination.js +5 -19
  123. package/cjs/Pagination/DotPagination/index.js +0 -5
  124. package/cjs/Pagination/Pagination/Pagination.js +9 -34
  125. package/cjs/Pagination/Pagination/index.js +0 -5
  126. package/cjs/Pagination/index.js +0 -9
  127. package/cjs/ProgressBar/ProgressBar.js +3 -16
  128. package/cjs/ProgressBar/ProgressBar.tailwind.js +1 -3
  129. package/cjs/ProgressBar/index.js +0 -5
  130. package/cjs/ProgressSpinner/ProgressSpinner.js +8 -20
  131. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +2 -3
  132. package/cjs/ProgressSpinner/index.js +0 -5
  133. package/cjs/RadioGroup/RadioButton.js +1 -14
  134. package/cjs/RadioGroup/RadioButton.tailwind.js +1 -4
  135. package/cjs/RadioGroup/RadioGroup.js +19 -38
  136. package/cjs/RadioGroup/RadiogroupContext.js +0 -6
  137. package/cjs/RadioGroup/index.js +0 -9
  138. package/cjs/RangeSlider/RangeSlider.js +26 -43
  139. package/cjs/RangeSlider/RangeSlider.tailwind.js +1 -3
  140. package/cjs/RangeSlider/index.js +0 -5
  141. package/cjs/Satellite/Satellite.js +4 -10
  142. package/cjs/Satellite/SatelliteContext.js +0 -9
  143. package/cjs/Satellite/SatelliteRouter.js +2 -9
  144. package/cjs/Satellite/index.js +0 -13
  145. package/cjs/Satellite/locale.js +1 -7
  146. package/cjs/Satellite/useCreatePortal.js +3 -8
  147. package/cjs/ScrollIndicator/ScrollIndicator.js +18 -41
  148. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +1 -3
  149. package/cjs/ScrollIndicator/index.js +0 -5
  150. package/cjs/Select/Select.js +4 -17
  151. package/cjs/Select/Select.tailwind.js +2 -5
  152. package/cjs/Select/index.js +0 -5
  153. package/cjs/Sidebar/Sidebar.js +11 -30
  154. package/cjs/Sidebar/SidebarButtonLink.js +10 -30
  155. package/cjs/Sidebar/SidebarContext.js +0 -6
  156. package/cjs/Sidebar/SidebarHeader.js +1 -9
  157. package/cjs/Sidebar/SidebarHeading.js +3 -14
  158. package/cjs/Sidebar/SidebarLink.js +5 -20
  159. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -11
  160. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -14
  161. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +10 -33
  162. package/cjs/Sidebar/SidebarLinksGroup/index.js +0 -2
  163. package/cjs/Sidebar/SidebarNav.js +5 -16
  164. package/cjs/Sidebar/index.js +0 -17
  165. package/cjs/Switch/Switch.js +15 -36
  166. package/cjs/Switch/Switch.tailwind.js +1 -2
  167. package/cjs/Switch/SwitchOption.js +2 -15
  168. package/cjs/Switch/index.js +0 -7
  169. package/cjs/Switch/utils.js +0 -9
  170. package/cjs/Tables/DataTable/DataTable.js +28 -70
  171. package/cjs/Tables/DataTable/DataTable.tailwind.js +2 -2
  172. package/cjs/Tables/DataTable/components/Body.js +14 -33
  173. package/cjs/Tables/DataTable/components/Footer.js +1 -17
  174. package/cjs/Tables/DataTable/components/Header.js +5 -12
  175. package/cjs/Tables/DataTable/components/HeaderCell.js +10 -27
  176. package/cjs/Tables/DataTable/components/Loader.js +4 -17
  177. package/cjs/Tables/DataTable/components/index.js +0 -10
  178. package/cjs/Tables/DataTable/index.js +0 -7
  179. package/cjs/Tables/DataTable/utils.js +0 -9
  180. package/cjs/Tables/Table/Table.js +7 -21
  181. package/cjs/Tables/Table/Table.tailwind.js +1 -2
  182. package/cjs/Tables/Table/components/TableFooter.js +2 -10
  183. package/cjs/Tables/Table/index.js +0 -7
  184. package/cjs/Tables/index.js +0 -7
  185. package/cjs/Tabs/ContentTabs.js +10 -21
  186. package/cjs/Tabs/LinkTabs.js +5 -18
  187. package/cjs/Tabs/Tabs.tailwind.js +1 -2
  188. package/cjs/Tabs/components/LinkTab.js +4 -29
  189. package/cjs/Tabs/index.js +0 -9
  190. package/cjs/Tabs/utils.js +0 -5
  191. package/cjs/Tag/Tag.js +7 -26
  192. package/cjs/Tag/Tag.tailwind.js +1 -2
  193. package/cjs/Tag/index.js +0 -5
  194. package/cjs/TextArea/TextArea.js +1 -14
  195. package/cjs/TextArea/TextArea.tailwind.js +1 -4
  196. package/cjs/TextArea/index.js +0 -5
  197. package/cjs/TextWrap/TextWrap.js +3 -18
  198. package/cjs/TextWrap/index.js +0 -5
  199. package/cjs/Toggle/Toggle.js +6 -27
  200. package/cjs/Toggle/Toggle.tailwind.js +1 -3
  201. package/cjs/Toggle/index.js +0 -5
  202. package/cjs/Tooltip/OverflowTooltipWrapper.js +33 -62
  203. package/cjs/Tooltip/Tooltip.js +4 -17
  204. package/cjs/Tooltip/Tooltip.tailwind.js +3 -5
  205. package/cjs/Tooltip/TooltipWrapper.js +45 -73
  206. package/cjs/Tooltip/index.js +0 -9
  207. package/cjs/Typography/Typography.tailwind.js +12 -18
  208. package/cjs/UserContent/UserContent.js +3 -11
  209. package/cjs/UserContent/UserContent.tailwind.js +2 -11
  210. package/cjs/index.js +0 -89
  211. package/cjs/styles/base.tailwind.js +7 -7
  212. package/cjs/styles/colors.js +7 -7
  213. package/cjs/styles/disabledColor.js +1 -4
  214. package/cjs/styles/helpers/icons.js +5 -11
  215. package/cjs/styles/helpers/makePurgeCssExtractor.js +3 -15
  216. package/cjs/styles/helpers/makeTailwindPrefixer.js +1 -9
  217. package/cjs/styles/helpers/prefixTailwindClassName.js +6 -6
  218. package/cjs/styles/helpers/satellitePrefixer.js +1 -2
  219. package/cjs/styles/rgba.js +1 -3
  220. package/cjs/styles/tailwind.config.js +4 -11
  221. package/cjs/styles/zIndexes.js +1 -0
  222. package/cjs/utilities/utilities.tailwind.js +0 -3
  223. package/cjs/utils/event-polyfill.js +0 -2
  224. package/cjs/utils/formatters.js +12 -19
  225. package/cjs/utils/genericChangeHandler.js +0 -6
  226. package/cjs/utils/hashCode.js +0 -5
  227. package/cjs/utils/index.js +0 -7
  228. package/cjs/utils/isCssPropertySupported.js +0 -3
  229. package/cjs/utils/isNil.js +0 -2
  230. package/cjs/utils/isRenderedChild.js +0 -2
  231. package/cjs/utils/matchLocation.js +0 -4
  232. package/cjs/utils/onlyText.js +3 -12
  233. package/cjs/utils/parseUrl.js +2 -4
  234. package/cjs/utils/pluralize.js +2 -7
  235. package/cjs/utils/range.js +0 -2
  236. package/cjs/utils/toSentenceCase.js +0 -4
  237. package/cjs/utils/uniqBy.js +0 -4
  238. package/cjs/utils/uniqueId.js +0 -2
  239. package/cjs/utils/useForwardedRef.js +0 -6
  240. package/cjs/utils/useLinkProps.js +1 -13
  241. package/cjs/utils/useTriggerInputChange.js +2 -4
  242. package/esm/AnnouncementBadge/AnnouncementBadge.js +7 -14
  243. package/esm/AutoComplete/AutoComplete.js +68 -158
  244. package/esm/AutoComplete/AutoComplete.tailwind.js +2 -2
  245. package/esm/AutoComplete/components/AutoCompleteEmptyState.js +5 -7
  246. package/esm/AutoComplete/components/DefaultOptionItem.js +2 -8
  247. package/esm/AutoComplete/utils.js +0 -2
  248. package/esm/Avatars/ApplicationAvatar.js +3 -6
  249. package/esm/Avatars/UserAvatar.js +6 -12
  250. package/esm/Avatars/utils.js +7 -23
  251. package/esm/Badge/Badge.js +13 -28
  252. package/esm/Banners/Alert/Alert.js +18 -20
  253. package/esm/Banners/BigBertha/BigBertha.js +5 -7
  254. package/esm/Banners/Promote/Promote.js +8 -10
  255. package/esm/Button/Button.js +14 -22
  256. package/esm/Button/Button.tailwind.js +3 -2
  257. package/esm/Button/ButtonGroup.js +3 -6
  258. package/esm/Button/IconButton.js +13 -23
  259. package/esm/Button/styles.js +1 -5
  260. package/esm/Card/Card.js +6 -12
  261. package/esm/Card/Card.tailwind.js +1 -1
  262. package/esm/Card/components/CardHeader.js +1 -7
  263. package/esm/Card/components/CardTitle.js +2 -8
  264. package/esm/Checkbox/Checkbox.js +14 -28
  265. package/esm/Checkbox/Checkbox.tailwind.js +1 -1
  266. package/esm/ClickAwayContainer/ClickAwayContainer.js +11 -13
  267. package/esm/DatePicker/DatePicker/DatePicker.js +13 -31
  268. package/esm/DatePicker/DatePicker/datePickerReducer.js +0 -9
  269. package/esm/DatePicker/DatePicker.tailwind.js +2 -9
  270. package/esm/DatePicker/DateRangePicker/DateRangePicker.js +29 -55
  271. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -8
  272. package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +8 -20
  273. package/esm/DatePicker/components/Calendar.js +5 -10
  274. package/esm/DatePicker/components/Display.js +3 -5
  275. package/esm/DatePicker/components/Footer.js +0 -4
  276. package/esm/DatePicker/components/FooterActions.js +3 -7
  277. package/esm/DatePicker/components/Modal.js +17 -27
  278. package/esm/DatePicker/components/NavBar.js +12 -22
  279. package/esm/DatePicker/components/SidePanel.js +0 -4
  280. package/esm/Dropdown/Dropdown.js +23 -34
  281. package/esm/Dropdown/DropdownButton.js +3 -11
  282. package/esm/Dropdown/DropdownContext.d.ts +3 -3
  283. package/esm/Dropdown/DropdownContext.js +0 -2
  284. package/esm/Dropdown/components/DropdownButtonItem.js +6 -12
  285. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -15
  286. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -2
  287. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +3 -3
  288. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -2
  289. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
  290. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
  291. package/esm/Dropdown/components/DropdownDivider.js +0 -2
  292. package/esm/Dropdown/components/DropdownFooterItem.js +2 -8
  293. package/esm/Dropdown/components/DropdownLinkItem.js +7 -13
  294. package/esm/Dropdown/components/DropdownRadioItem.js +5 -11
  295. package/esm/Dropdown/components/DropdownTitle.js +1 -7
  296. package/esm/Dropdown/components/DropdownToggleItem.js +6 -12
  297. package/esm/Dropdown/useDropdownItemProps.js +1 -7
  298. package/esm/Dropzone/Dropzone.js +27 -45
  299. package/esm/EmptyState/EmptyState.js +12 -16
  300. package/esm/Field/Field.js +8 -11
  301. package/esm/Flag/Flag.js +17 -25
  302. package/esm/Flag/Flags.js +4 -9
  303. package/esm/FlexGrid/FlexGrid.js +13 -15
  304. package/esm/FlexGrid/FlexGrid.tailwind.js +4 -9
  305. package/esm/HelpUnderline/HelpUnderline.js +5 -7
  306. package/esm/HelpUnderline/HelpUnderline.tailwind.js +1 -1
  307. package/esm/Input/Input.d.ts +1 -0
  308. package/esm/Input/Input.js +27 -54
  309. package/esm/Input/Input.tailwind.js +1 -1
  310. package/esm/Insert/Insert.js +7 -11
  311. package/esm/InstantSearch/InstantSearch.tailwind.js +4 -4
  312. package/esm/KeyboardKey/KeyboardKey.js +1 -3
  313. package/esm/KeyboardKey/KeyboardKey.tailwind.js +1 -1
  314. package/esm/Link/BaseLink.js +2 -6
  315. package/esm/Link/ButtonLink.js +3 -9
  316. package/esm/Link/IconButtonLink.js +2 -6
  317. package/esm/Link/Link.js +6 -14
  318. package/esm/Medallion/Medallion.js +5 -7
  319. package/esm/Medallion/Medallion.tailwind.js +3 -2
  320. package/esm/Modal/Modal.js +21 -38
  321. package/esm/Modal/Modal.tailwind.js +3 -2
  322. package/esm/Modal/components/ModalFooter.js +2 -8
  323. package/esm/Modal/components/ModalSection.js +3 -5
  324. package/esm/Pagination/CompactPagination/CompactPagination.js +1 -9
  325. package/esm/Pagination/DotPagination/DotPagination.js +5 -11
  326. package/esm/Pagination/Pagination/Pagination.js +9 -21
  327. package/esm/ProgressBar/ProgressBar.js +3 -10
  328. package/esm/ProgressBar/ProgressBar.tailwind.js +1 -1
  329. package/esm/ProgressSpinner/ProgressSpinner.js +8 -12
  330. package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +2 -2
  331. package/esm/RadioGroup/RadioButton.js +1 -7
  332. package/esm/RadioGroup/RadioButton.tailwind.js +1 -1
  333. package/esm/RadioGroup/RadioGroup.js +19 -25
  334. package/esm/RadioGroup/RadiogroupContext.js +0 -2
  335. package/esm/RangeSlider/RangeSlider.js +26 -35
  336. package/esm/RangeSlider/RangeSlider.tailwind.js +1 -1
  337. package/esm/Satellite/Satellite.js +4 -4
  338. package/esm/Satellite/SatelliteContext.js +0 -3
  339. package/esm/Satellite/SatelliteRouter.js +2 -4
  340. package/esm/Satellite/locale.js +1 -2
  341. package/esm/Satellite/useCreatePortal.js +3 -2
  342. package/esm/ScrollIndicator/ScrollIndicator.js +18 -31
  343. package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +1 -1
  344. package/esm/Select/Select.js +4 -9
  345. package/esm/Select/Select.tailwind.js +2 -2
  346. package/esm/Sidebar/Sidebar.js +11 -17
  347. package/esm/Sidebar/SidebarButtonLink.js +10 -20
  348. package/esm/Sidebar/SidebarContext.js +0 -2
  349. package/esm/Sidebar/SidebarHeader.js +1 -3
  350. package/esm/Sidebar/SidebarHeading.js +3 -7
  351. package/esm/Sidebar/SidebarLink.js +5 -11
  352. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -4
  353. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -7
  354. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +9 -19
  355. package/esm/Sidebar/SidebarNav.js +5 -9
  356. package/esm/Switch/Switch.js +15 -24
  357. package/esm/Switch/Switch.tailwind.js +1 -1
  358. package/esm/Switch/SwitchOption.js +2 -6
  359. package/esm/Tables/DataTable/DataTable.js +28 -49
  360. package/esm/Tables/DataTable/DataTable.tailwind.js +2 -1
  361. package/esm/Tables/DataTable/components/Body.js +14 -23
  362. package/esm/Tables/DataTable/components/Footer.js +1 -8
  363. package/esm/Tables/DataTable/components/Header.js +5 -6
  364. package/esm/Tables/DataTable/components/HeaderCell.js +10 -17
  365. package/esm/Tables/DataTable/components/Loader.js +4 -8
  366. package/esm/Tables/DataTable/utils.js +0 -1
  367. package/esm/Tables/Table/Table.js +7 -14
  368. package/esm/Tables/Table/Table.tailwind.js +1 -1
  369. package/esm/Tables/Table/components/TableFooter.js +2 -4
  370. package/esm/Tabs/ContentTabs.js +10 -12
  371. package/esm/Tabs/LinkTabs.js +5 -7
  372. package/esm/Tabs/Tabs.tailwind.js +1 -1
  373. package/esm/Tabs/components/LinkTab.js +4 -20
  374. package/esm/Tabs/utils.js +0 -2
  375. package/esm/Tag/Tag.js +7 -16
  376. package/esm/Tag/Tag.tailwind.js +1 -1
  377. package/esm/TextArea/TextArea.js +1 -7
  378. package/esm/TextArea/TextArea.tailwind.js +1 -1
  379. package/esm/TextWrap/TextWrap.js +3 -11
  380. package/esm/Toggle/Toggle.js +6 -19
  381. package/esm/Toggle/Toggle.tailwind.js +1 -1
  382. package/esm/Tooltip/OverflowTooltipWrapper.js +33 -46
  383. package/esm/Tooltip/Tooltip.js +4 -9
  384. package/esm/Tooltip/Tooltip.tailwind.js +3 -4
  385. package/esm/Tooltip/TooltipWrapper.js +44 -57
  386. package/esm/Typography/Typography.tailwind.js +12 -15
  387. package/esm/UserContent/UserContent.js +3 -5
  388. package/esm/UserContent/UserContent.tailwind.js +2 -7
  389. package/esm/styles/base.tailwind.js +7 -6
  390. package/esm/styles/colors.js +7 -7
  391. package/esm/styles/disabledColor.js +1 -2
  392. package/esm/styles/helpers/icons.js +5 -8
  393. package/esm/styles/helpers/makePurgeCssExtractor.js +3 -14
  394. package/esm/styles/helpers/makeTailwindPrefixer.js +1 -6
  395. package/esm/styles/helpers/prefixTailwindClassName.js +6 -6
  396. package/esm/styles/helpers/satellitePrefixer.js +1 -1
  397. package/esm/styles/rgba.js +1 -2
  398. package/esm/styles/tailwind.config.js +4 -6
  399. package/esm/styles/zIndexes.js +1 -0
  400. package/esm/utils/event-polyfill.js +0 -2
  401. package/esm/utils/formatters.js +12 -16
  402. package/esm/utils/genericChangeHandler.js +0 -2
  403. package/esm/utils/hashCode.js +0 -3
  404. package/esm/utils/isCssPropertySupported.js +0 -2
  405. package/esm/utils/isRenderedChild.js +0 -1
  406. package/esm/utils/matchLocation.js +0 -2
  407. package/esm/utils/onlyText.js +3 -11
  408. package/esm/utils/parseUrl.js +2 -2
  409. package/esm/utils/pluralize.js +2 -5
  410. package/esm/utils/toSentenceCase.js +1 -1
  411. package/esm/utils/uniqBy.js +0 -2
  412. package/esm/utils/useForwardedRef.js +0 -3
  413. package/esm/utils/useLinkProps.js +1 -7
  414. package/esm/utils/useTriggerInputChange.js +2 -3
  415. package/package.json +2 -2
  416. package/satellite.min.css +1 -1
  417. package/scss/colors.scss +16 -16
@@ -1,13 +1,9 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
-
5
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
6
-
7
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
-
9
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
-
11
7
  import cx from "clsx";
12
8
  import { useEffect, useMemo, useRef, useState } from "react";
13
9
  import { X } from "react-feather";
@@ -26,11 +22,9 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
26
22
  var DEFAULT_MODAL_LOCALE = {
27
23
  dismissText: "Dismiss"
28
24
  };
29
-
30
25
  var ModalAnimation = function ModalAnimation(props) {
31
26
  return (
32
27
  /*#__PURE__*/
33
-
34
28
  /* eslint-disable-next-line @algolia/satellite/invalid-classnames */
35
29
  _jsx(CSSTransition, _objectSpread(_objectSpread({}, props), {}, {
36
30
  classNames: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["satellite-modal"]))),
@@ -40,46 +34,41 @@ var ModalAnimation = function ModalAnimation(props) {
40
34
  }))
41
35
  );
42
36
  };
43
-
44
37
  var ModalNoAnimation = function ModalNoAnimation(props) {
45
38
  return props["in"] ? /*#__PURE__*/_jsx(_Fragment, {
46
39
  children: props.children
47
40
  }) : null;
48
41
  };
49
-
50
42
  var SIZE_CLASSNAMES = {
51
43
  medium: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["modal-dialog-medium"]))),
52
44
  large: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["modal-dialog-large"])))
53
45
  };
54
46
  export var Modal = function Modal(_ref) {
55
47
  var title = _ref.title,
56
- className = _ref.className,
57
- children = _ref.children,
58
- _ref$open = _ref.open,
59
- open = _ref$open === void 0 ? true : _ref$open,
60
- _ref$fullBleed = _ref.fullBleed,
61
- fullBleed = _ref$fullBleed === void 0 ? false : _ref$fullBleed,
62
- _ref$onDismiss = _ref.onDismiss,
63
- onDismiss = _ref$onDismiss === void 0 ? function () {} : _ref$onDismiss,
64
- _ref$animate = _ref.animate,
65
- animate = _ref$animate === void 0 ? true : _ref$animate,
66
- _ref$hideCloseIcon = _ref.hideCloseIcon,
67
- hideCloseIcon = _ref$hideCloseIcon === void 0 ? false : _ref$hideCloseIcon,
68
- _ref$size = _ref.size,
69
- size = _ref$size === void 0 ? "medium" : _ref$size,
70
- _ref$centerY = _ref.centerY,
71
- centerY = _ref$centerY === void 0 ? false : _ref$centerY,
72
- propsLocale = _ref.locale;
48
+ className = _ref.className,
49
+ children = _ref.children,
50
+ _ref$open = _ref.open,
51
+ open = _ref$open === void 0 ? true : _ref$open,
52
+ _ref$fullBleed = _ref.fullBleed,
53
+ fullBleed = _ref$fullBleed === void 0 ? false : _ref$fullBleed,
54
+ _ref$onDismiss = _ref.onDismiss,
55
+ onDismiss = _ref$onDismiss === void 0 ? function () {} : _ref$onDismiss,
56
+ _ref$animate = _ref.animate,
57
+ animate = _ref$animate === void 0 ? true : _ref$animate,
58
+ _ref$hideCloseIcon = _ref.hideCloseIcon,
59
+ hideCloseIcon = _ref$hideCloseIcon === void 0 ? false : _ref$hideCloseIcon,
60
+ _ref$size = _ref.size,
61
+ size = _ref$size === void 0 ? "medium" : _ref$size,
62
+ _ref$centerY = _ref.centerY,
63
+ centerY = _ref$centerY === void 0 ? false : _ref$centerY,
64
+ propsLocale = _ref.locale;
73
65
  var createPortal = useCreatePortal();
74
66
  var contextLocale = useLocale("modal");
75
-
76
67
  var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_MODAL_LOCALE), contextLocale), propsLocale);
77
-
78
68
  var _useState = useState(null),
79
- _useState2 = _slicedToArray(_useState, 2),
80
- modalWrapperRef = _useState2[0],
81
- setModalWrapperRef = _useState2[1];
82
-
69
+ _useState2 = _slicedToArray(_useState, 2),
70
+ modalWrapperRef = _useState2[0],
71
+ setModalWrapperRef = _useState2[1];
83
72
  var dialogRef = useRef(null);
84
73
  var mouseDownTargetRef = useRef(null);
85
74
  var ModalContainer = animate ? ModalAnimation : ModalNoAnimation;
@@ -92,24 +81,20 @@ export var Modal = function Modal(_ref) {
92
81
  });
93
82
  useEffect(function () {
94
83
  if (!modalWrapperRef) return;
95
-
96
84
  var onMouseUp = function onMouseUp(evt) {
97
85
  if (evt.target === mouseDownTargetRef.current && dialogRef.current && !dialogRef.current.contains(evt.target)) {
98
86
  onDismiss();
99
87
  }
100
-
101
88
  mouseDownTargetRef.current = null;
102
89
  };
103
-
104
90
  var onMouseDown = function onMouseDown(evt) {
105
91
  return mouseDownTargetRef.current = evt.target;
106
92
  };
93
+
107
94
  /**
108
95
  * We use native event handlers to avoid React event bubbling behaviour with element rendered in a portal.
109
96
  * (otherwise, the modal gets dismissed when clicking on an AutoComplete menu item)
110
97
  */
111
-
112
-
113
98
  modalWrapperRef.addEventListener("mouseup", onMouseUp);
114
99
  modalWrapperRef.addEventListener("mousedown", onMouseDown);
115
100
  return function () {
@@ -117,7 +102,6 @@ export var Modal = function Modal(_ref) {
117
102
  modalWrapperRef.removeEventListener("mousedown", onMouseDown);
118
103
  };
119
104
  }, [modalWrapperRef, onDismiss]);
120
-
121
105
  var modalAccessibilityProps = _objectSpread({
122
106
  role: "dialog"
123
107
  }, title ? {
@@ -125,7 +109,6 @@ export var Modal = function Modal(_ref) {
125
109
  } : {
126
110
  "aria-label": "Modal"
127
111
  });
128
-
129
112
  return createPortal( /*#__PURE__*/_jsx(ModalContainer, {
130
113
  "in": open,
131
114
  children: /*#__PURE__*/_jsxs("div", {
@@ -3,7 +3,7 @@ import _plugin from "tailwindcss/plugin";
3
3
  var plugin = _plugin;
4
4
  var modalPlugin = plugin(function (_ref) {
5
5
  var addComponents = _ref.addComponents,
6
- theme = _ref.theme;
6
+ theme = _ref.theme;
7
7
  var transitionEasing = "cubic-bezier(0.6, -0.28, 0.735, 0.045)";
8
8
  var transitionDuration = 200;
9
9
  addComponents({
@@ -17,8 +17,9 @@ var modalPlugin = plugin(function (_ref) {
17
17
  ".modal-dialog-large": {
18
18
  maxWidth: "920px"
19
19
  }
20
- }); // Animation
20
+ });
21
21
 
22
+ // Animation
22
23
  addComponents({
23
24
  ".satellite-modal-appear .modal-container, .satellite-modal-enter .modal-container": {
24
25
  opacity: "0.1",
@@ -1,24 +1,18 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
-
5
4
  var _templateObject;
6
-
7
5
  var _excluded = ["className", "children"];
8
-
9
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
-
11
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
-
13
8
  import cx from "clsx";
14
9
  import FlexGrid from "../../FlexGrid";
15
10
  import stl from "../../styles/helpers/satellitePrefixer";
16
11
  import { jsx as _jsx } from "react/jsx-runtime";
17
12
  export var ModalFooter = function ModalFooter(_ref) {
18
13
  var className = _ref.className,
19
- children = _ref.children,
20
- props = _objectWithoutProperties(_ref, _excluded);
21
-
14
+ children = _ref.children,
15
+ props = _objectWithoutProperties(_ref, _excluded);
22
16
  return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
23
17
  className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["mt-8"]))), className),
24
18
  children: /*#__PURE__*/_jsx(FlexGrid, {
@@ -1,15 +1,13 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import cx from "clsx";
6
4
  import stl from "../../styles/helpers/satellitePrefixer";
7
5
  import { jsx as _jsx } from "react/jsx-runtime";
8
6
  export var ModalSection = function ModalSection(_ref) {
9
7
  var children = _ref.children,
10
- className = _ref.className,
11
- _ref$fullBleed = _ref.fullBleed,
12
- fullBleed = _ref$fullBleed === void 0 ? false : _ref$fullBleed;
8
+ className = _ref.className,
9
+ _ref$fullBleed = _ref.fullBleed,
10
+ fullBleed = _ref$fullBleed === void 0 ? false : _ref$fullBleed;
13
11
  return /*#__PURE__*/_jsx("section", {
14
12
  className: cx(fullBleed && stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["-mx-10"]))), className),
15
13
  children: children
@@ -1,12 +1,8 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
-
4
3
  var _templateObject, _templateObject2;
5
-
6
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
-
8
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
-
10
6
  import { ArrowLeft, ArrowRight, ChevronsLeft, ChevronsRight } from "react-feather";
11
7
  import { IconButton } from "../../Button";
12
8
  import { useLocale } from "../../Satellite";
@@ -22,25 +18,21 @@ var DEFAULT_COMPACT_PAGINATION_LOCALE = {
22
18
  return typeof nbPages === "number" ? "Page ".concat(page, " of ").concat(nbPages) : "Page ".concat(page, " of many");
23
19
  }
24
20
  };
25
-
26
21
  /** @ignore */
27
22
  export var isDeterminateCompactPaginationProps = function isDeterminateCompactPaginationProps(props) {
28
23
  return "nbPages" in props;
29
24
  };
30
- /** @ignore */
31
25
 
26
+ /** @ignore */
32
27
  export var isIndeterminateCompactPaginationProps = function isIndeterminateCompactPaginationProps(props) {
33
28
  return !isDeterminateCompactPaginationProps(props);
34
29
  };
35
30
  export var CompactPagination = function CompactPagination(props) {
36
31
  var _props$label;
37
-
38
32
  var contextLocale = useLocale("compactPagination");
39
-
40
33
  var locale = _objectSpread(_objectSpread({}, DEFAULT_COMPACT_PAGINATION_LOCALE), {}, {
41
34
  contextLocale: contextLocale
42
35
  }, props.locale);
43
-
44
36
  var labelType = (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : isDeterminateCompactPaginationProps(props) ? "complete" : "compact";
45
37
  var label = labelType === "none" ? null : labelType === "compact" ? "".concat(props.currentPage) : isDeterminateCompactPaginationProps(props) ? locale.label(props.currentPage, props.nbPages) : locale.label(props.currentPage);
46
38
  var isFirstPage = props.currentPage === 1;
@@ -1,12 +1,8 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
-
4
3
  var _templateObject, _templateObject2;
5
-
6
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
-
8
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
-
10
6
  import { useLocale } from "../../Satellite";
11
7
  import stl from "../../styles/helpers/satellitePrefixer";
12
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -17,15 +13,13 @@ var DEFAULT_DOT_PAGINATION_LOCALE = {
17
13
  };
18
14
  export var DotPagination = function DotPagination(_ref) {
19
15
  var currentPage = _ref.currentPage,
20
- onChange = _ref.onChange,
21
- nbPages = _ref.nbPages,
22
- _ref$size = _ref.size,
23
- size = _ref$size === void 0 ? "medium" : _ref$size,
24
- propsLocale = _ref.locale;
16
+ onChange = _ref.onChange,
17
+ nbPages = _ref.nbPages,
18
+ _ref$size = _ref.size,
19
+ size = _ref$size === void 0 ? "medium" : _ref$size,
20
+ propsLocale = _ref.locale;
25
21
  var contextLocale = useLocale("dotPagination");
26
-
27
22
  var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_DOT_PAGINATION_LOCALE), contextLocale), propsLocale);
28
-
29
23
  return /*#__PURE__*/_jsx("ul", {
30
24
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex"]))),
31
25
  children: new Array(nbPages).fill(undefined).map(function (_, idx) {
@@ -1,12 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
-
4
3
  var _templateObject;
5
-
6
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
-
8
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
-
10
6
  import { ArrowLeft, ArrowRight } from "react-feather";
11
7
  import Button, { ButtonGroup } from "../../Button";
12
8
  import { useLocale } from "../../Satellite";
@@ -23,7 +19,6 @@ var DEFAULT_PAGINATION_LOCALE = {
23
19
  goToNextPage: "Go to next page"
24
20
  };
25
21
  var DEFAULT_MAX_BUTTONS = 10;
26
-
27
22
  var Ellipsis = function Ellipsis() {
28
23
  return /*#__PURE__*/_jsx(Button, {
29
24
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["pointer-events-none"]))),
@@ -32,12 +27,11 @@ var Ellipsis = function Ellipsis() {
32
27
  children: "\u2026"
33
28
  });
34
29
  };
35
-
36
30
  var Group = function Group(_ref) {
37
31
  var group = _ref.group,
38
- currentPage = _ref.currentPage,
39
- onChange = _ref.onChange,
40
- goToPage = _ref.goToPage;
32
+ currentPage = _ref.currentPage,
33
+ onChange = _ref.onChange,
34
+ goToPage = _ref.goToPage;
41
35
  return /*#__PURE__*/_jsx(_Fragment, {
42
36
  children: group.map(function (index) {
43
37
  return /*#__PURE__*/_jsx(Button, {
@@ -51,6 +45,7 @@ var Group = function Group(_ref) {
51
45
  })
52
46
  });
53
47
  };
48
+
54
49
  /**
55
50
  * Use pagination to help our users to move through an ordered collection of items.
56
51
  *
@@ -58,33 +53,26 @@ var Group = function Group(_ref) {
58
53
  * - Don't use on list with less than 20 items
59
54
  * - Place the pagination at the bottom of the split item
60
55
  */
61
-
62
-
63
56
  export var Pagination = function Pagination(_ref2) {
64
57
  var currentPage = _ref2.currentPage,
65
- nbPages = _ref2.nbPages,
66
- onChange = _ref2.onChange,
67
- _ref2$maxButtons = _ref2.maxButtons,
68
- maxButtonsParam = _ref2$maxButtons === void 0 ? DEFAULT_MAX_BUTTONS : _ref2$maxButtons,
69
- propsLocale = _ref2.locale;
58
+ nbPages = _ref2.nbPages,
59
+ onChange = _ref2.onChange,
60
+ _ref2$maxButtons = _ref2.maxButtons,
61
+ maxButtonsParam = _ref2$maxButtons === void 0 ? DEFAULT_MAX_BUTTONS : _ref2$maxButtons,
62
+ propsLocale = _ref2.locale;
70
63
  var contextLocale = useLocale("pagination");
71
-
72
64
  var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_PAGINATION_LOCALE), contextLocale), propsLocale);
73
-
74
65
  var padding = Math.floor((Math.min(nbPages, maxButtonsParam) - 1) / 2);
75
66
  var maxButtons = 2 * padding + 1;
76
67
  var currentPageGroupStart = Math.max(1, Math.min(currentPage - padding, nbPages - maxButtons));
77
68
  var currentPageGroupEnd = Math.min(currentPageGroupStart + maxButtons, nbPages);
78
69
  var groups = [[], range(currentPageGroupStart, currentPageGroupEnd + 1), []];
79
-
80
70
  if (currentPageGroupStart > 1) {
81
71
  groups[0].push(1);
82
72
  }
83
-
84
73
  if (currentPageGroupEnd < nbPages) {
85
74
  groups[2].push(nbPages);
86
75
  }
87
-
88
76
  return /*#__PURE__*/_jsxs(ButtonGroup, {
89
77
  as: "nav",
90
78
  children: [/*#__PURE__*/_jsx(Button, {
@@ -1,19 +1,13 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
-
5
4
  var _templateObject, _templateObject2;
6
-
7
5
  var _excluded = ["value", "className", "barClassName"];
8
-
9
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
-
11
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
-
13
8
  import cx from "clsx";
14
9
  import stl from "../styles/helpers/satellitePrefixer";
15
10
  import { jsx as _jsx } from "react/jsx-runtime";
16
-
17
11
  /**
18
12
  * Progress bars visually represent the completion of a task or operation.
19
13
  *
@@ -22,10 +16,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
22
16
  */
23
17
  export var ProgressBar = function ProgressBar(_ref) {
24
18
  var value = _ref.value,
25
- className = _ref.className,
26
- barClassName = _ref.barClassName,
27
- props = _objectWithoutProperties(_ref, _excluded);
28
-
19
+ className = _ref.className,
20
+ barClassName = _ref.barClassName,
21
+ props = _objectWithoutProperties(_ref, _excluded);
29
22
  return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
30
23
  className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["progress-bar"]))), className),
31
24
  role: "progressbar",
@@ -5,7 +5,7 @@ var plugin = _plugin;
5
5
  var rgba = _rgba;
6
6
  var progressBarPlugin = plugin(function (_ref) {
7
7
  var addComponents = _ref.addComponents,
8
- theme = _ref.theme;
8
+ theme = _ref.theme;
9
9
  addComponents({
10
10
  ".progress-bar": {
11
11
  height: "4px",
@@ -2,13 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
4
  var _excluded = ["className", "size", "thickness", "align"];
5
-
6
5
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
7
-
8
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
-
10
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
-
12
8
  import cx from "clsx";
13
9
  import stl from "../styles/helpers/satellitePrefixer";
14
10
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -17,17 +13,17 @@ var ALIGN_CLASSNAMES = {
17
13
  left: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["mr-auto"]))),
18
14
  center: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["m-auto"]))),
19
15
  right: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["ml-auto"])))
20
- }; // Took heavy inspiration from https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/CircularProgress/CircularProgress.js
16
+ };
21
17
 
18
+ // Took heavy inspiration from https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/CircularProgress/CircularProgress.js
22
19
  export var ProgressSpinner = function ProgressSpinner(_ref) {
23
20
  var className = _ref.className,
24
- _ref$size = _ref.size,
25
- size = _ref$size === void 0 ? 24 : _ref$size,
26
- _ref$thickness = _ref.thickness,
27
- thickness = _ref$thickness === void 0 ? 2 : _ref$thickness,
28
- align = _ref.align,
29
- svgProps = _objectWithoutProperties(_ref, _excluded);
30
-
21
+ _ref$size = _ref.size,
22
+ size = _ref$size === void 0 ? 24 : _ref$size,
23
+ _ref$thickness = _ref.thickness,
24
+ thickness = _ref$thickness === void 0 ? 2 : _ref$thickness,
25
+ align = _ref.align,
26
+ svgProps = _objectWithoutProperties(_ref, _excluded);
31
27
  return /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread({}, svgProps), {}, {
32
28
  className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["progress-spinner"]))), align && ALIGN_CLASSNAMES[align], className),
33
29
  viewBox: "".concat(size / 2, " ").concat(size / 2, " ").concat(size, " ").concat(size),
@@ -3,11 +3,11 @@ import _plugin from "tailwindcss/plugin";
3
3
  var plugin = _plugin;
4
4
  var progressSpinnerPlugin = plugin(function (_ref) {
5
5
  var addComponents = _ref.addComponents,
6
- theme = _ref.theme;
7
-
6
+ theme = _ref.theme;
8
7
  /**
9
8
  * @param {string} color
10
9
  */
10
+
11
11
  addComponents({
12
12
  ".progress-spinner": {
13
13
  color: theme("colors.accent.600"),
@@ -1,23 +1,17 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
-
5
4
  var _templateObject;
6
-
7
5
  var _excluded = ["className"];
8
-
9
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
-
11
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
-
13
8
  import cx from "clsx";
14
9
  import { forwardRef } from "react";
15
10
  import stl from "../styles/helpers/satellitePrefixer";
16
11
  import { jsx as _jsx } from "react/jsx-runtime";
17
12
  export var RadioButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
13
  var className = _ref.className,
19
- props = _objectWithoutProperties(_ref, _excluded);
20
-
14
+ props = _objectWithoutProperties(_ref, _excluded);
21
15
  return /*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({}, props), {}, {
22
16
  className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["radio-button"]))), className),
23
17
  type: "radio",
@@ -7,7 +7,7 @@ var disabledColor = _disabledColor;
7
7
  var rgba = _rgba;
8
8
  var radioButtonPlugin = plugin(function (_ref) {
9
9
  var addComponents = _ref.addComponents,
10
- theme = _ref.theme;
10
+ theme = _ref.theme;
11
11
  addComponents({
12
12
  ".radio-button": {
13
13
  position: "relative",
@@ -1,8 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
-
4
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
5
-
6
4
  import { useState } from "react";
7
5
  import Card from "../Card";
8
6
  import stl from "../styles/helpers/satellitePrefixer";
@@ -13,17 +11,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
12
  export var RadioGroupItem = function RadioGroupItem(_ref) {
15
13
  var value = _ref.value,
16
- disabled = _ref.disabled,
17
- children = _ref.children;
18
-
14
+ disabled = _ref.disabled,
15
+ children = _ref.children;
19
16
  var _useRadioGroupContext = useRadioGroupContext(),
20
- name = _useRadioGroupContext.name,
21
- contextDisabled = _useRadioGroupContext.disabled,
22
- _onChange = _useRadioGroupContext.onChange,
23
- contextValue = _useRadioGroupContext.value,
24
- _useRadioGroupContext2 = _useRadioGroupContext.textPosition,
25
- textPosition = _useRadioGroupContext2 === void 0 ? "left" : _useRadioGroupContext2;
26
-
17
+ name = _useRadioGroupContext.name,
18
+ contextDisabled = _useRadioGroupContext.disabled,
19
+ _onChange = _useRadioGroupContext.onChange,
20
+ contextValue = _useRadioGroupContext.value,
21
+ _useRadioGroupContext2 = _useRadioGroupContext.textPosition,
22
+ textPosition = _useRadioGroupContext2 === void 0 ? "left" : _useRadioGroupContext2;
27
23
  var checked = value === contextValue;
28
24
  disabled = contextDisabled || disabled;
29
25
  return /*#__PURE__*/_jsxs("label", {
@@ -45,6 +41,7 @@ export var RadioGroupItem = function RadioGroupItem(_ref) {
45
41
  })]
46
42
  });
47
43
  };
44
+
48
45
  /**
49
46
  * Use radio buttons when users have to make a single selection from a list of options.
50
47
  *
@@ -60,22 +57,19 @@ export var RadioGroupItem = function RadioGroupItem(_ref) {
60
57
  * - If you need to have an unselected state, just add a radio button with a *None* option.
61
58
  * - Sometimes, you might want to include an *Other* option (Usually followed by a text input if a user needs to provide a specific answer)
62
59
  */
63
-
64
60
  export var RadioGroup = function RadioGroup(_ref2) {
65
61
  var className = _ref2.className,
66
- name = _ref2.name,
67
- value = _ref2.value,
68
- disabled = _ref2.disabled,
69
- textPosition = _ref2.textPosition,
70
- children = _ref2.children,
71
- onChange = _ref2.onChange;
72
-
62
+ name = _ref2.name,
63
+ value = _ref2.value,
64
+ disabled = _ref2.disabled,
65
+ textPosition = _ref2.textPosition,
66
+ children = _ref2.children,
67
+ onChange = _ref2.onChange;
73
68
  var _useState = useState(function () {
74
- return uniqueId("RadioGroupName-");
75
- }),
76
- _useState2 = _slicedToArray(_useState, 1),
77
- componentDefaultName = _useState2[0];
78
-
69
+ return uniqueId("RadioGroupName-");
70
+ }),
71
+ _useState2 = _slicedToArray(_useState, 1),
72
+ componentDefaultName = _useState2[0];
79
73
  name = name || componentDefaultName;
80
74
  var contextValue = {
81
75
  name: name,
@@ -2,10 +2,8 @@ import { createContext, useContext } from "react";
2
2
  export var RadioGroupContext = /*#__PURE__*/createContext(null);
3
3
  export var useRadioGroupContext = function useRadioGroupContext() {
4
4
  var contextValue = useContext(RadioGroupContext);
5
-
6
5
  if (!contextValue) {
7
6
  throw new Error("Invalid usage of useRadioGroupContext outside of RadioGroupContext");
8
7
  }
9
-
10
8
  return contextValue;
11
9
  };