@algolia/satellite 1.0.0-beta.147 → 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 (411) 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 +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.js +3 -11
  25. package/cjs/Button/IconButton.js +12 -35
  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 +2 -28
  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.js +0 -6
  61. package/cjs/Dropdown/components/DropdownButtonItem.js +5 -21
  62. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -25
  63. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -6
  64. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -6
  65. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -16
  66. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -15
  67. package/cjs/Dropdown/components/DropdownCollapsibleItem/index.js +0 -9
  68. package/cjs/Dropdown/components/DropdownDivider.js +0 -7
  69. package/cjs/Dropdown/components/DropdownFooterItem.js +2 -15
  70. package/cjs/Dropdown/components/DropdownLinkItem.js +6 -23
  71. package/cjs/Dropdown/components/DropdownRadioItem.js +4 -20
  72. package/cjs/Dropdown/components/DropdownTitle.js +1 -14
  73. package/cjs/Dropdown/components/DropdownToggleItem.js +5 -22
  74. package/cjs/Dropdown/index.js +0 -27
  75. package/cjs/Dropdown/useDropdownItemProps.js +1 -14
  76. package/cjs/Dropzone/Dropzone.js +27 -62
  77. package/cjs/Dropzone/index.js +0 -5
  78. package/cjs/EmptyState/EmptyState.js +12 -23
  79. package/cjs/EmptyState/EmptyState.tailwind.js +0 -1
  80. package/cjs/EmptyState/index.js +0 -7
  81. package/cjs/Field/Field.js +8 -21
  82. package/cjs/Field/FieldStateContext.js +0 -2
  83. package/cjs/Field/index.js +0 -9
  84. package/cjs/Field/useFieldState.js +0 -7
  85. package/cjs/Flag/Flag.js +17 -40
  86. package/cjs/Flag/Flag.tailwind.js +0 -1
  87. package/cjs/Flag/Flags.js +4 -19
  88. package/cjs/Flag/index.js +0 -9
  89. package/cjs/FlexGrid/FlexGrid.js +13 -24
  90. package/cjs/FlexGrid/FlexGrid.tailwind.js +4 -11
  91. package/cjs/FlexGrid/index.js +0 -5
  92. package/cjs/HelpUnderline/HelpUnderline.js +5 -14
  93. package/cjs/HelpUnderline/HelpUnderline.tailwind.js +1 -2
  94. package/cjs/HelpUnderline/index.js +0 -5
  95. package/cjs/Input/Input.js +26 -70
  96. package/cjs/Input/Input.tailwind.js +1 -4
  97. package/cjs/Input/index.js +0 -5
  98. package/cjs/Insert/Insert.js +7 -17
  99. package/cjs/Insert/index.js +0 -5
  100. package/cjs/InstantSearch/InstantSearch.tailwind.js +4 -10
  101. package/cjs/KeyboardKey/KeyboardKey.js +1 -12
  102. package/cjs/KeyboardKey/KeyboardKey.tailwind.js +1 -2
  103. package/cjs/KeyboardKey/index.js +0 -2
  104. package/cjs/Link/BaseLink.js +2 -12
  105. package/cjs/Link/ButtonLink.js +3 -17
  106. package/cjs/Link/IconButtonLink.js +2 -13
  107. package/cjs/Link/Link.js +6 -23
  108. package/cjs/Link/index.js +0 -11
  109. package/cjs/Medallion/Medallion.js +5 -14
  110. package/cjs/Medallion/Medallion.tailwind.js +3 -6
  111. package/cjs/Medallion/index.js +0 -7
  112. package/cjs/Modal/Modal.js +21 -57
  113. package/cjs/Modal/Modal.tailwind.js +3 -3
  114. package/cjs/Modal/components/ModalFooter.js +2 -16
  115. package/cjs/Modal/components/ModalSection.js +3 -11
  116. package/cjs/Modal/index.js +0 -9
  117. package/cjs/Pagination/CompactPagination/CompactPagination.js +1 -22
  118. package/cjs/Pagination/CompactPagination/index.js +0 -5
  119. package/cjs/Pagination/DotPagination/DotPagination.js +5 -19
  120. package/cjs/Pagination/DotPagination/index.js +0 -5
  121. package/cjs/Pagination/Pagination/Pagination.js +9 -34
  122. package/cjs/Pagination/Pagination/index.js +0 -5
  123. package/cjs/Pagination/index.js +0 -9
  124. package/cjs/ProgressBar/ProgressBar.js +3 -16
  125. package/cjs/ProgressBar/ProgressBar.tailwind.js +1 -3
  126. package/cjs/ProgressBar/index.js +0 -5
  127. package/cjs/ProgressSpinner/ProgressSpinner.js +8 -20
  128. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +2 -3
  129. package/cjs/ProgressSpinner/index.js +0 -5
  130. package/cjs/RadioGroup/RadioButton.js +1 -14
  131. package/cjs/RadioGroup/RadioButton.tailwind.js +1 -4
  132. package/cjs/RadioGroup/RadioGroup.js +19 -38
  133. package/cjs/RadioGroup/RadiogroupContext.js +0 -6
  134. package/cjs/RadioGroup/index.js +0 -9
  135. package/cjs/RangeSlider/RangeSlider.js +26 -43
  136. package/cjs/RangeSlider/RangeSlider.tailwind.js +1 -3
  137. package/cjs/RangeSlider/index.js +0 -5
  138. package/cjs/Satellite/Satellite.js +4 -10
  139. package/cjs/Satellite/SatelliteContext.js +0 -9
  140. package/cjs/Satellite/SatelliteRouter.js +2 -9
  141. package/cjs/Satellite/index.js +0 -13
  142. package/cjs/Satellite/locale.js +1 -7
  143. package/cjs/Satellite/useCreatePortal.js +2 -8
  144. package/cjs/ScrollIndicator/ScrollIndicator.js +18 -41
  145. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +1 -3
  146. package/cjs/ScrollIndicator/index.js +0 -5
  147. package/cjs/Select/Select.js +4 -17
  148. package/cjs/Select/Select.tailwind.js +2 -5
  149. package/cjs/Select/index.js +0 -5
  150. package/cjs/Sidebar/Sidebar.js +11 -30
  151. package/cjs/Sidebar/SidebarButtonLink.js +10 -30
  152. package/cjs/Sidebar/SidebarContext.js +0 -6
  153. package/cjs/Sidebar/SidebarHeader.js +1 -9
  154. package/cjs/Sidebar/SidebarHeading.js +3 -14
  155. package/cjs/Sidebar/SidebarLink.js +5 -20
  156. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -11
  157. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -14
  158. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -31
  159. package/cjs/Sidebar/SidebarLinksGroup/index.js +0 -2
  160. package/cjs/Sidebar/SidebarNav.js +5 -16
  161. package/cjs/Sidebar/index.js +0 -17
  162. package/cjs/Switch/Switch.js +15 -36
  163. package/cjs/Switch/Switch.tailwind.js +1 -2
  164. package/cjs/Switch/SwitchOption.js +2 -15
  165. package/cjs/Switch/index.js +0 -7
  166. package/cjs/Switch/utils.js +0 -9
  167. package/cjs/Tables/DataTable/DataTable.js +28 -70
  168. package/cjs/Tables/DataTable/DataTable.tailwind.js +2 -2
  169. package/cjs/Tables/DataTable/components/Body.js +14 -33
  170. package/cjs/Tables/DataTable/components/Footer.js +1 -17
  171. package/cjs/Tables/DataTable/components/Header.js +5 -12
  172. package/cjs/Tables/DataTable/components/HeaderCell.js +10 -27
  173. package/cjs/Tables/DataTable/components/Loader.js +4 -17
  174. package/cjs/Tables/DataTable/components/index.js +0 -10
  175. package/cjs/Tables/DataTable/index.js +0 -7
  176. package/cjs/Tables/DataTable/utils.js +0 -9
  177. package/cjs/Tables/Table/Table.js +7 -21
  178. package/cjs/Tables/Table/Table.tailwind.js +1 -2
  179. package/cjs/Tables/Table/components/TableFooter.js +2 -10
  180. package/cjs/Tables/Table/index.js +0 -7
  181. package/cjs/Tables/index.js +0 -7
  182. package/cjs/Tabs/ContentTabs.js +10 -21
  183. package/cjs/Tabs/LinkTabs.js +5 -18
  184. package/cjs/Tabs/Tabs.tailwind.js +1 -2
  185. package/cjs/Tabs/components/LinkTab.js +2 -27
  186. package/cjs/Tabs/index.js +0 -9
  187. package/cjs/Tabs/utils.js +0 -5
  188. package/cjs/Tag/Tag.js +7 -26
  189. package/cjs/Tag/Tag.tailwind.js +1 -2
  190. package/cjs/Tag/index.js +0 -5
  191. package/cjs/TextArea/TextArea.js +1 -14
  192. package/cjs/TextArea/TextArea.tailwind.js +1 -4
  193. package/cjs/TextArea/index.js +0 -5
  194. package/cjs/TextWrap/TextWrap.js +3 -18
  195. package/cjs/TextWrap/index.js +0 -5
  196. package/cjs/Toggle/Toggle.js +6 -27
  197. package/cjs/Toggle/Toggle.tailwind.js +1 -3
  198. package/cjs/Toggle/index.js +0 -5
  199. package/cjs/Tooltip/OverflowTooltipWrapper.js +33 -62
  200. package/cjs/Tooltip/Tooltip.js +4 -17
  201. package/cjs/Tooltip/Tooltip.tailwind.js +3 -5
  202. package/cjs/Tooltip/TooltipWrapper.js +43 -71
  203. package/cjs/Tooltip/index.js +0 -9
  204. package/cjs/Typography/Typography.tailwind.js +12 -18
  205. package/cjs/UserContent/UserContent.js +3 -11
  206. package/cjs/UserContent/UserContent.tailwind.js +2 -11
  207. package/cjs/index.js +0 -89
  208. package/cjs/styles/base.tailwind.js +7 -7
  209. package/cjs/styles/colors.js +7 -7
  210. package/cjs/styles/disabledColor.js +1 -4
  211. package/cjs/styles/helpers/icons.js +5 -11
  212. package/cjs/styles/helpers/makePurgeCssExtractor.js +3 -15
  213. package/cjs/styles/helpers/makeTailwindPrefixer.js +1 -9
  214. package/cjs/styles/helpers/prefixTailwindClassName.js +6 -6
  215. package/cjs/styles/helpers/satellitePrefixer.js +1 -2
  216. package/cjs/styles/rgba.js +1 -3
  217. package/cjs/styles/tailwind.config.js +4 -11
  218. package/cjs/styles/zIndexes.js +1 -0
  219. package/cjs/utilities/utilities.tailwind.js +0 -3
  220. package/cjs/utils/event-polyfill.js +0 -2
  221. package/cjs/utils/formatters.js +12 -19
  222. package/cjs/utils/genericChangeHandler.js +0 -6
  223. package/cjs/utils/hashCode.js +0 -5
  224. package/cjs/utils/index.js +0 -7
  225. package/cjs/utils/isCssPropertySupported.js +0 -3
  226. package/cjs/utils/isNil.js +0 -2
  227. package/cjs/utils/isRenderedChild.js +0 -2
  228. package/cjs/utils/matchLocation.js +0 -4
  229. package/cjs/utils/onlyText.js +3 -12
  230. package/cjs/utils/parseUrl.js +2 -4
  231. package/cjs/utils/pluralize.js +2 -7
  232. package/cjs/utils/range.js +0 -2
  233. package/cjs/utils/toSentenceCase.js +0 -4
  234. package/cjs/utils/uniqBy.js +0 -4
  235. package/cjs/utils/uniqueId.js +0 -2
  236. package/cjs/utils/useForwardedRef.js +0 -6
  237. package/cjs/utils/useLinkProps.js +1 -13
  238. package/cjs/utils/useTriggerInputChange.js +2 -4
  239. package/esm/AnnouncementBadge/AnnouncementBadge.js +7 -14
  240. package/esm/AutoComplete/AutoComplete.js +68 -158
  241. package/esm/AutoComplete/AutoComplete.tailwind.js +2 -2
  242. package/esm/AutoComplete/components/AutoCompleteEmptyState.js +5 -7
  243. package/esm/AutoComplete/components/DefaultOptionItem.js +2 -8
  244. package/esm/AutoComplete/utils.js +0 -2
  245. package/esm/Avatars/ApplicationAvatar.js +3 -6
  246. package/esm/Avatars/UserAvatar.js +6 -12
  247. package/esm/Avatars/utils.js +7 -23
  248. package/esm/Badge/Badge.js +13 -28
  249. package/esm/Banners/Alert/Alert.js +18 -20
  250. package/esm/Banners/BigBertha/BigBertha.js +1 -4
  251. package/esm/Banners/Promote/Promote.js +8 -10
  252. package/esm/Button/Button.js +13 -21
  253. package/esm/Button/Button.tailwind.js +3 -2
  254. package/esm/Button/ButtonGroup.js +3 -6
  255. package/esm/Button/IconButton.js +12 -22
  256. package/esm/Button/styles.js +1 -5
  257. package/esm/Card/Card.js +6 -12
  258. package/esm/Card/Card.tailwind.js +1 -1
  259. package/esm/Card/components/CardHeader.js +1 -7
  260. package/esm/Card/components/CardTitle.js +2 -8
  261. package/esm/Checkbox/Checkbox.js +14 -28
  262. package/esm/Checkbox/Checkbox.tailwind.js +1 -1
  263. package/esm/ClickAwayContainer/ClickAwayContainer.js +11 -13
  264. package/esm/DatePicker/DatePicker/DatePicker.js +13 -31
  265. package/esm/DatePicker/DatePicker/datePickerReducer.js +0 -9
  266. package/esm/DatePicker/DatePicker.tailwind.js +2 -9
  267. package/esm/DatePicker/DateRangePicker/DateRangePicker.js +29 -55
  268. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -8
  269. package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -16
  270. package/esm/DatePicker/components/Calendar.js +5 -10
  271. package/esm/DatePicker/components/Display.js +3 -5
  272. package/esm/DatePicker/components/Footer.js +0 -4
  273. package/esm/DatePicker/components/FooterActions.js +3 -7
  274. package/esm/DatePicker/components/Modal.js +17 -27
  275. package/esm/DatePicker/components/NavBar.js +12 -22
  276. package/esm/DatePicker/components/SidePanel.js +0 -4
  277. package/esm/Dropdown/Dropdown.js +23 -34
  278. package/esm/Dropdown/DropdownButton.js +3 -11
  279. package/esm/Dropdown/DropdownContext.js +0 -2
  280. package/esm/Dropdown/components/DropdownButtonItem.js +5 -12
  281. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -15
  282. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -2
  283. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -2
  284. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
  285. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
  286. package/esm/Dropdown/components/DropdownDivider.js +0 -2
  287. package/esm/Dropdown/components/DropdownFooterItem.js +2 -8
  288. package/esm/Dropdown/components/DropdownLinkItem.js +6 -13
  289. package/esm/Dropdown/components/DropdownRadioItem.js +4 -11
  290. package/esm/Dropdown/components/DropdownTitle.js +1 -7
  291. package/esm/Dropdown/components/DropdownToggleItem.js +5 -12
  292. package/esm/Dropdown/useDropdownItemProps.js +1 -7
  293. package/esm/Dropzone/Dropzone.js +27 -45
  294. package/esm/EmptyState/EmptyState.js +12 -16
  295. package/esm/Field/Field.js +8 -11
  296. package/esm/Flag/Flag.js +17 -25
  297. package/esm/Flag/Flags.js +4 -9
  298. package/esm/FlexGrid/FlexGrid.js +13 -15
  299. package/esm/FlexGrid/FlexGrid.tailwind.js +4 -9
  300. package/esm/HelpUnderline/HelpUnderline.js +5 -7
  301. package/esm/HelpUnderline/HelpUnderline.tailwind.js +1 -1
  302. package/esm/Input/Input.js +26 -54
  303. package/esm/Input/Input.tailwind.js +1 -1
  304. package/esm/Insert/Insert.js +7 -11
  305. package/esm/InstantSearch/InstantSearch.tailwind.js +4 -4
  306. package/esm/KeyboardKey/KeyboardKey.js +1 -3
  307. package/esm/KeyboardKey/KeyboardKey.tailwind.js +1 -1
  308. package/esm/Link/BaseLink.js +2 -6
  309. package/esm/Link/ButtonLink.js +3 -9
  310. package/esm/Link/IconButtonLink.js +2 -6
  311. package/esm/Link/Link.js +6 -14
  312. package/esm/Medallion/Medallion.js +5 -7
  313. package/esm/Medallion/Medallion.tailwind.js +3 -2
  314. package/esm/Modal/Modal.js +21 -38
  315. package/esm/Modal/Modal.tailwind.js +3 -2
  316. package/esm/Modal/components/ModalFooter.js +2 -8
  317. package/esm/Modal/components/ModalSection.js +3 -5
  318. package/esm/Pagination/CompactPagination/CompactPagination.js +1 -9
  319. package/esm/Pagination/DotPagination/DotPagination.js +5 -11
  320. package/esm/Pagination/Pagination/Pagination.js +9 -21
  321. package/esm/ProgressBar/ProgressBar.js +3 -10
  322. package/esm/ProgressBar/ProgressBar.tailwind.js +1 -1
  323. package/esm/ProgressSpinner/ProgressSpinner.js +8 -12
  324. package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +2 -2
  325. package/esm/RadioGroup/RadioButton.js +1 -7
  326. package/esm/RadioGroup/RadioButton.tailwind.js +1 -1
  327. package/esm/RadioGroup/RadioGroup.js +19 -25
  328. package/esm/RadioGroup/RadiogroupContext.js +0 -2
  329. package/esm/RangeSlider/RangeSlider.js +26 -35
  330. package/esm/RangeSlider/RangeSlider.tailwind.js +1 -1
  331. package/esm/Satellite/Satellite.js +4 -4
  332. package/esm/Satellite/SatelliteContext.js +0 -3
  333. package/esm/Satellite/SatelliteRouter.js +2 -4
  334. package/esm/Satellite/locale.js +1 -2
  335. package/esm/Satellite/useCreatePortal.js +2 -2
  336. package/esm/ScrollIndicator/ScrollIndicator.js +18 -31
  337. package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +1 -1
  338. package/esm/Select/Select.js +4 -9
  339. package/esm/Select/Select.tailwind.js +2 -2
  340. package/esm/Sidebar/Sidebar.js +11 -17
  341. package/esm/Sidebar/SidebarButtonLink.js +10 -20
  342. package/esm/Sidebar/SidebarContext.js +0 -2
  343. package/esm/Sidebar/SidebarHeader.js +1 -3
  344. package/esm/Sidebar/SidebarHeading.js +3 -7
  345. package/esm/Sidebar/SidebarLink.js +5 -11
  346. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -4
  347. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -7
  348. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -18
  349. package/esm/Sidebar/SidebarNav.js +5 -9
  350. package/esm/Switch/Switch.js +15 -24
  351. package/esm/Switch/Switch.tailwind.js +1 -1
  352. package/esm/Switch/SwitchOption.js +2 -6
  353. package/esm/Tables/DataTable/DataTable.js +28 -49
  354. package/esm/Tables/DataTable/DataTable.tailwind.js +2 -1
  355. package/esm/Tables/DataTable/components/Body.js +14 -23
  356. package/esm/Tables/DataTable/components/Footer.js +1 -8
  357. package/esm/Tables/DataTable/components/Header.js +5 -6
  358. package/esm/Tables/DataTable/components/HeaderCell.js +10 -17
  359. package/esm/Tables/DataTable/components/Loader.js +4 -8
  360. package/esm/Tables/DataTable/utils.js +0 -1
  361. package/esm/Tables/Table/Table.js +7 -14
  362. package/esm/Tables/Table/Table.tailwind.js +1 -1
  363. package/esm/Tables/Table/components/TableFooter.js +2 -4
  364. package/esm/Tabs/ContentTabs.js +10 -12
  365. package/esm/Tabs/LinkTabs.js +5 -7
  366. package/esm/Tabs/Tabs.tailwind.js +1 -1
  367. package/esm/Tabs/components/LinkTab.js +2 -18
  368. package/esm/Tabs/utils.js +0 -2
  369. package/esm/Tag/Tag.js +7 -16
  370. package/esm/Tag/Tag.tailwind.js +1 -1
  371. package/esm/TextArea/TextArea.js +1 -7
  372. package/esm/TextArea/TextArea.tailwind.js +1 -1
  373. package/esm/TextWrap/TextWrap.js +3 -11
  374. package/esm/Toggle/Toggle.js +6 -19
  375. package/esm/Toggle/Toggle.tailwind.js +1 -1
  376. package/esm/Tooltip/OverflowTooltipWrapper.js +33 -46
  377. package/esm/Tooltip/Tooltip.js +4 -9
  378. package/esm/Tooltip/Tooltip.tailwind.js +3 -4
  379. package/esm/Tooltip/TooltipWrapper.js +43 -56
  380. package/esm/Typography/Typography.tailwind.js +12 -15
  381. package/esm/UserContent/UserContent.js +3 -5
  382. package/esm/UserContent/UserContent.tailwind.js +2 -7
  383. package/esm/styles/base.tailwind.js +7 -6
  384. package/esm/styles/colors.js +7 -7
  385. package/esm/styles/disabledColor.js +1 -2
  386. package/esm/styles/helpers/icons.js +5 -8
  387. package/esm/styles/helpers/makePurgeCssExtractor.js +3 -14
  388. package/esm/styles/helpers/makeTailwindPrefixer.js +1 -6
  389. package/esm/styles/helpers/prefixTailwindClassName.js +6 -6
  390. package/esm/styles/helpers/satellitePrefixer.js +1 -1
  391. package/esm/styles/rgba.js +1 -2
  392. package/esm/styles/tailwind.config.js +4 -6
  393. package/esm/styles/zIndexes.js +1 -0
  394. package/esm/utils/event-polyfill.js +0 -2
  395. package/esm/utils/formatters.js +12 -16
  396. package/esm/utils/genericChangeHandler.js +0 -2
  397. package/esm/utils/hashCode.js +0 -3
  398. package/esm/utils/isCssPropertySupported.js +0 -2
  399. package/esm/utils/isRenderedChild.js +0 -1
  400. package/esm/utils/matchLocation.js +0 -2
  401. package/esm/utils/onlyText.js +3 -11
  402. package/esm/utils/parseUrl.js +2 -2
  403. package/esm/utils/pluralize.js +2 -5
  404. package/esm/utils/toSentenceCase.js +1 -1
  405. package/esm/utils/uniqBy.js +0 -2
  406. package/esm/utils/useForwardedRef.js +0 -3
  407. package/esm/utils/useLinkProps.js +1 -7
  408. package/esm/utils/useTriggerInputChange.js +2 -3
  409. package/package.json +1 -1
  410. package/satellite.min.css +1 -1
  411. package/scss/colors.scss +16 -16
