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,155 +0,0 @@
|
|
|
1
|
-
import * as STYLES from '@/types/Storybook';
|
|
2
|
-
import { CSS } from '@/types/Styles';
|
|
3
|
-
import { formatArgType, getConstantsByValues, prependNoneAsEmpty } from '@/utilities/storybook';
|
|
4
|
-
|
|
5
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
6
|
-
|
|
7
|
-
const MARGIN = prependNoneAsEmpty(STYLES.MARGIN);
|
|
8
|
-
|
|
9
|
-
const formatArgs = (args: any) => {
|
|
10
|
-
args.class = formatClassNames(args).join(' ');
|
|
11
|
-
args.style = formatStyles(args);
|
|
12
|
-
|
|
13
|
-
return { args };
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const formatClassNames = (args: any) => {
|
|
17
|
-
const classNames: string[] = [];
|
|
18
|
-
const hasMarginAuto = getHasMarginAuto(args);
|
|
19
|
-
|
|
20
|
-
if (hasMarginAuto) classNames.push(CSS.DISPLAY.FLEX, CSS.AXIS1.CENTER, CSS.AXIS2.CENTER);
|
|
21
|
-
if (args.margin) classNames.push(args.margin);
|
|
22
|
-
|
|
23
|
-
return classNames;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const formatClassNamesSnippet = (args: any) => {
|
|
27
|
-
const classNames = formatClassNames(args);
|
|
28
|
-
|
|
29
|
-
return getConstantsByValues(classNames);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
33
|
-
const { args } = context;
|
|
34
|
-
const styles = formatStyles(args);
|
|
35
|
-
const styleAttribute = styles ? ` style="${styles}"` : '';
|
|
36
|
-
const classNames = formatClassNamesSnippet(args);
|
|
37
|
-
|
|
38
|
-
return classNames.length
|
|
39
|
-
? `<div :class="[${classNames.join(', ')}]"${styleAttribute}>Demo</div>`
|
|
40
|
-
: `<div${styleAttribute}>Demo</div>`;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const formatStyles = (args: any) => {
|
|
44
|
-
const styles: string[] = [];
|
|
45
|
-
const hasMarginAuto = getHasMarginAuto(args);
|
|
46
|
-
|
|
47
|
-
if (hasMarginAuto) {
|
|
48
|
-
styles.push(`width: ${args.width ? args.width : '100'}px;`);
|
|
49
|
-
styles.push('height: 100px;');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return styles.length > 0 ? styles.join(' ') : null;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const getHasMarginAuto = (args: any) =>
|
|
56
|
-
[MARGIN['X-axis Auto'], MARGIN['Left Auto'], MARGIN['Right Auto']].includes(args.margin);
|
|
57
|
-
|
|
58
|
-
const getContainerClass = (args: any) => (getHasMarginAuto(args) ? '' : CSS.DISPLAY.INLINE_BLOCK);
|
|
59
|
-
|
|
60
|
-
const parameters = {
|
|
61
|
-
docs: {
|
|
62
|
-
source: {
|
|
63
|
-
format: false,
|
|
64
|
-
language: 'html',
|
|
65
|
-
transform: formatSnippet,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const render = (args: any) => ({
|
|
71
|
-
methods: {
|
|
72
|
-
getContainerClass,
|
|
73
|
-
},
|
|
74
|
-
setup() {
|
|
75
|
-
return formatArgs(args);
|
|
76
|
-
},
|
|
77
|
-
template: `<div :class="getContainerClass(args)" class="sb-bg-blue-light"><div class="tide-border-1 tide-padding-1 sb-bg-white sb-bg-white" v-bind="args">Demo</div></div>`,
|
|
78
|
-
updated() {
|
|
79
|
-
return formatArgs(args);
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
export default {
|
|
84
|
-
argTypes: {
|
|
85
|
-
margin: {
|
|
86
|
-
...formatArgType({ MARGIN }),
|
|
87
|
-
description: 'Applies a margin',
|
|
88
|
-
name: 'Margin',
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
args: {
|
|
92
|
-
margin: MARGIN.None,
|
|
93
|
-
},
|
|
94
|
-
parameters,
|
|
95
|
-
render,
|
|
96
|
-
tags: ['autodocs'],
|
|
97
|
-
title: 'Utilities/Margin',
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export const MarginDefault = {
|
|
101
|
-
name: 'Default',
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export const Margin4 = {
|
|
105
|
-
args: {
|
|
106
|
-
margin: MARGIN['Full 4 REM'],
|
|
107
|
-
},
|
|
108
|
-
name: 'Margin 4 REM',
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const Margin2 = {
|
|
112
|
-
args: {
|
|
113
|
-
margin: MARGIN['Full 2 REM'],
|
|
114
|
-
},
|
|
115
|
-
name: 'Margin 2 REM',
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export const Margin1 = {
|
|
119
|
-
args: {
|
|
120
|
-
margin: MARGIN['Full 1 REM'],
|
|
121
|
-
},
|
|
122
|
-
name: 'Margin 1 REM',
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export const MarginHalf = {
|
|
126
|
-
args: {
|
|
127
|
-
margin: MARGIN['Full 0.5 REM'],
|
|
128
|
-
},
|
|
129
|
-
name: 'Margin 0.5 REM',
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export const MarginQuarter = {
|
|
133
|
-
args: {
|
|
134
|
-
margin: MARGIN['Full 0.25 REM'],
|
|
135
|
-
},
|
|
136
|
-
name: 'Margin 0.25 REM',
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export const MarginRightAuto = {
|
|
140
|
-
args: {
|
|
141
|
-
margin: MARGIN['Right Auto'],
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export const MarginLeftAuto = {
|
|
146
|
-
args: {
|
|
147
|
-
margin: MARGIN['Left Auto'],
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
export const MarginXAuto = {
|
|
152
|
-
args: {
|
|
153
|
-
margin: MARGIN['X-axis Auto'],
|
|
154
|
-
},
|
|
155
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import * as STYLES from '@/types/Storybook';
|
|
2
|
-
import { formatArgType, getConstantsByValues, prependNoneAsEmpty } from '@/utilities/storybook';
|
|
3
|
-
|
|
4
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
5
|
-
|
|
6
|
-
const PADDING = prependNoneAsEmpty(STYLES.PADDING);
|
|
7
|
-
|
|
8
|
-
const formatArgs = (args: any) => {
|
|
9
|
-
args.class = formatClassNames(args).join(' ');
|
|
10
|
-
|
|
11
|
-
return { args };
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const formatClassNames = (args: any) => {
|
|
15
|
-
const classNames: string[] = [];
|
|
16
|
-
|
|
17
|
-
if (args.padding) classNames.push(args.padding);
|
|
18
|
-
|
|
19
|
-
return classNames;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const formatClassNamesSnippet = (args: any) => {
|
|
23
|
-
const classNames = formatClassNames(args);
|
|
24
|
-
|
|
25
|
-
return getConstantsByValues(classNames);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
29
|
-
const { args } = context;
|
|
30
|
-
const classNames = formatClassNamesSnippet(args);
|
|
31
|
-
|
|
32
|
-
return classNames.length ? `<div :class="[${classNames.join(', ')}]">Demo</div>` : '<div>Demo</div>';
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const parameters = {
|
|
36
|
-
docs: {
|
|
37
|
-
source: {
|
|
38
|
-
format: false,
|
|
39
|
-
language: 'html',
|
|
40
|
-
transform: formatSnippet,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const render = (args: any) => ({
|
|
46
|
-
setup() {
|
|
47
|
-
return formatArgs(args);
|
|
48
|
-
},
|
|
49
|
-
template:
|
|
50
|
-
'<div class="tide-display-inline-block tide-border-1 sb-bg-blue-light" v-bind="args"><div class="tide-padding-1 sb-bg-white">Demo</div></div>',
|
|
51
|
-
updated() {
|
|
52
|
-
return formatArgs(args);
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
export default {
|
|
57
|
-
argTypes: {
|
|
58
|
-
padding: {
|
|
59
|
-
...formatArgType({ PADDING }),
|
|
60
|
-
description: 'Applies padding',
|
|
61
|
-
name: 'Padding',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
args: {
|
|
65
|
-
padding: PADDING.None,
|
|
66
|
-
},
|
|
67
|
-
parameters,
|
|
68
|
-
render,
|
|
69
|
-
tags: ['autodocs'],
|
|
70
|
-
title: 'Utilities/Padding',
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const Default = {};
|
|
74
|
-
|
|
75
|
-
export const Padding4 = {
|
|
76
|
-
args: {
|
|
77
|
-
padding: PADDING['Full 4 REM'],
|
|
78
|
-
},
|
|
79
|
-
name: 'Padding 4 REM',
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export const Padding2 = {
|
|
83
|
-
args: {
|
|
84
|
-
padding: PADDING['Full 2 REM'],
|
|
85
|
-
},
|
|
86
|
-
name: 'Padding 2 REM',
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const Padding1 = {
|
|
90
|
-
args: {
|
|
91
|
-
padding: PADDING['Full 1 REM'],
|
|
92
|
-
},
|
|
93
|
-
name: 'Padding 1 REM',
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const PaddingHalf = {
|
|
97
|
-
args: {
|
|
98
|
-
padding: PADDING['Full 0.5 REM'],
|
|
99
|
-
},
|
|
100
|
-
name: 'Padding 0.5 REM',
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export const PaddingQuarter = {
|
|
104
|
-
args: {
|
|
105
|
-
padding: PADDING['Full 0.25 REM'],
|
|
106
|
-
},
|
|
107
|
-
name: 'Padding 0.25 REM',
|
|
108
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import * as STYLES from '@/types/Storybook';
|
|
2
|
-
import { CSS } from '@/types/Styles';
|
|
3
|
-
import {
|
|
4
|
-
argTypeBooleanUnrequired,
|
|
5
|
-
formatArgType,
|
|
6
|
-
getConstantsByValues,
|
|
7
|
-
prependNoneAsEmpty,
|
|
8
|
-
} from '@/utilities/storybook';
|
|
9
|
-
|
|
10
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
11
|
-
|
|
12
|
-
const SHADOW = prependNoneAsEmpty(STYLES.SHADOW);
|
|
13
|
-
|
|
14
|
-
const formatArgs = (args: any) => {
|
|
15
|
-
args.class = formatClassNames(args).join(' ');
|
|
16
|
-
|
|
17
|
-
return { args };
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const formatClassNames = (args: any) => {
|
|
21
|
-
const classNames: string[] = [];
|
|
22
|
-
|
|
23
|
-
if (args.box) classNames.push(args.box);
|
|
24
|
-
if (args.text) classNames.push(CSS.SHADOW.TEXT);
|
|
25
|
-
|
|
26
|
-
return classNames;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const formatClassNamesSnippet = (args: any) => {
|
|
30
|
-
const classNames = formatClassNames(args);
|
|
31
|
-
|
|
32
|
-
return getConstantsByValues(classNames);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
36
|
-
const { args } = context;
|
|
37
|
-
const classNames = formatClassNamesSnippet(args);
|
|
38
|
-
|
|
39
|
-
return classNames.length ? `<div :class="[${classNames.join(', ')}]">Demo</div>` : '<div>Demo</div>';
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const parameters = {
|
|
43
|
-
docs: {
|
|
44
|
-
source: {
|
|
45
|
-
format: false,
|
|
46
|
-
language: 'html',
|
|
47
|
-
transform: formatSnippet,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const render = (args: any) => ({
|
|
53
|
-
setup() {
|
|
54
|
-
return formatArgs(args);
|
|
55
|
-
},
|
|
56
|
-
template: '<div class="tide-display-inline-block tide-padding-1" v-bind="args">Demo</div>',
|
|
57
|
-
updated() {
|
|
58
|
-
return formatArgs(args);
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export default {
|
|
63
|
-
argTypes: {
|
|
64
|
-
box: {
|
|
65
|
-
...formatArgType({ SHADOW }),
|
|
66
|
-
description: `Applies a shadow at the element's top or bottom boundary or to the text.<br />(Top shadows are for sticky footers.`,
|
|
67
|
-
name: 'Box Shadow',
|
|
68
|
-
},
|
|
69
|
-
text: {
|
|
70
|
-
...argTypeBooleanUnrequired,
|
|
71
|
-
description: `Applies a shadow to the element's text.`,
|
|
72
|
-
name: 'Text Shadow',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
args: {
|
|
76
|
-
box: SHADOW.None,
|
|
77
|
-
text: undefined,
|
|
78
|
-
},
|
|
79
|
-
parameters,
|
|
80
|
-
render,
|
|
81
|
-
tags: ['autodocs'],
|
|
82
|
-
title: 'Utilities/Shadow',
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export const Default = {};
|
|
86
|
-
|
|
87
|
-
export const ShadowBottom = {
|
|
88
|
-
args: {
|
|
89
|
-
box: SHADOW['Bottom'],
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const ShadowTop = {
|
|
94
|
-
args: {
|
|
95
|
-
box: SHADOW['Top'],
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const ShadowText = {
|
|
100
|
-
args: {
|
|
101
|
-
text: true,
|
|
102
|
-
},
|
|
103
|
-
};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import * as STYLES from '@/types/Storybook';
|
|
2
|
-
import { formatArgType, getConstantsByValues, prependNoneAsEmpty } from '@/utilities/storybook';
|
|
3
|
-
|
|
4
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
5
|
-
|
|
6
|
-
const BG = prependNoneAsEmpty(STYLES.BG);
|
|
7
|
-
const FONT_COLOR = prependNoneAsEmpty(STYLES.FONT_COLOR);
|
|
8
|
-
const TRANSPARENT = prependNoneAsEmpty(STYLES.TRANSPARENT);
|
|
9
|
-
|
|
10
|
-
const formatArgs = (args: any) => {
|
|
11
|
-
args.class = formatClassNames(args).join(' ');
|
|
12
|
-
|
|
13
|
-
return { args };
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const formatClassNames = (args: any) => {
|
|
17
|
-
const classNames: string[] = [];
|
|
18
|
-
|
|
19
|
-
if (args.bg) classNames.push(args.bg);
|
|
20
|
-
if (args.color) classNames.push(args.color);
|
|
21
|
-
if (args.transparent) classNames.push(args.transparent);
|
|
22
|
-
|
|
23
|
-
return classNames;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const formatClassNamesSnippet = (args: any) => {
|
|
27
|
-
const classNames: string[] = [];
|
|
28
|
-
|
|
29
|
-
if (args.transparent) classNames.push(args.transparent);
|
|
30
|
-
|
|
31
|
-
return getConstantsByValues(classNames);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
35
|
-
const { args } = context;
|
|
36
|
-
const classNames = formatClassNamesSnippet(args);
|
|
37
|
-
|
|
38
|
-
return classNames.length ? `<div :class="[${classNames.join(', ')}]">Demo</div>` : '<div>Demo</div>';
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const parameters = {
|
|
42
|
-
docs: {
|
|
43
|
-
source: {
|
|
44
|
-
format: false,
|
|
45
|
-
language: 'html',
|
|
46
|
-
transform: formatSnippet,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const render = (args: any) => ({
|
|
52
|
-
setup() {
|
|
53
|
-
return formatArgs(args);
|
|
54
|
-
},
|
|
55
|
-
template: `<div :class="[args.bg]"><div class="tide-display-inline-block tide-padding-1 tide-width-full tide-height-full" :class="[args.transparent, args.color]">Demo</div></div>`,
|
|
56
|
-
updated() {
|
|
57
|
-
return formatArgs(args);
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export default {
|
|
62
|
-
argTypes: {
|
|
63
|
-
bg: {
|
|
64
|
-
...formatArgType({ BG }),
|
|
65
|
-
description: `Applies a background color<br />(For demonstration purposes only).`,
|
|
66
|
-
name: 'Background color',
|
|
67
|
-
},
|
|
68
|
-
color: {
|
|
69
|
-
...formatArgType({ FONT_COLOR }),
|
|
70
|
-
description: `Applies a text color<br />(For demonstration purposes only).`,
|
|
71
|
-
name: 'Text color',
|
|
72
|
-
},
|
|
73
|
-
transparent: {
|
|
74
|
-
...formatArgType({ TRANSPARENT }),
|
|
75
|
-
description: `Applies a semi-transparent overlay.`,
|
|
76
|
-
name: 'Transparent',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
args: {
|
|
80
|
-
bg: FONT_COLOR.None,
|
|
81
|
-
color: BG.None,
|
|
82
|
-
transparent: TRANSPARENT.None,
|
|
83
|
-
},
|
|
84
|
-
parameters,
|
|
85
|
-
render,
|
|
86
|
-
tags: ['autodocs'],
|
|
87
|
-
title: 'Utilities/Transparency',
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const Default = {};
|
|
91
|
-
|
|
92
|
-
export const Transparent100 = {
|
|
93
|
-
args: {
|
|
94
|
-
transparent: TRANSPARENT['100: 90% White'],
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const Transparent200 = {
|
|
99
|
-
args: {
|
|
100
|
-
transparent: TRANSPARENT['100: 75% White'],
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export const Transparent300 = {
|
|
105
|
-
args: {
|
|
106
|
-
transparent: TRANSPARENT['300: 10% Black'],
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const Transparent400 = {
|
|
111
|
-
args: {
|
|
112
|
-
transparent: TRANSPARENT['400: 50% Black'],
|
|
113
|
-
},
|
|
114
|
-
};
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import * as STYLES from '@/types/Storybook';
|
|
2
|
-
import { formatArgType, getConstantsByValues, prependNoneAsEmpty } from '@/utilities/storybook';
|
|
3
|
-
|
|
4
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
5
|
-
|
|
6
|
-
const TYPOGRAPHY = prependNoneAsEmpty(STYLES.TYPOGRAPHY);
|
|
7
|
-
const TEXT_DECORATION = prependNoneAsEmpty(STYLES.TEXT_DECORATION);
|
|
8
|
-
const TEXT_TRANSFORM = prependNoneAsEmpty(STYLES.TEXT_TRANSFORM);
|
|
9
|
-
|
|
10
|
-
const formatArgs = (args: any) => {
|
|
11
|
-
args.class = formatClassNames(args).join(' ');
|
|
12
|
-
|
|
13
|
-
return { args };
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const formatClassNames = (args: any) => {
|
|
17
|
-
const classNames: string[] = [];
|
|
18
|
-
|
|
19
|
-
if (args.type) classNames.push(args.type);
|
|
20
|
-
if (args.textDecoration) classNames.push(args.textDecoration);
|
|
21
|
-
if (args.textTransform) classNames.push(args.textTransform);
|
|
22
|
-
|
|
23
|
-
return classNames;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const formatClassNamesSnippet = (args: any) => {
|
|
27
|
-
const classNames = formatClassNames(args);
|
|
28
|
-
|
|
29
|
-
return getConstantsByValues(classNames);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const formatSnippet = (code: string, context: StoryContext) => {
|
|
33
|
-
const { args } = context;
|
|
34
|
-
const classNames = formatClassNamesSnippet(args);
|
|
35
|
-
|
|
36
|
-
return `<div :class="[${classNames.join(', ')}]">${args.label}</div>`;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const parameters = {
|
|
40
|
-
docs: {
|
|
41
|
-
source: {
|
|
42
|
-
format: false,
|
|
43
|
-
language: 'html',
|
|
44
|
-
transform: formatSnippet,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const render = (args: any) => ({
|
|
50
|
-
setup() {
|
|
51
|
-
return formatArgs(args);
|
|
52
|
-
},
|
|
53
|
-
template: `<div v-bind="args">{{ args.label }}</div>`,
|
|
54
|
-
updated() {
|
|
55
|
-
return formatArgs(args);
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
export default {
|
|
60
|
-
argTypes: {
|
|
61
|
-
label: {
|
|
62
|
-
control: 'text',
|
|
63
|
-
description: 'Sample text',
|
|
64
|
-
name: 'Label',
|
|
65
|
-
table: {
|
|
66
|
-
defaultValue: { summary: 'None' },
|
|
67
|
-
type: { summary: 'string' },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
textDecoration: {
|
|
71
|
-
...formatArgType({ TEXT_DECORATION }),
|
|
72
|
-
description: 'Applies text decoration styles',
|
|
73
|
-
name: 'Text Decoration',
|
|
74
|
-
table: {
|
|
75
|
-
defaultValue: { summary: 'None' },
|
|
76
|
-
type: { summary: 'CSS.STRIKETHROUGH | CSS.UNDERLINE' },
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
textTransform: {
|
|
80
|
-
...formatArgType({ TEXT_TRANSFORM }),
|
|
81
|
-
description: 'Applies text transformation styles',
|
|
82
|
-
name: 'Text Transform',
|
|
83
|
-
table: {
|
|
84
|
-
defaultValue: { summary: 'None' },
|
|
85
|
-
type: { summary: 'CSS.TEXT_TRANSFORM' },
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
type: {
|
|
89
|
-
...formatArgType({ TYPOGRAPHY }),
|
|
90
|
-
description: `Applies font rules`,
|
|
91
|
-
name: 'Type',
|
|
92
|
-
table: {
|
|
93
|
-
defaultValue: { summary: 'None' },
|
|
94
|
-
type: { summary: 'CSS.FONT.ROLE' },
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
args: {
|
|
99
|
-
label: 'Aa',
|
|
100
|
-
textDecoration: TEXT_DECORATION.None,
|
|
101
|
-
textTransform: TEXT_TRANSFORM.None,
|
|
102
|
-
type: TYPOGRAPHY.None,
|
|
103
|
-
},
|
|
104
|
-
parameters,
|
|
105
|
-
render,
|
|
106
|
-
tags: ['autodocs'],
|
|
107
|
-
title: 'Utilities/Typography',
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const Default = {};
|
|
111
|
-
|
|
112
|
-
export const Display1 = {
|
|
113
|
-
args: {
|
|
114
|
-
type: TYPOGRAPHY['Display 1'],
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export const Headline1 = {
|
|
119
|
-
args: {
|
|
120
|
-
type: TYPOGRAPHY['Headline 1'],
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
export const Headline2 = {
|
|
125
|
-
args: {
|
|
126
|
-
type: TYPOGRAPHY['Headline 2'],
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
export const Headline3 = {
|
|
131
|
-
args: {
|
|
132
|
-
type: TYPOGRAPHY['Headline 3'],
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export const Title1 = {
|
|
137
|
-
args: {
|
|
138
|
-
type: TYPOGRAPHY['Title 1'],
|
|
139
|
-
},
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export const Title2 = {
|
|
143
|
-
args: {
|
|
144
|
-
type: TYPOGRAPHY['Title 2'],
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export const Body1 = {
|
|
149
|
-
args: {
|
|
150
|
-
type: TYPOGRAPHY['Body 1'],
|
|
151
|
-
},
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
export const Body2 = {
|
|
155
|
-
args: {
|
|
156
|
-
type: TYPOGRAPHY['Body 2'],
|
|
157
|
-
},
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export const Label1 = {
|
|
161
|
-
args: {
|
|
162
|
-
type: TYPOGRAPHY['Label 1'],
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export const Label1Semibold = {
|
|
167
|
-
args: {
|
|
168
|
-
type: TYPOGRAPHY['Label 1 Semibold'],
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export const Label2 = {
|
|
173
|
-
args: {
|
|
174
|
-
type: TYPOGRAPHY['Label 2'],
|
|
175
|
-
},
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
export const Label2Semibold = {
|
|
179
|
-
args: {
|
|
180
|
-
type: TYPOGRAPHY['Label 2 Semibold'],
|
|
181
|
-
},
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export const Label3 = {
|
|
185
|
-
args: {
|
|
186
|
-
type: TYPOGRAPHY['Label 3'],
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export const Link1 = {
|
|
191
|
-
args: {
|
|
192
|
-
type: TYPOGRAPHY['Link 1'],
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
export const Link2 = {
|
|
197
|
-
args: {
|
|
198
|
-
type: TYPOGRAPHY['Link 2'],
|
|
199
|
-
},
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
export const Link3 = {
|
|
203
|
-
args: {
|
|
204
|
-
type: TYPOGRAPHY['Link 3'],
|
|
205
|
-
},
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
export const Button1 = {
|
|
209
|
-
args: {
|
|
210
|
-
type: TYPOGRAPHY['Button 1'],
|
|
211
|
-
},
|
|
212
|
-
};
|