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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/cjs/AnnouncementBadge/AnnouncementBadge.js +7 -24
  2. package/cjs/AnnouncementBadge/index.js +0 -5
  3. package/cjs/AutoComplete/AutoComplete.js +72 -167
  4. package/cjs/AutoComplete/AutoComplete.tailwind.js +2 -5
  5. package/cjs/AutoComplete/components/AutoCompleteEmptyState.js +5 -14
  6. package/cjs/AutoComplete/components/DefaultOptionItem.js +2 -11
  7. package/cjs/AutoComplete/index.js +0 -11
  8. package/cjs/AutoComplete/utils.js +0 -8
  9. package/cjs/Avatars/ApplicationAvatar.js +3 -13
  10. package/cjs/Avatars/UserAvatar.js +6 -20
  11. package/cjs/Avatars/index.js +0 -7
  12. package/cjs/Avatars/utils.js +6 -37
  13. package/cjs/Badge/Badge.js +13 -36
  14. package/cjs/Badge/index.js +0 -5
  15. package/cjs/Banners/Alert/Alert.js +18 -28
  16. package/cjs/Banners/Alert/index.js +0 -5
  17. package/cjs/Banners/BigBertha/BigBertha.js +1 -9
  18. package/cjs/Banners/BigBertha/index.js +0 -5
  19. package/cjs/Banners/Promote/Promote.js +8 -19
  20. package/cjs/Banners/Promote/index.js +0 -5
  21. package/cjs/Banners/index.js +0 -6
  22. package/cjs/Button/Button.js +13 -33
  23. package/cjs/Button/Button.tailwind.js +3 -5
  24. package/cjs/Button/ButtonGroup.d.ts +2 -1
  25. package/cjs/Button/ButtonGroup.js +3 -11
  26. package/cjs/Button/IconButton.js +12 -35
  27. package/cjs/Button/index.js +0 -11
  28. package/cjs/Button/styles.js +1 -10
  29. package/cjs/Button/types.js +0 -1
  30. package/cjs/Card/Card.js +6 -21
  31. package/cjs/Card/Card.tailwind.js +1 -2
  32. package/cjs/Card/components/CardHeader.js +1 -14
  33. package/cjs/Card/components/CardTitle.js +2 -15
  34. package/cjs/Card/index.js +0 -9
  35. package/cjs/Checkbox/Checkbox.js +14 -38
  36. package/cjs/Checkbox/Checkbox.tailwind.js +1 -3
  37. package/cjs/Checkbox/index.js +0 -5
  38. package/cjs/ClickAwayContainer/ClickAwayContainer.js +11 -23
  39. package/cjs/ClickAwayContainer/index.js +0 -2
  40. package/cjs/DatePicker/DatePicker/DatePicker.js +13 -46
  41. package/cjs/DatePicker/DatePicker/datePickerReducer.js +0 -15
  42. package/cjs/DatePicker/DatePicker/index.js +0 -7
  43. package/cjs/DatePicker/DatePicker.tailwind.js +3 -13
  44. package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +29 -72
  45. package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -14
  46. package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -28
  47. package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +0 -6
  48. package/cjs/DatePicker/DateRangePicker/index.js +0 -9
  49. package/cjs/DatePicker/components/Calendar.js +5 -16
  50. package/cjs/DatePicker/components/Display.js +3 -9
  51. package/cjs/DatePicker/components/Footer.js +0 -7
  52. package/cjs/DatePicker/components/FooterActions.js +3 -11
  53. package/cjs/DatePicker/components/Modal.js +17 -39
  54. package/cjs/DatePicker/components/NavBar.js +37 -47
  55. package/cjs/DatePicker/components/SidePanel.js +0 -7
  56. package/cjs/DatePicker/components/index.js +0 -7
  57. package/cjs/DatePicker/index.js +0 -9
  58. package/cjs/DatePicker/utils.js +0 -4
  59. package/cjs/Dropdown/Dropdown.js +23 -58
  60. package/cjs/Dropdown/DropdownButton.js +3 -20
  61. package/cjs/Dropdown/DropdownContext.js +0 -6
  62. package/cjs/Dropdown/components/DropdownButtonItem.js +5 -21
  63. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -25
  64. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -6
  65. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -6
  66. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -16
  67. package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -15
  68. package/cjs/Dropdown/components/DropdownCollapsibleItem/index.js +0 -9
  69. package/cjs/Dropdown/components/DropdownDivider.js +0 -7
  70. package/cjs/Dropdown/components/DropdownFooterItem.js +2 -15
  71. package/cjs/Dropdown/components/DropdownLinkItem.js +6 -23
  72. package/cjs/Dropdown/components/DropdownRadioItem.js +4 -20
  73. package/cjs/Dropdown/components/DropdownTitle.js +1 -14
  74. package/cjs/Dropdown/components/DropdownToggleItem.js +5 -22
  75. package/cjs/Dropdown/index.js +0 -27
  76. package/cjs/Dropdown/useDropdownItemProps.js +1 -14
  77. package/cjs/Dropzone/Dropzone.js +27 -62
  78. package/cjs/Dropzone/index.js +0 -5
  79. package/cjs/EmptyState/EmptyState.js +12 -23
  80. package/cjs/EmptyState/EmptyState.tailwind.js +0 -1
  81. package/cjs/EmptyState/index.js +0 -7
  82. package/cjs/Field/Field.js +8 -21
  83. package/cjs/Field/FieldStateContext.js +0 -2
  84. package/cjs/Field/index.js +0 -9
  85. package/cjs/Field/useFieldState.js +0 -7
  86. package/cjs/Flag/Flag.js +17 -40
  87. package/cjs/Flag/Flag.tailwind.js +0 -1
  88. package/cjs/Flag/Flags.js +4 -19
  89. package/cjs/Flag/index.js +0 -9
  90. package/cjs/FlexGrid/FlexGrid.js +13 -24
  91. package/cjs/FlexGrid/FlexGrid.tailwind.js +4 -11
  92. package/cjs/FlexGrid/index.js +0 -5
  93. package/cjs/HelpUnderline/HelpUnderline.js +5 -14
  94. package/cjs/HelpUnderline/HelpUnderline.tailwind.js +1 -2
  95. package/cjs/HelpUnderline/index.js +0 -5
  96. package/cjs/Input/Input.js +26 -70
  97. package/cjs/Input/Input.tailwind.js +1 -4
  98. package/cjs/Input/index.js +0 -5
  99. package/cjs/Insert/Insert.js +7 -17
  100. package/cjs/Insert/index.js +0 -5
  101. package/cjs/InstantSearch/InstantSearch.tailwind.js +4 -10
  102. package/cjs/KeyboardKey/KeyboardKey.js +1 -12
  103. package/cjs/KeyboardKey/KeyboardKey.tailwind.js +1 -2
  104. package/cjs/KeyboardKey/index.js +0 -2
  105. package/cjs/Link/BaseLink.js +2 -12
  106. package/cjs/Link/ButtonLink.js +3 -17
  107. package/cjs/Link/IconButtonLink.js +2 -13
  108. package/cjs/Link/Link.js +6 -23
  109. package/cjs/Link/index.js +0 -11
  110. package/cjs/Medallion/Medallion.js +5 -14
  111. package/cjs/Medallion/Medallion.tailwind.js +3 -6
  112. package/cjs/Medallion/index.js +0 -7
  113. package/cjs/Modal/Modal.js +21 -57
  114. package/cjs/Modal/Modal.tailwind.js +3 -3
  115. package/cjs/Modal/components/ModalFooter.js +2 -16
  116. package/cjs/Modal/components/ModalSection.js +3 -11
  117. package/cjs/Modal/index.js +0 -9
  118. package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
  119. package/cjs/Pagination/CompactPagination/CompactPagination.js +2 -20
  120. package/cjs/Pagination/CompactPagination/index.js +0 -5
  121. package/cjs/Pagination/DotPagination/DotPagination.js +5 -19
  122. package/cjs/Pagination/DotPagination/index.js +0 -5
  123. package/cjs/Pagination/Pagination/Pagination.js +9 -34
  124. package/cjs/Pagination/Pagination/index.js +0 -5
  125. package/cjs/Pagination/index.js +0 -9
  126. package/cjs/ProgressBar/ProgressBar.js +3 -16
  127. package/cjs/ProgressBar/ProgressBar.tailwind.js +1 -3
  128. package/cjs/ProgressBar/index.js +0 -5
  129. package/cjs/ProgressSpinner/ProgressSpinner.js +8 -20
  130. package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +2 -3
  131. package/cjs/ProgressSpinner/index.js +0 -5
  132. package/cjs/RadioGroup/RadioButton.js +1 -14
  133. package/cjs/RadioGroup/RadioButton.tailwind.js +1 -4
  134. package/cjs/RadioGroup/RadioGroup.js +19 -38
  135. package/cjs/RadioGroup/RadiogroupContext.js +0 -6
  136. package/cjs/RadioGroup/index.js +0 -9
  137. package/cjs/RangeSlider/RangeSlider.js +26 -43
  138. package/cjs/RangeSlider/RangeSlider.tailwind.js +1 -3
  139. package/cjs/RangeSlider/index.js +0 -5
  140. package/cjs/Satellite/Satellite.js +4 -10
  141. package/cjs/Satellite/SatelliteContext.js +0 -9
  142. package/cjs/Satellite/SatelliteRouter.js +2 -9
  143. package/cjs/Satellite/index.js +0 -13
  144. package/cjs/Satellite/locale.js +1 -7
  145. package/cjs/Satellite/useCreatePortal.js +2 -8
  146. package/cjs/ScrollIndicator/ScrollIndicator.js +18 -41
  147. package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +1 -3
  148. package/cjs/ScrollIndicator/index.js +0 -5
  149. package/cjs/Select/Select.js +4 -17
  150. package/cjs/Select/Select.tailwind.js +2 -5
  151. package/cjs/Select/index.js +0 -5
  152. package/cjs/Sidebar/Sidebar.js +11 -30
  153. package/cjs/Sidebar/SidebarButtonLink.js +10 -30
  154. package/cjs/Sidebar/SidebarContext.js +0 -6
  155. package/cjs/Sidebar/SidebarHeader.js +1 -9
  156. package/cjs/Sidebar/SidebarHeading.js +3 -14
  157. package/cjs/Sidebar/SidebarLink.js +5 -20
  158. package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -11
  159. package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -14
  160. package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -31
  161. package/cjs/Sidebar/SidebarLinksGroup/index.js +0 -2
  162. package/cjs/Sidebar/SidebarNav.js +5 -16
  163. package/cjs/Sidebar/index.js +0 -17
  164. package/cjs/Switch/Switch.js +15 -36
  165. package/cjs/Switch/Switch.tailwind.js +1 -2
  166. package/cjs/Switch/SwitchOption.js +2 -15
  167. package/cjs/Switch/index.js +0 -7
  168. package/cjs/Switch/utils.js +0 -9
  169. package/cjs/Tables/DataTable/DataTable.js +28 -70
  170. package/cjs/Tables/DataTable/DataTable.tailwind.js +2 -2
  171. package/cjs/Tables/DataTable/components/Body.js +14 -33
  172. package/cjs/Tables/DataTable/components/Footer.js +1 -17
  173. package/cjs/Tables/DataTable/components/Header.js +5 -12
  174. package/cjs/Tables/DataTable/components/HeaderCell.js +10 -27
  175. package/cjs/Tables/DataTable/components/Loader.js +4 -17
  176. package/cjs/Tables/DataTable/components/index.js +0 -10
  177. package/cjs/Tables/DataTable/index.js +0 -7
  178. package/cjs/Tables/DataTable/utils.js +0 -9
  179. package/cjs/Tables/Table/Table.js +7 -21
  180. package/cjs/Tables/Table/Table.tailwind.js +1 -2
  181. package/cjs/Tables/Table/components/TableFooter.js +2 -10
  182. package/cjs/Tables/Table/index.js +0 -7
  183. package/cjs/Tables/index.js +0 -7
  184. package/cjs/Tabs/ContentTabs.js +28 -62
  185. package/cjs/Tabs/LinkTabs.js +5 -18
  186. package/cjs/Tabs/Tabs.tailwind.js +1 -2
  187. package/cjs/Tabs/components/LinkTab.js +2 -27
  188. package/cjs/Tabs/index.js +0 -9
  189. package/cjs/Tabs/utils.js +0 -5
  190. package/cjs/Tag/Tag.js +7 -26
  191. package/cjs/Tag/Tag.tailwind.js +1 -2
  192. package/cjs/Tag/index.js +0 -5
  193. package/cjs/TextArea/TextArea.js +1 -14
  194. package/cjs/TextArea/TextArea.tailwind.js +1 -4
  195. package/cjs/TextArea/index.js +0 -5
  196. package/cjs/TextWrap/TextWrap.d.ts +1 -0
  197. package/cjs/TextWrap/TextWrap.js +3 -18
  198. package/cjs/TextWrap/index.js +0 -5
  199. package/cjs/Toggle/Toggle.js +6 -27
  200. package/cjs/Toggle/Toggle.tailwind.js +1 -3
  201. package/cjs/Toggle/index.js +0 -5
  202. package/cjs/Tooltip/OverflowTooltipWrapper.js +33 -62
  203. package/cjs/Tooltip/Tooltip.js +4 -17
  204. package/cjs/Tooltip/Tooltip.tailwind.js +3 -5
  205. package/cjs/Tooltip/TooltipWrapper.js +43 -71
  206. package/cjs/Tooltip/index.js +0 -9
  207. package/cjs/Typography/Typography.tailwind.js +15 -21
  208. package/cjs/UserContent/UserContent.js +7 -16
  209. package/cjs/UserContent/UserContent.tailwind.js +4 -13
  210. package/cjs/index.js +0 -89
  211. package/cjs/styles/base.tailwind.js +7 -7
  212. package/cjs/styles/colors.js +7 -7
  213. package/cjs/styles/disabledColor.js +1 -4
  214. package/cjs/styles/helpers/icons.js +5 -11
  215. package/cjs/styles/helpers/makePurgeCssExtractor.js +3 -15
  216. package/cjs/styles/helpers/makeTailwindPrefixer.js +1 -9
  217. package/cjs/styles/helpers/prefixTailwindClassName.js +6 -6
  218. package/cjs/styles/helpers/satellitePrefixer.js +1 -2
  219. package/cjs/styles/rgba.js +1 -3
  220. package/cjs/styles/tailwind.config.js +4 -11
  221. package/cjs/styles/zIndexes.js +1 -0
  222. package/cjs/utilities/utilities.tailwind.js +0 -3
  223. package/cjs/utils/event-polyfill.js +0 -2
  224. package/cjs/utils/formatters.js +12 -19
  225. package/cjs/utils/genericChangeHandler.js +0 -6
  226. package/cjs/utils/hashCode.js +0 -5
  227. package/cjs/utils/index.js +0 -7
  228. package/cjs/utils/isCssPropertySupported.js +0 -3
  229. package/cjs/utils/isNil.js +0 -2
  230. package/cjs/utils/isRenderedChild.js +0 -2
  231. package/cjs/utils/matchLocation.js +0 -4
  232. package/cjs/utils/onlyText.js +3 -12
  233. package/cjs/utils/parseUrl.js +2 -4
  234. package/cjs/utils/pluralize.js +2 -7
  235. package/cjs/utils/range.js +0 -2
  236. package/cjs/utils/toSentenceCase.js +0 -4
  237. package/cjs/utils/uniqBy.js +0 -4
  238. package/cjs/utils/uniqueId.js +0 -2
  239. package/cjs/utils/useForwardedRef.js +0 -6
  240. package/cjs/utils/useLinkProps.js +1 -13
  241. package/cjs/utils/useTriggerInputChange.js +2 -4
  242. package/esm/AnnouncementBadge/AnnouncementBadge.js +7 -14
  243. package/esm/AutoComplete/AutoComplete.js +72 -162
  244. package/esm/AutoComplete/AutoComplete.tailwind.js +2 -2
  245. package/esm/AutoComplete/components/AutoCompleteEmptyState.js +5 -7
  246. package/esm/AutoComplete/components/DefaultOptionItem.js +2 -8
  247. package/esm/AutoComplete/utils.js +0 -2
  248. package/esm/Avatars/ApplicationAvatar.js +3 -6
  249. package/esm/Avatars/UserAvatar.js +6 -12
  250. package/esm/Avatars/utils.js +7 -23
  251. package/esm/Badge/Badge.js +13 -28
  252. package/esm/Banners/Alert/Alert.js +18 -20
  253. package/esm/Banners/BigBertha/BigBertha.js +1 -4
  254. package/esm/Banners/Promote/Promote.js +8 -10
  255. package/esm/Button/Button.js +13 -21
  256. package/esm/Button/Button.tailwind.js +3 -2
  257. package/esm/Button/ButtonGroup.d.ts +2 -1
  258. package/esm/Button/ButtonGroup.js +3 -6
  259. package/esm/Button/IconButton.js +12 -22
  260. package/esm/Button/styles.js +1 -5
  261. package/esm/Card/Card.js +6 -12
  262. package/esm/Card/Card.tailwind.js +1 -1
  263. package/esm/Card/components/CardHeader.js +1 -7
  264. package/esm/Card/components/CardTitle.js +2 -8
  265. package/esm/Checkbox/Checkbox.js +14 -28
  266. package/esm/Checkbox/Checkbox.tailwind.js +1 -1
  267. package/esm/ClickAwayContainer/ClickAwayContainer.js +11 -13
  268. package/esm/DatePicker/DatePicker/DatePicker.js +13 -31
  269. package/esm/DatePicker/DatePicker/datePickerReducer.js +0 -9
  270. package/esm/DatePicker/DatePicker.tailwind.js +3 -10
  271. package/esm/DatePicker/DateRangePicker/DateRangePicker.js +29 -55
  272. package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -8
  273. package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -16
  274. package/esm/DatePicker/components/Calendar.js +5 -10
  275. package/esm/DatePicker/components/Display.js +3 -5
  276. package/esm/DatePicker/components/Footer.js +0 -4
  277. package/esm/DatePicker/components/FooterActions.js +3 -7
  278. package/esm/DatePicker/components/Modal.js +17 -27
  279. package/esm/DatePicker/components/NavBar.js +37 -36
  280. package/esm/DatePicker/components/SidePanel.js +0 -4
  281. package/esm/Dropdown/Dropdown.js +23 -34
  282. package/esm/Dropdown/DropdownButton.js +3 -11
  283. package/esm/Dropdown/DropdownContext.js +0 -2
  284. package/esm/Dropdown/components/DropdownButtonItem.js +5 -12
  285. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -15
  286. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -2
  287. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -2
  288. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
  289. package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
  290. package/esm/Dropdown/components/DropdownDivider.js +0 -2
  291. package/esm/Dropdown/components/DropdownFooterItem.js +2 -8
  292. package/esm/Dropdown/components/DropdownLinkItem.js +6 -13
  293. package/esm/Dropdown/components/DropdownRadioItem.js +4 -11
  294. package/esm/Dropdown/components/DropdownTitle.js +1 -7
  295. package/esm/Dropdown/components/DropdownToggleItem.js +5 -12
  296. package/esm/Dropdown/useDropdownItemProps.js +1 -7
  297. package/esm/Dropzone/Dropzone.js +27 -45
  298. package/esm/EmptyState/EmptyState.js +12 -16
  299. package/esm/Field/Field.js +8 -11
  300. package/esm/Flag/Flag.js +17 -25
  301. package/esm/Flag/Flags.js +4 -9
  302. package/esm/FlexGrid/FlexGrid.js +13 -15
  303. package/esm/FlexGrid/FlexGrid.tailwind.js +4 -9
  304. package/esm/HelpUnderline/HelpUnderline.js +5 -7
  305. package/esm/HelpUnderline/HelpUnderline.tailwind.js +1 -1
  306. package/esm/Input/Input.js +26 -54
  307. package/esm/Input/Input.tailwind.js +1 -1
  308. package/esm/Insert/Insert.js +7 -11
  309. package/esm/InstantSearch/InstantSearch.tailwind.js +4 -4
  310. package/esm/KeyboardKey/KeyboardKey.js +1 -3
  311. package/esm/KeyboardKey/KeyboardKey.tailwind.js +1 -1
  312. package/esm/Link/BaseLink.js +2 -6
  313. package/esm/Link/ButtonLink.js +3 -9
  314. package/esm/Link/IconButtonLink.js +2 -6
  315. package/esm/Link/Link.js +6 -14
  316. package/esm/Medallion/Medallion.js +5 -7
  317. package/esm/Medallion/Medallion.tailwind.js +3 -2
  318. package/esm/Modal/Modal.js +21 -38
  319. package/esm/Modal/Modal.tailwind.js +3 -2
  320. package/esm/Modal/components/ModalFooter.js +2 -8
  321. package/esm/Modal/components/ModalSection.js +3 -5
  322. package/esm/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
  323. package/esm/Pagination/CompactPagination/CompactPagination.js +3 -7
  324. package/esm/Pagination/DotPagination/DotPagination.js +5 -11
  325. package/esm/Pagination/Pagination/Pagination.js +9 -21
  326. package/esm/ProgressBar/ProgressBar.js +3 -10
  327. package/esm/ProgressBar/ProgressBar.tailwind.js +1 -1
  328. package/esm/ProgressSpinner/ProgressSpinner.js +8 -12
  329. package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +2 -2
  330. package/esm/RadioGroup/RadioButton.js +1 -7
  331. package/esm/RadioGroup/RadioButton.tailwind.js +1 -1
  332. package/esm/RadioGroup/RadioGroup.js +19 -25
  333. package/esm/RadioGroup/RadiogroupContext.js +0 -2
  334. package/esm/RangeSlider/RangeSlider.js +26 -35
  335. package/esm/RangeSlider/RangeSlider.tailwind.js +1 -1
  336. package/esm/Satellite/Satellite.js +4 -4
  337. package/esm/Satellite/SatelliteContext.js +0 -3
  338. package/esm/Satellite/SatelliteRouter.js +2 -4
  339. package/esm/Satellite/locale.js +1 -2
  340. package/esm/Satellite/useCreatePortal.js +2 -2
  341. package/esm/ScrollIndicator/ScrollIndicator.js +18 -31
  342. package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +1 -1
  343. package/esm/Select/Select.js +4 -9
  344. package/esm/Select/Select.tailwind.js +2 -2
  345. package/esm/Sidebar/Sidebar.js +11 -17
  346. package/esm/Sidebar/SidebarButtonLink.js +10 -20
  347. package/esm/Sidebar/SidebarContext.js +0 -2
  348. package/esm/Sidebar/SidebarHeader.js +1 -3
  349. package/esm/Sidebar/SidebarHeading.js +3 -7
  350. package/esm/Sidebar/SidebarLink.js +5 -11
  351. package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -4
  352. package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -7
  353. package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -18
  354. package/esm/Sidebar/SidebarNav.js +5 -9
  355. package/esm/Switch/Switch.js +15 -24
  356. package/esm/Switch/Switch.tailwind.js +1 -1
  357. package/esm/Switch/SwitchOption.js +2 -6
  358. package/esm/Tables/DataTable/DataTable.js +28 -49
  359. package/esm/Tables/DataTable/DataTable.tailwind.js +2 -1
  360. package/esm/Tables/DataTable/components/Body.js +14 -23
  361. package/esm/Tables/DataTable/components/Footer.js +1 -8
  362. package/esm/Tables/DataTable/components/Header.js +5 -6
  363. package/esm/Tables/DataTable/components/HeaderCell.js +10 -17
  364. package/esm/Tables/DataTable/components/Loader.js +4 -8
  365. package/esm/Tables/DataTable/utils.js +0 -1
  366. package/esm/Tables/Table/Table.js +7 -14
  367. package/esm/Tables/Table/Table.tailwind.js +1 -1
  368. package/esm/Tables/Table/components/TableFooter.js +2 -4
  369. package/esm/Tabs/ContentTabs.js +28 -51
  370. package/esm/Tabs/LinkTabs.js +5 -7
  371. package/esm/Tabs/Tabs.tailwind.js +1 -1
  372. package/esm/Tabs/components/LinkTab.js +2 -18
  373. package/esm/Tabs/utils.js +0 -2
  374. package/esm/Tag/Tag.js +7 -16
  375. package/esm/Tag/Tag.tailwind.js +1 -1
  376. package/esm/TextArea/TextArea.js +1 -7
  377. package/esm/TextArea/TextArea.tailwind.js +1 -1
  378. package/esm/TextWrap/TextWrap.d.ts +1 -0
  379. package/esm/TextWrap/TextWrap.js +3 -11
  380. package/esm/Toggle/Toggle.js +6 -19
  381. package/esm/Toggle/Toggle.tailwind.js +1 -1
  382. package/esm/Tooltip/OverflowTooltipWrapper.js +33 -46
  383. package/esm/Tooltip/Tooltip.js +4 -9
  384. package/esm/Tooltip/Tooltip.tailwind.js +3 -4
  385. package/esm/Tooltip/TooltipWrapper.js +43 -56
  386. package/esm/Typography/Typography.tailwind.js +15 -18
  387. package/esm/UserContent/UserContent.js +7 -9
  388. package/esm/UserContent/UserContent.tailwind.js +4 -9
  389. package/esm/styles/base.tailwind.js +7 -6
  390. package/esm/styles/colors.js +7 -7
  391. package/esm/styles/disabledColor.js +1 -2
  392. package/esm/styles/helpers/icons.js +5 -8
  393. package/esm/styles/helpers/makePurgeCssExtractor.js +3 -14
  394. package/esm/styles/helpers/makeTailwindPrefixer.js +1 -6
  395. package/esm/styles/helpers/prefixTailwindClassName.js +6 -6
  396. package/esm/styles/helpers/satellitePrefixer.js +1 -1
  397. package/esm/styles/rgba.js +1 -2
  398. package/esm/styles/tailwind.config.js +4 -6
  399. package/esm/styles/zIndexes.js +1 -0
  400. package/esm/utils/event-polyfill.js +0 -2
  401. package/esm/utils/formatters.js +12 -16
  402. package/esm/utils/genericChangeHandler.js +0 -2
  403. package/esm/utils/hashCode.js +0 -3
  404. package/esm/utils/isCssPropertySupported.js +0 -2
  405. package/esm/utils/isRenderedChild.js +0 -1
  406. package/esm/utils/matchLocation.js +0 -2
  407. package/esm/utils/onlyText.js +3 -11
  408. package/esm/utils/parseUrl.js +2 -2
  409. package/esm/utils/pluralize.js +2 -5
  410. package/esm/utils/toSentenceCase.js +1 -1
  411. package/esm/utils/uniqBy.js +0 -2
  412. package/esm/utils/useForwardedRef.js +0 -3
  413. package/esm/utils/useLinkProps.js +1 -7
  414. package/esm/utils/useTriggerInputChange.js +2 -3
  415. package/package.json +2 -2
  416. package/satellite.min.css +1 -1
  417. package/scss/colors.scss +16 -16
