baseui 0.0.0-alpha-3479e57 → 0.0.0-alpha-e79754d

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 (516) hide show
  1. package/accordion/accordion.js +2 -4
  2. package/accordion/accordion.js.flow +1 -1
  3. package/accordion/panel.js +2 -3
  4. package/accordion/stateful-panel-container.js +0 -1
  5. package/accordion/styled-components.js +1 -8
  6. package/app-nav-bar/app-nav-bar.js +2 -4
  7. package/app-nav-bar/mobile-menu.js +1 -2
  8. package/app-nav-bar/styled-components.js +1 -19
  9. package/app-nav-bar/user-menu.js +1 -1
  10. package/aspect-ratio-box/aspect-ratio-box.js +1 -3
  11. package/avatar/styled-components.js +1 -4
  12. package/badge/styled-components.js +7 -12
  13. package/banner/styled-components.js +11 -21
  14. package/banner/types.d.ts +11 -12
  15. package/banner/types.js.flow +11 -13
  16. package/block/block.js +1 -3
  17. package/block/styled-components.js +1 -2
  18. package/breadcrumbs/styled-components.js +1 -5
  19. package/button/styled-components.js +0 -5
  20. package/button-group/stateful-button-group.js +0 -1
  21. package/button-group/stateful-container.js +1 -3
  22. package/button-group/styled-components.js +1 -2
  23. package/card/images.d.ts +1 -1
  24. package/card/styled-components.js +4 -11
  25. package/checkbox/styled-components.js +3 -9
  26. package/combobox/combobox.js +71 -78
  27. package/combobox/styled-components.js +1 -5
  28. package/data-table/column-anchor.js +0 -3
  29. package/data-table/column-datetime.js +4 -10
  30. package/data-table/column-numerical.js +4 -4
  31. package/data-table/column-string.js +0 -3
  32. package/data-table/column.js +1 -6
  33. package/data-table/data-table.js +6 -7
  34. package/data-table/filter-menu.js +1 -2
  35. package/data-table/header-cell.js +34 -43
  36. package/data-table/locale.d.ts +0 -4
  37. package/data-table/locale.js +1 -3
  38. package/data-table/locale.js.flow +0 -5
  39. package/data-table/measure-column-widths.js +1 -2
  40. package/data-table/stateful-container.js +1 -2
  41. package/data-table/stateful-data-table.js +4 -4
  42. package/datepicker/calendar-header.js +0 -1
  43. package/datepicker/calendar.js +0 -2
  44. package/datepicker/datepicker.js +0 -2
  45. package/datepicker/day.js +1 -2
  46. package/datepicker/stateful-calendar.js +3 -7
  47. package/datepicker/stateful-container.js +0 -2
  48. package/datepicker/stateful-datepicker.js +4 -9
  49. package/datepicker/styled-components.js +4 -27
  50. package/datepicker/utils/date-helpers.js +1 -2
  51. package/datepicker/utils/index.js +1 -2
  52. package/divider/styled-components.js +3 -4
  53. package/dnd-list/stateful-list-container.js +0 -1
  54. package/dnd-list/styled-components.js +0 -7
  55. package/drawer/constants.js +0 -1
  56. package/drawer/drawer.js +3 -2
  57. package/drawer/drawer.js.flow +3 -1
  58. package/drawer/styled-components.js +2 -9
  59. package/es/accordion/accordion.js +3 -3
  60. package/es/accordion/panel.js +2 -3
  61. package/es/accordion/stateful-panel-container.js +0 -1
  62. package/es/accordion/styled-components.js +1 -8
  63. package/es/app-nav-bar/app-nav-bar.js +2 -6
  64. package/es/app-nav-bar/mobile-menu.js +2 -4
  65. package/es/app-nav-bar/styled-components.js +1 -19
  66. package/es/app-nav-bar/user-menu.js +1 -1
  67. package/es/aspect-ratio-box/aspect-ratio-box.js +1 -3
  68. package/es/avatar/styled-components.js +1 -4
  69. package/es/badge/styled-components.js +2 -7
  70. package/es/banner/styled-components.js +2 -12
  71. package/es/block/block.js +1 -3
  72. package/es/block/styled-components.js +1 -2
  73. package/es/breadcrumbs/styled-components.js +1 -5
  74. package/es/button/button.js +0 -8
  75. package/es/button/styled-components.js +0 -5
  76. package/es/button-group/stateful-button-group.js +0 -1
  77. package/es/button-group/stateful-container.js +1 -3
  78. package/es/button-group/styled-components.js +1 -2
  79. package/es/card/index.js +1 -2
  80. package/es/card/styled-components.js +4 -12
  81. package/es/checkbox/index.js +0 -1
  82. package/es/checkbox/stateful-checkbox-container.js +0 -3
  83. package/es/checkbox/styled-components.js +3 -9
  84. package/es/combobox/combobox.js +69 -76
  85. package/es/combobox/styled-components.js +1 -5
  86. package/es/data-table/column-anchor.js +0 -3
  87. package/es/data-table/column-datetime.js +5 -12
  88. package/es/data-table/column-numerical.js +4 -5
  89. package/es/data-table/column-string.js +0 -3
  90. package/es/data-table/column.js +1 -4
  91. package/es/data-table/data-table.js +6 -7
  92. package/es/data-table/filter-menu.js +1 -2
  93. package/es/data-table/header-cell.js +34 -41
  94. package/es/data-table/locale.js +1 -3
  95. package/es/data-table/measure-column-widths.js +1 -2
  96. package/es/data-table/stateful-container.js +1 -2
  97. package/es/data-table/stateful-data-table.js +4 -4
  98. package/es/datepicker/calendar-header.js +0 -1
  99. package/es/datepicker/calendar.js +0 -2
  100. package/es/datepicker/datepicker.js +1 -3
  101. package/es/datepicker/day.js +1 -2
  102. package/es/datepicker/stateful-calendar.js +1 -4
  103. package/es/datepicker/stateful-container.js +0 -2
  104. package/es/datepicker/stateful-datepicker.js +1 -5
  105. package/es/datepicker/styled-components.js +3 -26
  106. package/es/datepicker/utils/date-helpers.js +1 -2
  107. package/es/datepicker/utils/index.js +1 -2
  108. package/es/divider/styled-components.js +2 -3
  109. package/es/dnd-list/stateful-list-container.js +0 -1
  110. package/es/dnd-list/styled-components.js +0 -7
  111. package/es/drawer/constants.js +0 -1
  112. package/es/drawer/drawer.js +5 -2
  113. package/es/drawer/styled-components.js +2 -9
  114. package/es/file-uploader/styled-components.js +1 -6
  115. package/es/flex-grid/flex-grid-item.js +6 -5
  116. package/es/flex-grid/flex-grid.js +1 -4
  117. package/es/form-control/styled-components.js +1 -6
  118. package/es/header-navigation/styled-components.js +1 -4
  119. package/es/helper/styled-components.js +1 -3
  120. package/es/helpers/overrides.js +5 -9
  121. package/es/icon/build-icons.js +2 -0
  122. package/es/icon/omit-dollar-prefixed-keys.js +0 -1
  123. package/es/icon/styled-components.js +1 -2
  124. package/es/input/base-input.js +0 -1
  125. package/es/input/masked-input.js +2 -9
  126. package/es/input/stateful-container.js +0 -1
  127. package/es/input/styled-components.js +5 -10
  128. package/es/layer/layer.js +0 -24
  129. package/es/layer/layers-manager.js +1 -91
  130. package/es/layout-grid/styled-components.js +0 -3
  131. package/es/link/index.js +1 -2
  132. package/es/link/styled-components.js +1 -2
  133. package/es/list/list-heading.js +17 -21
  134. package/es/list/list-item.js +1 -2
  135. package/es/list/styled-components.js +1 -15
  136. package/es/locale/es_AR.js +1 -3
  137. package/es/locale/index.js +1 -2
  138. package/es/locale/tr_TR.js +1 -3
  139. package/es/map-marker/constants.js +0 -14
  140. package/es/map-marker/fixed-marker.js +0 -1
  141. package/es/map-marker/index.js +1 -2
  142. package/es/map-marker/pin-head.js +0 -1
  143. package/es/map-marker/styled-components.js +2 -86
  144. package/es/menu/menu.js +3 -7
  145. package/es/menu/option-profile.js +0 -1
  146. package/es/menu/stateful-container.js +0 -10
  147. package/es/menu/styled-components.js +2 -15
  148. package/es/modal/modal.js +6 -4
  149. package/es/modal/styled-components.js +1 -8
  150. package/es/pagination/stateful-container.js +0 -1
  151. package/es/pagination/stateful-pagination.js +0 -1
  152. package/es/pagination/styled-components.js +1 -4
  153. package/es/payment-card/styled-components.js +1 -2
  154. package/es/phone-input/base-country-picker.js +1 -3
  155. package/es/phone-input/country-select-dropdown.js +0 -1
  156. package/es/phone-input/styled-components.js +4 -15
  157. package/es/pin-code/styled-components.js +1 -4
  158. package/es/popover/popover.js +12 -9
  159. package/es/popover/styled-components.js +4 -9
  160. package/es/progress-bar/progressbar-rounded.js +0 -1
  161. package/es/progress-bar/styled-components.js +2 -14
  162. package/es/progress-steps/progress-steps.js +1 -2
  163. package/es/progress-steps/styled-components.js +12 -20
  164. package/es/radio/stateful-radiogroup-container.js +0 -3
  165. package/es/radio/styled-components.js +3 -10
  166. package/es/rating/emoticon-rating.js +1 -2
  167. package/es/rating/star-rating.js +1 -2
  168. package/es/rating/styled-components.js +1 -5
  169. package/es/select/autosize-input.js +3 -2
  170. package/es/select/dropdown.js +1 -2
  171. package/es/select/multi-value.js +1 -2
  172. package/es/select/select-component.js +10 -10
  173. package/es/select/single-select.js +2 -2
  174. package/es/select/stateful-select-container.js +0 -2
  175. package/es/select/styled-components.js +1 -16
  176. package/es/select/value.js +4 -3
  177. package/es/side-navigation/index.js +1 -2
  178. package/es/side-navigation/nav-item.js +0 -1
  179. package/es/side-navigation/nav.js +1 -1
  180. package/es/side-navigation/stateful-container.js +0 -1
  181. package/es/side-navigation/styled-components.js +2 -8
  182. package/es/skeleton/styled-components.js +1 -3
  183. package/es/slider/slider.js +2 -4
  184. package/es/slider/stateful-slider-container.js +0 -2
  185. package/es/slider/styled-components.js +0 -9
  186. package/es/snackbar/snackbar-element.js +0 -1
  187. package/es/snackbar/styled-components.js +1 -9
  188. package/es/spinner/styled-components.js +1 -2
  189. package/es/styles/__mocks__/styled.js +5 -8
  190. package/es/styles/styled.js +6 -7
  191. package/es/table/index.js +1 -2
  192. package/es/table/styled-components.js +1 -13
  193. package/es/table-grid/styled-components.js +1 -4
  194. package/es/table-semantic/styled-components.js +2 -20
  195. package/es/tabs/stateful-tabs.js +0 -1
  196. package/es/tabs/styled-components.js +1 -5
  197. package/es/tabs/tabs.js +2 -4
  198. package/es/tabs-motion/styled-components.js +1 -9
  199. package/es/tabs-motion/tab.js +0 -1
  200. package/es/tabs-motion/tabs.js +1 -2
  201. package/es/tag/styled-components.js +1 -32
  202. package/es/tag/tag.js +2 -6
  203. package/es/textarea/styled-components.js +1 -4
  204. package/es/themes/shared/typography.js +10 -10
  205. package/es/toast/styled-components.js +1 -5
  206. package/es/toast/toaster.js +2 -0
  207. package/es/tokens/colors.js +0 -24
  208. package/es/tooltip/styled-components.js +1 -4
  209. package/es/tree-view/index.js +1 -2
  210. package/es/tree-view/styled-components.js +1 -7
  211. package/es/tree-view/tree-view.js +1 -3
  212. package/es/types/globals.d.js +0 -12
  213. package/es/utils/deep-merge.js +5 -0
  214. package/es/utils/deprecated-component.js +0 -1
  215. package/es/utils/focusVisible.js +2 -4
  216. package/esm/accordion/accordion.js +4 -4
  217. package/esm/accordion/panel.js +2 -3
  218. package/esm/accordion/stateful-panel-container.js +0 -1
  219. package/esm/accordion/styled-components.js +1 -8
  220. package/esm/app-nav-bar/app-nav-bar.js +2 -4
  221. package/esm/app-nav-bar/mobile-menu.js +2 -4
  222. package/esm/app-nav-bar/styled-components.js +1 -19
  223. package/esm/app-nav-bar/user-menu.js +1 -1
  224. package/esm/aspect-ratio-box/aspect-ratio-box.js +1 -3
  225. package/esm/avatar/styled-components.js +1 -4
  226. package/esm/badge/styled-components.js +2 -7
  227. package/esm/banner/styled-components.js +2 -12
  228. package/esm/block/block.js +1 -3
  229. package/esm/block/styled-components.js +1 -2
  230. package/esm/breadcrumbs/styled-components.js +1 -5
  231. package/esm/button/styled-components.js +0 -5
  232. package/esm/button-group/stateful-button-group.js +0 -1
  233. package/esm/button-group/stateful-container.js +1 -3
  234. package/esm/button-group/styled-components.js +1 -2
  235. package/esm/card/index.js +1 -2
  236. package/esm/card/styled-components.js +4 -12
  237. package/esm/checkbox/index.js +0 -1
  238. package/esm/checkbox/styled-components.js +3 -9
  239. package/esm/combobox/combobox.js +71 -78
  240. package/esm/combobox/styled-components.js +1 -5
  241. package/esm/data-table/column-anchor.js +0 -3
  242. package/esm/data-table/column-datetime.js +5 -12
  243. package/esm/data-table/column-numerical.js +4 -4
  244. package/esm/data-table/column-string.js +0 -3
  245. package/esm/data-table/column.js +1 -5
  246. package/esm/data-table/data-table.js +6 -7
  247. package/esm/data-table/filter-menu.js +1 -2
  248. package/esm/data-table/header-cell.js +34 -42
  249. package/esm/data-table/locale.js +1 -3
  250. package/esm/data-table/measure-column-widths.js +1 -2
  251. package/esm/data-table/stateful-container.js +1 -2
  252. package/esm/data-table/stateful-data-table.js +4 -4
  253. package/esm/datepicker/calendar-header.js +0 -1
  254. package/esm/datepicker/calendar.js +0 -2
  255. package/esm/datepicker/datepicker.js +1 -3
  256. package/esm/datepicker/day.js +1 -2
  257. package/esm/datepicker/stateful-calendar.js +3 -7
  258. package/esm/datepicker/stateful-container.js +0 -2
  259. package/esm/datepicker/stateful-datepicker.js +4 -9
  260. package/esm/datepicker/styled-components.js +3 -26
  261. package/esm/datepicker/utils/date-helpers.js +1 -2
  262. package/esm/datepicker/utils/index.js +1 -2
  263. package/esm/divider/styled-components.js +2 -3
  264. package/esm/dnd-list/stateful-list-container.js +0 -1
  265. package/esm/dnd-list/styled-components.js +0 -7
  266. package/esm/drawer/constants.js +0 -1
  267. package/esm/drawer/drawer.js +5 -2
  268. package/esm/drawer/styled-components.js +2 -9
  269. package/esm/file-uploader/styled-components.js +1 -6
  270. package/esm/flex-grid/flex-grid-item.js +5 -4
  271. package/esm/flex-grid/flex-grid.js +3 -7
  272. package/esm/form-control/styled-components.js +1 -6
  273. package/esm/header-navigation/styled-components.js +1 -4
  274. package/esm/helper/styled-components.js +1 -3
  275. package/esm/helpers/overrides.js +5 -9
  276. package/esm/icon/build-icons.js +2 -0
  277. package/esm/icon/omit-dollar-prefixed-keys.js +0 -1
  278. package/esm/icon/styled-components.js +1 -2
  279. package/esm/input/base-input.js +0 -1
  280. package/esm/input/masked-input.js +2 -5
  281. package/esm/input/stateful-container.js +0 -1
  282. package/esm/input/styled-components.js +5 -10
  283. package/esm/layer/layer.js +0 -24
  284. package/esm/layer/layers-manager.js +1 -97
  285. package/esm/layout-grid/styled-components.js +0 -3
  286. package/esm/link/index.js +1 -2
  287. package/esm/link/styled-components.js +1 -2
  288. package/esm/list/list-heading.js +17 -21
  289. package/esm/list/list-item.js +1 -2
  290. package/esm/list/styled-components.js +1 -15
  291. package/esm/locale/es_AR.js +1 -3
  292. package/esm/locale/index.js +1 -4
  293. package/esm/locale/tr_TR.js +1 -3
  294. package/esm/map-marker/constants.js +2 -12
  295. package/esm/map-marker/index.js +1 -2
  296. package/esm/map-marker/styled-components.js +2 -82
  297. package/esm/menu/menu.js +3 -6
  298. package/esm/menu/option-profile.js +0 -1
  299. package/esm/menu/stateful-container.js +0 -1
  300. package/esm/menu/styled-components.js +6 -20
  301. package/esm/modal/modal.js +6 -4
  302. package/esm/modal/styled-components.js +1 -8
  303. package/esm/pagination/stateful-container.js +0 -1
  304. package/esm/pagination/stateful-pagination.js +0 -1
  305. package/esm/pagination/styled-components.js +1 -4
  306. package/esm/payment-card/styled-components.js +1 -2
  307. package/esm/phone-input/base-country-picker.js +1 -3
  308. package/esm/phone-input/country-select-dropdown.js +0 -1
  309. package/esm/phone-input/styled-components.js +8 -20
  310. package/esm/pin-code/styled-components.js +1 -4
  311. package/esm/popover/popover.js +12 -9
  312. package/esm/popover/styled-components.js +4 -9
  313. package/esm/progress-bar/progressbar-rounded.js +0 -1
  314. package/esm/progress-bar/styled-components.js +2 -14
  315. package/esm/progress-steps/progress-steps.js +1 -2
  316. package/esm/progress-steps/styled-components.js +19 -28
  317. package/esm/radio/styled-components.js +3 -10
  318. package/esm/rating/emoticon-rating.js +1 -2
  319. package/esm/rating/star-rating.js +1 -2
  320. package/esm/rating/styled-components.js +1 -5
  321. package/esm/select/autosize-input.js +3 -2
  322. package/esm/select/dropdown.js +1 -2
  323. package/esm/select/multi-value.js +1 -2
  324. package/esm/select/select-component.js +10 -10
  325. package/esm/select/single-select.js +2 -2
  326. package/esm/select/styled-components.js +1 -16
  327. package/esm/select/value.js +4 -3
  328. package/esm/side-navigation/index.js +1 -2
  329. package/esm/side-navigation/nav-item.js +0 -1
  330. package/esm/side-navigation/nav.js +1 -1
  331. package/esm/side-navigation/stateful-container.js +0 -1
  332. package/esm/side-navigation/styled-components.js +6 -13
  333. package/esm/skeleton/styled-components.js +1 -3
  334. package/esm/slider/slider.js +2 -4
  335. package/esm/slider/styled-components.js +0 -9
  336. package/esm/snackbar/snackbar-element.js +0 -1
  337. package/esm/snackbar/styled-components.js +1 -9
  338. package/esm/spinner/styled-components.js +1 -2
  339. package/esm/styles/__mocks__/styled.js +5 -8
  340. package/esm/styles/styled.js +6 -7
  341. package/esm/table/index.js +1 -2
  342. package/esm/table/styled-components.js +1 -13
  343. package/esm/table-grid/styled-components.js +1 -4
  344. package/esm/table-semantic/styled-components.js +2 -20
  345. package/esm/tabs/stateful-tabs.js +0 -1
  346. package/esm/tabs/styled-components.js +1 -5
  347. package/esm/tabs/tabs.js +2 -4
  348. package/esm/tabs-motion/styled-components.js +1 -8
  349. package/esm/tabs-motion/tab.js +0 -1
  350. package/esm/tabs-motion/tabs.js +1 -2
  351. package/esm/tag/styled-components.js +1 -5
  352. package/esm/tag/tag.js +2 -4
  353. package/esm/textarea/styled-components.js +1 -4
  354. package/esm/themes/shared/typography.js +10 -10
  355. package/esm/toast/styled-components.js +1 -5
  356. package/esm/toast/toaster.js +2 -0
  357. package/esm/tokens/colors.js +0 -24
  358. package/esm/tooltip/styled-components.js +1 -4
  359. package/esm/tree-view/index.js +1 -2
  360. package/esm/tree-view/styled-components.js +1 -7
  361. package/esm/tree-view/tree-view.js +1 -3
  362. package/esm/types/globals.d.js +0 -12
  363. package/esm/utils/deep-merge.js +5 -0
  364. package/esm/utils/deprecated-component.js +0 -1
  365. package/esm/utils/focusVisible.js +2 -4
  366. package/file-uploader/styled-components.js +1 -6
  367. package/flex-grid/flex-grid-item.d.ts +1 -1
  368. package/flex-grid/flex-grid-item.js +8 -6
  369. package/flex-grid/flex-grid.js +3 -7
  370. package/form-control/styled-components.js +1 -6
  371. package/header-navigation/styled-components.js +1 -4
  372. package/helper/styled-components.js +1 -3
  373. package/helpers/overrides.js +3 -8
  374. package/helpers/overrides.js.flow +1 -1
  375. package/icon/build-icons.js +2 -0
  376. package/icon/build-icons.js.flow +1 -0
  377. package/icon/omit-dollar-prefixed-keys.js +0 -1
  378. package/icon/styled-components.js +1 -2
  379. package/input/masked-input.js +2 -5
  380. package/input/stateful-container.js +0 -1
  381. package/input/styled-components.js +5 -10
  382. package/layer/layer.js +0 -24
  383. package/layer/layer.js.flow +0 -25
  384. package/layer/layers-manager.d.ts +0 -8
  385. package/layer/layers-manager.js +1 -97
  386. package/layer/layers-manager.js.flow +1 -84
  387. package/layer/types.d.ts +0 -21
  388. package/layer/types.js.flow +1 -22
  389. package/layout-grid/styled-components.js +0 -3
  390. package/link/index.js +1 -2
  391. package/link/styled-components.js +1 -2
  392. package/list/list-heading.js +17 -21
  393. package/list/list-item.js +1 -2
  394. package/list/styled-components.js +1 -15
  395. package/locale/es_AR.js +1 -3
  396. package/locale/index.js +1 -4
  397. package/locale/tr_TR.js +1 -3
  398. package/map-marker/constants.d.ts +0 -14
  399. package/map-marker/constants.js +3 -16
  400. package/map-marker/constants.js.flow +0 -17
  401. package/map-marker/index.d.ts +1 -2
  402. package/map-marker/index.js +1 -24
  403. package/map-marker/index.js.flow +3 -5
  404. package/map-marker/styled-components.d.ts +1 -17
  405. package/map-marker/styled-components.js +2 -88
  406. package/map-marker/styled-components.js.flow +0 -58
  407. package/map-marker/types.d.ts +1 -29
  408. package/map-marker/types.js.flow +0 -34
  409. package/menu/menu.js +3 -6
  410. package/menu/option-profile.js +0 -1
  411. package/menu/stateful-container.js +0 -1
  412. package/menu/styled-components.js +6 -20
  413. package/modal/modal.js +4 -4
  414. package/modal/modal.js.flow +3 -1
  415. package/modal/styled-components.js +1 -8
  416. package/package.json +11 -9
  417. package/pagination/stateful-container.js +0 -1
  418. package/pagination/stateful-pagination.js +0 -1
  419. package/pagination/styled-components.js +1 -4
  420. package/payment-card/styled-components.js +1 -2
  421. package/phone-input/base-country-picker.js +1 -3
  422. package/phone-input/country-select-dropdown.js +0 -1
  423. package/phone-input/styled-components.js +9 -21
  424. package/pin-code/styled-components.js +1 -4
  425. package/popover/popover.js +12 -9
  426. package/popover/popover.js.flow +12 -2
  427. package/popover/styled-components.js +9 -12
  428. package/progress-bar/progressbar-rounded.js +0 -1
  429. package/progress-bar/styled-components.js +2 -14
  430. package/progress-steps/progress-steps.js +1 -2
  431. package/progress-steps/styled-components.js +19 -28
  432. package/radio/styled-components.js +3 -10
  433. package/rating/emoticon-rating.js +1 -2
  434. package/rating/star-rating.js +1 -2
  435. package/rating/styled-components.js +1 -5
  436. package/select/autosize-input.js +1 -2
  437. package/select/autosize-input.js.flow +1 -1
  438. package/select/dropdown.js +1 -2
  439. package/select/multi-value.js +0 -1
  440. package/select/select-component.d.ts +1 -1
  441. package/select/select-component.js +7 -9
  442. package/select/select-component.js.flow +1 -1
  443. package/select/single-select.d.ts +2 -2
  444. package/select/single-select.js +2 -2
  445. package/select/styled-components.js +1 -16
  446. package/select/value.js +3 -2
  447. package/side-navigation/nav-item.js +0 -1
  448. package/side-navigation/nav.js +1 -1
  449. package/side-navigation/stateful-container.js +0 -1
  450. package/side-navigation/styled-components.js +6 -13
  451. package/skeleton/styled-components.js +1 -3
  452. package/slider/slider.js +2 -4
  453. package/slider/styled-components.js +0 -9
  454. package/snackbar/snackbar-element.js +0 -1
  455. package/snackbar/styled-components.js +1 -9
  456. package/spinner/styled-components.js +1 -2
  457. package/styles/__mocks__/styled.js +3 -8
  458. package/styles/styled.js +6 -7
  459. package/table/styled-components.js +1 -13
  460. package/table-grid/styled-components.js +1 -4
  461. package/table-semantic/styled-components.js +2 -20
  462. package/tabs/stateful-tabs.js +0 -1
  463. package/tabs/styled-components.js +1 -5
  464. package/tabs/tabs.js +2 -4
  465. package/tabs-motion/styled-components.js +1 -8
  466. package/tabs-motion/tab.js +0 -1
  467. package/tabs-motion/tabs.js +1 -2
  468. package/tag/styled-components.js +1 -5
  469. package/tag/tag.js +2 -4
  470. package/textarea/styled-components.js +1 -4
  471. package/themes/shared/typography.js +10 -10
  472. package/themes/shared/typography.js.flow +10 -10
  473. package/toast/styled-components.js +1 -5
  474. package/toast/toaster.js.flow +1 -1
  475. package/tokens/colors.js +0 -24
  476. package/tokens/colors.js.flow +0 -27
  477. package/tokens/types.d.ts +0 -24
  478. package/tokens/types.js.flow +0 -27
  479. package/tooltip/styled-components.js +1 -4
  480. package/tree-view/styled-components.js +1 -7
  481. package/tree-view/tree-view.js +1 -3
  482. package/types/globals.d.js +1 -14
  483. package/utils/deep-merge.js +6 -0
  484. package/utils/deprecated-component.js +0 -1
  485. package/utils/focusVisible.js +2 -4
  486. package/es/map-marker/location-puck.js +0 -142
  487. package/es/message-card/constants.js +0 -19
  488. package/es/message-card/index.js +0 -10
  489. package/es/message-card/message-card.js +0 -112
  490. package/es/message-card/styled-components.js +0 -108
  491. package/es/message-card/types.js +0 -1
  492. package/es/message-card/utils.js +0 -27
  493. package/esm/map-marker/location-puck.js +0 -199
  494. package/esm/message-card/constants.js +0 -20
  495. package/esm/message-card/index.js +0 -10
  496. package/esm/message-card/message-card.js +0 -166
  497. package/esm/message-card/styled-components.js +0 -116
  498. package/esm/message-card/types.js +0 -1
  499. package/esm/message-card/utils.js +0 -26
  500. package/map-marker/location-puck.d.ts +0 -4
  501. package/map-marker/location-puck.js +0 -211
  502. package/map-marker/location-puck.js.flow +0 -18
  503. package/message-card/constants.d.ts +0 -12
  504. package/message-card/constants.js +0 -25
  505. package/message-card/index.d.ts +0 -4
  506. package/message-card/index.js +0 -60
  507. package/message-card/index.js.flow +0 -72
  508. package/message-card/message-card.d.ts +0 -4
  509. package/message-card/message-card.js +0 -182
  510. package/message-card/package.json +0 -4
  511. package/message-card/styled-components.d.ts +0 -14
  512. package/message-card/styled-components.js +0 -124
  513. package/message-card/types.d.ts +0 -27
  514. package/message-card/types.js +0 -5
  515. package/message-card/utils.d.ts +0 -1
  516. package/message-card/utils.js +0 -36
@@ -1,166 +0,0 @@
1
- var _excluded = ["children"];
2
-
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; }
4
-
5
- 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
- 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
-
9
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
-
11
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
-
13
- 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."); }
14
-
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
-
17
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18
-
19
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
20
-
21
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
-
23
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
24
-
25
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
26
-
27
- /*
28
- Copyright (c) Uber Technologies, Inc.
29
-
30
- This source code is licensed under the MIT license found in the
31
- LICENSE file in the root directory of this source tree.
32
- */
33
- import * as React from 'react';
34
- import { StyledRoot, StyledImage, StyledContentContainer, StyledHeadingContainer, StyledParagraphContainer } from './styled-components';
35
- import { Button as DefaultButton, SHAPE, SIZE } from '../button';
36
- import { useStyletron } from '../styles/index.js';
37
- import { ThemeProvider, LightTheme } from '../';
38
- import { getBackgroundColorType } from './utils';
39
- import { colors } from '../tokens';
40
- import { getOverrides } from '../helpers/overrides';
41
- import { IMAGE_LAYOUT, BACKGROUND_COLOR_TYPE, BUTTON_KIND } from './constants';
42
-
43
- var ButtonAlwaysLightTheme = function ButtonAlwaysLightTheme(_ref) {
44
- var children = _ref.children,
45
- restProps = _objectWithoutProperties(_ref, _excluded);
46
-
47
- return /*#__PURE__*/React.createElement(ThemeProvider, {
48
- theme: LightTheme
49
- }, /*#__PURE__*/React.createElement(DefaultButton, restProps, children));
50
- };
51
-
52
- var MessageCard = function MessageCard(_ref2) {
53
- var _ref2$backgroundColor = _ref2.backgroundColor,
54
- backgroundColor = _ref2$backgroundColor === void 0 ? colors.white : _ref2$backgroundColor,
55
- backgroundColorTypeProp = _ref2.backgroundColorType,
56
- _ref2$buttonKind = _ref2.buttonKind,
57
- buttonKind = _ref2$buttonKind === void 0 ? BUTTON_KIND.secondary : _ref2$buttonKind,
58
- buttonLabel = _ref2.buttonLabel,
59
- heading = _ref2.heading,
60
- image = _ref2.image,
61
- onClick = _ref2.onClick,
62
- _ref2$overrides = _ref2.overrides,
63
- overrides = _ref2$overrides === void 0 ? {} : _ref2$overrides,
64
- paragraph = _ref2.paragraph;
65
-
66
- var _ref3 = image || {},
67
- src = _ref3.src,
68
- _ref3$layout = _ref3.layout,
69
- layout = _ref3$layout === void 0 ? IMAGE_LAYOUT.top : _ref3$layout,
70
- backgroundPosition = _ref3.backgroundPosition,
71
- ariaLabel = _ref3.ariaLabel;
72
-
73
- var _getOverrides = getOverrides(overrides.Root, StyledRoot),
74
- _getOverrides2 = _slicedToArray(_getOverrides, 2),
75
- Root = _getOverrides2[0],
76
- RootProps = _getOverrides2[1];
77
-
78
- var _getOverrides3 = getOverrides(overrides.ContentContainer, StyledContentContainer),
79
- _getOverrides4 = _slicedToArray(_getOverrides3, 2),
80
- ContentContainer = _getOverrides4[0],
81
- ContentContainerProps = _getOverrides4[1];
82
-
83
- var _getOverrides5 = getOverrides(overrides.HeadingContainer, StyledHeadingContainer),
84
- _getOverrides6 = _slicedToArray(_getOverrides5, 2),
85
- HeadingContainer = _getOverrides6[0],
86
- HeadingContainerProps = _getOverrides6[1];
87
-
88
- var _getOverrides7 = getOverrides(overrides.ParagraphContainer, StyledParagraphContainer),
89
- _getOverrides8 = _slicedToArray(_getOverrides7, 2),
90
- ParagraphContainer = _getOverrides8[0],
91
- ParagraphContainerProps = _getOverrides8[1];
92
-
93
- var _getOverrides9 = getOverrides(overrides.Image, StyledImage),
94
- _getOverrides10 = _slicedToArray(_getOverrides9, 2),
95
- Image = _getOverrides10[0],
96
- ImageProps = _getOverrides10[1];
97
-
98
- var _getOverrides11 = getOverrides(overrides.Button, ButtonAlwaysLightTheme),
99
- _getOverrides12 = _slicedToArray(_getOverrides11, 2),
100
- Button = _getOverrides12[0],
101
- ButtonProps = _getOverrides12[1];
102
-
103
- var _useStyletron = useStyletron(),
104
- _useStyletron2 = _slicedToArray(_useStyletron, 2),
105
- theme = _useStyletron2[1];
106
-
107
- var backgroundColorType = backgroundColorTypeProp || getBackgroundColorType(backgroundColor);
108
-
109
- if (!backgroundColorType) {
110
- backgroundColorType = BACKGROUND_COLOR_TYPE.dark;
111
-
112
- if (process.env.NODE_ENV !== "production") {
113
- console.warn("The provided value for 'backgroundColor', ".concat(backgroundColor, ", is not recognized as a Base Web primitive color. Please use the 'backgroundColorType' prop to indicate whether this color is light or dark so the rest of the component can be styled accordingly."));
114
- }
115
- }
116
-
117
- var buttonColors;
118
-
119
- if (buttonKind === BUTTON_KIND.tertiary && backgroundColorType === BACKGROUND_COLOR_TYPE.dark) {
120
- buttonColors = {
121
- color: theme.colors.contentOnColor,
122
- backgroundColor: theme.colors.buttonTertiaryFill
123
- };
124
- }
125
-
126
- if (buttonKind !== BUTTON_KIND.tertiary && backgroundColor !== colors.white) {
127
- buttonColors = {
128
- color: theme.colors.contentOnColorInverse,
129
- backgroundColor: theme.colors.backgroundAlwaysLight
130
- };
131
- }
132
-
133
- return /*#__PURE__*/React.createElement(Root, _extends({
134
- onClick: onClick,
135
- $backgroundColor: backgroundColor,
136
- $backgroundColorType: backgroundColorType,
137
- $imageLayout: layout
138
- }, RootProps), image && /*#__PURE__*/React.createElement(Image, _extends({
139
- role: "img",
140
- ariaLabel: ariaLabel,
141
- $src: src,
142
- $imageLayout: layout,
143
- $backgroundPosition: backgroundPosition
144
- }, ImageProps)), /*#__PURE__*/React.createElement(ContentContainer, ContentContainerProps, heading && /*#__PURE__*/React.createElement(HeadingContainer, HeadingContainerProps, heading), paragraph && /*#__PURE__*/React.createElement(ParagraphContainer, ParagraphContainerProps, paragraph), buttonLabel && /*#__PURE__*/React.createElement(Button, _extends({
145
- kind: buttonKind,
146
- shape: SHAPE.pill,
147
- size: SIZE.compact,
148
- role: "none",
149
- tabIndex: -1,
150
- colors: buttonColors,
151
- overrides: {
152
- BaseButton: {
153
- style: _objectSpread({
154
- pointerEvents: 'none'
155
- }, buttonKind === BUTTON_KIND.tertiary ? {
156
- marginTop: theme.sizing.scale100,
157
- transform: theme.direction === 'rtl' ? "translateX(".concat(theme.sizing.scale500, ")") : "translateX(-".concat(theme.sizing.scale500, ")")
158
- } : {
159
- marginTop: theme.sizing.scale500
160
- })
161
- }
162
- }
163
- }, ButtonProps), buttonLabel)));
164
- };
165
-
166
- export default MessageCard;
@@ -1,116 +0,0 @@
1
- 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; }
2
-
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; }
4
-
5
- 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; }
6
-
7
- /*
8
- Copyright (c) Uber Technologies, Inc.
9
-
10
- This source code is licensed under the MIT license found in the
11
- LICENSE file in the root directory of this source tree.
12
- */
13
- import { styled } from '../styles';
14
- import { IMAGE_LAYOUT, BACKGROUND_COLOR_TYPE } from './constants';
15
- export var StyledRoot = styled('button', function (_ref) {
16
- var $theme = _ref.$theme,
17
- $backgroundColor = _ref.$backgroundColor,
18
- $backgroundColorType = _ref.$backgroundColorType,
19
- _ref$$imageLayout = _ref.$imageLayout,
20
- $imageLayout = _ref$$imageLayout === void 0 ? IMAGE_LAYOUT.top : _ref$$imageLayout;
21
- var lightBackgroundStyle = {
22
- color: $theme.colors.contentOnColorInverse,
23
- borderStyle: 'solid',
24
- borderWidth: $theme.sizing.scale0,
25
- borderColor: $theme.colors.borderOpaque
26
- };
27
- var darkBackgroundStyle = {
28
- color: $theme.colors.contentOnColor,
29
- border: 'none'
30
- };
31
- return _objectSpread(_objectSpread({
32
- alignItems: 'stretch',
33
- backgroundColor: $backgroundColor,
34
- borderRadius: $theme.borders.radius400,
35
- cursor: 'pointer',
36
- display: 'flex',
37
- flexDirection: $imageLayout === IMAGE_LAYOUT.top ? 'column' : 'row',
38
- overflow: 'hidden',
39
- padding: '0',
40
- position: 'relative',
41
- textAlign: 'start',
42
- width: '100%',
43
- boxShadow: "inset 999px 999px 0px ".concat($theme.colors.backgroundOverlayArt)
44
- }, $backgroundColorType === BACKGROUND_COLOR_TYPE.light ? lightBackgroundStyle : darkBackgroundStyle), {}, {
45
- ':focus': {
46
- outlineWidth: '3px',
47
- outlineStyle: 'solid',
48
- outlineColor: $theme.colors.borderAccent,
49
- outlineOffset: '-3px'
50
- },
51
- ':hover:after': {
52
- content: '""',
53
- width: '100%',
54
- height: '100%',
55
- zIndex: '1',
56
- position: 'absolute',
57
- top: '0',
58
- left: '0',
59
- backgroundColor: $backgroundColorType === BACKGROUND_COLOR_TYPE.light ? 'rgba(0, 0, 0, 0.04)' : 'rgba(255, 255, 255, 0.10)'
60
- },
61
- ':active:after': {
62
- content: '""',
63
- width: '100%',
64
- height: '100%',
65
- zIndex: '1',
66
- position: 'absolute',
67
- top: '0',
68
- left: '0',
69
- backgroundColor: $backgroundColorType === BACKGROUND_COLOR_TYPE.light ? 'rgba(0, 0, 0, 0.08)' : 'rgba(255, 255, 255, 0.20)'
70
- }
71
- });
72
- });
73
- StyledRoot.displayName = "StyledRoot";
74
- export var StyledImage = styled('div', function (_ref2) {
75
- var _ref2$$imageLayout = _ref2.$imageLayout,
76
- $imageLayout = _ref2$$imageLayout === void 0 ? IMAGE_LAYOUT.top : _ref2$$imageLayout,
77
- _ref2$$backgroundPosi = _ref2.$backgroundPosition,
78
- $backgroundPosition = _ref2$$backgroundPosi === void 0 ? 'center' : _ref2$$backgroundPosi,
79
- $src = _ref2.$src;
80
- return _objectSpread({
81
- backgroundImage: "url(".concat($src, ")"),
82
- backgroundSize: 'cover',
83
- backgroundPosition: $backgroundPosition
84
- }, $imageLayout === IMAGE_LAYOUT.top ? {
85
- height: '132px',
86
- width: '100%'
87
- } : {
88
- width: '112px',
89
- order: '1'
90
- });
91
- });
92
- StyledImage.displayName = "StyledImage";
93
- export var StyledContentContainer = styled('div', function (_ref3) {
94
- var $theme = _ref3.$theme;
95
- return {
96
- width: '100%',
97
- boxSizing: 'border-box',
98
- paddingTop: $theme.sizing.scale600,
99
- paddingRight: $theme.sizing.scale300,
100
- paddingBottom: $theme.sizing.scale600,
101
- paddingLeft: $theme.sizing.scale600
102
- };
103
- });
104
- StyledContentContainer.displayName = "StyledContentContainer";
105
- export var StyledHeadingContainer = styled('div', function (_ref4) {
106
- var $theme = _ref4.$theme;
107
- return _objectSpread({}, $theme.typography.HeadingXSmall);
108
- });
109
- StyledHeadingContainer.displayName = "StyledHeadingContainer";
110
- export var StyledParagraphContainer = styled('div', function (_ref5) {
111
- var $theme = _ref5.$theme;
112
- return _objectSpread(_objectSpread({}, $theme.typography.ParagraphSmall), {}, {
113
- marginTop: $theme.sizing.scale100
114
- });
115
- });
116
- StyledParagraphContainer.displayName = "StyledParagraphContainer";
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- import { colors } from '../tokens';
8
- import { BACKGROUND_COLOR_TYPE } from './constants';
9
- var LIGHT_COLORS = new Set([colors.red50, colors.red100, colors.red200, colors.red300, colors.green50, colors.green100, colors.green200, colors.green300, colors.teal50, colors.teal100, colors.teal200, colors.teal300, colors.blue50, colors.blue100, colors.blue200, colors.blue300, colors.cobalt50, colors.cobalt100, colors.cobalt200, colors.purple50, colors.purple100, colors.purple200, colors.purple300, colors.magenta50, colors.magenta100, colors.magenta200, colors.magenta300, colors.brown50, colors.brown100, colors.brown200, colors.brown300, colors.orange50, colors.orange100, colors.orange200, colors.orange300, colors.orange400, colors.lime50, colors.lime100, colors.lime200, colors.lime300, colors.lime400, colors.platinum50, colors.platinum100, colors.platinum200, colors.platinum300, colors.platinum400, colors.yellow50, colors.yellow100, colors.yellow200, colors.yellow300, colors.yellow400, colors.yellow500, colors.white, colors.gray50, colors.gray100, colors.gray200, colors.gray300, colors.gray400]);
10
- var DARK_COLORS = new Set([colors.red400, colors.red500, colors.red600, colors.red700, colors.green400, colors.green500, colors.green600, colors.green700, colors.teal400, colors.teal500, colors.teal600, colors.teal700, colors.blue400, colors.blue500, colors.blue600, colors.blue700, colors.cobalt300, colors.cobalt400, colors.cobalt500, colors.cobalt600, colors.cobalt700, colors.purple400, colors.purple500, colors.purple600, colors.purple700, colors.magenta400, colors.magenta500, colors.magenta600, colors.magenta700, colors.brown400, colors.brown500, colors.brown600, colors.brown700, colors.orange500, colors.orange600, colors.orange700, colors.lime500, colors.lime600, colors.lime700, colors.platinum500, colors.platinum600, colors.platinum700, colors.platinum800, colors.yellow600, colors.yellow700, colors.gray500, colors.gray600, colors.gray700, colors.gray800, colors.gray900, colors.black]);
11
- var POOR_CONTRAST_COLORS = new Set([colors.red300, colors.gray500, colors.yellow600]);
12
- export function getBackgroundColorType(backgroundColor) {
13
- if (process.env.NODE_ENV !== "production" && POOR_CONTRAST_COLORS.has(backgroundColor)) {
14
- console.warn("The provided value for backgroundColor, ".concat(backgroundColor, ", is not supported because it does not pass accessibility contrast tests for either white or black text."));
15
- }
16
-
17
- if (LIGHT_COLORS.has(backgroundColor)) {
18
- return BACKGROUND_COLOR_TYPE.light;
19
- }
20
-
21
- if (DARK_COLORS.has(backgroundColor)) {
22
- return BACKGROUND_COLOR_TYPE.dark;
23
- }
24
-
25
- return null;
26
- }
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import type { LocationPuckProps } from './types';
3
- declare const LocationPuck: ({ size, heading, showHeading, confidenceRadius, type, overrides, }: LocationPuckProps) => JSX.Element;
4
- export default LocationPuck;
@@ -1,211 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var React = _interopRequireWildcard(require("react"));
11
-
12
- var _styles = require("../styles");
13
-
14
- var _overrides = require("../helpers/overrides");
15
-
16
- var _constants = require("./constants");
17
-
18
- var _styledComponents = require("./styled-components");
19
-
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
-
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
-
28
- 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."); }
29
-
30
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
-
32
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
-
34
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
35
-
36
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
-
38
- var ConsumerLocationPuckHeading = function ConsumerLocationPuckHeading(_ref) {
39
- var heading = _ref.heading;
40
-
41
- var _useStyletron = (0, _styles.useStyletron)(),
42
- _useStyletron2 = _slicedToArray(_useStyletron, 2),
43
- css = _useStyletron2[0],
44
- theme = _useStyletron2[1];
45
-
46
- return /*#__PURE__*/React.createElement("svg", {
47
- className: css({
48
- height: "".concat(6, "px"),
49
- width: "".concat(11, "px"),
50
- position: 'absolute',
51
- color: theme.colors.contentAccent,
52
- transition: "".concat(theme.animation.timing300, " ").concat(theme.animation.easeOutCurve, " all")
53
- }),
54
- style: {
55
- transform: "rotate(".concat(heading, "deg) translateY(-16px)")
56
- },
57
- width: "11",
58
- height: "6",
59
- viewBox: "0 0 11 6",
60
- fill: "none",
61
- xmlns: "http://www.w3.org/2000/svg"
62
- }, /*#__PURE__*/React.createElement("path", {
63
- fillRule: "evenodd",
64
- clipRule: "evenodd",
65
- d: "M5.5 0L0 6L5.5 5L11 6L5.5 0Z",
66
- fill: "currentColor"
67
- }));
68
- };
69
-
70
- var ConsumerLocationPuck = function ConsumerLocationPuck(_ref2) {
71
- var heading = _ref2.heading,
72
- showHeading = _ref2.showHeading,
73
- confidenceRadius = _ref2.confidenceRadius,
74
- overrides = _ref2.overrides;
75
-
76
- var _useStyletron3 = (0, _styles.useStyletron)(),
77
- _useStyletron4 = _slicedToArray(_useStyletron3, 2),
78
- theme = _useStyletron4[1];
79
-
80
- var _getOverrides = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.LocationPuckContainer),
81
- _getOverrides2 = _slicedToArray(_getOverrides, 2),
82
- Root = _getOverrides2[0],
83
- rootProps = _getOverrides2[1];
84
-
85
- var _getOverrides3 = (0, _overrides.getOverrides)(overrides.ConsumerLocationPuckCore, _styledComponents.StyledConsumerLocationPuckCore),
86
- _getOverrides4 = _slicedToArray(_getOverrides3, 2),
87
- ConsumerLocationPuckCore = _getOverrides4[0],
88
- consumerLocationPuckCoreProps = _getOverrides4[1];
89
-
90
- var _getOverrides5 = (0, _overrides.getOverrides)(overrides.LocationPuckApproximation, _styledComponents.StyledLocationPuckApproximation),
91
- _getOverrides6 = _slicedToArray(_getOverrides5, 2),
92
- LocationPuckApproximation = _getOverrides6[0],
93
- locationPuckApproximationProps = _getOverrides6[1];
94
-
95
- return /*#__PURE__*/React.createElement(Root, rootProps, /*#__PURE__*/React.createElement(LocationPuckApproximation, _extends({
96
- $color: theme.colors.contentAccent,
97
- $radius: confidenceRadius
98
- }, locationPuckApproximationProps)), /*#__PURE__*/React.createElement(ConsumerLocationPuckCore, consumerLocationPuckCoreProps), showHeading && /*#__PURE__*/React.createElement(ConsumerLocationPuckHeading, {
99
- heading: heading
100
- }));
101
- };
102
-
103
- var EarnerLocationPuckHeading = function EarnerLocationPuckHeading(_ref3) {
104
- var size = _ref3.size,
105
- color = _ref3.color,
106
- heading = _ref3.heading;
107
-
108
- var _useStyletron5 = (0, _styles.useStyletron)(),
109
- _useStyletron6 = _slicedToArray(_useStyletron5, 2),
110
- css = _useStyletron6[0],
111
- theme = _useStyletron6[1];
112
-
113
- return /*#__PURE__*/React.createElement("svg", {
114
- className: css({
115
- position: 'absolute',
116
- transition: "".concat(theme.animation.timing300, " ").concat(theme.animation.easeOutCurve, " all")
117
- }),
118
- style: {
119
- transform: "rotate(".concat(heading, "deg) scale(").concat(_constants.EARNER_LOCATION_PUCK_CORE_SCALES[size], ")")
120
- },
121
- width: "72",
122
- height: "72",
123
- viewBox: "0 0 72 72",
124
- fill: "none",
125
- xmlns: "http://www.w3.org/2000/svg"
126
- }, /*#__PURE__*/React.createElement("path", {
127
- fillRule: "evenodd",
128
- clipRule: "evenodd",
129
- d: "M36 20L52 52L36 42.8571L20 52L36 20Z",
130
- fill: color
131
- }));
132
- };
133
-
134
- var EarnerLocationPuck = function EarnerLocationPuck(_ref4) {
135
- var heading = _ref4.heading,
136
- confidenceRadius = _ref4.confidenceRadius,
137
- size = _ref4.size,
138
- overrides = _ref4.overrides;
139
-
140
- var _useStyletron7 = (0, _styles.useStyletron)(),
141
- _useStyletron8 = _slicedToArray(_useStyletron7, 2),
142
- theme = _useStyletron8[1];
143
-
144
- var color = theme.colors.contentPrimary;
145
-
146
- var _getOverrides7 = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.LocationPuckContainer),
147
- _getOverrides8 = _slicedToArray(_getOverrides7, 2),
148
- Root = _getOverrides8[0],
149
- rootProps = _getOverrides8[1];
150
-
151
- var _getOverrides9 = (0, _overrides.getOverrides)(overrides.LocationPuckApproximation, _styledComponents.StyledLocationPuckApproximation),
152
- _getOverrides10 = _slicedToArray(_getOverrides9, 2),
153
- LocationPuckApproximation = _getOverrides10[0],
154
- locationPuckApproximationProps = _getOverrides10[1];
155
-
156
- var _getOverrides11 = (0, _overrides.getOverrides)(overrides.EarnerLocationPuckCore, _styledComponents.StyledEarnerLocationPuckCore),
157
- _getOverrides12 = _slicedToArray(_getOverrides11, 2),
158
- EarnerLocationPuckCore = _getOverrides12[0],
159
- earnerLocationPuckCoreProps = _getOverrides12[1];
160
-
161
- return /*#__PURE__*/React.createElement(Root, rootProps, /*#__PURE__*/React.createElement(LocationPuckApproximation, _extends({
162
- $color: color,
163
- $radius: confidenceRadius
164
- }, locationPuckApproximationProps)), /*#__PURE__*/React.createElement(EarnerLocationPuckCore, _extends({
165
- $color: color,
166
- $size: size
167
- }, earnerLocationPuckCoreProps)), /*#__PURE__*/React.createElement(EarnerLocationPuckHeading, {
168
- size: size,
169
- color: color,
170
- heading: heading
171
- }));
172
- };
173
-
174
- var LocationPuck = function LocationPuck(_ref5) {
175
- var _ref5$size = _ref5.size,
176
- size = _ref5$size === void 0 ? _constants.LOCATION_PUCK_SIZES.medium : _ref5$size,
177
- _ref5$heading = _ref5.heading,
178
- heading = _ref5$heading === void 0 ? 0 : _ref5$heading,
179
- _ref5$showHeading = _ref5.showHeading,
180
- showHeading = _ref5$showHeading === void 0 ? true : _ref5$showHeading,
181
- _ref5$confidenceRadiu = _ref5.confidenceRadius,
182
- confidenceRadius = _ref5$confidenceRadiu === void 0 ? 0 : _ref5$confidenceRadiu,
183
- _ref5$type = _ref5.type,
184
- type = _ref5$type === void 0 ? _constants.LOCATION_PUCK_TYPES.consumer : _ref5$type,
185
- _ref5$overrides = _ref5.overrides,
186
- overrides = _ref5$overrides === void 0 ? {} : _ref5$overrides;
187
-
188
- if (process.env.NODE_ENV !== "production") {
189
- if (size !== _constants.LOCATION_PUCK_SIZES.medium && type === _constants.LOCATION_PUCK_TYPES.consumer) {
190
- console.warn("Location puck size can only be applied to type === LOCATION_PUCK_TYPES.earner");
191
- }
192
-
193
- if (!showHeading && type === _constants.LOCATION_PUCK_TYPES.earner) {
194
- console.warn("Earner location puck must show the heading indicator");
195
- }
196
- }
197
-
198
- var sharedProps = {
199
- heading: heading,
200
- confidenceRadius: confidenceRadius,
201
- overrides: overrides
202
- };
203
- return type === _constants.LOCATION_PUCK_TYPES.consumer ? /*#__PURE__*/React.createElement(ConsumerLocationPuck, _extends({}, sharedProps, {
204
- showHeading: showHeading
205
- })) : /*#__PURE__*/React.createElement(EarnerLocationPuck, _extends({}, sharedProps, {
206
- size: size
207
- }));
208
- };
209
-
210
- var _default = LocationPuck;
211
- exports.default = _default;
@@ -1,18 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- // @flow
8
- import * as React from 'react';
9
-
10
- import type { LocationPuckPropsT } from './types';
11
-
12
- declare var LocationPuck: (props: LocationPuckPropsT) => React.Node;
13
-
14
- export default LocationPuck;
15
-
16
- declare var __DEV__: boolean;
17
- declare var __NODE__: boolean;
18
- declare var __BROWSER__: boolean;
@@ -1,12 +0,0 @@
1
- export declare const BACKGROUND_COLOR_TYPE: Readonly<{
2
- readonly light: "light";
3
- readonly dark: "dark";
4
- }>;
5
- export declare const IMAGE_LAYOUT: Readonly<{
6
- readonly top: "top";
7
- readonly trailing: "trailing";
8
- }>;
9
- export declare const BUTTON_KIND: Readonly<{
10
- readonly secondary: "secondary";
11
- readonly tertiary: "tertiary";
12
- }>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.IMAGE_LAYOUT = exports.BUTTON_KIND = exports.BACKGROUND_COLOR_TYPE = void 0;
7
-
8
- var _button = require("../button");
9
-
10
- var _Object$freeze;
11
-
12
- 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; }
13
-
14
- var BACKGROUND_COLOR_TYPE = Object.freeze({
15
- light: 'light',
16
- dark: 'dark'
17
- });
18
- exports.BACKGROUND_COLOR_TYPE = BACKGROUND_COLOR_TYPE;
19
- var IMAGE_LAYOUT = Object.freeze({
20
- top: 'top',
21
- trailing: 'trailing'
22
- });
23
- exports.IMAGE_LAYOUT = IMAGE_LAYOUT;
24
- var BUTTON_KIND = Object.freeze((_Object$freeze = {}, _defineProperty(_Object$freeze, _button.KIND.secondary, _button.KIND.secondary), _defineProperty(_Object$freeze, _button.KIND.tertiary, _button.KIND.tertiary), _Object$freeze));
25
- exports.BUTTON_KIND = BUTTON_KIND;
@@ -1,4 +0,0 @@
1
- export { default as MessageCard } from './message-card';
2
- export * from './constants';
3
- export * from './styled-components';
4
- export * from './types';
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- MessageCard: true
8
- };
9
- Object.defineProperty(exports, "MessageCard", {
10
- enumerable: true,
11
- get: function get() {
12
- return _messageCard.default;
13
- }
14
- });
15
-
16
- var _messageCard = _interopRequireDefault(require("./message-card"));
17
-
18
- var _constants = require("./constants");
19
-
20
- Object.keys(_constants).forEach(function (key) {
21
- if (key === "default" || key === "__esModule") return;
22
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
23
- if (key in exports && exports[key] === _constants[key]) return;
24
- Object.defineProperty(exports, key, {
25
- enumerable: true,
26
- get: function get() {
27
- return _constants[key];
28
- }
29
- });
30
- });
31
-
32
- var _styledComponents = require("./styled-components");
33
-
34
- Object.keys(_styledComponents).forEach(function (key) {
35
- if (key === "default" || key === "__esModule") return;
36
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
37
- if (key in exports && exports[key] === _styledComponents[key]) return;
38
- Object.defineProperty(exports, key, {
39
- enumerable: true,
40
- get: function get() {
41
- return _styledComponents[key];
42
- }
43
- });
44
- });
45
-
46
- var _types = require("./types");
47
-
48
- Object.keys(_types).forEach(function (key) {
49
- if (key === "default" || key === "__esModule") return;
50
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
51
- if (key in exports && exports[key] === _types[key]) return;
52
- Object.defineProperty(exports, key, {
53
- enumerable: true,
54
- get: function get() {
55
- return _types[key];
56
- }
57
- });
58
- });
59
-
60
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }