baseui 16.1.0 → 18.1.0

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 (669) hide show
  1. package/a11y/a11y.js +2 -3
  2. package/a11y/index.js +1 -1
  3. package/accordion/accordion.js +4 -5
  4. package/accordion/index.js +1 -1
  5. package/accordion/panel.js +3 -4
  6. package/accordion/stateful-panel-container.js +3 -4
  7. package/accordion/stateful-panel.js +2 -3
  8. package/accordion/stateless-accordion.js +2 -3
  9. package/app-nav-bar/app-nav-bar.js +3 -4
  10. package/app-nav-bar/index.js +1 -1
  11. package/app-nav-bar/mobile-menu.js +3 -4
  12. package/app-nav-bar/user-menu.js +3 -4
  13. package/app-nav-bar/user-profile-tile.js +1 -2
  14. package/aspect-ratio-box/aspect-ratio-box-body.js +2 -3
  15. package/aspect-ratio-box/aspect-ratio-box.js +2 -3
  16. package/aspect-ratio-box/index.js +1 -1
  17. package/avatar/avatar.js +2 -3
  18. package/avatar/index.js +1 -1
  19. package/badge/badge.js +2 -3
  20. package/badge/hint-dot.js +2 -3
  21. package/badge/index.js +1 -1
  22. package/badge/notification-circle.js +2 -3
  23. package/badge/utils.js +1 -2
  24. package/banner/banner.js +2 -3
  25. package/block/block.js +2 -3
  26. package/block/index.js +1 -1
  27. package/bottom-navigation/bottom-navigation.js +2 -3
  28. package/bottom-navigation/index.js +1 -1
  29. package/bottom-navigation/panel.js +2 -3
  30. package/bottom-navigation/selector.js +2 -3
  31. package/breadcrumbs/breadcrumbs.js +3 -4
  32. package/breadcrumbs/index.js +1 -1
  33. package/button/button-internals.js +2 -3
  34. package/button/button.js +5 -6
  35. package/button/index.js +1 -1
  36. package/button-dock/button-dock.js +2 -3
  37. package/button-dock/index.js +1 -1
  38. package/button-group/button-group.js +4 -5
  39. package/button-group/index.js +1 -1
  40. package/button-group/stateful-button-group.js +3 -4
  41. package/button-group/stateful-container.js +3 -4
  42. package/button-timed/button-timed.js +2 -3
  43. package/button-timed/index.js +1 -1
  44. package/card/card.js +2 -3
  45. package/card/index.js +1 -2
  46. package/checkbox/checkbox.js +4 -5
  47. package/checkbox/index.js +1 -1
  48. package/checkbox/stateful-checkbox-container.js +3 -4
  49. package/checkbox/stateful-checkbox.js +2 -3
  50. package/checkbox-v2/checkbox.js +2 -3
  51. package/checkbox-v2/index.js +1 -1
  52. package/checkbox-v2/stateful-checkbox-container.js +1 -2
  53. package/checkbox-v2/stateful-checkbox.js +2 -3
  54. package/combobox/combobox.js +2 -3
  55. package/combobox/index.js +1 -1
  56. package/data-table/column-anchor.js +3 -4
  57. package/data-table/column-boolean.js +2 -3
  58. package/data-table/column-categorical.js +3 -4
  59. package/data-table/column-custom.js +1 -1
  60. package/data-table/column-datetime.js +3 -4
  61. package/data-table/column-numerical.js +3 -4
  62. package/data-table/column-row-index.js +2 -3
  63. package/data-table/column-string.js +3 -4
  64. package/data-table/column.js +1 -2
  65. package/data-table/data-table.js +2 -3
  66. package/data-table/filter-menu.js +1 -1
  67. package/data-table/filter-shell.js +1 -2
  68. package/data-table/header-cell.js +2 -3
  69. package/data-table/index.js +1 -1
  70. package/data-table/measure-column-widths.js +2 -3
  71. package/data-table/stateful-container.js +1 -2
  72. package/data-table/stateful-data-table.js +2 -3
  73. package/data-table/text-search.js +1 -1
  74. package/datepicker/calendar-header.js +5 -6
  75. package/datepicker/calendar.d.ts +4 -0
  76. package/datepicker/calendar.js +25 -10
  77. package/datepicker/datepicker.d.ts +1 -0
  78. package/datepicker/datepicker.js +18 -8
  79. package/datepicker/datepicker_DO_NOT_USE.js +5 -6
  80. package/datepicker/day.js +5 -6
  81. package/datepicker/index.js +1 -1
  82. package/datepicker/month.js +4 -5
  83. package/datepicker/stateful-calendar.js +5 -6
  84. package/datepicker/stateful-container.js +3 -4
  85. package/datepicker/stateful-datepicker.js +5 -6
  86. package/datepicker/styled-components.js +1 -1
  87. package/datepicker/utils/date-fns-adapter.js +1 -1
  88. package/datepicker/utils/date-helpers.js +2 -2
  89. package/datepicker/utils/index.js +1 -1
  90. package/datepicker/week.js +5 -6
  91. package/dialog/dialog.js +4 -5
  92. package/dialog/index.js +1 -1
  93. package/divider/index.js +2 -3
  94. package/dnd-list/index.js +1 -1
  95. package/dnd-list/list.js +5 -6
  96. package/dnd-list/stateful-list-container.js +3 -4
  97. package/dnd-list/stateful-list.js +2 -3
  98. package/drawer/close-icon.js +2 -3
  99. package/drawer/drawer.js +5 -6
  100. package/drawer/index.js +1 -1
  101. package/file-uploader/file-uploader.js +3 -4
  102. package/file-uploader/index.js +1 -1
  103. package/file-uploader-basic/file-uploader-basic.js +3 -4
  104. package/file-uploader-basic/index.js +1 -1
  105. package/flex-grid/flex-grid-item.js +2 -3
  106. package/flex-grid/flex-grid.js +2 -3
  107. package/flex-grid/index.js +1 -1
  108. package/form-control/form-control.js +4 -5
  109. package/form-control/index.js +1 -1
  110. package/header-navigation/header-navigation.js +4 -5
  111. package/header-navigation/index.js +1 -1
  112. package/heading/heading-level.js +1 -2
  113. package/heading/heading.js +2 -3
  114. package/heading/index.js +2 -3
  115. package/helper/helper-steps.js +2 -3
  116. package/helper/helper.js +2 -3
  117. package/helper/stateful-helper.js +1 -2
  118. package/helpers/base-provider.js +1 -2
  119. package/helpers/overrides.js +3 -4
  120. package/helpers/react-helpers.js +3 -4
  121. package/icon/alert.js +3 -4
  122. package/icon/arrow-down.js +3 -4
  123. package/icon/arrow-left.js +3 -4
  124. package/icon/arrow-right.js +3 -4
  125. package/icon/arrow-up.js +3 -4
  126. package/icon/blank.js +3 -4
  127. package/icon/calendar.js +3 -4
  128. package/icon/check-indeterminate.js +3 -4
  129. package/icon/check.js +3 -4
  130. package/icon/chevron-down-small.js +3 -4
  131. package/icon/chevron-down.js +3 -4
  132. package/icon/chevron-left-small.js +3 -4
  133. package/icon/chevron-left.js +3 -4
  134. package/icon/chevron-right-small.js +3 -4
  135. package/icon/chevron-right.js +3 -4
  136. package/icon/chevron-up-small.js +3 -4
  137. package/icon/chevron-up.js +3 -4
  138. package/icon/circle-check-filled.js +3 -4
  139. package/icon/circle-exclamation-point-filled.js +3 -4
  140. package/icon/delete-alt.js +3 -4
  141. package/icon/delete.js +3 -4
  142. package/icon/filter.js +3 -4
  143. package/icon/grab.js +3 -4
  144. package/icon/hide.js +3 -4
  145. package/icon/icon-exports.js +1 -1
  146. package/icon/icon.js +3 -4
  147. package/icon/index.js +1 -1
  148. package/icon/menu.js +3 -4
  149. package/icon/overflow.js +3 -4
  150. package/icon/paperclip-filled.js +3 -4
  151. package/icon/plus.js +3 -4
  152. package/icon/search.js +3 -4
  153. package/icon/show.js +3 -4
  154. package/icon/spinner.js +3 -4
  155. package/icon/trash-can-filled.js +3 -4
  156. package/icon/triangle-down.js +3 -4
  157. package/icon/triangle-left.js +3 -4
  158. package/icon/triangle-right.js +3 -4
  159. package/icon/triangle-up.js +3 -4
  160. package/icon/upload.js +3 -4
  161. package/index.js +1 -1
  162. package/input/base-input.js +5 -6
  163. package/input/index.js +1 -1
  164. package/input/input.js +5 -6
  165. package/input/masked-input.js +3 -4
  166. package/input/stateful-container.js +3 -4
  167. package/input/stateful-input.js +2 -3
  168. package/input/styled-components.js +1 -1
  169. package/layer/index.js +2 -3
  170. package/layer/layer.js +5 -6
  171. package/layer/layers-manager.js +4 -5
  172. package/layer/tether.js +4 -5
  173. package/layout-grid/cell.js +2 -2
  174. package/layout-grid/grid.js +2 -3
  175. package/layout-grid/index.js +1 -1
  176. package/link/index.js +2 -3
  177. package/list/index.js +1 -1
  178. package/list/list-heading.js +3 -4
  179. package/list/list-item-label.js +1 -1
  180. package/list/list-item.js +3 -3
  181. package/list/menu-adapter.js +2 -3
  182. package/locale/en_US.js +9 -9
  183. package/locale/index.js +2 -3
  184. package/map-marker/badge-enhancer.js +2 -3
  185. package/map-marker/drag-shadow.js +2 -3
  186. package/map-marker/fixed-marker.js +3 -4
  187. package/map-marker/floating-marker.js +3 -4
  188. package/map-marker/floating-route-marker.js +2 -3
  189. package/map-marker/index.js +1 -1
  190. package/map-marker/label-enhancer.js +2 -3
  191. package/map-marker/location-puck.js +2 -3
  192. package/map-marker/needle.js +2 -3
  193. package/map-marker/pin-head.js +3 -4
  194. package/menu/index.js +2 -3
  195. package/menu/maybe-child-menu.js +2 -3
  196. package/menu/menu.js +3 -4
  197. package/menu/nested-menus.js +3 -4
  198. package/menu/option-list.js +3 -4
  199. package/menu/option-profile.js +3 -4
  200. package/menu/stateful-container.js +4 -5
  201. package/menu/stateful-menu.js +3 -4
  202. package/menu/styled-components.js +1 -2
  203. package/message-card/index.js +1 -1
  204. package/message-card/message-card.js +3 -4
  205. package/mobile-header/index.js +1 -1
  206. package/mobile-header/mobile-header.js +2 -3
  207. package/modal/close-icon.js +1 -2
  208. package/modal/focus-once.js +1 -2
  209. package/modal/index.js +1 -1
  210. package/modal/modal-button.js +2 -3
  211. package/modal/modal.js +5 -6
  212. package/notification/index.js +1 -1
  213. package/notification/notification.js +4 -5
  214. package/package.json +4 -5
  215. package/page-control/index.js +1 -1
  216. package/page-control/page-control.js +2 -3
  217. package/pagination/index.js +1 -1
  218. package/pagination/pagination.js +5 -6
  219. package/pagination/stateful-container.js +3 -4
  220. package/pagination/stateful-pagination.js +3 -4
  221. package/payment-card/icons/amex.js +1 -2
  222. package/payment-card/icons/dinersclub.js +1 -2
  223. package/payment-card/icons/discover.js +1 -2
  224. package/payment-card/icons/elo.js +1 -2
  225. package/payment-card/icons/generic.js +1 -2
  226. package/payment-card/icons/jcb.js +1 -2
  227. package/payment-card/icons/maestro.js +1 -2
  228. package/payment-card/icons/mastercard.js +1 -2
  229. package/payment-card/icons/uatp.js +1 -2
  230. package/payment-card/icons/unionpay.js +1 -2
  231. package/payment-card/icons/visa.js +1 -2
  232. package/payment-card/index.js +1 -1
  233. package/payment-card/payment-card.js +5 -6
  234. package/payment-card/stateful-payment-card.js +2 -3
  235. package/payment-card/utils.js +1 -2
  236. package/phone-input/base-country-picker.js +3 -4
  237. package/phone-input/country-picker.js +2 -2
  238. package/phone-input/country-select-dropdown.js +3 -4
  239. package/phone-input/country-select.js +3 -4
  240. package/phone-input/flag.js +3 -4
  241. package/phone-input/flags/FlagAD.js +2 -3
  242. package/phone-input/flags/FlagAE.js +2 -3
  243. package/phone-input/flags/FlagAF.js +2 -3
  244. package/phone-input/flags/FlagAG.js +2 -3
  245. package/phone-input/flags/FlagAI.js +2 -3
  246. package/phone-input/flags/FlagAL.js +2 -3
  247. package/phone-input/flags/FlagAM.js +2 -3
  248. package/phone-input/flags/FlagAO.js +2 -3
  249. package/phone-input/flags/FlagAR.js +2 -3
  250. package/phone-input/flags/FlagAS.js +2 -3
  251. package/phone-input/flags/FlagAT.js +2 -3
  252. package/phone-input/flags/FlagAU.js +2 -3
  253. package/phone-input/flags/FlagAW.js +2 -3
  254. package/phone-input/flags/FlagAX.js +2 -3
  255. package/phone-input/flags/FlagAZ.js +2 -3
  256. package/phone-input/flags/FlagBA.js +2 -3
  257. package/phone-input/flags/FlagBB.js +2 -3
  258. package/phone-input/flags/FlagBD.js +2 -3
  259. package/phone-input/flags/FlagBE.js +2 -3
  260. package/phone-input/flags/FlagBF.js +2 -3
  261. package/phone-input/flags/FlagBG.js +2 -3
  262. package/phone-input/flags/FlagBH.js +2 -3
  263. package/phone-input/flags/FlagBI.js +2 -3
  264. package/phone-input/flags/FlagBJ.js +2 -3
  265. package/phone-input/flags/FlagBL.js +2 -3
  266. package/phone-input/flags/FlagBM.js +2 -3
  267. package/phone-input/flags/FlagBN.js +2 -3
  268. package/phone-input/flags/FlagBO.js +2 -3
  269. package/phone-input/flags/FlagBR.js +2 -3
  270. package/phone-input/flags/FlagBS.js +2 -3
  271. package/phone-input/flags/FlagBT.js +2 -3
  272. package/phone-input/flags/FlagBV.js +2 -3
  273. package/phone-input/flags/FlagBW.js +2 -3
  274. package/phone-input/flags/FlagBY.js +2 -3
  275. package/phone-input/flags/FlagBZ.js +2 -3
  276. package/phone-input/flags/FlagCA.js +2 -3
  277. package/phone-input/flags/FlagCC.js +2 -3
  278. package/phone-input/flags/FlagCD.js +2 -3
  279. package/phone-input/flags/FlagCF.js +2 -3
  280. package/phone-input/flags/FlagCG.js +2 -3
  281. package/phone-input/flags/FlagCH.js +2 -3
  282. package/phone-input/flags/FlagCI.js +2 -3
  283. package/phone-input/flags/FlagCK.js +2 -3
  284. package/phone-input/flags/FlagCL.js +2 -3
  285. package/phone-input/flags/FlagCM.js +2 -3
  286. package/phone-input/flags/FlagCN.js +2 -3
  287. package/phone-input/flags/FlagCO.js +2 -3
  288. package/phone-input/flags/FlagCR.js +2 -3
  289. package/phone-input/flags/FlagCU.js +2 -3
  290. package/phone-input/flags/FlagCV.js +2 -3
  291. package/phone-input/flags/FlagCW.js +2 -3
  292. package/phone-input/flags/FlagCX.js +2 -3
  293. package/phone-input/flags/FlagCY.js +2 -3
  294. package/phone-input/flags/FlagCZ.js +2 -3
  295. package/phone-input/flags/FlagDE.js +2 -3
  296. package/phone-input/flags/FlagDJ.js +2 -3
  297. package/phone-input/flags/FlagDK.js +2 -3
  298. package/phone-input/flags/FlagDM.js +2 -3
  299. package/phone-input/flags/FlagDO.js +2 -3
  300. package/phone-input/flags/FlagDZ.js +2 -3
  301. package/phone-input/flags/FlagEC.js +2 -3
  302. package/phone-input/flags/FlagEE.js +2 -3
  303. package/phone-input/flags/FlagEG.js +2 -3
  304. package/phone-input/flags/FlagER.js +2 -3
  305. package/phone-input/flags/FlagES.js +2 -3
  306. package/phone-input/flags/FlagET.js +2 -3
  307. package/phone-input/flags/FlagEU.js +2 -3
  308. package/phone-input/flags/FlagFI.js +2 -3
  309. package/phone-input/flags/FlagFJ.js +2 -3
  310. package/phone-input/flags/FlagFK.js +2 -3
  311. package/phone-input/flags/FlagFM.js +2 -3
  312. package/phone-input/flags/FlagFO.js +2 -3
  313. package/phone-input/flags/FlagFR.js +2 -3
  314. package/phone-input/flags/FlagGA.js +2 -3
  315. package/phone-input/flags/FlagGB.js +2 -3
  316. package/phone-input/flags/FlagGD.js +2 -3
  317. package/phone-input/flags/FlagGE.js +2 -3
  318. package/phone-input/flags/FlagGF.js +2 -3
  319. package/phone-input/flags/FlagGG.js +2 -3
  320. package/phone-input/flags/FlagGH.js +2 -3
  321. package/phone-input/flags/FlagGI.js +2 -3
  322. package/phone-input/flags/FlagGL.js +2 -3
  323. package/phone-input/flags/FlagGM.js +2 -3
  324. package/phone-input/flags/FlagGN.js +2 -3
  325. package/phone-input/flags/FlagGP.js +2 -3
  326. package/phone-input/flags/FlagGQ.js +2 -3
  327. package/phone-input/flags/FlagGR.js +2 -3
  328. package/phone-input/flags/FlagGS.js +2 -3
  329. package/phone-input/flags/FlagGT.js +2 -3
  330. package/phone-input/flags/FlagGU.js +2 -3
  331. package/phone-input/flags/FlagGW.js +2 -3
  332. package/phone-input/flags/FlagGY.js +2 -3
  333. package/phone-input/flags/FlagHK.js +2 -3
  334. package/phone-input/flags/FlagHM.js +2 -3
  335. package/phone-input/flags/FlagHN.js +2 -3
  336. package/phone-input/flags/FlagHR.js +2 -3
  337. package/phone-input/flags/FlagHT.js +2 -3
  338. package/phone-input/flags/FlagHU.js +2 -3
  339. package/phone-input/flags/FlagID.js +2 -3
  340. package/phone-input/flags/FlagIE.js +2 -3
  341. package/phone-input/flags/FlagIL.js +2 -3
  342. package/phone-input/flags/FlagIM.js +2 -3
  343. package/phone-input/flags/FlagIN.js +2 -3
  344. package/phone-input/flags/FlagIO.js +2 -3
  345. package/phone-input/flags/FlagIQ.js +2 -3
  346. package/phone-input/flags/FlagIR.js +2 -3
  347. package/phone-input/flags/FlagIS.js +2 -3
  348. package/phone-input/flags/FlagIT.js +2 -3
  349. package/phone-input/flags/FlagJE.js +2 -3
  350. package/phone-input/flags/FlagJM.js +2 -3
  351. package/phone-input/flags/FlagJO.js +2 -3
  352. package/phone-input/flags/FlagJP.js +2 -3
  353. package/phone-input/flags/FlagKE.js +2 -3
  354. package/phone-input/flags/FlagKG.js +2 -3
  355. package/phone-input/flags/FlagKH.js +2 -3
  356. package/phone-input/flags/FlagKI.js +2 -3
  357. package/phone-input/flags/FlagKM.js +2 -3
  358. package/phone-input/flags/FlagKN.js +2 -3
  359. package/phone-input/flags/FlagKP.js +2 -3
  360. package/phone-input/flags/FlagKR.js +2 -3
  361. package/phone-input/flags/FlagKW.js +2 -3
  362. package/phone-input/flags/FlagKY.js +2 -3
  363. package/phone-input/flags/FlagKZ.js +2 -3
  364. package/phone-input/flags/FlagLA.js +2 -3
  365. package/phone-input/flags/FlagLB.js +2 -3
  366. package/phone-input/flags/FlagLC.js +2 -3
  367. package/phone-input/flags/FlagLI.js +2 -3
  368. package/phone-input/flags/FlagLK.js +2 -3
  369. package/phone-input/flags/FlagLR.js +2 -3
  370. package/phone-input/flags/FlagLS.js +2 -3
  371. package/phone-input/flags/FlagLT.js +2 -3
  372. package/phone-input/flags/FlagLU.js +2 -3
  373. package/phone-input/flags/FlagLV.js +2 -3
  374. package/phone-input/flags/FlagLY.js +2 -3
  375. package/phone-input/flags/FlagMA.js +2 -3
  376. package/phone-input/flags/FlagMC.js +2 -3
  377. package/phone-input/flags/FlagMD.js +2 -3
  378. package/phone-input/flags/FlagME.js +2 -3
  379. package/phone-input/flags/FlagMF.js +2 -3
  380. package/phone-input/flags/FlagMG.js +2 -3
  381. package/phone-input/flags/FlagMH.js +2 -3
  382. package/phone-input/flags/FlagMK.js +2 -3
  383. package/phone-input/flags/FlagML.js +2 -3
  384. package/phone-input/flags/FlagMM.js +2 -3
  385. package/phone-input/flags/FlagMN.js +2 -3
  386. package/phone-input/flags/FlagMO.js +2 -3
  387. package/phone-input/flags/FlagMP.js +2 -3
  388. package/phone-input/flags/FlagMQ.js +2 -3
  389. package/phone-input/flags/FlagMR.js +2 -3
  390. package/phone-input/flags/FlagMS.js +2 -3
  391. package/phone-input/flags/FlagMT.js +2 -3
  392. package/phone-input/flags/FlagMU.js +2 -3
  393. package/phone-input/flags/FlagMV.js +2 -3
  394. package/phone-input/flags/FlagMW.js +2 -3
  395. package/phone-input/flags/FlagMX.js +2 -3
  396. package/phone-input/flags/FlagMY.js +2 -3
  397. package/phone-input/flags/FlagMZ.js +2 -3
  398. package/phone-input/flags/FlagNA.js +2 -3
  399. package/phone-input/flags/FlagNC.js +2 -3
  400. package/phone-input/flags/FlagNE.js +2 -3
  401. package/phone-input/flags/FlagNF.js +2 -3
  402. package/phone-input/flags/FlagNG.js +2 -3
  403. package/phone-input/flags/FlagNI.js +2 -3
  404. package/phone-input/flags/FlagNL.js +2 -3
  405. package/phone-input/flags/FlagNO.js +2 -3
  406. package/phone-input/flags/FlagNP.js +2 -3
  407. package/phone-input/flags/FlagNR.js +2 -3
  408. package/phone-input/flags/FlagNU.js +2 -3
  409. package/phone-input/flags/FlagNZ.js +2 -3
  410. package/phone-input/flags/FlagOM.js +2 -3
  411. package/phone-input/flags/FlagPA.js +2 -3
  412. package/phone-input/flags/FlagPE.js +2 -3
  413. package/phone-input/flags/FlagPF.js +2 -3
  414. package/phone-input/flags/FlagPG.js +2 -3
  415. package/phone-input/flags/FlagPH.js +2 -3
  416. package/phone-input/flags/FlagPK.js +2 -3
  417. package/phone-input/flags/FlagPL.js +2 -3
  418. package/phone-input/flags/FlagPM.js +2 -3
  419. package/phone-input/flags/FlagPN.js +2 -3
  420. package/phone-input/flags/FlagPR.js +2 -3
  421. package/phone-input/flags/FlagPS.js +2 -3
  422. package/phone-input/flags/FlagPT.js +2 -3
  423. package/phone-input/flags/FlagPW.js +2 -3
  424. package/phone-input/flags/FlagPY.js +2 -3
  425. package/phone-input/flags/FlagQA.js +2 -3
  426. package/phone-input/flags/FlagRE.js +2 -3
  427. package/phone-input/flags/FlagRO.js +2 -3
  428. package/phone-input/flags/FlagRS.js +2 -3
  429. package/phone-input/flags/FlagRU.js +2 -3
  430. package/phone-input/flags/FlagRW.js +2 -3
  431. package/phone-input/flags/FlagSA.js +2 -3
  432. package/phone-input/flags/FlagSB.js +2 -3
  433. package/phone-input/flags/FlagSC.js +2 -3
  434. package/phone-input/flags/FlagSD.js +2 -3
  435. package/phone-input/flags/FlagSE.js +2 -3
  436. package/phone-input/flags/FlagSG.js +2 -3
  437. package/phone-input/flags/FlagSH.js +2 -3
  438. package/phone-input/flags/FlagSI.js +2 -3
  439. package/phone-input/flags/FlagSJ.js +2 -3
  440. package/phone-input/flags/FlagSK.js +2 -3
  441. package/phone-input/flags/FlagSL.js +2 -3
  442. package/phone-input/flags/FlagSM.js +2 -3
  443. package/phone-input/flags/FlagSN.js +2 -3
  444. package/phone-input/flags/FlagSO.js +2 -3
  445. package/phone-input/flags/FlagSR.js +2 -3
  446. package/phone-input/flags/FlagSS.js +2 -3
  447. package/phone-input/flags/FlagST.js +2 -3
  448. package/phone-input/flags/FlagSV.js +2 -3
  449. package/phone-input/flags/FlagSX.js +2 -3
  450. package/phone-input/flags/FlagSY.js +2 -3
  451. package/phone-input/flags/FlagSZ.js +2 -3
  452. package/phone-input/flags/FlagTC.js +2 -3
  453. package/phone-input/flags/FlagTD.js +2 -3
  454. package/phone-input/flags/FlagTF.js +2 -3
  455. package/phone-input/flags/FlagTG.js +2 -3
  456. package/phone-input/flags/FlagTH.js +2 -3
  457. package/phone-input/flags/FlagTJ.js +2 -3
  458. package/phone-input/flags/FlagTK.js +2 -3
  459. package/phone-input/flags/FlagTL.js +2 -3
  460. package/phone-input/flags/FlagTM.js +2 -3
  461. package/phone-input/flags/FlagTN.js +2 -3
  462. package/phone-input/flags/FlagTO.js +2 -3
  463. package/phone-input/flags/FlagTR.js +2 -3
  464. package/phone-input/flags/FlagTT.js +2 -3
  465. package/phone-input/flags/FlagTV.js +2 -3
  466. package/phone-input/flags/FlagTW.js +2 -3
  467. package/phone-input/flags/FlagTZ.js +2 -3
  468. package/phone-input/flags/FlagUA.js +2 -3
  469. package/phone-input/flags/FlagUG.js +2 -3
  470. package/phone-input/flags/FlagUM.js +2 -3
  471. package/phone-input/flags/FlagUS.js +2 -3
  472. package/phone-input/flags/FlagUY.js +2 -3
  473. package/phone-input/flags/FlagUZ.js +2 -3
  474. package/phone-input/flags/FlagVA.js +2 -3
  475. package/phone-input/flags/FlagVC.js +2 -3
  476. package/phone-input/flags/FlagVE.js +2 -3
  477. package/phone-input/flags/FlagVG.js +2 -3
  478. package/phone-input/flags/FlagVI.js +2 -3
  479. package/phone-input/flags/FlagVN.js +2 -3
  480. package/phone-input/flags/FlagVU.js +2 -3
  481. package/phone-input/flags/FlagWF.js +2 -3
  482. package/phone-input/flags/FlagWS.js +2 -3
  483. package/phone-input/flags/FlagXK.js +2 -3
  484. package/phone-input/flags/FlagYE.js +2 -3
  485. package/phone-input/flags/FlagYT.js +2 -3
  486. package/phone-input/flags/FlagZA.js +2 -3
  487. package/phone-input/flags/FlagZM.js +2 -3
  488. package/phone-input/flags/FlagZW.js +2 -3
  489. package/phone-input/flags/index.js +1 -1
  490. package/phone-input/index.js +2 -3
  491. package/phone-input/phone-input-lite.js +3 -4
  492. package/phone-input/phone-input-next.js +3 -4
  493. package/phone-input/phone-input.js +2 -2
  494. package/phone-input/stateful-phone-input-container.js +3 -3
  495. package/phone-input/stateful-phone-input-next.js +1 -1
  496. package/phone-input/stateful-phone-input.js +1 -1
  497. package/phone-input/styled-components.js +2 -3
  498. package/pin-code/index.js +1 -1
  499. package/pin-code/pin-code.js +4 -4
  500. package/pin-code/stateful-pin-code-container.js +3 -3
  501. package/pin-code/stateful-pin-code.js +1 -1
  502. package/popover/index.js +1 -1
  503. package/popover/popover.js +7 -8
  504. package/popover/stateful-container.js +3 -4
  505. package/popover/stateful-popover.js +2 -3
  506. package/progress-bar/constants.d.ts +7 -0
  507. package/progress-bar/constants.js +8 -1
  508. package/progress-bar/index.d.ts +1 -1
  509. package/progress-bar/index.js +8 -1
  510. package/progress-bar/progressbar-rounded.d.ts +1 -1
  511. package/progress-bar/progressbar-rounded.js +12 -6
  512. package/progress-bar/progressbar.js +25 -34
  513. package/progress-bar/styled-components.d.ts +1 -0
  514. package/progress-bar/styled-components.js +44 -20
  515. package/progress-bar/types.d.ts +14 -2
  516. package/progress-steps/index.js +1 -1
  517. package/progress-steps/numbered-step.js +3 -4
  518. package/progress-steps/progress-steps.js +2 -3
  519. package/progress-steps/step.js +2 -3
  520. package/radio/index.js +1 -1
  521. package/radio/radio.js +4 -5
  522. package/radio/radiogroup.js +4 -5
  523. package/radio/stateful-radiogroup-container.js +3 -4
  524. package/radio/stateful-radiogroup.js +2 -3
  525. package/radio-v2/constants.d.ts +13 -0
  526. package/radio-v2/constants.js +25 -0
  527. package/radio-v2/index.d.ts +8 -0
  528. package/radio-v2/index.js +139 -0
  529. package/radio-v2/radio-context.d.ts +23 -0
  530. package/radio-v2/radio-context.js +20 -0
  531. package/radio-v2/radio.d.ts +4 -0
  532. package/radio-v2/radio.js +184 -0
  533. package/radio-v2/radiogroup.d.ts +4 -0
  534. package/radio-v2/radiogroup.js +106 -0
  535. package/radio-v2/stateful-radiogroup-container.d.ts +4 -0
  536. package/radio-v2/stateful-radiogroup-container.js +59 -0
  537. package/radio-v2/stateful-radiogroup.d.ts +4 -0
  538. package/radio-v2/stateful-radiogroup.js +26 -0
  539. package/radio-v2/styled-components.d.ts +10 -0
  540. package/radio-v2/styled-components.js +266 -0
  541. package/radio-v2/types.d.ts +185 -0
  542. package/radio-v2/types.js +1 -0
  543. package/rating/emoticon-rating.js +4 -5
  544. package/rating/index.js +1 -1
  545. package/rating/star-rating.js +4 -5
  546. package/segmented-control/segmented-control.js +2 -3
  547. package/segmented-control/stateful-segmented-control.js +2 -3
  548. package/select/autosize-input.js +4 -5
  549. package/select/default-props.js +1 -1
  550. package/select/dropdown.js +4 -5
  551. package/select/index.js +1 -1
  552. package/select/multi-select.js +3 -4
  553. package/select/multi-value.js +2 -3
  554. package/select/select-component.js +5 -6
  555. package/select/select.js +3 -4
  556. package/select/single-select.js +3 -4
  557. package/select/stateful-select-container.js +3 -4
  558. package/select/stateful-select.js +2 -3
  559. package/select/value.js +2 -3
  560. package/sheet/action-button.js +2 -3
  561. package/sheet/index.js +1 -1
  562. package/sheet/sheet.js +2 -3
  563. package/side-navigation/index.js +1 -1
  564. package/side-navigation/nav-item.js +4 -5
  565. package/side-navigation/nav.js +5 -6
  566. package/side-navigation/side-navigation-next.js +4 -5
  567. package/side-navigation/stateful-container.js +3 -4
  568. package/side-navigation/stateful-nav.js +2 -3
  569. package/side-navigation/styled-components.js +1 -2
  570. package/skeleton/index.js +1 -1
  571. package/skeleton/skeleton.js +4 -5
  572. package/slider/index.js +1 -1
  573. package/slider/slider.js +2 -3
  574. package/slider/stateful-slider-container.js +3 -4
  575. package/slider/stateful-slider.js +2 -3
  576. package/sliding-button/constants.d.ts +7 -0
  577. package/sliding-button/constants.js +25 -0
  578. package/sliding-button/default-props.d.ts +6 -0
  579. package/sliding-button/default-props.js +20 -0
  580. package/sliding-button/index.d.ts +4 -0
  581. package/sliding-button/index.js +93 -0
  582. package/sliding-button/sliding-button.d.ts +4 -0
  583. package/sliding-button/sliding-button.js +202 -0
  584. package/sliding-button/styled-components.d.ts +9 -0
  585. package/sliding-button/styled-components.js +211 -0
  586. package/sliding-button/types.d.ts +41 -0
  587. package/sliding-button/types.js +1 -0
  588. package/snackbar/index.js +2 -3
  589. package/snackbar/snackbar-context.js +3 -4
  590. package/snackbar/snackbar-element.js +2 -3
  591. package/spinner/index.js +2 -2
  592. package/stepper/index.js +1 -1
  593. package/stepper/stepper.js +2 -3
  594. package/styles/__mocks__/styled.js +5 -6
  595. package/styles/as-primary-export-hoc.js +1 -2
  596. package/styles/index.js +1 -2
  597. package/styles/styled.js +2 -3
  598. package/styles/theme-provider.js +1 -2
  599. package/switch/index.js +1 -1
  600. package/switch/stateful-switch-container.js +1 -2
  601. package/switch/stateful-switch.js +2 -3
  602. package/switch/switch.js +2 -3
  603. package/system-banner/system-banner.js +2 -3
  604. package/table/filter.js +3 -4
  605. package/table/index.js +2 -3
  606. package/table/sortable-head-cell.js +3 -4
  607. package/table/styled-components.js +2 -3
  608. package/table/table.js +3 -4
  609. package/table-grid/styled-components.js +2 -3
  610. package/table-semantic/index.js +1 -1
  611. package/table-semantic/styled-components.js +1 -1
  612. package/table-semantic/table-builder-column.js +1 -2
  613. package/table-semantic/table-builder.js +5 -6
  614. package/table-semantic/table.js +4 -5
  615. package/tabs/index.js +1 -1
  616. package/tabs/stateful-tabs.js +5 -6
  617. package/tabs/tab.js +4 -5
  618. package/tabs/tabs.js +4 -5
  619. package/tabs-motion/stateful-tabs.js +2 -3
  620. package/tabs-motion/tabs.js +2 -3
  621. package/tag/index.js +1 -1
  622. package/tag/styled-components.js +2 -3
  623. package/tag/tag.js +3 -4
  624. package/tag/utils.js +1 -2
  625. package/tag-group/index.js +1 -1
  626. package/tag-group/tag-group.js +2 -3
  627. package/textarea/index.js +1 -1
  628. package/textarea/stateful-textarea.js +2 -3
  629. package/textarea/textarea.js +4 -5
  630. package/themes/dark-theme/borders.js +1 -1
  631. package/themes/dark-theme/color-component-tokens.js +1 -1
  632. package/themes/dark-theme/color-semantic-tokens.js +1 -1
  633. package/themes/dark-theme/create-dark-theme.js +1 -1
  634. package/themes/dark-theme/dark-theme.js +1 -1
  635. package/themes/dark-theme/primitives.js +1 -1
  636. package/themes/index.js +1 -1
  637. package/themes/light-theme/color-component-tokens.js +1 -1
  638. package/themes/light-theme/color-semantic-tokens.js +1 -1
  639. package/themes/light-theme/create-light-theme.js +1 -1
  640. package/themes/light-theme/light-theme.js +1 -1
  641. package/themes/light-theme/primitives.js +1 -1
  642. package/themes/move-theme/dark-theme-with-move.js +1 -1
  643. package/themes/move-theme/light-theme-with-move.js +1 -1
  644. package/themes/shared/media-query.js +1 -1
  645. package/tile/index.js +1 -1
  646. package/tile/tile-group.js +2 -3
  647. package/tile/tile.js +2 -3
  648. package/timepicker/index.js +1 -1
  649. package/timepicker/timepicker.js +21 -8
  650. package/timezonepicker/index.js +1 -1
  651. package/timezonepicker/timezone-picker.js +4 -5
  652. package/toast/index.js +2 -3
  653. package/toast/toast.js +5 -6
  654. package/toast/toaster.js +5 -6
  655. package/tokens/index.js +1 -2
  656. package/tooltip/index.js +1 -1
  657. package/tooltip/stateful-tooltip-container.js +4 -5
  658. package/tooltip/stateful-tooltip.js +2 -3
  659. package/tooltip/tooltip.js +5 -6
  660. package/tree-view/index.js +1 -1
  661. package/tree-view/stateful-container.js +3 -4
  662. package/tree-view/stateful-tree-view.js +2 -3
  663. package/tree-view/tree-label-interactable.js +2 -2
  664. package/tree-view/tree-label.js +2 -2
  665. package/tree-view/tree-node.js +5 -6
  666. package/tree-view/tree-view.js +3 -4
  667. package/typography/index.js +2 -3
  668. package/utils/deep-merge.js +1 -1
  669. package/utils/deprecated-component.js +2 -3
