@algolia/satellite 1.0.0-beta.133 → 1.0.0-beta.136

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 (479) hide show
  1. package/README.md +33 -28
  2. package/cjs/AnnouncementBadge/AnnouncementBadge.d.ts +6 -2
  3. package/cjs/AnnouncementBadge/AnnouncementBadge.js +16 -4
  4. package/cjs/AutoComplete/AutoComplete.d.ts +5 -10
  5. package/cjs/AutoComplete/AutoComplete.js +28 -50
  6. package/cjs/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
  7. package/cjs/AutoComplete/AutoComplete.tailwind.js +10 -13
  8. package/cjs/AutoComplete/utils.d.ts +2 -1
  9. package/cjs/AutoComplete/utils.js +22 -2
  10. package/cjs/Avatars/ApplicationAvatar.js +2 -2
  11. package/cjs/Avatars/UserAvatar.js +2 -2
  12. package/cjs/Avatars/utils.js +12 -4
  13. package/cjs/Badge/Badge.js +2 -2
  14. package/cjs/Banners/Alert/Alert.d.ts +1 -0
  15. package/cjs/Banners/Alert/Alert.js +3 -3
  16. package/cjs/Banners/BigBertha/BigBertha.d.ts +2 -1
  17. package/cjs/Banners/Promote/Promote.d.ts +1 -0
  18. package/cjs/Banners/Promote/Promote.js +2 -2
  19. package/cjs/Button/Button.js +7 -7
  20. package/cjs/Button/Button.tailwind.d.ts +4 -4
  21. package/cjs/Button/Button.tailwind.js +11 -14
  22. package/cjs/Button/ButtonGroup.d.ts +2 -1
  23. package/cjs/Button/ButtonGroup.js +2 -2
  24. package/cjs/Button/IconButton.js +3 -3
  25. package/cjs/Card/Card.js +2 -2
  26. package/cjs/Card/Card.tailwind.d.ts +4 -4
  27. package/cjs/Card/Card.tailwind.js +5 -8
  28. package/cjs/Card/components/CardHeader.js +2 -2
  29. package/cjs/Card/components/CardTitle.d.ts +4 -2
  30. package/cjs/Card/components/CardTitle.js +2 -2
  31. package/cjs/Checkbox/Checkbox.d.ts +2 -2
  32. package/cjs/Checkbox/Checkbox.js +3 -3
  33. package/cjs/Checkbox/Checkbox.tailwind.d.ts +5 -5
  34. package/cjs/Checkbox/Checkbox.tailwind.js +11 -14
  35. package/cjs/ClickAwayContainer/ClickAwayContainer.d.ts +2 -1
  36. package/cjs/DatePicker/DatePicker/DatePicker.js +13 -7
  37. package/cjs/DatePicker/DatePicker.tailwind.d.ts +4 -4
  38. package/cjs/DatePicker/DatePicker.tailwind.js +32 -27
  39. package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +14 -3
  40. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +2 -1
  41. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +1 -1
  42. package/cjs/DatePicker/components/Calendar.d.ts +2 -1
  43. package/cjs/DatePicker/components/FooterActions.d.ts +2 -1
  44. package/cjs/DatePicker/components/FooterActions.js +2 -2
  45. package/cjs/DatePicker/components/Modal.js +7 -6
  46. package/cjs/DatePicker/components/NavBar.d.ts +2 -1
  47. package/cjs/DatePicker/components/NavBar.js +5 -5
  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 +7 -6
  52. package/cjs/Dropdown/DropdownButton.d.ts +1 -0
  53. package/cjs/Dropdown/components/DropdownButtonItem.js +4 -4
  54. package/cjs/Dropdown/components/DropdownFooterItem.js +2 -2
  55. package/cjs/Dropdown/components/DropdownLinkItem.js +3 -4
  56. package/cjs/Dropdown/components/DropdownTitle.d.ts +4 -2
  57. package/cjs/Dropdown/components/DropdownTitle.js +2 -2
  58. package/cjs/Dropdown/components/DropdownToggleItem.js +4 -4
  59. package/cjs/Dropdown/useDropdownItemProps.d.ts +9 -1
  60. package/cjs/Dropdown/useDropdownItemProps.js +18 -9
  61. package/cjs/Dropzone/Dropzone.d.ts +5 -1
  62. package/cjs/Dropzone/Dropzone.js +16 -7
  63. package/cjs/EmptyState/EmptyState.js +5 -5
  64. package/cjs/EmptyState/EmptyState.tailwind.d.ts +4 -4
  65. package/cjs/EmptyState/EmptyState.tailwind.js +5 -8
  66. package/cjs/Field/Field.d.ts +1 -0
  67. package/cjs/Field/Field.js +3 -3
  68. package/cjs/Flag/Flag.d.ts +1 -0
  69. package/cjs/Flag/Flag.js +19 -4
  70. package/cjs/Flag/Flag.tailwind.d.ts +4 -4
  71. package/cjs/Flag/Flag.tailwind.js +8 -15
  72. package/cjs/Flag/Flags.d.ts +1 -1
  73. package/cjs/Flag/Flags.js +5 -4
  74. package/cjs/Flag/types.d.ts +4 -0
  75. package/cjs/FlexGrid/FlexGrid.d.ts +2 -1
  76. package/cjs/FlexGrid/FlexGrid.js +3 -3
  77. package/cjs/FlexGrid/FlexGrid.tailwind.d.ts +6 -3
  78. package/cjs/FlexGrid/FlexGrid.tailwind.js +8 -11
  79. package/cjs/HelpUnderline/HelpUnderline.js +3 -3
  80. package/cjs/HelpUnderline/HelpUnderline.tailwind.d.ts +4 -4
  81. package/cjs/HelpUnderline/HelpUnderline.tailwind.js +3 -6
  82. package/cjs/Input/Input.d.ts +6 -0
  83. package/cjs/Input/Input.js +17 -6
  84. package/cjs/Input/Input.tailwind.d.ts +4 -4
  85. package/cjs/Input/Input.tailwind.js +12 -15
  86. package/cjs/Insert/Insert.d.ts +1 -0
  87. package/cjs/InstantSearch/InstantSearch.tailwind.d.ts +4 -5
  88. package/cjs/InstantSearch/InstantSearch.tailwind.js +34 -32
  89. package/cjs/KeyboardKey/KeyboardKey.js +5 -4
  90. package/cjs/KeyboardKey/KeyboardKey.tailwind.d.ts +4 -4
  91. package/cjs/KeyboardKey/KeyboardKey.tailwind.js +5 -8
  92. package/cjs/Link/ButtonLink.js +1 -10
  93. package/cjs/Link/Link.js +2 -2
  94. package/cjs/Medallion/Medallion.js +3 -2
  95. package/cjs/Medallion/Medallion.tailwind.d.ts +4 -4
  96. package/cjs/Medallion/Medallion.tailwind.js +8 -11
  97. package/cjs/Modal/Modal.d.ts +5 -4
  98. package/cjs/Modal/Modal.js +19 -11
  99. package/cjs/Modal/Modal.tailwind.d.ts +4 -4
  100. package/cjs/Modal/Modal.tailwind.js +9 -18
  101. package/cjs/Modal/components/ModalFooter.d.ts +4 -2
  102. package/cjs/Modal/components/ModalFooter.js +2 -2
  103. package/cjs/Modal/components/ModalSection.js +2 -2
  104. package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +3 -7
  105. package/cjs/Pagination/CompactPagination/CompactPagination.js +30 -6
  106. package/cjs/Pagination/DotPagination/DotPagination.d.ts +5 -4
  107. package/cjs/Pagination/DotPagination/DotPagination.js +20 -4
  108. package/cjs/Pagination/Pagination/Pagination.d.ts +1 -1
  109. package/cjs/Pagination/Pagination/Pagination.js +27 -10
  110. package/cjs/ProgressBar/ProgressBar.js +3 -3
  111. package/cjs/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
  112. package/cjs/ProgressBar/ProgressBar.tailwind.js +7 -10
  113. package/cjs/ProgressSpinner/ProgressSpinner.js +2 -2
  114. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.d.ts +5 -5
  115. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +4 -7
  116. package/cjs/RadioGroup/RadioButton.d.ts +1 -1
  117. package/cjs/RadioGroup/RadioButton.js +2 -2
  118. package/cjs/RadioGroup/RadioButton.tailwind.d.ts +4 -4
  119. package/cjs/RadioGroup/RadioButton.tailwind.js +11 -14
  120. package/cjs/RadioGroup/RadioGroup.d.ts +1 -0
  121. package/cjs/RadioGroup/RadioGroup.js +1 -1
  122. package/cjs/RangeSlider/RangeSlider.d.ts +1 -1
  123. package/cjs/RangeSlider/RangeSlider.js +2 -2
  124. package/cjs/RangeSlider/RangeSlider.tailwind.d.ts +4 -4
  125. package/cjs/RangeSlider/RangeSlider.tailwind.js +21 -24
  126. package/cjs/Satellite/Satellite.d.ts +5 -1
  127. package/cjs/Satellite/Satellite.js +9 -2
  128. package/cjs/Satellite/SatelliteContext.d.ts +4 -1
  129. package/cjs/Satellite/SatelliteContext.js +2 -1
  130. package/cjs/Satellite/index.d.ts +2 -0
  131. package/cjs/Satellite/index.js +28 -0
  132. package/cjs/Satellite/locale.d.ts +29 -0
  133. package/cjs/Satellite/locale.js +21 -0
  134. package/cjs/Satellite/useCreatePortal.d.ts +4 -0
  135. package/cjs/Satellite/useCreatePortal.js +29 -0
  136. package/cjs/ScrollIndicator/ScrollIndicator.d.ts +2 -1
  137. package/cjs/ScrollIndicator/ScrollIndicator.js +5 -4
  138. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
  139. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
  140. package/cjs/Select/Select.js +2 -2
  141. package/cjs/Select/Select.tailwind.d.ts +5 -5
  142. package/cjs/Select/Select.tailwind.js +5 -8
  143. package/cjs/Sidebar/Sidebar.d.ts +33 -12
  144. package/cjs/Sidebar/Sidebar.js +49 -39
  145. package/cjs/Sidebar/SidebarButtonLink.d.ts +14 -0
  146. package/cjs/Sidebar/SidebarButtonLink.js +110 -0
  147. package/cjs/Sidebar/SidebarContext.d.ts +7 -8
  148. package/cjs/Sidebar/SidebarContext.js +10 -11
  149. package/cjs/Sidebar/SidebarHeader.d.ts +6 -0
  150. package/cjs/Sidebar/SidebarHeader.js +29 -0
  151. package/cjs/Sidebar/SidebarHeading.d.ts +7 -0
  152. package/cjs/Sidebar/SidebarHeading.js +37 -0
  153. package/cjs/Sidebar/SidebarLink.d.ts +8 -0
  154. package/cjs/Sidebar/SidebarLink.js +58 -0
  155. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
  156. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +47 -0
  157. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
  158. package/cjs/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +14 -23
  159. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
  160. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +120 -0
  161. package/cjs/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
  162. package/cjs/Sidebar/SidebarLinksGroup/index.js +18 -0
  163. package/cjs/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
  164. package/cjs/{tailwind-types.js → Sidebar/SidebarLinksGroup/types.js} +0 -0
  165. package/cjs/Sidebar/SidebarNav.d.ts +10 -0
  166. package/cjs/Sidebar/SidebarNav.js +48 -0
  167. package/cjs/Sidebar/index.d.ts +7 -4
  168. package/cjs/Sidebar/index.js +61 -21
  169. package/cjs/Sidebar/types.d.ts +6 -2
  170. package/cjs/Switch/Switch.js +2 -2
  171. package/cjs/Switch/Switch.tailwind.d.ts +5 -5
  172. package/cjs/Switch/Switch.tailwind.js +7 -8
  173. package/cjs/Switch/SwitchOption.d.ts +2 -1
  174. package/cjs/Switch/SwitchOption.js +1 -1
  175. package/cjs/Tables/DataTable/DataTable.d.ts +1 -1
  176. package/cjs/Tables/DataTable/DataTable.js +24 -7
  177. package/cjs/Tables/DataTable/DataTable.tailwind.d.ts +4 -4
  178. package/cjs/Tables/DataTable/DataTable.tailwind.js +3 -6
  179. package/cjs/Tables/DataTable/components/Body.d.ts +3 -2
  180. package/cjs/Tables/DataTable/components/Body.js +4 -4
  181. package/cjs/Tables/DataTable/components/HeaderCell.js +3 -3
  182. package/cjs/Tables/DataTable/components/Loader.d.ts +1 -1
  183. package/cjs/Tables/DataTable/components/Loader.js +2 -2
  184. package/cjs/Tables/Table/Table.js +2 -2
  185. package/cjs/Tables/Table/Table.tailwind.d.ts +4 -4
  186. package/cjs/Tables/Table/Table.tailwind.js +3 -6
  187. package/cjs/Tables/Table/components/Footer.js +2 -2
  188. package/cjs/Tabs/ContentTabs.js +3 -3
  189. package/cjs/Tabs/LinkTabs.js +2 -2
  190. package/cjs/Tabs/Tabs.tailwind.d.ts +4 -4
  191. package/cjs/Tabs/Tabs.tailwind.js +13 -16
  192. package/cjs/Tabs/components/LinkTab.js +9 -11
  193. package/cjs/Tag/Tag.d.ts +5 -4
  194. package/cjs/Tag/Tag.js +17 -9
  195. package/cjs/Tag/Tag.tailwind.d.ts +4 -4
  196. package/cjs/Tag/Tag.tailwind.js +6 -9
  197. package/cjs/TextArea/TextArea.js +2 -2
  198. package/cjs/TextArea/TextArea.tailwind.d.ts +4 -4
  199. package/cjs/TextArea/TextArea.tailwind.js +4 -7
  200. package/cjs/Toggle/Toggle.d.ts +1 -1
  201. package/cjs/Toggle/Toggle.js +2 -2
  202. package/cjs/Toggle/Toggle.tailwind.d.ts +5 -5
  203. package/cjs/Toggle/Toggle.tailwind.js +19 -22
  204. package/cjs/Tooltip/OverflowTooltipWrapper.js +8 -7
  205. package/cjs/Tooltip/Tooltip.d.ts +1 -1
  206. package/cjs/Tooltip/Tooltip.js +2 -2
  207. package/cjs/Tooltip/Tooltip.tailwind.d.ts +4 -4
  208. package/cjs/Tooltip/Tooltip.tailwind.js +19 -18
  209. package/cjs/Tooltip/TooltipWrapper.d.ts +1 -0
  210. package/cjs/Tooltip/TooltipWrapper.js +8 -7
  211. package/cjs/Tooltip/types.d.ts +2 -0
  212. package/cjs/Typography/Typography.tailwind.d.ts +5 -17
  213. package/cjs/Typography/Typography.tailwind.js +123 -133
  214. package/cjs/UserContent/UserContent.js +2 -2
  215. package/cjs/UserContent/UserContent.tailwind.d.ts +4 -1
  216. package/cjs/UserContent/UserContent.tailwind.js +12 -10
  217. package/cjs/index.d.ts +0 -1
  218. package/cjs/index.js +0 -14
  219. package/cjs/styles/base.tailwind.d.ts +4 -4
  220. package/cjs/styles/base.tailwind.js +3 -6
  221. package/cjs/styles/tailwind.config.d.ts +2 -198
  222. package/cjs/styles/tailwind.config.js +25 -29
  223. package/cjs/types.d.ts +7 -0
  224. package/cjs/utilities/utilities.tailwind.d.ts +4 -1
  225. package/cjs/utilities/utilities.tailwind.js +4 -6
  226. package/cjs/utils/isCssPropertySupported.d.ts +1 -1
  227. package/cjs/utils/useLinkProps.d.ts +5 -2
  228. package/cjs/utils/useLinkProps.js +9 -2
  229. package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +6 -2
  230. package/esm/AnnouncementBadge/AnnouncementBadge.js +14 -3
  231. package/esm/AutoComplete/AutoComplete.d.ts +5 -10
  232. package/esm/AutoComplete/AutoComplete.js +26 -47
  233. package/esm/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
  234. package/esm/AutoComplete/AutoComplete.tailwind.js +10 -13
  235. package/esm/AutoComplete/utils.d.ts +2 -1
  236. package/esm/AutoComplete/utils.js +16 -0
  237. package/esm/Avatars/ApplicationAvatar.js +2 -2
  238. package/esm/Avatars/UserAvatar.js +1 -1
  239. package/esm/Avatars/utils.js +12 -4
  240. package/esm/Badge/Badge.js +1 -1
  241. package/esm/Banners/Alert/Alert.d.ts +1 -0
  242. package/esm/Banners/Alert/Alert.js +2 -2
  243. package/esm/Banners/BigBertha/BigBertha.d.ts +2 -1
  244. package/esm/Banners/Promote/Promote.d.ts +1 -0
  245. package/esm/Banners/Promote/Promote.js +1 -1
  246. package/esm/Button/Button.js +3 -3
  247. package/esm/Button/Button.tailwind.d.ts +4 -4
  248. package/esm/Button/Button.tailwind.js +13 -16
  249. package/esm/Button/ButtonGroup.d.ts +2 -1
  250. package/esm/Button/ButtonGroup.js +1 -1
  251. package/esm/Button/IconButton.js +1 -1
  252. package/esm/Card/Card.js +1 -1
  253. package/esm/Card/Card.tailwind.d.ts +4 -4
  254. package/esm/Card/Card.tailwind.js +6 -9
  255. package/esm/Card/components/CardHeader.js +1 -1
  256. package/esm/Card/components/CardTitle.d.ts +4 -2
  257. package/esm/Card/components/CardTitle.js +1 -1
  258. package/esm/Checkbox/Checkbox.d.ts +2 -2
  259. package/esm/Checkbox/Checkbox.js +1 -1
  260. package/esm/Checkbox/Checkbox.tailwind.d.ts +5 -5
  261. package/esm/Checkbox/Checkbox.tailwind.js +11 -14
  262. package/esm/ClickAwayContainer/ClickAwayContainer.d.ts +2 -1
  263. package/esm/DatePicker/DatePicker/DatePicker.js +12 -7
  264. package/esm/DatePicker/DatePicker.tailwind.d.ts +4 -4
  265. package/esm/DatePicker/DatePicker.tailwind.js +32 -28
  266. package/esm/DatePicker/DateRangePicker/DateRangePicker.js +12 -2
  267. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +2 -1
  268. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +1 -1
  269. package/esm/DatePicker/components/Calendar.d.ts +2 -1
  270. package/esm/DatePicker/components/FooterActions.d.ts +2 -1
  271. package/esm/DatePicker/components/FooterActions.js +2 -2
  272. package/esm/DatePicker/components/Modal.js +5 -4
  273. package/esm/DatePicker/components/NavBar.d.ts +2 -1
  274. package/esm/DatePicker/components/NavBar.js +4 -4
  275. package/esm/DatePicker/utils.d.ts +2 -0
  276. package/esm/DatePicker/utils.js +7 -0
  277. package/esm/Dropdown/Dropdown.d.ts +1 -1
  278. package/esm/Dropdown/Dropdown.js +5 -4
  279. package/esm/Dropdown/DropdownButton.d.ts +1 -0
  280. package/esm/Dropdown/components/DropdownButtonItem.js +3 -3
  281. package/esm/Dropdown/components/DropdownFooterItem.js +1 -1
  282. package/esm/Dropdown/components/DropdownLinkItem.js +2 -3
  283. package/esm/Dropdown/components/DropdownTitle.d.ts +4 -2
  284. package/esm/Dropdown/components/DropdownTitle.js +1 -1
  285. package/esm/Dropdown/components/DropdownToggleItem.js +3 -3
  286. package/esm/Dropdown/useDropdownItemProps.d.ts +9 -1
  287. package/esm/Dropdown/useDropdownItemProps.js +16 -8
  288. package/esm/Dropzone/Dropzone.d.ts +5 -1
  289. package/esm/Dropzone/Dropzone.js +15 -6
  290. package/esm/EmptyState/EmptyState.js +1 -1
  291. package/esm/EmptyState/EmptyState.tailwind.d.ts +4 -4
  292. package/esm/EmptyState/EmptyState.tailwind.js +6 -9
  293. package/esm/Field/Field.d.ts +1 -0
  294. package/esm/Field/Field.js +1 -1
  295. package/esm/Flag/Flag.d.ts +1 -0
  296. package/esm/Flag/Flag.js +16 -3
  297. package/esm/Flag/Flag.tailwind.d.ts +4 -4
  298. package/esm/Flag/Flag.tailwind.js +9 -16
  299. package/esm/Flag/Flags.d.ts +1 -1
  300. package/esm/Flag/Flags.js +4 -3
  301. package/esm/Flag/types.d.ts +4 -0
  302. package/esm/FlexGrid/FlexGrid.d.ts +2 -1
  303. package/esm/FlexGrid/FlexGrid.js +1 -1
  304. package/esm/FlexGrid/FlexGrid.tailwind.d.ts +6 -3
  305. package/esm/FlexGrid/FlexGrid.tailwind.js +8 -11
  306. package/esm/HelpUnderline/HelpUnderline.js +1 -1
  307. package/esm/HelpUnderline/HelpUnderline.tailwind.d.ts +4 -4
  308. package/esm/HelpUnderline/HelpUnderline.tailwind.js +4 -7
  309. package/esm/Input/Input.d.ts +6 -0
  310. package/esm/Input/Input.js +16 -5
  311. package/esm/Input/Input.tailwind.d.ts +4 -4
  312. package/esm/Input/Input.tailwind.js +14 -17
  313. package/esm/Insert/Insert.d.ts +1 -0
  314. package/esm/InstantSearch/InstantSearch.tailwind.d.ts +4 -5
  315. package/esm/InstantSearch/InstantSearch.tailwind.js +35 -33
  316. package/esm/KeyboardKey/KeyboardKey.js +4 -3
  317. package/esm/KeyboardKey/KeyboardKey.tailwind.d.ts +4 -4
  318. package/esm/KeyboardKey/KeyboardKey.tailwind.js +6 -9
  319. package/esm/Link/ButtonLink.js +1 -10
  320. package/esm/Link/Link.js +1 -1
  321. package/esm/Medallion/Medallion.js +2 -1
  322. package/esm/Medallion/Medallion.tailwind.d.ts +4 -4
  323. package/esm/Medallion/Medallion.tailwind.js +8 -11
  324. package/esm/Modal/Modal.d.ts +5 -4
  325. package/esm/Modal/Modal.js +15 -8
  326. package/esm/Modal/Modal.tailwind.d.ts +4 -4
  327. package/esm/Modal/Modal.tailwind.js +10 -19
  328. package/esm/Modal/components/ModalFooter.d.ts +4 -2
  329. package/esm/Modal/components/ModalFooter.js +1 -1
  330. package/esm/Modal/components/ModalSection.js +1 -1
  331. package/esm/Pagination/CompactPagination/CompactPagination.d.ts +3 -7
  332. package/esm/Pagination/CompactPagination/CompactPagination.js +27 -6
  333. package/esm/Pagination/DotPagination/DotPagination.d.ts +5 -4
  334. package/esm/Pagination/DotPagination/DotPagination.js +17 -4
  335. package/esm/Pagination/Pagination/Pagination.d.ts +1 -1
  336. package/esm/Pagination/Pagination/Pagination.js +25 -10
  337. package/esm/ProgressBar/ProgressBar.js +1 -1
  338. package/esm/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
  339. package/esm/ProgressBar/ProgressBar.tailwind.js +7 -10
  340. package/esm/ProgressSpinner/ProgressSpinner.js +1 -1
  341. package/esm/ProgressSpinner/ProgressSpinner.tailwind.d.ts +5 -5
  342. package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +5 -8
  343. package/esm/RadioGroup/RadioButton.d.ts +1 -1
  344. package/esm/RadioGroup/RadioButton.js +1 -1
  345. package/esm/RadioGroup/RadioButton.tailwind.d.ts +4 -4
  346. package/esm/RadioGroup/RadioButton.tailwind.js +13 -16
  347. package/esm/RadioGroup/RadioGroup.d.ts +1 -0
  348. package/esm/RadioGroup/RadioGroup.js +1 -1
  349. package/esm/RangeSlider/RangeSlider.d.ts +1 -1
  350. package/esm/RangeSlider/RangeSlider.js +1 -1
  351. package/esm/RangeSlider/RangeSlider.tailwind.d.ts +4 -4
  352. package/esm/RangeSlider/RangeSlider.tailwind.js +21 -24
  353. package/esm/Satellite/Satellite.d.ts +5 -1
  354. package/esm/Satellite/Satellite.js +8 -2
  355. package/esm/Satellite/SatelliteContext.d.ts +4 -1
  356. package/esm/Satellite/SatelliteContext.js +2 -1
  357. package/esm/Satellite/index.d.ts +2 -0
  358. package/esm/Satellite/index.js +2 -0
  359. package/esm/Satellite/locale.d.ts +29 -0
  360. package/esm/Satellite/locale.js +8 -0
  361. package/esm/Satellite/useCreatePortal.d.ts +4 -0
  362. package/esm/Satellite/useCreatePortal.js +16 -0
  363. package/esm/ScrollIndicator/ScrollIndicator.d.ts +2 -1
  364. package/esm/ScrollIndicator/ScrollIndicator.js +3 -2
  365. package/esm/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
  366. package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
  367. package/esm/Select/Select.js +1 -1
  368. package/esm/Select/Select.tailwind.d.ts +5 -5
  369. package/esm/Select/Select.tailwind.js +5 -8
  370. package/esm/Sidebar/Sidebar.d.ts +33 -12
  371. package/esm/Sidebar/Sidebar.js +45 -30
  372. package/esm/Sidebar/SidebarButtonLink.d.ts +14 -0
  373. package/esm/Sidebar/SidebarButtonLink.js +92 -0
  374. package/esm/Sidebar/SidebarContext.d.ts +7 -8
  375. package/esm/Sidebar/SidebarContext.js +9 -8
  376. package/esm/Sidebar/SidebarHeader.d.ts +6 -0
  377. package/esm/Sidebar/SidebarHeader.js +15 -0
  378. package/esm/Sidebar/SidebarHeading.d.ts +7 -0
  379. package/esm/Sidebar/SidebarHeading.js +22 -0
  380. package/esm/Sidebar/SidebarLink.d.ts +8 -0
  381. package/esm/Sidebar/SidebarLink.js +42 -0
  382. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
  383. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +32 -0
  384. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
  385. package/esm/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +13 -19
  386. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
  387. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +100 -0
  388. package/esm/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
  389. package/esm/Sidebar/SidebarLinksGroup/index.js +2 -0
  390. package/esm/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
  391. package/esm/{tailwind-types.js → Sidebar/SidebarLinksGroup/types.js} +0 -0
  392. package/esm/Sidebar/SidebarNav.d.ts +10 -0
  393. package/esm/Sidebar/SidebarNav.js +33 -0
  394. package/esm/Sidebar/index.d.ts +7 -4
  395. package/esm/Sidebar/index.js +7 -4
  396. package/esm/Sidebar/types.d.ts +6 -2
  397. package/esm/Switch/Switch.js +1 -1
  398. package/esm/Switch/Switch.tailwind.d.ts +5 -5
  399. package/esm/Switch/Switch.tailwind.js +7 -8
  400. package/esm/Switch/SwitchOption.d.ts +2 -1
  401. package/esm/Switch/SwitchOption.js +1 -1
  402. package/esm/Tables/DataTable/DataTable.d.ts +1 -1
  403. package/esm/Tables/DataTable/DataTable.js +21 -6
  404. package/esm/Tables/DataTable/DataTable.tailwind.d.ts +4 -4
  405. package/esm/Tables/DataTable/DataTable.tailwind.js +4 -7
  406. package/esm/Tables/DataTable/components/Body.d.ts +3 -2
  407. package/esm/Tables/DataTable/components/Body.js +4 -4
  408. package/esm/Tables/DataTable/components/HeaderCell.js +1 -1
  409. package/esm/Tables/DataTable/components/Loader.d.ts +1 -1
  410. package/esm/Tables/DataTable/components/Loader.js +2 -2
  411. package/esm/Tables/Table/Table.js +1 -1
  412. package/esm/Tables/Table/Table.tailwind.d.ts +4 -4
  413. package/esm/Tables/Table/Table.tailwind.js +4 -7
  414. package/esm/Tables/Table/components/Footer.js +1 -1
  415. package/esm/Tabs/ContentTabs.js +1 -1
  416. package/esm/Tabs/LinkTabs.js +1 -1
  417. package/esm/Tabs/Tabs.tailwind.d.ts +4 -4
  418. package/esm/Tabs/Tabs.tailwind.js +14 -17
  419. package/esm/Tabs/components/LinkTab.js +8 -10
  420. package/esm/Tag/Tag.d.ts +5 -4
  421. package/esm/Tag/Tag.js +14 -7
  422. package/esm/Tag/Tag.tailwind.d.ts +4 -4
  423. package/esm/Tag/Tag.tailwind.js +7 -10
  424. package/esm/TextArea/TextArea.js +1 -1
  425. package/esm/TextArea/TextArea.tailwind.d.ts +4 -4
  426. package/esm/TextArea/TextArea.tailwind.js +6 -9
  427. package/esm/Toggle/Toggle.d.ts +1 -1
  428. package/esm/Toggle/Toggle.js +1 -1
  429. package/esm/Toggle/Toggle.tailwind.d.ts +5 -5
  430. package/esm/Toggle/Toggle.tailwind.js +19 -22
  431. package/esm/Tooltip/OverflowTooltipWrapper.js +5 -4
  432. package/esm/Tooltip/Tooltip.d.ts +1 -1
  433. package/esm/Tooltip/Tooltip.js +1 -1
  434. package/esm/Tooltip/Tooltip.tailwind.d.ts +4 -4
  435. package/esm/Tooltip/Tooltip.tailwind.js +20 -19
  436. package/esm/Tooltip/TooltipWrapper.d.ts +1 -0
  437. package/esm/Tooltip/TooltipWrapper.js +5 -4
  438. package/esm/Tooltip/types.d.ts +2 -0
  439. package/esm/Typography/Typography.tailwind.d.ts +5 -17
  440. package/esm/Typography/Typography.tailwind.js +124 -134
  441. package/esm/UserContent/UserContent.js +1 -1
  442. package/esm/UserContent/UserContent.tailwind.d.ts +4 -1
  443. package/esm/UserContent/UserContent.tailwind.js +13 -11
  444. package/esm/index.d.ts +0 -1
  445. package/esm/index.js +0 -1
  446. package/esm/styles/base.tailwind.d.ts +4 -4
  447. package/esm/styles/base.tailwind.js +4 -7
  448. package/esm/styles/tailwind.config.d.ts +2 -198
  449. package/esm/styles/tailwind.config.js +27 -30
  450. package/esm/types.d.ts +7 -0
  451. package/esm/utilities/utilities.tailwind.d.ts +4 -1
  452. package/esm/utilities/utilities.tailwind.js +4 -6
  453. package/esm/utils/isCssPropertySupported.d.ts +1 -1
  454. package/esm/utils/useLinkProps.d.ts +5 -2
  455. package/esm/utils/useLinkProps.js +9 -2
  456. package/package.json +9 -12
  457. package/satellite.min.css +2 -4
  458. package/scss/colors.scss +1 -0
  459. package/cjs/Banner/Banner.d.ts +0 -85
  460. package/cjs/Banner/Banner.js +0 -176
  461. package/cjs/Banner/index.d.ts +0 -2
  462. package/cjs/Banner/index.js +0 -32
  463. package/cjs/Sidebar/Sidebar.tailwind.d.ts +0 -5
  464. package/cjs/Sidebar/Sidebar.tailwind.js +0 -69
  465. package/cjs/Sidebar/components/SidebarHeader.d.ts +0 -5
  466. package/cjs/Sidebar/components/SidebarLink.d.ts +0 -9
  467. package/cjs/Sidebar/components/SidebarLink.js +0 -98
  468. package/cjs/tailwind-types.d.ts +0 -52
  469. package/esm/Banner/Banner.d.ts +0 -85
  470. package/esm/Banner/Banner.js +0 -161
  471. package/esm/Banner/index.d.ts +0 -2
  472. package/esm/Banner/index.js +0 -2
  473. package/esm/Sidebar/Sidebar.tailwind.d.ts +0 -5
  474. package/esm/Sidebar/Sidebar.tailwind.js +0 -67
  475. package/esm/Sidebar/components/SidebarHeader.d.ts +0 -5
  476. package/esm/Sidebar/components/SidebarLink.d.ts +0 -9
  477. package/esm/Sidebar/components/SidebarLink.js +0 -78
  478. package/esm/tailwind-types.d.ts +0 -52
  479. package/satellite.css +0 -196852
