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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/cjs/AnnouncementBadge/AnnouncementBadge.js +7 -24
  2. package/cjs/AnnouncementBadge/index.js +0 -5
  3. package/cjs/AutoComplete/AutoComplete.js +68 -163
  4. package/cjs/AutoComplete/AutoComplete.tailwind.js +2 -5
  5. package/cjs/AutoComplete/components/AutoCompleteEmptyState.js +5 -14
  6. package/cjs/AutoComplete/components/DefaultOptionItem.js +2 -11
  7. package/cjs/AutoComplete/index.js +0 -11
  8. package/cjs/AutoComplete/utils.js +0 -8
  9. package/cjs/Avatars/ApplicationAvatar.js +3 -13
  10. package/cjs/Avatars/UserAvatar.js +6 -20
  11. package/cjs/Avatars/index.js +0 -7
  12. package/cjs/Avatars/utils.js +6 -37
  13. package/cjs/Badge/Badge.js +13 -36
  14. package/cjs/Badge/index.js +0 -5
  15. package/cjs/Banners/Alert/Alert.js +18 -28
  16. package/cjs/Banners/Alert/index.js +0 -5
  17. package/cjs/Banners/BigBertha/BigBertha.js +1 -9
  18. package/cjs/Banners/BigBertha/index.js +0 -5
  19. package/cjs/Banners/Promote/Promote.js +8 -19
  20. package/cjs/Banners/Promote/index.js +0 -5
  21. package/cjs/Banners/index.js +0 -6
  22. package/cjs/Button/Button.js +13 -33
  23. package/cjs/Button/Button.tailwind.js +3 -5
  24. package/cjs/Button/ButtonGroup.js +3 -11
  25. package/cjs/Button/IconButton.js +12 -35
  26. package/cjs/Button/index.js +0 -11
  27. package/cjs/Button/styles.js +1 -10
  28. package/cjs/Button/types.js +0 -1
  29. package/cjs/Card/Card.js +6 -21
  30. package/cjs/Card/Card.tailwind.js +1 -2
  31. package/cjs/Card/components/CardHeader.js +1 -14
  32. package/cjs/Card/components/CardTitle.js +2 -15
  33. package/cjs/Card/index.js +0 -9
  34. package/cjs/Checkbox/Checkbox.js +14 -38
  35. package/cjs/Checkbox/Checkbox.tailwind.js +1 -3
  36. package/cjs/Checkbox/index.js +0 -5
  37. package/cjs/ClickAwayContainer/ClickAwayContainer.js +11 -23
  38. package/cjs/ClickAwayContainer/index.js +0 -2
  39. package/cjs/DatePicker/DatePicker/DatePicker.js +13 -46
  40. package/cjs/DatePicker/DatePicker/datePickerReducer.js +0 -15
  41. package/cjs/DatePicker/DatePicker/index.js +0 -7
  42. package/cjs/DatePicker/DatePicker.tailwind.js +2 -12
  43. package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +29 -72
  44. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -14
  45. package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -28
  46. package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +0 -6
  47. package/cjs/DatePicker/DateRangePicker/index.js +0 -9
  48. package/cjs/DatePicker/components/Calendar.js +5 -16
  49. package/cjs/DatePicker/components/Display.js +3 -9
  50. package/cjs/DatePicker/components/Footer.js +0 -7
  51. package/cjs/DatePicker/components/FooterActions.js +3 -11
  52. package/cjs/DatePicker/components/Modal.js +17 -39
  53. package/cjs/DatePicker/components/NavBar.js +12 -34
  54. package/cjs/DatePicker/components/SidePanel.js +0 -7
  55. package/cjs/DatePicker/components/index.js +0 -7
  56. package/cjs/DatePicker/index.js +0 -9
  57. package/cjs/DatePicker/utils.js +0 -4
  58. package/cjs/Dropdown/Dropdown.js +23 -58
  59. package/cjs/Dropdown/DropdownButton.js +3 -20
  60. package/cjs/Dropdown/DropdownContext.js +0 -6
  61. package/cjs/Dropdown/components/DropdownButtonItem.js +5 -21
  62. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -25
  63. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -6
  64. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -6
  65. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -16
  66. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -15
  67. package/cjs/Dropdown/components/DropdownCollapsibleItem/index.js +0 -9
  68. package/cjs/Dropdown/components/DropdownDivider.js +0 -7
  69. package/cjs/Dropdown/components/DropdownFooterItem.js +2 -15
  70. package/cjs/Dropdown/components/DropdownLinkItem.js +6 -23
  71. package/cjs/Dropdown/components/DropdownRadioItem.js +4 -20
  72. package/cjs/Dropdown/components/DropdownTitle.js +1 -14
  73. package/cjs/Dropdown/components/DropdownToggleItem.js +5 -22
  74. package/cjs/Dropdown/index.js +0 -27
  75. package/cjs/Dropdown/useDropdownItemProps.js +1 -14
  76. package/cjs/Dropzone/Dropzone.js +27 -62
  77. package/cjs/Dropzone/index.js +0 -5
  78. package/cjs/EmptyState/EmptyState.js +12 -23
  79. package/cjs/EmptyState/EmptyState.tailwind.js +0 -1
  80. package/cjs/EmptyState/index.js +0 -7
  81. package/cjs/Field/Field.js +8 -21
  82. package/cjs/Field/FieldStateContext.js +0 -2
  83. package/cjs/Field/index.js +0 -9
  84. package/cjs/Field/useFieldState.js +0 -7
  85. package/cjs/Flag/Flag.js +17 -40
  86. package/cjs/Flag/Flag.tailwind.js +0 -1
  87. package/cjs/Flag/Flags.js +4 -19
  88. package/cjs/Flag/index.js +0 -9
  89. package/cjs/FlexGrid/FlexGrid.js +13 -24
  90. package/cjs/FlexGrid/FlexGrid.tailwind.js +4 -11
  91. package/cjs/FlexGrid/index.js +0 -5
  92. package/cjs/HelpUnderline/HelpUnderline.js +5 -14
  93. package/cjs/HelpUnderline/HelpUnderline.tailwind.js +1 -2
  94. package/cjs/HelpUnderline/index.js +0 -5
  95. package/cjs/Input/Input.js +26 -70
  96. package/cjs/Input/Input.tailwind.js +1 -4
  97. package/cjs/Input/index.js +0 -5
  98. package/cjs/Insert/Insert.js +7 -17
  99. package/cjs/Insert/index.js +0 -5
  100. package/cjs/InstantSearch/InstantSearch.tailwind.js +4 -10
  101. package/cjs/KeyboardKey/KeyboardKey.js +1 -12
  102. package/cjs/KeyboardKey/KeyboardKey.tailwind.js +1 -2
  103. package/cjs/KeyboardKey/index.js +0 -2
  104. package/cjs/Link/BaseLink.js +2 -12
  105. package/cjs/Link/ButtonLink.js +3 -17
  106. package/cjs/Link/IconButtonLink.js +2 -13
  107. package/cjs/Link/Link.js +6 -23
  108. package/cjs/Link/index.js +0 -11
  109. package/cjs/Medallion/Medallion.js +5 -14
  110. package/cjs/Medallion/Medallion.tailwind.js +3 -6
  111. package/cjs/Medallion/index.js +0 -7
  112. package/cjs/Modal/Modal.js +21 -57
  113. package/cjs/Modal/Modal.tailwind.js +3 -3
  114. package/cjs/Modal/components/ModalFooter.js +2 -16
  115. package/cjs/Modal/components/ModalSection.js +3 -11
  116. package/cjs/Modal/index.js +0 -9
  117. package/cjs/Pagination/CompactPagination/CompactPagination.js +1 -22
  118. package/cjs/Pagination/CompactPagination/index.js +0 -5
  119. package/cjs/Pagination/DotPagination/DotPagination.js +5 -19
  120. package/cjs/Pagination/DotPagination/index.js +0 -5
  121. package/cjs/Pagination/Pagination/Pagination.js +9 -34
  122. package/cjs/Pagination/Pagination/index.js +0 -5
  123. package/cjs/Pagination/index.js +0 -9
  124. package/cjs/ProgressBar/ProgressBar.js +3 -16
  125. package/cjs/ProgressBar/ProgressBar.tailwind.js +1 -3
  126. package/cjs/ProgressBar/index.js +0 -5
  127. package/cjs/ProgressSpinner/ProgressSpinner.js +8 -20
  128. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +2 -3
  129. package/cjs/ProgressSpinner/index.js +0 -5
  130. package/cjs/RadioGroup/RadioButton.js +1 -14
  131. package/cjs/RadioGroup/RadioButton.tailwind.js +1 -4
  132. package/cjs/RadioGroup/RadioGroup.js +19 -38
  133. package/cjs/RadioGroup/RadiogroupContext.js +0 -6
  134. package/cjs/RadioGroup/index.js +0 -9
  135. package/cjs/RangeSlider/RangeSlider.js +26 -43
  136. package/cjs/RangeSlider/RangeSlider.tailwind.js +1 -3
  137. package/cjs/RangeSlider/index.js +0 -5
  138. package/cjs/Satellite/Satellite.js +4 -10
  139. package/cjs/Satellite/SatelliteContext.js +0 -9
  140. package/cjs/Satellite/SatelliteRouter.js +2 -9
  141. package/cjs/Satellite/index.js +0 -13
  142. package/cjs/Satellite/locale.js +1 -7
  143. package/cjs/Satellite/useCreatePortal.js +2 -8
  144. package/cjs/ScrollIndicator/ScrollIndicator.js +18 -41
  145. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +1 -3
  146. package/cjs/ScrollIndicator/index.js +0 -5
  147. package/cjs/Select/Select.js +4 -17
  148. package/cjs/Select/Select.tailwind.js +2 -5
  149. package/cjs/Select/index.js +0 -5
  150. package/cjs/Sidebar/Sidebar.js +11 -30
  151. package/cjs/Sidebar/SidebarButtonLink.js +10 -30
  152. package/cjs/Sidebar/SidebarContext.js +0 -6
  153. package/cjs/Sidebar/SidebarHeader.js +1 -9
  154. package/cjs/Sidebar/SidebarHeading.js +3 -14
  155. package/cjs/Sidebar/SidebarLink.js +5 -20
  156. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -11
  157. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -14
  158. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -31
  159. package/cjs/Sidebar/SidebarLinksGroup/index.js +0 -2
  160. package/cjs/Sidebar/SidebarNav.js +5 -16
  161. package/cjs/Sidebar/index.js +0 -17
  162. package/cjs/Switch/Switch.js +15 -36
  163. package/cjs/Switch/Switch.tailwind.js +1 -2
  164. package/cjs/Switch/SwitchOption.js +2 -15
  165. package/cjs/Switch/index.js +0 -7
  166. package/cjs/Switch/utils.js +0 -9
  167. package/cjs/Tables/DataTable/DataTable.js +28 -70
  168. package/cjs/Tables/DataTable/DataTable.tailwind.js +2 -2
  169. package/cjs/Tables/DataTable/components/Body.js +14 -33
  170. package/cjs/Tables/DataTable/components/Footer.js +1 -17
  171. package/cjs/Tables/DataTable/components/Header.js +5 -12
  172. package/cjs/Tables/DataTable/components/HeaderCell.js +10 -27
  173. package/cjs/Tables/DataTable/components/Loader.js +4 -17
  174. package/cjs/Tables/DataTable/components/index.js +0 -10
  175. package/cjs/Tables/DataTable/index.js +0 -7
  176. package/cjs/Tables/DataTable/utils.js +0 -9
  177. package/cjs/Tables/Table/Table.js +7 -21
  178. package/cjs/Tables/Table/Table.tailwind.js +1 -2
  179. package/cjs/Tables/Table/components/TableFooter.js +2 -10
  180. package/cjs/Tables/Table/index.js +0 -7
  181. package/cjs/Tables/index.js +0 -7
  182. package/cjs/Tabs/ContentTabs.js +10 -21
  183. package/cjs/Tabs/LinkTabs.js +5 -18
  184. package/cjs/Tabs/Tabs.tailwind.js +1 -2
  185. package/cjs/Tabs/components/LinkTab.js +2 -27
  186. package/cjs/Tabs/index.js +0 -9
  187. package/cjs/Tabs/utils.js +0 -5
  188. package/cjs/Tag/Tag.js +7 -26
  189. package/cjs/Tag/Tag.tailwind.js +1 -2
  190. package/cjs/Tag/index.js +0 -5
  191. package/cjs/TextArea/TextArea.js +1 -14
  192. package/cjs/TextArea/TextArea.tailwind.js +1 -4
  193. package/cjs/TextArea/index.js +0 -5
  194. package/cjs/TextWrap/TextWrap.js +3 -18
  195. package/cjs/TextWrap/index.js +0 -5
  196. package/cjs/Toggle/Toggle.js +6 -27
  197. package/cjs/Toggle/Toggle.tailwind.js +1 -3
  198. package/cjs/Toggle/index.js +0 -5
  199. package/cjs/Tooltip/OverflowTooltipWrapper.js +33 -62
  200. package/cjs/Tooltip/Tooltip.js +4 -17
  201. package/cjs/Tooltip/Tooltip.tailwind.js +3 -5
  202. package/cjs/Tooltip/TooltipWrapper.js +43 -71
  203. package/cjs/Tooltip/index.js +0 -9
  204. package/cjs/Typography/Typography.tailwind.js +12 -18
  205. package/cjs/UserContent/UserContent.js +3 -11
  206. package/cjs/UserContent/UserContent.tailwind.js +2 -11
  207. package/cjs/index.js +0 -89
  208. package/cjs/styles/base.tailwind.js +7 -7
  209. package/cjs/styles/colors.js +7 -7
  210. package/cjs/styles/disabledColor.js +1 -4
  211. package/cjs/styles/helpers/icons.js +5 -11
  212. package/cjs/styles/helpers/makePurgeCssExtractor.js +3 -15
  213. package/cjs/styles/helpers/makeTailwindPrefixer.js +1 -9
  214. package/cjs/styles/helpers/prefixTailwindClassName.js +6 -6
  215. package/cjs/styles/helpers/satellitePrefixer.js +1 -2
  216. package/cjs/styles/rgba.js +1 -3
  217. package/cjs/styles/tailwind.config.js +4 -11
  218. package/cjs/styles/zIndexes.js +1 -0
  219. package/cjs/utilities/utilities.tailwind.js +0 -3
  220. package/cjs/utils/event-polyfill.js +0 -2
  221. package/cjs/utils/formatters.js +12 -19
  222. package/cjs/utils/genericChangeHandler.js +0 -6
  223. package/cjs/utils/hashCode.js +0 -5
  224. package/cjs/utils/index.js +0 -7
  225. package/cjs/utils/isCssPropertySupported.js +0 -3
  226. package/cjs/utils/isNil.js +0 -2
  227. package/cjs/utils/isRenderedChild.js +0 -2
  228. package/cjs/utils/matchLocation.js +0 -4
  229. package/cjs/utils/onlyText.js +3 -12
  230. package/cjs/utils/parseUrl.js +2 -4
  231. package/cjs/utils/pluralize.js +2 -7
  232. package/cjs/utils/range.js +0 -2
  233. package/cjs/utils/toSentenceCase.js +0 -4
  234. package/cjs/utils/uniqBy.js +0 -4
  235. package/cjs/utils/uniqueId.js +0 -2
  236. package/cjs/utils/useForwardedRef.js +0 -6
  237. package/cjs/utils/useLinkProps.js +1 -13
  238. package/cjs/utils/useTriggerInputChange.js +2 -4
  239. package/esm/AnnouncementBadge/AnnouncementBadge.js +7 -14
  240. package/esm/AutoComplete/AutoComplete.js +68 -158
  241. package/esm/AutoComplete/AutoComplete.tailwind.js +2 -2
  242. package/esm/AutoComplete/components/AutoCompleteEmptyState.js +5 -7
  243. package/esm/AutoComplete/components/DefaultOptionItem.js +2 -8
  244. package/esm/AutoComplete/utils.js +0 -2
  245. package/esm/Avatars/ApplicationAvatar.js +3 -6
  246. package/esm/Avatars/UserAvatar.js +6 -12
  247. package/esm/Avatars/utils.js +7 -23
  248. package/esm/Badge/Badge.js +13 -28
  249. package/esm/Banners/Alert/Alert.js +18 -20
  250. package/esm/Banners/BigBertha/BigBertha.js +1 -4
  251. package/esm/Banners/Promote/Promote.js +8 -10
  252. package/esm/Button/Button.js +13 -21
  253. package/esm/Button/Button.tailwind.js +3 -2
  254. package/esm/Button/ButtonGroup.js +3 -6
  255. package/esm/Button/IconButton.js +12 -22
  256. package/esm/Button/styles.js +1 -5
  257. package/esm/Card/Card.js +6 -12
  258. package/esm/Card/Card.tailwind.js +1 -1
  259. package/esm/Card/components/CardHeader.js +1 -7
  260. package/esm/Card/components/CardTitle.js +2 -8
  261. package/esm/Checkbox/Checkbox.js +14 -28
  262. package/esm/Checkbox/Checkbox.tailwind.js +1 -1
  263. package/esm/ClickAwayContainer/ClickAwayContainer.js +11 -13
  264. package/esm/DatePicker/DatePicker/DatePicker.js +13 -31
  265. package/esm/DatePicker/DatePicker/datePickerReducer.js +0 -9
  266. package/esm/DatePicker/DatePicker.tailwind.js +2 -9
  267. package/esm/DatePicker/DateRangePicker/DateRangePicker.js +29 -55
  268. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -8
  269. package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -16
  270. package/esm/DatePicker/components/Calendar.js +5 -10
  271. package/esm/DatePicker/components/Display.js +3 -5
  272. package/esm/DatePicker/components/Footer.js +0 -4
  273. package/esm/DatePicker/components/FooterActions.js +3 -7
  274. package/esm/DatePicker/components/Modal.js +17 -27
  275. package/esm/DatePicker/components/NavBar.js +12 -22
  276. package/esm/DatePicker/components/SidePanel.js +0 -4
  277. package/esm/Dropdown/Dropdown.js +23 -34
  278. package/esm/Dropdown/DropdownButton.js +3 -11
  279. package/esm/Dropdown/DropdownContext.js +0 -2
  280. package/esm/Dropdown/components/DropdownButtonItem.js +5 -12
  281. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -15
  282. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -2
  283. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -2
  284. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
  285. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
  286. package/esm/Dropdown/components/DropdownDivider.js +0 -2
  287. package/esm/Dropdown/components/DropdownFooterItem.js +2 -8
  288. package/esm/Dropdown/components/DropdownLinkItem.js +6 -13
  289. package/esm/Dropdown/components/DropdownRadioItem.js +4 -11
  290. package/esm/Dropdown/components/DropdownTitle.js +1 -7
  291. package/esm/Dropdown/components/DropdownToggleItem.js +5 -12
  292. package/esm/Dropdown/useDropdownItemProps.js +1 -7
  293. package/esm/Dropzone/Dropzone.js +27 -45
  294. package/esm/EmptyState/EmptyState.js +12 -16
  295. package/esm/Field/Field.js +8 -11
  296. package/esm/Flag/Flag.js +17 -25
  297. package/esm/Flag/Flags.js +4 -9
  298. package/esm/FlexGrid/FlexGrid.js +13 -15
  299. package/esm/FlexGrid/FlexGrid.tailwind.js +4 -9
  300. package/esm/HelpUnderline/HelpUnderline.js +5 -7
  301. package/esm/HelpUnderline/HelpUnderline.tailwind.js +1 -1
  302. package/esm/Input/Input.js +26 -54
  303. package/esm/Input/Input.tailwind.js +1 -1
  304. package/esm/Insert/Insert.js +7 -11
  305. package/esm/InstantSearch/InstantSearch.tailwind.js +4 -4
  306. package/esm/KeyboardKey/KeyboardKey.js +1 -3
  307. package/esm/KeyboardKey/KeyboardKey.tailwind.js +1 -1
  308. package/esm/Link/BaseLink.js +2 -6
  309. package/esm/Link/ButtonLink.js +3 -9
  310. package/esm/Link/IconButtonLink.js +2 -6
  311. package/esm/Link/Link.js +6 -14
  312. package/esm/Medallion/Medallion.js +5 -7
  313. package/esm/Medallion/Medallion.tailwind.js +3 -2
  314. package/esm/Modal/Modal.js +21 -38
  315. package/esm/Modal/Modal.tailwind.js +3 -2
  316. package/esm/Modal/components/ModalFooter.js +2 -8
  317. package/esm/Modal/components/ModalSection.js +3 -5
  318. package/esm/Pagination/CompactPagination/CompactPagination.js +1 -9
  319. package/esm/Pagination/DotPagination/DotPagination.js +5 -11
  320. package/esm/Pagination/Pagination/Pagination.js +9 -21
  321. package/esm/ProgressBar/ProgressBar.js +3 -10
  322. package/esm/ProgressBar/ProgressBar.tailwind.js +1 -1
  323. package/esm/ProgressSpinner/ProgressSpinner.js +8 -12
  324. package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +2 -2
  325. package/esm/RadioGroup/RadioButton.js +1 -7
  326. package/esm/RadioGroup/RadioButton.tailwind.js +1 -1
  327. package/esm/RadioGroup/RadioGroup.js +19 -25
  328. package/esm/RadioGroup/RadiogroupContext.js +0 -2
  329. package/esm/RangeSlider/RangeSlider.js +26 -35
  330. package/esm/RangeSlider/RangeSlider.tailwind.js +1 -1
  331. package/esm/Satellite/Satellite.js +4 -4
  332. package/esm/Satellite/SatelliteContext.js +0 -3
  333. package/esm/Satellite/SatelliteRouter.js +2 -4
  334. package/esm/Satellite/locale.js +1 -2
  335. package/esm/Satellite/useCreatePortal.js +2 -2
  336. package/esm/ScrollIndicator/ScrollIndicator.js +18 -31
  337. package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +1 -1
  338. package/esm/Select/Select.js +4 -9
  339. package/esm/Select/Select.tailwind.js +2 -2
  340. package/esm/Sidebar/Sidebar.js +11 -17
  341. package/esm/Sidebar/SidebarButtonLink.js +10 -20
  342. package/esm/Sidebar/SidebarContext.js +0 -2
  343. package/esm/Sidebar/SidebarHeader.js +1 -3
  344. package/esm/Sidebar/SidebarHeading.js +3 -7
  345. package/esm/Sidebar/SidebarLink.js +5 -11
  346. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -4
  347. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -7
  348. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -18
  349. package/esm/Sidebar/SidebarNav.js +5 -9
  350. package/esm/Switch/Switch.js +15 -24
  351. package/esm/Switch/Switch.tailwind.js +1 -1
  352. package/esm/Switch/SwitchOption.js +2 -6
  353. package/esm/Tables/DataTable/DataTable.js +28 -49
  354. package/esm/Tables/DataTable/DataTable.tailwind.js +2 -1
  355. package/esm/Tables/DataTable/components/Body.js +14 -23
  356. package/esm/Tables/DataTable/components/Footer.js +1 -8
  357. package/esm/Tables/DataTable/components/Header.js +5 -6
  358. package/esm/Tables/DataTable/components/HeaderCell.js +10 -17
  359. package/esm/Tables/DataTable/components/Loader.js +4 -8
  360. package/esm/Tables/DataTable/utils.js +0 -1
  361. package/esm/Tables/Table/Table.js +7 -14
  362. package/esm/Tables/Table/Table.tailwind.js +1 -1
  363. package/esm/Tables/Table/components/TableFooter.js +2 -4
  364. package/esm/Tabs/ContentTabs.js +10 -12
  365. package/esm/Tabs/LinkTabs.js +5 -7
  366. package/esm/Tabs/Tabs.tailwind.js +1 -1
  367. package/esm/Tabs/components/LinkTab.js +2 -18
  368. package/esm/Tabs/utils.js +0 -2
  369. package/esm/Tag/Tag.js +7 -16
  370. package/esm/Tag/Tag.tailwind.js +1 -1
  371. package/esm/TextArea/TextArea.js +1 -7
  372. package/esm/TextArea/TextArea.tailwind.js +1 -1
  373. package/esm/TextWrap/TextWrap.js +3 -11
  374. package/esm/Toggle/Toggle.js +6 -19
  375. package/esm/Toggle/Toggle.tailwind.js +1 -1
  376. package/esm/Tooltip/OverflowTooltipWrapper.js +33 -46
  377. package/esm/Tooltip/Tooltip.js +4 -9
  378. package/esm/Tooltip/Tooltip.tailwind.js +3 -4
  379. package/esm/Tooltip/TooltipWrapper.js +43 -56
  380. package/esm/Typography/Typography.tailwind.js +12 -15
  381. package/esm/UserContent/UserContent.js +3 -5
  382. package/esm/UserContent/UserContent.tailwind.js +2 -7
  383. package/esm/styles/base.tailwind.js +7 -6
  384. package/esm/styles/colors.js +7 -7
  385. package/esm/styles/disabledColor.js +1 -2
  386. package/esm/styles/helpers/icons.js +5 -8
  387. package/esm/styles/helpers/makePurgeCssExtractor.js +3 -14
  388. package/esm/styles/helpers/makeTailwindPrefixer.js +1 -6
  389. package/esm/styles/helpers/prefixTailwindClassName.js +6 -6
  390. package/esm/styles/helpers/satellitePrefixer.js +1 -1
  391. package/esm/styles/rgba.js +1 -2
  392. package/esm/styles/tailwind.config.js +4 -6
  393. package/esm/styles/zIndexes.js +1 -0
  394. package/esm/utils/event-polyfill.js +0 -2
  395. package/esm/utils/formatters.js +12 -16
  396. package/esm/utils/genericChangeHandler.js +0 -2
  397. package/esm/utils/hashCode.js +0 -3
  398. package/esm/utils/isCssPropertySupported.js +0 -2
  399. package/esm/utils/isRenderedChild.js +0 -1
  400. package/esm/utils/matchLocation.js +0 -2
  401. package/esm/utils/onlyText.js +3 -11
  402. package/esm/utils/parseUrl.js +2 -2
  403. package/esm/utils/pluralize.js +2 -5
  404. package/esm/utils/toSentenceCase.js +1 -1
  405. package/esm/utils/uniqBy.js +0 -2
  406. package/esm/utils/useForwardedRef.js +0 -3
  407. package/esm/utils/useLinkProps.js +1 -7
  408. package/esm/utils/useTriggerInputChange.js +2 -3
  409. package/package.json +1 -1
  410. package/satellite.min.css +1 -1
  411. package/scss/colors.scss +16 -16