@@ -2,15 +2,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
-
6
5
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
7
-
8
6
  var _excluded = ["id", "range", "displayOnlyRanges", "calendarProps", "initialState", "stateReducer", "onAction", "validate", "renderTarget", "renderLeftFooter", "renderRightPanel", "buttonSize", "modalPlacement", "locale"];
9
-
10
7
  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; }
11
-
12
8
  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; }
13
-
14
9
  import { useMemo, useReducer, useState } from "react";
15
10
  import { useLocale } from "../../Satellite";
16
11
  import stl from "../../styles/helpers/satellitePrefixer";
@@ -26,95 +21,83 @@ import { isCompleteTimeRange, isEmptyTimeRange } from "./dateRangePickerTimeRang
26
21
  import { jsx as _jsx } from "react/jsx-runtime";
27
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
23
  import { Fragment as _Fragment } from "react/jsx-runtime";
29
-
30
24
  var defaultValidator = function defaultValidator(_ref) {
31
25
  var candidateRange = _ref.candidateRange;
32
26
  return isCompleteTimeRange(candidateRange) ? null : [new Error("Invalid time range")];
33
27
  };
34
-
35
28
  var DEFAULT_DATE_RANGE_PICKER_LOCALE = _objectSpread(_objectSpread({}, DEFAULT_DATE_PICKER_LOCALE), {}, {
36
29
  openButton: "Enter a date period..."
37
30
  });