@@ -8,31 +8,25 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
8
8
 
9
9
  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
10
 
11
- var NODE_ENV = process.env.NODE_ENV;
11
+ // @ts-check
12
+ var colors = require("./colors");
12
13
 
13
- var typography = require("../Typography/Typography.tailwind");
14
+ var makePurgeCssExtractor = require("./helpers/makePurgeCssExtractor.js");
14
15
 
15
16
  var rgba = require("./rgba");
16
17
 
17
- var colors = require("./colors");
18
-
19
18
  var zIndexes = require("./zIndexes");
20
19
 
21
- var makePurgeCssExtractor = require("./helpers/makePurgeCssExtractor.js");
22
-
23
20
  var prefix = "stl-";
24
- var purge = {
25
- mode: "layers",
26
- layers: ["utilities"],
27
- enabled: NODE_ENV === "production" || NODE_ENV === "storybook",
28
- content: [NODE_ENV === "production" ? "./src/**/!(*.test|*.stories).{ts,tsx}" : "./src/**/!(*.test).{ts,tsx,mdx}", "./src/**/*.tailwind.js"],
29
- options: {
30
- defaultExtractor: makePurgeCssExtractor(prefix)
31
- }
32
- };
21
+ /** @type {import('tailwindcss').Config} */
22
+
33
23
  module.exports = {
34
24
  prefix: prefix,
35
- purge: purge,
25
+ content: {
26
+ files: ["./src/**/*.tailwind.js", "./src/**/!(*.test|*.stories).{ts,tsx}"],
27
+ extract: makePurgeCssExtractor(prefix)
28
+ },
29
+ safelist: ["stl-instantsearch"],
36
30
  theme: {
37
31
  fontFamily: {
38
32
  sans: ["-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "Noto Sans", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"],
@@ -85,7 +79,8 @@ module.exports = {
85
79
  2: "2px",
86
80
  3: "3px"
87
81
  },
88
- boxShadow: function boxShadow(theme) {
82
+ boxShadow: function boxShadow(_ref) {
83
+ var theme = _ref.theme;
89
84
  return {
90
85
  none: "none",
91
86
  z100: "0px 0px 0px 1px ".concat(theme("colors.shadow.5"), ", 0px 1px 3px 0px ").concat(theme("colors.shadow.15")),
@@ -112,6 +107,7 @@ module.exports = {
112
107
  accent: colors.nebula,
113
108
  inherit: "inherit",
114
109
  transparent: "transparent",
110
+ current: "currentColor",
115
111
  shadow: {
116
112
  5: rgba(colors.grey[900], 0.05),
117
113
  10: rgba(colors.grey[900], 0.1),
@@ -124,19 +120,24 @@ module.exports = {
124
120
  "2px": "2px",
125
121
  128: "32rem"
126
122
  },
127
- inset: function inset(theme) {
123
+ inset: function inset(_ref2) {
124
+ var theme = _ref2.theme;
128
125
  return theme("width");
129
126
  },
130
- maxWidth: function maxWidth(theme) {
127
+ maxWidth: function maxWidth(_ref3) {
128
+ var theme = _ref3.theme;
131
129
  return theme("width");
132
130
  },
133
- minWidth: function minWidth(theme) {
131
+ minWidth: function minWidth(_ref4) {
132
+ var theme = _ref4.theme;
134
133
  return theme("width");
135
134
  },
136
- maxHeight: function maxHeight(theme) {
135
+ maxHeight: function maxHeight(_ref5) {
136
+ var theme = _ref5.theme;
137
137
  return theme("height");
138
138
  },
139
- minHeight: function minHeight(theme) {
139
+ minHeight: function minHeight(_ref6) {
140
+ var theme = _ref6.theme;
140
141
  return theme("height");
141
142
  },
142
143
  zIndex: zIndexes,
@@ -144,12 +145,7 @@ module.exports = {
144
145
  grab: "grab",
145
146
  help: "help"
146
147
  }
147
- },
148
- typography: typography.styles
149
- },
150
- variants: {
151
- borderWidth: ["responsive", "first"],
152
- visibility: ["responsive", "group-hover"]
148
+ }
153
149
  },
154
- plugins: [require("./base.tailwind"), require("../utilities/utilities.tailwind"), typography.plugin, require("../FlexGrid/FlexGrid.tailwind"), require("../AutoComplete/AutoComplete.tailwind"), require("../Button/Button.tailwind"), require("../Card/Card.tailwind"), require("../Checkbox/Checkbox.tailwind"), require("../EmptyState/EmptyState.tailwind"), require("../Flag/Flag.tailwind"), require("../HelpUnderline/HelpUnderline.tailwind"), require("../Input/Input.tailwind"), require("../InstantSearch/InstantSearch.tailwind"), require("../KeyboardKey/KeyboardKey.tailwind"), require("../Medallion/Medallion.tailwind"), require("../Modal/Modal.tailwind"), require("../ProgressBar/ProgressBar.tailwind"), require("../ProgressSpinner/ProgressSpinner.tailwind"), require("../RadioGroup/RadioButton.tailwind"), require("../RangeSlider/RangeSlider.tailwind"), require("../ScrollIndicator/ScrollIndicator.tailwind"), require("../Select/Select.tailwind"), require("../Sidebar/Sidebar.tailwind"), require("../Switch/Switch.tailwind"), require("../Tabs/Tabs.tailwind"), require("../Tables/DataTable/DataTable.tailwind"), require("../Tables/Table/Table.tailwind"), require("../Tag/Tag.tailwind"), require("../TextArea/TextArea.tailwind"), require("../Toggle/Toggle.tailwind"), require("../Tooltip/Tooltip.tailwind"), require("../UserContent/UserContent.tailwind"), require("../DatePicker/DatePicker.tailwind")]
150
+ plugins: [require("./base.tailwind"), require("../utilities/utilities.tailwind"), require("../Typography/Typography.tailwind"), require("../FlexGrid/FlexGrid.tailwind"), require("../AutoComplete/AutoComplete.tailwind"), require("../Button/Button.tailwind"), require("../Card/Card.tailwind"), require("../Checkbox/Checkbox.tailwind"), require("../EmptyState/EmptyState.tailwind"), require("../Flag/Flag.tailwind"), require("../HelpUnderline/HelpUnderline.tailwind"), require("../Input/Input.tailwind"), require("../InstantSearch/InstantSearch.tailwind"), require("../KeyboardKey/KeyboardKey.tailwind"), require("../Medallion/Medallion.tailwind"), require("../Modal/Modal.tailwind"), require("../ProgressBar/ProgressBar.tailwind"), require("../ProgressSpinner/ProgressSpinner.tailwind"), require("../RadioGroup/RadioButton.tailwind"), require("../RangeSlider/RangeSlider.tailwind"), require("../ScrollIndicator/ScrollIndicator.tailwind"), require("../Select/Select.tailwind"), require("../Switch/Switch.tailwind"), require("../Tabs/Tabs.tailwind"), require("../Tables/DataTable/DataTable.tailwind"), require("../Tables/Table/Table.tailwind"), require("../Tag/Tag.tailwind"), require("../TextArea/TextArea.tailwind"), require("../Toggle/Toggle.tailwind"), require("../Tooltip/Tooltip.tailwind"), require("../UserContent/UserContent.tailwind"), require("../DatePicker/DatePicker.tailwind")]
155
151
  };
package/cjs/types.d.ts CHANGED
@@ -10,3 +10,10 @@ export declare type ColorVariant = "accent" | "grey" | "green" | "blue" | "orang
10
10
  export declare type AtLeastOne<T, U = {
11
11
  [K in keyof T]: Pick<T, K>;
12
12
  }> = Partial<T> & U[keyof U];
13
+ /**
14
+ * Makes an optional property required
15
+ * See https://bobbyhadz.com/blog/typescript-make-property-required
16
+ */
17
+ export declare type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
18
+ [Property in Key]-?: Type[Property];
19
+ };
@@ -1,2 +1,5 @@
1
- declare const _exports: import('../tailwind-types').TailwindPlugin;
1
+ declare const _exports: {
2
+ handler: import("tailwindcss/types/config").PluginCreator;
3
+ config?: import("tailwindcss").Config | undefined;
4
+ };
2
5
  export = _exports;
@@ -5,11 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
6
6
 
7
7
  // @ts-check
8
+ var plugin = require("tailwindcss/plugin");
8
9
 
9
- /**
10
- * @type {import('../tailwind-types').TailwindPlugin}
11
- */
12
- module.exports = function (_ref) {
10
+ module.exports = plugin(function (_ref) {
13
11
  var addUtilities = _ref.addUtilities;
14
12
  addUtilities({
15
13
  ".no-scrollbar": {
@@ -20,7 +18,7 @@ module.exports = function (_ref) {
20
18
  // for Chrome, Safari, and Opera
21
19
  "&::-webkit-scrollbar": {
22
20
  display: "none",
23
- width: 0
21
+ width: "0px"
24
22
  }
25
23
  },
26
24
  ".no-search-input-decoration": {
@@ -29,4 +27,4 @@ module.exports = function (_ref) {
29
27
  })
30
28
  }
31
29
  });
32
- };
30
+ });
@@ -1,2 +1,2 @@
1
- declare const isCssPropertySupported: <P extends number | "all" | "left" | "right" | "bottom" | "top" | "font" | "clipPath" | "filter" | "marker" | "mask" | "resize" | "fill" | "color" | "clip" | "content" | "flex" | "grid" | "stroke" | "zoom" | "clear" | "border" | "padding" | "alignContent" | "alignItems" | "alignSelf" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "backfaceVisibility" | "backgroundAttachment" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "columnCount" | "columnFill" | "columnGap" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "counterIncrement" | "counterReset" | "cursor" | "direction" | "display" | "emptyCells" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineBreak" | "lineHeight" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maskComposite" | "maskImage" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "orphans" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "placeContent" | "pointerEvents" | "position" | "quotes" | "rotate" | "rowGap" | "rubyAlign" | "rubyPosition" | "scale" | "scrollBehavior" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textTransform" | "textUnderlinePosition" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "animation" | "background" | "backgroundPosition" | "borderBlockEnd" | "borderBlockStart" | "borderBottom" | "borderColor" | "borderImage" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "columnRule" | "columns" | "flexFlow" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate" | "listStyle" | "margin" | "outline" | "overflow" | "overscrollBehavior" | "placeItems" | "placeSelf" | "textDecoration" | "textEmphasis" | "transition" | "gridColumnGap" | "gridGap" | "gridRowGap" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "colorInterpolationFilters" | "cssFloat" | "cssText" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTapHighlightColor" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "getPropertyPriority" | "getPropertyValue" | "item" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
1
+ declare const isCssPropertySupported: <P extends number | "filter" | "fill" | "animationName" | "all" | "offset" | "height" | "width" | "left" | "top" | "item" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "blockSize" | "border" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "contain" | "content" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "fillOpacity" | "fillRule" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "floodColor" | "floodOpacity" | "font" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "fontWeight" | "gap" | "grid" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lightingColor" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetRotate" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "pointerEvents" | "position" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "rubyPosition" | "scale" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textAnchor" | "textCombineUpright" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "widows" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
2
2
  export default isCssPropertySupported;
@@ -1,4 +1,7 @@
1
1
  import type { AnchorHTMLAttributes } from "react";
2
- export declare type UseLinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "onClick" | "target" | "rel">;
3
- export declare const useLinkProps: (props: UseLinkProps) => UseLinkProps;
2
+ export declare type UseLinkPropsArgs = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "onClick" | "target" | "rel" | "role" | "tabIndex"> & {
3
+ disabled?: boolean;
4
+ };
5
+ export declare type UseLinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "onClick" | "target" | "rel" | "role" | "tabIndex" | "aria-disabled">;
6
+ export declare const useLinkProps: (props: UseLinkPropsArgs) => UseLinkProps;
4
7
  export default useLinkProps;
@@ -47,11 +47,18 @@ var useLinkProps = function useLinkProps(props) {
47
47
  var isExternal = router.isExternalLocation(parsedLocation);
48
48
  var target = (_props$target = props.target) !== null && _props$target !== void 0 ? _props$target : router.shouldOpenInNewTab(parsedLocation) ? "_blank" : undefined;
49
49
  var rel = (_props$rel = props.rel) !== null && _props$rel !== void 0 ? _props$rel : isExternal ? "noopener noreferrer" : undefined;
50
- return {
50
+ return props.disabled ? {
51
+ role: "link",
52
+ target: target,
53
+ tabIndex: -1,
54
+ "aria-disabled": true
55
+ } : {
51
56
  target: target,
52
57
  href: href,
53
58
  rel: rel,
54
- onClick: onClick
59
+ onClick: onClick,
60
+ role: props.role,
61
+ tabIndex: props.tabIndex
55
62
  };
56
63
  };
57
64
 
@@ -1,10 +1,14 @@
1
1
  import type { FunctionComponent, HTMLAttributes } from "react";
2
2
  export declare type AnnouncementBadgeSizes = "default" | "small";
3
+ export declare type AnnouncementBadgeTexts = "new" | "beta" | "internal" | "pilot";
4
+ export declare type AnnouncementBadgeLocale = {
5
+ [key in AnnouncementBadgeTexts]?: string;
6
+ };
3
7
  export interface AnnouncementBadgeProps extends HTMLAttributes<HTMLSpanElement> {
4
8
  size?: AnnouncementBadgeSizes;
5
- text?: "new" | "beta" | "internal" | "pilot";
9
+ text?: AnnouncementBadgeTexts;
6
10
  variant?: "accent" | "red";
7
- locale?: string;
11
+ locale?: AnnouncementBadgeLocale;
8
12
  children?: never;
9
13
  }
10
14
  export declare const AnnouncementBadge: FunctionComponent<AnnouncementBadgeProps>;
@@ -9,9 +9,16 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
9
9
 
10
10
  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
11
 
12
- import cx from "classnames";
12
+ import cx from "clsx";
13
+ import { useLocale } from "../Satellite";
13
14
  import stl from "../styles/helpers/satellitePrefixer";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
+ var DEFAULT_LOCALE = {
17
+ beta: "beta",
18
+ internal: "internal",
19
+ "new": "new",
20
+ pilot: "pilot"
21
+ };
15
22
  var DEFAULT_CLASSNAME = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["capitalize inline-block rounded-full text-white select-none"])));
16
23
  var SIZE_CLASSNAMES = {
17
24
  "default": stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["display-body h-6 leading-md px-2"]))),
@@ -24,13 +31,17 @@ export var AnnouncementBadge = function AnnouncementBadge(_ref) {
24
31
  text = _ref$text === void 0 ? "new" : _ref$text,
25
32
  variantProp = _ref.variant,
26
33
  className = _ref.className,
27
- locale = _ref.locale,
34
+ propsLocale = _ref.locale,
28
35
  props = _objectWithoutProperties(_ref, _excluded);
29
36
 
37
+ var contextLocale = useLocale("announcementBadge");
38
+
39
+ var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_LOCALE), contextLocale), propsLocale);
40
+
30
41
  var variant = typeof variantProp === "string" ? variantProp : text === "internal" ? "red" : "accent";
31
42
  return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({}, props), {}, {
32
43
  className: cx(DEFAULT_CLASSNAME, variant === "red" ? stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-red-600"]))) : stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["bg-accent-600"]))), SIZE_CLASSNAMES[size], className),
33
- children: locale || text
44
+ children: locale[text]
34
45
  }));
35
46
  };
