@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,38 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'tds/tds-button-icon',
|
|
5
|
+
parameters: {
|
|
6
|
+
modules: ['/modules/tds-button-icon.js', '/modules/tds-icon.js']
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Base = () => html`
|
|
11
|
+
<tds-button-icon aria-label="edit">
|
|
12
|
+
<tds-icon symbol="edit"></tds-icon>
|
|
13
|
+
</tds-button-icon>
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
export const Small = () => html`
|
|
17
|
+
<tds-button-icon size="small" aria-label="edit">
|
|
18
|
+
<tds-icon size="small" symbol="edit"></tds-icon>
|
|
19
|
+
</tds-button-icon>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const Large = () => html`
|
|
23
|
+
<tds-button-icon size="large" aria-label="edit">
|
|
24
|
+
<tds-icon size="large" symbol="edit"></tds-icon>
|
|
25
|
+
</tds-button-icon>
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export const Disabled = () => html`
|
|
29
|
+
<tds-button-icon aria-label="edit" disabled="true">
|
|
30
|
+
<tds-icon symbol="edit"></tds-icon>
|
|
31
|
+
</tds-button-icon>
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const Bare = () => html`
|
|
35
|
+
<tds-button-icon aria-label="edit" variant="bare">
|
|
36
|
+
<tds-icon symbol="edit"></tds-icon>
|
|
37
|
+
</tds-button-icon>
|
|
38
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'tds/buttonStyles';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'tds/tds-button-icon-link',
|
|
5
|
+
parameters: {
|
|
6
|
+
modules: ['/modules/tds-button-icon-link.js']
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Base = () => html`
|
|
11
|
+
<tds-button-icon-link aria-label="help" href="#">
|
|
12
|
+
<tds-icon symbol="edit"></tds-icon>
|
|
13
|
+
</tds-button-icon-link>
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
export const Small = () => html`
|
|
17
|
+
<tds-button-icon-link size="small" aria-label="edit" href="#">
|
|
18
|
+
<tds-icon size="small" symbol="edit"></tds-icon>
|
|
19
|
+
</tds-button-icon-link>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const Large = () => html`
|
|
23
|
+
<tds-button-icon size="large" aria-label="edit" href="#">
|
|
24
|
+
<tds-icon size="large" symbol="edit"></tds-icon>
|
|
25
|
+
</tds-button-icon-link>
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export const Bare = () => html`
|
|
29
|
+
<tds-button-icon-link aria-label="edit" href="#" variant="bare">
|
|
30
|
+
<tds-icon ssymbol="edit"></tds-icon>
|
|
31
|
+
</tds-button-icon-link>
|
|
32
|
+
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { api } from 'lwc';
|
|
2
|
+
import Button, { Variant } from 'tds/button';
|
|
3
|
+
|
|
4
|
+
export default class extends Button {
|
|
5
|
+
@api href: string | null = null;
|
|
6
|
+
@api rel: string | null = null;
|
|
7
|
+
@api target: '_self' | '_blank' | '_parent' | '_top' | null = null;
|
|
8
|
+
@api variant: Variant = 'border-filled';
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { html, renderIntoBody } from 'shared/testutils';
|
|
2
|
+
|
|
3
|
+
import ButtonLink from '../buttonLink';
|
|
4
|
+
|
|
5
|
+
customElements.define('tds-button-link', ButtonLink.CustomElementConstructor);
|
|
6
|
+
|
|
7
|
+
describe('tds-button-link', () => {
|
|
8
|
+
it('reflects attributes', async () => {
|
|
9
|
+
let element = renderIntoBody(
|
|
10
|
+
html` <tds-button-link aria-label="Hello"></tds-button-link> `
|
|
11
|
+
);
|
|
12
|
+
expect(element.shadowRoot!.querySelector('a')).toHaveAttribute(
|
|
13
|
+
'aria-label',
|
|
14
|
+
'Hello'
|
|
15
|
+
);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'tds/buttonStyles';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a
|
|
3
|
+
aria-label={ariaLabel}
|
|
4
|
+
aria-live={ariaLive}
|
|
5
|
+
class={className}
|
|
6
|
+
disabled={disabled}
|
|
7
|
+
href={href}
|
|
8
|
+
rel={rel}
|
|
9
|
+
target={target}
|
|
10
|
+
>
|
|
11
|
+
<tds-icon
|
|
12
|
+
if:true={hasSpinner}
|
|
13
|
+
symbol="spinner"
|
|
14
|
+
class="spinner"
|
|
15
|
+
size="small"
|
|
16
|
+
></tds-icon>
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</a>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'tds/tds-button-link',
|
|
5
|
+
parameters: {
|
|
6
|
+
modules: ['/modules/tds-button-link.js']
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Base = () => html`
|
|
11
|
+
<tds-button-link href="/">Link</tds-button-link>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export const Small = () => html`
|
|
15
|
+
<tds-button-link size="small" href="/">Link</tds-button-link>
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const Large = () => html`
|
|
19
|
+
<tds-button-link size="large" href="/">Link</tds-button-link>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const Disabled = () => html`
|
|
23
|
+
<tds-button-link href="/" disabled>Link</tds-button-link>
|
|
24
|
+
`;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
@import 'tds/reset';
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
--dark-1: 5%;
|
|
5
|
+
--dark-2: 15%;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
color: var(--tds-color-meteorite);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.button {
|
|
11
|
+
align-items: center;
|
|
12
|
+
-moz-appearance: none;
|
|
13
|
+
-webkit-appearance: none;
|
|
14
|
+
border: 1px solid transparent;
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
border-radius: var(--tds-spacing-1);
|
|
17
|
+
color: inherit;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
display: flex;
|
|
20
|
+
width: 100%;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
line-height: 1.25;
|
|
24
|
+
font-size: var(--tds-font-size-sm);
|
|
25
|
+
padding: calc(var(--tds-spacing-3) * 0.833333) var(--tds-spacing-4);
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
user-select: none;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.button--variant {
|
|
32
|
+
background-color: hsl(
|
|
33
|
+
var(--color-bg-h),
|
|
34
|
+
var(--color-bg-s),
|
|
35
|
+
var(--color-bg-l)
|
|
36
|
+
);
|
|
37
|
+
border: 1px solid
|
|
38
|
+
hsl(var(--color-bg-h), var(--color-bg-s), var(--color-bg-l));
|
|
39
|
+
box-shadow: 0 1px 0
|
|
40
|
+
hsl(
|
|
41
|
+
var(--color-bg-h),
|
|
42
|
+
var(--color-bg-s),
|
|
43
|
+
calc(var(--color-bg-l) - var(--dark-2))
|
|
44
|
+
);
|
|
45
|
+
color: var(--color);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.button--variant:hover:not(.button--disabled),
|
|
49
|
+
.button--variant:focus:not(.button--disabled),
|
|
50
|
+
.button--variant:active:not(.button--disabled) {
|
|
51
|
+
color: var(--color);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.button--variant:hover:not(.button--disabled),
|
|
55
|
+
.button--variant:focus:not(.button--disabled) {
|
|
56
|
+
background-color: hsl(
|
|
57
|
+
var(--color-bg-h),
|
|
58
|
+
var(--color-bg-s),
|
|
59
|
+
calc(var(--color-bg-l) - var(--dark-1))
|
|
60
|
+
);
|
|
61
|
+
border-color: hsl(
|
|
62
|
+
var(--color-bg-h),
|
|
63
|
+
var(--color-bg-s),
|
|
64
|
+
calc(var(--color-bg-l) - var(--dark-1))
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.button--variant:active:not(.button--disabled) {
|
|
69
|
+
background-color: hsl(
|
|
70
|
+
var(--color-bg-h),
|
|
71
|
+
var(--color-bg-s),
|
|
72
|
+
calc(var(--color-bg-l) - var(--dark-2))
|
|
73
|
+
);
|
|
74
|
+
border-color: hsl(
|
|
75
|
+
var(--color-bg-h),
|
|
76
|
+
var(--color-bg-s),
|
|
77
|
+
calc(var(--color-bg-l) - var(--dark-2))
|
|
78
|
+
);
|
|
79
|
+
box-shadow: 0 1px 0
|
|
80
|
+
hsl(
|
|
81
|
+
var(--color-bg-h),
|
|
82
|
+
var(--color-bg-s),
|
|
83
|
+
calc(var(--color-bg-l) - var(--dark-2))
|
|
84
|
+
),
|
|
85
|
+
0 0 4px hsl(var(--color-bg-h), var(--color-bg-s), var(--color-bg-l));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.button--neutral {
|
|
89
|
+
color: var(--tds-color-brand);
|
|
90
|
+
background-color: var(--tds-color-white);
|
|
91
|
+
box-shadow: 0px 0px 0px 1px hsla(0, 0%, 0%, 0.05),
|
|
92
|
+
0 2px 0 hsla(0, 0%, 0%, 0.05);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.button--neutral:hover:not(.button--disabled),
|
|
96
|
+
.button--neutral:focus:not(.button--disabled) {
|
|
97
|
+
background-color: var(--tds-color-sand);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.button--neutral:active:not(.button--disabled) {
|
|
101
|
+
background-color: var(--tds-color-fog);
|
|
102
|
+
color: var(--tds-color-meteorite);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.button--bare:hover:not(.button--disabled),
|
|
106
|
+
.button--bare:focus:not(.button--disabled) {
|
|
107
|
+
background-color: var(--tds-color-sand);
|
|
108
|
+
color: hsl(
|
|
109
|
+
var(--tds-color-meteorite-h),
|
|
110
|
+
var(--tds-color-meteorite-s),
|
|
111
|
+
calc(var(--tds-color-meteorite-l) - var(--dark-1))
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.button--border-filled {
|
|
116
|
+
background-color: var(--tds-color-white);
|
|
117
|
+
border-color: var(--tds-color-fog);
|
|
118
|
+
box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.button--border-filled:hover:not(.button--disabled),
|
|
122
|
+
.button--border-filled:focus:not(.button--disabled) {
|
|
123
|
+
background-color: var(--tds-color-sand);
|
|
124
|
+
color: hsl(
|
|
125
|
+
var(--tds-color-meteorite-h),
|
|
126
|
+
var(--tds-color-meteorite-s),
|
|
127
|
+
calc(var(--tds-color-meteorite-l) - var(--dark-1))
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.button--bare:active:not(.button--disabled),
|
|
132
|
+
.button--border-filled:active:not(.button--disabled) {
|
|
133
|
+
background-color: var(--tds-color-fog);
|
|
134
|
+
color: hsl(
|
|
135
|
+
var(--tds-color-meteorite-h),
|
|
136
|
+
var(--tds-color-meteorite-s),
|
|
137
|
+
calc(var(--tds-color-meteorite-l) - var(--dark-1))
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.button--brand {
|
|
142
|
+
--color: var(--tds-color-white);
|
|
143
|
+
--color-bg-h: var(--tds-color-brand-h);
|
|
144
|
+
--color-bg-s: var(--tds-color-brand-s);
|
|
145
|
+
--color-bg-l: var(--tds-color-brand-l);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.button--success {
|
|
149
|
+
--color: var(--tds-color-white);
|
|
150
|
+
--color-bg-h: var(--tds-color-success-h);
|
|
151
|
+
--color-bg-s: var(--tds-color-success-s);
|
|
152
|
+
--color-bg-l: var(--tds-color-success-l);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.button--destructive {
|
|
156
|
+
--color: var(--tds-color-white);
|
|
157
|
+
--color-bg-h: var(--tds-color-destructive-h);
|
|
158
|
+
--color-bg-s: var(--tds-color-destructive-s);
|
|
159
|
+
--color-bg-l: var(--tds-color-destructive-l);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.button--destructive-inverse {
|
|
163
|
+
color: var(--tds-color-destructive);
|
|
164
|
+
background-color: var(--tds-color-white);
|
|
165
|
+
border-color: transparent;
|
|
166
|
+
box-shadow: 0px 0px 0px 1px hsla(0, 0%, 0%, 0.05),
|
|
167
|
+
0 2px 0 hsla(0, 0%, 0%, 0.05);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.button--destructive-inverse:hover:not(.button--disabled),
|
|
171
|
+
.button--destructive-inverse:focus:not(.button--disabled) {
|
|
172
|
+
color: var(--tds-color-destructive);
|
|
173
|
+
background-color: var(--tds-color-sand);
|
|
174
|
+
border-color: transparent;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.button--destructive-inverse:active:not(.button--disabled) {
|
|
178
|
+
color: var(--tds-color-meteorite);
|
|
179
|
+
background-color: var(--tds-color-fog);
|
|
180
|
+
border-color: transparent;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.button--disabled {
|
|
184
|
+
background: var(--tds-color-fog);
|
|
185
|
+
border-color: var(--tds-color-fog);
|
|
186
|
+
box-shadow: 0 1px 0 var(--tds-color-fog);
|
|
187
|
+
color: var(--tds-color-granite);
|
|
188
|
+
cursor: not-allowed;
|
|
189
|
+
pointer-events: none;
|
|
190
|
+
outline: none;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.button--small {
|
|
194
|
+
font-size: var(--tds-font-size-sm);
|
|
195
|
+
padding: var(--tds-spacing-2) var(--tds-spacing-4);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.button--large {
|
|
199
|
+
font-size: var(--tds-font-size-md);
|
|
200
|
+
padding: var(--tds-spacing-3) var(--tds-spacing-5);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.button[data-icon-size] {
|
|
204
|
+
padding: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.button[data-icon-size='small'] {
|
|
208
|
+
padding: calc(var(--tds-spacing-2) + 0.75px);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.button[data-icon-size='medium'] {
|
|
212
|
+
padding: calc(var(--tds-spacing-2) + 1px);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.button[data-icon-size='large'] {
|
|
216
|
+
padding: calc(var(--tds-spacing-2) + 2px);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.spinner {
|
|
220
|
+
margin-right: var(--tds-spacing-2);
|
|
221
|
+
margin-left: calc(var(--tds-spacing-1) * -1);
|
|
222
|
+
animation: rotation 2s infinite linear;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@keyframes rotation {
|
|
226
|
+
from {
|
|
227
|
+
transform: rotate(0deg);
|
|
228
|
+
}
|
|
229
|
+
to {
|
|
230
|
+
transform: rotate(359deg);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { html, renderIntoBody } from '../../../shared/testutils';
|
|
2
|
+
|
|
3
|
+
import ChildSummary from '../childSummary';
|
|
4
|
+
|
|
5
|
+
customElements.define(
|
|
6
|
+
'tds-child-summary',
|
|
7
|
+
ChildSummary.CustomElementConstructor
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
let location = {
|
|
11
|
+
href: '/'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
Object.defineProperty(window, 'location', {
|
|
15
|
+
get: () => location
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
describe('tds-child-summary', () => {
|
|
19
|
+
describe('titleMode', () => {
|
|
20
|
+
describe('anchor', () => {
|
|
21
|
+
it('renders the correct element', () => {
|
|
22
|
+
let element = renderIntoBody(html`
|
|
23
|
+
<tds-child-summary
|
|
24
|
+
path="/"
|
|
25
|
+
title="Hello"
|
|
26
|
+
title-mode="anchor"
|
|
27
|
+
></tds-child-summary>
|
|
28
|
+
`);
|
|
29
|
+
expect(element.shadowRoot.querySelector('.title').tagName).toBe(
|
|
30
|
+
'A'
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
it('renders a button if no path is specified', () => {
|
|
34
|
+
let element = renderIntoBody(
|
|
35
|
+
html`
|
|
36
|
+
<tds-child-summary title="Hello"></tds-child-summary>
|
|
37
|
+
`
|
|
38
|
+
);
|
|
39
|
+
expect(element.shadowRoot.querySelector('.title').tagName).toBe(
|
|
40
|
+
'BUTTON'
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
it('sets the window location when the item is clicked', () => {
|
|
44
|
+
let element = renderIntoBody(
|
|
45
|
+
html` <tds-child-summary path="/test"></tds-child-summary> `
|
|
46
|
+
);
|
|
47
|
+
element.shadowRoot
|
|
48
|
+
.querySelector('a')
|
|
49
|
+
.dispatchEvent(new MouseEvent('click'));
|
|
50
|
+
expect(window.location.href).toEqual('/');
|
|
51
|
+
element.shadowRoot
|
|
52
|
+
.querySelector('.item')
|
|
53
|
+
.dispatchEvent(new MouseEvent('click'));
|
|
54
|
+
expect(window.location.href).toEqual('/test');
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe('button', () => {
|
|
58
|
+
it('renders the correct element', () => {
|
|
59
|
+
let element = renderIntoBody(
|
|
60
|
+
html`
|
|
61
|
+
<tds-child-summary
|
|
62
|
+
title="Hello"
|
|
63
|
+
title-mode="button"
|
|
64
|
+
></tds-child-summary>
|
|
65
|
+
`
|
|
66
|
+
);
|
|
67
|
+
expect(element.shadowRoot.querySelector('.title').tagName).toBe(
|
|
68
|
+
'BUTTON'
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
it('dispatches a navigate event', () => {
|
|
72
|
+
let handler = jest.fn();
|
|
73
|
+
let element = renderIntoBody(
|
|
74
|
+
html`
|
|
75
|
+
<tds-child-summary
|
|
76
|
+
title-mode="button"
|
|
77
|
+
></tds-child-summary>
|
|
78
|
+
`
|
|
79
|
+
);
|
|
80
|
+
element.addEventListener('navigate', handler);
|
|
81
|
+
element.shadowRoot
|
|
82
|
+
.querySelector('button')
|
|
83
|
+
.dispatchEvent(new MouseEvent('click'));
|
|
84
|
+
expect(handler).toHaveBeenCalled();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
it('text', () => {
|
|
88
|
+
let element = renderIntoBody(html`
|
|
89
|
+
<tds-child-summary
|
|
90
|
+
title="Hello"
|
|
91
|
+
title-mode="text"
|
|
92
|
+
></tds-child-summary>
|
|
93
|
+
`);
|
|
94
|
+
expect(element.shadowRoot.querySelector('.title').tagName).toBe(
|
|
95
|
+
'SPAN'
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@import 'tds/reset';
|
|
2
|
+
|
|
3
|
+
a,
|
|
4
|
+
a:hover,
|
|
5
|
+
a:focus,
|
|
6
|
+
a:active {
|
|
7
|
+
text-decoration: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.item {
|
|
11
|
+
align-items: center;
|
|
12
|
+
background-color: var(--tds-color-white);
|
|
13
|
+
display: flex;
|
|
14
|
+
padding: var(--tds-spacing-6);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.body {
|
|
18
|
+
flex: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.title {
|
|
22
|
+
appearance: none;
|
|
23
|
+
-webkit-appearance: none;
|
|
24
|
+
background: none;
|
|
25
|
+
border: none;
|
|
26
|
+
color: var(--tds-color-brand);
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-size: var(--tds-font-size-md);
|
|
29
|
+
text-align: left;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.subtitle {
|
|
33
|
+
color: var(--tds-color-meteorite);
|
|
34
|
+
font-size: var(--tds-font-size-xs);
|
|
35
|
+
margin-top: var(--tds-spacing-1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.action {
|
|
39
|
+
margin-left: var(--tds-spacing-4);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.icon {
|
|
43
|
+
background-color: var(--tds-color-fog);
|
|
44
|
+
border-radius: var(--tds-radius-full);
|
|
45
|
+
color: var(--tds-color-meteorite);
|
|
46
|
+
transition: transform 0.15s ease-in-out;
|
|
47
|
+
padding: var(--tds-spacing-2);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.icon--complete {
|
|
51
|
+
background-color: var(--tds-color-evergreen);
|
|
52
|
+
color: var(--tds-color-white);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.item:hover {
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.item:hover .title,
|
|
60
|
+
.item:focus .title,
|
|
61
|
+
.item:active .title {
|
|
62
|
+
text-decoration: underline;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.item:hover .subtitle,
|
|
66
|
+
.item:focus .subtitle,
|
|
67
|
+
.item:active .subtitle {
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.item:hover .icon,
|
|
72
|
+
.item:focus .icon {
|
|
73
|
+
transform: translateX(10px);
|
|
74
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="item" onclick={onItemClick}>
|
|
3
|
+
<div class="body">
|
|
4
|
+
<!-- TITLE-->
|
|
5
|
+
<a class="title" if:true={titleIsAnchor} href={path}>{title}</a>
|
|
6
|
+
<button
|
|
7
|
+
class="title"
|
|
8
|
+
if:true={titleIsButton}
|
|
9
|
+
onclick={onButtonClick}
|
|
10
|
+
>
|
|
11
|
+
{title}
|
|
12
|
+
</button>
|
|
13
|
+
<span class="title" if:true={titleIsText}>{title}</span>
|
|
14
|
+
<!-- END TITLE-->
|
|
15
|
+
<div class="subtitle">{subtitle}</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="action">
|
|
18
|
+
<template if:true={complete}>
|
|
19
|
+
<div class="icon icon--complete">
|
|
20
|
+
<tds-icon
|
|
21
|
+
size="small"
|
|
22
|
+
sprite="action"
|
|
23
|
+
symbol="check"
|
|
24
|
+
></tds-icon>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<template if:false={complete}>
|
|
28
|
+
<div class="icon">
|
|
29
|
+
<tds-icon
|
|
30
|
+
size="small"
|
|
31
|
+
sprite="utility"
|
|
32
|
+
symbol="chevronright"
|
|
33
|
+
></tds-icon>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'tds/tds-child-summary',
|
|
5
|
+
parameters: {
|
|
6
|
+
modules: ['/modules/tds-child-summary.js']
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Base = () => html`
|
|
11
|
+
<div style="padding: 20px; background-color: #f0f0f0;">
|
|
12
|
+
<tds-child-summary
|
|
13
|
+
title="Send Email Through Salesforce"
|
|
14
|
+
subtitle="+100 Points"
|
|
15
|
+
path="/"
|
|
16
|
+
></tds-child-summary>
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const Complete = () => html`
|
|
21
|
+
<div style="padding: 20px; background-color: #f0f0f0;">
|
|
22
|
+
<tds-child-summary
|
|
23
|
+
title="Help Your Reps Use Activities"
|
|
24
|
+
subtitle="+100 Points"
|
|
25
|
+
complete="true"
|
|
26
|
+
path="/"
|
|
27
|
+
>
|
|
28
|
+
</tds-child-summary>
|
|
29
|
+
</div>
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export const TitleButton = () => html`
|
|
33
|
+
<div style="padding: 20px; background-color: #f0f0f0;">
|
|
34
|
+
<tds-child-summary
|
|
35
|
+
subtitle="+100 Points"
|
|
36
|
+
title="Send Email Through Salesforce"
|
|
37
|
+
title-mode="button"
|
|
38
|
+
></tds-child-summary>
|
|
39
|
+
</div>
|
|
40
|
+
`;
|