@salesforcedevs/dx-components 0.26.1-alpha0.6 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +12 -0
- package/lwc.config.json +2 -1
- package/package.json +3 -9
- package/src/assets/icons/action-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/brand-sprite/svg/symbols.svg +1381 -0
- package/src/assets/icons/custom-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/doctype-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/general-sprite/svg/symbols.svg +3013 -0
- package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +257 -0
- package/src/assets/icons/standard-sprite/svg/symbols.svg +1 -0
- package/src/assets/icons/utility-sprite/svg/symbols.svg +1 -0
- package/src/assets/svg/card-news-learn-moar.svg +415 -0
- package/src/assets/svg/cloud-1.svg +24 -0
- package/src/assets/svg/cloud-2.svg +18 -0
- package/src/assets/svg/codey.svg +93 -0
- package/src/assets/svg/command.svg +9 -0
- package/src/assets/svg/control.svg +10 -0
- package/src/assets/svg/docs-empty-state-small.svg +72 -0
- package/src/assets/svg/docs-empty-state.svg +86 -0
- package/src/assets/svg/dsc-home-news-bear.svg +3 -0
- package/src/assets/svg/dsc-home-news-community.png +0 -0
- package/src/assets/svg/dsc-home-news-goatbear.svg +257 -0
- package/src/assets/svg/dsc-home-news-samplegallery.svg +76 -0
- package/src/assets/svg/empty-state-assistant.svg +1 -0
- package/src/assets/svg/fch-blog-cloud-1.png +0 -0
- package/src/assets/svg/fch-blog-cloud-2.png +0 -0
- package/src/assets/svg/fch-blog-planet.png +0 -0
- package/src/assets/svg/feature-backdrop1.svg +10 -0
- package/src/assets/svg/feature-backdrop2.svg +10 -0
- package/src/assets/svg/featured-demo-art-blank.svg +76 -0
- package/src/assets/svg/featured-demo-art-eBikes.svg +77 -0
- package/src/assets/svg/footer-graphic-large.svg +207 -0
- package/src/assets/svg/footer-graphic-mountains-small.svg +17 -0
- package/src/assets/svg/footer-graphic-mountains.svg +21 -0
- package/src/assets/svg/footer-graphic-trees-small.svg +33 -0
- package/src/assets/svg/footer-graphic-trees.svg +62 -0
- package/src/assets/svg/lake-mountain.svg +79 -0
- package/src/assets/svg/podcast-subscription-clouds-small.svg +49 -0
- package/src/assets/svg/podcast-subscription-clouds.svg +57 -0
- package/src/assets/svg/podcasts-subscription-apple.svg +164 -0
- package/src/assets/svg/podcasts-subscription-google.svg +29 -0
- package/src/assets/svg/podcasts-subscription-spotify.svg +11 -0
- package/src/assets/svg/salesforce-cloud.svg +7 -0
- package/src/assets/svg/salesforce-logo-corporate.svg +21 -0
- package/src/assets/svg/salesforce-logo.svg +14 -0
- package/src/assets/svg/sidebar-loading.svg +34 -0
- package/src/assets/svg/slack-cta-podcast-background-left.svg +28 -0
- package/src/assets/svg/slack-cta-podcast-background-right.svg +38 -0
- package/src/assets/svg/trees.svg +42 -0
- package/src/modules/base-elements/archiveCard/archiveCard.ts +35 -0
- package/src/modules/base-elements/headerBase/headerBase.ts +204 -0
- package/src/modules/dx/banner/banner.css +46 -0
- package/src/modules/dx/banner/banner.html +13 -0
- package/src/modules/dx/banner/banner.ts +14 -0
- package/src/modules/dx/brandThemeProvider/brandCssVars.ts +10 -0
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.html +3 -0
- package/src/modules/dx/brandThemeProvider/brandThemeProvider.ts +46 -0
- package/src/modules/dx/breadcrumbs/breadcrumbs.css +111 -0
- package/src/modules/dx/breadcrumbs/breadcrumbs.html +44 -0
- package/src/modules/dx/breadcrumbs/breadcrumbs.ts +122 -0
- package/src/modules/dx/button/button.css +175 -0
- package/src/modules/dx/button/button.html +43 -0
- package/src/modules/dx/button/button.ts +63 -0
- package/src/modules/dx/cardBlogPost/cardBlogPost.css +13 -0
- package/src/modules/dx/cardBlogPost/cardBlogPost.html +24 -0
- package/src/modules/dx/cardBlogPost/cardBlogPost.ts +23 -0
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.css +3 -0
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.html +16 -0
- package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.ts +29 -0
- package/src/modules/dx/cardCallout/cardCallout.css +57 -0
- package/src/modules/dx/cardCallout/cardCallout.html +15 -0
- package/src/modules/dx/cardCallout/cardCallout.ts +37 -0
- package/src/modules/dx/cardContent/cardContent.css +52 -0
- package/src/modules/dx/cardContent/cardContent.html +59 -0
- package/src/modules/dx/cardContent/cardContent.ts +68 -0
- package/src/modules/dx/cardDemo/cardDemo.css +1 -0
- package/src/modules/dx/cardDemo/cardDemo.html +12 -0
- package/src/modules/dx/cardDemo/cardDemo.ts +11 -0
- package/src/modules/dx/cardDocs/cardDocs.css +50 -0
- package/src/modules/dx/cardDocs/cardDocs.html +20 -0
- package/src/modules/dx/cardDocs/cardDocs.ts +30 -0
- package/src/modules/dx/cardEvent/cardEvent.css +107 -0
- package/src/modules/dx/cardEvent/cardEvent.html +94 -0
- package/src/modules/dx/cardEvent/cardEvent.ts +42 -0
- package/src/modules/dx/cardExpanded/cardExpanded.css +49 -0
- package/src/modules/dx/cardExpanded/cardExpanded.html +37 -0
- package/src/modules/dx/cardExpanded/cardExpanded.ts +45 -0
- package/src/modules/dx/cardGrid/cardGrid.css +89 -0
- package/src/modules/dx/cardGrid/cardGrid.html +46 -0
- package/src/modules/dx/cardGrid/cardGrid.ts +140 -0
- package/src/modules/dx/cardMinimal/cardMinimal.css +31 -0
- package/src/modules/dx/cardMinimal/cardMinimal.html +13 -0
- package/src/modules/dx/cardMinimal/cardMinimal.ts +3 -0
- package/src/modules/dx/cardNews/cardNews.css +159 -0
- package/src/modules/dx/cardNews/cardNews.html +37 -0
- package/src/modules/dx/cardNews/cardNews.ts +62 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.css +19 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.html +36 -0
- package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.ts +36 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.css +3 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.html +12 -0
- package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.ts +29 -0
- package/src/modules/dx/cardSmall/cardSmall.css +32 -0
- package/src/modules/dx/cardSmall/cardSmall.html +42 -0
- package/src/modules/dx/cardSmall/cardSmall.ts +38 -0
- package/src/modules/dx/cardTitle/cardTitle.css +41 -0
- package/src/modules/dx/cardTitle/cardTitle.html +20 -0
- package/src/modules/dx/cardTitle/cardTitle.ts +27 -0
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.css +24 -0
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.html +20 -0
- package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.ts +18 -0
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.css +14 -0
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.html +26 -0
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.ts +13 -0
- package/src/modules/dx/checkbox/checkbox.css +168 -0
- package/src/modules/dx/checkbox/checkbox.html +26 -0
- package/src/modules/dx/checkbox/checkbox.ts +55 -0
- package/src/modules/dx/checkboxGroup/checkboxGroup.css +12 -0
- package/src/modules/dx/checkboxGroup/checkboxGroup.html +15 -0
- package/src/modules/dx/checkboxGroup/checkboxGroup.ts +77 -0
- package/src/modules/dx/codeBlock/codeBlock.css +128 -0
- package/src/modules/dx/codeBlock/codeBlock.html +79 -0
- package/src/modules/dx/codeBlock/codeBlock.ts +215 -0
- package/src/modules/dx/codeBlock/darkTheme.css +88 -0
- package/src/modules/dx/codeBlock/lightTheme.css +72 -0
- package/src/modules/dx/dropdown/dropdown.css +93 -0
- package/src/modules/dx/dropdown/dropdown.html +67 -0
- package/src/modules/dx/dropdown/dropdown.ts +182 -0
- package/src/modules/dx/dropdownOption/dropdownOption.css +61 -0
- package/src/modules/dx/dropdownOption/dropdownOption.html +53 -0
- package/src/modules/dx/dropdownOption/dropdownOption.ts +39 -0
- package/src/modules/dx/emptyState/emptyState.css +64 -0
- package/src/modules/dx/emptyState/emptyState.html +9 -0
- package/src/modules/dx/emptyState/emptyState.ts +20 -0
- package/src/modules/dx/feature/feature.css +135 -0
- package/src/modules/dx/feature/feature.html +33 -0
- package/src/modules/dx/feature/feature.ts +34 -0
- package/src/modules/dx/featureGrid/featureGrid.html +3 -0
- package/src/modules/dx/featureGrid/featureGrid.ts +15 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +469 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +96 -0
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +113 -0
- package/src/modules/dx/featuredContentHeader/svgs.ts +35 -0
- package/src/modules/dx/featuresList/featuresList.css +24 -0
- package/src/modules/dx/featuresList/featuresList.html +20 -0
- package/src/modules/dx/featuresList/featuresList.ts +21 -0
- package/src/modules/dx/footer/footer.css +405 -0
- package/src/modules/dx/footer/footer.html +145 -0
- package/src/modules/dx/footer/footer.ts +124 -0
- package/src/modules/dx/footer/links.ts +140 -0
- package/src/modules/dx/footerOption/footerOption.css +4 -0
- package/src/modules/dx/footerOption/footerOption.html +12 -0
- package/src/modules/dx/footerOption/footerOption.ts +19 -0
- package/src/modules/dx/formattedDateTime/formattedDateTime.html +1 -0
- package/src/modules/dx/formattedDateTime/formattedDateTime.ts +72 -0
- package/src/modules/dx/grid/grid.css +48 -0
- package/src/modules/dx/grid/grid.html +3 -0
- package/src/modules/dx/grid/grid.md +14 -0
- package/src/modules/dx/grid/grid.ts +72 -0
- package/src/modules/dx/groupBio/groupBio.css +49 -0
- package/src/modules/dx/groupBio/groupBio.html +29 -0
- package/src/modules/dx/groupBio/groupBio.ts +41 -0
- package/src/modules/dx/groupText/groupText.css +119 -0
- package/src/modules/dx/groupText/groupText.html +65 -0
- package/src/modules/dx/groupText/groupText.ts +93 -0
- package/src/modules/dx/headTags/headTags.html +3 -0
- package/src/modules/dx/headTags/headTags.ts +39 -0
- package/src/modules/dx/header/__benchmarks__/header.benchmark.js +45 -0
- package/src/modules/dx/header/header.css +109 -0
- package/src/modules/dx/header/header.html +129 -0
- package/src/modules/dx/header/header.ts +27 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +160 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.html +73 -0
- package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +102 -0
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.css +5 -0
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.html +14 -0
- package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.ts +20 -0
- package/src/modules/dx/headerNav/headerNav.css +31 -0
- package/src/modules/dx/headerNav/headerNav.html +48 -0
- package/src/modules/dx/headerNav/headerNav.ts +56 -0
- package/src/modules/dx/headerSearch/headerSearch.css +62 -0
- package/src/modules/dx/headerSearch/headerSearch.html +64 -0
- package/src/modules/dx/headerSearch/headerSearch.ts +159 -0
- package/src/modules/dx/helmet/helmet.css +83 -0
- package/src/modules/dx/helmet/helmet.html +39 -0
- package/src/modules/dx/helmet/helmet.ts +27 -0
- package/src/modules/dx/hr/hr.css +55 -0
- package/src/modules/dx/hr/hr.html +23 -0
- package/src/modules/dx/hr/hr.ts +45 -0
- package/src/modules/dx/icon/icon.css +14 -0
- package/src/modules/dx/icon/icon.html +11 -0
- package/src/modules/dx/icon/icon.ts +85 -0
- package/src/modules/dx/iconBadge/iconBadge.css +40 -0
- package/src/modules/dx/iconBadge/iconBadge.html +10 -0
- package/src/modules/dx/iconBadge/iconBadge.ts +42 -0
- package/src/modules/dx/imageAndLabel/imageAndLabel.css +54 -0
- package/src/modules/dx/imageAndLabel/imageAndLabel.html +22 -0
- package/src/modules/dx/imageAndLabel/imageAndLabel.ts +16 -0
- package/src/modules/dx/input/input.css +165 -0
- package/src/modules/dx/input/input.html +58 -0
- package/src/modules/dx/input/input.ts +238 -0
- package/src/modules/dx/input/validators.ts +5 -0
- package/src/modules/dx/instrumentation/instrumentation.html +1 -0
- package/src/modules/dx/instrumentation/instrumentation.ts +116 -0
- package/src/modules/dx/interactiveImage/interactiveImage.css +59 -0
- package/src/modules/dx/interactiveImage/interactiveImage.html +32 -0
- package/src/modules/dx/interactiveImage/interactiveImage.ts +71 -0
- package/src/modules/dx/lazy/lazy.html +5 -0
- package/src/modules/dx/lazy/lazy.ts +163 -0
- package/src/modules/dx/logo/logo.css +33 -0
- package/src/modules/dx/logo/logo.html +6 -0
- package/src/modules/dx/logo/logo.ts +8 -0
- package/src/modules/dx/modalDrawer/modalDrawer.css +40 -0
- package/src/modules/dx/modalDrawer/modalDrawer.html +11 -0
- package/src/modules/dx/modalDrawer/modalDrawer.ts +27 -0
- package/src/modules/dx/newsletterForm/newsletterForm.css +73 -0
- package/src/modules/dx/newsletterForm/newsletterForm.html +73 -0
- package/src/modules/dx/newsletterForm/newsletterForm.ts +238 -0
- package/src/modules/dx/pagination/pagination.css +51 -0
- package/src/modules/dx/pagination/pagination.html +45 -0
- package/src/modules/dx/pagination/pagination.ts +93 -0
- package/src/modules/dx/podcastHost/podcastHost.css +62 -0
- package/src/modules/dx/podcastHost/podcastHost.html +28 -0
- package/src/modules/dx/podcastHost/podcastHost.ts +13 -0
- package/src/modules/dx/podcastPlayer/podcastPlayer.css +10 -0
- package/src/modules/dx/podcastPlayer/podcastPlayer.html +3 -0
- package/src/modules/dx/podcastPlayer/podcastPlayer.ts +5 -0
- package/src/modules/dx/podcastSubscription/podcastSubscription.css +91 -0
- package/src/modules/dx/podcastSubscription/podcastSubscription.html +24 -0
- package/src/modules/dx/podcastSubscription/podcastSubscription.ts +58 -0
- package/src/modules/dx/popover/popover.css +63 -0
- package/src/modules/dx/popover/popover.html +16 -0
- package/src/modules/dx/popover/popover.ts +313 -0
- package/src/modules/dx/radioGroup/radioGroup.css +12 -0
- package/src/modules/dx/radioGroup/radioGroup.html +16 -0
- package/src/modules/dx/radioGroup/radioGroup.ts +65 -0
- package/src/modules/dx/relativeDateTime/relativeDateTime.html +3 -0
- package/src/modules/dx/relativeDateTime/relativeDateTime.ts +113 -0
- package/src/modules/dx/searchResults/coveo.css +18989 -0
- package/src/modules/dx/searchResults/searchResults.css +387 -0
- package/src/modules/dx/searchResults/searchResults.html +104 -0
- package/src/modules/dx/searchResults/searchResults.ts +186 -0
- package/src/modules/dx/section/section.css +130 -0
- package/src/modules/dx/section/section.html +66 -0
- package/src/modules/dx/section/section.ts +41 -0
- package/src/modules/dx/sectionSignup/sectionSignup.css +43 -0
- package/src/modules/dx/sectionSignup/sectionSignup.html +23 -0
- package/src/modules/dx/sectionSignup/sectionSignup.ts +44 -0
- package/src/modules/dx/select/select.css +44 -0
- package/src/modules/dx/select/select.html +60 -0
- package/src/modules/dx/select/select.ts +23 -0
- package/src/modules/dx/sidebar/sidebar.css +192 -0
- package/src/modules/dx/sidebar/sidebar.html +94 -0
- package/src/modules/dx/sidebar/sidebar.ts +255 -0
- package/src/modules/dx/sidebarOld/sidebarOld.css +160 -0
- package/src/modules/dx/sidebarOld/sidebarOld.html +70 -0
- package/src/modules/dx/sidebarOld/sidebarOld.ts +187 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.css +3 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.html +26 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +437 -0
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +36 -0
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.html +14 -0
- package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.ts +70 -0
- package/src/modules/dx/skipNavLink/skipNavLink.css +21 -0
- package/src/modules/dx/skipNavLink/skipNavLink.html +3 -0
- package/src/modules/dx/skipNavLink/skipNavLink.ts +3 -0
- package/src/modules/dx/slackCta/slackCta.css +47 -0
- package/src/modules/dx/slackCta/slackCta.html +17 -0
- package/src/modules/dx/slackCta/slackCta.ts +12 -0
- package/src/modules/dx/socials/socials.css +35 -0
- package/src/modules/dx/socials/socials.html +22 -0
- package/src/modules/dx/socials/socials.ts +81 -0
- package/src/modules/dx/spinner/spinner.css +750 -0
- package/src/modules/dx/spinner/spinner.html +6 -0
- package/src/modules/dx/spinner/spinner.ts +20 -0
- package/src/modules/dx/tab/tab.css +106 -0
- package/src/modules/dx/tab/tab.html +13 -0
- package/src/modules/dx/tab/tab.ts +52 -0
- package/src/modules/dx/toc/toc.css +94 -0
- package/src/modules/dx/toc/toc.html +28 -0
- package/src/modules/dx/toc/toc.ts +77 -0
- package/src/modules/dx/tooltip/microtip.css +269 -0
- package/src/modules/dx/tooltip/tooltip.css +36 -0
- package/src/modules/dx/tooltip/tooltip.html +5 -0
- package/src/modules/dx/tooltip/tooltip.ts +6 -0
- package/src/modules/dx/topics/topics.css +25 -0
- package/src/modules/dx/topics/topics.html +12 -0
- package/src/modules/dx/topics/topics.ts +25 -0
- package/src/modules/dx/tree/tree.css +5 -0
- package/src/modules/dx/tree/tree.html +11 -0
- package/src/modules/dx/tree/tree.ts +72 -0
- package/src/modules/dx/tree/treeHandler.ts +100 -0
- package/src/modules/dx/treeItem/treeItem.css +14 -0
- package/src/modules/dx/treeItem/treeItem.html +22 -0
- package/src/modules/dx/treeItem/treeItem.ts +110 -0
- package/src/modules/dx/treeTile/treeTile.css +190 -0
- package/src/modules/dx/treeTile/treeTile.html +27 -0
- package/src/modules/dx/treeTile/treeTile.ts +59 -0
- package/src/modules/dx/typeBadge/typeBadge.css +74 -0
- package/src/modules/dx/typeBadge/typeBadge.html +5 -0
- package/src/modules/dx/typeBadge/typeBadge.ts +65 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +12 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +11 -0
- package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +18 -0
- package/src/modules/helpers/animations/animations.css +15 -0
- package/src/modules/helpers/button/button.css +4 -0
- package/src/modules/helpers/card/card.css +258 -0
- package/src/modules/helpers/code/code.css +296 -0
- package/src/modules/helpers/commonHeader/commonHeader.css +130 -0
- package/src/modules/helpers/reset/reset.css +559 -0
- package/src/modules/helpers/sidebar/sidebar.css +21 -0
- package/src/modules/helpers/slds/slds.css +191 -0
- package/src/modules/helpers/table/table.css +110 -0
- package/src/modules/helpers/text/text.css +163 -0
- package/src/modules/utils/coveo/coveo.ts +70 -0
- package/src/modules/utils/css/css.ts +43 -0
- package/src/modules/utils/devices/devices.ts +1 -0
- package/src/modules/utils/highlight/highlight.ts +32 -0
- package/src/modules/utils/normalizers/normalizers.ts +91 -0
- package/src/modules/utils/options/options.ts +39 -0
- package/src/modules/utils/prismjs/prismjs.html +3 -0
- package/src/modules/utils/prismjs/prismjs.ts +3321 -0
- package/src/modules/utils/recentSearches/recentSearches.ts +57 -0
- package/src/modules/utils/regexps/regexps.ts +5 -0
- package/src/modules/utils/seo/seo.ts +4 -0
- package/src/modules/utils/slot/slot.ts +17 -0
- package/src/modules/utils/wordpress/wordpress.ts +13 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { toJson } from "utils/normalizers";
|
|
3
|
+
|
|
4
|
+
type Option = {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// API structure modeled after:
|
|
11
|
+
// https://ant.design/components/checkbox/
|
|
12
|
+
// https://github.com/ant-design/ant-design/blob/master/components/checkbox/Group.tsx
|
|
13
|
+
|
|
14
|
+
export default class CheckboxGroup extends LightningElement {
|
|
15
|
+
@api disabled: boolean = false;
|
|
16
|
+
@api legend!: string;
|
|
17
|
+
|
|
18
|
+
@api
|
|
19
|
+
get options(): Option[] {
|
|
20
|
+
const statefulOptions = this._options.map((option) => ({
|
|
21
|
+
...option,
|
|
22
|
+
checked: this._value.includes(option.value),
|
|
23
|
+
disabled: this.disabled || option.disabled
|
|
24
|
+
}));
|
|
25
|
+
return statefulOptions;
|
|
26
|
+
}
|
|
27
|
+
set options(value) {
|
|
28
|
+
this._options = toJson(value);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@api get defaultValue(): string[] | null {
|
|
32
|
+
return this._defaultValue;
|
|
33
|
+
}
|
|
34
|
+
set defaultValue(value) {
|
|
35
|
+
this._value = toJson(value) || [];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@api get value(): string[] {
|
|
39
|
+
return this._value;
|
|
40
|
+
}
|
|
41
|
+
set value(value) {
|
|
42
|
+
if (this.defaultValue) {
|
|
43
|
+
console.error(
|
|
44
|
+
"Do not supply both value and default-value to form groups."
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
this._value = toJson(value) || [];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private _defaultValue: string[] | null = null;
|
|
52
|
+
private _options: Option[] = [];
|
|
53
|
+
private _value: string[] = [];
|
|
54
|
+
|
|
55
|
+
private updateValue(checkedValue: string) {
|
|
56
|
+
this._value = this._value.includes(checkedValue)
|
|
57
|
+
? this._value.filter((val) => val !== checkedValue)
|
|
58
|
+
: [...this._value, checkedValue];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private onChange(e: CustomEvent) {
|
|
62
|
+
const { checked, value: checkedValue, originalEvent } = e.detail;
|
|
63
|
+
|
|
64
|
+
this.updateValue(checkedValue);
|
|
65
|
+
|
|
66
|
+
this.dispatchEvent(
|
|
67
|
+
new CustomEvent("change", {
|
|
68
|
+
detail: {
|
|
69
|
+
checked,
|
|
70
|
+
checkedValue,
|
|
71
|
+
originalEvent,
|
|
72
|
+
value: this._value
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@import "helpers/code";
|
|
2
|
+
@import "helpers/text";
|
|
3
|
+
@import "./darkTheme.css";
|
|
4
|
+
@import "./lightTheme.css";
|
|
5
|
+
|
|
6
|
+
:host {
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
pre {
|
|
11
|
+
margin: 0 !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.copyta {
|
|
15
|
+
height: 0;
|
|
16
|
+
position: absolute;
|
|
17
|
+
opacity: 0;
|
|
18
|
+
width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.toolbar {
|
|
22
|
+
border-radius: 0.3em 0.3em 0 0;
|
|
23
|
+
opacity: 1;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
height: 40px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dx-theme-light .toolbar {
|
|
30
|
+
background-color: var(--dx-g-gray-90);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dx-theme-dark .toolbar {
|
|
34
|
+
background-color: var(--dx-g-blue-natural-20);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.divider {
|
|
38
|
+
border-left-style: solid;
|
|
39
|
+
border-left-width: 1px;
|
|
40
|
+
height: var(--dx-g-spacing-md);
|
|
41
|
+
margin-right: var(--dx-g-spacing-xs);
|
|
42
|
+
width: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dx-theme-dark .divider {
|
|
46
|
+
border-left-color: var(--dx-g-blue-vibrant-40);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dx-theme-light .divider {
|
|
50
|
+
border-left-color: #dddbda;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dx-code-block-heading {
|
|
54
|
+
padding-left: var(--dx-g-spacing-mlg);
|
|
55
|
+
transform: translateY(3px);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dx-theme-light .dx-code-block-heading {
|
|
59
|
+
color: var(--dx-g-blue-vibrant-20) !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dx-theme-dark .dx-code-block-heading {
|
|
63
|
+
color: white !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.toolbar-item {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.toolbar-item:first-child {
|
|
71
|
+
flex-basis: 95%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dx-theme-dark .btn {
|
|
75
|
+
--dx-c-button-primary-color: #fff;
|
|
76
|
+
--dx-c-button-primary-color-hover: var(--dx-g-blue-natural-10);
|
|
77
|
+
--dx-c-button-secondary-color-hover: var(--dx-g-blue-vibrant-30);
|
|
78
|
+
--dx-c-button-custom-color: #fff;
|
|
79
|
+
--dx-c-button-custom-color-hover: #fff;
|
|
80
|
+
--dx-c-button-custom-background-hover: var(--dx-g-blue-natural-10);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dx-theme-light .btn {
|
|
84
|
+
--dx-c-button-primary-color: var(--dx-g-blue-vibrant-20);
|
|
85
|
+
--dx-c-button-primary-color-hover: var(--dx-g-gray-60);
|
|
86
|
+
--dx-c-button-secondary-color-hover: #dddbda;
|
|
87
|
+
--dx-c-button-custom-color: var(--dx-g-blue-vibrant-20);
|
|
88
|
+
--dx-c-button-custom-color-hover: var(--dx-g-blue-vibrant-20);
|
|
89
|
+
--dx-c-button-custom-background-hover: var(--dx-g-gray-60);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
div.code-block-content {
|
|
93
|
+
border-radius: 0 0 0.3em 0.3em;
|
|
94
|
+
overflow-y: auto;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.dx-theme-dark div.code-block-content {
|
|
98
|
+
background: var(--dx-g-blue-vibrant-10);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.dx-theme-light div.code-block-content {
|
|
102
|
+
background: var(--dx-g-gray-95);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
code[class*="language-"] {
|
|
106
|
+
margin-left: -11px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.toolbar-item:not(:first-of-type) {
|
|
110
|
+
margin-right: var(--dx-g-spacing-xs);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
pre[class*="language-"] {
|
|
114
|
+
border-radius: 0 0 0.3em 0.3em;
|
|
115
|
+
padding-bottom: var(--dx-g-spacing-smd);
|
|
116
|
+
background-color: unset;
|
|
117
|
+
padding-top: var(--dx-g-spacing-sm);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
pre[class*="language-"].line-numbers {
|
|
121
|
+
padding-left: 56px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media screen and (max-width: 640px) {
|
|
125
|
+
.dx-code-block-heading {
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template if:true={codeBlock}>
|
|
3
|
+
<div class={codeblocksClassname}>
|
|
4
|
+
<div class="toolbar">
|
|
5
|
+
<div class="toolbar-item">
|
|
6
|
+
<div class="dx-text-heading-7 dx-code-block-heading">
|
|
7
|
+
{ title }
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<template if:true={showLanguageDropdown}>
|
|
11
|
+
<div class="toolbar-item">
|
|
12
|
+
<dx-dropdown
|
|
13
|
+
small="true"
|
|
14
|
+
options={allLanguages}
|
|
15
|
+
value={selectedLanguageId}
|
|
16
|
+
onchange={onLanguageChange}
|
|
17
|
+
>
|
|
18
|
+
<dx-button
|
|
19
|
+
icon-symbol="chevrondown"
|
|
20
|
+
class="btn language-btn"
|
|
21
|
+
variant="custom"
|
|
22
|
+
>
|
|
23
|
+
{ selectedLanguageLabel }
|
|
24
|
+
</dx-button>
|
|
25
|
+
</dx-dropdown>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="divider"></div>
|
|
28
|
+
</template>
|
|
29
|
+
<template if:true={showCodeSourceBtn}>
|
|
30
|
+
<div class="toolbar-item">
|
|
31
|
+
<dx-tooltip
|
|
32
|
+
label="View Code Source"
|
|
33
|
+
placement="top-left"
|
|
34
|
+
>
|
|
35
|
+
<dx-button
|
|
36
|
+
href={sourceLink}
|
|
37
|
+
type="button"
|
|
38
|
+
variant="tertiary"
|
|
39
|
+
aria-label="source"
|
|
40
|
+
class="btn source-btn"
|
|
41
|
+
target="_blank"
|
|
42
|
+
>
|
|
43
|
+
Source
|
|
44
|
+
</dx-button>
|
|
45
|
+
</dx-tooltip>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="divider"></div>
|
|
48
|
+
</template>
|
|
49
|
+
<div class="toolbar-item">
|
|
50
|
+
<dx-tooltip label={updateThemeBtnText} placement="top-left">
|
|
51
|
+
<dx-button
|
|
52
|
+
onclick={updateTheme}
|
|
53
|
+
type="button"
|
|
54
|
+
icon-symbol="away"
|
|
55
|
+
variant="tertiary"
|
|
56
|
+
aria-label="theme"
|
|
57
|
+
class="btn update-theme-btn"
|
|
58
|
+
></dx-button>
|
|
59
|
+
</dx-tooltip>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="divider"></div>
|
|
62
|
+
<div class="toolbar-item">
|
|
63
|
+
<dx-tooltip label={copyBtnText} placement="top-left">
|
|
64
|
+
<dx-button
|
|
65
|
+
onclick={copySource}
|
|
66
|
+
type="button"
|
|
67
|
+
icon-symbol="copy"
|
|
68
|
+
variant="tertiary"
|
|
69
|
+
aria-label="copy"
|
|
70
|
+
class="btn copy-btn"
|
|
71
|
+
></dx-button>
|
|
72
|
+
</dx-tooltip>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="code-block-content" lwc:dom="manual"></div>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
<template if:false={codeBlock}>No content provided</template>
|
|
79
|
+
</template>
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { LightningElement, api, wire, track } from "lwc";
|
|
2
|
+
import { CodeBlockTheme, CodeBlockLanguage } from "typings/custom";
|
|
3
|
+
import cx from "classnames";
|
|
4
|
+
import Prism from "utils/prismjs";
|
|
5
|
+
import {
|
|
6
|
+
getLocalStorageData,
|
|
7
|
+
setLocalStorageData
|
|
8
|
+
} from "@sfdocs-internal/wires";
|
|
9
|
+
import { track as gtmTrack } from "dx/instrumentation";
|
|
10
|
+
|
|
11
|
+
// Used por remove enclosing <pre> tag's (if occurs)
|
|
12
|
+
const preTagRegexp: RegExp = /^<pre.*?>(.*)<\/pre>$/is;
|
|
13
|
+
|
|
14
|
+
const LIGHT = "light";
|
|
15
|
+
const DARK = "dark";
|
|
16
|
+
const themes: CodeBlockTheme[] = [LIGHT, DARK];
|
|
17
|
+
const LOCAL_STORAGE_KEY = "dx-codeblock-theme";
|
|
18
|
+
|
|
19
|
+
export default class CodeBlock extends LightningElement {
|
|
20
|
+
@api defaultTheme: CodeBlockTheme = LIGHT;
|
|
21
|
+
@api title: string = "title";
|
|
22
|
+
@api sourceLink: string = "";
|
|
23
|
+
@api language: string = "";
|
|
24
|
+
// if it is true, it renders code as is coming instead of wrapping it into html/xml comments tags.
|
|
25
|
+
@api isEncoded = false;
|
|
26
|
+
|
|
27
|
+
private markupLangs = ["visualforce", "html", "xml"];
|
|
28
|
+
private _codeBlockRendered: boolean = false;
|
|
29
|
+
private componentLoaded: boolean = false;
|
|
30
|
+
private showLanguageDropdown: boolean = false;
|
|
31
|
+
private copyBtnText: string = "Click to copy";
|
|
32
|
+
private selectedLanguageLabel: string = "";
|
|
33
|
+
private selectedLanguageId: string = "";
|
|
34
|
+
private selectedLanguage: CodeBlockLanguage = { label: "Language", id: "" };
|
|
35
|
+
private allLanguages: CodeBlockLanguage[] = [
|
|
36
|
+
{ label: "Language", id: "" },
|
|
37
|
+
{ label: "Apex", id: "apex" },
|
|
38
|
+
{ label: "Java", id: "java" },
|
|
39
|
+
{ label: "Javascript", id: "javascript" },
|
|
40
|
+
{ label: "CSS", id: "css" },
|
|
41
|
+
{ label: "Visualforce", id: "visualforce" },
|
|
42
|
+
{ label: "Html", id: "html" },
|
|
43
|
+
{ label: "xml", id: "xml" },
|
|
44
|
+
{ label: "TypeScript", id: "typescript" },
|
|
45
|
+
{ label: "PHP", id: "php" }
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
connectedCallback() {
|
|
49
|
+
if (!this.theme) {
|
|
50
|
+
this.theme = this.defaultTheme;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
_codeBlock: string = "";
|
|
55
|
+
@api
|
|
56
|
+
set codeBlock(value: string) {
|
|
57
|
+
this._codeBlockRendered = false;
|
|
58
|
+
let match;
|
|
59
|
+
this._codeBlock = (
|
|
60
|
+
(match = preTagRegexp.exec(value.trim())) === null
|
|
61
|
+
? value.trim()
|
|
62
|
+
: match[1]
|
|
63
|
+
).trim();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
get codeBlock(): string {
|
|
67
|
+
return this._codeBlock;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@track private theme: CodeBlockTheme | null = null;
|
|
71
|
+
|
|
72
|
+
@wire(getLocalStorageData, { key: "dx-codeblock-theme" })
|
|
73
|
+
updateThemeForCodeblock(value: any) {
|
|
74
|
+
if (themes.includes(value)) {
|
|
75
|
+
this.theme = value;
|
|
76
|
+
} else {
|
|
77
|
+
setLocalStorageData(
|
|
78
|
+
LOCAL_STORAGE_KEY,
|
|
79
|
+
this.theme || this.defaultTheme
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
get updateThemeBtnText(): string {
|
|
85
|
+
return `Switch to ${this.theme === DARK ? "Light" : "Dark"} mode`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
get showCodeSourceBtn(): boolean {
|
|
89
|
+
return !!this.sourceLink;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
get codeblocksClassname(): string {
|
|
93
|
+
return cx(`dx-theme-${this.theme}`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
formatCodeBlock() {
|
|
97
|
+
const divEl = this.template.querySelector("div.code-block-content");
|
|
98
|
+
const templateEl = document.createElement("template");
|
|
99
|
+
if (
|
|
100
|
+
!this.isEncoded &&
|
|
101
|
+
this.markupLangs.includes(this.selectedLanguage.id || "")
|
|
102
|
+
) {
|
|
103
|
+
// eslint-disable-next-line
|
|
104
|
+
templateEl.innerHTML = `<pre class='codeblock'><!-- ${this.codeBlock.replace(
|
|
105
|
+
/<!--(.*?)-->/gs,
|
|
106
|
+
"@@$1##"
|
|
107
|
+
)} --></pre>`;
|
|
108
|
+
} else {
|
|
109
|
+
// eslint-disable-next-line
|
|
110
|
+
const innerHtml = this.isEncoded
|
|
111
|
+
? this.codeBlock
|
|
112
|
+
: this.codeBlock.replace(/</g, "<").replace(/>/g, ">");
|
|
113
|
+
|
|
114
|
+
templateEl.innerHTML = `<pre class='codeblock'>${innerHtml}</pre>`;
|
|
115
|
+
}
|
|
116
|
+
const codeBlockEls = templateEl.content.querySelectorAll("pre");
|
|
117
|
+
codeBlockEls.forEach((codeBlockEl) => {
|
|
118
|
+
// eslint-disable-next-line
|
|
119
|
+
const codeHTML = codeBlockEl.innerHTML;
|
|
120
|
+
codeBlockEl.classList.add("line-numbers");
|
|
121
|
+
const codeEl = document.createElement("code");
|
|
122
|
+
codeEl.classList.add(
|
|
123
|
+
`language-${
|
|
124
|
+
this.markupLangs.includes(this.selectedLanguage.id || "")
|
|
125
|
+
? "markup"
|
|
126
|
+
: this.selectedLanguage.id
|
|
127
|
+
}`
|
|
128
|
+
);
|
|
129
|
+
// for custom markup content, it is a workaround to be refactored later.
|
|
130
|
+
// eslint-disable-next-line
|
|
131
|
+
this.language !== "text"
|
|
132
|
+
? (codeEl.innerHTML = codeHTML)
|
|
133
|
+
: (codeEl.textContent = this._codeBlock.trim());
|
|
134
|
+
// eslint-disable-next-line
|
|
135
|
+
codeBlockEl.innerHTML = "";
|
|
136
|
+
codeBlockEl.appendChild(codeEl);
|
|
137
|
+
Prism.highlightAllUnder(codeBlockEl);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
if (divEl) {
|
|
141
|
+
// eslint-disable-next-line
|
|
142
|
+
divEl.innerHTML = "";
|
|
143
|
+
divEl.append(templateEl.content);
|
|
144
|
+
if (this.markupLangs.includes(this.selectedLanguage.id || "")) {
|
|
145
|
+
const res = this.template.querySelector(`code.language-markup`);
|
|
146
|
+
if (res) {
|
|
147
|
+
// eslint-disable-next-line
|
|
148
|
+
res.innerHTML = res.innerHTML.replace(
|
|
149
|
+
/@@(.*?)##/gs,
|
|
150
|
+
`<span class="token comment"><!--$1--></span>`
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
onLanguageChange(newLang: any) {
|
|
158
|
+
this.selectedLanguage =
|
|
159
|
+
this.allLanguages.find(
|
|
160
|
+
(lang: CodeBlockLanguage) => lang.id === newLang.detail
|
|
161
|
+
) || this.allLanguages[0];
|
|
162
|
+
this.selectedLanguageLabel = this.selectedLanguage.label;
|
|
163
|
+
this.selectedLanguageId = this.selectedLanguage.id;
|
|
164
|
+
this.formatCodeBlock();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Note: There is a known issue in storybook@6.1.13 where some apis are not available if you access Storybook through IP address.
|
|
169
|
+
* https://github.com/storybookjs/storybook/issues/13529
|
|
170
|
+
*/
|
|
171
|
+
async copySource(event: any) {
|
|
172
|
+
gtmTrack(event.target, "custEv_codeBlock", {
|
|
173
|
+
codeBlockAction: "copy"
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
try {
|
|
177
|
+
const snippetContainer: HTMLElement | null =
|
|
178
|
+
this.template.querySelector(".code-block-content");
|
|
179
|
+
if (snippetContainer && snippetContainer.textContent) {
|
|
180
|
+
await navigator.clipboard.writeText(
|
|
181
|
+
snippetContainer.textContent
|
|
182
|
+
);
|
|
183
|
+
this.copyBtnText = "Copied!";
|
|
184
|
+
setTimeout(() => {
|
|
185
|
+
this.copyBtnText = "Click to copy";
|
|
186
|
+
}, 2000);
|
|
187
|
+
}
|
|
188
|
+
} catch (error) {
|
|
189
|
+
console.error(error);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
updateTheme(event: any) {
|
|
194
|
+
this.theme = this.theme === DARK ? LIGHT : DARK;
|
|
195
|
+
setLocalStorageData(LOCAL_STORAGE_KEY, this.theme);
|
|
196
|
+
|
|
197
|
+
gtmTrack(event.target, "custEv_codeBlock", {
|
|
198
|
+
codeBlockAction: this.theme === DARK ? "darkmode" : "lightmode"
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
renderedCallback() {
|
|
203
|
+
if (this._codeBlockRendered) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
this.selectedLanguage =
|
|
207
|
+
this.allLanguages.find(
|
|
208
|
+
(l: CodeBlockLanguage) => l.id === this.language
|
|
209
|
+
) || this.allLanguages[0];
|
|
210
|
+
this.selectedLanguageLabel = this.selectedLanguage.label;
|
|
211
|
+
this.selectedLanguageId = this.selectedLanguage.id;
|
|
212
|
+
this.formatCodeBlock();
|
|
213
|
+
this._codeBlockRendered = true;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.dx-theme-dark .token.punctuation {
|
|
2
|
+
color: var(--dx-g-blue-vibrant-90);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dx-theme-dark .token.property {
|
|
6
|
+
color: var(--dx-g-cloud-blue-vibrant-70);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dx-theme-dark .token.keyword {
|
|
10
|
+
color: var(--dx-g-purple-vibrant-70);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dx-theme-dark .token.comment {
|
|
14
|
+
color: var(--dx-g-blue-vibrant-80);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dx-theme-dark .token.selector {
|
|
18
|
+
color: var(--dx-g-teal-vibrant-70);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dx-theme-dark .token.operator {
|
|
22
|
+
color: var(--dx-g-pink-vibrant-65);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dx-theme-dark .token.function {
|
|
26
|
+
color: var(--dx-g-yellow-vibrant-80);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dx-theme-dark .token.variable {
|
|
30
|
+
color: var(--dx-g-orange-vibrant-70);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dx-theme-dark .token.prolog {
|
|
34
|
+
color: #93a1a1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dx-theme-dark .token.doctype {
|
|
38
|
+
color: var(--dx-g-blue-vibrant-80);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dx-theme-dark .token.cdata {
|
|
42
|
+
color: #93a1a1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dx-theme-dark .token.tag {
|
|
46
|
+
color: var(--dx-g-cloud-blue-vibrant-70);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dx-theme-dark .token.attr-name {
|
|
50
|
+
color: var(--dx-g-teal-vibrant-70);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dx-theme-dark .token.attr-value {
|
|
54
|
+
color: var(--dx-g-purple-vibrant-70);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dx-theme-dark .token.entity {
|
|
58
|
+
color: #fff;
|
|
59
|
+
background: var(--dx-g-blue-vibrant-10);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dx-theme-dark .token.url {
|
|
63
|
+
color: #fff;
|
|
64
|
+
background: var(--dx-g-blue-vibrant-10);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dx-theme-dark .token.regex,
|
|
68
|
+
.dx-theme-dark .token.deleted,
|
|
69
|
+
.dx-theme-dark .token.constant,
|
|
70
|
+
.dx-theme-dark .token.number,
|
|
71
|
+
.dx-theme-dark .token.builtin,
|
|
72
|
+
.dx-theme-dark .token.important .dx-theme-dark .token.boolean,
|
|
73
|
+
.dx-theme-dark .token.symbol,
|
|
74
|
+
.dx-theme-dark .token.inserted,
|
|
75
|
+
.dx-theme-dark .token.char,
|
|
76
|
+
.dx-theme-dark .token.string {
|
|
77
|
+
color: #fff;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dx-theme-dark .language-css .token.string {
|
|
81
|
+
color: #fff;
|
|
82
|
+
background: var(--dx-g-blue-vibrant-10);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dx-theme-dark .style .token.string {
|
|
86
|
+
color: #fff;
|
|
87
|
+
background: var(--dx-g-blue-vibrant-10);
|
|
88
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.dx-theme-light .token.comment {
|
|
2
|
+
color: #706e6b;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dx-theme-light .token.punctuation {
|
|
6
|
+
color: var(--dx-g-blue-vibrant-10);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dx-theme-light .token.keyword {
|
|
10
|
+
color: var(--dx-g-pink-vibrant-40);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dx-theme-light .token.variable {
|
|
14
|
+
color: var(--dx-g-hot-orange-vibrant-40);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dx-theme-light .token.operator {
|
|
18
|
+
color: var(--dx-g-green-vibrant-50);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dx-theme-light .token.property {
|
|
22
|
+
color: var(--dx-g-indigo-vibrant-40);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dx-theme-light .token.selector {
|
|
26
|
+
color: var(--dx-g-blue-vibrant-40);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dx-theme-light .token.function {
|
|
30
|
+
color: var(--dx-g-teal-vibrant-40);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dx-theme-light .token.tag {
|
|
34
|
+
color: rgb(75, 36, 219);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dx-theme-light .token.attr-name {
|
|
38
|
+
color: rgb(0, 107, 102);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dx-theme-light .token.attr-value {
|
|
42
|
+
color: rgb(204, 0, 96);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dx-theme-light .token.doctype {
|
|
46
|
+
color: rgb(0, 114, 215);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dx-theme-light .token.prolog,
|
|
50
|
+
.dx-theme-light .token.cdata,
|
|
51
|
+
.dx-theme-light .token.boolean,
|
|
52
|
+
.dx-theme-light .token.number,
|
|
53
|
+
.dx-theme-light .token.constant,
|
|
54
|
+
.dx-theme-light .token.symbol,
|
|
55
|
+
.dx-theme-light .token.deleted,
|
|
56
|
+
.dx-theme-light .token.string,
|
|
57
|
+
.dx-theme-light .token.char,
|
|
58
|
+
.dx-theme-light .token.builtin,
|
|
59
|
+
.dx-theme-light .token.inserted,
|
|
60
|
+
.dx-theme-light .token.atrule,
|
|
61
|
+
.dx-theme-light .token.regex,
|
|
62
|
+
.dx-theme-light .token.important {
|
|
63
|
+
color: var(--dx-g-gray-10);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dx-theme-light .token.entity,
|
|
67
|
+
.dx-theme-light .token.url,
|
|
68
|
+
.dx-theme-light .language-css .token.string,
|
|
69
|
+
.dx-theme-light .style .token.string {
|
|
70
|
+
color: var(--dx-g-gray-10);
|
|
71
|
+
background: var(--dx-g-gray-95);
|
|
72
|
+
}
|