38
-
39
31
  export var DateRangePicker = function DateRangePicker(_ref2) {
40
32
  var _validate, _displayedRange$start, _initialRange$start;
41
-
42
33
  var id = _ref2.id,
43
- initialRange = _ref2.range,
44
- displayOnlyRanges = _ref2.displayOnlyRanges,
45
- _ref2$calendarProps = _ref2.calendarProps,
46
- calendarProps = _ref2$calendarProps === void 0 ? {} : _ref2$calendarProps,
47
- _ref2$initialState = _ref2.initialState,
48
- initialState = _ref2$initialState === void 0 ? {} : _ref2$initialState,
49
- _ref2$stateReducer = _ref2.stateReducer,
50
- stateReducer = _ref2$stateReducer === void 0 ? dateRangePickerReducer : _ref2$stateReducer,
51
- onAction = _ref2.onAction,
52
- _ref2$validate = _ref2.validate,
53
- validate = _ref2$validate === void 0 ? defaultValidator : _ref2$validate,
54
- renderTarget = _ref2.renderTarget,
55
- renderLeftFooter = _ref2.renderLeftFooter,
56
- renderRightPanel = _ref2.renderRightPanel,
57
- buttonSize = _ref2.buttonSize,
58
- modalPlacement = _ref2.modalPlacement,
59
- propsLocale = _ref2.locale,
60
- props = _objectWithoutProperties(_ref2, _excluded);
61
-
34
+ initialRange = _ref2.range,
35
+ displayOnlyRanges = _ref2.displayOnlyRanges,
36
+ _ref2$calendarProps = _ref2.calendarProps,
37
+ calendarProps = _ref2$calendarProps === void 0 ? {} : _ref2$calendarProps,
38
+ _ref2$initialState = _ref2.initialState,
39
+ initialState = _ref2$initialState === void 0 ? {} : _ref2$initialState,
40
+ _ref2$stateReducer = _ref2.stateReducer,
41
+ stateReducer = _ref2$stateReducer === void 0 ? dateRangePickerReducer : _ref2$stateReducer,
42
+ onAction = _ref2.onAction,
43
+ _ref2$validate = _ref2.validate,
44
+ validate = _ref2$validate === void 0 ? defaultValidator : _ref2$validate,
45
+ renderTarget = _ref2.renderTarget,
46
+ renderLeftFooter = _ref2.renderLeftFooter,
47
+ renderRightPanel = _ref2.renderRightPanel,
48
+ buttonSize = _ref2.buttonSize,
49
+ modalPlacement = _ref2.modalPlacement,
50
+ propsLocale = _ref2.locale,
51
+ props = _objectWithoutProperties(_ref2, _excluded);
62
52
  var contextLocale = useLocale("datePicker");
63
-
64
53
  var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_DATE_RANGE_PICKER_LOCALE), contextLocale), propsLocale);