@@ -9,26 +9,16 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
9
9
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
11
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
12
-
13
12
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
14
-
15
13
  var _excluded = ["optionItemPrefix"],
16
- _excluded2 = ["ref"];
17
-
14
+ _excluded2 = ["ref"];
18
15
  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
-
20
16
  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
-
22
17
  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; }
23
-
24
18
  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; }
25
-
26
19
  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; } } }; }
27
-
28
20
  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); }
29
-
30
21
  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; }
31
-
32
22
  import cx from "clsx";
33
23
  import Downshift from "downshift";
34
24
  import { Component } from "react";
@@ -49,15 +39,12 @@ import DefaultOptionItem from "./components/DefaultOptionItem";
49
39
  import { DEFAULT_AUTOCOMPLETE_LOCALE, defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
50
40
  import { jsx as _jsx } from "react/jsx-runtime";
51
41
  import { jsxs as _jsxs } from "react/jsx-runtime";
52
-
53
42
  function optionToString(option) {
54
43
  return option ? option.label : "";
55
44
  }
56
-
57
45
  function makeNeedles(itemValue) {
58
46
  return itemValue.toLowerCase().trim().split(/\s+/);
59
47
  }
60
-
61
48
  function needlesMatch(needles, option) {
62
49
  var labels = (option.metadata || []).concat(option.label);
63
50
  return needles.every(function (needle) {
@@ -66,21 +53,17 @@ function needlesMatch(needles, option) {
66
53
  });
67
54
  });
68
55
  }