36
47
  export default AnnouncementBadge;
@@ -10,7 +10,7 @@ interface State {
10
10
  showAllResults: boolean;
11
11
  }
12
12
  declare type DefaultOptionProps = OptionItemProps & {
13
- locale?: AutoCompleteLocale;
13
+ optionItemPrefix?: AutoCompleteLocale["optionItemPrefix"];
14
14
  };
15
15
  /**
16
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.
@@ -29,6 +29,7 @@ declare type DefaultOptionProps = OptionItemProps & {
29
29
  * - Style different data
30
30
  */
31
31
  export declare class AutoComplete<T extends Option = Option> extends Component<AutoCompleteProps<T>, State> {
32
+ static contextType: import("react").Context<import("../Satellite").SatelliteContextType>;
32
33
  static defaultProps: {
33
34
  clearable: boolean;
34
35
  creatable: boolean;
@@ -38,15 +39,8 @@ export declare class AutoComplete<T extends Option = Option> extends Component<A
38
39
  options: never[];
39
40
  separatorKeyCodes: never[];
40
41
  separatorKeys: never[];
41
- optionItemComponent: ({ locale, ...props }: DefaultOptionProps) => JSX.Element;
42
+ optionItemComponent: ({ optionItemPrefix, ...props }: DefaultOptionProps) => JSX.Element;
42
43
  noWrap: boolean;
43
- locale: {
44
- clearInputButton: string;
45
- emptyStateTitle: string;
46
- itemsAvailable: (resultCount: number) => string;
47
- showMoreButton: (extraResults: number) => string;
48
- optionItemPrefix: (multiple: boolean) => "Add" | "Use";
49
- };
50
44
  };
51
45
  state: State;
52
46
  inputContainerRef: HTMLDivElement | null;
@@ -62,10 +56,11 @@ export declare class AutoComplete<T extends Option = Option> extends Component<A
62
56
  handleChange: (option: T) => void;
63
57
  handleShowAllResults: (evt: MouseEvent<HTMLButtonElement>) => void;
64
58
  removeValue: (removedOption: T) => void;
65
- getA11yStatusMessage: (options: A11yStatusMessageOptions<any>) => string;
59
+ getA11yStatusMessage: (options: A11yStatusMessageOptions<Option>) => any;
66
60
  renderInput: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
67
61
  renderMenu: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>) => JSX.Element;
