@salesforcedevs/dx-components 0.26.0 → 0.26.1-alpha0.4
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/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 -129
- 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/skipNavLink/skipNavLink.css +0 -21
- package/src/modules/dx/skipNavLink/skipNavLink.html +0 -3
- package/src/modules/dx/skipNavLink/skipNavLink.ts +0 -3
- 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,28 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class={contentClassName} role="directory">
|
|
3
|
-
<dx-button
|
|
4
|
-
aria-label={toggleButtonAriaLabel}
|
|
5
|
-
class={toggleButtonClass}
|
|
6
|
-
onclick={toggleShowContent}
|
|
7
|
-
icon-symbol="open_panel"
|
|
8
|
-
variant="custom"
|
|
9
|
-
></dx-button>
|
|
10
|
-
<div if:true={showContent} class="toc toc_content">
|
|
11
|
-
<h2 class={titleClassName}>{title}</h2>
|
|
12
|
-
<template for:each={options} for:item="option">
|
|
13
|
-
<a
|
|
14
|
-
href={option.anchor}
|
|
15
|
-
class={option.className}
|
|
16
|
-
onclick={onClick}
|
|
17
|
-
contentid={option.id}
|
|
18
|
-
key={option.id}
|
|
19
|
-
>
|
|
20
|
-
{option.label}
|
|
21
|
-
</a>
|
|
22
|
-
</template>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div if:true={showContent}>
|
|
26
|
-
<slot name="view-pdf"></slot>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { html } from "lit-html";
|
|
2
|
-
import mockProps from "./__tests__/mockProps";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "dx/dx-toc",
|
|
6
|
-
component: "dx-toc"
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const options = JSON.stringify(mockProps.options);
|
|
10
|
-
// prettier-ignore
|
|
11
|
-
export const Base = () => html`
|
|
12
|
-
<dx-toc
|
|
13
|
-
title="In this guide"
|
|
14
|
-
options="${options}"
|
|
15
|
-
value="intro"
|
|
16
|
-
>
|
|
17
|
-
<dx-button
|
|
18
|
-
slot="view-pdf"
|
|
19
|
-
href="http://www.google.com"
|
|
20
|
-
target="_blank"
|
|
21
|
-
variant="inline"
|
|
22
|
-
icon-symbol="new_window"
|
|
23
|
-
>
|
|
24
|
-
View PDF
|
|
25
|
-
</dx-button>
|
|
26
|
-
</dx-toc>`;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api, track } from "lwc";
|
|
2
|
-
import cx from "classnames";
|
|
3
|
-
import { ContentElement } from "typings/custom";
|
|
4
|
-
import { toJson } from "utils/normalizers";
|
|
5
|
-
|
|
6
|
-
export default class Toc extends LightningElement {
|
|
7
|
-
@api title!: string;
|
|
8
|
-
|
|
9
|
-
@api
|
|
10
|
-
get value() {
|
|
11
|
-
return this._value!;
|
|
12
|
-
}
|
|
13
|
-
set value(value: string) {
|
|
14
|
-
this._value = value;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@api
|
|
18
|
-
get options() {
|
|
19
|
-
const actualValue =
|
|
20
|
-
this.value ||
|
|
21
|
-
(this._options && this._options.length > 0 && this._options[0].id);
|
|
22
|
-
return this._options.map((option) => {
|
|
23
|
-
return {
|
|
24
|
-
...option,
|
|
25
|
-
className: cx(
|
|
26
|
-
"content-button",
|
|
27
|
-
option.id === actualValue && "selected"
|
|
28
|
-
)
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
set options(value: any) {
|
|
33
|
-
this._options = toJson(value);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
private _value?: string = undefined;
|
|
37
|
-
private showContent: boolean = true;
|
|
38
|
-
|
|
39
|
-
@track _options!: Array<ContentElement>;
|
|
40
|
-
|
|
41
|
-
private get toggleButtonIconSymbol() {
|
|
42
|
-
return this.showContent ? "forward" : "back";
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
private get toggleButtonAriaLabel() {
|
|
46
|
-
return this.showContent
|
|
47
|
-
? "Hide table of contents"
|
|
48
|
-
: "Show table of contents";
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
private get contentClassName() {
|
|
52
|
-
return cx("toc", !this.showContent && "toc_collapsed");
|
|
53
|
-
}
|
|
54
|
-
private get toggleButtonClass() {
|
|
55
|
-
return cx("toggle-button", !this.showContent && "collapsed");
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
private get titleClassName() {
|
|
59
|
-
return cx(
|
|
60
|
-
"dx-text-heading-5 toc_title",
|
|
61
|
-
!this.showContent && "state-hide-content"
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
private onClick(e: Event) {
|
|
66
|
-
const target = e.currentTarget as HTMLElement;
|
|
67
|
-
const id = target.getAttribute("contentid");
|
|
68
|
-
this.dispatchEvent(
|
|
69
|
-
new CustomEvent("selectedcontent", { detail: { name: id } })
|
|
70
|
-
);
|
|
71
|
-
this._value = id!;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
private toggleShowContent() {
|
|
75
|
-
this.showContent = !this.showContent;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import Tooltip from "dx/tooltip";
|
|
2
|
-
import { createRenderComponent } from "utils-internal/tests";
|
|
3
|
-
|
|
4
|
-
const TAG = "dx-tooltip";
|
|
5
|
-
const render = createRenderComponent(TAG, Tooltip);
|
|
6
|
-
|
|
7
|
-
describe(TAG, () => {
|
|
8
|
-
it("calls tippy constructor with correct parameters", () => {
|
|
9
|
-
const element = render({ label: "First Label", placement: "top" });
|
|
10
|
-
|
|
11
|
-
const slotContainer: HTMLElement =
|
|
12
|
-
element.shadowRoot.querySelector("div");
|
|
13
|
-
|
|
14
|
-
expect(slotContainer).not.toBeNull();
|
|
15
|
-
expect(slotContainer.getAttribute("data-microtip-position")).toEqual(
|
|
16
|
-
"top"
|
|
17
|
-
);
|
|
18
|
-
expect(slotContainer.getAttribute("aria-label")).toEqual("First Label");
|
|
19
|
-
|
|
20
|
-
return expect(element).toBeAccessible();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
/* Code generated by scripts/postinstall.js DO NOT EDIT*/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/* -------------------------------------------------------------------
|
|
5
|
-
Microtip
|
|
6
|
-
|
|
7
|
-
Modern, lightweight css-only tooltips
|
|
8
|
-
Just 1kb minified and gzipped
|
|
9
|
-
|
|
10
|
-
@author Ghosh
|
|
11
|
-
@package Microtip
|
|
12
|
-
|
|
13
|
-
----------------------------------------------------------------------
|
|
14
|
-
1. Base Styles
|
|
15
|
-
2. Direction Modifiers
|
|
16
|
-
3. Position Modifiers
|
|
17
|
-
--------------------------------------------------------------------*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* ------------------------------------------------
|
|
21
|
-
[1] Base Styles
|
|
22
|
-
-------------------------------------------------*/
|
|
23
|
-
|
|
24
|
-
[aria-label][role~="tooltip"] {
|
|
25
|
-
position: relative;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
[aria-label][role~="tooltip"]::before,
|
|
29
|
-
[aria-label][role~="tooltip"]::after {
|
|
30
|
-
transform: translate3d(0, 0, 0);
|
|
31
|
-
-webkit-backface-visibility: hidden;
|
|
32
|
-
backface-visibility: hidden;
|
|
33
|
-
will-change: transform;
|
|
34
|
-
opacity: 0;
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
transition: all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s);
|
|
37
|
-
position: absolute;
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
z-index: 10;
|
|
40
|
-
transform-origin: top;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[aria-label][role~="tooltip"]::before {
|
|
44
|
-
background-size: 100% auto !important;
|
|
45
|
-
content: "";
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
[aria-label][role~="tooltip"]::after {
|
|
49
|
-
background: rgba(17, 17, 17, .9);
|
|
50
|
-
border-radius: 4px;
|
|
51
|
-
color: #ffffff;
|
|
52
|
-
content: attr(aria-label);
|
|
53
|
-
font-size: var(--microtip-font-size, 13px);
|
|
54
|
-
font-weight: var(--microtip-font-weight, normal);
|
|
55
|
-
text-transform: var(--microtip-text-transform, none);
|
|
56
|
-
padding: .5em 1em;
|
|
57
|
-
white-space: nowrap;
|
|
58
|
-
box-sizing: content-box;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
[aria-label][role~="tooltip"]:hover::before,
|
|
62
|
-
[aria-label][role~="tooltip"]:hover::after,
|
|
63
|
-
[aria-label][role~="tooltip"]:focus::before,
|
|
64
|
-
[aria-label][role~="tooltip"]:focus::after {
|
|
65
|
-
opacity: 1;
|
|
66
|
-
pointer-events: auto;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/* ------------------------------------------------
|
|
72
|
-
[2] Position Modifiers
|
|
73
|
-
-------------------------------------------------*/
|
|
74
|
-
|
|
75
|
-
[role~="tooltip"][data-microtip-position|="top"]::before {
|
|
76
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
|
|
77
|
-
height: 6px;
|
|
78
|
-
width: 18px;
|
|
79
|
-
margin-bottom: 5px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
[role~="tooltip"][data-microtip-position|="top"]::after {
|
|
83
|
-
margin-bottom: 11px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
[role~="tooltip"][data-microtip-position|="top"]::before {
|
|
87
|
-
transform: translate3d(-50%, 0, 0);
|
|
88
|
-
bottom: 100%;
|
|
89
|
-
left: 50%;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
[role~="tooltip"][data-microtip-position|="top"]:hover::before {
|
|
93
|
-
transform: translate3d(-50%, -5px, 0);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
[role~="tooltip"][data-microtip-position|="top"]::after {
|
|
97
|
-
transform: translate3d(-50%, 0, 0);
|
|
98
|
-
bottom: 100%;
|
|
99
|
-
left: 50%;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
[role~="tooltip"][data-microtip-position="top"]:hover::after {
|
|
103
|
-
transform: translate3d(-50%, -5px, 0);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* ------------------------------------------------
|
|
107
|
-
[2.1] Top Left
|
|
108
|
-
-------------------------------------------------*/
|
|
109
|
-
[role~="tooltip"][data-microtip-position="top-left"]::after {
|
|
110
|
-
transform: translate3d(calc(-100% + 16px), 0, 0);
|
|
111
|
-
bottom: 100%;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
[role~="tooltip"][data-microtip-position="top-left"]:hover::after {
|
|
115
|
-
transform: translate3d(calc(-100% + 16px), -5px, 0);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/* ------------------------------------------------
|
|
120
|
-
[2.2] Top Right
|
|
121
|
-
-------------------------------------------------*/
|
|
122
|
-
[role~="tooltip"][data-microtip-position="top-right"]::after {
|
|
123
|
-
transform: translate3d(calc(0% + -16px), 0, 0);
|
|
124
|
-
bottom: 100%;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
[role~="tooltip"][data-microtip-position="top-right"]:hover::after {
|
|
128
|
-
transform: translate3d(calc(0% + -16px), -5px, 0);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
/* ------------------------------------------------
|
|
133
|
-
[2.3] Bottom
|
|
134
|
-
-------------------------------------------------*/
|
|
135
|
-
[role~="tooltip"][data-microtip-position|="bottom"]::before {
|
|
136
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
|
|
137
|
-
height: 6px;
|
|
138
|
-
width: 18px;
|
|
139
|
-
margin-top: 5px;
|
|
140
|
-
margin-bottom: 0;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
[role~="tooltip"][data-microtip-position|="bottom"]::after {
|
|
144
|
-
margin-top: 11px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
[role~="tooltip"][data-microtip-position|="bottom"]::before {
|
|
148
|
-
transform: translate3d(-50%, -10px, 0);
|
|
149
|
-
bottom: auto;
|
|
150
|
-
left: 50%;
|
|
151
|
-
top: 100%;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
[role~="tooltip"][data-microtip-position|="bottom"]:hover::before {
|
|
155
|
-
transform: translate3d(-50%, 0, 0);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
[role~="tooltip"][data-microtip-position|="bottom"]::after {
|
|
159
|
-
transform: translate3d(-50%, -10px, 0);
|
|
160
|
-
top: 100%;
|
|
161
|
-
left: 50%;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
[role~="tooltip"][data-microtip-position="bottom"]:hover::after {
|
|
165
|
-
transform: translate3d(-50%, 0, 0);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
/* ------------------------------------------------
|
|
170
|
-
[2.4] Bottom Left
|
|
171
|
-
-------------------------------------------------*/
|
|
172
|
-
[role~="tooltip"][data-microtip-position="bottom-left"]::after {
|
|
173
|
-
transform: translate3d(calc(-100% + 16px), -10px, 0);
|
|
174
|
-
top: 100%;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
[role~="tooltip"][data-microtip-position="bottom-left"]:hover::after {
|
|
178
|
-
transform: translate3d(calc(-100% + 16px), 0, 0);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/* ------------------------------------------------
|
|
183
|
-
[2.5] Bottom Right
|
|
184
|
-
-------------------------------------------------*/
|
|
185
|
-
[role~="tooltip"][data-microtip-position="bottom-right"]::after {
|
|
186
|
-
transform: translate3d(calc(0% + -16px), -10px, 0);
|
|
187
|
-
top: 100%;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
[role~="tooltip"][data-microtip-position="bottom-right"]:hover::after {
|
|
191
|
-
transform: translate3d(calc(0% + -16px), 0, 0);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
/* ------------------------------------------------
|
|
196
|
-
[2.6] Left
|
|
197
|
-
-------------------------------------------------*/
|
|
198
|
-
[role~="tooltip"][data-microtip-position="left"]::before,
|
|
199
|
-
[role~="tooltip"][data-microtip-position="left"]::after {
|
|
200
|
-
bottom: auto;
|
|
201
|
-
left: auto;
|
|
202
|
-
right: 100%;
|
|
203
|
-
top: 50%;
|
|
204
|
-
transform: translate3d(10px, -50%, 0);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
[role~="tooltip"][data-microtip-position="left"]::before {
|
|
208
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
|
|
209
|
-
height: 18px;
|
|
210
|
-
width: 6px;
|
|
211
|
-
margin-right: 5px;
|
|
212
|
-
margin-bottom: 0;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
[role~="tooltip"][data-microtip-position="left"]::after {
|
|
216
|
-
margin-right: 11px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
[role~="tooltip"][data-microtip-position="left"]:hover::before,
|
|
220
|
-
[role~="tooltip"][data-microtip-position="left"]:hover::after {
|
|
221
|
-
transform: translate3d(0, -50%, 0);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/* ------------------------------------------------
|
|
226
|
-
[2.7] Right
|
|
227
|
-
-------------------------------------------------*/
|
|
228
|
-
[role~="tooltip"][data-microtip-position="right"]::before,
|
|
229
|
-
[role~="tooltip"][data-microtip-position="right"]::after {
|
|
230
|
-
bottom: auto;
|
|
231
|
-
left: 100%;
|
|
232
|
-
top: 50%;
|
|
233
|
-
transform: translate3d(-10px, -50%, 0);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
[role~="tooltip"][data-microtip-position="right"]::before {
|
|
237
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
|
|
238
|
-
height: 18px;
|
|
239
|
-
width: 6px;
|
|
240
|
-
margin-bottom: 0;
|
|
241
|
-
margin-left: 5px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
[role~="tooltip"][data-microtip-position="right"]::after {
|
|
245
|
-
margin-left: 11px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
[role~="tooltip"][data-microtip-position="right"]:hover::before,
|
|
249
|
-
[role~="tooltip"][data-microtip-position="right"]:hover::after {
|
|
250
|
-
transform: translate3d(0, -50%, 0);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/* ------------------------------------------------
|
|
254
|
-
[3] Size
|
|
255
|
-
-------------------------------------------------*/
|
|
256
|
-
[role~="tooltip"][data-microtip-size="small"]::after {
|
|
257
|
-
white-space: initial;
|
|
258
|
-
width: 80px;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
[role~="tooltip"][data-microtip-size="medium"]::after {
|
|
262
|
-
white-space: initial;
|
|
263
|
-
width: 150px;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
[role~="tooltip"][data-microtip-size="large"]::after {
|
|
267
|
-
white-space: initial;
|
|
268
|
-
width: 260px;
|
|
269
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
@import "./microtip.css";
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
display: inline-block;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.slot-container {
|
|
8
|
-
display: inherit;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
[role~="tooltip"][data-microtip-position|="bottom"]::before {
|
|
12
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%28116,%20116,%20116,%201%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E")
|
|
13
|
-
no-repeat;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[role~="tooltip"][data-microtip-position|="top"]::before {
|
|
17
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%28116,%20116,%20116,%201%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E")
|
|
18
|
-
no-repeat;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[role~="tooltip"][data-microtip-position|="left"]::before {
|
|
22
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%28116,%20116,%20116,%201%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E")
|
|
23
|
-
no-repeat;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[role~="tooltip"][data-microtip-position|="right"]::before {
|
|
27
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%28116,%20116,%20116,%201%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E")
|
|
28
|
-
no-repeat;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[aria-label][role~="tooltip"]::after {
|
|
32
|
-
background-color: var(--dx-g-gray-50);
|
|
33
|
-
font-family: var(--dx-g-font-sans);
|
|
34
|
-
font-size: var(--dx-g-text-xs);
|
|
35
|
-
color: white;
|
|
36
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { html } from "lit-html";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "dx/dx-tooltip",
|
|
5
|
-
component: "dx-tooltip",
|
|
6
|
-
argTypes: {
|
|
7
|
-
placement: {
|
|
8
|
-
defaultValue: "top",
|
|
9
|
-
control: {
|
|
10
|
-
type: "select",
|
|
11
|
-
options: [
|
|
12
|
-
"top",
|
|
13
|
-
"top-left",
|
|
14
|
-
"top-right",
|
|
15
|
-
"bottom",
|
|
16
|
-
"bottom-left",
|
|
17
|
-
"bottom-right",
|
|
18
|
-
"left",
|
|
19
|
-
"right"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
label: {
|
|
24
|
-
defaultValue: "Hello, world!",
|
|
25
|
-
control: {
|
|
26
|
-
type: "text"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// prettier-ignore
|
|
33
|
-
const createStyles = () => html `
|
|
34
|
-
<style>
|
|
35
|
-
.story-container {
|
|
36
|
-
margin: 100px;
|
|
37
|
-
}
|
|
38
|
-
</style>`;
|
|
39
|
-
|
|
40
|
-
// prettier-ignore
|
|
41
|
-
export const Default = (args: any) => html `${createStyles()}
|
|
42
|
-
<div class="story-container">
|
|
43
|
-
<dx-tooltip label="${args.label}" placement="${args.placement}">
|
|
44
|
-
<button>Hover</button>
|
|
45
|
-
</dx-tooltip>
|
|
46
|
-
</div>`;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Topics from "dx/topics";
|
|
2
|
-
import { createRenderComponent } from "utils-internal/tests";
|
|
3
|
-
import mockProps from "./mockProps";
|
|
4
|
-
|
|
5
|
-
const TAG = "dx-topics";
|
|
6
|
-
const render = createRenderComponent(TAG, Topics);
|
|
7
|
-
describe(TAG, () => {
|
|
8
|
-
it("renders", () => {
|
|
9
|
-
const component = render(mockProps);
|
|
10
|
-
expect(component.topics).toEqual(mockProps.topics);
|
|
11
|
-
|
|
12
|
-
const spans: Array<HTMLElement> =
|
|
13
|
-
component.shadowRoot.querySelectorAll("span");
|
|
14
|
-
expect(spans).toHaveLength(3);
|
|
15
|
-
|
|
16
|
-
const [expectedFirst, expectedSecond] = mockProps.topics;
|
|
17
|
-
const [first, dot, second] = spans;
|
|
18
|
-
expect(first.textContent).toBe(expectedFirst);
|
|
19
|
-
expect(second.textContent).toBe(expectedSecond);
|
|
20
|
-
expect(dot.classList).toContain("dot-separator");
|
|
21
|
-
|
|
22
|
-
return expect(component).toBeAccessible();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it("doesn't render any span if list is empty", () => {
|
|
26
|
-
const component = render();
|
|
27
|
-
const spans: Array<HTMLElement> =
|
|
28
|
-
component.shadowRoot.querySelectorAll("span");
|
|
29
|
-
expect(spans).toHaveLength(0);
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.container {
|
|
6
|
-
align-items: center;
|
|
7
|
-
color: var(--dx-g-blue-vibrant-20);
|
|
8
|
-
font-size: var(--dx-g-text-xs);
|
|
9
|
-
font-family: var(--dx-g-font-display);
|
|
10
|
-
font-weight: var(--dx-g-font-demi);
|
|
11
|
-
display: flex;
|
|
12
|
-
gap: var(--dx-g-spacing-sm);
|
|
13
|
-
letter-spacing: 1px;
|
|
14
|
-
text-transform: uppercase;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.dot-separator {
|
|
18
|
-
--size: 4px;
|
|
19
|
-
|
|
20
|
-
height: var(--size);
|
|
21
|
-
width: var(--size);
|
|
22
|
-
background-color: var(--dx-g-blue-vibrant-20);
|
|
23
|
-
border-radius: 100%;
|
|
24
|
-
margin-bottom: 3px;
|
|
25
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="container dx-text-label-1-dark">
|
|
3
|
-
<template for:each={normalizedTopics} for:item="topic">
|
|
4
|
-
<span key={topic.id}>{topic.label}</span>
|
|
5
|
-
<span
|
|
6
|
-
key={topic.id}
|
|
7
|
-
if:false={topic.isLast}
|
|
8
|
-
class="dot-separator"
|
|
9
|
-
></span>
|
|
10
|
-
</template>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { normalizeToArray } from "utils/normalizers";
|
|
3
|
-
|
|
4
|
-
export default class Topics extends LightningElement {
|
|
5
|
-
private _topics: Array<string> = [];
|
|
6
|
-
|
|
7
|
-
@api
|
|
8
|
-
get topics() {
|
|
9
|
-
return this._topics;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
set topics(value) {
|
|
13
|
-
this._topics = normalizeToArray(value);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
get normalizedTopics() {
|
|
17
|
-
const { length } = this._topics;
|
|
18
|
-
|
|
19
|
-
return this._topics?.map((topic, index) => ({
|
|
20
|
-
id: topic,
|
|
21
|
-
label: topic,
|
|
22
|
-
isLast: index === length - 1
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
}
|