baseui 10.9.2 → 10.11.1

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 (888) hide show
  1. package/a11y/a11y.js +1 -1
  2. package/a11y/a11y.js.flow +15 -18
  3. package/a11y/index.js.flow +1 -1
  4. package/a11y/types.js.flow +2 -2
  5. package/accordion/accordion.js +3 -2
  6. package/accordion/accordion.js.flow +18 -32
  7. package/accordion/index.js.flow +6 -6
  8. package/accordion/panel.js +1 -1
  9. package/accordion/panel.js.flow +24 -42
  10. package/accordion/stateful-panel-container.js.flow +7 -12
  11. package/accordion/stateful-panel.js.flow +3 -3
  12. package/accordion/stateless-accordion.js.flow +6 -6
  13. package/accordion/styled-components.js.flow +16 -16
  14. package/accordion/types.js.flow +9 -9
  15. package/app-nav-bar/app-nav-bar.js.flow +20 -36
  16. package/app-nav-bar/index.js.flow +3 -3
  17. package/app-nav-bar/mobile-menu.js +9 -13
  18. package/app-nav-bar/mobile-menu.js.flow +29 -62
  19. package/app-nav-bar/styled-components.js.flow +40 -44
  20. package/app-nav-bar/types.js.flow +11 -11
  21. package/app-nav-bar/user-menu.js +8 -9
  22. package/app-nav-bar/user-menu.js.flow +32 -57
  23. package/app-nav-bar/user-profile-tile.js.flow +12 -24
  24. package/app-nav-bar/utils.js.flow +9 -12
  25. package/aspect-ratio-box/aspect-ratio-box-body.js.flow +2 -2
  26. package/aspect-ratio-box/aspect-ratio-box.js +2 -2
  27. package/aspect-ratio-box/aspect-ratio-box.js.flow +11 -13
  28. package/aspect-ratio-box/index.js.flow +2 -2
  29. package/aspect-ratio-box/types.js.flow +1 -1
  30. package/avatar/avatar.js.flow +7 -21
  31. package/avatar/index.js.flow +1 -1
  32. package/avatar/styled-components.js.flow +7 -11
  33. package/avatar/types.js.flow +3 -3
  34. package/block/block.js +1 -1
  35. package/block/block.js.flow +8 -11
  36. package/block/index.js.flow +1 -1
  37. package/block/styled-components.js.flow +37 -36
  38. package/block/types.js.flow +3 -2
  39. package/breadcrumbs/breadcrumbs.js +3 -6
  40. package/breadcrumbs/breadcrumbs.js.flow +17 -35
  41. package/breadcrumbs/index.d.ts +1 -0
  42. package/breadcrumbs/index.js.flow +1 -1
  43. package/breadcrumbs/styled-components.js.flow +5 -5
  44. package/breadcrumbs/types.js.flow +3 -2
  45. package/button/button-internals.js.flow +7 -10
  46. package/button/button.js +2 -1
  47. package/button/button.js.flow +25 -36
  48. package/button/default-props.js.flow +1 -1
  49. package/button/index.d.ts +6 -0
  50. package/button/index.js.flow +2 -2
  51. package/button/styled-components.js +19 -5
  52. package/button/styled-components.js.flow +89 -82
  53. package/button/types.js.flow +13 -4
  54. package/button/utils.js +3 -1
  55. package/button/utils.js.flow +4 -2
  56. package/button-group/button-group.js +1 -1
  57. package/button-group/button-group.js.flow +15 -17
  58. package/button-group/index.d.ts +1 -0
  59. package/button-group/index.js.flow +6 -6
  60. package/button-group/stateful-button-group.js +5 -1
  61. package/button-group/stateful-button-group.js.flow +4 -3
  62. package/button-group/stateful-container.js.flow +14 -26
  63. package/button-group/styled-components.js.flow +5 -5
  64. package/button-group/types.js.flow +9 -12
  65. package/card/card.js.flow +12 -30
  66. package/card/index.js.flow +1 -1
  67. package/card/styled-components.js.flow +8 -8
  68. package/card/types.js.flow +3 -3
  69. package/checkbox/checkbox.js +2 -3
  70. package/checkbox/checkbox.js.flow +24 -39
  71. package/checkbox/index.d.ts +1 -0
  72. package/checkbox/index.js.flow +4 -4
  73. package/checkbox/stateful-checkbox-container.js.flow +14 -17
  74. package/checkbox/stateful-checkbox.js.flow +5 -5
  75. package/checkbox/styled-components.js.flow +27 -50
  76. package/checkbox/types.js.flow +26 -7
  77. package/combobox/combobox.js +4 -4
  78. package/combobox/combobox.js.flow +24 -36
  79. package/combobox/index.js.flow +2 -2
  80. package/combobox/styled-components.js.flow +23 -20
  81. package/combobox/types.js.flow +7 -5
  82. package/data-table/column-anchor.js.flow +8 -8
  83. package/data-table/column-boolean.js.flow +15 -20
  84. package/data-table/column-categorical.js.flow +26 -31
  85. package/data-table/column-custom.js +1 -0
  86. package/data-table/column-custom.js.flow +6 -10
  87. package/data-table/column-datetime.js +6 -6
  88. package/data-table/column-datetime.js.flow +66 -114
  89. package/data-table/column-numerical.js +320 -362
  90. package/data-table/column-numerical.js.flow +296 -306
  91. package/data-table/column-row-index.js.flow +3 -3
  92. package/data-table/column-string.js.flow +8 -8
  93. package/data-table/column.js +1 -0
  94. package/data-table/column.js.flow +7 -8
  95. package/data-table/constants.js +17 -11
  96. package/data-table/constants.js.flow +11 -8
  97. package/data-table/data-table.js +56 -53
  98. package/data-table/data-table.js.flow +89 -132
  99. package/data-table/filter-menu.js.flow +26 -37
  100. package/data-table/filter-shell.js +27 -4
  101. package/data-table/filter-shell.js.flow +38 -14
  102. package/data-table/header-cell.js.flow +112 -122
  103. package/data-table/index.js.flow +15 -24
  104. package/data-table/locale.js +4 -2
  105. package/data-table/locale.js.flow +6 -2
  106. package/data-table/measure-column-widths.js +83 -119
  107. package/data-table/measure-column-widths.js.flow +86 -114
  108. package/data-table/stateful-container.js.flow +13 -22
  109. package/data-table/stateful-data-table.js.flow +21 -27
  110. package/data-table/text-search.js.flow +3 -3
  111. package/data-table/types.js.flow +17 -20
  112. package/datepicker/calendar-header.js +4 -7
  113. package/datepicker/calendar-header.js.flow +105 -174
  114. package/datepicker/calendar.js +2 -1
  115. package/datepicker/calendar.js.flow +99 -139
  116. package/datepicker/datepicker.js +1 -1
  117. package/datepicker/datepicker.js.flow +84 -159
  118. package/datepicker/day.js.flow +52 -86
  119. package/datepicker/index.js.flow +8 -10
  120. package/datepicker/month.js.flow +10 -14
  121. package/datepicker/stateful-calendar.js.flow +2 -2
  122. package/datepicker/stateful-container.js.flow +10 -13
  123. package/datepicker/stateful-datepicker.js.flow +2 -2
  124. package/datepicker/styled-components.js +2 -2
  125. package/datepicker/styled-components.js.flow +111 -150
  126. package/datepicker/types.js.flow +38 -38
  127. package/datepicker/utils/calendar-header-helpers.js.flow +5 -5
  128. package/datepicker/utils/date-fns-adapter.js.flow +1 -1
  129. package/datepicker/utils/date-helpers.js +1 -1
  130. package/datepicker/utils/date-helpers.js.flow +85 -127
  131. package/datepicker/utils/day-state.js.flow +1 -1
  132. package/datepicker/utils/index.js +1 -1
  133. package/datepicker/utils/index.js.flow +4 -5
  134. package/datepicker/utils/types.js.flow +2 -2
  135. package/datepicker/week.js.flow +8 -11
  136. package/dnd-list/index.js.flow +7 -6
  137. package/dnd-list/list.js.flow +18 -45
  138. package/dnd-list/stateful-list-container.js.flow +7 -10
  139. package/dnd-list/stateful-list.js.flow +3 -3
  140. package/dnd-list/styled-components.js.flow +36 -45
  141. package/dnd-list/types.js.flow +6 -6
  142. package/drawer/close-icon.js.flow +1 -1
  143. package/drawer/constants.js.flow +3 -2
  144. package/drawer/drawer.js +1 -1
  145. package/drawer/drawer.js.flow +26 -43
  146. package/drawer/index.js.flow +2 -2
  147. package/drawer/styled-components.js.flow +34 -47
  148. package/drawer/types.js.flow +5 -8
  149. package/es/a11y/a11y.js +1 -1
  150. package/es/accordion/accordion.js +2 -1
  151. package/es/accordion/panel.js +1 -1
  152. package/es/app-nav-bar/mobile-menu.js +9 -13
  153. package/es/app-nav-bar/user-menu.js +8 -9
  154. package/es/aspect-ratio-box/aspect-ratio-box.js +2 -2
  155. package/es/block/block.js +1 -1
  156. package/es/breadcrumbs/breadcrumbs.js +4 -7
  157. package/es/button/button.js +2 -1
  158. package/es/button/styled-components.js +20 -6
  159. package/es/button/utils.js +2 -0
  160. package/es/button-group/button-group.js +1 -1
  161. package/es/button-group/stateful-button-group.js +4 -1
  162. package/es/checkbox/checkbox.js +2 -3
  163. package/es/checkbox/stateful-checkbox-container.js +0 -3
  164. package/es/combobox/combobox.js +6 -8
  165. package/es/data-table/column-custom.js +1 -0
  166. package/es/data-table/column-datetime.js +6 -6
  167. package/es/data-table/column-numerical.js +252 -320
  168. package/es/data-table/column.js +1 -0
  169. package/es/data-table/constants.js +12 -8
  170. package/es/data-table/data-table.js +21 -19
  171. package/es/data-table/filter-shell.js +26 -4
  172. package/es/data-table/locale.js +4 -2
  173. package/es/data-table/measure-column-widths.js +75 -84
  174. package/es/datepicker/calendar-header.js +7 -10
  175. package/es/datepicker/calendar.js +3 -3
  176. package/es/datepicker/datepicker.js +1 -1
  177. package/es/datepicker/styled-components.js +2 -2
  178. package/es/datepicker/utils/date-helpers.js +1 -1
  179. package/es/datepicker/utils/index.js +1 -1
  180. package/es/drawer/drawer.js +1 -1
  181. package/es/flex-grid/flex-grid-item.js +6 -4
  182. package/es/flex-grid/flex-grid.js +7 -3
  183. package/es/form-control/form-control.js +4 -4
  184. package/es/heading/heading.js +1 -1
  185. package/es/helpers/overrides.js +13 -9
  186. package/es/icon/alert.js +18 -14
  187. package/es/icon/arrow-down.js +18 -14
  188. package/es/icon/arrow-left.js +18 -14
  189. package/es/icon/arrow-right.js +18 -14
  190. package/es/icon/arrow-up.js +18 -14
  191. package/es/icon/blank.js +14 -10
  192. package/es/icon/check-indeterminate.js +18 -14
  193. package/es/icon/check.js +18 -14
  194. package/es/icon/chevron-down.js +19 -15
  195. package/es/icon/chevron-left.js +18 -14
  196. package/es/icon/chevron-right.js +18 -14
  197. package/es/icon/chevron-up.js +19 -15
  198. package/es/icon/delete-alt.js +18 -14
  199. package/es/icon/delete.js +18 -14
  200. package/es/icon/filter.js +32 -28
  201. package/es/icon/grab.js +18 -14
  202. package/es/icon/hide.js +16 -12
  203. package/es/icon/menu.js +32 -28
  204. package/es/icon/omit-dollar-prefixed-keys.js +1 -1
  205. package/es/icon/overflow.js +26 -22
  206. package/es/icon/plus.js +18 -14
  207. package/es/icon/search.js +18 -14
  208. package/es/icon/show.js +16 -12
  209. package/es/icon/spinner.js +23 -19
  210. package/es/icon/triangle-down.js +16 -12
  211. package/es/icon/triangle-left.js +16 -12
  212. package/es/icon/triangle-right.js +16 -12
  213. package/es/icon/triangle-up.js +16 -12
  214. package/es/icon/upload.js +18 -14
  215. package/es/input/masked-input.js +1 -0
  216. package/es/input/stateful-container.js +0 -1
  217. package/es/input/styled-components.js +3 -2
  218. package/es/layer/layer.js +4 -3
  219. package/es/list/list-heading.js +3 -3
  220. package/es/list/list-item.js +1 -1
  221. package/es/list/menu-adapter.js +1 -2
  222. package/es/map-marker/fixed-marker.js +11 -5
  223. package/es/menu/maybe-child-menu.js +1 -2
  224. package/es/menu/menu.js +1 -1
  225. package/es/menu/option-profile.js +2 -0
  226. package/es/menu/stateful-container.js +3 -4
  227. package/es/menu/stateful-menu.js +4 -1
  228. package/es/menu/types.js +1 -1
  229. package/es/modal/modal-button.js +5 -1
  230. package/es/modal/modal.js +1 -3
  231. package/es/pagination/index.js +1 -1
  232. package/es/pagination/stateful-container.js +1 -0
  233. package/es/pagination/stateful-pagination.js +1 -0
  234. package/es/payment-card/payment-card.js +4 -1
  235. package/es/payment-card/styled-components.js +0 -1
  236. package/es/phone-input/base-country-picker.js +6 -8
  237. package/es/phone-input/country-picker.js +5 -8
  238. package/es/phone-input/country-select-dropdown.js +4 -2
  239. package/es/phone-input/country-select.js +5 -8
  240. package/es/phone-input/flag.js +2 -1
  241. package/es/phone-input/phone-input-lite.js +1 -2
  242. package/es/phone-input/phone-input-next.js +1 -2
  243. package/es/pin-code/pin-code.js +1 -2
  244. package/es/popover/popover.js +7 -7
  245. package/es/progress-bar/progressbar-rounded.js +25 -22
  246. package/es/progress-bar/progressbar.js +6 -3
  247. package/es/radio/radio.js +1 -1
  248. package/es/radio/radiogroup.js +1 -1
  249. package/es/rating/emoticon-rating.js +1 -1
  250. package/es/rating/star-rating.js +1 -1
  251. package/es/select/autosize-input.js +1 -2
  252. package/es/select/dropdown.js +2 -4
  253. package/es/select/multi-value.js +1 -1
  254. package/es/select/select-component.js +5 -4
  255. package/es/select/styled-components.js +1 -2
  256. package/es/select/value.js +1 -1
  257. package/es/slider/slider.js +2 -2
  258. package/es/snackbar/snackbar-element.js +4 -3
  259. package/es/snackbar/styled-components.js +1 -1
  260. package/es/spinner/spinner.js +22 -18
  261. package/es/spinner/styled-components.js +3 -2
  262. package/es/styles/__mocks__/styled.js +2 -1
  263. package/es/styles/styled.js +9 -7
  264. package/es/table/sortable-head-cell.js +1 -1
  265. package/es/table-semantic/styled-components.js +2 -1
  266. package/es/tabs/tabs.js +2 -2
  267. package/es/tag/styled-components.js +4 -8
  268. package/es/tag/tag.js +1 -1
  269. package/es/textarea/styled-components.js +9 -7
  270. package/es/textarea/textarea.js +2 -1
  271. package/es/timepicker/timepicker.js +2 -4
  272. package/es/timezonepicker/timezone-picker.js +3 -6
  273. package/es/timezonepicker/tzdata.js +6 -1
  274. package/es/timezonepicker/update-tzdata.js +9 -4
  275. package/es/toast/styled-components.js +30 -28
  276. package/es/toast/toaster.js +5 -7
  277. package/es/toast/types.js +0 -2
  278. package/es/tree-view/tree-label-interactable.js +8 -4
  279. package/es/tree-view/tree-label.js +5 -1
  280. package/es/tree-view/tree-node.js +1 -1
  281. package/es/tree-view/tree-view.js +6 -6
  282. package/es/typography/index.js +144 -36
  283. package/es/utils/deep-merge.js +2 -2
  284. package/es/utils/deprecated-component.js +5 -3
  285. package/esm/a11y/a11y.js +1 -1
  286. package/esm/accordion/accordion.js +3 -2
  287. package/esm/accordion/panel.js +1 -1
  288. package/esm/app-nav-bar/mobile-menu.js +9 -13
  289. package/esm/app-nav-bar/user-menu.js +8 -9
  290. package/esm/aspect-ratio-box/aspect-ratio-box.js +2 -2
  291. package/esm/block/block.js +1 -1
  292. package/esm/breadcrumbs/breadcrumbs.js +4 -7
  293. package/esm/button/button.js +2 -1
  294. package/esm/button/styled-components.js +19 -5
  295. package/esm/button/utils.js +3 -1
  296. package/esm/button-group/button-group.js +1 -1
  297. package/esm/button-group/stateful-button-group.js +5 -1
  298. package/esm/checkbox/checkbox.js +2 -3
  299. package/esm/combobox/combobox.js +4 -4
  300. package/esm/data-table/column-custom.js +1 -0
  301. package/esm/data-table/column-datetime.js +6 -6
  302. package/esm/data-table/column-numerical.js +317 -360
  303. package/esm/data-table/column.js +1 -0
  304. package/esm/data-table/constants.js +12 -8
  305. package/esm/data-table/data-table.js +56 -53
  306. package/esm/data-table/filter-shell.js +26 -4
  307. package/esm/data-table/locale.js +4 -2
  308. package/esm/data-table/measure-column-widths.js +83 -119
  309. package/esm/datepicker/calendar-header.js +7 -10
  310. package/esm/datepicker/calendar.js +2 -1
  311. package/esm/datepicker/datepicker.js +1 -1
  312. package/esm/datepicker/styled-components.js +2 -2
  313. package/esm/datepicker/utils/date-helpers.js +1 -1
  314. package/esm/datepicker/utils/index.js +1 -1
  315. package/esm/drawer/drawer.js +1 -1
  316. package/esm/flex-grid/flex-grid-item.js +5 -3
  317. package/esm/flex-grid/flex-grid.js +14 -9
  318. package/esm/form-control/form-control.js +4 -4
  319. package/esm/heading/heading.js +1 -1
  320. package/esm/helpers/overrides.js +13 -9
  321. package/esm/icon/alert.js +18 -14
  322. package/esm/icon/arrow-down.js +18 -14
  323. package/esm/icon/arrow-left.js +18 -14
  324. package/esm/icon/arrow-right.js +18 -14
  325. package/esm/icon/arrow-up.js +18 -14
  326. package/esm/icon/blank.js +14 -10
  327. package/esm/icon/check-indeterminate.js +18 -14
  328. package/esm/icon/check.js +18 -14
  329. package/esm/icon/chevron-down.js +19 -15
  330. package/esm/icon/chevron-left.js +18 -14
  331. package/esm/icon/chevron-right.js +18 -14
  332. package/esm/icon/chevron-up.js +19 -15
  333. package/esm/icon/delete-alt.js +18 -14
  334. package/esm/icon/delete.js +18 -14
  335. package/esm/icon/filter.js +32 -28
  336. package/esm/icon/grab.js +18 -14
  337. package/esm/icon/hide.js +16 -12
  338. package/esm/icon/menu.js +32 -28
  339. package/esm/icon/omit-dollar-prefixed-keys.js +1 -1
  340. package/esm/icon/overflow.js +26 -22
  341. package/esm/icon/plus.js +18 -14
  342. package/esm/icon/search.js +18 -14
  343. package/esm/icon/show.js +16 -12
  344. package/esm/icon/spinner.js +23 -19
  345. package/esm/icon/triangle-down.js +16 -12
  346. package/esm/icon/triangle-left.js +16 -12
  347. package/esm/icon/triangle-right.js +16 -12
  348. package/esm/icon/triangle-up.js +16 -12
  349. package/esm/icon/upload.js +18 -14
  350. package/esm/input/masked-input.js +1 -0
  351. package/esm/input/stateful-container.js +0 -1
  352. package/esm/input/styled-components.js +6 -2
  353. package/esm/layer/layer.js +4 -3
  354. package/esm/list/list-heading.js +3 -3
  355. package/esm/list/list-item.js +1 -1
  356. package/esm/list/menu-adapter.js +1 -2
  357. package/esm/map-marker/fixed-marker.js +11 -5
  358. package/esm/menu/maybe-child-menu.js +1 -2
  359. package/esm/menu/menu.js +1 -1
  360. package/esm/menu/option-profile.js +2 -0
  361. package/esm/menu/stateful-container.js +3 -4
  362. package/esm/menu/stateful-menu.js +9 -5
  363. package/esm/menu/types.js +1 -1
  364. package/esm/modal/modal-button.js +10 -5
  365. package/esm/modal/modal.js +1 -3
  366. package/esm/pagination/index.js +1 -1
  367. package/esm/pagination/stateful-container.js +1 -0
  368. package/esm/pagination/stateful-pagination.js +1 -0
  369. package/esm/payment-card/payment-card.js +25 -21
  370. package/esm/phone-input/base-country-picker.js +6 -8
  371. package/esm/phone-input/country-picker.js +5 -8
  372. package/esm/phone-input/country-select-dropdown.js +4 -2
  373. package/esm/phone-input/country-select.js +5 -8
  374. package/esm/phone-input/flag.js +2 -1
  375. package/esm/phone-input/phone-input-lite.js +1 -2
  376. package/esm/phone-input/phone-input-next.js +1 -2
  377. package/esm/pin-code/pin-code.js +1 -2
  378. package/esm/popover/popover.js +7 -7
  379. package/esm/progress-bar/progressbar-rounded.js +25 -22
  380. package/esm/progress-bar/progressbar.js +9 -5
  381. package/esm/radio/radio.js +3 -1
  382. package/esm/radio/radiogroup.js +1 -1
  383. package/esm/rating/emoticon-rating.js +1 -1
  384. package/esm/rating/star-rating.js +1 -1
  385. package/esm/select/autosize-input.js +1 -2
  386. package/esm/select/dropdown.js +1 -2
  387. package/esm/select/multi-value.js +1 -1
  388. package/esm/select/select-component.js +5 -4
  389. package/esm/select/styled-components.js +1 -2
  390. package/esm/select/value.js +1 -1
  391. package/esm/slider/slider.js +2 -2
  392. package/esm/snackbar/snackbar-element.js +4 -3
  393. package/esm/snackbar/styled-components.js +1 -1
  394. package/esm/spinner/spinner.js +22 -18
  395. package/esm/spinner/styled-components.js +0 -2
  396. package/esm/styles/__mocks__/styled.js +2 -1
  397. package/esm/styles/styled.js +9 -7
  398. package/esm/table/sortable-head-cell.js +1 -1
  399. package/esm/table-semantic/styled-components.js +2 -1
  400. package/esm/tabs/tabs.js +2 -2
  401. package/esm/tag/styled-components.js +4 -8
  402. package/esm/tag/tag.js +1 -1
  403. package/esm/textarea/styled-components.js +8 -7
  404. package/esm/textarea/textarea.js +2 -1
  405. package/esm/timepicker/timepicker.js +2 -4
  406. package/esm/timezonepicker/timezone-picker.js +3 -6
  407. package/esm/timezonepicker/tzdata.js +6 -1
  408. package/esm/timezonepicker/update-tzdata.js +11 -13
  409. package/esm/toast/styled-components.js +30 -19
  410. package/esm/toast/toaster.js +5 -7
  411. package/esm/toast/types.js +0 -2
  412. package/esm/tree-view/tree-label-interactable.js +12 -8
  413. package/esm/tree-view/tree-label.js +7 -3
  414. package/esm/tree-view/tree-node.js +1 -1
  415. package/esm/tree-view/tree-view.js +6 -6
  416. package/esm/typography/index.js +416 -272
  417. package/esm/utils/deep-merge.js +2 -2
  418. package/esm/utils/deprecated-component.js +5 -3
  419. package/file-uploader/file-uploader.js.flow +30 -60
  420. package/file-uploader/index.js.flow +1 -1
  421. package/file-uploader/styled-components.js.flow +9 -11
  422. package/file-uploader/types.js.flow +8 -10
  423. package/flex-grid/flex-grid-item.js +5 -3
  424. package/flex-grid/flex-grid-item.js.flow +31 -40
  425. package/flex-grid/flex-grid.js +14 -9
  426. package/flex-grid/flex-grid.js.flow +32 -31
  427. package/flex-grid/index.js.flow +2 -2
  428. package/flex-grid/types.js.flow +1 -1
  429. package/form-control/form-control.js +4 -4
  430. package/form-control/form-control.js.flow +16 -32
  431. package/form-control/index.js.flow +1 -1
  432. package/form-control/styled-components.js.flow +18 -21
  433. package/form-control/types.js.flow +2 -2
  434. package/header-navigation/header-navigation.js.flow +5 -10
  435. package/header-navigation/index.js.flow +2 -2
  436. package/header-navigation/styled-components.js.flow +38 -41
  437. package/header-navigation/types.js.flow +1 -1
  438. package/heading/heading-level.js.flow +3 -7
  439. package/heading/heading.js +1 -1
  440. package/heading/heading.js.flow +9 -23
  441. package/heading/index.js.flow +2 -2
  442. package/heading/types.js.flow +1 -1
  443. package/helper/constants.js.flow +1 -1
  444. package/helper/helper-steps.js.flow +8 -21
  445. package/helper/helper.js.flow +8 -8
  446. package/helper/index.js.flow +4 -4
  447. package/helper/stateful-helper.js.flow +5 -5
  448. package/helper/styled-components.js.flow +12 -24
  449. package/helpers/base-provider.js.flow +5 -5
  450. package/helpers/i18n-interpolation.js.flow +2 -2
  451. package/helpers/overrides.js +13 -9
  452. package/helpers/overrides.js.flow +40 -51
  453. package/helpers/react-helpers.js.flow +5 -5
  454. package/helpers/responsive-helpers.js.flow +2 -2
  455. package/helpers/strings.js.flow +1 -2
  456. package/helpers/types.js.flow +2 -2
  457. package/icon/alert.js +18 -14
  458. package/icon/alert.js.flow +7 -6
  459. package/icon/arrow-down.js +18 -14
  460. package/icon/arrow-down.js.flow +8 -14
  461. package/icon/arrow-left.js +18 -14
  462. package/icon/arrow-left.js.flow +8 -14
  463. package/icon/arrow-right.js +18 -14
  464. package/icon/arrow-right.js.flow +8 -14
  465. package/icon/arrow-up.js +18 -14
  466. package/icon/arrow-up.js.flow +8 -8
  467. package/icon/blank.js +14 -10
  468. package/icon/blank.js.flow +7 -6
  469. package/icon/build-icons.js.flow +13 -28
  470. package/icon/check-indeterminate.js +18 -14
  471. package/icon/check-indeterminate.js.flow +8 -15
  472. package/icon/check.js +18 -14
  473. package/icon/check.js.flow +7 -6
  474. package/icon/chevron-down.js +19 -15
  475. package/icon/chevron-down.js.flow +8 -8
  476. package/icon/chevron-left.js +18 -14
  477. package/icon/chevron-left.js.flow +8 -8
  478. package/icon/chevron-right.js +18 -14
  479. package/icon/chevron-right.js.flow +8 -10
  480. package/icon/chevron-up.js +19 -15
  481. package/icon/chevron-up.js.flow +8 -8
  482. package/icon/delete-alt.js +18 -14
  483. package/icon/delete-alt.js.flow +8 -14
  484. package/icon/delete.js +18 -14
  485. package/icon/delete.js.flow +7 -6
  486. package/icon/filter.js +32 -28
  487. package/icon/filter.js.flow +7 -6
  488. package/icon/grab.js +18 -14
  489. package/icon/grab.js.flow +7 -6
  490. package/icon/hide.js +16 -12
  491. package/icon/hide.js.flow +7 -6
  492. package/icon/icon-exports.js.flow +28 -28
  493. package/icon/icon.js.flow +4 -4
  494. package/icon/index.js.flow +2 -2
  495. package/icon/menu.js +32 -28
  496. package/icon/menu.js.flow +7 -6
  497. package/icon/omit-dollar-prefixed-keys.js +1 -1
  498. package/icon/omit-dollar-prefixed-keys.js.flow +2 -2
  499. package/icon/overflow.js +26 -22
  500. package/icon/overflow.js.flow +8 -8
  501. package/icon/plus.js +18 -14
  502. package/icon/plus.js.flow +7 -6
  503. package/icon/search.js +18 -14
  504. package/icon/search.js.flow +7 -6
  505. package/icon/show.js +16 -12
  506. package/icon/show.js.flow +7 -6
  507. package/icon/spinner.js +23 -19
  508. package/icon/spinner.js.flow +8 -8
  509. package/icon/styled-components.js.flow +13 -4
  510. package/icon/triangle-down.js +16 -12
  511. package/icon/triangle-down.js.flow +8 -16
  512. package/icon/triangle-left.js +16 -12
  513. package/icon/triangle-left.js.flow +8 -16
  514. package/icon/triangle-right.js +16 -12
  515. package/icon/triangle-right.js.flow +8 -16
  516. package/icon/triangle-up.js +16 -12
  517. package/icon/triangle-up.js.flow +8 -14
  518. package/icon/types.js.flow +1 -1
  519. package/icon/upload.js +18 -14
  520. package/icon/upload.js.flow +7 -6
  521. package/index.js.flow +5 -5
  522. package/input/base-input.js.flow +32 -57
  523. package/input/index.d.ts +1 -1
  524. package/input/index.js.flow +6 -11
  525. package/input/input.js.flow +13 -27
  526. package/input/masked-input.js +1 -0
  527. package/input/masked-input.js.flow +8 -7
  528. package/input/stateful-container.js +0 -1
  529. package/input/stateful-container.js.flow +6 -12
  530. package/input/stateful-input.js.flow +2 -2
  531. package/input/styled-components.js +6 -2
  532. package/input/styled-components.js.flow +78 -59
  533. package/input/types.js.flow +17 -18
  534. package/input/utils.js.flow +5 -5
  535. package/layer/index.js.flow +4 -4
  536. package/layer/layer.js +4 -3
  537. package/layer/layer.js.flow +19 -30
  538. package/layer/layers-manager.js.flow +25 -36
  539. package/layer/tether.js.flow +12 -14
  540. package/layer/types.js.flow +3 -3
  541. package/layer/utils.js.flow +2 -8
  542. package/layout-grid/cell.js.flow +5 -8
  543. package/layout-grid/grid.js.flow +11 -26
  544. package/layout-grid/index.js.flow +2 -2
  545. package/layout-grid/styled-components.js.flow +23 -38
  546. package/layout-grid/types.js.flow +3 -6
  547. package/link/index.js.flow +8 -8
  548. package/link/styled-components.js.flow +5 -7
  549. package/list/index.d.ts +4 -13
  550. package/list/index.js.flow +5 -5
  551. package/list/list-heading.js +3 -3
  552. package/list/list-heading.js.flow +76 -91
  553. package/list/list-item-label.js.flow +8 -12
  554. package/list/list-item.js +1 -1
  555. package/list/list-item.js.flow +64 -69
  556. package/list/menu-adapter.js +1 -2
  557. package/list/menu-adapter.js.flow +29 -36
  558. package/list/styled-components.js.flow +52 -60
  559. package/list/types.js.flow +11 -11
  560. package/list/utils.js.flow +3 -6
  561. package/locale/es_AR.js.flow +1 -2
  562. package/locale/index.js.flow +5 -10
  563. package/locale/types.js.flow +12 -12
  564. package/map-marker/badge-enhancer.js.flow +12 -27
  565. package/map-marker/constants.js.flow +3 -3
  566. package/map-marker/drag-shadow.js.flow +8 -23
  567. package/map-marker/fixed-marker.js +11 -5
  568. package/map-marker/fixed-marker.js.flow +21 -29
  569. package/map-marker/floating-marker.js.flow +9 -18
  570. package/map-marker/index.js.flow +2 -2
  571. package/map-marker/label-enhancer.js.flow +6 -9
  572. package/map-marker/needle.js.flow +6 -12
  573. package/map-marker/pin-head.js.flow +15 -38
  574. package/map-marker/styled-components.js.flow +45 -60
  575. package/map-marker/types.js.flow +9 -11
  576. package/menu/index.d.ts +2 -1
  577. package/menu/index.js.flow +7 -7
  578. package/menu/maybe-child-menu.js +1 -2
  579. package/menu/maybe-child-menu.js.flow +11 -14
  580. package/menu/menu.js +1 -1
  581. package/menu/menu.js.flow +17 -26
  582. package/menu/nested-menus.js.flow +21 -23
  583. package/menu/option-list.js.flow +16 -18
  584. package/menu/option-profile.js +2 -0
  585. package/menu/option-profile.js.flow +16 -30
  586. package/menu/stateful-container.js +3 -4
  587. package/menu/stateful-container.js.flow +42 -62
  588. package/menu/stateful-menu.js +9 -5
  589. package/menu/stateful-menu.js.flow +6 -5
  590. package/menu/styled-components.js.flow +47 -64
  591. package/menu/types.js.flow +30 -36
  592. package/menu/utils.js.flow +1 -1
  593. package/modal/close-icon.js.flow +2 -6
  594. package/modal/focus-once.js.flow +1 -1
  595. package/modal/index.js.flow +4 -4
  596. package/modal/modal-button.js +10 -5
  597. package/modal/modal-button.js.flow +10 -15
  598. package/modal/modal.js +1 -3
  599. package/modal/modal.js.flow +23 -40
  600. package/modal/styled-components.js.flow +18 -32
  601. package/modal/types.js.flow +6 -12
  602. package/notification/index.js.flow +2 -2
  603. package/notification/notification.js.flow +2 -2
  604. package/package.json +20 -15
  605. package/pagination/index.js +8 -8
  606. package/pagination/index.js.flow +8 -11
  607. package/pagination/pagination.js.flow +39 -62
  608. package/pagination/stateful-container.js +1 -0
  609. package/pagination/stateful-container.js.flow +14 -22
  610. package/pagination/stateful-pagination.js +1 -0
  611. package/pagination/stateful-pagination.js.flow +4 -6
  612. package/pagination/styled-components.js.flow +10 -14
  613. package/pagination/types.js.flow +12 -8
  614. package/payment-card/icons/amex.js.flow +2 -5
  615. package/payment-card/icons/dinersclub.js.flow +1 -1
  616. package/payment-card/icons/discover.js.flow +1 -1
  617. package/payment-card/icons/elo.js.flow +1 -1
  618. package/payment-card/icons/generic.js.flow +1 -1
  619. package/payment-card/icons/jcb.js.flow +4 -13
  620. package/payment-card/icons/maestro.js.flow +1 -1
  621. package/payment-card/icons/mastercard.js.flow +1 -1
  622. package/payment-card/icons/unionpay.js.flow +1 -1
  623. package/payment-card/icons/visa.js.flow +1 -1
  624. package/payment-card/index.js.flow +6 -6
  625. package/payment-card/payment-card.js +25 -21
  626. package/payment-card/payment-card.js.flow +16 -21
  627. package/payment-card/stateful-payment-card.js.flow +3 -2
  628. package/payment-card/styled-components.js.flow +5 -6
  629. package/payment-card/types.js.flow +2 -6
  630. package/payment-card/utils.js.flow +6 -18
  631. package/phone-input/base-country-picker.js +7 -8
  632. package/phone-input/base-country-picker.js.flow +27 -44
  633. package/phone-input/constants.js.flow +227 -227
  634. package/phone-input/country-picker.js +5 -8
  635. package/phone-input/country-picker.js.flow +19 -29
  636. package/phone-input/country-select-dropdown.js +3 -2
  637. package/phone-input/country-select-dropdown.js.flow +31 -43
  638. package/phone-input/country-select.js +5 -8
  639. package/phone-input/country-select.js.flow +13 -28
  640. package/phone-input/default-props.js.flow +2 -6
  641. package/phone-input/flag.js +2 -1
  642. package/phone-input/flag.js.flow +7 -6
  643. package/phone-input/flags/index.js.flow +241 -241
  644. package/phone-input/index.js.flow +10 -14
  645. package/phone-input/phone-input-lite.js +1 -2
  646. package/phone-input/phone-input-lite.js.flow +6 -7
  647. package/phone-input/phone-input-next.js +1 -2
  648. package/phone-input/phone-input-next.js.flow +13 -14
  649. package/phone-input/phone-input.js.flow +2 -2
  650. package/phone-input/stateful-phone-input-container.js.flow +4 -4
  651. package/phone-input/stateful-phone-input-next.js.flow +3 -5
  652. package/phone-input/stateful-phone-input.js.flow +1 -1
  653. package/phone-input/styled-components.js.flow +54 -59
  654. package/phone-input/types.js.flow +11 -16
  655. package/phone-input/utils.js.flow +2 -4
  656. package/pin-code/default-props.js.flow +1 -1
  657. package/pin-code/index.js.flow +4 -6
  658. package/pin-code/pin-code.js +1 -2
  659. package/pin-code/pin-code.js.flow +15 -28
  660. package/pin-code/stateful-pin-code-container.js.flow +6 -10
  661. package/pin-code/stateful-pin-code.js.flow +1 -1
  662. package/pin-code/styled-components.js.flow +19 -22
  663. package/pin-code/types.js.flow +6 -6
  664. package/popover/default-props.js.flow +2 -2
  665. package/popover/index.js.flow +3 -3
  666. package/popover/popover.js +7 -3
  667. package/popover/popover.js.flow +59 -75
  668. package/popover/stateful-container.js.flow +5 -8
  669. package/popover/stateful-popover.js.flow +4 -9
  670. package/popover/styled-components.js.flow +13 -26
  671. package/popover/types.js.flow +13 -28
  672. package/popover/utils.js.flow +9 -16
  673. package/progress-bar/index.d.ts +1 -0
  674. package/progress-bar/index.js.flow +3 -3
  675. package/progress-bar/progressbar-rounded.js +25 -22
  676. package/progress-bar/progressbar-rounded.js.flow +10 -7
  677. package/progress-bar/progressbar.js +9 -5
  678. package/progress-bar/progressbar.js.flow +20 -36
  679. package/progress-bar/styled-components.js.flow +98 -117
  680. package/progress-bar/types.js.flow +4 -7
  681. package/progress-steps/index.js.flow +3 -3
  682. package/progress-steps/numbered-step.js.flow +6 -15
  683. package/progress-steps/progress-steps.js.flow +7 -14
  684. package/progress-steps/step.js.flow +7 -20
  685. package/progress-steps/styled-components.js.flow +25 -29
  686. package/progress-steps/types.js.flow +2 -2
  687. package/radio/index.js.flow +5 -5
  688. package/radio/radio.js +3 -1
  689. package/radio/radio.js.flow +16 -19
  690. package/radio/radiogroup.js +1 -1
  691. package/radio/radiogroup.js.flow +19 -28
  692. package/radio/stateful-radiogroup-container.js.flow +7 -10
  693. package/radio/stateful-radiogroup.js.flow +4 -6
  694. package/radio/styled-components.js.flow +26 -32
  695. package/radio/types.js.flow +5 -4
  696. package/rating/emoticon-rating.js +1 -1
  697. package/rating/emoticon-rating.js.flow +26 -40
  698. package/rating/index.js.flow +2 -2
  699. package/rating/star-rating.js +1 -1
  700. package/rating/star-rating.js.flow +23 -34
  701. package/rating/styled-components.js.flow +8 -27
  702. package/rating/types.js.flow +4 -4
  703. package/select/autosize-input.js +1 -2
  704. package/select/autosize-input.js.flow +10 -18
  705. package/select/constants.js.flow +1 -1
  706. package/select/default-props.js.flow +1 -1
  707. package/select/dropdown.js +1 -2
  708. package/select/dropdown.js.flow +20 -35
  709. package/select/index.d.ts +19 -33
  710. package/select/index.js.flow +11 -13
  711. package/select/multi-select.js.flow +2 -4
  712. package/select/multi-value.js +1 -1
  713. package/select/multi-value.js.flow +6 -9
  714. package/select/select-component.js +5 -5
  715. package/select/select-component.js.flow +98 -175
  716. package/select/select.js.flow +1 -6
  717. package/select/single-select.js.flow +1 -1
  718. package/select/stateful-select-container.js.flow +5 -13
  719. package/select/stateful-select.js.flow +1 -1
  720. package/select/styled-components.js.flow +167 -218
  721. package/select/types.js.flow +15 -18
  722. package/select/utils/default-filter-options.js.flow +7 -8
  723. package/select/utils/index.js.flow +5 -12
  724. package/select/value.js +1 -1
  725. package/select/value.js.flow +5 -8
  726. package/side-navigation/index.js.flow +2 -2
  727. package/side-navigation/nav-item.js.flow +8 -13
  728. package/side-navigation/nav.js.flow +15 -35
  729. package/side-navigation/stateful-container.js.flow +10 -19
  730. package/side-navigation/stateful-nav.js.flow +2 -2
  731. package/side-navigation/styled-components.js.flow +16 -20
  732. package/side-navigation/types.js.flow +9 -9
  733. package/skeleton/index.js.flow +1 -1
  734. package/skeleton/skeleton.js.flow +4 -4
  735. package/skeleton/styled-components.js.flow +15 -18
  736. package/skeleton/types.js.flow +1 -1
  737. package/slider/index.js.flow +4 -3
  738. package/slider/slider.js +2 -2
  739. package/slider/slider.js.flow +19 -41
  740. package/slider/stateful-slider-container.js.flow +9 -12
  741. package/slider/stateful-slider.js.flow +2 -2
  742. package/slider/styled-components.js.flow +21 -21
  743. package/slider/types.js.flow +9 -13
  744. package/snackbar/index.js.flow +3 -3
  745. package/snackbar/snackbar-context.js.flow +16 -23
  746. package/snackbar/snackbar-element.js +4 -3
  747. package/snackbar/snackbar-element.js.flow +19 -32
  748. package/snackbar/styled-components.js +1 -1
  749. package/snackbar/styled-components.js.flow +19 -24
  750. package/snackbar/types.js.flow +6 -6
  751. package/spinner/index.js.flow +3 -2
  752. package/spinner/spinner.js +22 -18
  753. package/spinner/spinner.js.flow +10 -20
  754. package/spinner/styled-components.js +0 -2
  755. package/spinner/styled-components.js.flow +12 -11
  756. package/spinner/types.js.flow +3 -3
  757. package/styles/__mocks__/styled.js +1 -0
  758. package/styles/as-primary-export-hoc.js.flow +2 -2
  759. package/styles/index.js.flow +3 -3
  760. package/styles/styled.js +9 -7
  761. package/styles/styled.js.flow +35 -43
  762. package/styles/theme-provider.js.flow +6 -10
  763. package/styles/types.js.flow +2 -2
  764. package/styles/util.js.flow +17 -4
  765. package/table/filter.js.flow +12 -28
  766. package/table/index.d.ts +1 -0
  767. package/table/index.js.flow +4 -7
  768. package/table/sortable-head-cell.js +1 -1
  769. package/table/sortable-head-cell.js.flow +10 -13
  770. package/table/styled-components.js.flow +67 -79
  771. package/table/table.js.flow +2 -2
  772. package/table/types.js.flow +3 -2
  773. package/table-grid/index.js.flow +3 -7
  774. package/table-grid/sortable-head-cell.js.flow +2 -2
  775. package/table-grid/styled-components.js.flow +21 -23
  776. package/table-semantic/index.js.flow +4 -4
  777. package/table-semantic/styled-components.js +2 -1
  778. package/table-semantic/styled-components.js.flow +88 -125
  779. package/table-semantic/table-builder-column.js.flow +2 -4
  780. package/table-semantic/table-builder.js.flow +31 -70
  781. package/table-semantic/table.js.flow +13 -28
  782. package/table-semantic/types.js.flow +2 -2
  783. package/tabs/index.js.flow +4 -4
  784. package/tabs/stateful-tabs.js.flow +8 -24
  785. package/tabs/styled-components.js.flow +11 -11
  786. package/tabs/tab.js.flow +13 -16
  787. package/tabs/tabs.js +2 -2
  788. package/tabs/tabs.js.flow +17 -38
  789. package/tabs/types.js.flow +6 -6
  790. package/tabs-motion/stateful-tabs.js.flow +11 -24
  791. package/tabs-motion/styled-components.js.flow +59 -71
  792. package/tabs-motion/tab.js.flow +1 -1
  793. package/tabs-motion/tabs.js.flow +32 -62
  794. package/tabs-motion/types.js.flow +9 -9
  795. package/tabs-motion/utils.js.flow +6 -10
  796. package/tag/index.js.flow +2 -2
  797. package/tag/styled-components.js +4 -8
  798. package/tag/styled-components.js.flow +140 -146
  799. package/tag/tag.js +1 -1
  800. package/tag/tag.js.flow +13 -17
  801. package/tag/types.js.flow +2 -2
  802. package/tag/utils.js.flow +2 -2
  803. package/textarea/constants.js.flow +1 -1
  804. package/textarea/index.js.flow +5 -5
  805. package/textarea/stateful-container.js.flow +1 -0
  806. package/textarea/stateful-textarea.js.flow +1 -1
  807. package/textarea/styled-components.js +8 -7
  808. package/textarea/styled-components.js.flow +18 -15
  809. package/textarea/textarea.js +2 -1
  810. package/textarea/textarea.js.flow +11 -10
  811. package/textarea/types.js.flow +7 -5
  812. package/themes/dark-theme/borders.js.flow +1 -1
  813. package/themes/dark-theme/color-component-tokens.js.flow +2 -4
  814. package/themes/dark-theme/color-deprecated-semantic-tokens.js.flow +1 -1
  815. package/themes/dark-theme/color-semantic-tokens.js.flow +2 -2
  816. package/themes/dark-theme/color-tokens.js.flow +2 -2
  817. package/themes/dark-theme/create-dark-theme.js.flow +5 -7
  818. package/themes/dark-theme/dark-theme.js.flow +1 -1
  819. package/themes/dark-theme/primitives.js.flow +2 -2
  820. package/themes/index.js.flow +4 -4
  821. package/themes/light-theme/color-component-tokens.js.flow +2 -4
  822. package/themes/light-theme/color-deprecated-semantic-tokens.js.flow +2 -4
  823. package/themes/light-theme/color-semantic-tokens.js.flow +2 -2
  824. package/themes/light-theme/color-tokens.js.flow +2 -2
  825. package/themes/light-theme/create-light-theme.js.flow +5 -7
  826. package/themes/light-theme/light-theme.js.flow +1 -1
  827. package/themes/light-theme/primitives.js.flow +2 -2
  828. package/themes/move-theme/dark-theme-with-move.js.flow +3 -6
  829. package/themes/move-theme/light-theme-with-move.js.flow +3 -6
  830. package/themes/move-theme/typography.js.flow +28 -29
  831. package/themes/shared/animation.js.flow +1 -1
  832. package/themes/shared/borders.js.flow +1 -1
  833. package/themes/shared/breakpoints.js.flow +1 -1
  834. package/themes/shared/grid.js.flow +1 -1
  835. package/themes/shared/lighting.js.flow +1 -1
  836. package/themes/shared/media-query.js.flow +2 -2
  837. package/themes/shared/sizing.js.flow +1 -1
  838. package/themes/shared/typography.js.flow +20 -21
  839. package/themes/types.js.flow +3 -3
  840. package/timepicker/index.js.flow +1 -1
  841. package/timepicker/timepicker.js +2 -4
  842. package/timepicker/timepicker.js.flow +40 -73
  843. package/timepicker/types.js.flow +4 -4
  844. package/timezonepicker/index.js.flow +1 -1
  845. package/timezonepicker/timezone-picker.js +3 -6
  846. package/timezonepicker/timezone-picker.js.flow +27 -40
  847. package/timezonepicker/types.js.flow +5 -5
  848. package/timezonepicker/tzdata.js +6 -1
  849. package/timezonepicker/tzdata.js.flow +6 -1
  850. package/timezonepicker/update-tzdata.js +11 -13
  851. package/timezonepicker/update-tzdata.js.flow +11 -6
  852. package/toast/index.js.flow +3 -3
  853. package/toast/styled-components.js +30 -19
  854. package/toast/styled-components.js.flow +87 -74
  855. package/toast/toast.js.flow +25 -37
  856. package/toast/toaster.js +5 -7
  857. package/toast/toaster.js.flow +42 -65
  858. package/toast/types.js.flow +4 -5
  859. package/tokens/colors.js.flow +1 -1
  860. package/tokens/index.js.flow +1 -1
  861. package/tooltip/default-props.js.flow +2 -2
  862. package/tooltip/index.js.flow +4 -9
  863. package/tooltip/stateful-tooltip-container.js.flow +2 -2
  864. package/tooltip/stateful-tooltip.js.flow +3 -3
  865. package/tooltip/styled-components.js.flow +7 -11
  866. package/tooltip/tooltip.js.flow +5 -10
  867. package/tree-view/index.js.flow +5 -5
  868. package/tree-view/stateful-container.js.flow +12 -18
  869. package/tree-view/stateful-tree-view.js.flow +2 -2
  870. package/tree-view/styled-components.js.flow +25 -35
  871. package/tree-view/tree-label-interactable.js +12 -8
  872. package/tree-view/tree-label-interactable.js.flow +9 -9
  873. package/tree-view/tree-label.js +7 -3
  874. package/tree-view/tree-label.js.flow +12 -27
  875. package/tree-view/tree-node.js +1 -1
  876. package/tree-view/tree-node.js.flow +8 -9
  877. package/tree-view/tree-view.js +6 -6
  878. package/tree-view/tree-view.js.flow +17 -30
  879. package/tree-view/types.js.flow +6 -4
  880. package/tree-view/utils.js.flow +24 -55
  881. package/typography/index.js +416 -272
  882. package/typography/index.js.flow +388 -432
  883. package/utils/create-event.js.flow +1 -1
  884. package/utils/deep-merge.js +2 -2
  885. package/utils/deep-merge.js.flow +4 -7
  886. package/utils/deprecated-component.js +5 -3
  887. package/utils/deprecated-component.js.flow +7 -5
  888. package/utils/focusVisible.js.flow +26 -22