68
62
  renderSelect: (autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
63
+ private get locale();
69
64
  render(): JSX.Element;
70
65
  }
71
66
  export default AutoComplete;
@@ -12,7 +12,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
12
12
 
13
13
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
14
14
 
15
- var _excluded = ["locale"];
15
+ var _excluded = ["optionItemPrefix"];
16
16
 
17
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); }; }
18
18
 
@@ -28,7 +28,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
28
28
 
29
29
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
30
30
 
31
- import cx from "classnames";
31
+ import cx from "clsx";
32
32
  import Downshift from "downshift";
33
33
  import { Component } from "react";
34
34
  import { createPortal } from "react-dom";
@@ -37,14 +37,14 @@ import { Popper } from "react-popper";
37
37
  import Button from "../Button";
38
38
  import Card from "../Card";
39
39
  import { FieldStateContext } from "../Field/FieldStateContext";
40
+ import { SatelliteContext } from "../Satellite";
40
41
  import ScrollIndicator from "../ScrollIndicator";
41
42
  import stl from "../styles/helpers/satellitePrefixer";
42
43
  import Tag from "../Tag";
43
- import pluralize from "../utils/pluralize";
44
44
  import uniqBy from "../utils/uniqBy";
45
45
  import AutoCompleteEmptyState from "./components/AutoCompleteEmptyState";
