tide-design-system 2.5.13 → 2.5.14

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 (392) hide show
  1. package/dist/tide-design-system.d.ts +2742 -0
  2. package/dist/tide-design-system.js +2 -2
  3. package/package.json +13 -2
  4. package/.eslintrc.cjs +0 -119
  5. package/.github/workflows/publish-release.yml +0 -38
  6. package/.storybook/main.ts +0 -70
  7. package/.storybook/preview.ts +0 -256
  8. package/docs/assets/full-bleed.gif +0 -0
  9. package/docs/assets/layout-grid-default.webp +0 -0
  10. package/docs/assets/layout-grid-fluid.webp +0 -0
  11. package/docs/assets/layout-grid.webp +0 -0
  12. package/docs/assets/native-input-validation.png +0 -0
  13. package/docs/configuation.md +0 -47
  14. package/docs/development.md +0 -163
  15. package/docs/figma.md +0 -43
  16. package/docs/forms.md +0 -484
  17. package/docs/grid-layout.md +0 -83
  18. package/docs/images.md +0 -50
  19. package/docs/integration-full.md +0 -84
  20. package/docs/integration-partial.md +0 -39
  21. package/docs/migration.md +0 -74
  22. package/docs/storybook.md +0 -44
  23. package/docs/style-guide.md +0 -22
  24. package/docs/toast.md +0 -61
  25. package/docs/token-cheatsheet.md +0 -63
  26. package/docs/upgrading.md +0 -188
  27. package/docs/workflows.md +0 -20
  28. package/index.html +0 -14
  29. package/index.ts +0 -201
  30. package/netlify.toml +0 -3
  31. package/src/assets/css/fonts.css +0 -36
  32. package/src/assets/css/grid-layout.css +0 -34
  33. package/src/assets/css/main.css +0 -5
  34. package/src/assets/css/realm/aero.css +0 -25
  35. package/src/assets/css/realm/atv.css +0 -25
  36. package/src/assets/css/realm/boatmart.css +0 -25
  37. package/src/assets/css/realm/cycle.css +0 -24
  38. package/src/assets/css/realm/equipment.css +0 -25
  39. package/src/assets/css/realm/pwc.css +0 -25
  40. package/src/assets/css/realm/rv.css +0 -25
  41. package/src/assets/css/realm/snow.css +0 -25
  42. package/src/assets/css/realm/truck.css +0 -25
  43. package/src/assets/css/reset.css +0 -99
  44. package/src/assets/css/storybook.css +0 -18
  45. package/src/assets/css/utilities-base.css +0 -574
  46. package/src/assets/css/utilities-responsive.css +0 -2307
  47. package/src/assets/css/utilities.css +0 -16
  48. package/src/assets/css/variables.css +0 -223
  49. package/src/assets/svg/branding/logo/logo-aero.svg +0 -4
  50. package/src/assets/svg/branding/logo/logo-atv.svg +0 -6
  51. package/src/assets/svg/branding/logo/logo-boatmart.svg +0 -4
  52. package/src/assets/svg/branding/logo/logo-cycle.svg +0 -4
  53. package/src/assets/svg/branding/logo/logo-equipment.svg +0 -4
  54. package/src/assets/svg/branding/logo/logo-pwc.svg +0 -4
  55. package/src/assets/svg/branding/logo/logo-rv.svg +0 -6
  56. package/src/assets/svg/branding/logo/logo-snow.svg +0 -4
  57. package/src/assets/svg/branding/logo/logo-truck.svg +0 -5
  58. package/src/assets/svg/branding/mark/mark-aero.svg +0 -3
  59. package/src/assets/svg/branding/mark/mark-atv.svg +0 -4
  60. package/src/assets/svg/branding/mark/mark-boatmart.svg +0 -3
  61. package/src/assets/svg/branding/mark/mark-cycle.svg +0 -3
  62. package/src/assets/svg/branding/mark/mark-equipment.svg +0 -3
  63. package/src/assets/svg/branding/mark/mark-pwc.svg +0 -3
  64. package/src/assets/svg/branding/mark/mark-rv.svg +0 -4
  65. package/src/assets/svg/branding/mark/mark-snow.svg +0 -3
  66. package/src/assets/svg/branding/mark/mark-truck.svg +0 -4
  67. package/src/assets/svg/icons/IconAccountBalance.svg +0 -5
  68. package/src/assets/svg/icons/IconAcute.svg +0 -3
  69. package/src/assets/svg/icons/IconAdd.svg +0 -3
  70. package/src/assets/svg/icons/IconAiDescription.svg +0 -7
  71. package/src/assets/svg/icons/IconAlignSpaceEven.svg +0 -3
  72. package/src/assets/svg/icons/IconApplePay.svg +0 -5
  73. package/src/assets/svg/icons/IconArrowBack.svg +0 -3
  74. package/src/assets/svg/icons/IconArrowCycle.svg +0 -5
  75. package/src/assets/svg/icons/IconArrowForward.svg +0 -3
  76. package/src/assets/svg/icons/IconArrowRight.svg +0 -3
  77. package/src/assets/svg/icons/IconArrowUp.svg +0 -3
  78. package/src/assets/svg/icons/IconAssignment.svg +0 -3
  79. package/src/assets/svg/icons/IconAttachMoney.svg +0 -4
  80. package/src/assets/svg/icons/IconAutoRenew.svg +0 -3
  81. package/src/assets/svg/icons/IconAwardStar.svg +0 -5
  82. package/src/assets/svg/icons/IconBed.svg +0 -3
  83. package/src/assets/svg/icons/IconBolt.svg +0 -3
  84. package/src/assets/svg/icons/IconBookmark.svg +0 -5
  85. package/src/assets/svg/icons/IconBunkhouse.svg +0 -3
  86. package/src/assets/svg/icons/IconCalculate.svg +0 -3
  87. package/src/assets/svg/icons/IconCalendarMonth.svg +0 -5
  88. package/src/assets/svg/icons/IconCall.svg +0 -5
  89. package/src/assets/svg/icons/IconCallQuality.svg +0 -3
  90. package/src/assets/svg/icons/IconCarRental.svg +0 -3
  91. package/src/assets/svg/icons/IconCheck.svg +0 -3
  92. package/src/assets/svg/icons/IconChevronLeft.svg +0 -3
  93. package/src/assets/svg/icons/IconChevronRight.svg +0 -3
  94. package/src/assets/svg/icons/IconClear.svg +0 -3
  95. package/src/assets/svg/icons/IconClose.svg +0 -3
  96. package/src/assets/svg/icons/IconContract.svg +0 -3
  97. package/src/assets/svg/icons/IconCrash.svg +0 -3
  98. package/src/assets/svg/icons/IconDashboardCustomize.svg +0 -3
  99. package/src/assets/svg/icons/IconDelete.svg +0 -5
  100. package/src/assets/svg/icons/IconDiamond.svg +0 -5
  101. package/src/assets/svg/icons/IconDirectionsBoat.svg +0 -3
  102. package/src/assets/svg/icons/IconDomain.svg +0 -3
  103. package/src/assets/svg/icons/IconDraft.svg +0 -3
  104. package/src/assets/svg/icons/IconEdit.svg +0 -5
  105. package/src/assets/svg/icons/IconEngine.svg +0 -3
  106. package/src/assets/svg/icons/IconEngineering.svg +0 -3
  107. package/src/assets/svg/icons/IconError.svg +0 -5
  108. package/src/assets/svg/icons/IconExpandContent.svg +0 -3
  109. package/src/assets/svg/icons/IconExpandLess.svg +0 -3
  110. package/src/assets/svg/icons/IconExpandMore.svg +0 -3
  111. package/src/assets/svg/icons/IconFacebook.svg +0 -3
  112. package/src/assets/svg/icons/IconFavorite.svg +0 -5
  113. package/src/assets/svg/icons/IconFavoriteFilled.svg +0 -5
  114. package/src/assets/svg/icons/IconFlag.svg +0 -3
  115. package/src/assets/svg/icons/IconFormatBold.svg +0 -5
  116. package/src/assets/svg/icons/IconFormatItalic.svg +0 -3
  117. package/src/assets/svg/icons/IconFormatListBulleted.svg +0 -5
  118. package/src/assets/svg/icons/IconForum.svg +0 -5
  119. package/src/assets/svg/icons/IconGas.svg +0 -3
  120. package/src/assets/svg/icons/IconGavel.svg +0 -5
  121. package/src/assets/svg/icons/IconGears.svg +0 -3
  122. package/src/assets/svg/icons/IconGlobeLocationPin.svg +0 -3
  123. package/src/assets/svg/icons/IconGoogle.svg +0 -18
  124. package/src/assets/svg/icons/IconGooglePay.svg +0 -5
  125. package/src/assets/svg/icons/IconGrid.svg +0 -3
  126. package/src/assets/svg/icons/IconHandshake.svg +0 -3
  127. package/src/assets/svg/icons/IconHandyman.svg +0 -3
  128. package/src/assets/svg/icons/IconHeight.svg +0 -3
  129. package/src/assets/svg/icons/IconHelp.svg +0 -5
  130. package/src/assets/svg/icons/IconInfo.svg +0 -5
  131. package/src/assets/svg/icons/IconInformation.svg +0 -3
  132. package/src/assets/svg/icons/IconInsertText.svg +0 -5
  133. package/src/assets/svg/icons/IconInstagram.svg +0 -3
  134. package/src/assets/svg/icons/IconIosShare.svg +0 -5
  135. package/src/assets/svg/icons/IconLayout.svg +0 -3
  136. package/src/assets/svg/icons/IconLevellingJack.svg +0 -3
  137. package/src/assets/svg/icons/IconLinkedIn.svg +0 -3
  138. package/src/assets/svg/icons/IconLocalShipping.svg +0 -5
  139. package/src/assets/svg/icons/IconLock.svg +0 -5
  140. package/src/assets/svg/icons/IconMail.svg +0 -5
  141. package/src/assets/svg/icons/IconMenu.svg +0 -3
  142. package/src/assets/svg/icons/IconMoneyBag.svg +0 -3
  143. package/src/assets/svg/icons/IconMoreHoriz.svg +0 -5
  144. package/src/assets/svg/icons/IconMove.svg +0 -3
  145. package/src/assets/svg/icons/IconNotifications.svg +0 -5
  146. package/src/assets/svg/icons/IconOdometer.svg +0 -3
  147. package/src/assets/svg/icons/IconOpenInNew.svg +0 -5
  148. package/src/assets/svg/icons/IconPalette.svg +0 -5
  149. package/src/assets/svg/icons/IconPaypal.svg +0 -5
  150. package/src/assets/svg/icons/IconPerson.svg +0 -5
  151. package/src/assets/svg/icons/IconPersonSearch.svg +0 -3
  152. package/src/assets/svg/icons/IconPhotoCamera.svg +0 -5
  153. package/src/assets/svg/icons/IconPinterest.svg +0 -5
  154. package/src/assets/svg/icons/IconPlayArrow.svg +0 -3
  155. package/src/assets/svg/icons/IconPolicy.svg +0 -3
  156. package/src/assets/svg/icons/IconPower.svg +0 -3
  157. package/src/assets/svg/icons/IconPowerOff.svg +0 -3
  158. package/src/assets/svg/icons/IconPriorityHigh.svg +0 -3
  159. package/src/assets/svg/icons/IconRemove.svg +0 -3
  160. package/src/assets/svg/icons/IconRequestQuote.svg +0 -3
  161. package/src/assets/svg/icons/IconResetWrench.svg +0 -3
  162. package/src/assets/svg/icons/IconRoad.svg +0 -3
  163. package/src/assets/svg/icons/IconRoundedCorner.svg +0 -5
  164. package/src/assets/svg/icons/IconRuler.svg +0 -3
  165. package/src/assets/svg/icons/IconSailing.svg +0 -3
  166. package/src/assets/svg/icons/IconSchool.svg +0 -3
  167. package/src/assets/svg/icons/IconSearch.svg +0 -5
  168. package/src/assets/svg/icons/IconSeating.svg +0 -3
  169. package/src/assets/svg/icons/IconSell.svg +0 -5
  170. package/src/assets/svg/icons/IconSensors.svg +0 -3
  171. package/src/assets/svg/icons/IconSettings.svg +0 -3
  172. package/src/assets/svg/icons/IconShare.svg +0 -5
  173. package/src/assets/svg/icons/IconShieldCheck.svg +0 -3
  174. package/src/assets/svg/icons/IconShoppingCart.svg +0 -5
  175. package/src/assets/svg/icons/IconSleeps.svg +0 -3
  176. package/src/assets/svg/icons/IconSms.svg +0 -5
  177. package/src/assets/svg/icons/IconSnowflake.svg +0 -3
  178. package/src/assets/svg/icons/IconStar.svg +0 -5
  179. package/src/assets/svg/icons/IconStarFilled.svg +0 -3
  180. package/src/assets/svg/icons/IconStarHalf.svg +0 -3
  181. package/src/assets/svg/icons/IconSummarize.svg +0 -3
  182. package/src/assets/svg/icons/IconSwapHoriz.svg +0 -3
  183. package/src/assets/svg/icons/IconSwapVert.svg +0 -5
  184. package/src/assets/svg/icons/IconThreeDRotation.svg +0 -18
  185. package/src/assets/svg/icons/IconThumbUp.svg +0 -3
  186. package/src/assets/svg/icons/IconTrendingDown.svg +0 -5
  187. package/src/assets/svg/icons/IconTrophy.svg +0 -5
  188. package/src/assets/svg/icons/IconTune.svg +0 -5
  189. package/src/assets/svg/icons/IconTwitter.svg +0 -5
  190. package/src/assets/svg/icons/IconUmbrella.svg +0 -3
  191. package/src/assets/svg/icons/IconVerified.svg +0 -4
  192. package/src/assets/svg/icons/IconVideocam.svg +0 -5
  193. package/src/assets/svg/icons/IconViewInAr.svg +0 -5
  194. package/src/assets/svg/icons/IconVisibility.svg +0 -5
  195. package/src/assets/svg/icons/IconVolumeOff.svg +0 -5
  196. package/src/assets/svg/icons/IconVolumeOn.svg +0 -5
  197. package/src/assets/svg/icons/IconWarehouse.svg +0 -3
  198. package/src/assets/svg/icons/IconWarning.svg +0 -5
  199. package/src/assets/svg/icons/IconWater.svg +0 -3
  200. package/src/assets/svg/icons/IconWeight.svg +0 -3
  201. package/src/assets/svg/icons/IconWidth.svg +0 -3
  202. package/src/assets/svg/icons/IconWorkspacePremium.svg +0 -3
  203. package/src/assets/svg/icons/IconWrench.svg +0 -3
  204. package/src/assets/svg/icons/IconYoutube.svg +0 -5
  205. package/src/assets/svg/icons/realm/aero/IconAeroFlight.svg +0 -3
  206. package/src/assets/svg/icons/realm/aero/IconAeroHelicopter.svg +0 -3
  207. package/src/assets/svg/icons/realm/aero/IconAeroModeFan.svg +0 -3
  208. package/src/assets/svg/icons/realm/aero/IconAeroPlaneContrails.svg +0 -3
  209. package/src/assets/svg/icons/realm/atv/IconAtvAtv.svg +0 -3
  210. package/src/assets/svg/icons/realm/atv/IconAtvDuneBuggy.svg +0 -3
  211. package/src/assets/svg/icons/realm/atv/IconAtvGoKart.svg +0 -3
  212. package/src/assets/svg/icons/realm/atv/IconAtvGolfCart.svg +0 -3
  213. package/src/assets/svg/icons/realm/atv/IconAtvSandRail.svg +0 -3
  214. package/src/assets/svg/icons/realm/atv/IconAtvSideBySide.svg +0 -3
  215. package/src/assets/svg/icons/realm/atv/IconAtvTrailer.svg +0 -3
  216. package/src/assets/svg/icons/realm/boatmart/IconBoatmartPwc.svg +0 -3
  217. package/src/assets/svg/icons/realm/boatmart/IconBoatmartTrailer.svg +0 -3
  218. package/src/assets/svg/icons/realm/cycle/IconCycleMotorcycle.svg +0 -4
  219. package/src/assets/svg/icons/realm/cycle/IconCycleTrailer.svg +0 -3
  220. package/src/assets/svg/icons/realm/pwc/IconPwcPwc.svg +0 -3
  221. package/src/assets/svg/icons/realm/pwc/IconPwcSnowmobile.svg +0 -3
  222. package/src/assets/svg/icons/realm/pwc/IconPwcTrailer.svg +0 -3
  223. package/src/assets/svg/icons/realm/rv/IconRvClassA.svg +0 -3
  224. package/src/assets/svg/icons/realm/rv/IconRvClassB.svg +0 -3
  225. package/src/assets/svg/icons/realm/rv/IconRvClassC.svg +0 -3
  226. package/src/assets/svg/icons/realm/rv/IconRvDestinationTrailer.svg +0 -5
  227. package/src/assets/svg/icons/realm/rv/IconRvFifthWheel.svg +0 -3
  228. package/src/assets/svg/icons/realm/rv/IconRvFishHouse.svg +0 -3
  229. package/src/assets/svg/icons/realm/rv/IconRvParkModel.svg +0 -3
  230. package/src/assets/svg/icons/realm/rv/IconRvPopUpCamper.svg +0 -3
  231. package/src/assets/svg/icons/realm/rv/IconRvTeardropTrailer.svg +0 -4
  232. package/src/assets/svg/icons/realm/rv/IconRvTravelTrailer.svg +0 -3
  233. package/src/assets/svg/icons/realm/rv/IconRvTruckCamper.svg +0 -3
  234. package/src/assets/svg/icons/realm/snow/IconSnowMotorcycle.svg +0 -4
  235. package/src/assets/svg/icons/realm/snow/IconSnowPwc.svg +0 -3
  236. package/src/assets/svg/icons/realm/snow/IconSnowSideBySide.svg +0 -3
  237. package/src/assets/svg/icons/realm/snow/IconSnowSnowmobile.svg +0 -3
  238. package/src/assets/svg/icons/realm/snow/IconSnowTrailer.svg +0 -3
  239. package/src/components/InternalBaseLink.vue +0 -11
  240. package/src/components/TideAccordionItem.vue +0 -120
  241. package/src/components/TideAlert.vue +0 -186
  242. package/src/components/TideBadge.vue +0 -64
  243. package/src/components/TideBadgeTrustedPartner.vue +0 -52
  244. package/src/components/TideBadgeVerifiedVehicle.vue +0 -46
  245. package/src/components/TideBreadCrumbs.vue +0 -62
  246. package/src/components/TideButton.vue +0 -115
  247. package/src/components/TideButtonIcon.vue +0 -91
  248. package/src/components/TideButtonPagination.vue +0 -87
  249. package/src/components/TideButtonSave.vue +0 -109
  250. package/src/components/TideButtonSegmented.vue +0 -115
  251. package/src/components/TideCard.vue +0 -107
  252. package/src/components/TideCarousel.vue +0 -489
  253. package/src/components/TideChipAction.vue +0 -83
  254. package/src/components/TideChipFilter.vue +0 -71
  255. package/src/components/TideChipInput.vue +0 -54
  256. package/src/components/TideColumns.vue +0 -65
  257. package/src/components/TideDivider.vue +0 -43
  258. package/src/components/TideForm.vue +0 -33
  259. package/src/components/TideIcon.vue +0 -85
  260. package/src/components/TideImage.vue +0 -126
  261. package/src/components/TideImageBackground.vue +0 -69
  262. package/src/components/TideIndicator.vue +0 -63
  263. package/src/components/TideInputCheckbox.vue +0 -210
  264. package/src/components/TideInputCheckboxDeprecated.vue +0 -117
  265. package/src/components/TideInputRadio.vue +0 -115
  266. package/src/components/TideInputRadioDeprecated.vue +0 -119
  267. package/src/components/TideInputSelect.vue +0 -331
  268. package/src/components/TideInputSelectDeprecated.vue +0 -245
  269. package/src/components/TideInputSupportingText.vue +0 -44
  270. package/src/components/TideInputText.vue +0 -382
  271. package/src/components/TideInputTextDeprecated.vue +0 -327
  272. package/src/components/TideInputTextarea.vue +0 -235
  273. package/src/components/TideInputTextareaDeprecated.vue +0 -198
  274. package/src/components/TideLink.vue +0 -95
  275. package/src/components/TideMenuItem.vue +0 -83
  276. package/src/components/TideModal.vue +0 -281
  277. package/src/components/TidePagination.vue +0 -65
  278. package/src/components/TidePopover.vue +0 -198
  279. package/src/components/TideRating.vue +0 -109
  280. package/src/components/TideRealmLogo.vue +0 -154
  281. package/src/components/TideSeoLinks.vue +0 -59
  282. package/src/components/TideSheet.vue +0 -209
  283. package/src/components/TideSwitch.vue +0 -101
  284. package/src/components/TideTabs.vue +0 -63
  285. package/src/components/TideToaster.vue +0 -97
  286. package/src/composables/useTideConfig.ts +0 -23
  287. package/src/composables/useTideForm.ts +0 -25
  288. package/src/composables/useTideToaster.ts +0 -63
  289. package/src/contexts/sandbox/AppSandbox.vue +0 -7
  290. package/src/contexts/sandbox/app-sandbox.ts +0 -10
  291. package/src/stories/DemoCssUtilities.stories.ts +0 -154
  292. package/src/stories/DemoCssUtilitiesByTextInput.stories.ts +0 -61
  293. package/src/stories/FoundationsBorder.stories.ts +0 -272
  294. package/src/stories/FoundationsColor.stories.ts +0 -311
  295. package/src/stories/FoundationsFlexbox.stories.ts +0 -184
  296. package/src/stories/FoundationsGrid.stories.ts +0 -126
  297. package/src/stories/FoundationsMargin.stories.ts +0 -155
  298. package/src/stories/FoundationsPadding.stories.ts +0 -108
  299. package/src/stories/FoundationsShadow.stories.ts +0 -103
  300. package/src/stories/FoundationsTransparency.stories.ts +0 -114
  301. package/src/stories/FoundationsTypography.stories.ts +0 -212
  302. package/src/stories/Template.stories.ts +0 -73
  303. package/src/stories/TideAccordionItem.stories.ts +0 -91
  304. package/src/stories/TideAlert.stories.ts +0 -133
  305. package/src/stories/TideBadge.stories.ts +0 -90
  306. package/src/stories/TideBadgeTrustedPartner.stories.ts +0 -34
  307. package/src/stories/TideBadgeVerifiedVehicle.stories.ts +0 -22
  308. package/src/stories/TideBreadCrumbs.stories.ts +0 -42
  309. package/src/stories/TideButton.stories.ts +0 -132
  310. package/src/stories/TideButtonIcon.stories.ts +0 -109
  311. package/src/stories/TideButtonPagination.stories.ts +0 -99
  312. package/src/stories/TideButtonSave.stories.ts +0 -62
  313. package/src/stories/TideButtonSegmented.stories.ts +0 -110
  314. package/src/stories/TideCard.stories.ts +0 -102
  315. package/src/stories/TideCarousel.stories.ts +0 -219
  316. package/src/stories/TideChipAction.stories.ts +0 -81
  317. package/src/stories/TideChipFilter.stories.ts +0 -84
  318. package/src/stories/TideChipInput.stories.ts +0 -56
  319. package/src/stories/TideColumns.stories.ts +0 -89
  320. package/src/stories/TideDivider.stories.ts +0 -48
  321. package/src/stories/TideIcon.stories.ts +0 -31
  322. package/src/stories/TideImage.stories.ts +0 -124
  323. package/src/stories/TideImageBackground.stories.ts +0 -114
  324. package/src/stories/TideIndicator.stories.ts +0 -32
  325. package/src/stories/TideInputCheckbox.stories.ts +0 -138
  326. package/src/stories/TideInputRadio.stories.ts +0 -100
  327. package/src/stories/TideInputSelect.stories.ts +0 -244
  328. package/src/stories/TideInputText.stories.ts +0 -221
  329. package/src/stories/TideInputTextarea.stories.ts +0 -156
  330. package/src/stories/TideLink.stories.ts +0 -127
  331. package/src/stories/TideMenuItem.stories.ts +0 -117
  332. package/src/stories/TideModal.stories.ts +0 -219
  333. package/src/stories/TidePagination.stories.ts +0 -100
  334. package/src/stories/TidePopover.stories.ts +0 -101
  335. package/src/stories/TideRating.stories.ts +0 -114
  336. package/src/stories/TideRealmLogo.stories.ts +0 -93
  337. package/src/stories/TideSeoLinks.stories.ts +0 -68
  338. package/src/stories/TideSheet.stories.ts +0 -152
  339. package/src/stories/TideSwitch.stories.ts +0 -72
  340. package/src/stories/TideTabs.stories.ts +0 -114
  341. package/src/stories/TideToaster.stories.ts +0 -117
  342. package/src/stories/Welcome.mdx +0 -17
  343. package/src/types/Alert.ts +0 -8
  344. package/src/types/Badge.ts +0 -76
  345. package/src/types/BreadCrumb.ts +0 -5
  346. package/src/types/Breakpoint.ts +0 -18
  347. package/src/types/Card.ts +0 -7
  348. package/src/types/Element.ts +0 -13
  349. package/src/types/FieldDeprecated.ts +0 -92
  350. package/src/types/Form.ts +0 -1
  351. package/src/types/FormDeprecated.ts +0 -91
  352. package/src/types/Formatted.ts +0 -23
  353. package/src/types/Icon.ts +0 -202
  354. package/src/types/Image.ts +0 -7
  355. package/src/types/Link.ts +0 -5
  356. package/src/types/Orientation.ts +0 -6
  357. package/src/types/Priority.ts +0 -11
  358. package/src/types/Realm.ts +0 -14
  359. package/src/types/RealmLogo.ts +0 -23
  360. package/src/types/Select.ts +0 -9
  361. package/src/types/Size.ts +0 -13
  362. package/src/types/Source.ts +0 -6
  363. package/src/types/Storybook.ts +0 -253
  364. package/src/types/Styles.ts +0 -526
  365. package/src/types/Tab.ts +0 -5
  366. package/src/types/Target.ts +0 -6
  367. package/src/types/TextInput.ts +0 -28
  368. package/src/types/Toast.ts +0 -21
  369. package/src/types/Type.ts +0 -6
  370. package/src/types/Validation.ts +0 -33
  371. package/src/types/ValidationDeprecated.ts +0 -41
  372. package/src/utilities/event.ts +0 -4
  373. package/src/utilities/format.ts +0 -184
  374. package/src/utilities/forms.ts +0 -22
  375. package/src/utilities/realm.ts +0 -17
  376. package/src/utilities/storybook.ts +0 -354
  377. package/src/utilities/validation-deprecated.ts +0 -252
  378. package/src/utilities/validation.ts +0 -132
  379. package/src/utilities/viewport.ts +0 -63
  380. package/tests/InternalBaseLink.spec.ts +0 -61
  381. package/tests/TideRealmLogo.spec.ts +0 -58
  382. package/tests/svg-icons.spec.ts +0 -74
  383. package/tests/utilities-format.spec.ts +0 -470
  384. package/tests/utilities-storybook.spec.ts +0 -99
  385. package/tsconfig.app.json +0 -14
  386. package/tsconfig.config.json +0 -12
  387. package/tsconfig.json +0 -35
  388. package/tsconfig.node.json +0 -7
  389. package/tsconfig.vitest.json +0 -10
  390. package/vite-env.d.ts +0 -2
  391. package/vite.config.sandbox.ts +0 -29
  392. package/vite.config.ts +0 -37
