@algolia/satellite 1.0.0-beta.146 → 1.0.0-beta.148

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 +72 -167
  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 +1 -9
  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 +13 -33
  23. package/cjs/Button/Button.tailwind.js +3 -5
  24. package/cjs/Button/ButtonGroup.d.ts +2 -1
  25. package/cjs/Button/ButtonGroup.js +3 -11
  26. package/cjs/Button/IconButton.js +12 -35
  27. package/cjs/Button/index.js +0 -11
  28. package/cjs/Button/styles.js +1 -10
  29. package/cjs/Button/types.js +0 -1
  30. package/cjs/Card/Card.js +6 -21
  31. package/cjs/Card/Card.tailwind.js +1 -2
  32. package/cjs/Card/components/CardHeader.js +1 -14
  33. package/cjs/Card/components/CardTitle.js +2 -15
  34. package/cjs/Card/index.js +0 -9
  35. package/cjs/Checkbox/Checkbox.js +14 -38
  36. package/cjs/Checkbox/Checkbox.tailwind.js +1 -3
  37. package/cjs/Checkbox/index.js +0 -5
  38. package/cjs/ClickAwayContainer/ClickAwayContainer.js +11 -23
  39. package/cjs/ClickAwayContainer/index.js +0 -2
  40. package/cjs/DatePicker/DatePicker/DatePicker.js +13 -46
  41. package/cjs/DatePicker/DatePicker/datePickerReducer.js +0 -15
  42. package/cjs/DatePicker/DatePicker/index.js +0 -7
  43. package/cjs/DatePicker/DatePicker.tailwind.js +3 -13
  44. package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +29 -72
  45. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -14
  46. package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -28
  47. package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +0 -6
  48. package/cjs/DatePicker/DateRangePicker/index.js +0 -9
  49. package/cjs/DatePicker/components/Calendar.js +5 -16
  50. package/cjs/DatePicker/components/Display.js +3 -9
  51. package/cjs/DatePicker/components/Footer.js +0 -7
  52. package/cjs/DatePicker/components/FooterActions.js +3 -11
  53. package/cjs/DatePicker/components/Modal.js +17 -39
  54. package/cjs/DatePicker/components/NavBar.js +37 -47
  55. package/cjs/DatePicker/components/SidePanel.js +0 -7
  56. package/cjs/DatePicker/components/index.js +0 -7
  57. package/cjs/DatePicker/index.js +0 -9
  58. package/cjs/DatePicker/utils.js +0 -4
  59. package/cjs/Dropdown/Dropdown.js +23 -58
  60. package/cjs/Dropdown/DropdownButton.js +3 -20
  61. package/cjs/Dropdown/DropdownContext.js +0 -6
  62. package/cjs/Dropdown/components/DropdownButtonItem.js +5 -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.js +0 -6
  66. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -16
  67. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -15
  68. package/cjs/Dropdown/components/DropdownCollapsibleItem/index.js +0 -9
  69. package/cjs/Dropdown/components/DropdownDivider.js +0 -7
  70. package/cjs/Dropdown/components/DropdownFooterItem.js +2 -15
  71. package/cjs/Dropdown/components/DropdownLinkItem.js +6 -23
  72. package/cjs/Dropdown/components/DropdownRadioItem.js +4 -20
  73. package/cjs/Dropdown/components/DropdownTitle.js +1 -14
  74. package/cjs/Dropdown/components/DropdownToggleItem.js +5 -22
  75. package/cjs/Dropdown/index.js +0 -27
  76. package/cjs/Dropdown/useDropdownItemProps.js +1 -14
  77. package/cjs/Dropzone/Dropzone.js +27 -62
  78. package/cjs/Dropzone/index.js +0 -5
  79. package/cjs/EmptyState/EmptyState.js +12 -23
  80. package/cjs/EmptyState/EmptyState.tailwind.js +0 -1
  81. package/cjs/EmptyState/index.js +0 -7
  82. package/cjs/Field/Field.js +8 -21
  83. package/cjs/Field/FieldStateContext.js +0 -2
  84. package/cjs/Field/index.js +0 -9
  85. package/cjs/Field/useFieldState.js +0 -7
  86. package/cjs/Flag/Flag.js +17 -40
  87. package/cjs/Flag/Flag.tailwind.js +0 -1
  88. package/cjs/Flag/Flags.js +4 -19
  89. package/cjs/Flag/index.js +0 -9
  90. package/cjs/FlexGrid/FlexGrid.js +13 -24
  91. package/cjs/FlexGrid/FlexGrid.tailwind.js +4 -11
  92. package/cjs/FlexGrid/index.js +0 -5
  93. package/cjs/HelpUnderline/HelpUnderline.js +5 -14
  94. package/cjs/HelpUnderline/HelpUnderline.tailwind.js +1 -2
  95. package/cjs/HelpUnderline/index.js +0 -5
  96. package/cjs/Input/Input.js +26 -70
  97. package/cjs/Input/Input.tailwind.js +1 -4
  98. package/cjs/Input/index.js +0 -5
  99. package/cjs/Insert/Insert.js +7 -17
  100. package/cjs/Insert/index.js +0 -5
  101. package/cjs/InstantSearch/InstantSearch.tailwind.js +4 -10
  102. package/cjs/KeyboardKey/KeyboardKey.js +1 -12
  103. package/cjs/KeyboardKey/KeyboardKey.tailwind.js +1 -2
  104. package/cjs/KeyboardKey/index.js +0 -2
  105. package/cjs/Link/BaseLink.js +2 -12
  106. package/cjs/Link/ButtonLink.js +3 -17
  107. package/cjs/Link/IconButtonLink.js +2 -13
  108. package/cjs/Link/Link.js +6 -23
  109. package/cjs/Link/index.js +0 -11
  110. package/cjs/Medallion/Medallion.js +5 -14
  111. package/cjs/Medallion/Medallion.tailwind.js +3 -6
  112. package/cjs/Medallion/index.js +0 -7
  113. package/cjs/Modal/Modal.js +21 -57
  114. package/cjs/Modal/Modal.tailwind.js +3 -3
  115. package/cjs/Modal/components/ModalFooter.js +2 -16
  116. package/cjs/Modal/components/ModalSection.js +3 -11
  117. package/cjs/Modal/index.js +0 -9
  118. package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
  119. package/cjs/Pagination/CompactPagination/CompactPagination.js +2 -20
  120. package/cjs/Pagination/CompactPagination/index.js +0 -5
  121. package/cjs/Pagination/DotPagination/DotPagination.js +5 -19
  122. package/cjs/Pagination/DotPagination/index.js +0 -5
  123. package/cjs/Pagination/Pagination/Pagination.js +9 -34
  124. package/cjs/Pagination/Pagination/index.js +0 -5
  125. package/cjs/Pagination/index.js +0 -9
  126. package/cjs/ProgressBar/ProgressBar.js +3 -16
  127. package/cjs/ProgressBar/ProgressBar.tailwind.js +1 -3
  128. package/cjs/ProgressBar/index.js +0 -5
  129. package/cjs/ProgressSpinner/ProgressSpinner.js +8 -20
  130. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +2 -3
  131. package/cjs/ProgressSpinner/index.js +0 -5
  132. package/cjs/RadioGroup/RadioButton.js +1 -14
  133. package/cjs/RadioGroup/RadioButton.tailwind.js +1 -4
  134. package/cjs/RadioGroup/RadioGroup.js +19 -38
  135. package/cjs/RadioGroup/RadiogroupContext.js +0 -6
  136. package/cjs/RadioGroup/index.js +0 -9
  137. package/cjs/RangeSlider/RangeSlider.js +26 -43
  138. package/cjs/RangeSlider/RangeSlider.tailwind.js +1 -3
  139. package/cjs/RangeSlider/index.js +0 -5
  140. package/cjs/Satellite/Satellite.js +4 -10
  141. package/cjs/Satellite/SatelliteContext.js +0 -9
  142. package/cjs/Satellite/SatelliteRouter.js +2 -9
  143. package/cjs/Satellite/index.js +0 -13
  144. package/cjs/Satellite/locale.js +1 -7
  145. package/cjs/Satellite/useCreatePortal.js +2 -8
  146. package/cjs/ScrollIndicator/ScrollIndicator.js +18 -41
  147. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +1 -3
  148. package/cjs/ScrollIndicator/index.js +0 -5
  149. package/cjs/Select/Select.js +4 -17
  150. package/cjs/Select/Select.tailwind.js +2 -5
  151. package/cjs/Select/index.js +0 -5
  152. package/cjs/Sidebar/Sidebar.js +11 -30
  153. package/cjs/Sidebar/SidebarButtonLink.js +10 -30
  154. package/cjs/Sidebar/SidebarContext.js +0 -6
  155. package/cjs/Sidebar/SidebarHeader.js +1 -9
  156. package/cjs/Sidebar/SidebarHeading.js +3 -14
  157. package/cjs/Sidebar/SidebarLink.js +5 -20
  158. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -11
  159. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -14
  160. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -31
  161. package/cjs/Sidebar/SidebarLinksGroup/index.js +0 -2
  162. package/cjs/Sidebar/SidebarNav.js +5 -16
  163. package/cjs/Sidebar/index.js +0 -17
  164. package/cjs/Switch/Switch.js +15 -36
  165. package/cjs/Switch/Switch.tailwind.js +1 -2
  166. package/cjs/Switch/SwitchOption.js +2 -15
  167. package/cjs/Switch/index.js +0 -7
  168. package/cjs/Switch/utils.js +0 -9
  169. package/cjs/Tables/DataTable/DataTable.js +28 -70
  170. package/cjs/Tables/DataTable/DataTable.tailwind.js +2 -2
  171. package/cjs/Tables/DataTable/components/Body.js +14 -33
  172. package/cjs/Tables/DataTable/components/Footer.js +1 -17
  173. package/cjs/Tables/DataTable/components/Header.js +5 -12
  174. package/cjs/Tables/DataTable/components/HeaderCell.js +10 -27
  175. package/cjs/Tables/DataTable/components/Loader.js +4 -17
  176. package/cjs/Tables/DataTable/components/index.js +0 -10
  177. package/cjs/Tables/DataTable/index.js +0 -7
  178. package/cjs/Tables/DataTable/utils.js +0 -9
  179. package/cjs/Tables/Table/Table.js +7 -21
  180. package/cjs/Tables/Table/Table.tailwind.js +1 -2
  181. package/cjs/Tables/Table/components/TableFooter.js +2 -10
  182. package/cjs/Tables/Table/index.js +0 -7
  183. package/cjs/Tables/index.js +0 -7
  184. package/cjs/Tabs/ContentTabs.js +28 -62
  185. package/cjs/Tabs/LinkTabs.js +5 -18
  186. package/cjs/Tabs/Tabs.tailwind.js +1 -2
  187. package/cjs/Tabs/components/LinkTab.js +2 -27
  188. package/cjs/Tabs/index.js +0 -9
  189. package/cjs/Tabs/utils.js +0 -5
  190. package/cjs/Tag/Tag.js +7 -26
  191. package/cjs/Tag/Tag.tailwind.js +1 -2
  192. package/cjs/Tag/index.js +0 -5
  193. package/cjs/TextArea/TextArea.js +1 -14
  194. package/cjs/TextArea/TextArea.tailwind.js +1 -4
  195. package/cjs/TextArea/index.js +0 -5
  196. package/cjs/TextWrap/TextWrap.d.ts +1 -0
  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 +43 -71
  206. package/cjs/Tooltip/index.js +0 -9
  207. package/cjs/Typography/Typography.tailwind.js +15 -21
  208. package/cjs/UserContent/UserContent.js +7 -16
  209. package/cjs/UserContent/UserContent.tailwind.js +4 -13
  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 +72 -162
  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 +1 -4
  254. package/esm/Banners/Promote/Promote.js +8 -10
  255. package/esm/Button/Button.js +13 -21
  256. package/esm/Button/Button.tailwind.js +3 -2
  257. package/esm/Button/ButtonGroup.d.ts +2 -1
  258. package/esm/Button/ButtonGroup.js +3 -6
  259. package/esm/Button/IconButton.js +12 -22
  260. package/esm/Button/styles.js +1 -5
  261. package/esm/Card/Card.js +6 -12
  262. package/esm/Card/Card.tailwind.js +1 -1
  263. package/esm/Card/components/CardHeader.js +1 -7
  264. package/esm/Card/components/CardTitle.js +2 -8
  265. package/esm/Checkbox/Checkbox.js +14 -28
  266. package/esm/Checkbox/Checkbox.tailwind.js +1 -1
  267. package/esm/ClickAwayContainer/ClickAwayContainer.js +11 -13
  268. package/esm/DatePicker/DatePicker/DatePicker.js +13 -31
  269. package/esm/DatePicker/DatePicker/datePickerReducer.js +0 -9
  270. package/esm/DatePicker/DatePicker.tailwind.js +3 -10
  271. package/esm/DatePicker/DateRangePicker/DateRangePicker.js +29 -55
  272. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -8
  273. package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -16
  274. package/esm/DatePicker/components/Calendar.js +5 -10
  275. package/esm/DatePicker/components/Display.js +3 -5
  276. package/esm/DatePicker/components/Footer.js +0 -4
  277. package/esm/DatePicker/components/FooterActions.js +3 -7
  278. package/esm/DatePicker/components/Modal.js +17 -27
  279. package/esm/DatePicker/components/NavBar.js +37 -36
  280. package/esm/DatePicker/components/SidePanel.js +0 -4
  281. package/esm/Dropdown/Dropdown.js +23 -34
  282. package/esm/Dropdown/DropdownButton.js +3 -11
  283. package/esm/Dropdown/DropdownContext.js +0 -2
  284. package/esm/Dropdown/components/DropdownButtonItem.js +5 -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.js +0 -2
  288. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
  289. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
  290. package/esm/Dropdown/components/DropdownDivider.js +0 -2
  291. package/esm/Dropdown/components/DropdownFooterItem.js +2 -8
  292. package/esm/Dropdown/components/DropdownLinkItem.js +6 -13
  293. package/esm/Dropdown/components/DropdownRadioItem.js +4 -11
  294. package/esm/Dropdown/components/DropdownTitle.js +1 -7
  295. package/esm/Dropdown/components/DropdownToggleItem.js +5 -12
  296. package/esm/Dropdown/useDropdownItemProps.js +1 -7
  297. package/esm/Dropzone/Dropzone.js +27 -45
  298. package/esm/EmptyState/EmptyState.js +12 -16
  299. package/esm/Field/Field.js +8 -11
  300. package/esm/Flag/Flag.js +17 -25
  301. package/esm/Flag/Flags.js +4 -9
  302. package/esm/FlexGrid/FlexGrid.js +13 -15
  303. package/esm/FlexGrid/FlexGrid.tailwind.js +4 -9
  304. package/esm/HelpUnderline/HelpUnderline.js +5 -7
  305. package/esm/HelpUnderline/HelpUnderline.tailwind.js +1 -1
  306. package/esm/Input/Input.js +26 -54
  307. package/esm/Input/Input.tailwind.js +1 -1
  308. package/esm/Insert/Insert.js +7 -11
  309. package/esm/InstantSearch/InstantSearch.tailwind.js +4 -4
  310. package/esm/KeyboardKey/KeyboardKey.js +1 -3
  311. package/esm/KeyboardKey/KeyboardKey.tailwind.js +1 -1
  312. package/esm/Link/BaseLink.js +2 -6
  313. package/esm/Link/ButtonLink.js +3 -9
  314. package/esm/Link/IconButtonLink.js +2 -6
  315. package/esm/Link/Link.js +6 -14
  316. package/esm/Medallion/Medallion.js +5 -7
  317. package/esm/Medallion/Medallion.tailwind.js +3 -2
  318. package/esm/Modal/Modal.js +21 -38
  319. package/esm/Modal/Modal.tailwind.js +3 -2
  320. package/esm/Modal/components/ModalFooter.js +2 -8
  321. package/esm/Modal/components/ModalSection.js +3 -5
  322. package/esm/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
  323. package/esm/Pagination/CompactPagination/CompactPagination.js +3 -7
  324. package/esm/Pagination/DotPagination/DotPagination.js +5 -11
  325. package/esm/Pagination/Pagination/Pagination.js +9 -21
  326. package/esm/ProgressBar/ProgressBar.js +3 -10
  327. package/esm/ProgressBar/ProgressBar.tailwind.js +1 -1
  328. package/esm/ProgressSpinner/ProgressSpinner.js +8 -12
  329. package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +2 -2
  330. package/esm/RadioGroup/RadioButton.js +1 -7
  331. package/esm/RadioGroup/RadioButton.tailwind.js +1 -1
  332. package/esm/RadioGroup/RadioGroup.js +19 -25
  333. package/esm/RadioGroup/RadiogroupContext.js +0 -2
  334. package/esm/RangeSlider/RangeSlider.js +26 -35
  335. package/esm/RangeSlider/RangeSlider.tailwind.js +1 -1
  336. package/esm/Satellite/Satellite.js +4 -4
  337. package/esm/Satellite/SatelliteContext.js +0 -3
  338. package/esm/Satellite/SatelliteRouter.js +2 -4
  339. package/esm/Satellite/locale.js +1 -2
  340. package/esm/Satellite/useCreatePortal.js +2 -2
  341. package/esm/ScrollIndicator/ScrollIndicator.js +18 -31
  342. package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +1 -1
  343. package/esm/Select/Select.js +4 -9
  344. package/esm/Select/Select.tailwind.js +2 -2
  345. package/esm/Sidebar/Sidebar.js +11 -17
  346. package/esm/Sidebar/SidebarButtonLink.js +10 -20
  347. package/esm/Sidebar/SidebarContext.js +0 -2
  348. package/esm/Sidebar/SidebarHeader.js +1 -3
  349. package/esm/Sidebar/SidebarHeading.js +3 -7
  350. package/esm/Sidebar/SidebarLink.js +5 -11
  351. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -4
  352. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -7
  353. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -18
  354. package/esm/Sidebar/SidebarNav.js +5 -9
  355. package/esm/Switch/Switch.js +15 -24
  356. package/esm/Switch/Switch.tailwind.js +1 -1
  357. package/esm/Switch/SwitchOption.js +2 -6
  358. package/esm/Tables/DataTable/DataTable.js +28 -49
  359. package/esm/Tables/DataTable/DataTable.tailwind.js +2 -1
  360. package/esm/Tables/DataTable/components/Body.js +14 -23
  361. package/esm/Tables/DataTable/components/Footer.js +1 -8
  362. package/esm/Tables/DataTable/components/Header.js +5 -6
  363. package/esm/Tables/DataTable/components/HeaderCell.js +10 -17
  364. package/esm/Tables/DataTable/components/Loader.js +4 -8
  365. package/esm/Tables/DataTable/utils.js +0 -1
  366. package/esm/Tables/Table/Table.js +7 -14
  367. package/esm/Tables/Table/Table.tailwind.js +1 -1
  368. package/esm/Tables/Table/components/TableFooter.js +2 -4
  369. package/esm/Tabs/ContentTabs.js +28 -51
  370. package/esm/Tabs/LinkTabs.js +5 -7
  371. package/esm/Tabs/Tabs.tailwind.js +1 -1
  372. package/esm/Tabs/components/LinkTab.js +2 -18
  373. package/esm/Tabs/utils.js +0 -2
  374. package/esm/Tag/Tag.js +7 -16
  375. package/esm/Tag/Tag.tailwind.js +1 -1
  376. package/esm/TextArea/TextArea.js +1 -7
  377. package/esm/TextArea/TextArea.tailwind.js +1 -1
  378. package/esm/TextWrap/TextWrap.d.ts +1 -0
  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 +43 -56
  386. package/esm/Typography/Typography.tailwind.js +15 -18
  387. package/esm/UserContent/UserContent.js +7 -9
  388. package/esm/UserContent/UserContent.tailwind.js +4 -9
  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,15 +1,12 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