46
46
  import DefaultOptionItem from "./components/DefaultOptionItem";
47
- import { defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
47
+ import { DEFAULT_AUTOCOMPLETE_LOCALE, defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
48
48
  import { jsx as _jsx } from "react/jsx-runtime";
49
49
  import { jsxs as _jsxs } from "react/jsx-runtime";
50
50
 
@@ -112,26 +112,19 @@ var BACKSPACE_KEY_CODE = 8;
112
112
 
113
113
  /** @ignore */
114
114
  var DefaultEmptyState = function DefaultEmptyState(_ref) {
115
- var _locale$emptyStateTit;
116
-
117
- var locale = _ref.locale;
115
+ var emptyStateTitle = _ref.emptyStateTitle;
118
116
  return /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
119
- title: (_locale$emptyStateTit = locale === null || locale === void 0 ? void 0 : locale.emptyStateTitle) !== null && _locale$emptyStateTit !== void 0 ? _locale$emptyStateTit : AutoComplete.defaultProps.locale.emptyStateTitle
117
+ title: emptyStateTitle
120
118
  });
121
119
  };
122
120
 
123
- /** @ignore */
124
121
  var DefaultOption = function DefaultOption(_ref2) {
125
- var locale = _ref2.locale,
122
+ var optionItemPrefix = _ref2.optionItemPrefix,
126
123
  props = _objectWithoutProperties(_ref2, _excluded);
127
124
 
128
125
  return /*#__PURE__*/_jsx(DefaultOptionItem, _objectSpread(_objectSpread({}, props), {}, {
129
126
  locale: {
130
- optionItemPrefix: function optionItemPrefix(multiple) {
131
- var _locale$optionItemPre, _locale$optionItemPre2;
132
-
133
- return (_locale$optionItemPre = locale === null || locale === void 0 ? void 0 : (_locale$optionItemPre2 = locale.optionItemPrefix) === null || _locale$optionItemPre2 === void 0 ? void 0 : _locale$optionItemPre2.call(locale, multiple)) !== null && _locale$optionItemPre !== void 0 ? _locale$optionItemPre : AutoComplete.defaultProps.locale.optionItemPrefix(multiple);
134
- }
127
+ optionItemPrefix: optionItemPrefix !== null && optionItemPrefix !== void 0 ? optionItemPrefix : DEFAULT_AUTOCOMPLETE_LOCALE.optionItemPrefix
135
128
  }
136
129
  }));
137
130
  };