65
-
66
54
  var _useState = useState(null),
67
- _useState2 = _slicedToArray(_useState, 2),
68
- targetElement = _useState2[0],
69
- setTargetElement = _useState2[1];
70
-
55
+ _useState2 = _slicedToArray(_useState, 2),
56
+ targetElement = _useState2[0],
57
+ setTargetElement = _useState2[1];
71
58
  var _useReducer = useReducer(function (state, action) {
72
- return stateReducer(state, action, dateRangePickerReducer);
73
- }, initialState, initDateRangePickerReducer),
74
- _useReducer2 = _slicedToArray(_useReducer, 2),
75
- state = _useReducer2[0],
76
- baseDispatch = _useReducer2[1]; // Computed properties
77
-
59
+ return stateReducer(state, action, dateRangePickerReducer);
60
+ }, initialState, initDateRangePickerReducer),
61
+ _useReducer2 = _slicedToArray(_useReducer, 2),
62
+ state = _useReducer2[0],
63
+ baseDispatch = _useReducer2[1];
78
64
 
65
+ // Computed properties
79
66
  var isValid = !((_validate = validate(state)) !== null && _validate !== void 0 && _validate.length);
80
67
  var displayedRange = useMemo(function () {
81
68
  return isEmptyTimeRange(state.candidateRange) ? initialRange !== null && initialRange !== void 0 ? initialRange : {
82
69
  start: null,
83
70
  end: null
84
71
  } : state.candidateRange;
85
- }, [initialRange, state.candidateRange]); // Event handlers
72
+ }, [initialRange, state.candidateRange]);
86
73
 
