@salesforcedevs/arch-components 1.20.17-alpha3 → 1.20.17-alpha5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/modules/common/effectAdapter/__tests__/effectAdapter.test.ts +0 -12
- package/src/modules/common/effectAdapter/effectAdapter.html +0 -1
- package/src/modules/common/effectAdapter/effectAdapter.ts +0 -24
- package/src/modules/common/reflectedElement/__tests__/modules/test/select/select.html +0 -3
- package/src/modules/common/reflectedElement/__tests__/modules/test/select/select.ts +0 -7
- package/src/modules/common/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.html +0 -3
- package/src/modules/common/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.ts +0 -18
- package/src/modules/common/reflectedElement/__tests__/reflectedElement.test.ts +0 -75
- package/src/modules/common/reflectedElement/reflectedElement.ts +0 -50
- package/src/modules/common/slot/__tests__/slot.test.ts +0 -96
- package/src/modules/common/slot/slot.ts +0 -21
- package/src/modules/sa/coverage/coverage.css +0 -35
- package/src/modules/sa/coverage/coverage.html +0 -15
- package/src/modules/sa/coverage/coverage.ts +0 -402
- package/src/modules/sa/coverage/types.d.ts +0 -26
- package/src/modules/sa/expandableSection/expandableSection.css +0 -24
- package/src/modules/sa/expandableSection/expandableSection.html +0 -20
- package/src/modules/sa/expandableSection/expandableSection.stories.ts +0 -37
- package/src/modules/sa/expandableSection/expandableSection.ts +0 -24
- package/src/modules/sa/explorer/explorer.css +0 -303
- package/src/modules/sa/explorer/explorer.html +0 -403
- package/src/modules/sa/explorer/explorer.ts +0 -664
- package/src/modules/sa/explorer/types.d.ts +0 -60
- package/src/modules/sa/gallery/gallery.css +0 -358
- package/src/modules/sa/gallery/gallery.html +0 -65
- package/src/modules/sa/gallery/gallery.ts +0 -300
- package/src/modules/sa/gallery/types.d.ts +0 -35
- package/src/modules/sa/socialShare/socialShare.css +0 -49
- package/src/modules/sa/socialShare/socialShare.html +0 -56
- package/src/modules/sa/socialShare/socialShare.ts +0 -29
- package/src/modules/shared/a11y/a11y.ts +0 -25
- package/src/modules/shared/children/children.ts +0 -29
- package/src/modules/shared/color/color.ts +0 -52
- package/src/modules/shared/debounce/debounce.ts +0 -32
- package/src/modules/shared/dialog/dialog.ts +0 -154
- package/src/modules/shared/elements/__tests__/overflow.test.ts +0 -39
- package/src/modules/shared/elements/overflow.ts +0 -71
- package/src/modules/shared/fetch/fetch.ts +0 -52
- package/src/modules/shared/helpers/helpers.ts +0 -141
- package/src/modules/shared/i18n/i18n.ts +0 -74
- package/src/modules/shared/labels/__tests__/helpers.test.ts +0 -107
- package/src/modules/shared/labels/__tests__/pointHelpers.test.ts +0 -33
- package/src/modules/shared/labels/__tests__/timeHelpers.test.ts +0 -89
- package/src/modules/shared/labels/helpers.ts +0 -23
- package/src/modules/shared/labels/pointHelpers.ts +0 -47
- package/src/modules/shared/labels/timeHelpers.ts +0 -182
- package/src/modules/shared/labels/types.d.ts +0 -5
- package/src/modules/shared/logger/logger.ts +0 -33
- package/src/modules/shared/menu/menu.ts +0 -239
- package/src/modules/shared/overflow/__tests__/overflow.test.ts +0 -39
- package/src/modules/shared/overflow/overflow.ts +0 -71
- package/src/modules/shared/polling-request.ts +0 -97
- package/src/modules/shared/testutils.ts +0 -118
- package/src/modules/shared/track/track.ts +0 -23
- package/src/modules/shared/trailhead.ts +0 -123
- package/src/modules/shared/types.d.ts +0 -1
- package/src/modules/shared/useEffectAttr.ts +0 -16
- package/src/modules/shared/withState.ts +0 -21
- package/src/modules/tds/appLauncher/__fixtures__/index.ts +0 -34
- package/src/modules/tds/appLauncher/__tests__/appLauncher.test.ts +0 -119
- package/src/modules/tds/appLauncher/appLauncher.css +0 -65
- package/src/modules/tds/appLauncher/appLauncher.html +0 -38
- package/src/modules/tds/appLauncher/appLauncher.stories.ts +0 -39
- package/src/modules/tds/appLauncher/appLauncher.ts +0 -79
- package/src/modules/tds/appLauncher/types.ts +0 -8
- package/src/modules/tds/avatar/__tests__/avatar.test.ts +0 -11
- package/src/modules/tds/avatar/avatar.css +0 -77
- package/src/modules/tds/avatar/avatar.html +0 -36
- package/src/modules/tds/avatar/avatar.stories.ts +0 -64
- package/src/modules/tds/avatar/avatar.ts +0 -50
- package/src/modules/tds/badge/__tests__/badge.test.js +0 -11
- package/src/modules/tds/badge/badge.css +0 -22
- package/src/modules/tds/badge/badge.html +0 -5
- package/src/modules/tds/badge/badge.stories.ts +0 -10
- package/src/modules/tds/badge/badge.ts +0 -9
- package/src/modules/tds/button/__tests__/button.test.ts +0 -52
- package/src/modules/tds/button/button.css +0 -1
- package/src/modules/tds/button/button.html +0 -20
- package/src/modules/tds/button/button.stories.js +0 -54
- package/src/modules/tds/button/button.ts +0 -59
- package/src/modules/tds/buttonIcon/__tests__/buttonIcon.test.ts +0 -17
- package/src/modules/tds/buttonIcon/buttonIcon.css +0 -1
- package/src/modules/tds/buttonIcon/buttonIcon.html +0 -12
- package/src/modules/tds/buttonIcon/buttonIcon.stories.js +0 -38
- package/src/modules/tds/buttonIcon/buttonIcon.ts +0 -6
- package/src/modules/tds/buttonIconLink/buttonIconLink.css +0 -1
- package/src/modules/tds/buttonIconLink/buttonIconLink.html +0 -14
- package/src/modules/tds/buttonIconLink/buttonIconLink.stories.ts +0 -32
- package/src/modules/tds/buttonIconLink/buttonIconLink.ts +0 -9
- package/src/modules/tds/buttonLink/__tests__/buttonLink.test.ts +0 -17
- package/src/modules/tds/buttonLink/buttonLink.css +0 -1
- package/src/modules/tds/buttonLink/buttonLink.html +0 -19
- package/src/modules/tds/buttonLink/buttonLink.stories.js +0 -24
- package/src/modules/tds/buttonLink/buttonLink.ts +0 -8
- package/src/modules/tds/buttonStyles/buttonStyles.css +0 -232
- package/src/modules/tds/childSummary/__tests__/childSummary.test.js +0 -99
- package/src/modules/tds/childSummary/childSummary.css +0 -74
- package/src/modules/tds/childSummary/childSummary.html +0 -38
- package/src/modules/tds/childSummary/childSummary.stories.ts +0 -40
- package/src/modules/tds/childSummary/childSummary.ts +0 -63
- package/src/modules/tds/childSummary/types.d.ts +0 -10
- package/src/modules/tds/contentChildListItem/__tests__/contentChildListItem.test.ts +0 -32
- package/src/modules/tds/contentChildListItem/contentChildListItem.css +0 -1
- package/src/modules/tds/contentChildListItem/contentChildListItem.html +0 -10
- package/src/modules/tds/contentChildListItem/contentChildListItem.stories.ts +0 -46
- package/src/modules/tds/contentChildListItem/contentChildListItem.ts +0 -34
- package/src/modules/tds/contentIcon/contentIcon.css +0 -47
- package/src/modules/tds/contentIcon/contentIcon.html +0 -15
- package/src/modules/tds/contentIcon/contentIcon.stories.js +0 -110
- package/src/modules/tds/contentIcon/contentIcon.ts +0 -66
- package/src/modules/tds/contextAdapter/__tests__/contextAdapter.test.ts +0 -76
- package/src/modules/tds/contextAdapter/constants.ts +0 -1
- package/src/modules/tds/contextAdapter/contextAdapter.html +0 -1
- package/src/modules/tds/contextAdapter/contextAdapter.ts +0 -54
- package/src/modules/tds/dialogStyles/dialogStyles.css +0 -90
- package/src/modules/tds/footerLinks/__tests__/__snapshots__/footerLinks.test.ts.snap +0 -3
- package/src/modules/tds/footerLinks/__tests__/footerLinks.test.ts +0 -142
- package/src/modules/tds/footerLinks/footerLinks.css +0 -80
- package/src/modules/tds/footerLinks/footerLinks.html +0 -30
- package/src/modules/tds/footerLinks/footerLinks.ts +0 -48
- package/src/modules/tds/footerLinks/types.ts +0 -11
- package/src/modules/tds/footerMfe/footerMfe.html +0 -3
- package/src/modules/tds/footerMfe/footerMfe.ts +0 -19
- package/src/modules/tds/headerAvatar/__tests__/headerAvatar.test.ts +0 -43
- package/src/modules/tds/headerAvatar/headerAvatar.css +0 -45
- package/src/modules/tds/headerAvatar/headerAvatar.html +0 -25
- package/src/modules/tds/headerAvatar/headerAvatar.ts +0 -15
- package/src/modules/tds/headerHelpButton/__tests__/headerHelpButton.test.ts +0 -32
- package/src/modules/tds/headerHelpButton/headerHelpButton.css +0 -14
- package/src/modules/tds/headerHelpButton/headerHelpButton.html +0 -19
- package/src/modules/tds/headerHelpButton/headerHelpButton.ts +0 -12
- package/src/modules/tds/heading/__tests__/heading.test.ts +0 -50
- package/src/modules/tds/heading/heading.css +0 -1
- package/src/modules/tds/heading/heading.html +0 -9
- package/src/modules/tds/heading/heading.stories.ts +0 -36
- package/src/modules/tds/heading/heading.ts +0 -36
- package/src/modules/tds/icon/icon.css +0 -28
- package/src/modules/tds/icon/icon.html +0 -17
- package/src/modules/tds/icon/icon.stories.js +0 -18
- package/src/modules/tds/icon/icon.ts +0 -79
- package/src/modules/tds/input/__tests__/input.test.ts +0 -41
- package/src/modules/tds/input/input.css +0 -34
- package/src/modules/tds/input/input.html +0 -12
- package/src/modules/tds/input/input.stories.ts +0 -25
- package/src/modules/tds/input/input.ts +0 -41
- package/src/modules/tds/instrumentation/instrumentation.css +0 -0
- package/src/modules/tds/instrumentation/instrumentation.html +0 -1
- package/src/modules/tds/instrumentation/instrumentation.ts +0 -113
- package/src/modules/tds/pbCard/pbCard.css +0 -28
- package/src/modules/tds/pbCard/pbCard.html +0 -21
- package/src/modules/tds/pbCard/pbCard.ts +0 -18
- package/src/modules/tds/pill/__tests__/pill.test.ts +0 -56
- package/src/modules/tds/pill/pill.css +0 -70
- package/src/modules/tds/pill/pill.html +0 -17
- package/src/modules/tds/pill/pill.stories.ts +0 -41
- package/src/modules/tds/pill/pill.ts +0 -34
- package/src/modules/tds/progressBar/__tests__/progressBar.test.js +0 -11
- package/src/modules/tds/progressBar/progressBar.css +0 -42
- package/src/modules/tds/progressBar/progressBar.html +0 -14
- package/src/modules/tds/progressBar/progressBar.stories.ts +0 -24
- package/src/modules/tds/progressBar/progressBar.ts +0 -14
- package/src/modules/tds/radio/__tests__/radio.test.ts +0 -29
- package/src/modules/tds/radio/radio.css +0 -89
- package/src/modules/tds/radio/radio.html +0 -17
- package/src/modules/tds/radio/radio.stories.ts +0 -31
- package/src/modules/tds/radio/radio.ts +0 -32
- package/src/modules/tds/reset/reset.css +0 -39
- package/src/modules/tds/search/__fixtures__/index.ts +0 -32
- package/src/modules/tds/search/__tests__/search.test.ts +0 -235
- package/src/modules/tds/search/lib/__tests__/__snapshots__/listbox.test.ts.snap +0 -115
- package/src/modules/tds/search/lib/__tests__/listbox.test.ts +0 -192
- package/src/modules/tds/search/lib/listbox.ts +0 -209
- package/src/modules/tds/search/search.css +0 -122
- package/src/modules/tds/search/search.html +0 -21
- package/src/modules/tds/search/search.stories.ts +0 -20
- package/src/modules/tds/search/search.ts +0 -107
- package/src/modules/tds/search/types.d.ts +0 -22
- package/src/modules/tds/searchList/searchList.css +0 -120
- package/src/modules/tds/searchList/searchList.html +0 -43
- package/src/modules/tds/searchList/searchList.stories.ts +0 -10
- package/src/modules/tds/searchList/searchList.ts +0 -53
- package/src/modules/tds/select/__tests__/select.test.ts +0 -150
- package/src/modules/tds/select/select.css +0 -42
- package/src/modules/tds/select/select.html +0 -24
- package/src/modules/tds/select/select.stories.ts +0 -59
- package/src/modules/tds/select/select.ts +0 -60
- package/src/modules/tds/spinner/__tests__/spinner.test.ts +0 -11
- package/src/modules/tds/spinner/spinner.css +0 -194
- package/src/modules/tds/spinner/spinner.html +0 -9
- package/src/modules/tds/spinner/spinner.stories.ts +0 -20
- package/src/modules/tds/spinner/spinner.ts +0 -15
- package/src/modules/tds/styles/styles.css +0 -24
- package/src/modules/tds/summary/__tests__/summary.test.ts +0 -135
- package/src/modules/tds/summary/summary.css +0 -135
- package/src/modules/tds/summary/summary.html +0 -69
- package/src/modules/tds/summary/summary.stories.js +0 -148
- package/src/modules/tds/summary/summary.ts +0 -95
- package/src/modules/tds/tab/__tests__/tab.test.ts +0 -25
- package/src/modules/tds/tab/tab.css +0 -3
- package/src/modules/tds/tab/tab.html +0 -5
- package/src/modules/tds/tab/tab.ts +0 -46
- package/src/modules/tds/tabset/__tests__/tabset.test.ts +0 -108
- package/src/modules/tds/tabset/tabset.css +0 -112
- package/src/modules/tds/tabset/tabset.html +0 -63
- package/src/modules/tds/tabset/tabset.stories.ts +0 -32
- package/src/modules/tds/tabset/tabset.ts +0 -232
- package/src/modules/tds/themeProvider/themeProvider.css +0 -502
- package/src/modules/tds/themeProvider/themeProvider.html +0 -3
- package/src/modules/tds/themeProvider/themeProvider.ts +0 -37
- package/src/modules/tds/tile/tile.css +0 -23
- package/src/modules/tds/tile/tile.html +0 -5
- package/src/modules/tds/tile/tile.stories.js +0 -14
- package/src/modules/tds/tile/tile.ts +0 -12
- package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.html +0 -1
- package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.ts +0 -47
- package/src/modules/th/contextAdapter/__tests__/contextAdapter.test.ts +0 -104
- package/src/modules/th/contextAdapter/contextAdapter.html +0 -1
- package/src/modules/th/contextAdapter/contextAdapter.ts +0 -49
- package/src/modules/th/favoriteButton/__tests__/favoriteButton.test.ts +0 -56
- package/src/modules/th/favoriteButton/favoriteButton.css +0 -3
- package/src/modules/th/favoriteButton/favoriteButton.html +0 -15
- package/src/modules/th/favoriteButton/favoriteButton.stories.js +0 -30
- package/src/modules/th/favoriteButton/favoriteButton.ts +0 -84
- package/src/modules/th/favoriteButton/mocks/index.ts +0 -12
- package/src/modules/th/search/__fixtures__/index.ts +0 -14
- package/src/modules/th/search/__tests__/search.test.ts +0 -233
- package/src/modules/th/search/constants.ts +0 -2
- package/src/modules/th/search/mocks/index.ts +0 -30
- package/src/modules/th/search/mocks/responses.ts +0 -54
- package/src/modules/th/search/search.css +0 -4
- package/src/modules/th/search/search.html +0 -12
- package/src/modules/th/search/search.ts +0 -172
- package/src/modules/th/search/types.d.ts +0 -29
- package/src/modules/tm/card/__tests__/card.test.ts +0 -65
- package/src/modules/tm/card/card.css +0 -131
- package/src/modules/tm/card/card.html +0 -81
- package/src/modules/tm/card/card.ts +0 -269
- package/src/modules/tm/cardBase/cardBase.css +0 -11
- package/src/modules/tm/cardGridA/cardGridA.css +0 -11
- package/src/modules/tm/cardGridA/cardGridA.html +0 -21
- package/src/modules/tm/cardGridA/cardGridA.stories.js +0 -107
- package/src/modules/tm/cardGridA/cardGridA.ts +0 -24
- package/src/modules/tm/cardGridB/cardGridB.css +0 -88
- package/src/modules/tm/cardGridB/cardGridB.html +0 -20
- package/src/modules/tm/cardGridB/cardGridB.stories.js +0 -58
- package/src/modules/tm/cardGridB/cardGridB.ts +0 -19
- package/src/modules/tm/cardGridC/cardGridC.css +0 -24
- package/src/modules/tm/cardGridC/cardGridC.html +0 -22
- package/src/modules/tm/cardGridC/cardGridC.stories.js +0 -42
- package/src/modules/tm/cardGridC/cardGridC.ts +0 -11
- package/src/modules/tm/cardGridD/cardGridD.css +0 -17
- package/src/modules/tm/cardGridD/cardGridD.html +0 -20
- package/src/modules/tm/cardGridD/cardGridD.stories.js +0 -34
- package/src/modules/tm/cardGridD/cardGridD.ts +0 -7
- package/src/modules/tm/cardNew/cardNew.css +0 -31
- package/src/modules/tm/cardNew/cardNew.html +0 -29
- package/src/modules/tm/cardNew/cardNew.ts +0 -66
- package/src/modules/tm/content/__fixtures__/index.ts +0 -884
- package/src/modules/tm/content/__tests__/content.test.ts +0 -95
- package/src/modules/tm/content/content.css +0 -641
- package/src/modules/tm/content/content.html +0 -53
- package/src/modules/tm/content/content.stories.js +0 -14
- package/src/modules/tm/content/content.ts +0 -171
- package/src/modules/tm/endCapA/__tests__/endCapA.test.ts +0 -52
- package/src/modules/tm/endCapA/endCapA.css +0 -64
- package/src/modules/tm/endCapA/endCapA.html +0 -21
- package/src/modules/tm/endCapA/endCapA.stories.js +0 -37
- package/src/modules/tm/endCapA/endCapA.ts +0 -23
- package/src/modules/tm/eventsA/eventsA.css +0 -107
- package/src/modules/tm/eventsA/eventsA.html +0 -26
- package/src/modules/tm/eventsA/eventsA.stories.js +0 -51
- package/src/modules/tm/eventsA/eventsA.ts +0 -48
- package/src/modules/tm/faqA/faqA.css +0 -87
- package/src/modules/tm/faqA/faqA.html +0 -27
- package/src/modules/tm/faqA/faqA.stories.js +0 -25
- package/src/modules/tm/faqA/faqA.ts +0 -40
- package/src/modules/tm/featureGridA/__tests__/featureGridA.test.ts +0 -116
- package/src/modules/tm/featureGridA/featureGridA.css +0 -95
- package/src/modules/tm/featureGridA/featureGridA.html +0 -34
- package/src/modules/tm/featureGridA/featureGridA.stories.js +0 -45
- package/src/modules/tm/featureGridA/featureGridA.ts +0 -59
- package/src/modules/tm/footnote/footnote.css +0 -28
- package/src/modules/tm/footnote/footnote.html +0 -3
- package/src/modules/tm/footnote/footnote.stories.js +0 -29
- package/src/modules/tm/footnote/footnote.ts +0 -35
- package/src/modules/tm/heroA/__tests__/heroA.test.ts +0 -51
- package/src/modules/tm/heroA/heroA.css +0 -116
- package/src/modules/tm/heroA/heroA.html +0 -27
- package/src/modules/tm/heroA/heroA.stories.js +0 -49
- package/src/modules/tm/heroA/heroA.ts +0 -56
- package/src/modules/tm/heroB/heroB.css +0 -78
- package/src/modules/tm/heroB/heroB.html +0 -26
- package/src/modules/tm/heroB/heroB.stories.js +0 -44
- package/src/modules/tm/heroB/heroB.ts +0 -26
- package/src/modules/tm/page/__tests__/page.test.ts +0 -35
- package/src/modules/tm/page/page.css +0 -3
- package/src/modules/tm/page/page.html +0 -3
- package/src/modules/tm/page/page.stories.js +0 -10
- package/src/modules/tm/page/page.ts +0 -3
- package/src/modules/tm/pageHeaderA/pageHeaderA.css +0 -82
- package/src/modules/tm/pageHeaderA/pageHeaderA.html +0 -24
- package/src/modules/tm/pageHeaderA/pageHeaderA.stories.js +0 -18
- package/src/modules/tm/pageHeaderA/pageHeaderA.ts +0 -51
- package/src/modules/tm/pageNavigationA/pageNavigationA.css +0 -41
- package/src/modules/tm/pageNavigationA/pageNavigationA.html +0 -9
- package/src/modules/tm/pageNavigationA/pageNavigationA.stories.js +0 -34
- package/src/modules/tm/pageNavigationA/pageNavigationA.ts +0 -18
- package/src/modules/tm/promoA/__tests__/promoA.test.ts +0 -89
- package/src/modules/tm/promoA/promoA.css +0 -95
- package/src/modules/tm/promoA/promoA.html +0 -22
- package/src/modules/tm/promoA/promoA.stories.js +0 -38
- package/src/modules/tm/promoA/promoA.ts +0 -62
- package/src/modules/tm/sectionA/sectionA.css +0 -64
- package/src/modules/tm/sectionA/sectionA.html +0 -21
- package/src/modules/tm/sectionA/sectionA.stories.js +0 -18
- package/src/modules/tm/sectionA/sectionA.ts +0 -27
- package/src/modules/tm/sectionSpacer/sectionSpacer.css +0 -4
- package/src/modules/tm/sectionSpacer/sectionSpacer.html +0 -1
- package/src/modules/tm/sectionSpacer/sectionSpacer.ts +0 -3
- package/src/modules/tm/skillsCardA/skillsCardA.css +0 -73
- package/src/modules/tm/skillsCardA/skillsCardA.html +0 -37
- package/src/modules/tm/skillsCardA/skillsCardA.ts +0 -38
- package/src/modules/tm/skillsGridA/skillsGridA.css +0 -12
- package/src/modules/tm/skillsGridA/skillsGridA.html +0 -5
- package/src/modules/tm/skillsGridA/skillsGridA.stories.ts +0 -65
- package/src/modules/tm/skillsGridA/skillsGridA.ts +0 -3
- package/src/modules/tm/statsA/statsA.css +0 -26
- package/src/modules/tm/statsA/statsA.html +0 -10
- package/src/modules/tm/statsA/statsA.stories.js +0 -29
- package/src/modules/tm/statsA/statsA.ts +0 -20
- package/src/modules/tm/textItem/textItem.css +0 -53
- package/src/modules/tm/textItem/textItem.html +0 -18
- package/src/modules/tm/textItem/textItem.ts +0 -32
- package/src/modules/tm/textItemGridA/textItemGridA.css +0 -11
- package/src/modules/tm/textItemGridA/textItemGridA.html +0 -15
- package/src/modules/tm/textItemGridA/textItemGridA.stories.js +0 -67
- package/src/modules/tm/textItemGridA/textItemGridA.ts +0 -20
- package/src/modules/tm/threeCardGrid/threeCardGrid.css +0 -6
- package/src/modules/tm/threeCardGrid/threeCardGrid.html +0 -5
- package/src/modules/tm/threeCardGrid/threeCardGrid.ts +0 -3
- package/src/modules/tm/trailblazersA/trailblazersA.css +0 -70
- package/src/modules/tm/trailblazersA/trailblazersA.html +0 -42
- package/src/modules/tm/trailblazersA/trailblazersA.stories.js +0 -52
- package/src/modules/tm/trailblazersA/trailblazersA.ts +0 -43
- package/src/modules/tm/utils/utils.ts +0 -18
- package/src/modules/tm/youtube/youtube.css +0 -7
- package/src/modules/tm/youtube/youtube.html +0 -10
- package/src/modules/tm/youtube/youtube.stories.js +0 -15
- package/src/modules/tm/youtube/youtube.ts +0 -27
- package/src/modules/ui/focusTrap/focusTrap.html +0 -5
- package/src/modules/ui/focusTrap/focusTrap.ts +0 -104
- package/src/modules/ui/focusVisible/__tests__/focusVisible.test.ts +0 -95
- package/src/modules/ui/focusVisible/focusVisible.html +0 -3
- package/src/modules/ui/focusVisible/focusVisible.ts +0 -46
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { html, render, renderIntoBody, nextTick } from 'shared/testutils';
|
|
2
|
-
|
|
3
|
-
import Summary from '../summary';
|
|
4
|
-
|
|
5
|
-
customElements.define('tds-summary', Summary.CustomElementConstructor);
|
|
6
|
-
|
|
7
|
-
describe('tds-content-brick', () => {
|
|
8
|
-
describe('compact (string)', () => {
|
|
9
|
-
it('shows the description ', () => {
|
|
10
|
-
const element = renderIntoBody(html`
|
|
11
|
-
<tds-summary description="Hello"></tds-summary>
|
|
12
|
-
`);
|
|
13
|
-
expect(element.shadowRoot!.innerHTML).toContain('Hello');
|
|
14
|
-
});
|
|
15
|
-
it('hides the description (string)', () => {
|
|
16
|
-
const element = renderIntoBody(html`
|
|
17
|
-
<tds-summary compact description="Hello"></tds-summary>
|
|
18
|
-
`);
|
|
19
|
-
expect(element.shadowRoot!.innerHTML).not.toContain('Hello');
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
describe('compact (bool)', () => {
|
|
23
|
-
it('shows the description (string)', () => {
|
|
24
|
-
const element = renderIntoBody(html`
|
|
25
|
-
<tds-summary
|
|
26
|
-
.compact=${false}
|
|
27
|
-
description="Hello"
|
|
28
|
-
></tds-summary>
|
|
29
|
-
`);
|
|
30
|
-
expect(element.shadowRoot!.innerHTML).toContain('Hello');
|
|
31
|
-
});
|
|
32
|
-
it('hides the description (bool)', () => {
|
|
33
|
-
const element = renderIntoBody(html`
|
|
34
|
-
<tds-summary .compact=${true} description="Hello"></tds-summary>
|
|
35
|
-
`);
|
|
36
|
-
expect(element.shadowRoot!.innerHTML).not.toContain('Hello');
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
// Skip this test as LWC in test mode doesn't support dynamic slot content with conditional rendering
|
|
40
|
-
it.skip('hides the header if no slots are filled', async () => {
|
|
41
|
-
const template = ({ showImage, showAction }: any = {}) => html`
|
|
42
|
-
<tds-summary>
|
|
43
|
-
${showImage ? html` <img slot="image" /> ` : null}
|
|
44
|
-
${showAction ? html` <button slot="action" /> ` : null}
|
|
45
|
-
</tds-summary>
|
|
46
|
-
`;
|
|
47
|
-
const element = renderIntoBody(template());
|
|
48
|
-
const header = element.shadowRoot!.querySelector('.header');
|
|
49
|
-
const isHidden = () =>
|
|
50
|
-
header!.matches(
|
|
51
|
-
'.summary:not([data-slots*="image"]):not([data-slots*="action"]) .header'
|
|
52
|
-
);
|
|
53
|
-
expect(isHidden()).toBe(true);
|
|
54
|
-
render(template({ showImage: true }), element.parentElement!);
|
|
55
|
-
await nextTick();
|
|
56
|
-
expect(isHidden()).toBe(false);
|
|
57
|
-
render(template({ showAction: true }), element.parentElement!);
|
|
58
|
-
await nextTick();
|
|
59
|
-
expect(isHidden()).toBe(false);
|
|
60
|
-
});
|
|
61
|
-
it.skip('hides the footer if no slots are filled', async () => {
|
|
62
|
-
const template = ({ showMetaLeft, showMetaRight }: any = {}) => html`
|
|
63
|
-
<tds-summary>
|
|
64
|
-
${showMetaLeft ? html` <span slot="meta-left" /> ` : null}
|
|
65
|
-
${showMetaRight ? html` <span slot="meta-right" /> ` : null}
|
|
66
|
-
</tds-summary>
|
|
67
|
-
`;
|
|
68
|
-
const element = renderIntoBody(template());
|
|
69
|
-
const footer = element.shadowRoot!.querySelector('.footer');
|
|
70
|
-
const isHidden = () =>
|
|
71
|
-
footer!.matches('.summary:not([data-slots*="meta"]) .footer');
|
|
72
|
-
expect(isHidden()).toBe(true);
|
|
73
|
-
render(template({ showMetaLeft: true }), element.parentElement!);
|
|
74
|
-
await nextTick();
|
|
75
|
-
expect(isHidden()).toBe(false);
|
|
76
|
-
render(template({ showMetaRight: true }), element.parentElement!);
|
|
77
|
-
await nextTick();
|
|
78
|
-
expect(isHidden()).toBe(false);
|
|
79
|
-
});
|
|
80
|
-
describe('titleMode', () => {
|
|
81
|
-
describe('anchor', () => {
|
|
82
|
-
it('renders the correct element', () => {
|
|
83
|
-
const element = renderIntoBody(html`
|
|
84
|
-
<tds-summary
|
|
85
|
-
description="Hello"
|
|
86
|
-
path="/"
|
|
87
|
-
title-mode="anchor"
|
|
88
|
-
></tds-summary>
|
|
89
|
-
`);
|
|
90
|
-
expect(
|
|
91
|
-
element.shadowRoot!.querySelector('.title')!.tagName
|
|
92
|
-
).toBe('A');
|
|
93
|
-
});
|
|
94
|
-
it('renders a button if no path is specified', () => {
|
|
95
|
-
const element = renderIntoBody(
|
|
96
|
-
html`
|
|
97
|
-
<tds-summary
|
|
98
|
-
title="Hello"
|
|
99
|
-
title-mode="anchor"
|
|
100
|
-
></tds-summary>
|
|
101
|
-
`
|
|
102
|
-
);
|
|
103
|
-
expect(
|
|
104
|
-
element.shadowRoot!.querySelector('.title')!.tagName
|
|
105
|
-
).toBe('BUTTON');
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
describe('button', () => {
|
|
109
|
-
it('renders the correct element', () => {
|
|
110
|
-
const element = renderIntoBody(html`
|
|
111
|
-
<tds-summary
|
|
112
|
-
description="Hello"
|
|
113
|
-
title-mode="button"
|
|
114
|
-
></tds-summary>
|
|
115
|
-
`);
|
|
116
|
-
expect(
|
|
117
|
-
element.shadowRoot!.querySelector('.title')!.tagName
|
|
118
|
-
).toBe('BUTTON');
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
describe('text', () => {
|
|
122
|
-
it('renders the correct element', () => {
|
|
123
|
-
const element = renderIntoBody(html`
|
|
124
|
-
<tds-summary
|
|
125
|
-
description="Hello"
|
|
126
|
-
title-mode="text"
|
|
127
|
-
></tds-summary>
|
|
128
|
-
`);
|
|
129
|
-
expect(
|
|
130
|
-
element.shadowRoot!.querySelector('.title')!.tagName
|
|
131
|
-
).toBe('SPAN');
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
});
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
@import 'tds/reset';
|
|
2
|
-
|
|
3
|
-
.summary {
|
|
4
|
-
display: flex;
|
|
5
|
-
padding-bottom: 0.75rem;
|
|
6
|
-
padding-top: 0.75rem;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
[data-display='brick'] {
|
|
10
|
-
flex-direction: row;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[data-display*='tile'] {
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.body,
|
|
18
|
-
.footer {
|
|
19
|
-
flex-wrap: wrap;
|
|
20
|
-
margin-top: var(--tds-spacing-3);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.header {
|
|
24
|
-
align-items: flex-start;
|
|
25
|
-
display: flex;
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.header__actions {
|
|
30
|
-
margin-bottom: -1.5rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.header__actions[data-alignment='start'] {
|
|
34
|
-
align-self: flex-start;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.header__actions[data-alignment='center'] {
|
|
38
|
-
align-self: flex-center;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.header__actions[data-alignment='end'] {
|
|
42
|
-
align-self: flex-end;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.summary:not([data-slots*='image']):not([data-slots*='action']) .header {
|
|
46
|
-
display: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.content {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex: 1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.content-start {
|
|
55
|
-
flex: 1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.pretitle,
|
|
59
|
-
.title,
|
|
60
|
-
.description {
|
|
61
|
-
margin-top: var(--tds-spacing-1);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.pretitle {
|
|
65
|
-
color: var(--tds-color-meteorite);
|
|
66
|
-
font-size: var(--tds-font-size-sm);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.pretitle a {
|
|
70
|
-
color: var(--tds-color-brand);
|
|
71
|
-
text-decoration: none;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.pretitle a:hover {
|
|
75
|
-
text-decoration: underline;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.title {
|
|
79
|
-
display: inline-block;
|
|
80
|
-
font-size: var(--title-font-size, var(--tds-font-size-lg));
|
|
81
|
-
font-weight: 600;
|
|
82
|
-
text-align: left;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.title--link {
|
|
86
|
-
appearance: none;
|
|
87
|
-
-webkit-appearance: none;
|
|
88
|
-
background: none;
|
|
89
|
-
border: none;
|
|
90
|
-
color: var(--tds-color-brand);
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
text-decoration: none;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.title--link:hover {
|
|
96
|
-
text-decoration: underline;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.description {
|
|
100
|
-
color: var(--tds-color-meteorite);
|
|
101
|
-
font-size: var(--tds-font-size-sm);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.footer {
|
|
105
|
-
display: flex;
|
|
106
|
-
font-size: var(--tds-font-size-sm);
|
|
107
|
-
justify-content: space-between;
|
|
108
|
-
align-items: center;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.summary:not([data-slots*='meta']) .footer {
|
|
112
|
-
display: none;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
[data-display='brick'] .body {
|
|
116
|
-
flex: 1;
|
|
117
|
-
margin-top: 0;
|
|
118
|
-
margin-left: var(--tds-spacing-4);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
[data-display='brick'] .body .content {
|
|
122
|
-
margin-top: 0;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@media screen and (min-width: 640px) {
|
|
126
|
-
[data-display^='brick-tile'] {
|
|
127
|
-
flex-direction: row;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
[data-display^='brick-tile'] .body {
|
|
131
|
-
margin-left: var(--tds-spacing-4);
|
|
132
|
-
margin-top: 0;
|
|
133
|
-
flex: 1;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="summary" data-display={displayMode}>
|
|
3
|
-
<div class="header">
|
|
4
|
-
<div class="image">
|
|
5
|
-
<slot name="image" onslotchange={onSlotChange}></slot>
|
|
6
|
-
</div>
|
|
7
|
-
<template if:true={isTile}>
|
|
8
|
-
<div data-alignment={actionsAlignment} class="header__actions">
|
|
9
|
-
<slot name="action" onslotchange={onSlotChange}></slot>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="body">
|
|
14
|
-
<div class="content">
|
|
15
|
-
<div class="content-start">
|
|
16
|
-
<div class="pretitle">
|
|
17
|
-
<slot name="pretitle" onslotchange={onSlotChange}>
|
|
18
|
-
{pretitle}
|
|
19
|
-
<a
|
|
20
|
-
if:true={pretitleLinkHref}
|
|
21
|
-
href={pretitleLinkHref}
|
|
22
|
-
target={pretitleLinkTarget}
|
|
23
|
-
>{pretitleLinkTitle}</a
|
|
24
|
-
>
|
|
25
|
-
</slot>
|
|
26
|
-
</div>
|
|
27
|
-
<tds-heading level={titleHeadingLevel}>
|
|
28
|
-
<template if:true={titleIsAnchor}>
|
|
29
|
-
<a
|
|
30
|
-
class="title title--link"
|
|
31
|
-
href={path}
|
|
32
|
-
onclick={onTitleClick}
|
|
33
|
-
target={pathTarget}
|
|
34
|
-
>{title}</a
|
|
35
|
-
>
|
|
36
|
-
</template>
|
|
37
|
-
<template if:true={titleIsButton}>
|
|
38
|
-
<button
|
|
39
|
-
class="title title--link"
|
|
40
|
-
onclick={onTitleButtonClick}
|
|
41
|
-
>
|
|
42
|
-
{title}
|
|
43
|
-
</button>
|
|
44
|
-
</template>
|
|
45
|
-
<template if:true={titleIsText}>
|
|
46
|
-
<span class="title">{title}</span>
|
|
47
|
-
</template>
|
|
48
|
-
</tds-heading>
|
|
49
|
-
<template if:true={showDescription}>
|
|
50
|
-
<div class="description">{description}</div>
|
|
51
|
-
</template>
|
|
52
|
-
</div>
|
|
53
|
-
<template if:false={isTile}>
|
|
54
|
-
<div class="content-end">
|
|
55
|
-
<slot name="action" onslotchange={onSlotChange}></slot>
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="footer">
|
|
60
|
-
<div>
|
|
61
|
-
<slot name="meta-left" onslotchange={onSlotChange}></slot>
|
|
62
|
-
</div>
|
|
63
|
-
<div>
|
|
64
|
-
<slot name="meta-right" onslotchange={onSlotChange}></slot>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</template>
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'tds/tds-summary',
|
|
5
|
-
parameters: {
|
|
6
|
-
modules: ['/modules/tds-summary.js'],
|
|
7
|
-
chromatic: {
|
|
8
|
-
viewports: [400, 800, 1199]
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const Base = () => html`
|
|
14
|
-
<tds-summary
|
|
15
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
16
|
-
path="/"
|
|
17
|
-
pretitle="Pretitle by "
|
|
18
|
-
pretitle-link-href="/"
|
|
19
|
-
pretitle-link-title="Link"
|
|
20
|
-
title="Title"
|
|
21
|
-
>
|
|
22
|
-
<tds-content-icon
|
|
23
|
-
slot="image"
|
|
24
|
-
src="/images/badge-1.png"
|
|
25
|
-
></tds-content-icon>
|
|
26
|
-
<button slot="action">Action</button>
|
|
27
|
-
<span slot="meta-left">Meta left</span>
|
|
28
|
-
<span slot="meta-right">Meta right</span>
|
|
29
|
-
</tds-summary>
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
|
-
export const CustomPretitle = () => html`
|
|
33
|
-
<tds-summary
|
|
34
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
35
|
-
path="/"
|
|
36
|
-
title="Title"
|
|
37
|
-
>
|
|
38
|
-
<tds-content-icon
|
|
39
|
-
slot="image"
|
|
40
|
-
src="/images/badge-1.png"
|
|
41
|
-
></tds-content-icon>
|
|
42
|
-
<div slot="pretitle">
|
|
43
|
-
Pretitle by <a href="#">Link</a> (custom content)
|
|
44
|
-
</div>
|
|
45
|
-
<button slot="action">Action</button>
|
|
46
|
-
<span slot="meta-left">Meta left</span>
|
|
47
|
-
<span slot="meta-right">Meta right</span>
|
|
48
|
-
</tds-summary>
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
export const Brick = () => html`
|
|
52
|
-
<tds-summary
|
|
53
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
54
|
-
display-mode="brick"
|
|
55
|
-
path="/"
|
|
56
|
-
title="Title"
|
|
57
|
-
>
|
|
58
|
-
<tds-content-icon
|
|
59
|
-
slot="image"
|
|
60
|
-
src="/images/badge-1.png"
|
|
61
|
-
size="small"
|
|
62
|
-
></tds-content-icon>
|
|
63
|
-
|
|
64
|
-
<div slot="pretitle">
|
|
65
|
-
Pretitle by <a href="#">Link</a> (custom content)
|
|
66
|
-
</div>
|
|
67
|
-
<button slot="action">Action</button>
|
|
68
|
-
<span slot="meta-left">Meta left</span>
|
|
69
|
-
<span slot="meta-right">Meta right</span>
|
|
70
|
-
</tds-summary>
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
export const BrickTile = () => html`
|
|
74
|
-
<tds-summary
|
|
75
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
76
|
-
display-mode="brick-tile"
|
|
77
|
-
path="/"
|
|
78
|
-
title="Title"
|
|
79
|
-
>
|
|
80
|
-
<tds-content-icon
|
|
81
|
-
slot="image"
|
|
82
|
-
src="/images/badge-1.png"
|
|
83
|
-
size="small"
|
|
84
|
-
></tds-content-icon>
|
|
85
|
-
|
|
86
|
-
<div slot="pretitle">
|
|
87
|
-
Pretitle by <a href="#">Link</a> (custom content)
|
|
88
|
-
</div>
|
|
89
|
-
<button slot="action">Action</button>
|
|
90
|
-
<span slot="meta-left">Meta left</span>
|
|
91
|
-
<span slot="meta-right">Meta right</span>
|
|
92
|
-
</tds-summary>
|
|
93
|
-
`;
|
|
94
|
-
|
|
95
|
-
export const BrickCompact = () => html`
|
|
96
|
-
<tds-summary
|
|
97
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
98
|
-
compact
|
|
99
|
-
display-mode="brick-tile"
|
|
100
|
-
path="/"
|
|
101
|
-
title="Title"
|
|
102
|
-
>
|
|
103
|
-
<tds-content-icon
|
|
104
|
-
slot="image"
|
|
105
|
-
src="/images/badge-1.png"
|
|
106
|
-
size="small"
|
|
107
|
-
></tds-content-icon>
|
|
108
|
-
|
|
109
|
-
<div slot="pretitle">
|
|
110
|
-
Pretitle by <a href="#">Link</a> (custom content)
|
|
111
|
-
</div>
|
|
112
|
-
<button slot="action">Action</button>
|
|
113
|
-
<span slot="meta-left">Meta left</span>
|
|
114
|
-
<span slot="meta-right">Meta right</span>
|
|
115
|
-
</tds-summary>
|
|
116
|
-
`;
|
|
117
|
-
|
|
118
|
-
export const TitleButton = () => html`
|
|
119
|
-
<tds-summary
|
|
120
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
121
|
-
pretitle="Pretitle by "
|
|
122
|
-
pretitle-link-href="/"
|
|
123
|
-
pretitle-link-title="Link"
|
|
124
|
-
title="Title"
|
|
125
|
-
title-mode="button"
|
|
126
|
-
>
|
|
127
|
-
<tds-content-icon
|
|
128
|
-
slot="image"
|
|
129
|
-
src="/images/badge-1.png"
|
|
130
|
-
></tds-content-icon>
|
|
131
|
-
</tds-summary>
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
|
-
export const TitleText = () => html`
|
|
135
|
-
<tds-summary
|
|
136
|
-
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
137
|
-
pretitle="Pretitle by "
|
|
138
|
-
pretitle-link-href="/"
|
|
139
|
-
pretitle-link-title="Link"
|
|
140
|
-
title="Title"
|
|
141
|
-
title-mode="text"
|
|
142
|
-
>
|
|
143
|
-
<tds-content-icon
|
|
144
|
-
slot="image"
|
|
145
|
-
src="/images/badge-1.png"
|
|
146
|
-
></tds-content-icon>
|
|
147
|
-
</tds-summary>
|
|
148
|
-
`;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { api, LightningElement } from 'lwc';
|
|
2
|
-
|
|
3
|
-
type TitleMode = 'anchor' | 'button' | 'text';
|
|
4
|
-
export default class extends LightningElement {
|
|
5
|
-
@api actionsAlignment: 'start' | 'center' | 'end' = 'start';
|
|
6
|
-
@api compact: boolean | string | null = null;
|
|
7
|
-
@api description: string | null = null;
|
|
8
|
-
@api displayMode: 'brick' | 'brick-tile' | 'tile' = 'tile';
|
|
9
|
-
@api path: string | null = null;
|
|
10
|
-
@api pathTarget: string | null = null;
|
|
11
|
-
@api pretitle: string | null = null;
|
|
12
|
-
@api pretitleLinkHref: string | null = null;
|
|
13
|
-
@api pretitleLinkTarget: string | null = null;
|
|
14
|
-
@api pretitleLinkTitle: string | null = null;
|
|
15
|
-
@api title: string = '';
|
|
16
|
-
@api titleHeadingLevel: '1' | '2' | '3' | '4' | null = null;
|
|
17
|
-
|
|
18
|
-
private _titleMode: TitleMode = 'anchor';
|
|
19
|
-
|
|
20
|
-
@api
|
|
21
|
-
get titleMode(): TitleMode {
|
|
22
|
-
// Backwards compatability
|
|
23
|
-
if (this._titleMode === 'anchor' && !this.path) {
|
|
24
|
-
if (process.env.NODE_ENV === 'development') {
|
|
25
|
-
console.warn(
|
|
26
|
-
`title-mode was set to "anchor" but is missing "path" attribute, falling back to "button"`
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
return 'button';
|
|
30
|
-
}
|
|
31
|
-
return this._titleMode;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
set titleMode(value) {
|
|
35
|
-
this._titleMode = value;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
private isTile = true;
|
|
39
|
-
|
|
40
|
-
connectedCallback() {
|
|
41
|
-
this.onMediaQueryTile(mediaQueryTile);
|
|
42
|
-
mediaQueryTile.addListener(this.onMediaQueryTile);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
disconnectedCallback() {
|
|
46
|
-
mediaQueryTile.removeListener(this.onMediaQueryTile);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
private get isCompact() {
|
|
50
|
-
return typeof this.compact === 'boolean'
|
|
51
|
-
? this.compact
|
|
52
|
-
: this.compact !== null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
private onMediaQueryTile = (e: { matches: boolean }) => {
|
|
56
|
-
this.isTile =
|
|
57
|
-
this.displayMode === 'tile' ||
|
|
58
|
-
(this.displayMode === 'brick-tile' && mediaQueryTile.matches);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
private onSlotChange() {
|
|
62
|
-
const slots = Array.from(
|
|
63
|
-
this.template.querySelectorAll('slot')
|
|
64
|
-
) as HTMLSlotElement[];
|
|
65
|
-
const slotNames = slots
|
|
66
|
-
.filter((slot) => slot.assignedNodes()[0])
|
|
67
|
-
.map((slot) => slot.getAttribute('name'))
|
|
68
|
-
.join(' ');
|
|
69
|
-
this.template
|
|
70
|
-
.querySelector('.summary')!
|
|
71
|
-
.setAttribute('data-slots', slotNames);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
private onTitleButtonClick(e: MouseEvent) {
|
|
75
|
-
this.dispatchEvent(new CustomEvent('navigate'));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
private get showDescription() {
|
|
79
|
-
return !this.isCompact;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
private get titleIsAnchor() {
|
|
83
|
-
return this.titleMode === 'anchor';
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
private get titleIsButton() {
|
|
87
|
-
return this.titleMode === 'button';
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private get titleIsText() {
|
|
91
|
-
return this.titleMode === 'text';
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export const mediaQueryTile = window.matchMedia(`(max-width: 640px)`);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { html, renderIntoBody, nextTick } from 'shared/testutils';
|
|
2
|
-
|
|
3
|
-
import Tab from '../tab';
|
|
4
|
-
|
|
5
|
-
customElements.define('tds-tab', Tab.CustomElementConstructor);
|
|
6
|
-
|
|
7
|
-
describe('tds-tab', () => {
|
|
8
|
-
it('can be loaded and unloaded', async () => {
|
|
9
|
-
const element = renderIntoBody(html` <tds-tab>Hello</tds-tab> `);
|
|
10
|
-
|
|
11
|
-
expect(element.shadowRoot!.innerHTML).toEqual('');
|
|
12
|
-
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
element.load();
|
|
15
|
-
await nextTick();
|
|
16
|
-
|
|
17
|
-
expect(element.shadowRoot!.innerHTML).toEqual('<slot></slot>');
|
|
18
|
-
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
element.unload();
|
|
21
|
-
await nextTick();
|
|
22
|
-
|
|
23
|
-
expect(element.shadowRoot!.innerHTML).toEqual('');
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from 'lwc';
|
|
2
|
-
|
|
3
|
-
let uid = 0;
|
|
4
|
-
|
|
5
|
-
export type TabElement = {
|
|
6
|
-
label: string;
|
|
7
|
-
load: () => void;
|
|
8
|
-
title: string;
|
|
9
|
-
unload: () => void;
|
|
10
|
-
value: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default class extends LightningElement {
|
|
14
|
-
@api label: string | null = null;
|
|
15
|
-
@api value: string | null = null;
|
|
16
|
-
|
|
17
|
-
private loaded: boolean = false;
|
|
18
|
-
|
|
19
|
-
@api load() {
|
|
20
|
-
this.loaded = true;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@api unload() {
|
|
24
|
-
this.loaded = false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
connectedCallback() {
|
|
28
|
-
setTimeout(()=> {
|
|
29
|
-
this.dispatchEvent(
|
|
30
|
-
new CustomEvent('privatetabregister', {
|
|
31
|
-
cancelable: true,
|
|
32
|
-
bubbles: true,
|
|
33
|
-
composed: true,
|
|
34
|
-
detail: {
|
|
35
|
-
label: this.label,
|
|
36
|
-
title: this.title || this.label,
|
|
37
|
-
value: this.value || `tab-${uid++}`,
|
|
38
|
-
load: () => this.load(),
|
|
39
|
-
unload: () => this.unload()
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
}, 0);
|
|
45
|
-
}
|
|
46
|
-
}
|