-
4
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
-
6
4
  import cx from "clsx";
7
5
  import { createElement, useCallback, useMemo, useState } from "react";
8
6
  import useMeasure from "react-use/lib/useMeasure";
9
7
  import useScroll from "react-use/lib/useScroll";
10
8
  import stl from "../styles/helpers/satellitePrefixer";
11
9
  import { jsx as _jsx } from "react/jsx-runtime";
12
-
13
10
  var useScrollIndicators = function useScrollIndicators() {
14
11
  /**
15
12
  * We don't use the actual measurements from the hook because they're not as precise
@@ -18,18 +15,16 @@ var useScrollIndicators = function useScrollIndicators() {
18
15
  * This is mostly used as a side-effect to force the component to rerender when its size changes
19
16
  */
20
17
  var _useMeasure = useMeasure(),
21
- _useMeasure2 = _slicedToArray(_useMeasure, 1),
22
- setMeasureRef = _useMeasure2[0];
23
-
18
+ _useMeasure2 = _slicedToArray(_useMeasure, 1),
19
+ setMeasureRef = _useMeasure2[0];
24
20
  var _useState = useState(null),
25
- _useState2 = _slicedToArray(_useState, 2),
26
- element = _useState2[0],
27
- setElement = _useState2[1];
28
-
21
+ _useState2 = _slicedToArray(_useState, 2),
22
+ element = _useState2[0],
23
+ setElement = _useState2[1];
29
24
  var setScrollIndicatorsRef = useCallback(function (element) {
30
- setElement(element); // Types are wrong, a ref callback must be able to accept null
25
+ setElement(element);
26
+ // Types are wrong, a ref callback must be able to accept null
31
27
  // @ts-ignore
32
-
33
28
  setMeasureRef(element);
34
29
  }, [setMeasureRef]);
35
30
  var fakeScrollRef = useMemo(function () {
@@ -37,48 +32,40 @@ var useScrollIndicators = function useScrollIndicators() {
37
32
  current: element
38
33
  };
39
34
  }, [element]);
40
-
41
35
  var _useScroll = useScroll(fakeScrollRef),
42
- scrollTop = _useScroll.y;
43
-
36
+ scrollTop = _useScroll.y;
44
37
  var result = {
45
38
  showTopIndicator: false,
46
39
  showBottomIndicator: false,
47
40
  setScrollIndicatorsRef: setScrollIndicatorsRef
48
41
  };
49
-
50
42
  if (element) {
51
43
  var scrollHeight = element.scrollHeight - element.clientHeight;
52
-
53
44
  if (scrollHeight > 0) {
54
45
  var percent = Math.floor(scrollTop / scrollHeight * 100);
55
46
  result.showTopIndicator = percent > 0;
56
47
  result.showBottomIndicator = percent < 100;
57
48
  }
58
49
  }
59
-
60
50
  return result;
61
51
  };
