tide-design-system 2.0.21 → 2.0.23
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/.eslintrc.cjs +90 -0
- package/.storybook/main.ts +60 -0
- package/.storybook/preview.ts +252 -0
- package/dist/IconAccountBalance-ad4f4a95.js +16 -0
- package/dist/IconAdd-917e055b.js +16 -0
- package/dist/IconAiDescription-e6f8ed46.js +20 -0
- package/dist/IconAlignSpace-5d64a8e4.js +16 -0
- package/dist/IconApplePay-7742e162.js +16 -0
- package/dist/IconArrowBack-1810092d.js +16 -0
- package/dist/IconArrowForward-ddabefc9.js +16 -0
- package/dist/IconArrowRight-d93347c3.js +16 -0
- package/dist/IconAssignment-1983e555.js +16 -0
- package/dist/IconAwardStar-8128aca1.js +16 -0
- package/dist/IconBookmark-7d88d664.js +16 -0
- package/dist/IconCalendarMonth-2fd1e713.js +16 -0
- package/dist/IconCall-8aa582d9.js +16 -0
- package/dist/IconCheck-cf7470ee.js +16 -0
- package/dist/IconChevronLeft-558206bb.js +16 -0
- package/dist/IconChevronRight-28930a0b.js +16 -0
- package/dist/IconClear-9419bf17.js +16 -0
- package/dist/IconClose-abfb6177.js +16 -0
- package/dist/IconCycle-2affec71.js +16 -0
- package/dist/IconDelete-67b69553.js +16 -0
- package/dist/IconDiamond-93af488a.js +16 -0
- package/dist/IconDraft-6e70e48f.js +16 -0
- package/dist/IconEdit-16d34325.js +16 -0
- package/dist/IconError-a2922b95.js +16 -0
- package/dist/IconExpandContent-7e144d1c.js +16 -0
- package/dist/IconExpandLess-3a8a0552.js +16 -0
- package/dist/IconExpandMore-c600148e.js +16 -0
- package/dist/IconFacebook-4658b533.js +16 -0
- package/dist/IconFavorite-d23faefe.js +16 -0
- package/dist/IconFavoriteFilled-aa0d6d5e.js +16 -0
- package/dist/IconFormatBold-70a5cacf.js +16 -0
- package/dist/IconFormatItalic-c06504d7.js +16 -0
- package/dist/IconFormatListBulleted-9493858a.js +16 -0
- package/dist/IconForum-ae4ad63f.js +16 -0
- package/dist/IconGavel-44c29036.js +16 -0
- package/dist/IconGoogle-febad0d8.js +31 -0
- package/dist/IconGooglePay-8cf0286e.js +16 -0
- package/dist/IconGrid-25f665e0.js +16 -0
- package/dist/IconHeight-4fae7545.js +16 -0
- package/dist/IconHelp-340ee4fb.js +16 -0
- package/dist/IconInfo-efead10b.js +16 -0
- package/dist/IconInsertText-00236a65.js +16 -0
- package/dist/IconInstagram-57188d29.js +16 -0
- package/dist/IconIosShare-167aa8c4.js +16 -0
- package/dist/IconLayout-2865e0eb.js +16 -0
- package/dist/IconLinkedIn-f29c217d.js +16 -0
- package/dist/IconLocalShipping-901a3e4c.js +16 -0
- package/dist/IconLock-47669e20.js +16 -0
- package/dist/IconMail-9b85058a.js +16 -0
- package/dist/IconMenu-4bed57f3.js +16 -0
- package/dist/IconMoreHoriz-2aabe29f.js +16 -0
- package/dist/IconNotifications-bcbf1d8c.js +16 -0
- package/dist/IconOpenInNew-78fffcfe.js +16 -0
- package/dist/IconPalette-22865300.js +16 -0
- package/dist/IconPaypal-c28e6dbe.js +16 -0
- package/dist/IconPerson-7ada8b07.js +16 -0
- package/dist/IconPhotoCamera-31a58b85.js +16 -0
- package/dist/IconPinterest-fe5cc414.js +16 -0
- package/dist/IconPlayArrow-1ed5d884.js +16 -0
- package/dist/IconRemove-bab221ba.js +16 -0
- package/dist/IconRoundedCorners-e21c4321.js +16 -0
- package/dist/IconRuler-0ceea80a.js +16 -0
- package/dist/IconSearch-f8faefb4.js +16 -0
- package/dist/IconSeating-2ca8921d.js +16 -0
- package/dist/IconSell-b011ac2d.js +16 -0
- package/dist/IconShare-57f28ce3.js +16 -0
- package/dist/IconShoppingCart-b532dab0.js +16 -0
- package/dist/IconSms-378f373a.js +16 -0
- package/dist/IconStar-1b8ad0f9.js +16 -0
- package/dist/IconSwapVert-8085e942.js +16 -0
- package/dist/IconThreeDRotation-33f086a7.js +29 -0
- package/dist/IconTrophy-f4be8b54.js +16 -0
- package/dist/IconTune-0913ba01.js +16 -0
- package/dist/IconTwitter-9acefb07.js +16 -0
- package/dist/IconVideocam-33650e6f.js +16 -0
- package/dist/IconViewInAr-d1534ef2.js +16 -0
- package/dist/IconVisibility-a1c21dd0.js +16 -0
- package/dist/IconVolumeOff-8e121ef3.js +16 -0
- package/dist/IconVolumeOn-992e16dd.js +16 -0
- package/dist/IconWarning-6f490acf.js +16 -0
- package/dist/IconWeight-e3b3daa6.js +16 -0
- package/dist/IconWidth-023f69f2.js +16 -0
- package/dist/IconYoutube-a6224033.js +16 -0
- package/dist/css/grid-layout.css +7 -3
- package/dist/style.css +1 -1
- package/dist/tide-design-system.js +2172 -46
- package/dist/types/Icon.ts +6 -0
- package/index.ts +122 -0
- package/package.json +9 -12
- package/src/assets/css/animation.css +14 -0
- package/src/assets/css/dynamic-buttons.css +79 -0
- package/src/assets/css/dynamic-utilities.css +39 -0
- package/src/assets/css/grid-layout.css +71 -0
- package/src/assets/css/main.css +5 -0
- package/src/assets/css/realm/aero.css +42 -0
- package/src/assets/css/realm/atv.css +43 -0
- package/src/assets/css/realm/boatmart.css +42 -0
- package/src/assets/css/realm/cycle.css +42 -0
- package/src/assets/css/realm/equip.css +42 -0
- package/src/assets/css/realm/pwc.css +42 -0
- package/src/assets/css/realm/rv.css +50 -0
- package/src/assets/css/realm/snow.css +42 -0
- package/src/assets/css/realm/truck.css +42 -0
- package/src/assets/css/reset.css +79 -0
- package/src/assets/css/storybook.css +9 -0
- package/src/assets/css/utilities.css +1602 -0
- package/src/assets/css/variables.css +118 -0
- package/src/assets/svg/icons/IconAccountBalance.svg +5 -0
- package/src/assets/svg/icons/IconAdd.svg +3 -0
- package/src/assets/svg/icons/IconAiDescription.svg +7 -0
- package/src/assets/svg/icons/IconAlignSpace.svg +3 -0
- package/src/assets/svg/icons/IconApplePay.svg +5 -0
- package/src/assets/svg/icons/IconArrowBack.svg +3 -0
- package/src/assets/svg/icons/IconArrowForward.svg +3 -0
- package/src/assets/svg/icons/IconArrowRight.svg +3 -0
- package/src/assets/svg/icons/IconAssignment.svg +5 -0
- package/src/assets/svg/icons/IconAwardStar.svg +5 -0
- package/src/assets/svg/icons/IconBookmark.svg +5 -0
- package/src/assets/svg/icons/IconCalendarMonth.svg +5 -0
- package/src/assets/svg/icons/IconCall.svg +5 -0
- package/src/assets/svg/icons/IconCheck.svg +3 -0
- package/src/assets/svg/icons/IconChevronLeft.svg +3 -0
- package/src/assets/svg/icons/IconChevronRight.svg +3 -0
- package/src/assets/svg/icons/IconClear.svg +5 -0
- package/src/assets/svg/icons/IconClose.svg +3 -0
- package/src/assets/svg/icons/IconCycle.svg +5 -0
- package/src/assets/svg/icons/IconDelete.svg +5 -0
- package/src/assets/svg/icons/IconDiamond.svg +5 -0
- package/src/assets/svg/icons/IconDraft.svg +3 -0
- package/src/assets/svg/icons/IconEdit.svg +5 -0
- package/src/assets/svg/icons/IconError.svg +5 -0
- package/src/assets/svg/icons/IconExpandContent.svg +3 -0
- package/src/assets/svg/icons/IconExpandLess.svg +3 -0
- package/src/assets/svg/icons/IconExpandMore.svg +3 -0
- package/src/assets/svg/icons/IconFacebook.svg +5 -0
- package/src/assets/svg/icons/IconFavorite.svg +5 -0
- package/src/assets/svg/icons/IconFavoriteFilled.svg +5 -0
- package/src/assets/svg/icons/IconFormatBold.svg +5 -0
- package/src/assets/svg/icons/IconFormatItalic.svg +3 -0
- package/src/assets/svg/icons/IconFormatListBulleted.svg +5 -0
- package/src/assets/svg/icons/IconForum.svg +5 -0
- package/src/assets/svg/icons/IconGavel.svg +5 -0
- package/src/assets/svg/icons/IconGoogle.svg +18 -0
- package/src/assets/svg/icons/IconGooglePay.svg +5 -0
- package/src/assets/svg/icons/IconGrid.svg +3 -0
- package/src/assets/svg/icons/IconHeight.svg +3 -0
- package/src/assets/svg/icons/IconHelp.svg +5 -0
- package/src/assets/svg/icons/IconInfo.svg +5 -0
- package/src/assets/svg/icons/IconInsertText.svg +5 -0
- package/src/assets/svg/icons/IconInstagram.svg +5 -0
- package/src/assets/svg/icons/IconIosShare.svg +5 -0
- package/src/assets/svg/icons/IconLayout.svg +5 -0
- package/src/assets/svg/icons/IconLinkedIn.svg +5 -0
- package/src/assets/svg/icons/IconLocalShipping.svg +5 -0
- package/src/assets/svg/icons/IconLock.svg +5 -0
- package/src/assets/svg/icons/IconMail.svg +5 -0
- package/src/assets/svg/icons/IconMenu.svg +3 -0
- package/src/assets/svg/icons/IconMoreHoriz.svg +5 -0
- package/src/assets/svg/icons/IconNotifications.svg +5 -0
- package/src/assets/svg/icons/IconOpenInNew.svg +5 -0
- package/src/assets/svg/icons/IconPalette.svg +5 -0
- package/src/assets/svg/icons/IconPaypal.svg +5 -0
- package/src/assets/svg/icons/IconPerson.svg +5 -0
- package/src/assets/svg/icons/IconPhotoCamera.svg +5 -0
- package/src/assets/svg/icons/IconPinterest.svg +5 -0
- package/src/assets/svg/icons/IconPlayArrow.svg +3 -0
- package/src/assets/svg/icons/IconRemove.svg +3 -0
- package/src/assets/svg/icons/IconRoundedCorners.svg +5 -0
- package/src/assets/svg/icons/IconRuler.svg +3 -0
- package/src/assets/svg/icons/IconSearch.svg +5 -0
- package/src/assets/svg/icons/IconSeating.svg +3 -0
- package/src/assets/svg/icons/IconSell.svg +5 -0
- package/src/assets/svg/icons/IconShare.svg +5 -0
- package/src/assets/svg/icons/IconShoppingCart.svg +5 -0
- package/src/assets/svg/icons/IconSms.svg +5 -0
- package/src/assets/svg/icons/IconStar.svg +5 -0
- package/src/assets/svg/icons/IconSwapVert.svg +5 -0
- package/src/assets/svg/icons/IconThreeDRotation.svg +18 -0
- package/src/assets/svg/icons/IconTrophy.svg +5 -0
- package/src/assets/svg/icons/IconTune.svg +5 -0
- package/src/assets/svg/icons/IconTwitter.svg +5 -0
- package/src/assets/svg/icons/IconVideocam.svg +5 -0
- package/src/assets/svg/icons/IconViewInAr.svg +5 -0
- package/src/assets/svg/icons/IconVisibility.svg +5 -0
- package/src/assets/svg/icons/IconVolumeOff.svg +5 -0
- package/src/assets/svg/icons/IconVolumeOn.svg +5 -0
- package/src/assets/svg/icons/IconWarning.svg +5 -0
- package/src/assets/svg/icons/IconWeight.svg +3 -0
- package/src/assets/svg/icons/IconWidth.svg +3 -0
- package/src/assets/svg/icons/IconYoutube.svg +5 -0
- package/src/components/TideAccordionItem.vue +105 -0
- package/src/components/TideAlert.vue +124 -0
- package/src/components/TideBackgroundImage.vue +44 -0
- package/src/components/TideBadge.vue +30 -0
- package/src/components/TideBadgePremium.vue +31 -0
- package/src/components/TideBadgeTrustedPartner.vue +38 -0
- package/src/components/TideBreadCrumbs.vue +53 -0
- package/src/components/TideButton.vue +67 -0
- package/src/components/TideButtonIcon.vue +52 -0
- package/src/components/TideButtonPagination.vue +71 -0
- package/src/components/TideCard.vue +19 -0
- package/src/components/TideCarousel.vue +188 -0
- package/src/components/TideChipAction.vue +48 -0
- package/src/components/TideChipFilter.vue +55 -0
- package/src/components/TideChipInput.vue +44 -0
- package/src/components/TideColumns.vue +53 -0
- package/src/components/TideDivider.vue +24 -0
- package/src/components/TideIcon.vue +58 -0
- package/src/components/TideImage.vue +44 -0
- package/src/components/TideIndicator.vue +57 -0
- package/src/components/TideInputCheckbox.vue +145 -0
- package/src/components/TideInputRadio.vue +87 -0
- package/src/components/TideInputSelect.vue +204 -0
- package/src/components/TideInputText.vue +292 -0
- package/src/components/TideInputTextarea.vue +196 -0
- package/src/components/TideLink.vue +66 -0
- package/src/components/TideModal.vue +187 -0
- package/src/components/TidePagination.vue +67 -0
- package/src/components/TideSeoLinks.vue +58 -0
- package/src/components/TideTabs.vue +89 -0
- package/src/components/TideToggle.vue +95 -0
- package/src/docs/development.md +51 -0
- package/src/docs/integration.md +79 -0
- package/src/docs/storybook.md +39 -0
- package/src/stories/DemoCssUtilities.stories.ts +154 -0
- package/src/stories/DemoCssUtilitiesByTextInput.stories.ts +61 -0
- package/src/stories/FoundationsBorder.stories.ts +230 -0
- package/src/stories/FoundationsGap.stories.ts +180 -0
- package/src/stories/FoundationsMargin.stories.ts +155 -0
- package/src/stories/FoundationsPadding.stories.ts +108 -0
- package/src/stories/FoundationsShadow.stories.ts +84 -0
- package/src/stories/FoundationsTypography.stories.ts +172 -0
- package/src/stories/Template.stories.ts +71 -0
- package/src/stories/TideAccordionItem.stories.ts +68 -0
- package/src/stories/TideAlert.stories.ts +58 -0
- package/src/stories/TideBackgroundImage.stories.ts +53 -0
- package/src/stories/TideBadge.stories.ts +31 -0
- package/src/stories/TideBadgePremium.stories.ts +31 -0
- package/src/stories/TideBadgeTrustedPartner.stories.ts +33 -0
- package/src/stories/TideBreadCrumbs.stories.ts +43 -0
- package/src/stories/TideButton.stories.ts +118 -0
- package/src/stories/TideButtonIcon.stories.ts +103 -0
- package/src/stories/TideButtonPagination.stories.ts +99 -0
- package/src/stories/TideCard.stories.ts +38 -0
- package/src/stories/TideCarousel.stories.ts +130 -0
- package/src/stories/TideChipAction.stories.ts +46 -0
- package/src/stories/TideChipFilter.stories.ts +59 -0
- package/src/stories/TideChipInput.stories.ts +42 -0
- package/src/stories/TideColumns.stories.ts +90 -0
- package/src/stories/TideDivider.stories.ts +46 -0
- package/src/stories/TideIcon.stories.ts +29 -0
- package/src/stories/TideIndicator.stories.ts +31 -0
- package/src/stories/TideInputCheckbox.stories.ts +86 -0
- package/src/stories/TideInputRadio.stories.ts +71 -0
- package/src/stories/TideInputSelect.stories.ts +145 -0
- package/src/stories/TideInputText.stories.ts +181 -0
- package/src/stories/TideInputTextarea.stories.ts +116 -0
- package/src/stories/TideLink.stories.ts +137 -0
- package/src/stories/TideModal.stories.ts +122 -0
- package/src/stories/TidePagination.stories.ts +83 -0
- package/src/stories/TideSeoLinks.stories.ts +67 -0
- package/src/stories/TideTabs.stories.ts +100 -0
- package/src/stories/TideToggle.stories.ts +69 -0
- package/src/stories/Welcome.mdx +17 -0
- package/src/types/Alert.ts +8 -0
- package/src/types/Badge.ts +21 -0
- package/src/types/BreadCrumb.ts +5 -0
- package/src/types/Detail.ts +4 -0
- package/src/types/Element.ts +13 -0
- package/src/types/FacetRange.ts +84 -0
- package/src/types/Field.ts +54 -0
- package/src/types/Form.ts +58 -0
- package/src/types/Formatted.ts +22 -0
- package/src/types/Icon.ts +87 -0
- package/src/types/Link.ts +5 -0
- package/src/types/ListingMedia.ts +43 -0
- package/src/types/Orientation.ts +6 -0
- package/src/types/Priority.ts +11 -0
- package/src/types/Raw.ts +5 -0
- package/src/types/Realm.ts +13 -0
- package/src/types/RealmConfig.ts +14 -0
- package/src/types/Select.ts +10 -0
- package/src/types/Size.ts +6 -0
- package/src/types/Storybook.ts +219 -0
- package/src/types/Styles.ts +590 -0
- package/src/types/Tab.ts +5 -0
- package/src/types/Target.ts +6 -0
- package/src/types/TextInput.ts +16 -0
- package/src/types/Validation.ts +24 -0
- package/src/utilities/format.ts +184 -0
- package/src/utilities/storybook.ts +295 -0
- package/src/utilities/validation.ts +197 -0
- package/tests/utilities-format.spec.ts +430 -0
- package/tsconfig.app.json +14 -0
- package/tsconfig.config.json +12 -0
- package/tsconfig.json +22 -0
- package/tsconfig.vitest.json +10 -0
- package/vite.config.ts +43 -0
- package/dist/IconAccountBalance-e434dc83.js +0 -11
- package/dist/IconAdd-137c81ee.js +0 -11
- package/dist/IconAiDescription-b61fdf89.js +0 -15
- package/dist/IconAlignSpace-7fbe46b4.js +0 -11
- package/dist/IconApplePay-64062dcc.js +0 -11
- package/dist/IconArrowBack-e6928100.js +0 -11
- package/dist/IconArrowForward-d6ab6d3a.js +0 -11
- package/dist/IconArrowRight-c6a11581.js +0 -11
- package/dist/IconAssignment-e2763562.js +0 -11
- package/dist/IconAwardStar-17cf905a.js +0 -11
- package/dist/IconBookmark-82addaac.js +0 -11
- package/dist/IconCalendarMonth-1a83d5d5.js +0 -11
- package/dist/IconCall-ba5b39c1.js +0 -11
- package/dist/IconCheck-cf09e735.js +0 -11
- package/dist/IconChevronLeft-8f71380a.js +0 -11
- package/dist/IconChevronRight-68656c61.js +0 -11
- package/dist/IconClear-785206de.js +0 -11
- package/dist/IconClose-44cd3416.js +0 -11
- package/dist/IconCycle-7920badb.js +0 -11
- package/dist/IconDelete-6392fe21.js +0 -11
- package/dist/IconDiamond-87eabf00.js +0 -11
- package/dist/IconEdit-8e98e4d6.js +0 -11
- package/dist/IconError-744d1a2c.js +0 -11
- package/dist/IconExpandContent-b7b8cde3.js +0 -11
- package/dist/IconExpandLess-210cd748.js +0 -11
- package/dist/IconExpandMore-42efdc9f.js +0 -11
- package/dist/IconFacebook-fb220a44.js +0 -11
- package/dist/IconFavorite-f59e02f9.js +0 -11
- package/dist/IconFavoriteFilled-e8d07819.js +0 -11
- package/dist/IconFormatBold-0029544d.js +0 -11
- package/dist/IconFormatItalic-3a6bf7c0.js +0 -11
- package/dist/IconFormatListBulleted-aa928706.js +0 -11
- package/dist/IconForum-eb80ff50.js +0 -11
- package/dist/IconGavel-e89cca44.js +0 -11
- package/dist/IconGoogle-7a073b42.js +0 -28
- package/dist/IconGooglePay-ee54db4a.js +0 -11
- package/dist/IconGrid-bf797b90.js +0 -11
- package/dist/IconHelp-19e606c6.js +0 -11
- package/dist/IconInfo-559b7d0f.js +0 -11
- package/dist/IconInsertText-c915a8a6.js +0 -11
- package/dist/IconInstagram-0575acd4.js +0 -11
- package/dist/IconIosShare-93c68705.js +0 -11
- package/dist/IconLayout-85066093.js +0 -11
- package/dist/IconLinkedIn-75fb43e2.js +0 -11
- package/dist/IconLocalShipping-abceb11a.js +0 -11
- package/dist/IconLock-1341dc44.js +0 -11
- package/dist/IconMail-925571bb.js +0 -11
- package/dist/IconMenu-6c017324.js +0 -11
- package/dist/IconMoreHoriz-cd236be0.js +0 -11
- package/dist/IconNotifications-74251294.js +0 -11
- package/dist/IconOpenInNew-e350684e.js +0 -11
- package/dist/IconPalette-0741adc0.js +0 -11
- package/dist/IconPaypal-9267d4dd.js +0 -11
- package/dist/IconPerson-02596ee6.js +0 -11
- package/dist/IconPhotoCamera-04e406ff.js +0 -11
- package/dist/IconPinterest-9e6e2f1f.js +0 -11
- package/dist/IconPlayArrow-aa6e204b.js +0 -11
- package/dist/IconRemove-8f57304c.js +0 -11
- package/dist/IconRoundedCorners-673a1198.js +0 -11
- package/dist/IconSearch-a0ebf9b5.js +0 -11
- package/dist/IconSell-b20a15c2.js +0 -11
- package/dist/IconShare-fa702e5c.js +0 -11
- package/dist/IconShoppingCart-81bd675f.js +0 -11
- package/dist/IconSms-71c3667d.js +0 -11
- package/dist/IconStar-8ef71a6b.js +0 -11
- package/dist/IconSwapVert-e1a856cc.js +0 -11
- package/dist/IconThreeDRotation-8ba20beb.js +0 -26
- package/dist/IconTrophy-3a84843d.js +0 -11
- package/dist/IconTune-8d1f5475.js +0 -11
- package/dist/IconTwitter-bff7aa81.js +0 -11
- package/dist/IconVideocam-c90004a7.js +0 -11
- package/dist/IconViewInAr-9c1793fa.js +0 -11
- package/dist/IconVisibility-7eecd864.js +0 -11
- package/dist/IconVolumeOff-aebdfc74.js +0 -11
- package/dist/IconVolumeOn-023c1853.js +0 -11
- package/dist/IconWarning-5719af6f.js +0 -11
- package/dist/IconYoutube-554684e4.js +0 -11
- package/dist/index-b7b97ebf.js +0 -2165
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { action } from '@storybook/addon-actions';
|
|
2
|
+
|
|
3
|
+
import type { Tab } from '@/types/Tab';
|
|
4
|
+
|
|
5
|
+
import TideTabs from '@/components/TideTabs.vue';
|
|
6
|
+
import { change, disabledArgType, doSomething, getLabelsFromOptions, parameters } from '@/utilities/storybook';
|
|
7
|
+
|
|
8
|
+
/* eslint-disable */
|
|
9
|
+
// ^ Storybook controls are based on iterating over object properties instead of array slots (bad form), so these can't be ordered alphabetically.
|
|
10
|
+
const options = {
|
|
11
|
+
'None': undefined,
|
|
12
|
+
'Tab 1': 0,
|
|
13
|
+
'Tab 2': 1,
|
|
14
|
+
'Tab 3': 2,
|
|
15
|
+
};
|
|
16
|
+
/* eslint-enable */
|
|
17
|
+
|
|
18
|
+
const tabs: Tab[] = [
|
|
19
|
+
{
|
|
20
|
+
dataTrack: 'Tab 0 Click',
|
|
21
|
+
label: 'First Tab',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
dataTrack: 'Tab 1 Click',
|
|
25
|
+
label: 'Second Tab',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
dataTrack: 'Tab 2 Click',
|
|
29
|
+
label: 'Third Tab',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const render = (args: any) => ({
|
|
34
|
+
components: { TideTabs },
|
|
35
|
+
methods: {
|
|
36
|
+
doSomething,
|
|
37
|
+
handleEmit: (event: Event, index: number) => {
|
|
38
|
+
action(`Current tab ${index}`)(event, { index });
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const performCallback = eval(args.handleEmit);
|
|
42
|
+
|
|
43
|
+
if (performCallback) {
|
|
44
|
+
performCallback();
|
|
45
|
+
}
|
|
46
|
+
} catch {
|
|
47
|
+
alert('Please specify a valid handler in the "change" control.');
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
setup: () => ({ args }),
|
|
52
|
+
template:
|
|
53
|
+
'<TideTabs @change="handleEmit" :key="args.activeTabInitial" class="tide-display-inline-flex" v-bind="args" />',
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
argTypes: {
|
|
58
|
+
activeTabInitial: {
|
|
59
|
+
control: {
|
|
60
|
+
labels: getLabelsFromOptions(options),
|
|
61
|
+
type: 'select',
|
|
62
|
+
},
|
|
63
|
+
description: 'Determines which tab should be active by default<br />(Subsequently managed within component)',
|
|
64
|
+
isDynamic: true,
|
|
65
|
+
options: Object.values(options),
|
|
66
|
+
table: {
|
|
67
|
+
defaultValue: { summary: 'None' },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
change: disabledArgType,
|
|
71
|
+
handleEmit: {
|
|
72
|
+
...change,
|
|
73
|
+
table: {
|
|
74
|
+
defaultValue: { summary: 'None' },
|
|
75
|
+
type: { summary: '(event: Event, tabIndex: number) => void' },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
tabs: {
|
|
79
|
+
control: 'object',
|
|
80
|
+
description: 'Sets label and callback for each tab',
|
|
81
|
+
isCustom: true,
|
|
82
|
+
table: {
|
|
83
|
+
defaultValue: { summary: 'None' },
|
|
84
|
+
type: { summary: 'Tab[]' },
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
args: {
|
|
89
|
+
activeTabInitial: undefined,
|
|
90
|
+
handleEmit: 'doSomething',
|
|
91
|
+
tabs,
|
|
92
|
+
},
|
|
93
|
+
component: TideTabs,
|
|
94
|
+
parameters,
|
|
95
|
+
render,
|
|
96
|
+
tags: ['autodocs'],
|
|
97
|
+
title: 'Basic Components/TideTabs',
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const Demo = {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { action } from '@storybook/addon-actions';
|
|
2
|
+
|
|
3
|
+
import TideToggle from '@/components/TideToggle.vue';
|
|
4
|
+
import {
|
|
5
|
+
argTypeBooleanUnrequired,
|
|
6
|
+
change,
|
|
7
|
+
dataTrack,
|
|
8
|
+
disabledArgType,
|
|
9
|
+
doSomething,
|
|
10
|
+
parameters,
|
|
11
|
+
} from '@/utilities/storybook';
|
|
12
|
+
|
|
13
|
+
const render = (args: any, { updateArgs }: any) => ({
|
|
14
|
+
components: { TideToggle },
|
|
15
|
+
methods: {
|
|
16
|
+
doSomething,
|
|
17
|
+
handleEmit: (event: Event, isActive: boolean) => {
|
|
18
|
+
updateArgs({ ...args, isActive });
|
|
19
|
+
action('TideToggle changed')(event, { isActive });
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
const performCallback = eval(args.handleEmit);
|
|
23
|
+
|
|
24
|
+
if (performCallback) {
|
|
25
|
+
performCallback();
|
|
26
|
+
}
|
|
27
|
+
} catch {
|
|
28
|
+
alert('Please specify a valid handler in the "change" control.');
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
setup: () => ({ args }),
|
|
33
|
+
template: `<TideToggle @change="handleEmit" v-bind="args" />`,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
argTypes: {
|
|
38
|
+
change: disabledArgType,
|
|
39
|
+
dataTrack,
|
|
40
|
+
disabled: {
|
|
41
|
+
...argTypeBooleanUnrequired,
|
|
42
|
+
description: 'Determines clickability',
|
|
43
|
+
},
|
|
44
|
+
handleEmit: {
|
|
45
|
+
...change,
|
|
46
|
+
table: {
|
|
47
|
+
defaultValue: { summary: 'None' },
|
|
48
|
+
type: { summary: '(event: Event, tabIndex: number) => void' },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
isActive: {
|
|
52
|
+
...argTypeBooleanUnrequired,
|
|
53
|
+
description: 'Determines whether toggle is active',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
args: {
|
|
57
|
+
dataTrack: '',
|
|
58
|
+
disabled: undefined,
|
|
59
|
+
handleEmit: 'doSomething',
|
|
60
|
+
isActive: undefined,
|
|
61
|
+
},
|
|
62
|
+
component: TideToggle,
|
|
63
|
+
parameters,
|
|
64
|
+
render,
|
|
65
|
+
tags: ['autodocs'],
|
|
66
|
+
title: 'Basic Components/TideToggle',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const Demo = {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="Welcome" />
|
|
4
|
+
|
|
5
|
+
# Welcome to TIDE
|
|
6
|
+
|
|
7
|
+
> When building apps, one of the biggest challenges is to figure out if a piece of UI already exists in your codebase and how to use it for the new feature you're building.
|
|
8
|
+
>
|
|
9
|
+
> Storybook catalogues all your components and their use cases. Therefore, you can quickly browse it to find what you're looking for.
|
|
10
|
+
>
|
|
11
|
+
> Here's what the workflow looks like:
|
|
12
|
+
>
|
|
13
|
+
> * Use the sidebar to find the suitable component.
|
|
14
|
+
> * Review its stories to select the variant that fulfills the requirements.
|
|
15
|
+
> * Copy/paste the code snippet into the app and wire it up to data.
|
|
16
|
+
|
|
17
|
+
*(Excerpted from the [Storybook docs](https://storybook.js.org/docs/vue/get-started/browse-stories#use-stories-to-build-uis))*
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const BADGE = {
|
|
2
|
+
JUST_LISTED: 'Just listed',
|
|
3
|
+
NATIONWIDE: 'Nationwide',
|
|
4
|
+
REDUCED: 'Reduced',
|
|
5
|
+
UPDATED: 'Updated',
|
|
6
|
+
} as const;
|
|
7
|
+
|
|
8
|
+
export const BADGE_PREMIUM = {
|
|
9
|
+
PREMIUM: 'Premium',
|
|
10
|
+
PREMIUM_SELECT: 'Premium SELECT',
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export const BADGE_TRUSTED = {
|
|
14
|
+
YEARS_10: '10',
|
|
15
|
+
YEARS_15: '15',
|
|
16
|
+
YEARS_5: '5',
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export type Badge = (typeof BADGE)[keyof typeof BADGE];
|
|
20
|
+
export type BadgePremium = (typeof BADGE_PREMIUM)[keyof typeof BADGE_PREMIUM];
|
|
21
|
+
export type BadgeTrustedYears = (typeof BADGE_TRUSTED)[keyof typeof BADGE_TRUSTED];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const ELEMENT = {
|
|
2
|
+
BUTTON: 'button',
|
|
3
|
+
LINK: 'a',
|
|
4
|
+
} as const;
|
|
5
|
+
|
|
6
|
+
export const ELEMENT_TEXT_AS_ICON = {
|
|
7
|
+
BUTTON: 'button',
|
|
8
|
+
DIV: 'div',
|
|
9
|
+
LINK: 'a',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export type Element = (typeof ELEMENT)[keyof typeof ELEMENT];
|
|
13
|
+
export type ElementTextAsIcon = (typeof ELEMENT_TEXT_AS_ICON)[keyof typeof ELEMENT_TEXT_AS_ICON];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { SelectOption } from '@/types/Select';
|
|
2
|
+
|
|
3
|
+
export const FACET_COMPONENT_ID_RANGE = {
|
|
4
|
+
GROSS_WEIGHT: 'grossWeight',
|
|
5
|
+
LENGTH: 'vehicleLength',
|
|
6
|
+
MILEAGE: 'mileage',
|
|
7
|
+
PRICE: 'price',
|
|
8
|
+
SLEEPING_CAPACITY: 'sleepingCapacity',
|
|
9
|
+
SLIDEOUTS: 'slideouts',
|
|
10
|
+
YEAR: 'vehicleYear',
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export type FacetComponentIdRange = (typeof FACET_COMPONENT_ID_RANGE)[keyof typeof FACET_COMPONENT_ID_RANGE];
|
|
14
|
+
|
|
15
|
+
export type RangeData = {
|
|
16
|
+
min: number | null;
|
|
17
|
+
max: number | null;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const GROSS_WEIGHT_MIN = 1000;
|
|
21
|
+
const GROSS_WEIGHT_MAX = 12000;
|
|
22
|
+
export const GROSS_WEIGHT_OPTIONS: SelectOption[] = [
|
|
23
|
+
{
|
|
24
|
+
label: 'Any',
|
|
25
|
+
value: null,
|
|
26
|
+
},
|
|
27
|
+
...Array.from({ length: Math.floor((GROSS_WEIGHT_MAX - GROSS_WEIGHT_MIN) / 1000) + 1 }, (_, index) => ({
|
|
28
|
+
label: (GROSS_WEIGHT_MAX - index * 1000).toString(),
|
|
29
|
+
value: (GROSS_WEIGHT_MAX - index * 1000).toString(),
|
|
30
|
+
})),
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const SLEEP_CAP_MIN = 1;
|
|
34
|
+
const SLEEP_CAP_MAX = 10;
|
|
35
|
+
export const SLEEPING_CAPACITY_OPTIONS: SelectOption[] = [
|
|
36
|
+
{
|
|
37
|
+
label: 'Any',
|
|
38
|
+
value: null,
|
|
39
|
+
},
|
|
40
|
+
...Array.from({ length: SLEEP_CAP_MAX - SLEEP_CAP_MIN + 1 }, (_, index) => ({
|
|
41
|
+
label: (SLEEP_CAP_MAX - index).toString(),
|
|
42
|
+
value: (SLEEP_CAP_MAX - index).toString(),
|
|
43
|
+
})),
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
const SLIDEOUT_MIN = 0;
|
|
47
|
+
const SLIDEOUT_MAX = 5;
|
|
48
|
+
export const SLIDEOUT_OPTIONS: SelectOption[] = [
|
|
49
|
+
{
|
|
50
|
+
label: 'Any',
|
|
51
|
+
value: null,
|
|
52
|
+
},
|
|
53
|
+
...Array.from({ length: SLIDEOUT_MAX - SLIDEOUT_MIN + 1 }, (_, index) => ({
|
|
54
|
+
label: (SLIDEOUT_MAX - index).toString(),
|
|
55
|
+
value: (SLIDEOUT_MAX - index).toString(),
|
|
56
|
+
})),
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const LENGTH_MIN = 10;
|
|
60
|
+
const LENGTH_MAX = 50;
|
|
61
|
+
export const LENGTH_OPTIONS: SelectOption[] = [
|
|
62
|
+
{
|
|
63
|
+
label: 'Any',
|
|
64
|
+
value: null,
|
|
65
|
+
},
|
|
66
|
+
...Array.from({ length: LENGTH_MAX - LENGTH_MIN + 1 }, (_, index) => ({
|
|
67
|
+
label: (LENGTH_MAX - index).toString(),
|
|
68
|
+
value: (LENGTH_MAX - index).toString(),
|
|
69
|
+
})),
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
const YEAR_MIN = 1900;
|
|
73
|
+
const today = new Date();
|
|
74
|
+
const YEAR_MAX = today.getFullYear() + 2;
|
|
75
|
+
export const YEAR_OPTIONS: SelectOption[] = [
|
|
76
|
+
{
|
|
77
|
+
label: 'Any',
|
|
78
|
+
value: null,
|
|
79
|
+
},
|
|
80
|
+
...Array.from({ length: YEAR_MAX - YEAR_MIN + 1 }, (_, index) => ({
|
|
81
|
+
label: (YEAR_MAX - index).toString(),
|
|
82
|
+
value: (YEAR_MAX - index).toString(),
|
|
83
|
+
})),
|
|
84
|
+
];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { FormValueTransformer } from '@/types/Form';
|
|
2
|
+
import type { SelectOption } from '@/types/Select';
|
|
3
|
+
import type { TextInputType } from '@/types/TextInput';
|
|
4
|
+
import type { ValidationError, Validator } from '@/types/Validation';
|
|
5
|
+
|
|
6
|
+
interface BooleanValue {
|
|
7
|
+
value?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface CheckboxField extends GenericInput, BooleanValue {
|
|
11
|
+
indeterminate?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface GenericField extends GenericInput {
|
|
15
|
+
transformValue?: FormValueTransformer;
|
|
16
|
+
validators?: Validator[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface GenericInput {
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
error: ValidationError;
|
|
22
|
+
label?: string;
|
|
23
|
+
name: string;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface SelectField extends GenericInput, StringValue {
|
|
28
|
+
options: SelectOption[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface StringValue {
|
|
32
|
+
value?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface TextareaField extends GenericField, StringValue {
|
|
36
|
+
maxlength?: number;
|
|
37
|
+
minlength?: number;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
value?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface TextField extends GenericField, StringValue {
|
|
43
|
+
maxlength?: number;
|
|
44
|
+
minlength?: number;
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
type?: TextInputType;
|
|
47
|
+
value?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type BooleanField = CheckboxField;
|
|
51
|
+
export type Field = SelectField | TextField | TextareaField | CheckboxField;
|
|
52
|
+
export type StringField = SelectField | TextField | TextareaField;
|
|
53
|
+
export type { BooleanValue, StringValue };
|
|
54
|
+
export type { CheckboxField, GenericField, GenericInput, SelectField, TextareaField, TextField };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SelectOptGroup, SelectOption } from '@/types/Select';
|
|
2
|
+
import type { TextInputType } from '@/types/TextInput';
|
|
3
|
+
import type { ValidationError, Validator } from '@/types/Validation';
|
|
4
|
+
|
|
5
|
+
interface GenericInput {
|
|
6
|
+
error?: ValidationError;
|
|
7
|
+
transformValue?: FormValueTransformer;
|
|
8
|
+
name: string;
|
|
9
|
+
validators?: Validator[];
|
|
10
|
+
required?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface StringValue {
|
|
16
|
+
value?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface BooleanValue {
|
|
20
|
+
value?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type SelectInput = GenericInput &
|
|
24
|
+
StringValue & {
|
|
25
|
+
options?: SelectOption[] | readonly SelectOption[];
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
optgroups?: SelectOptGroup[];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type TextInput = GenericInput &
|
|
31
|
+
StringValue & {
|
|
32
|
+
autocomplete?: boolean;
|
|
33
|
+
maxlength?: number;
|
|
34
|
+
minlength?: number;
|
|
35
|
+
type?: TextInputType;
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
value?: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type TextareaInput = GenericInput &
|
|
41
|
+
StringValue & {
|
|
42
|
+
maxlength?: number;
|
|
43
|
+
minlength?: number;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
value?: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type CheckboxInput = GenericInput &
|
|
49
|
+
BooleanValue & {
|
|
50
|
+
checked?: boolean;
|
|
51
|
+
indeterminate?: boolean;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type StringInput = SelectInput | TextInput | TextareaInput;
|
|
55
|
+
export type BooleanInput = CheckboxInput;
|
|
56
|
+
export type Input = SelectInput | TextInput | TextareaInput | CheckboxInput;
|
|
57
|
+
|
|
58
|
+
export type FormValueTransformer = (value: string) => string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { formatNumber, formatPhone, formatPrice } from '@/utilities/format';
|
|
2
|
+
|
|
3
|
+
export type Formatted = {
|
|
4
|
+
[key: string]: string | string[] | number;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const FORMAT = {
|
|
8
|
+
NUMBER: formatNumber,
|
|
9
|
+
PHONE: formatPhone,
|
|
10
|
+
PRICE: formatPrice,
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export const FORMAT_REGEX = {
|
|
14
|
+
alpha: /^[a-zA-Z]+$/g,
|
|
15
|
+
alphaNumberOrEmpty: /^$|^[a-z0-9]+$/i,
|
|
16
|
+
alphaSpace: /^[a-zA-Z ]+$/g,
|
|
17
|
+
email:
|
|
18
|
+
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
19
|
+
numberFormatted: /^$|(?=.)^\$?(([1-9][0-9]{0,2}(,[0-9]{3})*)|0)?(\.[0-9]{1,2})?$/,
|
|
20
|
+
phone: /^(?:\d{3}-\d{3}-\d{4}|\d{1}-\d{3}-\d{3}-\d{4})?$/,
|
|
21
|
+
price: /(?=.)^\$?(([1-9][0-9]{0,2}(,[0-9]{3})*)|0)?(\.[0-9]{1,2})?$/,
|
|
22
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const ICON = {
|
|
2
|
+
ACCOUNT_BALANCE: 'account-balance',
|
|
3
|
+
ADD: 'add',
|
|
4
|
+
AI_DESCRIPTION: 'ai-description',
|
|
5
|
+
ALIGN_SPACE: 'align-space',
|
|
6
|
+
APPLE_PAY: 'apple-pay',
|
|
7
|
+
ARROW_BACK: 'arrow-back',
|
|
8
|
+
ARROW_FORWARD: 'arrow-forward',
|
|
9
|
+
ARROW_RIGHT: 'arrow-right',
|
|
10
|
+
ASSIGNMENT: 'assignment',
|
|
11
|
+
AWARD_STAR: 'award-star',
|
|
12
|
+
BOOKMARK: 'bookmark',
|
|
13
|
+
CALENDAR_MONTH: 'calendar-month',
|
|
14
|
+
CALL: 'call',
|
|
15
|
+
CHECK: 'check',
|
|
16
|
+
CHEVRON_LEFT: 'chevron-left',
|
|
17
|
+
CHEVRON_RIGHT: 'chevron-right',
|
|
18
|
+
CLEAR: 'clear',
|
|
19
|
+
CLOSE: 'close',
|
|
20
|
+
CYCLE: 'cycle',
|
|
21
|
+
DELETE: 'delete',
|
|
22
|
+
DIAMOND: 'diamond',
|
|
23
|
+
DRAFT: 'draft',
|
|
24
|
+
EDIT: 'edit',
|
|
25
|
+
ERROR: 'error',
|
|
26
|
+
EXPAND_CONTENT: 'expand-content',
|
|
27
|
+
EXPAND_LESS: 'expand-less',
|
|
28
|
+
EXPAND_MORE: 'expand-more',
|
|
29
|
+
FACEBOOK: 'facebook',
|
|
30
|
+
FAVORITE: 'favorite',
|
|
31
|
+
FAVORITE_FILLED: 'favorite-filled',
|
|
32
|
+
FORMAT_BOLD: 'format-bold',
|
|
33
|
+
FORMAT_ITALIC: 'format-italic',
|
|
34
|
+
FORMAT_LIST_BULLETED: 'format-list-bulleted',
|
|
35
|
+
FORUM: 'forum',
|
|
36
|
+
GAVEL: 'gavel',
|
|
37
|
+
GOOGLE: 'google',
|
|
38
|
+
GOOGLE_PAY: 'google-pay',
|
|
39
|
+
GRID: 'grid',
|
|
40
|
+
HEIGHT: 'height',
|
|
41
|
+
HELP: 'help',
|
|
42
|
+
INFO: 'info',
|
|
43
|
+
INSERT_TEXT: 'insert-text',
|
|
44
|
+
INSTAGRAM: 'instagram',
|
|
45
|
+
IOS_SHARE: 'ios-share',
|
|
46
|
+
LAYOUT: 'layout',
|
|
47
|
+
LINKED_IN: 'linked in',
|
|
48
|
+
LOCAL_SHIPPING: 'local-shipping',
|
|
49
|
+
LOCK: 'lock',
|
|
50
|
+
MAIL: 'mail',
|
|
51
|
+
MENU: 'menu',
|
|
52
|
+
MORE_HORIZ: 'more-horiz',
|
|
53
|
+
NOTIFICATIONS: 'notifications',
|
|
54
|
+
OPEN_IN_NEW: 'open-in-new',
|
|
55
|
+
PALETTE: 'palette',
|
|
56
|
+
PAYPAL: 'paypal',
|
|
57
|
+
PERSON: 'person',
|
|
58
|
+
PHOTO_CAMERA: 'photo-camera',
|
|
59
|
+
PINTEREST: 'pinterest',
|
|
60
|
+
PLAY_ARROW: 'play-arrow',
|
|
61
|
+
REMOVE: 'remove',
|
|
62
|
+
ROUNDED_CORNERS: 'rounded-corners',
|
|
63
|
+
RULER: 'ruler',
|
|
64
|
+
SEARCH: 'search',
|
|
65
|
+
SEATING: 'seating',
|
|
66
|
+
SELL: 'sell',
|
|
67
|
+
SHARE: 'share',
|
|
68
|
+
SHOPPING_CART: 'shopping-cart',
|
|
69
|
+
SMS: 'sms',
|
|
70
|
+
STAR: 'star',
|
|
71
|
+
SWAP_VERT: 'swap-vert',
|
|
72
|
+
THREE_D_ROTATION: 'three-d-rotation',
|
|
73
|
+
TROPHY: 'trophy',
|
|
74
|
+
TUNE: 'tune',
|
|
75
|
+
TWITTER: 'twitter',
|
|
76
|
+
VIDEOCAM: 'videocam',
|
|
77
|
+
VIEW_IN_AR: 'view-in-ar',
|
|
78
|
+
VISIBILITY: 'visibility',
|
|
79
|
+
VOLUME_OFF: 'volume-off',
|
|
80
|
+
VOLUME_ON: 'volume-on',
|
|
81
|
+
WARNING: 'warning',
|
|
82
|
+
WEIGHT: 'weight',
|
|
83
|
+
WIDTH: 'width',
|
|
84
|
+
YOUTUBE: 'youtube',
|
|
85
|
+
} as const;
|
|
86
|
+
|
|
87
|
+
export type Icon = (typeof ICON)[keyof typeof ICON];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These slides are used in both the inline detail page photo slider
|
|
3
|
+
* and the fullscreen media gallery.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const MEDIA_SLIDE_TYPES = {
|
|
7
|
+
IMAGE: {
|
|
8
|
+
FLOORPLAN: 'floorplan',
|
|
9
|
+
IMAGE: 'image',
|
|
10
|
+
},
|
|
11
|
+
VIDEO: 'video',
|
|
12
|
+
VR: 'vr',
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export type MediaSlideType =
|
|
16
|
+
| (typeof MEDIA_SLIDE_TYPES.IMAGE)[keyof typeof MEDIA_SLIDE_TYPES.IMAGE]
|
|
17
|
+
| typeof MEDIA_SLIDE_TYPES.VIDEO
|
|
18
|
+
| typeof MEDIA_SLIDE_TYPES.VR;
|
|
19
|
+
|
|
20
|
+
export type ImageSlideType = (typeof MEDIA_SLIDE_TYPES.IMAGE)[keyof typeof MEDIA_SLIDE_TYPES.IMAGE];
|
|
21
|
+
|
|
22
|
+
type ImageSlide = {
|
|
23
|
+
imageUrl: string;
|
|
24
|
+
type: ImageSlideType;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type VideoSlideType = typeof MEDIA_SLIDE_TYPES.VIDEO;
|
|
28
|
+
|
|
29
|
+
type VideoSlide = {
|
|
30
|
+
imageUrl: string;
|
|
31
|
+
type: VideoSlideType;
|
|
32
|
+
videoUrl: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type VrSlideType = typeof MEDIA_SLIDE_TYPES.VR;
|
|
36
|
+
|
|
37
|
+
type VrSlide = {
|
|
38
|
+
imageUrl: string;
|
|
39
|
+
type: VrSlideType;
|
|
40
|
+
vrUrl: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type ListingMedia = ImageSlide | VideoSlide | VrSlide;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable vue/sort-keys */
|
|
2
|
+
|
|
3
|
+
export const PRIORITY = {
|
|
4
|
+
PRIMARY: 'primary',
|
|
5
|
+
SECONDARY: 'secondary',
|
|
6
|
+
TERTIARY: 'tertiary',
|
|
7
|
+
QUATERNARY: 'quaternary',
|
|
8
|
+
FLOATING: 'floating',
|
|
9
|
+
} as const;
|
|
10
|
+
|
|
11
|
+
export type Priority = (typeof PRIORITY)[keyof typeof PRIORITY];
|
package/src/types/Raw.ts
ADDED