@@ -6,14 +6,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
6
 
7
7
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
 
9
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
10
-
11
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
-
13
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
14
-
15
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
16
-
17
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
10
 
19
11
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -37,11 +29,12 @@ import { Button, SIZE } from '../button/index.js';
37
29
  import { ButtonGroup, MODE } from '../button-group/index.js';
38
30
  import { Input, SIZE as INPUT_SIZE } from '../input/index.js';
39
31
  import { useStyletron } from '../styles/index.js';
40
- import { ParagraphXSmall } from '../typography/index.js';
41
32
  import Column from './column.js';
42
- import { COLUMNS, NUMERICAL_FORMATS, NUMERICAL_OPERATIONS } from './constants.js';
33
+ import { COLUMNS, NUMERICAL_FORMATS, MAX_BIN_COUNT, HISTOGRAM_SIZE } from './constants.js';
43
34
  import FilterShell from './filter-shell.js';
44
35
  import { LocaleContext } from '../locale/index.js';
36
+ import { bin, max as maxFunc, extent, scaleLinear, median, bisector } from 'd3';
37
+ import { Slider } from '../slider/index.js';
45
38
 
46
39
  function roundToFixed(value, precision) {
47
40
  var k = Math.pow(10, precision);
@@ -88,291 +81,231 @@ function validateInput(input) {
88
81
  return Boolean(parseFloat(input)) || input === '' || input === '-';
89
82
  }
90
83
 
91
- function filterParamsToInitialState(filterParams) {
92
- if (filterParams) {
93
- if (filterParams.comparisons.length > 1) {
94
- if (filterParams.comparisons[0].operation === NUMERICAL_OPERATIONS.LT && filterParams.comparisons[1].operation === NUMERICAL_OPERATIONS.GT) {
95
- return {
96
- exclude: !filterParams.exclude,
97
- comparatorIndex: 0,
98
- operatorIndex: 4,
99
- right: filterParams.comparisons[1].value.toString(),
100
- left: filterParams.comparisons[0].value.toString()
101
- };
102
- }
103
- } else {
104
- var comparison = filterParams.comparisons[0];
105
-
106
- if (comparison.operation === NUMERICAL_OPERATIONS.LT) {
107
- return {
108
- exclude: filterParams.exclude,
109
- comparatorIndex: 0,
110
- operatorIndex: 0,
111
- left: '',
112
- right: comparison.value.toString()
113
- };
114
- } else if (comparison.operation === NUMERICAL_OPERATIONS.GT) {
115
- return {
116
- exclude: filterParams.exclude,
117
- comparatorIndex: 0,
118
- operatorIndex: 1,
119
- left: comparison.value.toString(),
120
- right: ''
121
- };
122
- } else if (comparison.operation === NUMERICAL_OPERATIONS.LTE) {
123
- return {
124
- exclude: filterParams.exclude,
125
- comparatorIndex: 0,
126
- operatorIndex: 2,
127
- left: '',
128
- right: comparison.value.toString()
129
- };
130
- } else if (comparison.operation === NUMERICAL_OPERATIONS.GTE) {
131
- return {
132
- exclude: filterParams.exclude,
133
- comparatorIndex: 0,
134
- operatorIndex: 3,
135
- left: comparison.value.toString(),
136
- right: ''
137
- };
138
- } else if (comparison.operation === NUMERICAL_OPERATIONS.EQ) {
139
- return {
140
- exclude: filterParams.exclude,
141
- comparatorIndex: 1,
142
- operatorIndex: 0,
143
- left: comparison.value.toString(),
144
- right: ''
145
- };
146
- }
147
- }
148
- }
149
-
150
- return {
151
- exclude: false,
152
- comparatorIndex: 0,
153
- operatorIndex: 0,
154
- left: '',
155
- right: ''
156
- };
157
- }
84
+ var bisect = bisector(function (d) {
85
+ return d.x0;
86
+ });
87
+ var Histogram = /*#__PURE__*/React.memo(function Histogram(_ref) {
88
+ var data = _ref.data,
89
+ lower = _ref.lower,
90
+ upper = _ref.upper,
91
+ isRange = _ref.isRange,
92
+ exclude = _ref.exclude,
93
+ precision = _ref.precision;
158
94
 
159
- function NumericalFilter(props) {
160
95
  var _useStyletron = useStyletron(),
161
96
  _useStyletron2 = _slicedToArray(_useStyletron, 2),
162
97
  css = _useStyletron2[0],
163
98
  theme = _useStyletron2[1];
164
99
 
100
+ var _React$useMemo = React.useMemo(function () {
101
+ var bins = bin().thresholds(Math.min(data.length, MAX_BIN_COUNT))(data);
102
+ var xScale = scaleLinear().domain([bins[0].x0, bins[bins.length - 1].x1]).range([0, HISTOGRAM_SIZE.width]).clamp(true);
103
+ var yScale = scaleLinear().domain([0, maxFunc(bins, function (d) {
104
+ return d.length;
105
+ })]).nice().range([HISTOGRAM_SIZE.height, 0]);
106
+ return {
107
+ bins: bins,
108
+ xScale: xScale,
109
+ yScale: yScale
110
+ };
111
+ }, [data]),
112
+ bins = _React$useMemo.bins,
113
+ xScale = _React$useMemo.xScale,
114
+ yScale = _React$useMemo.yScale; // We need to find the index of bar which is nearest to the given single value
115
+
116
+
117
+ var singleIndexNearest = React.useMemo(function () {
118
+ if (isRange) {
119
+ return null;
120
+ }
121
+
122
+ return bisect.center(bins, lower);
123
+ }, [isRange, data, lower, upper]);
124
+ return /*#__PURE__*/React.createElement("div", {
125
+ className: css({
126
+ display: 'flex',
127
+ marginTop: theme.sizing.scale600,
128
+ marginLeft: theme.sizing.scale200,
129
+ marginRight: 0,
130
+ marginBottom: theme.sizing.scale400,
131
+ justifyContent: 'space-between',
132
+ overflow: 'visible'
133
+ })
134
+ }, /*#__PURE__*/React.createElement("svg", HISTOGRAM_SIZE, bins.map(function (d, index) {
135
+ var x = xScale(d.x0) + 1;
136
+ var y = yScale(d.length);
137
+ var width = Math.max(0, xScale(d.x1) - xScale(d.x0) - 1);
138
+ var height = yScale(0) - yScale(d.length);
139
+ var included;
140
+
141
+ if (singleIndexNearest != null) {
142
+ included = index === singleIndexNearest;
143
+ } else {
144
+ var withinLower = d.x1 > lower;
145
+ var withinUpper = d.x0 <= upper;
146
+ included = withinLower && withinUpper;
147
+ }
148
+
149
+ if (exclude) {
150
+ included = !included;
151
+ }
152
+
153
+ return /*#__PURE__*/React.createElement("rect", {
154
+ key: "bar-".concat(index),
155
+ fill: included ? theme.colors.primary : theme.colors.mono400,
156
+ x: x,
157
+ y: y,
158
+ width: width,
159
+ height: height
160
+ });
161
+ })));
162
+ });
163
+
164
+ function NumericalFilter(props) {
165
+ var _useStyletron3 = useStyletron(),
166
+ _useStyletron4 = _slicedToArray(_useStyletron3, 2),
167
+ css = _useStyletron4[0],
168
+ theme = _useStyletron4[1];
169
+
165
170
  var locale = React.useContext(LocaleContext);
166
- var initialState = filterParamsToInitialState(props.filterParams);
171
+ var precision = props.options.precision; // The state handling of this component could be refactored and cleaned up if we used useReducer.
172
+
173
+ var initialState = React.useMemo(function () {
174
+ return props.filterParams || {
175
+ exclude: false,
176
+ excludeKind: 'range',
177
+ comparatorIndex: 0,
178
+ lowerValue: null,
179
+ upperValue: null
180
+ };
181
+ }, [props.filterParams]);
167
182
 
168
183
  var _React$useState = React.useState(initialState.exclude),
169
184
  _React$useState2 = _slicedToArray(_React$useState, 2),
170
185
  exclude = _React$useState2[0],
171
- setExclude = _React$useState2[1];
172
-
173
- var _React$useState3 = React.useState(initialState.comparatorIndex),
174
- _React$useState4 = _slicedToArray(_React$useState3, 2),
175
- comparatorIndex = _React$useState4[0],
176
- setComparatorIndex = _React$useState4[1];
186
+ setExclude = _React$useState2[1]; // the api of our ButtonGroup forces these numerical indexes...
187
+ // TODO look into allowing semantic names, similar to the radio component. Tricky part would be backwards compat
177
188
 
178
- var _React$useState5 = React.useState(initialState.operatorIndex),
179
- _React$useState6 = _slicedToArray(_React$useState5, 2),
180
- operatorIndex = _React$useState6[0],
181
- setOperatorIndex = _React$useState6[1];
182
189
 
183
- var _React$useState7 = React.useState(initialState.left),
184
- _React$useState8 = _slicedToArray(_React$useState7, 2),
185
- left = _React$useState8[0],
186
- setLeft = _React$useState8[1];
187
-
188
- var _React$useState9 = React.useState(initialState.right),
189
- _React$useState10 = _slicedToArray(_React$useState9, 2),
190
- right = _React$useState10[0],
191
- setRight = _React$useState10[1];
190
+ var _React$useState3 = React.useState(function () {
191
+ switch (initialState.excludeKind) {
192
+ case 'value':
193
+ return 1;
192
194
 
193
- var isRange = comparatorIndex === 0;
194
- var min = React.useMemo(function () {
195
- return Math.min.apply(Math, _toConsumableArray(props.data));
196
- }, [props.data]);
197
- var max = React.useMemo(function () {
198
- return Math.max.apply(Math, _toConsumableArray(props.data));
199
- }, [props.data]);
200
- React.useEffect(function () {
201
- if (!left) {
202
- setLeft(min.toString());
195
+ case 'range':
196
+ default:
197
+ // fallthrough
198
+ return 0;
203
199
  }
200
+ }),
201
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
202
+ comparatorIndex = _React$useState4[0],
203
+ setComparatorIndex = _React$useState4[1]; // We use the d3 function to get the extent as it's a little more robust to null, -Infinity, etc.
204
204
 
205
- if (!right) {
206
- setRight(max.toString());
207
- }
208
- }, []);
209
205
 
210
- var _React$useMemo = React.useMemo(function () {
211
- if (!isRange) return [false, false];
206
+ var _React$useMemo2 = React.useMemo(function () {
207
+ return extent(props.data);
208
+ }, [props.data]),
209
+ _React$useMemo3 = _slicedToArray(_React$useMemo2, 2),
210
+ min = _React$useMemo3[0],
211
+ max = _React$useMemo3[1];
212
212
 
213
- switch (operatorIndex) {
214
- case 4:
215
- return [false, false];
213
+ var _React$useState5 = React.useState(function () {
214
+ return roundToFixed(initialState.lowerValue || min, precision);
215
+ }),
216
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
217
+ lv = _React$useState6[0],
218
+ setLower = _React$useState6[1];
216
219
 
217
- case 0:
218
- case 2:
219
- return [true, false];
220
+ var _React$useState7 = React.useState(function () {
221
+ return roundToFixed(initialState.upperValue || max, precision);
222
+ }),
223
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
224
+ uv = _React$useState8[0],
225
+ setUpper = _React$useState8[1]; // We keep a separate value for the single select, to give a user the ability to toggle between
226
+ // the range and single values without losing their previous input.
220
227
 
221
- case 1:
222
- case 3:
223
- return [false, true];
224
228
 
225
- default:
226
- return [true, true];
227
- }
228
- }, [operatorIndex, isRange]),
229
- _React$useMemo2 = _slicedToArray(_React$useMemo, 2),
230
- leftDisabled = _React$useMemo2[0],
231
- rightDisabled = _React$useMemo2[1];
232
-
233
- var leftInputRef = React.useRef(null);
234
- var rightInputRef = React.useRef(null);
235
- React.useEffect(function () {
236
- if (!leftDisabled && leftInputRef.current) {
237
- leftInputRef.current.focus({
238
- preventScroll: true
239
- });
240
- } else if (!rightDisabled && rightInputRef.current) {
241
- rightInputRef.current.focus({
242
- preventScroll: true
243
- });
244
- }
245
- }, [leftDisabled, rightDisabled, comparatorIndex]);
246
- React.useEffect(function () {
247
- switch (operatorIndex) {
248
- case 4:
249
- default:
250
- break;
229
+ var _React$useState9 = React.useState(function () {
230
+ return roundToFixed(initialState.lowerValue || median(props.data), precision);
231
+ }),
232
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
233
+ sv = _React$useState10[0],
234
+ setSingle = _React$useState10[1]; // This is the only conditional which we want to use to determine
235
+ // if we are in range or single value mode.
236
+ // Don't derive it via something else, e.g. lowerValue === upperValue, etc.
251
237
 
252
- case 1:
253
- case 3:
254
- setRight(max.toString());
255
- break;
256
238
 
257
- case 0:
258
- case 2:
259
- setLeft(min.toString());
260
- break;
261
- }
262
- }, [operatorIndex]);
239
+ var isRange = comparatorIndex === 0;
240
+ var excludeKind = isRange ? 'range' : 'value'; // while the user is inputting values, we take their input at face value,
241
+ // if we don't do this, a user can't input partial numbers, e.g. "-", or "3."
242
+
243
+ var _React$useState11 = React.useState(false),
244
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
245
+ focused = _React$useState12[0],
246
+ setFocus = _React$useState12[1];
247
+
248
+ var _React$useMemo4 = React.useMemo(function () {
249
+ if (focused) {
250
+ return [isRange ? lv : sv, uv];
251
+ } // once the user is done inputting.
252
+ // we validate then format to the given precision
253
+
254
+
255
+ var l = isRange ? lv : sv;
256
+ l = validateInput(l) ? l : min;
257
+ var h = validateInput(uv) ? uv : max;
258
+ return [roundToFixed(l, precision), roundToFixed(h, precision)];
259
+ }, [isRange, focused, sv, lv, uv, precision]),
260
+ _React$useMemo5 = _slicedToArray(_React$useMemo4, 2),
261
+ inputValueLower = _React$useMemo5[0],
262
+ inputValueUpper = _React$useMemo5[1]; // We have our slider values range from 1 to the bin size, so we have a scale which
263
+ // takes in the data driven range and maps it to values the scale can always handle
264
+
265
+
266
+ var sliderScale = React.useMemo(function () {
267
+ return scaleLinear().domain([min, max]).rangeRound([1, MAX_BIN_COUNT]) // We clamp the values within our min and max even if a user enters a huge number
268
+ .clamp(true);
269
+ }, [min, max]);
270
+ var sliderValue = isRange ? [sliderScale(inputValueLower), sliderScale(inputValueUpper)] : [sliderScale(inputValueLower)]; // keep the slider happy by sorting the two values
271
+
272
+ if (isRange && sliderValue[0] > sliderValue[1]) {
273
+ sliderValue = [sliderValue[1], sliderValue[0]];
274
+ }
275
+
263
276
  return /*#__PURE__*/React.createElement(FilterShell, {
264
277
  exclude: exclude,
265
278
  onExcludeChange: function onExcludeChange() {
266
279
  return setExclude(!exclude);
267
280
  },
281
+ excludeKind: excludeKind,
268
282
  onApply: function onApply() {
269
283
  if (isRange) {
270
- switch (operatorIndex) {
271
- case 0:
272
- {
273
- var _value = parseFloat(right);
274
-
275
- var operation = NUMERICAL_OPERATIONS.LT;
276
- props.setFilter({
277
- comparisons: [{
278
- value: _value,
279
- operation: operation
280
- }],
281
- description: "< ".concat(_value),
282
- exclude: exclude
283
- });
284
- break;
285
- }
286
-
287
- case 1:
288
- {
289
- var _value2 = parseFloat(left);
290
-
291
- var _operation = NUMERICAL_OPERATIONS.GT;
292
- props.setFilter({
293
- comparisons: [{
294
- value: _value2,
295
- operation: _operation
296
- }],
297
- description: "> ".concat(_value2),
298
- exclude: exclude
299
- });
300
- break;
301
- }
302
-
303
- case 2:
304
- {
305
- var _value3 = parseFloat(right);
306
-
307
- var _operation2 = NUMERICAL_OPERATIONS.LTE;
308
- props.setFilter({
309
- comparisons: [{
310
- value: _value3,
311
- operation: _operation2
312
- }],
313
- description: "\u2264 ".concat(_value3),
314
- exclude: exclude
315
- });
316
- break;
317
- }
318
-
319
- case 3:
320
- {
321
- var _value4 = parseFloat(left);
322
-
323
- var _operation3 = NUMERICAL_OPERATIONS.GTE;
324
- props.setFilter({
325
- comparisons: [{
326
- value: _value4,
327
- operation: _operation3
328
- }],
329
- description: "\u2265 ".concat(_value4),
330
- exclude: exclude
331
- });
332
- break;
333
- }
334
-
335
- case 4:
336
- {
337
- // 'between' case is interesting since if we want less than 10 plus greater than 5
338
- // comparators, the filter will include _all_ numbers.
339
- var leftValue = parseFloat(left);
340
- var rightValue = parseFloat(right);
341
- props.setFilter({
342
- comparisons: [{
343
- value: leftValue,
344
- operation: NUMERICAL_OPERATIONS.LT
345
- }, {
346
- value: rightValue,
347
- operation: NUMERICAL_OPERATIONS.GT
348
- }],
349
- description: "\u2265 ".concat(leftValue, " & \u2264 ").concat(rightValue),
350
- exclude: !exclude
351
- });
352
- break;
353
- }
354
-
355
- default:
356
- break;
357
- }
284
+ var lowerValue = parseFloat(inputValueLower);
285
+ var upperValue = parseFloat(inputValueUpper);
286
+ props.setFilter({
287
+ description: "\u2265 ".concat(lowerValue, " and \u2264 ").concat(upperValue),
288
+ exclude: exclude,
289
+ lowerValue: lowerValue,
290
+ upperValue: upperValue,
291
+ excludeKind: excludeKind
292
+ });
358
293
  } else {
359
- var _value5 = parseFloat(left);
294
+ var _value = parseFloat(inputValueLower);
360
295
 
361
- var _operation4 = NUMERICAL_OPERATIONS.EQ;
362
296
  props.setFilter({
363
- comparisons: [{
364
- value: _value5,
365
- operation: _operation4
366
- }],
367
- description: "= ".concat(_value5),
368
- exclude: exclude
297
+ description: "= ".concat(_value),
298
+ exclude: exclude,
299
+ lowerValue: inputValueLower,
300
+ upperValue: inputValueLower,
301
+ excludeKind: excludeKind
369
302
  });
370
303
  }
371
304
 
372
305
  props.close();
373
306
  }
374
307
  }, /*#__PURE__*/React.createElement(ButtonGroup, {
375
- size: SIZE.compact,
308
+ size: SIZE.mini,
376
309
  mode: MODE.radio,
377
310
  selected: comparatorIndex,
378
311
  onClick: function onClick(_, index) {
@@ -380,8 +313,8 @@ function NumericalFilter(props) {
380
313
  },
381
314
  overrides: {
382
315
  Root: {
383
- style: function style(_ref) {
384
- var $theme = _ref.$theme;
316
+ style: function style(_ref2) {
317
+ var $theme = _ref2.$theme;
385
318
  return {
386
319
  marginBottom: $theme.sizing.scale300
387
320
  };
@@ -396,7 +329,8 @@ function NumericalFilter(props) {
396
329
  width: '100%'
397
330
  }
398
331
  }
399
- }
332
+ },
333
+ "aria-label": locale.datatable.numericalFilterRange
400
334
  }, locale.datatable.numericalFilterRange), /*#__PURE__*/React.createElement(Button, {
401
335
  type: "button",
402
336
  overrides: {
@@ -405,123 +339,168 @@ function NumericalFilter(props) {
405
339
  width: '100%'
406
340
  }
407
341
  }
408
- }
409
- }, locale.datatable.numericalFilterSingleValue)), isRange && /*#__PURE__*/React.createElement(ButtonGroup, {
410
- size: SIZE.compact,
411
- mode: MODE.radio,
412
- selected: operatorIndex,
413
- onClick: function onClick(_, index) {
414
- return setOperatorIndex(index);
342
+ },
343
+ "aria-label": locale.datatable.numericalFilterSingleValue
344
+ }, locale.datatable.numericalFilterSingleValue)), /*#__PURE__*/React.createElement(Histogram, {
345
+ data: props.data,
346
+ lower: inputValueLower,
347
+ upper: inputValueUpper,
348
+ isRange: isRange,
349
+ exclude: exclude,
350
+ precision: props.options.precision
351
+ }), /*#__PURE__*/React.createElement("div", {
352
+ className: css({
353
+ display: 'flex',
354
+ justifyContent: 'space-between'
355
+ })
356
+ }, /*#__PURE__*/React.createElement(Slider // The slider throws errors when switching between single and two values
357
+ // when it tries to read getThumbDistance on a thumb which is not there anymore
358
+ // if we create a new instance these errors are prevented.
359
+ , {
360
+ key: isRange.toString(),
361
+ min: 1,
362
+ max: MAX_BIN_COUNT,
363
+ value: sliderValue,
364
+ onChange: function onChange(_ref3) {
365
+ var value = _ref3.value;
366
+
367
+ if (!value) {
368
+ return;
369
+ } // we convert back from the slider scale to the actual data's scale
370
+
371
+
372
+ if (isRange) {
373
+ var _value2 = _slicedToArray(value, 2),
374
+ lowerValue = _value2[0],
375
+ upperValue = _value2[1];
376
+
377
+ setLower(sliderScale.invert(lowerValue));
378
+ setUpper(sliderScale.invert(upperValue));
379
+ } else {
380
+ var _value3 = _slicedToArray(value, 1),
381
+ singleValue = _value3[0];
382
+
383
+ setSingle(sliderScale.invert(singleValue));
384
+ }
415
385
  },
416
386
  overrides: {
387
+ InnerThumb: function InnerThumb(_ref4) {
388
+ var $value = _ref4.$value,
389
+ $thumbIndex = _ref4.$thumbIndex;
390
+ return /*#__PURE__*/React.createElement(React.Fragment, null, $value[$thumbIndex]);
391
+ },
392
+ TickBar: function TickBar(_ref5) {
393
+ var $min = _ref5.$min,
394
+ $max = _ref5.$max;
395
+ return null;
396
+ },
397
+ // we don't want the ticks
398
+ ThumbValue: function ThumbValue() {
399
+ return null;
400
+ },
417
401
  Root: {
418
- style: function style(_ref2) {
419
- var $theme = _ref2.$theme;
402
+ style: function style() {
420
403
  return {
421
- marginBottom: $theme.sizing.scale500
404
+ // Aligns the center of the slider handles with the histogram bars
405
+ width: 'calc(100% + 14px)',
406
+ margin: '0 -7px'
422
407
  };
423
408
  }
424
- }
425
- }
426
- }, /*#__PURE__*/React.createElement(Button, {
427
- type: "button",
428
- overrides: {
429
- BaseButton: {
430
- style: {
431
- width: '100%'
432
- }
433
- }
434
- }
435
- }, "<"), /*#__PURE__*/React.createElement(Button, {
436
- type: "button",
437
- overrides: {
438
- BaseButton: {
439
- style: {
440
- width: '100%'
441
- }
442
- }
443
- }
444
- }, ">"), /*#__PURE__*/React.createElement(Button, {
445
- type: "button",
446
- overrides: {
447
- BaseButton: {
448
- style: {
449
- width: '100%'
450
- }
451
- }
452
- }
453
- }, "\u2264"), /*#__PURE__*/React.createElement(Button, {
454
- type: "button",
455
- overrides: {
456
- BaseButton: {
457
- style: {
458
- width: '100%'
409
+ },
410
+ InnerTrack: {
411
+ style: function style(_ref6) {
412
+ var $theme = _ref6.$theme;
413
+
414
+ if (!isRange) {
415
+ return {
416
+ // For range selection we use the color as is, but when selecting the single value,
417
+ // we don't want the track standing out, so mute its color
418
+ background: theme.colors.mono400
419
+ };
420
+ }
459
421
  }
460
- }
461
- }
462
- }, "\u2265"), /*#__PURE__*/React.createElement(Button, {
463
- type: "button",
464
- overrides: {
465
- BaseButton: {
466
- style: {
467
- width: '100%'
422
+ },
423
+ Thumb: {
424
+ style: function style() {
425
+ return {
426
+ // Slider handles are small enough to visually be centered within each histogram bar
427
+ height: '18px',
428
+ width: '18px',
429
+ fontSize: '0px'
430
+ };
468
431
  }
469
432
  }
470
433
  }
471
- }, "=")), /*#__PURE__*/React.createElement("div", {
472
- className: css({
473
- display: 'flex',
474
- justifyContent: 'space-between',
475
- marginLeft: theme.sizing.scale300,
476
- marginRight: theme.sizing.scale300
477
- })
478
- }, /*#__PURE__*/React.createElement(ParagraphXSmall, null, format(min, props.options)), ' ', /*#__PURE__*/React.createElement(ParagraphXSmall, null, format(max, props.options))), /*#__PURE__*/React.createElement("div", {
434
+ })), /*#__PURE__*/React.createElement("div", {
479
435
  className: css({
480
436
  display: 'flex',
437
+ marginTop: theme.sizing.scale400,
438
+ // This % gap is visually appealing given the filter box width
439
+ gap: '30%',
481
440
  justifyContent: 'space-between'
482
441
  })
483
442
  }, /*#__PURE__*/React.createElement(Input, {
484
- size: INPUT_SIZE.compact,
443
+ min: min,
444
+ max: max,
445
+ size: INPUT_SIZE.mini,
485
446
  overrides: {
486
447
  Root: {
487
448
  style: {
488
- width: isRange ? '152px' : '100%'
449
+ width: '100%'
489
450
  }
490
451
  }
491
452
  },
492
- disabled: leftDisabled,
493
- inputRef: leftInputRef,
494
- value: left,
453
+ value: inputValueLower,
495
454
  onChange: function onChange(event) {
496
455
  if (validateInput(event.target.value)) {
497
- setLeft(event.target.value);
456
+ isRange ? // $FlowFixMe - we know it is a number by now
457
+ setLower(event.target.value) : // $FlowFixMe - we know it is a number by now
458
+ setSingle(event.target.value);
498
459
  }
460
+ },
461
+ onFocus: function onFocus() {
462
+ return setFocus(true);
463
+ },
464
+ onBlur: function onBlur() {
465
+ return setFocus(false);
499
466
  }
500
467
  }), isRange && /*#__PURE__*/React.createElement(Input, {
501
- size: INPUT_SIZE.compact,
468
+ min: min,
469
+ max: max,
470
+ size: INPUT_SIZE.mini,
502
471
  overrides: {
472
+ Input: {
473
+ style: {
474
+ textAlign: 'right'
475
+ }
476
+ },
503
477
  Root: {
504
478
  style: {
505
- width: '152px'
479
+ width: '100%'
506
480
  }
507
481
  }
508
482
  },
509
- disabled: rightDisabled,
510
- inputRef: rightInputRef,
511
- value: right,
483
+ value: inputValueUpper,
512
484
  onChange: function onChange(event) {
513
485
  if (validateInput(event.target.value)) {
514
- setRight(event.target.value);
486
+ // $FlowFixMe - we know it is a number by now
487
+ setUpper(event.target.value);
515
488
  }
489
+ },
490
+ onFocus: function onFocus() {
491
+ return setFocus(true);
492
+ },
493
+ onBlur: function onBlur() {
494
+ return setFocus(false);
516
495
  }
517
496
  })));
518
497
  }
519
498
 
520
499
  function NumericalCell(props) {
521
- var _useStyletron3 = useStyletron(),
522
- _useStyletron4 = _slicedToArray(_useStyletron3, 2),
523
- css = _useStyletron4[0],
524
- theme = _useStyletron4[1];
500
+ var _useStyletron5 = useStyletron(),
501
+ _useStyletron6 = _slicedToArray(_useStyletron5, 2),
502
+ css = _useStyletron6[0],
503
+ theme = _useStyletron6[1];
525
504
 
526
505
  return /*#__PURE__*/React.createElement("div", {
527
506
  className: css(_objectSpread(_objectSpread({}, theme.typography.MonoParagraphXSmall), {}, {
@@ -564,30 +543,8 @@ function NumericalColumn(options) {
564
543
  kind: COLUMNS.NUMERICAL,
565
544
  buildFilter: function buildFilter(params) {
566
545
  return function (data) {
567
- var included = params.comparisons.some(function (c) {
568
- var left = roundToFixed(data, normalizedOptions.precision);
569
- var right = roundToFixed(c.value, normalizedOptions.precision);
570
-
571
- switch (c.operation) {
572
- case NUMERICAL_OPERATIONS.EQ:
573
- return left === right;
574
-
575
- case NUMERICAL_OPERATIONS.GT:
576
- return left > right;
577
-
578
- case NUMERICAL_OPERATIONS.GTE:
579
- return left >= right;
580
-
581
- case NUMERICAL_OPERATIONS.LT:
582
- return left < right;
583
-
584
- case NUMERICAL_OPERATIONS.LTE:
585
- return left <= right;
586
-
587
- default:
588
- return true;
589
- }
590
- });
546
+ var value = roundToFixed(data, normalizedOptions.precision);
547
+ var included = value >= params.lowerValue && value <= params.upperValue;
591
548
  return params.exclude ? !included : included;
592
549
  };
593
550
  },