tide-design-system 2.5.4 → 2.5.8
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/.storybook/main.ts +2 -0
- package/dist/{IconAccountBalance-B9rJ09ax.js → IconAccountBalance-dARjIrfY.js} +3 -3
- package/dist/{IconAcute-9dHrmblT.js → IconAcute-BWwq_P2g.js} +3 -3
- package/dist/{IconAdd-BsJiPHYa.js → IconAdd-DtInpvF3.js} +3 -3
- package/dist/{IconAiDescription-fQ_B1UGe.js → IconAiDescription-C-OGiP7T.js} +3 -3
- package/dist/{IconAlignSpaceEven-B2UIi1ao.js → IconAlignSpaceEven-CTm_RFZr.js} +3 -3
- package/dist/{IconApplePay-DS6fQdV_.js → IconApplePay-BEECKvxd.js} +3 -3
- package/dist/{IconArrowBack-CZSCZ-Jf.js → IconArrowBack-CJYjUSAT.js} +3 -3
- package/dist/{IconArrowCycle-D3f38VT-.js → IconArrowCycle-B-SIKRjr.js} +3 -3
- package/dist/{IconArrowForward-CICM-aJ1.js → IconArrowForward-CTC_pWUJ.js} +3 -3
- package/dist/{IconArrowRight-CwweSeyO.js → IconArrowRight-DVgboHar.js} +3 -3
- package/dist/{IconArrowUp-7TI0p224.js → IconArrowUp-8yer6-rz.js} +3 -3
- package/dist/{IconAssignment-DQQnmJc_.js → IconAssignment-CKdgR4IZ.js} +3 -3
- package/dist/{IconAttachMoney-sLj77NOR.js → IconAttachMoney-BOqK4Ty3.js} +3 -3
- package/dist/{IconAtvAtv-bfqGL_Iq.js → IconAtvAtv-CVxNZw3x.js} +3 -3
- package/dist/{IconAtvDuneBuggy-CbiyQRZg.js → IconAtvDuneBuggy-ChpKK_uj.js} +3 -3
- package/dist/{IconAtvGoKart-BxqcGKzS.js → IconAtvGoKart-BA3-opIb.js} +3 -3
- package/dist/{IconAtvGolfCart-6Xwju3k6.js → IconAtvGolfCart-DIQybI94.js} +3 -3
- package/dist/{IconAtvSandRail-dKmA3KoG.js → IconAtvSandRail-vMg9E1B1.js} +3 -3
- package/dist/{IconAtvSideBySide-CVSUrX7w.js → IconAtvSideBySide-DpAgficE.js} +3 -3
- package/dist/{IconAtvTrailer-BB6C_WKk.js → IconAtvTrailer-DmqyaW6g.js} +3 -3
- package/dist/{IconAutoRenew-Bl-Obhh6.js → IconAutoRenew-PKxzoFUm.js} +3 -3
- package/dist/{IconAwardStar-KYYsH2ss.js → IconAwardStar-C80c-wJ9.js} +3 -3
- package/dist/{IconBed-BVLiRAhU.js → IconBed-D8iyGBIR.js} +3 -3
- package/dist/{IconBoatmartPwc-B3seLCYC.js → IconBoatmartPwc-a1AOjs7L.js} +3 -3
- package/dist/{IconBoatmartTrailer-BosS4Ix8.js → IconBoatmartTrailer-CprxPgWU.js} +3 -3
- package/dist/{IconBolt-D-BSIXex.js → IconBolt-D7tpOZMC.js} +3 -3
- package/dist/{IconBookmark-D3Pu86n4.js → IconBookmark-ZpQyXxtb.js} +3 -3
- package/dist/{IconBunkhouse-B4PaVH2y.js → IconBunkhouse-rPtR_Mct.js} +3 -3
- package/dist/{IconCalendarMonth-CortoSy-.js → IconCalendarMonth-CKF3HJsX.js} +3 -3
- package/dist/{IconCall-DRysHKSn.js → IconCall-D6EvqV8k.js} +3 -3
- package/dist/{IconCallQuality-BMVs2M2s.js → IconCallQuality-FekMElKo.js} +3 -3
- package/dist/{IconCarRental-qvIsiGfR.js → IconCarRental-Cw5T4p4_.js} +3 -3
- package/dist/{IconCheck-CliQNN_D.js → IconCheck-Dmmvwu7-.js} +3 -3
- package/dist/{IconChevronLeft-hQC1St0W.js → IconChevronLeft-BF0qcV0B.js} +3 -3
- package/dist/{IconChevronRight-DVYcrzWE.js → IconChevronRight-CdE3lIbm.js} +3 -3
- package/dist/{IconClear-COYKsp8t.js → IconClear-YX6AUd3q.js} +3 -3
- package/dist/{IconClose-HSRbXCDE.js → IconClose-BKDRiJCn.js} +3 -3
- package/dist/{IconContract-BaV1mGEr.js → IconContract-7-9lX0ZL.js} +3 -3
- package/dist/{IconCrash-ClWQK2fw.js → IconCrash-Cz7QujvF.js} +3 -3
- package/dist/IconCycleMotorcycle-B8syyXoU.cjs +2 -0
- package/dist/IconCycleMotorcycle-DVRTUcId.js +21 -0
- package/dist/IconCycleTrailer-COTSVorR.cjs +2 -0
- package/dist/IconCycleTrailer-Cp2Ak9pX.js +20 -0
- package/dist/{IconDashboardCustomize-BJEcZ-jN.js → IconDashboardCustomize-g3VnCCx1.js} +3 -3
- package/dist/{IconDelete-DJwergoy.js → IconDelete-Dnyl1uzD.js} +3 -3
- package/dist/{IconDiamond-D34wtBhd.js → IconDiamond-sAYziqWh.js} +3 -3
- package/dist/{IconDirectionsBoat-ByiHuypy.js → IconDirectionsBoat-D0xl5It-.js} +3 -3
- package/dist/{IconDomain-CXsBLm5C.js → IconDomain-as7lGUZz.js} +3 -3
- package/dist/{IconDraft-qSYk5cPm.js → IconDraft-BTRj5LyI.js} +3 -3
- package/dist/{IconEdit-CFeDlBN2.js → IconEdit-Z8QjfAFi.js} +3 -3
- package/dist/{IconEngine-BLi3BThi.js → IconEngine-Nq1jLYrS.js} +3 -3
- package/dist/{IconEngineering-DKDW6b3b.js → IconEngineering-CDeCKiuN.js} +3 -3
- package/dist/{IconError-BsmS7Ido.js → IconError-CHkF1F4l.js} +3 -3
- package/dist/{IconExpandContent-CUz-acoJ.js → IconExpandContent-BKW1v-s1.js} +3 -3
- package/dist/{IconExpandLess-kI04ZTDg.js → IconExpandLess-DuwH_WmO.js} +3 -3
- package/dist/{IconExpandMore-BpIrNsXP.js → IconExpandMore-C-Fof15e.js} +3 -3
- package/dist/{IconFacebook-DiMWgcSK.js → IconFacebook-94UC5eci.js} +3 -3
- package/dist/{IconFavorite-CDLEUDWu.js → IconFavorite-Bi2ZLSFU.js} +3 -3
- package/dist/{IconFavoriteFilled--f1zeXKy.js → IconFavoriteFilled-BOzK3oQt.js} +3 -3
- package/dist/{IconFlag-CmppikB3.js → IconFlag-D3BdWSHX.js} +3 -3
- package/dist/{IconFormatBold-rtvyBotR.js → IconFormatBold-ptl4C5om.js} +3 -3
- package/dist/{IconFormatItalic-BlcS8gnO.js → IconFormatItalic-wjYo3E6V.js} +3 -3
- package/dist/{IconFormatListBulleted-BbJCNSJG.js → IconFormatListBulleted-Z4H5EHHL.js} +3 -3
- package/dist/{IconForum-CFa_3MsA.js → IconForum-dExYXhMs.js} +3 -3
- package/dist/{IconGas-rD46ubiw.js → IconGas-BeL_PidJ.js} +3 -3
- package/dist/{IconGavel-l3k6jtN3.js → IconGavel-b699C85e.js} +3 -3
- package/dist/{IconGears-CaXA9HK2.js → IconGears-DY0BIt9k.js} +3 -3
- package/dist/{IconGlobeLocationPin-cTdYm_5A.js → IconGlobeLocationPin-PPiJIaCW.js} +3 -3
- package/dist/{IconGoogle-6R7roJzd.js → IconGoogle-B1k1zKq5.js} +3 -3
- package/dist/{IconGooglePay-XLqJKvZe.js → IconGooglePay-CnoBw2gC.js} +3 -3
- package/dist/{IconGrid-BoplWzPb.js → IconGrid-DPAFjLOo.js} +3 -3
- package/dist/{IconHandshake-CsYF9kmp.js → IconHandshake-CF0rWfIQ.js} +3 -3
- package/dist/{IconHandyman-CQL-qu8p.js → IconHandyman-DqbZcABm.js} +3 -3
- package/dist/{IconHeight-CTAQLi2I.js → IconHeight-1sxFnuqb.js} +3 -3
- package/dist/{IconHelp-BEzzbWr3.js → IconHelp-BfxZeVdy.js} +3 -3
- package/dist/{IconInfo-BACpUpXu.js → IconInfo-ZZNZK4Fs.js} +3 -3
- package/dist/{IconInformation-CGYah4Eo.js → IconInformation-CQc0HSVc.js} +3 -3
- package/dist/{IconInsertText-C5HjwAuL.js → IconInsertText-dHM33CGA.js} +3 -3
- package/dist/{IconInstagram-DEPxn51x.js → IconInstagram-BbTbVTQe.js} +3 -3
- package/dist/{IconIosShare-jNePPJBV.js → IconIosShare-fe7iyZSt.js} +3 -3
- package/dist/{IconLayout-CgFL9FBD.js → IconLayout-BYkhBGPm.js} +3 -3
- package/dist/{IconLevellingJack-rO4KepKs.js → IconLevellingJack-CuuMfb9e.js} +3 -3
- package/dist/{IconLinkedIn-GWoK01li.js → IconLinkedIn-iC2pYpmX.js} +3 -3
- package/dist/{IconLocalShipping-Bayc9OL_.js → IconLocalShipping-sAYdRn-q.js} +3 -3
- package/dist/{IconLock-WfiVOWPI.js → IconLock-c8yaYnyT.js} +3 -3
- package/dist/{IconMail-ejl1H7D9.js → IconMail-D0yowPmX.js} +3 -3
- package/dist/{IconMenu-FlE3z6fX.js → IconMenu-Btzwi7Bu.js} +3 -3
- package/dist/{IconMoneyBag-CYq7aYjH.js → IconMoneyBag-BcZCfjrN.js} +3 -3
- package/dist/{IconMoreHoriz-B0mCtW1_.js → IconMoreHoriz-CYiGX78Y.js} +3 -3
- package/dist/{IconNotifications-Bm_gSQGu.js → IconNotifications-uBv1nZZ2.js} +3 -3
- package/dist/{IconOdometer-COcVC_eb.js → IconOdometer-DZASryD7.js} +3 -3
- package/dist/{IconOpenInNew-DFieFQIk.js → IconOpenInNew-VuTM8uiR.js} +3 -3
- package/dist/{IconPalette-DoDIzZJO.js → IconPalette-B78tp213.js} +3 -3
- package/dist/{IconPaypal-CX6Z2rvX.js → IconPaypal-z7u9aPLj.js} +3 -3
- package/dist/{IconPerson-CK0AXlS_.js → IconPerson-DWwdRmJX.js} +3 -3
- package/dist/{IconPersonSearch-Da5EdDrS.js → IconPersonSearch-4ESzm5yH.js} +3 -3
- package/dist/{IconPhotoCamera-DZHI-Yb7.js → IconPhotoCamera-Drkhsfpi.js} +3 -3
- package/dist/{IconPinterest-B3UM6t9-.js → IconPinterest-BhgYE6Fc.js} +3 -3
- package/dist/{IconPlayArrow-CR7bXHC8.js → IconPlayArrow-ztNUkoji.js} +3 -3
- package/dist/{IconPolicy-CzN-v54O.js → IconPolicy-DrcQUdvI.js} +3 -3
- package/dist/{IconPower-C5MJihEZ.js → IconPower-BISw4q1i.js} +3 -3
- package/dist/{IconPowerOff-BziDMScz.js → IconPowerOff-D94o_eIX.js} +3 -3
- package/dist/{IconPriorityHigh-Bv-j3DaQ.js → IconPriorityHigh-DzCnK1QW.js} +3 -3
- package/dist/{IconRemove-Bo4RUocr.js → IconRemove-gGo2PMeX.js} +3 -3
- package/dist/{IconRequestQuote-BUNyScQ-.js → IconRequestQuote-CWfytYvA.js} +3 -3
- package/dist/{IconResetWrench-DCcBmojh.js → IconResetWrench-B0tYLDcb.js} +3 -3
- package/dist/{IconRoad-BGTu-WPJ.js → IconRoad-m4Orr44c.js} +3 -3
- package/dist/{IconRoundedCorner-DycjfuJj.js → IconRoundedCorner-CqdpAVGU.js} +3 -3
- package/dist/{IconRuler-Da8zNDvf.js → IconRuler-C8SSjTfX.js} +3 -3
- package/dist/{IconRvClassA-D2-lug19.js → IconRvClassA-CFQOw02-.js} +3 -3
- package/dist/{IconRvClassB-Coe3FpBI.js → IconRvClassB-p-03DBol.js} +3 -3
- package/dist/{IconRvClassC-DWnLqMGg.js → IconRvClassC-BP5Zzlj_.js} +3 -3
- package/dist/{IconRvFifthWheel-CB_mQ-tO.js → IconRvFifthWheel-BMGxt3_M.js} +3 -3
- package/dist/{IconRvFishHouse-Cs2fm3r1.js → IconRvFishHouse-C7iNMr-3.js} +3 -3
- package/dist/{IconRvParkModel-D4S_iYTG.js → IconRvParkModel-l4Rx5P9F.js} +3 -3
- package/dist/{IconRvPopUpCamper-CW47dgll.js → IconRvPopUpCamper-BY6aLEic.js} +3 -3
- package/dist/{IconRvTravelTrailer-CC48bci7.js → IconRvTravelTrailer-FstodwFk.js} +3 -3
- package/dist/{IconRvTruckCamper-EoEVfaJM.js → IconRvTruckCamper-lLLE86pz.js} +3 -3
- package/dist/{IconSailing-CPcgnYwx.js → IconSailing-svTfDLn9.js} +3 -3
- package/dist/{IconSchool-3Dy70s11.js → IconSchool-CUB4fiMX.js} +3 -3
- package/dist/{IconSearch-C8WeOYws.js → IconSearch-QZW19aza.js} +3 -3
- package/dist/{IconSeating-D7B47LU4.js → IconSeating-B3MAIZkv.js} +3 -3
- package/dist/{IconSell-B95iGdOh.js → IconSell-CG2i7EOI.js} +3 -3
- package/dist/{IconSensors-Ckv6BEOK.js → IconSensors-BVBTJDAv.js} +3 -3
- package/dist/{IconSettings-CLrLZmQs.js → IconSettings-BGJv8ylA.js} +3 -3
- package/dist/{IconShare-CH2w2udo.js → IconShare-DLN_ze1T.js} +3 -3
- package/dist/{IconShieldCheck-BBHcsJhF.js → IconShieldCheck-DwGlL83P.js} +3 -3
- package/dist/{IconShoppingCart-_CKPKJ12.js → IconShoppingCart-BWcDIQ0t.js} +3 -3
- package/dist/{IconSleeps-CTzXW2RS.js → IconSleeps-Bl1OHp_d.js} +3 -3
- package/dist/{IconSms-C_jULP6X.js → IconSms-DXF4Rvv5.js} +3 -3
- package/dist/{IconSnowflake-DYpTwl2q.js → IconSnowflake-3DOCBRxO.js} +3 -3
- package/dist/{IconStar-CR0UA_S9.js → IconStar-y4w1Q_Ly.js} +3 -3
- package/dist/{IconStarFilled-DEnQm6s8.js → IconStarFilled-h3V6lcA1.js} +3 -3
- package/dist/{IconStarHalf-DZqwFVlC.js → IconStarHalf-CD3Otd__.js} +3 -3
- package/dist/{IconSummarize-BwU7xViX.js → IconSummarize-DQAFpTrk.js} +3 -3
- package/dist/{IconSwapHoriz-B7Nu99ui.js → IconSwapHoriz-C3usXzhR.js} +3 -3
- package/dist/{IconSwapVert-D83OnTLJ.js → IconSwapVert-CODa7if1.js} +3 -3
- package/dist/{IconThreeDRotation-WuabFIaS.js → IconThreeDRotation-Dt-qEsTU.js} +3 -3
- package/dist/{IconThumbUp-DwPs1Aog.js → IconThumbUp-2aoi8Hn6.js} +3 -3
- package/dist/{IconTrendingDown-CKqQl7o7.js → IconTrendingDown-Cc1jUDOB.js} +3 -3
- package/dist/{IconTrophy-DRcIPW-F.js → IconTrophy-CWU4189G.js} +3 -3
- package/dist/{IconTune-CXVj1kqb.js → IconTune-PtcGFHGO.js} +3 -3
- package/dist/{IconTwitter-B5AwI_-2.js → IconTwitter-Q7-VmjkP.js} +3 -3
- package/dist/{IconUmbrella-BWmv4GFi.js → IconUmbrella-B_1l6UAu.js} +3 -3
- package/dist/{IconVerified-BMRocsAd.js → IconVerified-BCiRYMzp.js} +3 -3
- package/dist/{IconVideocam-D5eUdBxR.js → IconVideocam-TZ4vpxTp.js} +3 -3
- package/dist/{IconViewInAr-CvR2gh_r.js → IconViewInAr-Dn4BjPYu.js} +3 -3
- package/dist/{IconVisibility-BlzyaCVD.js → IconVisibility-nxEIwt29.js} +3 -3
- package/dist/{IconVolumeOff-DB757krU.js → IconVolumeOff-D_ASm6Jk.js} +3 -3
- package/dist/{IconVolumeOn-CYf77UaC.js → IconVolumeOn-CTVNBoFQ.js} +3 -3
- package/dist/{IconWarehouse-DIRQdX8P.js → IconWarehouse-DP-BJpYG.js} +3 -3
- package/dist/{IconWarning-n_GTsWOM.js → IconWarning-DcYnbH1n.js} +3 -3
- package/dist/{IconWater-DFV09TyV.js → IconWater-Bh1ru5aW.js} +3 -3
- package/dist/{IconWeight-Cq12caT_.js → IconWeight-DfxHx8iL.js} +3 -3
- package/dist/{IconWidth-DtPjsKm8.js → IconWidth-E4u3XnEj.js} +3 -3
- package/dist/{IconWorkspacePremium-_Olggt_G.js → IconWorkspacePremium-Cn2NhzIu.js} +3 -3
- package/dist/{IconWrench-C2MHGxho.js → IconWrench-DHpCQriM.js} +3 -3
- package/dist/{IconYoutube-C8cHj1uF.js → IconYoutube-DHlDGTQp.js} +3 -3
- package/dist/css/reset.css +2 -2
- package/dist/css/utilities-base.css +66 -38
- package/dist/css/utilities-responsive.css +424 -312
- package/dist/css/variables.css +5 -0
- package/dist/logo-aero-CkTVffxb.js +17 -0
- package/dist/logo-aero-Z-V0eOLB.cjs +2 -0
- package/dist/logo-atv-BC9pKXBl.js +21 -0
- package/dist/logo-atv-xQMzut2h.cjs +2 -0
- package/dist/logo-boatmart-B9upxiMl.cjs +2 -0
- package/dist/logo-boatmart-DroAqtiq.js +16 -0
- package/dist/logo-cycle-c9schUUY.cjs +2 -0
- package/dist/logo-cycle-iWCyRwSL.js +21 -0
- package/dist/logo-equipment-3VYa6YcW.cjs +2 -0
- package/dist/logo-equipment-BoqO9oqu.js +17 -0
- package/dist/logo-pwc-BBFWrkvE.js +21 -0
- package/dist/logo-pwc-DhXtaTyu.cjs +2 -0
- package/dist/logo-rv-BRXxuciP.cjs +2 -0
- package/dist/logo-rv-DzHxIw2C.js +21 -0
- package/dist/logo-snow-Dzpaeho2.js +17 -0
- package/dist/logo-snow-PVobISvF.cjs +2 -0
- package/dist/logo-truck-DE0J4OIJ.cjs +2 -0
- package/dist/logo-truck-MUfLC0tr.js +21 -0
- package/dist/mark-aero-CFjGMjbx.cjs +2 -0
- package/dist/mark-aero-D8m3JDkS.js +23 -0
- package/dist/mark-atv-1Vppojls.js +19 -0
- package/dist/mark-atv-BhRn5mUA.cjs +2 -0
- package/dist/mark-boatmart-Bmkv3dOs.cjs +2 -0
- package/dist/mark-boatmart-b77RvD0c.js +16 -0
- package/dist/mark-cycle-BFxZOD4K.js +23 -0
- package/dist/mark-cycle-QCLSEZTF.cjs +2 -0
- package/dist/mark-equipment-BbnRZ0vl.js +19 -0
- package/dist/mark-equipment-ThuZOvf6.cjs +2 -0
- package/dist/mark-pwc-CQWDRntw.cjs +2 -0
- package/dist/mark-pwc-CQa98Z9S.js +21 -0
- package/dist/mark-rv-BtQWH4-a.cjs +2 -0
- package/dist/mark-rv-DY1wwuIO.js +21 -0
- package/dist/mark-snow-BEUxteW6.js +23 -0
- package/dist/mark-snow-Bek2T8IY.cjs +2 -0
- package/dist/mark-truck-BsOOC6Lx.cjs +2 -0
- package/dist/mark-truck-CUaX6FYM.js +19 -0
- package/dist/style.css +1 -1
- package/dist/tide-design-system.cjs +2 -2
- package/dist/tide-design-system.esm.d.ts +0 -2031
- package/dist/tide-design-system.esm.js +1607 -1348
- package/dist/utilities/realm.ts +17 -0
- package/dist/utilities/viewport.ts +2 -2
- package/docs/toast.md +61 -0
- package/index.ts +12 -1
- package/package.json +3 -3
- package/src/assets/css/reset.css +2 -2
- package/src/assets/css/utilities-base.css +66 -38
- package/src/assets/css/utilities-responsive.css +424 -312
- package/src/assets/css/variables.css +5 -0
- package/src/assets/svg/branding/logo/logo-aero.svg +9 -0
- package/src/assets/svg/branding/logo/logo-atv.svg +3 -0
- package/src/assets/svg/branding/logo/logo-boatmart.svg +18 -0
- package/src/assets/svg/branding/logo/logo-cycle.svg +3 -0
- package/src/assets/svg/branding/logo/logo-equipment.svg +11 -0
- package/src/assets/svg/branding/logo/logo-pwc.svg +3 -0
- package/src/assets/svg/branding/logo/logo-rv.svg +3 -0
- package/src/assets/svg/branding/logo/logo-snow.svg +12 -0
- package/src/assets/svg/branding/logo/logo-truck.svg +3 -0
- package/src/assets/svg/branding/mark/mark-aero.svg +4 -0
- package/src/assets/svg/branding/mark/mark-atv.svg +3 -0
- package/src/assets/svg/branding/mark/mark-boatmart.svg +17 -0
- package/src/assets/svg/branding/mark/mark-cycle.svg +4 -0
- package/src/assets/svg/branding/mark/mark-equipment.svg +3 -0
- package/src/assets/svg/branding/mark/mark-pwc.svg +3 -0
- package/src/assets/svg/branding/mark/mark-rv.svg +3 -0
- package/src/assets/svg/branding/mark/mark-snow.svg +4 -0
- package/src/assets/svg/branding/mark/mark-truck.svg +3 -0
- package/src/assets/svg/icons/realm/cycle/IconCycleMotorcycle.svg +4 -0
- package/src/assets/svg/icons/realm/cycle/IconCycleTrailer.svg +3 -0
- package/src/components/TideAccordionItem.vue +38 -4
- package/src/components/TideAlert.vue +3 -3
- package/src/components/TideButton.vue +36 -16
- package/src/components/TideButtonIcon.vue +26 -9
- package/src/components/TideChipAction.vue +23 -2
- package/src/components/TideIcon.vue +8 -6
- package/src/components/TideInputSelect.vue +107 -47
- package/src/components/TideModal.vue +14 -2
- package/src/components/TideRealmLogo.vue +71 -0
- package/src/components/TideSheet.vue +11 -2
- package/src/components/TideTabs.vue +4 -9
- package/src/components/TideToaster.vue +88 -0
- package/src/composables/useTideToaster.ts +63 -0
- package/src/stories/TideAccordionItem.stories.ts +4 -4
- package/src/stories/TideButton.stories.ts +9 -9
- package/src/stories/TideButtonIcon.stories.ts +9 -7
- package/src/stories/TideChipAction.stories.ts +10 -4
- package/src/stories/TideImageBackground.stories.ts +2 -1
- package/src/stories/TideInputSelect.stories.ts +18 -9
- package/src/stories/TideModal.stories.ts +0 -4
- package/src/stories/TideRealmLogo.stories.ts +25 -0
- package/src/stories/TideSheet.stories.ts +0 -1
- package/src/stories/TideToaster.stories.ts +117 -0
- package/src/types/Icon.ts +4 -0
- package/src/types/RealmLogo.ts +38 -0
- package/src/types/Styles.ts +2 -1
- package/src/types/Toast.ts +21 -0
- package/src/utilities/realm.ts +17 -0
- package/src/utilities/viewport.ts +2 -2
- package/tests/TideRealmLogo.spec.ts +58 -0
- package/tsconfig.json +18 -5
- package/tsconfig.node.json +7 -0
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
<script lang="ts"
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Renders a chip action button intended to be used in navigation menus relating to searches.
|
|
4
|
+
*
|
|
5
|
+
* @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidechipaction--docs) for TideChipAction
|
|
6
|
+
*/
|
|
7
|
+
export default {};
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<script setup lang="ts">
|
|
2
11
|
import { computed } from 'vue';
|
|
3
12
|
|
|
4
13
|
import InternalBaseLink from '@/components/InternalBaseLink.vue';
|
|
@@ -9,17 +18,29 @@
|
|
|
9
18
|
import { TARGET } from '@/types/Target';
|
|
10
19
|
|
|
11
20
|
import type { Element } from '@/types/Element';
|
|
21
|
+
import type { Icon } from '@/types/Icon';
|
|
12
22
|
|
|
13
23
|
type Props = {
|
|
24
|
+
/** HTML tag type. */
|
|
14
25
|
element?: Element;
|
|
26
|
+
|
|
27
|
+
/** URL to navigate to on click. */
|
|
15
28
|
href?: string;
|
|
29
|
+
|
|
30
|
+
/** Icon to show before the label. */
|
|
31
|
+
iconLeading?: Icon;
|
|
32
|
+
|
|
33
|
+
/** Determines whether to target a new browser tab. */
|
|
16
34
|
isNewTab?: boolean;
|
|
35
|
+
|
|
36
|
+
/** Chip text. */
|
|
17
37
|
label: string;
|
|
18
38
|
};
|
|
19
39
|
|
|
20
40
|
const props = withDefaults(defineProps<Props>(), {
|
|
21
41
|
element: ELEMENT.LINK,
|
|
22
42
|
href: undefined,
|
|
43
|
+
iconLeading: ICON.SEARCH,
|
|
23
44
|
isNewTab: false,
|
|
24
45
|
});
|
|
25
46
|
|
|
@@ -47,7 +68,7 @@
|
|
|
47
68
|
:type="element === ELEMENT.BUTTON ? ELEMENT.BUTTON : undefined"
|
|
48
69
|
:is="rootElement"
|
|
49
70
|
>
|
|
50
|
-
<TideIcon :icon="
|
|
71
|
+
<TideIcon :icon="props.iconLeading" />
|
|
51
72
|
|
|
52
73
|
<span>{{ props.label }}</span>
|
|
53
74
|
</component>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { markRaw, ref, watch } from 'vue';
|
|
2
|
+
import { defineAsyncComponent, markRaw, ref, watch } from 'vue';
|
|
3
3
|
|
|
4
4
|
import { REALM } from '@/types/Realm';
|
|
5
5
|
import { SIZE } from '@/types/Size';
|
|
@@ -29,13 +29,15 @@
|
|
|
29
29
|
const [prefix] = id.split('-');
|
|
30
30
|
const realmFolder = REALM[prefix?.toUpperCase() as keyof typeof REALM];
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const component = defineAsyncComponent(() => {
|
|
33
|
+
if (realmFolder) {
|
|
34
|
+
return import(`../assets/svg/icons/realm/${realmFolder}/Icon${name}.svg?component`);
|
|
35
|
+
}
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
return import(`../assets/svg/icons/Icon${name}.svg?component`);
|
|
38
|
+
});
|
|
37
39
|
|
|
38
|
-
innerSVG.value = markRaw(
|
|
40
|
+
innerSVG.value = markRaw(component);
|
|
39
41
|
},
|
|
40
42
|
{ immediate: true }
|
|
41
43
|
);
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Renders a select input intended to be used in forms.
|
|
4
|
+
*
|
|
5
|
+
* @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tideinputselect--docs) for TideInputSelect
|
|
6
|
+
*/
|
|
7
|
+
export default {};
|
|
8
|
+
</script>
|
|
9
|
+
|
|
1
10
|
<script lang="ts" setup>
|
|
2
11
|
import { computed, ref, useId, watch, watchEffect } from 'vue';
|
|
3
12
|
|
|
@@ -14,14 +23,37 @@
|
|
|
14
23
|
import type { ErrorDisplay, ValidationResult } from '@/types/Validation';
|
|
15
24
|
|
|
16
25
|
type Props = {
|
|
26
|
+
/** Determines whether Select is interactable */
|
|
17
27
|
disabled?: boolean;
|
|
28
|
+
|
|
29
|
+
/** Overrides the default error message and valid state */
|
|
18
30
|
error?: string;
|
|
31
|
+
|
|
32
|
+
/** Determines whether errors display prior to blur */
|
|
19
33
|
errorDisplay?: ErrorDisplay;
|
|
34
|
+
|
|
35
|
+
/** Label content */
|
|
20
36
|
label?: string;
|
|
37
|
+
|
|
38
|
+
/** Name attribute */
|
|
21
39
|
name?: string;
|
|
40
|
+
|
|
41
|
+
/** Determines grouped values found inside Select */
|
|
22
42
|
optgroups?: (SelectOption | SelectOptionGroup)[] | readonly (SelectOption | SelectOptionGroup)[];
|
|
43
|
+
|
|
44
|
+
/** Determines ungrouped values found inside Select */
|
|
23
45
|
options?: SelectOption[] | readonly SelectOption[];
|
|
46
|
+
|
|
47
|
+
/** Prefix content */
|
|
48
|
+
prefix?: string;
|
|
49
|
+
|
|
50
|
+
/** Determines whether Select is required */
|
|
24
51
|
required?: boolean;
|
|
52
|
+
|
|
53
|
+
/** Suffix content */
|
|
54
|
+
suffix?: string;
|
|
55
|
+
|
|
56
|
+
/** Explainer text beneath input */
|
|
25
57
|
supportingText?: string;
|
|
26
58
|
};
|
|
27
59
|
|
|
@@ -34,7 +66,9 @@
|
|
|
34
66
|
name: undefined,
|
|
35
67
|
optgroups: undefined,
|
|
36
68
|
options: undefined,
|
|
69
|
+
prefix: undefined,
|
|
37
70
|
required: false,
|
|
71
|
+
suffix: undefined,
|
|
38
72
|
supportingText: undefined,
|
|
39
73
|
});
|
|
40
74
|
|
|
@@ -125,7 +159,7 @@
|
|
|
125
159
|
CSS.GAP.HALF,
|
|
126
160
|
CSS.BORDER.RADIUS.HALF,
|
|
127
161
|
CSS.BG.SURFACE.DEFAULT,
|
|
128
|
-
|
|
162
|
+
disabled ? CSS.CURSOR.NOT_ALLOWED : '',
|
|
129
163
|
CSS.OVERFLOW.XY.HIDDEN,
|
|
130
164
|
]"
|
|
131
165
|
@click="expandOptions"
|
|
@@ -147,61 +181,87 @@
|
|
|
147
181
|
{{ formattedLabel }}
|
|
148
182
|
</label>
|
|
149
183
|
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
CSS.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
184
|
+
<div :class="[CSS.DISPLAY.FLEX, CSS.AXIS2.CENTER, CSS.WIDTH.FULL, CSS.GAP.HALF]">
|
|
185
|
+
<span
|
|
186
|
+
:class="[CSS.FONT.ROLE.BODY_1, CSS.MARGIN.LEFT.ONE, CSS.POINTER_EVENTS.OFF, label && CSS.MARGIN.TOP.ONE]"
|
|
187
|
+
v-if="prefix"
|
|
188
|
+
>
|
|
189
|
+
{{ prefix }}
|
|
190
|
+
</span>
|
|
191
|
+
|
|
192
|
+
<select
|
|
193
|
+
:class="[
|
|
194
|
+
CSS.PADDING.BOTTOM.HALF,
|
|
195
|
+
CSS.PADDING.TOP.ONE,
|
|
196
|
+
CSS.PADDING.LEFT.ONE,
|
|
197
|
+
CSS.PADDING.RIGHT.TWO,
|
|
198
|
+
CSS.WIDTH.FULL,
|
|
199
|
+
CSS.FONT.ROLE.BODY_1,
|
|
200
|
+
disabled && CSS.CURSOR.NOT_ALLOWED,
|
|
201
|
+
]"
|
|
202
|
+
:disabled="disabled"
|
|
203
|
+
:name="name"
|
|
204
|
+
ref="selectElement"
|
|
205
|
+
:required="required"
|
|
206
|
+
@focus="handleFocus"
|
|
207
|
+
@focusout="handleFocusOut"
|
|
208
|
+
:id="inputId"
|
|
209
|
+
v-model="modelValue"
|
|
210
|
+
>
|
|
211
|
+
<template v-for="optgroup in optgroups">
|
|
212
|
+
<optgroup
|
|
213
|
+
:class="[CSS.WIDTH.FULL, CSS.BG.SURFACE.DEFAULT]"
|
|
214
|
+
:key="`group-${(optgroup as SelectOptionGroup).label}`"
|
|
215
|
+
:label="(optgroup as SelectOptionGroup).label"
|
|
216
|
+
v-if="(optgroup as SelectOptionGroup).options"
|
|
217
|
+
>
|
|
218
|
+
<option
|
|
219
|
+
:class="[CSS.WIDTH.FULL, CSS.BG.SURFACE.DEFAULT]"
|
|
220
|
+
:key="option.value"
|
|
221
|
+
:value="option.value"
|
|
222
|
+
v-for="option in (optgroup as SelectOptionGroup).options"
|
|
223
|
+
>
|
|
224
|
+
{{ option.label }}
|
|
225
|
+
</option>
|
|
226
|
+
</optgroup>
|
|
227
|
+
|
|
174
228
|
<option
|
|
175
229
|
:class="[CSS.WIDTH.FULL, CSS.BG.SURFACE.DEFAULT]"
|
|
176
|
-
:key="option.value"
|
|
177
|
-
:
|
|
178
|
-
|
|
230
|
+
:key="`option-${(optgroup as SelectOption).value}`"
|
|
231
|
+
:selected="modelValue === (optgroup as SelectOption).value ? true : undefined"
|
|
232
|
+
:value="(optgroup as SelectOption).value"
|
|
233
|
+
v-else
|
|
179
234
|
>
|
|
180
|
-
{{
|
|
235
|
+
{{ (optgroup as SelectOption).label }}
|
|
181
236
|
</option>
|
|
182
|
-
</
|
|
237
|
+
</template>
|
|
183
238
|
|
|
184
239
|
<option
|
|
185
240
|
:class="[CSS.WIDTH.FULL, CSS.BG.SURFACE.DEFAULT]"
|
|
186
|
-
:key="
|
|
187
|
-
:selected="modelValue ===
|
|
188
|
-
:value="
|
|
189
|
-
v-
|
|
241
|
+
:key="option.value"
|
|
242
|
+
:selected="modelValue === option.value ? true : undefined"
|
|
243
|
+
:value="option.value"
|
|
244
|
+
v-for="option in options"
|
|
190
245
|
>
|
|
191
|
-
{{
|
|
246
|
+
{{ option.label }}
|
|
192
247
|
</option>
|
|
193
|
-
</
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
248
|
+
</select>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
<div
|
|
252
|
+
:class="[
|
|
253
|
+
CSS.POSITION.ABSOLUTE,
|
|
254
|
+
CSS.POSITIONING.RIGHT,
|
|
255
|
+
CSS.FONT.ROLE.BODY_1,
|
|
256
|
+
CSS.MARGIN.RIGHT.TWO,
|
|
257
|
+
CSS.POINTER_EVENTS.OFF,
|
|
258
|
+
label && CSS.MARGIN.TOP.ONE,
|
|
259
|
+
]"
|
|
260
|
+
v-if="suffix"
|
|
261
|
+
>
|
|
262
|
+
<span :class="CSS.PADDING.RIGHT.ONE">
|
|
263
|
+
{{ suffix }}
|
|
264
|
+
</span>
|
|
205
265
|
</div>
|
|
206
266
|
|
|
207
267
|
<TideIcon
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { nextTick, onBeforeMount, onMounted, ref, watch } from 'vue';
|
|
2
|
+
import { nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
3
3
|
|
|
4
4
|
import TideButtonIcon from '@/components/TideButtonIcon.vue';
|
|
5
5
|
import { BREAKPOINT } from '@/types/Breakpoint';
|
|
@@ -17,9 +17,13 @@
|
|
|
17
17
|
* Return `false` to cancel the close event.
|
|
18
18
|
*/
|
|
19
19
|
beforeClose?: () => void | boolean | Promise<void | boolean>;
|
|
20
|
+
/** Controls display of the back button. */
|
|
20
21
|
isBackButton?: boolean;
|
|
22
|
+
/** Controls whether the modal can be dismissed with a close button or other gestures. */
|
|
21
23
|
isDismissible?: boolean;
|
|
24
|
+
/** The title to display in the modal's header. */
|
|
22
25
|
title?: string;
|
|
26
|
+
/** Custom override to the modal's width constraint. Include units. */
|
|
23
27
|
width?: string;
|
|
24
28
|
};
|
|
25
29
|
|
|
@@ -44,10 +48,12 @@
|
|
|
44
48
|
|
|
45
49
|
const triggerNativeDialogOpen = () => {
|
|
46
50
|
modalDialog.value?.showModal();
|
|
51
|
+
setScrollLock(true);
|
|
47
52
|
};
|
|
48
53
|
|
|
49
54
|
const triggerNativeDialogClose = () => {
|
|
50
55
|
modalDialog.value?.close();
|
|
56
|
+
setScrollLock(false);
|
|
51
57
|
};
|
|
52
58
|
|
|
53
59
|
const scrollContentToTop = () => {
|
|
@@ -83,7 +89,6 @@
|
|
|
83
89
|
} else {
|
|
84
90
|
triggerNativeDialogClose();
|
|
85
91
|
}
|
|
86
|
-
setScrollLock(isOpen.value);
|
|
87
92
|
});
|
|
88
93
|
|
|
89
94
|
onBeforeMount(() => {
|
|
@@ -95,6 +100,13 @@
|
|
|
95
100
|
triggerNativeDialogOpen();
|
|
96
101
|
}
|
|
97
102
|
});
|
|
103
|
+
|
|
104
|
+
onBeforeUnmount(() => {
|
|
105
|
+
if (isOpen.value) {
|
|
106
|
+
isOpen.value = false;
|
|
107
|
+
triggerNativeDialogClose();
|
|
108
|
+
}
|
|
109
|
+
});
|
|
98
110
|
</script>
|
|
99
111
|
|
|
100
112
|
<template>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineAsyncComponent, markRaw, ref, watch } from 'vue';
|
|
3
|
+
|
|
4
|
+
import { LOGO_HEIGHT, LOGO_LARGE_WIDTH, LOGO_MARK_WIDTH, SIZE_LOGO } from '@/types/RealmLogo';
|
|
5
|
+
import { CSS } from '@/types/Styles';
|
|
6
|
+
import { getRealmKeyFromRealm } from '@/utilities/realm';
|
|
7
|
+
|
|
8
|
+
import type { Realm } from '@/types/Realm';
|
|
9
|
+
import type { SizeLogo } from '@/types/RealmLogo';
|
|
10
|
+
import type { Component } from 'vue';
|
|
11
|
+
|
|
12
|
+
type Props = {
|
|
13
|
+
/** Determines the size of the logo or mark */
|
|
14
|
+
size: SizeLogo;
|
|
15
|
+
|
|
16
|
+
/** Sets the realm for this logo instance */
|
|
17
|
+
realm: Realm;
|
|
18
|
+
};
|
|
19
|
+
const props = defineProps<Props>();
|
|
20
|
+
|
|
21
|
+
const innerSVG = ref<Component>();
|
|
22
|
+
|
|
23
|
+
const logoWidth = computed<number>(() => {
|
|
24
|
+
if (props.size === SIZE_LOGO.MARK) return LOGO_MARK_WIDTH[getRealmKeyFromRealm(props.realm)];
|
|
25
|
+
const fullLogoWidth = LOGO_LARGE_WIDTH[getRealmKeyFromRealm(props.realm)];
|
|
26
|
+
if (props.size === SIZE_LOGO.SMALL) {
|
|
27
|
+
const shrinkFactor = LOGO_HEIGHT.SMALL / LOGO_HEIGHT.LARGE;
|
|
28
|
+
return Math.round(fullLogoWidth * shrinkFactor);
|
|
29
|
+
} else {
|
|
30
|
+
return fullLogoWidth;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const logoHeight = computed<number>(() => (props.size === SIZE_LOGO.SMALL ? LOGO_HEIGHT.SMALL : LOGO_HEIGHT.LARGE));
|
|
35
|
+
|
|
36
|
+
watch(
|
|
37
|
+
() => [props.size, props.realm],
|
|
38
|
+
async () => {
|
|
39
|
+
const component = defineAsyncComponent(() => {
|
|
40
|
+
if (props.size === SIZE_LOGO.MARK)
|
|
41
|
+
return import(`../assets/svg/branding/mark/mark-${props.realm}.svg?component`);
|
|
42
|
+
else return import(`../assets/svg/branding/logo/logo-${props.realm}.svg?component`);
|
|
43
|
+
});
|
|
44
|
+
innerSVG.value = markRaw(component);
|
|
45
|
+
},
|
|
46
|
+
{ immediate: true }
|
|
47
|
+
);
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<template>
|
|
51
|
+
<div
|
|
52
|
+
:class="['tide-realm-logo']"
|
|
53
|
+
:style="{
|
|
54
|
+
'--tide-logo-width': `${logoWidth}px`,
|
|
55
|
+
'--tide-logo-height': `${logoHeight}px`,
|
|
56
|
+
}"
|
|
57
|
+
>
|
|
58
|
+
<Component
|
|
59
|
+
:class="[CSS.DISPLAY.BLOCK]"
|
|
60
|
+
:is="innerSVG"
|
|
61
|
+
v-if="innerSVG"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<style>
|
|
67
|
+
.tide-realm-logo {
|
|
68
|
+
width: var(--tide-logo-width);
|
|
69
|
+
height: var(--tide-logo-height);
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { onBeforeMount, onMounted, ref, watch } from 'vue';
|
|
2
|
+
import { onBeforeMount, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
3
3
|
|
|
4
4
|
import TideButtonIcon from '@/components/TideButtonIcon.vue';
|
|
5
5
|
import TideDivider from '@/components/TideDivider.vue';
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type { Ref } from 'vue';
|
|
12
12
|
|
|
13
13
|
type Props = {
|
|
14
|
+
/** Controls display of the back button. */
|
|
14
15
|
isBackButton?: boolean;
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -30,10 +31,12 @@
|
|
|
30
31
|
|
|
31
32
|
const triggerNativeDialogOpen = () => {
|
|
32
33
|
dialogElement.value?.showModal();
|
|
34
|
+
setScrollLock(true);
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
const triggerNativeDialogClose = () => {
|
|
36
38
|
dialogElement.value?.close();
|
|
39
|
+
setScrollLock(false);
|
|
37
40
|
};
|
|
38
41
|
|
|
39
42
|
const close = () => {
|
|
@@ -56,7 +59,6 @@
|
|
|
56
59
|
} else {
|
|
57
60
|
triggerNativeDialogClose();
|
|
58
61
|
}
|
|
59
|
-
setScrollLock(isOpen.value);
|
|
60
62
|
});
|
|
61
63
|
|
|
62
64
|
onBeforeMount(() => {
|
|
@@ -68,6 +70,13 @@
|
|
|
68
70
|
triggerNativeDialogOpen();
|
|
69
71
|
}
|
|
70
72
|
});
|
|
73
|
+
|
|
74
|
+
onBeforeUnmount(() => {
|
|
75
|
+
if (isOpen.value) {
|
|
76
|
+
isOpen.value = false;
|
|
77
|
+
triggerNativeDialogClose();
|
|
78
|
+
}
|
|
79
|
+
});
|
|
71
80
|
</script>
|
|
72
81
|
|
|
73
82
|
<template>
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
<div :class="['tide-tabs', CSS.DISPLAY.FLEX, CSS.BORDER.BOTTOM.TWO, CSS.BORDER.COLOR.LOW]">
|
|
24
24
|
<TideCarousel :is-floating="true">
|
|
25
25
|
<li
|
|
26
|
+
:class="[CSS.PADDING.X.HALF]"
|
|
26
27
|
:key="tab.label"
|
|
27
28
|
v-for="(tab, index) in tabs"
|
|
28
29
|
>
|
|
29
30
|
<TideLink
|
|
30
31
|
:class="[
|
|
31
|
-
index === currentTab ? CSS.FONT.COLOR.SURFACE.BRAND : CSS.FONT.COLOR.SURFACE.VARIANT,
|
|
32
|
+
index === currentTab ? [CSS.FONT.COLOR.SURFACE.BRAND] : [CSS.FONT.COLOR.SURFACE.VARIANT],
|
|
32
33
|
CSS.PADDING.BOTTOM.ONE,
|
|
33
34
|
CSS.FONT.ROLE.LABEL_1,
|
|
34
35
|
CSS.WHITESPACE_WRAP.OFF,
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
:subtle="true"
|
|
39
40
|
@click="handleClick(index)"
|
|
40
41
|
/>
|
|
41
|
-
<div :class="['rounded-border', index === currentTab &&
|
|
42
|
+
<div :class="['rounded-border', CSS.MARGIN.X.HALF, index === currentTab && [CSS.BG.PRIMARY]]" />
|
|
42
43
|
</li>
|
|
43
44
|
</TideCarousel>
|
|
44
45
|
</div>
|
|
@@ -46,13 +47,7 @@
|
|
|
46
47
|
|
|
47
48
|
<style scoped>
|
|
48
49
|
.rounded-border {
|
|
50
|
+
height: 4px;
|
|
49
51
|
border-radius: var(--tide-radius-full) var(--tide-radius-full) 0 0;
|
|
50
|
-
border-top-width: 4px;
|
|
51
|
-
border-top-style: solid;
|
|
52
|
-
border-color: transparent;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.active {
|
|
56
|
-
border-color: var(--tide-on-surface-brand);
|
|
57
52
|
}
|
|
58
53
|
</style>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onBeforeMount } from 'vue';
|
|
3
|
+
|
|
4
|
+
import TideAlert from '@/components/TideAlert.vue';
|
|
5
|
+
import { useTideToaster } from '@/composables/useTideToaster';
|
|
6
|
+
import { CSS } from '@/types/Styles';
|
|
7
|
+
import { TOP_LAYER_ID, initFauxTopLayer } from '@/utilities/viewport';
|
|
8
|
+
|
|
9
|
+
const { toasts, clearToasts, cancelAutoDismiss, startAutoDismiss } = useTideToaster();
|
|
10
|
+
|
|
11
|
+
onBeforeMount(() => {
|
|
12
|
+
initFauxTopLayer();
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<Teleport :to="`#${TOP_LAYER_ID}`">
|
|
18
|
+
<div
|
|
19
|
+
:class="[
|
|
20
|
+
'tide-toaster',
|
|
21
|
+
CSS.HEIGHT.FULL,
|
|
22
|
+
CSS.POINTER_EVENTS.OFF,
|
|
23
|
+
CSS.POSITION.FIXED,
|
|
24
|
+
CSS.POSITIONING.LEFT,
|
|
25
|
+
CSS.POSITIONING.TOP,
|
|
26
|
+
CSS.WIDTH.FULL,
|
|
27
|
+
]"
|
|
28
|
+
>
|
|
29
|
+
<TransitionGroup name="pop">
|
|
30
|
+
<div
|
|
31
|
+
:class="[
|
|
32
|
+
'tide-toast-wrap',
|
|
33
|
+
CSS.POINTER_EVENTS.ON,
|
|
34
|
+
CSS.POSITION.ABSOLUTE,
|
|
35
|
+
CSS.Z_INDEX.ONE,
|
|
36
|
+
CSS.POSITIONING.RIGHT,
|
|
37
|
+
CSS.POSITIONING.TOP,
|
|
38
|
+
CSS.MARGIN.FULL.ONE,
|
|
39
|
+
CSS.WIDTH.STRETCH,
|
|
40
|
+
]"
|
|
41
|
+
:key="toast.id"
|
|
42
|
+
@mouseenter="cancelAutoDismiss"
|
|
43
|
+
@mouseleave="startAutoDismiss"
|
|
44
|
+
v-for="toast in toasts"
|
|
45
|
+
>
|
|
46
|
+
<TideAlert
|
|
47
|
+
:cta-label="toast.action?.label"
|
|
48
|
+
:heading="toast.heading"
|
|
49
|
+
:style="{ '--tide-max-width': 'none' }"
|
|
50
|
+
@close="clearToasts"
|
|
51
|
+
@cta-click="toast?.action?.callback"
|
|
52
|
+
is-dismissible
|
|
53
|
+
is-toast
|
|
54
|
+
>
|
|
55
|
+
{{ toast.description }}
|
|
56
|
+
</TideAlert>
|
|
57
|
+
</div>
|
|
58
|
+
</TransitionGroup>
|
|
59
|
+
</div>
|
|
60
|
+
</Teleport>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<style scoped>
|
|
64
|
+
.pop-enter-active,
|
|
65
|
+
.pop-leave-active {
|
|
66
|
+
transition: var(--tide-animate);
|
|
67
|
+
transition-property: opacity, transform, translate;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pop-enter-from {
|
|
71
|
+
translate: 100% 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pop-leave-to {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
z-index: 0 !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pop-leave-active {
|
|
80
|
+
position: absolute;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (min-width: 768px) {
|
|
84
|
+
.tide-toast-wrap {
|
|
85
|
+
width: 400px;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { inject, provide, readonly, ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type { TideToast, TideToastOmitId, TideToaster } from '@/types/Toast';
|
|
4
|
+
|
|
5
|
+
const TOASTER_KEY = Symbol('tide-toaster');
|
|
6
|
+
|
|
7
|
+
const AUTO_DISMISS_DURATION_MS = {
|
|
8
|
+
ACTIONABLE: 10000,
|
|
9
|
+
INFORMATIONAL: 5000,
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export const useTideToaster = () => {
|
|
13
|
+
const injected = inject<TideToaster>(TOASTER_KEY);
|
|
14
|
+
if (injected) return injected;
|
|
15
|
+
|
|
16
|
+
const timeoutId = ref<ReturnType<typeof setTimeout> | null>(null);
|
|
17
|
+
const toasts = ref<TideToast[]>([]);
|
|
18
|
+
const id = ref<number>(0);
|
|
19
|
+
|
|
20
|
+
const addToast = (newToast: TideToastOmitId) => {
|
|
21
|
+
id.value++;
|
|
22
|
+
clearToasts();
|
|
23
|
+
|
|
24
|
+
toasts.value.push({
|
|
25
|
+
...newToast,
|
|
26
|
+
id: `tide-toast-${id.value}`,
|
|
27
|
+
} as TideToast);
|
|
28
|
+
|
|
29
|
+
if (typeof window !== 'undefined') {
|
|
30
|
+
cancelAutoDismiss();
|
|
31
|
+
startAutoDismiss();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const clearToasts = () => {
|
|
36
|
+
toasts.value = [];
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const cancelAutoDismiss = () => {
|
|
40
|
+
if (timeoutId.value) clearTimeout(timeoutId.value);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const startAutoDismiss = () => {
|
|
44
|
+
if (!toasts.value.length) return;
|
|
45
|
+
|
|
46
|
+
const autoDismissDuration = toasts.value[0].action
|
|
47
|
+
? AUTO_DISMISS_DURATION_MS.ACTIONABLE
|
|
48
|
+
: AUTO_DISMISS_DURATION_MS.INFORMATIONAL;
|
|
49
|
+
timeoutId.value = setTimeout(clearToasts, autoDismissDuration);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const toaster: TideToaster = {
|
|
53
|
+
addToast,
|
|
54
|
+
cancelAutoDismiss,
|
|
55
|
+
clearToasts,
|
|
56
|
+
startAutoDismiss,
|
|
57
|
+
toasts: readonly(toasts),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
provide(TOASTER_KEY, toaster);
|
|
61
|
+
|
|
62
|
+
return toaster;
|
|
63
|
+
};
|
|
@@ -50,21 +50,20 @@ export default {
|
|
|
50
50
|
type: { summary: 'HTML' },
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
|
+
disabled: {
|
|
54
|
+
...argTypeBooleanUnrequired,
|
|
55
|
+
},
|
|
53
56
|
hasBottomDivider: {
|
|
54
57
|
...argTypeBooleanUnrequired,
|
|
55
|
-
description: 'Determines whether to include bottom divider',
|
|
56
58
|
},
|
|
57
59
|
hasTopDivider: {
|
|
58
60
|
...argTypeBooleanUnrequired,
|
|
59
|
-
description: 'Determines whether to include bottom divider',
|
|
60
61
|
},
|
|
61
62
|
isOptional: {
|
|
62
63
|
...argTypeBooleanUnrequired,
|
|
63
|
-
description: 'Determines whether to show "(optional)" indicator after label',
|
|
64
64
|
},
|
|
65
65
|
label: {
|
|
66
66
|
control: 'text',
|
|
67
|
-
description: 'Label exposed when collapsed',
|
|
68
67
|
table: {
|
|
69
68
|
defaultValue: { summary: 'None' },
|
|
70
69
|
type: { summary: 'string' },
|
|
@@ -83,6 +82,7 @@ export default {
|
|
|
83
82
|
args: {
|
|
84
83
|
dataTrack: '',
|
|
85
84
|
default: 'Lorem Ipsum',
|
|
85
|
+
disabled: undefined,
|
|
86
86
|
hasBottomDivider: undefined,
|
|
87
87
|
hasTopDivider: undefined,
|
|
88
88
|
isOptional: undefined,
|