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.
- 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 +4 -5
- 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
|
@@ -0,0 +1,106 @@
|
|
|
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 _focusVisible = require("../utils/focusVisible");
|
|
11
|
+
var _constants = require("./constants");
|
|
12
|
+
var _radioContext = require("./radio-context");
|
|
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); } /*
|
|
15
|
+
Copyright (c) Uber Technologies, Inc.
|
|
16
|
+
|
|
17
|
+
This source code is licensed under the MIT license found in the
|
|
18
|
+
LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
const StatelessRadioGroup = props => {
|
|
21
|
+
const {
|
|
22
|
+
overrides = {},
|
|
23
|
+
name = '',
|
|
24
|
+
value = '',
|
|
25
|
+
disabled = false,
|
|
26
|
+
autoFocus = false,
|
|
27
|
+
labelPlacement = _constants.LABEL_PLACEMENT.right,
|
|
28
|
+
align = _constants.ALIGN.vertical,
|
|
29
|
+
error = false,
|
|
30
|
+
required = false,
|
|
31
|
+
onChange = () => {},
|
|
32
|
+
onMouseEnter = () => {},
|
|
33
|
+
onMouseLeave = () => {},
|
|
34
|
+
onFocus = () => {},
|
|
35
|
+
onBlur = () => {},
|
|
36
|
+
children,
|
|
37
|
+
id
|
|
38
|
+
} = props;
|
|
39
|
+
const [isFocusVisibleState, setIsFocusVisibleState] = React.useState(false);
|
|
40
|
+
const [focusedRadioIndex, setFocusedRadioIndex] = React.useState(-1);
|
|
41
|
+
|
|
42
|
+
// Registration counter for child radios
|
|
43
|
+
const radioIndexRef = React.useRef(0);
|
|
44
|
+
|
|
45
|
+
// Reset the registration counter before each render
|
|
46
|
+
React.useLayoutEffect(() => {
|
|
47
|
+
radioIndexRef.current = 0;
|
|
48
|
+
});
|
|
49
|
+
const registerRadio = React.useCallback(() => {
|
|
50
|
+
const index = radioIndexRef.current;
|
|
51
|
+
radioIndexRef.current += 1;
|
|
52
|
+
return index;
|
|
53
|
+
}, []);
|
|
54
|
+
const handleFocus = React.useCallback((event, index) => {
|
|
55
|
+
if ((0, _focusVisible.isFocusVisible)(event)) {
|
|
56
|
+
setIsFocusVisibleState(true);
|
|
57
|
+
}
|
|
58
|
+
setFocusedRadioIndex(index);
|
|
59
|
+
onFocus && onFocus(event);
|
|
60
|
+
}, [onFocus]);
|
|
61
|
+
const handleBlur = React.useCallback((event, index) => {
|
|
62
|
+
if (isFocusVisibleState !== false) {
|
|
63
|
+
setIsFocusVisibleState(false);
|
|
64
|
+
}
|
|
65
|
+
setFocusedRadioIndex(-1);
|
|
66
|
+
onBlur && onBlur(event);
|
|
67
|
+
}, [isFocusVisibleState, onBlur]);
|
|
68
|
+
const [RadioGroupRoot, radioGroupRootProps] = (0, _overrides.getOverrides)(overrides.RadioGroupRoot, _styledComponents.RadioGroupRoot);
|
|
69
|
+
const contextValue = React.useMemo(() => ({
|
|
70
|
+
name,
|
|
71
|
+
selectedValue: value,
|
|
72
|
+
disabled,
|
|
73
|
+
autoFocus,
|
|
74
|
+
error,
|
|
75
|
+
required,
|
|
76
|
+
align,
|
|
77
|
+
labelPlacement,
|
|
78
|
+
focusedIndex: focusedRadioIndex,
|
|
79
|
+
isFocusVisible: isFocusVisibleState,
|
|
80
|
+
onChange,
|
|
81
|
+
onMouseEnter,
|
|
82
|
+
onMouseLeave,
|
|
83
|
+
onFocus: handleFocus,
|
|
84
|
+
onBlur: handleBlur,
|
|
85
|
+
registerRadio
|
|
86
|
+
}), [name, value, disabled, autoFocus, error, required, align, labelPlacement, focusedRadioIndex, isFocusVisibleState, onChange, onMouseEnter, onMouseLeave, handleFocus, handleBlur, registerRadio]);
|
|
87
|
+
return /*#__PURE__*/React.createElement(_radioContext.RadioGroupContext.Provider, {
|
|
88
|
+
value: contextValue
|
|
89
|
+
}, /*#__PURE__*/React.createElement(RadioGroupRoot, _extends({
|
|
90
|
+
id: id,
|
|
91
|
+
role: "radiogroup",
|
|
92
|
+
"aria-describedby": props['aria-describedby'],
|
|
93
|
+
"aria-errormessage": props['aria-errormessage'],
|
|
94
|
+
"aria-invalid": error || null,
|
|
95
|
+
"aria-label": props['aria-label'],
|
|
96
|
+
"aria-labelledby": props['aria-labelledby'],
|
|
97
|
+
"aria-required": required || null,
|
|
98
|
+
$align: align,
|
|
99
|
+
$disabled: disabled,
|
|
100
|
+
$error: error,
|
|
101
|
+
$required: required,
|
|
102
|
+
$labelPlacement: labelPlacement
|
|
103
|
+
}, radioGroupRootProps), children));
|
|
104
|
+
};
|
|
105
|
+
StatelessRadioGroup.displayName = 'StatelessRadioGroup';
|
|
106
|
+
var _default = exports.default = StatelessRadioGroup;
|
|
@@ -0,0 +1,59 @@
|
|
|
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 _constants = require("./constants");
|
|
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 defaultStateReducer = (type, nextState) => nextState;
|
|
18
|
+
const StatefulRadioGroupContainer = props => {
|
|
19
|
+
const {
|
|
20
|
+
children = childProps => null,
|
|
21
|
+
initialState = {
|
|
22
|
+
value: ''
|
|
23
|
+
},
|
|
24
|
+
stateReducer = defaultStateReducer,
|
|
25
|
+
onChange = () => {},
|
|
26
|
+
...restProps
|
|
27
|
+
} = props;
|
|
28
|
+
const reducer = React.useCallback((currentState, action) => {
|
|
29
|
+
const {
|
|
30
|
+
type,
|
|
31
|
+
event
|
|
32
|
+
} = action;
|
|
33
|
+
|
|
34
|
+
// Calculate next state based on action type
|
|
35
|
+
let nextState = currentState;
|
|
36
|
+
if (type === _constants.STATE_TYPE.change) {
|
|
37
|
+
nextState = {
|
|
38
|
+
value: event.target.value
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Allow user's stateReducer to intercept and modify the state change
|
|
43
|
+
return stateReducer(type, nextState, currentState, event);
|
|
44
|
+
}, [stateReducer]);
|
|
45
|
+
const [state, dispatch] = React.useReducer(reducer, initialState);
|
|
46
|
+
const handleChange = React.useCallback(e => {
|
|
47
|
+
dispatch({
|
|
48
|
+
type: _constants.STATE_TYPE.change,
|
|
49
|
+
event: e
|
|
50
|
+
});
|
|
51
|
+
onChange(e);
|
|
52
|
+
}, [onChange]);
|
|
53
|
+
return children({
|
|
54
|
+
...restProps,
|
|
55
|
+
value: state.value,
|
|
56
|
+
onChange: handleChange
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
var _default = exports.default = StatefulRadioGroupContainer;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { RadioGroupProps, StatefulRadioGroupProps } from './types';
|
|
3
|
+
declare const StatefulRadioGroup: (props: StatefulRadioGroupProps & Omit<RadioGroupProps, keyof StatefulRadioGroupProps>) => React.JSX.Element;
|
|
4
|
+
export default StatefulRadioGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 _statefulRadiogroupContainer = _interopRequireDefault(require("./stateful-radiogroup-container"));
|
|
9
|
+
var _radiogroup = _interopRequireDefault(require("./radiogroup"));
|
|
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); }
|
|
12
|
+
/*
|
|
13
|
+
Copyright (c) Uber Technologies, Inc.
|
|
14
|
+
|
|
15
|
+
This source code is licensed under the MIT license found in the
|
|
16
|
+
LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const StatefulRadioGroup = function (props) {
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
...restProps
|
|
23
|
+
} = props;
|
|
24
|
+
return /*#__PURE__*/React.createElement(_statefulRadiogroupContainer.default, restProps, childrenProps => /*#__PURE__*/React.createElement(_radiogroup.default, childrenProps, children));
|
|
25
|
+
};
|
|
26
|
+
var _default = exports.default = StatefulRadioGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StyleProps } from './types';
|
|
2
|
+
export declare const RadioGroupRoot: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
3
|
+
export declare const Root: import("styletron-react").StyletronComponent<"label", StyleProps>;
|
|
4
|
+
export declare const RadioBackplate: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
5
|
+
export declare const RadioMarkInner: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
6
|
+
export declare const RadioMarkOuter: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
7
|
+
export declare const LabelWrapper: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
8
|
+
export declare const Label: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
9
|
+
export declare const Input: import("styletron-react").StyletronComponent<"input", {}>;
|
|
10
|
+
export declare const Description: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Root = exports.RadioMarkOuter = exports.RadioMarkInner = exports.RadioGroupRoot = exports.RadioBackplate = exports.LabelWrapper = exports.Label = exports.Input = exports.Description = void 0;
|
|
7
|
+
var _styles = require("../styles");
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
var _getSharedStyles = require("../utils/get-shared-styles");
|
|
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
|
+
function getOuterColor(props) {
|
|
18
|
+
const {
|
|
19
|
+
$theme: {
|
|
20
|
+
colors
|
|
21
|
+
},
|
|
22
|
+
$disabled,
|
|
23
|
+
$error
|
|
24
|
+
} = props;
|
|
25
|
+
return $disabled ? colors.contentStateDisabled : $error ? colors.tagRedBorderSecondarySelected : colors.contentPrimary;
|
|
26
|
+
}
|
|
27
|
+
function getLabelColor(props) {
|
|
28
|
+
const {
|
|
29
|
+
$disabled,
|
|
30
|
+
$theme
|
|
31
|
+
} = props;
|
|
32
|
+
const {
|
|
33
|
+
colors
|
|
34
|
+
} = $theme;
|
|
35
|
+
return $disabled ? colors.contentSecondary : colors.contentPrimary;
|
|
36
|
+
}
|
|
37
|
+
const RadioGroupRoot = exports.RadioGroupRoot = (0, _styles.styled)('div', props => {
|
|
38
|
+
const {
|
|
39
|
+
$align,
|
|
40
|
+
$labelPlacement
|
|
41
|
+
} = props;
|
|
42
|
+
return {
|
|
43
|
+
display: 'flex',
|
|
44
|
+
flexWrap: 'wrap',
|
|
45
|
+
flexDirection: $align === _constants.ALIGN.horizontal ? 'row' : 'column',
|
|
46
|
+
alignItems: $align === _constants.ALIGN.horizontal && $labelPlacement === _constants.LABEL_PLACEMENT.top ? 'flex-end' : 'flex-start',
|
|
47
|
+
columnGap: props.$theme.sizing.scale600,
|
|
48
|
+
rowGap: props.$theme.sizing.scale300
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
RadioGroupRoot.displayName = "RadioGroupRoot";
|
|
52
|
+
RadioGroupRoot.displayName = 'RadioGroupRoot';
|
|
53
|
+
const Root = exports.Root = (0, _styles.styled)('label', props => {
|
|
54
|
+
const {
|
|
55
|
+
$disabled,
|
|
56
|
+
$labelPlacement,
|
|
57
|
+
$theme
|
|
58
|
+
} = props;
|
|
59
|
+
const {
|
|
60
|
+
sizing
|
|
61
|
+
} = $theme;
|
|
62
|
+
const isHorizontalLabelPlacement = $labelPlacement === _constants.LABEL_PLACEMENT.left || $labelPlacement === _constants.LABEL_PLACEMENT.right;
|
|
63
|
+
const isVerticalLabelPlacement = $labelPlacement === _constants.LABEL_PLACEMENT.top || $labelPlacement === _constants.LABEL_PLACEMENT.bottom;
|
|
64
|
+
return {
|
|
65
|
+
flexDirection: isVerticalLabelPlacement ? 'column' : 'row',
|
|
66
|
+
display: 'inline-flex',
|
|
67
|
+
alignItems: isHorizontalLabelPlacement ? 'flex-start' : 'center',
|
|
68
|
+
cursor: $disabled ? 'not-allowed' : 'pointer',
|
|
69
|
+
...(isVerticalLabelPlacement ? {
|
|
70
|
+
rowGap: sizing.scale100
|
|
71
|
+
} : isHorizontalLabelPlacement ? {
|
|
72
|
+
columnGap: sizing.scale100
|
|
73
|
+
} : {}),
|
|
74
|
+
'@media (pointer: coarse)': {
|
|
75
|
+
// Increase target size for touch devices to meet the minimum touch target size of 48x48dp
|
|
76
|
+
padding: sizing.scale300
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
Root.displayName = "Root";
|
|
81
|
+
Root.displayName = 'Root';
|
|
82
|
+
const RadioBackplate = exports.RadioBackplate = (0, _styles.styled)('div', props => {
|
|
83
|
+
const {
|
|
84
|
+
sizing
|
|
85
|
+
} = props.$theme;
|
|
86
|
+
const {
|
|
87
|
+
hoveredColor,
|
|
88
|
+
pressedColor
|
|
89
|
+
} = (0, _getSharedStyles.getOverlayColor)(props);
|
|
90
|
+
return {
|
|
91
|
+
position: 'relative',
|
|
92
|
+
display: 'flex',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
justifyContent: 'center',
|
|
95
|
+
boxSizing: 'border-box',
|
|
96
|
+
borderRadius: sizing.scale300,
|
|
97
|
+
paddingTop: sizing.scale300,
|
|
98
|
+
paddingBottom: sizing.scale300,
|
|
99
|
+
paddingLeft: sizing.scale300,
|
|
100
|
+
paddingRight: sizing.scale300,
|
|
101
|
+
'@media (hover: hover)': {
|
|
102
|
+
':hover': {
|
|
103
|
+
backgroundColor: hoveredColor
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
':active': {
|
|
107
|
+
backgroundColor: pressedColor
|
|
108
|
+
},
|
|
109
|
+
minHeight: sizing.scale900,
|
|
110
|
+
minWidth: sizing.scale900
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
RadioBackplate.displayName = "RadioBackplate";
|
|
114
|
+
RadioBackplate.displayName = 'RadioBackplate';
|
|
115
|
+
const RadioMarkInner = exports.RadioMarkInner = (0, _styles.styled)('div', props => {
|
|
116
|
+
const {
|
|
117
|
+
$theme,
|
|
118
|
+
$checked,
|
|
119
|
+
$isActive,
|
|
120
|
+
$isHovered,
|
|
121
|
+
$disabled
|
|
122
|
+
} = props;
|
|
123
|
+
const {
|
|
124
|
+
animation,
|
|
125
|
+
colors
|
|
126
|
+
} = $theme;
|
|
127
|
+
const {
|
|
128
|
+
hoveredColor,
|
|
129
|
+
pressedColor
|
|
130
|
+
} = (0, _getSharedStyles.getOverlayColor)(props);
|
|
131
|
+
return {
|
|
132
|
+
borderTopLeftRadius: '50%',
|
|
133
|
+
borderTopRightRadius: '50%',
|
|
134
|
+
borderBottomRightRadius: '50%',
|
|
135
|
+
borderBottomLeftRadius: '50%',
|
|
136
|
+
height: $checked ? '5px' : '100%',
|
|
137
|
+
width: $checked ? '5px' : '100%',
|
|
138
|
+
backgroundColor: colors.contentInversePrimary,
|
|
139
|
+
// Add overlay for hover and pressed states with box-shadow (instead of background-color) to prevent RadioMarkOuter's background color bleeding through
|
|
140
|
+
// We also want this visual effect when hovering/pressing on backplate so using $isActive, $isHovered instead of css selectors.
|
|
141
|
+
boxShadow: !$disabled ? $isHovered ? `inset 999px 999px 0px ${hoveredColor}` : $isActive ? `inset 999px 999px 0px ${pressedColor}` : 'none' : 'none',
|
|
142
|
+
// Animations for height and width changes - transition when checking/unchecking radio
|
|
143
|
+
transitionProperty: 'width, height',
|
|
144
|
+
transitionDuration: animation.timing200,
|
|
145
|
+
transitionTimingFunction: animation.easeOutCurve
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
RadioMarkInner.displayName = "RadioMarkInner";
|
|
149
|
+
RadioMarkInner.displayName = 'RadioMarkInner';
|
|
150
|
+
const RadioMarkOuter = exports.RadioMarkOuter = (0, _styles.styled)('div', props => {
|
|
151
|
+
const {
|
|
152
|
+
$theme,
|
|
153
|
+
$checked,
|
|
154
|
+
$isFocusVisible
|
|
155
|
+
} = props;
|
|
156
|
+
const {
|
|
157
|
+
sizing
|
|
158
|
+
} = $theme;
|
|
159
|
+
const focusRingStyle = (0, _getSharedStyles.getFocusOutlineStyle)($theme);
|
|
160
|
+
return {
|
|
161
|
+
display: 'flex',
|
|
162
|
+
height: '17px',
|
|
163
|
+
width: '17px',
|
|
164
|
+
alignItems: 'center',
|
|
165
|
+
justifyContent: 'center',
|
|
166
|
+
flexShrink: 0,
|
|
167
|
+
boxSizing: 'border-box',
|
|
168
|
+
borderWidth: sizing.scale0,
|
|
169
|
+
borderStyle: 'solid',
|
|
170
|
+
borderColor: getOuterColor(props),
|
|
171
|
+
backgroundColor: getOuterColor(props),
|
|
172
|
+
borderTopLeftRadius: '50%',
|
|
173
|
+
borderTopRightRadius: '50%',
|
|
174
|
+
borderBottomRightRadius: '50%',
|
|
175
|
+
borderBottomLeftRadius: '50%',
|
|
176
|
+
verticalAlign: 'middle',
|
|
177
|
+
...($checked && $isFocusVisible ? focusRingStyle : {})
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
RadioMarkOuter.displayName = "RadioMarkOuter";
|
|
181
|
+
RadioMarkOuter.displayName = 'RadioMarkOuter';
|
|
182
|
+
const LabelWrapper = exports.LabelWrapper = (0, _styles.styled)('div', props => {
|
|
183
|
+
const {
|
|
184
|
+
$labelPlacement,
|
|
185
|
+
$theme,
|
|
186
|
+
$align
|
|
187
|
+
} = props;
|
|
188
|
+
const {
|
|
189
|
+
sizing
|
|
190
|
+
} = $theme;
|
|
191
|
+
return {
|
|
192
|
+
display: 'flex',
|
|
193
|
+
flexDirection: 'column',
|
|
194
|
+
alignItems: 'flex-start',
|
|
195
|
+
// don't stretch label and description(for example, when label is a select component)
|
|
196
|
+
...($labelPlacement === _constants.LABEL_PLACEMENT.left || $labelPlacement === _constants.LABEL_PLACEMENT.right ? {
|
|
197
|
+
paddingTop: sizing.scale300
|
|
198
|
+
} : {}),
|
|
199
|
+
// add top padding when label is on left/right to align with radio center
|
|
200
|
+
rowGap: sizing.scale0,
|
|
201
|
+
//Horizontal: Not recommended when the text needs to wrap. If necessary, let the text wrap to 3 lines maximum and truncate.
|
|
202
|
+
...($align === _constants.ALIGN.horizontal ? {
|
|
203
|
+
maxWidth: '240px'
|
|
204
|
+
} : {})
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
LabelWrapper.displayName = "LabelWrapper";
|
|
208
|
+
LabelWrapper.displayName = 'LabelWrapper';
|
|
209
|
+
|
|
210
|
+
// This style is design from horizontal alignment
|
|
211
|
+
// Not recommended when the text needs to wrap. If necessary, let the text wrap to 3 lines maximum and truncate.
|
|
212
|
+
const max3LinesStyle = {
|
|
213
|
+
overflow: 'hidden',
|
|
214
|
+
textOverflow: 'ellipsis',
|
|
215
|
+
display: '-webkit-box',
|
|
216
|
+
WebkitLineClamp: 3,
|
|
217
|
+
WebkitBoxOrient: 'vertical'
|
|
218
|
+
};
|
|
219
|
+
const Label = exports.Label = (0, _styles.styled)('div', props => {
|
|
220
|
+
const {
|
|
221
|
+
$theme: {
|
|
222
|
+
typography
|
|
223
|
+
},
|
|
224
|
+
$align
|
|
225
|
+
} = props;
|
|
226
|
+
return {
|
|
227
|
+
verticalAlign: 'middle',
|
|
228
|
+
color: getLabelColor(props),
|
|
229
|
+
...typography.LabelSmall,
|
|
230
|
+
...($align === _constants.ALIGN.horizontal ? max3LinesStyle : {})
|
|
231
|
+
};
|
|
232
|
+
});
|
|
233
|
+
Label.displayName = "Label";
|
|
234
|
+
Label.displayName = 'Label';
|
|
235
|
+
|
|
236
|
+
// tricky style for focus event cause display: none doesn't work
|
|
237
|
+
const Input = exports.Input = (0, _styles.styled)('input', {
|
|
238
|
+
width: 0,
|
|
239
|
+
height: 0,
|
|
240
|
+
marginTop: 0,
|
|
241
|
+
marginRight: 0,
|
|
242
|
+
marginBottom: 0,
|
|
243
|
+
marginLeft: 0,
|
|
244
|
+
paddingTop: 0,
|
|
245
|
+
paddingRight: 0,
|
|
246
|
+
paddingBottom: 0,
|
|
247
|
+
paddingLeft: 0,
|
|
248
|
+
clip: 'rect(0 0 0 0)',
|
|
249
|
+
position: 'absolute'
|
|
250
|
+
});
|
|
251
|
+
Input.displayName = "Input";
|
|
252
|
+
Input.displayName = 'Input';
|
|
253
|
+
const Description = exports.Description = (0, _styles.styled)('div', props => {
|
|
254
|
+
const {
|
|
255
|
+
$theme,
|
|
256
|
+
$align
|
|
257
|
+
} = props;
|
|
258
|
+
return {
|
|
259
|
+
...$theme.typography.ParagraphSmall,
|
|
260
|
+
color: $theme.colors.contentSecondary,
|
|
261
|
+
cursor: 'auto',
|
|
262
|
+
...($align === _constants.ALIGN.horizontal ? max3LinesStyle : {})
|
|
263
|
+
};
|
|
264
|
+
});
|
|
265
|
+
Description.displayName = "Description";
|
|
266
|
+
Description.displayName = 'Description';
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { Override } from '../helpers/overrides';
|
|
3
|
+
import type { ALIGN, LABEL_PLACEMENT } from './constants';
|
|
4
|
+
export type LabelPlacement = keyof typeof LABEL_PLACEMENT;
|
|
5
|
+
export type Align = keyof typeof ALIGN;
|
|
6
|
+
export type RadioOverrides = {
|
|
7
|
+
RadioBackplate?: Override;
|
|
8
|
+
RadioMarkInner?: Override;
|
|
9
|
+
RadioMarkOuter?: Override;
|
|
10
|
+
Label?: Override;
|
|
11
|
+
LabelWrapper?: Override;
|
|
12
|
+
Root?: Override;
|
|
13
|
+
Input?: Override;
|
|
14
|
+
Description?: Override;
|
|
15
|
+
};
|
|
16
|
+
export type RadioGroupOverrides = {
|
|
17
|
+
RadioGroupRoot?: Override;
|
|
18
|
+
};
|
|
19
|
+
export type DefaultProps = Partial<RadioGroupProps>;
|
|
20
|
+
export type RadioGroupProps = {
|
|
21
|
+
/** Id of element which contains a related caption */
|
|
22
|
+
'aria-describedby'?: string;
|
|
23
|
+
/** Id of element which contains a related error message */
|
|
24
|
+
'aria-errormessage'?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Used to define a string that labels the radio group. Use this prop if the label is not
|
|
27
|
+
* visible on screen. If the label is visible, use the 'aria-labeledby' prop instead.
|
|
28
|
+
*/
|
|
29
|
+
'aria-label'?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Establishes a relationship between the radio group and its label. Screen readers use this
|
|
32
|
+
* attribute to catalog the object on a page so that users can navigate between them.
|
|
33
|
+
*/
|
|
34
|
+
'aria-labelledby'?: string;
|
|
35
|
+
overrides?: RadioGroupOverrides;
|
|
36
|
+
/** As `children` in React native approach represents radio buttons inside of Radio Group. Can use `Radio` from this package. */
|
|
37
|
+
children?: Array<React.ReactNode>;
|
|
38
|
+
/** The value of radio button, which is preselected. */
|
|
39
|
+
value?: string;
|
|
40
|
+
/** Disabled all radio group from being changed. To disable some of radios provide disabled flag in each of them. */
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/** Set if the control is required to be checked. */
|
|
43
|
+
required?: boolean;
|
|
44
|
+
/** Sets radio group into error state. */
|
|
45
|
+
error?: boolean;
|
|
46
|
+
/** Set to be focused (active) on selected\checked radio. */
|
|
47
|
+
autoFocus?: boolean;
|
|
48
|
+
/** How to position radio buttons in the group. */
|
|
49
|
+
align?: Align;
|
|
50
|
+
/** String value for the name of RadioGroup, it is used to group buttons. If missed default is random ID string. */
|
|
51
|
+
name?: string;
|
|
52
|
+
/** How to position the label relative to the radio itself. */
|
|
53
|
+
labelPlacement?: LabelPlacement;
|
|
54
|
+
/** Unique id for RadioGroup, help ARIA to identify element */
|
|
55
|
+
id?: string;
|
|
56
|
+
/** Handler for change events on trigger element. */
|
|
57
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
58
|
+
/** Handler for mouseenter events on trigger element. */
|
|
59
|
+
onMouseEnter?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
60
|
+
/** Handler for mouseleave events on trigger element. */
|
|
61
|
+
onMouseLeave?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
62
|
+
/** Handler for focus events on trigger element. */
|
|
63
|
+
onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
64
|
+
/** Handler for blur events on trigger element. */
|
|
65
|
+
onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
66
|
+
};
|
|
67
|
+
export type State = {
|
|
68
|
+
value?: string;
|
|
69
|
+
};
|
|
70
|
+
export type RadioProps = {
|
|
71
|
+
/** Id of element which contains a related caption */
|
|
72
|
+
'aria-describedby'?: string;
|
|
73
|
+
/** Id of element which contains a related error message */
|
|
74
|
+
'aria-errormessage'?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Used to define a string that labels the radio. Use this prop if the label is not
|
|
77
|
+
* visible on screen. If the label is visible, use the 'aria-labeledby' prop instead.
|
|
78
|
+
*/
|
|
79
|
+
'aria-label'?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Establishes a relationship between the radio and its label. Screen readers use this
|
|
82
|
+
* attribute to catalog the object on a page so that users can navigate between them.
|
|
83
|
+
*/
|
|
84
|
+
'aria-labelledby'?: string;
|
|
85
|
+
/** Focus the radio on initial render. */
|
|
86
|
+
autoFocus?: boolean;
|
|
87
|
+
/** How the radio will be displayed along with its description. Controls spacing */
|
|
88
|
+
align?: Align;
|
|
89
|
+
/** Check or uncheck the control. */
|
|
90
|
+
checked?: boolean;
|
|
91
|
+
/** Label of radio. */
|
|
92
|
+
children?: React.ReactNode;
|
|
93
|
+
/** Indicates if this radio children contain an interactive element (prevents the label from moving focus from the child element to the radio button) */
|
|
94
|
+
containsInteractiveElement?: boolean;
|
|
95
|
+
/** Add more detail about a radio element. */
|
|
96
|
+
description?: string;
|
|
97
|
+
/** Disable the checkbox from being changed. */
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
/** Used to get a ref to the input element. Useful for programmatically focusing the input */
|
|
100
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
101
|
+
/** Renders checkbox in errored state. */
|
|
102
|
+
error?: boolean;
|
|
103
|
+
/** Is radio focused / active? */
|
|
104
|
+
isFocused?: boolean;
|
|
105
|
+
/** Is parent RadioGroup focused by keyboard? */
|
|
106
|
+
isFocusVisible?: boolean;
|
|
107
|
+
/** How to position the label relative to the checkbox itself. */
|
|
108
|
+
labelPlacement?: LabelPlacement;
|
|
109
|
+
/** Passed to the input element name attribute */
|
|
110
|
+
name?: string;
|
|
111
|
+
/** handler for blur events on trigger element. */
|
|
112
|
+
onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
113
|
+
/** Handler for change events on trigger element. */
|
|
114
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
115
|
+
/** handler for focus events on trigger element. */
|
|
116
|
+
onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
117
|
+
/** Handler for mouseenter events on trigger element. */
|
|
118
|
+
onMouseEnter?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
119
|
+
/** Handler for mouseleave events on trigger element. */
|
|
120
|
+
onMouseLeave?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
121
|
+
/** Handler for mousedown events on trigger element. */
|
|
122
|
+
onMouseDown?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
123
|
+
/** Handler for mouseup events on trigger element. */
|
|
124
|
+
onMouseUp?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
125
|
+
overrides?: RadioOverrides;
|
|
126
|
+
/** Marks the checkbox as required. */
|
|
127
|
+
required?: boolean;
|
|
128
|
+
/** Passed to the input element value attribute */
|
|
129
|
+
value?: string;
|
|
130
|
+
/** Passed to the input element, typically managed by RadioGroup */
|
|
131
|
+
tabIndex?: string;
|
|
132
|
+
};
|
|
133
|
+
export type RadioState = {
|
|
134
|
+
isActive: boolean;
|
|
135
|
+
isHovered: boolean;
|
|
136
|
+
};
|
|
137
|
+
export type StateReducer = (stateType: string, nextState: State, currentState: State, event: React.ChangeEvent<HTMLInputElement>) => State;
|
|
138
|
+
export type StatelessState = {
|
|
139
|
+
isFocusVisible: boolean;
|
|
140
|
+
focusedRadioIndex: number;
|
|
141
|
+
};
|
|
142
|
+
export type DefaultStatefulProps = {
|
|
143
|
+
initialState: State;
|
|
144
|
+
children?: (props: RadioGroupProps) => React.ReactNode;
|
|
145
|
+
stateReducer: StateReducer;
|
|
146
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
147
|
+
};
|
|
148
|
+
export type StatefulContainerProps = {
|
|
149
|
+
overrides?: RadioGroupOverrides;
|
|
150
|
+
/** Should return `RadioGroup` instance with standard or customized inner elements. */
|
|
151
|
+
children?: (props: RadioGroupProps) => React.ReactNode;
|
|
152
|
+
/** Initial state populated into the component */
|
|
153
|
+
initialState?: State;
|
|
154
|
+
/** Reducer function to manipulate internal state updates. */
|
|
155
|
+
stateReducer?: StateReducer;
|
|
156
|
+
/** Handler for change events on trigger element. */
|
|
157
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
158
|
+
/** Set to be focused (active) on selected\checked radio. */
|
|
159
|
+
autoFocus?: boolean;
|
|
160
|
+
};
|
|
161
|
+
export type StatefulRadioGroupProps = {
|
|
162
|
+
overrides?: RadioGroupOverrides;
|
|
163
|
+
/** A list of `Radio` components. */
|
|
164
|
+
children?: Array<React.ReactNode>;
|
|
165
|
+
/** Initial state populated into the component */
|
|
166
|
+
initialState?: State;
|
|
167
|
+
/** Set to be focused (active) on selected\checked radio. */
|
|
168
|
+
autoFocus?: boolean;
|
|
169
|
+
/** Handler for change events on trigger element. */
|
|
170
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
171
|
+
};
|
|
172
|
+
export type StyleProps = {
|
|
173
|
+
$align?: Align;
|
|
174
|
+
$checked: boolean;
|
|
175
|
+
$disabled: boolean;
|
|
176
|
+
$hasDescription: boolean;
|
|
177
|
+
$isActive: boolean;
|
|
178
|
+
$error: boolean;
|
|
179
|
+
$isFocused: boolean;
|
|
180
|
+
$isFocusVisible: boolean;
|
|
181
|
+
$isHovered: boolean;
|
|
182
|
+
$labelPlacement: LabelPlacement;
|
|
183
|
+
$required: boolean;
|
|
184
|
+
$value: string;
|
|
185
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|