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,109 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
|
|
3
|
-
import TideButtonIcon from '@/components/TideButtonIcon.vue';
|
|
4
|
-
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
5
|
-
import { ICON } from '@/types/Icon';
|
|
6
|
-
import * as STANDARD_PRIORITY from '@/types/Priority';
|
|
7
|
-
import * as STANDARD_TYPE_BUTTON from '@/types/Type';
|
|
8
|
-
import {
|
|
9
|
-
argTypeBooleanUnrequired,
|
|
10
|
-
click,
|
|
11
|
-
dataTrack,
|
|
12
|
-
doSomething,
|
|
13
|
-
formatArgType,
|
|
14
|
-
parameters,
|
|
15
|
-
prependNoneAsUndefined,
|
|
16
|
-
} from '@/utilities/storybook';
|
|
17
|
-
|
|
18
|
-
type Args = InstanceType<typeof TideButtonIcon>['$props'] & {
|
|
19
|
-
click: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
23
|
-
const PRIORITY = prependNoneAsUndefined(STANDARD_PRIORITY.PRIORITY);
|
|
24
|
-
const BUTTON_TYPE = prependNoneAsUndefined(STANDARD_TYPE_BUTTON.BUTTON_TYPE);
|
|
25
|
-
|
|
26
|
-
const render = (args: Args) => ({
|
|
27
|
-
components: { TideButtonIcon },
|
|
28
|
-
methods: {
|
|
29
|
-
doSomething,
|
|
30
|
-
handleClick: () => {
|
|
31
|
-
action('TideButtonIcon clicked')({});
|
|
32
|
-
|
|
33
|
-
try {
|
|
34
|
-
const callback = eval(args.click);
|
|
35
|
-
|
|
36
|
-
if (callback) {
|
|
37
|
-
callback();
|
|
38
|
-
}
|
|
39
|
-
} catch {
|
|
40
|
-
alert('Please specify a valid handler in the "click" control.');
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
setup: () => ({ args }),
|
|
45
|
-
template: '<TideButtonIcon @click="handleClick" v-bind="args" />',
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export default {
|
|
49
|
-
argTypes: {
|
|
50
|
-
click: {
|
|
51
|
-
...click,
|
|
52
|
-
if: { arg: 'element', neq: ELEMENT.LINK },
|
|
53
|
-
},
|
|
54
|
-
dataTrack,
|
|
55
|
-
disabled: {
|
|
56
|
-
...argTypeBooleanUnrequired,
|
|
57
|
-
if: { arg: 'element', neq: ELEMENT.LINK },
|
|
58
|
-
},
|
|
59
|
-
element: {
|
|
60
|
-
...formatArgType({ ELEMENT }),
|
|
61
|
-
table: {
|
|
62
|
-
defaultValue: { summary: 'BUTTON' },
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
href: {
|
|
66
|
-
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
67
|
-
table: {
|
|
68
|
-
defaultValue: { summary: 'None' },
|
|
69
|
-
type: { summary: 'string' },
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
icon: {
|
|
73
|
-
...formatArgType({ ICON }),
|
|
74
|
-
},
|
|
75
|
-
isNewTab: {
|
|
76
|
-
...argTypeBooleanUnrequired,
|
|
77
|
-
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
78
|
-
},
|
|
79
|
-
priority: {
|
|
80
|
-
...formatArgType({ PRIORITY }),
|
|
81
|
-
table: {
|
|
82
|
-
defaultValue: { summary: 'PRIMARY' },
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
type: {
|
|
86
|
-
...formatArgType({ BUTTON_TYPE }),
|
|
87
|
-
table: {
|
|
88
|
-
defaultValue: { summary: 'BUTTON' },
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
args: {
|
|
93
|
-
click: 'doSomething',
|
|
94
|
-
dataTrack: '',
|
|
95
|
-
disabled: undefined,
|
|
96
|
-
element: undefined,
|
|
97
|
-
href: 'https://www.sample.com',
|
|
98
|
-
icon: ICON.MAIL,
|
|
99
|
-
isNewTab: undefined,
|
|
100
|
-
priority: undefined,
|
|
101
|
-
},
|
|
102
|
-
component: TideButtonIcon,
|
|
103
|
-
parameters,
|
|
104
|
-
render,
|
|
105
|
-
tags: ['autodocs'],
|
|
106
|
-
title: 'Components/TideButtonIcon',
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export const Demo = {};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
|
|
3
|
-
import TideButtonPagination from '@/components/TideButtonPagination.vue';
|
|
4
|
-
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
5
|
-
import {
|
|
6
|
-
argTypeBooleanUnrequired,
|
|
7
|
-
click,
|
|
8
|
-
dataTrack,
|
|
9
|
-
doSomething,
|
|
10
|
-
formatArgType,
|
|
11
|
-
parameters,
|
|
12
|
-
prependNoneAsUndefined,
|
|
13
|
-
} from '@/utilities/storybook';
|
|
14
|
-
|
|
15
|
-
type Args = InstanceType<typeof TideButtonPagination>['$props'] & {
|
|
16
|
-
click: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const ELEMENT_BROAD = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT_BROAD);
|
|
20
|
-
|
|
21
|
-
const render = (args: Args) => ({
|
|
22
|
-
components: { TideButtonPagination },
|
|
23
|
-
methods: {
|
|
24
|
-
doSomething,
|
|
25
|
-
handleClick: () => {
|
|
26
|
-
action('TideButtonPagination clicked')({});
|
|
27
|
-
|
|
28
|
-
try {
|
|
29
|
-
const callback = eval(args.click);
|
|
30
|
-
|
|
31
|
-
if (callback) {
|
|
32
|
-
callback();
|
|
33
|
-
}
|
|
34
|
-
} catch {
|
|
35
|
-
alert('Please specify a valid handler in the "click" control.');
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
setup: () => ({ args }),
|
|
40
|
-
template: `<TideButtonPagination @click="handleClick" v-bind="args" />`,
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
argTypes: {
|
|
45
|
-
click: {
|
|
46
|
-
...click,
|
|
47
|
-
if: { arg: 'element', neq: ELEMENT_BROAD.LINK },
|
|
48
|
-
},
|
|
49
|
-
dataTrack,
|
|
50
|
-
disabled: {
|
|
51
|
-
...argTypeBooleanUnrequired,
|
|
52
|
-
if: {
|
|
53
|
-
arg: 'element',
|
|
54
|
-
eq: ELEMENT_BROAD.BUTTON,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
element: {
|
|
58
|
-
...formatArgType({ ELEMENT_BROAD }),
|
|
59
|
-
table: {
|
|
60
|
-
defaultValue: { summary: 'BUTTON' },
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
href: {
|
|
64
|
-
if: { arg: 'element', eq: ELEMENT_BROAD.LINK },
|
|
65
|
-
table: {
|
|
66
|
-
defaultValue: { summary: 'None' },
|
|
67
|
-
type: { summary: 'string' },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
isNewTab: {
|
|
71
|
-
...argTypeBooleanUnrequired,
|
|
72
|
-
description: 'Determines whether to target a new browser tab<br />(Link only)',
|
|
73
|
-
if: { arg: 'element', eq: ELEMENT_BROAD.LINK },
|
|
74
|
-
},
|
|
75
|
-
label: {
|
|
76
|
-
control: 'text',
|
|
77
|
-
table: {
|
|
78
|
-
defaultValue: { summary: 'None' },
|
|
79
|
-
type: { summary: 'string' },
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
args: {
|
|
84
|
-
click: 'doSomething',
|
|
85
|
-
dataTrack: '',
|
|
86
|
-
disabled: undefined,
|
|
87
|
-
element: undefined,
|
|
88
|
-
href: 'https://www.sample.com',
|
|
89
|
-
isNewTab: undefined,
|
|
90
|
-
label: '1',
|
|
91
|
-
},
|
|
92
|
-
component: TideButtonPagination,
|
|
93
|
-
parameters,
|
|
94
|
-
render,
|
|
95
|
-
tags: ['autodocs'],
|
|
96
|
-
title: 'Components/TideButtonPagination',
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const Demo = {};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ref, watch } from 'vue';
|
|
2
|
-
|
|
3
|
-
import TideButtonSave from '@/components/TideButtonSave.vue';
|
|
4
|
-
import { dataTrack, doSomething, parameters } from '@/utilities/storybook';
|
|
5
|
-
|
|
6
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
7
|
-
|
|
8
|
-
type Args = InstanceType<typeof TideButtonSave>['$props'] & {
|
|
9
|
-
vModel: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const render = (args: Args, context: StoryContext) => ({
|
|
13
|
-
components: { TideButtonSave },
|
|
14
|
-
methods: {
|
|
15
|
-
doSomething,
|
|
16
|
-
handleIsSavedChange: (value: boolean) => {
|
|
17
|
-
context.updateArgs({ ...args, vModel: value });
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
setup: () => {
|
|
21
|
-
const isSaved = ref(args.vModel);
|
|
22
|
-
|
|
23
|
-
watch(
|
|
24
|
-
() => args.vModel,
|
|
25
|
-
(newValue) => {
|
|
26
|
-
isSaved.value = newValue;
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
args,
|
|
32
|
-
isSaved,
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
template: `<TideButtonSave v-bind="args" v-model="isSaved" @update:modelValue="handleIsSavedChange" />`,
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export default {
|
|
39
|
-
argTypes: {
|
|
40
|
-
dataTrack,
|
|
41
|
-
vModel: {
|
|
42
|
-
control: 'boolean',
|
|
43
|
-
description: 'Data binding to Vue ref',
|
|
44
|
-
table: {
|
|
45
|
-
category: 'Native',
|
|
46
|
-
defaultValue: { summary: 'None' },
|
|
47
|
-
type: { summary: 'Ref<boolean>' },
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
args: {
|
|
52
|
-
dataTrack: '',
|
|
53
|
-
vModel: false,
|
|
54
|
-
},
|
|
55
|
-
component: TideButtonSave,
|
|
56
|
-
parameters,
|
|
57
|
-
render,
|
|
58
|
-
tags: ['autodocs'],
|
|
59
|
-
title: 'Components/TideButtonSave',
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const Demo = {};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { ref, watch } from 'vue';
|
|
2
|
-
|
|
3
|
-
import TideButtonSegmented from '@/components/TideButtonSegmented.vue';
|
|
4
|
-
import { doSomething, getLabelsFromOptions, parameters } from '@/utilities/storybook';
|
|
5
|
-
|
|
6
|
-
import type { Tab } from '@/types/Tab';
|
|
7
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
8
|
-
|
|
9
|
-
type Args = InstanceType<typeof TideButtonSegmented>['$props'] & {
|
|
10
|
-
vModel: number;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const options = {
|
|
14
|
-
'None': undefined,
|
|
15
|
-
'Tab 1': 0,
|
|
16
|
-
'Tab 2': 1,
|
|
17
|
-
'Tab 3': 2,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const tabs: Tab[] = [
|
|
21
|
-
{
|
|
22
|
-
dataTrack: 'Tab 0 Selected',
|
|
23
|
-
label: 'First Tab',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
dataTrack: 'Tab 1 Selected',
|
|
27
|
-
label: 'Second Tab',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
dataTrack: 'Tab 2 Selected',
|
|
31
|
-
label: 'Third Tab',
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
const render = (args: Args, context: StoryContext) => ({
|
|
36
|
-
components: { TideButtonSegmented },
|
|
37
|
-
methods: {
|
|
38
|
-
doSomething,
|
|
39
|
-
handleIndexChange: (value: number) => {
|
|
40
|
-
context.updateArgs({ ...args, vModel: value });
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
setup: () => {
|
|
44
|
-
const currentIndex = ref(args.vModel);
|
|
45
|
-
|
|
46
|
-
watch(currentIndex, () => {
|
|
47
|
-
args.vModel = currentIndex.value;
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
watch(
|
|
51
|
-
() => args.vModel,
|
|
52
|
-
(newValue) => {
|
|
53
|
-
currentIndex.value = newValue;
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
args,
|
|
59
|
-
currentIndex,
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
template: '<TideButtonSegmented v-bind="args" v-model="currentIndex" @update:modelValue="handleIndexChange" />',
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
export default {
|
|
66
|
-
argTypes: {
|
|
67
|
-
activeTab: {
|
|
68
|
-
control: {
|
|
69
|
-
labels: getLabelsFromOptions(options),
|
|
70
|
-
type: 'select',
|
|
71
|
-
},
|
|
72
|
-
description: 'Determines which tab should be active',
|
|
73
|
-
isDynamic: true,
|
|
74
|
-
options: Object.values(options),
|
|
75
|
-
table: {
|
|
76
|
-
defaultValue: { summary: 'None' },
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
tabs: {
|
|
80
|
-
control: 'object',
|
|
81
|
-
isCustom: true,
|
|
82
|
-
table: {
|
|
83
|
-
defaultValue: { summary: 'None' },
|
|
84
|
-
type: { summary: 'Tab[]' },
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
vModel: {
|
|
88
|
-
control: 'number',
|
|
89
|
-
description: 'Data binding to Vue ref',
|
|
90
|
-
table: {
|
|
91
|
-
category: 'Native',
|
|
92
|
-
defaultValue: { summary: 'None' },
|
|
93
|
-
type: { summary: 'Ref<number>' },
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
args: {
|
|
98
|
-
activeTab: undefined,
|
|
99
|
-
handleChange: 'doSomething',
|
|
100
|
-
tabs,
|
|
101
|
-
vModel: 0,
|
|
102
|
-
},
|
|
103
|
-
component: TideButtonSegmented,
|
|
104
|
-
parameters,
|
|
105
|
-
render,
|
|
106
|
-
tags: ['autodocs'],
|
|
107
|
-
title: 'Components/TideButtonSegmented',
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const Demo = {};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
|
|
3
|
-
import TideCard from '@/components/TideCard.vue';
|
|
4
|
-
import { TYPE_CARD as STANDARD_TYPE_CARD } from '@/types/Card';
|
|
5
|
-
import { ICON } from '@/types/Icon';
|
|
6
|
-
import {
|
|
7
|
-
argTypeBooleanUnrequired,
|
|
8
|
-
click,
|
|
9
|
-
doSomething,
|
|
10
|
-
formatArgType,
|
|
11
|
-
parameters,
|
|
12
|
-
prependNoneAsUndefined,
|
|
13
|
-
} from '@/utilities/storybook';
|
|
14
|
-
|
|
15
|
-
type Args = InstanceType<typeof TideCard>['$props'] & {
|
|
16
|
-
click: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const TYPE_CARD = prependNoneAsUndefined(STANDARD_TYPE_CARD);
|
|
20
|
-
const CARD_ICON = prependNoneAsUndefined(ICON);
|
|
21
|
-
|
|
22
|
-
const render = (args: Args) => ({
|
|
23
|
-
components: { TideCard },
|
|
24
|
-
methods: {
|
|
25
|
-
doSomething,
|
|
26
|
-
handleClick: () => {
|
|
27
|
-
action('TideCard clicked')({});
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
const callback = eval(args.click);
|
|
31
|
-
|
|
32
|
-
if (callback) {
|
|
33
|
-
callback();
|
|
34
|
-
}
|
|
35
|
-
} catch {
|
|
36
|
-
alert('Please specify a valid handler in the "click" control.');
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
setup: () => ({ args }),
|
|
41
|
-
template: `<TideCard @click="handleClick" v-bind="args" />`,
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export default {
|
|
45
|
-
argTypes: {
|
|
46
|
-
click: {
|
|
47
|
-
...click,
|
|
48
|
-
},
|
|
49
|
-
description: {
|
|
50
|
-
control: 'text',
|
|
51
|
-
table: {
|
|
52
|
-
defaultValue: { summary: 'None' },
|
|
53
|
-
type: { summary: 'string' },
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
heading: {
|
|
57
|
-
control: 'text',
|
|
58
|
-
table: {
|
|
59
|
-
defaultValue: { summary: 'None' },
|
|
60
|
-
type: { summary: 'string' },
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
href: {
|
|
64
|
-
control: 'text',
|
|
65
|
-
table: {
|
|
66
|
-
defaultValue: { summary: 'None' },
|
|
67
|
-
type: { summary: 'string' },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
icon: {
|
|
71
|
-
...formatArgType({ CARD_ICON }),
|
|
72
|
-
table: {
|
|
73
|
-
defaultValue: { summary: 'None' },
|
|
74
|
-
type: { summary: 'Icon' },
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
selected: argTypeBooleanUnrequired,
|
|
78
|
-
type: {
|
|
79
|
-
...formatArgType({ TYPE_CARD }),
|
|
80
|
-
table: {
|
|
81
|
-
defaultValue: { summary: 'INFORMATIONAL' },
|
|
82
|
-
type: { summary: 'CardType' },
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
args: {
|
|
87
|
-
click: 'doSomething',
|
|
88
|
-
description: '',
|
|
89
|
-
heading: 'Demo',
|
|
90
|
-
href: '',
|
|
91
|
-
icon: CARD_ICON.None,
|
|
92
|
-
selected: undefined,
|
|
93
|
-
type: TYPE_CARD.None,
|
|
94
|
-
},
|
|
95
|
-
component: TideCard,
|
|
96
|
-
parameters,
|
|
97
|
-
render,
|
|
98
|
-
tags: ['autodocs'],
|
|
99
|
-
title: 'Components/TideCard',
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const Demo = {};
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import { computed } from 'vue';
|
|
3
|
-
|
|
4
|
-
import TideCard from '@/components/TideCard.vue';
|
|
5
|
-
import TideCarousel from '@/components/TideCarousel.vue';
|
|
6
|
-
import { argTypeBooleanUnrequired, disabledArgType, doSomething, lineBreak, tab } from '@/utilities/storybook';
|
|
7
|
-
|
|
8
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
9
|
-
|
|
10
|
-
type Args = InstanceType<typeof TideCarousel>['$props'] & {
|
|
11
|
-
handleSlidesAddedToView: string;
|
|
12
|
-
isFullWidthCards: boolean | undefined;
|
|
13
|
-
maxDots: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
17
|
-
const { args } = context;
|
|
18
|
-
|
|
19
|
-
const argsWithValues: string[] = [];
|
|
20
|
-
|
|
21
|
-
if (args.hasDots !== undefined) argsWithValues.push(`has-dots="${args.hasDots}"`);
|
|
22
|
-
if (args.isFloating !== undefined) argsWithValues.push(`:is-floating="${args.isFloating}"`);
|
|
23
|
-
if (args.isHideawayButtons !== undefined) argsWithValues.push(`:is-hideaway-buttons="${args.isHideawayButtons}"`);
|
|
24
|
-
if (args.isScrollByPage !== undefined) argsWithValues.push(`:is-scroll-by-page="false"`);
|
|
25
|
-
if (args.maxDots !== '') argsWithValues.push(`max-dots="${args.maxDots}"`);
|
|
26
|
-
if (args.subtitle !== '') argsWithValues.push(`subtitle="${args.subtitle}"`);
|
|
27
|
-
if (args.title !== '') argsWithValues.push(`title="${args.title}"`);
|
|
28
|
-
if (args.handleSlidesAddedToView) argsWithValues.push(`@slides-added-to-view="${args.handleSlidesAddedToView}"`);
|
|
29
|
-
|
|
30
|
-
const slotContentMisc = args.misc === '' ? '' : `${tab}<template #misc>${args.misc}</template>${lineBreak}`;
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
// prettier-ignore
|
|
34
|
-
`<TideCarousel ${argsWithValues.join(' ')}>` + lineBreak +
|
|
35
|
-
slotContentMisc + tab +
|
|
36
|
-
`<li class="tide-shrink-none${args.isFullWidthCards ? ' tide-width-full' : ''}" v-for="(_child, index) in new Array(12)">` + lineBreak + tab + tab +
|
|
37
|
-
args.default + lineBreak + tab +
|
|
38
|
-
`</li>` + lineBreak +
|
|
39
|
-
`</TideCarousel>`
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const parameters = {
|
|
44
|
-
docs: {
|
|
45
|
-
source: {
|
|
46
|
-
format: 'vue',
|
|
47
|
-
language: 'html',
|
|
48
|
-
transform: formatSnippet,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const render = (args: Args) => ({
|
|
54
|
-
components: { TideCard, TideCarousel },
|
|
55
|
-
methods: {
|
|
56
|
-
doSomething,
|
|
57
|
-
handleSlidesAddedToView: (slides: number[]) => {
|
|
58
|
-
action(`Slides added to view`)(slides);
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
const callback = eval(args.handleSlidesAddedToView);
|
|
62
|
-
|
|
63
|
-
if (callback) {
|
|
64
|
-
callback();
|
|
65
|
-
}
|
|
66
|
-
} catch {
|
|
67
|
-
alert('Please specify a valid handler in the "slidesAddedToView" control.');
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
setup: () => {
|
|
72
|
-
const conditionalFullWidth = computed(() => (args.isFullWidthCards ? ' tide-width-full' : ''));
|
|
73
|
-
const argsFormatted = computed(() => ({
|
|
74
|
-
...args,
|
|
75
|
-
maxDots: args.maxDots === '' ? undefined : args.maxDots,
|
|
76
|
-
}));
|
|
77
|
-
|
|
78
|
-
return {
|
|
79
|
-
argsFormatted,
|
|
80
|
-
conditionalFullWidth,
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
// prettier-ignore
|
|
84
|
-
template:
|
|
85
|
-
`<TideCarousel
|
|
86
|
-
@slides-added-to-view="handleSlidesAddedToView"
|
|
87
|
-
v-bind="argsFormatted"
|
|
88
|
-
:key="argsFormatted.isFullWidthCards"
|
|
89
|
-
>
|
|
90
|
-
<template #misc>{{ argsFormatted.misc }}</template>
|
|
91
|
-
<li
|
|
92
|
-
:class="['tide-shrink-none tide-border-1 sb-border-blue tide-padding-1 sb-bg-blue-light', conditionalFullWidth]"
|
|
93
|
-
v-for="(_child, index) in new Array(12)"
|
|
94
|
-
>
|
|
95
|
-
{{ argsFormatted.default.replace('#', index) }}
|
|
96
|
-
</li>
|
|
97
|
-
</TideCarousel>`,
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
export default {
|
|
101
|
-
argTypes: {
|
|
102
|
-
default: {
|
|
103
|
-
control: 'text',
|
|
104
|
-
description: 'Dynamic card content',
|
|
105
|
-
table: {
|
|
106
|
-
defaultValue: { summary: 'None' },
|
|
107
|
-
type: { summary: 'HTML' },
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
handleSlidesAddedToView: {
|
|
111
|
-
control: 'text',
|
|
112
|
-
description: 'JS code or function to execute on slidesAddedToView event',
|
|
113
|
-
isEmit: true,
|
|
114
|
-
name: 'slidesAddedToView',
|
|
115
|
-
table: {
|
|
116
|
-
category: 'Events',
|
|
117
|
-
defaultValue: { summary: 'None' },
|
|
118
|
-
type: { summary: '(slides: number[]) => void' },
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
hasDots: {
|
|
122
|
-
...argTypeBooleanUnrequired,
|
|
123
|
-
table: {
|
|
124
|
-
defaultValue: { summary: 'False' },
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
isFloating: {
|
|
128
|
-
...argTypeBooleanUnrequired,
|
|
129
|
-
table: {
|
|
130
|
-
defaultValue: { summary: 'False' },
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
isFullWidthCards: {
|
|
134
|
-
...argTypeBooleanUnrequired,
|
|
135
|
-
description: 'Preview 1 card per page implementation',
|
|
136
|
-
table: {
|
|
137
|
-
category: 'Demo',
|
|
138
|
-
defaultValue: { summary: 'None' },
|
|
139
|
-
disable: true,
|
|
140
|
-
type: { summary: 'boolean' },
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
isHeadline1: {
|
|
144
|
-
...argTypeBooleanUnrequired,
|
|
145
|
-
table: {
|
|
146
|
-
defaultValue: { summary: 'False' },
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
isHideawayButtons: {
|
|
150
|
-
...argTypeBooleanUnrequired,
|
|
151
|
-
if: { arg: 'isFloating', eq: true },
|
|
152
|
-
table: {
|
|
153
|
-
defaultValue: { summary: 'True' },
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
isScrollByPage: disabledArgType,
|
|
157
|
-
maxDots: {
|
|
158
|
-
control: 'text',
|
|
159
|
-
if: { arg: 'hasDots', eq: true },
|
|
160
|
-
table: {
|
|
161
|
-
defaultValue: { summary: 'None' },
|
|
162
|
-
type: { summary: 'number' },
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
misc: {
|
|
166
|
-
control: 'text',
|
|
167
|
-
description: 'Content to display between the title/buttons and carousel content',
|
|
168
|
-
table: {
|
|
169
|
-
defaultValue: { summary: 'None' },
|
|
170
|
-
type: { summary: 'HTML' },
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
slidesAddedToView: disabledArgType,
|
|
174
|
-
subtitle: {
|
|
175
|
-
control: 'text',
|
|
176
|
-
if: { arg: 'isFloating', neq: true },
|
|
177
|
-
table: {
|
|
178
|
-
defaultValue: { summary: 'None' },
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
title: {
|
|
182
|
-
control: 'text',
|
|
183
|
-
if: { arg: 'isFloating', neq: true },
|
|
184
|
-
table: {
|
|
185
|
-
defaultValue: { summary: 'None' },
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
args: {
|
|
190
|
-
default: 'Card #',
|
|
191
|
-
handleSlidesAddedToView: 'doSomething',
|
|
192
|
-
hasDots: undefined,
|
|
193
|
-
isFloating: undefined,
|
|
194
|
-
isFullWidthCards: undefined,
|
|
195
|
-
isHideawayButtons: undefined,
|
|
196
|
-
maxDots: '',
|
|
197
|
-
misc: '',
|
|
198
|
-
subtitle: '',
|
|
199
|
-
title: 'Demo',
|
|
200
|
-
},
|
|
201
|
-
component: TideCarousel,
|
|
202
|
-
parameters,
|
|
203
|
-
render,
|
|
204
|
-
tags: ['autodocs'],
|
|
205
|
-
title: 'Components/TideCarousel',
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
export const Demo = {
|
|
209
|
-
name: 'Default',
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
export const FullWidth = {
|
|
213
|
-
args: {
|
|
214
|
-
default: 'Full-width card #',
|
|
215
|
-
isFullWidthCards: true,
|
|
216
|
-
title: 'Demo',
|
|
217
|
-
},
|
|
218
|
-
name: 'Full-width cards ',
|
|
219
|
-
};
|