@algolia/satellite 1.0.0-beta.132 → 1.0.0-beta.135

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 (437) hide show
  1. package/README.md +33 -28
  2. package/cjs/AnnouncementBadge/AnnouncementBadge.d.ts +6 -1
  3. package/cjs/AnnouncementBadge/AnnouncementBadge.js +15 -2
  4. package/cjs/AutoComplete/AutoComplete.d.ts +19 -14
  5. package/cjs/AutoComplete/AutoComplete.js +65 -18
  6. package/cjs/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
  7. package/cjs/AutoComplete/AutoComplete.tailwind.js +10 -13
  8. package/cjs/AutoComplete/components/DefaultOptionItem.d.ts +6 -2
  9. package/cjs/AutoComplete/components/DefaultOptionItem.js +5 -2
  10. package/cjs/AutoComplete/types.d.ts +26 -18
  11. package/cjs/AutoComplete/utils.d.ts +5 -4
  12. package/cjs/AutoComplete/utils.js +22 -2
  13. package/cjs/Avatars/ApplicationAvatar.js +1 -1
  14. package/cjs/Banners/Alert/Alert.d.ts +1 -0
  15. package/cjs/Banners/Alert/Alert.js +1 -1
  16. package/cjs/Banners/BigBertha/BigBertha.d.ts +2 -1
  17. package/cjs/Banners/Promote/Promote.d.ts +1 -0
  18. package/cjs/Button/Button.js +2 -2
  19. package/cjs/Button/Button.tailwind.d.ts +4 -4
  20. package/cjs/Button/Button.tailwind.js +11 -14
  21. package/cjs/Button/ButtonGroup.d.ts +2 -1
  22. package/cjs/Card/Card.tailwind.d.ts +4 -4
  23. package/cjs/Card/Card.tailwind.js +5 -8
  24. package/cjs/Card/components/CardTitle.d.ts +4 -2
  25. package/cjs/Checkbox/Checkbox.d.ts +1 -1
  26. package/cjs/Checkbox/Checkbox.tailwind.d.ts +5 -5
  27. package/cjs/Checkbox/Checkbox.tailwind.js +11 -14
  28. package/cjs/ClickAwayContainer/ClickAwayContainer.d.ts +2 -1
  29. package/cjs/DatePicker/DatePicker/DatePicker.d.ts +5 -11
  30. package/cjs/DatePicker/DatePicker/DatePicker.js +17 -7
  31. package/cjs/DatePicker/DatePicker.tailwind.d.ts +4 -4
  32. package/cjs/DatePicker/DatePicker.tailwind.js +19 -14
  33. package/cjs/DatePicker/DateRangePicker/DateRangePicker.d.ts +5 -11
  34. package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +25 -8
  35. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +3 -0
  36. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +3 -2
  37. package/cjs/DatePicker/components/Calendar.d.ts +5 -1
  38. package/cjs/DatePicker/components/Calendar.js +3 -1
  39. package/cjs/DatePicker/components/Display.d.ts +1 -1
  40. package/cjs/DatePicker/components/FooterActions.d.ts +3 -0
  41. package/cjs/DatePicker/components/FooterActions.js +4 -3
  42. package/cjs/DatePicker/components/Modal.d.ts +2 -2
  43. package/cjs/DatePicker/components/Modal.js +5 -4
  44. package/cjs/DatePicker/components/NavBar.d.ts +5 -1
  45. package/cjs/DatePicker/components/NavBar.js +4 -3
  46. package/cjs/DatePicker/types.d.ts +17 -0
  47. package/cjs/{tailwind-types.js → DatePicker/types.js} +0 -0
  48. package/cjs/DatePicker/utils.d.ts +2 -0
  49. package/cjs/DatePicker/utils.js +10 -2
  50. package/cjs/Dropdown/Dropdown.d.ts +1 -1
  51. package/cjs/Dropdown/Dropdown.js +5 -4
  52. package/cjs/Dropdown/DropdownButton.d.ts +1 -0
  53. package/cjs/Dropdown/components/DropdownButtonItem.js +2 -2
  54. package/cjs/Dropdown/components/DropdownLinkItem.js +1 -2
  55. package/cjs/Dropdown/components/DropdownTitle.d.ts +4 -2
  56. package/cjs/Dropdown/components/DropdownToggleItem.js +2 -2
  57. package/cjs/Dropdown/useDropdownItemProps.d.ts +9 -1
  58. package/cjs/Dropdown/useDropdownItemProps.js +16 -7
  59. package/cjs/Dropzone/Dropzone.d.ts +5 -1
  60. package/cjs/Dropzone/Dropzone.js +14 -5
  61. package/cjs/EmptyState/EmptyState.tailwind.d.ts +4 -4
  62. package/cjs/EmptyState/EmptyState.tailwind.js +5 -8
  63. package/cjs/Field/Field.d.ts +1 -0
  64. package/cjs/Flag/Flag.d.ts +1 -0
  65. package/cjs/Flag/Flag.js +17 -2
  66. package/cjs/Flag/Flag.tailwind.d.ts +4 -4
  67. package/cjs/Flag/Flag.tailwind.js +8 -15
  68. package/cjs/Flag/Flags.d.ts +1 -1
  69. package/cjs/Flag/Flags.js +5 -4
  70. package/cjs/Flag/types.d.ts +4 -0
  71. package/cjs/FlexGrid/FlexGrid.d.ts +2 -1
  72. package/cjs/FlexGrid/FlexGrid.tailwind.d.ts +6 -3
  73. package/cjs/FlexGrid/FlexGrid.tailwind.js +8 -11
  74. package/cjs/HelpUnderline/HelpUnderline.d.ts +1 -0
  75. package/cjs/HelpUnderline/HelpUnderline.tailwind.d.ts +4 -4
  76. package/cjs/HelpUnderline/HelpUnderline.tailwind.js +3 -6
  77. package/cjs/Input/Input.d.ts +6 -0
  78. package/cjs/Input/Input.js +15 -4
  79. package/cjs/Input/Input.tailwind.d.ts +4 -4
  80. package/cjs/Input/Input.tailwind.js +12 -15
  81. package/cjs/Insert/Insert.d.ts +1 -0
  82. package/cjs/InstantSearch/InstantSearch.tailwind.d.ts +4 -5
  83. package/cjs/InstantSearch/InstantSearch.tailwind.js +34 -32
  84. package/cjs/KeyboardKey/KeyboardKey.d.ts +1 -0
  85. package/cjs/KeyboardKey/KeyboardKey.js +3 -2
  86. package/cjs/KeyboardKey/KeyboardKey.tailwind.d.ts +4 -4
  87. package/cjs/KeyboardKey/KeyboardKey.tailwind.js +5 -8
  88. package/cjs/Link/ButtonLink.js +1 -10
  89. package/cjs/Medallion/Medallion.tailwind.d.ts +4 -4
  90. package/cjs/Medallion/Medallion.tailwind.js +8 -11
  91. package/cjs/Modal/Modal.d.ts +5 -2
  92. package/cjs/Modal/Modal.js +16 -9
  93. package/cjs/Modal/Modal.tailwind.d.ts +4 -4
  94. package/cjs/Modal/Modal.tailwind.js +9 -18
  95. package/cjs/Modal/components/ModalFooter.d.ts +4 -2
  96. package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +8 -0
  97. package/cjs/Pagination/CompactPagination/CompactPagination.js +29 -5
  98. package/cjs/Pagination/DotPagination/DotPagination.d.ts +5 -1
  99. package/cjs/Pagination/DotPagination/DotPagination.js +21 -2
  100. package/cjs/Pagination/Pagination/Pagination.d.ts +7 -1
  101. package/cjs/Pagination/Pagination/Pagination.js +32 -8
  102. package/cjs/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
  103. package/cjs/ProgressBar/ProgressBar.tailwind.js +7 -10
  104. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.d.ts +5 -5
  105. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +4 -7
  106. package/cjs/RadioGroup/RadioButton.d.ts +1 -1
  107. package/cjs/RadioGroup/RadioButton.tailwind.d.ts +4 -4
  108. package/cjs/RadioGroup/RadioButton.tailwind.js +11 -14
  109. package/cjs/RadioGroup/RadioGroup.d.ts +1 -0
  110. package/cjs/RadioGroup/RadioGroup.js +1 -1
  111. package/cjs/RangeSlider/RangeSlider.d.ts +1 -1
  112. package/cjs/RangeSlider/RangeSlider.tailwind.d.ts +4 -4
  113. package/cjs/RangeSlider/RangeSlider.tailwind.js +21 -24
  114. package/cjs/Satellite/Satellite.d.ts +5 -1
  115. package/cjs/Satellite/Satellite.js +9 -2
  116. package/cjs/Satellite/SatelliteContext.d.ts +4 -1
  117. package/cjs/Satellite/SatelliteContext.js +2 -1
  118. package/cjs/Satellite/index.d.ts +2 -0
  119. package/cjs/Satellite/index.js +28 -0
  120. package/cjs/Satellite/locale.d.ts +29 -0
  121. package/cjs/Satellite/locale.js +21 -0
  122. package/cjs/Satellite/useCreatePortal.d.ts +4 -0
  123. package/cjs/Satellite/useCreatePortal.js +29 -0
  124. package/cjs/ScrollIndicator/ScrollIndicator.d.ts +4 -1
  125. package/cjs/ScrollIndicator/ScrollIndicator.js +2 -1
  126. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
  127. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
  128. package/cjs/Select/Select.tailwind.d.ts +5 -5
  129. package/cjs/Select/Select.tailwind.js +5 -8
  130. package/cjs/Sidebar/Sidebar.d.ts +33 -10
  131. package/cjs/Sidebar/Sidebar.js +48 -38
  132. package/cjs/Sidebar/SidebarButtonLink.d.ts +14 -0
  133. package/cjs/Sidebar/SidebarButtonLink.js +110 -0
  134. package/cjs/Sidebar/SidebarContext.d.ts +7 -8
  135. package/cjs/Sidebar/SidebarContext.js +10 -11
  136. package/cjs/Sidebar/SidebarHeader.d.ts +6 -0
  137. package/cjs/Sidebar/SidebarHeader.js +29 -0
  138. package/cjs/Sidebar/SidebarHeading.d.ts +6 -0
  139. package/cjs/Sidebar/SidebarHeading.js +35 -0
  140. package/cjs/Sidebar/SidebarLink.d.ts +8 -0
  141. package/cjs/Sidebar/SidebarLink.js +58 -0
  142. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
  143. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +47 -0
  144. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
  145. package/cjs/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +14 -23
  146. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
  147. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +120 -0
  148. package/cjs/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
  149. package/cjs/Sidebar/SidebarLinksGroup/index.js +18 -0
  150. package/cjs/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
  151. package/cjs/Sidebar/SidebarLinksGroup/types.js +5 -0
  152. package/cjs/Sidebar/SidebarNav.d.ts +9 -0
  153. package/cjs/Sidebar/SidebarNav.js +46 -0
  154. package/cjs/Sidebar/index.d.ts +7 -4
  155. package/cjs/Sidebar/index.js +61 -21
  156. package/cjs/Sidebar/types.d.ts +6 -2
  157. package/cjs/Switch/Switch.tailwind.d.ts +5 -5
  158. package/cjs/Switch/Switch.tailwind.js +7 -8
  159. package/cjs/Switch/SwitchOption.d.ts +2 -1
  160. package/cjs/Switch/SwitchOption.js +1 -1
  161. package/cjs/Tables/DataTable/DataTable.d.ts +11 -1
  162. package/cjs/Tables/DataTable/DataTable.js +25 -7
  163. package/cjs/Tables/DataTable/DataTable.tailwind.d.ts +4 -4
  164. package/cjs/Tables/DataTable/DataTable.tailwind.js +3 -6
  165. package/cjs/Tables/DataTable/components/Body.d.ts +3 -2
  166. package/cjs/Tables/DataTable/components/Body.js +6 -5
  167. package/cjs/Tables/DataTable/components/Loader.d.ts +3 -1
  168. package/cjs/Tables/DataTable/components/Loader.js +4 -3
  169. package/cjs/Tables/Table/Table.tailwind.d.ts +4 -4
  170. package/cjs/Tables/Table/Table.tailwind.js +3 -6
  171. package/cjs/Tabs/Tabs.tailwind.d.ts +4 -4
  172. package/cjs/Tabs/Tabs.tailwind.js +13 -16
  173. package/cjs/Tabs/components/LinkTab.js +7 -9
  174. package/cjs/Tag/Tag.d.ts +5 -1
  175. package/cjs/Tag/Tag.js +15 -6
  176. package/cjs/Tag/Tag.tailwind.d.ts +4 -4
  177. package/cjs/Tag/Tag.tailwind.js +6 -9
  178. package/cjs/TextArea/TextArea.tailwind.d.ts +4 -4
  179. package/cjs/TextArea/TextArea.tailwind.js +4 -7
  180. package/cjs/Toggle/Toggle.d.ts +1 -1
  181. package/cjs/Toggle/Toggle.tailwind.d.ts +5 -5
  182. package/cjs/Toggle/Toggle.tailwind.js +19 -22
  183. package/cjs/Tooltip/OverflowTooltipWrapper.d.ts +1 -0
  184. package/cjs/Tooltip/OverflowTooltipWrapper.js +6 -4
  185. package/cjs/Tooltip/Tooltip.d.ts +1 -1
  186. package/cjs/Tooltip/Tooltip.tailwind.d.ts +4 -4
  187. package/cjs/Tooltip/Tooltip.tailwind.js +19 -18
  188. package/cjs/Tooltip/TooltipWrapper.d.ts +1 -0
  189. package/cjs/Tooltip/TooltipWrapper.js +5 -4
  190. package/cjs/Tooltip/types.d.ts +2 -0
  191. package/cjs/Typography/Typography.tailwind.d.ts +5 -17
  192. package/cjs/Typography/Typography.tailwind.js +123 -133
  193. package/cjs/UserContent/UserContent.tailwind.d.ts +4 -1
  194. package/cjs/UserContent/UserContent.tailwind.js +11 -9
  195. package/cjs/index.d.ts +0 -1
  196. package/cjs/index.js +0 -14
  197. package/cjs/styles/base.tailwind.d.ts +4 -4
  198. package/cjs/styles/base.tailwind.js +3 -6
  199. package/cjs/styles/tailwind.config.d.ts +2 -198
  200. package/cjs/styles/tailwind.config.js +25 -29
  201. package/cjs/types.d.ts +7 -0
  202. package/cjs/utilities/utilities.tailwind.d.ts +4 -1
  203. package/cjs/utilities/utilities.tailwind.js +4 -6
  204. package/cjs/utils/isCssPropertySupported.d.ts +1 -1
  205. package/cjs/utils/pluralize.js +6 -1
  206. package/cjs/utils/useLinkProps.d.ts +5 -2
  207. package/cjs/utils/useLinkProps.js +9 -2
  208. package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +6 -1
  209. package/esm/AnnouncementBadge/AnnouncementBadge.js +14 -2
  210. package/esm/AutoComplete/AutoComplete.d.ts +19 -14
  211. package/esm/AutoComplete/AutoComplete.js +67 -18
  212. package/esm/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
  213. package/esm/AutoComplete/AutoComplete.tailwind.js +10 -13
  214. package/esm/AutoComplete/components/DefaultOptionItem.d.ts +6 -2
  215. package/esm/AutoComplete/components/DefaultOptionItem.js +5 -2
  216. package/esm/AutoComplete/types.d.ts +26 -18
  217. package/esm/AutoComplete/utils.d.ts +5 -4
  218. package/esm/AutoComplete/utils.js +16 -0
  219. package/esm/Avatars/ApplicationAvatar.js +1 -1
  220. package/esm/Banners/Alert/Alert.d.ts +1 -0
  221. package/esm/Banners/Alert/Alert.js +1 -1
  222. package/esm/Banners/BigBertha/BigBertha.d.ts +2 -1
  223. package/esm/Banners/Promote/Promote.d.ts +1 -0
  224. package/esm/Button/Button.js +2 -2
  225. package/esm/Button/Button.tailwind.d.ts +4 -4
  226. package/esm/Button/Button.tailwind.js +13 -16
  227. package/esm/Button/ButtonGroup.d.ts +2 -1
  228. package/esm/Card/Card.tailwind.d.ts +4 -4
  229. package/esm/Card/Card.tailwind.js +6 -9
  230. package/esm/Card/components/CardTitle.d.ts +4 -2
  231. package/esm/Checkbox/Checkbox.d.ts +1 -1
  232. package/esm/Checkbox/Checkbox.tailwind.d.ts +5 -5
  233. package/esm/Checkbox/Checkbox.tailwind.js +11 -14
  234. package/esm/ClickAwayContainer/ClickAwayContainer.d.ts +2 -1
  235. package/esm/DatePicker/DatePicker/DatePicker.d.ts +5 -11
  236. package/esm/DatePicker/DatePicker/DatePicker.js +16 -7
  237. package/esm/DatePicker/DatePicker.tailwind.d.ts +4 -4
  238. package/esm/DatePicker/DatePicker.tailwind.js +19 -15
  239. package/esm/DatePicker/DateRangePicker/DateRangePicker.d.ts +5 -11
  240. package/esm/DatePicker/DateRangePicker/DateRangePicker.js +23 -7
  241. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +3 -0
  242. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +3 -2
  243. package/esm/DatePicker/components/Calendar.d.ts +5 -1
  244. package/esm/DatePicker/components/Calendar.js +3 -1
  245. package/esm/DatePicker/components/Display.d.ts +1 -1
  246. package/esm/DatePicker/components/FooterActions.d.ts +3 -0
  247. package/esm/DatePicker/components/FooterActions.js +4 -3
  248. package/esm/DatePicker/components/Modal.d.ts +2 -2
  249. package/esm/DatePicker/components/Modal.js +4 -3
  250. package/esm/DatePicker/components/NavBar.d.ts +5 -1
  251. package/esm/DatePicker/components/NavBar.js +4 -3
  252. package/esm/DatePicker/types.d.ts +17 -0
  253. package/esm/{tailwind-types.js → DatePicker/types.js} +0 -0
  254. package/esm/DatePicker/utils.d.ts +2 -0
  255. package/esm/DatePicker/utils.js +7 -0
  256. package/esm/Dropdown/Dropdown.d.ts +1 -1
  257. package/esm/Dropdown/Dropdown.js +4 -3
  258. package/esm/Dropdown/DropdownButton.d.ts +1 -0
  259. package/esm/Dropdown/components/DropdownButtonItem.js +2 -2
  260. package/esm/Dropdown/components/DropdownLinkItem.js +1 -2
  261. package/esm/Dropdown/components/DropdownTitle.d.ts +4 -2
  262. package/esm/Dropdown/components/DropdownToggleItem.js +2 -2
  263. package/esm/Dropdown/useDropdownItemProps.d.ts +9 -1
  264. package/esm/Dropdown/useDropdownItemProps.js +15 -7
  265. package/esm/Dropzone/Dropzone.d.ts +5 -1
  266. package/esm/Dropzone/Dropzone.js +13 -4
  267. package/esm/EmptyState/EmptyState.tailwind.d.ts +4 -4
  268. package/esm/EmptyState/EmptyState.tailwind.js +6 -9
  269. package/esm/Field/Field.d.ts +1 -0
  270. package/esm/Flag/Flag.d.ts +1 -0
  271. package/esm/Flag/Flag.js +15 -2
  272. package/esm/Flag/Flag.tailwind.d.ts +4 -4
  273. package/esm/Flag/Flag.tailwind.js +9 -16
  274. package/esm/Flag/Flags.d.ts +1 -1
  275. package/esm/Flag/Flags.js +4 -3
  276. package/esm/Flag/types.d.ts +4 -0
  277. package/esm/FlexGrid/FlexGrid.d.ts +2 -1
  278. package/esm/FlexGrid/FlexGrid.tailwind.d.ts +6 -3
  279. package/esm/FlexGrid/FlexGrid.tailwind.js +8 -11
  280. package/esm/HelpUnderline/HelpUnderline.d.ts +1 -0
  281. package/esm/HelpUnderline/HelpUnderline.tailwind.d.ts +4 -4
  282. package/esm/HelpUnderline/HelpUnderline.tailwind.js +4 -7
  283. package/esm/Input/Input.d.ts +6 -0
  284. package/esm/Input/Input.js +15 -4
  285. package/esm/Input/Input.tailwind.d.ts +4 -4
  286. package/esm/Input/Input.tailwind.js +14 -17
  287. package/esm/Insert/Insert.d.ts +1 -0
  288. package/esm/InstantSearch/InstantSearch.tailwind.d.ts +4 -5
  289. package/esm/InstantSearch/InstantSearch.tailwind.js +35 -33
  290. package/esm/KeyboardKey/KeyboardKey.d.ts +1 -0
  291. package/esm/KeyboardKey/KeyboardKey.js +3 -2
  292. package/esm/KeyboardKey/KeyboardKey.tailwind.d.ts +4 -4
  293. package/esm/KeyboardKey/KeyboardKey.tailwind.js +6 -9
  294. package/esm/Link/ButtonLink.js +1 -10
  295. package/esm/Medallion/Medallion.tailwind.d.ts +4 -4
  296. package/esm/Medallion/Medallion.tailwind.js +8 -11
  297. package/esm/Modal/Modal.d.ts +5 -2
  298. package/esm/Modal/Modal.js +14 -8
  299. package/esm/Modal/Modal.tailwind.d.ts +4 -4
  300. package/esm/Modal/Modal.tailwind.js +10 -19
  301. package/esm/Modal/components/ModalFooter.d.ts +4 -2
  302. package/esm/Pagination/CompactPagination/CompactPagination.d.ts +8 -0
  303. package/esm/Pagination/CompactPagination/CompactPagination.js +26 -5
  304. package/esm/Pagination/DotPagination/DotPagination.d.ts +5 -1
  305. package/esm/Pagination/DotPagination/DotPagination.js +18 -2
  306. package/esm/Pagination/Pagination/Pagination.d.ts +7 -1
  307. package/esm/Pagination/Pagination/Pagination.js +30 -8
  308. package/esm/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
  309. package/esm/ProgressBar/ProgressBar.tailwind.js +7 -10
  310. package/esm/ProgressSpinner/ProgressSpinner.tailwind.d.ts +5 -5
  311. package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +5 -8
  312. package/esm/RadioGroup/RadioButton.d.ts +1 -1
  313. package/esm/RadioGroup/RadioButton.tailwind.d.ts +4 -4
  314. package/esm/RadioGroup/RadioButton.tailwind.js +13 -16
  315. package/esm/RadioGroup/RadioGroup.d.ts +1 -0
  316. package/esm/RadioGroup/RadioGroup.js +1 -1
  317. package/esm/RangeSlider/RangeSlider.d.ts +1 -1
  318. package/esm/RangeSlider/RangeSlider.tailwind.d.ts +4 -4
  319. package/esm/RangeSlider/RangeSlider.tailwind.js +21 -24
  320. package/esm/Satellite/Satellite.d.ts +5 -1
  321. package/esm/Satellite/Satellite.js +8 -2
  322. package/esm/Satellite/SatelliteContext.d.ts +4 -1
  323. package/esm/Satellite/SatelliteContext.js +2 -1
  324. package/esm/Satellite/index.d.ts +2 -0
  325. package/esm/Satellite/index.js +2 -0
  326. package/esm/Satellite/locale.d.ts +29 -0
  327. package/esm/Satellite/locale.js +8 -0
  328. package/esm/Satellite/useCreatePortal.d.ts +4 -0
  329. package/esm/Satellite/useCreatePortal.js +16 -0
  330. package/esm/ScrollIndicator/ScrollIndicator.d.ts +4 -1
  331. package/esm/ScrollIndicator/ScrollIndicator.js +2 -1
  332. package/esm/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
  333. package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
  334. package/esm/Select/Select.tailwind.d.ts +5 -5
  335. package/esm/Select/Select.tailwind.js +5 -8
  336. package/esm/Sidebar/Sidebar.d.ts +33 -10
  337. package/esm/Sidebar/Sidebar.js +44 -29
  338. package/esm/Sidebar/SidebarButtonLink.d.ts +14 -0
  339. package/esm/Sidebar/SidebarButtonLink.js +92 -0
  340. package/esm/Sidebar/SidebarContext.d.ts +7 -8
  341. package/esm/Sidebar/SidebarContext.js +9 -8
  342. package/esm/Sidebar/SidebarHeader.d.ts +6 -0
  343. package/esm/Sidebar/SidebarHeader.js +15 -0
  344. package/esm/Sidebar/SidebarHeading.d.ts +6 -0
  345. package/esm/Sidebar/SidebarHeading.js +20 -0
  346. package/esm/Sidebar/SidebarLink.d.ts +8 -0
  347. package/esm/Sidebar/SidebarLink.js +42 -0
  348. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
  349. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +32 -0
  350. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
  351. package/esm/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +13 -19
  352. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
  353. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +100 -0
  354. package/esm/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
  355. package/esm/Sidebar/SidebarLinksGroup/index.js +2 -0
  356. package/esm/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
  357. package/esm/Sidebar/SidebarLinksGroup/types.js +1 -0
  358. package/esm/Sidebar/SidebarNav.d.ts +9 -0
  359. package/esm/Sidebar/SidebarNav.js +31 -0
  360. package/esm/Sidebar/index.d.ts +7 -4
  361. package/esm/Sidebar/index.js +7 -4
  362. package/esm/Sidebar/types.d.ts +6 -2
  363. package/esm/Switch/Switch.tailwind.d.ts +5 -5
  364. package/esm/Switch/Switch.tailwind.js +7 -8
  365. package/esm/Switch/SwitchOption.d.ts +2 -1
  366. package/esm/Switch/SwitchOption.js +1 -1
  367. package/esm/Tables/DataTable/DataTable.d.ts +11 -1
  368. package/esm/Tables/DataTable/DataTable.js +22 -6
  369. package/esm/Tables/DataTable/DataTable.tailwind.d.ts +4 -4
  370. package/esm/Tables/DataTable/DataTable.tailwind.js +4 -7
  371. package/esm/Tables/DataTable/components/Body.d.ts +3 -2
  372. package/esm/Tables/DataTable/components/Body.js +6 -5
  373. package/esm/Tables/DataTable/components/Loader.d.ts +3 -1
  374. package/esm/Tables/DataTable/components/Loader.js +4 -3
  375. package/esm/Tables/Table/Table.tailwind.d.ts +4 -4
  376. package/esm/Tables/Table/Table.tailwind.js +4 -7
  377. package/esm/Tabs/Tabs.tailwind.d.ts +4 -4
  378. package/esm/Tabs/Tabs.tailwind.js +14 -17
  379. package/esm/Tabs/components/LinkTab.js +7 -9
  380. package/esm/Tag/Tag.d.ts +5 -1
  381. package/esm/Tag/Tag.js +14 -6
  382. package/esm/Tag/Tag.tailwind.d.ts +4 -4
  383. package/esm/Tag/Tag.tailwind.js +7 -10
  384. package/esm/TextArea/TextArea.tailwind.d.ts +4 -4
  385. package/esm/TextArea/TextArea.tailwind.js +6 -9
  386. package/esm/Toggle/Toggle.d.ts +1 -1
  387. package/esm/Toggle/Toggle.tailwind.d.ts +5 -5
  388. package/esm/Toggle/Toggle.tailwind.js +19 -22
  389. package/esm/Tooltip/OverflowTooltipWrapper.d.ts +1 -0
  390. package/esm/Tooltip/OverflowTooltipWrapper.js +6 -3
  391. package/esm/Tooltip/Tooltip.d.ts +1 -1
  392. package/esm/Tooltip/Tooltip.tailwind.d.ts +4 -4
  393. package/esm/Tooltip/Tooltip.tailwind.js +20 -19
  394. package/esm/Tooltip/TooltipWrapper.d.ts +1 -0
  395. package/esm/Tooltip/TooltipWrapper.js +4 -3
  396. package/esm/Tooltip/types.d.ts +2 -0
  397. package/esm/Typography/Typography.tailwind.d.ts +5 -17
  398. package/esm/Typography/Typography.tailwind.js +124 -134
  399. package/esm/UserContent/UserContent.tailwind.d.ts +4 -1
  400. package/esm/UserContent/UserContent.tailwind.js +12 -10
  401. package/esm/index.d.ts +0 -1
  402. package/esm/index.js +0 -1
  403. package/esm/styles/base.tailwind.d.ts +4 -4
  404. package/esm/styles/base.tailwind.js +4 -7
  405. package/esm/styles/tailwind.config.d.ts +2 -198
  406. package/esm/styles/tailwind.config.js +27 -30
  407. package/esm/types.d.ts +7 -0
  408. package/esm/utilities/utilities.tailwind.d.ts +4 -1
  409. package/esm/utilities/utilities.tailwind.js +4 -6
  410. package/esm/utils/isCssPropertySupported.d.ts +1 -1
  411. package/esm/utils/pluralize.js +6 -1
  412. package/esm/utils/useLinkProps.d.ts +5 -2
  413. package/esm/utils/useLinkProps.js +9 -2
  414. package/package.json +8 -11
  415. package/satellite.min.css +2 -4
  416. package/scss/colors.scss +1 -0
  417. package/cjs/Banner/Banner.d.ts +0 -85
  418. package/cjs/Banner/Banner.js +0 -176
  419. package/cjs/Banner/index.d.ts +0 -2
  420. package/cjs/Banner/index.js +0 -32
  421. package/cjs/Sidebar/Sidebar.tailwind.d.ts +0 -5
  422. package/cjs/Sidebar/Sidebar.tailwind.js +0 -69
  423. package/cjs/Sidebar/components/SidebarHeader.d.ts +0 -5
  424. package/cjs/Sidebar/components/SidebarLink.d.ts +0 -9
  425. package/cjs/Sidebar/components/SidebarLink.js +0 -98
  426. package/cjs/tailwind-types.d.ts +0 -52
  427. package/esm/Banner/Banner.d.ts +0 -85
  428. package/esm/Banner/Banner.js +0 -161
  429. package/esm/Banner/index.d.ts +0 -2
  430. package/esm/Banner/index.js +0 -2
  431. package/esm/Sidebar/Sidebar.tailwind.d.ts +0 -5
  432. package/esm/Sidebar/Sidebar.tailwind.js +0 -67
  433. package/esm/Sidebar/components/SidebarHeader.d.ts +0 -5
  434. package/esm/Sidebar/components/SidebarLink.d.ts +0 -9
  435. package/esm/Sidebar/components/SidebarLink.js +0 -78
  436. package/esm/tailwind-types.d.ts +0 -52
  437. package/satellite.css +0 -196852
