@salesforcedevs/dx-components 0.25.5 → 0.26.1-alpha0.3
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/lwc.config.json +1 -0
- package/package.json +5 -4
- package/LICENSE +0 -12
- package/src/assets/icons/action-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/brand-sprite/svg/symbols.svg +0 -1381
- package/src/assets/icons/custom-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/doctype-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/general-sprite/svg/symbols.svg +0 -3013
- package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +0 -257
- package/src/assets/icons/standard-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/utility-sprite/svg/symbols.svg +0 -1
- package/src/assets/svg/card-news-learn-moar.svg +0 -415
- package/src/assets/svg/cloud-1.svg +0 -24
- package/src/assets/svg/cloud-2.svg +0 -18
- package/src/assets/svg/codey.svg +0 -93
- package/src/assets/svg/command.svg +0 -9
- package/src/assets/svg/control.svg +0 -10
- package/src/assets/svg/docs-empty-state-small.svg +0 -72
- package/src/assets/svg/docs-empty-state.svg +0 -86
- package/src/assets/svg/dsc-home-news-bear.svg +0 -3
- package/src/assets/svg/dsc-home-news-community.png +0 -0
- package/src/assets/svg/dsc-home-news-goatbear.svg +0 -257
- package/src/assets/svg/dsc-home-news-samplegallery.svg +0 -76
- package/src/assets/svg/empty-state-assistant.svg +0 -1
- 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 +0 -10
- package/src/assets/svg/feature-backdrop2.svg +0 -10
- package/src/assets/svg/featured-demo-art-blank.svg +0 -76
- package/src/assets/svg/featured-demo-art-eBikes.svg +0 -77
- package/src/assets/svg/footer-graphic-large.svg +0 -207
- package/src/assets/svg/footer-graphic-mountains-small.svg +0 -17
- package/src/assets/svg/footer-graphic-mountains.svg +0 -21
- package/src/assets/svg/footer-graphic-trees-small.svg +0 -33
- package/src/assets/svg/footer-graphic-trees.svg +0 -62
- package/src/assets/svg/lake-mountain.svg +0 -79
- package/src/assets/svg/podcast-subscription-clouds-small.svg +0 -49
- package/src/assets/svg/podcast-subscription-clouds.svg +0 -57
- package/src/assets/svg/podcasts-subscription-apple.svg +0 -164
- package/src/assets/svg/podcasts-subscription-google.svg +0 -29
- package/src/assets/svg/podcasts-subscription-spotify.svg +0 -11
- package/src/assets/svg/salesforce-cloud.svg +0 -7
- package/src/assets/svg/salesforce-logo-corporate.svg +0 -21
- package/src/assets/svg/salesforce-logo.svg +0 -14
- package/src/assets/svg/sidebar-loading.svg +0 -34
- package/src/assets/svg/slack-cta-podcast-background-left.svg +0 -28
- package/src/assets/svg/slack-cta-podcast-background-right.svg +0 -38
- package/src/assets/svg/trees.svg +0 -42
- package/src/modules/dx/banner/__tests__/banner.test.ts +0 -33
- package/src/modules/dx/banner/banner.css +0 -46
- package/src/modules/dx/banner/banner.html +0 -13
- package/src/modules/dx/banner/banner.ts +0 -14
- package/src/modules/dx/brandThemeProvider/__tests__/brandThemeProvider.test.ts +0 -49
- package/src/modules/dx/brandThemeProvider/brandCssVars.ts +0 -10
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.html +0 -3
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.stories.ts +0 -321
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.ts +0 -46
- package/src/modules/dx/breadcrumbs/__tests__/breadcrumbs.test.ts +0 -140
- package/src/modules/dx/breadcrumbs/__tests__/mockProps.ts +0 -28
- package/src/modules/dx/breadcrumbs/breadcrumbs.css +0 -111
- package/src/modules/dx/breadcrumbs/breadcrumbs.html +0 -44
- package/src/modules/dx/breadcrumbs/breadcrumbs.stories.ts +0 -39
- package/src/modules/dx/breadcrumbs/breadcrumbs.ts +0 -122
- package/src/modules/dx/button/__tests__/button.test.ts +0 -107
- package/src/modules/dx/button/button.css +0 -175
- package/src/modules/dx/button/button.html +0 -43
- package/src/modules/dx/button/button.stories.ts +0 -150
- package/src/modules/dx/button/button.ts +0 -63
- package/src/modules/dx/cardBlogPost/__tests__/cardBlogPost.test.ts +0 -26
- package/src/modules/dx/cardBlogPost/__tests__/mockProps.ts +0 -12
- package/src/modules/dx/cardBlogPost/cardBlogPost.css +0 -13
- package/src/modules/dx/cardBlogPost/cardBlogPost.html +0 -24
- package/src/modules/dx/cardBlogPost/cardBlogPost.stories.ts +0 -164
- package/src/modules/dx/cardBlogPost/cardBlogPost.ts +0 -23
- package/src/modules/dx/cardBlogPostProvider/__tests__/cardBlogPostProvider.test.ts +0 -34
- package/src/modules/dx/cardBlogPostProvider/__tests__/mockWordpressPosts.ts +0 -44
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.css +0 -3
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.html +0 -16
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.ts +0 -29
- package/src/modules/dx/cardCallout/__tests__/cardCallout.test.ts +0 -20
- package/src/modules/dx/cardCallout/__tests__/mockProps.ts +0 -7
- package/src/modules/dx/cardCallout/cardCallout.css +0 -57
- package/src/modules/dx/cardCallout/cardCallout.html +0 -15
- package/src/modules/dx/cardCallout/cardCallout.stories.ts +0 -33
- package/src/modules/dx/cardCallout/cardCallout.ts +0 -37
- package/src/modules/dx/cardContent/__tests__/cardContent.test.ts +0 -100
- package/src/modules/dx/cardContent/__tests__/mockProps.ts +0 -13
- package/src/modules/dx/cardContent/cardContent.css +0 -52
- package/src/modules/dx/cardContent/cardContent.html +0 -59
- package/src/modules/dx/cardContent/cardContent.stories.ts +0 -127
- package/src/modules/dx/cardContent/cardContent.ts +0 -68
- package/src/modules/dx/cardDemo/cardDemo.css +0 -1
- package/src/modules/dx/cardDemo/cardDemo.html +0 -12
- package/src/modules/dx/cardDemo/cardDemo.stories.ts +0 -115
- package/src/modules/dx/cardDemo/cardDemo.ts +0 -11
- package/src/modules/dx/cardDocs/__tests__/cardDocs.test.ts +0 -48
- package/src/modules/dx/cardDocs/__tests__/mockProps.ts +0 -9
- package/src/modules/dx/cardDocs/cardDocs.css +0 -50
- package/src/modules/dx/cardDocs/cardDocs.html +0 -20
- package/src/modules/dx/cardDocs/cardDocs.stories.ts +0 -299
- package/src/modules/dx/cardDocs/cardDocs.ts +0 -30
- package/src/modules/dx/cardEvent/__tests__/cardEvent.test.ts +0 -95
- package/src/modules/dx/cardEvent/__tests__/mockProps.ts +0 -10
- package/src/modules/dx/cardEvent/cardEvent.css +0 -107
- package/src/modules/dx/cardEvent/cardEvent.html +0 -94
- package/src/modules/dx/cardEvent/cardEvent.stories.ts +0 -153
- package/src/modules/dx/cardEvent/cardEvent.ts +0 -42
- package/src/modules/dx/cardExpanded/__tests__/cardExpanded.test.ts +0 -193
- package/src/modules/dx/cardExpanded/__tests__/mockProps.ts +0 -21
- package/src/modules/dx/cardExpanded/cardExpanded.css +0 -49
- package/src/modules/dx/cardExpanded/cardExpanded.html +0 -37
- package/src/modules/dx/cardExpanded/cardExpanded.stories.ts +0 -59
- package/src/modules/dx/cardExpanded/cardExpanded.ts +0 -45
- package/src/modules/dx/cardGrid/__tests__/cardMockProps.ts +0 -431
- package/src/modules/dx/cardGrid/__tests__/mockProps.ts +0 -15
- package/src/modules/dx/cardGrid/cardGrid.css +0 -89
- package/src/modules/dx/cardGrid/cardGrid.html +0 -46
- package/src/modules/dx/cardGrid/cardGrid.stories.ts +0 -111
- package/src/modules/dx/cardGrid/cardGrid.ts +0 -140
- package/src/modules/dx/cardMinimal/__tests__/cardMinimal.test.ts +0 -87
- package/src/modules/dx/cardMinimal/__tests__/mockProps.ts +0 -10
- package/src/modules/dx/cardMinimal/cardMinimal.css +0 -31
- package/src/modules/dx/cardMinimal/cardMinimal.html +0 -13
- package/src/modules/dx/cardMinimal/cardMinimal.stories.ts +0 -32
- package/src/modules/dx/cardMinimal/cardMinimal.ts +0 -3
- package/src/modules/dx/cardNews/__tests__/cardNews.test.ts +0 -58
- package/src/modules/dx/cardNews/__tests__/mockProps.ts +0 -7
- package/src/modules/dx/cardNews/cardNews.css +0 -159
- package/src/modules/dx/cardNews/cardNews.html +0 -37
- package/src/modules/dx/cardNews/cardNews.stories.ts +0 -115
- package/src/modules/dx/cardNews/cardNews.ts +0 -62
- package/src/modules/dx/cardPodcastEpisode/__tests__/cardPodcastEpisode.test.ts +0 -68
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.css +0 -19
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.html +0 -36
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.stories.ts +0 -31
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.ts +0 -36
- package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/cardPodcastEpisodeProvider.test.ts +0 -36
- package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/mockWordpressEpisodes.ts +0 -50
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.css +0 -3
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.html +0 -12
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.ts +0 -29
- package/src/modules/dx/cardSmall/__tests__/cardSmall.test.ts +0 -66
- package/src/modules/dx/cardSmall/__tests__/mockProps.ts +0 -8
- package/src/modules/dx/cardSmall/cardSmall.css +0 -32
- package/src/modules/dx/cardSmall/cardSmall.html +0 -42
- package/src/modules/dx/cardSmall/cardSmall.stories.ts +0 -166
- package/src/modules/dx/cardSmall/cardSmall.ts +0 -38
- package/src/modules/dx/cardTitle/__tests__/cardTitle.test.ts +0 -46
- package/src/modules/dx/cardTitle/cardTitle.css +0 -41
- package/src/modules/dx/cardTitle/cardTitle.html +0 -20
- package/src/modules/dx/cardTitle/cardTitle.ts +0 -27
- package/src/modules/dx/cardTrailheadModule/__tests__/cardTrailheadModule.test.ts +0 -18
- package/src/modules/dx/cardTrailheadModule/__tests__/mockProps.ts +0 -11
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.css +0 -24
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.html +0 -20
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.stories.ts +0 -122
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.ts +0 -18
- package/src/modules/dx/cardVideoPreview/__tests__/cardVideoPreview.test.ts +0 -22
- package/src/modules/dx/cardVideoPreview/__tests__/mockProps.ts +0 -11
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.css +0 -14
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.html +0 -26
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.stories.ts +0 -147
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.ts +0 -13
- package/src/modules/dx/checkbox/__tests__/checkbox.test.ts +0 -85
- package/src/modules/dx/checkbox/__tests__/mockProps.ts +0 -5
- package/src/modules/dx/checkbox/checkbox.css +0 -168
- package/src/modules/dx/checkbox/checkbox.html +0 -26
- package/src/modules/dx/checkbox/checkbox.stories.ts +0 -38
- package/src/modules/dx/checkbox/checkbox.ts +0 -55
- package/src/modules/dx/checkboxGroup/__tests__/checkboxGroup.test.ts +0 -80
- package/src/modules/dx/checkboxGroup/__tests__/mockProps.ts +0 -14
- package/src/modules/dx/checkboxGroup/checkboxGroup.css +0 -12
- package/src/modules/dx/checkboxGroup/checkboxGroup.html +0 -15
- package/src/modules/dx/checkboxGroup/checkboxGroup.stories.ts +0 -33
- package/src/modules/dx/checkboxGroup/checkboxGroup.ts +0 -77
- package/src/modules/dx/codeBlock/__tests__/codeBlock.test.ts +0 -238
- package/src/modules/dx/codeBlock/__tests__/mockProps.ts +0 -160
- package/src/modules/dx/codeBlock/codeBlock.css +0 -128
- package/src/modules/dx/codeBlock/codeBlock.html +0 -79
- package/src/modules/dx/codeBlock/codeBlock.stories.ts +0 -143
- package/src/modules/dx/codeBlock/codeBlock.ts +0 -215
- package/src/modules/dx/codeBlock/darkTheme.css +0 -88
- package/src/modules/dx/codeBlock/lightTheme.css +0 -72
- package/src/modules/dx/dropdown/__tests__/dropdown.test.ts +0 -165
- package/src/modules/dx/dropdown/__tests__/mockNestedOptions.ts +0 -96
- package/src/modules/dx/dropdown/__tests__/mockOptions.ts +0 -10
- package/src/modules/dx/dropdown/__tests__/mockProps.ts +0 -6
- package/src/modules/dx/dropdown/dropdown.css +0 -93
- package/src/modules/dx/dropdown/dropdown.html +0 -67
- package/src/modules/dx/dropdown/dropdown.stories.ts +0 -89
- package/src/modules/dx/dropdown/dropdown.ts +0 -182
- package/src/modules/dx/dropdownOption/__tests__/dropdownOption.test.ts +0 -112
- package/src/modules/dx/dropdownOption/__tests__/mockProps.ts +0 -20
- package/src/modules/dx/dropdownOption/dropdownOption.css +0 -61
- package/src/modules/dx/dropdownOption/dropdownOption.html +0 -53
- package/src/modules/dx/dropdownOption/dropdownOption.ts +0 -39
- package/src/modules/dx/emptyState/__tests__/emptyState.test.ts +0 -52
- package/src/modules/dx/emptyState/__tests__/mockProps.ts +0 -4
- package/src/modules/dx/emptyState/emptyState.css +0 -64
- package/src/modules/dx/emptyState/emptyState.html +0 -9
- package/src/modules/dx/emptyState/emptyState.stories.ts +0 -45
- package/src/modules/dx/emptyState/emptyState.ts +0 -20
- package/src/modules/dx/feature/__tests__/feature.test.ts +0 -51
- package/src/modules/dx/feature/__tests__/mockProps.ts +0 -8
- package/src/modules/dx/feature/feature.css +0 -135
- package/src/modules/dx/feature/feature.html +0 -33
- package/src/modules/dx/feature/feature.ts +0 -34
- package/src/modules/dx/featureGrid/__tests__/featureGrid.test.ts +0 -21
- package/src/modules/dx/featureGrid/featureGrid.html +0 -3
- package/src/modules/dx/featureGrid/featureGrid.stories.ts +0 -120
- package/src/modules/dx/featureGrid/featureGrid.ts +0 -15
- package/src/modules/dx/featuredContentHeader/__tests__/featuredContentHeader.test.ts +0 -178
- package/src/modules/dx/featuredContentHeader/__tests__/mockProps.ts +0 -73
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +0 -469
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +0 -96
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.stories.ts +0 -153
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +0 -113
- package/src/modules/dx/featuredContentHeader/svgs.ts +0 -35
- package/src/modules/dx/featuresList/__tests__/featuresList.test.ts +0 -43
- package/src/modules/dx/featuresList/__tests__/mockProps.ts +0 -17
- package/src/modules/dx/featuresList/featuresList.css +0 -24
- package/src/modules/dx/featuresList/featuresList.html +0 -20
- package/src/modules/dx/featuresList/featuresList.stories.ts +0 -30
- package/src/modules/dx/featuresList/featuresList.ts +0 -21
- package/src/modules/dx/footer/__tests__/footer.test.ts +0 -147
- package/src/modules/dx/footer/__tests__/mockLocales.ts +0 -7
- package/src/modules/dx/footer/footer.css +0 -405
- package/src/modules/dx/footer/footer.html +0 -145
- package/src/modules/dx/footer/footer.stories.ts +0 -88
- package/src/modules/dx/footer/footer.ts +0 -124
- package/src/modules/dx/footer/links.ts +0 -140
- package/src/modules/dx/footerOption/__tests__/footerOption.test.ts +0 -34
- package/src/modules/dx/footerOption/__tests__/mockProps.ts +0 -7
- package/src/modules/dx/footerOption/footerOption.css +0 -4
- package/src/modules/dx/footerOption/footerOption.html +0 -12
- package/src/modules/dx/footerOption/footerOption.ts +0 -19
- package/src/modules/dx/formattedDateTime/__tests__/formattedDateTime.test.ts +0 -25
- package/src/modules/dx/formattedDateTime/__tests__/mockProps.ts +0 -13
- package/src/modules/dx/formattedDateTime/formattedDateTime.html +0 -1
- package/src/modules/dx/formattedDateTime/formattedDateTime.stories.ts +0 -103
- package/src/modules/dx/formattedDateTime/formattedDateTime.ts +0 -72
- package/src/modules/dx/grid/__tests__/grid.test.ts +0 -32
- package/src/modules/dx/grid/grid.css +0 -48
- package/src/modules/dx/grid/grid.html +0 -3
- package/src/modules/dx/grid/grid.md +0 -14
- package/src/modules/dx/grid/grid.stories.ts +0 -134
- package/src/modules/dx/grid/grid.ts +0 -72
- package/src/modules/dx/groupBio/__tests__/groupBio.test.ts +0 -82
- package/src/modules/dx/groupBio/__tests__/mockProps.ts +0 -15
- package/src/modules/dx/groupBio/groupBio.css +0 -49
- package/src/modules/dx/groupBio/groupBio.html +0 -29
- package/src/modules/dx/groupBio/groupBio.stories.ts +0 -66
- package/src/modules/dx/groupBio/groupBio.ts +0 -41
- package/src/modules/dx/groupText/__tests__/groupText.test.ts +0 -69
- package/src/modules/dx/groupText/__tests__/mockProps.ts +0 -35
- package/src/modules/dx/groupText/groupText.css +0 -119
- package/src/modules/dx/groupText/groupText.html +0 -65
- package/src/modules/dx/groupText/groupText.stories.ts +0 -81
- package/src/modules/dx/groupText/groupText.ts +0 -93
- package/src/modules/dx/headTags/headTags.html +0 -3
- package/src/modules/dx/headTags/headTags.ts +0 -39
- package/src/modules/dx/header/__benchmarks__/header.benchmark.js +0 -45
- package/src/modules/dx/header/__tests__/header.test.ts +0 -236
- package/src/modules/dx/header/__tests__/mockNavArchitects.ts +0 -169
- package/src/modules/dx/header/__tests__/mockNavDevelopers.ts +0 -419
- package/src/modules/dx/header/__tests__/mockNavs.ts +0 -115
- package/src/modules/dx/header/__tests__/mockProps.ts +0 -164
- package/src/modules/dx/header/header.css +0 -109
- package/src/modules/dx/header/header.html +0 -128
- package/src/modules/dx/header/header.stories.ts +0 -172
- package/src/modules/dx/header/header.ts +0 -27
- package/src/modules/dx/headerMobileNavMenu/__tests__/headerMobileNavMenu.test.ts +0 -123
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +0 -160
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.html +0 -73
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +0 -102
- package/src/modules/dx/headerMobileNavMenuOption/__tests__/headerMobileNavMenuOption.test.ts +0 -38
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.css +0 -5
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.html +0 -14
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.ts +0 -20
- package/src/modules/dx/headerNav/__tests__/headerNav.test.ts +0 -49
- package/src/modules/dx/headerNav/headerNav.css +0 -31
- package/src/modules/dx/headerNav/headerNav.html +0 -48
- package/src/modules/dx/headerNav/headerNav.ts +0 -56
- package/src/modules/dx/headerSearch/__tests__/headerSearch.test.ts +0 -182
- package/src/modules/dx/headerSearch/__tests__/mockData.ts +0 -11
- package/src/modules/dx/headerSearch/__tests__/mockProps.ts +0 -6
- package/src/modules/dx/headerSearch/headerSearch.css +0 -62
- package/src/modules/dx/headerSearch/headerSearch.html +0 -64
- package/src/modules/dx/headerSearch/headerSearch.ts +0 -159
- package/src/modules/dx/helmet/__tests__/helmet.test.ts +0 -52
- package/src/modules/dx/helmet/helmet.css +0 -83
- package/src/modules/dx/helmet/helmet.html +0 -39
- package/src/modules/dx/helmet/helmet.stories.ts +0 -53
- package/src/modules/dx/helmet/helmet.ts +0 -27
- package/src/modules/dx/hr/__tests__/hr.test.ts +0 -53
- package/src/modules/dx/hr/__tests__/mockProps.ts +0 -16
- package/src/modules/dx/hr/hr.css +0 -55
- package/src/modules/dx/hr/hr.html +0 -23
- package/src/modules/dx/hr/hr.stories.ts +0 -50
- package/src/modules/dx/hr/hr.ts +0 -45
- package/src/modules/dx/icon/__tests__/icon.test.ts +0 -54
- package/src/modules/dx/icon/icon.css +0 -14
- package/src/modules/dx/icon/icon.html +0 -11
- package/src/modules/dx/icon/icon.stories.ts +0 -100
- package/src/modules/dx/icon/icon.ts +0 -85
- package/src/modules/dx/iconBadge/__tests__/iconBadge.test.ts +0 -17
- package/src/modules/dx/iconBadge/iconBadge.css +0 -40
- package/src/modules/dx/iconBadge/iconBadge.html +0 -10
- package/src/modules/dx/iconBadge/iconBadge.stories.ts +0 -32
- package/src/modules/dx/iconBadge/iconBadge.ts +0 -42
- package/src/modules/dx/imageAndLabel/__tests__/imageAndLabel.test.ts +0 -39
- package/src/modules/dx/imageAndLabel/__tests__/mockProps.ts +0 -6
- package/src/modules/dx/imageAndLabel/imageAndLabel.css +0 -54
- package/src/modules/dx/imageAndLabel/imageAndLabel.html +0 -22
- package/src/modules/dx/imageAndLabel/imageAndLabel.stories.ts +0 -48
- package/src/modules/dx/imageAndLabel/imageAndLabel.ts +0 -16
- package/src/modules/dx/input/__tests__/input.test.ts +0 -357
- package/src/modules/dx/input/input.css +0 -165
- package/src/modules/dx/input/input.html +0 -58
- package/src/modules/dx/input/input.stories.ts +0 -102
- package/src/modules/dx/input/input.ts +0 -238
- package/src/modules/dx/input/validators.ts +0 -5
- package/src/modules/dx/instrumentation/__tests__/instrumentation.test.ts +0 -86
- package/src/modules/dx/instrumentation/instrumentation.html +0 -1
- package/src/modules/dx/instrumentation/instrumentation.ts +0 -116
- package/src/modules/dx/interactiveImage/__tests__/interactiveImage.test.ts +0 -83
- package/src/modules/dx/interactiveImage/__tests__/mockProps.ts +0 -39
- package/src/modules/dx/interactiveImage/interactiveImage.css +0 -59
- package/src/modules/dx/interactiveImage/interactiveImage.html +0 -32
- package/src/modules/dx/interactiveImage/interactiveImage.stories.ts +0 -31
- package/src/modules/dx/interactiveImage/interactiveImage.ts +0 -71
- package/src/modules/dx/lazy/__tests__/lazy.test.ts +0 -43
- package/src/modules/dx/lazy/lazy.html +0 -5
- package/src/modules/dx/lazy/lazy.stories.ts +0 -132
- package/src/modules/dx/lazy/lazy.ts +0 -163
- package/src/modules/dx/logo/logo.css +0 -33
- package/src/modules/dx/logo/logo.html +0 -6
- package/src/modules/dx/logo/logo.ts +0 -8
- package/src/modules/dx/newsletterForm/newsletterForm.css +0 -73
- package/src/modules/dx/newsletterForm/newsletterForm.html +0 -73
- package/src/modules/dx/newsletterForm/newsletterForm.ts +0 -238
- package/src/modules/dx/pagination/__tests__/pagination.test.ts +0 -121
- package/src/modules/dx/pagination/pagination.css +0 -51
- package/src/modules/dx/pagination/pagination.html +0 -45
- package/src/modules/dx/pagination/pagination.stories.ts +0 -88
- package/src/modules/dx/pagination/pagination.ts +0 -93
- package/src/modules/dx/podcastHost/__tests__/mockProps.ts +0 -8
- package/src/modules/dx/podcastHost/__tests__/podcastHost.test.ts +0 -21
- package/src/modules/dx/podcastHost/podcastHost.css +0 -62
- package/src/modules/dx/podcastHost/podcastHost.html +0 -28
- package/src/modules/dx/podcastHost/podcastHost.stories.ts +0 -17
- package/src/modules/dx/podcastHost/podcastHost.ts +0 -13
- package/src/modules/dx/podcastPlayer/__tests__/podcastPlayer.test.ts +0 -20
- package/src/modules/dx/podcastPlayer/podcastPlayer.css +0 -10
- package/src/modules/dx/podcastPlayer/podcastPlayer.html +0 -3
- package/src/modules/dx/podcastPlayer/podcastPlayer.stories.ts +0 -13
- package/src/modules/dx/podcastPlayer/podcastPlayer.ts +0 -5
- package/src/modules/dx/podcastSubscription/__tests__/podcastSubscription.test.ts +0 -16
- package/src/modules/dx/podcastSubscription/podcastSubscription.css +0 -92
- package/src/modules/dx/podcastSubscription/podcastSubscription.html +0 -24
- package/src/modules/dx/podcastSubscription/podcastSubscription.stories.ts +0 -23
- package/src/modules/dx/podcastSubscription/podcastSubscription.ts +0 -58
- package/src/modules/dx/popover/__tests__/mockProps.ts +0 -8
- package/src/modules/dx/popover/__tests__/popover.test.ts +0 -313
- package/src/modules/dx/popover/popover.css +0 -63
- package/src/modules/dx/popover/popover.html +0 -16
- package/src/modules/dx/popover/popover.stories.ts +0 -82
- package/src/modules/dx/popover/popover.ts +0 -313
- package/src/modules/dx/radioGroup/__tests__/mockProps.ts +0 -12
- package/src/modules/dx/radioGroup/__tests__/radioGroup.test.ts +0 -42
- package/src/modules/dx/radioGroup/radioGroup.css +0 -12
- package/src/modules/dx/radioGroup/radioGroup.html +0 -16
- package/src/modules/dx/radioGroup/radioGroup.stories.ts +0 -25
- package/src/modules/dx/radioGroup/radioGroup.ts +0 -65
- package/src/modules/dx/relativeDateTime/__tests__/mockProps.ts +0 -55
- package/src/modules/dx/relativeDateTime/__tests__/relativeDateTime.test.ts +0 -52
- package/src/modules/dx/relativeDateTime/relativeDateTime.html +0 -3
- package/src/modules/dx/relativeDateTime/relativeDateTime.stories.ts +0 -83
- package/src/modules/dx/relativeDateTime/relativeDateTime.ts +0 -113
- package/src/modules/dx/searchResults/coveo.css +0 -18989
- package/src/modules/dx/searchResults/searchResults.css +0 -387
- package/src/modules/dx/searchResults/searchResults.html +0 -104
- package/src/modules/dx/searchResults/searchResults.stories.ts +0 -36
- package/src/modules/dx/searchResults/searchResults.ts +0 -186
- package/src/modules/dx/section/__tests__/section.test.ts +0 -17
- package/src/modules/dx/section/section.css +0 -130
- package/src/modules/dx/section/section.html +0 -66
- package/src/modules/dx/section/section.stories.ts +0 -381
- package/src/modules/dx/section/section.ts +0 -41
- package/src/modules/dx/sectionSignup/__tests__/sectionSignup.test.ts +0 -66
- package/src/modules/dx/sectionSignup/sectionSignup.css +0 -43
- package/src/modules/dx/sectionSignup/sectionSignup.html +0 -23
- package/src/modules/dx/sectionSignup/sectionSignup.stories.ts +0 -49
- package/src/modules/dx/sectionSignup/sectionSignup.ts +0 -44
- package/src/modules/dx/select/select.css +0 -44
- package/src/modules/dx/select/select.html +0 -60
- package/src/modules/dx/select/select.stories.ts +0 -59
- package/src/modules/dx/select/select.ts +0 -23
- package/src/modules/dx/sidebar/__tests__/mockProps.ts +0 -181
- package/src/modules/dx/sidebar/__tests__/mockSearchChangeEmptyEvent.ts +0 -6
- package/src/modules/dx/sidebar/__tests__/mockSearchChangeEvent.ts +0 -527
- package/src/modules/dx/sidebar/__tests__/sidebar.test.ts +0 -568
- package/src/modules/dx/sidebar/sidebar.css +0 -192
- package/src/modules/dx/sidebar/sidebar.html +0 -94
- package/src/modules/dx/sidebar/sidebar.stories.ts +0 -188
- package/src/modules/dx/sidebar/sidebar.ts +0 -255
- package/src/modules/dx/sidebarOld/__tests__/mockProps.ts +0 -178
- package/src/modules/dx/sidebarOld/__tests__/sidebarOld.test.ts +0 -570
- package/src/modules/dx/sidebarOld/sidebarOld.css +0 -160
- package/src/modules/dx/sidebarOld/sidebarOld.html +0 -70
- package/src/modules/dx/sidebarOld/sidebarOld.stories.ts +0 -139
- package/src/modules/dx/sidebarOld/sidebarOld.ts +0 -187
- package/src/modules/dx/sidebarSearch/__tests__/mockPreloadedState.ts +0 -1686
- package/src/modules/dx/sidebarSearch/__tests__/sidebarSearch.test.ts +0 -175
- package/src/modules/dx/sidebarSearch/sidebarSearch.css +0 -3
- package/src/modules/dx/sidebarSearch/sidebarSearch.html +0 -26
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +0 -440
- package/src/modules/dx/sidebarSearchResult/__tests__/sidebarSearchResult.test.ts +0 -96
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +0 -36
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.html +0 -14
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.ts +0 -70
- package/src/modules/dx/slackCta/__tests__/slackCta.test.ts +0 -48
- package/src/modules/dx/slackCta/slackCta.css +0 -41
- package/src/modules/dx/slackCta/slackCta.html +0 -17
- package/src/modules/dx/slackCta/slackCta.stories.ts +0 -25
- package/src/modules/dx/slackCta/slackCta.ts +0 -13
- package/src/modules/dx/socials/__tests__/socials.test.ts +0 -114
- package/src/modules/dx/socials/socials.css +0 -35
- package/src/modules/dx/socials/socials.html +0 -22
- package/src/modules/dx/socials/socials.stories.ts +0 -24
- package/src/modules/dx/socials/socials.ts +0 -81
- package/src/modules/dx/spinner/__tests__/spinner.test.ts +0 -37
- package/src/modules/dx/spinner/spinner.css +0 -750
- package/src/modules/dx/spinner/spinner.html +0 -6
- package/src/modules/dx/spinner/spinner.stories.ts +0 -69
- package/src/modules/dx/spinner/spinner.ts +0 -20
- package/src/modules/dx/tab/__tests__/tab.test.ts +0 -129
- package/src/modules/dx/tab/tab.css +0 -106
- package/src/modules/dx/tab/tab.html +0 -13
- package/src/modules/dx/tab/tab.stories.ts +0 -57
- package/src/modules/dx/tab/tab.ts +0 -52
- package/src/modules/dx/toc/__tests__/mockProps.ts +0 -28
- package/src/modules/dx/toc/__tests__/toc.test.ts +0 -109
- package/src/modules/dx/toc/toc.css +0 -94
- package/src/modules/dx/toc/toc.html +0 -28
- package/src/modules/dx/toc/toc.stories.ts +0 -26
- package/src/modules/dx/toc/toc.ts +0 -77
- package/src/modules/dx/tooltip/__tests__/tooltip.test.ts +0 -22
- package/src/modules/dx/tooltip/microtip.css +0 -269
- package/src/modules/dx/tooltip/tooltip.css +0 -36
- package/src/modules/dx/tooltip/tooltip.html +0 -5
- package/src/modules/dx/tooltip/tooltip.stories.ts +0 -46
- package/src/modules/dx/tooltip/tooltip.ts +0 -6
- package/src/modules/dx/topics/__tests__/mockProps.ts +0 -3
- package/src/modules/dx/topics/__tests__/topics.test.ts +0 -31
- package/src/modules/dx/topics/topics.css +0 -25
- package/src/modules/dx/topics/topics.html +0 -12
- package/src/modules/dx/topics/topics.ts +0 -25
- package/src/modules/dx/tree/__tests__/mockProps.ts +0 -215
- package/src/modules/dx/tree/__tests__/tree.test.ts +0 -346
- package/src/modules/dx/tree/__tests__/treeHandler.test.ts +0 -194
- package/src/modules/dx/tree/tree.css +0 -5
- package/src/modules/dx/tree/tree.html +0 -11
- package/src/modules/dx/tree/tree.stories.ts +0 -65
- package/src/modules/dx/tree/tree.ts +0 -72
- package/src/modules/dx/tree/treeHandler.ts +0 -100
- package/src/modules/dx/treeItem/__tests__/mockProps.ts +0 -46
- package/src/modules/dx/treeItem/__tests__/treeItem.test.ts +0 -377
- package/src/modules/dx/treeItem/treeItem.css +0 -14
- package/src/modules/dx/treeItem/treeItem.html +0 -22
- package/src/modules/dx/treeItem/treeItem.ts +0 -110
- package/src/modules/dx/treeTile/__tests__/mockProps.ts +0 -16
- package/src/modules/dx/treeTile/__tests__/treeTile.test.ts +0 -168
- package/src/modules/dx/treeTile/treeTile.css +0 -190
- package/src/modules/dx/treeTile/treeTile.html +0 -27
- package/src/modules/dx/treeTile/treeTile.ts +0 -59
- package/src/modules/dx/typeBadge/__tests__/typeBadge.test.ts +0 -77
- package/src/modules/dx/typeBadge/typeBadge.css +0 -74
- package/src/modules/dx/typeBadge/typeBadge.html +0 -5
- package/src/modules/dx/typeBadge/typeBadge.stories.ts +0 -114
- package/src/modules/dx/typeBadge/typeBadge.ts +0 -65
- package/src/modules/dx/typeBadgeGroup/__tests__/mockProps.ts +0 -11
- package/src/modules/dx/typeBadgeGroup/__tests__/typeBadgeGroup.test.ts +0 -72
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +0 -12
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +0 -11
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.stories.ts +0 -19
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +0 -18
- package/src/modules/helpers/animations/animations.css +0 -15
- package/src/modules/helpers/button/button.css +0 -4
- package/src/modules/helpers/card/card.css +0 -258
- package/src/modules/helpers/code/code.css +0 -296
- package/src/modules/helpers/commonHeader/commonHeader.css +0 -130
- package/src/modules/helpers/reset/reset.css +0 -559
- package/src/modules/helpers/sidebar/sidebar.css +0 -21
- package/src/modules/helpers/slds/slds.css +0 -191
- package/src/modules/helpers/table/table.css +0 -110
- package/src/modules/helpers/text/text.css +0 -163
- package/src/modules/test-components/buttonTest/buttonTest.html +0 -3
- package/src/modules/test-components/buttonTest/buttonTest.ts +0 -3
- package/src/modules/test-components/codeBlockTest/codeBlockTest.js +0 -4
- package/src/modules/test-components/featureGridTest/featureGridTest.html +0 -7
- package/src/modules/test-components/featureGridTest/featureGridTest.ts +0 -5
- package/src/modules/test-components/instrumentationTest/instrumentationTest.html +0 -4
- package/src/modules/test-components/instrumentationTest/instrumentationTest.ts +0 -8
- package/src/modules/test-components/popoverTest/popoverTest.html +0 -6
- package/src/modules/test-components/popoverTest/popoverTest.ts +0 -5
- package/src/modules/utils/highlight/__tests__/highlight.test.ts +0 -108
- package/src/modules/utils/highlight/__tests__/mockProps.ts +0 -45
- package/src/modules/utils/highlight/highlight.ts +0 -32
- package/src/modules/utils/normalizers/normalizers.ts +0 -91
- package/src/modules/utils-internal/archiveCard/archiveCard.ts +0 -35
- package/src/modules/utils-internal/coveo/coveo.ts +0 -70
- package/src/modules/utils-internal/css/css.ts +0 -43
- package/src/modules/utils-internal/devices/devices.ts +0 -1
- package/src/modules/utils-internal/headerBase/headerBase.ts +0 -204
- package/src/modules/utils-internal/jest/jest.ts +0 -58
- package/src/modules/utils-internal/options/options.ts +0 -39
- package/src/modules/utils-internal/prismjs/prismjs.html +0 -3
- package/src/modules/utils-internal/prismjs/prismjs.ts +0 -3321
- package/src/modules/utils-internal/recentSearches/__tests__/recentSearches.test.ts +0 -83
- package/src/modules/utils-internal/recentSearches/recentSearches.ts +0 -57
- package/src/modules/utils-internal/regexps/regexps.ts +0 -5
- package/src/modules/utils-internal/seo/seo.ts +0 -4
- package/src/modules/utils-internal/slot/slot.ts +0 -17
- package/src/modules/utils-internal/storybook/storybook.ts +0 -32
- package/src/modules/utils-internal/tests/tests.ts +0 -38
- package/src/modules/utils-internal/wordpress/__tests__/wordpress.test.ts +0 -15
- package/src/modules/utils-internal/wordpress/wordpress.ts +0 -13
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
import cx from "classnames";
|
|
3
|
-
import { IconSize, IconSymbol } from "typings/custom";
|
|
4
|
-
import { isMac } from "utils-internal/devices";
|
|
5
|
-
import { isValidEmail } from "./validators";
|
|
6
|
-
|
|
7
|
-
type ValidatorMap = {
|
|
8
|
-
[key: string]: {
|
|
9
|
-
validator: (value: string | null) => boolean;
|
|
10
|
-
errorMessage: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const typeValidatorMap: ValidatorMap = {
|
|
15
|
-
email: {
|
|
16
|
-
validator: isValidEmail,
|
|
17
|
-
errorMessage: "Enter valid email"
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export default class Input extends LightningElement {
|
|
21
|
-
@api ariaLabel!: string;
|
|
22
|
-
@api autocomplete: string | null = null;
|
|
23
|
-
@api clearable: boolean = false;
|
|
24
|
-
@api disabled: boolean = false;
|
|
25
|
-
@api iconSize: IconSize = "medium";
|
|
26
|
-
@api iconSymbol: IconSymbol | null = null;
|
|
27
|
-
@api label?: string;
|
|
28
|
-
@api loading: boolean = false;
|
|
29
|
-
@api missingErrorMessage: string = "Complete this field";
|
|
30
|
-
@api formatErrorMessage?: string;
|
|
31
|
-
@api name?: string;
|
|
32
|
-
@api placeholder!: string;
|
|
33
|
-
@api required = false;
|
|
34
|
-
@api role: string | null = null;
|
|
35
|
-
@api shortcutKey: string | null = null;
|
|
36
|
-
@api size: "small" | "large" | "override" = "small";
|
|
37
|
-
@api submitLabel?: string | null = null;
|
|
38
|
-
@api type: string = "text";
|
|
39
|
-
@api validityOnBlur = false;
|
|
40
|
-
|
|
41
|
-
@api
|
|
42
|
-
get value() {
|
|
43
|
-
return this._value;
|
|
44
|
-
}
|
|
45
|
-
set value(value: string | null) {
|
|
46
|
-
this._value = value || "";
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@api
|
|
50
|
-
get errorMessage() {
|
|
51
|
-
return this._errorMessage;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
set errorMessage(value) {
|
|
55
|
-
this._errorMessage = value;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@api focus() {
|
|
59
|
-
if (this.input) {
|
|
60
|
-
this.input.focus();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@api
|
|
65
|
-
reportValidity(): boolean {
|
|
66
|
-
if (this.isRequiredAndFilled) {
|
|
67
|
-
this._errorMessage = this.missingErrorMessage;
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const typeValidator = typeValidatorMap[this.type];
|
|
72
|
-
if (typeValidator && !typeValidator.validator(this.value)) {
|
|
73
|
-
this._errorMessage =
|
|
74
|
-
this.formatErrorMessage || typeValidator.errorMessage;
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
this._errorMessage = "";
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
private _errorMessage: string = "";
|
|
83
|
-
private focused: boolean = false;
|
|
84
|
-
private input: HTMLInputElement | null = null;
|
|
85
|
-
private _value: string | null = null;
|
|
86
|
-
private _loading: boolean = false;
|
|
87
|
-
|
|
88
|
-
private get showClearButton(): boolean {
|
|
89
|
-
return this.clearable && !!this.value;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private get showShortcutKey(): boolean {
|
|
93
|
-
return !this.showClearButton && !!this.shortcutKey;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
private get ariaKeyShortcuts() {
|
|
97
|
-
return this.shortcutKey ? `meta+${this.shortcutKey}` : null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
private get inputLoading() {
|
|
101
|
-
return this.loading || this._loading;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private get inputInvalid() {
|
|
105
|
-
const typeValidator = typeValidatorMap[this.type];
|
|
106
|
-
return (
|
|
107
|
-
this.isRequiredAndFilled &&
|
|
108
|
-
typeValidator &&
|
|
109
|
-
!typeValidator.validator(this.value)
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
private get inputDisabled() {
|
|
114
|
-
return this.inputLoading || this.disabled;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
private get className() {
|
|
118
|
-
return cx("input-group", `size-${this.size}`);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
private get inputContainerClassName() {
|
|
122
|
-
return cx(
|
|
123
|
-
"input-container",
|
|
124
|
-
this.focused && "state-focused",
|
|
125
|
-
(this.showClearButton || this.showShortcutKey) &&
|
|
126
|
-
"has-floating-item",
|
|
127
|
-
!!this.errorMessage && "has-error"
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
private get buttonDisabled() {
|
|
132
|
-
return this.inputLoading || this.inputInvalid || this.disabled;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
private get commandKey() {
|
|
136
|
-
return isMac() ? "command" : "control";
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
private get shortcutImgSrc() {
|
|
140
|
-
return `/assets/svg/${this.commandKey}.svg`;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
private get shortcutImgAlt() {
|
|
144
|
-
return `${this.commandKey}-${this.shortcutKey} is the search shortcut`;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
private get isRequiredAndFilled() {
|
|
148
|
-
return this.required && (!this.value || !this.value.trim());
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
connectedCallback() {
|
|
152
|
-
window.addEventListener("keydown", this.onWindowKeydown);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
disconnectedCallback() {
|
|
156
|
-
window.removeEventListener("keydown", this.onWindowKeydown);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
renderedCallback() {
|
|
160
|
-
if (!this.input) {
|
|
161
|
-
this.input = <HTMLInputElement>this.template.querySelector("input");
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
onClick() {
|
|
166
|
-
if (this.input) {
|
|
167
|
-
this.input.focus();
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
onInputFocus() {
|
|
172
|
-
this.focused = true;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
onInputBlur() {
|
|
176
|
-
this.focused = false;
|
|
177
|
-
|
|
178
|
-
if (this.validityOnBlur) {
|
|
179
|
-
this.reportValidity();
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
onInputChange(e: InputEvent) {
|
|
184
|
-
if (!e || !e.target) {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
this.dispatchChange((<HTMLInputElement>e.target).value || "");
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
onButtonClick(e: Event) {
|
|
191
|
-
if (!this.buttonDisabled) {
|
|
192
|
-
e.stopPropagation();
|
|
193
|
-
}
|
|
194
|
-
this.submit();
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
dispatchChange(value: string) {
|
|
198
|
-
this._value = value;
|
|
199
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
clear(e?: Event) {
|
|
203
|
-
if (e) {
|
|
204
|
-
e.stopPropagation();
|
|
205
|
-
}
|
|
206
|
-
this.dispatchChange("");
|
|
207
|
-
this.dispatchEvent(new CustomEvent("clear"));
|
|
208
|
-
if (this.input) {
|
|
209
|
-
this.input.blur();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
submit = async () => {
|
|
214
|
-
if (this.inputInvalid) {
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
this.dispatchEvent(new CustomEvent("submit", { detail: this.value }));
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
private onKeyDown(e: KeyboardEvent) {
|
|
221
|
-
switch (e.key) {
|
|
222
|
-
case "Escape":
|
|
223
|
-
this.clear();
|
|
224
|
-
break;
|
|
225
|
-
case "Enter":
|
|
226
|
-
this.submit();
|
|
227
|
-
break;
|
|
228
|
-
default:
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
private onWindowKeydown = (e: KeyboardEvent) => {
|
|
233
|
-
if (this.shortcutKey && e.metaKey && e.key === this.shortcutKey) {
|
|
234
|
-
e.preventDefault();
|
|
235
|
-
this.focus();
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { track, developerwebTrackEventListener } from "dx/instrumentation";
|
|
2
|
-
import InstrumentationTest from "test-components/instrumentationTest";
|
|
3
|
-
import { createRenderComponent } from "utils-internal/tests";
|
|
4
|
-
|
|
5
|
-
const TAG = "dx-instrumentation";
|
|
6
|
-
const render = createRenderComponent(
|
|
7
|
-
"dx-instrumentation-test",
|
|
8
|
-
InstrumentationTest
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
describe(TAG, () => {
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
delete (window as any).dataLayer;
|
|
14
|
-
delete (window as any).__DX_INSTRUMENTATION_QUEUE__;
|
|
15
|
-
delete (window as any).__DX_INSTRUMENTATION_IS_INITIALIZED__;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("catches bubbled events", () => {
|
|
19
|
-
const element = render();
|
|
20
|
-
|
|
21
|
-
const button = element.shadowRoot.querySelector("button");
|
|
22
|
-
button.dispatchEvent(new MouseEvent("click"));
|
|
23
|
-
expect((window as any).dataLayer.length).toBe(1);
|
|
24
|
-
expect((window as any).dataLayer[0]).toEqual({
|
|
25
|
-
event: "buttonClick",
|
|
26
|
-
buttonName: "default"
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it("flushes events dispatched prior to render", () => {
|
|
31
|
-
track(document, "testEvent", { isSentBeforeRender: "yes" });
|
|
32
|
-
expect((window as any).__DX_INSTRUMENTATION_QUEUE__.length).toBe(1);
|
|
33
|
-
|
|
34
|
-
render();
|
|
35
|
-
|
|
36
|
-
expect((window as any).__DX_INSTRUMENTATION_IS_INITIALIZED__).toBe(
|
|
37
|
-
true
|
|
38
|
-
);
|
|
39
|
-
expect((window as any).dataLayer.length).toBe(1);
|
|
40
|
-
expect((window as any).dataLayer[0]).toEqual({
|
|
41
|
-
event: "testEvent",
|
|
42
|
-
isSentBeforeRender: "yes"
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
// Because Jest runs tests in parallel, and because these tests interact
|
|
47
|
-
// with global scope, this `describe` block needs to remain within the
|
|
48
|
-
// parent one to ensure that it's working with a cleaned-up environment.
|
|
49
|
-
describe("developerwebTrackEventListener", () => {
|
|
50
|
-
let t: ReturnType<developerwebTrackEventListener> | null = null;
|
|
51
|
-
|
|
52
|
-
afterEach(() => {
|
|
53
|
-
if (t !== null) {
|
|
54
|
-
t.remove();
|
|
55
|
-
}
|
|
56
|
-
delete (window as any).dataLayer;
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it("catches tracked events", () => {
|
|
60
|
-
// Marked instrumentation as initialized, so we can capture the event
|
|
61
|
-
(window as any).__DX_INSTRUMENTATION_IS_INITIALIZED__ = true;
|
|
62
|
-
|
|
63
|
-
const spy = { track: jest.fn() };
|
|
64
|
-
t = developerwebTrackEventListener([spy]);
|
|
65
|
-
t.add();
|
|
66
|
-
track(document, "testEvent", { isTestEvent: "yes" });
|
|
67
|
-
|
|
68
|
-
expect(spy.track).toHaveBeenCalledTimes(1);
|
|
69
|
-
const { detail, composed, bubbles } = spy.track.mock.calls[0][0];
|
|
70
|
-
expect(detail).toEqual({
|
|
71
|
-
event: "testEvent",
|
|
72
|
-
payload: {
|
|
73
|
-
isTestEvent: "yes"
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
expect(composed).toBe(true);
|
|
77
|
-
expect(bubbles).toBe(true);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it("throws an exception if no trackerFns provided", () => {
|
|
81
|
-
expect(() => developerwebTrackEventListener([])).toThrow(
|
|
82
|
-
"No tracker functions passed"
|
|
83
|
-
);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<template></template>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
|
|
3
|
-
const TRACKING_EVENT_NAME = "developerwebsite_track";
|
|
4
|
-
const LISTENER_QUEUE = "__DX_INSTRUMENTATION_QUEUE__";
|
|
5
|
-
const LISTENER_INDICATOR = "__DX_INSTRUMENTATION_IS_INITIALIZED__";
|
|
6
|
-
|
|
7
|
-
export function track(
|
|
8
|
-
element: EventTarget,
|
|
9
|
-
event: string,
|
|
10
|
-
payload: Record<string, unknown>
|
|
11
|
-
): void {
|
|
12
|
-
const detail = { event, payload };
|
|
13
|
-
// if window.LISTENER_INDICATOR is undefined, `dx-instrumentation` has not
|
|
14
|
-
// been mounted, and the listener hasn't been attached.
|
|
15
|
-
if ((window as any)[LISTENER_INDICATOR] === undefined) {
|
|
16
|
-
(window as any)[LISTENER_QUEUE] = (window as any)[LISTENER_QUEUE] || [];
|
|
17
|
-
(window as any)[LISTENER_QUEUE].push(detail);
|
|
18
|
-
} else {
|
|
19
|
-
const e = new CustomEvent(TRACKING_EVENT_NAME, {
|
|
20
|
-
bubbles: true,
|
|
21
|
-
composed: true,
|
|
22
|
-
detail
|
|
23
|
-
});
|
|
24
|
-
element.dispatchEvent(e);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const googleTagManager = {
|
|
29
|
-
track: function (e: Event) {
|
|
30
|
-
if ((window as any).dataLayer === undefined) {
|
|
31
|
-
(window as any).dataLayer = [];
|
|
32
|
-
}
|
|
33
|
-
const { event, payload } = (e as CustomEvent).detail;
|
|
34
|
-
(window as any).dataLayer.push({ ...payload, event });
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
interface TrackEventListener {
|
|
39
|
-
add: () => void;
|
|
40
|
-
remove: () => void;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function developerwebTrackEventListener(
|
|
44
|
-
trackerFns: { track: (e: Event) => void }[] = []
|
|
45
|
-
): TrackEventListener {
|
|
46
|
-
if (trackerFns.length === 0) {
|
|
47
|
-
throw new Error("No tracker functions passed");
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const trackdeveloperwebEvent = (e: Event) => {
|
|
51
|
-
trackerFns.forEach((tracker) => {
|
|
52
|
-
tracker.track(e);
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const attachEventListener = () => {
|
|
57
|
-
document.addEventListener(TRACKING_EVENT_NAME, trackdeveloperwebEvent);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const removeEventListener = () => {
|
|
61
|
-
document.removeEventListener(
|
|
62
|
-
TRACKING_EVENT_NAME,
|
|
63
|
-
trackdeveloperwebEvent
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return {
|
|
68
|
-
add: attachEventListener,
|
|
69
|
-
remove: removeEventListener
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export default class Instrumentation extends LightningElement {
|
|
74
|
-
@api useGoogleTagManager = false;
|
|
75
|
-
|
|
76
|
-
private tracker: TrackEventListener | null = null;
|
|
77
|
-
|
|
78
|
-
private setupTracker() {
|
|
79
|
-
const trackerFunctions = this.useGoogleTagManager
|
|
80
|
-
? [googleTagManager]
|
|
81
|
-
: [];
|
|
82
|
-
this.tracker = developerwebTrackEventListener(trackerFunctions);
|
|
83
|
-
this.tracker.add();
|
|
84
|
-
(window as any)[LISTENER_INDICATOR] = true;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
private dispatchQueuedEvents() {
|
|
88
|
-
while ((window as any)[LISTENER_QUEUE].length > 0) {
|
|
89
|
-
const event = (window as any)[LISTENER_QUEUE].pop() as {
|
|
90
|
-
event: string;
|
|
91
|
-
payload: Record<string, unknown>;
|
|
92
|
-
};
|
|
93
|
-
track(this, event.event, event.payload);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
renderedCallback() {
|
|
98
|
-
if (this.tracker === null) {
|
|
99
|
-
this.setupTracker();
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
(window as any)[LISTENER_QUEUE] !== undefined &&
|
|
103
|
-
(window as any)[LISTENER_QUEUE].length > 0
|
|
104
|
-
) {
|
|
105
|
-
this.dispatchQueuedEvents();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
disconnectedCallback() {
|
|
111
|
-
if (this.tracker !== null) {
|
|
112
|
-
this.tracker.remove();
|
|
113
|
-
this.tracker = null;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import Dropdown from "dx/dropdown";
|
|
2
|
-
import InteractiveImage from "dx/interactiveImage";
|
|
3
|
-
import { createRenderComponent } from "utils-internal/tests";
|
|
4
|
-
import {
|
|
5
|
-
mockSingleDownloadPropsAsArray,
|
|
6
|
-
mockSingleDownloadPropsAsString,
|
|
7
|
-
mockMultipleDownloadProps,
|
|
8
|
-
mockMultipleDownloadOptions
|
|
9
|
-
} from "./mockProps";
|
|
10
|
-
|
|
11
|
-
const TAG = "dx-interactive-image";
|
|
12
|
-
const render = createRenderComponent(TAG, InteractiveImage);
|
|
13
|
-
|
|
14
|
-
describe(TAG, () => {
|
|
15
|
-
describe("single download", () => {
|
|
16
|
-
it("is accessible", () => {
|
|
17
|
-
const element = render(mockSingleDownloadPropsAsArray);
|
|
18
|
-
|
|
19
|
-
const sectionEl = element.shadowRoot.querySelector("article");
|
|
20
|
-
expect(sectionEl).not.toBeNull();
|
|
21
|
-
return expect(sectionEl).toBeAccessible();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("has the right download URL when URL passed as string", () => {
|
|
25
|
-
const element = render(mockSingleDownloadPropsAsString);
|
|
26
|
-
|
|
27
|
-
const dropdownEl = element.shadowRoot.querySelector("dx-dropdown");
|
|
28
|
-
expect(dropdownEl).toBeNull();
|
|
29
|
-
const buttonEl =
|
|
30
|
-
element.shadowRoot.querySelector("header dx-button");
|
|
31
|
-
expect(buttonEl).not.toBeNull();
|
|
32
|
-
expect(buttonEl.href).toBe(
|
|
33
|
-
mockSingleDownloadPropsAsString.downloadUrls
|
|
34
|
-
);
|
|
35
|
-
expect(buttonEl.download).toBe("FUsyxR5.jpg");
|
|
36
|
-
return expect(element).toBeAccessible();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it("has the right download URL when URL passed as array", () => {
|
|
40
|
-
const element = render(mockSingleDownloadPropsAsArray);
|
|
41
|
-
|
|
42
|
-
const dropdownEl = element.shadowRoot.querySelector("dx-dropdown");
|
|
43
|
-
expect(dropdownEl).toBeNull();
|
|
44
|
-
const buttonEl =
|
|
45
|
-
element.shadowRoot.querySelector("header dx-button");
|
|
46
|
-
expect(buttonEl).not.toBeNull();
|
|
47
|
-
expect(buttonEl.href).toBe(
|
|
48
|
-
mockSingleDownloadPropsAsArray.downloadUrls[0]
|
|
49
|
-
);
|
|
50
|
-
expect(buttonEl.download).toBe("FUsyxR5.jpg");
|
|
51
|
-
return expect(element).toBeAccessible();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
describe("multiple downloads", () => {
|
|
56
|
-
it("is accessible", () => {
|
|
57
|
-
const element = render(mockMultipleDownloadProps);
|
|
58
|
-
|
|
59
|
-
const sectionEl = element.shadowRoot.querySelector("article");
|
|
60
|
-
expect(sectionEl).not.toBeNull();
|
|
61
|
-
return expect(sectionEl).toBeAccessible();
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it("renders a dropdown", () => {
|
|
65
|
-
const element = render(mockMultipleDownloadProps);
|
|
66
|
-
|
|
67
|
-
const dropdownEl: Dropdown =
|
|
68
|
-
element.shadowRoot.querySelector("dx-dropdown");
|
|
69
|
-
expect(dropdownEl).not.toBeNull();
|
|
70
|
-
const { options } = dropdownEl;
|
|
71
|
-
|
|
72
|
-
expect(options).toHaveLength(mockMultipleDownloadOptions.length);
|
|
73
|
-
options.forEach((option, index) => {
|
|
74
|
-
expect(option.id).toBe(mockMultipleDownloadOptions[index].id);
|
|
75
|
-
expect(option.label).toBe(
|
|
76
|
-
mockMultipleDownloadOptions[index].label
|
|
77
|
-
);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
return expect(element).toBeAccessible();
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export const mockSingleDownloadPropsAsString = {
|
|
2
|
-
title:
|
|
3
|
-
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu",
|
|
4
|
-
featuredSrc: "https://i.imgur.com/FUsyxR5.jpg",
|
|
5
|
-
downloadUrls: "https://i.imgur.com/FUsyxR5.jpg"
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const mockSingleDownloadPropsAsArray = {
|
|
9
|
-
title:
|
|
10
|
-
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu",
|
|
11
|
-
featuredSrc: "https://i.imgur.com/FUsyxR5.jpg",
|
|
12
|
-
downloadUrls: ["https://i.imgur.com/FUsyxR5.jpg"]
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const mockMultipleDownloadProps = {
|
|
16
|
-
title:
|
|
17
|
-
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu",
|
|
18
|
-
featuredSrc: "https://i.imgur.com/FUsyxR5.jpg",
|
|
19
|
-
downloadUrls: [
|
|
20
|
-
"https://i.imgur.com/FUsyxR5.jpg",
|
|
21
|
-
"https://i.imgur.com/FUsyxR5.png",
|
|
22
|
-
"https://i.imgur.com/FUsyxR5.bmp"
|
|
23
|
-
]
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const mockMultipleDownloadOptions = [
|
|
27
|
-
{
|
|
28
|
-
label: "Download as JPG",
|
|
29
|
-
id: mockMultipleDownloadProps.downloadUrls[0]
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: "Download as PNG",
|
|
33
|
-
id: mockMultipleDownloadProps.downloadUrls[1]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: "Download as BMP",
|
|
37
|
-
id: mockMultipleDownloadProps.downloadUrls[2]
|
|
38
|
-
}
|
|
39
|
-
];
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
@import "helpers/reset";
|
|
2
|
-
@import "helpers/text";
|
|
3
|
-
|
|
4
|
-
article {
|
|
5
|
-
border: 1px solid var(--dx-g-gray-90);
|
|
6
|
-
border-radius: 0.3125rem;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
header {
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: flex-start;
|
|
12
|
-
justify-content: space-between;
|
|
13
|
-
border-radius: 0.3125rem 0.3125rem 0 0;
|
|
14
|
-
background-color: var(--dx-g-gray-95);
|
|
15
|
-
font-family: var(--dx-g-font-sans);
|
|
16
|
-
color: var(--dx-g-gray-10);
|
|
17
|
-
padding: var(--dx-g-spacing-sm);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
header span {
|
|
21
|
-
padding: var(--dx-g-spacing-sm) var(--dx-g-spacing-md);
|
|
22
|
-
font-size: var(--dx-g-text-sm);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
footer {
|
|
26
|
-
border-radius: 0 0 0.3125rem 0.3125rem;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.body {
|
|
30
|
-
margin: var(--dx-g-spacing-md);
|
|
31
|
-
overflow-x: auto;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.body img {
|
|
35
|
-
min-width: 650px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.controls {
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: flex-end;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Breakpoints for mobile */
|
|
45
|
-
|
|
46
|
-
@media screen and (max-width: 640px) {
|
|
47
|
-
header {
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
align-items: flex-end;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@media screen and (max-width: 320px) {
|
|
54
|
-
.controls,
|
|
55
|
-
.controls dx-dropdown,
|
|
56
|
-
.controls dx-button {
|
|
57
|
-
width: 100%;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<article>
|
|
3
|
-
<header>
|
|
4
|
-
<span>{title}</span>
|
|
5
|
-
<div class="controls">
|
|
6
|
-
<template if:true={isSingleDownload}>
|
|
7
|
-
<dx-button
|
|
8
|
-
icon-symbol="download"
|
|
9
|
-
href={singleDownloadHref}
|
|
10
|
-
download={singleDownloadFilename}
|
|
11
|
-
>
|
|
12
|
-
{downloadButtonLabel}
|
|
13
|
-
</dx-button>
|
|
14
|
-
</template>
|
|
15
|
-
<template if:false={isSingleDownload}>
|
|
16
|
-
<dx-dropdown
|
|
17
|
-
options={urls}
|
|
18
|
-
onchange={handleDownloadOptionChange}
|
|
19
|
-
placement="bottom-end"
|
|
20
|
-
>
|
|
21
|
-
<dx-button variant="primary" icon-symbol="chevrondown">
|
|
22
|
-
{downloadButtonLabel}
|
|
23
|
-
</dx-button>
|
|
24
|
-
</dx-dropdown>
|
|
25
|
-
</template>
|
|
26
|
-
</div>
|
|
27
|
-
</header>
|
|
28
|
-
<div class="body">
|
|
29
|
-
<img src={featuredSrc} alt={title} />
|
|
30
|
-
</div>
|
|
31
|
-
</article>
|
|
32
|
-
</template>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { html } from "lit-html";
|
|
2
|
-
import { mockMultipleDownloadProps } from "./__tests__/mockProps";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "dx/dx-interactive-image",
|
|
6
|
-
component: "dx-interactive-image"
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
// prettier-ignore
|
|
10
|
-
const createStyles = () => html `
|
|
11
|
-
<style>
|
|
12
|
-
#root {
|
|
13
|
-
max-width: 800px;
|
|
14
|
-
}
|
|
15
|
-
</style>`;
|
|
16
|
-
|
|
17
|
-
const urls = JSON.stringify(mockMultipleDownloadProps.downloadUrls);
|
|
18
|
-
|
|
19
|
-
export const SingleDownload = () => html` ${createStyles()}
|
|
20
|
-
<dx-interactive-image
|
|
21
|
-
title="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. "
|
|
22
|
-
featured-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
23
|
-
download-urls="https://i.imgur.com/FUsyxR5.jpg"
|
|
24
|
-
></dx-interactive-image>`;
|
|
25
|
-
|
|
26
|
-
export const MultipleDownloads = () => html` ${createStyles()}
|
|
27
|
-
<dx-interactive-image
|
|
28
|
-
title="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. "
|
|
29
|
-
featured-src="https://i.imgur.com/FUsyxR5.jpg"
|
|
30
|
-
download-urls="${urls}"
|
|
31
|
-
></dx-interactive-image>`;
|