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.
Files changed (264) hide show
  1. package/.storybook/main.ts +2 -0
  2. package/dist/{IconAccountBalance-B9rJ09ax.js → IconAccountBalance-dARjIrfY.js} +3 -3
  3. package/dist/{IconAcute-9dHrmblT.js → IconAcute-BWwq_P2g.js} +3 -3
  4. package/dist/{IconAdd-BsJiPHYa.js → IconAdd-DtInpvF3.js} +3 -3
  5. package/dist/{IconAiDescription-fQ_B1UGe.js → IconAiDescription-C-OGiP7T.js} +3 -3
  6. package/dist/{IconAlignSpaceEven-B2UIi1ao.js → IconAlignSpaceEven-CTm_RFZr.js} +3 -3
  7. package/dist/{IconApplePay-DS6fQdV_.js → IconApplePay-BEECKvxd.js} +3 -3
  8. package/dist/{IconArrowBack-CZSCZ-Jf.js → IconArrowBack-CJYjUSAT.js} +3 -3
  9. package/dist/{IconArrowCycle-D3f38VT-.js → IconArrowCycle-B-SIKRjr.js} +3 -3
  10. package/dist/{IconArrowForward-CICM-aJ1.js → IconArrowForward-CTC_pWUJ.js} +3 -3
  11. package/dist/{IconArrowRight-CwweSeyO.js → IconArrowRight-DVgboHar.js} +3 -3
  12. package/dist/{IconArrowUp-7TI0p224.js → IconArrowUp-8yer6-rz.js} +3 -3
  13. package/dist/{IconAssignment-DQQnmJc_.js → IconAssignment-CKdgR4IZ.js} +3 -3
  14. package/dist/{IconAttachMoney-sLj77NOR.js → IconAttachMoney-BOqK4Ty3.js} +3 -3
  15. package/dist/{IconAtvAtv-bfqGL_Iq.js → IconAtvAtv-CVxNZw3x.js} +3 -3
  16. package/dist/{IconAtvDuneBuggy-CbiyQRZg.js → IconAtvDuneBuggy-ChpKK_uj.js} +3 -3
  17. package/dist/{IconAtvGoKart-BxqcGKzS.js → IconAtvGoKart-BA3-opIb.js} +3 -3
  18. package/dist/{IconAtvGolfCart-6Xwju3k6.js → IconAtvGolfCart-DIQybI94.js} +3 -3
  19. package/dist/{IconAtvSandRail-dKmA3KoG.js → IconAtvSandRail-vMg9E1B1.js} +3 -3
  20. package/dist/{IconAtvSideBySide-CVSUrX7w.js → IconAtvSideBySide-DpAgficE.js} +3 -3
  21. package/dist/{IconAtvTrailer-BB6C_WKk.js → IconAtvTrailer-DmqyaW6g.js} +3 -3
  22. package/dist/{IconAutoRenew-Bl-Obhh6.js → IconAutoRenew-PKxzoFUm.js} +3 -3
  23. package/dist/{IconAwardStar-KYYsH2ss.js → IconAwardStar-C80c-wJ9.js} +3 -3
  24. package/dist/{IconBed-BVLiRAhU.js → IconBed-D8iyGBIR.js} +3 -3
  25. package/dist/{IconBoatmartPwc-B3seLCYC.js → IconBoatmartPwc-a1AOjs7L.js} +3 -3
  26. package/dist/{IconBoatmartTrailer-BosS4Ix8.js → IconBoatmartTrailer-CprxPgWU.js} +3 -3
  27. package/dist/{IconBolt-D-BSIXex.js → IconBolt-D7tpOZMC.js} +3 -3
  28. package/dist/{IconBookmark-D3Pu86n4.js → IconBookmark-ZpQyXxtb.js} +3 -3
  29. package/dist/{IconBunkhouse-B4PaVH2y.js → IconBunkhouse-rPtR_Mct.js} +3 -3
  30. package/dist/{IconCalendarMonth-CortoSy-.js → IconCalendarMonth-CKF3HJsX.js} +3 -3
  31. package/dist/{IconCall-DRysHKSn.js → IconCall-D6EvqV8k.js} +3 -3
  32. package/dist/{IconCallQuality-BMVs2M2s.js → IconCallQuality-FekMElKo.js} +3 -3
  33. package/dist/{IconCarRental-qvIsiGfR.js → IconCarRental-Cw5T4p4_.js} +3 -3
  34. package/dist/{IconCheck-CliQNN_D.js → IconCheck-Dmmvwu7-.js} +3 -3
  35. package/dist/{IconChevronLeft-hQC1St0W.js → IconChevronLeft-BF0qcV0B.js} +3 -3
  36. package/dist/{IconChevronRight-DVYcrzWE.js → IconChevronRight-CdE3lIbm.js} +3 -3
  37. package/dist/{IconClear-COYKsp8t.js → IconClear-YX6AUd3q.js} +3 -3
  38. package/dist/{IconClose-HSRbXCDE.js → IconClose-BKDRiJCn.js} +3 -3
  39. package/dist/{IconContract-BaV1mGEr.js → IconContract-7-9lX0ZL.js} +3 -3
  40. package/dist/{IconCrash-ClWQK2fw.js → IconCrash-Cz7QujvF.js} +3 -3
  41. package/dist/IconCycleMotorcycle-B8syyXoU.cjs +2 -0
  42. package/dist/IconCycleMotorcycle-DVRTUcId.js +21 -0
  43. package/dist/IconCycleTrailer-COTSVorR.cjs +2 -0
  44. package/dist/IconCycleTrailer-Cp2Ak9pX.js +20 -0
  45. package/dist/{IconDashboardCustomize-BJEcZ-jN.js → IconDashboardCustomize-g3VnCCx1.js} +3 -3
  46. package/dist/{IconDelete-DJwergoy.js → IconDelete-Dnyl1uzD.js} +3 -3
  47. package/dist/{IconDiamond-D34wtBhd.js → IconDiamond-sAYziqWh.js} +3 -3
  48. package/dist/{IconDirectionsBoat-ByiHuypy.js → IconDirectionsBoat-D0xl5It-.js} +3 -3
  49. package/dist/{IconDomain-CXsBLm5C.js → IconDomain-as7lGUZz.js} +3 -3
  50. package/dist/{IconDraft-qSYk5cPm.js → IconDraft-BTRj5LyI.js} +3 -3
  51. package/dist/{IconEdit-CFeDlBN2.js → IconEdit-Z8QjfAFi.js} +3 -3
  52. package/dist/{IconEngine-BLi3BThi.js → IconEngine-Nq1jLYrS.js} +3 -3
  53. package/dist/{IconEngineering-DKDW6b3b.js → IconEngineering-CDeCKiuN.js} +3 -3
  54. package/dist/{IconError-BsmS7Ido.js → IconError-CHkF1F4l.js} +3 -3
  55. package/dist/{IconExpandContent-CUz-acoJ.js → IconExpandContent-BKW1v-s1.js} +3 -3
  56. package/dist/{IconExpandLess-kI04ZTDg.js → IconExpandLess-DuwH_WmO.js} +3 -3
  57. package/dist/{IconExpandMore-BpIrNsXP.js → IconExpandMore-C-Fof15e.js} +3 -3
  58. package/dist/{IconFacebook-DiMWgcSK.js → IconFacebook-94UC5eci.js} +3 -3
  59. package/dist/{IconFavorite-CDLEUDWu.js → IconFavorite-Bi2ZLSFU.js} +3 -3
  60. package/dist/{IconFavoriteFilled--f1zeXKy.js → IconFavoriteFilled-BOzK3oQt.js} +3 -3
  61. package/dist/{IconFlag-CmppikB3.js → IconFlag-D3BdWSHX.js} +3 -3
  62. package/dist/{IconFormatBold-rtvyBotR.js → IconFormatBold-ptl4C5om.js} +3 -3
  63. package/dist/{IconFormatItalic-BlcS8gnO.js → IconFormatItalic-wjYo3E6V.js} +3 -3
  64. package/dist/{IconFormatListBulleted-BbJCNSJG.js → IconFormatListBulleted-Z4H5EHHL.js} +3 -3
  65. package/dist/{IconForum-CFa_3MsA.js → IconForum-dExYXhMs.js} +3 -3
  66. package/dist/{IconGas-rD46ubiw.js → IconGas-BeL_PidJ.js} +3 -3
  67. package/dist/{IconGavel-l3k6jtN3.js → IconGavel-b699C85e.js} +3 -3
  68. package/dist/{IconGears-CaXA9HK2.js → IconGears-DY0BIt9k.js} +3 -3
  69. package/dist/{IconGlobeLocationPin-cTdYm_5A.js → IconGlobeLocationPin-PPiJIaCW.js} +3 -3
  70. package/dist/{IconGoogle-6R7roJzd.js → IconGoogle-B1k1zKq5.js} +3 -3
  71. package/dist/{IconGooglePay-XLqJKvZe.js → IconGooglePay-CnoBw2gC.js} +3 -3
  72. package/dist/{IconGrid-BoplWzPb.js → IconGrid-DPAFjLOo.js} +3 -3
  73. package/dist/{IconHandshake-CsYF9kmp.js → IconHandshake-CF0rWfIQ.js} +3 -3
  74. package/dist/{IconHandyman-CQL-qu8p.js → IconHandyman-DqbZcABm.js} +3 -3
  75. package/dist/{IconHeight-CTAQLi2I.js → IconHeight-1sxFnuqb.js} +3 -3
  76. package/dist/{IconHelp-BEzzbWr3.js → IconHelp-BfxZeVdy.js} +3 -3
  77. package/dist/{IconInfo-BACpUpXu.js → IconInfo-ZZNZK4Fs.js} +3 -3
  78. package/dist/{IconInformation-CGYah4Eo.js → IconInformation-CQc0HSVc.js} +3 -3
  79. package/dist/{IconInsertText-C5HjwAuL.js → IconInsertText-dHM33CGA.js} +3 -3
  80. package/dist/{IconInstagram-DEPxn51x.js → IconInstagram-BbTbVTQe.js} +3 -3
  81. package/dist/{IconIosShare-jNePPJBV.js → IconIosShare-fe7iyZSt.js} +3 -3
  82. package/dist/{IconLayout-CgFL9FBD.js → IconLayout-BYkhBGPm.js} +3 -3
  83. package/dist/{IconLevellingJack-rO4KepKs.js → IconLevellingJack-CuuMfb9e.js} +3 -3
  84. package/dist/{IconLinkedIn-GWoK01li.js → IconLinkedIn-iC2pYpmX.js} +3 -3
  85. package/dist/{IconLocalShipping-Bayc9OL_.js → IconLocalShipping-sAYdRn-q.js} +3 -3
  86. package/dist/{IconLock-WfiVOWPI.js → IconLock-c8yaYnyT.js} +3 -3
  87. package/dist/{IconMail-ejl1H7D9.js → IconMail-D0yowPmX.js} +3 -3
  88. package/dist/{IconMenu-FlE3z6fX.js → IconMenu-Btzwi7Bu.js} +3 -3
  89. package/dist/{IconMoneyBag-CYq7aYjH.js → IconMoneyBag-BcZCfjrN.js} +3 -3
  90. package/dist/{IconMoreHoriz-B0mCtW1_.js → IconMoreHoriz-CYiGX78Y.js} +3 -3
  91. package/dist/{IconNotifications-Bm_gSQGu.js → IconNotifications-uBv1nZZ2.js} +3 -3
  92. package/dist/{IconOdometer-COcVC_eb.js → IconOdometer-DZASryD7.js} +3 -3
  93. package/dist/{IconOpenInNew-DFieFQIk.js → IconOpenInNew-VuTM8uiR.js} +3 -3
  94. package/dist/{IconPalette-DoDIzZJO.js → IconPalette-B78tp213.js} +3 -3
  95. package/dist/{IconPaypal-CX6Z2rvX.js → IconPaypal-z7u9aPLj.js} +3 -3
  96. package/dist/{IconPerson-CK0AXlS_.js → IconPerson-DWwdRmJX.js} +3 -3
  97. package/dist/{IconPersonSearch-Da5EdDrS.js → IconPersonSearch-4ESzm5yH.js} +3 -3
  98. package/dist/{IconPhotoCamera-DZHI-Yb7.js → IconPhotoCamera-Drkhsfpi.js} +3 -3
  99. package/dist/{IconPinterest-B3UM6t9-.js → IconPinterest-BhgYE6Fc.js} +3 -3
  100. package/dist/{IconPlayArrow-CR7bXHC8.js → IconPlayArrow-ztNUkoji.js} +3 -3
  101. package/dist/{IconPolicy-CzN-v54O.js → IconPolicy-DrcQUdvI.js} +3 -3
  102. package/dist/{IconPower-C5MJihEZ.js → IconPower-BISw4q1i.js} +3 -3
  103. package/dist/{IconPowerOff-BziDMScz.js → IconPowerOff-D94o_eIX.js} +3 -3
  104. package/dist/{IconPriorityHigh-Bv-j3DaQ.js → IconPriorityHigh-DzCnK1QW.js} +3 -3
  105. package/dist/{IconRemove-Bo4RUocr.js → IconRemove-gGo2PMeX.js} +3 -3
  106. package/dist/{IconRequestQuote-BUNyScQ-.js → IconRequestQuote-CWfytYvA.js} +3 -3
  107. package/dist/{IconResetWrench-DCcBmojh.js → IconResetWrench-B0tYLDcb.js} +3 -3
  108. package/dist/{IconRoad-BGTu-WPJ.js → IconRoad-m4Orr44c.js} +3 -3
  109. package/dist/{IconRoundedCorner-DycjfuJj.js → IconRoundedCorner-CqdpAVGU.js} +3 -3
  110. package/dist/{IconRuler-Da8zNDvf.js → IconRuler-C8SSjTfX.js} +3 -3
  111. package/dist/{IconRvClassA-D2-lug19.js → IconRvClassA-CFQOw02-.js} +3 -3
  112. package/dist/{IconRvClassB-Coe3FpBI.js → IconRvClassB-p-03DBol.js} +3 -3
  113. package/dist/{IconRvClassC-DWnLqMGg.js → IconRvClassC-BP5Zzlj_.js} +3 -3
  114. package/dist/{IconRvFifthWheel-CB_mQ-tO.js → IconRvFifthWheel-BMGxt3_M.js} +3 -3
  115. package/dist/{IconRvFishHouse-Cs2fm3r1.js → IconRvFishHouse-C7iNMr-3.js} +3 -3
  116. package/dist/{IconRvParkModel-D4S_iYTG.js → IconRvParkModel-l4Rx5P9F.js} +3 -3
  117. package/dist/{IconRvPopUpCamper-CW47dgll.js → IconRvPopUpCamper-BY6aLEic.js} +3 -3
  118. package/dist/{IconRvTravelTrailer-CC48bci7.js → IconRvTravelTrailer-FstodwFk.js} +3 -3
  119. package/dist/{IconRvTruckCamper-EoEVfaJM.js → IconRvTruckCamper-lLLE86pz.js} +3 -3
  120. package/dist/{IconSailing-CPcgnYwx.js → IconSailing-svTfDLn9.js} +3 -3
  121. package/dist/{IconSchool-3Dy70s11.js → IconSchool-CUB4fiMX.js} +3 -3
  122. package/dist/{IconSearch-C8WeOYws.js → IconSearch-QZW19aza.js} +3 -3
  123. package/dist/{IconSeating-D7B47LU4.js → IconSeating-B3MAIZkv.js} +3 -3
  124. package/dist/{IconSell-B95iGdOh.js → IconSell-CG2i7EOI.js} +3 -3
  125. package/dist/{IconSensors-Ckv6BEOK.js → IconSensors-BVBTJDAv.js} +3 -3
  126. package/dist/{IconSettings-CLrLZmQs.js → IconSettings-BGJv8ylA.js} +3 -3
  127. package/dist/{IconShare-CH2w2udo.js → IconShare-DLN_ze1T.js} +3 -3
  128. package/dist/{IconShieldCheck-BBHcsJhF.js → IconShieldCheck-DwGlL83P.js} +3 -3
  129. package/dist/{IconShoppingCart-_CKPKJ12.js → IconShoppingCart-BWcDIQ0t.js} +3 -3
  130. package/dist/{IconSleeps-CTzXW2RS.js → IconSleeps-Bl1OHp_d.js} +3 -3
  131. package/dist/{IconSms-C_jULP6X.js → IconSms-DXF4Rvv5.js} +3 -3
  132. package/dist/{IconSnowflake-DYpTwl2q.js → IconSnowflake-3DOCBRxO.js} +3 -3
  133. package/dist/{IconStar-CR0UA_S9.js → IconStar-y4w1Q_Ly.js} +3 -3
  134. package/dist/{IconStarFilled-DEnQm6s8.js → IconStarFilled-h3V6lcA1.js} +3 -3
  135. package/dist/{IconStarHalf-DZqwFVlC.js → IconStarHalf-CD3Otd__.js} +3 -3
  136. package/dist/{IconSummarize-BwU7xViX.js → IconSummarize-DQAFpTrk.js} +3 -3
  137. package/dist/{IconSwapHoriz-B7Nu99ui.js → IconSwapHoriz-C3usXzhR.js} +3 -3
  138. package/dist/{IconSwapVert-D83OnTLJ.js → IconSwapVert-CODa7if1.js} +3 -3
  139. package/dist/{IconThreeDRotation-WuabFIaS.js → IconThreeDRotation-Dt-qEsTU.js} +3 -3
  140. package/dist/{IconThumbUp-DwPs1Aog.js → IconThumbUp-2aoi8Hn6.js} +3 -3
  141. package/dist/{IconTrendingDown-CKqQl7o7.js → IconTrendingDown-Cc1jUDOB.js} +3 -3
  142. package/dist/{IconTrophy-DRcIPW-F.js → IconTrophy-CWU4189G.js} +3 -3
  143. package/dist/{IconTune-CXVj1kqb.js → IconTune-PtcGFHGO.js} +3 -3
  144. package/dist/{IconTwitter-B5AwI_-2.js → IconTwitter-Q7-VmjkP.js} +3 -3
  145. package/dist/{IconUmbrella-BWmv4GFi.js → IconUmbrella-B_1l6UAu.js} +3 -3
  146. package/dist/{IconVerified-BMRocsAd.js → IconVerified-BCiRYMzp.js} +3 -3
  147. package/dist/{IconVideocam-D5eUdBxR.js → IconVideocam-TZ4vpxTp.js} +3 -3
  148. package/dist/{IconViewInAr-CvR2gh_r.js → IconViewInAr-Dn4BjPYu.js} +3 -3
  149. package/dist/{IconVisibility-BlzyaCVD.js → IconVisibility-nxEIwt29.js} +3 -3
  150. package/dist/{IconVolumeOff-DB757krU.js → IconVolumeOff-D_ASm6Jk.js} +3 -3
  151. package/dist/{IconVolumeOn-CYf77UaC.js → IconVolumeOn-CTVNBoFQ.js} +3 -3
  152. package/dist/{IconWarehouse-DIRQdX8P.js → IconWarehouse-DP-BJpYG.js} +3 -3
  153. package/dist/{IconWarning-n_GTsWOM.js → IconWarning-DcYnbH1n.js} +3 -3
  154. package/dist/{IconWater-DFV09TyV.js → IconWater-Bh1ru5aW.js} +3 -3
  155. package/dist/{IconWeight-Cq12caT_.js → IconWeight-DfxHx8iL.js} +3 -3
  156. package/dist/{IconWidth-DtPjsKm8.js → IconWidth-E4u3XnEj.js} +3 -3
  157. package/dist/{IconWorkspacePremium-_Olggt_G.js → IconWorkspacePremium-Cn2NhzIu.js} +3 -3
  158. package/dist/{IconWrench-C2MHGxho.js → IconWrench-DHpCQriM.js} +3 -3
  159. package/dist/{IconYoutube-C8cHj1uF.js → IconYoutube-DHlDGTQp.js} +3 -3
  160. package/dist/css/reset.css +2 -2
  161. package/dist/css/utilities-base.css +66 -38
  162. package/dist/css/utilities-responsive.css +424 -312
  163. package/dist/css/variables.css +5 -0
  164. package/dist/logo-aero-CkTVffxb.js +17 -0
  165. package/dist/logo-aero-Z-V0eOLB.cjs +2 -0
  166. package/dist/logo-atv-BC9pKXBl.js +21 -0
  167. package/dist/logo-atv-xQMzut2h.cjs +2 -0
  168. package/dist/logo-boatmart-B9upxiMl.cjs +2 -0
  169. package/dist/logo-boatmart-DroAqtiq.js +16 -0
  170. package/dist/logo-cycle-c9schUUY.cjs +2 -0
  171. package/dist/logo-cycle-iWCyRwSL.js +21 -0
  172. package/dist/logo-equipment-3VYa6YcW.cjs +2 -0
  173. package/dist/logo-equipment-BoqO9oqu.js +17 -0
  174. package/dist/logo-pwc-BBFWrkvE.js +21 -0
  175. package/dist/logo-pwc-DhXtaTyu.cjs +2 -0
  176. package/dist/logo-rv-BRXxuciP.cjs +2 -0
  177. package/dist/logo-rv-DzHxIw2C.js +21 -0
  178. package/dist/logo-snow-Dzpaeho2.js +17 -0
  179. package/dist/logo-snow-PVobISvF.cjs +2 -0
  180. package/dist/logo-truck-DE0J4OIJ.cjs +2 -0
  181. package/dist/logo-truck-MUfLC0tr.js +21 -0
  182. package/dist/mark-aero-CFjGMjbx.cjs +2 -0
  183. package/dist/mark-aero-D8m3JDkS.js +23 -0
  184. package/dist/mark-atv-1Vppojls.js +19 -0
  185. package/dist/mark-atv-BhRn5mUA.cjs +2 -0
  186. package/dist/mark-boatmart-Bmkv3dOs.cjs +2 -0
  187. package/dist/mark-boatmart-b77RvD0c.js +16 -0
  188. package/dist/mark-cycle-BFxZOD4K.js +23 -0
  189. package/dist/mark-cycle-QCLSEZTF.cjs +2 -0
  190. package/dist/mark-equipment-BbnRZ0vl.js +19 -0
  191. package/dist/mark-equipment-ThuZOvf6.cjs +2 -0
  192. package/dist/mark-pwc-CQWDRntw.cjs +2 -0
  193. package/dist/mark-pwc-CQa98Z9S.js +21 -0
  194. package/dist/mark-rv-BtQWH4-a.cjs +2 -0
  195. package/dist/mark-rv-DY1wwuIO.js +21 -0
  196. package/dist/mark-snow-BEUxteW6.js +23 -0
  197. package/dist/mark-snow-Bek2T8IY.cjs +2 -0
  198. package/dist/mark-truck-BsOOC6Lx.cjs +2 -0
  199. package/dist/mark-truck-CUaX6FYM.js +19 -0
  200. package/dist/style.css +1 -1
  201. package/dist/tide-design-system.cjs +2 -2
  202. package/dist/tide-design-system.esm.d.ts +0 -2031
  203. package/dist/tide-design-system.esm.js +1607 -1348
  204. package/dist/utilities/realm.ts +17 -0
  205. package/dist/utilities/viewport.ts +2 -2
  206. package/docs/toast.md +61 -0
  207. package/index.ts +12 -1
  208. package/package.json +3 -3
  209. package/src/assets/css/reset.css +2 -2
  210. package/src/assets/css/utilities-base.css +66 -38
  211. package/src/assets/css/utilities-responsive.css +424 -312
  212. package/src/assets/css/variables.css +5 -0
  213. package/src/assets/svg/branding/logo/logo-aero.svg +9 -0
  214. package/src/assets/svg/branding/logo/logo-atv.svg +3 -0
  215. package/src/assets/svg/branding/logo/logo-boatmart.svg +18 -0
  216. package/src/assets/svg/branding/logo/logo-cycle.svg +3 -0
  217. package/src/assets/svg/branding/logo/logo-equipment.svg +11 -0
  218. package/src/assets/svg/branding/logo/logo-pwc.svg +3 -0
  219. package/src/assets/svg/branding/logo/logo-rv.svg +3 -0
  220. package/src/assets/svg/branding/logo/logo-snow.svg +12 -0
  221. package/src/assets/svg/branding/logo/logo-truck.svg +3 -0
  222. package/src/assets/svg/branding/mark/mark-aero.svg +4 -0
  223. package/src/assets/svg/branding/mark/mark-atv.svg +3 -0
  224. package/src/assets/svg/branding/mark/mark-boatmart.svg +17 -0
  225. package/src/assets/svg/branding/mark/mark-cycle.svg +4 -0
  226. package/src/assets/svg/branding/mark/mark-equipment.svg +3 -0
  227. package/src/assets/svg/branding/mark/mark-pwc.svg +3 -0
  228. package/src/assets/svg/branding/mark/mark-rv.svg +3 -0
  229. package/src/assets/svg/branding/mark/mark-snow.svg +4 -0
  230. package/src/assets/svg/branding/mark/mark-truck.svg +3 -0
  231. package/src/assets/svg/icons/realm/cycle/IconCycleMotorcycle.svg +4 -0
  232. package/src/assets/svg/icons/realm/cycle/IconCycleTrailer.svg +3 -0
  233. package/src/components/TideAccordionItem.vue +38 -4
  234. package/src/components/TideAlert.vue +3 -3
  235. package/src/components/TideButton.vue +36 -16
  236. package/src/components/TideButtonIcon.vue +26 -9
  237. package/src/components/TideChipAction.vue +23 -2
  238. package/src/components/TideIcon.vue +8 -6
  239. package/src/components/TideInputSelect.vue +107 -47
  240. package/src/components/TideModal.vue +14 -2
  241. package/src/components/TideRealmLogo.vue +71 -0
  242. package/src/components/TideSheet.vue +11 -2
  243. package/src/components/TideTabs.vue +4 -9
  244. package/src/components/TideToaster.vue +88 -0
  245. package/src/composables/useTideToaster.ts +63 -0
  246. package/src/stories/TideAccordionItem.stories.ts +4 -4
  247. package/src/stories/TideButton.stories.ts +9 -9
  248. package/src/stories/TideButtonIcon.stories.ts +9 -7
  249. package/src/stories/TideChipAction.stories.ts +10 -4
  250. package/src/stories/TideImageBackground.stories.ts +2 -1
  251. package/src/stories/TideInputSelect.stories.ts +18 -9
  252. package/src/stories/TideModal.stories.ts +0 -4
  253. package/src/stories/TideRealmLogo.stories.ts +25 -0
  254. package/src/stories/TideSheet.stories.ts +0 -1
  255. package/src/stories/TideToaster.stories.ts +117 -0
  256. package/src/types/Icon.ts +4 -0
  257. package/src/types/RealmLogo.ts +38 -0
  258. package/src/types/Styles.ts +2 -1
  259. package/src/types/Toast.ts +21 -0
  260. package/src/utilities/realm.ts +17 -0
  261. package/src/utilities/viewport.ts +2 -2
  262. package/tests/TideRealmLogo.spec.ts +58 -0
  263. package/tsconfig.json +18 -5
  264. package/tsconfig.node.json +7 -0