69
-
70
56
  function filter(options, selectedItems, itemValue) {
71
57
  var needles = makeNeedles(itemValue);
72
58
  var selectedValues = selectedItems.map(function (option) {
73
59
  return option.value;
74
60
  });
75
61
  var results = [];
76
-
77
62
  var _iterator = _createForOfIteratorHelper(options),
78
- _step;
79
-
63
+ _step;
80
64
  try {
81
65
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
82
66
  var option = _step.value;
83
-
84
67
  if (selectedValues.includes(option.value)) {
85
68
  continue;
86
69
  } else if (option.bypassNeedleMatch || needlesMatch(needles, option)) {
@@ -92,18 +75,14 @@ function filter(options, selectedItems, itemValue) {
92
75
  } finally {
93
76
  _iterator.f();
94
77
  }
95
-
96
78
  return results;
97
79
  }
98
-
99
80
  function inputValueFromProps(props) {
100
81
  if (props.inputValue !== undefined) {
101
82
  return props.inputValue;
102
83
  }
103
-
104
84
  return !isAutoCompleteMultiProps(props) && props.value ? optionToString(props.value) : "";
105
85
  }
106
-
107
86
  var MENU_POPPER_MODFIERS = [{
108
87
  name: "offset",
109
88
  options: {
@@ -111,7 +90,6 @@ var MENU_POPPER_MODFIERS = [{
111
90
  }
112
91
  }];
113
92
  var BACKSPACE_KEY_CODE = 8;
114
-
115
93
  /** @ignore */
116
94
  var DefaultEmptyState = function DefaultEmptyState(_ref) {
117
95
  var emptyStateTitle = _ref.emptyStateTitle;
@@ -119,17 +97,16 @@ var DefaultEmptyState = function DefaultEmptyState(_ref) {
119
97
  title: emptyStateTitle
120
98
  });
121
99
  };
122
-
123
100
  var DefaultOption = function DefaultOption(_ref2) {
124
101
  var optionItemPrefix = _ref2.optionItemPrefix,
125
- props = _objectWithoutProperties(_ref2, _excluded);
126
-
102
+ props = _objectWithoutProperties(_ref2, _excluded);
127
103
  return /*#__PURE__*/_jsx(DefaultOptionItem, _objectSpread(_objectSpread({}, props), {}, {
128
104
  locale: {
129
105
  optionItemPrefix: optionItemPrefix !== null && optionItemPrefix !== void 0 ? optionItemPrefix : DEFAULT_AUTOCOMPLETE_LOCALE.optionItemPrefix
130
106
  }
131
107
  }));
132
108
  };
109
+
133
110
  /**
134
111
  * 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.
135
112
  *
@@ -146,36 +123,24 @@ var DefaultOption = function DefaultOption(_ref2) {
146
123
  * - Provide matching results quickly
147
124
  * - Style different data
148
125
  */
149
-
150
-
151
126
  export var AutoComplete = /*#__PURE__*/function (_Component) {
152
127
  _inherits(AutoComplete, _Component);
153
-
154
128
  var _super = _createSuper(AutoComplete);
155
-
156
129
  function AutoComplete() {
157
130
  var _this;
158
-
159
131
  _classCallCheck(this, AutoComplete);
160
-
161
132
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
162
133
  args[_key] = arguments[_key];
163
134
  }
164
-
165
135
  _this = _super.call.apply(_super, [this].concat(args));
166
-
167
136
  _defineProperty(_assertThisInitialized(_this), "state", {
168
137
  inputFocused: false,
169
138
  inputValue: inputValueFromProps(_this.props),
170
139
  showAllResults: false
171
140
  });
172
-
173
141
  _defineProperty(_assertThisInitialized(_this), "inputContainerRef", null);
174
-
175
142
  _defineProperty(_assertThisInitialized(_this), "inputRef", null);
176
-
177
143
  _defineProperty(_assertThisInitialized(_this), "menuWrapperRef", null);
178
-
179
144
  _defineProperty(_assertThisInitialized(_this), "handleClearClick", function () {
180
145
  return _this.setState({
181
146
  inputValue: ""
@@ -183,21 +148,18 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
183
148
  return _this.props.onChange(null);
184
149
  });
185
150
  });
186
-
187
151
  _defineProperty(_assertThisInitialized(_this), "handleFakeInputClick", function () {
188
152
  return _this.inputRef && _this.inputRef.focus();
189
153
  });
190
-
191
154
  _defineProperty(_assertThisInitialized(_this), "handleInputBlur", function (state) {
192
155
  return function (evt) {
193
156
  var _this$props = _this.props,
194
- selectOnBlur = _this$props.selectOnBlur,
195
- onBlur = _this$props.onBlur;
157
+ selectOnBlur = _this$props.selectOnBlur,
158
+ onBlur = _this$props.onBlur;
196
159
  var inputValue = state.inputValue,
197
- highlightedIndex = state.highlightedIndex,
198
- selectItemAtIndex = state.selectItemAtIndex;
160
+ highlightedIndex = state.highlightedIndex,
161
+ selectItemAtIndex = state.selectItemAtIndex;
199
162
  var newInputValue;
200
-
201
163
  if (selectOnBlur && inputValue && highlightedIndex !== null) {
202
164
  newInputValue = isAutoCompleteMultiProps(_this.props) ? "" : optionToString(_this.props.value);
203
165
  selectItemAtIndex(highlightedIndex);
@@ -206,11 +168,9 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
206
168
  } else {
207
169
  newInputValue = optionToString(_this.props.value);
208
170
  }
209
-
210
171
  if (onBlur) {
211
172
  onBlur(evt);
212
173
  }
213
-
214
174
  _this.setState({
215
175
  inputValue: newInputValue || "",
216
176
  inputFocused: false,
@@ -218,160 +178,133 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
218
178
  });
219
179
  };
220
180
  });
221
-
222
181
  _defineProperty(_assertThisInitialized(_this), "handleInputChange", function (evt) {
223
182
  var inputValue = evt.target.value;
224
-
225
183
  _this.setState({
226
184
  inputValue: inputValue
227
185
  });
228
-
229
186
  if (_this.props.onTextChange) {
230
187
  _this.props.onTextChange(inputValue);
231
188
  }
232
-
233
189
  if (!_this.props.multiple && _this.props.value && !inputValue) {
234
190
  _this.props.onChange(null);
235
191
  }
236
192
  });
237
-
238
193
  _defineProperty(_assertThisInitialized(_this), "handleInputContainerRefUpdate", function (el) {
239
194
  _this.inputContainerRef = el;
240
-
241
195
  if (el) {
242
196
  _this.updateInputWidth();
243
197
  }
244
198
  });
245
-
246
199
  _defineProperty(_assertThisInitialized(_this), "updateInputWidth", function () {
247
200
  var _this$inputContainerR, _this$inputContainerR2;
248
-
249
201
  var inputWidth = _this.state.inputWidth;
250
202
  var newInputWidth = (_this$inputContainerR = (_this$inputContainerR2 = _this.inputContainerRef) === null || _this$inputContainerR2 === void 0 ? void 0 : _this$inputContainerR2.getBoundingClientRect().width) !== null && _this$inputContainerR !== void 0 ? _this$inputContainerR : inputWidth;
251
-
252
203
  if (newInputWidth !== inputWidth) {
253
204
  _this.setState({
254
205
  inputWidth: newInputWidth
255
206
  });
256
207
  }
257
208
  });
258
-
259
209
  _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (state) {
260
210
  return function (evt) {
261
211
  if (!isAutoCompleteMultiProps(_this.props)) return;
262
212
  var _this$props2 = _this.props,
263
- _this$props2$value = _this$props2.value,
264
- value = _this$props2$value === void 0 ? [] : _this$props2$value,
265
- _this$props2$separato = _this$props2.separatorKeyCodes,
266
- separatorKeyCodes = _this$props2$separato === void 0 ? AutoComplete.defaultProps.separatorKeyCodes : _this$props2$separato,
267
- _this$props2$separato2 = _this$props2.separatorKeys,
268
- separatorKeys = _this$props2$separato2 === void 0 ? AutoComplete.defaultProps.separatorKeys : _this$props2$separato2,
269
- creatable = _this$props2.creatable,
270
- _this$props2$createFr = _this$props2.createFromInputValue,
271
- createFromInputValue = _this$props2$createFr === void 0 ? AutoComplete.defaultProps.createFromInputValue : _this$props2$createFr,
272
- options = _this$props2.options,
273
- onChange = _this$props2.onChange;
213
+ _this$props2$value = _this$props2.value,
214
+ value = _this$props2$value === void 0 ? [] : _this$props2$value,
215
+ _this$props2$separato = _this$props2.separatorKeyCodes,
216
+ separatorKeyCodes = _this$props2$separato === void 0 ? AutoComplete.defaultProps.separatorKeyCodes : _this$props2$separato,
217
+ _this$props2$separato2 = _this$props2.separatorKeys,
218
+ separatorKeys = _this$props2$separato2 === void 0 ? AutoComplete.defaultProps.separatorKeys : _this$props2$separato2,
219
+ creatable = _this$props2.creatable,
220
+ _this$props2$createFr = _this$props2.createFromInputValue,
221
+ createFromInputValue = _this$props2$createFr === void 0 ? AutoComplete.defaultProps.createFromInputValue : _this$props2$createFr,
222
+ options = _this$props2.options,
223
+ onChange = _this$props2.onChange;
274
224
  var inputValue = state.inputValue || "";
275
225
  var canCreate = creatable && inputValue.trim().length > 0;
276
-
277
226
  if (evt.keyCode === BACKSPACE_KEY_CODE && !inputValue.length) {
278
227
  onChange(value.slice(0, -1));
279
228
  } else if (canCreate && (separatorKeyCodes.includes(evt.keyCode) || separatorKeys.includes(evt.key))) {
280
229
  evt.preventDefault();
281
-
282
230
  var _createFromInputValue = createFromInputValue(options, inputValue),
283
- _createFromInputValue2 = _slicedToArray(_createFromInputValue, 1),
284
- newOption = _createFromInputValue2[0];
285
-
231
+ _createFromInputValue2 = _slicedToArray(_createFromInputValue, 1),
232
+ newOption = _createFromInputValue2[0];
286
233
  if (newOption && !newOption.disabled) {
287
234
  state.selectItem(newOption);
288
235
  }
289
236
  }
290
237
  };
291
238
  });
292
-
293
239
  _defineProperty(_assertThisInitialized(_this), "handleChange", function (option) {
294
240
  if (option.disabled) return;
295
241
  option = option ? _objectSpread(_objectSpread({}, option), {}, {
296
242
  "new": undefined
297
243
  }) : option;
298
-
299
244
  if (isAutoCompleteMultiProps(_this.props)) {
300
245
  var arrayValue = Array.isArray(_this.props.value) ? _this.props.value : [];
301
246
  var newValue = uniqBy([].concat(_toConsumableArray(arrayValue), [option]), function (o) {
302
247
  return o.value;
303
248
  });
304
-
305
249
  _this.props.onChange(newValue);
306
-
307
250
  _this.setState({
308
251
  inputValue: "",
309
252
  showAllResults: false
310
253
  });
311
254
  } else {
312
255
  _this.props.onChange(option);
313
-
314
256
  _this.setState({
315
257
  inputValue: option ? option.label : "",
316
258
  showAllResults: false
317
259
  });
318
260
  }
319
261
  });
320
-
321
262
  _defineProperty(_assertThisInitialized(_this), "handleShowAllResults", function (evt) {
322
263
  evt.preventDefault();
323
264
  evt.stopPropagation();
324
-
325
265
  _this.setState({
326
266
  showAllResults: true
327
267
  });
328
268
  });
329
-
330
269
  _defineProperty(_assertThisInitialized(_this), "removeValue", function (removedOption) {
331
270
  if (!isAutoCompleteMultiProps(_this.props)) return;
332
271
  var currentOptions = _this.props.value || [];
333
272
  var newOptions = currentOptions.filter(function (option) {
334
273
  return option.value !== removedOption.value;
335
274
  });
336
-
337
275
  _this.props.onChange(newOptions);
338
276
  });
339
-
340
277
  _defineProperty(_assertThisInitialized(_this), "getA11yStatusMessage", function (options) {
341
278
  if (!options.isOpen) {
342
279
  return "";
343
280
  }
344
-
345
281
  if (!options.resultCount) {
346
282
  return _this.locale.emptyStateTitle;
347
283
  }
348
-
349
284
  if (options.resultCount > 0) {
350
285
  return _this.locale.itemsAvailable(options.resultCount);
351
286
  }
352
-
353
287
  return "";
354
288
  });
355
-
356
289
  _defineProperty(_assertThisInitialized(_this), "renderInput", function (autocompleteHelpers, fieldState) {
357
290
  var _this$props3 = _this.props,
358
- id = _this$props3.id,
359
- placeholder = _this$props3.placeholder,
360
- name = _this$props3.name,
361
- valuesClassName = _this$props3.valuesClassName,
362
- disabled = _this$props3.disabled,
363
- autoFocus = _this$props3.autoFocus,
364
- clearable = _this$props3.clearable,
365
- value = _this$props3.value,
366
- multiple = _this$props3.multiple,
367
- _this$props3$variant = _this$props3.variant,
368
- variant = _this$props3$variant === void 0 ? "medium" : _this$props3$variant,
369
- renderValueTemplate = _this$props3.renderValueTemplate,
370
- Icon = _this$props3.icon,
371
- _this$props3$noWrap = _this$props3.noWrap,
372
- noWrap = _this$props3$noWrap === void 0 ? false : _this$props3$noWrap,
373
- endItem = _this$props3.endItem,
374
- _onFocus = _this$props3.onFocus;
291
+ id = _this$props3.id,
292
+ placeholder = _this$props3.placeholder,
293
+ name = _this$props3.name,
294
+ valuesClassName = _this$props3.valuesClassName,
295
+ disabled = _this$props3.disabled,
296
+ autoFocus = _this$props3.autoFocus,
297
+ clearable = _this$props3.clearable,
298
+ value = _this$props3.value,
299
+ multiple = _this$props3.multiple,
300
+ _this$props3$variant = _this$props3.variant,
301
+ variant = _this$props3$variant === void 0 ? "medium" : _this$props3$variant,
302
+ renderValueTemplate = _this$props3.renderValueTemplate,
303
+ Icon = _this$props3.icon,
304
+ _this$props3$noWrap = _this$props3.noWrap,
305
+ noWrap = _this$props3$noWrap === void 0 ? false : _this$props3$noWrap,
306
+ endItem = _this$props3.endItem,
307
+ _onFocus = _this$props3.onFocus;
375
308
  var inputFocused = _this.state.inputFocused;
376
309
  var getInputProps = autocompleteHelpers.getInputProps;
377
310
  var hasValue = Boolean(value && (!Array.isArray(value) || value.length > 0));
@@ -393,19 +326,16 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
393
326
  onChange: _this.handleInputChange,
394
327
  onFocus: function onFocus(evt) {
395
328
  _onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(evt);
396
-
397
329
  if (evt.defaultPrevented) {
398
330
  return;
399
331
  }
400
-
401
332
  _this.setState({
402
333
  inputFocused: true
403
- }); // Doesn't work without the setTimeout :/
404
-
334
+ });
405
335
 
336
+ // Doesn't work without the setTimeout :/
406
337
  setTimeout(function () {
407
338
  _this.updateInputWidth();
408
-
409
339
  autocompleteHelpers.openMenu();
410
340
  });
411
341
  },
@@ -459,35 +389,31 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
459
389
  })]