@@ -7,9 +7,9 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _constants = require("./constants");
9
9
  var _defaultProps = _interopRequireDefault(require("./default-props"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
13
13
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
14
14
  Copyright (c) Uber Technologies, Inc.
15
15
 
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _statefulPhoneInputContainer = _interopRequireDefault(require("./stateful-phone-input-container"));
9
9
  var _phoneInputNext = _interopRequireDefault(require("./phone-input-next"));
10
10
  var _defaultProps = _interopRequireDefault(require("./default-props"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /*
13
13
  Copyright (c) Uber Technologies, Inc.
14
14
 
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _statefulPhoneInputContainer = _interopRequireDefault(require("./stateful-phone-input-container"));
9
9
  var _phoneInput = _interopRequireDefault(require("./phone-input"));
10
10
  var _defaultProps = _interopRequireDefault(require("./default-props"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /*
13
13
  Copyright (c) Uber Technologies, Inc.
14
14
 
@@ -10,9 +10,8 @@ var _styles = require("../styles");
10
10
  var _menu = require("../menu");
11
11
  var _select = require("../select");
12
12
  var _defaultProps = _interopRequireDefault(require("../select/default-props"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
15
  /*
17
16
  Copyright (c) Uber Technologies, Inc.
18
17
 
package/pin-code/index.js CHANGED
@@ -49,4 +49,4 @@ Object.keys(_types).forEach(function (key) {
49
49
  }
50
50
  });
51
51
  });
52
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
52
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -10,10 +10,10 @@ var _defaultProps = _interopRequireDefault(require("./default-props"));
10
10
  var _styledComponents = require("./styled-components");
11
11
  var _overrides = require("../helpers/overrides");
12
12
  var _input = require("../input");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- 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); }
15
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
15
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
18
18
  Copyright (c) Uber Technologies, Inc.
19
19
 
@@ -7,9 +7,9 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _defaultProps = _interopRequireDefault(require("./default-props"));
9
9
  var _input = require("../input");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
13
13
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
14
14
  Copyright (c) Uber Technologies, Inc.
15
15
 
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _defaultProps = _interopRequireDefault(require("./default-props"));
9
9
  var _pinCode = _interopRequireDefault(require("./pin-code"));
10
10
  var _statefulPinCodeContainer = _interopRequireDefault(require("./stateful-pin-code-container"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /*
13
13
  Copyright (c) Uber Technologies, Inc.
14
14
 
package/popover/index.js CHANGED
@@ -113,4 +113,4 @@ Object.keys(_types).forEach(function (key) {
113
113
  }
114
114
  });
115
115
  });
116
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
116
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -13,12 +13,11 @@ var _styledComponents = require("./styled-components");
13
13
  var _utils = require("./utils");
14
14
  var _defaultProps = _interopRequireDefault(require("./default-props"));
15
15
  var _reactUid = require("react-uid");
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
- 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); }
20
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
19
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
22
21
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
23
22
  Copyright (c) Uber Technologies, Inc.
24
23
 
@@ -392,7 +391,7 @@ class PopoverInner extends React.Component {
392
391
  // Only render popover on the browser (portals aren't supported server-side)
393
392
  if (renderedContent) {
394
393
  if (mountedAndOpen) {
395
- rendered.push( /*#__PURE__*/React.createElement(_layer.Layer, {
394
+ rendered.push(/*#__PURE__*/React.createElement(_layer.Layer, {
396
395
  key: "new-layer",
397
396
  mountNode: this.props.mountNode,
398
397
  onEscape: this.props.onEsc,
@@ -432,7 +431,7 @@ class PopoverInner extends React.Component {
432
431
  disabled: !this.props.autoFocus || !this.state.autoFocusAfterPositioning
433
432
  }, this.renderPopover(renderedContent)))));
434
433
  } else {
435
- rendered.push( /*#__PURE__*/React.createElement(_styledComponents.Hidden, {
434
+ rendered.push(/*#__PURE__*/React.createElement(_styledComponents.Hidden, {
436
435
  key: "hidden-layer"
437
436
  }, renderedContent));
438
437
  }
@@ -7,10 +7,9 @@ exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _constants = require("./constants");
9
9
  var _focusVisible = require("../utils/focusVisible");
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
13
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
15
14
  Copyright (c) Uber Technologies, Inc.
16
15
 
@@ -8,9 +8,8 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _constants = require("./constants");
9
9
  var _statefulContainer = _interopRequireDefault(require("./stateful-container"));
10
10
  var _popover = _interopRequireDefault(require("./popover"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
13
  /*
15
14
  Copyright (c) Uber Technologies, Inc.
16
15
 
@@ -3,3 +3,10 @@ export declare const SIZE: {
3
3
  readonly medium: "medium";
4
4
  readonly large: "large";
5
5
  };
6
+ export declare const INTENT: {
7
+ readonly default: "default";
8
+ readonly positive: "positive";
9
+ readonly warning: "warning";
10
+ readonly negative: "negative";
11
+ readonly brand: "brand";
12
+ };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SIZE = void 0;
6
+ exports.SIZE = exports.INTENT = void 0;
7
7
  /*
8
8
  Copyright (c) Uber Technologies, Inc.
9
9
 
@@ -14,4 +14,11 @@ const SIZE = exports.SIZE = {
14
14
  small: 'small',
15
15
  medium: 'medium',
16
16
  large: 'large'
17
+ };
18
+ const INTENT = exports.INTENT = {
19
+ default: 'default',
20
+ positive: 'positive',
21
+ warning: 'warning',
22
+ negative: 'negative',
23
+ brand: 'brand'
17
24
  };
@@ -1,5 +1,5 @@
1
1
  export { default as ProgressBar } from './progressbar';
2
2
  export { default as ProgressBarRounded } from './progressbar-rounded';
3
- export { SIZE } from './constants';
3
+ export { SIZE, INTENT } from './constants';
4
4
  export { StyledRoot, StyledBarContainer, StyledBar, StyledBarProgress, StyledInfiniteBar, StyledLabel, StyledProgressBarRoundedRoot, StyledProgressBarRoundedSvg, StyledProgressBarRoundedTrackBackground, StyledProgressBarRoundedTrackForeground, StyledProgressBarRoundedText, } from './styled-components';
5
5
  export * from './types';
@@ -7,6 +7,7 @@ var _exportNames = {
7
7
  ProgressBar: true,
8
8
  ProgressBarRounded: true,
9
9
  SIZE: true,
10
+ INTENT: true,
10
11
  StyledRoot: true,
11
12
  StyledBarContainer: true,
12
13
  StyledBar: true,
@@ -19,6 +20,12 @@ var _exportNames = {
19
20
  StyledProgressBarRoundedTrackForeground: true,
20
21
  StyledProgressBarRoundedText: true
21
22
  };
23
+ Object.defineProperty(exports, "INTENT", {
24
+ enumerable: true,
25
+ get: function () {
26
+ return _constants.INTENT;
27
+ }
28
+ });
22
29
  Object.defineProperty(exports, "ProgressBar", {
23
30
  enumerable: true,
24
31
  get: function () {
@@ -119,4 +126,4 @@ Object.keys(_types).forEach(function (key) {
119
126
  }
120
127
  });
121
128
  });
122
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
129
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import type { ProgressBarRoundedProps } from './types';
3
- declare function ProgressBarRounded({ progress, size, animate, inline, overrides, ...restProps }: ProgressBarRoundedProps): React.JSX.Element;
3
+ declare function ProgressBarRounded({ progress, size, animate, inline, overrides, ariaLabel, ...restProps }: ProgressBarRoundedProps): React.JSX.Element;
4
4
  export default ProgressBarRounded;
@@ -8,9 +8,8 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _constants = require("./constants");
9
9
  var _styledComponents = require("./styled-components");
10
10
  var _overrides = require("../helpers/overrides");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- 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); } /*
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /*
14
13
  Copyright (c) Uber Technologies, Inc.
15
14
 
16
15
  This source code is licensed under the MIT license found in the
@@ -40,6 +39,7 @@ function ProgressBarRounded({
40
39
  animate = true,
41
40
  inline = false,
42
41
  overrides = {},
42
+ ariaLabel,
43
43
  ...restProps
44
44
  }) {
45
45
  const {
@@ -92,12 +92,17 @@ function ProgressBarRounded({
92
92
  loop();
93
93
  }, [progress]); // We want *only* `progress` to trigger this effect
94
94
 
95
+ const propsAriaLabel = restProps['aria-label'] || ariaLabel;
96
+ const progressPercentage = `${roundTo(Math.min(progress * 100, 100))}%`;
97
+ const defaultAriaLabel = propsAriaLabel || `${progressPercentage} complete`;
95
98
  return /*#__PURE__*/React.createElement(Root, _extends({
96
99
  "data-baseweb": "progressbar-rounded",
97
100
  role: "progressbar",
98
- "aria-valuenow": progress.toFixed(2).replace(/\.?0+$/, ''),
101
+ "aria-label": defaultAriaLabel,
102
+ "aria-valuenow": progress,
99
103
  "aria-valuemin": 0,
100
104
  "aria-valuemax": 1,
105
+ "aria-live": "polite",
101
106
  $size: size,
102
107
  $inline: inline
103
108
  }, restProps, rootProps), /*#__PURE__*/React.createElement(Svg, _extends({
@@ -111,7 +116,8 @@ function ProgressBarRounded({
111
116
  $pathLength: pathLength,
112
117
  $pathProgress: pathProgress
113
118
  }, trackForegroundProps))), /*#__PURE__*/React.createElement(Text, _extends({
114
- $size: size
115
- }, textProps), roundTo(Math.min(progress * 100, 100)), "%"));
119
+ $size: size,
120
+ children: progressPercentage
121
+ }, textProps)));
116
122
  }
117
123
  var _default = exports.default = ProgressBarRounded;
@@ -8,11 +8,10 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _overrides = require("../helpers/overrides");
9
9
  var _constants = require("./constants");
10
10
  var _styledComponents = require("./styled-components");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- 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); }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
15
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
17
16
  Copyright (c) Uber Technologies, Inc.
18
17
 
@@ -20,14 +19,6 @@ This source code is licensed under the MIT license found in the
20
19
  LICENSE file in the root directory of this source tree.
21
20
  */
22
21
  class ProgressBar extends React.Component {
23
- componentDidMount() {
24
- // TODO(v11): remove warning when switching default Spinner
25
- if (process.env.NODE_ENV !== "production") {
26
- if (this.props.errorMessage) {
27
- console.warn('baseui:ProgressBar The `errorMessage` prop is deprecated in WAI-ARIA v1.2.');
28
- }
29
- }
30
- }
31
22
  render() {
32
23
  const {
33
24
  overrides = {},
@@ -40,7 +31,9 @@ class ProgressBar extends React.Component {
40
31
  maxValue,
41
32
  showLabel,
42
33
  infinite,
34
+ intent,
43
35
  errorMessage,
36
+ // Deprecated, ignored
44
37
  forwardedRef,
45
38
  ...restProps
46
39
  } = this.props;
@@ -58,6 +51,7 @@ class ProgressBar extends React.Component {
58
51
  const [InfiniteBar, infiniteBarProps] = (0, _overrides.getOverrides)(overrides.InfiniteBar, _styledComponents.StyledInfiniteBar);
59
52
  const sharedProps = {
60
53
  $infinite: infinite,
54
+ $intent: intent,
61
55
  $size: size,
62
56
  $steps: steps,
63
57
  $successValue: maximumValue,
@@ -82,27 +76,24 @@ class ProgressBar extends React.Component {
82
76
  function getStepProgressLabel(value, maxValue, minValue, steps) {
83
77
  return `Step ${Math.ceil((value - minValue) / (maxValue - minValue) * steps)} of ${steps}`;
84
78
  }
85
- return (
86
- /*#__PURE__*/
87
- /* eslint-disable jsx-a11y/role-supports-aria-props */
88
- React.createElement(Root, _extends({
89
- ref: forwardedRef,
90
- "data-baseweb": "progress-bar",
91
- role: "progressbar",
92
- "aria-label": ariaLabel,
93
- "aria-valuenow": infinite ? null : value,
94
- "aria-valuemin": infinite ? null : minValue,
95
- "aria-valuemax": infinite ? null : maximumValue,
96
- "aria-invalid": errorMessage ? true : null,
97
- "aria-errormessage": errorMessage
98
- }, restProps, sharedProps, rootProps), /*#__PURE__*/React.createElement(BarContainer, _extends({}, sharedProps, barContainerProps), infinite ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(InfiniteBar, _extends({
99
- $isLeft: true,
100
- $size: sharedProps.$size
101
- }, infiniteBarProps)), /*#__PURE__*/React.createElement(InfiniteBar, _extends({
102
- $size: sharedProps.$size
103
- }, infiniteBarProps))) : renderProgressBar()), showLabel && /*#__PURE__*/React.createElement(Label, _extends({}, sharedProps, labelProps), getProgressLabel(value, maximumValue, minValue)))
104
- );
105
- /* eslint-enable jsx-a11y/role-supports-aria-props */
79
+ return /*#__PURE__*/React.createElement(Root, _extends({
80
+ ref: forwardedRef,
81
+ "data-baseweb": "progress-bar",
82
+ role: "progressbar",
83
+ "aria-label": ariaLabel,
84
+ "aria-valuenow": infinite ? null : value,
85
+ "aria-valuemin": infinite ? null : minValue,
86
+ "aria-valuemax": infinite ? null : maximumValue,
87
+ "aria-live": "polite",
88
+ "aria-busy": infinite ? true : null
89
+ }, restProps, sharedProps, rootProps), /*#__PURE__*/React.createElement(BarContainer, _extends({}, sharedProps, barContainerProps), infinite ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(InfiniteBar, _extends({
90
+ $isLeft: true,
91
+ $size: sharedProps.$size,
92
+ $intent: sharedProps.$intent
93
+ }, infiniteBarProps)), /*#__PURE__*/React.createElement(InfiniteBar, _extends({
94
+ $size: sharedProps.$size,
95
+ $intent: sharedProps.$intent
96
+ }, infiniteBarProps))) : renderProgressBar()), showLabel && /*#__PURE__*/React.createElement(Label, _extends({}, sharedProps, labelProps), getProgressLabel(value, maximumValue, minValue)));
106
97
  }
107
98
  }
108
99
  _defineProperty(ProgressBar, "defaultProps", {
@@ -8,6 +8,7 @@ export declare const StyledBar: import("styletron-react").StyletronComponent<"di
8
8
  export declare const StyledBarProgress: import("styletron-react").StyletronComponent<"div", StyleProps>;
9
9
  export declare const StyledInfiniteBar: import("styletron-react").StyletronComponent<"div", {
10
10
  $isLeft?: boolean;
11
+ $intent?: StyleProps['$intent'];
11
12
  $size: Size;
12
13
  }>;
13
14
  export declare const StyledLabel: import("styletron-react").StyletronComponent<"div", StyleProps>;
@@ -7,8 +7,8 @@ exports.StyledRoot = exports.StyledProgressBarRoundedTrackForeground = exports.S
7
7
  var _styles = require("../styles");
8
8
  var _constants = require("./constants");
9
9
  var _react = _interopRequireDefault(require("react"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- 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
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /*
12
12
  Copyright (c) Uber Technologies, Inc.
13
13
 
14
14
  This source code is licensed under the MIT license found in the
@@ -23,28 +23,38 @@ function getBarHeight(size) {
23
23
  [_constants.SIZE.large]: '8px'
24
24
  }[size];
25
25
  }
26
+ function getProgressColor(colors, intent) {
27
+ // When intent is not provided, use the old default color for backward compatibility
28
+ if (!intent) {
29
+ return colors.backgroundAccent;
30
+ }
31
+ return {
32
+ [_constants.INTENT.default]: colors.contentAccent,
33
+ [_constants.INTENT.positive]: colors.contentPositive,
34
+ [_constants.INTENT.warning]: colors.contentWarning,
35
+ [_constants.INTENT.negative]: colors.contentNegative,
36
+ [_constants.INTENT.brand]: colors.brandBorderAccessible
37
+ }[intent];
38
+ }
26
39
 
27
40
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
41
  const StyledRoot = exports.StyledRoot = (0, _styles.styled)('div', props => {
42
+ const {
43
+ $theme
44
+ } = props;
29
45
  return {
30
- width: '100%'
46
+ width: '100%',
47
+ display: 'flex',
48
+ flexDirection: 'column',
49
+ gap: $theme.sizing.scale300
31
50
  };
32
51
  });
33
52
  StyledRoot.displayName = "StyledRoot";
34
53
  StyledRoot.displayName = 'StyledRoot';
35
- const StyledBarContainer = exports.StyledBarContainer = (0, _styles.styled)('div', props => {
36
- const {
37
- $theme
38
- } = props;
39
- const {
40
- sizing
41
- } = $theme;
54
+ const StyledBarContainer = exports.StyledBarContainer = (0, _styles.styled)('div', () => {
42
55
  return {
43
56
  display: 'flex',
44
- marginLeft: sizing.scale500,
45
- marginRight: sizing.scale500,
46
- marginTop: sizing.scale500,
47
- marginBottom: sizing.scale500
57
+ position: 'relative'
48
58
  };
49
59
  });
50
60
  StyledBarContainer.displayName = "StyledBarContainer";
@@ -89,7 +99,8 @@ const StyledBarProgress = exports.StyledBarProgress = (0, _styles.styled)('div',
89
99
  $steps,
90
100
  $index,
91
101
  $maxValue,
92
- $minValue = 0
102
+ $minValue = 0,
103
+ $intent
93
104
  } = props;
94
105
  // making sure this doesn't break existing use that use StyledBarProgress directly
95
106
  const maxValue = $maxValue ? $maxValue : $successValue;
@@ -150,7 +161,7 @@ const StyledBarProgress = exports.StyledBarProgress = (0, _styles.styled)('div',
150
161
  borderTopRightRadius: borderRadius,
151
162
  borderBottomRightRadius: borderRadius,
152
163
  borderBottomLeftRadius: borderRadius,
153
- backgroundColor: colors.backgroundAccent,
164
+ backgroundColor: getProgressColor(colors, $intent),
154
165
  height: '100%',
155
166
  width: '100%',
156
167
  transform: 'translateX(-102%)',
@@ -164,7 +175,8 @@ const StyledInfiniteBar = exports.StyledInfiniteBar = (0, _styles.styled)('div',
164
175
  const {
165
176
  $theme,
166
177
  $isLeft = false,
167
- $size = _constants.SIZE.medium
178
+ $size = _constants.SIZE.medium,
179
+ $intent
168
180
  } = props;
169
181
  const {
170
182
  colors,
@@ -173,6 +185,7 @@ const StyledInfiniteBar = exports.StyledInfiniteBar = (0, _styles.styled)('div',
173
185
  } = $theme;
174
186
  const borderRadius = borders.useRoundedCorners ? sizing.scale0 : 0;
175
187
  const height = getBarHeight($size);
188
+ const progressColor = getProgressColor(colors, $intent);
176
189
  const animationStyles = {
177
190
  display: 'inline-block',
178
191
  flex: 1,
@@ -185,7 +198,7 @@ const StyledInfiniteBar = exports.StyledInfiniteBar = (0, _styles.styled)('div',
185
198
  backgroundSize: '300% auto',
186
199
  backgroundRepeat: 'no-repeat',
187
200
  backgroundPositionX: $isLeft ? '-50%' : '150%',
188
- backgroundImage: `linear-gradient(${$isLeft ? '90' : '270'}deg, transparent 0%, ${colors.backgroundAccent} 25%, ${colors.backgroundAccent} 75%, transparent 100%)`,
201
+ backgroundImage: `linear-gradient(${$isLeft ? '90' : '270'}deg, transparent 0%, ${progressColor} 25%, ${progressColor} 75%, transparent 100%)`,
189
202
  animationName: $isLeft ? {
190
203
  '0%': {
191
204
  backgroundPositionX: '-50%'
@@ -229,10 +242,21 @@ const StyledInfiniteBar = exports.StyledInfiniteBar = (0, _styles.styled)('div',
229
242
  StyledInfiniteBar.displayName = "StyledInfiniteBar";
230
243
  StyledInfiniteBar.displayName = 'StyledInfiniteBar';
231
244
  const StyledLabel = exports.StyledLabel = (0, _styles.styled)('div', props => {
245
+ const {
246
+ $theme,
247
+ $size
248
+ } = props;
249
+ const typographyMap = {
250
+ [_constants.SIZE.small]: $theme.typography.LabelSmall,
251
+ [_constants.SIZE.medium]: $theme.typography.LabelMedium,
252
+ [_constants.SIZE.large]: $theme.typography.LabelLarge
253
+ };
232
254
  return {
233
255
  textAlign: 'center',
234
- ...props.$theme.typography.font150,
235
- color: props.$theme.colors.contentTertiary
256
+ paddingLeft: $theme.sizing.scale600,
257
+ paddingRight: $theme.sizing.scale600,
258
+ ...typographyMap[$size],
259
+ color: $theme.colors.contentPrimary
236
260
  };
237
261
  });
238
262
  StyledLabel.displayName = "StyledLabel";
@@ -1,7 +1,8 @@
1
1
  import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
- import type { SIZE } from './constants';
3
+ import type { SIZE, INTENT } from './constants';
4
4
  export type Size = keyof typeof SIZE;
5
+ export type Intent = keyof typeof INTENT;
5
6
  export type ProgressBarOverrides = {
6
7
  Root?: Override;
7
8
  BarContainer?: Override;
@@ -15,12 +16,19 @@ export type ProgressBarProps = {
15
16
  ariaLabel?: string;
16
17
  'aria-label'?: string;
17
18
  children?: React.ReactNode;
18
- /** Error message for screen-reader users**/
19
+ /**
20
+ * @deprecated This prop is deprecated and will be removed in a future version.
21
+ * Use proper error UI patterns instead (Banner, Alert, Toast) as aria-invalid and aria-errormessage
22
+ * are not semantically correct for progress bars per WAI-ARIA 1.2.
23
+ * This prop is ignored and has no effect.
24
+ */
19
25
  errorMessage?: string;
20
26
  /** The function that returns a progress bar label to display. */
21
27
  getProgressLabel: (value: number, maxValue: number, minValue: number) => React.ReactNode;
22
28
  /** If set to true, there’s and infinite loading animation. */
23
29
  infinite: boolean;
30
+ /** The visual intent/variant of the progress bar. */
31
+ intent?: Intent;
24
32
  overrides?: ProgressBarOverrides;
25
33
  /** If set to false, label is hidden and `getProgressLabel` is ignored. */
26
34
  showLabel: boolean;
@@ -40,6 +48,7 @@ export type ProgressBarProps = {
40
48
  export type StyleProps = {
41
49
  $infinite: boolean;
42
50
  $index: number;
51
+ $intent?: Intent;
43
52
  $size: Size;
44
53
  $steps: number;
45
54
  $successValue: number;
@@ -63,6 +72,9 @@ export type ProgressBarRoundedProps = {
63
72
  animate?: boolean;
64
73
  /** Toggle container rendering as a block or inline. */
65
74
  inline?: boolean;
75
+ /** The accessible label for the progress bar. Defaults to percentage if not provided. */
76
+ ariaLabel?: string;
77
+ 'aria-label'?: string;
66
78
  /** Overrides for sub-nodes in the rendering tree. */
67
79
  overrides?: ProgressBarRoundedOverrides;
68
80
  };
@@ -65,4 +65,4 @@ Object.keys(_types).forEach(function (key) {
65
65
  }
66
66
  });
67
67
  });
68
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
68
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }