@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,36 +0,0 @@
|
|
|
1
|
-
import { api, LightningElement } from 'lwc';
|
|
2
|
-
|
|
3
|
-
export default class extends LightningElement {
|
|
4
|
-
// In the future, this could accept a value of "auto" which
|
|
5
|
-
// could traverse the DOM tree and figure out the appropriate level
|
|
6
|
-
@api level: '1' | '2' | '3' | '4' | '5' | '6' | null = null;
|
|
7
|
-
|
|
8
|
-
private get isHeading() {
|
|
9
|
-
// If "level" is null, we render a <slot> and with no heading
|
|
10
|
-
return this.level !== null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
private get isLevel1() {
|
|
14
|
-
return this.level === '1';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
private get isLevel2() {
|
|
18
|
-
return this.level === '2';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
private get isLevel3() {
|
|
22
|
-
return this.level === '3';
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
private get isLevel4() {
|
|
26
|
-
return this.level === '4';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private get isLevel5() {
|
|
30
|
-
return this.level === '5';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
private get isLevel6() {
|
|
34
|
-
return this.level === '6';
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
@import 'tds/reset';
|
|
2
|
-
|
|
3
|
-
svg {
|
|
4
|
-
display: block;
|
|
5
|
-
fill: currentColor;
|
|
6
|
-
height: var(--icon-size);
|
|
7
|
-
width: var(--icon-size);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.size--x-small {
|
|
11
|
-
--icon-size: var(--tds-spacing-3);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.size--small {
|
|
15
|
-
--icon-size: var(--tds-spacing-4);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.size--medium {
|
|
19
|
-
--icon-size: var(--tds-spacing-5);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.size--large {
|
|
23
|
-
--icon-size: var(--tds-spacing-6);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.size--xlarge {
|
|
27
|
-
--icon-size: var(--tds-spacing-10);
|
|
28
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg
|
|
3
|
-
aria-hidden="true"
|
|
4
|
-
class={className}
|
|
5
|
-
if:false={context.crossOriginAssets}
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
>
|
|
8
|
-
<use xlink:href={href}></use>
|
|
9
|
-
</svg>
|
|
10
|
-
<svg
|
|
11
|
-
aria-hidden="true"
|
|
12
|
-
class={className}
|
|
13
|
-
if:true={context.crossOriginAssets}
|
|
14
|
-
lwc:dom="manual"
|
|
15
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
-
></svg>
|
|
17
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'tds/tds-icon',
|
|
5
|
-
parameters: {
|
|
6
|
-
modules: ['/modules/tds-icon.js']
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const Base = () => html`
|
|
11
|
-
<tds-icon size="large" symbol="edit"></tds-icon>
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
export const Action = () => html`
|
|
15
|
-
<div style="color: red">
|
|
16
|
-
<tds-icon size="large" sprite="action" symbol="check"></tds-icon>
|
|
17
|
-
</div>
|
|
18
|
-
`;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { api, LightningElement, wire } from 'lwc';
|
|
2
|
-
import { ContextAdapter, ContextAdapterValue } from 'tds/contextAdapter';
|
|
3
|
-
|
|
4
|
-
/* ROLLUP_PLATFORM
|
|
5
|
-
import * as iconUtils from 'lightning/iconUtils';
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
type Size = 'x-small' | 'small' | 'medium' | 'large' | 'xlarge' | 'override';
|
|
9
|
-
|
|
10
|
-
type Sprite =
|
|
11
|
-
| 'action'
|
|
12
|
-
| 'custom'
|
|
13
|
-
| 'doctype'
|
|
14
|
-
| 'social'
|
|
15
|
-
| 'social-round'
|
|
16
|
-
| 'utility';
|
|
17
|
-
|
|
18
|
-
const fetches = new Map<string, Promise<any>>();
|
|
19
|
-
|
|
20
|
-
export default class extends LightningElement {
|
|
21
|
-
@api sprite: Sprite = 'utility';
|
|
22
|
-
@api size: Size = 'medium';
|
|
23
|
-
@api symbol: string = '';
|
|
24
|
-
|
|
25
|
-
private node: SVGSymbolElement | undefined;
|
|
26
|
-
|
|
27
|
-
@wire(ContextAdapter)
|
|
28
|
-
private context: ContextAdapterValue = null!;
|
|
29
|
-
|
|
30
|
-
private get className() {
|
|
31
|
-
return `size--${this.size}`;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private get href() {
|
|
35
|
-
/* ROLLUP_PLATFORM
|
|
36
|
-
return iconUtils.getIconPath(`${this.sprite}:${this.symbol}`);
|
|
37
|
-
*/
|
|
38
|
-
return `${this.context.assetsUrl}/icons/${this.sprite}-sprite/svg/symbols.svg#${this.symbol}`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
private get symbolId() {
|
|
42
|
-
return `tds__${this.sprite}__${this.symbol}`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
renderedCallback() {
|
|
46
|
-
if (this.context.crossOriginAssets) {this.appendNodes();}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
private async appendNodes() {
|
|
50
|
-
if (process.env.NODE_ENV === 'test') {return;}
|
|
51
|
-
const { symbolId } = this;
|
|
52
|
-
if (this.node && this.node.id === symbolId) {return;}
|
|
53
|
-
await this.fetchSprite(this.sprite);
|
|
54
|
-
const svg = this.template.querySelector('svg')!;
|
|
55
|
-
const node = document
|
|
56
|
-
.getElementById(symbolId)!
|
|
57
|
-
.cloneNode(true) as SVGSymbolElement;
|
|
58
|
-
while (svg.firstChild) {svg.removeChild(svg.firstChild);}
|
|
59
|
-
for (const n of Array.from(node.childNodes)) {svg.appendChild(n);}
|
|
60
|
-
svg.setAttribute('viewBox', node.getAttribute('viewBox')!);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
private async fetchSprite(sprite: Sprite) {
|
|
64
|
-
if (fetches.has(sprite)) {return fetches.get(sprite);}
|
|
65
|
-
const promise = fetch(
|
|
66
|
-
`${this.context.assetsUrl}/icons/${this.sprite}-sprite/svg/symbols.svg`
|
|
67
|
-
)
|
|
68
|
-
.then((res) => res.text())
|
|
69
|
-
.then((svg) => svg.replace(/id=\"/g, `id="tds__${sprite}__`))
|
|
70
|
-
.then((svg) => {
|
|
71
|
-
const node = document.createElement('div');
|
|
72
|
-
node.innerHTML = svg;
|
|
73
|
-
node.style.display = 'none';
|
|
74
|
-
document.body.appendChild(node);
|
|
75
|
-
});
|
|
76
|
-
fetches.set(sprite, promise);
|
|
77
|
-
return promise;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { html, renderIntoBody } from 'shared/testutils';
|
|
2
|
-
|
|
3
|
-
import Input from '../input';
|
|
4
|
-
|
|
5
|
-
customElements.define('tds-input', Input.CustomElementConstructor);
|
|
6
|
-
|
|
7
|
-
describe('tds-input', () => {
|
|
8
|
-
it('renders a text input by default', () => {
|
|
9
|
-
const element = renderIntoBody(html` <tds-input></tds-input> `);
|
|
10
|
-
|
|
11
|
-
const input = element.shadowRoot!.querySelector('input');
|
|
12
|
-
|
|
13
|
-
expect(input).toHaveAttribute('type', 'text');
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('accepts attributes', () => {
|
|
17
|
-
const element = renderIntoBody(
|
|
18
|
-
html`
|
|
19
|
-
<tds-input
|
|
20
|
-
value="value"
|
|
21
|
-
placeholder="placeholder"
|
|
22
|
-
disabled
|
|
23
|
-
></tds-input>
|
|
24
|
-
`
|
|
25
|
-
);
|
|
26
|
-
const input = element.shadowRoot!.querySelector('input');
|
|
27
|
-
|
|
28
|
-
expect(input!.value).toBe('value');
|
|
29
|
-
expect(input!.placeholder).toBe('placeholder');
|
|
30
|
-
expect(input!.disabled).toBe(true);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it('ignores undefined attributes', () => {
|
|
34
|
-
const element = renderIntoBody(html` <tds-input></tds-input> `);
|
|
35
|
-
const input = element.shadowRoot!.querySelector('input');
|
|
36
|
-
|
|
37
|
-
expect(input!.value).toBe('');
|
|
38
|
-
expect(input!.placeholder).toBe('');
|
|
39
|
-
expect(input!.disabled).toBe(false);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
@import 'tds/reset';
|
|
2
|
-
|
|
3
|
-
label {
|
|
4
|
-
overflow-wrap: break-word;
|
|
5
|
-
word-wrap: break-word;
|
|
6
|
-
hyphens: auto;
|
|
7
|
-
display: block;
|
|
8
|
-
padding-right: var(--tds-spacing-2);
|
|
9
|
-
padding-top: var(--tds-spacing-2);
|
|
10
|
-
color: var(--tds-color-meteorite);
|
|
11
|
-
font-size: var(--tds-font-size-xs);
|
|
12
|
-
margin-bottom: var(--tds-spacing-2);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.text-input {
|
|
16
|
-
font-size: var(--tds-font-size-sm);
|
|
17
|
-
background-color: var(--tds-color-white);
|
|
18
|
-
border: 1px solid var(--tds-color-fog);
|
|
19
|
-
border-radius: var(--tds-radius-md);
|
|
20
|
-
transition: border 0.1s linear, background-color 0.1s linear;
|
|
21
|
-
display: block;
|
|
22
|
-
width: 100%;
|
|
23
|
-
padding: var(--tds-spacing-1) var(--tds-spacing-4) var(--tds-spacing-1)
|
|
24
|
-
var(--tds-spacing-3);
|
|
25
|
-
line-height: 1.875rem;
|
|
26
|
-
min-height: calc(1.875rem + (1px * 2));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.text-input[disabled] {
|
|
30
|
-
background-color: var(--tds-color-fog);
|
|
31
|
-
border-color: var(--tds-color-granite);
|
|
32
|
-
cursor: not-allowed;
|
|
33
|
-
user-select: none;
|
|
34
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'tds/tds-input',
|
|
5
|
-
parameters: {
|
|
6
|
-
modules: ['/modules/tds-input.js']
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const Base = () => html`
|
|
11
|
-
<tds-input
|
|
12
|
-
type="text"
|
|
13
|
-
label="Input Label"
|
|
14
|
-
value="Hello, World!"
|
|
15
|
-
></tds-input>
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
export const Disabled = () => html`
|
|
19
|
-
<tds-input
|
|
20
|
-
type="text"
|
|
21
|
-
label="Input Label"
|
|
22
|
-
value="Hello, World!"
|
|
23
|
-
disabled
|
|
24
|
-
></tds-input>
|
|
25
|
-
`;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from 'lwc';
|
|
2
|
-
import { BooleanAttr } from 'shared/types.d';
|
|
3
|
-
import { attrToBool } from 'shared/helpers';
|
|
4
|
-
// @ts-ignore - LWC HTML template
|
|
5
|
-
import input from './input.html';
|
|
6
|
-
|
|
7
|
-
// TODO add other options in the future (date, color, password, etc)
|
|
8
|
-
export type InputType = 'text';
|
|
9
|
-
|
|
10
|
-
export default class extends LightningElement {
|
|
11
|
-
@api type: InputType = 'text';
|
|
12
|
-
@api value: string | null = null;
|
|
13
|
-
@api label: string | null = null;
|
|
14
|
-
@api placeholder: string | null = null;
|
|
15
|
-
@api disabled: BooleanAttr = false;
|
|
16
|
-
|
|
17
|
-
render() {
|
|
18
|
-
switch (this.type) {
|
|
19
|
-
default:
|
|
20
|
-
return input;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
private get _value() {
|
|
25
|
-
return typeof this.value === 'string' ? this.value : null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
private get isDisabled() {
|
|
29
|
-
return attrToBool(this.disabled);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
private get isTypeText(): boolean {
|
|
33
|
-
return this.type === 'text';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
private handleChange(e: { target: HTMLInputElement }) {
|
|
37
|
-
this.dispatchEvent(
|
|
38
|
-
new CustomEvent('change', { detail: e.target.value })
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<template></template>
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from 'lwc';
|
|
2
|
-
|
|
3
|
-
const TRACKING_EVENT_NAME = 'architectssite_track';
|
|
4
|
-
const LISTENER_QUEUE = '__TDS_INSTRUMENTATION_QUEUE__';
|
|
5
|
-
const LISTENER_INDICATOR = '__TDS_INSTRUMENTATION_IS_INITIALIZED__';
|
|
6
|
-
|
|
7
|
-
export function track(
|
|
8
|
-
element: EventTarget,
|
|
9
|
-
event: string,
|
|
10
|
-
payload: Record<string, unknown>
|
|
11
|
-
): void {
|
|
12
|
-
const detail = { event, payload };
|
|
13
|
-
// if window.LISTENER_INDICATOR is undefined, `tds-instrumentation` has not
|
|
14
|
-
// been mounted, and the listener hasn't been attached.
|
|
15
|
-
if ((window as any)[LISTENER_INDICATOR] === undefined) {
|
|
16
|
-
(window as any)[LISTENER_QUEUE] = (window as any)[LISTENER_QUEUE] || [];
|
|
17
|
-
(window as any)[LISTENER_QUEUE].push(detail);
|
|
18
|
-
} else {
|
|
19
|
-
const e = new CustomEvent(TRACKING_EVENT_NAME, {
|
|
20
|
-
bubbles: true,
|
|
21
|
-
composed: true,
|
|
22
|
-
detail
|
|
23
|
-
});
|
|
24
|
-
element.dispatchEvent(e);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const googleTagManager = {
|
|
29
|
-
track: function (e: Event) {
|
|
30
|
-
if ((window as any).dataLayer === undefined) {
|
|
31
|
-
(window as any).dataLayer = [];
|
|
32
|
-
}
|
|
33
|
-
const { event, payload } = (e as CustomEvent).detail;
|
|
34
|
-
(window as any).dataLayer.push({ ...payload, event });
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
interface TrackEventListener {
|
|
39
|
-
add: () => void;
|
|
40
|
-
remove: () => void;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function trackEventListener(
|
|
44
|
-
trackerFns: { track: (e: Event) => void }[] = []
|
|
45
|
-
): TrackEventListener {
|
|
46
|
-
if (trackerFns.length === 0) {
|
|
47
|
-
throw new Error('No tracker functions passed');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const trackWebEvent = (e: Event) => {
|
|
51
|
-
trackerFns.forEach((tracker) => {
|
|
52
|
-
tracker.track(e);
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const attachEventListener = () => {
|
|
57
|
-
document.addEventListener(TRACKING_EVENT_NAME, trackWebEvent);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const removeEventListener = () => {
|
|
61
|
-
document.removeEventListener(TRACKING_EVENT_NAME, trackWebEvent);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
add: attachEventListener,
|
|
66
|
-
remove: removeEventListener
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default class Instrumentation extends LightningElement {
|
|
71
|
-
@api useGoogleTagManager = false;
|
|
72
|
-
|
|
73
|
-
private tracker: TrackEventListener | null = null;
|
|
74
|
-
|
|
75
|
-
private setupTracker() {
|
|
76
|
-
const trackerFunctions = this.useGoogleTagManager
|
|
77
|
-
? [googleTagManager]
|
|
78
|
-
: [];
|
|
79
|
-
this.tracker = trackEventListener(trackerFunctions);
|
|
80
|
-
this.tracker.add();
|
|
81
|
-
(window as any)[LISTENER_INDICATOR] = true;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
private dispatchQueuedEvents() {
|
|
85
|
-
while ((window as any)[LISTENER_QUEUE].length > 0) {
|
|
86
|
-
const event = (window as any)[LISTENER_QUEUE].pop() as {
|
|
87
|
-
event: string;
|
|
88
|
-
payload: Record<string, unknown>;
|
|
89
|
-
};
|
|
90
|
-
track(this, event.event, event.payload);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
renderedCallback() {
|
|
95
|
-
if (this.tracker === null) {
|
|
96
|
-
this.setupTracker();
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
(window as any)[LISTENER_QUEUE] !== undefined &&
|
|
100
|
-
(window as any)[LISTENER_QUEUE].length > 0
|
|
101
|
-
) {
|
|
102
|
-
this.dispatchQueuedEvents();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
disconnectedCallback() {
|
|
108
|
-
if (this.tracker !== null) {
|
|
109
|
-
this.tracker.remove();
|
|
110
|
-
this.tracker = null;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
.body {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
min-height: 185px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.text > div {
|
|
9
|
-
margin-bottom: var(--tds-spacing-3);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.title {
|
|
13
|
-
font-size: var(--tds-font-size-xl);
|
|
14
|
-
font-weight: 700;
|
|
15
|
-
line-height: var(--tds-line-height-relaxed);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.subtitle {
|
|
19
|
-
font-size: var(--tds-font-size-sm);
|
|
20
|
-
font-weight: 400;
|
|
21
|
-
line-height: var(--tds-line-height-snug);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.cta {
|
|
25
|
-
text-decoration: underline;
|
|
26
|
-
color: var(--dx-g-blue-vibrant-20);
|
|
27
|
-
font-weight: 600;
|
|
28
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<dx-card-content borderless="false" fix-orientation="true" href={href}>
|
|
3
|
-
<div slot="body" class="body">
|
|
4
|
-
<div class="text">
|
|
5
|
-
<div lwc:if={showBadge}>
|
|
6
|
-
<tds-badge color="blue">{badgeText}</tds-badge>
|
|
7
|
-
</div>
|
|
8
|
-
<div>
|
|
9
|
-
<span class="subtitle">{subtitle}</span>
|
|
10
|
-
<div class="title">{title}</div>
|
|
11
|
-
</div>
|
|
12
|
-
<div>
|
|
13
|
-
<span>{body}</span>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<div>
|
|
17
|
-
<a href={href} class="cta">{ctaText}</a>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</dx-card-content>
|
|
21
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from 'lwc';
|
|
2
|
-
|
|
3
|
-
export default class extends LightningElement {
|
|
4
|
-
@api href: string = '#';
|
|
5
|
-
@api includeBadge: boolean | string = false;
|
|
6
|
-
@api badgeText: string = '';
|
|
7
|
-
@api subtitle: string = '';
|
|
8
|
-
@api title: string = '';
|
|
9
|
-
@api body: string = '';
|
|
10
|
-
@api ctaText: string = '';
|
|
11
|
-
|
|
12
|
-
get showBadge() {
|
|
13
|
-
return (
|
|
14
|
-
(this.includeBadge === true || this.includeBadge === 'true') &&
|
|
15
|
-
this.badgeText
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { html, renderIntoBody, nextTick } from 'shared/testutils';
|
|
2
|
-
|
|
3
|
-
import Pill from '../pill';
|
|
4
|
-
|
|
5
|
-
customElements.define('tds-pill', Pill.CustomElementConstructor);
|
|
6
|
-
|
|
7
|
-
const TITLE = 'Title';
|
|
8
|
-
const LABEL = 'Label';
|
|
9
|
-
|
|
10
|
-
describe('tds-pill', () => {
|
|
11
|
-
// Skip these tests as LWC in test mode doesn't support child nodes for light DOM components
|
|
12
|
-
// The pill component uses slots for label text, which isn't compatible with lit-html rendering in tests
|
|
13
|
-
it.skip('forwards the title attribute to the label', async () => {
|
|
14
|
-
const element = renderIntoBody(
|
|
15
|
-
html` <tds-pill title=${TITLE}>${LABEL}</tds-pill> `
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
await nextTick();
|
|
19
|
-
|
|
20
|
-
expect(
|
|
21
|
-
element
|
|
22
|
-
.shadowRoot!.querySelector('.pill__label')!
|
|
23
|
-
.getAttribute('title')
|
|
24
|
-
).toEqual(TITLE);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it.skip('uses slot text as a title fallback', async () => {
|
|
28
|
-
const element = renderIntoBody(html` <tds-pill>${LABEL}</tds-pill> `);
|
|
29
|
-
|
|
30
|
-
await nextTick();
|
|
31
|
-
|
|
32
|
-
expect(
|
|
33
|
-
element
|
|
34
|
-
.shadowRoot!.querySelector('.pill__label')!
|
|
35
|
-
.getAttribute('title')
|
|
36
|
-
).toEqual(LABEL);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it.skip('accepts a title for the remove button', async () => {
|
|
40
|
-
const element = renderIntoBody(
|
|
41
|
-
html` <tds-pill remove-button-title="Clear">${LABEL}</tds-pill> `
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
expect(
|
|
45
|
-
element
|
|
46
|
-
.shadowRoot!.querySelector('.pill__remove')!
|
|
47
|
-
.getAttribute('title')
|
|
48
|
-
).toEqual('Clear');
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('renders the component', () => {
|
|
52
|
-
const element = renderIntoBody(html`<tds-pill></tds-pill>`);
|
|
53
|
-
expect(element).toBeTruthy();
|
|
54
|
-
expect(element.shadowRoot).toBeTruthy();
|
|
55
|
-
});
|
|
56
|
-
});
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
@import 'tds/reset';
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
max-width: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.pill {
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
position: relative;
|
|
12
|
-
color: var(--tds-color-meteorite);
|
|
13
|
-
border: 1px solid var(--tds-color-granite);
|
|
14
|
-
border-radius: var(--tds-radius-md);
|
|
15
|
-
padding-left: var(--tds-spacing-3);
|
|
16
|
-
padding-right: var(--tds-spacing-8);
|
|
17
|
-
height: var(--tds-spacing-10);
|
|
18
|
-
max-width: 100%;
|
|
19
|
-
box-sizing: border-box;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.pill:not(.pill--bare):hover {
|
|
23
|
-
background-color: var(--tds-color-sand);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.pill--link {
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
color: var(--tds-color-brand);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.pill--bare {
|
|
32
|
-
border-color: transparent;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.pill__label {
|
|
36
|
-
font-size: var(--tds-font-size-sm);
|
|
37
|
-
white-space: nowrap;
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
text-overflow: ellipsis;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.pill__remove {
|
|
43
|
-
color: var(--tds-color-meteorite);
|
|
44
|
-
border: none;
|
|
45
|
-
background-color: transparent;
|
|
46
|
-
padding: 2px;
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
position: absolute;
|
|
49
|
-
right: var(--tds-spacing-2);
|
|
50
|
-
top: 50%;
|
|
51
|
-
transform: translateY(-50%);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.pill__remove:hover,
|
|
55
|
-
.pill__remove:focus {
|
|
56
|
-
color: var(--tds-color-black);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.assistive-text {
|
|
60
|
-
position: absolute !important;
|
|
61
|
-
margin: -1px !important;
|
|
62
|
-
border: 0 !important;
|
|
63
|
-
padding: 0 !important;
|
|
64
|
-
width: 1px !important;
|
|
65
|
-
height: 1px !important;
|
|
66
|
-
overflow: hidden !important;
|
|
67
|
-
clip: rect(0 0 0 0) !important;
|
|
68
|
-
text-transform: none !important;
|
|
69
|
-
white-space: nowrap !important;
|
|
70
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class={className} role="option" aria-selected="true">
|
|
3
|
-
<div class="pill__label" title={titleWithFallback}>
|
|
4
|
-
<slot onslotchange={setTitle}></slot>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<button
|
|
8
|
-
class="pill__remove"
|
|
9
|
-
title={removeButtonTitle}
|
|
10
|
-
onclick={handleRemove}
|
|
11
|
-
>
|
|
12
|
-
<tds-icon symbol="close" size="x-small"></tds-icon>
|
|
13
|
-
|
|
14
|
-
<div class="assistive-text">{removeButtonTitle}</div>
|
|
15
|
-
</button>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|