@salesforcedevs/arch-components 1.20.17-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lwc.config.json +7 -0
- package/package.json +19 -0
- package/src/modules/common/context/context.html +1 -0
- package/src/modules/common/context/context.ts +137 -0
- package/src/modules/common/effectAdapter/__tests__/effectAdapter.test.ts +12 -0
- package/src/modules/common/effectAdapter/effectAdapter.html +1 -0
- package/src/modules/common/effectAdapter/effectAdapter.ts +18 -0
- package/src/modules/common/reflectedElement/__tests__/modules/test/select/select.html +3 -0
- package/src/modules/common/reflectedElement/__tests__/modules/test/select/select.ts +7 -0
- package/src/modules/common/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.html +3 -0
- package/src/modules/common/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.ts +18 -0
- package/src/modules/common/reflectedElement/__tests__/reflectedElement.test.ts +75 -0
- package/src/modules/common/reflectedElement/reflectedElement.ts +50 -0
- package/src/modules/common/slot/__tests__/slot.test.ts +96 -0
- package/src/modules/common/slot/slot.ts +20 -0
- package/src/modules/sa/coverage/coverage.css +35 -0
- package/src/modules/sa/coverage/coverage.html +15 -0
- package/src/modules/sa/coverage/coverage.ts +406 -0
- package/src/modules/sa/coverage/types.d.ts +26 -0
- package/src/modules/sa/expandableSection/expandableSection.css +24 -0
- package/src/modules/sa/expandableSection/expandableSection.html +20 -0
- package/src/modules/sa/expandableSection/expandableSection.stories.ts +37 -0
- package/src/modules/sa/expandableSection/expandableSection.ts +24 -0
- package/src/modules/sa/explorer/explorer.css +303 -0
- package/src/modules/sa/explorer/explorer.html +403 -0
- package/src/modules/sa/explorer/explorer.ts +664 -0
- package/src/modules/sa/explorer/types.d.ts +60 -0
- package/src/modules/sa/gallery/gallery.css +358 -0
- package/src/modules/sa/gallery/gallery.html +65 -0
- package/src/modules/sa/gallery/gallery.ts +300 -0
- package/src/modules/sa/gallery/types.d.ts +35 -0
- package/src/modules/sa/socialShare/socialShare.css +49 -0
- package/src/modules/sa/socialShare/socialShare.html +56 -0
- package/src/modules/sa/socialShare/socialShare.ts +29 -0
- package/src/modules/shared/a11y/a11y.ts +25 -0
- package/src/modules/shared/children/children.ts +29 -0
- package/src/modules/shared/color/color.ts +52 -0
- package/src/modules/shared/debounce/debounce.ts +32 -0
- package/src/modules/shared/dialog/dialog.ts +154 -0
- package/src/modules/shared/elements/__tests__/overflow.test.ts +39 -0
- package/src/modules/shared/elements/overflow.ts +71 -0
- package/src/modules/shared/fetch/fetch.ts +52 -0
- package/src/modules/shared/helpers/helpers.ts +141 -0
- package/src/modules/shared/i18n/i18n.ts +74 -0
- package/src/modules/shared/labels/__tests__/helpers.test.ts +107 -0
- package/src/modules/shared/labels/__tests__/pointHelpers.test.ts +33 -0
- package/src/modules/shared/labels/__tests__/timeHelpers.test.ts +89 -0
- package/src/modules/shared/labels/helpers.ts +23 -0
- package/src/modules/shared/labels/pointHelpers.ts +47 -0
- package/src/modules/shared/labels/timeHelpers.ts +182 -0
- package/src/modules/shared/labels/types.d.ts +5 -0
- package/src/modules/shared/logger/logger.ts +33 -0
- package/src/modules/shared/menu/menu.ts +239 -0
- package/src/modules/shared/overflow/__tests__/overflow.test.ts +39 -0
- package/src/modules/shared/overflow/overflow.ts +71 -0
- package/src/modules/shared/polling-request.ts +97 -0
- package/src/modules/shared/testutils.ts +118 -0
- package/src/modules/shared/track/track.ts +23 -0
- package/src/modules/shared/trailhead.ts +123 -0
- package/src/modules/shared/types.d.ts +1 -0
- package/src/modules/shared/useEffectAttr.ts +16 -0
- package/src/modules/shared/withState.ts +21 -0
- package/src/modules/tds/appLauncher/__fixtures__/index.ts +34 -0
- package/src/modules/tds/appLauncher/__tests__/appLauncher.test.ts +119 -0
- package/src/modules/tds/appLauncher/appLauncher.css +65 -0
- package/src/modules/tds/appLauncher/appLauncher.html +38 -0
- package/src/modules/tds/appLauncher/appLauncher.stories.ts +39 -0
- package/src/modules/tds/appLauncher/appLauncher.ts +79 -0
- package/src/modules/tds/appLauncher/types.ts +8 -0
- package/src/modules/tds/avatar/__tests__/avatar.test.ts +11 -0
- package/src/modules/tds/avatar/avatar.css +77 -0
- package/src/modules/tds/avatar/avatar.html +36 -0
- package/src/modules/tds/avatar/avatar.stories.ts +64 -0
- package/src/modules/tds/avatar/avatar.ts +50 -0
- package/src/modules/tds/badge/__tests__/badge.test.js +11 -0
- package/src/modules/tds/badge/badge.css +22 -0
- package/src/modules/tds/badge/badge.html +5 -0
- package/src/modules/tds/badge/badge.stories.ts +10 -0
- package/src/modules/tds/badge/badge.ts +9 -0
- package/src/modules/tds/button/__tests__/button.test.ts +52 -0
- package/src/modules/tds/button/button.css +1 -0
- package/src/modules/tds/button/button.html +20 -0
- package/src/modules/tds/button/button.stories.js +54 -0
- package/src/modules/tds/button/button.ts +59 -0
- package/src/modules/tds/buttonIcon/__tests__/buttonIcon.test.ts +17 -0
- package/src/modules/tds/buttonIcon/buttonIcon.css +1 -0
- package/src/modules/tds/buttonIcon/buttonIcon.html +12 -0
- package/src/modules/tds/buttonIcon/buttonIcon.stories.js +38 -0
- package/src/modules/tds/buttonIcon/buttonIcon.ts +6 -0
- package/src/modules/tds/buttonIconLink/buttonIconLink.css +1 -0
- package/src/modules/tds/buttonIconLink/buttonIconLink.html +14 -0
- package/src/modules/tds/buttonIconLink/buttonIconLink.stories.ts +32 -0
- package/src/modules/tds/buttonIconLink/buttonIconLink.ts +9 -0
- package/src/modules/tds/buttonLink/__tests__/buttonLink.test.ts +17 -0
- package/src/modules/tds/buttonLink/buttonLink.css +1 -0
- package/src/modules/tds/buttonLink/buttonLink.html +19 -0
- package/src/modules/tds/buttonLink/buttonLink.stories.js +24 -0
- package/src/modules/tds/buttonLink/buttonLink.ts +8 -0
- package/src/modules/tds/buttonStyles/buttonStyles.css +232 -0
- package/src/modules/tds/childSummary/__tests__/childSummary.test.js +99 -0
- package/src/modules/tds/childSummary/childSummary.css +74 -0
- package/src/modules/tds/childSummary/childSummary.html +38 -0
- package/src/modules/tds/childSummary/childSummary.stories.ts +40 -0
- package/src/modules/tds/childSummary/childSummary.ts +63 -0
- package/src/modules/tds/childSummary/types.d.ts +10 -0
- package/src/modules/tds/contentChildListItem/__tests__/contentChildListItem.test.ts +32 -0
- package/src/modules/tds/contentChildListItem/contentChildListItem.css +1 -0
- package/src/modules/tds/contentChildListItem/contentChildListItem.html +10 -0
- package/src/modules/tds/contentChildListItem/contentChildListItem.stories.ts +46 -0
- package/src/modules/tds/contentChildListItem/contentChildListItem.ts +34 -0
- package/src/modules/tds/contentIcon/contentIcon.css +47 -0
- package/src/modules/tds/contentIcon/contentIcon.html +15 -0
- package/src/modules/tds/contentIcon/contentIcon.stories.js +110 -0
- package/src/modules/tds/contentIcon/contentIcon.ts +66 -0
- package/src/modules/tds/contextAdapter/__tests__/contextAdapter.test.ts +76 -0
- package/src/modules/tds/contextAdapter/constants.ts +1 -0
- package/src/modules/tds/contextAdapter/contextAdapter.html +1 -0
- package/src/modules/tds/contextAdapter/contextAdapter.ts +54 -0
- package/src/modules/tds/dialogStyles/dialogStyles.css +90 -0
- package/src/modules/tds/footerLinks/__tests__/__snapshots__/footerLinks.test.ts.snap +3 -0
- package/src/modules/tds/footerLinks/__tests__/footerLinks.test.ts +142 -0
- package/src/modules/tds/footerLinks/footerLinks.css +80 -0
- package/src/modules/tds/footerLinks/footerLinks.html +30 -0
- package/src/modules/tds/footerLinks/footerLinks.ts +48 -0
- package/src/modules/tds/footerLinks/types.ts +11 -0
- package/src/modules/tds/footerMfe/footerMfe.html +3 -0
- package/src/modules/tds/footerMfe/footerMfe.ts +19 -0
- package/src/modules/tds/headerAvatar/__tests__/headerAvatar.test.ts +43 -0
- package/src/modules/tds/headerAvatar/headerAvatar.css +45 -0
- package/src/modules/tds/headerAvatar/headerAvatar.html +25 -0
- package/src/modules/tds/headerAvatar/headerAvatar.ts +15 -0
- package/src/modules/tds/headerHelpButton/__tests__/headerHelpButton.test.ts +32 -0
- package/src/modules/tds/headerHelpButton/headerHelpButton.css +14 -0
- package/src/modules/tds/headerHelpButton/headerHelpButton.html +19 -0
- package/src/modules/tds/headerHelpButton/headerHelpButton.ts +12 -0
- package/src/modules/tds/heading/__tests__/heading.test.ts +50 -0
- package/src/modules/tds/heading/heading.css +1 -0
- package/src/modules/tds/heading/heading.html +9 -0
- package/src/modules/tds/heading/heading.stories.ts +36 -0
- package/src/modules/tds/heading/heading.ts +36 -0
- package/src/modules/tds/icon/icon.css +28 -0
- package/src/modules/tds/icon/icon.html +17 -0
- package/src/modules/tds/icon/icon.stories.js +18 -0
- package/src/modules/tds/icon/icon.ts +79 -0
- package/src/modules/tds/input/__tests__/input.test.ts +41 -0
- package/src/modules/tds/input/input.css +34 -0
- package/src/modules/tds/input/input.html +12 -0
- package/src/modules/tds/input/input.stories.ts +25 -0
- package/src/modules/tds/input/input.ts +41 -0
- package/src/modules/tds/instrumentation/instrumentation.css +0 -0
- package/src/modules/tds/instrumentation/instrumentation.html +1 -0
- package/src/modules/tds/instrumentation/instrumentation.ts +113 -0
- package/src/modules/tds/pbCard/pbCard.css +28 -0
- package/src/modules/tds/pbCard/pbCard.html +21 -0
- package/src/modules/tds/pbCard/pbCard.ts +18 -0
- package/src/modules/tds/pill/__tests__/pill.test.ts +56 -0
- package/src/modules/tds/pill/pill.css +70 -0
- package/src/modules/tds/pill/pill.html +17 -0
- package/src/modules/tds/pill/pill.stories.ts +41 -0
- package/src/modules/tds/pill/pill.ts +34 -0
- package/src/modules/tds/progressBar/__tests__/progressBar.test.js +11 -0
- package/src/modules/tds/progressBar/progressBar.css +42 -0
- package/src/modules/tds/progressBar/progressBar.html +14 -0
- package/src/modules/tds/progressBar/progressBar.stories.ts +24 -0
- package/src/modules/tds/progressBar/progressBar.ts +14 -0
- package/src/modules/tds/radio/__tests__/radio.test.ts +29 -0
- package/src/modules/tds/radio/radio.css +89 -0
- package/src/modules/tds/radio/radio.html +17 -0
- package/src/modules/tds/radio/radio.stories.ts +31 -0
- package/src/modules/tds/radio/radio.ts +32 -0
- package/src/modules/tds/reset/reset.css +39 -0
- package/src/modules/tds/search/__fixtures__/index.ts +32 -0
- package/src/modules/tds/search/__tests__/search.test.ts +235 -0
- package/src/modules/tds/search/lib/__tests__/__snapshots__/listbox.test.ts.snap +115 -0
- package/src/modules/tds/search/lib/__tests__/listbox.test.ts +192 -0
- package/src/modules/tds/search/lib/listbox.ts +209 -0
- package/src/modules/tds/search/search.css +122 -0
- package/src/modules/tds/search/search.html +21 -0
- package/src/modules/tds/search/search.stories.ts +20 -0
- package/src/modules/tds/search/search.ts +107 -0
- package/src/modules/tds/search/types.d.ts +22 -0
- package/src/modules/tds/searchList/searchList.css +120 -0
- package/src/modules/tds/searchList/searchList.html +43 -0
- package/src/modules/tds/searchList/searchList.stories.ts +10 -0
- package/src/modules/tds/searchList/searchList.ts +53 -0
- package/src/modules/tds/select/__tests__/select.test.ts +150 -0
- package/src/modules/tds/select/select.css +42 -0
- package/src/modules/tds/select/select.html +24 -0
- package/src/modules/tds/select/select.stories.ts +59 -0
- package/src/modules/tds/select/select.ts +60 -0
- package/src/modules/tds/spinner/__tests__/spinner.test.ts +11 -0
- package/src/modules/tds/spinner/spinner.css +194 -0
- package/src/modules/tds/spinner/spinner.html +9 -0
- package/src/modules/tds/spinner/spinner.stories.ts +20 -0
- package/src/modules/tds/spinner/spinner.ts +15 -0
- package/src/modules/tds/styles/styles.css +24 -0
- package/src/modules/tds/summary/__tests__/summary.test.ts +135 -0
- package/src/modules/tds/summary/summary.css +135 -0
- package/src/modules/tds/summary/summary.html +69 -0
- package/src/modules/tds/summary/summary.stories.js +148 -0
- package/src/modules/tds/summary/summary.ts +95 -0
- package/src/modules/tds/tab/__tests__/tab.test.ts +25 -0
- package/src/modules/tds/tab/tab.css +3 -0
- package/src/modules/tds/tab/tab.html +5 -0
- package/src/modules/tds/tab/tab.ts +46 -0
- package/src/modules/tds/tabset/__tests__/tabset.test.ts +108 -0
- package/src/modules/tds/tabset/tabset.css +112 -0
- package/src/modules/tds/tabset/tabset.html +63 -0
- package/src/modules/tds/tabset/tabset.stories.ts +32 -0
- package/src/modules/tds/tabset/tabset.ts +232 -0
- package/src/modules/tds/themeProvider/themeProvider.css +502 -0
- package/src/modules/tds/themeProvider/themeProvider.html +3 -0
- package/src/modules/tds/themeProvider/themeProvider.ts +37 -0
- package/src/modules/tds/tile/tile.css +23 -0
- package/src/modules/tds/tile/tile.html +5 -0
- package/src/modules/tds/tile/tile.stories.js +14 -0
- package/src/modules/tds/tile/tile.ts +12 -0
- package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.html +1 -0
- package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.ts +47 -0
- package/src/modules/th/contextAdapter/__tests__/contextAdapter.test.ts +104 -0
- package/src/modules/th/contextAdapter/contextAdapter.html +1 -0
- package/src/modules/th/contextAdapter/contextAdapter.ts +49 -0
- package/src/modules/th/favoriteButton/__tests__/favoriteButton.test.ts +56 -0
- package/src/modules/th/favoriteButton/favoriteButton.css +3 -0
- package/src/modules/th/favoriteButton/favoriteButton.html +15 -0
- package/src/modules/th/favoriteButton/favoriteButton.stories.js +30 -0
- package/src/modules/th/favoriteButton/favoriteButton.ts +84 -0
- package/src/modules/th/favoriteButton/mocks/index.ts +12 -0
- package/src/modules/th/search/__fixtures__/index.ts +14 -0
- package/src/modules/th/search/__tests__/search.test.ts +233 -0
- package/src/modules/th/search/constants.ts +2 -0
- package/src/modules/th/search/mocks/index.ts +30 -0
- package/src/modules/th/search/mocks/responses.ts +54 -0
- package/src/modules/th/search/search.css +4 -0
- package/src/modules/th/search/search.html +12 -0
- package/src/modules/th/search/search.ts +172 -0
- package/src/modules/th/search/types.d.ts +29 -0
- package/src/modules/th/tbid/__tests__/__snapshots__/tbid.test.ts.snap +3 -0
- package/src/modules/th/tbid/__tests__/tbid.test.ts +242 -0
- package/src/modules/th/tbid/tbid.html +1 -0
- package/src/modules/th/tbid/tbid.stories.mdx +25 -0
- package/src/modules/th/tbid/tbid.ts +215 -0
- package/src/modules/tm/card/__tests__/card.test.ts +65 -0
- package/src/modules/tm/card/card.css +131 -0
- package/src/modules/tm/card/card.html +81 -0
- package/src/modules/tm/card/card.ts +269 -0
- package/src/modules/tm/cardBase/cardBase.css +11 -0
- package/src/modules/tm/cardGridA/cardGridA.css +11 -0
- package/src/modules/tm/cardGridA/cardGridA.html +21 -0
- package/src/modules/tm/cardGridA/cardGridA.stories.js +107 -0
- package/src/modules/tm/cardGridA/cardGridA.ts +24 -0
- package/src/modules/tm/cardGridB/cardGridB.css +88 -0
- package/src/modules/tm/cardGridB/cardGridB.html +20 -0
- package/src/modules/tm/cardGridB/cardGridB.stories.js +58 -0
- package/src/modules/tm/cardGridB/cardGridB.ts +19 -0
- package/src/modules/tm/cardGridC/cardGridC.css +24 -0
- package/src/modules/tm/cardGridC/cardGridC.html +22 -0
- package/src/modules/tm/cardGridC/cardGridC.stories.js +42 -0
- package/src/modules/tm/cardGridC/cardGridC.ts +11 -0
- package/src/modules/tm/cardGridD/cardGridD.css +17 -0
- package/src/modules/tm/cardGridD/cardGridD.html +20 -0
- package/src/modules/tm/cardGridD/cardGridD.stories.js +34 -0
- package/src/modules/tm/cardGridD/cardGridD.ts +7 -0
- package/src/modules/tm/cardNew/cardNew.css +31 -0
- package/src/modules/tm/cardNew/cardNew.html +29 -0
- package/src/modules/tm/cardNew/cardNew.ts +66 -0
- package/src/modules/tm/content/__fixtures__/index.ts +884 -0
- package/src/modules/tm/content/__tests__/content.test.ts +95 -0
- package/src/modules/tm/content/content.css +641 -0
- package/src/modules/tm/content/content.html +53 -0
- package/src/modules/tm/content/content.stories.js +14 -0
- package/src/modules/tm/content/content.ts +171 -0
- package/src/modules/tm/endCapA/__tests__/endCapA.test.ts +52 -0
- package/src/modules/tm/endCapA/endCapA.css +64 -0
- package/src/modules/tm/endCapA/endCapA.html +21 -0
- package/src/modules/tm/endCapA/endCapA.stories.js +37 -0
- package/src/modules/tm/endCapA/endCapA.ts +23 -0
- package/src/modules/tm/eventsA/eventsA.css +107 -0
- package/src/modules/tm/eventsA/eventsA.html +26 -0
- package/src/modules/tm/eventsA/eventsA.stories.js +51 -0
- package/src/modules/tm/eventsA/eventsA.ts +48 -0
- package/src/modules/tm/faqA/faqA.css +87 -0
- package/src/modules/tm/faqA/faqA.html +27 -0
- package/src/modules/tm/faqA/faqA.stories.js +25 -0
- package/src/modules/tm/faqA/faqA.ts +40 -0
- package/src/modules/tm/featureGridA/__tests__/featureGridA.test.ts +116 -0
- package/src/modules/tm/featureGridA/featureGridA.css +95 -0
- package/src/modules/tm/featureGridA/featureGridA.html +34 -0
- package/src/modules/tm/featureGridA/featureGridA.stories.js +45 -0
- package/src/modules/tm/featureGridA/featureGridA.ts +59 -0
- package/src/modules/tm/footnote/footnote.css +28 -0
- package/src/modules/tm/footnote/footnote.html +3 -0
- package/src/modules/tm/footnote/footnote.stories.js +29 -0
- package/src/modules/tm/footnote/footnote.ts +35 -0
- package/src/modules/tm/heroA/__tests__/heroA.test.ts +51 -0
- package/src/modules/tm/heroA/heroA.css +116 -0
- package/src/modules/tm/heroA/heroA.html +27 -0
- package/src/modules/tm/heroA/heroA.stories.js +49 -0
- package/src/modules/tm/heroA/heroA.ts +56 -0
- package/src/modules/tm/heroB/heroB.css +78 -0
- package/src/modules/tm/heroB/heroB.html +26 -0
- package/src/modules/tm/heroB/heroB.stories.js +44 -0
- package/src/modules/tm/heroB/heroB.ts +26 -0
- package/src/modules/tm/page/__tests__/page.test.ts +35 -0
- package/src/modules/tm/page/page.css +3 -0
- package/src/modules/tm/page/page.html +3 -0
- package/src/modules/tm/page/page.stories.js +10 -0
- package/src/modules/tm/page/page.ts +3 -0
- package/src/modules/tm/pageHeaderA/pageHeaderA.css +82 -0
- package/src/modules/tm/pageHeaderA/pageHeaderA.html +24 -0
- package/src/modules/tm/pageHeaderA/pageHeaderA.stories.js +18 -0
- package/src/modules/tm/pageHeaderA/pageHeaderA.ts +51 -0
- package/src/modules/tm/pageNavigationA/pageNavigationA.css +41 -0
- package/src/modules/tm/pageNavigationA/pageNavigationA.html +9 -0
- package/src/modules/tm/pageNavigationA/pageNavigationA.stories.js +34 -0
- package/src/modules/tm/pageNavigationA/pageNavigationA.ts +18 -0
- package/src/modules/tm/promoA/__tests__/promoA.test.ts +89 -0
- package/src/modules/tm/promoA/promoA.css +95 -0
- package/src/modules/tm/promoA/promoA.html +22 -0
- package/src/modules/tm/promoA/promoA.stories.js +38 -0
- package/src/modules/tm/promoA/promoA.ts +62 -0
- package/src/modules/tm/sectionA/sectionA.css +64 -0
- package/src/modules/tm/sectionA/sectionA.html +21 -0
- package/src/modules/tm/sectionA/sectionA.stories.js +18 -0
- package/src/modules/tm/sectionA/sectionA.ts +27 -0
- package/src/modules/tm/sectionSpacer/sectionSpacer.css +4 -0
- package/src/modules/tm/sectionSpacer/sectionSpacer.html +1 -0
- package/src/modules/tm/sectionSpacer/sectionSpacer.ts +3 -0
- package/src/modules/tm/skillsCardA/skillsCardA.css +73 -0
- package/src/modules/tm/skillsCardA/skillsCardA.html +37 -0
- package/src/modules/tm/skillsCardA/skillsCardA.ts +38 -0
- package/src/modules/tm/skillsGridA/skillsGridA.css +12 -0
- package/src/modules/tm/skillsGridA/skillsGridA.html +5 -0
- package/src/modules/tm/skillsGridA/skillsGridA.stories.ts +65 -0
- package/src/modules/tm/skillsGridA/skillsGridA.ts +3 -0
- package/src/modules/tm/statsA/statsA.css +26 -0
- package/src/modules/tm/statsA/statsA.html +10 -0
- package/src/modules/tm/statsA/statsA.stories.js +29 -0
- package/src/modules/tm/statsA/statsA.ts +20 -0
- package/src/modules/tm/textItem/textItem.css +53 -0
- package/src/modules/tm/textItem/textItem.html +18 -0
- package/src/modules/tm/textItem/textItem.ts +32 -0
- package/src/modules/tm/textItemGridA/textItemGridA.css +11 -0
- package/src/modules/tm/textItemGridA/textItemGridA.html +15 -0
- package/src/modules/tm/textItemGridA/textItemGridA.stories.js +67 -0
- package/src/modules/tm/textItemGridA/textItemGridA.ts +20 -0
- package/src/modules/tm/threeCardGrid/threeCardGrid.css +6 -0
- package/src/modules/tm/threeCardGrid/threeCardGrid.html +5 -0
- package/src/modules/tm/threeCardGrid/threeCardGrid.ts +3 -0
- package/src/modules/tm/trailblazersA/trailblazersA.css +70 -0
- package/src/modules/tm/trailblazersA/trailblazersA.html +42 -0
- package/src/modules/tm/trailblazersA/trailblazersA.stories.js +52 -0
- package/src/modules/tm/trailblazersA/trailblazersA.ts +43 -0
- package/src/modules/tm/utils/utils.ts +18 -0
- package/src/modules/tm/youtube/youtube.css +7 -0
- package/src/modules/tm/youtube/youtube.html +10 -0
- package/src/modules/tm/youtube/youtube.stories.js +15 -0
- package/src/modules/tm/youtube/youtube.ts +27 -0
- package/src/modules/ui/focusTrap/focusTrap.html +5 -0
- package/src/modules/ui/focusTrap/focusTrap.ts +104 -0
- package/src/modules/ui/focusVisible/__tests__/focusVisible.test.ts +95 -0
- package/src/modules/ui/focusVisible/focusVisible.html +3 -0
- package/src/modules/ui/focusVisible/focusVisible.ts +46 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
@import 'tds/reset';
|
|
2
|
+
|
|
3
|
+
a {
|
|
4
|
+
text-decoration: none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
img {
|
|
8
|
+
display: block;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
max-height: 475px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.hero {
|
|
14
|
+
padding: 0 var(--tds-spacing-6);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.hero--white {
|
|
18
|
+
background-color: var(--tds-color-white);
|
|
19
|
+
color: var(--tds-color-black);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.hero--dark {
|
|
23
|
+
background-color: var(--tds-color-theme-dark);
|
|
24
|
+
color: var(--tds-color-white);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hero--blue {
|
|
28
|
+
background-color: var(--tds-color-blue-ninety-five);
|
|
29
|
+
color: var(--tds-color-black);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hero--light {
|
|
33
|
+
background-color: var(--tds-color-theme-light);
|
|
34
|
+
color: var(--tds-color-black);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.hero--bright {
|
|
38
|
+
background-color: var(--tds-color-theme-bright);
|
|
39
|
+
color: var(--tds-color-black);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.content {
|
|
43
|
+
align-items: center;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
margin: auto;
|
|
47
|
+
max-width: 1280px;
|
|
48
|
+
min-height: 500px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.content-start {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
align-items: start;
|
|
55
|
+
padding-top: var(--tds-spacing-12);
|
|
56
|
+
padding-bottom: var(--tds-spacing-12);
|
|
57
|
+
padding-right: var(--tds-spacing-6);
|
|
58
|
+
width: 40%;
|
|
59
|
+
min-width: 400px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.content-end--center {
|
|
63
|
+
margin-top: var(--tds-spacing-8);
|
|
64
|
+
margin-bottom: var(--tds-spacing-8);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.content-end--bottom {
|
|
68
|
+
align-self: flex-end;
|
|
69
|
+
margin-top: var(--tds-spacing-8);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.title {
|
|
73
|
+
font-family: 'Neutraface';
|
|
74
|
+
font-size: var(--tds-font-size-6xl);
|
|
75
|
+
line-height: 1;
|
|
76
|
+
white-space: pre-line;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.subtitle {
|
|
80
|
+
line-height: 1.5;
|
|
81
|
+
margin: var(--tds-spacing-2) 0;
|
|
82
|
+
font-size: var(--tds-font-size-xl);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.cta {
|
|
86
|
+
margin-top: var(--tds-spacing-2);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media screen and (max-width: 1100px) {
|
|
90
|
+
.content {
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
padding-top: var(--tds-spacing-8);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.content-start {
|
|
96
|
+
align-items: center;
|
|
97
|
+
margin: auto;
|
|
98
|
+
max-width: 400px;
|
|
99
|
+
min-width: auto;
|
|
100
|
+
padding: var(--tds-spacing-2) 0 var(--tds-spacing-3);
|
|
101
|
+
text-align: center;
|
|
102
|
+
width: 100%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.content-end {
|
|
106
|
+
margin-left: auto;
|
|
107
|
+
margin-right: auto;
|
|
108
|
+
max-width: 450px;
|
|
109
|
+
max-height: 450px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.title {
|
|
113
|
+
white-space: normal;
|
|
114
|
+
font-size: var(--tds-font-size-5xl);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class={heroClassName}>
|
|
3
|
+
<div class="content">
|
|
4
|
+
<div class="content-start">
|
|
5
|
+
<h1 class="title">{title}</h1>
|
|
6
|
+
<p if:true={subtitle} class="subtitle">{subtitle}</p>
|
|
7
|
+
<slot name="cta">
|
|
8
|
+
<tds-button-link
|
|
9
|
+
class="cta"
|
|
10
|
+
size="large"
|
|
11
|
+
href={ctaHref}
|
|
12
|
+
target={ctaTarget}
|
|
13
|
+
if:true={ctaHref}
|
|
14
|
+
variant={buttonVariant}
|
|
15
|
+
onclick={handleCtaClick}
|
|
16
|
+
>{ctaLabel}</tds-button-link
|
|
17
|
+
>
|
|
18
|
+
</slot>
|
|
19
|
+
</div>
|
|
20
|
+
<div if:true={imgSrc} class={contentEndClassName}>
|
|
21
|
+
<picture>
|
|
22
|
+
<img alt="" src={imgSrc} loading="lazy" decoding="async" />
|
|
23
|
+
</picture>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'tm/tm-hero-a',
|
|
5
|
+
parameters: {
|
|
6
|
+
chromatic: {
|
|
7
|
+
viewports: [400, 1100, 1199]
|
|
8
|
+
},
|
|
9
|
+
modules: ['/modules/tm-hero-a.js']
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const Base = () => html`
|
|
14
|
+
<tm-hero-a
|
|
15
|
+
cta-href="/"
|
|
16
|
+
cta-label="CTA"
|
|
17
|
+
img-src="/images/hero-a-architect.png"
|
|
18
|
+
img-align="bottom"
|
|
19
|
+
subtitle="Connect to your customers in a whole new way with the world's #1 CRM."
|
|
20
|
+
title="Hello
|
|
21
|
+
Architects"
|
|
22
|
+
></tm-hero-a>
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export const Light = () => html`
|
|
26
|
+
<tm-hero-a
|
|
27
|
+
background="light"
|
|
28
|
+
cta-href="/"
|
|
29
|
+
cta-label="CTA"
|
|
30
|
+
img-src="/images/hero-a-architect.png"
|
|
31
|
+
img-align="bottom"
|
|
32
|
+
subtitle="Connect to your customers in a whole new way with the world's #1 CRM."
|
|
33
|
+
title="Hello
|
|
34
|
+
Architects"
|
|
35
|
+
></tm-hero-a>
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export const Dark = () => html`
|
|
39
|
+
<tm-hero-a
|
|
40
|
+
background="dark"
|
|
41
|
+
cta-href="/"
|
|
42
|
+
cta-label="CTA"
|
|
43
|
+
img-src="/images/hero-a-architect.png"
|
|
44
|
+
img-align="bottom"
|
|
45
|
+
subtitle="Connect to your customers in a whole new way with the world's #1 CRM."
|
|
46
|
+
title="Hello
|
|
47
|
+
Architects"
|
|
48
|
+
></tm-hero-a>
|
|
49
|
+
`;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { api, LightningElement } from 'lwc';
|
|
2
|
+
import { track } from 'shared/track';
|
|
3
|
+
|
|
4
|
+
const widths = [820, 640, 320, 75];
|
|
5
|
+
|
|
6
|
+
export default class extends LightningElement {
|
|
7
|
+
@api background: 'white' | 'dark' | 'light' = 'white';
|
|
8
|
+
@api ctaHref: string | undefined;
|
|
9
|
+
@api ctaLabel: string | undefined;
|
|
10
|
+
@api ctaTarget: string | undefined;
|
|
11
|
+
@api imgSrc: string | undefined;
|
|
12
|
+
@api imgAlign: 'bottom' | 'center' = 'center';
|
|
13
|
+
@api subtitle: string | undefined;
|
|
14
|
+
@api title: string = '';
|
|
15
|
+
|
|
16
|
+
private get buttonVariant() {
|
|
17
|
+
return this.background === 'dark' ? 'neutral' : 'brand';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
private get heroClassName() {
|
|
21
|
+
return `hero hero--${this.background}`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
private get contentEndClassName() {
|
|
25
|
+
return `content-end content-end--${this.imgAlign}`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private handleCtaClick() {
|
|
29
|
+
track(this.template.host, 'cta_clicked', {
|
|
30
|
+
ctaType: 'primary',
|
|
31
|
+
label: this.ctaLabel
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private get imgSrcSetWebP() {
|
|
36
|
+
if (!this.imgSrc) {
|
|
37
|
+
return '';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if(this.isRemoteImage){
|
|
41
|
+
return this.imgSrc;
|
|
42
|
+
} else {
|
|
43
|
+
const imgType = this.imgSrc.split('.').pop();
|
|
44
|
+
const imgName = this.imgSrc.replace(`.${imgType || ''}`, '');
|
|
45
|
+
let srcSet: string[] = [];
|
|
46
|
+
widths.forEach((width) => {
|
|
47
|
+
srcSet.push(`${imgName}-${width}w.webp ${width}w`);
|
|
48
|
+
});
|
|
49
|
+
return srcSet.join(',');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private get isRemoteImage() {
|
|
54
|
+
return /^(https?\:\/\/|\/\/)/i.test(this.imgSrc || '');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@import 'tds/reset';
|
|
2
|
+
|
|
3
|
+
a {
|
|
4
|
+
text-decoration: none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
img {
|
|
8
|
+
display: block;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
max-height: 100px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.hero--white {
|
|
14
|
+
background-color: var(--tds-color-white);
|
|
15
|
+
color: var(--tds-color-black);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.hero--dark {
|
|
19
|
+
background-color: var(--tds-color-theme-dark);
|
|
20
|
+
color: var(--tds-color-white);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.hero--blue {
|
|
24
|
+
background-color: var(--tds-color-blue-ninety-five);
|
|
25
|
+
color: var(--tds-color-black);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hero--light {
|
|
29
|
+
background-color: var(--tds-color-theme-light);
|
|
30
|
+
color: var(--tds-color-black);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.hero--bright {
|
|
34
|
+
background-color: var(--tds-color-theme-bright);
|
|
35
|
+
color: var(--tds-color-black);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.content {
|
|
39
|
+
align-items: center;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
padding: var(--tds-spacing-6) 0;
|
|
44
|
+
text-align: center;
|
|
45
|
+
min-height: 448px;
|
|
46
|
+
max-width: 600px;
|
|
47
|
+
margin: auto;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.content > * + * {
|
|
51
|
+
margin-top: var(--tds-spacing-4);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.title {
|
|
55
|
+
font-family: 'Neutraface';
|
|
56
|
+
font-size: var(--tds-font-size-6xl);
|
|
57
|
+
line-height: 1;
|
|
58
|
+
white-space: pre-line;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.subtitle {
|
|
62
|
+
line-height: 1.5;
|
|
63
|
+
margin: var(--tds-spacing-2) 0;
|
|
64
|
+
font-size: var(--tds-font-size-xl);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.cta {
|
|
68
|
+
margin-top: var(--tds-spacing-2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media screen and (max-width: 1280px) {
|
|
72
|
+
.hero {
|
|
73
|
+
padding: 0 var(--tds-spacing-4);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media screen and (max-width: 768px) {
|
|
78
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class={heroClassName} style={backgroundStyle}>
|
|
3
|
+
<div class="content">
|
|
4
|
+
<img
|
|
5
|
+
alt=""
|
|
6
|
+
if:true={imgSrc}
|
|
7
|
+
src={imgSrc}
|
|
8
|
+
loading="lazy"
|
|
9
|
+
decoding="async"
|
|
10
|
+
/>
|
|
11
|
+
<h1 class="title">{title}</h1>
|
|
12
|
+
<p class="subtitle" if:true={subtitle}>{subtitle}</p>
|
|
13
|
+
<slot name="cta">
|
|
14
|
+
<tds-button-link
|
|
15
|
+
class="cta"
|
|
16
|
+
size="large"
|
|
17
|
+
href={ctaHref}
|
|
18
|
+
target={ctaTarget}
|
|
19
|
+
if:true={ctaHref}
|
|
20
|
+
variant={buttonVariant}
|
|
21
|
+
>{ctaLabel}</tds-button-link
|
|
22
|
+
>
|
|
23
|
+
</slot>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'tm/tm-hero-b',
|
|
5
|
+
parameters: {
|
|
6
|
+
chromatic: {
|
|
7
|
+
viewports: [400, 1199]
|
|
8
|
+
},
|
|
9
|
+
modules: ['/modules/tm-hero-b.js']
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const Base = () => html`
|
|
14
|
+
<tm-hero-b
|
|
15
|
+
cta-href="/"
|
|
16
|
+
cta-label="CTA"
|
|
17
|
+
img-src="/images/hero-b.png"
|
|
18
|
+
subtitle="Connect to your customers in a whole new way with the world's #1 CRM."
|
|
19
|
+
title="Hello Architects"
|
|
20
|
+
></tm-hero-a>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export const Light = () => html`
|
|
24
|
+
<tm-hero-b
|
|
25
|
+
background="light"
|
|
26
|
+
cta-href="/"
|
|
27
|
+
cta-label="CTA"
|
|
28
|
+
img-src="/images/hero-b.png"
|
|
29
|
+
subtitle="Connect to your customers in a whole new way with the world's #1 CRM."
|
|
30
|
+
title="Hello Architects"
|
|
31
|
+
></tm-hero-a>
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const Dark = () => html`
|
|
35
|
+
<tm-hero-b
|
|
36
|
+
background="dark"
|
|
37
|
+
background-src="/images/architect-bg.svg"
|
|
38
|
+
cta-href="/"
|
|
39
|
+
cta-label="CTA"
|
|
40
|
+
img-src="/images/hero-b.png"
|
|
41
|
+
subtitle="Connect to your customers in a whole new way with the world's #1 CRM."
|
|
42
|
+
title="Hello Architects"
|
|
43
|
+
></tm-hero-a>
|
|
44
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { api, LightningElement } from 'lwc';
|
|
2
|
+
|
|
3
|
+
export default class extends LightningElement {
|
|
4
|
+
@api background: 'white' | 'dark' | 'light' = 'white';
|
|
5
|
+
@api backgroundSrc: string | undefined;
|
|
6
|
+
@api ctaHref: string | undefined;
|
|
7
|
+
@api ctaLabel: string | undefined;
|
|
8
|
+
@api ctaTarget: string | undefined;
|
|
9
|
+
@api imgSrc: string | undefined;
|
|
10
|
+
@api subtitle: string | undefined;
|
|
11
|
+
@api title: string = '';
|
|
12
|
+
|
|
13
|
+
private get buttonVariant() {
|
|
14
|
+
return this.background === 'dark' ? 'neutral' : 'brand';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
private get heroClassName() {
|
|
18
|
+
return `hero hero--${this.background}`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private get backgroundStyle() {
|
|
22
|
+
return this.backgroundSrc
|
|
23
|
+
? `background-image: url(${this.backgroundSrc})`
|
|
24
|
+
: '';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { nextTick } from 'shared/testutils';
|
|
2
|
+
|
|
3
|
+
import Page from '../page';
|
|
4
|
+
|
|
5
|
+
customElements.define('tm-page', Page.CustomElementConstructor);
|
|
6
|
+
|
|
7
|
+
describe('tm-page', () => {
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
while (document.body.firstChild) {
|
|
10
|
+
document.body.removeChild(document.body.firstChild);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// Skip this test as LWC in test mode doesn't support child nodes for light DOM components
|
|
15
|
+
// The page component uses slots for content
|
|
16
|
+
it.skip('provides a default slot', async () => {
|
|
17
|
+
document.body.innerHTML = `
|
|
18
|
+
<tm-page>Hello</tm-page>
|
|
19
|
+
`;
|
|
20
|
+
await nextTick();
|
|
21
|
+
expect(
|
|
22
|
+
document
|
|
23
|
+
.querySelector('tm-page')!
|
|
24
|
+
.shadowRoot!.querySelector('slot')!
|
|
25
|
+
.assignedNodes()[0].textContent
|
|
26
|
+
).toEqual('Hello');
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('renders the component', () => {
|
|
30
|
+
document.body.innerHTML = '<tm-page></tm-page>';
|
|
31
|
+
const element = document.querySelector('tm-page')!;
|
|
32
|
+
expect(element).toBeTruthy();
|
|
33
|
+
expect(element.shadowRoot).toBeTruthy();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@import 'tds/reset';
|
|
2
|
+
|
|
3
|
+
.root {
|
|
4
|
+
align-items: center;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
padding: var(--tds-spacing-12) 0;
|
|
8
|
+
padding-left: 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media screen and (max-width: 800px) {
|
|
12
|
+
.root {
|
|
13
|
+
padding-top: 1.25rem;
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pretitle {
|
|
19
|
+
color: var(--tds-colors-meteorite);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h1 {
|
|
23
|
+
font-size: var(--tds-font-size-4xl);
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.actions {
|
|
29
|
+
align-items: center;
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-auto-flow: column;
|
|
32
|
+
grid-column-gap: var(--tds-spacing-2);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media screen and (max-width: 800px) {
|
|
36
|
+
.root,
|
|
37
|
+
.actions {
|
|
38
|
+
padding-top: 1.25rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.actions {
|
|
42
|
+
width: 120px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.actions a,
|
|
47
|
+
.actions a:visited {
|
|
48
|
+
padding-right: 1rem;
|
|
49
|
+
color: var(--tds-color-black);
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.actions a:hover {
|
|
54
|
+
color: var(--tds-color-brand);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.actions img {
|
|
58
|
+
width: 18px;
|
|
59
|
+
margin-right: 1rem;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.actions svg {
|
|
63
|
+
height: 1rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.actions svg.fill {
|
|
67
|
+
fill: var(--tds-color-meteorite);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.actions svg.fill:hover {
|
|
71
|
+
fill: var(--tds-color-brand);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.actions svg.stroke {
|
|
75
|
+
stroke: var(--tds-color-meteorite);
|
|
76
|
+
fill: var(--tds-color-meteorite);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.actions svg.stroke:hover {
|
|
80
|
+
stroke: var(--tds-color-brand);
|
|
81
|
+
fill: var(--tds-color-brand);
|
|
82
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="root">
|
|
3
|
+
<div class="heading">
|
|
4
|
+
<span class="pretitle" if:true={pretitle}>{pretitle}</span>
|
|
5
|
+
<h1>{title}</h1>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="actions">
|
|
8
|
+
<!--
|
|
9
|
+
<template if:false={isJpTranslationBlank}>
|
|
10
|
+
<a
|
|
11
|
+
href={jptranslation}
|
|
12
|
+
class="jp-translation"
|
|
13
|
+
target="_blank"
|
|
14
|
+
rel="noopener noreferrer"
|
|
15
|
+
aria-label="日本語版はここからダウンロード"
|
|
16
|
+
>
|
|
17
|
+
<img src="/assets/images/icons/globe.png" />
|
|
18
|
+
日本語版はここからダウンロード</a>
|
|
19
|
+
</template>
|
|
20
|
+
-->
|
|
21
|
+
<sa-social-share title={title} url={location}></sa-social-share>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'tm/tm-page-header-a',
|
|
5
|
+
parameters: {
|
|
6
|
+
modules: ['/modules/tm-page-header-a.js']
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Base = () => html`
|
|
11
|
+
<tm-page-header-a
|
|
12
|
+
pretitle="Reference Architecture"
|
|
13
|
+
title="Content Lifecycle Management and Modeling"
|
|
14
|
+
>
|
|
15
|
+
<tm-cta title="Download" variant="brand"></tm-cta>
|
|
16
|
+
<tm-cta title="Share"></tm-cta>
|
|
17
|
+
</tm-page-header-a>
|
|
18
|
+
`;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { api } from 'lwc';
|
|
2
|
+
import { ChildrenElement } from 'shared/children';
|
|
3
|
+
|
|
4
|
+
export type CTA = {
|
|
5
|
+
href: string;
|
|
6
|
+
target?: string;
|
|
7
|
+
title: string;
|
|
8
|
+
variant: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default class extends ChildrenElement<CTA> {
|
|
12
|
+
@api pretitle: string | null = null;
|
|
13
|
+
@api title: string = '';
|
|
14
|
+
@api url: string = '';
|
|
15
|
+
@api jptranslation: string | null = null;
|
|
16
|
+
|
|
17
|
+
childTagName = 'TM-CTA';
|
|
18
|
+
|
|
19
|
+
location: string=window.location.href;
|
|
20
|
+
|
|
21
|
+
extractor = (element: Element) => {
|
|
22
|
+
return {
|
|
23
|
+
href: element.getAttribute('href')!,
|
|
24
|
+
target: element.getAttribute('target') || undefined,
|
|
25
|
+
title: element.getAttribute('title')!,
|
|
26
|
+
variant: element.getAttribute('variant') || 'neutral'
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
private get shareTwitter() {
|
|
31
|
+
return decodeURI(
|
|
32
|
+
`https://twitter.com/intent/tweet/?text=${this.title}&url=${window.location.href}&via=SalesforceArchs`
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
private get shareLinkedIn() {
|
|
37
|
+
return `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURI(
|
|
38
|
+
window.location.href
|
|
39
|
+
)}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private get shareFacebook() {
|
|
43
|
+
return `https://www.facebook.com/sharer/sharer.php?u=${encodeURI(
|
|
44
|
+
window.location.href
|
|
45
|
+
)}`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
get isJpTranslationBlank() {
|
|
49
|
+
return !this.jptranslation || this.jptranslation.trim() === '';
|
|
50
|
+
}
|
|
51
|
+
}
|