@@ -1,14 +1,17 @@
1
- import { ControllerStateAndHelpers } from "downshift";
1
+ import type { A11yStatusMessageOptions, ControllerStateAndHelpers } from "downshift";
2
2
  import { Component } from "react";
3
3
  import type { ChangeEvent, FocusEvent, KeyboardEvent, MouseEvent } from "react";
4
4
  import { FieldState } from "../Field/FieldStateContext";
5
- import type { AutoCompleteProps, Option } from "./types";
5
+ import type { AutoCompleteLocale, AutoCompleteProps, Option, OptionItemProps } from "./types";
6
6
  interface State {
7
7
  inputFocused: boolean;
8
8
  inputValue: string;
9
9
  inputWidth?: number;
10
10
  showAllResults: boolean;
11
11
  }
12
+ declare type DefaultOptionProps = OptionItemProps & {
13
+ optionItemPrefix?: AutoCompleteLocale["optionItemPrefix"];
14
+ };
12
15
  /**
13
16
  * Autocomplete is a search-as-you-type function that matches what a person types, usually the beginning of a word, or a prefix, with a word list. Not to be confused with auto-suggestion that predicts the end of a query.
14
17
  *
@@ -25,37 +28,39 @@ interface State {
25
28
  * - Provide matching results quickly
26
29
  * - Style different data
27
30
  */
