@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,381 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "dx/dx-section",
|
|
5
|
+
component: "dx-section"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const createStyles = () => html`
|
|
9
|
+
<style>
|
|
10
|
+
body {
|
|
11
|
+
padding: 0 !important;
|
|
12
|
+
}
|
|
13
|
+
.placeholder {
|
|
14
|
+
background-color: #ababab;
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
height: 200px;
|
|
17
|
+
}
|
|
18
|
+
dx-section.products {
|
|
19
|
+
--dx-c-section-padding-bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
dx-section.videos {
|
|
22
|
+
--dx-c-section-padding-top: 160px;
|
|
23
|
+
}
|
|
24
|
+
dx-section:last-child {
|
|
25
|
+
--dx-c-section-padding-bottom: var(--dx-g-spacing-md);
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const date = new Date().toISOString();
|
|
31
|
+
const startDatetime = new Date(0, 0, 1, 9, 0, 0).toISOString();
|
|
32
|
+
const endDatetime = new Date(0, 0, 1, 12, 0, 0).toISOString();
|
|
33
|
+
|
|
34
|
+
// prettier-ignore
|
|
35
|
+
export const Base = () => html`
|
|
36
|
+
${createStyles()}
|
|
37
|
+
<dx-section
|
|
38
|
+
title="Explore our Products"
|
|
39
|
+
subtitle="Browse resources, tutorials, and everything you need to start building right away."
|
|
40
|
+
text-align="center"
|
|
41
|
+
>
|
|
42
|
+
<dx-grid columns="one">
|
|
43
|
+
<dx-grid columns="two-slim-right" class="most-recent-blogs">
|
|
44
|
+
<dx-card-news
|
|
45
|
+
href="https://salesforce.com"
|
|
46
|
+
img-alt="Vector image of a lake and a mountain."
|
|
47
|
+
img-src="/assets/svg/dsc-home-news-bear.svg"
|
|
48
|
+
title="Salesforce Developer Survey"
|
|
49
|
+
body="Share your insights to help us improve your developer experience"
|
|
50
|
+
background-color="indigo-vibrant-20"
|
|
51
|
+
size="large"
|
|
52
|
+
button-text="Take the Survey"
|
|
53
|
+
button-type="large"
|
|
54
|
+
img-placement="right"
|
|
55
|
+
></dx-card-news>
|
|
56
|
+
<dx-card-news
|
|
57
|
+
href="https://salesforce.com"
|
|
58
|
+
img-alt="Vector image of a lake and a mountain."
|
|
59
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
60
|
+
title="LEARN MOAR"
|
|
61
|
+
body="Discover what's new for Admins and Developers in the Spring'21 Release"
|
|
62
|
+
background-color="cloud-blue-vibrant-90"
|
|
63
|
+
color="cloud-blue-vibrant-20"
|
|
64
|
+
button-text="Learn moar"
|
|
65
|
+
button-type="inline"
|
|
66
|
+
img-placement="top"
|
|
67
|
+
></dx-card-news>
|
|
68
|
+
</dx-grid>
|
|
69
|
+
<dx-grid columns="three">
|
|
70
|
+
<dx-card-news
|
|
71
|
+
href="https://salesforce.com"
|
|
72
|
+
img-alt="Vector image of a lake and a mountain."
|
|
73
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
74
|
+
title="LEARN MOAR"
|
|
75
|
+
body="Discover what's new for Admins and Developers in the Spring'21 Release"
|
|
76
|
+
background-color="cloud-blue-vibrant-90"
|
|
77
|
+
color="cloud-blue-vibrant-20"
|
|
78
|
+
button-text="Learn moar"
|
|
79
|
+
button-type="inline"
|
|
80
|
+
img-placement="top"
|
|
81
|
+
></dx-card-news>
|
|
82
|
+
<dx-card-news
|
|
83
|
+
href="https://salesforce.com"
|
|
84
|
+
img-alt="Vector image of a lake and a mountain."
|
|
85
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
86
|
+
title="LEARN MOAR"
|
|
87
|
+
body="Discover what's new for Admins and Developers in the Spring'21 Release"
|
|
88
|
+
background-color="cloud-blue-vibrant-90"
|
|
89
|
+
color="cloud-blue-vibrant-20"
|
|
90
|
+
button-text="Learn moar"
|
|
91
|
+
button-type="inline"
|
|
92
|
+
img-placement="top"
|
|
93
|
+
></dx-card-news>
|
|
94
|
+
<dx-card-news
|
|
95
|
+
href="https://salesforce.com"
|
|
96
|
+
img-alt="Vector image of a lake and a mountain."
|
|
97
|
+
img-src="/assets/svg/lake-mountain.svg"
|
|
98
|
+
title="LEARN MOAR"
|
|
99
|
+
body="Discover what's new for Admins and Developers in the Spring'21 Release"
|
|
100
|
+
background-color="cloud-blue-vibrant-90"
|
|
101
|
+
color="cloud-blue-vibrant-20"
|
|
102
|
+
button-text="Learn moar"
|
|
103
|
+
button-type="inline"
|
|
104
|
+
img-placement="top"
|
|
105
|
+
></dx-card-news>
|
|
106
|
+
</dx-grid>
|
|
107
|
+
</dx-grid>
|
|
108
|
+
</dx-section>
|
|
109
|
+
<dx-section
|
|
110
|
+
title="Explore our Products"
|
|
111
|
+
subtitle="Browse resources, tutorials, and everything you need to start building right away."
|
|
112
|
+
text-align="center"
|
|
113
|
+
class="products"
|
|
114
|
+
}
|
|
115
|
+
>
|
|
116
|
+
<dx-grid columns="three">
|
|
117
|
+
<dx-card-small
|
|
118
|
+
href="/test-href"
|
|
119
|
+
target="_blank"
|
|
120
|
+
title="Marketplaces"
|
|
121
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
122
|
+
badge-symbol="bucket"
|
|
123
|
+
>
|
|
124
|
+
</dx-card-small>
|
|
125
|
+
<dx-card-small
|
|
126
|
+
href="/test-href"
|
|
127
|
+
target="_blank"
|
|
128
|
+
title="Marketplaces"
|
|
129
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
130
|
+
badge-symbol="bucket"
|
|
131
|
+
>
|
|
132
|
+
</dx-card-small>
|
|
133
|
+
<dx-card-small
|
|
134
|
+
href="/test-href"
|
|
135
|
+
target="_blank"
|
|
136
|
+
title="Marketplaces"
|
|
137
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
138
|
+
badge-symbol="bucket"
|
|
139
|
+
>
|
|
140
|
+
</dx-card-small>
|
|
141
|
+
<dx-card-small
|
|
142
|
+
href="/test-href"
|
|
143
|
+
target="_blank"
|
|
144
|
+
title="Marketplaces"
|
|
145
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
146
|
+
badge-symbol="bucket"
|
|
147
|
+
>
|
|
148
|
+
</dx-card-small>
|
|
149
|
+
<dx-card-small
|
|
150
|
+
href="/test-href"
|
|
151
|
+
target="_blank"
|
|
152
|
+
title="Marketplaces"
|
|
153
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
154
|
+
badge-symbol="bucket"
|
|
155
|
+
>
|
|
156
|
+
</dx-card-small>
|
|
157
|
+
<dx-card-small
|
|
158
|
+
href="/test-href"
|
|
159
|
+
target="_blank"
|
|
160
|
+
title="Marketplaces"
|
|
161
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
162
|
+
badge-symbol="bucket"
|
|
163
|
+
>
|
|
164
|
+
</dx-card-small>
|
|
165
|
+
<dx-card-small
|
|
166
|
+
href="/test-href"
|
|
167
|
+
target="_blank"
|
|
168
|
+
title="Marketplaces"
|
|
169
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
170
|
+
badge-symbol="bucket"
|
|
171
|
+
>
|
|
172
|
+
</dx-card-small>
|
|
173
|
+
<dx-card-small
|
|
174
|
+
href="/test-href"
|
|
175
|
+
target="_blank"
|
|
176
|
+
title="Marketplaces"
|
|
177
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
178
|
+
badge-symbol="bucket"
|
|
179
|
+
>
|
|
180
|
+
</dx-card-small>
|
|
181
|
+
<dx-card-callout
|
|
182
|
+
background-color="indigo-vibrant-30"
|
|
183
|
+
href="/build-stuff"
|
|
184
|
+
title="Find an upcoming event"
|
|
185
|
+
label="Calendar"
|
|
186
|
+
></dx-card-callout>
|
|
187
|
+
</dx-grid>
|
|
188
|
+
</dx-section>
|
|
189
|
+
<dx-section
|
|
190
|
+
title="Discover Salesforce APIs and see how you can put them to work"
|
|
191
|
+
label="APIs"
|
|
192
|
+
background-color="cloud-blue-vibrant-95"
|
|
193
|
+
top-graphic="true"
|
|
194
|
+
bottom-graphic="true"
|
|
195
|
+
graphic-overlap="true"
|
|
196
|
+
>
|
|
197
|
+
<dx-grid columns="four">
|
|
198
|
+
<dx-card-docs
|
|
199
|
+
body="This is a pretty long card body. It could say just about anything regarding the content of this card."
|
|
200
|
+
href="https://developer.salesforce.com/"
|
|
201
|
+
label="Documentation"
|
|
202
|
+
title="Einstein Platform Services Developer Guide"
|
|
203
|
+
>
|
|
204
|
+
<dx-button
|
|
205
|
+
href="http://tweetflight.wearebrightly.com/"
|
|
206
|
+
target="_blank"
|
|
207
|
+
variant="inline"
|
|
208
|
+
icon-symbol="forward"
|
|
209
|
+
>
|
|
210
|
+
Read Guide
|
|
211
|
+
</dx-button>
|
|
212
|
+
</dx-card-docs>
|
|
213
|
+
<dx-card-docs
|
|
214
|
+
body="Quip SCIM API is a specification designed to make it easier to manage user identities in cloud-based applications and services."
|
|
215
|
+
href="https://developer.salesforce.com/"
|
|
216
|
+
label="API"
|
|
217
|
+
title="Quip SCIM API"
|
|
218
|
+
>
|
|
219
|
+
<dx-button
|
|
220
|
+
href="http://tweetflight.wearebrightly.com/"
|
|
221
|
+
target="_blank"
|
|
222
|
+
variant="inline"
|
|
223
|
+
>
|
|
224
|
+
Overview
|
|
225
|
+
</dx-button>
|
|
226
|
+
<dx-button
|
|
227
|
+
href="http://tweetflight.wearebrightly.com/"
|
|
228
|
+
target="_blank"
|
|
229
|
+
variant="inline"
|
|
230
|
+
>
|
|
231
|
+
Guides
|
|
232
|
+
</dx-button>
|
|
233
|
+
<dx-button
|
|
234
|
+
href="http://tweetflight.wearebrightly.com/"
|
|
235
|
+
target="_blank"
|
|
236
|
+
variant="inline"
|
|
237
|
+
>
|
|
238
|
+
Reference
|
|
239
|
+
</dx-button>
|
|
240
|
+
</dx-card-docs>
|
|
241
|
+
<dx-card-docs
|
|
242
|
+
body="Quip SCIM API is a specification designed to make it easier to manage user identities in cloud-based applications and services."
|
|
243
|
+
href="https://developer.salesforce.com/"
|
|
244
|
+
label="API"
|
|
245
|
+
title="Quip SCIM API"
|
|
246
|
+
>
|
|
247
|
+
<dx-button
|
|
248
|
+
href="http://tweetflight.wearebrightly.com/"
|
|
249
|
+
target="_blank"
|
|
250
|
+
variant="inline"
|
|
251
|
+
>
|
|
252
|
+
Overview
|
|
253
|
+
</dx-button>
|
|
254
|
+
<dx-button
|
|
255
|
+
href="http://tweetflight.wearebrightly.com/"
|
|
256
|
+
target="_blank"
|
|
257
|
+
variant="inline"
|
|
258
|
+
>
|
|
259
|
+
Guides
|
|
260
|
+
</dx-button>
|
|
261
|
+
<dx-button
|
|
262
|
+
href="http://tweetflight.wearebrightly.com/"
|
|
263
|
+
target="_blank"
|
|
264
|
+
variant="inline"
|
|
265
|
+
>
|
|
266
|
+
Reference
|
|
267
|
+
</dx-button>
|
|
268
|
+
</dx-card-docs>
|
|
269
|
+
<dx-card-callout
|
|
270
|
+
background-color="indigo-vibrant-30"
|
|
271
|
+
href="/build-stuff"
|
|
272
|
+
title="Find an upcoming event"
|
|
273
|
+
label="Calendar"
|
|
274
|
+
></dx-card-callout>
|
|
275
|
+
</dx-grid>
|
|
276
|
+
</dx-section>
|
|
277
|
+
<dx-section
|
|
278
|
+
class="videos"
|
|
279
|
+
title="Watch Salesforce development in action"
|
|
280
|
+
label="Videos"
|
|
281
|
+
background-color="blue-vibrant-10"
|
|
282
|
+
dark="${true}"
|
|
283
|
+
>
|
|
284
|
+
<dx-grid columns="two-slim-right">
|
|
285
|
+
<dx-card-video-preview
|
|
286
|
+
body="Do you know how your customizations will perform when the crowds show up? Confidence is hard-earned."
|
|
287
|
+
datetime="${date}"
|
|
288
|
+
href="https://developer.salesforce.com/"
|
|
289
|
+
img-alt="Scenic view of a mountain."
|
|
290
|
+
img-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
291
|
+
title="How to Harness Einstein Vision and Language in Any App"
|
|
292
|
+
featured="${true}"
|
|
293
|
+
>
|
|
294
|
+
</dx-card-video-preview>
|
|
295
|
+
<dx-grid columns="one">
|
|
296
|
+
<dx-card-video-preview
|
|
297
|
+
datetime="${date}"
|
|
298
|
+
href="https://developer.salesforce.com/"
|
|
299
|
+
img-alt="Scenic view of a mountain."
|
|
300
|
+
img-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
301
|
+
title="How to Harness Einstein Vision and Language in Any App"
|
|
302
|
+
>
|
|
303
|
+
</dx-card-video-preview>
|
|
304
|
+
<dx-card-video-preview
|
|
305
|
+
datetime="${date}"
|
|
306
|
+
href="https://developer.salesforce.com/"
|
|
307
|
+
img-alt="Scenic view of a mountain."
|
|
308
|
+
img-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
309
|
+
title="How to Harness Einstein Vision and Language in Any App"
|
|
310
|
+
>
|
|
311
|
+
</dx-card-video-preview>
|
|
312
|
+
</dx-grid>
|
|
313
|
+
</dx-grid>
|
|
314
|
+
</dx-section>
|
|
315
|
+
<dx-section
|
|
316
|
+
title="Attend Salesforce virtual events. Now inspiration comes to you."
|
|
317
|
+
>
|
|
318
|
+
<dx-grid columns="two-slim-right">
|
|
319
|
+
<dx-card-event
|
|
320
|
+
end-datetime="${endDatetime}"
|
|
321
|
+
location="San Francisco"
|
|
322
|
+
start-datetime="${startDatetime}"
|
|
323
|
+
title="Virtual Event: Salesforce Life for Financial Services"
|
|
324
|
+
img-alt="Scenic view of a mountain."
|
|
325
|
+
img-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
326
|
+
featured="${true}"
|
|
327
|
+
></dx-card-event>
|
|
328
|
+
<dx-grid columns="one">
|
|
329
|
+
<dx-card-event
|
|
330
|
+
end-datetime="${endDatetime}"
|
|
331
|
+
start-datetime="${startDatetime}"
|
|
332
|
+
title="Virtual Event: Salesforce Life for Financial Services"
|
|
333
|
+
img-alt="Scenic view of a mountain."
|
|
334
|
+
img-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
335
|
+
></dx-card-event>
|
|
336
|
+
<dx-card-event
|
|
337
|
+
end-datetime="${endDatetime}"
|
|
338
|
+
start-datetime="${startDatetime}"
|
|
339
|
+
title="Virtual Event: Salesforce Life for Financial Services"
|
|
340
|
+
></dx-card-event>
|
|
341
|
+
</dx-grid>
|
|
342
|
+
</dx-grid>
|
|
343
|
+
</dx-section>
|
|
344
|
+
`;
|
|
345
|
+
|
|
346
|
+
export const NoText = () => html`
|
|
347
|
+
<style>
|
|
348
|
+
dx-section.no-text {
|
|
349
|
+
--dx-c-section-padding-bottom: var(--dx-g-spacing-md);
|
|
350
|
+
--dx-c-section-padding-top: var(--dx-g-spacing-md);
|
|
351
|
+
}
|
|
352
|
+
</style>
|
|
353
|
+
<dx-section class="no-text">
|
|
354
|
+
<dx-grid columns="two-slim-right">
|
|
355
|
+
<dx-card-event
|
|
356
|
+
end-datetime="${endDatetime}"
|
|
357
|
+
location="San Francisco"
|
|
358
|
+
start-datetime="${startDatetime}"
|
|
359
|
+
title="Virtual Event: Salesforce Life for Financial Services"
|
|
360
|
+
img-alt="Scenic view of a mountain."
|
|
361
|
+
img-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
362
|
+
featured="${true}"
|
|
363
|
+
></dx-card-event>
|
|
364
|
+
<dx-grid columns="one">
|
|
365
|
+
<dx-card-event
|
|
366
|
+
end-datetime="${endDatetime}"
|
|
367
|
+
start-datetime="${startDatetime}"
|
|
368
|
+
title="Virtual Event: Salesforce Life for Financial Services"
|
|
369
|
+
img-alt="Scenic view of a mountain."
|
|
370
|
+
img-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
371
|
+
></dx-card-event>
|
|
372
|
+
<dx-card-event
|
|
373
|
+
end-datetime="${endDatetime}"
|
|
374
|
+
start-datetime="${startDatetime}"
|
|
375
|
+
title="Virtual Event: Salesforce Life for Financial Services"
|
|
376
|
+
></dx-card-event>
|
|
377
|
+
</dx-grid>
|
|
378
|
+
</dx-grid>
|
|
379
|
+
<legend>This is a section with no label, title or subtitle</legend>
|
|
380
|
+
</dx-section>
|
|
381
|
+
`;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
import { toDxColor } from "utils-internal/css";
|
|
4
|
+
|
|
5
|
+
export default class Section extends LightningElement {
|
|
6
|
+
@api backgroundColor?: string | null = "transparent";
|
|
7
|
+
@api dark?: boolean = false;
|
|
8
|
+
@api headingLevel: "1" | "2" | "3" | "4" | "5" = "3";
|
|
9
|
+
@api label?: string | null = null;
|
|
10
|
+
@api subtitle?: string | null = null;
|
|
11
|
+
@api textAlign?: "center" | "left" = "left";
|
|
12
|
+
@api title?: string | null = null;
|
|
13
|
+
@api topGraphic?: boolean = false;
|
|
14
|
+
@api graphicOverlap?: boolean = false;
|
|
15
|
+
@api bottomGraphic?: boolean = false;
|
|
16
|
+
|
|
17
|
+
private get style(): string {
|
|
18
|
+
return `--dx-c-section-background-color: ${toDxColor(
|
|
19
|
+
this.backgroundColor
|
|
20
|
+
)};`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private get className() {
|
|
24
|
+
return cx(
|
|
25
|
+
"section",
|
|
26
|
+
this.dark && "section-dark",
|
|
27
|
+
`align-${this.textAlign}`,
|
|
28
|
+
this.graphicOverlap && "graphic-overlap",
|
|
29
|
+
this.bottomGraphic && "graphic-bottom",
|
|
30
|
+
this.topGraphic && "graphic-top"
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private get headingClassName() {
|
|
35
|
+
return cx("heading", `dx-text-heading-${this.headingLevel}`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
private get hasText(): boolean {
|
|
39
|
+
return !!(this.title || this.label || this.subtitle);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import SectionSignup from "dx/sectionSignup";
|
|
2
|
+
import { createRenderComponent } from "utils-internal/tests";
|
|
3
|
+
|
|
4
|
+
const TAG = "dx-section-signup";
|
|
5
|
+
const render = createRenderComponent(TAG, SectionSignup);
|
|
6
|
+
|
|
7
|
+
describe(TAG, () => {
|
|
8
|
+
it("renders", () => {
|
|
9
|
+
const element = render({ inputPlaceholder: "email" });
|
|
10
|
+
return expect(element).toBeAccessible();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it("fires subscription", () => {
|
|
14
|
+
const mockSubscribeHandler = jest.fn();
|
|
15
|
+
const component = render({
|
|
16
|
+
inputTitle: "sample title",
|
|
17
|
+
inputPlaceholder: "sample placehoder",
|
|
18
|
+
inputSubmitLabel: "sample label"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
component.addEventListener("subscribe", mockSubscribeHandler);
|
|
22
|
+
expect(mockSubscribeHandler).not.toHaveBeenCalled();
|
|
23
|
+
component.shadowRoot
|
|
24
|
+
.querySelector("dx-input")
|
|
25
|
+
.dispatchEvent(
|
|
26
|
+
new CustomEvent("submit", { detail: "sample@email.com" })
|
|
27
|
+
);
|
|
28
|
+
expect(mockSubscribeHandler).toHaveBeenCalledTimes(1);
|
|
29
|
+
return expect(component).toBeAccessible();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("correctly binds all properties", () => {
|
|
33
|
+
const component = render({
|
|
34
|
+
inputTitle: "sample title",
|
|
35
|
+
inputPlaceholder: "sample placehoder",
|
|
36
|
+
inputSubmitLabel: "sample label"
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
expect(component.inputTitle).toBe("sample title");
|
|
40
|
+
expect(component.inputPlaceholder).toBe("sample placehoder");
|
|
41
|
+
expect(component.inputSubmitLabel).toBe("sample label");
|
|
42
|
+
|
|
43
|
+
const dxinput = component.shadowRoot.querySelector("dx-input");
|
|
44
|
+
expect(dxinput.placeholder).toBe("sample placehoder");
|
|
45
|
+
expect(dxinput.submitLabel).toBe("sample label");
|
|
46
|
+
return expect(component).toBeAccessible();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("check for assigned elements", () => {
|
|
50
|
+
const component = render({
|
|
51
|
+
inputTitle: "sample title",
|
|
52
|
+
inputPlaceholder: "sample placehoder",
|
|
53
|
+
inputSubmitLabel: "sample label"
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const slot = component.shadowRoot.querySelector("slot");
|
|
57
|
+
const div = document.createElement("div");
|
|
58
|
+
slot.assignedElements = jest.fn().mockReturnValue([div]);
|
|
59
|
+
slot.dispatchEvent(new Event("slotchange"));
|
|
60
|
+
|
|
61
|
+
const elements = slot.assignedElements();
|
|
62
|
+
|
|
63
|
+
expect(elements.length).not.toBeUndefined();
|
|
64
|
+
return expect(component).toBeAccessible();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--dx-c-section-signup-width: 606px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.title-container {
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.title {
|
|
10
|
+
font-family: var(--dx-g-font-display);
|
|
11
|
+
color: var(--dx-g-blue-vibrant-20);
|
|
12
|
+
text-align: center;
|
|
13
|
+
line-height: var(--dx-g-text-2xl);
|
|
14
|
+
letter-spacing: -0.12px;
|
|
15
|
+
font-weight: var(--dx-g-font-demi);
|
|
16
|
+
font-size: var(--dx-g-text-lg);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.input-button-container {
|
|
20
|
+
--dx-c-button-container-width: 83.5%;
|
|
21
|
+
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
width: var(--dx-c-button-container-width);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.email-box-button {
|
|
27
|
+
--dx-c-input-width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.section-signup {
|
|
31
|
+
width: var(--dx-c-section-signup-width);
|
|
32
|
+
padding-bottom: var(--dx-g-spacing-xl);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media screen and (max-width: 640px) {
|
|
36
|
+
:host {
|
|
37
|
+
--dx-c-section-signup-width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.input-button-container {
|
|
41
|
+
--dx-c-button-container-width: 88.8%;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="section-signup">
|
|
3
|
+
<template if:true={inputTitle}>
|
|
4
|
+
<div class="title-container">
|
|
5
|
+
<h2 class="title">{inputTitle}</h2>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<slot onslotchange={onSlotChange}></slot>
|
|
10
|
+
|
|
11
|
+
<template if:true={isSlotEmpty}>
|
|
12
|
+
<div class="input-button-container">
|
|
13
|
+
<dx-input
|
|
14
|
+
class="email-box-button"
|
|
15
|
+
placeholder={inputPlaceholder}
|
|
16
|
+
submit-label={inputSubmitLabel}
|
|
17
|
+
onsubmit={onSubmit}
|
|
18
|
+
size={size}
|
|
19
|
+
></dx-input>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "dx/dx-section-signup",
|
|
5
|
+
component: "dx-section-signup"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const createStyles = () => html` <style>
|
|
9
|
+
dx-section-signup {
|
|
10
|
+
margin-top: 25px;
|
|
11
|
+
margin-bottom: 25px;
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
</style>`;
|
|
15
|
+
|
|
16
|
+
const ARGS = {
|
|
17
|
+
title: "Get the lastest posts from Developers Blog every week.",
|
|
18
|
+
placeholder: "Email",
|
|
19
|
+
label: "Subscribe"
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Default = () => html` ${createStyles()}
|
|
23
|
+
<dx-section-signup></dx-section-signup>`;
|
|
24
|
+
|
|
25
|
+
export const WithSlot = ({
|
|
26
|
+
title,
|
|
27
|
+
placeholder,
|
|
28
|
+
label
|
|
29
|
+
}: any) => html` ${createStyles()}
|
|
30
|
+
<dx-section-signup
|
|
31
|
+
input-title="${title}"
|
|
32
|
+
input-placeholder="${placeholder}"
|
|
33
|
+
input-submit-label="${label}"
|
|
34
|
+
>
|
|
35
|
+
<h1>Slot Content</h1>
|
|
36
|
+
</dx-section-signup>`;
|
|
37
|
+
WithSlot.args = ARGS;
|
|
38
|
+
|
|
39
|
+
export const WithParameters = ({
|
|
40
|
+
title,
|
|
41
|
+
placeholder,
|
|
42
|
+
label
|
|
43
|
+
}: any) => html` ${createStyles()}
|
|
44
|
+
<dx-section-signup
|
|
45
|
+
input-title="${title}"
|
|
46
|
+
input-placeholder="${placeholder}"
|
|
47
|
+
input-submit-label="${label}"
|
|
48
|
+
></dx-section-signup>`;
|
|
49
|
+
WithParameters.args = ARGS;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { LightningSlotElement } from "typings/custom";
|
|
3
|
+
import debounce from "debounce";
|
|
4
|
+
const MOBILE_SIZE = 640;
|
|
5
|
+
const getInputSize = () =>
|
|
6
|
+
(window.innerWidth ||
|
|
7
|
+
document.documentElement.clientWidth ||
|
|
8
|
+
document.body.clientWidth) < MOBILE_SIZE
|
|
9
|
+
? "small"
|
|
10
|
+
: "large";
|
|
11
|
+
export default class SectionSignup extends LightningElement {
|
|
12
|
+
@api inputTitle?: string = "";
|
|
13
|
+
@api inputPlaceholder?: string = "";
|
|
14
|
+
@api inputSubmitLabel?: string = "Subscribe";
|
|
15
|
+
|
|
16
|
+
private isSlotEmpty: boolean = true;
|
|
17
|
+
private size: string = getInputSize();
|
|
18
|
+
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
window.addEventListener("resize", this.onResize.bind(this));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
window.removeEventListener("resize", this.onResize.bind(this));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
private onSubmit(e: CustomEvent) {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
this.dispatchEvent(new CustomEvent("subscribe", { detail: e.detail }));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
private onSlotChange(e: LightningSlotElement) {
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
this.isSlotEmpty = e.target.assignedElements().length === 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private _updateSize = () => {
|
|
38
|
+
this.size = getInputSize();
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
private onResize = () =>
|
|
42
|
+
// @ts-ignore something weird happening here with debounce types
|
|
43
|
+
debounce(this._updateSize.bind(this)(), 600);
|
|
44
|
+
}
|