74
+ // Event handlers
87
75
  var dispatch = function dispatch(action) {
88
76
  onAction === null || onAction === void 0 ? void 0 : onAction(action, state);
89
77
  baseDispatch(action);
90
78
  };
91
-
92
79
  var handleOpen = function handleOpen() {
93
80
  dispatch({
94
81
  type: DateRangePickerActionTypes.show,
95
82
  payload: true
96
83
  });
97
84
  };
98
-
99
85
  var handleClose = function handleClose() {
100
86
  dispatch({
101
87
  type: DateRangePickerActionTypes.show,
102
88
  payload: false
103
89
  });
104
90
  };
105
-
106
91
  var handleCancel = function handleCancel() {
107
92
  dispatch({
108
93
  type: DateRangePickerActionTypes.cancel
109
94
  });
110
95
  };
111
-
112
96
  var handleApply = function handleApply() {
113
97
  dispatch({
114
98
  type: DateRangePickerActionTypes.apply
115
99
  });
116
100
  };
117
-
118
101
  var handleMouseEnter = function handleMouseEnter(payload, _a, event) {
119
102
  dispatch({
120
103
  type: DateRangePickerActionTypes.mouseDayEnter,
@@ -124,7 +107,6 @@ export var DateRangePicker = function DateRangePicker(_ref2) {
124
107
  }
125
108
  });
126
109
  };
127
-
128
110
  var handleMouseLeave = function handleMouseLeave(_a, _b, event) {
129
111
  dispatch({
130
112
  type: DateRangePickerActionTypes.mouseDayLeave,
@@ -133,7 +115,6 @@ export var DateRangePicker = function DateRangePicker(_ref2) {
133
115
  }
134
116
  });
135
117
  };