460
390
  });
461
391
  });
462
-
463
392
  _defineProperty(_assertThisInitialized(_this), "renderMenu", function (results, autocompleteHelpers) {
464
393
  var _this$inputContainerR3;
465
-
466
394
  var getItemProps = autocompleteHelpers.getItemProps,
467
- getMenuProps = autocompleteHelpers.getMenuProps,
468
- highlightedIndex = autocompleteHelpers.highlightedIndex,
469
- inputValue = autocompleteHelpers.inputValue,
470
- isOpen = autocompleteHelpers.isOpen;
471
-
395
+ getMenuProps = autocompleteHelpers.getMenuProps,
396
+ highlightedIndex = autocompleteHelpers.highlightedIndex,
397
+ inputValue = autocompleteHelpers.inputValue,
398
+ isOpen = autocompleteHelpers.isOpen;
472
399
  var defaultEmptyState = /*#__PURE__*/_jsx(DefaultEmptyState, {
473
400
  emptyStateTitle: _this.locale.emptyStateTitle
474
401
  });
475
-
476
402
  var _this$props4 = _this.props,
477
- menuClassName = _this$props4.menuClassName,
478
- menuSize = _this$props4.menuSize,
479
- menuFooter = _this$props4.menuFooter,
480
- _this$props4$emptySta = _this$props4.emptyState,
481
- emptyState = _this$props4$emptySta === void 0 ? defaultEmptyState : _this$props4$emptySta,
482
- _this$props4$maxResul = _this$props4.maxResults,
483
- maxResults = _this$props4$maxResul === void 0 ? AutoComplete.defaultProps.maxResults : _this$props4$maxResul,
484
- _this$props4$multiple = _this$props4.multiple,
485
- multiple = _this$props4$multiple === void 0 ? AutoComplete.defaultProps.multiple : _this$props4$multiple,
486
- _this$props4$optionIt = _this$props4.optionItemComponent,
487
- OptionItem = _this$props4$optionIt === void 0 ? AutoComplete.defaultProps.optionItemComponent : _this$props4$optionIt;
403
+ menuClassName = _this$props4.menuClassName,
404
+ menuSize = _this$props4.menuSize,
405
+ menuFooter = _this$props4.menuFooter,
406
+ _this$props4$emptySta = _this$props4.emptyState,
407
+ emptyState = _this$props4$emptySta === void 0 ? defaultEmptyState : _this$props4$emptySta,
408
+ _this$props4$maxResul = _this$props4.maxResults,
409
+ maxResults = _this$props4$maxResul === void 0 ? AutoComplete.defaultProps.maxResults : _this$props4$maxResul,
410
+ _this$props4$multiple = _this$props4.multiple,
411
+ multiple = _this$props4$multiple === void 0 ? AutoComplete.defaultProps.multiple : _this$props4$multiple,
412
+ _this$props4$optionIt = _this$props4.optionItemComponent,
413
+ OptionItem = _this$props4$optionIt === void 0 ? AutoComplete.defaultProps.optionItemComponent : _this$props4$optionIt;
488
414
  var _this$state = _this.state,
489
- inputWidth = _this$state.inputWidth,
490
- showAllResults = _this$state.showAllResults;
415
+ inputWidth = _this$state.inputWidth,
416
+ showAllResults = _this$state.showAllResults;
491
417
  var dropdownStyle = inputWidth ? {
492
418
  minWidth: inputWidth,
493
419
  maxWidth: "42vw"
@@ -500,13 +426,11 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
500
426
  var shouldShowDefaultEmptyState = emptyState === defaultEmptyState && results.length === 0 && !!(inputValue !== null && inputValue !== void 0 && inputValue.length);
501
427
  var shouldShowEmptyState = emptyState !== defaultEmptyState && !!emptyState && results.length === 0;
502
428
  var showResults = results.length > 0;
503
-
504
429
  if (!isOpen || !showResults && !shouldShowEmptyState && !shouldShowDefaultEmptyState) {
505
430
  return /*#__PURE__*/_jsx("ul", _objectSpread(_objectSpread({}, getMenuProps()), {}, {
506
431
  className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["hidden h-0"])))
507
432
  }));
508
433
  }
