@salesforcedevs/dx-components 0.26.1-alpha0.4 → 0.26.2
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/LICENSE +12 -0
- package/package.json +4 -5
- package/src/assets/icons/action-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/brand-sprite/svg/symbols.svg +1381 -0
- package/src/assets/icons/custom-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/doctype-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/general-sprite/svg/symbols.svg +3013 -0
- package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +257 -0
- package/src/assets/icons/standard-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/utility-sprite/svg/symbols.svg +1 -0
- package/src/assets/svg/card-news-learn-moar.svg +415 -0
- package/src/assets/svg/cloud-1.svg +24 -0
- package/src/assets/svg/cloud-2.svg +18 -0
- package/src/assets/svg/codey.svg +93 -0
- package/src/assets/svg/command.svg +9 -0
- package/src/assets/svg/control.svg +10 -0
- package/src/assets/svg/docs-empty-state-small.svg +72 -0
- package/src/assets/svg/docs-empty-state.svg +86 -0
- package/src/assets/svg/dsc-home-news-bear.svg +3 -0
- package/src/assets/svg/dsc-home-news-community.png +0 -0
- package/src/assets/svg/dsc-home-news-goatbear.svg +257 -0
- package/src/assets/svg/dsc-home-news-samplegallery.svg +76 -0
- package/src/assets/svg/empty-state-assistant.svg +1 -0
- package/src/assets/svg/fch-blog-cloud-1.png +0 -0
- package/src/assets/svg/fch-blog-cloud-2.png +0 -0
- package/src/assets/svg/fch-blog-planet.png +0 -0
- package/src/assets/svg/feature-backdrop1.svg +10 -0
- package/src/assets/svg/feature-backdrop2.svg +10 -0
- package/src/assets/svg/featured-demo-art-blank.svg +76 -0
- package/src/assets/svg/featured-demo-art-eBikes.svg +77 -0
- package/src/assets/svg/footer-graphic-large.svg +207 -0
- package/src/assets/svg/footer-graphic-mountains-small.svg +17 -0
- package/src/assets/svg/footer-graphic-mountains.svg +21 -0
- package/src/assets/svg/footer-graphic-trees-small.svg +33 -0
- package/src/assets/svg/footer-graphic-trees.svg +62 -0
- package/src/assets/svg/lake-mountain.svg +79 -0
- package/src/assets/svg/podcast-subscription-clouds-small.svg +49 -0
- package/src/assets/svg/podcast-subscription-clouds.svg +57 -0
- package/src/assets/svg/podcasts-subscription-apple.svg +164 -0
- package/src/assets/svg/podcasts-subscription-google.svg +29 -0
- package/src/assets/svg/podcasts-subscription-spotify.svg +11 -0
- package/src/assets/svg/salesforce-cloud.svg +7 -0
- package/src/assets/svg/salesforce-logo-corporate.svg +21 -0
- package/src/assets/svg/salesforce-logo.svg +14 -0
- package/src/assets/svg/sidebar-loading.svg +34 -0
- package/src/assets/svg/slack-cta-podcast-background-left.svg +28 -0
- package/src/assets/svg/slack-cta-podcast-background-right.svg +38 -0
- package/src/assets/svg/trees.svg +42 -0
- package/src/modules/dx/banner/__tests__/banner.test.ts +33 -0
- package/src/modules/dx/banner/banner.css +46 -0
- package/src/modules/dx/banner/banner.html +13 -0
- package/src/modules/dx/banner/banner.ts +14 -0
- package/src/modules/dx/brandThemeProvider/__tests__/brandThemeProvider.test.ts +49 -0
- package/src/modules/dx/brandThemeProvider/brandCssVars.ts +10 -0
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.html +3 -0
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.stories.ts +321 -0
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.ts +46 -0
- package/src/modules/dx/breadcrumbs/__tests__/breadcrumbs.test.ts +140 -0
- package/src/modules/dx/breadcrumbs/__tests__/mockProps.ts +28 -0
- package/src/modules/dx/breadcrumbs/breadcrumbs.css +111 -0
- package/src/modules/dx/breadcrumbs/breadcrumbs.html +44 -0
- package/src/modules/dx/breadcrumbs/breadcrumbs.stories.ts +39 -0
- package/src/modules/dx/breadcrumbs/breadcrumbs.ts +122 -0
- package/src/modules/dx/button/__tests__/button.test.ts +107 -0
- package/src/modules/dx/button/button.css +175 -0
- package/src/modules/dx/button/button.html +43 -0
- package/src/modules/dx/button/button.stories.ts +150 -0
- package/src/modules/dx/button/button.ts +63 -0
- package/src/modules/dx/cardBlogPost/__tests__/cardBlogPost.test.ts +26 -0
- package/src/modules/dx/cardBlogPost/__tests__/mockProps.ts +12 -0
- package/src/modules/dx/cardBlogPost/cardBlogPost.css +13 -0
- package/src/modules/dx/cardBlogPost/cardBlogPost.html +24 -0
- package/src/modules/dx/cardBlogPost/cardBlogPost.stories.ts +164 -0
- package/src/modules/dx/cardBlogPost/cardBlogPost.ts +23 -0
- package/src/modules/dx/cardBlogPostProvider/__tests__/cardBlogPostProvider.test.ts +34 -0
- package/src/modules/dx/cardBlogPostProvider/__tests__/mockWordpressPosts.ts +44 -0
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.css +3 -0
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.html +16 -0
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.ts +29 -0
- package/src/modules/dx/cardCallout/__tests__/cardCallout.test.ts +20 -0
- package/src/modules/dx/cardCallout/__tests__/mockProps.ts +7 -0
- package/src/modules/dx/cardCallout/cardCallout.css +57 -0
- package/src/modules/dx/cardCallout/cardCallout.html +15 -0
- package/src/modules/dx/cardCallout/cardCallout.stories.ts +33 -0
- package/src/modules/dx/cardCallout/cardCallout.ts +37 -0
- package/src/modules/dx/cardContent/__tests__/cardContent.test.ts +100 -0
- package/src/modules/dx/cardContent/__tests__/mockProps.ts +13 -0
- package/src/modules/dx/cardContent/cardContent.css +52 -0
- package/src/modules/dx/cardContent/cardContent.html +59 -0
- package/src/modules/dx/cardContent/cardContent.stories.ts +127 -0
- package/src/modules/dx/cardContent/cardContent.ts +68 -0
- package/src/modules/dx/cardDemo/cardDemo.css +1 -0
- package/src/modules/dx/cardDemo/cardDemo.html +12 -0
- package/src/modules/dx/cardDemo/cardDemo.stories.ts +115 -0
- package/src/modules/dx/cardDemo/cardDemo.ts +11 -0
- package/src/modules/dx/cardDocs/__tests__/cardDocs.test.ts +48 -0
- package/src/modules/dx/cardDocs/__tests__/mockProps.ts +9 -0
- package/src/modules/dx/cardDocs/cardDocs.css +50 -0
- package/src/modules/dx/cardDocs/cardDocs.html +20 -0
- package/src/modules/dx/cardDocs/cardDocs.stories.ts +299 -0
- package/src/modules/dx/cardDocs/cardDocs.ts +30 -0
- package/src/modules/dx/cardEvent/__tests__/cardEvent.test.ts +95 -0
- package/src/modules/dx/cardEvent/__tests__/mockProps.ts +10 -0
- package/src/modules/dx/cardEvent/cardEvent.css +107 -0
- package/src/modules/dx/cardEvent/cardEvent.html +94 -0
- package/src/modules/dx/cardEvent/cardEvent.stories.ts +153 -0
- package/src/modules/dx/cardEvent/cardEvent.ts +42 -0
- package/src/modules/dx/cardExpanded/__tests__/cardExpanded.test.ts +193 -0
- package/src/modules/dx/cardExpanded/__tests__/mockProps.ts +21 -0
- package/src/modules/dx/cardExpanded/cardExpanded.css +49 -0
- package/src/modules/dx/cardExpanded/cardExpanded.html +37 -0
- package/src/modules/dx/cardExpanded/cardExpanded.stories.ts +59 -0
- package/src/modules/dx/cardExpanded/cardExpanded.ts +45 -0
- package/src/modules/dx/cardGrid/__tests__/cardMockProps.ts +431 -0
- package/src/modules/dx/cardGrid/__tests__/mockProps.ts +15 -0
- package/src/modules/dx/cardGrid/cardGrid.css +89 -0
- package/src/modules/dx/cardGrid/cardGrid.html +46 -0
- package/src/modules/dx/cardGrid/cardGrid.stories.ts +111 -0
- package/src/modules/dx/cardGrid/cardGrid.ts +140 -0
- package/src/modules/dx/cardMinimal/__tests__/cardMinimal.test.ts +87 -0
- package/src/modules/dx/cardMinimal/__tests__/mockProps.ts +10 -0
- package/src/modules/dx/cardMinimal/cardMinimal.css +31 -0
- package/src/modules/dx/cardMinimal/cardMinimal.html +13 -0
- package/src/modules/dx/cardMinimal/cardMinimal.stories.ts +32 -0
- package/src/modules/dx/cardMinimal/cardMinimal.ts +3 -0
- package/src/modules/dx/cardNews/__tests__/cardNews.test.ts +58 -0
- package/src/modules/dx/cardNews/__tests__/mockProps.ts +7 -0
- package/src/modules/dx/cardNews/cardNews.css +159 -0
- package/src/modules/dx/cardNews/cardNews.html +37 -0
- package/src/modules/dx/cardNews/cardNews.stories.ts +115 -0
- package/src/modules/dx/cardNews/cardNews.ts +62 -0
- package/src/modules/dx/cardPodcastEpisode/__tests__/cardPodcastEpisode.test.ts +68 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.css +19 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.html +36 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.stories.ts +31 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.ts +36 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/cardPodcastEpisodeProvider.test.ts +36 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/mockWordpressEpisodes.ts +50 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.css +3 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.html +12 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.ts +29 -0
- package/src/modules/dx/cardSmall/__tests__/cardSmall.test.ts +66 -0
- package/src/modules/dx/cardSmall/__tests__/mockProps.ts +8 -0
- package/src/modules/dx/cardSmall/cardSmall.css +32 -0
- package/src/modules/dx/cardSmall/cardSmall.html +42 -0
- package/src/modules/dx/cardSmall/cardSmall.stories.ts +166 -0
- package/src/modules/dx/cardSmall/cardSmall.ts +38 -0
- package/src/modules/dx/cardTitle/__tests__/cardTitle.test.ts +46 -0
- package/src/modules/dx/cardTitle/cardTitle.css +41 -0
- package/src/modules/dx/cardTitle/cardTitle.html +20 -0
- package/src/modules/dx/cardTitle/cardTitle.ts +27 -0
- package/src/modules/dx/cardTrailheadModule/__tests__/cardTrailheadModule.test.ts +18 -0
- package/src/modules/dx/cardTrailheadModule/__tests__/mockProps.ts +11 -0
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.css +24 -0
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.html +20 -0
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.stories.ts +122 -0
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.ts +18 -0
- package/src/modules/dx/cardVideoPreview/__tests__/cardVideoPreview.test.ts +22 -0
- package/src/modules/dx/cardVideoPreview/__tests__/mockProps.ts +11 -0
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.css +14 -0
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.html +26 -0
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.stories.ts +147 -0
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.ts +13 -0
- package/src/modules/dx/checkbox/__tests__/checkbox.test.ts +85 -0
- package/src/modules/dx/checkbox/__tests__/mockProps.ts +5 -0
- package/src/modules/dx/checkbox/checkbox.css +168 -0
- package/src/modules/dx/checkbox/checkbox.html +26 -0
- package/src/modules/dx/checkbox/checkbox.stories.ts +38 -0
- package/src/modules/dx/checkbox/checkbox.ts +55 -0
- package/src/modules/dx/checkboxGroup/__tests__/checkboxGroup.test.ts +80 -0
- package/src/modules/dx/checkboxGroup/__tests__/mockProps.ts +14 -0
- package/src/modules/dx/checkboxGroup/checkboxGroup.css +12 -0
- package/src/modules/dx/checkboxGroup/checkboxGroup.html +15 -0
- package/src/modules/dx/checkboxGroup/checkboxGroup.stories.ts +33 -0
- package/src/modules/dx/checkboxGroup/checkboxGroup.ts +77 -0
- package/src/modules/dx/codeBlock/__tests__/codeBlock.test.ts +238 -0
- package/src/modules/dx/codeBlock/__tests__/mockProps.ts +160 -0
- package/src/modules/dx/codeBlock/codeBlock.css +128 -0
- package/src/modules/dx/codeBlock/codeBlock.html +79 -0
- package/src/modules/dx/codeBlock/codeBlock.stories.ts +143 -0
- package/src/modules/dx/codeBlock/codeBlock.ts +215 -0
- package/src/modules/dx/codeBlock/darkTheme.css +88 -0
- package/src/modules/dx/codeBlock/lightTheme.css +72 -0
- package/src/modules/dx/dropdown/__tests__/dropdown.test.ts +165 -0
- package/src/modules/dx/dropdown/__tests__/mockNestedOptions.ts +96 -0
- package/src/modules/dx/dropdown/__tests__/mockOptions.ts +10 -0
- package/src/modules/dx/dropdown/__tests__/mockProps.ts +6 -0
- package/src/modules/dx/dropdown/dropdown.css +93 -0
- package/src/modules/dx/dropdown/dropdown.html +67 -0
- package/src/modules/dx/dropdown/dropdown.stories.ts +89 -0
- package/src/modules/dx/dropdown/dropdown.ts +182 -0
- package/src/modules/dx/dropdownOption/__tests__/dropdownOption.test.ts +112 -0
- package/src/modules/dx/dropdownOption/__tests__/mockProps.ts +20 -0
- package/src/modules/dx/dropdownOption/dropdownOption.css +61 -0
- package/src/modules/dx/dropdownOption/dropdownOption.html +53 -0
- package/src/modules/dx/dropdownOption/dropdownOption.ts +39 -0
- package/src/modules/dx/emptyState/__tests__/emptyState.test.ts +52 -0
- package/src/modules/dx/emptyState/__tests__/mockProps.ts +4 -0
- package/src/modules/dx/emptyState/emptyState.css +64 -0
- package/src/modules/dx/emptyState/emptyState.html +9 -0
- package/src/modules/dx/emptyState/emptyState.stories.ts +45 -0
- package/src/modules/dx/emptyState/emptyState.ts +20 -0
- package/src/modules/dx/feature/__tests__/feature.test.ts +51 -0
- package/src/modules/dx/feature/__tests__/mockProps.ts +8 -0
- package/src/modules/dx/feature/feature.css +135 -0
- package/src/modules/dx/feature/feature.html +33 -0
- package/src/modules/dx/feature/feature.ts +34 -0
- package/src/modules/dx/featureGrid/__tests__/featureGrid.test.ts +21 -0
- package/src/modules/dx/featureGrid/featureGrid.html +3 -0
- package/src/modules/dx/featureGrid/featureGrid.stories.ts +120 -0
- package/src/modules/dx/featureGrid/featureGrid.ts +15 -0
- package/src/modules/dx/featuredContentHeader/__tests__/featuredContentHeader.test.ts +178 -0
- package/src/modules/dx/featuredContentHeader/__tests__/mockProps.ts +73 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +469 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +96 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.stories.ts +153 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +113 -0
- package/src/modules/dx/featuredContentHeader/svgs.ts +35 -0
- package/src/modules/dx/featuresList/__tests__/featuresList.test.ts +43 -0
- package/src/modules/dx/featuresList/__tests__/mockProps.ts +17 -0
- package/src/modules/dx/featuresList/featuresList.css +24 -0
- package/src/modules/dx/featuresList/featuresList.html +20 -0
- package/src/modules/dx/featuresList/featuresList.stories.ts +30 -0
- package/src/modules/dx/featuresList/featuresList.ts +21 -0
- package/src/modules/dx/footer/__tests__/footer.test.ts +147 -0
- package/src/modules/dx/footer/__tests__/mockLocales.ts +7 -0
- package/src/modules/dx/footer/footer.css +405 -0
- package/src/modules/dx/footer/footer.html +145 -0
- package/src/modules/dx/footer/footer.stories.ts +88 -0
- package/src/modules/dx/footer/footer.ts +124 -0
- package/src/modules/dx/footer/links.ts +140 -0
- package/src/modules/dx/footerOption/__tests__/footerOption.test.ts +34 -0
- package/src/modules/dx/footerOption/__tests__/mockProps.ts +7 -0
- package/src/modules/dx/footerOption/footerOption.css +4 -0
- package/src/modules/dx/footerOption/footerOption.html +12 -0
- package/src/modules/dx/footerOption/footerOption.ts +19 -0
- package/src/modules/dx/formattedDateTime/__tests__/formattedDateTime.test.ts +25 -0
- package/src/modules/dx/formattedDateTime/__tests__/mockProps.ts +13 -0
- package/src/modules/dx/formattedDateTime/formattedDateTime.html +1 -0
- package/src/modules/dx/formattedDateTime/formattedDateTime.stories.ts +103 -0
- package/src/modules/dx/formattedDateTime/formattedDateTime.ts +72 -0
- package/src/modules/dx/grid/__tests__/grid.test.ts +32 -0
- package/src/modules/dx/grid/grid.css +48 -0
- package/src/modules/dx/grid/grid.html +3 -0
- package/src/modules/dx/grid/grid.md +14 -0
- package/src/modules/dx/grid/grid.stories.ts +134 -0
- package/src/modules/dx/grid/grid.ts +72 -0
- package/src/modules/dx/groupBio/__tests__/groupBio.test.ts +82 -0
- package/src/modules/dx/groupBio/__tests__/mockProps.ts +15 -0
- package/src/modules/dx/groupBio/groupBio.css +49 -0
- package/src/modules/dx/groupBio/groupBio.html +29 -0
- package/src/modules/dx/groupBio/groupBio.stories.ts +66 -0
- package/src/modules/dx/groupBio/groupBio.ts +41 -0
- package/src/modules/dx/groupText/__tests__/groupText.test.ts +69 -0
- package/src/modules/dx/groupText/__tests__/mockProps.ts +35 -0
- package/src/modules/dx/groupText/groupText.css +119 -0
- package/src/modules/dx/groupText/groupText.html +65 -0
- package/src/modules/dx/groupText/groupText.stories.ts +81 -0
- package/src/modules/dx/groupText/groupText.ts +93 -0
- package/src/modules/dx/headTags/headTags.html +3 -0
- package/src/modules/dx/headTags/headTags.ts +39 -0
- package/src/modules/dx/header/__benchmarks__/header.benchmark.js +45 -0
- package/src/modules/dx/header/__tests__/header.test.ts +236 -0
- package/src/modules/dx/header/__tests__/mockNavArchitects.ts +169 -0
- package/src/modules/dx/header/__tests__/mockNavDevelopers.ts +419 -0
- package/src/modules/dx/header/__tests__/mockNavs.ts +115 -0
- package/src/modules/dx/header/__tests__/mockProps.ts +164 -0
- package/src/modules/dx/header/header.css +109 -0
- package/src/modules/dx/header/header.html +129 -0
- package/src/modules/dx/header/header.stories.ts +172 -0
- package/src/modules/dx/header/header.ts +27 -0
- package/src/modules/dx/headerMobileNavMenu/__tests__/headerMobileNavMenu.test.ts +123 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +160 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.html +73 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +102 -0
- package/src/modules/dx/headerMobileNavMenuOption/__tests__/headerMobileNavMenuOption.test.ts +38 -0
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.css +5 -0
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.html +14 -0
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.ts +20 -0
- package/src/modules/dx/headerNav/__tests__/headerNav.test.ts +49 -0
- package/src/modules/dx/headerNav/headerNav.css +31 -0
- package/src/modules/dx/headerNav/headerNav.html +48 -0
- package/src/modules/dx/headerNav/headerNav.ts +56 -0
- package/src/modules/dx/headerSearch/__tests__/headerSearch.test.ts +182 -0
- package/src/modules/dx/headerSearch/__tests__/mockData.ts +11 -0
- package/src/modules/dx/headerSearch/__tests__/mockProps.ts +6 -0
- package/src/modules/dx/headerSearch/headerSearch.css +62 -0
- package/src/modules/dx/headerSearch/headerSearch.html +64 -0
- package/src/modules/dx/headerSearch/headerSearch.ts +159 -0
- package/src/modules/dx/helmet/__tests__/helmet.test.ts +52 -0
- package/src/modules/dx/helmet/helmet.css +83 -0
- package/src/modules/dx/helmet/helmet.html +39 -0
- package/src/modules/dx/helmet/helmet.stories.ts +53 -0
- package/src/modules/dx/helmet/helmet.ts +27 -0
- package/src/modules/dx/hr/__tests__/hr.test.ts +53 -0
- package/src/modules/dx/hr/__tests__/mockProps.ts +16 -0
- package/src/modules/dx/hr/hr.css +55 -0
- package/src/modules/dx/hr/hr.html +23 -0
- package/src/modules/dx/hr/hr.stories.ts +50 -0
- package/src/modules/dx/hr/hr.ts +45 -0
- package/src/modules/dx/icon/__tests__/icon.test.ts +54 -0
- package/src/modules/dx/icon/icon.css +14 -0
- package/src/modules/dx/icon/icon.html +11 -0
- package/src/modules/dx/icon/icon.stories.ts +100 -0
- package/src/modules/dx/icon/icon.ts +85 -0
- package/src/modules/dx/iconBadge/__tests__/iconBadge.test.ts +17 -0
- package/src/modules/dx/iconBadge/iconBadge.css +40 -0
- package/src/modules/dx/iconBadge/iconBadge.html +10 -0
- package/src/modules/dx/iconBadge/iconBadge.stories.ts +32 -0
- package/src/modules/dx/iconBadge/iconBadge.ts +42 -0
- package/src/modules/dx/imageAndLabel/__tests__/imageAndLabel.test.ts +39 -0
- package/src/modules/dx/imageAndLabel/__tests__/mockProps.ts +6 -0
- package/src/modules/dx/imageAndLabel/imageAndLabel.css +54 -0
- package/src/modules/dx/imageAndLabel/imageAndLabel.html +22 -0
- package/src/modules/dx/imageAndLabel/imageAndLabel.stories.ts +48 -0
- package/src/modules/dx/imageAndLabel/imageAndLabel.ts +16 -0
- package/src/modules/dx/input/__tests__/input.test.ts +357 -0
- package/src/modules/dx/input/input.css +165 -0
- package/src/modules/dx/input/input.html +58 -0
- package/src/modules/dx/input/input.stories.ts +102 -0
- package/src/modules/dx/input/input.ts +238 -0
- package/src/modules/dx/input/validators.ts +5 -0
- package/src/modules/dx/instrumentation/__tests__/instrumentation.test.ts +86 -0
- package/src/modules/dx/instrumentation/instrumentation.html +1 -0
- package/src/modules/dx/instrumentation/instrumentation.ts +116 -0
- package/src/modules/dx/interactiveImage/__tests__/interactiveImage.test.ts +83 -0
- package/src/modules/dx/interactiveImage/__tests__/mockProps.ts +39 -0
- package/src/modules/dx/interactiveImage/interactiveImage.css +59 -0
- package/src/modules/dx/interactiveImage/interactiveImage.html +32 -0
- package/src/modules/dx/interactiveImage/interactiveImage.stories.ts +31 -0
- package/src/modules/dx/interactiveImage/interactiveImage.ts +71 -0
- package/src/modules/dx/lazy/__tests__/lazy.test.ts +43 -0
- package/src/modules/dx/lazy/lazy.html +5 -0
- package/src/modules/dx/lazy/lazy.stories.ts +132 -0
- package/src/modules/dx/lazy/lazy.ts +163 -0
- package/src/modules/dx/logo/logo.css +33 -0
- package/src/modules/dx/logo/logo.html +6 -0
- package/src/modules/dx/logo/logo.ts +8 -0
- package/src/modules/dx/newsletterForm/newsletterForm.css +73 -0
- package/src/modules/dx/newsletterForm/newsletterForm.html +73 -0
- package/src/modules/dx/newsletterForm/newsletterForm.ts +238 -0
- package/src/modules/dx/pagination/__tests__/pagination.test.ts +121 -0
- package/src/modules/dx/pagination/pagination.css +51 -0
- package/src/modules/dx/pagination/pagination.html +45 -0
- package/src/modules/dx/pagination/pagination.stories.ts +88 -0
- package/src/modules/dx/pagination/pagination.ts +93 -0
- package/src/modules/dx/podcastHost/__tests__/mockProps.ts +8 -0
- package/src/modules/dx/podcastHost/__tests__/podcastHost.test.ts +21 -0
- package/src/modules/dx/podcastHost/podcastHost.css +62 -0
- package/src/modules/dx/podcastHost/podcastHost.html +28 -0
- package/src/modules/dx/podcastHost/podcastHost.stories.ts +17 -0
- package/src/modules/dx/podcastHost/podcastHost.ts +13 -0
- package/src/modules/dx/podcastPlayer/__tests__/podcastPlayer.test.ts +20 -0
- package/src/modules/dx/podcastPlayer/podcastPlayer.css +10 -0
- package/src/modules/dx/podcastPlayer/podcastPlayer.html +3 -0
- package/src/modules/dx/podcastPlayer/podcastPlayer.stories.ts +13 -0
- package/src/modules/dx/podcastPlayer/podcastPlayer.ts +5 -0
- package/src/modules/dx/podcastSubscription/__tests__/podcastSubscription.test.ts +16 -0
- package/src/modules/dx/podcastSubscription/podcastSubscription.css +91 -0
- package/src/modules/dx/podcastSubscription/podcastSubscription.html +24 -0
- package/src/modules/dx/podcastSubscription/podcastSubscription.stories.ts +23 -0
- package/src/modules/dx/podcastSubscription/podcastSubscription.ts +58 -0
- package/src/modules/dx/popover/__tests__/mockProps.ts +8 -0
- package/src/modules/dx/popover/__tests__/popover.test.ts +313 -0
- package/src/modules/dx/popover/popover.css +63 -0
- package/src/modules/dx/popover/popover.html +16 -0
- package/src/modules/dx/popover/popover.stories.ts +82 -0
- package/src/modules/dx/popover/popover.ts +313 -0
- package/src/modules/dx/radioGroup/__tests__/mockProps.ts +12 -0
- package/src/modules/dx/radioGroup/__tests__/radioGroup.test.ts +42 -0
- package/src/modules/dx/radioGroup/radioGroup.css +12 -0
- package/src/modules/dx/radioGroup/radioGroup.html +16 -0
- package/src/modules/dx/radioGroup/radioGroup.stories.ts +25 -0
- package/src/modules/dx/radioGroup/radioGroup.ts +65 -0
- package/src/modules/dx/relativeDateTime/__tests__/mockProps.ts +55 -0
- package/src/modules/dx/relativeDateTime/__tests__/relativeDateTime.test.ts +52 -0
- package/src/modules/dx/relativeDateTime/relativeDateTime.html +3 -0
- package/src/modules/dx/relativeDateTime/relativeDateTime.stories.ts +83 -0
- package/src/modules/dx/relativeDateTime/relativeDateTime.ts +113 -0
- package/src/modules/dx/searchResults/coveo.css +18989 -0
- package/src/modules/dx/searchResults/searchResults.css +387 -0
- package/src/modules/dx/searchResults/searchResults.html +104 -0
- package/src/modules/dx/searchResults/searchResults.stories.ts +36 -0
- package/src/modules/dx/searchResults/searchResults.ts +186 -0
- package/src/modules/dx/section/__tests__/section.test.ts +17 -0
- package/src/modules/dx/section/section.css +130 -0
- package/src/modules/dx/section/section.html +66 -0
- package/src/modules/dx/section/section.stories.ts +381 -0
- package/src/modules/dx/section/section.ts +41 -0
- package/src/modules/dx/sectionSignup/__tests__/sectionSignup.test.ts +66 -0
- package/src/modules/dx/sectionSignup/sectionSignup.css +43 -0
- package/src/modules/dx/sectionSignup/sectionSignup.html +23 -0
- package/src/modules/dx/sectionSignup/sectionSignup.stories.ts +49 -0
- package/src/modules/dx/sectionSignup/sectionSignup.ts +44 -0
- package/src/modules/dx/select/select.css +44 -0
- package/src/modules/dx/select/select.html +60 -0
- package/src/modules/dx/select/select.stories.ts +59 -0
- package/src/modules/dx/select/select.ts +23 -0
- package/src/modules/dx/sidebar/__tests__/mockProps.ts +181 -0
- package/src/modules/dx/sidebar/__tests__/mockSearchChangeEmptyEvent.ts +6 -0
- package/src/modules/dx/sidebar/__tests__/mockSearchChangeEvent.ts +527 -0
- package/src/modules/dx/sidebar/__tests__/sidebar.test.ts +568 -0
- package/src/modules/dx/sidebar/sidebar.css +192 -0
- package/src/modules/dx/sidebar/sidebar.html +94 -0
- package/src/modules/dx/sidebar/sidebar.stories.ts +188 -0
- package/src/modules/dx/sidebar/sidebar.ts +255 -0
- package/src/modules/dx/sidebarOld/__tests__/mockProps.ts +178 -0
- package/src/modules/dx/sidebarOld/__tests__/sidebarOld.test.ts +570 -0
- package/src/modules/dx/sidebarOld/sidebarOld.css +160 -0
- package/src/modules/dx/sidebarOld/sidebarOld.html +70 -0
- package/src/modules/dx/sidebarOld/sidebarOld.stories.ts +139 -0
- package/src/modules/dx/sidebarOld/sidebarOld.ts +187 -0
- package/src/modules/dx/sidebarSearch/__tests__/mockPreloadedState.ts +1686 -0
- package/src/modules/dx/sidebarSearch/__tests__/sidebarSearch.test.ts +175 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.css +3 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.html +26 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +440 -0
- package/src/modules/dx/sidebarSearchResult/__tests__/sidebarSearchResult.test.ts +96 -0
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +36 -0
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.html +14 -0
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.ts +70 -0
- package/src/modules/dx/skipNavLink/skipNavLink.css +21 -0
- package/src/modules/dx/skipNavLink/skipNavLink.html +3 -0
- package/src/modules/dx/skipNavLink/skipNavLink.ts +3 -0
- package/src/modules/dx/slackCta/__tests__/slackCta.test.ts +36 -0
- package/src/modules/dx/slackCta/slackCta.css +47 -0
- package/src/modules/dx/slackCta/slackCta.html +17 -0
- package/src/modules/dx/slackCta/slackCta.stories.ts +25 -0
- package/src/modules/dx/slackCta/slackCta.ts +12 -0
- package/src/modules/dx/socials/__tests__/socials.test.ts +114 -0
- package/src/modules/dx/socials/socials.css +35 -0
- package/src/modules/dx/socials/socials.html +22 -0
- package/src/modules/dx/socials/socials.stories.ts +24 -0
- package/src/modules/dx/socials/socials.ts +81 -0
- package/src/modules/dx/spinner/__tests__/spinner.test.ts +37 -0
- package/src/modules/dx/spinner/spinner.css +750 -0
- package/src/modules/dx/spinner/spinner.html +6 -0
- package/src/modules/dx/spinner/spinner.stories.ts +69 -0
- package/src/modules/dx/spinner/spinner.ts +20 -0
- package/src/modules/dx/tab/__tests__/tab.test.ts +129 -0
- package/src/modules/dx/tab/tab.css +106 -0
- package/src/modules/dx/tab/tab.html +13 -0
- package/src/modules/dx/tab/tab.stories.ts +57 -0
- package/src/modules/dx/tab/tab.ts +52 -0
- package/src/modules/dx/toc/__tests__/mockProps.ts +28 -0
- package/src/modules/dx/toc/__tests__/toc.test.ts +109 -0
- package/src/modules/dx/toc/toc.css +94 -0
- package/src/modules/dx/toc/toc.html +28 -0
- package/src/modules/dx/toc/toc.stories.ts +26 -0
- package/src/modules/dx/toc/toc.ts +77 -0
- package/src/modules/dx/tooltip/__tests__/tooltip.test.ts +22 -0
- package/src/modules/dx/tooltip/microtip.css +269 -0
- package/src/modules/dx/tooltip/tooltip.css +36 -0
- package/src/modules/dx/tooltip/tooltip.html +5 -0
- package/src/modules/dx/tooltip/tooltip.stories.ts +46 -0
- package/src/modules/dx/tooltip/tooltip.ts +6 -0
- package/src/modules/dx/topics/__tests__/mockProps.ts +3 -0
- package/src/modules/dx/topics/__tests__/topics.test.ts +31 -0
- package/src/modules/dx/topics/topics.css +25 -0
- package/src/modules/dx/topics/topics.html +12 -0
- package/src/modules/dx/topics/topics.ts +25 -0
- package/src/modules/dx/tree/__tests__/mockProps.ts +215 -0
- package/src/modules/dx/tree/__tests__/tree.test.ts +346 -0
- package/src/modules/dx/tree/__tests__/treeHandler.test.ts +194 -0
- package/src/modules/dx/tree/tree.css +5 -0
- package/src/modules/dx/tree/tree.html +11 -0
- package/src/modules/dx/tree/tree.stories.ts +65 -0
- package/src/modules/dx/tree/tree.ts +72 -0
- package/src/modules/dx/tree/treeHandler.ts +100 -0
- package/src/modules/dx/treeItem/__tests__/mockProps.ts +46 -0
- package/src/modules/dx/treeItem/__tests__/treeItem.test.ts +377 -0
- package/src/modules/dx/treeItem/treeItem.css +14 -0
- package/src/modules/dx/treeItem/treeItem.html +22 -0
- package/src/modules/dx/treeItem/treeItem.ts +110 -0
- package/src/modules/dx/treeTile/__tests__/mockProps.ts +16 -0
- package/src/modules/dx/treeTile/__tests__/treeTile.test.ts +168 -0
- package/src/modules/dx/treeTile/treeTile.css +190 -0
- package/src/modules/dx/treeTile/treeTile.html +27 -0
- package/src/modules/dx/treeTile/treeTile.ts +59 -0
- package/src/modules/dx/typeBadge/__tests__/typeBadge.test.ts +77 -0
- package/src/modules/dx/typeBadge/typeBadge.css +74 -0
- package/src/modules/dx/typeBadge/typeBadge.html +5 -0
- package/src/modules/dx/typeBadge/typeBadge.stories.ts +114 -0
- package/src/modules/dx/typeBadge/typeBadge.ts +65 -0
- package/src/modules/dx/typeBadgeGroup/__tests__/mockProps.ts +11 -0
- package/src/modules/dx/typeBadgeGroup/__tests__/typeBadgeGroup.test.ts +72 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +12 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +11 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.stories.ts +19 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +18 -0
- package/src/modules/helpers/animations/animations.css +15 -0
- package/src/modules/helpers/button/button.css +4 -0
- package/src/modules/helpers/card/card.css +258 -0
- package/src/modules/helpers/code/code.css +296 -0
- package/src/modules/helpers/commonHeader/commonHeader.css +130 -0
- package/src/modules/helpers/reset/reset.css +559 -0
- package/src/modules/helpers/sidebar/sidebar.css +21 -0
- package/src/modules/helpers/slds/slds.css +191 -0
- package/src/modules/helpers/table/table.css +110 -0
- package/src/modules/helpers/text/text.css +163 -0
- package/src/modules/test-components/buttonTest/buttonTest.html +3 -0
- package/src/modules/test-components/buttonTest/buttonTest.ts +3 -0
- package/src/modules/test-components/codeBlockTest/codeBlockTest.js +4 -0
- package/src/modules/test-components/featureGridTest/featureGridTest.html +7 -0
- package/src/modules/test-components/featureGridTest/featureGridTest.ts +5 -0
- package/src/modules/test-components/instrumentationTest/instrumentationTest.html +4 -0
- package/src/modules/test-components/instrumentationTest/instrumentationTest.ts +8 -0
- package/src/modules/test-components/popoverTest/popoverTest.html +6 -0
- package/src/modules/test-components/popoverTest/popoverTest.ts +5 -0
- package/src/modules/test-components/slackCtaTest/slackCtaTest.html +3 -0
- package/src/modules/test-components/slackCtaTest/slackCtaTest.ts +3 -0
- package/src/modules/utils/highlight/__tests__/highlight.test.ts +108 -0
- package/src/modules/utils/highlight/__tests__/mockProps.ts +45 -0
- package/src/modules/utils/highlight/highlight.ts +32 -0
- package/src/modules/utils/normalizers/normalizers.ts +91 -0
- package/src/modules/utils-internal/archiveCard/archiveCard.ts +35 -0
- package/src/modules/utils-internal/coveo/coveo.ts +70 -0
- package/src/modules/utils-internal/css/css.ts +43 -0
- package/src/modules/utils-internal/devices/devices.ts +1 -0
- package/src/modules/utils-internal/headerBase/headerBase.ts +204 -0
- package/src/modules/utils-internal/jest/jest.ts +58 -0
- package/src/modules/utils-internal/options/options.ts +39 -0
- package/src/modules/utils-internal/prismjs/prismjs.html +3 -0
- package/src/modules/utils-internal/prismjs/prismjs.ts +3321 -0
- package/src/modules/utils-internal/recentSearches/__tests__/recentSearches.test.ts +83 -0
- package/src/modules/utils-internal/recentSearches/recentSearches.ts +57 -0
- package/src/modules/utils-internal/regexps/regexps.ts +5 -0
- package/src/modules/utils-internal/seo/seo.ts +4 -0
- package/src/modules/utils-internal/slot/slot.ts +17 -0
- package/src/modules/utils-internal/storybook/storybook.ts +32 -0
- package/src/modules/utils-internal/tests/tests.ts +38 -0
- package/src/modules/utils-internal/wordpress/__tests__/wordpress.test.ts +15 -0
- package/src/modules/utils-internal/wordpress/wordpress.ts +13 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "dx/dx-card-news",
|
|
5
|
+
component: "dx-card-news"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const createStyles = () => html`
|
|
9
|
+
<style>
|
|
10
|
+
#large {
|
|
11
|
+
width: 700px;
|
|
12
|
+
}
|
|
13
|
+
dx-card-news {
|
|
14
|
+
width: 400px;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
min-width: 240px;
|
|
17
|
+
margin-bottom: 16px;
|
|
18
|
+
}
|
|
19
|
+
@media screen and (min-width: 1024px) {
|
|
20
|
+
dx-card-news {
|
|
21
|
+
margin-bottom: 24px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.title {
|
|
25
|
+
margin: 1rem 0;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const title = (value: string) => html`<div class="title">${value}</div>`;
|
|
31
|
+
|
|
32
|
+
export const Base = () => html`
|
|
33
|
+
${createStyles()} ${title("Large size, image in right side")}
|
|
34
|
+
|
|
35
|
+
<dx-card-news
|
|
36
|
+
id="large"
|
|
37
|
+
href="https://salesforce.com"
|
|
38
|
+
img-alt="Vector image of a lake and a mountain."
|
|
39
|
+
img-src="/assets/svg/dsc-home-news-bear.svg"
|
|
40
|
+
title="Salesforce Developer Survey"
|
|
41
|
+
body="Share your insights to help us improve your developer experience"
|
|
42
|
+
background-color="indigo-vibrant-20"
|
|
43
|
+
size="large"
|
|
44
|
+
button-text="Take the Survey"
|
|
45
|
+
button-type="large"
|
|
46
|
+
img-placement="right"
|
|
47
|
+
></dx-card-news>
|
|
48
|
+
|
|
49
|
+
${title("Regular size, no image")}
|
|
50
|
+
<dx-card-news
|
|
51
|
+
href="https://salesforce.com"
|
|
52
|
+
title="Sample Gallery"
|
|
53
|
+
body="Get hands-on with code by exploring our Sample Gallery, updated for Spring'21"
|
|
54
|
+
background-color="indigo-vibrant-90"
|
|
55
|
+
color="cloud-blue-vibrant-20"
|
|
56
|
+
button-text="Check It Out"
|
|
57
|
+
button-type="inline"
|
|
58
|
+
></dx-card-news>
|
|
59
|
+
|
|
60
|
+
${title("Regular size, with image at the bottom")}
|
|
61
|
+
<dx-card-news
|
|
62
|
+
href="https://salesforce.com"
|
|
63
|
+
img-alt="Vector image of a lake and a mountain."
|
|
64
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
65
|
+
title="LEARN MOAR"
|
|
66
|
+
body="Discover what's new for Admins and Developers in the Spring'21 Release"
|
|
67
|
+
background-color="cloud-blue-vibrant-90"
|
|
68
|
+
color="cloud-blue-vibrant-20"
|
|
69
|
+
button-text="Learn moar"
|
|
70
|
+
button-type="inline"
|
|
71
|
+
img-placement="bottom"
|
|
72
|
+
></dx-card-news>
|
|
73
|
+
|
|
74
|
+
${title("Regular size, with image at the top")}
|
|
75
|
+
<dx-card-news
|
|
76
|
+
href="https://salesforce.com"
|
|
77
|
+
img-alt="Vector image of a lake and a mountain."
|
|
78
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
79
|
+
title="LEARN MOAR"
|
|
80
|
+
body="Discover what's new for Admins and Developers in the Spring'21 Release"
|
|
81
|
+
background-color="cloud-blue-vibrant-90"
|
|
82
|
+
color="cloud-blue-vibrant-20"
|
|
83
|
+
button-text="Learn moar"
|
|
84
|
+
button-type="inline"
|
|
85
|
+
img-placement="top"
|
|
86
|
+
></dx-card-news>
|
|
87
|
+
|
|
88
|
+
${title("Regular size, with image at the top and longer text")}
|
|
89
|
+
|
|
90
|
+
<dx-card-news
|
|
91
|
+
img-alt="Vector image of a lake and a mountain."
|
|
92
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
93
|
+
title="Support the Black Community"
|
|
94
|
+
body="This is a longer text than usual. The image should scale down. Global President of BOLDForce, our employee resource group, shares 8 things you can do to act against racial injustice."
|
|
95
|
+
background-color="gray-10"
|
|
96
|
+
dark="true"
|
|
97
|
+
img-placement="top"
|
|
98
|
+
button-text="Learn more"
|
|
99
|
+
button-type="inline"
|
|
100
|
+
></dx-card-news>
|
|
101
|
+
|
|
102
|
+
${title("Regular size, with image at the bottom and longer text")}
|
|
103
|
+
|
|
104
|
+
<dx-card-news
|
|
105
|
+
img-alt="Vector image of a lake and a mountain."
|
|
106
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
107
|
+
title="Support the Black Community"
|
|
108
|
+
body="This is a longer text than usual. The image should scale down. Global President of BOLDForce, our employee resource group, shares 8 things you can do to act against racial injustice."
|
|
109
|
+
background-color="gray-10"
|
|
110
|
+
dark="true"
|
|
111
|
+
img-placement="bottom"
|
|
112
|
+
button-text="Learn more"
|
|
113
|
+
button-type="inline"
|
|
114
|
+
></dx-card-news>
|
|
115
|
+
`;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
import { toDxColor } from "utils-internal/css";
|
|
4
|
+
import {
|
|
5
|
+
CardNewsButtonType,
|
|
6
|
+
CardNewsImagePlacement,
|
|
7
|
+
CardNewsImageVerticalAlignment,
|
|
8
|
+
CardNewsSize,
|
|
9
|
+
CardNewsTextContainerSize
|
|
10
|
+
} from "typings/custom";
|
|
11
|
+
|
|
12
|
+
export default class CardNews extends LightningElement {
|
|
13
|
+
@api backgroundColor?: string = "indigo-vibrant-40";
|
|
14
|
+
@api body!: string;
|
|
15
|
+
@api buttonText?: string = "";
|
|
16
|
+
@api buttonType!: CardNewsButtonType;
|
|
17
|
+
@api color?: string = "white";
|
|
18
|
+
@api dark?: boolean = false;
|
|
19
|
+
@api size?: CardNewsSize = "normal";
|
|
20
|
+
@api href!: string;
|
|
21
|
+
@api imgAlt?: string = "";
|
|
22
|
+
@api imgSrc?: string | null = null;
|
|
23
|
+
@api imgPlacement?: CardNewsImagePlacement = "top";
|
|
24
|
+
@api imgVerticalAlign?: CardNewsImageVerticalAlignment | null = null;
|
|
25
|
+
@api target?: string | null = null;
|
|
26
|
+
@api title!: string;
|
|
27
|
+
@api textContainerWidth?: CardNewsTextContainerSize = "small";
|
|
28
|
+
|
|
29
|
+
private get style(): string {
|
|
30
|
+
const background = `background-color: ${toDxColor(
|
|
31
|
+
this.backgroundColor
|
|
32
|
+
)};`;
|
|
33
|
+
const color = `color: ${toDxColor(this.color)};`;
|
|
34
|
+
return [background, color].join(" ");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private get className(): string {
|
|
38
|
+
return cx(
|
|
39
|
+
"dx-card-news",
|
|
40
|
+
"dx-card-base",
|
|
41
|
+
`dx-card-size-${this.size}`,
|
|
42
|
+
this.dark && `is-dark`,
|
|
43
|
+
this.imgSrc && `dx-card-news-img-placement-${this.imgPlacement}`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private get hasLargeButton(): boolean {
|
|
48
|
+
return this.buttonType === "large";
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private get textContainerClassName(): string {
|
|
52
|
+
return cx("text", this.textContainerWidth);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private get imgClassName(): string {
|
|
56
|
+
return cx(
|
|
57
|
+
this.imgVerticalAlign &&
|
|
58
|
+
`dx-card-news-img-vertical-align-${this.imgVerticalAlign}`,
|
|
59
|
+
this.textContainerWidth === "large" && `dx-card-news-img-small`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import CardPodcastEpisode from "dx/cardPodcastEpisode";
|
|
2
|
+
import { createRenderComponent } from "utils-internal/tests";
|
|
3
|
+
|
|
4
|
+
const TAG = "dx-card-content";
|
|
5
|
+
const render = createRenderComponent(TAG, CardPodcastEpisode);
|
|
6
|
+
const fourHours = new Date(Date.now() - 1.44e7).toISOString();
|
|
7
|
+
const mockProps = {
|
|
8
|
+
body: "Test Body",
|
|
9
|
+
href: "https://developer.salesforce.com/",
|
|
10
|
+
length: "32 min",
|
|
11
|
+
number: "6",
|
|
12
|
+
title: "Becoming a Developer"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
describe(TAG, () => {
|
|
16
|
+
it("renders", () => {
|
|
17
|
+
const element = render({ ...mockProps, datetime: fourHours });
|
|
18
|
+
|
|
19
|
+
const title: HTMLElement =
|
|
20
|
+
element.shadowRoot.querySelector("dx-card-title");
|
|
21
|
+
const body: HTMLElement = element.shadowRoot.querySelector(".body");
|
|
22
|
+
const dateTime: HTMLElement = element.shadowRoot.querySelector(
|
|
23
|
+
"dx-relative-date-time"
|
|
24
|
+
);
|
|
25
|
+
const length: HTMLElement = element.shadowRoot.querySelector(".length");
|
|
26
|
+
|
|
27
|
+
expect(title).not.toBeNull();
|
|
28
|
+
expect(body).not.toBeNull();
|
|
29
|
+
expect(dateTime).not.toBeNull();
|
|
30
|
+
expect(length).not.toBeNull();
|
|
31
|
+
|
|
32
|
+
expect(title.title).toEqual("Becoming a Developer");
|
|
33
|
+
expect(body.textContent).toEqual("Test Body");
|
|
34
|
+
expect(length.textContent).toEqual("32 min");
|
|
35
|
+
|
|
36
|
+
return expect(element).toBeAccessible();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("fires events", () => {
|
|
40
|
+
const element = render(mockProps);
|
|
41
|
+
|
|
42
|
+
const link: HTMLElement = element.shadowRoot.querySelector("a");
|
|
43
|
+
const containerDiv: HTMLElement =
|
|
44
|
+
element.shadowRoot.querySelector("div");
|
|
45
|
+
link.dispatchEvent(new CustomEvent("mouseenter"));
|
|
46
|
+
|
|
47
|
+
return Promise.resolve()
|
|
48
|
+
.then(() => {
|
|
49
|
+
expect(containerDiv.classList).toContain(
|
|
50
|
+
"dx-card-base_link-hovered"
|
|
51
|
+
);
|
|
52
|
+
link.dispatchEvent(new CustomEvent("mouseleave"));
|
|
53
|
+
})
|
|
54
|
+
.then(() => {
|
|
55
|
+
expect(containerDiv.classList).not.toContain(
|
|
56
|
+
"dx-card-base_link-hovered"
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("renders with Datetime", () => {
|
|
62
|
+
const element = render({ ...mockProps, dateTime: fourHours });
|
|
63
|
+
const formatedDate = element.shadowRoot.querySelector(
|
|
64
|
+
"dx-relative-date-time"
|
|
65
|
+
);
|
|
66
|
+
expect(formatedDate.value).not.toBeNull();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import "helpers/reset";
|
|
2
|
+
@import "helpers/text";
|
|
3
|
+
@import "helpers/card";
|
|
4
|
+
|
|
5
|
+
.card-podcast-episode {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (max-width: 1024px) {
|
|
11
|
+
.datetime {
|
|
12
|
+
margin-bottom: 0 !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.body,
|
|
16
|
+
.length {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class={className}>
|
|
3
|
+
<div class="dx-card-base_section-horizontal">
|
|
4
|
+
<a
|
|
5
|
+
aria-label="Go To Article"
|
|
6
|
+
href={href}
|
|
7
|
+
target={target}
|
|
8
|
+
onmouseenter={setLinkHovered}
|
|
9
|
+
onmouseleave={setLinkInactive}
|
|
10
|
+
>
|
|
11
|
+
<dx-icon-badge
|
|
12
|
+
class="dx-play-button"
|
|
13
|
+
symbol="play"
|
|
14
|
+
background-color="white"
|
|
15
|
+
slot="image-badge"
|
|
16
|
+
></dx-icon-badge>
|
|
17
|
+
</a>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="dx-card-base_section-horizontal dx-card-base_column">
|
|
20
|
+
<dx-card-title
|
|
21
|
+
href={href}
|
|
22
|
+
target={target}
|
|
23
|
+
onmouseenter={setLinkHovered}
|
|
24
|
+
onmouseleave={setLinkInactive}
|
|
25
|
+
title={title}
|
|
26
|
+
></dx-card-title>
|
|
27
|
+
<span class="datetime dx-text-label-1-dark">
|
|
28
|
+
<dx-relative-date-time
|
|
29
|
+
value={_datetime}
|
|
30
|
+
></dx-relative-date-time>
|
|
31
|
+
</span>
|
|
32
|
+
<span class="body dx-text-body-2">{body}</span>
|
|
33
|
+
<span class="length dx-text-body-3">{length}</span>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "dx/dx-card-podcast-episode",
|
|
5
|
+
component: "dx-card-podcast-episode"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const fourHours = new Date(Date.now() - 1.44e7).toISOString();
|
|
9
|
+
|
|
10
|
+
const createStyles = () => html`
|
|
11
|
+
<style>
|
|
12
|
+
dx-card-podcast-episode {
|
|
13
|
+
width: 440px;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
min-width: 240px;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const Base = () => html`
|
|
21
|
+
${createStyles()}
|
|
22
|
+
<dx-card-podcast-episode
|
|
23
|
+
body="Do you know how your customizations will perform when the crowds show up? Confidence is hard-earned."
|
|
24
|
+
datetime="${fourHours}"
|
|
25
|
+
href="https://developer.salesforce.com/"
|
|
26
|
+
length="32 min"
|
|
27
|
+
number="6"
|
|
28
|
+
title="Becoming a Developer with Lexis Hanson"
|
|
29
|
+
>
|
|
30
|
+
</dx-card-podcast-episode>
|
|
31
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
|
|
4
|
+
export default class CardPodcastEpisode extends LightningElement {
|
|
5
|
+
@api body!: string;
|
|
6
|
+
@api datetime!: string;
|
|
7
|
+
@api dateTime?: string | null = null;
|
|
8
|
+
@api href!: string;
|
|
9
|
+
@api length!: string;
|
|
10
|
+
@api target?: string | null = null;
|
|
11
|
+
@api title!: string;
|
|
12
|
+
|
|
13
|
+
private isLinkHovered: boolean = false;
|
|
14
|
+
|
|
15
|
+
// LWC is being compiled so that datetime is being interpreted as date-time
|
|
16
|
+
// ONLY from from the implementation in dx-card-podcast-episode-provider
|
|
17
|
+
private get _datetime() {
|
|
18
|
+
return this.datetime || this.dateTime;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private get className() {
|
|
22
|
+
return cx(
|
|
23
|
+
"card-podcast-episode",
|
|
24
|
+
"dx-card-base_borderless",
|
|
25
|
+
this.isLinkHovered && "dx-card-base_link-hovered"
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
private setLinkHovered() {
|
|
30
|
+
this.isLinkHovered = true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
private setLinkInactive() {
|
|
34
|
+
this.isLinkHovered = false;
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/cardPodcastEpisodeProvider.test.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import CardPodcastEpisodeProvider from "dx/cardPodcastEpisodeProvider";
|
|
2
|
+
import { createRenderComponent } from "utils-internal/tests";
|
|
3
|
+
import mockWordpressEpisodes from "./mockWordpressEpisodes";
|
|
4
|
+
|
|
5
|
+
const delay = () => new Promise((res) => setTimeout(res, 0));
|
|
6
|
+
|
|
7
|
+
const TAG = "dx-card-podcast-episode-provider";
|
|
8
|
+
const render = createRenderComponent(TAG, CardPodcastEpisodeProvider);
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
const mockFetchPromise = Promise.resolve({
|
|
12
|
+
json: () => Promise.resolve(mockWordpressEpisodes),
|
|
13
|
+
status: 200
|
|
14
|
+
});
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
jest.spyOn(global, "fetch").mockImplementation(() => mockFetchPromise);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
describe(TAG, () => {
|
|
20
|
+
it("renders the correct number of posts", async () => {
|
|
21
|
+
const element = render();
|
|
22
|
+
|
|
23
|
+
expect(global.fetch).toHaveBeenCalledTimes(1);
|
|
24
|
+
expect(global.fetch).toHaveBeenCalledWith("/podcast/api?maxResults=6");
|
|
25
|
+
|
|
26
|
+
await delay();
|
|
27
|
+
|
|
28
|
+
const els = element.shadowRoot.querySelectorAll(
|
|
29
|
+
"dx-card-podcast-episode"
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
expect(els.length).toEqual(mockWordpressEpisodes.posts.length);
|
|
33
|
+
|
|
34
|
+
return expect(element).toBeAccessible();
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
posts: [
|
|
3
|
+
{
|
|
4
|
+
date: "2021-02-22T08:45:10",
|
|
5
|
+
description:
|
|
6
|
+
" Marisa Hambleton is a Managing Partner at MH2X. In this episode, we are discussing the Cactusforce conference. We talk about its origins and the recent virtual version of it. Marisa was introduced to Salesforce after both she and her husband lost their jobs at IBM.",
|
|
7
|
+
id: 233,
|
|
8
|
+
originalUrl:
|
|
9
|
+
"https://developer.salesforce.com/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html",
|
|
10
|
+
title: "Episode 70: Cactusforce with Marisa Hambleton",
|
|
11
|
+
url:
|
|
12
|
+
"/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html",
|
|
13
|
+
podcastDuration: "00:00:00"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
date: "2021-02-22T08:45:10",
|
|
17
|
+
description:
|
|
18
|
+
" Marisa Hambleton is a Managing Partner at MH2X. In this episode, we are discussing the Cactusforce conference. We talk about its origins and the recent virtual version of it. Marisa was introduced to Salesforce after both she and her husband lost their jobs at IBM.",
|
|
19
|
+
id: 234,
|
|
20
|
+
originalUrl:
|
|
21
|
+
"https://developer.salesforce.com/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html",
|
|
22
|
+
title: "Episode 70: Cactusforce with Marisa Hambleton",
|
|
23
|
+
url:
|
|
24
|
+
"/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html",
|
|
25
|
+
podcastDuration: "00:00:00"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
date: "2021-02-22T08:45:10",
|
|
29
|
+
description:
|
|
30
|
+
" Marisa Hambleton is a Managing Partner at MH2X. In this episode, we are discussing the Cactusforce conference. We talk about its origins and the recent virtual version of it. Marisa was introduced to Salesforce after both she and her husband lost their jobs at IBM.",
|
|
31
|
+
id: 235,
|
|
32
|
+
originalUrl:
|
|
33
|
+
"https://developer.salesforce.com/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html",
|
|
34
|
+
title: "Episode 70: Cactusforce with Marisa Hambleton",
|
|
35
|
+
url:
|
|
36
|
+
"/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
date: "2021-02-22T08:45:10",
|
|
40
|
+
description:
|
|
41
|
+
" Marisa Hambleton is a Managing Partner at MH2X. In this episode, we are discussing the Cactusforce conference. We talk about its origins and the recent virtual version of it. Marisa was introduced to Salesforce after both she and her husband lost their jobs at IBM.",
|
|
42
|
+
id: 236,
|
|
43
|
+
originalUrl:
|
|
44
|
+
"https://developer.salesforce.com/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html",
|
|
45
|
+
title: "Episode 70: Cactusforce with Marisa Hambleton",
|
|
46
|
+
url:
|
|
47
|
+
"/podcast/2021/02/episode-70-cactusforce-with-marisa-hambleton.html"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template for:each={episodes} for:item="episode">
|
|
3
|
+
<dx-card-podcast-episode
|
|
4
|
+
body={episode.body}
|
|
5
|
+
datetime={episode.datetime}
|
|
6
|
+
href={episode.href}
|
|
7
|
+
key={episode.id}
|
|
8
|
+
length={episode.length}
|
|
9
|
+
title={episode.title}
|
|
10
|
+
></dx-card-podcast-episode>
|
|
11
|
+
</template>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LightningElement, api, track } from "lwc";
|
|
2
|
+
import { fetchWordpressPosts } from "utils-internal/wordpress";
|
|
3
|
+
import { normalizeEpisode } from "utils/normalizers";
|
|
4
|
+
|
|
5
|
+
type PodcastEpisode = {
|
|
6
|
+
body: string;
|
|
7
|
+
datetime: string;
|
|
8
|
+
href: string;
|
|
9
|
+
id: string;
|
|
10
|
+
length: string;
|
|
11
|
+
title: string;
|
|
12
|
+
};
|
|
13
|
+
export default class CardPodcastEpisodeProvider extends LightningElement {
|
|
14
|
+
@api count?: string;
|
|
15
|
+
|
|
16
|
+
@track episodes: PodcastEpisode[] = [];
|
|
17
|
+
|
|
18
|
+
private fetchEpisodes = async () => {
|
|
19
|
+
this.episodes = await fetchWordpressPosts(
|
|
20
|
+
"/podcast/api",
|
|
21
|
+
normalizeEpisode,
|
|
22
|
+
this.count
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
this.fetchEpisodes();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import CardSmall from "dx/cardSmall";
|
|
2
|
+
import { createRenderComponent } from "utils-internal/tests";
|
|
3
|
+
import mockProps from "./mockProps";
|
|
4
|
+
import { isSlotEmpty, stopPropagationOnSlotted } from "utils-internal/slot";
|
|
5
|
+
|
|
6
|
+
const TAG = "dx-card-small";
|
|
7
|
+
const render = createRenderComponent(TAG, CardSmall);
|
|
8
|
+
|
|
9
|
+
jest.mock("utils-internal/slot", () => {
|
|
10
|
+
return {
|
|
11
|
+
isSlotEmpty: jest.fn(),
|
|
12
|
+
stopPropagationOnSlotted: jest.fn()
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe(TAG, () => {
|
|
17
|
+
it("renders the link, title & body; also renders card as a link by default", () => {
|
|
18
|
+
const element = render(mockProps);
|
|
19
|
+
|
|
20
|
+
const els = ["dx-card-title", ".dx-text-body-2", "dx-icon-badge"].map(
|
|
21
|
+
(query) => element.shadowRoot.querySelector(query)
|
|
22
|
+
);
|
|
23
|
+
const card = element.shadowRoot.querySelector(".dx-card-base");
|
|
24
|
+
|
|
25
|
+
expect(els).not.toContain(null);
|
|
26
|
+
expect(card.tagName).toEqual("A");
|
|
27
|
+
|
|
28
|
+
return expect(element).toBeAccessible();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("sets proper styles", () => {
|
|
32
|
+
const element = render({
|
|
33
|
+
...mockProps,
|
|
34
|
+
badgeSymbol: "circle",
|
|
35
|
+
borderless: true
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const containerDiv: HTMLElement =
|
|
39
|
+
element.shadowRoot.querySelector("div");
|
|
40
|
+
|
|
41
|
+
expect(containerDiv.classList).toContain("has-icon");
|
|
42
|
+
expect(containerDiv.classList).toContain("dx-card-base_borderless");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("renders slot", () => {
|
|
46
|
+
(isSlotEmpty as jest.Mock).mockReturnValue(false);
|
|
47
|
+
const element = render(mockProps);
|
|
48
|
+
const slot: HTMLSlotElement = element.shadowRoot.querySelector("slot");
|
|
49
|
+
const containerDiv: HTMLElement =
|
|
50
|
+
element.shadowRoot.querySelector(".dx-card-base_ctas");
|
|
51
|
+
slot.dispatchEvent(new Event("slotchange"));
|
|
52
|
+
expect(isSlotEmpty).toBeCalledTimes(1);
|
|
53
|
+
expect(stopPropagationOnSlotted).toBeCalledTimes(1);
|
|
54
|
+
|
|
55
|
+
return Promise.resolve().then(() => {
|
|
56
|
+
expect(containerDiv).not.toBeNull();
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it("doesn't render whole card as a link when borderless", () => {
|
|
61
|
+
const element = render({ ...mockProps, borderless: true });
|
|
62
|
+
const card = element.shadowRoot.querySelector(".dx-card-base");
|
|
63
|
+
|
|
64
|
+
expect(card.tagName).toEqual("DIV");
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import "helpers/reset";
|
|
2
|
+
@import "helpers/text";
|
|
3
|
+
@import "helpers/card";
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
--heading-offset: var(--dx-g-spacing-sm);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.has-icon .dx-card-base_section-horizontal:last-of-type > *:first-child {
|
|
10
|
+
margin-top: var(--heading-offset);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.card-small {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dx-text-body-2 {
|
|
19
|
+
flex: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* mobile responsiveness */
|
|
23
|
+
@media screen and (max-width: 1024px) {
|
|
24
|
+
:host {
|
|
25
|
+
--heading-offset: var(--dx-g-spacing-xs);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
dx-icon-badge {
|
|
29
|
+
--dx-c-icon-badge-size: var(--dx-g-spacing-lg);
|
|
30
|
+
--dx-c-icon-badge-icon-size: var(--dx-g-icon-size-xs);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div if:true={borderless} class={className}>
|
|
3
|
+
<div if:true={badgeSymbol} class="dx-card-base_section-horizontal">
|
|
4
|
+
<dx-icon-badge
|
|
5
|
+
color={badgeColor}
|
|
6
|
+
background-color={badgeBackgroundColor}
|
|
7
|
+
symbol={badgeSymbol}
|
|
8
|
+
shape={badgeShape}
|
|
9
|
+
sprite={badgeSprite}
|
|
10
|
+
></dx-icon-badge>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="dx-card-base_section-horizontal dx-card-base_column">
|
|
13
|
+
<dx-card-title
|
|
14
|
+
href={href}
|
|
15
|
+
target={target}
|
|
16
|
+
title={title}
|
|
17
|
+
></dx-card-title>
|
|
18
|
+
<span class="dx-text-body-2">{body}</span>
|
|
19
|
+
<div if:false={isSlotEmpty} class="dx-card-base_ctas">
|
|
20
|
+
<slot onslotchange={onSlotChange}></slot>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<a if:false={borderless} class={className} href={href} target={target}>
|
|
25
|
+
<div if:true={badgeSymbol} class="dx-card-base_section-horizontal">
|
|
26
|
+
<dx-icon-badge
|
|
27
|
+
color={badgeColor}
|
|
28
|
+
background-color={badgeBackgroundColor}
|
|
29
|
+
symbol={badgeSymbol}
|
|
30
|
+
shape={badgeShape}
|
|
31
|
+
sprite={badgeSprite}
|
|
32
|
+
></dx-icon-badge>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="dx-card-base_section-horizontal dx-card-base_column">
|
|
35
|
+
<dx-card-title target={target} title={title}></dx-card-title>
|
|
36
|
+
<span class="dx-text-body-2">{body}</span>
|
|
37
|
+
<div if:false={isSlotEmpty} class="dx-card-base_ctas">
|
|
38
|
+
<slot onslotchange={onSlotChange}></slot>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</a>
|
|
42
|
+
</template>
|