@salesforcedevs/dx-components 0.26.2 → 0.28.0

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.
Files changed (255) hide show
  1. package/lwc.config.json +2 -1
  2. package/package.json +2 -6
  3. package/src/modules/{utils-internal → base-elements}/archiveCard/archiveCard.ts +0 -0
  4. package/src/modules/{utils-internal → base-elements}/headerBase/headerBase.ts +0 -0
  5. package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.ts +1 -1
  6. package/src/modules/dx/cardCallout/cardCallout.ts +1 -1
  7. package/src/modules/dx/cardContent/cardContent.ts +2 -2
  8. package/src/modules/dx/cardDocs/cardDocs.ts +1 -1
  9. package/src/modules/dx/cardExpanded/cardExpanded.ts +1 -1
  10. package/src/modules/dx/cardMinimal/cardMinimal.ts +1 -1
  11. package/src/modules/dx/cardNews/cardNews.ts +1 -1
  12. package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.ts +1 -1
  13. package/src/modules/dx/cardSmall/cardSmall.ts +1 -1
  14. package/src/modules/dx/codeBlock/codeBlock.ts +1 -1
  15. package/src/modules/dx/dropdown/dropdown.ts +1 -1
  16. package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +1 -1
  17. package/src/modules/dx/groupText/groupText.ts +1 -1
  18. package/src/modules/dx/header/header.ts +1 -1
  19. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +1 -1
  20. package/src/modules/dx/headerSearch/headerSearch.ts +1 -1
  21. package/src/modules/dx/icon/icon.ts +1 -1
  22. package/src/modules/dx/iconBadge/iconBadge.ts +1 -1
  23. package/src/modules/dx/input/input.ts +1 -1
  24. package/src/modules/dx/modalDrawer/modalDrawer.css +40 -0
  25. package/src/modules/dx/modalDrawer/modalDrawer.html +11 -0
  26. package/src/modules/dx/modalDrawer/modalDrawer.ts +27 -0
  27. package/src/modules/dx/popover/popover.ts +1 -1
  28. package/src/modules/dx/section/section.ts +1 -1
  29. package/src/modules/dx/sidebar/sidebar.ts +1 -1
  30. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +2 -5
  31. package/src/modules/dx/slackCta/slackCta.css +1 -1
  32. package/src/modules/dx/tooltip/tooltip.css +1 -0
  33. package/src/modules/dx/typeBadge/typeBadge.ts +1 -1
  34. package/src/modules/{utils-internal → utils}/coveo/coveo.ts +0 -0
  35. package/src/modules/{utils-internal → utils}/css/css.ts +0 -0
  36. package/src/modules/{utils-internal → utils}/devices/devices.ts +0 -0
  37. package/src/modules/utils/highlight/highlight.ts +1 -1
  38. package/src/modules/{utils-internal → utils}/options/options.ts +0 -0
  39. package/src/modules/{utils-internal → utils}/prismjs/prismjs.html +0 -0
  40. package/src/modules/{utils-internal → utils}/prismjs/prismjs.ts +0 -0
  41. package/src/modules/{utils-internal → utils}/recentSearches/recentSearches.ts +0 -0
  42. package/src/modules/{utils-internal → utils}/regexps/regexps.ts +0 -0
  43. package/src/modules/{utils-internal → utils}/seo/seo.ts +0 -0
  44. package/src/modules/{utils-internal → utils}/slot/slot.ts +0 -0
  45. package/src/modules/{utils-internal → utils}/wordpress/wordpress.ts +0 -0
  46. package/src/modules/dx/banner/__tests__/banner.test.ts +0 -33
  47. package/src/modules/dx/brandThemeProvider/__tests__/brandThemeProvider.test.ts +0 -49
  48. package/src/modules/dx/brandThemeProvider/brandThemeProvider.stories.ts +0 -321
  49. package/src/modules/dx/breadcrumbs/__tests__/breadcrumbs.test.ts +0 -140
  50. package/src/modules/dx/breadcrumbs/__tests__/mockProps.ts +0 -28
  51. package/src/modules/dx/breadcrumbs/breadcrumbs.stories.ts +0 -39
  52. package/src/modules/dx/button/__tests__/button.test.ts +0 -107
  53. package/src/modules/dx/button/button.stories.ts +0 -150
  54. package/src/modules/dx/cardBlogPost/__tests__/cardBlogPost.test.ts +0 -26
  55. package/src/modules/dx/cardBlogPost/__tests__/mockProps.ts +0 -12
  56. package/src/modules/dx/cardBlogPost/cardBlogPost.stories.ts +0 -164
  57. package/src/modules/dx/cardBlogPostProvider/__tests__/cardBlogPostProvider.test.ts +0 -34
  58. package/src/modules/dx/cardBlogPostProvider/__tests__/mockWordpressPosts.ts +0 -44
  59. package/src/modules/dx/cardCallout/__tests__/cardCallout.test.ts +0 -20
  60. package/src/modules/dx/cardCallout/__tests__/mockProps.ts +0 -7
  61. package/src/modules/dx/cardCallout/cardCallout.stories.ts +0 -33
  62. package/src/modules/dx/cardContent/__tests__/cardContent.test.ts +0 -100
  63. package/src/modules/dx/cardContent/__tests__/mockProps.ts +0 -13
  64. package/src/modules/dx/cardContent/cardContent.stories.ts +0 -127
  65. package/src/modules/dx/cardDemo/cardDemo.stories.ts +0 -115
  66. package/src/modules/dx/cardDocs/__tests__/cardDocs.test.ts +0 -48
  67. package/src/modules/dx/cardDocs/__tests__/mockProps.ts +0 -9
  68. package/src/modules/dx/cardDocs/cardDocs.stories.ts +0 -299
  69. package/src/modules/dx/cardEvent/__tests__/cardEvent.test.ts +0 -95
  70. package/src/modules/dx/cardEvent/__tests__/mockProps.ts +0 -10
  71. package/src/modules/dx/cardEvent/cardEvent.stories.ts +0 -153
  72. package/src/modules/dx/cardExpanded/__tests__/cardExpanded.test.ts +0 -193
  73. package/src/modules/dx/cardExpanded/__tests__/mockProps.ts +0 -21
  74. package/src/modules/dx/cardExpanded/cardExpanded.stories.ts +0 -59
  75. package/src/modules/dx/cardGrid/__tests__/cardMockProps.ts +0 -431
  76. package/src/modules/dx/cardGrid/__tests__/mockProps.ts +0 -15
  77. package/src/modules/dx/cardGrid/cardGrid.stories.ts +0 -111
  78. package/src/modules/dx/cardMinimal/__tests__/cardMinimal.test.ts +0 -87
  79. package/src/modules/dx/cardMinimal/__tests__/mockProps.ts +0 -10
  80. package/src/modules/dx/cardMinimal/cardMinimal.stories.ts +0 -32
  81. package/src/modules/dx/cardNews/__tests__/cardNews.test.ts +0 -58
  82. package/src/modules/dx/cardNews/__tests__/mockProps.ts +0 -7
  83. package/src/modules/dx/cardNews/cardNews.stories.ts +0 -115
  84. package/src/modules/dx/cardPodcastEpisode/__tests__/cardPodcastEpisode.test.ts +0 -68
  85. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.stories.ts +0 -31
  86. package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/cardPodcastEpisodeProvider.test.ts +0 -36
  87. package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/mockWordpressEpisodes.ts +0 -50
  88. package/src/modules/dx/cardSmall/__tests__/cardSmall.test.ts +0 -66
  89. package/src/modules/dx/cardSmall/__tests__/mockProps.ts +0 -8
  90. package/src/modules/dx/cardSmall/cardSmall.stories.ts +0 -166
  91. package/src/modules/dx/cardTitle/__tests__/cardTitle.test.ts +0 -46
  92. package/src/modules/dx/cardTrailheadModule/__tests__/cardTrailheadModule.test.ts +0 -18
  93. package/src/modules/dx/cardTrailheadModule/__tests__/mockProps.ts +0 -11
  94. package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.stories.ts +0 -122
  95. package/src/modules/dx/cardVideoPreview/__tests__/cardVideoPreview.test.ts +0 -22
  96. package/src/modules/dx/cardVideoPreview/__tests__/mockProps.ts +0 -11
  97. package/src/modules/dx/cardVideoPreview/cardVideoPreview.stories.ts +0 -147
  98. package/src/modules/dx/checkbox/__tests__/checkbox.test.ts +0 -85
  99. package/src/modules/dx/checkbox/__tests__/mockProps.ts +0 -5
  100. package/src/modules/dx/checkbox/checkbox.stories.ts +0 -38
  101. package/src/modules/dx/checkboxGroup/__tests__/checkboxGroup.test.ts +0 -80
  102. package/src/modules/dx/checkboxGroup/__tests__/mockProps.ts +0 -14
  103. package/src/modules/dx/checkboxGroup/checkboxGroup.stories.ts +0 -33
  104. package/src/modules/dx/codeBlock/__tests__/codeBlock.test.ts +0 -238
  105. package/src/modules/dx/codeBlock/__tests__/mockProps.ts +0 -160
  106. package/src/modules/dx/codeBlock/codeBlock.stories.ts +0 -143
  107. package/src/modules/dx/dropdown/__tests__/dropdown.test.ts +0 -165
  108. package/src/modules/dx/dropdown/__tests__/mockNestedOptions.ts +0 -96
  109. package/src/modules/dx/dropdown/__tests__/mockOptions.ts +0 -10
  110. package/src/modules/dx/dropdown/__tests__/mockProps.ts +0 -6
  111. package/src/modules/dx/dropdown/dropdown.stories.ts +0 -89
  112. package/src/modules/dx/dropdownOption/__tests__/dropdownOption.test.ts +0 -112
  113. package/src/modules/dx/dropdownOption/__tests__/mockProps.ts +0 -20
  114. package/src/modules/dx/emptyState/__tests__/emptyState.test.ts +0 -52
  115. package/src/modules/dx/emptyState/__tests__/mockProps.ts +0 -4
  116. package/src/modules/dx/emptyState/emptyState.stories.ts +0 -45
  117. package/src/modules/dx/feature/__tests__/feature.test.ts +0 -51
  118. package/src/modules/dx/feature/__tests__/mockProps.ts +0 -8
  119. package/src/modules/dx/featureGrid/__tests__/featureGrid.test.ts +0 -21
  120. package/src/modules/dx/featureGrid/featureGrid.stories.ts +0 -120
  121. package/src/modules/dx/featuredContentHeader/__tests__/featuredContentHeader.test.ts +0 -178
  122. package/src/modules/dx/featuredContentHeader/__tests__/mockProps.ts +0 -73
  123. package/src/modules/dx/featuredContentHeader/featuredContentHeader.stories.ts +0 -153
  124. package/src/modules/dx/featuresList/__tests__/featuresList.test.ts +0 -43
  125. package/src/modules/dx/featuresList/__tests__/mockProps.ts +0 -17
  126. package/src/modules/dx/featuresList/featuresList.stories.ts +0 -30
  127. package/src/modules/dx/footer/__tests__/footer.test.ts +0 -147
  128. package/src/modules/dx/footer/__tests__/mockLocales.ts +0 -7
  129. package/src/modules/dx/footer/footer.stories.ts +0 -88
  130. package/src/modules/dx/footerOption/__tests__/footerOption.test.ts +0 -34
  131. package/src/modules/dx/footerOption/__tests__/mockProps.ts +0 -7
  132. package/src/modules/dx/formattedDateTime/__tests__/formattedDateTime.test.ts +0 -25
  133. package/src/modules/dx/formattedDateTime/__tests__/mockProps.ts +0 -13
  134. package/src/modules/dx/formattedDateTime/formattedDateTime.stories.ts +0 -103
  135. package/src/modules/dx/grid/__tests__/grid.test.ts +0 -32
  136. package/src/modules/dx/grid/grid.stories.ts +0 -134
  137. package/src/modules/dx/groupBio/__tests__/groupBio.test.ts +0 -82
  138. package/src/modules/dx/groupBio/__tests__/mockProps.ts +0 -15
  139. package/src/modules/dx/groupBio/groupBio.stories.ts +0 -66
  140. package/src/modules/dx/groupText/__tests__/groupText.test.ts +0 -69
  141. package/src/modules/dx/groupText/__tests__/mockProps.ts +0 -35
  142. package/src/modules/dx/groupText/groupText.stories.ts +0 -81
  143. package/src/modules/dx/header/__tests__/header.test.ts +0 -236
  144. package/src/modules/dx/header/__tests__/mockNavArchitects.ts +0 -169
  145. package/src/modules/dx/header/__tests__/mockNavDevelopers.ts +0 -419
  146. package/src/modules/dx/header/__tests__/mockNavs.ts +0 -115
  147. package/src/modules/dx/header/__tests__/mockProps.ts +0 -164
  148. package/src/modules/dx/header/header.stories.ts +0 -172
  149. package/src/modules/dx/headerMobileNavMenu/__tests__/headerMobileNavMenu.test.ts +0 -123
  150. package/src/modules/dx/headerMobileNavMenuOption/__tests__/headerMobileNavMenuOption.test.ts +0 -38
  151. package/src/modules/dx/headerNav/__tests__/headerNav.test.ts +0 -49
  152. package/src/modules/dx/headerSearch/__tests__/headerSearch.test.ts +0 -182
  153. package/src/modules/dx/headerSearch/__tests__/mockData.ts +0 -11
  154. package/src/modules/dx/headerSearch/__tests__/mockProps.ts +0 -6
  155. package/src/modules/dx/helmet/__tests__/helmet.test.ts +0 -52
  156. package/src/modules/dx/helmet/helmet.stories.ts +0 -53
  157. package/src/modules/dx/hr/__tests__/hr.test.ts +0 -53
  158. package/src/modules/dx/hr/__tests__/mockProps.ts +0 -16
  159. package/src/modules/dx/hr/hr.stories.ts +0 -50
  160. package/src/modules/dx/icon/__tests__/icon.test.ts +0 -54
  161. package/src/modules/dx/icon/icon.stories.ts +0 -100
  162. package/src/modules/dx/iconBadge/__tests__/iconBadge.test.ts +0 -17
  163. package/src/modules/dx/iconBadge/iconBadge.stories.ts +0 -32
  164. package/src/modules/dx/imageAndLabel/__tests__/imageAndLabel.test.ts +0 -39
  165. package/src/modules/dx/imageAndLabel/__tests__/mockProps.ts +0 -6
  166. package/src/modules/dx/imageAndLabel/imageAndLabel.stories.ts +0 -48
  167. package/src/modules/dx/input/__tests__/input.test.ts +0 -357
  168. package/src/modules/dx/input/input.stories.ts +0 -102
  169. package/src/modules/dx/instrumentation/__tests__/instrumentation.test.ts +0 -86
  170. package/src/modules/dx/interactiveImage/__tests__/interactiveImage.test.ts +0 -83
  171. package/src/modules/dx/interactiveImage/__tests__/mockProps.ts +0 -39
  172. package/src/modules/dx/interactiveImage/interactiveImage.stories.ts +0 -31
  173. package/src/modules/dx/lazy/__tests__/lazy.test.ts +0 -43
  174. package/src/modules/dx/lazy/lazy.stories.ts +0 -132
  175. package/src/modules/dx/pagination/__tests__/pagination.test.ts +0 -121
  176. package/src/modules/dx/pagination/pagination.stories.ts +0 -88
  177. package/src/modules/dx/podcastHost/__tests__/mockProps.ts +0 -8
  178. package/src/modules/dx/podcastHost/__tests__/podcastHost.test.ts +0 -21
  179. package/src/modules/dx/podcastHost/podcastHost.stories.ts +0 -17
  180. package/src/modules/dx/podcastPlayer/__tests__/podcastPlayer.test.ts +0 -20
  181. package/src/modules/dx/podcastPlayer/podcastPlayer.stories.ts +0 -13
  182. package/src/modules/dx/podcastSubscription/__tests__/podcastSubscription.test.ts +0 -16
  183. package/src/modules/dx/podcastSubscription/podcastSubscription.stories.ts +0 -23
  184. package/src/modules/dx/popover/__tests__/mockProps.ts +0 -8
  185. package/src/modules/dx/popover/__tests__/popover.test.ts +0 -313
  186. package/src/modules/dx/popover/popover.stories.ts +0 -82
  187. package/src/modules/dx/radioGroup/__tests__/mockProps.ts +0 -12
  188. package/src/modules/dx/radioGroup/__tests__/radioGroup.test.ts +0 -42
  189. package/src/modules/dx/radioGroup/radioGroup.stories.ts +0 -25
  190. package/src/modules/dx/relativeDateTime/__tests__/mockProps.ts +0 -55
  191. package/src/modules/dx/relativeDateTime/__tests__/relativeDateTime.test.ts +0 -52
  192. package/src/modules/dx/relativeDateTime/relativeDateTime.stories.ts +0 -83
  193. package/src/modules/dx/searchResults/searchResults.stories.ts +0 -36
  194. package/src/modules/dx/section/__tests__/section.test.ts +0 -17
  195. package/src/modules/dx/section/section.stories.ts +0 -381
  196. package/src/modules/dx/sectionSignup/__tests__/sectionSignup.test.ts +0 -66
  197. package/src/modules/dx/sectionSignup/sectionSignup.stories.ts +0 -49
  198. package/src/modules/dx/select/select.stories.ts +0 -59
  199. package/src/modules/dx/sidebar/__tests__/mockProps.ts +0 -181
  200. package/src/modules/dx/sidebar/__tests__/mockSearchChangeEmptyEvent.ts +0 -6
  201. package/src/modules/dx/sidebar/__tests__/mockSearchChangeEvent.ts +0 -527
  202. package/src/modules/dx/sidebar/__tests__/sidebar.test.ts +0 -568
  203. package/src/modules/dx/sidebar/sidebar.stories.ts +0 -188
  204. package/src/modules/dx/sidebarOld/__tests__/mockProps.ts +0 -178
  205. package/src/modules/dx/sidebarOld/__tests__/sidebarOld.test.ts +0 -570
  206. package/src/modules/dx/sidebarOld/sidebarOld.stories.ts +0 -139
  207. package/src/modules/dx/sidebarSearch/__tests__/mockPreloadedState.ts +0 -1686
  208. package/src/modules/dx/sidebarSearch/__tests__/sidebarSearch.test.ts +0 -175
  209. package/src/modules/dx/sidebarSearchResult/__tests__/sidebarSearchResult.test.ts +0 -96
  210. package/src/modules/dx/slackCta/__tests__/slackCta.test.ts +0 -36
  211. package/src/modules/dx/slackCta/slackCta.stories.ts +0 -25
  212. package/src/modules/dx/socials/__tests__/socials.test.ts +0 -114
  213. package/src/modules/dx/socials/socials.stories.ts +0 -24
  214. package/src/modules/dx/spinner/__tests__/spinner.test.ts +0 -37
  215. package/src/modules/dx/spinner/spinner.stories.ts +0 -69
  216. package/src/modules/dx/tab/__tests__/tab.test.ts +0 -129
  217. package/src/modules/dx/tab/tab.stories.ts +0 -57
  218. package/src/modules/dx/toc/__tests__/mockProps.ts +0 -28
  219. package/src/modules/dx/toc/__tests__/toc.test.ts +0 -109
  220. package/src/modules/dx/toc/toc.stories.ts +0 -26
  221. package/src/modules/dx/tooltip/__tests__/tooltip.test.ts +0 -22
  222. package/src/modules/dx/tooltip/tooltip.stories.ts +0 -46
  223. package/src/modules/dx/topics/__tests__/mockProps.ts +0 -3
  224. package/src/modules/dx/topics/__tests__/topics.test.ts +0 -31
  225. package/src/modules/dx/tree/__tests__/mockProps.ts +0 -215
  226. package/src/modules/dx/tree/__tests__/tree.test.ts +0 -346
  227. package/src/modules/dx/tree/__tests__/treeHandler.test.ts +0 -194
  228. package/src/modules/dx/tree/tree.stories.ts +0 -65
  229. package/src/modules/dx/treeItem/__tests__/mockProps.ts +0 -46
  230. package/src/modules/dx/treeItem/__tests__/treeItem.test.ts +0 -377
  231. package/src/modules/dx/treeTile/__tests__/mockProps.ts +0 -16
  232. package/src/modules/dx/treeTile/__tests__/treeTile.test.ts +0 -168
  233. package/src/modules/dx/typeBadge/__tests__/typeBadge.test.ts +0 -77
  234. package/src/modules/dx/typeBadge/typeBadge.stories.ts +0 -114
  235. package/src/modules/dx/typeBadgeGroup/__tests__/mockProps.ts +0 -11
  236. package/src/modules/dx/typeBadgeGroup/__tests__/typeBadgeGroup.test.ts +0 -72
  237. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.stories.ts +0 -19
  238. package/src/modules/test-components/buttonTest/buttonTest.html +0 -3
  239. package/src/modules/test-components/buttonTest/buttonTest.ts +0 -3
  240. package/src/modules/test-components/codeBlockTest/codeBlockTest.js +0 -4
  241. package/src/modules/test-components/featureGridTest/featureGridTest.html +0 -7
  242. package/src/modules/test-components/featureGridTest/featureGridTest.ts +0 -5
  243. package/src/modules/test-components/instrumentationTest/instrumentationTest.html +0 -4
  244. package/src/modules/test-components/instrumentationTest/instrumentationTest.ts +0 -8
  245. package/src/modules/test-components/popoverTest/popoverTest.html +0 -6
  246. package/src/modules/test-components/popoverTest/popoverTest.ts +0 -5
  247. package/src/modules/test-components/slackCtaTest/slackCtaTest.html +0 -3
  248. package/src/modules/test-components/slackCtaTest/slackCtaTest.ts +0 -3
  249. package/src/modules/utils/highlight/__tests__/highlight.test.ts +0 -108
  250. package/src/modules/utils/highlight/__tests__/mockProps.ts +0 -45
  251. package/src/modules/utils-internal/jest/jest.ts +0 -58
  252. package/src/modules/utils-internal/recentSearches/__tests__/recentSearches.test.ts +0 -83
  253. package/src/modules/utils-internal/storybook/storybook.ts +0 -32
  254. package/src/modules/utils-internal/tests/tests.ts +0 -38
  255. package/src/modules/utils-internal/wordpress/__tests__/wordpress.test.ts +0 -15