@@ -346,23 +339,17 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
346
339
  }
347
340
 
348
341
  if (!options.resultCount) {
349
- var _this$props$locale$em, _this$props$locale;
350
-
351
- return (_this$props$locale$em = (_this$props$locale = _this.props.locale) === null || _this$props$locale === void 0 ? void 0 : _this$props$locale.emptyStateTitle) !== null && _this$props$locale$em !== void 0 ? _this$props$locale$em : "";
342
+ return _this.locale.emptyStateTitle;
352
343
  }
353
344
 
354
345
  if (options.resultCount > 0) {
355
- var _this$props$locale$it, _this$props$locale2, _this$props$locale2$i;
356
-
357
- return (_this$props$locale$it = (_this$props$locale2 = _this.props.locale) === null || _this$props$locale2 === void 0 ? void 0 : (_this$props$locale2$i = _this$props$locale2.itemsAvailable) === null || _this$props$locale2$i === void 0 ? void 0 : _this$props$locale2$i.call(_this$props$locale2, options.resultCount)) !== null && _this$props$locale$it !== void 0 ? _this$props$locale$it : "";
346
+ return _this.locale.itemsAvailable(options.resultCount);
358
347
  }
359
348
 
360
349
  return "";
361
350
  });
362
351
 
363
352
  _defineProperty(_assertThisInitialized(_this), "renderInput", function (results, autocompleteHelpers, fieldState) {
364
- var _this$props$locale3;
365
-
366
353
  var _this$props3 = _this.props,
367
354
  id = _this$props3.id,
368
355
  placeholder = _this$props3.placeholder,
@@ -428,7 +415,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
428
415
  onClick: _this.handleFakeInputClick,
429
416
  ref: _this.handleInputContainerRefUpdate,
430
417
  children: [Icon && /*#__PURE__*/_jsx(Icon, {
431
- 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"),
432
419
  size: "1rem"
433
420
  }), /*#__PURE__*/_jsxs("div", {
434
421
  className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex items-center flex-1 ", " ", ""])), !noWrap && "flex-wrap", multiple && "-ml-1"), valuesClassName),
@@ -460,7 +447,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
460
447
  type: "button",
461
448
  className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["w-6 flex items-center justify-center text-grey-500"]))),
462
449
  onClick: _this.handleClearClick,
463
- "aria-label": (_this$props$locale3 = _this.props.locale) === null || _this$props$locale3 === void 0 ? void 0 : _this$props$locale3.clearInputButton,
450
+ "aria-label": _this.locale.clearInputButton,
464
451
  children: /*#__PURE__*/_jsx(X, {
465
452
  size: ".75rem"
466
453
  })
@@ -479,7 +466,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
479
466
  isOpen = autocompleteHelpers.isOpen;
480
467
 
481
468
  var defaultEmptyState = /*#__PURE__*/_jsx(DefaultEmptyState, {
482
- locale: _this.props.locale
469
+ emptyStateTitle: _this.locale.emptyStateTitle
483
470
  });
484
471
 
485
472
  var _this$props4 = _this.props,
@@ -522,8 +509,6 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
522
509
  referenceElement: (_this$inputContainerR3 = _this.inputContainerRef) !== null && _this$inputContainerR3 !== void 0 ? _this$inputContainerR3 : undefined,
523
510
  modifiers: MENU_POPPER_MODFIERS,
524
511
  children: function children(popper) {
525
- var _this$props$locale4, _this$props$locale4$s;
526
-
527
512
  return /*#__PURE__*/_jsx("div", {
528
513
  className: cx(stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["z-dropdown"]))), menuClassName),
529
514
  style: _objectSpread(_objectSpread({}, popper.style), dropdownStyle),
@@ -547,7 +532,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
547
532
  children: /*#__PURE__*/_jsx(OptionItem, _objectSpread(_objectSpread({}, optionItemProps), {}, {
548
533
  highlighted: index === highlightedIndex,
549
534
  option: result,
550
- locale: _this.props.locale
535
+ optionItemPrefix: _this.locale.optionItemPrefix
551
536
  }))
552
537
  }), result.value);