62
-
63
52
  var VARIANT_CLASSNAMES = {
64
53
  light: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["scroll-indicator"]))),
65
54
  dark: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["scroll-indicator scroll-indicator-dark"])))
66
55
  };
67
56
  export var ScrollIndicator = function ScrollIndicator(_ref) {
68
57
  var _ref$tagName = _ref.tagName,
69
- tagName = _ref$tagName === void 0 ? "div" : _ref$tagName,
70
- _ref$variant = _ref.variant,
71
- variant = _ref$variant === void 0 ? "light" : _ref$variant,
72
- className = _ref.className,
73
- wrapperClassName = _ref.wrapperClassName,
74
- style = _ref.style,
75
- children = _ref.children;
76
-
58
+ tagName = _ref$tagName === void 0 ? "div" : _ref$tagName,
59
+ _ref$variant = _ref.variant,
60
+ variant = _ref$variant === void 0 ? "light" : _ref$variant,
61
+ className = _ref.className,
62
+ wrapperClassName = _ref.wrapperClassName,
63
+ style = _ref.style,
64
+ children = _ref.children;
77
65
  var _useScrollIndicators = useScrollIndicators(),
78
- showTopIndicator = _useScrollIndicators.showTopIndicator,
79
- showBottomIndicator = _useScrollIndicators.showBottomIndicator,
80
- setScrollIndicatorsRef = _useScrollIndicators.setScrollIndicatorsRef;
81
-
66
+ showTopIndicator = _useScrollIndicators.showTopIndicator,
67
+ showBottomIndicator = _useScrollIndicators.showBottomIndicator,
68
+ setScrollIndicatorsRef = _useScrollIndicators.setScrollIndicatorsRef;
82
69
  return /*#__PURE__*/_jsx("div", {
83
70
  className: cx(VARIANT_CLASSNAMES[variant], stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), showTopIndicator && "scroll-indicator-top", showBottomIndicator && "scroll-indicator-bottom"), wrapperClassName),
84
71
  children: /*#__PURE__*/createElement(tagName, {
@@ -5,7 +5,7 @@ var plugin = _plugin;
5
5
  var rgba = _rgba;
6
6
  var scrollIndicatorPlugin = plugin(function (_ref) {
7
7
  var addComponents = _ref.addComponents,
8
- theme = _ref.theme;
8
+ theme = _ref.theme;
9
9
  addComponents({
10
10
  ".scroll-indicator": {
11
11
  position: "relative",
@@ -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 = ["variant", "className"];
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 { forwardRef } from "react";
14
10
  import stl from "../styles/helpers/satellitePrefixer";
@@ -18,6 +14,7 @@ var VARIANT_CLASSNAMES = {
18
14
  medium: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["select-input-medium"]))),
19
15
  large: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["select-input-large"])))
20
16
  };
17
+
21
18
  /**
22
19
  * Select lets users choose one option from an options menu. Consider select when you have 3 or more options, to avoid cluttering the interface.
23
20
  *
@@ -26,13 +23,11 @@ var VARIANT_CLASSNAMES = {
26
23
  * - Have a default option selected whenever possible
27
24
  * - Use `Select` as a placeholder option only if there's no logical default option
28
25
  */
29
-
30
26
  export var Select = /*#__PURE__*/forwardRef(function (_ref, ref) {
31
27
  var _ref$variant = _ref.variant,
32
- variant = _ref$variant === void 0 ? "medium" : _ref$variant,
33
- className = _ref.className,
34
- props = _objectWithoutProperties(_ref, _excluded);
35
-
28
+ variant = _ref$variant === void 0 ? "medium" : _ref$variant,
29
+ className = _ref.className,
30
+ props = _objectWithoutProperties(_ref, _excluded);
36
31
  return /*#__PURE__*/_jsx("select", _objectSpread(_objectSpread({}, props), {}, {
37
32
  className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["select-input display-body"]))), VARIANT_CLASSNAMES[variant], className),
38
33
  ref: ref
@@ -5,10 +5,10 @@ import _plugin from "tailwindcss/plugin";
5
5
  var plugin = _plugin;
6
6
  var disabledColor = _disabledColor;
7
7
  var _require = _require2,
8
- selectIconBG = _require.selectIconBG;
8
+ selectIconBG = _require.selectIconBG;
9
9
  var selectPlugin = plugin(function (_ref) {
10
10
  var addComponents = _ref.addComponents,
11
- theme = _ref.theme;
11
+ theme = _ref.theme;
12
12
  addComponents({
13
13
  // I chose .select-input to avoid name collision with tailwindcss.com/docs/user-select/
14
14
  ".select-input": {
@@ -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, _templateObject3;
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 cx from "clsx";
11
7
  import { useCallback } from "react";
12
8
  import { useLocale } from "../Satellite";
@@ -21,24 +17,22 @@ var DEFAULT_SIDEBAR_LOCALE = {
21
17
  };
22
18
  export var Sidebar = function Sidebar(_ref) {
23
19
  var id = _ref.id,
24
- className = _ref.className,
25
- labelProp = _ref.label,
26
- localeProp = _ref.locale,
27
- _ref$variant = _ref.variant,
28
- variant = _ref$variant === void 0 ? "primary" : _ref$variant,
29
- _ref$collapsed = _ref.collapsed,
30
- collapsed = _ref$collapsed === void 0 ? false : _ref$collapsed,
31
- _ref$isLinkActive = _ref.isLinkActive,
32
- isLinkActiveProp = _ref$isLinkActive === void 0 ? matchLocation : _ref$isLinkActive,
33
- location = _ref.location,
34
- children = _ref.children;
20
+ className = _ref.className,
21
+ labelProp = _ref.label,
22
+ localeProp = _ref.locale,
23
+ _ref$variant = _ref.variant,
24
+ variant = _ref$variant === void 0 ? "primary" : _ref$variant,
25
+ _ref$collapsed = _ref.collapsed,
26
+ collapsed = _ref$collapsed === void 0 ? false : _ref$collapsed,
27
+ _ref$isLinkActive = _ref.isLinkActive,
28
+ isLinkActiveProp = _ref$isLinkActive === void 0 ? matchLocation : _ref$isLinkActive,
29
+ location = _ref.location,
30
+ children = _ref.children;
35
31
  var isLinkActive = useCallback(function (href) {
36
32
  return isLinkActiveProp(href, location);
37
33
  }, [isLinkActiveProp, location]);
38
34
  var contextLocale = useLocale("sidebar");
39
-
40
35
  var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_SIDEBAR_LOCALE), contextLocale), localeProp);
41
-
42
36
  var label = typeof labelProp === "string" ? labelProp : variant === "primary" ? locale.primarySidebarLabel : locale.secondarySidebarLabel;
43
37
  return /*#__PURE__*/_jsx(SidebarContext.Provider, {
44
38
  value: {
@@ -1,13 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
-
5
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
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 { useState } from "react";
12
8
  import stl from "../styles/helpers/satellitePrefixer";
13
9
  import { TooltipWrapper } from "../Tooltip";
@@ -15,10 +11,9 @@ import useLinkProps from "../utils/useLinkProps";
15
11
  import { useSidebarContext } from "./SidebarContext";
16
12
  import { jsx as _jsx } from "react/jsx-runtime";
17
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
-
19
14
  var Tooltip = function Tooltip(_ref) {
20
15
  var content = _ref.content,
21
- children = _ref.children;
16
+ children = _ref.children;
22
17
  return /*#__PURE__*/_jsx(TooltipWrapper, {
23
18
  placement: "right",
24
19
  delay: 0,
@@ -35,25 +30,20 @@ var Tooltip = function Tooltip(_ref) {
35
30
  children: children
36
31
  });
37
32
  };
38
-
39
33
  export var SidebarButtonLink = function SidebarButtonLink(props) {
40
34
  var id = props.id,
41
- icon = props.icon,
42
- href = props.href,
43
- disabled = props.disabled,
44
- children = props.children;
45
-
35
+ icon = props.icon,
36
+ href = props.href,
37
+ disabled = props.disabled,
38
+ children = props.children;
46
39
  var _useSidebarContext = useSidebarContext(),
47
- isLinkActive = _useSidebarContext.isLinkActive,
48
- collapsed = _useSidebarContext.collapsed;
49
-
40
+ isLinkActive = _useSidebarContext.isLinkActive,
41
+ collapsed = _useSidebarContext.collapsed;
50
42
  var linkProps = useLinkProps(props);
51
-
52
43
  var _useState = useState(false),
53
- _useState2 = _slicedToArray(_useState, 2),
54
- isInteractedWith = _useState2[0],
55
- setIsInteractedWith = _useState2[1];
56
-
44
+ _useState2 = _slicedToArray(_useState, 2),
45
+ isInteractedWith = _useState2[0],
46
+ setIsInteractedWith = _useState2[1];
57
47
  var isActive = !disabled && isLinkActive(href);
58
48
  var showColors = !disabled && (isActive || isInteractedWith);
59
49
  var Icon = "active" in icon ? showColors ? icon.active : icon.inactive : icon;
@@ -2,10 +2,8 @@ import { createContext, useContext } from "react";
2
2
  export var SidebarContext = /*#__PURE__*/createContext(null);
3
3
  export var useSidebarContext = function useSidebarContext() {
4
4
  var context = useContext(SidebarContext);
5
-
6
5
  if (!context) {
7
6
  throw new Error("useSidebarContext used outside of Sidebar");
8
7
  }
9
-
10
8
  return context;
11
9
  };
@@ -1,13 +1,11 @@
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 SidebarHeader = function SidebarHeader(_ref) {
9
7
  var className = _ref.className,
10
- children = _ref.children;
8
+ children = _ref.children;
11
9
  return /*#__PURE__*/_jsx("header", {
12
10
  className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["h-[72px] shrink-0 border-b border-grey-200/50"]))), className),
13
11
  children: children
@@ -1,19 +1,15 @@
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 { useSidebarContext } from "./SidebarContext";
8
6
  import { jsx as _jsx } from "react/jsx-runtime";
9
7
  export var SidebarHeading = function SidebarHeading(_ref) {
10
8
  var id = _ref.id,
11
- className = _ref.className,
12
- children = _ref.children;
13
-
9
+ className = _ref.className,
10
+ children = _ref.children;
14
11
  var _useSidebarContext = useSidebarContext(),
15
- collapsed = _useSidebarContext.collapsed;
16
-
12
+ collapsed = _useSidebarContext.collapsed;
17
13
  return /*#__PURE__*/_jsx("span", {
18
14
  id: id,
19
15
  className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n h-8 block leading-[2rem]\n display-subheading typo-subdued uppercase select-none\n ", "\n "])), collapsed && "invisible"), className),
@@ -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, _templateObject2, _templateObject3;
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 cx from "clsx";
11
7
  import stl from "../styles/helpers/satellitePrefixer";
12
8
  import useLinkProps from "../utils/useLinkProps";
@@ -15,15 +11,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
15
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
12
  export var SidebarLink = function SidebarLink(props) {
17
13
  var _linkProps$href;
18
-
19
14
  var _useSidebarContext = useSidebarContext(),
20
- isLinkActive = _useSidebarContext.isLinkActive;
21
-
15
+ isLinkActive = _useSidebarContext.isLinkActive;
22
16
  var id = props.id,
23
- className = props.className,
24
- disabled = props.disabled,
25
- Icon = props.icon,
26
- children = props.children;
17
+ className = props.className,
18
+ disabled = props.disabled,
19
+ Icon = props.icon,
20
+ children = props.children;
27
21
  var linkProps = useLinkProps(props);
28
22
  var isActive = !disabled && isLinkActive((_linkProps$href = linkProps.href) !== null && _linkProps$href !== void 0 ? _linkProps$href : "");
29
23
  return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread({}, linkProps), {}, {
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2, _templateObject3;
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";
@@ -9,8 +7,8 @@ var LINK_HEIGHT_PX = 24;
9
7
  var LINKS_SPACING_PX = 8;
10
8
  export var ActiveLinkIndicator = function ActiveLinkIndicator(_ref) {
11
9
  var className = _ref.className,
12
- activeIndex = _ref.activeIndex,
13
- linksCount = _ref.linksCount;
10
+ activeIndex = _ref.activeIndex,
11
+ linksCount = _ref.linksCount;
14
12
  var showIndicator = typeof activeIndex === "number" && activeIndex >= 0;
15
13
  return /*#__PURE__*/_jsx("div", {
16
14
  className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-4 flex justify-center"]))), className),
@@ -1,20 +1,16 @@
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 stl from "../../styles/helpers/satellitePrefixer";
11
7
  import useLinkProps from "../../utils/useLinkProps";
12
8
  import { jsx as _jsx } from "react/jsx-runtime";
13
9
  export var SidebarGroupLink = function SidebarGroupLink(props) {
14
10
  var label = props.label,
15
- active = props.active,
16
- id = props.id,
17
- disabled = props.disabled;
11
+ active = props.active,
12
+ id = props.id,
13
+ disabled = props.disabled;
18
14
  var linkProps = useLinkProps(props);
19
15
  return /*#__PURE__*/_jsx("a", _objectSpread(_objectSpread({}, linkProps), {}, {
20
16
  id: id,
@@ -1,13 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
-
5
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
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 { uniqueId } from "lodash";
12
8
  import { useEffect, useMemo, useState } from "react";
13
9
  import { ChevronRight } from "react-feather";
@@ -18,18 +14,15 @@ import { ActiveLinkIndicator } from "./ActiveLinkIndicator";
18
14
  import { SidebarGroupLink } from "./SidebarGroupLink";
19
15
  import { jsx as _jsx } from "react/jsx-runtime";
20
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
-
22
17
  var isCollapsibleSidebarLinksGroupProps = function isCollapsibleSidebarLinksGroupProps(props) {
23
18
  return "title" in props && "icon" in props;
24
19
  };
25
-
26
20
  export var SidebarLinksGroup = function SidebarLinksGroup(props) {
27
21
  var _useSidebarContext = useSidebarContext(),
28
- isLinkActive = _useSidebarContext.isLinkActive;
29
-
22
+ isLinkActive = _useSidebarContext.isLinkActive;
30
23
  var id = props.id,
31
- className = props.className,
32
- links = props.links;
24
+ className = props.className,
25
+ links = props.links;
33
26
  var contentId = useMemo(function () {
34
27
  return uniqueId("links-group-");
35
28
  }, []);
@@ -38,19 +31,16 @@ export var SidebarLinksGroup = function SidebarLinksGroup(props) {
38
31
  });
39
32
  var previousActiveLinkIndex = usePrevious(activeLinkIndex);
40
33
  var hasMatchingLink = activeLinkIndex >= 0;
41
-
42
34
  var _useState = useState(!isCollapsibleSidebarLinksGroupProps(props) || hasMatchingLink || props.initialIsOpen !== false),
43
- _useState2 = _slicedToArray(_useState, 2),
44
- isOpen = _useState2[0],
45
- setIsOpen = _useState2[1];
46
-
35
+ _useState2 = _slicedToArray(_useState, 2),
36
+ isOpen = _useState2[0],
37
+ setIsOpen = _useState2[1];
47
38
  useEffect(function () {
48
39
  if (isCollapsibleSidebarLinksGroupProps(props)) {
49
40
  var _props$onGroupToggle;
50
-
51
41
  (_props$onGroupToggle = props.onGroupToggle) === null || _props$onGroupToggle === void 0 ? void 0 : _props$onGroupToggle.call(props, isOpen);
52
- } // eslint-disable-next-line react-hooks/exhaustive-deps
53
-
42
+ }
43
+ // eslint-disable-next-line react-hooks/exhaustive-deps
54
44
  }, [isOpen]);
55
45
  useEffect(function () {
56
46
  if (!isOpen && activeLinkIndex >= 0 && typeof previousActiveLinkIndex === "number" && activeLinkIndex !== previousActiveLinkIndex) {
@@ -1,21 +1,17 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { Children } from "react";
6
4
  import stl from "../styles/helpers/satellitePrefixer";
7
5
  import { useSidebarContext } from "./SidebarContext";
8
6
  import { jsx as _jsx } from "react/jsx-runtime";
9
7
  export var SidebarNav = function SidebarNav(_ref) {
10
8
  var id = _ref.id,
11
- className = _ref.className,
12
- spacingProp = _ref.spacing,
13
- label = _ref.label,
14
- children = _ref.children;
15
-
9
+ className = _ref.className,
10
+ spacingProp = _ref.spacing,
11
+ label = _ref.label,
12
+ children = _ref.children;
16
13
  var _useSidebarContext = useSidebarContext(),
17
- variant = _useSidebarContext.variant;
18
-
14
+ variant = _useSidebarContext.variant;
19
15
  var spacing = typeof spacingProp === "string" ? spacingProp : variant === "primary" ? "small" : "large";
20
16
  return /*#__PURE__*/_jsx("nav", {
21
17
  id: id,
@@ -1,8 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
-
4
3
  var _templateObject, _templateObject2;
5
-
6
4
  import cx from "clsx";
7
5
  import { useLayoutEffect, useRef, useState } from "react";
8
6
  import { BUTTON_SIZE_CLASSNAMES } from "../Button/styles";
@@ -14,43 +12,37 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
13
  export var Switch = function Switch(_ref) {
16
14
  var className = _ref.className,
17
- children = _ref.children,
18
- value = _ref.value,
19
- onChange = _ref.onChange,
20
- disabled = _ref.disabled,
21
- name = _ref.name,
22
- _ref$size = _ref.size,
23
- size = _ref$size === void 0 ? "medium" : _ref$size;
24
-
15
+ children = _ref.children,
16
+ value = _ref.value,
17
+ onChange = _ref.onChange,
18
+ disabled = _ref.disabled,
19
+ name = _ref.name,
20
+ _ref$size = _ref.size,
21
+ size = _ref$size === void 0 ? "medium" : _ref$size;
25
22
  var _useState = useState(function () {
26
- return uniqueId("SwitchName-");
27
- }),
28
- _useState2 = _slicedToArray(_useState, 1),
29
- componentDefaultName = _useState2[0];
30
-
23
+ return uniqueId("SwitchName-");
24
+ }),
25
+ _useState2 = _slicedToArray(_useState, 1),
26
+ componentDefaultName = _useState2[0];
31
27
  var radioName = name !== null && name !== void 0 ? name : componentDefaultName;
32
28
  var containerRef = useRef(null);
33
29
  var valueIndicatorRef = useRef(null);
34
-
35
30
  var _useState3 = useState(),
36
- _useState4 = _slicedToArray(_useState3, 2),
37
- valueIndicatorStyle = _useState4[0],
38
- setValueIndicatorStyle = _useState4[1];
31
+ _useState4 = _slicedToArray(_useState3, 2),
32
+ valueIndicatorStyle = _useState4[0],
33
+ setValueIndicatorStyle = _useState4[1];
34
+
39
35
  /**
40
36
  * Positionning might be affected by different changes (changes in options order/number/label size, widget size etc),
41
37
  * so we want to recompute things on every render. To avoid infinite loops, we check if the style
42
38
  * actually changed before applying it.
43
39
  */
44
40
  // eslint-disable-next-line react-hooks/exhaustive-deps
45
-
46
-
47
41
  useLayoutEffect(function () {
48
42
  var targetEl = document.querySelector(buildAnimationKeySelector(radioName, value));
49
-
50
43
  if (!targetEl || !valueIndicatorRef.current || !containerRef.current) {
51
44
  return setValueIndicatorStyle(undefined);
52
45
  }
53
-
54
46
  var containerRect = containerRef.current.getBoundingClientRect();
55
47
  var targetRect = targetEl.getBoundingClientRect();
56
48
  var newValueIndicatorStyle = {
@@ -61,7 +53,6 @@ export var Switch = function Switch(_ref) {
61
53
  transitionDuration: "200ms",
62
54
  transitionTimingFunction: "ease-in-out"
63
55
  };
64
-
65
56
  if (newValueIndicatorStyle.transform !== (valueIndicatorStyle === null || valueIndicatorStyle === void 0 ? void 0 : valueIndicatorStyle.transform) || newValueIndicatorStyle.width !== (valueIndicatorStyle === null || valueIndicatorStyle === void 0 ? void 0 : valueIndicatorStyle.width)) {
66
57
  setValueIndicatorStyle(newValueIndicatorStyle);
67
58
  }
@@ -3,7 +3,7 @@ import _plugin from "tailwindcss/plugin";
3
3
  var plugin = _plugin;
4
4
  var switchPlugin = plugin(function (_ref) {
5
5
  var addComponents = _ref.addComponents,
6
- theme = _ref.theme;
6
+ theme = _ref.theme;
7
7
  addComponents({
8
8
  ".switch": {
9
9
  // this + position relative helps create a new stack context (helps with z-index)
@@ -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, _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 { useRadioGroupContext } from "../RadioGroup";
11
7
  import stl from "../styles/helpers/satellitePrefixer";
12
8
  import { OverflowTooltipWrapper } from "../Tooltip/OverflowTooltipWrapper";
@@ -15,8 +11,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
15
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
12
  export var SwitchOption = function SwitchOption(_ref) {
17
13
  var value = _ref.value,
18
- disabled = _ref.disabled,
19
- children = _ref.children;
14
+ disabled = _ref.disabled,
15
+ children = _ref.children;
20
16
  var context = useRadioGroupContext();
21
17
  var checked = context.value === value;
22
18
  var inputDisabled = context.disabled || disabled;