package/docs/forms.md DELETED
@@ -1,484 +0,0 @@
1
- # Tide Input Components Usage Guide
2
-
3
- This guide shows how to use `<TideInputText />`, `<TideInputTextarea />`, `<TideInputSelect />` and `<TideInputCheckbox />` in forms, and how to leverage the TIDE library's validation features.
4
-
5
- ---
6
-
7
- ## Key Concepts
8
-
9
- - `v-model` is used to bind the value to your reactive form state.
10
- - To react to value changes, parent components can watch for reactive changes to the input's value ref, or use a callback function on the `@update:modelValue` emit.
11
- - Validation helper props like `required`, `minlength`, `maxlength`, can be used for common validations.
12
- - Custom validations can be performed using `validators` prop.
13
- - `error` prop can force a custom validation error with highest precedence.
14
- - `@valid` event emits every time the input’s validation state changes, allowing reactive updates in real time.
15
- - Use the `<TideForm />` component for a reliable form submit behavior.
16
-
17
- ## Input State Management
18
-
19
- All TIDE input components use Vue’s built-in [`v-model`](https://vuejs.org/guide/components/v-model) feature to provide **two-way data binding** between your component state and the input’s value.
20
-
21
- ``` vue
22
- <script lang="ts" setup>
23
- import { TideInputText } from 'tide-design-system';
24
-
25
- const nameValue = ref<string>(''); // text inputs use a string ref
26
- </script>
27
-
28
- <template>
29
- <TideInputText
30
- label="Name"
31
- v-model="nameValue"
32
- />
33
- </template>
34
- ```
35
-
36
- ### What Is “Two-Way Binding” (`v-model`)?
37
-
38
- Two-way binding means that data stays in sync **in both directions** between your component’s state and the UI.
39
-
40
- #### 1. Upward Binding (User → State)
41
-
42
- When a user types into the input, the bound `ref` (`nameValue` in this case) is automatically updated to reflect the new value.
43
-
44
- #### 2. Downward Binding (State → UI)
45
-
46
- If you modify the `ref` value in your code, the input’s display will automatically update to match.
47
-
48
- For example:
49
-
50
- ```vue
51
- <TideButton
52
- @click="nameValue = nameValue + 'A'"
53
- label="Append letter 'A'"
54
- />
55
- ```
56
-
57
- Clicking this button appends an `"A"` to the existing value of `nameValue`, and you’ll immediately see that change appear in the input field.
58
-
59
- For more on `v-model` and two-way data bindings, [see the Vue docs](https://vuejs.org/guide/components/v-model).
60
-
61
- ### Using `reactive()` for Multiple Inputs
62
-
63
- When you have several related input values — such as a form with multiple fields — Vue’s [`reactive()`](https://vuejs.org/guide/essentials/reactivity-fundamentals.html#reactive-objects) helper can make managing state easier. It lets you store all inputs in a single reactive object instead of multiple separate refs.
64
-
65
- ```vue
66
- <script lang="ts" setup>
67
- import { TideInputText, TideButton } from 'tide-design-system'
68
-
69
- type FormState = {
70
- fullName: string;
71
- subscribed: boolean;
72
- };
73
-
74
- const form = reactive<FormState>({
75
- fullName: '',
76
- subscribed: false,
77
- });
78
- </script>
79
-
80
- <template>
81
- <TideInputText v-model="form.fullName" label="First name" />
82
- <TideInputCheckbox v-model="form.subscribed" label="Subscribed" />
83
-
84
- <TideButton
85
- @click="form.fullName = form.fullName.toUpperCase()"
86
- label="Capitalize name"
87
- />
88
-
89
- <pre>{{ form }}</pre>
90
- </template>
91
- ```
92
-
93
- Here’s what’s happening:
94
- - `form` is a single reactive object holding multiple fields.
95
- - Each input uses `v-model` to bind directly to a property of `form`.
96
- - Any change (user or programmatic) to one of the fields is immediately reflected everywhere it’s used — including other components or template bindings like `{{ form }}`.
97
-
98
- This approach can help keep your forms organized, especially as the number of inputs grows. [Read more about `reactive()`](https://vuejs.org/guide/essentials/reactivity-fundamentals.html#reactive).
99
-
100
- ### Reacting to value changes
101
-
102
- The recommended way to do something in response to an input's value change is using [Vue watchers](https://vuejs.org/guide/essentials/watchers).
103
-
104
- Basic usage:
105
-
106
- ``` vue
107
- <script lang="ts" setup>
108
- const name = ref<string>('');
109
-
110
- watch(name, () => {
111
- console.log('Name is ' + name.value);
112
- }, { immediate: true });
113
- </script>
114
-
115
- <template>
116
- <TideInputText v-model="name" label="name" />
117
- </template>
118
- ```
119
-
120
- This code will automatically log to the console every time `name` changes. It will also log to the console on mount. [Read about Eager Watchers](https://vuejs.org/guide/essentials/watchers#eager-watchers) (`immediate: true`).
121
-
122
- `watchEffect()` is very similar to `watch()`, and can also be used for the same purpose. [Read about `watchEffect()`](https://vuejs.org/guide/essentials/watchers#watcheffect).
123
-
124
- **Tip:** You can also conveniently react to value changes with the `@update:modelValue` emit. This is the exact same emit Vue uses under the hood in `v-model`, and it's entirely reliable to hook into to perform a given action every time the value changes. While it's possible to accomplish the same thing using Vue watchers, in some cases simple emits are more ergonomic. [Read more about `v-model` "Under the Hood"](https://vuejs.org/guide/components/v-model#under-the-hood).
125
-
126
-
127
- ## Validation
128
-
129
- Input components ship with a handful of convenient props for the most common validation use cases. Each component emits the result of its validations as a boolean `@valid`. This emit can be used to reactively apply conditional logic in your parent component in response to validation state changes.
130
-
131
- | Prop name | Type | Component | Description |
132
- | --- | --- | --- | --- |
133
- | `required` | `boolean` (optional) | All components | Requires the input must not be left blank, or unselected (`TideInputCheckbox`).<br><br> Default: `false` |
134
- | `minlength` | `number` (optional) | `TideInputText`<br> `TideInputTextarea`<br> | The minimum number of characters required in the input.<br><br> Default: `undefined` |
135
- | `maxlength` | `number` (optional) | `TideInputText`<br> `TideInputTextarea`<br> | The maximum number of characters allowed in the input.<br><br> Default: `undefined` |
136
- | `validators` | `Validator[]` (optional) | `TideInputText`<br> `TideInputTextarea`<br>`TideInputSelect`<br> | Provide one or more custom validator functions to run additional validation logic.<br><br> See [Custom Validators](#custom-validators).<br><br> Default: `[]` |
137
- | `error` | `string` (optional) | All components | Manually specify an error message to display. This prop has the highest precedence of all validations. When provided a non-empty string, it immediately triggers a validation error and prevents other validation rules from running (only one error can be active at a time). When error is an empty string (`''`) or omitted, the component continues normal validation flow (`validators`, `required`, etc.). <br><br> See [Manual Error Messages](#manual-error-messages). <br><br> Default: `''` |
138
-
139
- ### Validation Precedence
140
-
141
- Validations are performed one at a time, and validation is cancelled as soon as an error occurs.
142
-
143
- From highest to lowest, the order of precedence for validation is:
144
-
145
- 1. `error`
146
- 2. `validators`
147
- 3. `required`
148
- 4. `maxlength`
149
- 4. `minlength`
150
-
151
- **Note:** Only one error can be active at a time.
152
-
153
- ### Custom Validators
154
-
155
- The `validators` prop accepts one or more custom validator functions to run additional validation logic. Validators can be any function which conforms to `type Validator`.
156
-
157
- ``` ts
158
- type ValidationResult = {
159
- message: string;
160
- valid: boolean;
161
- };
162
- type Validator = (value: string) => ValidationResult;
163
- ```
164
-
165
- An example of a custom validator could be:
166
-
167
- ``` vue
168
- <script lang="ts" setup>
169
- import { TideInputText } from 'tide-design-system';
170
- import type { Validator, ValidationResult } from 'tide-design-system';
171
-
172
- const nameIsJohnDoe: Validator = (name: string): ValidationResult => {
173
- const isValid = name === 'John Doe';
174
-
175
- return {
176
- valid: isValid,
177
- message: isValid ? '' : 'Name must be "John Doe".',
178
- };
179
- };
180
- </script>
181
-
182
- <template>
183
- <!-- Error will show when "Jane Smith" is inputted -->
184
- <TideInputText label="Full name" :validators="[nameIsJohnDoe]" />
185
- </template>
186
- ```
187
-
188
- The `tide-design-system` npm package also exposes a `VALIDATOR` const object containing [validator functions for common use cases](https://github.com/traderinteractive/tide-design-system/blob/main/src/types/Validation.ts#:~:text=export%20const%20VALIDATOR%20%3D%20%7B,as%20const%3B).
189
-
190
- ### Displaying errors
191
-
192
- For finer control over when invalid inputs should display errors, each input components accepts an `errorDisplay` prop.
193
-
194
- ``` ts
195
- import { ERROR_DISPLAY } from 'tide-design-system';
196
- ```
197
-
198
- | `errorDisplay` prop value | Description |
199
- | --- | --- |
200
- | `ERROR_DISPLAY.EAGER` | Errors can show after first input focus event. |
201
- | `ERROR_DISPLAY.LAZY` (default) | Errors can show after first blur event. |
202
-
203
- Unlike the default setting of `ERROR_DISPLAY.LAZY`, the following input would show its error from the `required` prop as soon as it's focused.
204
-
205
- ``` vue
206
- <TideInputText
207
- :error-display="ERROR_DISPLAY.EAGER"
208
- label="Name"
209
- required
210
- v-model="name"
211
- />
212
- ```
213
-
214
- ### When does validation occur?
215
-
216
- Validation is triggered on mount, as well as whenever the following values change:
217
- - The input's value (`v-model`)
218
- - `required` prop
219
- - `minlength`/`maxlength` prop
220
- - `validators` prop
221
- - `transform-value` prop
222
- - `error` prop
223
-
224
- So you can trust the `@valid` emit will always provide the most accurate & up to date validation status. But although validation is constantly performed, an input's errors may be visually suppressed if the user hasn't yet interacted with it.
225
-
226
- ### Forced error reveal on submit
227
-
228
- To provide a good form UX, the `<TideForm />` component should be utilized, as when its `@submit` event fires, it automatically reveals any suppressed validation errors on any official TIDE input component descendants. This is particularly useful for cases where a user tries to submit a form before interacting with all required fields. [More on this under `<TideForm />`](#form-submission).
229
-
230
- ### Accessing Error Messages
231
-
232
- `@valid` does not indicate *which* of the validations are valid/invalid. If you need fine-grained control over the validations, it's recommended to *opt out* of all internal validation helper props (`required`, `minlength`, `validators`, etc), and perform your validation manually. You can pass in a custom error message using the `:error` prop.
233
-
234
- ### Manual error messages
235
-
236
- Some use cases require more advanced validation. In such cases it's recommended to opt out of all validation helpers (`minlength`, `maxlength`, `required`, `validators`), and instead use the `:error` prop, paired with your own custom logic. This allows for fine-grained control over your validation, as well as the ability to precisely decide when errors show.
237
-
238
- In the following example, we conditionally render a list of ✅ or ❌ icons in real time based on computed validation refs which reactively validate the input's value. `isPasswordValid` checks overall form validity and conditionally applies an `:error` prop to the input, and also prevents execution of `handleSubmit()` until the form is valid.
239
-
240
- ``` vue
241
- <script lang="ts" setup>
242
- import { TideForm, TideInputText, TideButton } from 'tide-design-system';
243
-
244
- const password = ref<string>('');
245
-
246
- const hasMinLength = computed<boolean>(() => password.value.length >= 12);
247
- const hasUppercase = computed<boolean>(() => /[A-Z]/.test(password.value));
248
- const hasLowercase = computed<boolean>(() => /[a-z]/.test(password.value));
249
- const hasSpecialChar = computed<boolean>(() => /[!@#$%^&*(),.?":{}|<>]/.test(password.value));
250
- const isPasswordValid = computed<boolean>(() =>
251
- hasMinLength.value &&
252
- hasUppercase.value &&
253
- hasLowercase.value &&
254
- hasSpecialChar.value,
255
- );
256
-
257
- const passwordError = computed<string>(() =>
258
- (password.value.length > 0 && !isPasswordValid.value)
259
- ? 'Password does not meet all requirements.'
260
- : '',
261
- );
262
-
263
- const handleSubmit = () => {
264
- if (!isPasswordValid.value) return;
265
- // ... is valid, register user
266
- };
267
- </script>
268
-
269
- <template>
270
- <TideForm @submit="handleSubmit">
271
- <TideInputText
272
- label="New password"
273
- :type="TEXT_INPUT_TYPE.PASSWORD"
274
- v-model="password"
275
- :error="passwordError"
276
- />
277
-
278
- <ul>
279
- <li>{{ hasMinLength ? '✅' : '❌' }} At least 12 characters</li>
280
- <li>{{ hasUppercase ? '✅' : '❌' }} An uppercase letter</li>
281
- <li>{{ hasLowercase ? '✅' : '❌' }} A lowercase letter</li>
282
- <li>{{ hasSpecialChar ? '✅' : '❌' }} A special character</li>
283
- </ul>
284
-
285
- <TideButton
286
- label="Register"
287
- type="submit"
288
- />
289
- </TideForm>
290
- </template>
291
- ```
292
-
293
- ## Form Submission
294
-
295
- The `<TideForm />` component provides developers with consistent form submissions. It renders an unstyled `<form />` element, but adds a few subtle enhancements which make forms consistent and improve UX.
296
-
297
- ### Basic usage:
298
-
299
- ``` vue
300
- <script lang="ts" setup>
301
- import { TideButton, TideForm } from 'tide-design-system';
302
-
303
- const handleSubmit = () => {/* ...submit */};
304
- </script>
305
-
306
- <template>
307
- <TideForm @submit="handleSubmit">
308
- <!-- ...TIDE input components go here -->
309
-
310
- <TideButton
311
- label="Submit"
312
- type="submit"
313
- />
314
- </TideForm>
315
- </template>
316
- ```
317
-
318
- ### How to Use `<TideForm />`
319
-
320
- - Wrap your inputs in a `<TideForm />` component.
321
- - Attach a submit handler to `@submit` for your custom form logic.
322
- - Add a submit button (`type="submit"`) inside the form.
323
-
324
- **Tip:** It's possible to trigger a form from *anywhere* in the DOM by applying a `form` attribute to a button. The attribute's value must match the unique HTML `id` of the target form element. [Read more about `[form]` on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/form).
325
-
326
- ### Benefits of using `<TideForm />` over `<form />`
327
-
328
- With `<TideForm />` you get the following enhancements for free:
329
-
330
- #### event.preventDefault()
331
- `<TideForm />` automatically prevents the browser's native form submit action. This is helpful as we typically want to submit forms using JS — not the native behavior which submits to the server, causing a full page reload. `preventDefault()` causes this native behavior to be ignored, yet the `@submit` event still fires, giving you full control over what happens when the user triggers form submission.
332
-
333
- [Read about `preventDefault()` on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault).
334
-
335
- #### novalidate
336
-
337
- When a submit request is fired, the browser looks for various native validation-related attributes like [`[maxlength]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/maxlength), [`[required]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/required) or [`[pattern]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/pattern), and checks that the input's values are valid. If any values are invalid, it will prevent the submit event from firing, and it will show some error messages like so:
338
-
339
- <p>
340
- <img src="./assets/native-input-validation.png" width="360" />
341
- </p>
342
-
343
- But our components have their own Vue-based validation mechanisms, so we want to bypass this native behavior. `[novalidate]` being placed on the form element opts out of this native behavior.
344
-
345
- [Read about `novalidate` on MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/noValidate).
346
-
347
- #### Show errors on submit
348
-
349
- Sometimes a user will attempt to submit a form before they've interacted with all required inputs. In this case it's crucial that the user is made aware they need to adjust some form values. For this reason, when a `<TideForm />` is submitted, it will cause any suppressed errors to be made visible, preventing potential user frustration.
350
-
351
- ---
352
-
353
- ## Minimal Reactive Single-Input Example
354
-
355
- This is a simple example of a text input connected to a local `Ref<string>`. A `Ref<boolean>` separately tracks the validation state via the `@valid` emit, whose validation status is stored, and referenced when the user tries to submit. If the keyword input is invalid we cancel the submission as they need to modify their input.
356
-
357
- ```vue
358
- <script lang="ts" setup>
359
- import { TideButton, TideForm, TideInputText } from 'tide-design-system';
360
-
361
- const keyword = ref<string>('');
362
- const isKeywordValid = ref<boolean>(false);
363
-
364
- const handleSubmit = () => {
365
- if (!isKeywordValid.value) return;
366
- // ...perform search
367
- };
368
- </script>
369
-
370
- <template>
371
- <TideForm @submit="handleSubmit">
372
- <TideInputText
373
- label="Keyword"
374
- required
375
- v-model="keyword"
376
- @valid="isKeywordValid = $event"
377
- />
378
-
379
- <TideButton
380
- label="Search"
381
- type="submit"
382
- />
383
- </TideForm>
384
- </template>
385
- ```
386
-
387
- ---
388
-
389
- ### Multi-Input Reactive Form Example
390
-
391
- This more complex example contains a mix of input types. It also uses a mix of many kinds of validations.
392
-
393
- A `reactive({})` ref is used here to conveniently store all form values together. A second `reactive({})` tracks the validation as a boolean for each input. A computed ref checks whether validation passes for all fields. Once again, this value is checked in the submit event handler to cancel submission if the form has errors. As [mentioned earlier](#show-errors-on-submit), form submits will automatically reveal any suppressed errors, which helps users know what they must do next.
394
-
395
- ```vue
396
- <script lang="ts" setup>
397
- import {
398
- TideButton,
399
- TideForm,
400
- TideInputCheckbox,
401
- TideInputSelect,
402
- TideInputText,
403
- TideInputTextarea,
404
- VALIDATOR,
405
- } from 'tide-design-system';
406
-
407
- const form = reactive({
408
- bio: '',
409
- country: '',
410
- fullName: '',
411
- terms: false,
412
- });
413
-
414
- const validation = reactive({
415
- bio: false,
416
- country: false,
417
- fullName: false,
418
- terms: false,
419
- });
420
-
421
- const isFormValid = computed<boolean>(() => [
422
- validation.bio,
423
- validation.country,
424
- validation.fullName,
425
- validation.terms,
426
- ].every(Boolean));
427
-
428
- const handleSubmit = () => {
429
- if (!isFormValid.value) return;
430
- // ...register user
431
- };
432
- </script>
433
-
434
- <template>
435
- <TideForm @submit="handleSubmit">
436
- <TideInputText
437
- :maxlength="24"
438
- :validators="[VALIDATOR.ALPHA_SPACE]"
439
- @valid="validation.fullName = $event"
440
- label="Full name"
441
- required
442
- v-model="form.fullName"
443
- />
444
-
445
- <TideInputTextarea
446
- :maxlength="500"
447
- @valid="validation.bio = $event"
448
- label="Bio"
449
- v-model="form.bio"
450
- />
451
-
452
- <TideInputSelect
453
- :options="[
454
- { label: 'US', value: 'us' },
455
- { label: 'Canada', value: 'ca' },
456
- ]"
457
- @valid="validation.country = $event"
458
- label="Country"
459
- required
460
- v-model="form.country"
461
- />
462
-
463
- <TideInputCheckbox
464
- @valid="validation.terms = $event"
465
- label="Accept terms & conditions"
466
- required
467
- v-model="form.terms"
468
- />
469
-
470
- <TideButton
471
- label="Register"
472
- type="submit"
473
- />
474
- </TideForm>
475
- </template>
476
- ```
477
-
478
- ## Further reading
479
-
480
- Instead of disabling form submit buttons, consider leaving them enabled, but provide the user with visual feedback indicating the form is not yet submittable. Don't forget that just because an HTML form's submit button is disabled doesn't mean it can't be submittable. The `Enter`/`Return` key, or other mechanisms can still trigger the `@submit` event.
481
-
482
- Read more:
483
- - [The problem with disabled buttons and what to do instead](https://adamsilver.io/blog/the-problem-with-disabled-buttons-and-what-to-do-instead/) - Adam Silver
484
- - [Don’t Disable Form Controls](https://adrianroselli.com/2024/02/dont-disable-form-controls.html) - Adrian Roselli
@@ -1,83 +0,0 @@
1
- # TIDE Layout Grid Utility
2
-
3
- TIDE provides a lightweight CSS Grid for consistent page alignment, gutters, and max-width, with minimal markup. It separates **layout** (page width, gutters) from **component** concerns (spacing, internal layout).
4
-
5
- <img src="./assets/layout-grid.webp" width="937" height="420" /><br>
6
-
7
- ## Core Concepts
8
-
9
- ### Three-Column Grid
10
-
11
- ```
12
- | gutter | content | gutter |
13
- ```
14
-
15
- Direct children are stacked in the **center content column** by default.
16
-
17
- ### Responsive Max Width
18
-
19
- | Variant | Max content width | Class |
20
- | ------- | ----------------- | ------------- |
21
- | Default | 1232px | – |
22
- | XL | 1920px | `CSS.GRID.XL` |
23
-
24
- ``` vue
25
- <div :class="[CSS.GRID.LAYOUT, CSS.GRID.XL]">...</div>
26
- ```
27
-
28
- ### Responsive Gutters
29
-
30
- | Breakpoint | Min gutter |
31
- | ---------- | ------------------ |
32
- | XS | `--tide-spacing-1` |
33
- | XS - SM | `--tide-spacing-2` |
34
- | SM - MD | `--tide-spacing-4` |
35
-
36
- ---
37
-
38
- ## Usage
39
-
40
- ### Page Layout Context
41
-
42
- ``` vue
43
- <div :class="[CSS.GRID.LAYOUT]">
44
- <section><ArticleIntro /></section>
45
- <section><ArticleBody /></section>
46
- </div>
47
- ```
48
-
49
- Direct children are **centered automatically**, like so:
50
-
51
- <img src="./assets/layout-grid-default.webp" width="937" height="420" /><br>
52
-
53
- ### Full-Width / Edge-to-Edge Sections
54
-
55
- Use `CSS.GRID.FLUID` to break out of the content column:
56
-
57
- ``` vue
58
- <div :class="[CSS.GRID.LAYOUT]">
59
- <section><ArticleIntro /></section>
60
-
61
- <section :class="[CSS.GRID.FLUID]">
62
- <HeroBanner />
63
- </section>
64
-
65
- <section><ArticleBody /></section>
66
- </div>
67
- ```
68
-
69
- The code in this example would result in a layout like this:
70
-
71
- <img src="./assets/layout-grid-fluid.webp" width="937" height="420" /><br>
72
-
73
- Notice the `<HeroBanner />` is no longer confined to the center column, and instead breaks out and stretches **edge-to-edge**. This section is now considered **fluid**.
74
-
75
- Common use cases for fluid sections:
76
-
77
- - Header/footer
78
- - Full-bleed carousels
79
- - Edge-to-edge hero sections
80
- - Sticky bars
81
- - Page sections with toned backgrounds
82
-
83
- <img src="./assets/full-bleed.gif" width="127" height="277" /><br>
package/docs/images.md DELETED
@@ -1,50 +0,0 @@
1
- # Responsive Images in TIDE
2
-
3
- The `<TideImage />` and `<TideImageBackground />` components provide built-in responsive loading and error handling.
4
-
5
- ## Quick Start
6
-
7
- The `src` prop is the default image. Use the `:sources` prop to provide overrides for specific screen sizes using a mobile-first (min-width) pattern.
8
-
9
- **Minimal Responsive Example**
10
-
11
- ``` vue
12
- <template>
13
- <TideImage
14
- src="image-mobile.png"
15
- :sources="[
16
- ...smaller screens
17
- { media: BREAKPOINT.LG, srcset: "image-desktop.png" },
18
- ...larger screens
19
- ]"
20
- />
21
- </template>
22
- ```
23
-
24
- ## Configuration
25
-
26
- The `:sources` array generates `<source>` elements within a `<picture>` tag. High-density descriptors (e.g., `2x`) are supported in the `srcset` string.
27
-
28
- ### 1. Responsive Sources
29
-
30
- | Constant | Value | Resulting Media Query |
31
- | - | - | - |
32
- | `MEDIA.SM` | 768 | `(min-width: 768px)` |
33
- | `MEDIA.MD` | 992 | `(min-width: 992px)` |
34
- | `MEDIA.LG` | 1232 | `(min-width: 1232px)` |
35
- | `MEDIA.XL` | 1920 | `(min-width: 1920px)` |
36
-
37
- > **Note:** Order matters. The browser selects the first matching source from the top of the array down.
38
-
39
- ### 2. Performance & Behavior
40
-
41
- - **Lazy Loading:** Enabled by default (`is-lazy: true`). For "above-the-fold" content (like Hero banners), set `:is-lazy="false"` to trigger high-priority fetching.
42
- - **Object Fit:** Controlled via the `object-fit` prop (defaults to `OBJECT_FIT.COVER`).
43
-
44
- ## Error Handling
45
-
46
- If no valid source is loaded, the component automatically injects a placeholder fallback.
47
-
48
- **Placeholder Preview:**
49
-
50
- <img src="https://cdn-static.tilabs.io/marketplace/common/image-coming-soon.svg" width="400px" />