baseui 16.1.1 → 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.
- package/a11y/a11y.js +2 -3
- package/a11y/index.js +1 -1
- package/accordion/accordion.js +4 -5
- package/accordion/index.js +1 -1
- package/accordion/panel.js +3 -4
- package/accordion/stateful-panel-container.js +3 -4
- package/accordion/stateful-panel.js +2 -3
- package/accordion/stateless-accordion.js +2 -3
- package/app-nav-bar/app-nav-bar.js +3 -4
- package/app-nav-bar/index.js +1 -1
- package/app-nav-bar/mobile-menu.js +3 -4
- package/app-nav-bar/user-menu.js +3 -4
- package/app-nav-bar/user-profile-tile.js +1 -2
- package/aspect-ratio-box/aspect-ratio-box-body.js +2 -3
- package/aspect-ratio-box/aspect-ratio-box.js +2 -3
- package/aspect-ratio-box/index.js +1 -1
- package/avatar/avatar.js +2 -3
- package/avatar/index.js +1 -1
- package/badge/badge.js +2 -3
- package/badge/hint-dot.js +2 -3
- package/badge/index.js +1 -1
- package/badge/notification-circle.js +2 -3
- package/badge/utils.js +1 -2
- package/banner/banner.js +2 -3
- package/block/block.js +2 -3
- package/block/index.js +1 -1
- package/bottom-navigation/bottom-navigation.js +2 -3
- package/bottom-navigation/index.js +1 -1
- package/bottom-navigation/panel.js +2 -3
- package/bottom-navigation/selector.js +2 -3
- package/breadcrumbs/breadcrumbs.js +3 -4
- package/breadcrumbs/index.js +1 -1
- package/button/button-internals.js +2 -3
- package/button/button.js +5 -6
- package/button/index.js +1 -1
- package/button-dock/button-dock.js +2 -3
- package/button-dock/index.js +1 -1
- package/button-group/button-group.js +4 -5
- package/button-group/index.js +1 -1
- package/button-group/stateful-button-group.js +3 -4
- package/button-group/stateful-container.js +3 -4
- package/button-timed/button-timed.js +2 -3
- package/button-timed/index.js +1 -1
- package/card/card.js +2 -3
- package/card/index.js +1 -2
- package/checkbox/checkbox.js +4 -5
- package/checkbox/index.js +1 -1
- package/checkbox/stateful-checkbox-container.js +3 -4
- package/checkbox/stateful-checkbox.js +2 -3
- package/checkbox-v2/checkbox.js +2 -3
- package/checkbox-v2/index.js +1 -1
- package/checkbox-v2/stateful-checkbox-container.js +1 -2
- package/checkbox-v2/stateful-checkbox.js +2 -3
- package/combobox/combobox.js +2 -3
- package/combobox/index.js +1 -1
- package/data-table/column-anchor.js +3 -4
- package/data-table/column-boolean.js +2 -3
- package/data-table/column-categorical.js +3 -4
- package/data-table/column-custom.js +1 -1
- package/data-table/column-datetime.js +3 -4
- package/data-table/column-numerical.js +3 -4
- package/data-table/column-row-index.js +2 -3
- package/data-table/column-string.js +3 -4
- package/data-table/column.js +1 -2
- package/data-table/data-table.js +2 -3
- package/data-table/filter-menu.js +1 -1
- package/data-table/filter-shell.js +1 -2
- package/data-table/header-cell.js +2 -3
- package/data-table/index.js +1 -1
- package/data-table/measure-column-widths.js +2 -3
- package/data-table/stateful-container.js +1 -2
- package/data-table/stateful-data-table.js +2 -3
- package/data-table/text-search.js +1 -1
- package/datepicker/calendar-header.js +5 -6
- package/datepicker/calendar.d.ts +4 -0
- package/datepicker/calendar.js +25 -10
- package/datepicker/datepicker.d.ts +1 -0
- package/datepicker/datepicker.js +18 -8
- package/datepicker/datepicker_DO_NOT_USE.js +5 -6
- package/datepicker/day.js +5 -6
- package/datepicker/index.js +1 -1
- package/datepicker/month.js +4 -5
- package/datepicker/stateful-calendar.js +5 -6
- package/datepicker/stateful-container.js +3 -4
- package/datepicker/stateful-datepicker.js +5 -6
- package/datepicker/styled-components.js +1 -1
- package/datepicker/utils/date-fns-adapter.js +1 -1
- package/datepicker/utils/date-helpers.js +2 -2
- package/datepicker/utils/index.js +1 -1
- package/datepicker/week.js +5 -6
- package/dialog/dialog.js +4 -5
- package/dialog/index.js +1 -1
- package/divider/index.js +2 -3
- package/dnd-list/index.js +1 -1
- package/dnd-list/list.js +5 -6
- package/dnd-list/stateful-list-container.js +3 -4
- package/dnd-list/stateful-list.js +2 -3
- package/drawer/close-icon.js +2 -3
- package/drawer/drawer.js +5 -6
- package/drawer/index.js +1 -1
- package/file-uploader/file-uploader.js +3 -4
- package/file-uploader/index.js +1 -1
- package/file-uploader-basic/file-uploader-basic.js +3 -4
- package/file-uploader-basic/index.js +1 -1
- package/flex-grid/flex-grid-item.js +2 -3
- package/flex-grid/flex-grid.js +2 -3
- package/flex-grid/index.js +1 -1
- package/form-control/form-control.js +4 -5
- package/form-control/index.js +1 -1
- package/header-navigation/header-navigation.js +4 -5
- package/header-navigation/index.js +1 -1
- package/heading/heading-level.js +1 -2
- package/heading/heading.js +2 -3
- package/heading/index.js +2 -3
- package/helper/helper-steps.js +2 -3
- package/helper/helper.js +2 -3
- package/helper/stateful-helper.js +1 -2
- package/helpers/base-provider.js +1 -2
- package/helpers/overrides.js +3 -4
- package/helpers/react-helpers.js +3 -4
- package/icon/alert.js +3 -4
- package/icon/arrow-down.js +3 -4
- package/icon/arrow-left.js +3 -4
- package/icon/arrow-right.js +3 -4
- package/icon/arrow-up.js +3 -4
- package/icon/blank.js +3 -4
- package/icon/calendar.js +3 -4
- package/icon/check-indeterminate.js +3 -4
- package/icon/check.js +3 -4
- package/icon/chevron-down-small.js +3 -4
- package/icon/chevron-down.js +3 -4
- package/icon/chevron-left-small.js +3 -4
- package/icon/chevron-left.js +3 -4
- package/icon/chevron-right-small.js +3 -4
- package/icon/chevron-right.js +3 -4
- package/icon/chevron-up-small.js +3 -4
- package/icon/chevron-up.js +3 -4
- package/icon/circle-check-filled.js +3 -4
- package/icon/circle-exclamation-point-filled.js +3 -4
- package/icon/delete-alt.js +3 -4
- package/icon/delete.js +3 -4
- package/icon/filter.js +3 -4
- package/icon/grab.js +3 -4
- package/icon/hide.js +3 -4
- package/icon/icon-exports.js +1 -1
- package/icon/icon.js +3 -4
- package/icon/index.js +1 -1
- package/icon/menu.js +3 -4
- package/icon/overflow.js +3 -4
- package/icon/paperclip-filled.js +3 -4
- package/icon/plus.js +3 -4
- package/icon/search.js +3 -4
- package/icon/show.js +3 -4
- package/icon/spinner.js +3 -4
- package/icon/trash-can-filled.js +3 -4
- package/icon/triangle-down.js +3 -4
- package/icon/triangle-left.js +3 -4
- package/icon/triangle-right.js +3 -4
- package/icon/triangle-up.js +3 -4
- package/icon/upload.js +3 -4
- package/index.js +1 -1
- package/input/base-input.js +5 -6
- package/input/index.js +1 -1
- package/input/input.js +5 -6
- package/input/masked-input.js +3 -4
- package/input/stateful-container.js +3 -4
- package/input/stateful-input.js +2 -3
- package/input/styled-components.js +1 -1
- package/layer/index.js +2 -3
- package/layer/layer.js +5 -6
- package/layer/layers-manager.js +4 -5
- package/layer/tether.js +4 -5
- package/layout-grid/cell.js +2 -2
- package/layout-grid/grid.js +2 -3
- package/layout-grid/index.js +1 -1
- package/link/index.js +2 -3
- package/list/index.js +1 -1
- package/list/list-heading.js +3 -4
- package/list/list-item-label.js +1 -1
- package/list/list-item.js +3 -3
- package/list/menu-adapter.js +2 -3
- package/locale/en_US.js +9 -9
- package/locale/index.js +2 -3
- package/map-marker/badge-enhancer.js +2 -3
- package/map-marker/drag-shadow.js +2 -3
- package/map-marker/fixed-marker.js +3 -4
- package/map-marker/floating-marker.js +3 -4
- package/map-marker/floating-route-marker.js +2 -3
- package/map-marker/index.js +1 -1
- package/map-marker/label-enhancer.js +2 -3
- package/map-marker/location-puck.js +2 -3
- package/map-marker/needle.js +2 -3
- package/map-marker/pin-head.js +3 -4
- package/menu/index.js +2 -3
- package/menu/maybe-child-menu.js +2 -3
- package/menu/menu.js +3 -4
- package/menu/nested-menus.js +3 -4
- package/menu/option-list.js +3 -4
- package/menu/option-profile.js +3 -4
- package/menu/stateful-container.js +4 -5
- package/menu/stateful-menu.js +3 -4
- package/menu/styled-components.js +1 -2
- package/message-card/index.js +1 -1
- package/message-card/message-card.js +3 -4
- package/mobile-header/index.js +1 -1
- package/mobile-header/mobile-header.js +2 -3
- package/modal/close-icon.js +1 -2
- package/modal/focus-once.js +1 -2
- package/modal/index.js +1 -1
- package/modal/modal-button.js +2 -3
- package/modal/modal.js +5 -6
- package/notification/index.js +1 -1
- package/notification/notification.js +4 -5
- package/package.json +3 -3
- package/page-control/index.js +1 -1
- package/page-control/page-control.js +2 -3
- package/pagination/index.js +1 -1
- package/pagination/pagination.js +5 -6
- package/pagination/stateful-container.js +3 -4
- package/pagination/stateful-pagination.js +3 -4
- package/payment-card/icons/amex.js +1 -2
- package/payment-card/icons/dinersclub.js +1 -2
- package/payment-card/icons/discover.js +1 -2
- package/payment-card/icons/elo.js +1 -2
- package/payment-card/icons/generic.js +1 -2
- package/payment-card/icons/jcb.js +1 -2
- package/payment-card/icons/maestro.js +1 -2
- package/payment-card/icons/mastercard.js +1 -2
- package/payment-card/icons/uatp.js +1 -2
- package/payment-card/icons/unionpay.js +1 -2
- package/payment-card/icons/visa.js +1 -2
- package/payment-card/index.js +1 -1
- package/payment-card/payment-card.js +5 -6
- package/payment-card/stateful-payment-card.js +2 -3
- package/payment-card/utils.js +1 -2
- package/phone-input/base-country-picker.js +3 -4
- package/phone-input/country-picker.js +2 -2
- package/phone-input/country-select-dropdown.js +3 -4
- package/phone-input/country-select.js +3 -4
- package/phone-input/flag.js +3 -4
- package/phone-input/flags/FlagAD.js +2 -3
- package/phone-input/flags/FlagAE.js +2 -3
- package/phone-input/flags/FlagAF.js +2 -3
- package/phone-input/flags/FlagAG.js +2 -3
- package/phone-input/flags/FlagAI.js +2 -3
- package/phone-input/flags/FlagAL.js +2 -3
- package/phone-input/flags/FlagAM.js +2 -3
- package/phone-input/flags/FlagAO.js +2 -3
- package/phone-input/flags/FlagAR.js +2 -3
- package/phone-input/flags/FlagAS.js +2 -3
- package/phone-input/flags/FlagAT.js +2 -3
- package/phone-input/flags/FlagAU.js +2 -3
- package/phone-input/flags/FlagAW.js +2 -3
- package/phone-input/flags/FlagAX.js +2 -3
- package/phone-input/flags/FlagAZ.js +2 -3
- package/phone-input/flags/FlagBA.js +2 -3
- package/phone-input/flags/FlagBB.js +2 -3
- package/phone-input/flags/FlagBD.js +2 -3
- package/phone-input/flags/FlagBE.js +2 -3
- package/phone-input/flags/FlagBF.js +2 -3
- package/phone-input/flags/FlagBG.js +2 -3
- package/phone-input/flags/FlagBH.js +2 -3
- package/phone-input/flags/FlagBI.js +2 -3
- package/phone-input/flags/FlagBJ.js +2 -3
- package/phone-input/flags/FlagBL.js +2 -3
- package/phone-input/flags/FlagBM.js +2 -3
- package/phone-input/flags/FlagBN.js +2 -3
- package/phone-input/flags/FlagBO.js +2 -3
- package/phone-input/flags/FlagBR.js +2 -3
- package/phone-input/flags/FlagBS.js +2 -3
- package/phone-input/flags/FlagBT.js +2 -3
- package/phone-input/flags/FlagBV.js +2 -3
- package/phone-input/flags/FlagBW.js +2 -3
- package/phone-input/flags/FlagBY.js +2 -3
- package/phone-input/flags/FlagBZ.js +2 -3
- package/phone-input/flags/FlagCA.js +2 -3
- package/phone-input/flags/FlagCC.js +2 -3
- package/phone-input/flags/FlagCD.js +2 -3
- package/phone-input/flags/FlagCF.js +2 -3
- package/phone-input/flags/FlagCG.js +2 -3
- package/phone-input/flags/FlagCH.js +2 -3
- package/phone-input/flags/FlagCI.js +2 -3
- package/phone-input/flags/FlagCK.js +2 -3
- package/phone-input/flags/FlagCL.js +2 -3
- package/phone-input/flags/FlagCM.js +2 -3
- package/phone-input/flags/FlagCN.js +2 -3
- package/phone-input/flags/FlagCO.js +2 -3
- package/phone-input/flags/FlagCR.js +2 -3
- package/phone-input/flags/FlagCU.js +2 -3
- package/phone-input/flags/FlagCV.js +2 -3
- package/phone-input/flags/FlagCW.js +2 -3
- package/phone-input/flags/FlagCX.js +2 -3
- package/phone-input/flags/FlagCY.js +2 -3
- package/phone-input/flags/FlagCZ.js +2 -3
- package/phone-input/flags/FlagDE.js +2 -3
- package/phone-input/flags/FlagDJ.js +2 -3
- package/phone-input/flags/FlagDK.js +2 -3
- package/phone-input/flags/FlagDM.js +2 -3
- package/phone-input/flags/FlagDO.js +2 -3
- package/phone-input/flags/FlagDZ.js +2 -3
- package/phone-input/flags/FlagEC.js +2 -3
- package/phone-input/flags/FlagEE.js +2 -3
- package/phone-input/flags/FlagEG.js +2 -3
- package/phone-input/flags/FlagER.js +2 -3
- package/phone-input/flags/FlagES.js +2 -3
- package/phone-input/flags/FlagET.js +2 -3
- package/phone-input/flags/FlagEU.js +2 -3
- package/phone-input/flags/FlagFI.js +2 -3
- package/phone-input/flags/FlagFJ.js +2 -3
- package/phone-input/flags/FlagFK.js +2 -3
- package/phone-input/flags/FlagFM.js +2 -3
- package/phone-input/flags/FlagFO.js +2 -3
- package/phone-input/flags/FlagFR.js +2 -3
- package/phone-input/flags/FlagGA.js +2 -3
- package/phone-input/flags/FlagGB.js +2 -3
- package/phone-input/flags/FlagGD.js +2 -3
- package/phone-input/flags/FlagGE.js +2 -3
- package/phone-input/flags/FlagGF.js +2 -3
- package/phone-input/flags/FlagGG.js +2 -3
- package/phone-input/flags/FlagGH.js +2 -3
- package/phone-input/flags/FlagGI.js +2 -3
- package/phone-input/flags/FlagGL.js +2 -3
- package/phone-input/flags/FlagGM.js +2 -3
- package/phone-input/flags/FlagGN.js +2 -3
- package/phone-input/flags/FlagGP.js +2 -3
- package/phone-input/flags/FlagGQ.js +2 -3
- package/phone-input/flags/FlagGR.js +2 -3
- package/phone-input/flags/FlagGS.js +2 -3
- package/phone-input/flags/FlagGT.js +2 -3
- package/phone-input/flags/FlagGU.js +2 -3
- package/phone-input/flags/FlagGW.js +2 -3
- package/phone-input/flags/FlagGY.js +2 -3
- package/phone-input/flags/FlagHK.js +2 -3
- package/phone-input/flags/FlagHM.js +2 -3
- package/phone-input/flags/FlagHN.js +2 -3
- package/phone-input/flags/FlagHR.js +2 -3
- package/phone-input/flags/FlagHT.js +2 -3
- package/phone-input/flags/FlagHU.js +2 -3
- package/phone-input/flags/FlagID.js +2 -3
- package/phone-input/flags/FlagIE.js +2 -3
- package/phone-input/flags/FlagIL.js +2 -3
- package/phone-input/flags/FlagIM.js +2 -3
- package/phone-input/flags/FlagIN.js +2 -3
- package/phone-input/flags/FlagIO.js +2 -3
- package/phone-input/flags/FlagIQ.js +2 -3
- package/phone-input/flags/FlagIR.js +2 -3
- package/phone-input/flags/FlagIS.js +2 -3
- package/phone-input/flags/FlagIT.js +2 -3
- package/phone-input/flags/FlagJE.js +2 -3
- package/phone-input/flags/FlagJM.js +2 -3
- package/phone-input/flags/FlagJO.js +2 -3
- package/phone-input/flags/FlagJP.js +2 -3
- package/phone-input/flags/FlagKE.js +2 -3
- package/phone-input/flags/FlagKG.js +2 -3
- package/phone-input/flags/FlagKH.js +2 -3
- package/phone-input/flags/FlagKI.js +2 -3
- package/phone-input/flags/FlagKM.js +2 -3
- package/phone-input/flags/FlagKN.js +2 -3
- package/phone-input/flags/FlagKP.js +2 -3
- package/phone-input/flags/FlagKR.js +2 -3
- package/phone-input/flags/FlagKW.js +2 -3
- package/phone-input/flags/FlagKY.js +2 -3
- package/phone-input/flags/FlagKZ.js +2 -3
- package/phone-input/flags/FlagLA.js +2 -3
- package/phone-input/flags/FlagLB.js +2 -3
- package/phone-input/flags/FlagLC.js +2 -3
- package/phone-input/flags/FlagLI.js +2 -3
- package/phone-input/flags/FlagLK.js +2 -3
- package/phone-input/flags/FlagLR.js +2 -3
- package/phone-input/flags/FlagLS.js +2 -3
- package/phone-input/flags/FlagLT.js +2 -3
- package/phone-input/flags/FlagLU.js +2 -3
- package/phone-input/flags/FlagLV.js +2 -3
- package/phone-input/flags/FlagLY.js +2 -3
- package/phone-input/flags/FlagMA.js +2 -3
- package/phone-input/flags/FlagMC.js +2 -3
- package/phone-input/flags/FlagMD.js +2 -3
- package/phone-input/flags/FlagME.js +2 -3
- package/phone-input/flags/FlagMF.js +2 -3
- package/phone-input/flags/FlagMG.js +2 -3
- package/phone-input/flags/FlagMH.js +2 -3
- package/phone-input/flags/FlagMK.js +2 -3
- package/phone-input/flags/FlagML.js +2 -3
- package/phone-input/flags/FlagMM.js +2 -3
- package/phone-input/flags/FlagMN.js +2 -3
- package/phone-input/flags/FlagMO.js +2 -3
- package/phone-input/flags/FlagMP.js +2 -3
- package/phone-input/flags/FlagMQ.js +2 -3
- package/phone-input/flags/FlagMR.js +2 -3
- package/phone-input/flags/FlagMS.js +2 -3
- package/phone-input/flags/FlagMT.js +2 -3
- package/phone-input/flags/FlagMU.js +2 -3
- package/phone-input/flags/FlagMV.js +2 -3
- package/phone-input/flags/FlagMW.js +2 -3
- package/phone-input/flags/FlagMX.js +2 -3
- package/phone-input/flags/FlagMY.js +2 -3
- package/phone-input/flags/FlagMZ.js +2 -3
- package/phone-input/flags/FlagNA.js +2 -3
- package/phone-input/flags/FlagNC.js +2 -3
- package/phone-input/flags/FlagNE.js +2 -3
- package/phone-input/flags/FlagNF.js +2 -3
- package/phone-input/flags/FlagNG.js +2 -3
- package/phone-input/flags/FlagNI.js +2 -3
- package/phone-input/flags/FlagNL.js +2 -3
- package/phone-input/flags/FlagNO.js +2 -3
- package/phone-input/flags/FlagNP.js +2 -3
- package/phone-input/flags/FlagNR.js +2 -3
- package/phone-input/flags/FlagNU.js +2 -3
- package/phone-input/flags/FlagNZ.js +2 -3
- package/phone-input/flags/FlagOM.js +2 -3
- package/phone-input/flags/FlagPA.js +2 -3
- package/phone-input/flags/FlagPE.js +2 -3
- package/phone-input/flags/FlagPF.js +2 -3
- package/phone-input/flags/FlagPG.js +2 -3
- package/phone-input/flags/FlagPH.js +2 -3
- package/phone-input/flags/FlagPK.js +2 -3
- package/phone-input/flags/FlagPL.js +2 -3
- package/phone-input/flags/FlagPM.js +2 -3
- package/phone-input/flags/FlagPN.js +2 -3
- package/phone-input/flags/FlagPR.js +2 -3
- package/phone-input/flags/FlagPS.js +2 -3
- package/phone-input/flags/FlagPT.js +2 -3
- package/phone-input/flags/FlagPW.js +2 -3
- package/phone-input/flags/FlagPY.js +2 -3
- package/phone-input/flags/FlagQA.js +2 -3
- package/phone-input/flags/FlagRE.js +2 -3
- package/phone-input/flags/FlagRO.js +2 -3
- package/phone-input/flags/FlagRS.js +2 -3
- package/phone-input/flags/FlagRU.js +2 -3
- package/phone-input/flags/FlagRW.js +2 -3
- package/phone-input/flags/FlagSA.js +2 -3
- package/phone-input/flags/FlagSB.js +2 -3
- package/phone-input/flags/FlagSC.js +2 -3
- package/phone-input/flags/FlagSD.js +2 -3
- package/phone-input/flags/FlagSE.js +2 -3
- package/phone-input/flags/FlagSG.js +2 -3
- package/phone-input/flags/FlagSH.js +2 -3
- package/phone-input/flags/FlagSI.js +2 -3
- package/phone-input/flags/FlagSJ.js +2 -3
- package/phone-input/flags/FlagSK.js +2 -3
- package/phone-input/flags/FlagSL.js +2 -3
- package/phone-input/flags/FlagSM.js +2 -3
- package/phone-input/flags/FlagSN.js +2 -3
- package/phone-input/flags/FlagSO.js +2 -3
- package/phone-input/flags/FlagSR.js +2 -3
- package/phone-input/flags/FlagSS.js +2 -3
- package/phone-input/flags/FlagST.js +2 -3
- package/phone-input/flags/FlagSV.js +2 -3
- package/phone-input/flags/FlagSX.js +2 -3
- package/phone-input/flags/FlagSY.js +2 -3
- package/phone-input/flags/FlagSZ.js +2 -3
- package/phone-input/flags/FlagTC.js +2 -3
- package/phone-input/flags/FlagTD.js +2 -3
- package/phone-input/flags/FlagTF.js +2 -3
- package/phone-input/flags/FlagTG.js +2 -3
- package/phone-input/flags/FlagTH.js +2 -3
- package/phone-input/flags/FlagTJ.js +2 -3
- package/phone-input/flags/FlagTK.js +2 -3
- package/phone-input/flags/FlagTL.js +2 -3
- package/phone-input/flags/FlagTM.js +2 -3
- package/phone-input/flags/FlagTN.js +2 -3
- package/phone-input/flags/FlagTO.js +2 -3
- package/phone-input/flags/FlagTR.js +2 -3
- package/phone-input/flags/FlagTT.js +2 -3
- package/phone-input/flags/FlagTV.js +2 -3
- package/phone-input/flags/FlagTW.js +2 -3
- package/phone-input/flags/FlagTZ.js +2 -3
- package/phone-input/flags/FlagUA.js +2 -3
- package/phone-input/flags/FlagUG.js +2 -3
- package/phone-input/flags/FlagUM.js +2 -3
- package/phone-input/flags/FlagUS.js +2 -3
- package/phone-input/flags/FlagUY.js +2 -3
- package/phone-input/flags/FlagUZ.js +2 -3
- package/phone-input/flags/FlagVA.js +2 -3
- package/phone-input/flags/FlagVC.js +2 -3
- package/phone-input/flags/FlagVE.js +2 -3
- package/phone-input/flags/FlagVG.js +2 -3
- package/phone-input/flags/FlagVI.js +2 -3
- package/phone-input/flags/FlagVN.js +2 -3
- package/phone-input/flags/FlagVU.js +2 -3
- package/phone-input/flags/FlagWF.js +2 -3
- package/phone-input/flags/FlagWS.js +2 -3
- package/phone-input/flags/FlagXK.js +2 -3
- package/phone-input/flags/FlagYE.js +2 -3
- package/phone-input/flags/FlagYT.js +2 -3
- package/phone-input/flags/FlagZA.js +2 -3
- package/phone-input/flags/FlagZM.js +2 -3
- package/phone-input/flags/FlagZW.js +2 -3
- package/phone-input/flags/index.js +1 -1
- package/phone-input/index.js +2 -3
- package/phone-input/phone-input-lite.js +3 -4
- package/phone-input/phone-input-next.js +3 -4
- package/phone-input/phone-input.js +2 -2
- package/phone-input/stateful-phone-input-container.js +3 -3
- package/phone-input/stateful-phone-input-next.js +1 -1
- package/phone-input/stateful-phone-input.js +1 -1
- package/phone-input/styled-components.js +2 -3
- package/pin-code/index.js +1 -1
- package/pin-code/pin-code.js +4 -4
- package/pin-code/stateful-pin-code-container.js +3 -3
- package/pin-code/stateful-pin-code.js +1 -1
- package/popover/index.js +1 -1
- package/popover/popover.js +7 -8
- package/popover/stateful-container.js +3 -4
- package/popover/stateful-popover.js +2 -3
- package/progress-bar/constants.d.ts +7 -0
- package/progress-bar/constants.js +8 -1
- package/progress-bar/index.d.ts +1 -1
- package/progress-bar/index.js +8 -1
- package/progress-bar/progressbar-rounded.d.ts +1 -1
- package/progress-bar/progressbar-rounded.js +12 -6
- package/progress-bar/progressbar.js +25 -34
- package/progress-bar/styled-components.d.ts +1 -0
- package/progress-bar/styled-components.js +44 -20
- package/progress-bar/types.d.ts +14 -2
- package/progress-steps/index.js +1 -1
- package/progress-steps/numbered-step.js +3 -4
- package/progress-steps/progress-steps.js +2 -3
- package/progress-steps/step.js +2 -3
- package/radio/index.js +1 -1
- package/radio/radio.js +4 -5
- package/radio/radiogroup.js +4 -5
- package/radio/stateful-radiogroup-container.js +3 -4
- package/radio/stateful-radiogroup.js +2 -3
- package/radio-v2/constants.d.ts +13 -0
- package/radio-v2/constants.js +25 -0
- package/radio-v2/index.d.ts +8 -0
- package/radio-v2/index.js +139 -0
- package/radio-v2/radio-context.d.ts +23 -0
- package/radio-v2/radio-context.js +20 -0
- package/radio-v2/radio.d.ts +4 -0
- package/radio-v2/radio.js +184 -0
- package/radio-v2/radiogroup.d.ts +4 -0
- package/radio-v2/radiogroup.js +106 -0
- package/radio-v2/stateful-radiogroup-container.d.ts +4 -0
- package/radio-v2/stateful-radiogroup-container.js +59 -0
- package/radio-v2/stateful-radiogroup.d.ts +4 -0
- package/radio-v2/stateful-radiogroup.js +26 -0
- package/radio-v2/styled-components.d.ts +10 -0
- package/radio-v2/styled-components.js +266 -0
- package/radio-v2/types.d.ts +185 -0
- package/radio-v2/types.js +1 -0
- package/rating/emoticon-rating.js +4 -5
- package/rating/index.js +1 -1
- package/rating/star-rating.js +4 -5
- package/segmented-control/segmented-control.js +2 -3
- package/segmented-control/stateful-segmented-control.js +2 -3
- package/select/autosize-input.js +4 -5
- package/select/default-props.js +1 -1
- package/select/dropdown.js +4 -5
- package/select/index.js +1 -1
- package/select/multi-select.js +3 -4
- package/select/multi-value.js +2 -3
- package/select/select-component.js +5 -6
- package/select/select.js +3 -4
- package/select/single-select.js +3 -4
- package/select/stateful-select-container.js +3 -4
- package/select/stateful-select.js +2 -3
- package/select/value.js +2 -3
- package/sheet/action-button.js +2 -3
- package/sheet/index.js +1 -1
- package/sheet/sheet.js +2 -3
- package/side-navigation/index.js +1 -1
- package/side-navigation/nav-item.js +4 -5
- package/side-navigation/nav.js +5 -6
- package/side-navigation/side-navigation-next.js +4 -5
- package/side-navigation/stateful-container.js +3 -4
- package/side-navigation/stateful-nav.js +2 -3
- package/side-navigation/styled-components.js +1 -2
- package/skeleton/index.js +1 -1
- package/skeleton/skeleton.js +4 -5
- package/slider/index.js +1 -1
- package/slider/slider.js +2 -3
- package/slider/stateful-slider-container.js +3 -4
- package/slider/stateful-slider.js +2 -3
- package/sliding-button/constants.d.ts +7 -0
- package/sliding-button/constants.js +25 -0
- package/sliding-button/default-props.d.ts +6 -0
- package/sliding-button/default-props.js +20 -0
- package/sliding-button/index.d.ts +4 -0
- package/sliding-button/index.js +93 -0
- package/sliding-button/sliding-button.d.ts +4 -0
- package/sliding-button/sliding-button.js +202 -0
- package/sliding-button/styled-components.d.ts +9 -0
- package/sliding-button/styled-components.js +211 -0
- package/sliding-button/types.d.ts +41 -0
- package/sliding-button/types.js +1 -0
- package/snackbar/index.js +2 -3
- package/snackbar/snackbar-context.js +3 -4
- package/snackbar/snackbar-element.js +2 -3
- package/spinner/index.js +2 -2
- package/stepper/index.js +1 -1
- package/stepper/stepper.js +2 -3
- package/styles/__mocks__/styled.js +5 -6
- package/styles/as-primary-export-hoc.js +1 -2
- package/styles/index.js +1 -2
- package/styles/styled.js +2 -3
- package/styles/theme-provider.js +1 -2
- package/switch/index.js +1 -1
- package/switch/stateful-switch-container.js +1 -2
- package/switch/stateful-switch.js +2 -3
- package/switch/switch.js +2 -3
- package/system-banner/system-banner.js +2 -3
- package/table/filter.js +3 -4
- package/table/index.js +2 -3
- package/table/sortable-head-cell.js +3 -4
- package/table/styled-components.js +2 -3
- package/table/table.js +3 -4
- package/table-grid/styled-components.js +2 -3
- package/table-semantic/index.js +1 -1
- package/table-semantic/styled-components.js +1 -1
- package/table-semantic/table-builder-column.js +1 -2
- package/table-semantic/table-builder.js +5 -6
- package/table-semantic/table.js +4 -5
- package/tabs/index.js +1 -1
- package/tabs/stateful-tabs.js +5 -6
- package/tabs/tab.js +4 -5
- package/tabs/tabs.js +4 -5
- package/tabs-motion/stateful-tabs.js +2 -3
- package/tabs-motion/tabs.js +2 -3
- package/tag/index.js +1 -1
- package/tag/styled-components.js +2 -3
- package/tag/tag.js +3 -4
- package/tag/utils.js +1 -2
- package/tag-group/index.js +1 -1
- package/tag-group/tag-group.js +2 -3
- package/textarea/index.js +1 -1
- package/textarea/stateful-textarea.js +2 -3
- package/textarea/textarea.js +4 -5
- package/themes/dark-theme/borders.js +1 -1
- package/themes/dark-theme/color-component-tokens.js +1 -1
- package/themes/dark-theme/color-semantic-tokens.js +1 -1
- package/themes/dark-theme/create-dark-theme.js +1 -1
- package/themes/dark-theme/dark-theme.js +1 -1
- package/themes/dark-theme/primitives.js +1 -1
- package/themes/index.js +1 -1
- package/themes/light-theme/color-component-tokens.js +1 -1
- package/themes/light-theme/color-semantic-tokens.js +1 -1
- package/themes/light-theme/create-light-theme.js +1 -1
- package/themes/light-theme/light-theme.js +1 -1
- package/themes/light-theme/primitives.js +1 -1
- package/themes/move-theme/dark-theme-with-move.js +1 -1
- package/themes/move-theme/light-theme-with-move.js +1 -1
- package/themes/shared/media-query.js +1 -1
- package/tile/index.js +1 -1
- package/tile/tile-group.js +2 -3
- package/tile/tile.js +2 -3
- package/timepicker/index.js +1 -1
- package/timepicker/timepicker.js +21 -8
- package/timezonepicker/index.js +1 -1
- package/timezonepicker/timezone-picker.js +4 -5
- package/toast/index.js +2 -3
- package/toast/toast.js +5 -6
- package/toast/toaster.js +5 -6
- package/tokens/index.js +1 -2
- package/tooltip/index.js +1 -1
- package/tooltip/stateful-tooltip-container.js +4 -5
- package/tooltip/stateful-tooltip.js +2 -3
- package/tooltip/tooltip.js +5 -6
- package/tree-view/index.js +1 -1
- package/tree-view/stateful-container.js +3 -4
- package/tree-view/stateful-tree-view.js +2 -3
- package/tree-view/tree-label-interactable.js +2 -2
- package/tree-view/tree-label.js +2 -2
- package/tree-view/tree-node.js +5 -6
- package/tree-view/tree-view.js +3 -4
- package/typography/index.js +2 -3
- package/utils/deep-merge.js +1 -1
- package/utils/deprecated-component.js +2 -3
|
@@ -9,10 +9,9 @@ var _overrides = require("../helpers/overrides");
|
|
|
9
9
|
var _styledComponents = require("./styled-components");
|
|
10
10
|
var _check = _interopRequireDefault(require("../icon/check"));
|
|
11
11
|
var _constants = require("./constants");
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
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); } /*
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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
|
+
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); } /*
|
|
16
15
|
Copyright (c) Uber Technologies, Inc.
|
|
17
16
|
|
|
18
17
|
This source code is licensed under the MIT license found in the
|
|
@@ -8,9 +8,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _overrides = require("../helpers/overrides");
|
|
9
9
|
var _styledComponents = require("./styled-components");
|
|
10
10
|
var _constants = require("./constants");
|
|
11
|
-
function
|
|
12
|
-
function
|
|
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
|
package/progress-steps/step.js
CHANGED
|
@@ -8,9 +8,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _overrides = require("../helpers/overrides");
|
|
9
9
|
var _styledComponents = require("./styled-components");
|
|
10
10
|
var _constants = require("./constants");
|
|
11
|
-
function
|
|
12
|
-
function
|
|
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
|
package/radio/index.js
CHANGED
|
@@ -107,4 +107,4 @@ Object.keys(_types).forEach(function (key) {
|
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
var _constants = require("./constants");
|
|
110
|
-
function _interopRequireDefault(
|
|
110
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/radio/radio.js
CHANGED
|
@@ -7,11 +7,10 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _overrides = require("../helpers/overrides");
|
|
9
9
|
var _styledComponents = require("./styled-components");
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
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 _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
|
+
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; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
14
|
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); } /*
|
|
16
15
|
Copyright (c) Uber Technologies, Inc.
|
|
17
16
|
|
package/radio/radiogroup.js
CHANGED
|
@@ -8,11 +8,10 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _overrides = require("../helpers/overrides");
|
|
9
9
|
var _styledComponents = require("./styled-components");
|
|
10
10
|
var _focusVisible = require("../utils/focusVisible");
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function
|
|
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
|
|
|
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _constants = require("./constants");
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
12
|
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
13
|
Copyright (c) Uber Technologies, Inc.
|
|
15
14
|
|
|
@@ -7,9 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _statefulRadiogroupContainer = _interopRequireDefault(require("./stateful-radiogroup-container"));
|
|
9
9
|
var _radiogroup = _interopRequireDefault(require("./radiogroup"));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function
|
|
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; }
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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); }
|
|
13
12
|
/*
|
|
14
13
|
Copyright (c) Uber Technologies, Inc.
|
|
15
14
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const STATE_TYPE: {
|
|
2
|
+
readonly change: "CHANGE";
|
|
3
|
+
};
|
|
4
|
+
export declare const ALIGN: {
|
|
5
|
+
readonly vertical: "vertical";
|
|
6
|
+
readonly horizontal: "horizontal";
|
|
7
|
+
};
|
|
8
|
+
export declare const LABEL_PLACEMENT: {
|
|
9
|
+
readonly top: "top";
|
|
10
|
+
readonly right: "right";
|
|
11
|
+
readonly bottom: "bottom";
|
|
12
|
+
readonly left: "left";
|
|
13
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.STATE_TYPE = exports.LABEL_PLACEMENT = exports.ALIGN = void 0;
|
|
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
|
+
const STATE_TYPE = exports.STATE_TYPE = {
|
|
14
|
+
change: 'CHANGE'
|
|
15
|
+
};
|
|
16
|
+
const ALIGN = exports.ALIGN = {
|
|
17
|
+
vertical: 'vertical',
|
|
18
|
+
horizontal: 'horizontal'
|
|
19
|
+
};
|
|
20
|
+
const LABEL_PLACEMENT = exports.LABEL_PLACEMENT = {
|
|
21
|
+
top: 'top',
|
|
22
|
+
right: 'right',
|
|
23
|
+
bottom: 'bottom',
|
|
24
|
+
left: 'left'
|
|
25
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as StatefulRadioGroup } from './stateful-radiogroup';
|
|
2
|
+
export { default as StatefulContainer } from './stateful-radiogroup-container';
|
|
3
|
+
export { default as RadioGroup } from './radiogroup';
|
|
4
|
+
export { Root as StyledRoot, Label as StyledLabel, Input as StyledInput, Description as StyledDescription, RadioBackplate as StyledRadioBackplate, RadioMarkInner as StyledRadioMarkInner, RadioMarkOuter as StyledRadioMarkOuter, RadioGroupRoot as StyledRadioGroupRoot, } from './styled-components';
|
|
5
|
+
export { default as Radio } from './radio';
|
|
6
|
+
export * from './types';
|
|
7
|
+
export { ALIGN, LABEL_PLACEMENT } from './constants';
|
|
8
|
+
export { RadioGroupContext, useRadioGroupContext } from './radio-context';
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
StatefulRadioGroup: true,
|
|
8
|
+
StatefulContainer: true,
|
|
9
|
+
RadioGroup: true,
|
|
10
|
+
StyledRoot: true,
|
|
11
|
+
StyledLabel: true,
|
|
12
|
+
StyledInput: true,
|
|
13
|
+
StyledDescription: true,
|
|
14
|
+
StyledRadioBackplate: true,
|
|
15
|
+
StyledRadioMarkInner: true,
|
|
16
|
+
StyledRadioMarkOuter: true,
|
|
17
|
+
StyledRadioGroupRoot: true,
|
|
18
|
+
Radio: true,
|
|
19
|
+
ALIGN: true,
|
|
20
|
+
LABEL_PLACEMENT: true,
|
|
21
|
+
RadioGroupContext: true,
|
|
22
|
+
useRadioGroupContext: true
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "ALIGN", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _constants.ALIGN;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "LABEL_PLACEMENT", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _constants.LABEL_PLACEMENT;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "Radio", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _radio.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "RadioGroup", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _radiogroup.default;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "RadioGroupContext", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _radioContext.RadioGroupContext;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "StatefulContainer", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _statefulRadiogroupContainer.default;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "StatefulRadioGroup", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _statefulRadiogroup.default;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "StyledDescription", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _styledComponents.Description;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "StyledInput", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _styledComponents.Input;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "StyledLabel", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _styledComponents.Label;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "StyledRadioBackplate", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _styledComponents.RadioBackplate;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "StyledRadioGroupRoot", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _styledComponents.RadioGroupRoot;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "StyledRadioMarkInner", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _styledComponents.RadioMarkInner;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "StyledRadioMarkOuter", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _styledComponents.RadioMarkOuter;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "StyledRoot", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _styledComponents.Root;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "useRadioGroupContext", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _radioContext.useRadioGroupContext;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
var _statefulRadiogroup = _interopRequireDefault(require("./stateful-radiogroup"));
|
|
121
|
+
var _statefulRadiogroupContainer = _interopRequireDefault(require("./stateful-radiogroup-container"));
|
|
122
|
+
var _radiogroup = _interopRequireDefault(require("./radiogroup"));
|
|
123
|
+
var _styledComponents = require("./styled-components");
|
|
124
|
+
var _radio = _interopRequireDefault(require("./radio"));
|
|
125
|
+
var _types = require("./types");
|
|
126
|
+
Object.keys(_types).forEach(function (key) {
|
|
127
|
+
if (key === "default" || key === "__esModule") return;
|
|
128
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
129
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
130
|
+
Object.defineProperty(exports, key, {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () {
|
|
133
|
+
return _types[key];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
var _constants = require("./constants");
|
|
138
|
+
var _radioContext = require("./radio-context");
|
|
139
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ChangeEvent } from 'react';
|
|
3
|
+
import type { Align, LabelPlacement } from './types';
|
|
4
|
+
export type RadioGroupContextValue = {
|
|
5
|
+
registerRadio: () => number;
|
|
6
|
+
name?: string;
|
|
7
|
+
selectedValue?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
align?: Align;
|
|
13
|
+
labelPlacement?: LabelPlacement;
|
|
14
|
+
focusedIndex?: number;
|
|
15
|
+
isFocusVisible?: boolean;
|
|
16
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
onMouseEnter?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
onMouseLeave?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
19
|
+
onFocus?: (e: ChangeEvent<HTMLInputElement>, index: number) => void;
|
|
20
|
+
onBlur?: (e: ChangeEvent<HTMLInputElement>, index: number) => void;
|
|
21
|
+
};
|
|
22
|
+
export declare const RadioGroupContext: React.Context<RadioGroupContextValue>;
|
|
23
|
+
export declare function useRadioGroupContext(): RadioGroupContextValue;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RadioGroupContext = void 0;
|
|
7
|
+
exports.useRadioGroupContext = useRadioGroupContext;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
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); }
|
|
10
|
+
/*
|
|
11
|
+
Copyright (c) Uber Technologies, Inc.
|
|
12
|
+
|
|
13
|
+
This source code is licensed under the MIT license found in the
|
|
14
|
+
LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const RadioGroupContext = exports.RadioGroupContext = /*#__PURE__*/React.createContext(null);
|
|
18
|
+
function useRadioGroupContext() {
|
|
19
|
+
return React.useContext(RadioGroupContext);
|
|
20
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _overrides = require("../helpers/overrides");
|
|
9
|
+
var _styledComponents = require("./styled-components");
|
|
10
|
+
var _constants = require("./constants");
|
|
11
|
+
var _radioContext = require("./radio-context");
|
|
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); }
|
|
13
|
+
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
|
+
Copyright (c) Uber Technologies, Inc.
|
|
15
|
+
|
|
16
|
+
This source code is licensed under the MIT license found in the
|
|
17
|
+
LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/
|
|
19
|
+
function isLabelTopLeft(labelPlacement) {
|
|
20
|
+
return labelPlacement === _constants.LABEL_PLACEMENT.top || labelPlacement === _constants.LABEL_PLACEMENT.left;
|
|
21
|
+
}
|
|
22
|
+
function isLabelBottomRight(labelPlacement) {
|
|
23
|
+
return labelPlacement === _constants.LABEL_PLACEMENT.bottom || labelPlacement === _constants.LABEL_PLACEMENT.right;
|
|
24
|
+
}
|
|
25
|
+
const stopPropagation = e => e.stopPropagation();
|
|
26
|
+
const Radio = props => {
|
|
27
|
+
const groupContext = (0, _radioContext.useRadioGroupContext)();
|
|
28
|
+
|
|
29
|
+
// Register with the group to get a unique index for this radio.
|
|
30
|
+
// Each radio needs its own index so the RadioGroup can track which radio triggered
|
|
31
|
+
// events (focus, blur, keyboard navigation). The index is used to identify the source
|
|
32
|
+
// of events when communicating with the parent RadioGroup.
|
|
33
|
+
// Also tabIndex may need this information if no radio is selected in the group. (First radio gets tabIndex 0)
|
|
34
|
+
const [radioIndex] = React.useState(() => groupContext?.registerRadio() ?? -1);
|
|
35
|
+
const {
|
|
36
|
+
overrides = {},
|
|
37
|
+
containsInteractiveElement = false,
|
|
38
|
+
checked: checkedProp = false,
|
|
39
|
+
disabled: disabledProp = false,
|
|
40
|
+
autoFocus: autoFocusProp = false,
|
|
41
|
+
inputRef = /*#__PURE__*/React.createRef(),
|
|
42
|
+
align: alignProp = _constants.ALIGN.vertical,
|
|
43
|
+
labelPlacement: labelPlacementProp = _constants.LABEL_PLACEMENT.right,
|
|
44
|
+
error: errorProp = false,
|
|
45
|
+
onChange: onChangeProp = () => {},
|
|
46
|
+
onMouseEnter: onMouseEnterProp = () => {},
|
|
47
|
+
onMouseLeave: onMouseLeaveProp = () => {},
|
|
48
|
+
onMouseDown = () => {},
|
|
49
|
+
onMouseUp = () => {},
|
|
50
|
+
onFocus: onFocusProp = () => {},
|
|
51
|
+
onBlur: onBlurProp = () => {},
|
|
52
|
+
children,
|
|
53
|
+
description,
|
|
54
|
+
isFocused: isFocusedProp,
|
|
55
|
+
isFocusVisible: isFocusVisibleProp,
|
|
56
|
+
name: nameProp,
|
|
57
|
+
required: requiredProp,
|
|
58
|
+
tabIndex: tabIndexProp,
|
|
59
|
+
value
|
|
60
|
+
} = props;
|
|
61
|
+
|
|
62
|
+
// Group context takes precedence to ensure consistency
|
|
63
|
+
// For disabled, allow local override (individual radio can be disabled even if group isn't)
|
|
64
|
+
const name = groupContext?.name ?? nameProp;
|
|
65
|
+
const disabled = disabledProp || (groupContext?.disabled ?? false);
|
|
66
|
+
const autoFocus = groupContext?.autoFocus ?? autoFocusProp;
|
|
67
|
+
const error = groupContext?.error ?? errorProp;
|
|
68
|
+
const required = groupContext?.required ?? requiredProp;
|
|
69
|
+
const align = groupContext?.align ?? alignProp;
|
|
70
|
+
const labelPlacement = groupContext?.labelPlacement ?? labelPlacementProp;
|
|
71
|
+
|
|
72
|
+
// Compute derived values
|
|
73
|
+
const checked = groupContext ? groupContext.selectedValue === value : checkedProp;
|
|
74
|
+
const isFocused = groupContext ? groupContext.focusedIndex === radioIndex : isFocusedProp;
|
|
75
|
+
const isFocusVisible = groupContext?.isFocusVisible ?? isFocusVisibleProp;
|
|
76
|
+
|
|
77
|
+
// Compute tabIndex based on context or prop
|
|
78
|
+
let tabIndex = tabIndexProp;
|
|
79
|
+
if (groupContext) {
|
|
80
|
+
// First radio (index 0) gets tabIndex 0 if no value selected, otherwise checked radio gets 0
|
|
81
|
+
tabIndex = radioIndex === 0 && !groupContext.selectedValue || checked ? '0' : '-1';
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Event handlers - use group handlers if in a group
|
|
85
|
+
const onChange = groupContext?.onChange ?? onChangeProp;
|
|
86
|
+
const onMouseEnter = groupContext?.onMouseEnter ?? onMouseEnterProp;
|
|
87
|
+
const onMouseLeave = groupContext?.onMouseLeave ?? onMouseLeaveProp;
|
|
88
|
+
const onFocus = React.useCallback(e => {
|
|
89
|
+
if (groupContext?.onFocus) {
|
|
90
|
+
groupContext.onFocus(e, radioIndex);
|
|
91
|
+
} else {
|
|
92
|
+
onFocusProp(e);
|
|
93
|
+
}
|
|
94
|
+
}, [groupContext, radioIndex, onFocusProp]);
|
|
95
|
+
const onBlur = React.useCallback(e => {
|
|
96
|
+
if (groupContext?.onBlur) {
|
|
97
|
+
groupContext.onBlur(e, radioIndex);
|
|
98
|
+
} else {
|
|
99
|
+
onBlurProp(e);
|
|
100
|
+
}
|
|
101
|
+
}, [groupContext, radioIndex, onBlurProp]);
|
|
102
|
+
const [isActive, setIsActive] = React.useState(false);
|
|
103
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
104
|
+
React.useEffect(() => {
|
|
105
|
+
if (autoFocus && inputRef?.current) {
|
|
106
|
+
inputRef.current.focus();
|
|
107
|
+
}
|
|
108
|
+
}, [autoFocus, inputRef]);
|
|
109
|
+
const handleMouseEnter = React.useCallback(e => {
|
|
110
|
+
setIsHovered(true);
|
|
111
|
+
onMouseEnter && onMouseEnter(e);
|
|
112
|
+
}, [onMouseEnter]);
|
|
113
|
+
const handleMouseLeave = React.useCallback(e => {
|
|
114
|
+
setIsHovered(false);
|
|
115
|
+
onMouseLeave && onMouseLeave(e);
|
|
116
|
+
}, [onMouseLeave]);
|
|
117
|
+
const handleMouseDown = React.useCallback(e => {
|
|
118
|
+
setIsActive(true);
|
|
119
|
+
onMouseDown && onMouseDown(e);
|
|
120
|
+
}, [onMouseDown]);
|
|
121
|
+
const handleMouseUp = React.useCallback(e => {
|
|
122
|
+
setIsActive(false);
|
|
123
|
+
onMouseUp && onMouseUp(e);
|
|
124
|
+
}, [onMouseUp]);
|
|
125
|
+
const [Root, rootProps] = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.Root);
|
|
126
|
+
const [Label, labelProps] = (0, _overrides.getOverrides)(overrides.Label, _styledComponents.Label);
|
|
127
|
+
const [LabelWrapper, labelWrapperProps] = (0, _overrides.getOverrides)(overrides.LabelWrapper, _styledComponents.LabelWrapper);
|
|
128
|
+
const [Input, inputProps] = (0, _overrides.getOverrides)(overrides.Input, _styledComponents.Input);
|
|
129
|
+
const [Description, descriptionProps] = (0, _overrides.getOverrides)(overrides.Description, _styledComponents.Description);
|
|
130
|
+
const [RadioBackplate, radioBackplateProps] = (0, _overrides.getOverrides)(overrides.RadioBackplate, _styledComponents.RadioBackplate);
|
|
131
|
+
const [RadioMarkInner, radioMarkInnerProps] = (0, _overrides.getOverrides)(overrides.RadioMarkInner, _styledComponents.RadioMarkInner);
|
|
132
|
+
const [RadioMarkOuter, radioMarkOuterProps] = (0, _overrides.getOverrides)(overrides.RadioMarkOuter, _styledComponents.RadioMarkOuter);
|
|
133
|
+
const sharedProps = {
|
|
134
|
+
$align: align,
|
|
135
|
+
$checked: checked,
|
|
136
|
+
$disabled: disabled,
|
|
137
|
+
$hasDescription: !!description,
|
|
138
|
+
$isActive: isActive,
|
|
139
|
+
$error: error,
|
|
140
|
+
$isFocused: isFocused,
|
|
141
|
+
$isFocusVisible: isFocused && isFocusVisible,
|
|
142
|
+
$isHovered: isHovered,
|
|
143
|
+
$labelPlacement: labelPlacement,
|
|
144
|
+
$required: required,
|
|
145
|
+
$value: value
|
|
146
|
+
};
|
|
147
|
+
const label = /*#__PURE__*/React.createElement(Label, _extends({}, sharedProps, labelProps), containsInteractiveElement ?
|
|
148
|
+
/*#__PURE__*/
|
|
149
|
+
// Prevents the event from bubbling up to the label and moving focus to the radio button
|
|
150
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
151
|
+
React.createElement("div", {
|
|
152
|
+
onClick: e => e.preventDefault()
|
|
153
|
+
}, children) : children);
|
|
154
|
+
const labelWithDescription = /*#__PURE__*/React.createElement(LabelWrapper, _extends({}, sharedProps, labelWrapperProps), label, !!description && /*#__PURE__*/React.createElement(Description, _extends({}, sharedProps, descriptionProps), description));
|
|
155
|
+
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
156
|
+
"data-baseweb": "radio",
|
|
157
|
+
onMouseEnter: handleMouseEnter,
|
|
158
|
+
onMouseLeave: handleMouseLeave,
|
|
159
|
+
onMouseDown: handleMouseDown,
|
|
160
|
+
onMouseUp: handleMouseUp
|
|
161
|
+
}, sharedProps, rootProps), !!children && isLabelTopLeft(labelPlacement) && labelWithDescription, /*#__PURE__*/React.createElement(RadioBackplate, _extends({}, sharedProps, radioBackplateProps), /*#__PURE__*/React.createElement(RadioMarkOuter, _extends({}, sharedProps, radioMarkOuterProps), /*#__PURE__*/React.createElement(RadioMarkInner, _extends({}, sharedProps, radioMarkInnerProps)))), /*#__PURE__*/React.createElement(Input, _extends({
|
|
162
|
+
"aria-describedby": props['aria-describedby'],
|
|
163
|
+
"aria-errormessage": props['aria-errormessage'],
|
|
164
|
+
"aria-invalid": error || null,
|
|
165
|
+
"aria-label": props['aria-label'],
|
|
166
|
+
"aria-labelledby": props['aria-labelledby'],
|
|
167
|
+
checked: checked,
|
|
168
|
+
disabled: disabled,
|
|
169
|
+
name: name,
|
|
170
|
+
onBlur: onBlur,
|
|
171
|
+
onFocus: onFocus
|
|
172
|
+
// Prevent a second click event from firing when label is clicked.
|
|
173
|
+
// See https://github.com/uber/baseweb/issues/3847 & https://github.com/uber/baseweb/issues/4033
|
|
174
|
+
,
|
|
175
|
+
onClick: stopPropagation,
|
|
176
|
+
onChange: onChange,
|
|
177
|
+
ref: inputRef,
|
|
178
|
+
required: required,
|
|
179
|
+
tabIndex: tabIndex,
|
|
180
|
+
type: "radio",
|
|
181
|
+
value: value
|
|
182
|
+
}, sharedProps, inputProps)), !!children && isLabelBottomRight(labelPlacement) && labelWithDescription);
|
|
183
|
+
};
|
|
184
|
+
var _default = exports.default = Radio;
|