28
- export declare class AutoComplete<T extends Option> extends Component<AutoCompleteProps, State> {
31
+ export declare class AutoComplete<T extends Option = Option> extends Component<AutoCompleteProps<T>, State> {
32
+ static contextType: import("react").Context<import("../Satellite").SatelliteContextType>;
29
33
  static defaultProps: {
30
34
  clearable: boolean;
31
35
  creatable: boolean;
32
36
  multiple: boolean;
33
37
  maxResults: number;
34
- emptyState: JSX.Element;
35
- createFromInputValue: import("./types").CreateFromInputValue;
38
+ createFromInputValue: <T_1 extends Option = Option>(options: T_1[] | undefined, inputValue: string) => Option[];
36
39
  options: never[];
37
40
  separatorKeyCodes: never[];
38
41
  separatorKeys: never[];
39
- optionItemComponent: import("./types").OptionItemComponentType;
42
+ optionItemComponent: ({ optionItemPrefix, ...props }: DefaultOptionProps) => JSX.Element;
40
43
  noWrap: boolean;
41
44
  };
42
45
  state: State;
43
46
  inputContainerRef: HTMLDivElement | null;
44
47
  inputRef: HTMLInputElement | null;
45
- componentDidUpdate(prevProps: AutoCompleteProps): void;
48
+ componentDidUpdate(prevProps: AutoCompleteProps<T>): void;
46
49
  handleClearClick: () => void;
47
50
  handleFakeInputClick: () => void | null;
48
- handleInputBlur: (state: ControllerStateAndHelpers<Option>) => (evt: FocusEvent<HTMLInputElement>) => void;
51
+ handleInputBlur: (state: ControllerStateAndHelpers<T | Option>) => (evt: FocusEvent<HTMLInputElement>) => void;
49
52
  handleInputChange: (evt: ChangeEvent<HTMLInputElement>) => void;
50
53
  handleInputContainerRefUpdate: (el: HTMLDivElement | null) => void;
51
54
  updateInputWidth: () => void;
52
- handleKeyDown: (state: ControllerStateAndHelpers<Option>) => (evt: KeyboardEvent<any>) => void;
53
- handleChange: (option: Option) => void;
55
+ handleKeyDown: (state: ControllerStateAndHelpers<T | Option>) => (evt: KeyboardEvent<any>) => void;
56
+ handleChange: (option: T) => void;
54
57
  handleShowAllResults: (evt: MouseEvent<HTMLButtonElement>) => void;
55
- removeValue: (removedOption: Option) => void;
56
- renderInput: (results: Option[], autocompleteHelpers: ControllerStateAndHelpers<Option>, fieldState: FieldState) => JSX.Element;
57
- renderMenu: (results: Option[], autocompleteHelpers: ControllerStateAndHelpers<Option>) => JSX.Element;
58
- renderSelect: (autocompleteHelpers: ControllerStateAndHelpers<Option>, fieldState: FieldState) => JSX.Element;
58
+ removeValue: (removedOption: T) => void;
59
+ getA11yStatusMessage: (options: A11yStatusMessageOptions<Option>) => any;
60
+ renderInput: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
61
+ renderMenu: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>) => JSX.Element;
62
+ renderSelect: (autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
63
+ private get locale();
59
64
  render(): JSX.Element;
60
65
  }
61
66
  export default AutoComplete;
@@ -8,17 +8,20 @@ import _inherits from "@babel/runtime/helpers/inherits";
8
8
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
9
9
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
11
12
 
12
13
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
13
14
 
14
- 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; }
15
-
16
- 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; }
15
+ var _excluded = ["optionItemPrefix"];
17
16
 
18
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
19
18
 
20
19
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
21
20
 
21
+ 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; }
22
+
23
+ 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; }
24
+
22
25
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
23
26
 
24
27
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -34,14 +37,14 @@ import { Popper } from "react-popper";
34
37
  import Button from "../Button";
35
38
  import Card from "../Card";
36
39
  import { FieldStateContext } from "../Field/FieldStateContext";
40
+ import { SatelliteContext } from "../Satellite";
37
41
  import ScrollIndicator from "../ScrollIndicator";
38
42
  import stl from "../styles/helpers/satellitePrefixer";
39
43
  import Tag from "../Tag";
40
- import pluralize from "../utils/pluralize";
41
44
  import uniqBy from "../utils/uniqBy";
42
45
  import AutoCompleteEmptyState from "./components/AutoCompleteEmptyState";
43
46
  import DefaultOptionItem from "./components/DefaultOptionItem";
44
- import { defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
47
+ import { DEFAULT_AUTOCOMPLETE_LOCALE, defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
45
48
  import { jsx as _jsx } from "react/jsx-runtime";
46
49
  import { jsxs as _jsxs } from "react/jsx-runtime";
47
50
 
@@ -107,9 +110,24 @@ var MENU_POPPER_MODFIERS = [{
107
110
  }];
108
111
  var BACKSPACE_KEY_CODE = 8;
109
112
 
110
- var defaultEmptyState = /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
111
- title: "No matches found"
112
- });
113
+ /** @ignore */
114
+ var DefaultEmptyState = function DefaultEmptyState(_ref) {
115
+ var emptyStateTitle = _ref.emptyStateTitle;
116
+ return /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
117
+ title: emptyStateTitle
118
+ });
119
+ };
120
+
121
+ var DefaultOption = function DefaultOption(_ref2) {
122
+ var optionItemPrefix = _ref2.optionItemPrefix,
123
+ props = _objectWithoutProperties(_ref2, _excluded);
124
+
125
+ return /*#__PURE__*/_jsx(DefaultOptionItem, _objectSpread(_objectSpread({}, props), {}, {
126
+ locale: {
127
+ optionItemPrefix: optionItemPrefix !== null && optionItemPrefix !== void 0 ? optionItemPrefix : DEFAULT_AUTOCOMPLETE_LOCALE.optionItemPrefix
128
+ }
129
+ }));
130
+ };
113
131
  /**
114
132
  * Autocomplete is a search-as-you-type function that matches what a person types, usually the beginning of a word, or a prefix, with a word list. Not to be confused with auto-suggestion that predicts the end of a query.
115
133
  *
@@ -315,6 +333,22 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
315
333
  _this.props.onChange(newOptions);
316
334
  });
317
335
 
336
+ _defineProperty(_assertThisInitialized(_this), "getA11yStatusMessage", function (options) {
337
+ if (!options.isOpen) {
338
+ return "";
339
+ }
340
+
341
+ if (!options.resultCount) {
342
+ return _this.locale.emptyStateTitle;
343
+ }
344
+
345
+ if (options.resultCount > 0) {
346
+ return _this.locale.itemsAvailable(options.resultCount);
347
+ }
348
+
349
+ return "";
350
+ });
351
+
318
352
  _defineProperty(_assertThisInitialized(_this), "renderInput", function (results, autocompleteHelpers, fieldState) {
319
353
  var _this$props3 = _this.props,
320
354
  id = _this$props3.id,
@@ -381,7 +415,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
381
415
  onClick: _this.handleFakeInputClick,
382
416
  ref: _this.handleInputContainerRefUpdate,
383
417
  children: [Icon && /*#__PURE__*/_jsx(Icon, {
384
- className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["mr-4 flex-shrink-0 ", ""])), disabled ? "text-grey-200" : inputFocused ? "text-accent-600" : "text-grey-500"),
418
+ className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["mr-4 shrink-0 ", ""])), disabled ? "text-grey-200" : inputFocused ? "text-accent-600" : "text-grey-500"),
385
419
  size: "1rem"
