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.
- package/dist/tide-design-system.d.ts +2742 -0
- package/dist/tide-design-system.js +2 -2
- package/package.json +13 -2
- package/.eslintrc.cjs +0 -119
- package/.github/workflows/publish-release.yml +0 -38
- package/.storybook/main.ts +0 -70
- package/.storybook/preview.ts +0 -256
- package/docs/assets/full-bleed.gif +0 -0
- package/docs/assets/layout-grid-default.webp +0 -0
- package/docs/assets/layout-grid-fluid.webp +0 -0
- package/docs/assets/layout-grid.webp +0 -0
- package/docs/assets/native-input-validation.png +0 -0
- package/docs/configuation.md +0 -47
- package/docs/development.md +0 -163
- package/docs/figma.md +0 -43
- package/docs/forms.md +0 -484
- package/docs/grid-layout.md +0 -83
- package/docs/images.md +0 -50
- package/docs/integration-full.md +0 -84
- package/docs/integration-partial.md +0 -39
- package/docs/migration.md +0 -74
- package/docs/storybook.md +0 -44
- package/docs/style-guide.md +0 -22
- package/docs/toast.md +0 -61
- package/docs/token-cheatsheet.md +0 -63
- package/docs/upgrading.md +0 -188
- package/docs/workflows.md +0 -20
- package/index.html +0 -14
- package/index.ts +0 -201
- package/netlify.toml +0 -3
- package/src/assets/css/fonts.css +0 -36
- package/src/assets/css/grid-layout.css +0 -34
- package/src/assets/css/main.css +0 -5
- package/src/assets/css/realm/aero.css +0 -25
- package/src/assets/css/realm/atv.css +0 -25
- package/src/assets/css/realm/boatmart.css +0 -25
- package/src/assets/css/realm/cycle.css +0 -24
- package/src/assets/css/realm/equipment.css +0 -25
- package/src/assets/css/realm/pwc.css +0 -25
- package/src/assets/css/realm/rv.css +0 -25
- package/src/assets/css/realm/snow.css +0 -25
- package/src/assets/css/realm/truck.css +0 -25
- package/src/assets/css/reset.css +0 -99
- package/src/assets/css/storybook.css +0 -18
- package/src/assets/css/utilities-base.css +0 -574
- package/src/assets/css/utilities-responsive.css +0 -2307
- package/src/assets/css/utilities.css +0 -16
- package/src/assets/css/variables.css +0 -223
- package/src/assets/svg/branding/logo/logo-aero.svg +0 -4
- package/src/assets/svg/branding/logo/logo-atv.svg +0 -6
- package/src/assets/svg/branding/logo/logo-boatmart.svg +0 -4
- package/src/assets/svg/branding/logo/logo-cycle.svg +0 -4
- package/src/assets/svg/branding/logo/logo-equipment.svg +0 -4
- package/src/assets/svg/branding/logo/logo-pwc.svg +0 -4
- package/src/assets/svg/branding/logo/logo-rv.svg +0 -6
- package/src/assets/svg/branding/logo/logo-snow.svg +0 -4
- package/src/assets/svg/branding/logo/logo-truck.svg +0 -5
- package/src/assets/svg/branding/mark/mark-aero.svg +0 -3
- package/src/assets/svg/branding/mark/mark-atv.svg +0 -4
- package/src/assets/svg/branding/mark/mark-boatmart.svg +0 -3
- package/src/assets/svg/branding/mark/mark-cycle.svg +0 -3
- package/src/assets/svg/branding/mark/mark-equipment.svg +0 -3
- package/src/assets/svg/branding/mark/mark-pwc.svg +0 -3
- package/src/assets/svg/branding/mark/mark-rv.svg +0 -4
- package/src/assets/svg/branding/mark/mark-snow.svg +0 -3
- package/src/assets/svg/branding/mark/mark-truck.svg +0 -4
- package/src/assets/svg/icons/IconAccountBalance.svg +0 -5
- package/src/assets/svg/icons/IconAcute.svg +0 -3
- package/src/assets/svg/icons/IconAdd.svg +0 -3
- package/src/assets/svg/icons/IconAiDescription.svg +0 -7
- package/src/assets/svg/icons/IconAlignSpaceEven.svg +0 -3
- package/src/assets/svg/icons/IconApplePay.svg +0 -5
- package/src/assets/svg/icons/IconArrowBack.svg +0 -3
- package/src/assets/svg/icons/IconArrowCycle.svg +0 -5
- package/src/assets/svg/icons/IconArrowForward.svg +0 -3
- package/src/assets/svg/icons/IconArrowRight.svg +0 -3
- package/src/assets/svg/icons/IconArrowUp.svg +0 -3
- package/src/assets/svg/icons/IconAssignment.svg +0 -3
- package/src/assets/svg/icons/IconAttachMoney.svg +0 -4
- package/src/assets/svg/icons/IconAutoRenew.svg +0 -3
- package/src/assets/svg/icons/IconAwardStar.svg +0 -5
- package/src/assets/svg/icons/IconBed.svg +0 -3
- package/src/assets/svg/icons/IconBolt.svg +0 -3
- package/src/assets/svg/icons/IconBookmark.svg +0 -5
- package/src/assets/svg/icons/IconBunkhouse.svg +0 -3
- package/src/assets/svg/icons/IconCalculate.svg +0 -3
- package/src/assets/svg/icons/IconCalendarMonth.svg +0 -5
- package/src/assets/svg/icons/IconCall.svg +0 -5
- package/src/assets/svg/icons/IconCallQuality.svg +0 -3
- package/src/assets/svg/icons/IconCarRental.svg +0 -3
- package/src/assets/svg/icons/IconCheck.svg +0 -3
- package/src/assets/svg/icons/IconChevronLeft.svg +0 -3
- package/src/assets/svg/icons/IconChevronRight.svg +0 -3
- package/src/assets/svg/icons/IconClear.svg +0 -3
- package/src/assets/svg/icons/IconClose.svg +0 -3
- package/src/assets/svg/icons/IconContract.svg +0 -3
- package/src/assets/svg/icons/IconCrash.svg +0 -3
- package/src/assets/svg/icons/IconDashboardCustomize.svg +0 -3
- package/src/assets/svg/icons/IconDelete.svg +0 -5
- package/src/assets/svg/icons/IconDiamond.svg +0 -5
- package/src/assets/svg/icons/IconDirectionsBoat.svg +0 -3
- package/src/assets/svg/icons/IconDomain.svg +0 -3
- package/src/assets/svg/icons/IconDraft.svg +0 -3
- package/src/assets/svg/icons/IconEdit.svg +0 -5
- package/src/assets/svg/icons/IconEngine.svg +0 -3
- package/src/assets/svg/icons/IconEngineering.svg +0 -3
- package/src/assets/svg/icons/IconError.svg +0 -5
- package/src/assets/svg/icons/IconExpandContent.svg +0 -3
- package/src/assets/svg/icons/IconExpandLess.svg +0 -3
- package/src/assets/svg/icons/IconExpandMore.svg +0 -3
- package/src/assets/svg/icons/IconFacebook.svg +0 -3
- package/src/assets/svg/icons/IconFavorite.svg +0 -5
- package/src/assets/svg/icons/IconFavoriteFilled.svg +0 -5
- package/src/assets/svg/icons/IconFlag.svg +0 -3
- package/src/assets/svg/icons/IconFormatBold.svg +0 -5
- package/src/assets/svg/icons/IconFormatItalic.svg +0 -3
- package/src/assets/svg/icons/IconFormatListBulleted.svg +0 -5
- package/src/assets/svg/icons/IconForum.svg +0 -5
- package/src/assets/svg/icons/IconGas.svg +0 -3
- package/src/assets/svg/icons/IconGavel.svg +0 -5
- package/src/assets/svg/icons/IconGears.svg +0 -3
- package/src/assets/svg/icons/IconGlobeLocationPin.svg +0 -3
- package/src/assets/svg/icons/IconGoogle.svg +0 -18
- package/src/assets/svg/icons/IconGooglePay.svg +0 -5
- package/src/assets/svg/icons/IconGrid.svg +0 -3
- package/src/assets/svg/icons/IconHandshake.svg +0 -3
- package/src/assets/svg/icons/IconHandyman.svg +0 -3
- package/src/assets/svg/icons/IconHeight.svg +0 -3
- package/src/assets/svg/icons/IconHelp.svg +0 -5
- package/src/assets/svg/icons/IconInfo.svg +0 -5
- package/src/assets/svg/icons/IconInformation.svg +0 -3
- package/src/assets/svg/icons/IconInsertText.svg +0 -5
- package/src/assets/svg/icons/IconInstagram.svg +0 -3
- package/src/assets/svg/icons/IconIosShare.svg +0 -5
- package/src/assets/svg/icons/IconLayout.svg +0 -3
- package/src/assets/svg/icons/IconLevellingJack.svg +0 -3
- package/src/assets/svg/icons/IconLinkedIn.svg +0 -3
- package/src/assets/svg/icons/IconLocalShipping.svg +0 -5
- package/src/assets/svg/icons/IconLock.svg +0 -5
- package/src/assets/svg/icons/IconMail.svg +0 -5
- package/src/assets/svg/icons/IconMenu.svg +0 -3
- package/src/assets/svg/icons/IconMoneyBag.svg +0 -3
- package/src/assets/svg/icons/IconMoreHoriz.svg +0 -5
- package/src/assets/svg/icons/IconMove.svg +0 -3
- package/src/assets/svg/icons/IconNotifications.svg +0 -5
- package/src/assets/svg/icons/IconOdometer.svg +0 -3
- package/src/assets/svg/icons/IconOpenInNew.svg +0 -5
- package/src/assets/svg/icons/IconPalette.svg +0 -5
- package/src/assets/svg/icons/IconPaypal.svg +0 -5
- package/src/assets/svg/icons/IconPerson.svg +0 -5
- package/src/assets/svg/icons/IconPersonSearch.svg +0 -3
- package/src/assets/svg/icons/IconPhotoCamera.svg +0 -5
- package/src/assets/svg/icons/IconPinterest.svg +0 -5
- package/src/assets/svg/icons/IconPlayArrow.svg +0 -3
- package/src/assets/svg/icons/IconPolicy.svg +0 -3
- package/src/assets/svg/icons/IconPower.svg +0 -3
- package/src/assets/svg/icons/IconPowerOff.svg +0 -3
- package/src/assets/svg/icons/IconPriorityHigh.svg +0 -3
- package/src/assets/svg/icons/IconRemove.svg +0 -3
- package/src/assets/svg/icons/IconRequestQuote.svg +0 -3
- package/src/assets/svg/icons/IconResetWrench.svg +0 -3
- package/src/assets/svg/icons/IconRoad.svg +0 -3
- package/src/assets/svg/icons/IconRoundedCorner.svg +0 -5
- package/src/assets/svg/icons/IconRuler.svg +0 -3
- package/src/assets/svg/icons/IconSailing.svg +0 -3
- package/src/assets/svg/icons/IconSchool.svg +0 -3
- package/src/assets/svg/icons/IconSearch.svg +0 -5
- package/src/assets/svg/icons/IconSeating.svg +0 -3
- package/src/assets/svg/icons/IconSell.svg +0 -5
- package/src/assets/svg/icons/IconSensors.svg +0 -3
- package/src/assets/svg/icons/IconSettings.svg +0 -3
- package/src/assets/svg/icons/IconShare.svg +0 -5
- package/src/assets/svg/icons/IconShieldCheck.svg +0 -3
- package/src/assets/svg/icons/IconShoppingCart.svg +0 -5
- package/src/assets/svg/icons/IconSleeps.svg +0 -3
- package/src/assets/svg/icons/IconSms.svg +0 -5
- package/src/assets/svg/icons/IconSnowflake.svg +0 -3
- package/src/assets/svg/icons/IconStar.svg +0 -5
- package/src/assets/svg/icons/IconStarFilled.svg +0 -3
- package/src/assets/svg/icons/IconStarHalf.svg +0 -3
- package/src/assets/svg/icons/IconSummarize.svg +0 -3
- package/src/assets/svg/icons/IconSwapHoriz.svg +0 -3
- package/src/assets/svg/icons/IconSwapVert.svg +0 -5
- package/src/assets/svg/icons/IconThreeDRotation.svg +0 -18
- package/src/assets/svg/icons/IconThumbUp.svg +0 -3
- package/src/assets/svg/icons/IconTrendingDown.svg +0 -5
- package/src/assets/svg/icons/IconTrophy.svg +0 -5
- package/src/assets/svg/icons/IconTune.svg +0 -5
- package/src/assets/svg/icons/IconTwitter.svg +0 -5
- package/src/assets/svg/icons/IconUmbrella.svg +0 -3
- package/src/assets/svg/icons/IconVerified.svg +0 -4
- package/src/assets/svg/icons/IconVideocam.svg +0 -5
- package/src/assets/svg/icons/IconViewInAr.svg +0 -5
- package/src/assets/svg/icons/IconVisibility.svg +0 -5
- package/src/assets/svg/icons/IconVolumeOff.svg +0 -5
- package/src/assets/svg/icons/IconVolumeOn.svg +0 -5
- package/src/assets/svg/icons/IconWarehouse.svg +0 -3
- package/src/assets/svg/icons/IconWarning.svg +0 -5
- package/src/assets/svg/icons/IconWater.svg +0 -3
- package/src/assets/svg/icons/IconWeight.svg +0 -3
- package/src/assets/svg/icons/IconWidth.svg +0 -3
- package/src/assets/svg/icons/IconWorkspacePremium.svg +0 -3
- package/src/assets/svg/icons/IconWrench.svg +0 -3
- package/src/assets/svg/icons/IconYoutube.svg +0 -5
- package/src/assets/svg/icons/realm/aero/IconAeroFlight.svg +0 -3
- package/src/assets/svg/icons/realm/aero/IconAeroHelicopter.svg +0 -3
- package/src/assets/svg/icons/realm/aero/IconAeroModeFan.svg +0 -3
- package/src/assets/svg/icons/realm/aero/IconAeroPlaneContrails.svg +0 -3
- package/src/assets/svg/icons/realm/atv/IconAtvAtv.svg +0 -3
- package/src/assets/svg/icons/realm/atv/IconAtvDuneBuggy.svg +0 -3
- package/src/assets/svg/icons/realm/atv/IconAtvGoKart.svg +0 -3
- package/src/assets/svg/icons/realm/atv/IconAtvGolfCart.svg +0 -3
- package/src/assets/svg/icons/realm/atv/IconAtvSandRail.svg +0 -3
- package/src/assets/svg/icons/realm/atv/IconAtvSideBySide.svg +0 -3
- package/src/assets/svg/icons/realm/atv/IconAtvTrailer.svg +0 -3
- package/src/assets/svg/icons/realm/boatmart/IconBoatmartPwc.svg +0 -3
- package/src/assets/svg/icons/realm/boatmart/IconBoatmartTrailer.svg +0 -3
- package/src/assets/svg/icons/realm/cycle/IconCycleMotorcycle.svg +0 -4
- package/src/assets/svg/icons/realm/cycle/IconCycleTrailer.svg +0 -3
- package/src/assets/svg/icons/realm/pwc/IconPwcPwc.svg +0 -3
- package/src/assets/svg/icons/realm/pwc/IconPwcSnowmobile.svg +0 -3
- package/src/assets/svg/icons/realm/pwc/IconPwcTrailer.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvClassA.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvClassB.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvClassC.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvDestinationTrailer.svg +0 -5
- package/src/assets/svg/icons/realm/rv/IconRvFifthWheel.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvFishHouse.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvParkModel.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvPopUpCamper.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvTeardropTrailer.svg +0 -4
- package/src/assets/svg/icons/realm/rv/IconRvTravelTrailer.svg +0 -3
- package/src/assets/svg/icons/realm/rv/IconRvTruckCamper.svg +0 -3
- package/src/assets/svg/icons/realm/snow/IconSnowMotorcycle.svg +0 -4
- package/src/assets/svg/icons/realm/snow/IconSnowPwc.svg +0 -3
- package/src/assets/svg/icons/realm/snow/IconSnowSideBySide.svg +0 -3
- package/src/assets/svg/icons/realm/snow/IconSnowSnowmobile.svg +0 -3
- package/src/assets/svg/icons/realm/snow/IconSnowTrailer.svg +0 -3
- package/src/components/InternalBaseLink.vue +0 -11
- package/src/components/TideAccordionItem.vue +0 -120
- package/src/components/TideAlert.vue +0 -186
- package/src/components/TideBadge.vue +0 -64
- package/src/components/TideBadgeTrustedPartner.vue +0 -52
- package/src/components/TideBadgeVerifiedVehicle.vue +0 -46
- package/src/components/TideBreadCrumbs.vue +0 -62
- package/src/components/TideButton.vue +0 -115
- package/src/components/TideButtonIcon.vue +0 -91
- package/src/components/TideButtonPagination.vue +0 -87
- package/src/components/TideButtonSave.vue +0 -109
- package/src/components/TideButtonSegmented.vue +0 -115
- package/src/components/TideCard.vue +0 -107
- package/src/components/TideCarousel.vue +0 -489
- package/src/components/TideChipAction.vue +0 -83
- package/src/components/TideChipFilter.vue +0 -71
- package/src/components/TideChipInput.vue +0 -54
- package/src/components/TideColumns.vue +0 -65
- package/src/components/TideDivider.vue +0 -43
- package/src/components/TideForm.vue +0 -33
- package/src/components/TideIcon.vue +0 -85
- package/src/components/TideImage.vue +0 -126
- package/src/components/TideImageBackground.vue +0 -69
- package/src/components/TideIndicator.vue +0 -63
- package/src/components/TideInputCheckbox.vue +0 -210
- package/src/components/TideInputCheckboxDeprecated.vue +0 -117
- package/src/components/TideInputRadio.vue +0 -115
- package/src/components/TideInputRadioDeprecated.vue +0 -119
- package/src/components/TideInputSelect.vue +0 -331
- package/src/components/TideInputSelectDeprecated.vue +0 -245
- package/src/components/TideInputSupportingText.vue +0 -44
- package/src/components/TideInputText.vue +0 -382
- package/src/components/TideInputTextDeprecated.vue +0 -327
- package/src/components/TideInputTextarea.vue +0 -235
- package/src/components/TideInputTextareaDeprecated.vue +0 -198
- package/src/components/TideLink.vue +0 -95
- package/src/components/TideMenuItem.vue +0 -83
- package/src/components/TideModal.vue +0 -281
- package/src/components/TidePagination.vue +0 -65
- package/src/components/TidePopover.vue +0 -198
- package/src/components/TideRating.vue +0 -109
- package/src/components/TideRealmLogo.vue +0 -154
- package/src/components/TideSeoLinks.vue +0 -59
- package/src/components/TideSheet.vue +0 -209
- package/src/components/TideSwitch.vue +0 -101
- package/src/components/TideTabs.vue +0 -63
- package/src/components/TideToaster.vue +0 -97
- package/src/composables/useTideConfig.ts +0 -23
- package/src/composables/useTideForm.ts +0 -25
- package/src/composables/useTideToaster.ts +0 -63
- package/src/contexts/sandbox/AppSandbox.vue +0 -7
- package/src/contexts/sandbox/app-sandbox.ts +0 -10
- package/src/stories/DemoCssUtilities.stories.ts +0 -154
- package/src/stories/DemoCssUtilitiesByTextInput.stories.ts +0 -61
- package/src/stories/FoundationsBorder.stories.ts +0 -272
- package/src/stories/FoundationsColor.stories.ts +0 -311
- package/src/stories/FoundationsFlexbox.stories.ts +0 -184
- package/src/stories/FoundationsGrid.stories.ts +0 -126
- package/src/stories/FoundationsMargin.stories.ts +0 -155
- package/src/stories/FoundationsPadding.stories.ts +0 -108
- package/src/stories/FoundationsShadow.stories.ts +0 -103
- package/src/stories/FoundationsTransparency.stories.ts +0 -114
- package/src/stories/FoundationsTypography.stories.ts +0 -212
- package/src/stories/Template.stories.ts +0 -73
- package/src/stories/TideAccordionItem.stories.ts +0 -91
- package/src/stories/TideAlert.stories.ts +0 -133
- package/src/stories/TideBadge.stories.ts +0 -90
- package/src/stories/TideBadgeTrustedPartner.stories.ts +0 -34
- package/src/stories/TideBadgeVerifiedVehicle.stories.ts +0 -22
- package/src/stories/TideBreadCrumbs.stories.ts +0 -42
- package/src/stories/TideButton.stories.ts +0 -132
- package/src/stories/TideButtonIcon.stories.ts +0 -109
- package/src/stories/TideButtonPagination.stories.ts +0 -99
- package/src/stories/TideButtonSave.stories.ts +0 -62
- package/src/stories/TideButtonSegmented.stories.ts +0 -110
- package/src/stories/TideCard.stories.ts +0 -102
- package/src/stories/TideCarousel.stories.ts +0 -219
- package/src/stories/TideChipAction.stories.ts +0 -81
- package/src/stories/TideChipFilter.stories.ts +0 -84
- package/src/stories/TideChipInput.stories.ts +0 -56
- package/src/stories/TideColumns.stories.ts +0 -89
- package/src/stories/TideDivider.stories.ts +0 -48
- package/src/stories/TideIcon.stories.ts +0 -31
- package/src/stories/TideImage.stories.ts +0 -124
- package/src/stories/TideImageBackground.stories.ts +0 -114
- package/src/stories/TideIndicator.stories.ts +0 -32
- package/src/stories/TideInputCheckbox.stories.ts +0 -138
- package/src/stories/TideInputRadio.stories.ts +0 -100
- package/src/stories/TideInputSelect.stories.ts +0 -244
- package/src/stories/TideInputText.stories.ts +0 -221
- package/src/stories/TideInputTextarea.stories.ts +0 -156
- package/src/stories/TideLink.stories.ts +0 -127
- package/src/stories/TideMenuItem.stories.ts +0 -117
- package/src/stories/TideModal.stories.ts +0 -219
- package/src/stories/TidePagination.stories.ts +0 -100
- package/src/stories/TidePopover.stories.ts +0 -101
- package/src/stories/TideRating.stories.ts +0 -114
- package/src/stories/TideRealmLogo.stories.ts +0 -93
- package/src/stories/TideSeoLinks.stories.ts +0 -68
- package/src/stories/TideSheet.stories.ts +0 -152
- package/src/stories/TideSwitch.stories.ts +0 -72
- package/src/stories/TideTabs.stories.ts +0 -114
- package/src/stories/TideToaster.stories.ts +0 -117
- package/src/stories/Welcome.mdx +0 -17
- package/src/types/Alert.ts +0 -8
- package/src/types/Badge.ts +0 -76
- package/src/types/BreadCrumb.ts +0 -5
- package/src/types/Breakpoint.ts +0 -18
- package/src/types/Card.ts +0 -7
- package/src/types/Element.ts +0 -13
- package/src/types/FieldDeprecated.ts +0 -92
- package/src/types/Form.ts +0 -1
- package/src/types/FormDeprecated.ts +0 -91
- package/src/types/Formatted.ts +0 -23
- package/src/types/Icon.ts +0 -202
- package/src/types/Image.ts +0 -7
- package/src/types/Link.ts +0 -5
- package/src/types/Orientation.ts +0 -6
- package/src/types/Priority.ts +0 -11
- package/src/types/Realm.ts +0 -14
- package/src/types/RealmLogo.ts +0 -23
- package/src/types/Select.ts +0 -9
- package/src/types/Size.ts +0 -13
- package/src/types/Source.ts +0 -6
- package/src/types/Storybook.ts +0 -253
- package/src/types/Styles.ts +0 -526
- package/src/types/Tab.ts +0 -5
- package/src/types/Target.ts +0 -6
- package/src/types/TextInput.ts +0 -28
- package/src/types/Toast.ts +0 -21
- package/src/types/Type.ts +0 -6
- package/src/types/Validation.ts +0 -33
- package/src/types/ValidationDeprecated.ts +0 -41
- package/src/utilities/event.ts +0 -4
- package/src/utilities/format.ts +0 -184
- package/src/utilities/forms.ts +0 -22
- package/src/utilities/realm.ts +0 -17
- package/src/utilities/storybook.ts +0 -354
- package/src/utilities/validation-deprecated.ts +0 -252
- package/src/utilities/validation.ts +0 -132
- package/src/utilities/viewport.ts +0 -63
- package/tests/InternalBaseLink.spec.ts +0 -61
- package/tests/TideRealmLogo.spec.ts +0 -58
- package/tests/svg-icons.spec.ts +0 -74
- package/tests/utilities-format.spec.ts +0 -470
- package/tests/utilities-storybook.spec.ts +0 -99
- package/tsconfig.app.json +0 -14
- package/tsconfig.config.json +0 -12
- package/tsconfig.json +0 -35
- package/tsconfig.node.json +0 -7
- package/tsconfig.vitest.json +0 -10
- package/vite-env.d.ts +0 -2
- package/vite.config.sandbox.ts +0 -29
- package/vite.config.ts +0 -37
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import TideChipAction from '@/components/TideChipAction.vue';
|
|
2
|
-
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
3
|
-
import * as STANDARD_ICON from '@/types/Icon';
|
|
4
|
-
import {
|
|
5
|
-
argTypeBooleanUnrequired,
|
|
6
|
-
click,
|
|
7
|
-
dataTrack,
|
|
8
|
-
formatArgType,
|
|
9
|
-
parameters,
|
|
10
|
-
prependNoneAsUndefined,
|
|
11
|
-
} from '@/utilities/storybook';
|
|
12
|
-
|
|
13
|
-
type Args = InstanceType<typeof TideChipAction>['$props'];
|
|
14
|
-
|
|
15
|
-
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
16
|
-
const ICON = prependNoneAsUndefined(STANDARD_ICON.ICON);
|
|
17
|
-
|
|
18
|
-
const render = (args: Args) => ({
|
|
19
|
-
components: { TideChipAction },
|
|
20
|
-
setup: () => ({ args }),
|
|
21
|
-
template: '<TideChipAction class="tide-display-inline-flex" v-bind="args" />',
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
argTypes: {
|
|
26
|
-
click: {
|
|
27
|
-
...click,
|
|
28
|
-
if: { arg: 'element', eq: ELEMENT.BUTTON },
|
|
29
|
-
},
|
|
30
|
-
dataTrack,
|
|
31
|
-
element: {
|
|
32
|
-
...formatArgType({ ELEMENT }),
|
|
33
|
-
table: {
|
|
34
|
-
defaultValue: { summary: 'LINK' },
|
|
35
|
-
type: { summary: 'Element' },
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
href: {
|
|
39
|
-
control: 'text',
|
|
40
|
-
if: { arg: 'element', neq: ELEMENT.BUTTON },
|
|
41
|
-
table: {
|
|
42
|
-
defaultValue: { summary: 'None' },
|
|
43
|
-
type: { summary: 'string' },
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
iconLeading: {
|
|
47
|
-
...formatArgType({ ICON }),
|
|
48
|
-
table: {
|
|
49
|
-
category: 'Props',
|
|
50
|
-
defaultValue: { summary: 'SEARCH' },
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
isNewTab: {
|
|
54
|
-
...argTypeBooleanUnrequired,
|
|
55
|
-
if: { arg: 'element', neq: ELEMENT.BUTTON },
|
|
56
|
-
},
|
|
57
|
-
label: {
|
|
58
|
-
control: 'text',
|
|
59
|
-
table: {
|
|
60
|
-
defaultValue: { summary: 'None' },
|
|
61
|
-
type: { summary: 'string' },
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
args: {
|
|
66
|
-
click: 'doSomething',
|
|
67
|
-
dataTrack: '',
|
|
68
|
-
element: undefined,
|
|
69
|
-
href: 'https://www.sample.com',
|
|
70
|
-
iconLeading: undefined,
|
|
71
|
-
isNewTab: undefined,
|
|
72
|
-
label: 'Demo',
|
|
73
|
-
},
|
|
74
|
-
component: TideChipAction,
|
|
75
|
-
parameters,
|
|
76
|
-
render,
|
|
77
|
-
tags: ['autodocs'],
|
|
78
|
-
title: 'Components/TideChipAction',
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const Demo = {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { ref, watch } from 'vue';
|
|
2
|
-
|
|
3
|
-
import TideChipFilter from '@/components/TideChipFilter.vue';
|
|
4
|
-
import { dataTrack, doSomething, parameters } from '@/utilities/storybook';
|
|
5
|
-
|
|
6
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
7
|
-
|
|
8
|
-
type Args = InstanceType<typeof TideChipFilter>['$props'] & {
|
|
9
|
-
vModel: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const render = (args: Args, context: StoryContext) => ({
|
|
13
|
-
components: { TideChipFilter },
|
|
14
|
-
methods: {
|
|
15
|
-
doSomething,
|
|
16
|
-
handleIsActiveChange: (value: boolean) => {
|
|
17
|
-
context.updateArgs({ ...args, vModel: value });
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
setup: () => {
|
|
21
|
-
const isActive = ref(args.vModel);
|
|
22
|
-
|
|
23
|
-
watch(isActive, () => {
|
|
24
|
-
args.vModel = isActive.value;
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
watch(
|
|
28
|
-
() => args.vModel,
|
|
29
|
-
(newValue) => {
|
|
30
|
-
isActive.value = newValue;
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
args,
|
|
36
|
-
isActive,
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
template: `<TideChipFilter v-bind="args" v-model="isActive" @update:modelValue="handleIsActiveChange">{{ args.default }}</TideChipFilter>`,
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export default {
|
|
43
|
-
argTypes: {
|
|
44
|
-
dataTrack,
|
|
45
|
-
default: {
|
|
46
|
-
control: 'text',
|
|
47
|
-
defaultValue: 'None',
|
|
48
|
-
description: 'Content above label<br />(i.e. Vehicle thumbnail)',
|
|
49
|
-
table: {
|
|
50
|
-
defaultValue: { summary: 'None' },
|
|
51
|
-
type: { summary: 'HTML' },
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
label: {
|
|
55
|
-
control: 'text',
|
|
56
|
-
table: {
|
|
57
|
-
defaultValue: { summary: 'None' },
|
|
58
|
-
type: { summary: 'string' },
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
vModel: {
|
|
62
|
-
control: 'boolean',
|
|
63
|
-
description: 'Data binding to Vue ref',
|
|
64
|
-
table: {
|
|
65
|
-
category: 'Native',
|
|
66
|
-
defaultValue: { summary: 'None' },
|
|
67
|
-
type: { summary: 'Ref<boolean>' },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
args: {
|
|
72
|
-
dataTrack: '',
|
|
73
|
-
default: '',
|
|
74
|
-
label: 'Demo',
|
|
75
|
-
vModel: false,
|
|
76
|
-
},
|
|
77
|
-
component: TideChipFilter,
|
|
78
|
-
parameters,
|
|
79
|
-
render,
|
|
80
|
-
tags: ['autodocs'],
|
|
81
|
-
title: 'Components/TideChipFilter',
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const Demo = {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
|
|
3
|
-
import TideChipInput from '@/components/TideChipInput.vue';
|
|
4
|
-
import { click, dataTrack, doSomething, parameters } from '@/utilities/storybook';
|
|
5
|
-
|
|
6
|
-
type Args = InstanceType<typeof TideChipInput>['$props'] & {
|
|
7
|
-
click: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const render = (args: Args) => ({
|
|
11
|
-
components: { TideChipInput },
|
|
12
|
-
methods: {
|
|
13
|
-
doSomething,
|
|
14
|
-
handleClick: () => {
|
|
15
|
-
action('TideChipInput clicked')({});
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
const callback = eval(args.click);
|
|
19
|
-
|
|
20
|
-
if (callback) {
|
|
21
|
-
callback();
|
|
22
|
-
}
|
|
23
|
-
} catch {
|
|
24
|
-
alert('Please specify a valid handler in the "change" control.');
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
setup: () => ({ args }),
|
|
29
|
-
template: `<TideChipInput @click="handleClick" v-bind="args" />`,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export default {
|
|
33
|
-
argTypes: {
|
|
34
|
-
click,
|
|
35
|
-
dataTrack,
|
|
36
|
-
label: {
|
|
37
|
-
control: 'text',
|
|
38
|
-
table: {
|
|
39
|
-
defaultValue: { summary: 'None' },
|
|
40
|
-
type: { summary: 'string' },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
args: {
|
|
45
|
-
click: 'doSomething',
|
|
46
|
-
dataTrack: '',
|
|
47
|
-
label: 'Demo',
|
|
48
|
-
},
|
|
49
|
-
component: TideChipInput,
|
|
50
|
-
parameters,
|
|
51
|
-
render,
|
|
52
|
-
tags: ['autodocs'],
|
|
53
|
-
title: 'Components/TideChipInput',
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const Demo = {};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import TideColumns from '@/components/TideColumns.vue';
|
|
2
|
-
import { lineBreak, tab } from '@/utilities/storybook';
|
|
3
|
-
|
|
4
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
5
|
-
|
|
6
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
7
|
-
const { args } = context;
|
|
8
|
-
|
|
9
|
-
const argsWithValues: string[] = [];
|
|
10
|
-
|
|
11
|
-
if (args.heading) argsWithValues.push(`:heading="${args.heading}"`);
|
|
12
|
-
|
|
13
|
-
return `<TideColumns ${argsWithValues.join(' ')}>${lineBreak}${tab}<template #section1>${
|
|
14
|
-
args.section1
|
|
15
|
-
}</template>${lineBreak}${tab}<template #section2>${args.section2}</template>${lineBreak}${tab}<template #section3>${
|
|
16
|
-
args.section3
|
|
17
|
-
}</template>${lineBreak}${tab}<template #section4>${args.section4}</template>${lineBreak}</TideColumns>`;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const parameters = {
|
|
21
|
-
docs: {
|
|
22
|
-
source: {
|
|
23
|
-
format: 'vue',
|
|
24
|
-
language: 'html',
|
|
25
|
-
transform: formatSnippet,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default {
|
|
31
|
-
argTypes: {
|
|
32
|
-
heading: {
|
|
33
|
-
control: 'text',
|
|
34
|
-
table: {
|
|
35
|
-
defaultValue: { summary: 'None' },
|
|
36
|
-
type: { summary: 'string' },
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
section1: {
|
|
40
|
-
control: 'text',
|
|
41
|
-
defaultValue: 'None',
|
|
42
|
-
description: 'Section 1 content',
|
|
43
|
-
table: {
|
|
44
|
-
defaultValue: { summary: 'None' },
|
|
45
|
-
type: { summary: 'HTML' },
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
section2: {
|
|
49
|
-
control: 'text',
|
|
50
|
-
defaultValue: 'None',
|
|
51
|
-
description: 'Section 2 content',
|
|
52
|
-
table: {
|
|
53
|
-
defaultValue: { summary: 'None' },
|
|
54
|
-
type: { summary: 'HTML' },
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
section3: {
|
|
58
|
-
control: 'text',
|
|
59
|
-
defaultValue: 'None',
|
|
60
|
-
description: 'Section 3 content',
|
|
61
|
-
table: {
|
|
62
|
-
defaultValue: { summary: 'None' },
|
|
63
|
-
type: { summary: 'HTML' },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
section4: {
|
|
67
|
-
control: 'text',
|
|
68
|
-
defaultValue: 'None',
|
|
69
|
-
description: 'Section 4 content',
|
|
70
|
-
table: {
|
|
71
|
-
defaultValue: { summary: 'None' },
|
|
72
|
-
type: { summary: 'HTML' },
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
args: {
|
|
77
|
-
heading: 'Demo',
|
|
78
|
-
section1: 'Section 1',
|
|
79
|
-
section2: 'Section 2',
|
|
80
|
-
section3: 'Section 3',
|
|
81
|
-
section4: 'Section 4',
|
|
82
|
-
},
|
|
83
|
-
component: TideColumns,
|
|
84
|
-
parameters,
|
|
85
|
-
tags: ['autodocs'],
|
|
86
|
-
title: 'Components/TideColumns',
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const Demo = {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import TideDivider from '@/components/TideDivider.vue';
|
|
2
|
-
import { ORIENTATION as STANDARD_ORIENTATION } from '@/types/Orientation';
|
|
3
|
-
import { disabledArgType, formatArgType, parameters, prependNoneAsUndefined } from '@/utilities/storybook';
|
|
4
|
-
|
|
5
|
-
type Args = InstanceType<typeof TideDivider>['$props'] & {
|
|
6
|
-
flexDirection: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const formatArgs = (args: Args) => {
|
|
10
|
-
args.flexDirection = args.orientation === ORIENTATION.VERTICAL ? 'tide-flex-row' : 'tide-flex-column';
|
|
11
|
-
|
|
12
|
-
return { args };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const render = (args: Args) => ({
|
|
16
|
-
components: { TideDivider },
|
|
17
|
-
setup: () => formatArgs(args),
|
|
18
|
-
template: `<div :class="['tide-display-inline-flex', args.flexDirection]">
|
|
19
|
-
<div class="sb-border-blue-light tide-padding-1">Demo</div>
|
|
20
|
-
|
|
21
|
-
<TideDivider :orientation="args.orientation" />
|
|
22
|
-
|
|
23
|
-
<div class="sb-border-blue-light tide-padding-1">Demo</div>
|
|
24
|
-
</div>`,
|
|
25
|
-
updated: () => formatArgs(args),
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const ORIENTATION = prependNoneAsUndefined(STANDARD_ORIENTATION);
|
|
29
|
-
|
|
30
|
-
export default {
|
|
31
|
-
argTypes: {
|
|
32
|
-
disabledArgType: disabledArgType, // Force updated() trigger when orientation is set to undefined.
|
|
33
|
-
orientation: {
|
|
34
|
-
...formatArgType({ ORIENTATION }),
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
args: {
|
|
38
|
-
disabledArgType: '',
|
|
39
|
-
orientation: undefined,
|
|
40
|
-
},
|
|
41
|
-
component: TideDivider,
|
|
42
|
-
parameters,
|
|
43
|
-
render,
|
|
44
|
-
tags: ['autodocs'],
|
|
45
|
-
title: 'Components/TideDivider',
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const Demo = {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import TideIcon from '@/components/TideIcon.vue';
|
|
2
|
-
import { ICON as STANDARD_ICON, ICON_REALM as STANDARD_ICON_REALM } from '@/types/Icon';
|
|
3
|
-
import * as STANDARD_SIZE from '@/types/Size';
|
|
4
|
-
import { formatArgType, parameters, prependNoneAsUndefined } from '@/utilities/storybook';
|
|
5
|
-
|
|
6
|
-
const ICON = prependNoneAsUndefined({
|
|
7
|
-
...STANDARD_ICON,
|
|
8
|
-
...Object.assign({}, ...Object.values(STANDARD_ICON_REALM)),
|
|
9
|
-
});
|
|
10
|
-
const SIZE = prependNoneAsUndefined(STANDARD_SIZE.SIZE);
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
argTypes: {
|
|
14
|
-
icon: {
|
|
15
|
-
...formatArgType({ ICON }),
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
...formatArgType({ SIZE }),
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
args: {
|
|
22
|
-
icon: ICON.FAVORITE,
|
|
23
|
-
size: undefined,
|
|
24
|
-
},
|
|
25
|
-
component: TideIcon,
|
|
26
|
-
parameters,
|
|
27
|
-
tags: ['autodocs'],
|
|
28
|
-
title: 'Components/TideIcon',
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const Demo = {};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import TideImage from '@/components/TideImage.vue';
|
|
2
|
-
import { MEDIA } from '@/types/Breakpoint';
|
|
3
|
-
import { OBJECT_FIT } from '@/types/Image';
|
|
4
|
-
import {
|
|
5
|
-
argTypeBooleanUnrequired,
|
|
6
|
-
formatArgType,
|
|
7
|
-
formatValueAsConstant,
|
|
8
|
-
prependNoneAsUndefined,
|
|
9
|
-
} from '@/utilities/storybook';
|
|
10
|
-
|
|
11
|
-
import type { Source } from '@/types/Source';
|
|
12
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
13
|
-
|
|
14
|
-
const sources: Source[] = [
|
|
15
|
-
{
|
|
16
|
-
media: MEDIA.XL,
|
|
17
|
-
srcset: 'https://placedog.net/1919/400',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
media: MEDIA.LG,
|
|
21
|
-
srcset: 'https://placedog.net/1231/400',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
media: MEDIA.MD,
|
|
25
|
-
srcset: 'https://placedog.net/991/400',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
media: MEDIA.SM,
|
|
29
|
-
srcset: 'https://placedog.net/767/400',
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
34
|
-
const { args, argTypes } = context;
|
|
35
|
-
const { objectFit } = args;
|
|
36
|
-
const argsWithValues: string[] = [`alt="${args.alt}"`];
|
|
37
|
-
const hasSources = args.sources !== null;
|
|
38
|
-
const hasSourcesLength = hasSources ? (args.sources as any).length > 0 : false;
|
|
39
|
-
|
|
40
|
-
if (args.height !== '') argsWithValues.push(`height="${args.height}"`);
|
|
41
|
-
if (args.isLazy !== undefined) argsWithValues.push(`:is-lazy="${args.isLazy}"`);
|
|
42
|
-
if (hasSources && hasSourcesLength) argsWithValues.push(`:sources="sources"`);
|
|
43
|
-
if (args.src) argsWithValues.push(`src="${args.src}"`);
|
|
44
|
-
if (args.width !== '') argsWithValues.push(`width="${args.width}"`);
|
|
45
|
-
if (args.objectFit !== undefined)
|
|
46
|
-
argsWithValues.push(`:object-fit="${formatValueAsConstant({ objectFit }, argTypes)}"`);
|
|
47
|
-
|
|
48
|
-
return `<TideImage ${argsWithValues.join(' ')} />`;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const parameters = {
|
|
52
|
-
docs: {
|
|
53
|
-
source: {
|
|
54
|
-
format: 'vue',
|
|
55
|
-
language: 'html',
|
|
56
|
-
transform: formatSnippet,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const OBJECT_FIT_OPTIONS = prependNoneAsUndefined(OBJECT_FIT);
|
|
62
|
-
|
|
63
|
-
export default {
|
|
64
|
-
argTypes: {
|
|
65
|
-
alt: {
|
|
66
|
-
control: 'text',
|
|
67
|
-
table: {
|
|
68
|
-
defaultValue: { summary: 'None' },
|
|
69
|
-
type: { summary: 'string' },
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
height: {
|
|
73
|
-
control: 'text',
|
|
74
|
-
table: {
|
|
75
|
-
defaultValue: { summary: 'None' },
|
|
76
|
-
type: { summary: 'string' },
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
isLazy: argTypeBooleanUnrequired,
|
|
80
|
-
objectFit: {
|
|
81
|
-
...formatArgType({ OBJECT_FIT_OPTIONS }),
|
|
82
|
-
table: {
|
|
83
|
-
defaultValue: { summary: 'None' },
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
sources: {
|
|
87
|
-
control: 'object',
|
|
88
|
-
isCustom: true,
|
|
89
|
-
table: {
|
|
90
|
-
defaultValue: { summary: 'None' },
|
|
91
|
-
type: { summary: 'Source[]' },
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
src: {
|
|
95
|
-
control: 'text',
|
|
96
|
-
table: {
|
|
97
|
-
defaultValue: { summary: 'None' },
|
|
98
|
-
type: { summary: 'string' },
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
width: {
|
|
102
|
-
control: 'text',
|
|
103
|
-
table: {
|
|
104
|
-
defaultValue: { summary: 'None' },
|
|
105
|
-
type: { summary: 'string' },
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
args: {
|
|
110
|
-
alt: '',
|
|
111
|
-
height: '',
|
|
112
|
-
isLazy: undefined,
|
|
113
|
-
objectFit: undefined,
|
|
114
|
-
sources,
|
|
115
|
-
src: 'https://placedog.net/375/400',
|
|
116
|
-
width: '',
|
|
117
|
-
},
|
|
118
|
-
component: TideImage,
|
|
119
|
-
parameters,
|
|
120
|
-
tags: ['autodocs'],
|
|
121
|
-
title: 'Components/TideImage',
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
export const Demo = {};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import TideImageBackground from '@/components/TideImageBackground.vue';
|
|
2
|
-
import { MEDIA } from '@/types/Breakpoint';
|
|
3
|
-
import { CSS } from '@/types/Styles';
|
|
4
|
-
import { argTypeBooleanUnrequired } from '@/utilities/storybook';
|
|
5
|
-
|
|
6
|
-
import type { Source } from '@/types/Source';
|
|
7
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
8
|
-
|
|
9
|
-
type Args = InstanceType<typeof TideImageBackground>['$props'];
|
|
10
|
-
|
|
11
|
-
const formatSnippet = (_code: string, context: StoryContext) => {
|
|
12
|
-
const { args } = context;
|
|
13
|
-
const argsWithValues: string[] = [`alt="${args.alt}"`];
|
|
14
|
-
const hasSources = args.sources !== null;
|
|
15
|
-
const hasSourcesLength = hasSources ? (args.sources as any).length > 0 : false;
|
|
16
|
-
|
|
17
|
-
if (args.isLazy !== undefined) argsWithValues.push(`:is-lazy="${args.isLazy}"`);
|
|
18
|
-
if (hasSources && hasSourcesLength) argsWithValues.push(`:sources="sources"`);
|
|
19
|
-
if (args.src) argsWithValues.push(`:src="${args.src}"`);
|
|
20
|
-
|
|
21
|
-
return `<TideImageBackground ${argsWithValues.join(' ')} />`;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const parameters = {
|
|
25
|
-
docs: {
|
|
26
|
-
source: {
|
|
27
|
-
format: 'vue',
|
|
28
|
-
language: 'html',
|
|
29
|
-
transform: formatSnippet,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const render = (args: Args) => ({
|
|
35
|
-
components: { TideImageBackground },
|
|
36
|
-
setup() {
|
|
37
|
-
return { args };
|
|
38
|
-
},
|
|
39
|
-
template: `
|
|
40
|
-
<TideImageBackground v-bind="args">
|
|
41
|
-
<div class="${[CSS.PADDING.FULL.FOUR, CSS.FONT.ROLE.HEADLINE_2].join(' ')}">
|
|
42
|
-
{{ args.default }}
|
|
43
|
-
</div>
|
|
44
|
-
</TideImageBackground>
|
|
45
|
-
`,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const sources: Source[] = [
|
|
49
|
-
{
|
|
50
|
-
media: MEDIA.XL,
|
|
51
|
-
srcset: 'https://placedog.net/1919/400',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
media: MEDIA.LG,
|
|
55
|
-
srcset: 'https://placedog.net/1231/400',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
media: MEDIA.MD,
|
|
59
|
-
srcset: 'https://placedog.net/991/400',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
media: MEDIA.SM,
|
|
63
|
-
srcset: 'https://placedog.net/767/400',
|
|
64
|
-
},
|
|
65
|
-
];
|
|
66
|
-
|
|
67
|
-
export default {
|
|
68
|
-
argTypes: {
|
|
69
|
-
alt: {
|
|
70
|
-
control: 'text',
|
|
71
|
-
table: {
|
|
72
|
-
defaultValue: { summary: 'None' },
|
|
73
|
-
type: { summary: 'string' },
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
default: {
|
|
77
|
-
control: 'text',
|
|
78
|
-
description: 'Content exposed when expanded',
|
|
79
|
-
table: {
|
|
80
|
-
defaultValue: { summary: 'None' },
|
|
81
|
-
type: { summary: 'HTML' },
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
isLazy: argTypeBooleanUnrequired,
|
|
85
|
-
sources: {
|
|
86
|
-
control: 'object',
|
|
87
|
-
table: {
|
|
88
|
-
defaultValue: { summary: 'None' },
|
|
89
|
-
type: { summary: 'Source[]' },
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
src: {
|
|
93
|
-
control: 'text',
|
|
94
|
-
table: {
|
|
95
|
-
defaultValue: { summary: 'None' },
|
|
96
|
-
type: { summary: 'string' },
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
args: {
|
|
101
|
-
alt: '',
|
|
102
|
-
default: 'Lorem Ipsum',
|
|
103
|
-
isLazy: undefined,
|
|
104
|
-
sources,
|
|
105
|
-
src: 'https://placedog.net/375/400',
|
|
106
|
-
},
|
|
107
|
-
component: TideImageBackground,
|
|
108
|
-
parameters,
|
|
109
|
-
render,
|
|
110
|
-
tags: ['autodocs'],
|
|
111
|
-
title: 'Components/TideImageBackground',
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export const Demo = {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import TideIndicator from '@/components/TideIndicator.vue';
|
|
2
|
-
import { parameters } from '@/utilities/storybook';
|
|
3
|
-
|
|
4
|
-
type Args = InstanceType<typeof TideIndicator>['$props'];
|
|
5
|
-
|
|
6
|
-
const render = (args: Args) => ({
|
|
7
|
-
components: { TideIndicator },
|
|
8
|
-
setup: () => ({ args }),
|
|
9
|
-
template: `<TideIndicator v-bind="args" />`,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
argTypes: {
|
|
14
|
-
label: {
|
|
15
|
-
control: 'text',
|
|
16
|
-
table: {
|
|
17
|
-
defaultValue: { summary: 'None' },
|
|
18
|
-
type: { summary: 'text' },
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
args: {
|
|
23
|
-
label: '',
|
|
24
|
-
},
|
|
25
|
-
component: TideIndicator,
|
|
26
|
-
parameters,
|
|
27
|
-
render,
|
|
28
|
-
tags: ['autodocs'],
|
|
29
|
-
title: 'Components/TideIndicator',
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const Demo = {};
|