@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,119 @@
|
|
|
1
|
+
@import "helpers/reset";
|
|
2
|
+
@import "helpers/text";
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.text-group {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
|
|
12
|
+
--dx-group-text-spacing-vertical-xl: var(--dx-g-spacing-2xl);
|
|
13
|
+
--dx-group-text-spacing-vertical-lg: var(--dx-g-spacing-lg);
|
|
14
|
+
--dx-group-text-spacing-vertical-sm: var(--dx-g-spacing-sm);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.hide-slot .slot-container {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.text-group:not(.hide-slot) .slot-container {
|
|
22
|
+
margin-top: var(--dx-group-text-spacing-vertical-xl);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.label {
|
|
26
|
+
margin-bottom: var(--dx-group-text-spacing-vertical-lg);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* subtitle */
|
|
30
|
+
|
|
31
|
+
.subtitle {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
align-items: center;
|
|
35
|
+
margin-top: var(--dx-group-text-spacing-vertical-lg);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.subtitle > span {
|
|
39
|
+
position: relative;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.subtitle > *:not(:last-child) {
|
|
44
|
+
margin-right: var(--dx-g-spacing-lg);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.subtitle > *:not(:last-child)::after {
|
|
48
|
+
content: "";
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: -12px;
|
|
51
|
+
top: calc(40% - 1px);
|
|
52
|
+
height: 2px;
|
|
53
|
+
width: 2px;
|
|
54
|
+
background: var(--dx-g-blue-vibrant-20);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* body */
|
|
58
|
+
|
|
59
|
+
.body {
|
|
60
|
+
margin-top: var(--dx-group-text-spacing-vertical-lg);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* button group */
|
|
64
|
+
|
|
65
|
+
.button-group {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
width: 100%;
|
|
69
|
+
margin-top: var(--dx-group-text-spacing-vertical-xl);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.button-group > dx-button:not(:last-of-type) {
|
|
73
|
+
margin-right: var(--dx-g-spacing-sm);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* breakpoints tablet */
|
|
77
|
+
|
|
78
|
+
@media screen and (max-width: 1024px) {
|
|
79
|
+
.title.dx-text-heading-2 {
|
|
80
|
+
font-size: var(--dx-g-text-3xl);
|
|
81
|
+
line-height: var(--dx-g-spacing-2xl);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.subtitle.dx-text-heading-6 {
|
|
85
|
+
font-size: var(--dx-g-text-sm);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.body.dx-text-body-1 {
|
|
89
|
+
font-size: var(--dx-g-text-base);
|
|
90
|
+
line-height: var(--dx-g-spacing-lg);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.title.dx-text-heading-3 {
|
|
94
|
+
font-size: var(--dx-g-text-2xl);
|
|
95
|
+
line-height: var(--dx-g-spacing-xl);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.subtitle.dx-text-heading-7 {
|
|
99
|
+
font-size: var(--dx-g-text-xs);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.body.dx-text-body-2 {
|
|
103
|
+
font-size: var(--dx-g-text-sm);
|
|
104
|
+
line-height: var(--dx-g-spacing-lg);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* breakpoints mobile */
|
|
109
|
+
|
|
110
|
+
@media screen and (max-width: 768px) {
|
|
111
|
+
.button-group > dx-button {
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.button-group > dx-button:not(:last-of-type) {
|
|
116
|
+
margin-right: 0;
|
|
117
|
+
margin-bottom: var(--dx-g-spacing-sm);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class={className}>
|
|
3
|
+
<span if:true={label} class="label dx-text-heading-6">{label}</span>
|
|
4
|
+
<div class={titleClassname} role="heading" aria-level={titleAriaLevel}>
|
|
5
|
+
{title}
|
|
6
|
+
</div>
|
|
7
|
+
<span class={subtitleClassname} if:true={hasSubtitle}>
|
|
8
|
+
<span if:true={owner}>{owner}</span>
|
|
9
|
+
<span if:true={attributionLink}>
|
|
10
|
+
By
|
|
11
|
+
<dx-button
|
|
12
|
+
href={attributionLink.href}
|
|
13
|
+
target={attributionLink.target}
|
|
14
|
+
size="large"
|
|
15
|
+
variant="inline-inherit"
|
|
16
|
+
>
|
|
17
|
+
{attributionLink.label}
|
|
18
|
+
</dx-button>
|
|
19
|
+
</span>
|
|
20
|
+
<span>
|
|
21
|
+
{dateText}
|
|
22
|
+
<dx-formatted-date-time
|
|
23
|
+
value={dateTime}
|
|
24
|
+
day="numeric"
|
|
25
|
+
month="long"
|
|
26
|
+
year="numeric"
|
|
27
|
+
></dx-formatted-date-time>
|
|
28
|
+
</span>
|
|
29
|
+
</span>
|
|
30
|
+
<span class="body dx-text-body-1" if:true={body}>{body}</span>
|
|
31
|
+
<div class="slot-container">
|
|
32
|
+
<slot onslotchange={onSlotChange}></slot>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="button-group" if:true={hasButtonGroup}>
|
|
35
|
+
<dx-button
|
|
36
|
+
if:true={primaryLink}
|
|
37
|
+
href={primaryLink.href}
|
|
38
|
+
target={primaryLink.target}
|
|
39
|
+
variant="primary"
|
|
40
|
+
size="large"
|
|
41
|
+
>
|
|
42
|
+
{primaryLink.label}
|
|
43
|
+
</dx-button>
|
|
44
|
+
<dx-button
|
|
45
|
+
if:true={secondaryLink}
|
|
46
|
+
href={secondaryLink.href}
|
|
47
|
+
target={secondaryLink.target}
|
|
48
|
+
variant="secondary"
|
|
49
|
+
size="large"
|
|
50
|
+
>
|
|
51
|
+
{secondaryLink.label}
|
|
52
|
+
</dx-button>
|
|
53
|
+
<dx-button
|
|
54
|
+
if:true={tertiaryLink}
|
|
55
|
+
href={tertiaryLink.href}
|
|
56
|
+
target={tertiaryLink.target}
|
|
57
|
+
variant="tertiary"
|
|
58
|
+
size="large"
|
|
59
|
+
icon-symbol="chevronright"
|
|
60
|
+
>
|
|
61
|
+
{tertiaryLink.label}
|
|
62
|
+
</dx-button>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
import mockProps from "./__tests__/mockProps";
|
|
3
|
+
import featureListMockProps from "../featuresList/__tests__/mockProps";
|
|
4
|
+
import { renderStyle } from "../../utils-internal/storybook/storybook";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "dx/dx-group-text",
|
|
8
|
+
component: "dx-group-text"
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const featureOptions = JSON.stringify(featureListMockProps.options);
|
|
12
|
+
|
|
13
|
+
export const Base = () => html`
|
|
14
|
+
${renderStyle("dx-group-text")}
|
|
15
|
+
<span>Large</span>
|
|
16
|
+
<dx-group-text
|
|
17
|
+
label="Featured API"
|
|
18
|
+
title="Create powerful ecommerce experiences"
|
|
19
|
+
body="Set up, create, and customize a sample app using the Commerce API. We give you the tools to build and embed commerce experiences across every customer touchpoint."
|
|
20
|
+
></dx-group-text>
|
|
21
|
+
|
|
22
|
+
<span>Medium</span>
|
|
23
|
+
<dx-group-text
|
|
24
|
+
label="Featured API"
|
|
25
|
+
title="Create powerful ecommerce experiences"
|
|
26
|
+
body="Set up, create, and customize a sample app using the Commerce API. We give you the tools to build and embed commerce experiences across every customer touchpoint."
|
|
27
|
+
size="medium"
|
|
28
|
+
></dx-group-text>
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
export const BasePlusSubtitle = (args: any) => html`
|
|
32
|
+
${renderStyle("dx-group-text")}
|
|
33
|
+
<span>Large</span>
|
|
34
|
+
<dx-group-text
|
|
35
|
+
title="Create powerful ecommerce experiences"
|
|
36
|
+
owner="REST API"
|
|
37
|
+
dateTime="${args.dateTime}"
|
|
38
|
+
date-text="Last updated on"
|
|
39
|
+
attribution-link="${args.attributionLink}"
|
|
40
|
+
></dx-group-text>
|
|
41
|
+
|
|
42
|
+
<span>Medium</span>
|
|
43
|
+
<dx-group-text
|
|
44
|
+
title="Create powerful ecommerce experiences"
|
|
45
|
+
owner="REST API"
|
|
46
|
+
dateTime="${args.dateTime}"
|
|
47
|
+
date-text="Last updated on"
|
|
48
|
+
attribution-link="${args.attributionLink}"
|
|
49
|
+
size="medium"
|
|
50
|
+
></dx-group-text>
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
export const Slotted = (args: any) => html`
|
|
54
|
+
${renderStyle("dx-group-text")}
|
|
55
|
+
<span>Large</span>
|
|
56
|
+
<dx-group-text
|
|
57
|
+
label="Featured API"
|
|
58
|
+
title="${args.title}"
|
|
59
|
+
primary-link="${args.primaryLink}"
|
|
60
|
+
secondary-link="${args.secondaryLink}"
|
|
61
|
+
tertiary-link="${args.tertiaryLink}"
|
|
62
|
+
>
|
|
63
|
+
<dx-features-list options="${featureOptions}"></dx-features-list>
|
|
64
|
+
</dx-group-text>
|
|
65
|
+
|
|
66
|
+
<span>Medium</span>
|
|
67
|
+
<dx-group-text
|
|
68
|
+
label="Featured API"
|
|
69
|
+
title="${args.title}"
|
|
70
|
+
primary-link="${args.primaryLink}"
|
|
71
|
+
secondary-link="${args.secondaryLink}"
|
|
72
|
+
tertiary-link="${args.tertiaryLink}"
|
|
73
|
+
size="medium"
|
|
74
|
+
>
|
|
75
|
+
<dx-features-list options="${featureOptions}"></dx-features-list>
|
|
76
|
+
</dx-group-text>
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
BasePlusSubtitle.args = mockProps;
|
|
80
|
+
Slotted.args = mockProps;
|
|
81
|
+
Slotted.story = { parameters: { docs: { disable: true } } };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
import { LightningSlotElement, Link } from "typings/custom";
|
|
4
|
+
import { isSlotEmpty } from "utils-internal/slot";
|
|
5
|
+
import { toJson } from "utils/normalizers";
|
|
6
|
+
|
|
7
|
+
type OptionalLink = Link | null;
|
|
8
|
+
|
|
9
|
+
const LARGE = "large";
|
|
10
|
+
const MEDIUM = "medium";
|
|
11
|
+
|
|
12
|
+
const titleClasses = {
|
|
13
|
+
[LARGE]: "dx-text-heading-2",
|
|
14
|
+
[MEDIUM]: "dx-text-heading-3"
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const subtitleClasses = {
|
|
18
|
+
[LARGE]: "dx-text-heading-6",
|
|
19
|
+
[MEDIUM]: "dx-text-heading-7"
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default class GroupText extends LightningElement {
|
|
23
|
+
@api title!: string;
|
|
24
|
+
@api body?: string;
|
|
25
|
+
@api owner?: string;
|
|
26
|
+
@api dateTime?: string;
|
|
27
|
+
@api dateText?: string;
|
|
28
|
+
@api label?: string;
|
|
29
|
+
@api titleAriaLevel: "1" | "2" = "2";
|
|
30
|
+
@api size: "medium" | "large" = LARGE;
|
|
31
|
+
|
|
32
|
+
@api
|
|
33
|
+
set attributionLink(value: string | OptionalLink) {
|
|
34
|
+
this._attributionLink = toJson(value);
|
|
35
|
+
}
|
|
36
|
+
get attributionLink() {
|
|
37
|
+
return this._attributionLink;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@api
|
|
41
|
+
set primaryLink(value: string | OptionalLink) {
|
|
42
|
+
this._primaryLink = toJson(value);
|
|
43
|
+
}
|
|
44
|
+
get primaryLink() {
|
|
45
|
+
return this._primaryLink;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@api
|
|
49
|
+
set secondaryLink(value: string | OptionalLink) {
|
|
50
|
+
this._secondaryLink = toJson(value);
|
|
51
|
+
}
|
|
52
|
+
get secondaryLink() {
|
|
53
|
+
return this._secondaryLink;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@api
|
|
57
|
+
set tertiaryLink(value: string | OptionalLink) {
|
|
58
|
+
this._tertiaryLink = toJson(value);
|
|
59
|
+
}
|
|
60
|
+
get tertiaryLink() {
|
|
61
|
+
return this._tertiaryLink;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private _attributionLink!: OptionalLink;
|
|
65
|
+
private _primaryLink!: OptionalLink;
|
|
66
|
+
private _secondaryLink!: OptionalLink;
|
|
67
|
+
private _tertiaryLink!: OptionalLink;
|
|
68
|
+
private isSlotEmpty: boolean = true;
|
|
69
|
+
|
|
70
|
+
private get className() {
|
|
71
|
+
return cx("text-group", this.isSlotEmpty && "hide-slot");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private get titleClassname() {
|
|
75
|
+
return cx("title", titleClasses[this.size]);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
private get subtitleClassname() {
|
|
79
|
+
return cx("subtitle", subtitleClasses[this.size]);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private get hasButtonGroup(): boolean {
|
|
83
|
+
return !!(this.primaryLink || this.secondaryLink || this.tertiaryLink);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
private get hasSubtitle(): boolean {
|
|
87
|
+
return !!(this.owner || this.attributionLink || this.dateTime);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private onSlotChange(e: LightningSlotElement): void {
|
|
91
|
+
this.isSlotEmpty = isSlotEmpty(e);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LightningElement } from "lwc";
|
|
2
|
+
|
|
3
|
+
const syncElementAttributes = (elementA: Element, elementB: Element) => {
|
|
4
|
+
if (elementB.textContent) {
|
|
5
|
+
elementA.textContent = elementB.textContent;
|
|
6
|
+
}
|
|
7
|
+
const names = elementB.getAttributeNames();
|
|
8
|
+
names.forEach((name: string) => {
|
|
9
|
+
const val = elementB.getAttribute(name);
|
|
10
|
+
if (val) {
|
|
11
|
+
elementA.setAttribute(name, val);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default class HeadTags extends LightningElement {
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
const innerElements = this.querySelectorAll("*");
|
|
19
|
+
if (innerElements) {
|
|
20
|
+
Array.from(innerElements).forEach((innerElement) => {
|
|
21
|
+
const elementName = innerElement.getAttribute("name");
|
|
22
|
+
let existingElement = null;
|
|
23
|
+
if (elementName) {
|
|
24
|
+
existingElement = document.head.querySelector(
|
|
25
|
+
`meta[name="${elementName}"]`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
if (innerElement.tagName === "TITLE") {
|
|
29
|
+
existingElement = document.head.querySelector("title");
|
|
30
|
+
}
|
|
31
|
+
if (existingElement) {
|
|
32
|
+
syncElementAttributes(existingElement, innerElement);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
document.head.appendChild(innerElement);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// import Header from "dx/header";
|
|
2
|
+
// import { createElement } from "lwc";
|
|
3
|
+
|
|
4
|
+
// const navItems = [
|
|
5
|
+
// {
|
|
6
|
+
// id: "home",
|
|
7
|
+
// label: "Home",
|
|
8
|
+
// link: {
|
|
9
|
+
// href: "/developers",
|
|
10
|
+
// target: null
|
|
11
|
+
// }
|
|
12
|
+
// },
|
|
13
|
+
// {
|
|
14
|
+
// id: "documentation",
|
|
15
|
+
// label: "Documentation",
|
|
16
|
+
// link: {
|
|
17
|
+
// href: "/docs",
|
|
18
|
+
// target: null
|
|
19
|
+
// }
|
|
20
|
+
// },
|
|
21
|
+
// {
|
|
22
|
+
// id: "notes",
|
|
23
|
+
// label: "Notes",
|
|
24
|
+
// link: {
|
|
25
|
+
// href: "/notes",
|
|
26
|
+
// target: null
|
|
27
|
+
// }
|
|
28
|
+
// }
|
|
29
|
+
// ];
|
|
30
|
+
|
|
31
|
+
describe("dx-header", () => {
|
|
32
|
+
benchmark("creates and renders", () => {
|
|
33
|
+
let element;
|
|
34
|
+
run(() => {
|
|
35
|
+
// element = createElement("dx-header", {
|
|
36
|
+
// is: Header
|
|
37
|
+
// });
|
|
38
|
+
// Object.assign(element, { navItems });
|
|
39
|
+
// document.body.appendChild(element);
|
|
40
|
+
});
|
|
41
|
+
after(() => {
|
|
42
|
+
return element && element.parentElement.removeChild(element);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import Button from "dx/button";
|
|
2
|
+
import Dropdown from "dx/dropdown";
|
|
3
|
+
import Header from "dx/header";
|
|
4
|
+
import Icon from "dx/icon";
|
|
5
|
+
import { createRenderComponent } from "utils-internal/tests";
|
|
6
|
+
import { ANALYTICS_INFO } from "utils-internal/headerBase";
|
|
7
|
+
import { track } from "dx/instrumentation";
|
|
8
|
+
import {
|
|
9
|
+
mockPropsDevelopers,
|
|
10
|
+
mockPropsEmployees,
|
|
11
|
+
mockPropsNoNavigation
|
|
12
|
+
} from "./mockProps";
|
|
13
|
+
|
|
14
|
+
const TAG = "dx-header";
|
|
15
|
+
const render = createRenderComponent(TAG, Header);
|
|
16
|
+
|
|
17
|
+
jest.mock("dx/instrumentation");
|
|
18
|
+
|
|
19
|
+
describe("dx-header", () => {
|
|
20
|
+
it("renders", () => {
|
|
21
|
+
const subtitle = "testsubtitle";
|
|
22
|
+
const element = render({ ...mockPropsDevelopers, subtitle });
|
|
23
|
+
const subtitleEl = element.shadowRoot.querySelector(".subtitle");
|
|
24
|
+
const buttons: Array<HTMLElement> =
|
|
25
|
+
element.shadowRoot.querySelectorAll("dx-button");
|
|
26
|
+
const dropdown = element.shadowRoot.querySelector("dx-dropdown");
|
|
27
|
+
const headerEl = element.shadowRoot.querySelector("dx-header-nav");
|
|
28
|
+
|
|
29
|
+
expect(subtitleEl.textContent).toEqual(subtitle);
|
|
30
|
+
expect(headerEl).not.toBeNull();
|
|
31
|
+
expect(buttons).toHaveLength(2);
|
|
32
|
+
expect(dropdown).toBeNull();
|
|
33
|
+
|
|
34
|
+
const brandIcon = element.shadowRoot.querySelector(".brand-icon");
|
|
35
|
+
expect(brandIcon).toBeNull();
|
|
36
|
+
return expect(element).toBeAccessible();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("doesn't render subnav when navitems is empty", () => {
|
|
40
|
+
const element = render(mockPropsNoNavigation);
|
|
41
|
+
|
|
42
|
+
const els = element.querySelectorAll(
|
|
43
|
+
"dx-header-mobile-nav-menu, .header_l2_group-nav"
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
expect(els).toHaveLength(0);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("renders the brand icon when a brand has an icon associated", () => {
|
|
50
|
+
const element = render(mockPropsEmployees);
|
|
51
|
+
|
|
52
|
+
const brandIcon: Icon = element.shadowRoot.querySelector(".brand-icon");
|
|
53
|
+
expect(brandIcon).not.toBeNull();
|
|
54
|
+
expect(brandIcon.symbol).toBe(mockPropsEmployees.brand);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("doesn't render brand icon when no brand is provided", () => {
|
|
58
|
+
const element = render({ ...mockPropsDevelopers, brand: undefined });
|
|
59
|
+
|
|
60
|
+
const brandIcon: Icon = element.shadowRoot.querySelector(".brand-icon");
|
|
61
|
+
expect(brandIcon).toBeNull();
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("receives breadcrumbs", () => {
|
|
65
|
+
const breadcrumbs = [
|
|
66
|
+
{
|
|
67
|
+
href: "/apis/salesforce",
|
|
68
|
+
label: "Apis",
|
|
69
|
+
last: true,
|
|
70
|
+
asLink: false
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const element = render({ ...mockPropsDevelopers, breadcrumbs });
|
|
75
|
+
const breadcrumb = element.shadowRoot.querySelector("dx-breadcrumbs");
|
|
76
|
+
|
|
77
|
+
expect(breadcrumb.breadcrumbs).toEqual(breadcrumbs);
|
|
78
|
+
expect(breadcrumb).not.toBeNull();
|
|
79
|
+
return expect(element).toBeAccessible();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("receives versions", () => {
|
|
83
|
+
const version = { id: "123", label: "Test" };
|
|
84
|
+
const element = render({
|
|
85
|
+
...mockPropsDevelopers,
|
|
86
|
+
versions: JSON.stringify([version])
|
|
87
|
+
});
|
|
88
|
+
const dropdown: Dropdown =
|
|
89
|
+
element.shadowRoot.querySelector("dx-dropdown");
|
|
90
|
+
expect(dropdown).not.toBeNull();
|
|
91
|
+
expect(dropdown.options).toHaveLength(1);
|
|
92
|
+
|
|
93
|
+
const [option] = dropdown.options;
|
|
94
|
+
expect(option).toHaveProperty("id", version.id);
|
|
95
|
+
expect(option).toHaveProperty("label", version.label);
|
|
96
|
+
|
|
97
|
+
return expect(element).toBeAccessible();
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("triggers event on version change", () => {
|
|
101
|
+
const versionsListParameter = [{ id: "123", label: "Test" }];
|
|
102
|
+
const element = render({
|
|
103
|
+
...mockPropsDevelopers,
|
|
104
|
+
versions: JSON.stringify(versionsListParameter)
|
|
105
|
+
});
|
|
106
|
+
const dropdown: HTMLElement = element.shadowRoot.querySelector(
|
|
107
|
+
".header_version-dropdown"
|
|
108
|
+
);
|
|
109
|
+
const mockVersionChange = jest.fn();
|
|
110
|
+
element.addEventListener("versionchange", mockVersionChange);
|
|
111
|
+
|
|
112
|
+
dropdown.dispatchEvent(new CustomEvent("change", { detail: "123" }));
|
|
113
|
+
expect(mockVersionChange).toBeCalledTimes(1);
|
|
114
|
+
expect(mockVersionChange.mock.calls[0][0].detail).toEqual("123");
|
|
115
|
+
return expect(element).toBeAccessible();
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it("triggers event onrequestopennav", () => {
|
|
119
|
+
const element = render({
|
|
120
|
+
...mockPropsDevelopers
|
|
121
|
+
});
|
|
122
|
+
const headerEl = element.shadowRoot.querySelector("dx-header-nav");
|
|
123
|
+
const headerMobile = element.shadowRoot.querySelector(
|
|
124
|
+
"dx-header-mobile-nav-menu"
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
headerEl.dispatchEvent(
|
|
128
|
+
new CustomEvent("requestopennavmenu", { detail: "123" })
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
return Promise.resolve().then(() => {
|
|
132
|
+
expect(headerMobile.value).toEqual("123");
|
|
133
|
+
expect(headerMobile.open).toEqual(true);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it("tests toggle button", () => {
|
|
138
|
+
const element = render({
|
|
139
|
+
...mockPropsDevelopers
|
|
140
|
+
});
|
|
141
|
+
const button: HTMLElement = element.shadowRoot.querySelector(
|
|
142
|
+
".header_l2_group-nav_menu-button"
|
|
143
|
+
);
|
|
144
|
+
const header = element.shadowRoot.querySelector(
|
|
145
|
+
"dx-header-mobile-nav-menu"
|
|
146
|
+
);
|
|
147
|
+
const toggleStatus = header.open;
|
|
148
|
+
|
|
149
|
+
button.click();
|
|
150
|
+
|
|
151
|
+
return Promise.resolve().then(() =>
|
|
152
|
+
expect(header.open).toEqual(!toggleStatus)
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it("tests mobile nav change", () => {
|
|
157
|
+
const element = render({
|
|
158
|
+
...mockPropsDevelopers
|
|
159
|
+
});
|
|
160
|
+
const headerMobile = element.shadowRoot.querySelector(
|
|
161
|
+
"dx-header-mobile-nav-menu"
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
headerMobile.dispatchEvent(
|
|
165
|
+
new CustomEvent("change", { detail: "test" })
|
|
166
|
+
);
|
|
167
|
+
return Promise.resolve().then(() => {
|
|
168
|
+
expect(headerMobile.value).toEqual("test");
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it("renders signup button and has bailLink", () => {
|
|
173
|
+
const element = render({
|
|
174
|
+
...mockPropsDevelopers,
|
|
175
|
+
bailHref: "test",
|
|
176
|
+
bailLabel: "test",
|
|
177
|
+
signupLink: "/"
|
|
178
|
+
});
|
|
179
|
+
const buttons: Array<Button> =
|
|
180
|
+
element.shadowRoot.querySelectorAll("dx-button");
|
|
181
|
+
|
|
182
|
+
expect(buttons[0].href).toEqual("/");
|
|
183
|
+
expect(buttons[2].href).toEqual("test");
|
|
184
|
+
return expect(element).toBeAccessible();
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
it("won't render search if any coveo properties are missing", () => {
|
|
188
|
+
const element = render({
|
|
189
|
+
subtitle: mockPropsDevelopers.subtitle,
|
|
190
|
+
navItems: mockPropsDevelopers.navItems
|
|
191
|
+
});
|
|
192
|
+
const headerSearch =
|
|
193
|
+
element.shadowRoot.querySelector("dx-header-search");
|
|
194
|
+
|
|
195
|
+
expect(headerSearch).toBeNull();
|
|
196
|
+
return expect(element).toBeAccessible();
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
it("signup button track is being called", () => {
|
|
200
|
+
const element = render(mockPropsDevelopers);
|
|
201
|
+
|
|
202
|
+
const button: HTMLElement =
|
|
203
|
+
element.shadowRoot.querySelector("dx-button");
|
|
204
|
+
|
|
205
|
+
button.click();
|
|
206
|
+
|
|
207
|
+
expect(track).toBeCalledTimes(1);
|
|
208
|
+
expect(track).toBeCalledWith(button, "custEv_signupStart", {
|
|
209
|
+
...ANALYTICS_INFO,
|
|
210
|
+
clickUrl: "/sign-up"
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it("hides signup button when signupLink property is empty", () => {
|
|
215
|
+
const updatedMockPropsDevelopers = {
|
|
216
|
+
...mockPropsDevelopers,
|
|
217
|
+
signupLink: ""
|
|
218
|
+
};
|
|
219
|
+
const element = render(updatedMockPropsDevelopers);
|
|
220
|
+
const signupButtonContainer: HTMLElement =
|
|
221
|
+
element.shadowRoot.querySelector(".header-login-signup");
|
|
222
|
+
expect(signupButtonContainer).toBeNull();
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it("hides banner when banner markup is empty", () => {
|
|
226
|
+
const bannerMarkup = "";
|
|
227
|
+
const updatedMockPropsDevelopers = {
|
|
228
|
+
...mockPropsDevelopers,
|
|
229
|
+
bannerMarkup
|
|
230
|
+
};
|
|
231
|
+
const element = render(updatedMockPropsDevelopers);
|
|
232
|
+
const bannerElement: HTMLElement =
|
|
233
|
+
element.shadowRoot.querySelector("dx-banner");
|
|
234
|
+
expect(bannerElement).toBeNull();
|
|
235
|
+
});
|
|
236
|
+
});
|