386
420
  }), /*#__PURE__*/_jsxs("div", {
387
421
  className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex items-center flex-1 ", " ", ""])), !noWrap && "flex-wrap", multiple && "-ml-1"), valuesClassName),
@@ -413,7 +447,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
413
447
  type: "button",
414
448
  className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["w-6 flex items-center justify-center text-grey-500"]))),
415
449
  onClick: _this.handleClearClick,
416
- "aria-label": "Clear input value",
450
+ "aria-label": _this.locale.clearInputButton,
417
451
  children: /*#__PURE__*/_jsx(X, {
418
452
  size: ".75rem"
419
453
  })
@@ -430,12 +464,17 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
430
464
  highlightedIndex = autocompleteHelpers.highlightedIndex,
431
465
  inputValue = autocompleteHelpers.inputValue,
432
466
  isOpen = autocompleteHelpers.isOpen;
467
+
468
+ var defaultEmptyState = /*#__PURE__*/_jsx(DefaultEmptyState, {
469
+ emptyStateTitle: _this.locale.emptyStateTitle
470
+ });
471
+
433
472
  var _this$props4 = _this.props,
434
473
  menuClassName = _this$props4.menuClassName,
435
474
  menuSize = _this$props4.menuSize,
436
- _this$props4$emptySta = _this$props4.emptyState,
437
- emptyState = _this$props4$emptySta === void 0 ? AutoComplete.defaultProps.emptyState : _this$props4$emptySta,
438
475
  menuFooter = _this$props4.menuFooter,
476
+ _this$props4$emptySta = _this$props4.emptyState,
477
+ emptyState = _this$props4$emptySta === void 0 ? defaultEmptyState : _this$props4$emptySta,
439
478
  _this$props4$maxResul = _this$props4.maxResults,
440
479
  maxResults = _this$props4$maxResul === void 0 ? AutoComplete.defaultProps.maxResults : _this$props4$maxResul,
441
480
  _this$props4$multiple = _this$props4.multiple,
@@ -492,16 +531,17 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
492
531
  })), {}, {
493
532
  children: /*#__PURE__*/_jsx(OptionItem, _objectSpread(_objectSpread({}, optionItemProps), {}, {
494
533
  highlighted: index === highlightedIndex,
495
- option: result
534
+ option: result,
535
+ optionItemPrefix: _this.locale.optionItemPrefix
496
536
  }))
497
537
  }), result.value);
498
538
  }), extraResults > 0 && !showAllResults && /*#__PURE__*/_jsx("li", {
499
539
  className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["p-2 text-right"]))),
500
- children: /*#__PURE__*/_jsxs(Button, {
540
+ children: /*#__PURE__*/_jsx(Button, {
501
541
  variant: "subtle",
502
542
  size: "small",
503
543
  onMouseDown: _this.handleShowAllResults,
504
- children: ["Show ", pluralize(extraResults, "result"), " more"]
544
+ children: _this.locale.showMoreButton(extraResults)
505
545
  })
506
546
  })]
507
547
  }))
@@ -516,6 +556,8 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
516
556
  });
517
557
 
518
558
  _defineProperty(_assertThisInitialized(_this), "renderSelect", function (autocompleteHelpers, fieldState) {
559
+ var _this$context$portalT;
560
+
519
561
  var _this$props5 = _this.props,
520
562
  className = _this$props5.className,
521
563
  options = _this$props5.options,
@@ -533,7 +575,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
533
575
 
534
576
  return /*#__PURE__*/_jsxs("div", {
535
577
  className: className,
536
- children: [_this.renderInput(results, autocompleteHelpers, fieldState), _this.inputContainerRef && /*#__PURE__*/createPortal(_this.renderMenu(results, autocompleteHelpers), document.body)]
578
+ children: [_this.renderInput(results, autocompleteHelpers, fieldState), _this.inputContainerRef && /*#__PURE__*/createPortal(_this.renderMenu(results, autocompleteHelpers), (_this$context$portalT = _this.context["portalTarget"]) !== null && _this$context$portalT !== void 0 ? _this$context$portalT : document.body)]
537
579
  });
538
580
  });
539
581
 
@@ -556,6 +598,11 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
556
598
  });
557
599
  }
558
600
  }