509
-
510
434
  return /*#__PURE__*/_jsx(Popper, {
511
435
  placement: "bottom-start",
512
436
  strategy: "fixed",
@@ -517,11 +441,10 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
517
441
  },
518
442
  children: function children(popper) {
519
443
  var _getMenuProps = getMenuProps({
520
- ref: popper.ref
521
- }),
522
- menuRef = _getMenuProps.ref,
523
- menuProps = _objectWithoutProperties(_getMenuProps, _excluded2);
524
-
444
+ ref: popper.ref
445
+ }),
446
+ menuRef = _getMenuProps.ref,
447
+ menuProps = _objectWithoutProperties(_getMenuProps, _excluded2);
525
448
  return /*#__PURE__*/_jsx(ClickAwayContainer, {
526
449
  element: _this.menuWrapperRef,
527
450
  children: /*#__PURE__*/_jsx("div", {
@@ -578,34 +501,28 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
578
501
  }
579
502
  });
580
503
  });
581
-
582
504
  _defineProperty(_assertThisInitialized(_this), "renderSelect", function (autocompleteHelpers, fieldState) {
583
505
  var _this$context$portalT;
584
-
585
506
  var _this$props5 = _this.props,
586
- className = _this$props5.className,
587
- options = _this$props5.options,
588
- value = _this$props5.value,
589
- creatable = _this$props5.creatable,
590
- _this$props5$createFr = _this$props5.createFromInputValue,
591
- createFromInputValue = _this$props5$createFr === void 0 ? AutoComplete.defaultProps.createFromInputValue : _this$props5$createFr;
507
+ className = _this$props5.className,
508
+ options = _this$props5.options,
509
+ value = _this$props5.value,
510
+ creatable = _this$props5.creatable,
511
+ _this$props5$createFr = _this$props5.createFromInputValue,
512
+ createFromInputValue = _this$props5$createFr === void 0 ? AutoComplete.defaultProps.createFromInputValue : _this$props5$createFr;
592
513
  var inputValue = autocompleteHelpers.inputValue || "";
593
514
  var results = options ? filter(options, Array.isArray(value) ? value : [], inputValue) : [];
594
515
  var emptyInputValue = !inputValue || inputValue.trim().length === 0;
595
-
596
516
  if (creatable && !emptyInputValue) {
597
517
  results.unshift.apply(results, _toConsumableArray(createFromInputValue(options, inputValue)));
598
518
  }
599
-
600
519
  return /*#__PURE__*/_jsxs("div", {
601
520
  className: cx(stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["flex"]))), className),
602
521
  children: [_this.renderInput(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)]
603
522
  });