@@ -2,8 +2,7 @@
2
2
 
3
3
  // @ts-check
4
4
  var makeTailwindPrefixer = require("./makeTailwindPrefixer");
5
- /** Convenience module that exports the preconfigured tagged template for the library */
6
-
7
5
 
6
+ /** Convenience module that exports the preconfigured tagged template for the library */
8
7
  var stl = makeTailwindPrefixer("stl-");
9
8
  module.exports = stl;
@@ -2,16 +2,14 @@
2
2
 
3
3
  // @ts-check
4
4
  var Color = require("color");
5
+
5
6
  /**
6
7
  *
7
8
  * @param {string} color
8
9
  * @param {number} alpha
9
10
  * @returns {string}
10
11
  */
11
-
12
-
13
12
  function rgba(color, alpha) {
14
13
  return Color(color).alpha(alpha).rgb().string();
15
14
  }
16
-
17
15
  module.exports = rgba;
@@ -1,25 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
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) { (0, _defineProperty2["default"])(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
  // @ts-check
12
- var colors = require("./colors");
13
8
 
9
+ var colors = require("./colors");
14
10
  var makePurgeCssExtractor = require("./helpers/makePurgeCssExtractor.js");
15
-
16
11
  var rgba = require("./rgba");
17
-
18
12
  var zIndexes = require("./zIndexes");
19
-
20
13
  var prefix = "stl-";
21
- /** @type {import('tailwindcss').Config} */
22
14
 
15
+ /** @type {import('tailwindcss').Config} */
23
16
  module.exports = {
24
17
  prefix: prefix,
25
18
  content: {
@@ -48,8 +41,8 @@ module.exports = {
48
41
  "2xl": "1.75rem",
49
42
  // 28px,
50
43
  "3xl": "2.625rem" // 42px,
51
-
52
44
  },
45
+
53
46
  lineHeight: {
54
47
  inherit: "inherit",
55
48
  sm: "1rem",
@@ -104,7 +97,7 @@ module.exports = {
104
97
  100: "1"
105
98
  },
106
99
  colors: _objectSpread(_objectSpread({}, colors), {}, {
107
- accent: colors.nebula,
100
+ accent: colors.xenon,
108
101
  inherit: "inherit",
109
102
  transparent: "transparent",
110
103
  current: "currentColor",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  // @ts-check
4
+
4
5
  var zIndexes = {
5
6
  sidebar: 200,
6
7
  fullPageLayout: 250,
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
6
-
7
5
  // @ts-check
8
6
  var plugin = require("tailwindcss/plugin");
9
-
10
7
  module.exports = plugin(function (_ref) {
11
8
  var addUtilities = _ref.addUtilities;
12
9
  addUtilities({
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  // See https://github.com/streamich/react-use/issues/73
4
-
5
4
  /**
6
5
  * To detect you are in IE (for this case) by checking typeof(Event) which is
7
6
  * 'function' for all except IE where it is 'object'.
@@ -21,7 +20,6 @@
21
20
  evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
22
21
  return evt;
23
22
  }
24
-
25
23
  CustomEvent.prototype = window.Event.prototype;
26
24
  window.Event = CustomEvent;
27
25
  })();
@@ -7,41 +7,34 @@ exports.formatHumanNumber = formatHumanNumber;
7
7
  exports.formatHumanSize = formatHumanSize;
8
8
  exports.numberWithCommas = numberWithCommas;
9
9
  var defaultHumanSizes = ["", "K", "M", "B", "T"];
10
-
11
10
  function numberWithCommas(x) {
12
11
  var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
13
-
14
12
  if (typeof x !== "number") {
15
13
  return x;
16
14
  }
17
-
18
15
  return (x || 0).toFixed(precision).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
19
16
  }
20
-
21
17
  function formatHumanNumber(bytes, options) {
22
18
  var _ref = options !== null && options !== void 0 ? options : {},
23
- _ref$decimals = _ref.decimals,
24
- decimals = _ref$decimals === void 0 ? 2 : _ref$decimals,
25
- _ref$sizes = _ref.sizes,
26
- sizes = _ref$sizes === void 0 ? defaultHumanSizes : _ref$sizes,
27
- _ref$divider = _ref.divider,
28
- divider = _ref$divider === void 0 ? 1000 : _ref$divider,
29
- _ref$prettyDecimals = _ref.prettyDecimals,
30
- prettyDecimals = _ref$prettyDecimals === void 0 ? false : _ref$prettyDecimals;
31
-
19
+ _ref$decimals = _ref.decimals,
20
+ decimals = _ref$decimals === void 0 ? 2 : _ref$decimals,
21
+ _ref$sizes = _ref.sizes,
22
+ sizes = _ref$sizes === void 0 ? defaultHumanSizes : _ref$sizes,
23
+ _ref$divider = _ref.divider,
24
+ divider = _ref$divider === void 0 ? 1000 : _ref$divider,
25
+ _ref$prettyDecimals = _ref.prettyDecimals,
26
+ prettyDecimals = _ref$prettyDecimals === void 0 ? false : _ref$prettyDecimals;
32
27
  if (bytes === 0) return "0";
33
28
  var i = Math.min(Math.max(0, Math.floor(Math.log(Math.abs(bytes)) / Math.log(divider))), sizes.length - 1);
34
29
  var nb = bytes / Math.pow(divider, i);
35
30
  return (Math.abs(nb) > 1000 ? numberWithCommas(nb, decimals) : prettyDecimals ? parseFloat(nb.toFixed(decimals)) : nb.toFixed(decimals)) + sizes[i];
36
31
  }
37
-
38
32
  function formatHumanSize(nb, options) {
39
33
  var _ref2 = options !== null && options !== void 0 ? options : {},
40
- _ref2$decimals = _ref2.decimals,
41
- decimals = _ref2$decimals === void 0 ? 2 : _ref2$decimals,
42
- _ref2$prettyDecimals = _ref2.prettyDecimals,
43
- prettyDecimals = _ref2$prettyDecimals === void 0 ? false : _ref2$prettyDecimals;
44
-
34
+ _ref2$decimals = _ref2.decimals,
35
+ decimals = _ref2$decimals === void 0 ? 2 : _ref2$decimals,
36
+ _ref2$prettyDecimals = _ref2.prettyDecimals,
37
+ prettyDecimals = _ref2$prettyDecimals === void 0 ? false : _ref2$prettyDecimals;
45
38
  return formatHumanNumber(nb, {
46
39
  decimals: decimals,
47
40
  sizes: ["", "K", "M", "G", "T"],
@@ -1,21 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
8
  exports.genericChangeHandler = genericChangeHandler;
10
-
11
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
-
13
10
  function genericChangeHandler(ctx, updater) {
14
11
  var memo = {};
15
12
  return function (name) {
16
13
  var attribute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "value";
17
14
  var key = "".concat(name, ":").concat(attribute);
18
-
19
15
  if (!memo[key]) {
20
16
  memo[key] = function (evt) {
21
17
  var newValue = evt.target[attribute];
@@ -24,10 +20,8 @@ function genericChangeHandler(ctx, updater) {
24
20
  });
25
21
  };
26
22
  }
27
-
28
23
  return memo[key];
29
24
  };
30
25
  }
31
-
32
26
  var _default = genericChangeHandler;
33
27
  exports["default"] = _default;
@@ -4,25 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.hashCode = exports["default"] = void 0;
7
-
8
7
  // https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript?rq=1
9
8
  var hashCode = function hashCode(value) {
10
9
  var hash = 0;
11
-
12
10
  if (value.length === 0) {
13
11
  return hash;
14
12
  }
15
-
16
13
  for (var i = 0; i < value.length; i++) {
17
14
  var _char = value.charCodeAt(i);
18
-
19
15
  hash = (hash << 5) - hash + _char;
20
16
  hash = hash & hash; // Convert to 32bit integer
21
17
  }
22
18
 
23
19
  return hash;
24
20
  };
25
-
26
21
  exports.hashCode = hashCode;
27
22
  var _default = hashCode;
28
23
  exports["default"] = _default;
@@ -45,17 +45,10 @@ Object.defineProperty(exports, "uniqueId", {
45
45
  return _uniqueId.uniqueId;
46
46
  }
47
47
  });
48
-
49
48
  var _genericChangeHandler = require("./genericChangeHandler");
50
-
51
49
  var _pluralize = require("./pluralize");
52
-
53
50
  var _range = require("./range");
54
-
55
51
  var _uniqBy = require("./uniqBy");
56
-
57
52
  var _uniqueId = require("./uniqueId");
58
-
59
53
  var _isNil = require("./isNil");
60
-
61
54
  var _toSentenceCase = require("./toSentenceCase");
@@ -4,16 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var isCssPropertySupported = function isCssPropertySupported(prop, value) {
9
8
  if (typeof document === "undefined") {
10
9
  return false;
11
10
  }
12
-
13
11
  var div = document.createElement("div");
14
12
  div.style[prop] = value;
15
13
  return div.style[prop] === value;
16
14
  };
17
-
18
15
  var _default = isCssPropertySupported;
19
16
  exports["default"] = _default;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isNil = exports["default"] = void 0;
7
-
8
7
  /**
9
8
  * Checks if `value` is `null` or `undefined`.
10
9
  * (code stolen from lodash)
@@ -25,7 +24,6 @@ exports.isNil = exports["default"] = void 0;
25
24
  var isNil = function isNil(value) {
26
25
  return value == null;
27
26
  };
28
-
29
27
  exports.isNil = isNil;
30
28
  var _default = isNil;
31
29
  exports["default"] = _default;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  /**
9
8
  * Returns whether a React child would be rendered or not.
10
9
  * See https://reactjs.org/docs/jsx-in-depth.html#booleans-null-and-undefined-are-ignored
@@ -13,6 +12,5 @@ exports["default"] = void 0;
13
12
  var isRenderedChild = function isRenderedChild(child) {
14
13
  return child !== null && typeof child !== "boolean" && typeof child !== "undefined";
15
14
  };
16
-
17
15
  var _default = isRenderedChild;
18
16
  exports["default"] = _default;
@@ -1,17 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _parseUrl = _interopRequireDefault(require("./parseUrl"));
11
-
12
9
  var matchLocation = function matchLocation(href, location) {
13
10
  return (location.pathname || "").startsWith((0, _parseUrl["default"])(href).pathname);
14
11
  };
15
-
16
12
  var _default = matchLocation;
17
13
  exports["default"] = _default;
@@ -4,35 +4,28 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var hasChildren = function hasChildren(element) {
11
9
  return /*#__PURE__*/(0, _react.isValidElement)(element) && Boolean(element.props.children);
12
10
  };
13
-
14
11
  var childToString = function childToString(child) {
15
12
  if (typeof child === "undefined" || child === null || typeof child === "boolean") {
16
13
  return "";
17
14
  }
18
-
19
15
  if (JSON.stringify(child) === "{}") {
20
16
  return "";
21
17
  }
22
-
23
18
  return child.toString();
24
- }; // Code stolen from `react-children-utils`
25
- // @see https://github.com/fernandopasik/react-children-utilities/blob/main/src/lib/onlyText.ts
26
-
19
+ };
27
20
 
21
+ // Code stolen from `react-children-utils`
22
+ // @see https://github.com/fernandopasik/react-children-utilities/blob/main/src/lib/onlyText.ts
28
23
  var onlyText = function onlyText(children) {
29
24
  if (!(children instanceof Array) && ! /*#__PURE__*/(0, _react.isValidElement)(children)) {
30
25
  return childToString(children);
31
26
  }
32
-
33
27
  return _react.Children.toArray(children).reduce(function (text, child) {
34
28
  var newText = "";
35
-
36
29
  if ( /*#__PURE__*/(0, _react.isValidElement)(child) && hasChildren(child)) {
37
30
  newText = onlyText(child.props.children);
38
31
  } else if ( /*#__PURE__*/(0, _react.isValidElement)(child) && !hasChildren(child)) {
@@ -40,10 +33,8 @@ var onlyText = function onlyText(children) {
40
33
  } else {
41
34
  newText = childToString(child);
42
35
  }
43
-
44
36
  return text.concat(newText);
45
37
  }, "");
46
38
  };
47
-
48
39
  var _default = onlyText;
49
40
  exports["default"] = _default;
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.parseURL = exports["default"] = void 0;
7
-
8
7
  var parseURL = function parseURL(url) {
9
- var parser = document.createElement("a"); // Let the browser do the work
10
-
8
+ var parser = document.createElement("a");
9
+ // Let the browser do the work
11
10
  parser.href = url;
12
11
  return {
13
12
  protocol: parser.protocol,
@@ -19,7 +18,6 @@ var parseURL = function parseURL(url) {
19
18
  hash: parser.hash
20
19
  };
21
20
  };
22
-
23
21
  exports.parseURL = parseURL;
24
22
  var _default = parseURL;
25
23
  exports["default"] = _default;
@@ -10,20 +10,15 @@ var DEFAULT_OPTIONS = {
10
10
  return String(number);
11
11
  }
12
12
  };
13
-
14
13
  function pluralize(count, word, options) {
15
14
  var _Object$assign = Object.assign({}, DEFAULT_OPTIONS, options),
16
- plural = _Object$assign.plural,
17
- numberFormatter = _Object$assign.numberFormatter;
18
-
15
+ plural = _Object$assign.plural,
16
+ numberFormatter = _Object$assign.numberFormatter;
19
17
  var formattedNumber = numberFormatter(count);
20
-
21
18
  if (count === 1) {
22
19
  return "".concat(formattedNumber, " ").concat(word);
23
20
  }
24
-
25
21
  return "".concat(formattedNumber, " ").concat(plural || "".concat(word, "s"));
26
22
  }
27
-
28
23
  var _default = pluralize;
29
24
  exports["default"] = _default;
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  exports.range = range;
8
-
9
8
  function range(start, end) {
10
9
  if (start >= end) throw "Start should be greater than end";
11
10
  return Array(Math.abs(end - start)).fill(undefined).map(function (_, idx) {
12
11
  return start + idx;
13
12
  });
14
13
  }
15
-
16
14
  var _default = range;
17
15
  exports["default"] = _default;
@@ -1,21 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.toSentenceCase = exports["default"] = void 0;
9
-
10
8
  var _capitalize = _interopRequireDefault(require("lodash/capitalize"));
11
-
12
9
  /** Converts PascalCase and camelCase to Sentence case */
13
10
  var toSentenceCase = function toSentenceCase(str) {
14
11
  var firstChar = str.charAt(0);
15
12
  var remainingChars = str.slice(1).replace(/\s/g, "").replace(/([A-Z]+)/g, "$1").replace(/([A-Z][a-z])/g, " $1").trim();
16
13
  return (0, _capitalize["default"])("".concat(firstChar).concat(remainingChars));
17
14
  };
18
-
19
15
  exports.toSentenceCase = toSentenceCase;
20
16
  var _default = toSentenceCase;
21
17
  exports["default"] = _default;
@@ -5,21 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  exports.uniqBy = uniqBy;
8
-
9
8
  function uniqBy(arr, identity) {
10
9
  if (!arr) return arr;
11
10
  var memo = [];
12
11
  return arr.filter(function (item) {
13
12
  var id = identity(item);
14
-
15
13
  if (memo.includes(id)) {
16
14
  return false;
17
15
  }
18
-
19
16
  memo.push(id);
20
17
  return true;
21
18
  });
22
19
  }
23
-
24
20
  var _default = uniqBy;
25
21
  exports["default"] = _default;
@@ -6,12 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  exports.uniqueId = uniqueId;
8
8
  var counters = {};
9
-
10
9
  function uniqueId() {
11
10
  var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "id";
12
11
  counters[prefix] = counters[prefix] === undefined ? 0 : counters[prefix] + 1;
13
12
  return prefix + counters[prefix];
14
13
  }
15
-
16
14
  var _default = uniqueId;
17
15
  exports["default"] = _default;
@@ -1,21 +1,16 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
11
-
12
9
  var _react = require("react");
13
-
14
10
  function useForwardedRef(externalRef) {
15
11
  var ref = (0, _react.useRef)(externalRef && (0, _typeof2["default"])(externalRef) === "object" ? externalRef.current : null);
16
12
  var refCallback = (0, _react.useCallback)(function (value) {
17
13
  ref.current = value;
18
-
19
14
  if (!externalRef) {
20
15
  return;
21
16
  } else if (typeof externalRef === "function") {
@@ -26,6 +21,5 @@ function useForwardedRef(externalRef) {
26
21
  }, [externalRef]);
27
22
  return [refCallback, ref];
28
23
  }
29
-
30
24
  var _default = useForwardedRef;
31
25
  exports["default"] = _default;
@@ -1,37 +1,27 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.useLinkProps = exports["default"] = void 0;
9
-
10
8
  var _react = require("react");
11
-
12
9
  var _SatelliteContext = require("../Satellite/SatelliteContext");
13
-
14
10
  var _parseUrl = _interopRequireDefault(require("./parseUrl"));
15
-
16
11
  var useLinkProps = function useLinkProps(props) {
17
12
  var _props$target, _props$rel;
18
-
19
13
  var _useSatelliteContext = (0, _SatelliteContext.useSatelliteContext)(),
20
- router = _useSatelliteContext.router;
21
-
14
+ router = _useSatelliteContext.router;
22
15
  var onClick = function onClick(evt) {
23
16
  if (props.onClick) {
24
17
  props.onClick(evt);
25
18
  }
26
-
27
19
  if (!props.href) {
28
20
  return;
29
21
  }
30
-
31
22
  var isLeftClick = evt.button === 0;
32
23
  var isModifierKeyPressed = Boolean(evt.metaKey || evt.altKey || evt.ctrlKey || evt.shiftKey);
33
24
  var hasTarget = Boolean(evt.currentTarget.target);
34
-
35
25
  if (isLeftClick && !isModifierKeyPressed && !hasTarget && !evt.defaultPrevented && evt.currentTarget.href) {
36
26
  evt.preventDefault();
37
27
  router.push({
@@ -39,7 +29,6 @@ var useLinkProps = function useLinkProps(props) {
39
29
  });
40
30
  }
41
31
  };
42
-
43
32
  var href = router.transformHref(props.href || "");
44
33
  var parsedLocation = (0, _react.useMemo)(function () {
45
34
  return (0, _parseUrl["default"])(href);
@@ -61,7 +50,6 @@ var useLinkProps = function useLinkProps(props) {
61
50
  tabIndex: props.tabIndex
62
51
  };
63
52
  };
64
-
65
53
  exports.useLinkProps = useLinkProps;
66
54
  var _default = useLinkProps;
67
55
  exports["default"] = _default;
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  /**
11
9
  * Trigger a native input change event.
12
10
  * See https://stackoverflow.com/questions/23892547/what-is-the-best-way-to-trigger-onchange-event-in-react-js
@@ -14,8 +12,9 @@ var _react = require("react");
14
12
  var useTriggerInputChange = function useTriggerInputChange(inputRef) {
15
13
  var triggerInputChange = (0, _react.useCallback)(function (value) {
16
14
  var input = inputRef.current;
17
- if (!input) return; // @ts-ignore
15
+ if (!input) return;
18
16
 
17
+ // @ts-ignore
19
18
  var nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set;
20
19
  var ev2 = new Event("input", {
21
20
  bubbles: true
@@ -25,6 +24,5 @@ var useTriggerInputChange = function useTriggerInputChange(inputRef) {
25
24
  }, [inputRef]);
26
25
  return triggerInputChange;
27
26
  };
28
-
29
27
  var _default = useTriggerInputChange;
30
28
  exports["default"] = _default;
@@ -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 = ["size", "text", "variant", "className", "locale"];
5
-
6
5
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
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 { useLocale } from "../Satellite";
14
10
  import stl from "../styles/helpers/satellitePrefixer";
@@ -26,18 +22,15 @@ var SIZE_CLASSNAMES = {
26
22
  };
27
23
  export var AnnouncementBadge = function AnnouncementBadge(_ref) {
28
24
  var _ref$size = _ref.size,
29
- size = _ref$size === void 0 ? "default" : _ref$size,
30
- _ref$text = _ref.text,
31
- text = _ref$text === void 0 ? "new" : _ref$text,
32
- variantProp = _ref.variant,
33
- className = _ref.className,
34
- propsLocale = _ref.locale,
35
- props = _objectWithoutProperties(_ref, _excluded);
36
-
25
+ size = _ref$size === void 0 ? "default" : _ref$size,
26
+ _ref$text = _ref.text,
27
+ text = _ref$text === void 0 ? "new" : _ref$text,
28
+ variantProp = _ref.variant,
29
+ className = _ref.className,
30
+ propsLocale = _ref.locale,
31
+ props = _objectWithoutProperties(_ref, _excluded);
37
32
  var contextLocale = useLocale("announcementBadge");
38
-
39
33
  var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_LOCALE), contextLocale), propsLocale);
40
-
41
34
  var variant = typeof variantProp === "string" ? variantProp : text === "internal" ? "red" : "accent";
42
35
  return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({}, props), {}, {
43
36
  className: cx(DEFAULT_CLASSNAME, variant === "red" ? stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-red-600"]))) : stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["bg-accent-600"]))), SIZE_CLASSNAMES[size], className),