@salesforcedevs/arch-components 1.20.17-alpha4 → 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,209 +0,0 @@
|
|
|
1
|
-
import { ShadowRootTheGoodPart } from 'lwc';
|
|
2
|
-
|
|
3
|
-
type Input = {
|
|
4
|
-
onChange: (state: ListboxState) => void;
|
|
5
|
-
onSelect: (index: number) => void;
|
|
6
|
-
onSubmit: () => void;
|
|
7
|
-
shadowRoot: ShadowRootTheGoodPart;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type ListboxState = {
|
|
11
|
-
active: boolean;
|
|
12
|
-
selectedIndex: number;
|
|
13
|
-
setup: boolean;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type Selector = 'root' | 'input' | 'options' | 'option';
|
|
17
|
-
|
|
18
|
-
const SELECTOR_ROOT = 'root';
|
|
19
|
-
const SELECTOR_INPUT = 'input';
|
|
20
|
-
const SELECTOR_OPTIONS = 'options';
|
|
21
|
-
const SELECTOR_OPTION = 'option';
|
|
22
|
-
|
|
23
|
-
export function getSelector(selector: Selector) {
|
|
24
|
-
return `[data-listbox="${selector}"]`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export class Listbox {
|
|
28
|
-
private _count: number = 0;
|
|
29
|
-
private _state: ListboxState = {
|
|
30
|
-
active: false,
|
|
31
|
-
selectedIndex: -1,
|
|
32
|
-
setup: false
|
|
33
|
-
};
|
|
34
|
-
private get state(): ListboxState {
|
|
35
|
-
return this._state;
|
|
36
|
-
}
|
|
37
|
-
private set state(value: ListboxState) {
|
|
38
|
-
this._state = value;
|
|
39
|
-
this.update();
|
|
40
|
-
this.input.onChange(this._state);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
private get isExpanded() {
|
|
44
|
-
return this.state.active && this._count > 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
private hover = false;
|
|
48
|
-
|
|
49
|
-
constructor(private input: Input) {
|
|
50
|
-
input.onChange(this.state);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
private setState(
|
|
54
|
-
nextState:
|
|
55
|
-
| Partial<ListboxState>
|
|
56
|
-
| ((state: ListboxState) => Partial<ListboxState>)
|
|
57
|
-
) {
|
|
58
|
-
const { state } = this;
|
|
59
|
-
this.state = {
|
|
60
|
-
...state,
|
|
61
|
-
...(typeof nextState === 'function' ? nextState(state) : nextState)
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
renderedCallback() {
|
|
66
|
-
if (!this.state.setup) {
|
|
67
|
-
const $input = this.getElement('input')!;
|
|
68
|
-
const $options = this.getElement(SELECTOR_OPTIONS)!;
|
|
69
|
-
$input.addEventListener('blur', this.onBlur as EventListener);
|
|
70
|
-
$input.addEventListener('focus', this.onFocus as EventListener);
|
|
71
|
-
$input.addEventListener('keydown', this.onKeyDown as EventListener);
|
|
72
|
-
$options.addEventListener('click', this.onClick as EventListener);
|
|
73
|
-
$options.addEventListener('mouseenter', this.onMouseEnter as EventListener);
|
|
74
|
-
$options.addEventListener('mouseleave', this.onMouseLeave as EventListener);
|
|
75
|
-
this.state.setup = true;
|
|
76
|
-
}
|
|
77
|
-
this._count = this.input.shadowRoot.querySelectorAll(
|
|
78
|
-
getSelector(SELECTOR_OPTION)
|
|
79
|
-
).length;
|
|
80
|
-
this.update();
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
disconnectedCallback() {
|
|
84
|
-
const $input = this.getElement(SELECTOR_INPUT)!;
|
|
85
|
-
const $options = this.getElement(SELECTOR_OPTIONS)!;
|
|
86
|
-
if ($input) {
|
|
87
|
-
$input.removeEventListener('blur', this.onBlur as EventListener);
|
|
88
|
-
$input.removeEventListener('focus', this.onFocus as EventListener);
|
|
89
|
-
$input.removeEventListener('keydown', this.onKeyDown as EventListener);
|
|
90
|
-
}
|
|
91
|
-
if ($options) {
|
|
92
|
-
$options.removeEventListener('click', this.onClick as EventListener);
|
|
93
|
-
$options.removeEventListener('mouseenter', this.onMouseEnter as EventListener);
|
|
94
|
-
$options.removeEventListener('mouseleave', this.onMouseLeave as EventListener);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
private getElement(selector: Selector) {
|
|
99
|
-
return this.input.shadowRoot.querySelector(getSelector(selector));
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
private onClick = (e: MouseEvent) => {
|
|
103
|
-
const selectedIndex = Array.from(
|
|
104
|
-
this.input.shadowRoot.querySelectorAll(getSelector(SELECTOR_OPTION))
|
|
105
|
-
).findIndex((n) => n.contains(e.target as HTMLElement));
|
|
106
|
-
this.setState({ active: false, selectedIndex });
|
|
107
|
-
this.input.onSelect(this.state.selectedIndex);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
private onBlur = (e: FocusEvent) => {
|
|
111
|
-
if (!this.hover) {
|
|
112
|
-
this.setState({ active: false });
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
private onFocus = (e: FocusEvent) => {
|
|
117
|
-
this.setState({ active: true, selectedIndex: -1 });
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
private onKeyDown = (e: KeyboardEvent) => {
|
|
121
|
-
switch (e.key) {
|
|
122
|
-
case 'ArrowUp':
|
|
123
|
-
this.setState((state) => {
|
|
124
|
-
let { selectedIndex } = state;
|
|
125
|
-
selectedIndex--;
|
|
126
|
-
if (selectedIndex < 0) {selectedIndex = this._count - 1;}
|
|
127
|
-
return { selectedIndex };
|
|
128
|
-
});
|
|
129
|
-
break;
|
|
130
|
-
case 'ArrowDown':
|
|
131
|
-
this.setState((state) => {
|
|
132
|
-
let { selectedIndex } = state;
|
|
133
|
-
selectedIndex++;
|
|
134
|
-
if (selectedIndex === this._count) {selectedIndex = 0;}
|
|
135
|
-
return { selectedIndex };
|
|
136
|
-
});
|
|
137
|
-
break;
|
|
138
|
-
case 'Enter':
|
|
139
|
-
this.setState({ active: false });
|
|
140
|
-
if (this.state.selectedIndex > -1) {
|
|
141
|
-
this.input.onSelect(this.state.selectedIndex);
|
|
142
|
-
} else {
|
|
143
|
-
this.input.onSubmit();
|
|
144
|
-
}
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
private onMouseEnter = (e: MouseEvent) => {
|
|
150
|
-
this.hover = true;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
private onMouseLeave = (e: MouseEvent) => {
|
|
154
|
-
this.hover = false;
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
private setRootAttributes() {
|
|
158
|
-
const $root = this.getElement(SELECTOR_ROOT)!;
|
|
159
|
-
$root.setAttribute('aria-expanded', String(this.isExpanded));
|
|
160
|
-
$root.setAttribute('aria-haspopup', 'listbox');
|
|
161
|
-
$root.setAttribute('role', 'combobox');
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
private setInputAttributes() {
|
|
165
|
-
const $activeDecendant = this.input.shadowRoot.querySelectorAll(
|
|
166
|
-
getSelector(SELECTOR_OPTION)
|
|
167
|
-
)[this.state.selectedIndex] as HTMLElement | undefined;
|
|
168
|
-
const $input = this.getElement(SELECTOR_INPUT)!;
|
|
169
|
-
const $options = this.getElement(SELECTOR_OPTIONS)!;
|
|
170
|
-
$input.setAttribute(
|
|
171
|
-
'aria-activedescendant',
|
|
172
|
-
$activeDecendant ? $activeDecendant.getAttribute('id') || '' : ''
|
|
173
|
-
);
|
|
174
|
-
$input.setAttribute('aria-autocomplete', 'list');
|
|
175
|
-
$input.setAttribute('aria-controls', $options.getAttribute('id') || '');
|
|
176
|
-
$input.setAttribute('autocomplete', 'off');
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
private setListboxAttributes() {
|
|
180
|
-
const $options = this.getElement(SELECTOR_OPTIONS)!;
|
|
181
|
-
$options.setAttribute('role', 'listbox');
|
|
182
|
-
$options.setAttribute('aria-hidden', String(!this.isExpanded));
|
|
183
|
-
this.input.shadowRoot.querySelectorAll('ui,li').forEach((node) => {
|
|
184
|
-
const element = node as HTMLElement;
|
|
185
|
-
if (element.hasAttribute('role')) {return;}
|
|
186
|
-
element.setAttribute('role', 'presentation');
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
private setListboxItemAttributes() {
|
|
191
|
-
this.input.shadowRoot
|
|
192
|
-
.querySelectorAll(getSelector(SELECTOR_OPTION))
|
|
193
|
-
.forEach((node, i) => {
|
|
194
|
-
const element = node as HTMLElement;
|
|
195
|
-
element.setAttribute(
|
|
196
|
-
'aria-selected',
|
|
197
|
-
String(i === this.state.selectedIndex)
|
|
198
|
-
);
|
|
199
|
-
element.setAttribute('role', 'option');
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
private update() {
|
|
204
|
-
this.setRootAttributes();
|
|
205
|
-
this.setInputAttributes();
|
|
206
|
-
this.setListboxAttributes();
|
|
207
|
-
this.setListboxItemAttributes();
|
|
208
|
-
}
|
|
209
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
@import 'tds/reset';
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
font-size: var(--tds-font-size-md);
|
|
5
|
-
position: relative;
|
|
6
|
-
width: 100%;
|
|
7
|
-
z-index: 10;
|
|
8
|
-
padding-top: 10px;
|
|
9
|
-
padding-bottom: 10px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.search-input__wrapper {
|
|
13
|
-
align-items: stretch;
|
|
14
|
-
display: flex;
|
|
15
|
-
position: relative;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.search-input__label {
|
|
19
|
-
position: absolute !important;
|
|
20
|
-
height: 1px;
|
|
21
|
-
width: 1px;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
clip: rect(1px, 1px, 1px, 1px);
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.search-input__input {
|
|
28
|
-
border-radius: var(--tds-radius-md);
|
|
29
|
-
border: 1px solid var(--tds-color-fog);
|
|
30
|
-
color: var(--tds-color-black);
|
|
31
|
-
flex: 1;
|
|
32
|
-
font-family: inherit;
|
|
33
|
-
font-size: var(--tds-font-size-md);
|
|
34
|
-
line-height: 1.875;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
padding: 0.4rem 0;
|
|
37
|
-
padding-left: var(--tds-spacing-8);
|
|
38
|
-
position: relative;
|
|
39
|
-
text-overflow: ellipsis;
|
|
40
|
-
transition: border 0.1s linear, background-color 0.1s linear;
|
|
41
|
-
white-space: nowrap;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.search-input__icon {
|
|
45
|
-
color: var(--tds-color-granite);
|
|
46
|
-
left: 10px;
|
|
47
|
-
position: absolute;
|
|
48
|
-
top: 13px;
|
|
49
|
-
z-index: 1;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.search-results {
|
|
53
|
-
background-color: white;
|
|
54
|
-
border-radius: var(--tds-radius-lg);
|
|
55
|
-
box-shadow: var(--tds-shadow-lg);
|
|
56
|
-
left: 0;
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
padding: var(--tds-spacing-6);
|
|
61
|
-
box-sizing: border-box;
|
|
62
|
-
margin-top: var(--tds-spacing-1);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.search-result:hover,
|
|
66
|
-
.search-result[aria-selected='true'] {
|
|
67
|
-
background-color: var(--tds-color-sand);
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
border-radius: var(--tds-radius-lg);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.search-result,
|
|
73
|
-
.search-result__heading {
|
|
74
|
-
color: var(--tds-color-black);
|
|
75
|
-
font-size: var(--tds-font-size-sm);
|
|
76
|
-
line-height: var(--tds-line-height-snug);
|
|
77
|
-
padding-left: var(--tds-spacing-2);
|
|
78
|
-
padding-right: var(--tds-spacing-2);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.search-result__heading {
|
|
82
|
-
font-weight: bold;
|
|
83
|
-
margin: var(--tds-spacing-5) 0 var(--tds-spacing-1) 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.search-result__group:first-child .search-result__heading {
|
|
87
|
-
font-weight: bold;
|
|
88
|
-
margin: 0 0 var(--tds-spacing-1) 0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.search-result {
|
|
92
|
-
align-items: center;
|
|
93
|
-
display: flex;
|
|
94
|
-
padding: var(--tds-spacing-2);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.search-result__icon {
|
|
98
|
-
color: #b0adab; /* TODO: token */
|
|
99
|
-
margin-right: var(--tds-spacing-2);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.search-result__image {
|
|
103
|
-
border-radius: var(--tds-radius-lg);
|
|
104
|
-
margin-right: var(--tds-spacing-2);
|
|
105
|
-
max-width: 40px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.search-result__pretitle {
|
|
109
|
-
color: var(--tds-color-meteorite);
|
|
110
|
-
font-size: var(--tds-font-size-sm);
|
|
111
|
-
line-height: var(--tds-line-height-snug);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.search-result__title {
|
|
115
|
-
color: var(--tds-color-black);
|
|
116
|
-
font-size: var(--tds-font-size-md);
|
|
117
|
-
font-weight: bold;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
[data-listbox='options'][aria-hidden='true'] {
|
|
121
|
-
display: none;
|
|
122
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="search" data-listbox="root">
|
|
3
|
-
<div class="search-input__wrapper">
|
|
4
|
-
<label class="search-input__label" for="search"
|
|
5
|
-
>{placeholder}</label
|
|
6
|
-
>
|
|
7
|
-
<tds-icon
|
|
8
|
-
class="search-input__icon"
|
|
9
|
-
size="small"
|
|
10
|
-
symbol="search"
|
|
11
|
-
></tds-icon>
|
|
12
|
-
<input
|
|
13
|
-
class="search-input__input"
|
|
14
|
-
id="search"
|
|
15
|
-
onkeydown={onInput}
|
|
16
|
-
onfocus={onFocus}
|
|
17
|
-
placeholder={placeholder}
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
|
|
3
|
-
import { completions, recents } from './__fixtures__/';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'tds/tds-search',
|
|
7
|
-
parameters: {
|
|
8
|
-
modules: ['/modules/tds-search.js']
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Completions = () =>
|
|
13
|
-
html`
|
|
14
|
-
<tds-search .completions=${completions} placeholder="Really really long placeholder that is too long"></th-search>
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
export const Recents = () =>
|
|
18
|
-
html`
|
|
19
|
-
<tds-search .recents=${recents}></th-search>
|
|
20
|
-
`;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { api, LightningElement } from 'lwc';
|
|
2
|
-
|
|
3
|
-
import { Listbox, ListboxState } from './lib/listbox';
|
|
4
|
-
|
|
5
|
-
import { Completion, RecentSection, SearchEvent } from './types';
|
|
6
|
-
|
|
7
|
-
export default class extends LightningElement {
|
|
8
|
-
@api completions: Completion[] | null = [];
|
|
9
|
-
@api defaultValue: string | null = null;
|
|
10
|
-
@api placeholder: string = 'Search on architect.salesforce.com';
|
|
11
|
-
@api recents: RecentSection[] | null = null;
|
|
12
|
-
|
|
13
|
-
private completionTerms: string | null = null;
|
|
14
|
-
private setup = false;
|
|
15
|
-
|
|
16
|
-
private listbox = new Listbox({
|
|
17
|
-
onChange: (state) => {
|
|
18
|
-
this.listboxState = state;
|
|
19
|
-
},
|
|
20
|
-
onSelect: (index) => {
|
|
21
|
-
const { completions, hasCompletions, hasRecents, recents } = this;
|
|
22
|
-
if (hasCompletions) {
|
|
23
|
-
this.dispatchSearchEvent({
|
|
24
|
-
type: 'completion',
|
|
25
|
-
value: completions![index]
|
|
26
|
-
});
|
|
27
|
-
} else if (hasRecents) {
|
|
28
|
-
this.dispatchSearchEvent({
|
|
29
|
-
type: 'recent',
|
|
30
|
-
value: recents!.flatMap((s) => s.items)[index]
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
onSubmit: () => {
|
|
35
|
-
const { completionTerms } = this;
|
|
36
|
-
if (!completionTerms) {return;}
|
|
37
|
-
this.dispatchSearchEvent({ type: 'input', value: completionTerms });
|
|
38
|
-
},
|
|
39
|
-
shadowRoot: this.template
|
|
40
|
-
});
|
|
41
|
-
private listboxState: ListboxState | null = null;
|
|
42
|
-
|
|
43
|
-
private get hasCompletions() {
|
|
44
|
-
return this.completions && this.completions.length > 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
private get hasRecents() {
|
|
48
|
-
return this.recents && this.recents.length > 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
private get recentsWithStyle() {
|
|
52
|
-
return this.recents!.map((section) =>
|
|
53
|
-
Object.assign({}, section, {
|
|
54
|
-
items: section.items.map((item) =>
|
|
55
|
-
Object.assign({}, item, {
|
|
56
|
-
iconStyle: item.iconBackgroundColor
|
|
57
|
-
? `background-color: ${item.iconBackgroundColor};`
|
|
58
|
-
: ''
|
|
59
|
-
})
|
|
60
|
-
)
|
|
61
|
-
})
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
private dispatchSearchEvent(event: SearchEvent) {
|
|
66
|
-
this.dispatchEvent(new CustomEvent('search', { detail: event }));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
private onFocus(e: FocusEvent) {
|
|
70
|
-
this.dispatchEvent(new CustomEvent('focus'));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
private onInput(e: InputEvent) {
|
|
74
|
-
const { value } = e.currentTarget as HTMLInputElement;
|
|
75
|
-
if ((e as any).key === 'Enter') {
|
|
76
|
-
const search = encodeURIComponent(value);
|
|
77
|
-
window.location.replace(`/search/?keywords=${search}`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
private get showRecents() {
|
|
82
|
-
const { completionTerms, hasCompletions, hasRecents, listboxState } =
|
|
83
|
-
this;
|
|
84
|
-
if (!listboxState) {return false;}
|
|
85
|
-
if (completionTerms && completionTerms.length) {return false;}
|
|
86
|
-
return listboxState.active && hasRecents && !hasCompletions;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private get showCompletions() {
|
|
90
|
-
const { hasCompletions, listboxState } = this;
|
|
91
|
-
if (!listboxState) {return false;}
|
|
92
|
-
return listboxState.active && hasCompletions;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
renderedCallback() {
|
|
96
|
-
if (!this.setup) {
|
|
97
|
-
this.setup = true;
|
|
98
|
-
if (this.defaultValue) {
|
|
99
|
-
const input = this.template.querySelector(
|
|
100
|
-
'input'
|
|
101
|
-
) as HTMLInputElement;
|
|
102
|
-
input.value = this.defaultValue;
|
|
103
|
-
this.completionTerms = this.defaultValue;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type Completion = {
|
|
2
|
-
value: string;
|
|
3
|
-
valueHighlighted?: string;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
export type Recent = {
|
|
7
|
-
icon?: string;
|
|
8
|
-
iconBackgroundColor?: string;
|
|
9
|
-
path: string;
|
|
10
|
-
pretitle: string;
|
|
11
|
-
title: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type RecentSection = {
|
|
15
|
-
items: Recent[];
|
|
16
|
-
title: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type SearchEvent =
|
|
20
|
-
| { type: 'completion'; value: Completion }
|
|
21
|
-
| { type: 'input'; value: string }
|
|
22
|
-
| { type: 'recent'; value: Recent };
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
@import 'tds/reset';
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
font-size: var(--tds-font-size-md);
|
|
5
|
-
position: relative;
|
|
6
|
-
width: 100%;
|
|
7
|
-
z-index: 10;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.search-input__wrapper {
|
|
11
|
-
align-items: stretch;
|
|
12
|
-
display: flex;
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.search-input__label {
|
|
17
|
-
position: absolute !important;
|
|
18
|
-
height: 1px;
|
|
19
|
-
width: 1px;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
clip: rect(1px, 1px, 1px, 1px);
|
|
22
|
-
white-space: nowrap;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.search-input__input {
|
|
26
|
-
border-radius: var(--tds-radius-md);
|
|
27
|
-
border: 1px solid var(--tds-color-fog);
|
|
28
|
-
color: var(--tds-color-black);
|
|
29
|
-
flex: 1;
|
|
30
|
-
font-family: inherit;
|
|
31
|
-
font-size: var(--tds-font-size-md);
|
|
32
|
-
line-height: 1.875;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
padding: 0.4rem 0;
|
|
35
|
-
padding-left: var(--tds-spacing-8);
|
|
36
|
-
position: relative;
|
|
37
|
-
text-overflow: ellipsis;
|
|
38
|
-
transition: border 0.1s linear, background-color 0.1s linear;
|
|
39
|
-
white-space: nowrap;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.search-input__icon {
|
|
43
|
-
color: var(--tds-color-granite);
|
|
44
|
-
left: 10px;
|
|
45
|
-
position: absolute;
|
|
46
|
-
top: 13px;
|
|
47
|
-
z-index: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.search-results {
|
|
51
|
-
background-color: white;
|
|
52
|
-
border-radius: var(--tds-radius-lg);
|
|
53
|
-
box-shadow: var(--tds-shadow-lg);
|
|
54
|
-
left: 0;
|
|
55
|
-
position: absolute;
|
|
56
|
-
top: 100%;
|
|
57
|
-
width: 100%;
|
|
58
|
-
padding: var(--tds-spacing-6);
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
margin-top: var(--tds-spacing-1);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.search-result:hover,
|
|
64
|
-
.search-result[aria-selected='true'] {
|
|
65
|
-
background-color: var(--tds-color-sand);
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
border-radius: var(--tds-radius-lg);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.search-result,
|
|
71
|
-
.search-result__heading {
|
|
72
|
-
color: var(--tds-color-black);
|
|
73
|
-
font-size: var(--tds-font-size-sm);
|
|
74
|
-
line-height: var(--tds-line-height-snug);
|
|
75
|
-
padding-left: var(--tds-spacing-2);
|
|
76
|
-
padding-right: var(--tds-spacing-2);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.search-result__heading {
|
|
80
|
-
font-weight: bold;
|
|
81
|
-
margin: var(--tds-spacing-5) 0 var(--tds-spacing-1) 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.search-result__group:first-child .search-result__heading {
|
|
85
|
-
font-weight: bold;
|
|
86
|
-
margin: 0 0 var(--tds-spacing-1) 0;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.search-result {
|
|
90
|
-
align-items: center;
|
|
91
|
-
display: flex;
|
|
92
|
-
padding: var(--tds-spacing-2);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.search-result__icon {
|
|
96
|
-
color: #b0adab; /* TODO: token */
|
|
97
|
-
margin-right: var(--tds-spacing-2);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.search-result__image {
|
|
101
|
-
border-radius: var(--tds-radius-lg);
|
|
102
|
-
margin-right: var(--tds-spacing-2);
|
|
103
|
-
max-width: 40px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.search-result__pretitle {
|
|
107
|
-
color: var(--tds-color-meteorite);
|
|
108
|
-
font-size: var(--tds-font-size-sm);
|
|
109
|
-
line-height: var(--tds-line-height-snug);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.search-result__title {
|
|
113
|
-
color: var(--tds-color-black);
|
|
114
|
-
font-size: var(--tds-font-size-md);
|
|
115
|
-
font-weight: bold;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
[data-listbox='options'][aria-hidden='true'] {
|
|
119
|
-
display: none;
|
|
120
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<tm-section-a background="white" title={titleSearchResults}>
|
|
3
|
-
<template if:true={results}>
|
|
4
|
-
<template for:each={results} for:item="result">
|
|
5
|
-
<div key={result.title}>
|
|
6
|
-
<tds-summary
|
|
7
|
-
description={result.description}
|
|
8
|
-
compact
|
|
9
|
-
display-mode="brick-tile"
|
|
10
|
-
path={result.url}
|
|
11
|
-
title={result.title}
|
|
12
|
-
>
|
|
13
|
-
<tds-content-icon
|
|
14
|
-
slot="image"
|
|
15
|
-
src={result.image}
|
|
16
|
-
size="small"
|
|
17
|
-
></tds-content-icon>
|
|
18
|
-
|
|
19
|
-
<div slot="pretitle"></div>
|
|
20
|
-
<span slot="meta-right"></span>
|
|
21
|
-
<span slot="meta-left">{result.description}</span>
|
|
22
|
-
</tds-summary>
|
|
23
|
-
<!-- prettier-ignore -->
|
|
24
|
-
<hr>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
</template>
|
|
28
|
-
<template if:true={showSearchSuggestions}>
|
|
29
|
-
<div style="display: block">
|
|
30
|
-
<center>
|
|
31
|
-
<img src="/assets/images/ruth_search.png" />
|
|
32
|
-
<h4 style="padding-top: 8px">Here are some search tips</h4>
|
|
33
|
-
<span style="display: block"
|
|
34
|
-
>Check the spelling of your keywords.</span
|
|
35
|
-
><span style="display: block"
|
|
36
|
-
>Try using fewer, different, or more general
|
|
37
|
-
words.</span
|
|
38
|
-
>
|
|
39
|
-
</center>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
</tm-section-a>
|
|
43
|
-
</template>
|