@via-profit/ui-kit 0.1.0-rc.2 → 0.1.0-rc.21
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/Autocomplete/index.d.ts +46 -0
- package/Autocomplete/index.js +187 -0
- package/Autocomplete/popper-options.d.ts +4 -0
- package/Autocomplete/popper-options.js +33 -0
- package/Button/ButtonBase.d.ts +62 -0
- package/Button/ButtonBase.js +36 -0
- package/Button/ButtonContainer.d.ts +36 -0
- package/Button/ButtonContainer.js +56 -0
- package/Button/ButtonIconWrapper.d.ts +14 -0
- package/Button/ButtonIconWrapper.js +34 -0
- package/Button/ButtonOutlined.d.ts +5 -0
- package/Button/ButtonOutlined.js +87 -0
- package/Button/ButtonPlain.d.ts +5 -0
- package/Button/ButtonPlain.js +90 -0
- package/Button/ButtonStandard.d.ts +5 -0
- package/Button/ButtonStandard.js +110 -0
- package/Button/ButtonTextWrapper.d.ts +29 -0
- package/Button/ButtonTextWrapper.js +35 -0
- package/Button/index.d.ts +23 -0
- package/Button/index.js +31 -0
- package/CHANGELOG.md +0 -0
- package/Calendar/CalendarBottomBar.d.ts +4 -0
- package/Calendar/CalendarBottomBar.js +28 -0
- package/Calendar/CalendarCell.d.ts +8 -0
- package/Calendar/CalendarCell.js +59 -0
- package/Calendar/CalendarDateContainer.d.ts +6 -0
- package/Calendar/CalendarDateContainer.js +13 -0
- package/Calendar/CalendarEmptyCell.d.ts +4 -0
- package/Calendar/CalendarEmptyCell.js +29 -0
- package/Calendar/CalendarMonthControl.d.ts +6 -0
- package/Calendar/CalendarMonthControl.js +49 -0
- package/Calendar/CalendarPaper.d.ts +6 -0
- package/Calendar/CalendarPaper.js +19 -0
- package/Calendar/CalendarTopBar.d.ts +4 -0
- package/Calendar/CalendarTopBar.js +30 -0
- package/Calendar/CalendarWeekDayLabel.d.ts +6 -0
- package/Calendar/CalendarWeekDayLabel.js +17 -0
- package/Calendar/CalendarWeekDaysBar.d.ts +10 -0
- package/Calendar/CalendarWeekDaysBar.js +32 -0
- package/Calendar/CalendarWeekRow.d.ts +6 -0
- package/Calendar/CalendarWeekRow.js +14 -0
- package/Calendar/IconChevronLeft.d.ts +3 -0
- package/Calendar/IconChevronLeft.js +9 -0
- package/Calendar/IconChevronRight.d.ts +3 -0
- package/Calendar/IconChevronRight.js +9 -0
- package/Calendar/index.d.ts +18 -0
- package/Calendar/index.js +166 -0
- package/Calendar/use-calendar.d.ts +50 -0
- package/Calendar/use-calendar.js +197 -0
- package/Color/index.d.ts +113 -0
- package/Color/index.js +444 -0
- package/CountryFlags/AC.d.ts +3 -0
- package/CountryFlags/AC.js +53 -0
- package/CountryFlags/AD.d.ts +3 -0
- package/CountryFlags/AD.js +39 -0
- package/CountryFlags/AE.d.ts +3 -0
- package/CountryFlags/AE.js +32 -0
- package/CountryFlags/AF.d.ts +3 -0
- package/CountryFlags/AF.js +33 -0
- package/CountryFlags/AG.d.ts +3 -0
- package/CountryFlags/AG.js +35 -0
- package/CountryFlags/AI.d.ts +3 -0
- package/CountryFlags/AI.js +37 -0
- package/CountryFlags/AL.d.ts +3 -0
- package/CountryFlags/AL.js +35 -0
- package/CountryFlags/AM.d.ts +3 -0
- package/CountryFlags/AM.js +31 -0
- package/CountryFlags/AO.d.ts +3 -0
- package/CountryFlags/AO.js +35 -0
- package/CountryFlags/AQ.d.ts +3 -0
- package/CountryFlags/AQ.js +30 -0
- package/CountryFlags/AR.d.ts +3 -0
- package/CountryFlags/AR.js +31 -0
- package/CountryFlags/AS.d.ts +3 -0
- package/CountryFlags/AS.js +33 -0
- package/CountryFlags/AT.d.ts +3 -0
- package/CountryFlags/AT.js +30 -0
- package/CountryFlags/AU.d.ts +3 -0
- package/CountryFlags/AU.js +41 -0
- package/CountryFlags/AW.d.ts +3 -0
- package/CountryFlags/AW.js +33 -0
- package/CountryFlags/AX.d.ts +3 -0
- package/CountryFlags/AX.js +31 -0
- package/CountryFlags/AZ.d.ts +3 -0
- package/CountryFlags/AZ.js +34 -0
- package/CountryFlags/BA.d.ts +3 -0
- package/CountryFlags/BA.js +40 -0
- package/CountryFlags/BB.d.ts +3 -0
- package/CountryFlags/BB.js +32 -0
- package/CountryFlags/BD.d.ts +3 -0
- package/CountryFlags/BD.js +30 -0
- package/CountryFlags/BE.d.ts +3 -0
- package/CountryFlags/BE.js +31 -0
- package/CountryFlags/BF.d.ts +3 -0
- package/CountryFlags/BF.js +31 -0
- package/CountryFlags/BG.d.ts +3 -0
- package/CountryFlags/BG.js +31 -0
- package/CountryFlags/BH.d.ts +3 -0
- package/CountryFlags/BH.js +30 -0
- package/CountryFlags/BI.d.ts +3 -0
- package/CountryFlags/BI.js +36 -0
- package/CountryFlags/BJ.d.ts +3 -0
- package/CountryFlags/BJ.js +31 -0
- package/CountryFlags/BL.d.ts +3 -0
- package/CountryFlags/BL.js +39 -0
- package/CountryFlags/BM.d.ts +3 -0
- package/CountryFlags/BM.js +40 -0
- package/CountryFlags/BN.d.ts +3 -0
- package/CountryFlags/BN.js +34 -0
- package/CountryFlags/BO.d.ts +3 -0
- package/CountryFlags/BO.js +31 -0
- package/CountryFlags/BQ.d.ts +3 -0
- package/CountryFlags/BQ.js +33 -0
- package/CountryFlags/BR.d.ts +3 -0
- package/CountryFlags/BR.js +32 -0
- package/CountryFlags/BS.d.ts +3 -0
- package/CountryFlags/BS.js +32 -0
- package/CountryFlags/BT.d.ts +3 -0
- package/CountryFlags/BT.js +31 -0
- package/CountryFlags/BV.d.ts +3 -0
- package/CountryFlags/BV.js +33 -0
- package/CountryFlags/BW.d.ts +3 -0
- package/CountryFlags/BW.js +32 -0
- package/CountryFlags/BY.d.ts +3 -0
- package/CountryFlags/BY.js +35 -0
- package/CountryFlags/BZ.d.ts +3 -0
- package/CountryFlags/BZ.js +36 -0
- package/CountryFlags/CA.d.ts +3 -0
- package/CountryFlags/CA.js +31 -0
- package/CountryFlags/CC.d.ts +3 -0
- package/CountryFlags/CC.js +33 -0
- package/CountryFlags/CD.d.ts +3 -0
- package/CountryFlags/CD.js +32 -0
- package/CountryFlags/CF.d.ts +3 -0
- package/CountryFlags/CF.js +36 -0
- package/CountryFlags/CG.d.ts +3 -0
- package/CountryFlags/CG.js +31 -0
- package/CountryFlags/CH.d.ts +3 -0
- package/CountryFlags/CH.js +30 -0
- package/CountryFlags/CI.d.ts +3 -0
- package/CountryFlags/CI.js +31 -0
- package/CountryFlags/CK.d.ts +3 -0
- package/CountryFlags/CK.js +34 -0
- package/CountryFlags/CL.d.ts +3 -0
- package/CountryFlags/CL.js +32 -0
- package/CountryFlags/CM.d.ts +3 -0
- package/CountryFlags/CM.js +32 -0
- package/CountryFlags/CN.d.ts +3 -0
- package/CountryFlags/CN.js +31 -0
- package/CountryFlags/CO.d.ts +3 -0
- package/CountryFlags/CO.js +31 -0
- package/CountryFlags/CR.d.ts +3 -0
- package/CountryFlags/CR.js +31 -0
- package/CountryFlags/CU.d.ts +3 -0
- package/CountryFlags/CU.js +34 -0
- package/CountryFlags/CV.d.ts +3 -0
- package/CountryFlags/CV.js +33 -0
- package/CountryFlags/CW.d.ts +3 -0
- package/CountryFlags/CW.js +32 -0
- package/CountryFlags/CX.d.ts +3 -0
- package/CountryFlags/CX.js +35 -0
- package/CountryFlags/CY.d.ts +3 -0
- package/CountryFlags/CY.js +34 -0
- package/CountryFlags/CZ.d.ts +3 -0
- package/CountryFlags/CZ.js +31 -0
- package/CountryFlags/DE.d.ts +3 -0
- package/CountryFlags/DE.js +31 -0
- package/CountryFlags/DJ.d.ts +3 -0
- package/CountryFlags/DJ.js +32 -0
- package/CountryFlags/DK.d.ts +3 -0
- package/CountryFlags/DK.js +30 -0
- package/CountryFlags/DM.d.ts +3 -0
- package/CountryFlags/DM.js +39 -0
- package/CountryFlags/DO.d.ts +3 -0
- package/CountryFlags/DO.js +38 -0
- package/CountryFlags/DZ.d.ts +3 -0
- package/CountryFlags/DZ.js +33 -0
- package/CountryFlags/EC.d.ts +3 -0
- package/CountryFlags/EC.js +35 -0
- package/CountryFlags/EE.d.ts +3 -0
- package/CountryFlags/EE.js +31 -0
- package/CountryFlags/EG.d.ts +3 -0
- package/CountryFlags/EG.js +32 -0
- package/CountryFlags/EH.d.ts +3 -0
- package/CountryFlags/EH.js +34 -0
- package/CountryFlags/ER.d.ts +3 -0
- package/CountryFlags/ER.js +40 -0
- package/CountryFlags/ES.d.ts +3 -0
- package/CountryFlags/ES.js +34 -0
- package/CountryFlags/ET.d.ts +3 -0
- package/CountryFlags/ET.js +37 -0
- package/CountryFlags/EU.d.ts +3 -0
- package/CountryFlags/EU.js +30 -0
- package/CountryFlags/FI.d.ts +3 -0
- package/CountryFlags/FI.js +30 -0
- package/CountryFlags/FJ.d.ts +3 -0
- package/CountryFlags/FJ.js +36 -0
- package/CountryFlags/FK.d.ts +3 -0
- package/CountryFlags/FK.js +43 -0
- package/CountryFlags/FM.d.ts +3 -0
- package/CountryFlags/FM.js +31 -0
- package/CountryFlags/FO.d.ts +3 -0
- package/CountryFlags/FO.js +31 -0
- package/CountryFlags/FR.d.ts +3 -0
- package/CountryFlags/FR.js +31 -0
- package/CountryFlags/GA.d.ts +3 -0
- package/CountryFlags/GA.js +31 -0
- package/CountryFlags/GB.d.ts +3 -0
- package/CountryFlags/GB.js +36 -0
- package/CountryFlags/GD.d.ts +3 -0
- package/CountryFlags/GD.js +38 -0
- package/CountryFlags/GE.d.ts +3 -0
- package/CountryFlags/GE.js +31 -0
- package/CountryFlags/GEAB.d.ts +3 -0
- package/CountryFlags/GEAB.js +40 -0
- package/CountryFlags/GEOS.d.ts +3 -0
- package/CountryFlags/GEOS.js +31 -0
- package/CountryFlags/GF.d.ts +3 -0
- package/CountryFlags/GF.js +31 -0
- package/CountryFlags/GG.d.ts +3 -0
- package/CountryFlags/GG.js +31 -0
- package/CountryFlags/GH.d.ts +3 -0
- package/CountryFlags/GH.js +32 -0
- package/CountryFlags/GI.d.ts +3 -0
- package/CountryFlags/GI.js +34 -0
- package/CountryFlags/GL.d.ts +3 -0
- package/CountryFlags/GL.js +32 -0
- package/CountryFlags/GM.d.ts +3 -0
- package/CountryFlags/GM.js +32 -0
- package/CountryFlags/GN.d.ts +3 -0
- package/CountryFlags/GN.js +31 -0
- package/CountryFlags/GP.d.ts +3 -0
- package/CountryFlags/GP.js +31 -0
- package/CountryFlags/GQ.d.ts +3 -0
- package/CountryFlags/GQ.js +37 -0
- package/CountryFlags/GR.d.ts +3 -0
- package/CountryFlags/GR.js +35 -0
- package/CountryFlags/GS.d.ts +3 -0
- package/CountryFlags/GS.js +49 -0
- package/CountryFlags/GT.d.ts +3 -0
- package/CountryFlags/GT.js +33 -0
- package/CountryFlags/GU.d.ts +3 -0
- package/CountryFlags/GU.js +37 -0
- package/CountryFlags/GW.d.ts +3 -0
- package/CountryFlags/GW.js +32 -0
- package/CountryFlags/GY.d.ts +3 -0
- package/CountryFlags/GY.js +33 -0
- package/CountryFlags/HK.d.ts +3 -0
- package/CountryFlags/HK.js +32 -0
- package/CountryFlags/HM.d.ts +3 -0
- package/CountryFlags/HM.js +41 -0
- package/CountryFlags/HN.d.ts +3 -0
- package/CountryFlags/HN.js +31 -0
- package/CountryFlags/HR.d.ts +3 -0
- package/CountryFlags/HR.js +38 -0
- package/CountryFlags/HT.d.ts +3 -0
- package/CountryFlags/HT.js +36 -0
- package/CountryFlags/HU.d.ts +3 -0
- package/CountryFlags/HU.js +31 -0
- package/CountryFlags/IC.d.ts +3 -0
- package/CountryFlags/IC.js +31 -0
- package/CountryFlags/ID.d.ts +3 -0
- package/CountryFlags/ID.js +30 -0
- package/CountryFlags/IE.d.ts +3 -0
- package/CountryFlags/IE.js +31 -0
- package/CountryFlags/IL.d.ts +3 -0
- package/CountryFlags/IL.js +31 -0
- package/CountryFlags/IM.d.ts +3 -0
- package/CountryFlags/IM.js +31 -0
- package/CountryFlags/IN.d.ts +3 -0
- package/CountryFlags/IN.js +35 -0
- package/CountryFlags/IO.d.ts +3 -0
- package/CountryFlags/IO.js +41 -0
- package/CountryFlags/IQ.d.ts +3 -0
- package/CountryFlags/IQ.js +33 -0
- package/CountryFlags/IR.d.ts +3 -0
- package/CountryFlags/IR.js +34 -0
- package/CountryFlags/IS.d.ts +3 -0
- package/CountryFlags/IS.js +31 -0
- package/CountryFlags/IT.d.ts +3 -0
- package/CountryFlags/IT.js +31 -0
- package/CountryFlags/JE.d.ts +3 -0
- package/CountryFlags/JE.js +32 -0
- package/CountryFlags/JM.d.ts +3 -0
- package/CountryFlags/JM.js +32 -0
- package/CountryFlags/JO.d.ts +3 -0
- package/CountryFlags/JO.js +33 -0
- package/CountryFlags/JP.d.ts +3 -0
- package/CountryFlags/JP.js +30 -0
- package/CountryFlags/KE.d.ts +3 -0
- package/CountryFlags/KE.js +38 -0
- package/CountryFlags/KG.d.ts +3 -0
- package/CountryFlags/KG.js +35 -0
- package/CountryFlags/KH.d.ts +3 -0
- package/CountryFlags/KH.js +32 -0
- package/CountryFlags/KI.d.ts +3 -0
- package/CountryFlags/KI.js +35 -0
- package/CountryFlags/KM.d.ts +3 -0
- package/CountryFlags/KM.js +37 -0
- package/CountryFlags/KN.d.ts +3 -0
- package/CountryFlags/KN.js +34 -0
- package/CountryFlags/KP.d.ts +3 -0
- package/CountryFlags/KP.js +35 -0
- package/CountryFlags/KR.d.ts +3 -0
- package/CountryFlags/KR.js +38 -0
- package/CountryFlags/KW.d.ts +3 -0
- package/CountryFlags/KW.js +32 -0
- package/CountryFlags/KY.d.ts +3 -0
- package/CountryFlags/KY.js +41 -0
- package/CountryFlags/KZ.d.ts +3 -0
- package/CountryFlags/KZ.js +31 -0
- package/CountryFlags/LA.d.ts +3 -0
- package/CountryFlags/LA.js +32 -0
- package/CountryFlags/LB.d.ts +3 -0
- package/CountryFlags/LB.js +33 -0
- package/CountryFlags/LC.d.ts +3 -0
- package/CountryFlags/LC.js +32 -0
- package/CountryFlags/LI.d.ts +3 -0
- package/CountryFlags/LI.js +31 -0
- package/CountryFlags/LK.d.ts +3 -0
- package/CountryFlags/LK.js +36 -0
- package/CountryFlags/LR.d.ts +3 -0
- package/CountryFlags/LR.js +33 -0
- package/CountryFlags/LS.d.ts +3 -0
- package/CountryFlags/LS.js +33 -0
- package/CountryFlags/LT.d.ts +3 -0
- package/CountryFlags/LT.js +31 -0
- package/CountryFlags/LU.d.ts +3 -0
- package/CountryFlags/LU.js +31 -0
- package/CountryFlags/LV.d.ts +3 -0
- package/CountryFlags/LV.js +31 -0
- package/CountryFlags/LY.d.ts +3 -0
- package/CountryFlags/LY.js +34 -0
- package/CountryFlags/MA.d.ts +3 -0
- package/CountryFlags/MA.js +30 -0
- package/CountryFlags/MC.d.ts +3 -0
- package/CountryFlags/MC.js +30 -0
- package/CountryFlags/MD.d.ts +3 -0
- package/CountryFlags/MD.js +32 -0
- package/CountryFlags/ME.d.ts +3 -0
- package/CountryFlags/ME.js +32 -0
- package/CountryFlags/MF.d.ts +3 -0
- package/CountryFlags/MF.js +33 -0
- package/CountryFlags/MG.d.ts +3 -0
- package/CountryFlags/MG.js +31 -0
- package/CountryFlags/MH.d.ts +3 -0
- package/CountryFlags/MH.js +32 -0
- package/CountryFlags/MK.d.ts +3 -0
- package/CountryFlags/MK.js +33 -0
- package/CountryFlags/ML.d.ts +3 -0
- package/CountryFlags/ML.js +31 -0
- package/CountryFlags/MM.d.ts +3 -0
- package/CountryFlags/MM.js +32 -0
- package/CountryFlags/MN.d.ts +3 -0
- package/CountryFlags/MN.js +37 -0
- package/CountryFlags/MO.d.ts +3 -0
- package/CountryFlags/MO.js +34 -0
- package/CountryFlags/MP.d.ts +3 -0
- package/CountryFlags/MP.js +35 -0
- package/CountryFlags/MQ.d.ts +3 -0
- package/CountryFlags/MQ.js +32 -0
- package/CountryFlags/MR.d.ts +3 -0
- package/CountryFlags/MR.js +32 -0
- package/CountryFlags/MS.d.ts +3 -0
- package/CountryFlags/MS.js +40 -0
- package/CountryFlags/MT.d.ts +3 -0
- package/CountryFlags/MT.js +31 -0
- package/CountryFlags/MU.d.ts +3 -0
- package/CountryFlags/MU.js +32 -0
- package/CountryFlags/MV.d.ts +3 -0
- package/CountryFlags/MV.js +31 -0
- package/CountryFlags/MW.d.ts +3 -0
- package/CountryFlags/MW.js +32 -0
- package/CountryFlags/MX.d.ts +3 -0
- package/CountryFlags/MX.js +33 -0
- package/CountryFlags/MY.d.ts +3 -0
- package/CountryFlags/MY.js +33 -0
- package/CountryFlags/MZ.d.ts +3 -0
- package/CountryFlags/MZ.js +34 -0
- package/CountryFlags/NA.d.ts +3 -0
- package/CountryFlags/NA.js +33 -0
- package/CountryFlags/NC.d.ts +3 -0
- package/CountryFlags/NC.js +38 -0
- package/CountryFlags/NE.d.ts +3 -0
- package/CountryFlags/NE.js +32 -0
- package/CountryFlags/NF.d.ts +3 -0
- package/CountryFlags/NF.js +31 -0
- package/CountryFlags/NG.d.ts +3 -0
- package/CountryFlags/NG.js +31 -0
- package/CountryFlags/NI.d.ts +3 -0
- package/CountryFlags/NI.js +35 -0
- package/CountryFlags/NL.d.ts +3 -0
- package/CountryFlags/NL.js +31 -0
- package/CountryFlags/NO.d.ts +3 -0
- package/CountryFlags/NO.js +31 -0
- package/CountryFlags/NP.d.ts +3 -0
- package/CountryFlags/NP.js +34 -0
- package/CountryFlags/NR.d.ts +3 -0
- package/CountryFlags/NR.js +31 -0
- package/CountryFlags/NU.d.ts +3 -0
- package/CountryFlags/NU.js +53 -0
- package/CountryFlags/NZ.d.ts +3 -0
- package/CountryFlags/NZ.js +41 -0
- package/CountryFlags/OM.d.ts +3 -0
- package/CountryFlags/OM.js +34 -0
- package/CountryFlags/PA.d.ts +3 -0
- package/CountryFlags/PA.js +33 -0
- package/CountryFlags/PE.d.ts +3 -0
- package/CountryFlags/PE.js +31 -0
- package/CountryFlags/PF.d.ts +3 -0
- package/CountryFlags/PF.js +35 -0
- package/CountryFlags/PG.d.ts +3 -0
- package/CountryFlags/PG.js +33 -0
- package/CountryFlags/PH.d.ts +3 -0
- package/CountryFlags/PH.js +33 -0
- package/CountryFlags/PK.d.ts +3 -0
- package/CountryFlags/PK.js +34 -0
- package/CountryFlags/PL.d.ts +3 -0
- package/CountryFlags/PL.js +32 -0
- package/CountryFlags/PM.d.ts +3 -0
- package/CountryFlags/PM.js +32 -0
- package/CountryFlags/PN.d.ts +3 -0
- package/CountryFlags/PN.js +43 -0
- package/CountryFlags/PR.d.ts +3 -0
- package/CountryFlags/PR.js +33 -0
- package/CountryFlags/PS.d.ts +3 -0
- package/CountryFlags/PS.js +32 -0
- package/CountryFlags/PT.d.ts +3 -0
- package/CountryFlags/PT.js +33 -0
- package/CountryFlags/PW.d.ts +3 -0
- package/CountryFlags/PW.js +30 -0
- package/CountryFlags/PY.d.ts +3 -0
- package/CountryFlags/PY.js +33 -0
- package/CountryFlags/QA.d.ts +3 -0
- package/CountryFlags/QA.js +30 -0
- package/CountryFlags/RE.d.ts +3 -0
- package/CountryFlags/RE.js +32 -0
- package/CountryFlags/RO.d.ts +3 -0
- package/CountryFlags/RO.js +31 -0
- package/CountryFlags/RS.d.ts +3 -0
- package/CountryFlags/RS.js +35 -0
- package/CountryFlags/RU.d.ts +3 -0
- package/CountryFlags/RU.js +32 -0
- package/CountryFlags/RW.d.ts +3 -0
- package/CountryFlags/RW.js +32 -0
- package/CountryFlags/SA.d.ts +3 -0
- package/CountryFlags/SA.js +33 -0
- package/CountryFlags/SB.d.ts +3 -0
- package/CountryFlags/SB.js +33 -0
- package/CountryFlags/SC.d.ts +3 -0
- package/CountryFlags/SC.js +33 -0
- package/CountryFlags/SD.d.ts +3 -0
- package/CountryFlags/SD.js +32 -0
- package/CountryFlags/SE.d.ts +3 -0
- package/CountryFlags/SE.js +30 -0
- package/CountryFlags/SG.d.ts +3 -0
- package/CountryFlags/SG.js +33 -0
- package/CountryFlags/SH.d.ts +3 -0
- package/CountryFlags/SH.js +43 -0
- package/CountryFlags/SI.d.ts +3 -0
- package/CountryFlags/SI.js +34 -0
- package/CountryFlags/SJ.d.ts +3 -0
- package/CountryFlags/SJ.js +31 -0
- package/CountryFlags/SK.d.ts +3 -0
- package/CountryFlags/SK.js +35 -0
- package/CountryFlags/SL.d.ts +3 -0
- package/CountryFlags/SL.js +31 -0
- package/CountryFlags/SM.d.ts +3 -0
- package/CountryFlags/SM.js +35 -0
- package/CountryFlags/SN.d.ts +3 -0
- package/CountryFlags/SN.js +32 -0
- package/CountryFlags/SO.d.ts +3 -0
- package/CountryFlags/SO.js +30 -0
- package/CountryFlags/SR.d.ts +3 -0
- package/CountryFlags/SR.js +33 -0
- package/CountryFlags/SS.d.ts +3 -0
- package/CountryFlags/SS.js +34 -0
- package/CountryFlags/ST.d.ts +3 -0
- package/CountryFlags/ST.js +33 -0
- package/CountryFlags/SV.d.ts +3 -0
- package/CountryFlags/SV.js +34 -0
- package/CountryFlags/SX.d.ts +3 -0
- package/CountryFlags/SX.js +37 -0
- package/CountryFlags/SY.d.ts +3 -0
- package/CountryFlags/SY.js +33 -0
- package/CountryFlags/SZ.d.ts +3 -0
- package/CountryFlags/SZ.js +35 -0
- package/CountryFlags/TA.d.ts +3 -0
- package/CountryFlags/TA.js +47 -0
- package/CountryFlags/TC.d.ts +3 -0
- package/CountryFlags/TC.js +44 -0
- package/CountryFlags/TD.d.ts +3 -0
- package/CountryFlags/TD.js +31 -0
- package/CountryFlags/TF.d.ts +3 -0
- package/CountryFlags/TF.js +34 -0
- package/CountryFlags/TG.d.ts +3 -0
- package/CountryFlags/TG.js +33 -0
- package/CountryFlags/TH.d.ts +3 -0
- package/CountryFlags/TH.js +32 -0
- package/CountryFlags/TJ.d.ts +3 -0
- package/CountryFlags/TJ.js +33 -0
- package/CountryFlags/TK.d.ts +3 -0
- package/CountryFlags/TK.js +33 -0
- package/CountryFlags/TL.d.ts +3 -0
- package/CountryFlags/TL.js +32 -0
- package/CountryFlags/TM.d.ts +3 -0
- package/CountryFlags/TM.js +45 -0
- package/CountryFlags/TN.d.ts +3 -0
- package/CountryFlags/TN.js +33 -0
- package/CountryFlags/TO.d.ts +3 -0
- package/CountryFlags/TO.js +31 -0
- package/CountryFlags/TR.d.ts +3 -0
- package/CountryFlags/TR.js +30 -0
- package/CountryFlags/TT.d.ts +3 -0
- package/CountryFlags/TT.js +31 -0
- package/CountryFlags/TV.d.ts +3 -0
- package/CountryFlags/TV.js +36 -0
- package/CountryFlags/TW.d.ts +3 -0
- package/CountryFlags/TW.js +33 -0
- package/CountryFlags/TZ.d.ts +3 -0
- package/CountryFlags/TZ.js +32 -0
- package/CountryFlags/UA.d.ts +3 -0
- package/CountryFlags/UA.js +30 -0
- package/CountryFlags/UG.d.ts +3 -0
- package/CountryFlags/UG.js +35 -0
- package/CountryFlags/UM.d.ts +3 -0
- package/CountryFlags/UM.js +34 -0
- package/CountryFlags/US.d.ts +3 -0
- package/CountryFlags/US.js +34 -0
- package/CountryFlags/UY.d.ts +3 -0
- package/CountryFlags/UY.js +33 -0
- package/CountryFlags/UZ.d.ts +3 -0
- package/CountryFlags/UZ.js +35 -0
- package/CountryFlags/VA.d.ts +3 -0
- package/CountryFlags/VA.js +32 -0
- package/CountryFlags/VC.d.ts +3 -0
- package/CountryFlags/VC.js +32 -0
- package/CountryFlags/VE.d.ts +3 -0
- package/CountryFlags/VE.js +32 -0
- package/CountryFlags/VG.d.ts +3 -0
- package/CountryFlags/VG.js +45 -0
- package/CountryFlags/VI.d.ts +3 -0
- package/CountryFlags/VI.js +41 -0
- package/CountryFlags/VN.d.ts +3 -0
- package/CountryFlags/VN.js +30 -0
- package/CountryFlags/VU.d.ts +3 -0
- package/CountryFlags/VU.js +35 -0
- package/CountryFlags/WF.d.ts +3 -0
- package/CountryFlags/WF.js +33 -0
- package/CountryFlags/WS.d.ts +3 -0
- package/CountryFlags/WS.js +32 -0
- package/CountryFlags/XK.d.ts +3 -0
- package/CountryFlags/XK.js +32 -0
- package/CountryFlags/YE.d.ts +3 -0
- package/CountryFlags/YE.js +31 -0
- package/CountryFlags/YT.d.ts +3 -0
- package/CountryFlags/YT.js +35 -0
- package/CountryFlags/ZA.d.ts +3 -0
- package/CountryFlags/ZA.js +34 -0
- package/CountryFlags/ZM.d.ts +3 -0
- package/CountryFlags/ZM.js +33 -0
- package/CountryFlags/ZW.d.ts +3 -0
- package/CountryFlags/ZW.js +39 -0
- package/DatePicker/index.d.ts +3 -0
- package/DatePicker/index.js +8 -0
- package/ErrorBoundary/index.d.ts +19 -0
- package/ErrorBoundary/index.js +78 -0
- package/Image/index.d.ts +7 -0
- package/Image/index.js +45 -0
- package/MaskedField/index.d.ts +33 -0
- package/MaskedField/index.js +63 -0
- package/MaskedField/templates.d.ts +11 -0
- package/MaskedField/templates.js +81 -0
- package/MaskedField/useMasked.d.ts +18 -0
- package/MaskedField/useMasked.js +96 -0
- package/Menu/MenuItem.d.ts +10 -0
- package/Menu/MenuItem.js +47 -0
- package/Menu/MenuItemInner.d.ts +7 -0
- package/Menu/MenuItemInner.js +48 -0
- package/Menu/MenuWrapper.d.ts +10 -0
- package/Menu/MenuWrapper.js +76 -0
- package/Menu/index.d.ts +196 -0
- package/Menu/index.js +452 -0
- package/Menu/popper-options.d.ts +4 -0
- package/Menu/popper-options.js +33 -0
- package/Menu/reducer.d.ts +14 -0
- package/Menu/reducer.js +19 -0
- package/Modal/CloseIcon.d.ts +3 -0
- package/Modal/CloseIcon.js +37 -0
- package/Modal/ModalConfirmBox.d.ts +9 -0
- package/Modal/ModalConfirmBox.js +148 -0
- package/Modal/ModalDialog.d.ts +7 -0
- package/Modal/ModalDialog.js +99 -0
- package/Modal/ModalDrawer.d.ts +11 -0
- package/Modal/ModalDrawer.js +150 -0
- package/Modal/ModalMessageBox.d.ts +8 -0
- package/Modal/ModalMessageBox.js +147 -0
- package/Modal/index.d.ts +12 -0
- package/Modal/index.js +54 -0
- package/NoSSR/index.d.ts +7 -0
- package/NoSSR/index.js +15 -0
- package/PhoneField/CountryFlagComponent.d.ts +6 -0
- package/PhoneField/CountryFlagComponent.js +44 -0
- package/PhoneField/UnknownFlag.d.ts +3 -0
- package/PhoneField/UnknownFlag.js +34 -0
- package/PhoneField/index.d.ts +54 -0
- package/PhoneField/index.js +97 -0
- package/PhoneField/templates.d.ts +82 -0
- package/PhoneField/templates.js +45 -0
- package/PhoneField/usePhoneUtils.d.ts +69 -0
- package/PhoneField/usePhoneUtils.js +172 -0
- package/README.md +12 -10
- package/SelectBox/IconChevronDown.d.ts +3 -0
- package/SelectBox/IconChevronDown.js +9 -0
- package/SelectBox/SelectButton.d.ts +10 -0
- package/SelectBox/SelectButton.js +78 -0
- package/SelectBox/index.d.ts +40 -0
- package/SelectBox/index.js +188 -0
- package/SelectBox/popper-options.d.ts +4 -0
- package/SelectBox/popper-options.js +33 -0
- package/Surface/SurfaceContainer.d.ts +8 -0
- package/Surface/SurfaceContainer.js +39 -0
- package/Surface/SurfaceContent.d.ts +8 -0
- package/Surface/SurfaceContent.js +31 -0
- package/Surface/SurfaceHeader.d.ts +4 -0
- package/Surface/SurfaceHeader.js +30 -0
- package/Surface/SurfaceSubheader.d.ts +4 -0
- package/Surface/SurfaceSubheader.js +29 -0
- package/Surface/index.d.ts +62 -0
- package/Surface/index.js +61 -0
- package/Table/Table.d.ts +8 -0
- package/Table/Table.js +46 -0
- package/Table/TableBody.d.ts +4 -0
- package/Table/TableBody.js +30 -0
- package/Table/TableCaption.d.ts +4 -0
- package/Table/TableCaption.js +30 -0
- package/Table/TableCell.d.ts +4 -0
- package/Table/TableCell.js +31 -0
- package/Table/TableFooter.d.ts +4 -0
- package/Table/TableFooter.js +36 -0
- package/Table/TableHeader.d.ts +4 -0
- package/Table/TableHeader.js +30 -0
- package/Table/TableHeaderCell.d.ts +4 -0
- package/Table/TableHeaderCell.js +35 -0
- package/Table/TableRow.d.ts +4 -0
- package/Table/TableRow.js +30 -0
- package/Table/index.d.ts +18 -0
- package/Table/index.js +45 -0
- package/TextField/TextFieldContainer.d.ts +8 -0
- package/TextField/TextFieldContainer.js +52 -0
- package/TextField/TextFieldErrorText.d.ts +7 -0
- package/TextField/TextFieldErrorText.js +75 -0
- package/TextField/TextFieldIconWrapper.d.ts +18 -0
- package/TextField/TextFieldIconWrapper.js +73 -0
- package/TextField/TextFieldInput.d.ts +7 -0
- package/TextField/TextFieldInput.js +71 -0
- package/TextField/TextFieldInputWrapper.d.ts +14 -0
- package/TextField/TextFieldInputWrapper.js +76 -0
- package/TextField/TextFieldLabel.d.ts +7 -0
- package/TextField/TextFieldLabel.js +50 -0
- package/TextField/TextFieldLabelAsterisk.d.ts +13 -0
- package/TextField/TextFieldLabelAsterisk.js +51 -0
- package/TextField/index.d.ts +80 -0
- package/TextField/index.js +100 -0
- package/ThemeProvider/createTheme.d.ts +3 -0
- package/ThemeProvider/createTheme.js +46 -0
- package/ThemeProvider/index.d.ts +57 -0
- package/ThemeProvider/index.js +29 -0
- package/Typography/Base.d.ts +6 -0
- package/Typography/Base.js +12 -0
- package/Typography/Blockquote.d.ts +6 -0
- package/Typography/Blockquote.js +23 -0
- package/Typography/Del.d.ts +6 -0
- package/Typography/Del.js +11 -0
- package/Typography/Em.d.ts +6 -0
- package/Typography/Em.js +11 -0
- package/Typography/H1.d.ts +6 -0
- package/Typography/H1.js +12 -0
- package/Typography/H2.d.ts +6 -0
- package/Typography/H2.js +12 -0
- package/Typography/H3.d.ts +6 -0
- package/Typography/H3.js +12 -0
- package/Typography/H4.d.ts +6 -0
- package/Typography/H4.js +12 -0
- package/Typography/H5.d.ts +6 -0
- package/Typography/H5.js +12 -0
- package/Typography/List.d.ts +14 -0
- package/Typography/List.js +32 -0
- package/Typography/Paragraph.d.ts +14 -0
- package/Typography/Paragraph.js +52 -0
- package/Typography/SectionDescription.d.ts +7 -0
- package/Typography/SectionDescription.js +17 -0
- package/Typography/SectionTitle.d.ts +8 -0
- package/Typography/SectionTitle.js +31 -0
- package/Typography/Span.d.ts +6 -0
- package/Typography/Span.js +11 -0
- package/Typography/Strong.d.ts +6 -0
- package/Typography/Strong.js +11 -0
- package/Typography/U.d.ts +6 -0
- package/Typography/U.js +10 -0
- package/Typography/index.d.ts +3 -0
- package/Typography/index.js +22 -0
- package/index.d.ts +1 -0
- package/index.js +1 -7
- package/package.json +3 -9
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TextFieldErrorTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
readonly error?: boolean;
|
|
4
|
+
readonly focused?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<TextFieldErrorTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
+
const NoSSR_1 = __importDefault(require("../NoSSR"));
|
|
43
|
+
const ErrorTextContainer = styled_1.default.div `
|
|
44
|
+
margin-left: 0.5em;
|
|
45
|
+
max-height: ${({ $maxHeight }) => typeof $maxHeight === 'number' ? `${$maxHeight}px` : $maxHeight};
|
|
46
|
+
transition: max-height 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
`;
|
|
49
|
+
const ErrorTextInner = styled_1.default.div `
|
|
50
|
+
color: ${({ theme }) => theme.color.error.toString()};
|
|
51
|
+
font-size: 0.8em;
|
|
52
|
+
transform: translateY(${({ $error }) => ($error ? 0 : '0.2em')});
|
|
53
|
+
opacity: ${({ $error }) => ($error ? 1 : 0)};
|
|
54
|
+
transition: all 240ms 240ms ease-out;
|
|
55
|
+
`;
|
|
56
|
+
const TextFieldErrorText = (props, ref) => {
|
|
57
|
+
const { children, error, focused } = props, nativeProps = __rest(props, ["children", "error", "focused"]);
|
|
58
|
+
const innerRef = React.useRef(null);
|
|
59
|
+
const [maxHeight, setMaxHeight] = React.useState('auto');
|
|
60
|
+
React.useEffect(() => {
|
|
61
|
+
const updateMaxHeight = () => {
|
|
62
|
+
if (innerRef.current && innerRef.current.getBoundingClientRect().height > 0) {
|
|
63
|
+
setMaxHeight(innerRef.current.getBoundingClientRect().height);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
updateMaxHeight();
|
|
67
|
+
window.addEventListener('resize', updateMaxHeight);
|
|
68
|
+
return () => {
|
|
69
|
+
window.removeEventListener('resize', updateMaxHeight);
|
|
70
|
+
};
|
|
71
|
+
}, [children]);
|
|
72
|
+
return (React.createElement(ErrorTextContainer, Object.assign({}, nativeProps, { "$maxHeight": error ? maxHeight : 0, "$focused": focused, ref: ref }),
|
|
73
|
+
React.createElement(ErrorTextInner, { ref: innerRef, "$error": Boolean(error) }, children ? React.createElement(NoSSR_1.default, null, children) : React.createElement(React.Fragment, null, "\u00A0"))));
|
|
74
|
+
};
|
|
75
|
+
exports.default = React.forwardRef(TextFieldErrorText);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type TextFieldIconWrapperProps = React.InputHTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
/**
|
|
4
|
+
* Icon position
|
|
5
|
+
*/
|
|
6
|
+
readonly position: 'start' | 'end';
|
|
7
|
+
readonly error?: boolean;
|
|
8
|
+
readonly focused?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLDivElement> & {
|
|
11
|
+
/**
|
|
12
|
+
* Icon position
|
|
13
|
+
*/
|
|
14
|
+
readonly position: "end" | "start";
|
|
15
|
+
readonly error?: boolean | undefined;
|
|
16
|
+
readonly focused?: boolean | undefined;
|
|
17
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
+
const react_1 = require("@emotion/react");
|
|
43
|
+
const IconWrapper = styled_1.default.div `
|
|
44
|
+
height: auto;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
${({ $position }) => $position === 'start' &&
|
|
49
|
+
(0, react_1.css) `
|
|
50
|
+
border-top-left-radius: inherit;
|
|
51
|
+
border-bottom-left-radius: inherit;
|
|
52
|
+
`};
|
|
53
|
+
${({ $position }) => $position === 'end' &&
|
|
54
|
+
(0, react_1.css) `
|
|
55
|
+
border-top-right-radius: inherit;
|
|
56
|
+
border-bottom-right-radius: inherit;
|
|
57
|
+
`};
|
|
58
|
+
& > svg {
|
|
59
|
+
margin: 0 1em;
|
|
60
|
+
border-radius: inherit;
|
|
61
|
+
}
|
|
62
|
+
& > button {
|
|
63
|
+
height: 100%;
|
|
64
|
+
padding: 0 1em;
|
|
65
|
+
border-radius: inherit;
|
|
66
|
+
box-shadow: none;
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
const TextFieldIconWrapper = (props, ref) => {
|
|
70
|
+
const { children, position, focused, error } = props, nativeProps = __rest(props, ["children", "position", "focused", "error"]);
|
|
71
|
+
return (React.createElement(IconWrapper, Object.assign({}, nativeProps, { "$position": position, "$error": error, "$focused": focused, ref: ref }), children));
|
|
72
|
+
};
|
|
73
|
+
exports.default = React.forwardRef(TextFieldIconWrapper);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TextFieldInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
readonly hasStartIcon: boolean;
|
|
4
|
+
readonly hasEndIcon: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<TextFieldInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
+
const react_1 = require("@emotion/react");
|
|
43
|
+
const Input = styled_1.default.input `
|
|
44
|
+
padding: 1em 1.2em;
|
|
45
|
+
font-size: 1em;
|
|
46
|
+
background: none;
|
|
47
|
+
border-radius: inherit;
|
|
48
|
+
margin: 0;
|
|
49
|
+
border: 0;
|
|
50
|
+
width: 100%;
|
|
51
|
+
color: currentColor;
|
|
52
|
+
${({ $hasStartIcon }) => $hasStartIcon &&
|
|
53
|
+
(0, react_1.css) `
|
|
54
|
+
padding-left: 0;
|
|
55
|
+
`};
|
|
56
|
+
${({ $hasEndIcon }) => $hasEndIcon &&
|
|
57
|
+
(0, react_1.css) `
|
|
58
|
+
padding-right: 0;
|
|
59
|
+
`};
|
|
60
|
+
&:focus {
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
63
|
+
&::placeholder {
|
|
64
|
+
font-style: italic;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
const TextFieldInput = (props, ref) => {
|
|
68
|
+
const { hasEndIcon, hasStartIcon } = props, nativeProps = __rest(props, ["hasEndIcon", "hasStartIcon"]);
|
|
69
|
+
return React.createElement(Input, Object.assign({}, nativeProps, { "$hasEndIcon": hasEndIcon, "$hasStartIcon": hasStartIcon, ref: ref }));
|
|
70
|
+
};
|
|
71
|
+
exports.default = React.forwardRef(TextFieldInput);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type TextFieldInputWrapperProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
readonly error?: boolean;
|
|
4
|
+
readonly fullWidth?: boolean;
|
|
5
|
+
readonly readOnly?: boolean;
|
|
6
|
+
readonly focused?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
9
|
+
readonly error?: boolean | undefined;
|
|
10
|
+
readonly fullWidth?: boolean | undefined;
|
|
11
|
+
readonly readOnly?: boolean | undefined;
|
|
12
|
+
readonly focused?: boolean | undefined;
|
|
13
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
+
const react_1 = require("@emotion/react");
|
|
43
|
+
const Wrapper = styled_1.default.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: stretch;
|
|
46
|
+
border-radius: ${({ theme }) => theme.shape.radiusFactor * 2}em;
|
|
47
|
+
border: 1px solid;
|
|
48
|
+
outline: 1px solid transparent;
|
|
49
|
+
border-color: ${({ theme }) => theme.isDark
|
|
50
|
+
? theme.color.textPrimary.darken(100).toString()
|
|
51
|
+
: theme.color.textPrimary.lighten(150).toString()};
|
|
52
|
+
width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};
|
|
53
|
+
font-size: 0.9em;
|
|
54
|
+
background-color: ${({ theme }) => theme.color.surface.toString()};
|
|
55
|
+
color: ${({ theme }) => theme.color.textPrimary.toString()};
|
|
56
|
+
transition: all 180ms ease-out 0s;
|
|
57
|
+
|
|
58
|
+
${props => props.$focused &&
|
|
59
|
+
(0, react_1.css) `
|
|
60
|
+
border-color: ${props.theme.color.accentPrimary.lighten(10).toString()};
|
|
61
|
+
outline-color: ${props.theme.color.accentPrimary.lighten(10).toString()};
|
|
62
|
+
`};
|
|
63
|
+
${props => props.$error &&
|
|
64
|
+
(0, react_1.css) `
|
|
65
|
+
border-color: ${props.theme.color.error.toString()};
|
|
66
|
+
color: ${props.theme.color.error.toString()};
|
|
67
|
+
&:focus {
|
|
68
|
+
border-color: ${props.theme.color.error.lighten(0.6).toString()};
|
|
69
|
+
}
|
|
70
|
+
`}
|
|
71
|
+
`;
|
|
72
|
+
const TextFieldInputWrapper = (props, ref) => {
|
|
73
|
+
const { focused, error, readOnly, fullWidth, children } = props, nativeProps = __rest(props, ["focused", "error", "readOnly", "fullWidth", "children"]);
|
|
74
|
+
return (React.createElement(Wrapper, Object.assign({}, nativeProps, { "$error": error, "$focused": focused, "$readOnly": readOnly, "$fullWidth": Boolean(fullWidth), ref: ref }), children));
|
|
75
|
+
};
|
|
76
|
+
exports.default = React.forwardRef(TextFieldInputWrapper);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TextFieldLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
3
|
+
readonly error?: boolean;
|
|
4
|
+
readonly focused?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<TextFieldLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
+
const Label = styled_1.default.label `
|
|
43
|
+
font-size: 0.8em;
|
|
44
|
+
margin-bottom: 0.2em;
|
|
45
|
+
`;
|
|
46
|
+
const TextFieldLabel = (props, ref) => {
|
|
47
|
+
const { children, error, focused } = props, nativeProps = __rest(props, ["children", "error", "focused"]);
|
|
48
|
+
return (React.createElement(Label, Object.assign({}, nativeProps, { "$error": error, "$focused": focused, ref: ref }), children));
|
|
49
|
+
};
|
|
50
|
+
exports.default = React.forwardRef(TextFieldLabel);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TextFieldLabelAsteriskProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
/**
|
|
4
|
+
* If true, the asterisk will be set the error color
|
|
5
|
+
*/
|
|
6
|
+
readonly error?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Not used
|
|
9
|
+
*/
|
|
10
|
+
readonly focused?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<TextFieldLabelAsteriskProps & React.RefAttributes<HTMLSpanElement>>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
+
const Asterisk = styled_1.default.span `
|
|
43
|
+
font-size: 0.8em;
|
|
44
|
+
margin-left: 0.2em;
|
|
45
|
+
color: ${({ theme }) => theme.color.error.toString()};
|
|
46
|
+
`;
|
|
47
|
+
const TextFieldLabelAsterisk = (props, ref) => {
|
|
48
|
+
const { children, error, focused } = props, nativeProps = __rest(props, ["children", "error", "focused"]);
|
|
49
|
+
return (React.createElement(Asterisk, Object.assign({}, nativeProps, { "$error": error, "$focused": focused, ref: ref }), children));
|
|
50
|
+
};
|
|
51
|
+
exports.default = React.forwardRef(TextFieldLabelAsterisk);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TextFieldContainerProps } from './TextFieldContainer';
|
|
3
|
+
import { TextFieldLabelProps } from './TextFieldLabel';
|
|
4
|
+
import { TextFieldLabelAsteriskProps } from './TextFieldLabelAsterisk';
|
|
5
|
+
import { TextFieldInputWrapperProps } from './TextFieldInputWrapper';
|
|
6
|
+
import { TextFieldInputProps } from './TextFieldInput';
|
|
7
|
+
import { TextFieldErrorTextProps } from './TextFieldErrorText';
|
|
8
|
+
import { TextFieldIconWrapperProps } from './TextFieldIconWrapper';
|
|
9
|
+
export interface TextFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
10
|
+
/**
|
|
11
|
+
* If true then `errorText` value will be displayed under the TextField element
|
|
12
|
+
*/
|
|
13
|
+
readonly error?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* If is true then the asterisk will be displayed in label\
|
|
16
|
+
* If is ReactNode then ReactNode will be displayed in label
|
|
17
|
+
*/
|
|
18
|
+
readonly requiredAsterisk?: boolean | React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Text or ReactNode to show in error element\
|
|
21
|
+
* Will be displaed only if `error` property is tru
|
|
22
|
+
*/
|
|
23
|
+
readonly errorText?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* If true then TextField will be filled in full width on horizontal
|
|
26
|
+
*/
|
|
27
|
+
readonly fullWidth?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Native <input> element reference
|
|
30
|
+
*/
|
|
31
|
+
readonly inputRef?: React.Ref<HTMLInputElement>;
|
|
32
|
+
/**
|
|
33
|
+
* Field label text or element
|
|
34
|
+
*/
|
|
35
|
+
readonly label?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* End icon component
|
|
38
|
+
*/
|
|
39
|
+
readonly endIcon?: React.ReactElement;
|
|
40
|
+
/**
|
|
41
|
+
* Start icon component
|
|
42
|
+
*/
|
|
43
|
+
readonly startIcon?: React.ReactElement;
|
|
44
|
+
/**
|
|
45
|
+
* Overridable components map
|
|
46
|
+
*/
|
|
47
|
+
readonly overrides?: TextFieldOverrides;
|
|
48
|
+
}
|
|
49
|
+
export interface TextFieldOverrides {
|
|
50
|
+
/**
|
|
51
|
+
* Native `input` component
|
|
52
|
+
*/
|
|
53
|
+
readonly Input?: React.ForwardRefExoticComponent<TextFieldInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
54
|
+
/**
|
|
55
|
+
* Component for display error text
|
|
56
|
+
*/
|
|
57
|
+
readonly ErrorText?: React.ForwardRefExoticComponent<TextFieldErrorTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
/**
|
|
59
|
+
* Icons wrapper component
|
|
60
|
+
*/
|
|
61
|
+
readonly IconWrapper?: React.ForwardRefExoticComponent<TextFieldIconWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
/**
|
|
63
|
+
* input field wrapper component
|
|
64
|
+
*/
|
|
65
|
+
readonly InputWrapper?: React.ForwardRefExoticComponent<TextFieldInputWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
/**
|
|
67
|
+
* label component
|
|
68
|
+
*/
|
|
69
|
+
readonly Label?: React.ForwardRefExoticComponent<TextFieldLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
70
|
+
/**
|
|
71
|
+
* label asterisk component
|
|
72
|
+
*/
|
|
73
|
+
readonly Asterisk?: React.ForwardRefExoticComponent<TextFieldLabelAsteriskProps & React.RefAttributes<HTMLSpanElement>>;
|
|
74
|
+
/**
|
|
75
|
+
* label component
|
|
76
|
+
*/
|
|
77
|
+
readonly Container?: React.ForwardRefExoticComponent<TextFieldContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
78
|
+
}
|
|
79
|
+
declare const _default: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
80
|
+
export default _default;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const TextFieldContainer_1 = __importDefault(require("./TextFieldContainer"));
|
|
42
|
+
const TextFieldLabel_1 = __importDefault(require("./TextFieldLabel"));
|
|
43
|
+
const TextFieldLabelAsterisk_1 = __importDefault(require("./TextFieldLabelAsterisk"));
|
|
44
|
+
const TextFieldInputWrapper_1 = __importDefault(require("./TextFieldInputWrapper"));
|
|
45
|
+
const TextFieldInput_1 = __importDefault(require("./TextFieldInput"));
|
|
46
|
+
const TextFieldErrorText_1 = __importDefault(require("./TextFieldErrorText"));
|
|
47
|
+
const TextFieldIconWrapper_1 = __importDefault(require("./TextFieldIconWrapper"));
|
|
48
|
+
const TextField = (props, ref) => {
|
|
49
|
+
const { error, fullWidth, inputRef, label, id, errorText, className, style, endIcon, startIcon, requiredAsterisk, overrides, onChange, onFocus, onBlur } = props, nativeInputProps = __rest(props, ["error", "fullWidth", "inputRef", "label", "id", "errorText", "className", "style", "endIcon", "startIcon", "requiredAsterisk", "overrides", "onChange", "onFocus", "onBlur"]);
|
|
50
|
+
const [focused, setFocused] = React.useState(false);
|
|
51
|
+
const inputID = React.useMemo(() => {
|
|
52
|
+
if (typeof id === 'string') {
|
|
53
|
+
return id;
|
|
54
|
+
}
|
|
55
|
+
const u = Date.now().toString(16) + Math.random().toString(16) + '0'.repeat(16);
|
|
56
|
+
const guid = [
|
|
57
|
+
u.substring(0, 8),
|
|
58
|
+
u.substring(8, 12),
|
|
59
|
+
'4000-8' + u.substring(13, 16),
|
|
60
|
+
u.substring(16, 28),
|
|
61
|
+
].join('-');
|
|
62
|
+
return guid;
|
|
63
|
+
}, [id]);
|
|
64
|
+
const inputChange = React.useCallback(event => {
|
|
65
|
+
if (onChange) {
|
|
66
|
+
onChange(event);
|
|
67
|
+
}
|
|
68
|
+
}, [onChange]);
|
|
69
|
+
const inputFocus = React.useCallback(event => {
|
|
70
|
+
setFocused(true);
|
|
71
|
+
if (typeof onFocus === 'function') {
|
|
72
|
+
onFocus(event);
|
|
73
|
+
}
|
|
74
|
+
}, [onFocus]);
|
|
75
|
+
const inputBlur = React.useCallback(event => {
|
|
76
|
+
setFocused(false);
|
|
77
|
+
if (typeof onBlur === 'function') {
|
|
78
|
+
onBlur(event);
|
|
79
|
+
}
|
|
80
|
+
}, [onBlur]);
|
|
81
|
+
const hasStartIcon = React.useMemo(() => typeof startIcon !== 'undefined' && startIcon !== null, [startIcon]);
|
|
82
|
+
const hasEndIcon = React.useMemo(() => typeof endIcon !== 'undefined' && endIcon !== null, [endIcon]);
|
|
83
|
+
const overridesMap = React.useMemo(() => (Object.assign({ Label: TextFieldLabel_1.default,
|
|
84
|
+
Input: TextFieldInput_1.default,
|
|
85
|
+
Asterisk: TextFieldLabelAsterisk_1.default,
|
|
86
|
+
Container: TextFieldContainer_1.default,
|
|
87
|
+
ErrorText: TextFieldErrorText_1.default,
|
|
88
|
+
IconWrapper: TextFieldIconWrapper_1.default,
|
|
89
|
+
InputWrapper: TextFieldInputWrapper_1.default }, overrides)), [overrides]);
|
|
90
|
+
return (React.createElement(overridesMap.Container, { ref: ref, fullWidth: fullWidth, className: className, style: style, focused: focused },
|
|
91
|
+
typeof label !== 'undefined' && label !== null && (React.createElement(overridesMap.Label, { htmlFor: inputID, error: error },
|
|
92
|
+
label,
|
|
93
|
+
typeof requiredAsterisk !== 'undefined' && requiredAsterisk !== null && (React.createElement(overridesMap.Asterisk, null, typeof requiredAsterisk === 'boolean' ? '*' : requiredAsterisk)))),
|
|
94
|
+
React.createElement(overridesMap.InputWrapper, { error: error, focused: focused, fullWidth: fullWidth },
|
|
95
|
+
hasStartIcon && (React.createElement(overridesMap.IconWrapper, { position: "start" }, startIcon)),
|
|
96
|
+
React.createElement(overridesMap.Input, Object.assign({}, nativeInputProps, { hasStartIcon: hasStartIcon, hasEndIcon: hasEndIcon, ref: inputRef, id: inputID, onChange: inputChange, onFocus: inputFocus, onBlur: inputBlur })),
|
|
97
|
+
hasEndIcon && (React.createElement(overridesMap.IconWrapper, { position: "end" }, endIcon))),
|
|
98
|
+
React.createElement(overridesMap.ErrorText, { error: error, focused: focused }, errorText)));
|
|
99
|
+
};
|
|
100
|
+
exports.default = React.forwardRef(TextField);
|