@veracity/vui 0.0.1 → 0.0.3
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/avatar/avatar.d.ts +6 -0
- package/avatar/avatar.js +85 -0
- package/avatar/avatar.types.d.ts +17 -0
- package/avatar/avatar.types.js +2 -0
- package/avatar/index.d.ts +3 -0
- package/avatar/index.js +20 -0
- package/avatar/theme.d.ts +56 -0
- package/avatar/theme.js +94 -0
- package/box/box.d.ts +1 -1
- package/box/box.js +3 -3
- package/button/button.d.ts +1 -1
- package/button/button.js +10 -7
- package/button/buttonGroup.d.ts +6 -0
- package/button/buttonGroup.js +75 -0
- package/button/buttonGroup.types.d.ts +9 -0
- package/button/buttonGroup.types.js +2 -0
- package/button/context.d.ts +4 -0
- package/button/context.js +23 -0
- package/button/index.d.ts +3 -0
- package/button/index.js +3 -0
- package/button/theme.d.ts +1 -0
- package/button/theme.js +6 -0
- package/checkbox/checkbox.d.ts +10 -0
- package/checkbox/checkbox.js +111 -0
- package/checkbox/checkbox.types.d.ts +25 -0
- package/checkbox/checkbox.types.js +2 -0
- package/checkbox/checkboxGroup.d.ts +6 -0
- package/checkbox/checkboxGroup.js +80 -0
- package/checkbox/checkboxGroup.types.d.ts +12 -0
- package/checkbox/checkboxGroup.types.js +2 -0
- package/checkbox/context.d.ts +4 -0
- package/checkbox/context.js +23 -0
- package/checkbox/index.d.ts +6 -0
- package/checkbox/index.js +23 -0
- package/checkbox/theme.d.ts +49 -0
- package/checkbox/theme.js +57 -0
- package/controlLabel/controlLabel.d.ts +6 -0
- package/controlLabel/controlLabel.js +55 -0
- package/controlLabel/controlLabel.types.d.ts +10 -0
- package/controlLabel/controlLabel.types.js +2 -0
- package/controlLabel/index.d.ts +3 -0
- package/controlLabel/index.js +20 -0
- package/controlLabel/theme.d.ts +11 -0
- package/controlLabel/theme.js +15 -0
- package/core/globalStyle.d.ts +1 -1
- package/core/globalStyle.js +3 -2
- package/core/types.d.ts +4 -0
- package/core/utils.d.ts +8 -3
- package/core/utils.js +54 -7
- package/divider/divider.d.ts +6 -0
- package/divider/divider.js +57 -0
- package/divider/divider.types.d.ts +10 -0
- package/divider/divider.types.js +2 -0
- package/divider/index.d.ts +3 -0
- package/divider/index.js +20 -0
- package/divider/theme.d.ts +6 -0
- package/divider/theme.js +10 -0
- package/heading/heading.d.ts +1 -1
- package/heading/heading.js +4 -4
- package/icon/helpers.d.ts +3 -0
- package/icon/helpers.js +5 -1
- package/icon/icon.js +3 -2
- package/icon/icon.types.d.ts +16 -2
- package/icon/icons/cui/cuiCheckboxIndeterminate.d.ts +3 -0
- package/icon/icons/cui/cuiCheckboxIndeterminate.js +8 -0
- package/icon/icons/cui/cuiCheckboxSelected.d.ts +3 -0
- package/icon/icons/cui/cuiCheckboxSelected.js +8 -0
- package/icon/icons/cui/cuiCheckboxUnselected.d.ts +3 -0
- package/icon/icons/cui/cuiCheckboxUnselected.js +8 -0
- package/icon/icons/cui/cuiRadioSelected.d.ts +3 -0
- package/icon/icons/cui/cuiRadioSelected.js +8 -0
- package/icon/icons/cui/cuiRadioUnselected.d.ts +3 -0
- package/icon/icons/cui/cuiRadioUnselected.js +8 -0
- package/icon/icons/cul/culCovid.d.ts +1 -1
- package/icon/icons/cul/culCovid.js +1 -1
- package/icon/icons/cul/culDeepSearch.d.ts +1 -1
- package/icon/icons/cul/culDeepSearch.js +1 -1
- package/icon/icons/cul/culDotsMenu.d.ts +1 -1
- package/icon/icons/cul/culDotsMenu.js +1 -1
- package/icon/icons/cul/culGlobePlus.d.ts +1 -1
- package/icon/icons/cul/culGlobePlus.js +1 -1
- package/icon/icons/cul/culListDense.d.ts +1 -1
- package/icon/icons/cul/culListDense.js +1 -1
- package/icon/icons/cul/culMapMarkerStar.d.ts +1 -1
- package/icon/icons/cul/culMapMarkerStar.js +1 -1
- package/icon/icons/cul/culPlusThin.d.ts +1 -1
- package/icon/icons/cul/culPlusThin.js +1 -1
- package/icon/icons/cul/culScreenshot.d.ts +1 -1
- package/icon/icons/cul/culScreenshot.js +1 -1
- package/icon/icons/cul/culScreenshotAlt.d.ts +1 -1
- package/icon/icons/cul/culScreenshotAlt.js +1 -1
- package/icon/icons/cul/culShortcut.d.ts +1 -1
- package/icon/icons/cul/culShortcut.js +1 -1
- package/icon/icons/cul/culTimesThin.d.ts +1 -1
- package/icon/icons/cul/culTimesThin.js +1 -1
- package/icon/icons/cul/culTransformer.d.ts +1 -1
- package/icon/icons/cul/culTransformer.js +1 -1
- package/icon/icons/cul/culUserTransfer.d.ts +1 -1
- package/icon/icons/cul/culUserTransfer.js +1 -1
- package/icon/icons/cul/culVessel.d.ts +1 -1
- package/icon/icons/cul/culVessel.js +1 -1
- package/icon/icons/cul/culVesselGroup.d.ts +1 -1
- package/icon/icons/cul/culVesselGroup.js +1 -1
- package/icon/icons/cus/cusCheckboxSelected.d.ts +1 -1
- package/icon/icons/cus/cusCheckboxSelected.js +1 -1
- package/icon/icons/cus/cusDotFull.d.ts +1 -1
- package/icon/icons/cus/cusDotFull.js +1 -1
- package/icon/icons/cus/cusDotFullAlt.d.ts +1 -1
- package/icon/icons/cus/cusDotFullAlt.js +1 -1
- package/icon/icons/cus/cusDotsMenu.d.ts +1 -1
- package/icon/icons/cus/cusDotsMenu.js +1 -1
- package/icon/icons/cus/cusRadio.d.ts +1 -1
- package/icon/icons/cus/cusRadio.js +1 -1
- package/icon/icons/cus/cusSquareMinus.d.ts +1 -1
- package/icon/icons/cus/cusSquareMinus.js +1 -1
- package/icon/icons/cus/cusTransformer.d.ts +1 -1
- package/icon/icons/cus/cusTransformer.js +1 -1
- package/icon/icons/cus/cusVessel.d.ts +1 -1
- package/icon/icons/cus/cusVessel.js +1 -1
- package/icon/icons/fab/fabApplePay.d.ts +1 -1
- package/icon/icons/fab/fabApplePay.js +1 -1
- package/icon/icons/fab/fabBluetooth.d.ts +1 -1
- package/icon/icons/fab/fabBluetooth.js +1 -1
- package/icon/icons/fab/fabBtc.d.ts +1 -1
- package/icon/icons/fab/fabBtc.js +1 -1
- package/icon/icons/fab/fabCcAmazonPay.d.ts +1 -1
- package/icon/icons/fab/fabCcAmazonPay.js +1 -1
- package/icon/icons/fab/fabCcAmex.d.ts +1 -1
- package/icon/icons/fab/fabCcAmex.js +1 -1
- package/icon/icons/fab/fabCcApplePay.d.ts +1 -1
- package/icon/icons/fab/fabCcApplePay.js +1 -1
- package/icon/icons/fab/fabCcDinersClub.d.ts +1 -1
- package/icon/icons/fab/fabCcDinersClub.js +1 -1
- package/icon/icons/fab/fabCcMastercard.d.ts +1 -1
- package/icon/icons/fab/fabCcMastercard.js +1 -1
- package/icon/icons/fab/fabCcPaypal.d.ts +1 -1
- package/icon/icons/fab/fabCcPaypal.js +1 -1
- package/icon/icons/fab/fabCcVisa.d.ts +1 -1
- package/icon/icons/fab/fabCcVisa.js +1 -1
- package/icon/icons/fab/fabDhl.d.ts +1 -1
- package/icon/icons/fab/fabDhl.js +1 -1
- package/icon/icons/fab/fabEbay.d.ts +1 -1
- package/icon/icons/fab/fabEbay.js +1 -1
- package/icon/icons/fab/fabFacebook.d.ts +1 -1
- package/icon/icons/fab/fabFacebook.js +1 -1
- package/icon/icons/fab/fabFedex.d.ts +1 -1
- package/icon/icons/fab/fabFedex.js +1 -1
- package/icon/icons/fab/fabFirefox.d.ts +1 -1
- package/icon/icons/fab/fabFirefox.js +1 -1
- package/icon/icons/fab/fabGoogle.d.ts +1 -1
- package/icon/icons/fab/fabGoogle.js +1 -1
- package/icon/icons/fab/fabGoogleDrive.d.ts +1 -1
- package/icon/icons/fab/fabGoogleDrive.js +1 -1
- package/icon/icons/fab/fabLinkedinIn.d.ts +1 -1
- package/icon/icons/fab/fabLinkedinIn.js +1 -1
- package/icon/icons/fab/fabMedium.d.ts +1 -1
- package/icon/icons/fab/fabMedium.js +1 -1
- package/icon/icons/fab/fabOsi.d.ts +1 -1
- package/icon/icons/fab/fabOsi.js +1 -1
- package/icon/icons/fab/fabSlack.d.ts +1 -1
- package/icon/icons/fab/fabSlack.js +1 -1
- package/icon/icons/fab/fabTwitter.d.ts +1 -1
- package/icon/icons/fab/fabTwitter.js +1 -1
- package/icon/icons/fab/fabUps.d.ts +1 -1
- package/icon/icons/fab/fabUps.js +1 -1
- package/icon/icons/fal/falAddressBook.d.ts +1 -1
- package/icon/icons/fal/falAddressBook.js +1 -1
- package/icon/icons/fal/falAddressCard.d.ts +1 -1
- package/icon/icons/fal/falAddressCard.js +1 -1
- package/icon/icons/fal/falAnalytics.d.ts +1 -1
- package/icon/icons/fal/falAnalytics.js +1 -1
- package/icon/icons/fal/falAngleDoubleDown.d.ts +1 -1
- package/icon/icons/fal/falAngleDoubleDown.js +1 -1
- package/icon/icons/fal/falAngleDoubleLeft.d.ts +1 -1
- package/icon/icons/fal/falAngleDoubleLeft.js +1 -1
- package/icon/icons/fal/falAngleDoubleRight.d.ts +1 -1
- package/icon/icons/fal/falAngleDoubleRight.js +1 -1
- package/icon/icons/fal/falAngleDoubleUp.d.ts +1 -1
- package/icon/icons/fal/falAngleDoubleUp.js +1 -1
- package/icon/icons/fal/falAngleDown.d.ts +1 -1
- package/icon/icons/fal/falAngleDown.js +1 -1
- package/icon/icons/fal/falAngleLeft.d.ts +1 -1
- package/icon/icons/fal/falAngleLeft.js +1 -1
- package/icon/icons/fal/falAngleRight.d.ts +1 -1
- package/icon/icons/fal/falAngleRight.js +1 -1
- package/icon/icons/fal/falAngleUp.d.ts +1 -1
- package/icon/icons/fal/falAngleUp.js +1 -1
- package/icon/icons/fal/falArrowAltDown.d.ts +1 -1
- package/icon/icons/fal/falArrowAltDown.js +1 -1
- package/icon/icons/fal/falArrowAltLeft.d.ts +1 -1
- package/icon/icons/fal/falArrowAltLeft.js +1 -1
- package/icon/icons/fal/falArrowAltRight.d.ts +1 -1
- package/icon/icons/fal/falArrowAltRight.js +1 -1
- package/icon/icons/fal/falArrowAltUp.d.ts +1 -1
- package/icon/icons/fal/falArrowAltUp.js +1 -1
- package/icon/icons/fal/falArrowCircleDown.d.ts +1 -1
- package/icon/icons/fal/falArrowCircleDown.js +1 -1
- package/icon/icons/fal/falArrowCircleLeft.d.ts +1 -1
- package/icon/icons/fal/falArrowCircleLeft.js +1 -1
- package/icon/icons/fal/falArrowCircleRight.d.ts +1 -1
- package/icon/icons/fal/falArrowCircleRight.js +1 -1
- package/icon/icons/fal/falArrowCircleUp.d.ts +1 -1
- package/icon/icons/fal/falArrowCircleUp.js +1 -1
- package/icon/icons/fal/falArrowDown.d.ts +1 -1
- package/icon/icons/fal/falArrowDown.js +1 -1
- package/icon/icons/fal/falArrowFromBottom.d.ts +1 -1
- package/icon/icons/fal/falArrowFromBottom.js +1 -1
- package/icon/icons/fal/falArrowFromLeft.d.ts +1 -1
- package/icon/icons/fal/falArrowFromLeft.js +1 -1
- package/icon/icons/fal/falArrowFromRight.d.ts +1 -1
- package/icon/icons/fal/falArrowFromRight.js +1 -1
- package/icon/icons/fal/falArrowFromTop.d.ts +1 -1
- package/icon/icons/fal/falArrowFromTop.js +1 -1
- package/icon/icons/fal/falArrowLeft.d.ts +1 -1
- package/icon/icons/fal/falArrowLeft.js +1 -1
- package/icon/icons/fal/falArrowRight.d.ts +1 -1
- package/icon/icons/fal/falArrowRight.js +1 -1
- package/icon/icons/fal/falArrowToBottom.d.ts +1 -1
- package/icon/icons/fal/falArrowToBottom.js +1 -1
- package/icon/icons/fal/falArrowToLeft.d.ts +1 -1
- package/icon/icons/fal/falArrowToLeft.js +1 -1
- package/icon/icons/fal/falArrowToRight.d.ts +1 -1
- package/icon/icons/fal/falArrowToRight.js +1 -1
- package/icon/icons/fal/falArrowToTop.d.ts +1 -1
- package/icon/icons/fal/falArrowToTop.js +1 -1
- package/icon/icons/fal/falArrowUp.d.ts +1 -1
- package/icon/icons/fal/falArrowUp.js +1 -1
- package/icon/icons/fal/falArrows.d.ts +1 -1
- package/icon/icons/fal/falArrows.js +1 -1
- package/icon/icons/fal/falAward.d.ts +1 -1
- package/icon/icons/fal/falAward.js +1 -1
- package/icon/icons/fal/falBan.d.ts +1 -1
- package/icon/icons/fal/falBan.js +1 -1
- package/icon/icons/fal/falBell.d.ts +1 -1
- package/icon/icons/fal/falBell.js +1 -1
- package/icon/icons/fal/falBookOpen.d.ts +1 -1
- package/icon/icons/fal/falBookOpen.js +1 -1
- package/icon/icons/fal/falBroadcastTower.d.ts +1 -1
- package/icon/icons/fal/falBroadcastTower.js +1 -1
- package/icon/icons/fal/falBuilding.d.ts +1 -1
- package/icon/icons/fal/falBuilding.js +1 -1
- package/icon/icons/fal/falBullseye.d.ts +1 -1
- package/icon/icons/fal/falBullseye.js +1 -1
- package/icon/icons/fal/falCalendar.d.ts +1 -1
- package/icon/icons/fal/falCalendar.js +1 -1
- package/icon/icons/fal/falCalendarAlt.d.ts +1 -1
- package/icon/icons/fal/falCalendarAlt.js +1 -1
- package/icon/icons/fal/falCamera.d.ts +1 -1
- package/icon/icons/fal/falCamera.js +1 -1
- package/icon/icons/fal/falCaretDown.d.ts +1 -1
- package/icon/icons/fal/falCaretDown.js +1 -1
- package/icon/icons/fal/falCaretLeft.d.ts +1 -1
- package/icon/icons/fal/falCaretLeft.js +1 -1
- package/icon/icons/fal/falCaretRight.d.ts +1 -1
- package/icon/icons/fal/falCaretRight.js +1 -1
- package/icon/icons/fal/falCaretUp.d.ts +1 -1
- package/icon/icons/fal/falCaretUp.js +1 -1
- package/icon/icons/fal/falCauldron.d.ts +1 -1
- package/icon/icons/fal/falCauldron.js +1 -1
- package/icon/icons/fal/falChartArea.d.ts +1 -1
- package/icon/icons/fal/falChartArea.js +1 -1
- package/icon/icons/fal/falChartBar.d.ts +1 -1
- package/icon/icons/fal/falChartBar.js +1 -1
- package/icon/icons/fal/falChartLine.d.ts +1 -1
- package/icon/icons/fal/falChartLine.js +1 -1
- package/icon/icons/fal/falChartLineDown.d.ts +1 -1
- package/icon/icons/fal/falChartLineDown.js +1 -1
- package/icon/icons/fal/falChartNetwork.d.ts +1 -1
- package/icon/icons/fal/falChartNetwork.js +1 -1
- package/icon/icons/fal/falChartPie.d.ts +1 -1
- package/icon/icons/fal/falChartPie.js +1 -1
- package/icon/icons/fal/falChartPieAlt.d.ts +1 -1
- package/icon/icons/fal/falChartPieAlt.js +1 -1
- package/icon/icons/fal/falChartScatter.d.ts +1 -1
- package/icon/icons/fal/falChartScatter.js +1 -1
- package/icon/icons/fal/falCheck.d.ts +1 -1
- package/icon/icons/fal/falCheck.js +1 -1
- package/icon/icons/fal/falCheckCircle.d.ts +1 -1
- package/icon/icons/fal/falCheckCircle.js +1 -1
- package/icon/icons/fal/falCheckSquare.d.ts +1 -1
- package/icon/icons/fal/falCheckSquare.js +1 -1
- package/icon/icons/fal/falChevronCircleDown.d.ts +1 -1
- package/icon/icons/fal/falChevronCircleDown.js +1 -1
- package/icon/icons/fal/falChevronCircleLeft.d.ts +1 -1
- package/icon/icons/fal/falChevronCircleLeft.js +1 -1
- package/icon/icons/fal/falChevronCircleRight.d.ts +1 -1
- package/icon/icons/fal/falChevronCircleRight.js +1 -1
- package/icon/icons/fal/falChevronCircleUp.d.ts +1 -1
- package/icon/icons/fal/falChevronCircleUp.js +1 -1
- package/icon/icons/fal/falChevronDoubleDown.d.ts +1 -1
- package/icon/icons/fal/falChevronDoubleDown.js +1 -1
- package/icon/icons/fal/falChevronDoubleLeft.d.ts +1 -1
- package/icon/icons/fal/falChevronDoubleLeft.js +1 -1
- package/icon/icons/fal/falChevronDoubleRight.d.ts +1 -1
- package/icon/icons/fal/falChevronDoubleRight.js +1 -1
- package/icon/icons/fal/falChevronDoubleUp.d.ts +1 -1
- package/icon/icons/fal/falChevronDoubleUp.js +1 -1
- package/icon/icons/fal/falChevronDown.d.ts +1 -1
- package/icon/icons/fal/falChevronDown.js +1 -1
- package/icon/icons/fal/falChevronLeft.d.ts +1 -1
- package/icon/icons/fal/falChevronLeft.js +1 -1
- package/icon/icons/fal/falChevronRight.d.ts +1 -1
- package/icon/icons/fal/falChevronRight.js +1 -1
- package/icon/icons/fal/falChevronUp.d.ts +1 -1
- package/icon/icons/fal/falChevronUp.js +1 -1
- package/icon/icons/fal/falCircle.d.ts +1 -1
- package/icon/icons/fal/falCircle.js +1 -1
- package/icon/icons/fal/falCloud.d.ts +1 -1
- package/icon/icons/fal/falCloud.js +1 -1
- package/icon/icons/fal/falCloudShowersHeavy.d.ts +1 -1
- package/icon/icons/fal/falCloudShowersHeavy.js +1 -1
- package/icon/icons/fal/falCloudSnow.d.ts +1 -1
- package/icon/icons/fal/falCloudSnow.js +1 -1
- package/icon/icons/fal/falCloudSun.d.ts +1 -1
- package/icon/icons/fal/falCloudSun.js +1 -1
- package/icon/icons/fal/falCloudSunRain.d.ts +1 -1
- package/icon/icons/fal/falCloudSunRain.js +1 -1
- package/icon/icons/fal/falCloudUpload.d.ts +1 -1
- package/icon/icons/fal/falCloudUpload.js +1 -1
- package/icon/icons/fal/falCode.d.ts +1 -1
- package/icon/icons/fal/falCode.js +1 -1
- package/icon/icons/fal/falCog.d.ts +1 -1
- package/icon/icons/fal/falCog.js +1 -1
- package/icon/icons/fal/falCogs.d.ts +1 -1
- package/icon/icons/fal/falCogs.js +1 -1
- package/icon/icons/fal/falComment.d.ts +1 -1
- package/icon/icons/fal/falComment.js +1 -1
- package/icon/icons/fal/falCommentAlt.d.ts +1 -1
- package/icon/icons/fal/falCommentAlt.js +1 -1
- package/icon/icons/fal/falCompressAlt.d.ts +1 -1
- package/icon/icons/fal/falCompressAlt.js +1 -1
- package/icon/icons/fal/falCopy.d.ts +1 -1
- package/icon/icons/fal/falCopy.js +1 -1
- package/icon/icons/fal/falCreditCard.d.ts +1 -1
- package/icon/icons/fal/falCreditCard.js +1 -1
- package/icon/icons/fal/falDatabase.d.ts +1 -1
- package/icon/icons/fal/falDatabase.js +1 -1
- package/icon/icons/fal/falDotCircle.d.ts +1 -1
- package/icon/icons/fal/falDotCircle.js +1 -1
- package/icon/icons/fal/falDownload.d.ts +1 -1
- package/icon/icons/fal/falDownload.js +1 -1
- package/icon/icons/fal/falEdit.d.ts +1 -1
- package/icon/icons/fal/falEdit.js +1 -1
- package/icon/icons/fal/falEllipsisH.d.ts +1 -1
- package/icon/icons/fal/falEllipsisH.js +1 -1
- package/icon/icons/fal/falEllipsisV.d.ts +1 -1
- package/icon/icons/fal/falEllipsisV.js +1 -1
- package/icon/icons/fal/falEnvelope.d.ts +1 -1
- package/icon/icons/fal/falEnvelope.js +1 -1
- package/icon/icons/fal/falExchange.d.ts +1 -1
- package/icon/icons/fal/falExchange.js +1 -1
- package/icon/icons/fal/falExclamationCircle.d.ts +1 -1
- package/icon/icons/fal/falExclamationCircle.js +1 -1
- package/icon/icons/fal/falExclamationTriangle.d.ts +1 -1
- package/icon/icons/fal/falExclamationTriangle.js +1 -1
- package/icon/icons/fal/falExpandAlt.d.ts +1 -1
- package/icon/icons/fal/falExpandAlt.js +1 -1
- package/icon/icons/fal/falExternalLink.d.ts +1 -1
- package/icon/icons/fal/falExternalLink.js +1 -1
- package/icon/icons/fal/falEye.d.ts +1 -1
- package/icon/icons/fal/falEye.js +1 -1
- package/icon/icons/fal/falEyeSlash.d.ts +1 -1
- package/icon/icons/fal/falEyeSlash.js +1 -1
- package/icon/icons/fal/falFile.d.ts +1 -1
- package/icon/icons/fal/falFile.js +1 -1
- package/icon/icons/fal/falFileAlt.d.ts +1 -1
- package/icon/icons/fal/falFileAlt.js +1 -1
- package/icon/icons/fal/falFileArchive.d.ts +1 -1
- package/icon/icons/fal/falFileArchive.js +1 -1
- package/icon/icons/fal/falFileAudio.d.ts +1 -1
- package/icon/icons/fal/falFileAudio.js +1 -1
- package/icon/icons/fal/falFileCertificate.d.ts +1 -1
- package/icon/icons/fal/falFileCertificate.js +1 -1
- package/icon/icons/fal/falFileChartLine.d.ts +1 -1
- package/icon/icons/fal/falFileChartLine.js +1 -1
- package/icon/icons/fal/falFileChartPie.d.ts +1 -1
- package/icon/icons/fal/falFileChartPie.js +1 -1
- package/icon/icons/fal/falFileCheck.d.ts +1 -1
- package/icon/icons/fal/falFileCheck.js +1 -1
- package/icon/icons/fal/falFileCode.d.ts +1 -1
- package/icon/icons/fal/falFileCode.js +1 -1
- package/icon/icons/fal/falFileCsv.d.ts +1 -1
- package/icon/icons/fal/falFileCsv.js +1 -1
- package/icon/icons/fal/falFileEdit.d.ts +1 -1
- package/icon/icons/fal/falFileEdit.js +1 -1
- package/icon/icons/fal/falFileExcel.d.ts +1 -1
- package/icon/icons/fal/falFileExcel.js +1 -1
- package/icon/icons/fal/falFileImage.d.ts +1 -1
- package/icon/icons/fal/falFileImage.js +1 -1
- package/icon/icons/fal/falFilePdf.d.ts +1 -1
- package/icon/icons/fal/falFilePdf.js +1 -1
- package/icon/icons/fal/falFilePlus.d.ts +1 -1
- package/icon/icons/fal/falFilePlus.js +1 -1
- package/icon/icons/fal/falFilePowerpoint.d.ts +1 -1
- package/icon/icons/fal/falFilePowerpoint.js +1 -1
- package/icon/icons/fal/falFileSpreadsheet.d.ts +1 -1
- package/icon/icons/fal/falFileSpreadsheet.js +1 -1
- package/icon/icons/fal/falFileVideo.d.ts +1 -1
- package/icon/icons/fal/falFileVideo.js +1 -1
- package/icon/icons/fal/falFileWord.d.ts +1 -1
- package/icon/icons/fal/falFileWord.js +1 -1
- package/icon/icons/fal/falFilter.d.ts +1 -1
- package/icon/icons/fal/falFilter.js +1 -1
- package/icon/icons/fal/falFlag.d.ts +1 -1
- package/icon/icons/fal/falFlag.js +1 -1
- package/icon/icons/fal/falFolder.d.ts +1 -1
- package/icon/icons/fal/falFolder.js +1 -1
- package/icon/icons/fal/falFolderOpen.d.ts +1 -1
- package/icon/icons/fal/falFolderOpen.js +1 -1
- package/icon/icons/fal/falFolderPlus.d.ts +1 -1
- package/icon/icons/fal/falFolderPlus.js +1 -1
- package/icon/icons/fal/falFolders.d.ts +1 -1
- package/icon/icons/fal/falFolders.js +1 -1
- package/icon/icons/fal/falGlassesAlt.d.ts +1 -1
- package/icon/icons/fal/falGlassesAlt.js +1 -1
- package/icon/icons/fal/falGlobe.d.ts +1 -1
- package/icon/icons/fal/falGlobe.js +1 -1
- package/icon/icons/fal/falHome.d.ts +1 -1
- package/icon/icons/fal/falHome.js +1 -1
- package/icon/icons/fal/falHourglass.d.ts +1 -1
- package/icon/icons/fal/falHourglass.js +1 -1
- package/icon/icons/fal/falImage.d.ts +1 -1
- package/icon/icons/fal/falImage.js +1 -1
- package/icon/icons/fal/falInfoCircle.d.ts +1 -1
- package/icon/icons/fal/falInfoCircle.js +1 -1
- package/icon/icons/fal/falKey.d.ts +1 -1
- package/icon/icons/fal/falKey.js +1 -1
- package/icon/icons/fal/falLayerPlus.d.ts +1 -1
- package/icon/icons/fal/falLayerPlus.js +1 -1
- package/icon/icons/fal/falLink.d.ts +1 -1
- package/icon/icons/fal/falLink.js +1 -1
- package/icon/icons/fal/falList.d.ts +1 -1
- package/icon/icons/fal/falList.js +1 -1
- package/icon/icons/fal/falLockAlt.d.ts +1 -1
- package/icon/icons/fal/falLockAlt.js +1 -1
- package/icon/icons/fal/falLongArrowDown.d.ts +1 -1
- package/icon/icons/fal/falLongArrowDown.js +1 -1
- package/icon/icons/fal/falLongArrowLeft.d.ts +1 -1
- package/icon/icons/fal/falLongArrowLeft.js +1 -1
- package/icon/icons/fal/falLongArrowRight.d.ts +1 -1
- package/icon/icons/fal/falLongArrowRight.js +1 -1
- package/icon/icons/fal/falLongArrowUp.d.ts +1 -1
- package/icon/icons/fal/falLongArrowUp.js +1 -1
- package/icon/icons/fal/falMap.d.ts +1 -1
- package/icon/icons/fal/falMap.js +1 -1
- package/icon/icons/fal/falMapMarked.d.ts +1 -1
- package/icon/icons/fal/falMapMarked.js +1 -1
- package/icon/icons/fal/falMapMarkedAlt.d.ts +1 -1
- package/icon/icons/fal/falMapMarkedAlt.js +1 -1
- package/icon/icons/fal/falMapMarker.d.ts +1 -1
- package/icon/icons/fal/falMapMarker.js +1 -1
- package/icon/icons/fal/falMapMarkerAlt.d.ts +1 -1
- package/icon/icons/fal/falMapMarkerAlt.js +1 -1
- package/icon/icons/fal/falMapMarkerAltSlash.d.ts +1 -1
- package/icon/icons/fal/falMapMarkerAltSlash.js +1 -1
- package/icon/icons/fal/falMapMarkerCheck.d.ts +1 -1
- package/icon/icons/fal/falMapMarkerCheck.js +1 -1
- package/icon/icons/fal/falMapMarkerExclamation.d.ts +1 -1
- package/icon/icons/fal/falMapMarkerExclamation.js +1 -1
- package/icon/icons/fal/falMinus.d.ts +1 -1
- package/icon/icons/fal/falMinus.js +1 -1
- package/icon/icons/fal/falPause.d.ts +1 -1
- package/icon/icons/fal/falPause.js +1 -1
- package/icon/icons/fal/falPauseCircle.d.ts +1 -1
- package/icon/icons/fal/falPauseCircle.js +1 -1
- package/icon/icons/fal/falPen.d.ts +1 -1
- package/icon/icons/fal/falPen.js +1 -1
- package/icon/icons/fal/falPlay.d.ts +1 -1
- package/icon/icons/fal/falPlay.js +1 -1
- package/icon/icons/fal/falPlayCircle.d.ts +1 -1
- package/icon/icons/fal/falPlayCircle.js +1 -1
- package/icon/icons/fal/falPlug.d.ts +1 -1
- package/icon/icons/fal/falPlug.js +1 -1
- package/icon/icons/fal/falPlus.d.ts +1 -1
- package/icon/icons/fal/falPlus.js +1 -1
- package/icon/icons/fal/falPlusCircle.d.ts +1 -1
- package/icon/icons/fal/falPlusCircle.js +1 -1
- package/icon/icons/fal/falPlusSquare.d.ts +1 -1
- package/icon/icons/fal/falPlusSquare.js +1 -1
- package/icon/icons/fal/falPrint.d.ts +1 -1
- package/icon/icons/fal/falPrint.js +1 -1
- package/icon/icons/fal/falPuzzlePiece.d.ts +1 -1
- package/icon/icons/fal/falPuzzlePiece.js +1 -1
- package/icon/icons/fal/falReceipt.d.ts +1 -1
- package/icon/icons/fal/falReceipt.js +1 -1
- package/icon/icons/fal/falRedo.d.ts +1 -1
- package/icon/icons/fal/falRedo.js +1 -1
- package/icon/icons/fal/falSave.d.ts +1 -1
- package/icon/icons/fal/falSave.js +1 -1
- package/icon/icons/fal/falSearch.d.ts +1 -1
- package/icon/icons/fal/falSearch.js +1 -1
- package/icon/icons/fal/falSearchPlus.d.ts +1 -1
- package/icon/icons/fal/falSearchPlus.js +1 -1
- package/icon/icons/fal/falServer.d.ts +1 -1
- package/icon/icons/fal/falServer.js +1 -1
- package/icon/icons/fal/falShare.d.ts +1 -1
- package/icon/icons/fal/falShare.js +1 -1
- package/icon/icons/fal/falShareAll.d.ts +1 -1
- package/icon/icons/fal/falShareAll.js +1 -1
- package/icon/icons/fal/falShareAlt.d.ts +1 -1
- package/icon/icons/fal/falShareAlt.js +1 -1
- package/icon/icons/fal/falShieldAlt.d.ts +1 -1
- package/icon/icons/fal/falShieldAlt.js +1 -1
- package/icon/icons/fal/falShieldCheck.d.ts +1 -1
- package/icon/icons/fal/falShieldCheck.js +1 -1
- package/icon/icons/fal/falShip.d.ts +1 -1
- package/icon/icons/fal/falShip.js +1 -1
- package/icon/icons/fal/falShoppingBasket.d.ts +1 -1
- package/icon/icons/fal/falShoppingBasket.js +1 -1
- package/icon/icons/fal/falSignInAlt.d.ts +1 -1
- package/icon/icons/fal/falSignInAlt.js +1 -1
- package/icon/icons/fal/falSignOut.d.ts +1 -1
- package/icon/icons/fal/falSignOut.js +1 -1
- package/icon/icons/fal/falSignOutAlt.d.ts +1 -1
- package/icon/icons/fal/falSignOutAlt.js +1 -1
- package/icon/icons/fal/falSlidersV.d.ts +1 -1
- package/icon/icons/fal/falSlidersV.js +1 -1
- package/icon/icons/fal/falSnowBlowing.d.ts +1 -1
- package/icon/icons/fal/falSnowBlowing.js +1 -1
- package/icon/icons/fal/falSnowflake.d.ts +1 -1
- package/icon/icons/fal/falSnowflake.js +1 -1
- package/icon/icons/fal/falSolarPanel.d.ts +1 -1
- package/icon/icons/fal/falSolarPanel.js +1 -1
- package/icon/icons/fal/falSort.d.ts +1 -1
- package/icon/icons/fal/falSort.js +1 -1
- package/icon/icons/fal/falSpinner.d.ts +1 -1
- package/icon/icons/fal/falSpinner.js +1 -1
- package/icon/icons/fal/falSquare.d.ts +1 -1
- package/icon/icons/fal/falSquare.js +1 -1
- package/icon/icons/fal/falStepForward.d.ts +1 -1
- package/icon/icons/fal/falStepForward.js +1 -1
- package/icon/icons/fal/falStop.d.ts +1 -1
- package/icon/icons/fal/falStop.js +1 -1
- package/icon/icons/fal/falStopCircle.d.ts +1 -1
- package/icon/icons/fal/falStopCircle.js +1 -1
- package/icon/icons/fal/falStopwatch.d.ts +1 -1
- package/icon/icons/fal/falStopwatch.js +1 -1
- package/icon/icons/fal/falSuitcase.d.ts +1 -1
- package/icon/icons/fal/falSuitcase.js +1 -1
- package/icon/icons/fal/falSun.d.ts +1 -1
- package/icon/icons/fal/falSun.js +1 -1
- package/icon/icons/fal/falSync.d.ts +1 -1
- package/icon/icons/fal/falSync.js +1 -1
- package/icon/icons/fal/falTachometer.d.ts +1 -1
- package/icon/icons/fal/falTachometer.js +1 -1
- package/icon/icons/fal/falTemperatureHigh.d.ts +1 -1
- package/icon/icons/fal/falTemperatureHigh.js +1 -1
- package/icon/icons/fal/falTh.d.ts +1 -1
- package/icon/icons/fal/falTh.js +1 -1
- package/icon/icons/fal/falThLarge.d.ts +1 -1
- package/icon/icons/fal/falThLarge.js +1 -1
- package/icon/icons/fal/falThList.d.ts +1 -1
- package/icon/icons/fal/falThList.js +1 -1
- package/icon/icons/fal/falTimes.d.ts +1 -1
- package/icon/icons/fal/falTimes.js +1 -1
- package/icon/icons/fal/falTimesCircle.d.ts +1 -1
- package/icon/icons/fal/falTimesCircle.js +1 -1
- package/icon/icons/fal/falToggleOff.d.ts +1 -1
- package/icon/icons/fal/falToggleOff.js +1 -1
- package/icon/icons/fal/falToggleOn.d.ts +1 -1
- package/icon/icons/fal/falToggleOn.js +1 -1
- package/icon/icons/fal/falTrashAlt.d.ts +1 -1
- package/icon/icons/fal/falTrashAlt.js +1 -1
- package/icon/icons/fal/falUnlockAlt.d.ts +1 -1
- package/icon/icons/fal/falUnlockAlt.js +1 -1
- package/icon/icons/fal/falUser.d.ts +1 -1
- package/icon/icons/fal/falUser.js +1 -1
- package/icon/icons/fal/falUserChart.d.ts +1 -1
- package/icon/icons/fal/falUserChart.js +1 -1
- package/icon/icons/fal/falUserCircle.d.ts +1 -1
- package/icon/icons/fal/falUserCircle.js +1 -1
- package/icon/icons/fal/falUserCog.d.ts +1 -1
- package/icon/icons/fal/falUserCog.js +1 -1
- package/icon/icons/fal/falUserEdit.d.ts +1 -1
- package/icon/icons/fal/falUserEdit.js +1 -1
- package/icon/icons/fal/falUserFriends.d.ts +1 -1
- package/icon/icons/fal/falUserFriends.js +1 -1
- package/icon/icons/fal/falUserPlus.d.ts +1 -1
- package/icon/icons/fal/falUserPlus.js +1 -1
- package/icon/icons/fal/falUserShield.d.ts +1 -1
- package/icon/icons/fal/falUserShield.js +1 -1
- package/icon/icons/fal/falUserTimes.d.ts +1 -1
- package/icon/icons/fal/falUserTimes.js +1 -1
- package/icon/icons/fal/falUsers.d.ts +1 -1
- package/icon/icons/fal/falUsers.js +1 -1
- package/icon/icons/fal/falUsersClass.d.ts +1 -1
- package/icon/icons/fal/falUsersClass.js +1 -1
- package/icon/icons/fal/falWater.d.ts +1 -1
- package/icon/icons/fal/falWater.js +1 -1
- package/icon/icons/fal/falWind.d.ts +1 -1
- package/icon/icons/fal/falWind.js +1 -1
- package/icon/icons/fal/falWindTurbine.d.ts +1 -1
- package/icon/icons/fal/falWindTurbine.js +1 -1
- package/icon/icons/fal/falWrench.d.ts +1 -1
- package/icon/icons/fal/falWrench.js +1 -1
- package/icon/icons/fas/fasCaretDown.d.ts +1 -1
- package/icon/icons/fas/fasCaretDown.js +1 -1
- package/icon/icons/fas/fasCaretLeft.d.ts +1 -1
- package/icon/icons/fas/fasCaretLeft.js +1 -1
- package/icon/icons/fas/fasCaretRight.d.ts +1 -1
- package/icon/icons/fas/fasCaretRight.js +1 -1
- package/icon/icons/fas/fasCaretUp.d.ts +1 -1
- package/icon/icons/fas/fasCaretUp.js +1 -1
- package/icon/icons/fas/fasDiamond.d.ts +1 -1
- package/icon/icons/fas/fasDiamond.js +1 -1
- package/icon/icons/fas/fasFolder.d.ts +1 -1
- package/icon/icons/fas/fasFolder.js +1 -1
- package/icon/icons/fas/fasMapMarkerAlt.d.ts +1 -1
- package/icon/icons/fas/fasMapMarkerAlt.js +1 -1
- package/icon/icons/fas/fasMapMarkerExclamation.d.ts +1 -1
- package/icon/icons/fas/fasMapMarkerExclamation.js +1 -1
- package/icon/icons/fas/fasQuoteLeft.d.ts +1 -1
- package/icon/icons/fas/fasQuoteLeft.js +1 -1
- package/icon/icons/fas/fasQuoteRight.d.ts +1 -1
- package/icon/icons/fas/fasQuoteRight.js +1 -1
- package/icon/icons/fas/fasSolarPanel.d.ts +1 -1
- package/icon/icons/fas/fasSolarPanel.js +1 -1
- package/icon/icons/fas/fasSort.d.ts +1 -1
- package/icon/icons/fas/fasSort.js +1 -1
- package/icon/icons/fas/fasStar.d.ts +1 -1
- package/icon/icons/fas/fasStar.js +1 -1
- package/icon/icons/fas/fasWindTurbine.d.ts +1 -1
- package/icon/icons/fas/fasWindTurbine.js +1 -1
- package/icon/icons/types.d.ts +1 -13
- package/index.d.ts +6 -0
- package/index.js +6 -0
- package/input/consts.d.ts +4 -0
- package/input/consts.js +4 -0
- package/input/input.d.ts +6 -5
- package/input/input.js +13 -14
- package/input/input.types.d.ts +12 -12
- package/input/theme.d.ts +12 -0
- package/input/theme.js +19 -7
- package/label/label.d.ts +1 -1
- package/label/label.js +4 -5
- package/label/theme.d.ts +16 -0
- package/label/theme.js +45 -12
- package/link/link.d.ts +1 -1
- package/link/link.js +4 -4
- package/link/link.types.d.ts +1 -0
- package/link/theme.d.ts +27 -3
- package/link/theme.js +30 -3
- package/list/context.js +1 -1
- package/list/index.d.ts +1 -0
- package/list/index.js +1 -0
- package/list/list.d.ts +1 -1
- package/list/list.js +37 -8
- package/list/list.types.d.ts +7 -3
- package/list/listItem.d.ts +1 -1
- package/list/listItem.js +10 -9
- package/list/listItem.types.d.ts +6 -3
- package/list/theme.d.ts +12 -5
- package/list/theme.js +23 -5
- package/p/p.d.ts +1 -1
- package/p/p.js +3 -3
- package/package.json +1 -1
- package/radio/context.d.ts +4 -0
- package/radio/context.js +23 -0
- package/radio/index.d.ts +6 -0
- package/radio/index.js +23 -0
- package/radio/radio.d.ts +10 -0
- package/radio/radio.js +74 -0
- package/radio/radio.types.d.ts +23 -0
- package/radio/radio.types.js +2 -0
- package/radio/radioGroup.d.ts +6 -0
- package/radio/radioGroup.js +99 -0
- package/radio/radioGroup.types.d.ts +13 -0
- package/radio/radioGroup.types.js +2 -0
- package/radio/theme.d.ts +49 -0
- package/radio/theme.js +57 -0
- package/skeleton/skeleton.d.ts +1 -1
- package/skeleton/skeleton.js +4 -4
- package/skeleton/skeleton.types.d.ts +2 -2
- package/styles/animations.d.ts +10 -0
- package/styles/animations.js +9 -0
- package/styles/colors.d.ts +171 -0
- package/styles/colors.js +96 -0
- package/styles/durations.d.ts +7 -0
- package/styles/durations.js +8 -0
- package/styles/fontFaces.d.ts +2 -0
- package/styles/fontFaces.js +4 -0
- package/styles/fontSizes.d.ts +7 -0
- package/styles/fontSizes.js +8 -0
- package/styles/fontWeights.d.ts +7 -0
- package/styles/fontWeights.js +8 -0
- package/styles/fonts.d.ts +4 -2
- package/styles/fonts.js +3 -3
- package/styles/index.d.ts +10 -0
- package/styles/index.js +20 -1
- package/styles/radii.d.ts +7 -0
- package/styles/radii.js +8 -0
- package/styles/screens.d.ts +8 -0
- package/styles/screens.js +9 -0
- package/styles/shadows.d.ts +9 -0
- package/styles/shadows.js +11 -0
- package/svg/svg.d.ts +1 -1
- package/svg/svg.js +5 -5
- package/svg/svg.types.d.ts +3 -3
- package/switch/context.d.ts +4 -0
- package/switch/context.js +23 -0
- package/switch/index.d.ts +6 -0
- package/switch/index.js +23 -0
- package/switch/switch.d.ts +6 -0
- package/switch/switch.js +113 -0
- package/switch/switch.types.d.ts +20 -0
- package/switch/switch.types.js +2 -0
- package/switch/switchButton.d.ts +13 -0
- package/switch/switchButton.js +140 -0
- package/switch/switchButton.types.d.ts +24 -0
- package/switch/switchButton.types.js +2 -0
- package/switch/switchLabel.d.ts +3 -0
- package/switch/switchLabel.js +30 -0
- package/switch/theme.d.ts +87 -0
- package/switch/theme.js +113 -0
- package/system/typography.d.ts +22 -13
- package/t/t.d.ts +1 -1
- package/t/t.js +7 -5
- package/t/t.types.d.ts +7 -5
- package/textarea/textarea.d.ts +1 -1
- package/textarea/textarea.js +4 -4
- package/textarea/textarea.types.d.ts +2 -2
- package/textarea/theme.js +4 -4
- package/theme/components.d.ts +290 -8
- package/theme/components.js +36 -26
- package/theme/defaultTheme.d.ts +306 -23
- package/theme/foundations.d.ts +143 -0
- package/theme/foundations.js +20 -0
- package/utils/object.d.ts +1 -1
package/styles/index.js
CHANGED
|
@@ -13,8 +13,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.fonts = void 0;
|
|
16
|
+
exports.shadows = exports.screens = exports.radii = exports.fontWeights = exports.fontSizes = exports.fonts = exports.fontFaces = exports.durations = exports.colors = exports.animations = void 0;
|
|
17
17
|
__exportStar(require("./animations"), exports);
|
|
18
|
+
__exportStar(require("./colors"), exports);
|
|
18
19
|
__exportStar(require("./helpers"), exports);
|
|
20
|
+
var animations_1 = require("./animations");
|
|
21
|
+
Object.defineProperty(exports, "animations", { enumerable: true, get: function () { return __importDefault(animations_1).default; } });
|
|
22
|
+
var colors_1 = require("./colors");
|
|
23
|
+
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return __importDefault(colors_1).default; } });
|
|
24
|
+
var durations_1 = require("./durations");
|
|
25
|
+
Object.defineProperty(exports, "durations", { enumerable: true, get: function () { return __importDefault(durations_1).default; } });
|
|
26
|
+
var fontFaces_1 = require("./fontFaces");
|
|
27
|
+
Object.defineProperty(exports, "fontFaces", { enumerable: true, get: function () { return __importDefault(fontFaces_1).default; } });
|
|
19
28
|
var fonts_1 = require("./fonts");
|
|
20
29
|
Object.defineProperty(exports, "fonts", { enumerable: true, get: function () { return __importDefault(fonts_1).default; } });
|
|
30
|
+
var fontSizes_1 = require("./fontSizes");
|
|
31
|
+
Object.defineProperty(exports, "fontSizes", { enumerable: true, get: function () { return __importDefault(fontSizes_1).default; } });
|
|
32
|
+
var fontWeights_1 = require("./fontWeights");
|
|
33
|
+
Object.defineProperty(exports, "fontWeights", { enumerable: true, get: function () { return __importDefault(fontWeights_1).default; } });
|
|
34
|
+
var radii_1 = require("./radii");
|
|
35
|
+
Object.defineProperty(exports, "radii", { enumerable: true, get: function () { return __importDefault(radii_1).default; } });
|
|
36
|
+
var screens_1 = require("./screens");
|
|
37
|
+
Object.defineProperty(exports, "screens", { enumerable: true, get: function () { return __importDefault(screens_1).default; } });
|
|
38
|
+
var shadows_1 = require("./shadows");
|
|
39
|
+
Object.defineProperty(exports, "shadows", { enumerable: true, get: function () { return __importDefault(shadows_1).default; } });
|
package/styles/radii.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var colors_1 = require("./colors");
|
|
4
|
+
exports.default = {
|
|
5
|
+
0: "0px 0px 0px 0px " + colors_1.grey[80],
|
|
6
|
+
1: "0px 2px 7px -3px " + colors_1.grey[80],
|
|
7
|
+
2: "0px 6px 23px -8px " + colors_1.grey[80],
|
|
8
|
+
3: "0px 16px 42px -15px " + colors_1.grey[80],
|
|
9
|
+
4: "0px 18px 54px -8px " + colors_1.grey[80],
|
|
10
|
+
5: "0px 28px 77px -5px " + colors_1.grey[80]
|
|
11
|
+
};
|
package/svg/svg.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvgProps, SvgStyleProps } from './svg.types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const SvgBase: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {
|
|
3
3
|
[x: string]: {};
|
|
4
4
|
} & SvgStyleProps, never>;
|
|
5
5
|
export declare const Svg: import("styled-components").StyledComponent<"svg", never, SvgProps, never>;
|
package/svg/svg.js
CHANGED
|
@@ -100,7 +100,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
100
100
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
101
101
|
};
|
|
102
102
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103
|
-
exports.Svg = exports.
|
|
103
|
+
exports.Svg = exports.SvgBase = void 0;
|
|
104
104
|
var styled_components_1 = require("@xstyled/styled-components");
|
|
105
105
|
var react_1 = __importStar(require("react"));
|
|
106
106
|
var styled_components_2 = __importDefault(require("styled-components"));
|
|
@@ -108,10 +108,10 @@ var cache_1 = __importDefault(require("./cache"));
|
|
|
108
108
|
var helpers_1 = require("./helpers");
|
|
109
109
|
var core_1 = require("../core");
|
|
110
110
|
var utils_1 = require("../utils");
|
|
111
|
-
var generator = styled_components_1.compose(styled_components_1.animation, styled_components_1.color, styled_components_1.sizing, styled_components_1.space, styled_components_1.transform);
|
|
112
|
-
exports.
|
|
111
|
+
var generator = styled_components_1.compose(styled_components_1.animation, styled_components_1.color, styled_components_1.flexboxes, styled_components_1.sizing, styled_components_1.space, styled_components_1.transform);
|
|
112
|
+
exports.SvgBase = styled_components_2.default.svg.withConfig({
|
|
113
113
|
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
114
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\
|
|
114
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), generator);
|
|
115
115
|
exports.Svg = core_1.forwardRef(function (_a, ref) {
|
|
116
116
|
var children = _a.children, className = _a.className, src = _a.src, rest = __rest(_a, ["children", "className", "src"]);
|
|
117
117
|
var _b = __read(react_1.useState(helpers_1.initState()), 2), state = _b[0], setState = _b[1];
|
|
@@ -146,7 +146,7 @@ exports.Svg = core_1.forwardRef(function (_a, ref) {
|
|
|
146
146
|
src && loadSvg(src);
|
|
147
147
|
}, [src]);
|
|
148
148
|
var innerHTML = !children ? { __html: content } : undefined;
|
|
149
|
-
return (react_1.default.createElement(exports.
|
|
149
|
+
return (react_1.default.createElement(exports.SvgBase, __assign({ className: utils_1.cs('vui-svg', className), dangerouslySetInnerHTML: innerHTML, ref: ref, xmlns: "http://www.w3.org/2000/svg" }, svgAttributes, rest), children));
|
|
150
150
|
});
|
|
151
151
|
exports.Svg.displayName = 'Svg';
|
|
152
152
|
exports.default = exports.Svg;
|
package/svg/svg.types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SVGProps } from 'react';
|
|
2
|
-
import { AnimationProps, ColorProps, SizingProps, SpaceProps, TransformProps } from '../system';
|
|
2
|
+
import { AnimationProps, ColorProps, FlexboxesProps, SizingProps, SpaceProps, TransformProps } from '../system';
|
|
3
3
|
import { Dict } from '../utils';
|
|
4
|
-
export interface SvgProps extends Omit<SVGProps<SVGSVGElement>, 'transform'>, SvgStyleProps {
|
|
4
|
+
export interface SvgProps extends Omit<SVGProps<SVGSVGElement>, 'display' | 'order' | 'transform'>, SvgStyleProps {
|
|
5
5
|
src?: string;
|
|
6
6
|
}
|
|
7
7
|
export interface SvgState {
|
|
8
8
|
content?: string;
|
|
9
9
|
svgAttributes: Dict<string>;
|
|
10
10
|
}
|
|
11
|
-
export interface SvgStyleProps extends AnimationProps, ColorProps, SizingProps, SpaceProps, TransformProps {
|
|
11
|
+
export interface SvgStyleProps extends AnimationProps, ColorProps, FlexboxesProps, SizingProps, SpaceProps, TransformProps {
|
|
12
12
|
color?: string;
|
|
13
13
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.useSwitch = exports.SwitchProvider = void 0;
|
|
20
|
+
var core_1 = require("../core");
|
|
21
|
+
var _a = __read(core_1.createContext({ isOptional: true }), 2), SwitchProvider = _a[0], useSwitch = _a[1];
|
|
22
|
+
exports.SwitchProvider = SwitchProvider;
|
|
23
|
+
exports.useSwitch = useSwitch;
|
package/switch/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.default = void 0;
|
|
17
|
+
__exportStar(require("./switch"), exports);
|
|
18
|
+
__exportStar(require("./switch.types"), exports);
|
|
19
|
+
__exportStar(require("./switchButton"), exports);
|
|
20
|
+
__exportStar(require("./switchButton.types"), exports);
|
|
21
|
+
__exportStar(require("./switchLabel"), exports);
|
|
22
|
+
var switch_1 = require("./switch");
|
|
23
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(switch_1).default; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SwitchProps, SwitchStyleProps } from './switch.types';
|
|
2
|
+
export declare const SwitchBase: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {
|
|
3
|
+
[x: string]: {};
|
|
4
|
+
} & SwitchStyleProps, never>;
|
|
5
|
+
export declare const Switch: import("styled-components").StyledComponent<"span", never, SwitchProps, never>;
|
|
6
|
+
export default Switch;
|
package/switch/switch.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
+
var t = {};
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
+
t[p] = s[p];
|
|
40
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
+
t[p[i]] = s[p[i]];
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
};
|
|
47
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
48
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
49
|
+
if (!m) return o;
|
|
50
|
+
var i = m.call(o), r, ar = [], e;
|
|
51
|
+
try {
|
|
52
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
53
|
+
}
|
|
54
|
+
catch (error) { e = { error: error }; }
|
|
55
|
+
finally {
|
|
56
|
+
try {
|
|
57
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
58
|
+
}
|
|
59
|
+
finally { if (e) throw e.error; }
|
|
60
|
+
}
|
|
61
|
+
return ar;
|
|
62
|
+
};
|
|
63
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
64
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.Switch = exports.SwitchBase = void 0;
|
|
68
|
+
var styled_components_1 = require("@xstyled/styled-components");
|
|
69
|
+
var react_1 = __importStar(require("react"));
|
|
70
|
+
var styled_components_2 = __importDefault(require("styled-components"));
|
|
71
|
+
var context_1 = require("./context");
|
|
72
|
+
var switchButton_1 = require("./switchButton");
|
|
73
|
+
var switchLabel_1 = require("./switchLabel");
|
|
74
|
+
var core_1 = require("../core");
|
|
75
|
+
var t_1 = require("../t");
|
|
76
|
+
var utils_1 = require("../utils");
|
|
77
|
+
var generator = styled_components_1.compose(styled_components_1.flexboxes, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions);
|
|
78
|
+
exports.SwitchBase = styled_components_2.default.label.withConfig({
|
|
79
|
+
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
80
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\ttransition: all 0s ease-in-out;\n\twidth: fit-content;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tcolor: var(--vui-colors-disabled-font);\n\t\t}\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\ttransition: all 0s ease-in-out;\n\twidth: fit-content;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tcolor: var(--vui-colors-disabled-font);\n\t\t}\n\t}\n\n\t", "\n"])), t_1.TBase, generator);
|
|
81
|
+
exports.Switch = core_1.forwardRef(function (props, ref) {
|
|
82
|
+
var checked = props.checked, children = props.children, className = props.className, colorScheme = props.colorScheme, defaultChecked = props.defaultChecked, disabled = props.disabled, innerLabelOff = props.innerLabelOff, innerLabelOn = props.innerLabelOn, inputProps = props.inputProps, inputRef = props.inputRef, labelLeft = props.labelLeft, labelRight = props.labelRight, name = props.name, onChange = props.onChange, required = props.required, size = props.size, value = props.value, variant = props.variant, rest = __rest(props, ["checked", "children", "className", "colorScheme", "defaultChecked", "disabled", "innerLabelOff", "innerLabelOn", "inputProps", "inputRef", "labelLeft", "labelRight", "name", "onChange", "required", "size", "value", "variant"]);
|
|
83
|
+
var _a = __read(react_1.useState(defaultChecked), 2), isChecked = _a[0], setIsChecked = _a[1];
|
|
84
|
+
var styles = core_1.useStyleConfig('Switch', props);
|
|
85
|
+
react_1.useEffect(function () {
|
|
86
|
+
checked !== undefined && setIsChecked(checked);
|
|
87
|
+
}, [checked]);
|
|
88
|
+
var handleOnChange = react_1.useCallback(function (e) {
|
|
89
|
+
setIsChecked(e.target.checked);
|
|
90
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
91
|
+
}, [onChange]);
|
|
92
|
+
var context = react_1.useMemo(function () { return utils_1.filterUndefined({ colorScheme: colorScheme, disabled: disabled, isChecked: isChecked, name: name, size: size, value: value, variant: variant }); }, [
|
|
93
|
+
colorScheme,
|
|
94
|
+
disabled,
|
|
95
|
+
isChecked,
|
|
96
|
+
name,
|
|
97
|
+
size,
|
|
98
|
+
value,
|
|
99
|
+
variant
|
|
100
|
+
]);
|
|
101
|
+
var aliasedProps = utils_1.filterUndefined({
|
|
102
|
+
'data-checked': isChecked ? true : false,
|
|
103
|
+
'data-disabled': disabled ? true : false
|
|
104
|
+
});
|
|
105
|
+
return (react_1.default.createElement(context_1.SwitchProvider, { value: context },
|
|
106
|
+
react_1.default.createElement(exports.SwitchBase, __assign({ className: utils_1.cs('vui-switch', className), ref: ref }, styles.container, aliasedProps, rest), children ? (children) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
107
|
+
labelLeft && react_1.default.createElement(switchLabel_1.SwitchLabel, null, labelLeft),
|
|
108
|
+
react_1.default.createElement(switchButton_1.SwitchButton, __assign({}, { innerLabelOff: innerLabelOff, innerLabelOn: innerLabelOn, inputProps: inputProps, inputRef: inputRef, required: required }, { onChange: handleOnChange })),
|
|
109
|
+
labelRight && react_1.default.createElement(switchLabel_1.SwitchLabel, null, labelRight))))));
|
|
110
|
+
});
|
|
111
|
+
exports.Switch.displayName = 'Switch';
|
|
112
|
+
exports.default = exports.Switch;
|
|
113
|
+
var templateObject_1;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { FlexboxesProps, SizingProps, SpaceProps, TransitionsProps } from '../system';
|
|
3
|
+
import { ThemingProps } from '../theme';
|
|
4
|
+
export interface SwitchProps extends Omit<HTMLAttributes<HTMLLabelElement>, 'onChange'>, SwitchStyleProps, ThemingProps<'Switch'> {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
innerLabelOff?: React.ReactElement | string;
|
|
9
|
+
innerLabelOn?: React.ReactElement | string;
|
|
10
|
+
inputProps?: HTMLAttributes<HTMLInputElement>;
|
|
11
|
+
inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
|
|
12
|
+
labelLeft?: React.ReactElement | string;
|
|
13
|
+
labelRight?: React.ReactElement | string;
|
|
14
|
+
name?: string;
|
|
15
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
value?: number | string;
|
|
18
|
+
}
|
|
19
|
+
export interface SwitchStyleProps extends FlexboxesProps, SizingProps, SpaceProps, TransitionsProps {
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SwitchButtonProps, SwitchButtonStyleProps, SwitchThumbStyleProps, SwitchTrackStyleProps } from './switchButton.types';
|
|
2
|
+
export declare const SwitchInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const SwitchThumb: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
4
|
+
[x: string]: {};
|
|
5
|
+
} & SwitchThumbStyleProps, never>;
|
|
6
|
+
export declare const SwitchTrack: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
7
|
+
[x: string]: {};
|
|
8
|
+
} & SwitchTrackStyleProps, never>;
|
|
9
|
+
export declare const SwitchButtonBase: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
10
|
+
[x: string]: {};
|
|
11
|
+
} & SwitchButtonStyleProps, never>;
|
|
12
|
+
export declare const SwitchButton: import("styled-components").StyledComponent<"span", never, SwitchButtonProps, never>;
|
|
13
|
+
export default SwitchButton;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
+
var t = {};
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
+
t[p] = s[p];
|
|
40
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
+
t[p[i]] = s[p[i]];
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
};
|
|
47
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
48
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
49
|
+
if (!m) return o;
|
|
50
|
+
var i = m.call(o), r, ar = [], e;
|
|
51
|
+
try {
|
|
52
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
53
|
+
}
|
|
54
|
+
catch (error) { e = { error: error }; }
|
|
55
|
+
finally {
|
|
56
|
+
try {
|
|
57
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
58
|
+
}
|
|
59
|
+
finally { if (e) throw e.error; }
|
|
60
|
+
}
|
|
61
|
+
return ar;
|
|
62
|
+
};
|
|
63
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
64
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.SwitchButton = exports.SwitchButtonBase = exports.SwitchTrack = exports.SwitchThumb = exports.SwitchInput = void 0;
|
|
68
|
+
var styled_components_1 = require("@xstyled/styled-components");
|
|
69
|
+
var react_1 = __importStar(require("react"));
|
|
70
|
+
var styled_components_2 = __importDefault(require("styled-components"));
|
|
71
|
+
var context_1 = require("./context");
|
|
72
|
+
var core_1 = require("../core");
|
|
73
|
+
var utils_1 = require("../utils");
|
|
74
|
+
var buttonGenerator = styled_components_1.compose(styled_components_1.color, styled_components_1.fontSize, styled_components_1.sizing, styled_components_1.space);
|
|
75
|
+
var thumbGenerator = styled_components_1.compose(styled_components_1.borders, styled_components_1.backgroundColor, styled_components_1.layout, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions);
|
|
76
|
+
var trackGenerator = styled_components_1.compose(styled_components_1.borders, styled_components_1.backgroundColor, styled_components_1.color, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions);
|
|
77
|
+
exports.SwitchInput = styled_components_2.default.input(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tcursor: inherit;\n\theight: 100%;\n\tleft: 0;\n\tmargin: 0;\n\topacity: 0;\n\tpadding: 0;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n\tz-index: 1;\n"], ["\n\tcursor: inherit;\n\theight: 100%;\n\tleft: 0;\n\tmargin: 0;\n\topacity: 0;\n\tpadding: 0;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n\tz-index: 1;\n"])));
|
|
78
|
+
exports.SwitchThumb = styled_components_2.default.span.withConfig({
|
|
79
|
+
shouldForwardProp: core_1.shouldForwardProp(thumbGenerator.meta.props)
|
|
80
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: absolute;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"], ["\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tposition: absolute;\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"])), thumbGenerator);
|
|
81
|
+
exports.SwitchTrack = styled_components_2.default.span.withConfig({
|
|
82
|
+
shouldForwardProp: core_1.shouldForwardProp(trackGenerator.meta.props)
|
|
83
|
+
})(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tposition: relative;\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: inline-flex;\n\tposition: relative;\n\n\t", "\n"])), trackGenerator);
|
|
84
|
+
exports.SwitchButtonBase = styled_components_2.default.span.withConfig({
|
|
85
|
+
shouldForwardProp: core_1.shouldForwardProp(buttonGenerator.meta.props)
|
|
86
|
+
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n\tcolor: white;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tline-height: 1.333;\n\tposition: relative;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tborder-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-font);\n\t\t}\n\n\t\t", " {\n\t\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\t}\n\t}\n\n\t", "\n"], ["\n\tcolor: white;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tflex-shrink: 0;\n\tline-height: 1.333;\n\tposition: relative;\n\n\t&[data-disabled='true'] {\n\t\tcursor: not-allowed;\n\n\t\t", " {\n\t\t\tborder-color: var(--vui-colors-disabled-border);\n\t\t\tbackground-color: var(--vui-colors-disabled-font);\n\t\t}\n\n\t\t", " {\n\t\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\t}\n\t}\n\n\t", "\n"])), exports.SwitchThumb, exports.SwitchTrack, buttonGenerator);
|
|
87
|
+
exports.SwitchButton = core_1.forwardRef(function (props, ref) {
|
|
88
|
+
var _a;
|
|
89
|
+
var _b = (_a = context_1.useSwitch()) !== null && _a !== void 0 ? _a : {}, switchIsChecked = _b.isChecked, switchProps = __rest(_b, ["isChecked"]);
|
|
90
|
+
var mergedProps = __assign(__assign({}, switchProps), props);
|
|
91
|
+
var _c = core_1.omitThemingProps(mergedProps), checked = _c.checked, className = _c.className, defaultChecked = _c.defaultChecked, disabled = _c.disabled, innerLabelOff = _c.innerLabelOff, innerLabelOn = _c.innerLabelOn, inputProps = _c.inputProps, inputRef = _c.inputRef, name = _c.name, onBlur = _c.onBlur, onChange = _c.onChange, onFocus = _c.onFocus, required = _c.required, value = _c.value, rest = __rest(_c, ["checked", "className", "defaultChecked", "disabled", "innerLabelOff", "innerLabelOn", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "required", "value"]);
|
|
92
|
+
var _d = __read(react_1.useState(defaultChecked), 2), isChecked = _d[0], setIsChecked = _d[1];
|
|
93
|
+
var _e = __read(react_1.useState(false), 2), isFocused = _e[0], setIsFocused = _e[1];
|
|
94
|
+
var styles = core_1.useStyleConfig('Switch', mergedProps);
|
|
95
|
+
var isControlled = checked !== undefined || switchIsChecked !== undefined;
|
|
96
|
+
react_1.useEffect(function () {
|
|
97
|
+
if (isControlled) {
|
|
98
|
+
setIsChecked(checked !== null && checked !== void 0 ? checked : switchIsChecked);
|
|
99
|
+
}
|
|
100
|
+
}, [checked, isControlled, switchIsChecked]);
|
|
101
|
+
function handleOnBlur(e) {
|
|
102
|
+
setIsFocused(false);
|
|
103
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
104
|
+
}
|
|
105
|
+
function handleOnChange(e) {
|
|
106
|
+
!isControlled && setIsChecked(e.target.checked);
|
|
107
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
108
|
+
}
|
|
109
|
+
function handleOnFocus(e) {
|
|
110
|
+
setIsFocused(true);
|
|
111
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
112
|
+
}
|
|
113
|
+
var hDiff = (styles.thumb.h - styles.track.h) / 2;
|
|
114
|
+
var thumbOffset = "calc(100% - " + Math.abs(hDiff - styles.thumb.h) + "px)";
|
|
115
|
+
var labelOffset = styles.thumb.h - hDiff + 4 + "px";
|
|
116
|
+
var buttonProps = utils_1.filterUndefined({
|
|
117
|
+
'data-checked': isChecked ? true : false,
|
|
118
|
+
'data-disabled': disabled ? true : false,
|
|
119
|
+
'data-focused': isFocused ? true : false
|
|
120
|
+
});
|
|
121
|
+
var thumbProps = utils_1.filterUndefined({
|
|
122
|
+
left: isChecked ? thumbOffset : -hDiff,
|
|
123
|
+
ring: isFocused ? styles.thumb.ring : 0
|
|
124
|
+
});
|
|
125
|
+
var trackProps = utils_1.filterUndefined({
|
|
126
|
+
bg: isChecked ? styles.track.bg : 'grey.50',
|
|
127
|
+
pl: isChecked ? 1 : labelOffset,
|
|
128
|
+
pr: isChecked ? labelOffset : 1,
|
|
129
|
+
ring: isFocused ? styles.track.ring : 0
|
|
130
|
+
});
|
|
131
|
+
return (react_1.default.createElement(exports.SwitchButtonBase, __assign({ className: utils_1.cs('vui-switchButton', className), p: 1, ref: ref }, styles.button, buttonProps, rest),
|
|
132
|
+
react_1.default.createElement(exports.SwitchInput, __assign({ className: "vui-switchInput", onBlur: handleOnBlur, onChange: handleOnChange, onFocus: handleOnFocus, ref: inputRef, type: "checkbox" }, { checked: checked, defaultChecked: defaultChecked, disabled: disabled, name: name, required: required, value: value }, inputProps)),
|
|
133
|
+
react_1.default.createElement(exports.SwitchTrack, __assign({ borderRadius: 100, className: "vui-switchTrack", transitionDuration: "fast" }, styles.track, trackProps),
|
|
134
|
+
!isChecked && innerLabelOff,
|
|
135
|
+
react_1.default.createElement(exports.SwitchThumb, __assign({ borderRadius: "50%", className: "vui-switchThumb", transitionDuration: "fast" }, styles.thumb, thumbProps)),
|
|
136
|
+
isChecked && innerLabelOn)));
|
|
137
|
+
});
|
|
138
|
+
exports.SwitchButton.displayName = 'SwitchButton';
|
|
139
|
+
exports.default = exports.SwitchButton;
|
|
140
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { BackgroundColorProps, BordersProps, ColorProps, FontSizeProps, SizingProps, SpaceProps, TransformsProps, TransitionsProps } from '../system';
|
|
3
|
+
import { ThemingProps } from '../theme';
|
|
4
|
+
export interface SwitchButtonProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onBlur' | 'onChange' | 'onFocus'>, SwitchThumbStyleProps, ThemingProps<'Switch'> {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
colorScheme?: 'blue' | 'green' | 'prussian' | 'red';
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
innerLabelOff?: React.ReactElement | string;
|
|
9
|
+
innerLabelOn?: React.ReactElement | string;
|
|
10
|
+
inputProps?: HTMLAttributes<HTMLInputElement>;
|
|
11
|
+
inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
|
|
12
|
+
name?: string;
|
|
13
|
+
onBlur?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
onFocus?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
value?: number | string;
|
|
18
|
+
}
|
|
19
|
+
export interface SwitchButtonStyleProps extends ColorProps, FontSizeProps, SizingProps, SpaceProps {
|
|
20
|
+
}
|
|
21
|
+
export interface SwitchThumbStyleProps extends BackgroundColorProps, BordersProps, SizingProps, SpaceProps, TransformsProps, TransitionsProps {
|
|
22
|
+
}
|
|
23
|
+
export interface SwitchTrackStyleProps extends BackgroundColorProps, BordersProps, SizingProps, SpaceProps, TransitionsProps {
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SwitchLabel = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var context_1 = require("./context");
|
|
20
|
+
var core_1 = require("../core");
|
|
21
|
+
var t_1 = __importDefault(require("../t"));
|
|
22
|
+
exports.SwitchLabel = core_1.forwardRef(function (props, ref) {
|
|
23
|
+
var _a;
|
|
24
|
+
var switchProps = (_a = context_1.useSwitch()) !== null && _a !== void 0 ? _a : {};
|
|
25
|
+
var mergedProps = __assign(__assign({}, switchProps), props);
|
|
26
|
+
var styles = core_1.useStyleConfig('Switch', mergedProps);
|
|
27
|
+
return react_1.default.createElement(t_1.default, __assign({ ref: ref }, styles.label, props));
|
|
28
|
+
});
|
|
29
|
+
exports.SwitchLabel.displayName = 'SwitchLabel';
|
|
30
|
+
exports.default = exports.SwitchLabel;
|