601
+ }, {
602
+ key: "locale",
603
+ get: function get() {
604
+ return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_AUTOCOMPLETE_LOCALE), this.context["locales"]), this.props.locale);
605
+ }
559
606
  }, {
560
607
  key: "render",
561
608
  value: function render() {
@@ -574,6 +621,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
574
621
  */
575
622
  ,
576
623
  selectedItem: null,
624
+ getA11yStatusMessage: _this2.getA11yStatusMessage,
577
625
  onChange: _this2.handleChange,
578
626
  itemToString: optionToString,
579
627
  defaultHighlightedIndex: 0,
@@ -589,17 +637,18 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
589
637
  return AutoComplete;
590
638
  }(Component);
591
639
 
640
+ _defineProperty(AutoComplete, "contextType", SatelliteContext);
641
+
592
642
  _defineProperty(AutoComplete, "defaultProps", {
593
643
  clearable: false,
594
644
  creatable: false,
595
645
  multiple: false,
596
646
  maxResults: 7,
597
- emptyState: defaultEmptyState,
598
647
  createFromInputValue: defaultCreateFromInputValue,
599
648
  options: [],
600
649
  separatorKeyCodes: [],
601
650
  separatorKeys: [],
602
- optionItemComponent: DefaultOptionItem,
651
+ optionItemComponent: DefaultOption,
603
652
  noWrap: false
604
653
  });
605
654
 
@@ -1,5 +1,5 @@
1
1
  export = autoCompletePlugin;
2
- /**
3
- * @type {import('../tailwind-types').TailwindPlugin}
4
- */
5
- declare const autoCompletePlugin: import('../tailwind-types').TailwindPlugin;
2
+ declare const autoCompletePlugin: {
3
+ handler: import("tailwindcss/types/config").PluginCreator;
4
+ config?: import("tailwindcss").Config | undefined;
5
+ };
@@ -1,13 +1,11 @@
1
1
  import _rgba from "../styles/rgba";
2
2
  import _disabledColor from "../styles/disabledColor";
3
+ import _plugin from "tailwindcss/plugin";
3
4
  // @ts-check
5
+ var plugin = _plugin;
4
6
  var disabledColor = _disabledColor;
5
7
  var rgba = _rgba;
6
- /**
7
- * @type {import('../tailwind-types').TailwindPlugin}
8
- */
9
-
10
- var autoCompletePlugin = function autoCompletePlugin(_ref) {
8
+ var autoCompletePlugin = plugin(function (_ref) {
11
9
  var addComponents = _ref.addComponents,
12
10
  theme = _ref.theme;
13
11
  addComponents({
@@ -30,14 +28,14 @@ var autoCompletePlugin = function autoCompletePlugin(_ref) {
30
28
  "&::after": {
31
29
  content: '" "',
32
30
  display: "block",
33
- minHeight: 30,
31
+ minHeight: "30px",
34
32
  // don't ask me why 30
35
- fontSize: 0
33
+ fontSize: "0px"
36
34
  },
37
35
  "&.autocomplete-large": {
38
36
  minHeight: "3rem",
39
37
  "&::after": {
40
- minHeight: 38 // don't ask me why 38
38
+ minHeight: "38px" // don't ask me why 38
41
39
 
42
40
  }
43
41
  }
@@ -67,12 +65,12 @@ var autoCompletePlugin = function autoCompletePlugin(_ref) {
67
65
  scrollbarWidth: "none",
68
66
  msOverflowStyle: "-ms-autohiding-scrollbar",
69
67
  "&::-webkit-scrollbar": {
70
- width: 0,
71
- height: 0
68
+ width: "0px",
69
+ height: "0px"
72
70
  }
73
71
  },
74
72
  ".autocomplete-input": {
75
- flex: 1,
73
+ flex: "1",
76
74
  backgroundColor: "transparent",
77
75
  caretColor: theme("colors.grey.600"),
78
76
  color: theme("colors.grey.900"),
@@ -92,6 +90,5 @@ var autoCompletePlugin = function autoCompletePlugin(_ref) {
92
90
  }
93
91
  }
94
92
  });
95
- };
96
-
93
+ });
97
94
  export default autoCompletePlugin;
@@ -1,3 +1,7 @@
1
- import type { OptionItemComponentType } from "../types";
2
- declare const DefaultOptionItem: OptionItemComponentType;
1
+ /// <reference types="react" />
2
+ import type { AutoCompleteLocale, OptionItemProps } from "../types";
3
+ declare type DefaultOptionItemProps = OptionItemProps & {
4
+ locale?: AutoCompleteLocale;
5
+ };
6
+ declare const DefaultOptionItem: ({ option, multiple, locale }: DefaultOptionItemProps) => JSX.Element;
3
7
  export default DefaultOptionItem;
@@ -12,13 +12,16 @@ var metadataSpacer = /*#__PURE__*/_jsx("span", {
12
12
  });
13
13
 
14
14
  var DefaultOptionItem = function DefaultOptionItem(_ref) {
15
+ var _locale$optionItemPre;
16
+
15
17
  var option = _ref.option,
16
- multiple = _ref.multiple;
18
+ multiple = _ref.multiple,
19
+ locale = _ref.locale;
17
20
  return /*#__PURE__*/_jsxs("div", {
18
21
  className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate py-2"]))),
19
22
  children: [/*#__PURE__*/_jsx("span", {
20
23
  className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["font-semibold text-md text-grey-900"]))),
21
- children: option["new"] ? "".concat(multiple ? "Add " : "Use ", " ").concat(option.label) : option.label
24
+ children: option["new"] ? "".concat(locale === null || locale === void 0 ? void 0 : (_locale$optionItemPre = locale.optionItemPrefix) === null || _locale$optionItemPre === void 0 ? void 0 : _locale$optionItemPre.call(locale, multiple), " ").concat(option.label) : option.label
22
25
  }), option.metadata && option.metadata.length > 0 && /*#__PURE__*/_jsx("ul", {
23
26
  className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex text-grey-600"]))),
24
27
  children: option.metadata.map(function (metadata, idx) {
@@ -1,7 +1,14 @@
1
1
  import type { ComponentType, FocusEventHandler, ReactNode } from "react";
2
2
  import type { IconComponentType } from "../types";
3
3
  export declare type AutoCompleteVariant = "medium" | "large";
4
- export interface AutoCompleteBaseProps {
4
+ export declare type AutoCompleteLocale = {
5
+ emptyStateTitle?: string;
6
+ clearInputButton?: string;
7
+ itemsAvailable?: (resultCount: number) => string;
8
+ showMoreButton?: (extraResults: number) => string;
9
+ optionItemPrefix?: (multiple: boolean) => string;
10
+ };
11
+ export interface AutoCompleteBaseProps<T extends Option = Option> {
5
12
  id?: string;
6
13
  icon?: IconComponentType;
7
14
  name?: string;
@@ -12,7 +19,7 @@ export interface AutoCompleteBaseProps {
12
19
  placeholder?: string;
13
20
  disabled?: boolean;
14
21
  autoFocus?: boolean;
15
- options?: Option[];
22
+ options?: T[];
16
23
  inputValue?: string;
17
24
  onTextChange?: (text: string) => any;
18
25
  onFocus?: FocusEventHandler<HTMLInputElement>;
@@ -21,13 +28,13 @@ export interface AutoCompleteBaseProps {
21
28
  clearable?: boolean;
22
29
  selectOnBlur?: boolean;
23
30
  maxResults?: number;
24
- createFromInputValue?: CreateFromInputValue;
31
+ createFromInputValue?: CreateFromInputValue<T>;
25
32
  separatorKeyCodes?: number[];
26
33
  separatorKeys?: string[];
27
- renderValueTemplate?: (args: RenderValueTemplateArgs) => JSX.Element;
34
+ renderValueTemplate?: (args: RenderValueTemplateArgs<T>) => JSX.Element;
28
35
  emptyState?: ReactNode;
29
36
  menuFooter?: ReactNode;
30
- optionItemComponent?: OptionItemComponentType;
37
+ optionItemComponent?: OptionItemComponentType<T>;
31
38
  /** Keep the input on a single line */
32
39
  noWrap?: boolean;
33
40
  endItem?: ReactNode;
@@ -36,18 +43,19 @@ export interface AutoCompleteBaseProps {
36
43
  * @default "medium"
37
44
  */
38
45
  menuSize?: "medium" | "large";
46
+ locale?: AutoCompleteLocale;
39
47
  }
40
- export interface AutoCompleteSingleProps extends AutoCompleteBaseProps {
48
+ export interface AutoCompleteSingleProps<T extends Option = Option> extends AutoCompleteBaseProps<T> {
41
49
  multiple?: false;
42
- value?: Option;
43
- onChange: (option: Option | null) => void;
50
+ value?: T;
51
+ onChange: (option: T | null) => void;
44
52
  }
45
- export interface AutoCompleteMultiProps extends AutoCompleteBaseProps {
53
+ export interface AutoCompleteMultiProps<T extends Option = Option> extends AutoCompleteBaseProps<T> {
46
54
  multiple: true;
47
- value?: Option[];
48
- onChange: (option: Option[] | null) => void;
55
+ value?: T[];
56
+ onChange: (option: T[] | null) => void;
49
57
  }
50
- export declare type AutoCompleteProps = AutoCompleteMultiProps | AutoCompleteSingleProps;
58
+ export declare type AutoCompleteProps<T extends Option = Option> = AutoCompleteMultiProps<T> | AutoCompleteSingleProps<T>;
51
59
  declare type OptionsValue = string | number | boolean;
52
60
  export interface Option {
53
61
  value: OptionsValue;
@@ -57,22 +65,22 @@ export interface Option {
57
65
  disabled?: boolean;
58
66
  bypassNeedleMatch?: boolean;
59
67
  }
60
- export interface OptionItemProps {
61
- option: Option;
68
+ export interface OptionItemProps<T extends Option = Option> {
69
+ option: T;
62
70
  multiple: boolean;
63
71
  inputValue: string;
64
72
  highlighted: boolean;
65
73
  }
66
- export declare type OptionItemComponentType = ComponentType<OptionItemProps>;
74
+ export declare type OptionItemComponentType<T extends Option = Option> = ComponentType<OptionItemProps<T>>;
67
75
  export interface OptionRendererParams {
68
76
  multiple: boolean;
69
77
  inputValue: string;
70
78
  highlighted: boolean;
71
79
  }
72
- export interface RenderValueTemplateArgs {
73
- option: Option;
80
+ export interface RenderValueTemplateArgs<T extends Option = Option> {
81
+ option: T;
74
82
  key: string;
75
83
  editable: boolean;
76
84
  }
77
- export declare type CreateFromInputValue = (options: Option[] | undefined, inputValue: string) => Option[];
85
+ export declare type CreateFromInputValue<T extends Option = Option> = (options: T[] | undefined, inputValue: string) => Option[];
78
86
  export {};
@@ -1,4 +1,5 @@
1
- import type { AutoCompleteMultiProps, AutoCompleteProps, CreateFromInputValue } from "./types";
2
- export declare function isAutoCompleteMultiProps(props: AutoCompleteProps): props is AutoCompleteMultiProps;
3
- export declare const defaultCreateFromInputValue: CreateFromInputValue;
4
- export declare const caseInsensitiveCreateFromInputValue: CreateFromInputValue;
1
+ import type { AutoCompleteLocale, AutoCompleteMultiProps, AutoCompleteProps, Option } from "./types";
2
+ export declare function isAutoCompleteMultiProps<T extends Option = Option>(props: AutoCompleteProps<T>): props is AutoCompleteMultiProps<T>;
3
+ export declare const defaultCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
4
+ export declare const caseInsensitiveCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
5
+ export declare const DEFAULT_AUTOCOMPLETE_LOCALE: Required<AutoCompleteLocale>;
@@ -1,3 +1,4 @@
1
+ import pluralize from "../utils/pluralize";
1
2
  export function isAutoCompleteMultiProps(props) {
2
3
  return Boolean(props.multiple);
3
4
  }
@@ -24,4 +25,19 @@ export var caseInsensitiveCreateFromInputValue = function caseInsensitiveCreateF
24
25
  return createFromInputValue(options, inputValue, function (option) {
25
26
  return option.value.toString().toLowerCase() === inputValue.toLowerCase();
26
27
  });
28
+ };
29
+ export var DEFAULT_AUTOCOMPLETE_LOCALE = {
30
+ clearInputButton: "Clear input value",
31
+ emptyStateTitle: "No matches found",
32
+ itemsAvailable: function itemsAvailable(count) {
33
+ return "".concat(pluralize(count, "item is", {
34
+ plural: "items are"
35
+ }), " available");
36
+ },
37
+ optionItemPrefix: function optionItemPrefix(multiple) {
38
+ return multiple ? "Add" : "Use";
39
+ },
40
+ showMoreButton: function showMoreButton(extraResults) {
41
+ return "Show ".concat(pluralize(extraResults, "result"), " more");
42
+ }
27
43
  };
@@ -18,7 +18,7 @@ export var ApplicationAvatar = function ApplicationAvatar(_ref) {
18
18
  _ref$size = _ref.size,
19
19
  size = _ref$size === void 0 ? "medium" : _ref$size;
20
20
  return /*#__PURE__*/_jsx("div", {
21
- className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["rounded inline-flex flex-shrink-0 items-center justify-center uppercase"]))), pickApplicationColors(application.applicationId), SIZE_CLASSNAMES[size], className),
21
+ className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["rounded inline-flex shrink-0 items-center justify-center uppercase"]))), pickApplicationColors(application.applicationId), SIZE_CLASSNAMES[size], className),
22
22
  style: size === "small" ? {
23
23
  fontSize: "8px"
24
24
  } : {},
@@ -18,6 +18,7 @@ export interface AlertProps {
18
18
  usageContext?: AlertContextType;
19
19
  icon?: IconComponentType;
20
20
  onDismiss?(): void;
21
+ children: ReactNode;
21
22
  }
22
23
  /**
23
24
  * Alerts inform users about important changes or temporally conditions. Use this component if you need to communicate something to users in a prominent way.
@@ -106,7 +106,7 @@ export var Alert = function Alert(_ref) {
106
106
  className: containerClassName,
107
107
  style: style,
108
108
  children: [/*#__PURE__*/_jsx(Icon, {
109
- className: cx(stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n flex-shrink-0 mr-2\n ", "\n "])), title ? "mt-1" : "mt-2px"), ICON_CLASSNAME_VARIANTS[variant]),
109
+ className: cx(stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n shrink-0 mr-2\n ", "\n "])), title ? "mt-1" : "mt-2px"), ICON_CLASSNAME_VARIANTS[variant]),
110
110
  size: "1rem"
111
111
  }), /*#__PURE__*/_jsxs("div", {
112
112
  className: stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["flex flex-1 flex-col ", ""])), onDismiss && "mr-6"),
@@ -1,7 +1,8 @@
1
- import type { FC } from "react";
1
+ import type { FC, ReactNode } from "react";
2
2
  import type { IconComponentType } from "../../types";
3
3
  export interface BigBerthaProps {
4
4
  icon?: IconComponentType;
5
+ children: ReactNode;
5
6
  }
6
7
  /**
7
8
  * Major product wide announcement from Algolia to the users.
@@ -17,6 +17,7 @@ export declare type PromoteProps = {
17
17
  /** Buttons */
18
18
  actions?: ReactNode;
19
19
  onDismiss?(): void;
20
+ children: ReactNode;
20
21
  } & (CompactPromoteProps | WidePromoteProps);
21
22
  /**
22
23
  * A contextual way of showing our user that a new feature / product is available to them on a higher plan or as an option.
@@ -68,12 +68,12 @@ export var Button = function Button(props) {
68
68
  size: BUTTON_LOADER_ICON_SIZES[size],
69
69
  thickness: 1
70
70
  }), StartIcon && /*#__PURE__*/_jsx(StartIcon, {
71
- className: cx(stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["flex-shrink-0 pr-2"]))), iconClassNames)
71
+ className: cx(stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["shrink-0 pr-2"]))), iconClassNames)
72
72
  }), /*#__PURE__*/_jsx("span", {
73
73
  className: cx(stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["truncate text-center"]))), textClassNames),
74
74
  children: children
75
75
  }), EndIcon && /*#__PURE__*/_jsx(EndIcon, {
76
- className: cx(stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["flex-shrink-0 pl-2"]))), iconClassNames)
76
+ className: cx(stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["shrink-0 pl-2"]))), iconClassNames)
77
77
  })]
78
78
  }));
79
79
  };
@@ -1,5 +1,5 @@
1
1
  export = buttonPlugin;
2
- /**
3
- * @type {import('../tailwind-types').TailwindPlugin}
4
- */
5
- declare const buttonPlugin: import('../tailwind-types').TailwindPlugin;
2
+ declare const buttonPlugin: {
3
+ handler: import("tailwindcss/types/config").PluginCreator;
4
+ config?: import("tailwindcss").Config | undefined;
5
+ };
@@ -1,13 +1,11 @@
1
- import _disabledColor from "../styles/disabledColor";
2
1
  import _rgba from "../styles/rgba";
2
+ import _disabledColor from "../styles/disabledColor";
3
+ import _plugin from "tailwindcss/plugin";
3
4
  // @ts-check
4
- var rgba = _rgba;
5
+ var plugin = _plugin;
5
6
  var disabledColor = _disabledColor;
6
- /**
7
- * @type {import('../tailwind-types').TailwindPlugin}
8
- */
9
-
10
- var buttonPlugin = function buttonPlugin(_ref) {
7
+ var rgba = _rgba;
8
+ var buttonPlugin = plugin(function (_ref) {
11
9
  var addComponents = _ref.addComponents,
12
10
  theme = _ref.theme;
13
11
  // Button
@@ -135,24 +133,23 @@ var buttonPlugin = function buttonPlugin(_ref) {
135
133
  display: "flex",
136
134
  flexWrap: "nowrap",
137
135
  "& > .btn:not(:first-child):not(:last-child), & > :not(:first-child):not(:last-child) .btn": {
138
- borderRadius: 0
136
+ borderRadius: "0px"
139
137
  },
140
138
  "& > .btn:first-child, & > :first-child .btn": {
141
- borderTopRightRadius: 0,
142
- borderBottomRightRadius: 0
139
+ borderTopRightRadius: "0px",
140
+ borderBottomRightRadius: "0px"
143
141
  },
144
142
  "& > .btn:not(:first-child), & > :not(:first-child) .btn": {
145
- marginLeft: -1
143
+ marginLeft: "-1px"
146
144
  },
147
145
  "& > .btn:last-child, & > :last-child .btn": {
148
- borderTopLeftRadius: 0,
149
- borderBottomLeftRadius: 0
146
+ borderTopLeftRadius: "0px",
147
+ borderBottomLeftRadius: "0px"
150
148
  },
151
149
  "& .btn:active, & .btn-active, & .btn:focus": {
152
- zIndex: 1
150
+ zIndex: "1"
153
151
  }
154
152
  }
155
153
  });
156
- };
157
-
154
+ });
158
155
  export default buttonPlugin;