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,156 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
|
|
3
|
-
import TideInputTextarea from '@/components/TideInputTextarea.vue';
|
|
4
|
-
import * as STANDARD_ERROR_DISPLAY from '@/types/Validation';
|
|
5
|
-
import { VALIDATOR } from '@/types/Validation';
|
|
6
|
-
import {
|
|
7
|
-
argTypeBooleanUnrequired,
|
|
8
|
-
dataTrack,
|
|
9
|
-
disabledArgType,
|
|
10
|
-
doSomething,
|
|
11
|
-
formatArgType,
|
|
12
|
-
formatArgTypeCheck,
|
|
13
|
-
parameters,
|
|
14
|
-
prependNoneAsUndefined,
|
|
15
|
-
} from '@/utilities/storybook';
|
|
16
|
-
|
|
17
|
-
type Args = InstanceType<typeof TideInputTextarea>['$props'] & {
|
|
18
|
-
handleValid: string;
|
|
19
|
-
vModel: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const ERROR_DISPLAY = prependNoneAsUndefined(STANDARD_ERROR_DISPLAY.ERROR_DISPLAY);
|
|
23
|
-
|
|
24
|
-
const render = (args: Args) => ({
|
|
25
|
-
components: { TideInputTextarea },
|
|
26
|
-
methods: {
|
|
27
|
-
doSomething,
|
|
28
|
-
handleValid: () => {
|
|
29
|
-
action('TideInputText valid was emitted')({});
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
const callback = eval(args.handleValid);
|
|
33
|
-
|
|
34
|
-
if (callback) {
|
|
35
|
-
callback();
|
|
36
|
-
}
|
|
37
|
-
} catch {
|
|
38
|
-
alert('Please specify a valid handler in the "valid" control.');
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
setup: () => ({ args }),
|
|
43
|
-
template: `<TideInputTextarea @valid="handleValid" v-bind="args" />`,
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export default {
|
|
47
|
-
argTypes: {
|
|
48
|
-
dataTrack,
|
|
49
|
-
error: {
|
|
50
|
-
control: 'text',
|
|
51
|
-
table: {
|
|
52
|
-
defaultValue: { summary: 'None' },
|
|
53
|
-
type: { summary: 'string' },
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
errorDisplay: {
|
|
57
|
-
...formatArgType({ ERROR_DISPLAY }),
|
|
58
|
-
},
|
|
59
|
-
handleValid: {
|
|
60
|
-
control: 'text',
|
|
61
|
-
description: 'JS code or function to execute on valid event',
|
|
62
|
-
isEmit: true,
|
|
63
|
-
name: 'valid',
|
|
64
|
-
table: {
|
|
65
|
-
category: 'Events',
|
|
66
|
-
defaultValue: { summary: 'None' },
|
|
67
|
-
type: { summary: '(isValid: boolean) => void' },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
inputId: {
|
|
71
|
-
control: 'text',
|
|
72
|
-
table: {
|
|
73
|
-
defaultValue: { summary: 'None' },
|
|
74
|
-
type: { summary: 'string' },
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
label: {
|
|
78
|
-
control: 'text',
|
|
79
|
-
table: {
|
|
80
|
-
defaultValue: { summary: 'None' },
|
|
81
|
-
type: { summary: 'string' },
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
maxlength: {
|
|
85
|
-
control: 'text',
|
|
86
|
-
table: {
|
|
87
|
-
defaultValue: { summary: 'None' },
|
|
88
|
-
type: { summary: 'number' },
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
minlength: {
|
|
92
|
-
control: 'text',
|
|
93
|
-
table: {
|
|
94
|
-
defaultValue: { summary: 'None' },
|
|
95
|
-
type: { summary: 'number' },
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
name: {
|
|
99
|
-
control: 'text',
|
|
100
|
-
table: {
|
|
101
|
-
defaultValue: { summary: 'None' },
|
|
102
|
-
type: { summary: 'string' },
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
required: argTypeBooleanUnrequired,
|
|
106
|
-
rows: {
|
|
107
|
-
control: 'text',
|
|
108
|
-
table: {
|
|
109
|
-
defaultValue: { summary: 'None' },
|
|
110
|
-
type: { summary: 'number' },
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
supportingText: {
|
|
114
|
-
control: 'text',
|
|
115
|
-
table: {
|
|
116
|
-
defaultValue: { summary: 'None' },
|
|
117
|
-
type: { summary: 'string' },
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
vModel: {
|
|
121
|
-
control: 'text',
|
|
122
|
-
description: 'Data binding to Vue ref',
|
|
123
|
-
table: {
|
|
124
|
-
category: 'Native',
|
|
125
|
-
defaultValue: { summary: 'None' },
|
|
126
|
-
type: { summary: 'Ref' },
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
valid: disabledArgType,
|
|
130
|
-
validators: {
|
|
131
|
-
...formatArgTypeCheck({ VALIDATOR }),
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
args: {
|
|
135
|
-
dataTrack: '',
|
|
136
|
-
error: '',
|
|
137
|
-
errorDisplay: undefined,
|
|
138
|
-
handleValid: 'doSomething',
|
|
139
|
-
inputId: '',
|
|
140
|
-
label: 'Input label',
|
|
141
|
-
maxlength: '',
|
|
142
|
-
minlength: '',
|
|
143
|
-
name: '',
|
|
144
|
-
required: undefined,
|
|
145
|
-
rows: '',
|
|
146
|
-
supportingText: '',
|
|
147
|
-
vModel: '',
|
|
148
|
-
},
|
|
149
|
-
component: TideInputTextarea,
|
|
150
|
-
parameters,
|
|
151
|
-
render,
|
|
152
|
-
tags: ['autodocs'],
|
|
153
|
-
title: 'Components/TideInputTextarea',
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export const Demo = {};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
|
|
3
|
-
import TideLink from '@/components/TideLink.vue';
|
|
4
|
-
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
5
|
-
import * as STANDARD_ICON from '@/types/Icon';
|
|
6
|
-
import {
|
|
7
|
-
argTypeBooleanUnrequired,
|
|
8
|
-
click,
|
|
9
|
-
dataTrack,
|
|
10
|
-
formatArgType,
|
|
11
|
-
formatValueAsConstant,
|
|
12
|
-
prependNoneAsUndefined,
|
|
13
|
-
} from '@/utilities/storybook';
|
|
14
|
-
|
|
15
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
16
|
-
|
|
17
|
-
type Args = InstanceType<typeof TideLink>['$props'] & {
|
|
18
|
-
click: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
22
|
-
const ICON = prependNoneAsUndefined(STANDARD_ICON.ICON);
|
|
23
|
-
|
|
24
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
25
|
-
const { args, argTypes } = context;
|
|
26
|
-
|
|
27
|
-
const argsWithValues: string[] = [];
|
|
28
|
-
const { element, iconLeading, iconTrailing } = args;
|
|
29
|
-
|
|
30
|
-
if (args.dataTrack !== '') argsWithValues.push(`:data-track="${args.dataTrack}"`);
|
|
31
|
-
if (args.element !== undefined)
|
|
32
|
-
argsWithValues.push(`:element="${formatValueAsConstant({ element: element }, argTypes)}"`);
|
|
33
|
-
if (args.href !== undefined && args.element !== ELEMENT.BUTTON) argsWithValues.push(`:href="${args.href}"`);
|
|
34
|
-
if (args.iconLeading !== undefined)
|
|
35
|
-
argsWithValues.push(`:icon-leading="${formatValueAsConstant({ iconLeading }, argTypes)}"`);
|
|
36
|
-
if (args.iconTrailing !== undefined)
|
|
37
|
-
argsWithValues.push(`:icon-trailing="${formatValueAsConstant({ iconTrailing }, argTypes)}"`);
|
|
38
|
-
if (args.isNewTab !== undefined) argsWithValues.push(`:is-new-tab="${args.isNewTab}"`);
|
|
39
|
-
if (args.label !== undefined) argsWithValues.push(`:label="${args.label}"`);
|
|
40
|
-
if (args.subtle !== undefined) argsWithValues.push(`:subtle="${args.subtle}"`);
|
|
41
|
-
if (args.click !== undefined && args.element === ELEMENT.BUTTON) argsWithValues.push(`@click="${args.click}"`);
|
|
42
|
-
|
|
43
|
-
return `<TideLink ${argsWithValues.join(' ')} />`;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const parameters = {
|
|
47
|
-
docs: {
|
|
48
|
-
source: {
|
|
49
|
-
format: 'vue',
|
|
50
|
-
language: 'html',
|
|
51
|
-
transform: formatSnippet,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const render = (args: Args) => ({
|
|
57
|
-
components: { TideLink },
|
|
58
|
-
methods: {
|
|
59
|
-
handleClick: () => {
|
|
60
|
-
if (args.element !== ELEMENT.LINK && args.click) {
|
|
61
|
-
action('TideLink clicked')({});
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
setup: () => ({ args }),
|
|
66
|
-
template: '<TideLink @click="handleClick" v-bind="args" />',
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export default {
|
|
70
|
-
argTypes: {
|
|
71
|
-
click: {
|
|
72
|
-
...click,
|
|
73
|
-
if: { arg: 'element', eq: ELEMENT.BUTTON },
|
|
74
|
-
},
|
|
75
|
-
dataTrack,
|
|
76
|
-
element: {
|
|
77
|
-
...formatArgType({ ELEMENT }),
|
|
78
|
-
table: {
|
|
79
|
-
defaultValue: { summary: 'LINK' },
|
|
80
|
-
type: { summary: 'Element' },
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
href: {
|
|
84
|
-
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
85
|
-
table: {
|
|
86
|
-
defaultValue: { summary: 'None' },
|
|
87
|
-
type: { summary: 'string' },
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
iconLeading: {
|
|
91
|
-
...formatArgType({ ICON }),
|
|
92
|
-
},
|
|
93
|
-
iconTrailing: {
|
|
94
|
-
...formatArgType({ ICON }),
|
|
95
|
-
},
|
|
96
|
-
isNewTab: {
|
|
97
|
-
...argTypeBooleanUnrequired,
|
|
98
|
-
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
99
|
-
},
|
|
100
|
-
label: {
|
|
101
|
-
control: 'text',
|
|
102
|
-
table: {
|
|
103
|
-
defaultValue: { summary: 'None' },
|
|
104
|
-
type: { summary: 'string' },
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
subtle: argTypeBooleanUnrequired,
|
|
108
|
-
},
|
|
109
|
-
args: {
|
|
110
|
-
click: 'doSomething',
|
|
111
|
-
dataTrack: '',
|
|
112
|
-
element: undefined,
|
|
113
|
-
href: '#',
|
|
114
|
-
iconLeading: undefined,
|
|
115
|
-
iconTrailing: undefined,
|
|
116
|
-
isNewTab: undefined,
|
|
117
|
-
label: 'Demo',
|
|
118
|
-
subtle: undefined,
|
|
119
|
-
},
|
|
120
|
-
component: TideLink,
|
|
121
|
-
parameters,
|
|
122
|
-
render,
|
|
123
|
-
tags: ['autodocs'],
|
|
124
|
-
title: 'Components/TideLink',
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export const Demo = {};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
|
|
3
|
-
import TideMenuItem from '@/components/TideMenuItem.vue';
|
|
4
|
-
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
5
|
-
import * as STANDARD_ICON from '@/types/Icon';
|
|
6
|
-
import {
|
|
7
|
-
argTypeBooleanUnrequired,
|
|
8
|
-
click,
|
|
9
|
-
dataTrack,
|
|
10
|
-
formatArgType,
|
|
11
|
-
formatValueAsConstant,
|
|
12
|
-
prependNoneAsUndefined,
|
|
13
|
-
} from '@/utilities/storybook';
|
|
14
|
-
|
|
15
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
16
|
-
|
|
17
|
-
type Args = InstanceType<typeof TideMenuItem>['$props'] & {
|
|
18
|
-
click: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
22
|
-
const ICON = prependNoneAsUndefined(STANDARD_ICON.ICON);
|
|
23
|
-
|
|
24
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
25
|
-
const { args, argTypes } = context;
|
|
26
|
-
|
|
27
|
-
const argsWithValues: string[] = [];
|
|
28
|
-
const { element, iconTrailing } = args;
|
|
29
|
-
|
|
30
|
-
if (args.dataTrack !== '') argsWithValues.push(`data-track="${args.dataTrack}"`);
|
|
31
|
-
if (args.element !== undefined)
|
|
32
|
-
argsWithValues.push(`:element="${formatValueAsConstant({ element: element }, argTypes)}"`);
|
|
33
|
-
if (args.href !== undefined && args.element !== ELEMENT.BUTTON) argsWithValues.push(`href="${args.href}"`);
|
|
34
|
-
if (args.iconTrailing !== undefined)
|
|
35
|
-
argsWithValues.push(`:icon-trailing="${formatValueAsConstant({ iconTrailing }, argTypes)}"`);
|
|
36
|
-
if (args.isNewTab !== undefined) argsWithValues.push(`:is-new-tab="${args.isNewTab}"`);
|
|
37
|
-
if (args.label !== undefined) argsWithValues.push(`label="${args.label}"`);
|
|
38
|
-
if (args.click !== undefined && args.element === ELEMENT.BUTTON) argsWithValues.push(`@click="${args.click}"`);
|
|
39
|
-
|
|
40
|
-
return `<TideMenuItem ${argsWithValues.join(' ')} />`;
|
|
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: { TideMenuItem },
|
|
55
|
-
methods: {
|
|
56
|
-
handleClick: () => {
|
|
57
|
-
if (args.element !== ELEMENT.LINK && args.click) {
|
|
58
|
-
action('TideMenuItem clicked')({});
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
setup: () => ({ args }),
|
|
63
|
-
template: '<TideMenuItem @click="handleClick" v-bind="args" />',
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
export default {
|
|
67
|
-
argTypes: {
|
|
68
|
-
click: {
|
|
69
|
-
...click,
|
|
70
|
-
if: { arg: 'element', eq: ELEMENT.BUTTON },
|
|
71
|
-
},
|
|
72
|
-
dataTrack,
|
|
73
|
-
element: {
|
|
74
|
-
...formatArgType({ ELEMENT }),
|
|
75
|
-
table: {
|
|
76
|
-
defaultValue: { summary: 'LINK' },
|
|
77
|
-
type: { summary: 'Element' },
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
href: {
|
|
81
|
-
table: {
|
|
82
|
-
defaultValue: { summary: 'None' },
|
|
83
|
-
type: { summary: 'string' },
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
iconTrailing: {
|
|
87
|
-
...formatArgType({ ICON }),
|
|
88
|
-
},
|
|
89
|
-
isNewTab: {
|
|
90
|
-
...argTypeBooleanUnrequired,
|
|
91
|
-
if: { arg: 'element', eq: ELEMENT.LINK },
|
|
92
|
-
},
|
|
93
|
-
label: {
|
|
94
|
-
control: 'text',
|
|
95
|
-
table: {
|
|
96
|
-
defaultValue: { summary: 'None' },
|
|
97
|
-
type: { summary: 'string' },
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
args: {
|
|
102
|
-
click: 'doSomething',
|
|
103
|
-
dataTrack: '',
|
|
104
|
-
element: undefined,
|
|
105
|
-
href: '#',
|
|
106
|
-
iconTrailing: undefined,
|
|
107
|
-
isNewTab: undefined,
|
|
108
|
-
label: 'Demo',
|
|
109
|
-
},
|
|
110
|
-
component: TideMenuItem,
|
|
111
|
-
parameters,
|
|
112
|
-
render,
|
|
113
|
-
tags: ['autodocs'],
|
|
114
|
-
title: 'Components/TideMenuItem',
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const Demo = {};
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import { compile, h, ref, watch } from 'vue';
|
|
3
|
-
|
|
4
|
-
import TideButton from '@/components/TideButton.vue';
|
|
5
|
-
import TideIcon from '@/components/TideIcon.vue';
|
|
6
|
-
import TideLink from '@/components/TideLink.vue';
|
|
7
|
-
import TideModal from '@/components/TideModal.vue';
|
|
8
|
-
import { ELEMENT } from '@/types/Element';
|
|
9
|
-
import { ICON } from '@/types/Icon';
|
|
10
|
-
import { PRIORITY } from '@/types/Priority';
|
|
11
|
-
import { SIZE, SIZE_BUTTON } from '@/types/Size';
|
|
12
|
-
import { CSS } from '@/types/Styles';
|
|
13
|
-
import { TARGET } from '@/types/Target';
|
|
14
|
-
import {
|
|
15
|
-
argTypeBooleanUnrequired,
|
|
16
|
-
disabledArgType,
|
|
17
|
-
doSomething,
|
|
18
|
-
doSomethingElse,
|
|
19
|
-
lineBreak,
|
|
20
|
-
tab,
|
|
21
|
-
} from '@/utilities/storybook';
|
|
22
|
-
|
|
23
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
24
|
-
|
|
25
|
-
type Args = InstanceType<typeof TideModal>['$props'] & {
|
|
26
|
-
default: string;
|
|
27
|
-
footer: string;
|
|
28
|
-
handleBack: string;
|
|
29
|
-
handleClose: string;
|
|
30
|
-
vModel: boolean;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
34
|
-
const { args } = context;
|
|
35
|
-
|
|
36
|
-
const argsWithValues: string[] = [`v-model="${args.vModel}"`];
|
|
37
|
-
const slotContentIndentationFixed = (args.default as string).replace(/(<\/[^>]+>)$/, `${tab}$1`);
|
|
38
|
-
|
|
39
|
-
if (args.isBackButton !== undefined) argsWithValues.push(`:is-back-button="${args.isBackButton}"`);
|
|
40
|
-
if (args.isDismissible !== undefined) argsWithValues.push(`:is-dismissible="${args.isDismissible}"`);
|
|
41
|
-
if (args.title !== undefined) argsWithValues.push(`title="${args.title}"`);
|
|
42
|
-
if (args.width !== '') argsWithValues.push(`width="${args.width}"`);
|
|
43
|
-
|
|
44
|
-
if (args.handleBack !== undefined) argsWithValues.push(`@back="${args.handleBack}"`);
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
`<TideModal ${argsWithValues.join(' ')}>${lineBreak}` +
|
|
48
|
-
`${tab}${slotContentIndentationFixed}${lineBreak}${lineBreak}` +
|
|
49
|
-
`${tab}<template #footer>${lineBreak}` +
|
|
50
|
-
`${tab}${tab}${args.footer}${lineBreak}` +
|
|
51
|
-
`${tab}</template>${lineBreak}` +
|
|
52
|
-
`</TideModal>`
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const parameters = {
|
|
57
|
-
docs: {
|
|
58
|
-
source: {
|
|
59
|
-
format: 'vue',
|
|
60
|
-
language: 'html',
|
|
61
|
-
transform: formatSnippet,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const render = (args: Args, context: StoryContext) => {
|
|
67
|
-
const handleBack = () => {
|
|
68
|
-
action('Back button pressed')({});
|
|
69
|
-
try {
|
|
70
|
-
const callback = eval(args.handleBack);
|
|
71
|
-
if (callback) callback();
|
|
72
|
-
} catch {
|
|
73
|
-
alert('Please specify a valid handler in the "back" control.');
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const handleOpenModalClick = () => {
|
|
78
|
-
context.updateArgs({ ...args, vModel: true });
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const handleIsOpenChange = (value: boolean) => {
|
|
82
|
-
context.updateArgs({ ...args, vModel: value });
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
components: { TideButton, TideModal },
|
|
87
|
-
methods: {
|
|
88
|
-
doSomething,
|
|
89
|
-
doSomethingElse,
|
|
90
|
-
handleBack,
|
|
91
|
-
handleIsOpenChange,
|
|
92
|
-
handleOpenModalClick,
|
|
93
|
-
},
|
|
94
|
-
render: () => {
|
|
95
|
-
const isOpen = ref(args.vModel);
|
|
96
|
-
|
|
97
|
-
watch(isOpen, () => {
|
|
98
|
-
args.vModel = isOpen.value;
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
watch(
|
|
102
|
-
() => args.vModel,
|
|
103
|
-
(newValue) => {
|
|
104
|
-
isOpen.value = newValue;
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
// Wrap compiled footer in a component with TideButton registered
|
|
109
|
-
const Footer = args.footer
|
|
110
|
-
? {
|
|
111
|
-
components: { CSS, TideButton, TideIcon, TideLink },
|
|
112
|
-
render: compile(`<div class="tide-display-flex tide-axis1-end tide-width-full">${args.footer}</div>`),
|
|
113
|
-
setup: () => ({ CSS, ELEMENT, ICON, PRIORITY, SIZE, SIZE_BUTTON, TARGET }),
|
|
114
|
-
}
|
|
115
|
-
: null;
|
|
116
|
-
|
|
117
|
-
// Render function cannot use "template" method if required to compile Vue components.
|
|
118
|
-
return h('div', [
|
|
119
|
-
h(TideButton, {
|
|
120
|
-
label: 'Open Modal',
|
|
121
|
-
onClick: handleOpenModalClick,
|
|
122
|
-
}),
|
|
123
|
-
h(
|
|
124
|
-
TideModal,
|
|
125
|
-
{
|
|
126
|
-
...args,
|
|
127
|
-
'modelValue': isOpen.value,
|
|
128
|
-
'onBack': handleBack,
|
|
129
|
-
'onUpdate:modelValue': handleIsOpenChange,
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
default: () => h('div', { innerHTML: args.default }),
|
|
133
|
-
footer: () => (Footer ? h(Footer) : null),
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
]);
|
|
137
|
-
},
|
|
138
|
-
setup: () => ({ args }),
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export default {
|
|
143
|
-
argTypes: {
|
|
144
|
-
back: disabledArgType,
|
|
145
|
-
default: {
|
|
146
|
-
control: 'text',
|
|
147
|
-
description: 'Modal content',
|
|
148
|
-
table: {
|
|
149
|
-
defaultValue: { summary: 'None' },
|
|
150
|
-
type: { summary: 'HTML' },
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
footer: {
|
|
154
|
-
control: 'text',
|
|
155
|
-
description: 'Footer content',
|
|
156
|
-
table: {
|
|
157
|
-
defaultValue: { summary: 'None' },
|
|
158
|
-
type: { summary: 'HTML, TideButton, TideLink' },
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
handleBack: {
|
|
162
|
-
control: 'text',
|
|
163
|
-
name: 'back',
|
|
164
|
-
table: {
|
|
165
|
-
category: 'Events',
|
|
166
|
-
defaultValue: { summary: 'None' },
|
|
167
|
-
type: { summary: '() => void' },
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
isBackButton: {
|
|
171
|
-
...argTypeBooleanUnrequired,
|
|
172
|
-
table: {
|
|
173
|
-
defaultValue: { summary: 'False' },
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
isDismissible: {
|
|
177
|
-
...argTypeBooleanUnrequired,
|
|
178
|
-
table: {
|
|
179
|
-
defaultValue: { summary: 'False' },
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
title: {
|
|
183
|
-
table: {
|
|
184
|
-
defaultValue: { summary: 'None' },
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
vModel: {
|
|
188
|
-
control: 'boolean',
|
|
189
|
-
description: 'Data binding to Vue ref',
|
|
190
|
-
table: {
|
|
191
|
-
category: 'Native',
|
|
192
|
-
defaultValue: { summary: 'None' },
|
|
193
|
-
type: { summary: 'Ref<boolean>' },
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
width: {
|
|
197
|
-
table: {
|
|
198
|
-
defaultValue: { summary: 'None' },
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
args: {
|
|
203
|
-
default: `Default Slot Demo`,
|
|
204
|
-
footer: '<TideButton label="Footer Slot Demo" />',
|
|
205
|
-
handleBack: 'doSomething',
|
|
206
|
-
isBackButton: undefined,
|
|
207
|
-
isDismissible: undefined,
|
|
208
|
-
title: 'Modal Demo',
|
|
209
|
-
vModel: false,
|
|
210
|
-
width: '',
|
|
211
|
-
},
|
|
212
|
-
component: TideModal,
|
|
213
|
-
parameters,
|
|
214
|
-
render,
|
|
215
|
-
tags: ['autodocs'],
|
|
216
|
-
title: 'Components/TideModal',
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
export const Demo = {};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { ref, watch } from 'vue';
|
|
2
|
-
|
|
3
|
-
import TidePagination from '@/components/TidePagination.vue';
|
|
4
|
-
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
5
|
-
import {
|
|
6
|
-
argTypeBooleanUnrequired,
|
|
7
|
-
change,
|
|
8
|
-
disabledArgType,
|
|
9
|
-
doSomething,
|
|
10
|
-
parameters,
|
|
11
|
-
prependNoneAsUndefined,
|
|
12
|
-
} from '@/utilities/storybook';
|
|
13
|
-
|
|
14
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
15
|
-
|
|
16
|
-
type Args = InstanceType<typeof TidePagination>['$props'] & {
|
|
17
|
-
handleChange: string;
|
|
18
|
-
vModel: number;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const ELEMENT_BROAD = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT_BROAD);
|
|
22
|
-
|
|
23
|
-
const render = (args: Args, context: StoryContext) => ({
|
|
24
|
-
components: { TidePagination },
|
|
25
|
-
methods: {
|
|
26
|
-
doSomething,
|
|
27
|
-
handleIndexChange: (value: number) => {
|
|
28
|
-
context.updateArgs({ ...args, vModel: value });
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
setup: () => {
|
|
32
|
-
const currentIndex = ref(args.vModel);
|
|
33
|
-
|
|
34
|
-
watch(currentIndex, () => {
|
|
35
|
-
args.vModel = currentIndex.value;
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
watch(
|
|
39
|
-
() => args.vModel,
|
|
40
|
-
(newValue) => {
|
|
41
|
-
currentIndex.value = newValue;
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
args,
|
|
47
|
-
currentIndex,
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
template: `<TidePagination v-bind="args" v-model="currentIndex" @update:modelValue="handleIndexChange" />`,
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export default {
|
|
54
|
-
argTypes: {
|
|
55
|
-
change: disabledArgType,
|
|
56
|
-
disabled: {
|
|
57
|
-
...argTypeBooleanUnrequired,
|
|
58
|
-
description: 'Determines clickability<br />(Button only)',
|
|
59
|
-
if: {
|
|
60
|
-
arg: 'element',
|
|
61
|
-
eq: ELEMENT_BROAD.BUTTON,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
handleChange: {
|
|
65
|
-
...change,
|
|
66
|
-
table: {
|
|
67
|
-
category: 'Events',
|
|
68
|
-
defaultValue: { summary: 'None' },
|
|
69
|
-
type: { summary: '(pageIndex: number) => void' },
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
pageTotal: {
|
|
73
|
-
control: {
|
|
74
|
-
min: 1,
|
|
75
|
-
type: 'number',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
vModel: {
|
|
79
|
-
control: 'number',
|
|
80
|
-
description: 'Data binding to Vue ref',
|
|
81
|
-
table: {
|
|
82
|
-
category: 'Native',
|
|
83
|
-
defaultValue: { summary: 'None' },
|
|
84
|
-
type: { summary: 'Ref<number>' },
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
args: {
|
|
89
|
-
handleChange: 'doSomething',
|
|
90
|
-
pageTotal: 5,
|
|
91
|
-
vModel: 1,
|
|
92
|
-
},
|
|
93
|
-
component: TidePagination,
|
|
94
|
-
parameters,
|
|
95
|
-
render,
|
|
96
|
-
tags: ['autodocs'],
|
|
97
|
-
title: 'Components/TidePagination',
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export const Demo = {};
|