136
-
137
118
  var handleDayClick = function handleDayClick(payload, modifiers) {
138
119
  if (!modifiers.disabled) {
139
120
  dispatch({
@@ -142,7 +123,6 @@ export var DateRangePicker = function DateRangePicker(_ref2) {
142
123
  });
143
124
  }
144
125
  };
145
-
146
126
  var selectedDays = displayedRange.start && displayedRange.end ? {
147
127
  from: displayedRange.start,
148
128
  to: displayedRange.end
@@ -151,19 +131,15 @@ export var DateRangePicker = function DateRangePicker(_ref2) {
151
131
  to: state.hovered
152
132
  } : (_displayedRange$start = displayedRange.start) !== null && _displayedRange$start !== void 0 ? _displayedRange$start : undefined;
153
133
  var modifiers = {};
154
-
155
134
  if (displayedRange.start) {
156
135
  modifiers.start = [displayedRange.start];
157
136
  }
158
-
159
137
  if (displayedRange.end) {
160
138
  modifiers.end = [displayedRange.end];
161
139
  }
162
-
163
140
  if (state.hovered) {
164
141
  modifiers.hoveredTo = [state.hovered];
165
142
  }
166
-
167
143
  if (displayOnlyRanges) {
168
144
  modifiers.displayedRanges = displayOnlyRanges.filter(function (range) {
169
145
  return typeof range !== "undefined" && range.start instanceof Date && range.end instanceof Date;
@@ -184,10 +160,8 @@ export var DateRangePicker = function DateRangePicker(_ref2) {
184
160
  return range.end;
185
161
  });
186
162
  }
187
-
188
163
  var yearProps = useMemo(function () {
189
164
  var _ref3, _displayedRange$start2;
190
-
191
165
  return props.editableYear ? {
192
166
  editableYear: true,
193
167
  initialDate: (_ref3 = (_displayedRange$start2 = displayedRange.start) !== null && _displayedRange$start2 !== void 0 ? _displayedRange$start2 : displayedRange.end) !== null && _ref3 !== void 0 ? _ref3 : undefined,
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import stl from "../../styles/helpers/satellitePrefixer";
6
4
  import Display from "../components/Display";
7
5
  import { formatDate } from "../utils";
@@ -9,13 +7,12 @@ import { isCompleteTimeRange } from "./dateRangePickerTimeRange";
9
7
  import { jsx as _jsx } from "react/jsx-runtime";
10
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
11
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
-
13
10
  var DateRangePickerDisplay = function DateRangePickerDisplay(_ref) {
14
11
  var id = _ref.id,
15
- onClick = _ref.onClick,
16
- range = _ref.range,
17
- buttonSize = _ref.buttonSize,
18
- locale = _ref.locale;
12
+ onClick = _ref.onClick,
13
+ range = _ref.range,
14
+ buttonSize = _ref.buttonSize,
15
+ locale = _ref.locale;
19
16
  return /*#__PURE__*/_jsx(Display, {
20
17
  id: id,
21
18
  onClick: onClick,
@@ -33,5 +30,4 @@ var DateRangePickerDisplay = function DateRangePickerDisplay(_ref) {
33
30
  }) : locale.openButton
34
31
  });
35
32
  };
36
-
37
33
  export default DateRangePickerDisplay;
@@ -1,9 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
-
3
2
  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; }
4
-
5
3
  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; }
6
-
7
4
  import endOfDay from "date-fns/endOfDay";
8
5
  import isAfter from "date-fns/isAfter";
9
6
  import isBefore from "date-fns/isBefore";
@@ -11,7 +8,6 @@ import isSameDay from "date-fns/isSameDay";
11
8
  import startOfDay from "date-fns/startOfDay";
12
9
  import { isPartialTimeRange } from "./dateRangePickerTimeRange";
13
10
  export var DateRangePickerActionTypes;
14
-
15
11
  (function (DateRangePickerActionTypes) {
16
12
  DateRangePickerActionTypes["show"] = "show";
17
13
  DateRangePickerActionTypes["dateSelect"] = "date select";
@@ -22,7 +18,6 @@ export var DateRangePickerActionTypes;
22
18
  DateRangePickerActionTypes["cancel"] = "cancel";
23
19
  DateRangePickerActionTypes["reset"] = "reset";
24
20
  })(DateRangePickerActionTypes || (DateRangePickerActionTypes = {}));
25
-
26
21
  var initialState = {
27
22
  show: false,
28
23
  candidateRange: {
@@ -33,11 +28,9 @@ var initialState = {
33
28
  };
34
29
  export var initDateRangePickerReducer = function initDateRangePickerReducer(state) {
35
30
  var _state$candidateRange;
36
-
37
31
  var _ref = (_state$candidateRange = state.candidateRange) !== null && _state$candidateRange !== void 0 ? _state$candidateRange : initialState.candidateRange,
38
- start = _ref.start,
39
- end = _ref.end;
40
-
32
+ start = _ref.start,
33
+ end = _ref.end;
41
34
  return _objectSpread(_objectSpread(_objectSpread({}, initialState), state), {}, {
42
35
  candidateRange: {
43
36
  start: start && startOfDay(start),
@@ -51,7 +44,6 @@ export var dateRangePickerReducer = function dateRangePickerReducer(state, actio
51
44
  return _objectSpread(_objectSpread({}, state), {}, {
52
45
  show: action.payload
53
46
  });
54
-
55
47
  case DateRangePickerActionTypes.dateSelect:
56
48
  {
57
49
  return _objectSpread(_objectSpread({}, state), {}, {
@@ -64,25 +56,21 @@ export var dateRangePickerReducer = function dateRangePickerReducer(state, actio
64
56
  }
65
57
  });
66
58
  }
67
-
68
59
  case DateRangePickerActionTypes.rangeSelect:
69
60
  {
70
61
  return _objectSpread(_objectSpread({}, state), {}, {
71
62
  candidateRange: action.payload
72
63
  });
73
64
  }
74
-
75
65
  case DateRangePickerActionTypes.mouseDayEnter:
76
66
  var shouldStoreHover = state.candidateRange.start && isBefore(state.candidateRange.start, action.payload);
77
67
  return _objectSpread(_objectSpread({}, state), {}, {
78
68
  hovered: shouldStoreHover ? action.payload : null
79
69
  });
80
-
81
70
  case DateRangePickerActionTypes.mouseDayLeave:
82
71
  return _objectSpread(_objectSpread({}, state), {}, {
83
72
  hovered: null
84
73
  });
85
-
86
74
  case DateRangePickerActionTypes.apply:
87
75
  case DateRangePickerActionTypes.cancel:
88
76
  return _objectSpread(_objectSpread({}, state), {}, {
@@ -92,12 +80,10 @@ export var dateRangePickerReducer = function dateRangePickerReducer(state, actio
92
80
  },
93
81
  show: false
94
82
  });
95
-
96
83
  case DateRangePickerActionTypes.reset:
97
84
  return _objectSpread(_objectSpread({}, initialState), {}, {
98
85
  show: state.show
99
86
  });
100
-
101
87
  default:
102
88
  return state;
103
89
  }
@@ -1,29 +1,25 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
-
4
3
  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; }
5
-
6
4
  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; }
7
-
8
5
  import { DayPicker } from "react-day-picker";
9
6
  import NavBar from "./NavBar";
10
7
  import { jsx as _jsx } from "react/jsx-runtime";
11
8
  var excludedDayPickerPropsList = ["captionElement", "showOutsideDays", "enableOutsideDaysClick", "fixedWeeks", "labels", "navbarElement", "onTodayButtonClick", "pagedNavigation", "renderDay", "renderWeek", "reverseMonths", "showWeekNumber", "showWeekDays", "weekdayElement", "weekdaysLong", "weekdaysShort"];
12
-
13
9
  var Calendar = function Calendar(props) {
14
10
  var curatedProps = Object.fromEntries(Object.entries(props).filter(function (_ref) {
15
11
  var _ref2 = _slicedToArray(_ref, 1),
16
- key = _ref2[0];
17
-
18
- return (// @ts-expect-error
12
+ key = _ref2[0];
13
+ return (
14
+ // @ts-expect-error
19
15
  !excludedDayPickerPropsList.includes(key)
20
16
  );
21
17
  }));
18
+
22
19
  /**
23
20
  * modifierClassNames applies the object value (className) to the key (modifier). These classNames are
24
21
  * defined / modified in the DatePicker.tailwind.js file.
25
22
  */
26
-
27
23
  var modifierClassNames = {
28
24
  start: "rdp-day_range_start",
29
25
  end: "rdp-day_range_end",
@@ -32,8 +28,8 @@ var Calendar = function Calendar(props) {
32
28
  displayedRangesStart: "rdp-day_displayedRangesStart",
33
29
  //stl`bg-grey-600 text-white rounded-l border-0`,
34
30
  displayedRangesEnd: "rdp-day_displayedRangesEnd" //stl`bg-grey-600 text-white rounded-r border-0`,
35
-
36
31
  };
32
+
37
33
  return /*#__PURE__*/_jsx(DayPicker, _objectSpread(_objectSpread({
38
34
  mode: props.mode
39
35
  }, curatedProps), {}, {
@@ -49,5 +45,4 @@ var Calendar = function Calendar(props) {
49
45
  }
50
46
  }));
51
47
  };
52
-
53
48
  export default Calendar;
@@ -1,12 +1,11 @@
1
1
  import { Calendar } from "react-feather";
2
2
  import Button from "../../Button";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
-
5
4
  var Display = function Display(_ref) {
6
5
  var id = _ref.id,
7
- size = _ref.size,
8
- onClick = _ref.onClick,
9
- children = _ref.children;
6
+ size = _ref.size,
7
+ onClick = _ref.onClick,
8
+ children = _ref.children;
10
9
  return /*#__PURE__*/_jsx(Button, {
11
10
  id: id,
12
11
  size: size,
@@ -15,5 +14,4 @@ var Display = function Display(_ref) {
15
14
  children: children
16
15
  });
17
16
  };
18
-
19
17
  export default Display;
@@ -1,10 +1,7 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import stl from "../../styles/helpers/satellitePrefixer";
6
4
  import { jsx as _jsx } from "react/jsx-runtime";
7
-
8
5
  var Footer = function Footer(_ref) {
9
6
  var children = _ref.children;
10
7
  return /*#__PURE__*/_jsx("div", {
@@ -12,5 +9,4 @@ var Footer = function Footer(_ref) {
12
9
  children: children
13
10
  });
14
11
  };
15
-
16
12
  export default Footer;
@@ -1,17 +1,14 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2;
4
-
5
3
  import { Button } from "../../Button";
6
4
  import stl from "../../styles/helpers/satellitePrefixer";
7
5
  import { jsx as _jsx } from "react/jsx-runtime";
8
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
-
10
7
  var FooterActions = function FooterActions(_ref) {
11
8
  var onCancel = _ref.onCancel,
12
- onApply = _ref.onApply,
13
- disableApply = _ref.disableApply,
14
- locale = _ref.locale;
9
+ onApply = _ref.onApply,
10
+ disableApply = _ref.disableApply,
11
+ locale = _ref.locale;
15
12
  return /*#__PURE__*/_jsxs("div", {
16
13
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["ml-auto flex justify-end"]))),
17
14
  children: [/*#__PURE__*/_jsx(Button, {
@@ -26,5 +23,4 @@ var FooterActions = function FooterActions(_ref) {
26
23
  })]
27
24
  });
28
25
  };
29
-
30
26
  export default FooterActions;
@@ -2,13 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
-
6
5
  var _templateObject;
7
-
8
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
-
10
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
-
12
8
  import cx from "clsx";
13
9
  import { useState } from "react";
14
10
  import { usePopper } from "react-popper";
@@ -22,36 +18,31 @@ export var DEFAULT_DATE_PICKER_MODAL_POPPER_MODIFIERS = [{
22
18
  offset: [0, 16]
23
19
  }
24
20
  }];
25
-
26
21
  var Modal = function Modal(_ref) {
27
22
  var show = _ref.show,
28
- targetElement = _ref.targetElement,
29
- _onClickAway = _ref.onClickAway,
30
- children = _ref.children,
31
- _ref$placement = _ref.placement,
32
- placement = _ref$placement === void 0 ? "bottom-start" : _ref$placement,
33
- _ref$modifiers = _ref.modifiers,
34
- modifiers = _ref$modifiers === void 0 ? [] : _ref$modifiers,
35
- className = _ref.className;
23
+ targetElement = _ref.targetElement,
24
+ _onClickAway = _ref.onClickAway,
25
+ children = _ref.children,
26
+ _ref$placement = _ref.placement,
27
+ placement = _ref$placement === void 0 ? "bottom-start" : _ref$placement,
28
+ _ref$modifiers = _ref.modifiers,
29
+ modifiers = _ref$modifiers === void 0 ? [] : _ref$modifiers,
30
+ className = _ref.className;
36
31
  var createPortal = useCreatePortal();
37
-
38
32
  var _useState = useState(null),
39
- _useState2 = _slicedToArray(_useState, 2),
40
- datePickerElement = _useState2[0],
41
- setDatePickerElement = _useState2[1];
42
-
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ datePickerElement = _useState2[0],
35
+ setDatePickerElement = _useState2[1];
43
36
  var _usePopper = usePopper(targetElement, datePickerElement, {
44
- modifiers: [].concat(DEFAULT_DATE_PICKER_MODAL_POPPER_MODIFIERS, _toConsumableArray(modifiers)),
45
- placement: placement,
46
- strategy: "fixed"
47
- }),
48
- styles = _usePopper.styles,
49
- attributes = _usePopper.attributes;
50
-
37
+ modifiers: [].concat(DEFAULT_DATE_PICKER_MODAL_POPPER_MODIFIERS, _toConsumableArray(modifiers)),
38
+ placement: placement,
39
+ strategy: "fixed"
40
+ }),
41
+ styles = _usePopper.styles,
42
+ attributes = _usePopper.attributes;
51
43
  if (!show) {
52
44
  return null;
53
45
  }
54
-
55
46
  return createPortal( /*#__PURE__*/_jsx(ClickAwayContainer, {
56
47
  element: datePickerElement,
57
48
  onClickAway: function onClickAway(evt) {
@@ -66,5 +57,4 @@ var Modal = function Modal(_ref) {
66
57
  }))
67
58
  }));
68
59
  };
69
-
70
60
  export default Modal;
@@ -1,8 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
-
4
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
5
-
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
6
4
  import cx from "clsx";
7
5
  import { add, eachYearOfInterval, getYear, setYear } from "date-fns";
8
6
  import isSameMonth from "date-fns/isSameMonth";
@@ -11,27 +9,25 @@ import { useDayPicker, useNavigation } from "react-day-picker";
11
9
  import { ChevronLeft, ChevronRight } from "react-feather";
12
10
  import { IconButton } from "../../Button";
13
11
  import stl from "../../styles/helpers/satellitePrefixer";
12
+ import { uniqueId } from "../../utils";
14
13
  import { jsx as _jsx } from "react/jsx-runtime";
15
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
-
17
15
  var NavBar = function NavBar(props) {
18
16
  var _useDayPicker = useDayPicker(),
19
- numberOfMonths = _useDayPicker.numberOfMonths,
20
- onMonthChange = _useDayPicker.onMonthChange,
21
- formatMonthCaption = _useDayPicker.formatters.formatMonthCaption,
22
- dir = _useDayPicker.dir,
23
- locale = _useDayPicker.locale;
24
-
17
+ numberOfMonths = _useDayPicker.numberOfMonths,
18
+ onMonthChange = _useDayPicker.onMonthChange,
19
+ formatMonthCaption = _useDayPicker.formatters.formatMonthCaption,
20
+ dir = _useDayPicker.dir,
21
+ locale = _useDayPicker.locale;
25
22
  var _useNavigation = useNavigation(),
26
- previousMonth = _useNavigation.previousMonth,
27
- nextMonth = _useNavigation.nextMonth,
28
- goToMonth = _useNavigation.goToMonth,
29
- goToDate = _useNavigation.goToDate,
30
- displayMonths = _useNavigation.displayMonths;
31
-
23
+ previousMonth = _useNavigation.previousMonth,
24
+ nextMonth = _useNavigation.nextMonth,
25
+ goToMonth = _useNavigation.goToMonth,
26
+ goToDate = _useNavigation.goToDate,
27
+ displayMonths = _useNavigation.displayMonths;
32
28
  var _props$locale = props.locale,
33
- nextMonthLabel = _props$locale.nextMonth,
34
- previousMonthLabel = _props$locale.previousMonth;
29
+ nextMonthLabel = _props$locale.nextMonth,
30
+ previousMonthLabel = _props$locale.previousMonth;
35
31
  var initialDate = useMemo(function () {
36
32
  return props.editableYear && props.initialDate ? props.initialDate : new Date();
37
33
  }, [props]);
@@ -40,19 +36,16 @@ var NavBar = function NavBar(props) {
40
36
  });
41
37
  var showNext = numberOfMonths === 1 || displayIndex === displayMonths.length - 1;
42
38
  var showPrevious = numberOfMonths === 1 || displayIndex === 0;
43
-
44
39
  var handlePreviousClick = function handlePreviousClick() {
45
40
  if (!previousMonth) return;
46
41
  goToMonth(previousMonth);
47
42
  onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(previousMonth);
48
43
  };
49
-
50
44
  var handleNextClick = function handleNextClick() {
51
45
  if (!nextMonth) return;
52
46
  goToMonth(nextMonth);
53
47
  onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(nextMonth);
54
48
  };
55
-
56
49
  var years = useMemo(function () {
57
50
  if (!props.editableYear) return [];
58
51
  if (props.years) return props.years;
@@ -65,7 +58,6 @@ var NavBar = function NavBar(props) {
65
58
  })
66
59
  }).map(getYear);
67
60
  var monthYear = props.displayMonth.getFullYear(); // year of the currently shown month
68
-
69
61
  if (interval.includes(monthYear)) return interval;
70
62
  var minYear = Math.min.apply(Math, _toConsumableArray(interval).concat([monthYear]));
71
63
  var maxYear = Math.max.apply(Math, _toConsumableArray(interval).concat([monthYear]));
@@ -75,6 +67,9 @@ var NavBar = function NavBar(props) {
75
67
  return i + minYear;
76
68
  });
77
69
  }, [props, initialDate]);
70
+ var yearSelectId = useMemo(function () {
71
+ return uniqueId("year-select");
72
+ }, []);
78
73
  return /*#__PURE__*/_jsxs("div", {
79
74
  className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-full top-3 left-0 pt-1 px-2 pb-2 flex justify-between"]))),
80
75
  children: [showPrevious ? /*#__PURE__*/_jsx(IconButton, {
@@ -89,18 +84,25 @@ var NavBar = function NavBar(props) {
89
84
  className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["font-medium text-md"]))),
90
85
  children: [formatMonthCaption(props.displayMonth, {
91
86
  locale: locale
92
- }), " ", props.editableYear ? /*#__PURE__*/_jsx("select", {
93
- className: cx("rdp-year", stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["pl-0.5 font-medium outline-none border-transparent border-2 rounded focus:border-accent-600 focus:shadow-z100 appearance-none"])))),
94
- value: props.displayMonth.getFullYear(),
95
- onChange: function onChange(e) {
96
- return goToDate(setYear(props.displayMonth, parseInt(e.currentTarget.value)));
97
- },
98
- children: years.map(function (year) {
99
- return /*#__PURE__*/_jsx("option", {
100
- value: year,
101
- children: year
102
- }, year);
103
- })
87
+ }), " ", props.editableYear ? /*#__PURE__*/_jsxs("label", {
88
+ htmlFor: yearSelectId,
89
+ children: [/*#__PURE__*/_jsx("span", {
90
+ className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["sr-only"]))),
91
+ children: "Select a year"
92
+ }), /*#__PURE__*/_jsx("select", {
93
+ id: yearSelectId,
94
+ className: cx("rdp-year", stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["pl-0.5 font-medium outline-none border-transparent border-2 rounded focus:border-accent-600 focus:shadow-z100 appearance-none"])))),
95
+ value: props.displayMonth.getFullYear(),
96
+ onChange: function onChange(e) {
97
+ return goToDate(setYear(props.displayMonth, parseInt(e.currentTarget.value)));
98
+ },
99
+ children: years.map(function (year) {
100
+ return /*#__PURE__*/_jsx("option", {
101
+ value: year,
102
+ children: year
103
+ }, year);
104
+ })
105
+ })]
104
106
  }) : props.displayMonth.getFullYear()]
105
107
  })
106
108
  }), showNext ? /*#__PURE__*/_jsx(IconButton, {
@@ -108,9 +110,8 @@ var NavBar = function NavBar(props) {
108
110
  title: nextMonthLabel,
109
111
  onClick: handleNextClick
110
112
  }) : /*#__PURE__*/_jsx("span", {
111
- className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["w-8"])))
113
+ className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["w-8"])))
112
114
  })]
113
115
  });
114
116
  };
115
-
116
117
  export default NavBar;
@@ -1,10 +1,7 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2;
4
-
5
3
  import stl from "../../styles/helpers/satellitePrefixer";
6
4
  import { jsx as _jsx } from "react/jsx-runtime";
7
-
8
5
  var SidePanel = function SidePanel(_ref) {
9
6
  var children = _ref.children;
10
7
  return /*#__PURE__*/_jsx("div", {
@@ -15,5 +12,4 @@ var SidePanel = function SidePanel(_ref) {
15
12
  })
16
13
  });
17
14
  };
18
-
19
15
  export default SidePanel;