553
538
  }), extraResults > 0 && !showAllResults && /*#__PURE__*/_jsx("li", {
@@ -556,7 +541,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
556
541
  variant: "subtle",
557
542
  size: "small",
558
543
  onMouseDown: _this.handleShowAllResults,
559
- children: (_this$props$locale4 = _this.props.locale) === null || _this$props$locale4 === void 0 ? void 0 : (_this$props$locale4$s = _this$props$locale4.showMoreButton) === null || _this$props$locale4$s === void 0 ? void 0 : _this$props$locale4$s.call(_this$props$locale4, extraResults)
544
+ children: _this.locale.showMoreButton(extraResults)
560
545
  })
561
546
  })]
562
547
  }))
@@ -571,6 +556,8 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
571
556
  });
572
557
 
573
558
  _defineProperty(_assertThisInitialized(_this), "renderSelect", function (autocompleteHelpers, fieldState) {
559
+ var _this$context$portalT;
560
+
574
561
  var _this$props5 = _this.props,
575
562
  className = _this$props5.className,
576
563
  options = _this$props5.options,
@@ -588,7 +575,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
588
575
 
589
576
  return /*#__PURE__*/_jsxs("div", {
590
577
  className: className,
591
- 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)]
592
579
  });
593
580
  });
594
581
 
@@ -611,6 +598,11 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
611
598
  });
612
599
  }
613
600
  }
601
+ }, {
602
+ key: "locale",
603
+ get: function get() {
604
+ return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_AUTOCOMPLETE_LOCALE), this.context["locales"]), this.props.locale);
605
+ }
614
606
  }, {
615
607
  key: "render",
616
608
  value: function render() {
@@ -645,6 +637,8 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
645
637
  return AutoComplete;
646
638
  }(Component);
647
639
 
640
+ _defineProperty(AutoComplete, "contextType", SatelliteContext);
641
+
648
642
  _defineProperty(AutoComplete, "defaultProps", {
649
643
  clearable: false,
650
644
  creatable: false,
@@ -655,22 +649,7 @@ _defineProperty(AutoComplete, "defaultProps", {
655
649
  separatorKeyCodes: [],
656
650
  separatorKeys: [],
657
651
  optionItemComponent: DefaultOption,
658
- noWrap: false,
659
- locale: {
660
- clearInputButton: "Clear input value",
661
- emptyStateTitle: "No matches found",
662
- itemsAvailable: function itemsAvailable(resultCount) {
663
- return "".concat(pluralize(resultCount, "item is", {
664
- plural: "items are"
665
- }), " available");
666
- },
667
- showMoreButton: function showMoreButton(extraResults) {
668
- return "Show ".concat(pluralize(extraResults, "result"), " more");
669
- },
670
- optionItemPrefix: function optionItemPrefix(multiple) {
671
- return multiple ? "Add" : "Use";
672
- }
673
- }
652
+ noWrap: false
674
653
  });
675
654
 
676
655
  export default AutoComplete;
@@ -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;