604
523
  });
605
-
606
524
  return _this;
607
525
  }
608
-
609
526
  _createClass(AutoComplete, [{
610
527
  key: "componentDidUpdate",
611
528
  value: function componentDidUpdate(prevProps) {
@@ -615,7 +532,6 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
615
532
  var prevPropsInputValue = inputValueFromProps(prevProps);
616
533
  var propsInputValue = inputValueFromProps(this.props);
617
534
  var shouldUpdateInputValueFromProps = prevPropsInputValue !== propsInputValue && this.state.inputValue !== propsInputValue;
618
-
619
535
  if (shouldUpdateInputValueFromProps) {
620
536
  this.setState({
621
537
  inputValue: propsInputValue
@@ -631,7 +547,6 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
631
547
  key: "render",
632
548
  value: function render() {
633
549
  var _this2 = this;
634
-
635
550
  var inputValue = (this.props.inputValue !== undefined ? this.props.inputValue : this.state.inputValue) || "";
636
551
  return /*#__PURE__*/_jsx(FieldStateContext.Consumer, {
637
552
  children: function children(fieldState) {
@@ -642,8 +557,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
642
557
  * See multi-select example
643
558
  * https://github.com/downshift-js/downshift#examples
644
559
  * https://codesandbox.io/s/github/kentcdodds/downshift-examples/tree/master/?module=/src/ordered-examples/04-multi-select.js&moduleview=1&file=/src/ordered-examples/04-multi-select.js:2482-2509
645
- */
646
- ,
560
+ */,
647
561
  selectedItem: null,
648
562
  getA11yStatusMessage: _this2.getA11yStatusMessage,
649
563
  onChange: _this2.handleChange,
@@ -657,12 +571,9 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
657
571
  });
658
572
  }
659
573
  }]);
660
-
661
574
  return AutoComplete;
662
575
  }(Component);
663
-
664
576
  _defineProperty(AutoComplete, "contextType", SatelliteContext);
665
-
666
577
  _defineProperty(AutoComplete, "defaultProps", {
667
578
  clearable: false,
668
579
  creatable: false,
@@ -675,5 +586,4 @@ _defineProperty(AutoComplete, "defaultProps", {
675
586
  optionItemComponent: DefaultOption,
676
587
  noWrap: false
677
588
  });
678
-
679
589
  export default AutoComplete;
@@ -7,7 +7,7 @@ var disabledColor = _disabledColor;
7
7
  var rgba = _rgba;
8
8
  var autoCompletePlugin = plugin(function (_ref) {
9
9
  var addComponents = _ref.addComponents,
10
- theme = _ref.theme;
10
+ theme = _ref.theme;
11
11
  addComponents({
12
12
  ".autocomplete-container": {
13
13
  display: "flex",
@@ -36,10 +36,10 @@ var autoCompletePlugin = plugin(function (_ref) {
36
36
  minHeight: "3rem",
37
37
  "&::after": {
38
38
  minHeight: "38px" // don't ask me why 38
39
-
40
39
  }
41
40
  }
42
41
  },
42
+
43
43
  ".autocomplete-focused, .autocomplete-container:focus-within": {
44
44
  borderColor: theme("colors.accent.600"),
45
45
  boxShadow: "0px 1px 0px 0px ".concat(theme("colors.shadow.5"))
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2, _templateObject3;
4
-
5
3
  import { X } from "react-feather";
6
4
  import { Medallion } from "../../Medallion";
7
5
  import stl from "../../styles/helpers/satellitePrefixer";
@@ -9,11 +7,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
8
  export var AutoCompleteEmptyState = function AutoCompleteEmptyState(_ref) {
11
9
  var _ref$icon = _ref.icon,
12
- icon = _ref$icon === void 0 ? X : _ref$icon,
13
- _ref$variant = _ref.variant,
14
- variant = _ref$variant === void 0 ? "grey" : _ref$variant,
15
- title = _ref.title,
16
- description = _ref.description;
10
+ icon = _ref$icon === void 0 ? X : _ref$icon,
11
+ _ref$variant = _ref.variant,
12
+ variant = _ref$variant === void 0 ? "grey" : _ref$variant,
13
+ title = _ref.title,
14
+ description = _ref.description;
17
15
  return /*#__PURE__*/_jsxs("div", {
18
16
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex flex-col items-center p-6"]))),
19
17
  children: [/*#__PURE__*/_jsx(Medallion, {
@@ -1,22 +1,17 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
4
-
5
3
  import stl from "../../styles/helpers/satellitePrefixer";
6
4
  import { jsx as _jsx } from "react/jsx-runtime";
7
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
-
9
6
  var metadataSpacer = /*#__PURE__*/_jsx("span", {
10
7
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["px-1"]))),
11
8
  children: "\xB7"
12
9
  });
13
-
14
10
  var DefaultOptionItem = function DefaultOptionItem(_ref) {
15
11
  var _locale$optionItemPre;
16
-
17
12
  var option = _ref.option,
18
- multiple = _ref.multiple,
19
- locale = _ref.locale;
13
+ multiple = _ref.multiple,
14
+ locale = _ref.locale;
20
15
  return /*#__PURE__*/_jsxs("div", {
21
16
  className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate py-2"]))),
22
17
  children: [/*#__PURE__*/_jsx("span", {
@@ -32,5 +27,4 @@ var DefaultOptionItem = function DefaultOptionItem(_ref) {
32
27
  })]
33
28
  });
34
29
  };
35
-
36
30
  export default DefaultOptionItem;
@@ -2,7 +2,6 @@ import pluralize from "../utils/pluralize";
2
2
  export function isAutoCompleteMultiProps(props) {
3
3
  return Boolean(props.multiple);
4
4
  }
5
-
6
5
  function createFromInputValue() {
7
6
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
8
7
  var inputValue = arguments.length > 1 ? arguments[1] : undefined;
@@ -15,7 +14,6 @@ function createFromInputValue() {
15
14
  "new": true
16
15
  }];
17
16
  }
18
-
19
17
  export var defaultCreateFromInputValue = function defaultCreateFromInputValue(options, inputValue) {
20
18
  return createFromInputValue(options, inputValue, function (option) {
21
19
  return option.value === inputValue;