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
|
@@ -5,6 +5,7 @@ import * as STANDARD_ELEMENT from '@/types/Element';
|
|
|
5
5
|
import * as STANDARD_ICON from '@/types/Icon';
|
|
6
6
|
import * as STANDARD_PRIORITY from '@/types/Priority';
|
|
7
7
|
import * as STANDARD_SIZE_BUTTON from '@/types/Size';
|
|
8
|
+
import * as STANDARD_TYPE_BUTTON from '@/types/Type';
|
|
8
9
|
import {
|
|
9
10
|
argTypeBooleanUnrequired,
|
|
10
11
|
click,
|
|
@@ -22,7 +23,9 @@ type Args = InstanceType<typeof TideButton>['$props'] & {
|
|
|
22
23
|
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
23
24
|
const ICON = prependNoneAsUndefined(STANDARD_ICON.ICON);
|
|
24
25
|
const PRIORITY = prependNoneAsUndefined(STANDARD_PRIORITY.PRIORITY);
|
|
26
|
+
delete PRIORITY['FLOATING']; // Floating is only available in TideButtonIcon
|
|
25
27
|
const SIZE_BUTTON = prependNoneAsUndefined(STANDARD_SIZE_BUTTON.SIZE_BUTTON);
|
|
28
|
+
const BUTTON_TYPE = prependNoneAsUndefined(STANDARD_TYPE_BUTTON.BUTTON_TYPE);
|
|
26
29
|
|
|
27
30
|
const render = (args: Args) => ({
|
|
28
31
|
components: { TideButton },
|
|
@@ -55,18 +58,15 @@ export default {
|
|
|
55
58
|
dataTrack,
|
|
56
59
|
disabled: {
|
|
57
60
|
...argTypeBooleanUnrequired,
|
|
58
|
-
description: 'Determines clickability<br />(Button only)',
|
|
59
61
|
if: { arg: 'element', neq: ELEMENT.LINK },
|
|
60
62
|
},
|
|
61
63
|
element: {
|
|
62
64
|
...formatArgType({ ELEMENT }),
|
|
63
|
-
description: 'HTML tag type',
|
|
64
65
|
table: {
|
|
65
66
|
defaultValue: { summary: 'BUTTON' },
|
|
66
67
|
},
|
|
67
68
|
},
|
|
68
69
|
href: {
|
|
69
|
-
description: 'URL to open<br />(Link only)',
|
|
70
70
|
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
71
71
|
table: {
|
|
72
72
|
defaultValue: { summary: 'None' },
|
|
@@ -75,20 +75,16 @@ export default {
|
|
|
75
75
|
},
|
|
76
76
|
iconLeading: {
|
|
77
77
|
...formatArgType({ ICON }),
|
|
78
|
-
description: 'Icon to left of label',
|
|
79
78
|
},
|
|
80
79
|
iconTrailing: {
|
|
81
80
|
...formatArgType({ ICON }),
|
|
82
|
-
description: 'Icon to right of label',
|
|
83
81
|
},
|
|
84
82
|
isNewTab: {
|
|
85
83
|
...argTypeBooleanUnrequired,
|
|
86
|
-
description: 'Determines whether to target a new browser tab<br />(Link only)',
|
|
87
84
|
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
88
85
|
},
|
|
89
86
|
label: {
|
|
90
87
|
control: 'text',
|
|
91
|
-
description: 'Button text',
|
|
92
88
|
table: {
|
|
93
89
|
defaultValue: { summary: 'None' },
|
|
94
90
|
type: { summary: 'string' },
|
|
@@ -96,18 +92,22 @@ export default {
|
|
|
96
92
|
},
|
|
97
93
|
priority: {
|
|
98
94
|
...formatArgType({ PRIORITY }),
|
|
99
|
-
description: 'Determines visual prominence',
|
|
100
95
|
table: {
|
|
101
96
|
defaultValue: { summary: 'PRIMARY' },
|
|
102
97
|
},
|
|
103
98
|
},
|
|
104
99
|
size: {
|
|
105
100
|
...formatArgType({ SIZE_BUTTON }),
|
|
106
|
-
description: 'Determines rendered size',
|
|
107
101
|
table: {
|
|
108
102
|
defaultValue: { summary: 'LARGE' },
|
|
109
103
|
},
|
|
110
104
|
},
|
|
105
|
+
type: {
|
|
106
|
+
...formatArgType({ BUTTON_TYPE }),
|
|
107
|
+
table: {
|
|
108
|
+
defaultValue: { summary: 'BUTTON' },
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
111
|
},
|
|
112
112
|
args: {
|
|
113
113
|
click: 'doSomething',
|
|
@@ -4,6 +4,7 @@ import TideButtonIcon from '@/components/TideButtonIcon.vue';
|
|
|
4
4
|
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
5
5
|
import { ICON } from '@/types/Icon';
|
|
6
6
|
import * as STANDARD_PRIORITY from '@/types/Priority';
|
|
7
|
+
import * as STANDARD_TYPE_BUTTON from '@/types/Type';
|
|
7
8
|
import {
|
|
8
9
|
argTypeBooleanUnrequired,
|
|
9
10
|
click,
|
|
@@ -20,6 +21,7 @@ type Args = InstanceType<typeof TideButtonIcon>['$props'] & {
|
|
|
20
21
|
|
|
21
22
|
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
22
23
|
const PRIORITY = prependNoneAsUndefined(STANDARD_PRIORITY.PRIORITY);
|
|
24
|
+
const BUTTON_TYPE = prependNoneAsUndefined(STANDARD_TYPE_BUTTON.BUTTON_TYPE);
|
|
23
25
|
|
|
24
26
|
const render = (args: Args) => ({
|
|
25
27
|
components: { TideButtonIcon },
|
|
@@ -40,7 +42,7 @@ const render = (args: Args) => ({
|
|
|
40
42
|
},
|
|
41
43
|
},
|
|
42
44
|
setup: () => ({ args }),
|
|
43
|
-
template: '<TideButtonIcon @click="handleClick"
|
|
45
|
+
template: '<TideButtonIcon @click="handleClick" v-bind="args" />',
|
|
44
46
|
});
|
|
45
47
|
|
|
46
48
|
export default {
|
|
@@ -52,18 +54,15 @@ export default {
|
|
|
52
54
|
dataTrack,
|
|
53
55
|
disabled: {
|
|
54
56
|
...argTypeBooleanUnrequired,
|
|
55
|
-
description: 'Determines clickability<br />(Button only)',
|
|
56
57
|
if: { arg: 'element', neq: ELEMENT.LINK },
|
|
57
58
|
},
|
|
58
59
|
element: {
|
|
59
60
|
...formatArgType({ ELEMENT }),
|
|
60
|
-
description: 'HTML tag type',
|
|
61
61
|
table: {
|
|
62
62
|
defaultValue: { summary: 'BUTTON' },
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
href: {
|
|
66
|
-
description: 'URL to open<br />(Link only)',
|
|
67
66
|
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
68
67
|
table: {
|
|
69
68
|
defaultValue: { summary: 'None' },
|
|
@@ -72,20 +71,23 @@ export default {
|
|
|
72
71
|
},
|
|
73
72
|
icon: {
|
|
74
73
|
...formatArgType({ ICON }),
|
|
75
|
-
description: 'Icon',
|
|
76
74
|
},
|
|
77
75
|
isNewTab: {
|
|
78
76
|
...argTypeBooleanUnrequired,
|
|
79
|
-
description: 'Determines whether to target a new browser tab<br />(Link only)',
|
|
80
77
|
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
81
78
|
},
|
|
82
79
|
priority: {
|
|
83
80
|
...formatArgType({ PRIORITY }),
|
|
84
|
-
description: 'Determines visual prominence',
|
|
85
81
|
table: {
|
|
86
82
|
defaultValue: { summary: 'PRIMARY' },
|
|
87
83
|
},
|
|
88
84
|
},
|
|
85
|
+
type: {
|
|
86
|
+
...formatArgType({ BUTTON_TYPE }),
|
|
87
|
+
table: {
|
|
88
|
+
defaultValue: { summary: 'BUTTON' },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
89
91
|
},
|
|
90
92
|
args: {
|
|
91
93
|
click: 'doSomething',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import TideChipAction from '@/components/TideChipAction.vue';
|
|
2
2
|
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
3
|
+
import * as STANDARD_ICON from '@/types/Icon';
|
|
3
4
|
import {
|
|
4
5
|
argTypeBooleanUnrequired,
|
|
5
6
|
click,
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
type Args = InstanceType<typeof TideChipAction>['$props'];
|
|
13
14
|
|
|
14
15
|
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
16
|
+
const ICON = prependNoneAsUndefined(STANDARD_ICON.ICON);
|
|
15
17
|
|
|
16
18
|
const render = (args: Args) => ({
|
|
17
19
|
components: { TideChipAction },
|
|
@@ -28,7 +30,6 @@ export default {
|
|
|
28
30
|
dataTrack,
|
|
29
31
|
element: {
|
|
30
32
|
...formatArgType({ ELEMENT }),
|
|
31
|
-
description: 'HTML tag type',
|
|
32
33
|
table: {
|
|
33
34
|
defaultValue: { summary: 'LINK' },
|
|
34
35
|
type: { summary: 'Element' },
|
|
@@ -36,21 +37,25 @@ export default {
|
|
|
36
37
|
},
|
|
37
38
|
href: {
|
|
38
39
|
control: 'text',
|
|
39
|
-
description: 'URL to navigate to on click',
|
|
40
40
|
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
41
41
|
table: {
|
|
42
42
|
defaultValue: { summary: 'None' },
|
|
43
43
|
type: { summary: 'string' },
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
|
+
iconLeading: {
|
|
47
|
+
...formatArgType({ ICON }),
|
|
48
|
+
table: {
|
|
49
|
+
category: 'Props',
|
|
50
|
+
defaultValue: { summary: 'SEARCH' },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
46
53
|
isNewTab: {
|
|
47
54
|
...argTypeBooleanUnrequired,
|
|
48
|
-
description: 'Determines whether to target a new browser tab',
|
|
49
55
|
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
50
56
|
},
|
|
51
57
|
label: {
|
|
52
58
|
control: 'text',
|
|
53
|
-
description: 'Chip text',
|
|
54
59
|
table: {
|
|
55
60
|
defaultValue: { summary: 'None' },
|
|
56
61
|
type: { summary: 'string' },
|
|
@@ -62,6 +67,7 @@ export default {
|
|
|
62
67
|
dataTrack: '',
|
|
63
68
|
element: undefined,
|
|
64
69
|
href: 'https://www.sample.com',
|
|
70
|
+
iconLeading: undefined,
|
|
65
71
|
isNewTab: undefined,
|
|
66
72
|
label: 'Demo',
|
|
67
73
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import TideImageBackground from '@/components/TideImageBackground.vue';
|
|
2
2
|
import { MEDIA } from '@/types/Breakpoint';
|
|
3
|
+
import { CSS } from '@/types/Styles';
|
|
3
4
|
import { argTypeBooleanUnrequired } from '@/utilities/storybook';
|
|
4
5
|
|
|
5
6
|
import type { Source } from '@/types/Source';
|
|
@@ -37,7 +38,7 @@ const render = (args: Args) => ({
|
|
|
37
38
|
},
|
|
38
39
|
template: `
|
|
39
40
|
<TideImageBackground v-bind="args">
|
|
40
|
-
<div class="
|
|
41
|
+
<div class="${[CSS.PADDING.FULL.FOUR, CSS.FONT.ROLE.HEADLINE_2].join(' ')}">
|
|
41
42
|
{{ args.default }}
|
|
42
43
|
</div>
|
|
43
44
|
</TideImageBackground>
|
|
@@ -83,11 +83,11 @@ const render = (args: Args, context: StoryContext) => ({
|
|
|
83
83
|
components: { TideInputSelect },
|
|
84
84
|
methods: {
|
|
85
85
|
doSomething,
|
|
86
|
-
handleChange: () => {
|
|
86
|
+
handleChange: (event: Event) => {
|
|
87
87
|
const value = (event?.target as HTMLSelectElement).value;
|
|
88
88
|
|
|
89
89
|
action('TideInputSelect changed')({});
|
|
90
|
-
context.updateArgs({ ...args, value });
|
|
90
|
+
context.updateArgs({ ...args, vModel: value });
|
|
91
91
|
|
|
92
92
|
try {
|
|
93
93
|
const callback = eval(args.change);
|
|
@@ -127,7 +127,6 @@ export default {
|
|
|
127
127
|
},
|
|
128
128
|
error: {
|
|
129
129
|
control: 'text',
|
|
130
|
-
description: 'Overrides the default error message and valid state',
|
|
131
130
|
table: {
|
|
132
131
|
defaultValue: { summary: 'None' },
|
|
133
132
|
type: { summary: 'string' },
|
|
@@ -135,7 +134,6 @@ export default {
|
|
|
135
134
|
},
|
|
136
135
|
errorDisplay: {
|
|
137
136
|
...formatArgType({ ERROR_DISPLAY }),
|
|
138
|
-
description: 'Determines whether errors display prior to blur',
|
|
139
137
|
},
|
|
140
138
|
handleValid: {
|
|
141
139
|
control: 'text',
|
|
@@ -158,7 +156,6 @@ export default {
|
|
|
158
156
|
},
|
|
159
157
|
label: {
|
|
160
158
|
control: 'text',
|
|
161
|
-
description: 'Label content',
|
|
162
159
|
table: {
|
|
163
160
|
defaultValue: { summary: 'None' },
|
|
164
161
|
type: { summary: 'string' },
|
|
@@ -166,7 +163,6 @@ export default {
|
|
|
166
163
|
},
|
|
167
164
|
name: {
|
|
168
165
|
control: 'text',
|
|
169
|
-
description: 'Name attribute',
|
|
170
166
|
table: {
|
|
171
167
|
defaultValue: { summary: 'None' },
|
|
172
168
|
type: { summary: 'string' },
|
|
@@ -175,7 +171,6 @@ export default {
|
|
|
175
171
|
optgroups: {
|
|
176
172
|
...formatArgType({ selectOptionGroups }),
|
|
177
173
|
control: 'object',
|
|
178
|
-
description: 'Determines grouped values found inside Select',
|
|
179
174
|
isCustom: true,
|
|
180
175
|
table: {
|
|
181
176
|
defaultValue: { summary: '[]' },
|
|
@@ -185,20 +180,32 @@ export default {
|
|
|
185
180
|
options: {
|
|
186
181
|
...formatArgType({ selectOptions }),
|
|
187
182
|
control: 'object',
|
|
188
|
-
description: 'Determines ungrouped values found inside Select',
|
|
189
183
|
isCustom: true,
|
|
190
184
|
table: {
|
|
191
185
|
defaultValue: { summary: '[]' },
|
|
192
186
|
type: { summary: 'SelectOption[]' },
|
|
193
187
|
},
|
|
194
188
|
},
|
|
189
|
+
prefix: {
|
|
190
|
+
control: 'text',
|
|
191
|
+
table: {
|
|
192
|
+
defaultValue: { summary: 'None' },
|
|
193
|
+
type: { summary: 'string' },
|
|
194
|
+
},
|
|
195
|
+
},
|
|
195
196
|
required: {
|
|
196
197
|
...argTypeBooleanUnrequired,
|
|
197
198
|
description: 'Determines whether Select is required',
|
|
198
199
|
},
|
|
200
|
+
suffix: {
|
|
201
|
+
control: 'text',
|
|
202
|
+
table: {
|
|
203
|
+
defaultValue: { summary: 'None' },
|
|
204
|
+
type: { summary: 'string' },
|
|
205
|
+
},
|
|
206
|
+
},
|
|
199
207
|
supportingText: {
|
|
200
208
|
control: 'text',
|
|
201
|
-
description: 'Explainer text beneath input',
|
|
202
209
|
table: {
|
|
203
210
|
defaultValue: { summary: 'None' },
|
|
204
211
|
type: { summary: 'string' },
|
|
@@ -227,7 +234,9 @@ export default {
|
|
|
227
234
|
name: '',
|
|
228
235
|
optgroups: selectOptionGroups,
|
|
229
236
|
options: selectOptions,
|
|
237
|
+
prefix: '',
|
|
230
238
|
required: undefined,
|
|
239
|
+
suffix: '',
|
|
231
240
|
supportingText: '',
|
|
232
241
|
vModel: '',
|
|
233
242
|
},
|
|
@@ -169,20 +169,17 @@ export default {
|
|
|
169
169
|
},
|
|
170
170
|
isBackButton: {
|
|
171
171
|
...argTypeBooleanUnrequired,
|
|
172
|
-
description: 'Determines whether the back button is displayed',
|
|
173
172
|
table: {
|
|
174
173
|
defaultValue: { summary: 'False' },
|
|
175
174
|
},
|
|
176
175
|
},
|
|
177
176
|
isDismissible: {
|
|
178
177
|
...argTypeBooleanUnrequired,
|
|
179
|
-
description: 'Determines whether the close button is displayed',
|
|
180
178
|
table: {
|
|
181
179
|
defaultValue: { summary: 'False' },
|
|
182
180
|
},
|
|
183
181
|
},
|
|
184
182
|
title: {
|
|
185
|
-
description: 'Modal title',
|
|
186
183
|
table: {
|
|
187
184
|
defaultValue: { summary: 'None' },
|
|
188
185
|
},
|
|
@@ -197,7 +194,6 @@ export default {
|
|
|
197
194
|
},
|
|
198
195
|
},
|
|
199
196
|
width: {
|
|
200
|
-
description: 'Applies width to Modal<br />(include units)',
|
|
201
197
|
table: {
|
|
202
198
|
defaultValue: { summary: 'None' },
|
|
203
199
|
},
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import TideRealmLogo from '@/components/TideRealmLogo.vue';
|
|
2
|
+
import { REALM } from '@/types/Realm';
|
|
3
|
+
import { SIZE_LOGO } from '@/types/RealmLogo';
|
|
4
|
+
import { formatArgType, parameters } from '@/utilities/storybook';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
argTypes: {
|
|
8
|
+
realm: {
|
|
9
|
+
...formatArgType({ REALM }),
|
|
10
|
+
},
|
|
11
|
+
size: {
|
|
12
|
+
...formatArgType({ SIZE_LOGO }),
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
realm: REALM.RV,
|
|
17
|
+
size: SIZE_LOGO.LARGE,
|
|
18
|
+
},
|
|
19
|
+
component: TideRealmLogo,
|
|
20
|
+
parameters,
|
|
21
|
+
tags: ['autodocs'],
|
|
22
|
+
title: 'Components/TideRealmLogo',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Demo = {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { action } from '@storybook/addon-actions';
|
|
2
|
+
import { h } from 'vue';
|
|
3
|
+
|
|
4
|
+
import TideButton from '@/components/TideButton.vue';
|
|
5
|
+
import TideToaster from '@/components/TideToaster.vue';
|
|
6
|
+
import { useTideToaster } from '@/composables/useTideToaster';
|
|
7
|
+
import { doSomething, lineBreak, tab } from '@/utilities/storybook';
|
|
8
|
+
|
|
9
|
+
import type { StoryContext } from '@storybook/vue3';
|
|
10
|
+
|
|
11
|
+
type Args = {
|
|
12
|
+
actionLabel: string;
|
|
13
|
+
description: string;
|
|
14
|
+
heading: string;
|
|
15
|
+
isActionable: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const formatSnippet = (code: string, context: StoryContext) => {
|
|
19
|
+
const { args } = context;
|
|
20
|
+
|
|
21
|
+
const toastConfig = [
|
|
22
|
+
`heading: '${args.heading}'`,
|
|
23
|
+
args.description ? `description: '${args.description}'` : null,
|
|
24
|
+
args.isActionable ? `action: { label: '${args.actionLabel}', callback: () => {} }` : null,
|
|
25
|
+
]
|
|
26
|
+
.filter(Boolean)
|
|
27
|
+
.join(`,${lineBreak}${tab}${tab}`);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
`<TideToaster />${lineBreak}${lineBreak}` +
|
|
31
|
+
`<script setup>${lineBreak}` +
|
|
32
|
+
`${tab}const { addToast } = useTideToaster();${lineBreak}${lineBreak}` +
|
|
33
|
+
`${tab}addToast({${lineBreak}` +
|
|
34
|
+
`${tab}${tab}${toastConfig}${lineBreak}` +
|
|
35
|
+
`${tab}});${lineBreak}` +
|
|
36
|
+
`</script>`
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const parameters = {
|
|
41
|
+
docs: {
|
|
42
|
+
source: {
|
|
43
|
+
format: 'vue',
|
|
44
|
+
language: 'html',
|
|
45
|
+
transform: formatSnippet,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const render = (args: Args) => {
|
|
51
|
+
return {
|
|
52
|
+
components: { TideButton, TideToaster },
|
|
53
|
+
setup() {
|
|
54
|
+
const { addToast } = useTideToaster();
|
|
55
|
+
|
|
56
|
+
const triggerToast = () => {
|
|
57
|
+
action('Toast triggered')({});
|
|
58
|
+
|
|
59
|
+
addToast({
|
|
60
|
+
action: args.isActionable
|
|
61
|
+
? {
|
|
62
|
+
callback: () => {
|
|
63
|
+
action('CTA clicked')({});
|
|
64
|
+
doSomething();
|
|
65
|
+
},
|
|
66
|
+
label: args.actionLabel,
|
|
67
|
+
}
|
|
68
|
+
: undefined,
|
|
69
|
+
description: args.description,
|
|
70
|
+
heading: args.heading,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
return () =>
|
|
75
|
+
h('div', { style: 'min-height: 200px;' }, [
|
|
76
|
+
h(TideButton, {
|
|
77
|
+
label: 'Trigger Toast',
|
|
78
|
+
onClick: triggerToast,
|
|
79
|
+
}),
|
|
80
|
+
h(TideToaster),
|
|
81
|
+
]);
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default {
|
|
87
|
+
argTypes: {
|
|
88
|
+
actionLabel: {
|
|
89
|
+
control: 'text',
|
|
90
|
+
table: { defaultValue: { summary: 'None' } },
|
|
91
|
+
},
|
|
92
|
+
description: {
|
|
93
|
+
control: 'text',
|
|
94
|
+
table: { defaultValue: { summary: 'None' } },
|
|
95
|
+
},
|
|
96
|
+
heading: {
|
|
97
|
+
control: 'text',
|
|
98
|
+
table: { defaultValue: { summary: 'None' } },
|
|
99
|
+
},
|
|
100
|
+
isActionable: {
|
|
101
|
+
control: 'boolean',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
args: {
|
|
105
|
+
actionLabel: 'Undo',
|
|
106
|
+
description: 'This is a toast notification.',
|
|
107
|
+
heading: 'Toast Demo',
|
|
108
|
+
isActionable: false,
|
|
109
|
+
},
|
|
110
|
+
component: TideToaster,
|
|
111
|
+
parameters,
|
|
112
|
+
render,
|
|
113
|
+
tags: ['autodocs'],
|
|
114
|
+
title: 'Components/TideToaster',
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const Demo = {};
|
package/src/types/Icon.ts
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RealmKey } from '@/types/Realm';
|
|
2
|
+
|
|
3
|
+
export const SIZE_LOGO = {
|
|
4
|
+
LARGE: 'large',
|
|
5
|
+
MARK: 'mark',
|
|
6
|
+
SMALL: 'small',
|
|
7
|
+
} as const;
|
|
8
|
+
type SizeLogoKey = keyof typeof SIZE_LOGO;
|
|
9
|
+
export type SizeLogo = (typeof SIZE_LOGO)[SizeLogoKey];
|
|
10
|
+
|
|
11
|
+
export const LOGO_HEIGHT = {
|
|
12
|
+
LARGE: 32,
|
|
13
|
+
SMALL: 24,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const LOGO_LARGE_WIDTH: Record<RealmKey, number> = {
|
|
17
|
+
AERO: 186,
|
|
18
|
+
ATV: 192,
|
|
19
|
+
BOATMART: 152,
|
|
20
|
+
CYCLE: 169,
|
|
21
|
+
EQUIPMENT: 112,
|
|
22
|
+
PWC: 177,
|
|
23
|
+
RV: 169,
|
|
24
|
+
SNOW: 150,
|
|
25
|
+
TRUCK: 185,
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
export const LOGO_MARK_WIDTH: Record<RealmKey, number> = {
|
|
29
|
+
AERO: 32,
|
|
30
|
+
ATV: 32,
|
|
31
|
+
BOATMART: 33,
|
|
32
|
+
CYCLE: 32,
|
|
33
|
+
EQUIPMENT: 37,
|
|
34
|
+
PWC: 32,
|
|
35
|
+
RV: 32,
|
|
36
|
+
SNOW: 32,
|
|
37
|
+
TRUCK: 32,
|
|
38
|
+
} as const;
|
package/src/types/Styles.ts
CHANGED
|
@@ -512,10 +512,11 @@ export const CSS = {
|
|
|
512
512
|
},
|
|
513
513
|
WIDTH: {
|
|
514
514
|
AUTO: 'tide-width-auto',
|
|
515
|
-
ZERO: 'tide-width-0',
|
|
516
515
|
FULL: 'tide-width-full',
|
|
517
516
|
MAX_FULL: 'tide-max-width-full',
|
|
518
517
|
MIN_ZERO: 'tide-min-width-0',
|
|
518
|
+
STRETCH: 'tide-width-stretch',
|
|
519
|
+
ZERO: 'tide-width-0',
|
|
519
520
|
},
|
|
520
521
|
Z_INDEX: {
|
|
521
522
|
INITIAL: 'tide-z-index-initial',
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type TideToast = {
|
|
4
|
+
description?: string;
|
|
5
|
+
heading: string;
|
|
6
|
+
id: string;
|
|
7
|
+
action?: {
|
|
8
|
+
callback: () => void;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type TideToastOmitId = Omit<TideToast, 'id'>;
|
|
14
|
+
|
|
15
|
+
export type TideToaster = {
|
|
16
|
+
addToast: (toast: TideToastOmitId) => void;
|
|
17
|
+
cancelAutoDismiss: () => void;
|
|
18
|
+
clearToasts: () => void;
|
|
19
|
+
startAutoDismiss: () => void;
|
|
20
|
+
toasts: Ref<readonly TideToast[]>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { REALM } from '@/types/Realm';
|
|
2
|
+
|
|
3
|
+
import type { Realm, RealmKey } from '@/types/Realm';
|
|
4
|
+
|
|
5
|
+
export const getRealmKeyFromRealm = (realm: Realm): RealmKey => {
|
|
6
|
+
const entries = Object.entries(REALM) as [RealmKey, Realm][];
|
|
7
|
+
|
|
8
|
+
const match = entries.find((entry): entry is [RealmKey, Realm] => {
|
|
9
|
+
return entry[1] === realm;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
if (!match) {
|
|
13
|
+
throw new Error(`Mapping for ${realm} not found`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return match[0];
|
|
17
|
+
};
|
|
@@ -34,8 +34,8 @@ export const setScrollLock = async (isLocked: boolean) => {
|
|
|
34
34
|
// body.classList.remove(BODY_LOCK_CLASS);
|
|
35
35
|
|
|
36
36
|
body.style.removeProperty('inset');
|
|
37
|
-
body.style.removeProperty('
|
|
38
|
-
body.style.removeProperty('
|
|
37
|
+
body.style.removeProperty('margin-top');
|
|
38
|
+
body.style.removeProperty('overflow-y');
|
|
39
39
|
body.style.removeProperty('position');
|
|
40
40
|
body.style.removeProperty('--saved-scroll-y');
|
|
41
41
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { describe, expect, it } from 'vitest';
|
|
4
|
+
|
|
5
|
+
import { LOGO_LARGE_WIDTH, LOGO_MARK_WIDTH } from '@/types/RealmLogo.ts';
|
|
6
|
+
|
|
7
|
+
const BRANDING_DIR = path.resolve(__dirname, '../src/assets/svg/branding');
|
|
8
|
+
const LOGO_DIR = path.join(BRANDING_DIR, 'logo');
|
|
9
|
+
const MARK_DIR = path.join(BRANDING_DIR, 'mark');
|
|
10
|
+
|
|
11
|
+
function getViewBoxWidth(content: string): number | null {
|
|
12
|
+
const viewBoxMatch = content.match(/viewBox\s*=\s*["']0\s+0\s+(\d+\.?\d*)\s+\d+\.?\d*["']/i);
|
|
13
|
+
return viewBoxMatch ? parseFloat(viewBoxMatch[1]) : null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
describe('Realm Logo Constant Validation', () => {
|
|
17
|
+
const realms = Object.keys(LOGO_LARGE_WIDTH) as (keyof typeof LOGO_LARGE_WIDTH)[];
|
|
18
|
+
|
|
19
|
+
describe('Full Logos', () => {
|
|
20
|
+
realms.forEach((realm) => {
|
|
21
|
+
const fileName = `logo-${realm.toLowerCase()}.svg`;
|
|
22
|
+
const filePath = path.join(LOGO_DIR, fileName);
|
|
23
|
+
|
|
24
|
+
it(`should match the viewBox width in ${fileName}`, () => {
|
|
25
|
+
if (!fs.existsSync(filePath)) {
|
|
26
|
+
throw new Error(`SVG file missing: ${filePath}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
30
|
+
const vbWidth = getViewBoxWidth(content);
|
|
31
|
+
|
|
32
|
+
expect(vbWidth, `Could not parse viewBox in ${fileName}`).not.toBeNull();
|
|
33
|
+
|
|
34
|
+
expect(LOGO_LARGE_WIDTH[realm], `LOGO_LARGE_WIDTH[${realm}] does not match ${fileName}`).toBe(vbWidth);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('Logo Marks', () => {
|
|
40
|
+
realms.forEach((realm) => {
|
|
41
|
+
const fileName = `mark-${realm.toLowerCase()}.svg`;
|
|
42
|
+
const filePath = path.join(MARK_DIR, fileName);
|
|
43
|
+
|
|
44
|
+
it(`should match the viewBox width in ${fileName}`, () => {
|
|
45
|
+
if (!fs.existsSync(filePath)) {
|
|
46
|
+
throw new Error(`SVG file missing: ${filePath}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
50
|
+
const vbWidth = getViewBoxWidth(content);
|
|
51
|
+
|
|
52
|
+
expect(vbWidth, `Could not parse viewBox in ${fileName}`).not.toBeNull();
|
|
53
|
+
|
|
54
|
+
expect(LOGO_MARK_WIDTH[realm], `LOGO_MARK_WIDTH[${realm}] does not match ${fileName}`).toBe(vbWidth);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|