@@ -1,36 +0,0 @@
1
- import { html } from "lit-html";
2
-
3
- export default {
4
- title: "dx/dx-search-results",
5
- component: "dx-search-results",
6
- argTypes: {
7
- searchQuery: {
8
- defaultValue: "deploy apex",
9
- control: {
10
- type: "text"
11
- }
12
- }
13
- }
14
- };
15
-
16
- // prettier-ignore
17
- const createStyles = () => html ``;
18
-
19
- // prettier-ignore
20
- export const WithQuery = (args: any) => html ` ${createStyles()}
21
- <dx-search-results
22
- search-query="${args.searchQuery}"
23
- coveo-organization-id="fullsalesforce"
24
- coveo-public-access-token="xx4b2b651b-95db-4974-adef-218a1124f739"
25
- coveo-search-pipeline="salesforcedevdoc">
26
- </dx-search-results>
27
- `;
28
-
29
- // prettier-ignore
30
- export const WithoutQuery = () => html ` ${createStyles()}
31
- <dx-search-results
32
- coveo-organization-id="fullsalesforce"
33
- coveo-public-access-token="xx4b2b651b-95db-4974-adef-218a1124f739"
34
- coveo-search-pipeline="salesforcedevdoc">
35
- </dx-search-results>
36
- `;
@@ -1,17 +0,0 @@
1
- import Section from "dx/section";
2
- import { createRenderComponent } from "utils-internal/tests";
3
-
4
- const TAG = "dx-section";
5
- const render = createRenderComponent(TAG, Section);
6
-
7
- describe(TAG, () => {
8
- it("renders the container", () => {
9
- const element = render();
10
- const el = element.shadowRoot.querySelector(".section");
11
- expect(el).not.toBeNull();
12
-
13
- const textDiv = element.shadowRoot.querySelector("div.text");
14
- expect(textDiv).toBeNull();
15
- return expect(element).toBeAccessible();
16
- });
17
- });
@@ -1,381 +0,0 @@
1
- import { html } from "lit-html";
2
-
3
- export default {
4
- title: "dx/dx-section",
5
- component: "dx-section"
6
- };
7
-
8
- const createStyles = () => html`
9
- <style>
10
- body {
11
- padding: 0 !important;
12
- }
13
- .placeholder {
14
- background-color: #ababab;
15
- border-radius: 8px;
16
- height: 200px;
17
- }
18
- dx-section.products {
19
- --dx-c-section-padding-bottom: 0;
20
- }
21
- dx-section.videos {
22
- --dx-c-section-padding-top: 160px;
23
- }
24
- dx-section:last-child {
25
- --dx-c-section-padding-bottom: var(--dx-g-spacing-md);
26
- }
27
- </style>
28
- `;
29
-
30
- const date = new Date().toISOString();
31
- const startDatetime = new Date(0, 0, 1, 9, 0, 0).toISOString();
32
- const endDatetime = new Date(0, 0, 1, 12, 0, 0).toISOString();
33
-
34
- // prettier-ignore
35
- export const Base = () => html`
36
- ${createStyles()}
37
- <dx-section
38
- title="Explore our Products"
39
- subtitle="Browse resources, tutorials, and everything you need to start building right away."
40
- text-align="center"
41
- >
42
- <dx-grid columns="one">
43
- <dx-grid columns="two-slim-right" class="most-recent-blogs">
44
- <dx-card-news
45
- href="https://salesforce.com"
46
- img-alt="Vector image of a lake and a mountain."
47
- img-src="/assets/svg/dsc-home-news-bear.svg"
48
- title="Salesforce Developer Survey"
49
- body="Share your insights to help us improve your developer experience"
50
- background-color="indigo-vibrant-20"
51
- size="large"
52
- button-text="Take the Survey"
53
- button-type="large"
54
- img-placement="right"
55
- ></dx-card-news>
56
- <dx-card-news
57
- href="https://salesforce.com"
58
- img-alt="Vector image of a lake and a mountain."
59
- img-src="/assets/svg/lake-mountain.svg"
60
- title="LEARN MOAR"
61
- body="Discover what's new for Admins and Developers in the Spring'21 Release"
62
- background-color="cloud-blue-vibrant-90"
63
- color="cloud-blue-vibrant-20"
64
- button-text="Learn moar"
65
- button-type="inline"
66
- img-placement="top"
67
- ></dx-card-news>
68
- </dx-grid>
69
- <dx-grid columns="three">
70
- <dx-card-news
71
- href="https://salesforce.com"
72
- img-alt="Vector image of a lake and a mountain."
73
- img-src="/assets/svg/lake-mountain.svg"
74
- title="LEARN MOAR"
75
- body="Discover what's new for Admins and Developers in the Spring'21 Release"
76
- background-color="cloud-blue-vibrant-90"
77
- color="cloud-blue-vibrant-20"
78
- button-text="Learn moar"
79
- button-type="inline"
80
- img-placement="top"
81
- ></dx-card-news>
82
- <dx-card-news
83
- href="https://salesforce.com"
84
- img-alt="Vector image of a lake and a mountain."
85
- img-src="/assets/svg/lake-mountain.svg"
86
- title="LEARN MOAR"
87
- body="Discover what's new for Admins and Developers in the Spring'21 Release"
88
- background-color="cloud-blue-vibrant-90"
89
- color="cloud-blue-vibrant-20"
90
- button-text="Learn moar"
91
- button-type="inline"
92
- img-placement="top"
93
- ></dx-card-news>
94
- <dx-card-news
95
- href="https://salesforce.com"
96
- img-alt="Vector image of a lake and a mountain."
97
- img-src="/assets/svg/lake-mountain.svg"
98
- title="LEARN MOAR"
99
- body="Discover what's new for Admins and Developers in the Spring'21 Release"
100
- background-color="cloud-blue-vibrant-90"
101
- color="cloud-blue-vibrant-20"
102
- button-text="Learn moar"
103
- button-type="inline"
104
- img-placement="top"
105
- ></dx-card-news>
106
- </dx-grid>
107
- </dx-grid>
108
- </dx-section>
109
- <dx-section
110
- title="Explore our Products"
111
- subtitle="Browse resources, tutorials, and everything you need to start building right away."
112
- text-align="center"
113
- class="products"
114
- }
115
- >
116
- <dx-grid columns="three">
117
- <dx-card-small
118
- href="/test-href"
119
- target="_blank"
120
- title="Marketplaces"
121
- body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
122
- badge-symbol="bucket"
123
- >
124
- </dx-card-small>
125
- <dx-card-small
126
- href="/test-href"
127
- target="_blank"
128
- title="Marketplaces"
129
- body="This is a pretty long card body. It could say just about anything regarding the content of this card."
130
- badge-symbol="bucket"
131
- >
132
- </dx-card-small>
133
- <dx-card-small
134
- href="/test-href"
135
- target="_blank"
136
- title="Marketplaces"
137
- body="This is a pretty long card body. It could say just about anything regarding the content of this card."
138
- badge-symbol="bucket"
139
- >
140
- </dx-card-small>
141
- <dx-card-small
142
- href="/test-href"
143
- target="_blank"
144
- title="Marketplaces"
145
- body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
146
- badge-symbol="bucket"
147
- >
148
- </dx-card-small>
149
- <dx-card-small
150
- href="/test-href"
151
- target="_blank"
152
- title="Marketplaces"
153
- body="This is a pretty long card body. It could say just about anything regarding the content of this card."
154
- badge-symbol="bucket"
155
- >
156
- </dx-card-small>
157
- <dx-card-small
158
- href="/test-href"
159
- target="_blank"
160
- title="Marketplaces"
161
- body="This is a pretty long card body. It could say just about anything regarding the content of this card."
162
- badge-symbol="bucket"
163
- >
164
- </dx-card-small>
165
- <dx-card-small
166
- href="/test-href"
167
- target="_blank"
168
- title="Marketplaces"
169
- body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
170
- badge-symbol="bucket"
171
- >
172
- </dx-card-small>
173
- <dx-card-small
174
- href="/test-href"
175
- target="_blank"
176
- title="Marketplaces"
177
- body="This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card. This is a pretty long card body. It could say just about anything regarding the content of this card."
178
- badge-symbol="bucket"
179
- >
180
- </dx-card-small>
181
- <dx-card-callout
182
- background-color="indigo-vibrant-30"
183
- href="/build-stuff"
184
- title="Find an upcoming event"
185
- label="Calendar"
186
- ></dx-card-callout>
187
- </dx-grid>
188
- </dx-section>
189
- <dx-section
190
- title="Discover Salesforce APIs and see how you can put them to work"
191
- label="APIs"
192
- background-color="cloud-blue-vibrant-95"
193
- top-graphic="true"
194
- bottom-graphic="true"
195
- graphic-overlap="true"
196
- >
197
- <dx-grid columns="four">
198
- <dx-card-docs
199
- body="This is a pretty long card body. It could say just about anything regarding the content of this card."
200
- href="https://developer.salesforce.com/"
201
- label="Documentation"
202
- title="Einstein Platform Services Developer Guide"
203
- >
204
- <dx-button
205
- href="http://tweetflight.wearebrightly.com/"
206
- target="_blank"
207
- variant="inline"
208
- icon-symbol="forward"
209
- >
210
- Read Guide
211
- </dx-button>
212
- </dx-card-docs>
213
- <dx-card-docs
214
- body="Quip SCIM API is a specification designed to make it easier to manage user identities in cloud-based applications and services."
215
- href="https://developer.salesforce.com/"
216
- label="API"
217
- title="Quip SCIM API"
218
- >
219
- <dx-button
220
- href="http://tweetflight.wearebrightly.com/"
221
- target="_blank"
222
- variant="inline"
223
- >
224
- Overview
225
- </dx-button>
226
- <dx-button
227
- href="http://tweetflight.wearebrightly.com/"
228
- target="_blank"
229
- variant="inline"
230
- >
231
- Guides
232
- </dx-button>
233
- <dx-button
234
- href="http://tweetflight.wearebrightly.com/"
235
- target="_blank"
236
- variant="inline"
237
- >
238
- Reference
239
- </dx-button>
240
- </dx-card-docs>
241
- <dx-card-docs
242
- body="Quip SCIM API is a specification designed to make it easier to manage user identities in cloud-based applications and services."
243
- href="https://developer.salesforce.com/"
244
- label="API"
245
- title="Quip SCIM API"
246
- >
247
- <dx-button
248
- href="http://tweetflight.wearebrightly.com/"
249
- target="_blank"
250
- variant="inline"
251
- >
252
- Overview
253
- </dx-button>
254
- <dx-button
255
- href="http://tweetflight.wearebrightly.com/"
256
- target="_blank"
257
- variant="inline"
258
- >
259
- Guides
260
- </dx-button>
261
- <dx-button
262
- href="http://tweetflight.wearebrightly.com/"
263
- target="_blank"
264
- variant="inline"
265
- >
266
- Reference
267
- </dx-button>
268
- </dx-card-docs>
269
- <dx-card-callout
270
- background-color="indigo-vibrant-30"
271
- href="/build-stuff"
272
- title="Find an upcoming event"
273
- label="Calendar"
274
- ></dx-card-callout>
275
- </dx-grid>
276
- </dx-section>
277
- <dx-section
278
- class="videos"
279
- title="Watch Salesforce development in action"
280
- label="Videos"
281
- background-color="blue-vibrant-10"
282
- dark="${true}"
283
- >
284
- <dx-grid columns="two-slim-right">
285
- <dx-card-video-preview
286
- body="Do you know how your customizations will perform when the crowds show up? Confidence is hard-earned."
287
- datetime="${date}"
288
- href="https://developer.salesforce.com/"
289
- img-alt="Scenic view of a mountain."
290
- img-src="https://i.imgur.com/FUsyxR5.jpg"
291
- title="How to Harness Einstein Vision and Language in Any App"
292
- featured="${true}"
293
- >
294
- </dx-card-video-preview>
295
- <dx-grid columns="one">
296
- <dx-card-video-preview
297
- datetime="${date}"
298
- href="https://developer.salesforce.com/"
299
- img-alt="Scenic view of a mountain."
300
- img-src="https://i.imgur.com/FUsyxR5.jpg"
301
- title="How to Harness Einstein Vision and Language in Any App"
302
- >
303
- </dx-card-video-preview>
304
- <dx-card-video-preview
305
- datetime="${date}"
306
- href="https://developer.salesforce.com/"
307
- img-alt="Scenic view of a mountain."
308
- img-src="https://i.imgur.com/FUsyxR5.jpg"
309
- title="How to Harness Einstein Vision and Language in Any App"
310
- >
311
- </dx-card-video-preview>
312
- </dx-grid>
313
- </dx-grid>
314
- </dx-section>
315
- <dx-section
316
- title="Attend Salesforce virtual events. Now inspiration comes to you."
317
- >
318
- <dx-grid columns="two-slim-right">
319
- <dx-card-event
320
- end-datetime="${endDatetime}"
321
- location="San Francisco"
322
- start-datetime="${startDatetime}"
323
- title="Virtual Event: Salesforce Life for Financial Services"
324
- img-alt="Scenic view of a mountain."
325
- img-src="https://i.imgur.com/FUsyxR5.jpg"
326
- featured="${true}"
327
- ></dx-card-event>
328
- <dx-grid columns="one">
329
- <dx-card-event
330
- end-datetime="${endDatetime}"
331
- start-datetime="${startDatetime}"
332
- title="Virtual Event: Salesforce Life for Financial Services"
333
- img-alt="Scenic view of a mountain."
334
- img-src="https://i.imgur.com/FUsyxR5.jpg"
335
- ></dx-card-event>
336
- <dx-card-event
337
- end-datetime="${endDatetime}"
338
- start-datetime="${startDatetime}"
339
- title="Virtual Event: Salesforce Life for Financial Services"
340
- ></dx-card-event>
341
- </dx-grid>
342
- </dx-grid>
343
- </dx-section>
344
- `;
345
-
346
- export const NoText = () => html`
347
- <style>
348
- dx-section.no-text {
349
- --dx-c-section-padding-bottom: var(--dx-g-spacing-md);
350
- --dx-c-section-padding-top: var(--dx-g-spacing-md);
351
- }
352
- </style>
353
- <dx-section class="no-text">
354
- <dx-grid columns="two-slim-right">
355
- <dx-card-event
356
- end-datetime="${endDatetime}"
357
- location="San Francisco"
358
- start-datetime="${startDatetime}"
359
- title="Virtual Event: Salesforce Life for Financial Services"
360
- img-alt="Scenic view of a mountain."
361
- img-src="https://i.imgur.com/FUsyxR5.jpg"
362
- featured="${true}"
363
- ></dx-card-event>
364
- <dx-grid columns="one">
365
- <dx-card-event
366
- end-datetime="${endDatetime}"
367
- start-datetime="${startDatetime}"
368
- title="Virtual Event: Salesforce Life for Financial Services"
369
- img-alt="Scenic view of a mountain."
370
- img-src="https://i.imgur.com/FUsyxR5.jpg"
371
- ></dx-card-event>
372
- <dx-card-event
373
- end-datetime="${endDatetime}"
374
- start-datetime="${startDatetime}"
375
- title="Virtual Event: Salesforce Life for Financial Services"
376
- ></dx-card-event>
377
- </dx-grid>
378
- </dx-grid>
379
- <legend>This is a section with no label, title or subtitle</legend>
380
- </dx-section>
381
- `;
@@ -1,66 +0,0 @@
1
- import SectionSignup from "dx/sectionSignup";
2
- import { createRenderComponent } from "utils-internal/tests";
3
-
4
- const TAG = "dx-section-signup";
5
- const render = createRenderComponent(TAG, SectionSignup);
6
-
7
- describe(TAG, () => {
8
- it("renders", () => {
9
- const element = render({ inputPlaceholder: "email" });
10
- return expect(element).toBeAccessible();
11
- });
12
-
13
- it("fires subscription", () => {
14
- const mockSubscribeHandler = jest.fn();
15
- const component = render({
16
- inputTitle: "sample title",
17
- inputPlaceholder: "sample placehoder",
18
- inputSubmitLabel: "sample label"
19
- });
20
-
21
- component.addEventListener("subscribe", mockSubscribeHandler);
22
- expect(mockSubscribeHandler).not.toHaveBeenCalled();
23
- component.shadowRoot
24
- .querySelector("dx-input")
25
- .dispatchEvent(
26
- new CustomEvent("submit", { detail: "sample@email.com" })
27
- );
28
- expect(mockSubscribeHandler).toHaveBeenCalledTimes(1);
29
- return expect(component).toBeAccessible();
30
- });
31
-
32
- it("correctly binds all properties", () => {
33
- const component = render({
34
- inputTitle: "sample title",
35
- inputPlaceholder: "sample placehoder",
36
- inputSubmitLabel: "sample label"
37
- });
38
-
39
- expect(component.inputTitle).toBe("sample title");
40
- expect(component.inputPlaceholder).toBe("sample placehoder");
41
- expect(component.inputSubmitLabel).toBe("sample label");
42
-
43
- const dxinput = component.shadowRoot.querySelector("dx-input");
44
- expect(dxinput.placeholder).toBe("sample placehoder");
45
- expect(dxinput.submitLabel).toBe("sample label");
46
- return expect(component).toBeAccessible();
47
- });
48
-
49
- it("check for assigned elements", () => {
50
- const component = render({
51
- inputTitle: "sample title",
52
- inputPlaceholder: "sample placehoder",
53
- inputSubmitLabel: "sample label"
54
- });
55
-
56
- const slot = component.shadowRoot.querySelector("slot");
57
- const div = document.createElement("div");
58
- slot.assignedElements = jest.fn().mockReturnValue([div]);
59
- slot.dispatchEvent(new Event("slotchange"));
60
-
61
- const elements = slot.assignedElements();
62
-
63
- expect(elements.length).not.toBeUndefined();
64
- return expect(component).toBeAccessible();
65
- });
66
- });
@@ -1,49 +0,0 @@
1
- import { html } from "lit-html";
2
-
3
- export default {
4
- title: "dx/dx-section-signup",
5
- component: "dx-section-signup"
6
- };
7
-
8
- const createStyles = () => html` <style>
9
- dx-section-signup {
10
- margin-top: 25px;
11
- margin-bottom: 25px;
12
- display: block;
13
- }
14
- </style>`;
15
-
16
- const ARGS = {
17
- title: "Get the lastest posts from Developers Blog every week.",
18
- placeholder: "Email",
19
- label: "Subscribe"
20
- };
21
-
22
- export const Default = () => html` ${createStyles()}
23
- <dx-section-signup></dx-section-signup>`;
24
-
25
- export const WithSlot = ({
26
- title,
27
- placeholder,
28
- label
29
- }: any) => html` ${createStyles()}
30
- <dx-section-signup
31
- input-title="${title}"
32
- input-placeholder="${placeholder}"
33
- input-submit-label="${label}"
34
- >
35
- <h1>Slot Content</h1>
36
- </dx-section-signup>`;
37
- WithSlot.args = ARGS;
38
-
39
- export const WithParameters = ({
40
- title,
41
- placeholder,
42
- label
43
- }: any) => html` ${createStyles()}
44
- <dx-section-signup
45
- input-title="${title}"
46
- input-placeholder="${placeholder}"
47
- input-submit-label="${label}"
48
- ></dx-section-signup>`;
49
- WithParameters.args = ARGS;
@@ -1,59 +0,0 @@
1
- import { html } from "lit-html";
2
-
3
- export default {
4
- title: "dx/dx-select",
5
- component: "dx-select",
6
- argTypes: {
7
- value: {
8
- defaultValue: "b",
9
- control: {
10
- type: "text"
11
- }
12
- }
13
- }
14
- };
15
-
16
- const OPTIONS = [
17
- { value: "a", label: "First option" },
18
- { value: "b", label: "Second option" },
19
- { value: "c", label: "Third option" }
20
- ];
21
-
22
- const styles = () => html`
23
- <style>
24
- dx-select {
25
- width: clamp(200px, 50%, 600px);
26
- }
27
- </style>
28
- `;
29
-
30
- export const Base = ({ value }: any) => html`
31
- ${styles()}
32
- <dx-select
33
- json-options="${JSON.stringify(OPTIONS)}"
34
- label="Hello"
35
- value="${value}"
36
- ></dx-select>
37
- `;
38
-
39
- export const Required = () => html`
40
- ${styles()}
41
- <dx-select
42
- json-options="${JSON.stringify(OPTIONS)}"
43
- label="Hello Required"
44
- message-when-value-missing="This field is empty"
45
- required="true"
46
- placeholder="Select a Value"
47
- value=""
48
- ></dx-select>
49
- `;
50
-
51
- export const Disabled = ({ value }: any) => html`
52
- ${styles()}
53
- <dx-select
54
- disabled="true"
55
- label="Hello Disabled"
56
- json-options="${JSON.stringify(OPTIONS)}"
57
- value="${value}"
58
- ></dx-select>
59
- `;