@@ -1,4 +1,13 @@
1
- <script lang="ts" setup>
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="ICON.SEARCH" />
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 loader = realmFolder
33
- ? () => import(`../assets/svg/icons/realm/${realmFolder}/Icon${name}.svg?component`)
34
- : () => import(`../assets/svg/icons/Icon${name}.svg?component`);
32
+ const component = defineAsyncComponent(() => {
33
+ if (realmFolder) {
34
+ return import(`../assets/svg/icons/realm/${realmFolder}/Icon${name}.svg?component`);
35
+ }
35
36
 
36
- const mod = await loader();
37
+ return import(`../assets/svg/icons/Icon${name}.svg?component`);
38
+ });
37
39
 
38
- innerSVG.value = markRaw(mod.default);
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
- props.disabled ? CSS.CURSOR.NOT_ALLOWED : '',
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
- <select
151
- :class="[
152
- CSS.PADDING.BOTTOM.HALF,
153
- CSS.PADDING.X.ONE,
154
- CSS.WIDTH.FULL,
155
- disabled && CSS.CURSOR.NOT_ALLOWED,
156
- CSS.FONT.ROLE.BODY_1,
157
- ]"
158
- :disabled="disabled"
159
- :name="name"
160
- ref="selectElement"
161
- :required="required"
162
- @focus="handleFocus"
163
- @focusout="handleFocusOut"
164
- :id="inputId"
165
- v-model="modelValue"
166
- >
167
- <template v-for="optgroup in props.optgroups">
168
- <optgroup
169
- :class="[CSS.WIDTH.FULL, CSS.BG.SURFACE.DEFAULT]"
170
- :key="(optgroup as SelectOptionGroup).label"
171
- :label="(optgroup as SelectOptionGroup).label"
172
- v-if="(optgroup as SelectOptionGroup).options"
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
- :value="option.value"
178
- v-for="option in (optgroup as SelectOptionGroup).options"
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
- {{ option.label }}
235
+ {{ (optgroup as SelectOption).label }}
181
236
  </option>
182
- </optgroup>
237
+ </template>
183
238
 
184
239
  <option
185
240
  :class="[CSS.WIDTH.FULL, CSS.BG.SURFACE.DEFAULT]"
186
- :key="(optgroup as SelectOption).value"
187
- :selected="modelValue === (optgroup as SelectOption).value ? true : undefined"
188
- :value="(optgroup as SelectOption).value"
189
- v-else
241
+ :key="option.value"
242
+ :selected="modelValue === option.value ? true : undefined"
243
+ :value="option.value"
244
+ v-for="option in options"
190
245
  >
191
- {{ (optgroup as SelectOption).label }}
246
+ {{ option.label }}
192
247
  </option>
193
- </template>
194
-
195
- <option
196
- :class="[CSS.WIDTH.FULL, CSS.BG.SURFACE.DEFAULT]"
197
- :key="option.value"
198
- :selected="modelValue === option.value ? true : undefined"
199
- :value="option.value"
200
- v-for="option in options"
201
- >
202
- {{ option.label }}
203
- </option>
204
- </select>
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 && 'active']" />
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,