@salesforcedevs/dx-components 0.54.2 → 0.54.7-alpha

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 (140) hide show
  1. package/lwc.config.json +19 -19
  2. package/package.json +2 -4
  3. package/src/modules/dx/banner/banner.css +3 -3
  4. package/src/modules/dx/breadcrumbs/breadcrumbs.css +2 -2
  5. package/src/modules/dx/breadcrumbs/breadcrumbs.ts +27 -26
  6. package/src/modules/dx/button/button.css +10 -1
  7. package/src/modules/dx/button/button.ts +1 -1
  8. package/src/modules/dx/cardBlogPost/cardBlogPost.css +1 -1
  9. package/src/modules/dx/cardCallout/cardCallout.css +3 -3
  10. package/src/modules/dx/cardCallout/cardCallout.ts +2 -2
  11. package/src/modules/dx/cardContent/cardContent.css +3 -3
  12. package/src/modules/dx/cardContent/cardContent.ts +2 -2
  13. package/src/modules/dx/cardDemo/cardDemo.css +1 -1
  14. package/src/modules/dx/cardDocs/cardDocs.css +3 -3
  15. package/src/modules/dx/cardDocs/cardDocs.ts +1 -1
  16. package/src/modules/dx/cardEvent/cardEvent.css +3 -3
  17. package/src/modules/dx/cardExpanded/cardExpanded.css +1 -1
  18. package/src/modules/dx/cardExpanded/cardExpanded.ts +1 -1
  19. package/src/modules/dx/cardMinimal/cardMinimal.css +2 -2
  20. package/src/modules/dx/cardMinimal/cardMinimal.ts +1 -1
  21. package/src/modules/dx/cardNews/cardNews.css +3 -3
  22. package/src/modules/dx/cardNews/cardNews.ts +2 -2
  23. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.css +3 -3
  24. package/src/modules/dx/cardSmall/cardSmall.css +3 -3
  25. package/src/modules/dx/cardSmall/cardSmall.ts +1 -1
  26. package/src/modules/dx/cardTitle/cardTitle.css +2 -2
  27. package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.css +1 -1
  28. package/src/modules/dx/cardTrial/cardTrial.css +3 -3
  29. package/src/modules/dx/cardTrial/cardTrial.ts +1 -1
  30. package/src/modules/dx/cardVideoPreview/cardVideoPreview.css +1 -1
  31. package/src/modules/dx/checkbox/checkbox.css +2 -2
  32. package/src/modules/dx/checkboxGroup/checkboxGroup.css +1 -1
  33. package/src/modules/dx/checkboxGroup/checkboxGroup.ts +1 -1
  34. package/src/modules/dx/codeBlock/codeBlock.css +2 -2
  35. package/src/modules/dx/codeBlock/codeBlock.ts +2 -2
  36. package/src/modules/dx/dropdown/dropdown.css +1 -1
  37. package/src/modules/dx/dropdown/dropdown.ts +4 -4
  38. package/src/modules/dx/dropdownOption/dropdownOption.css +1 -1
  39. package/src/modules/dx/dropdownOption/dropdownOption.ts +3 -3
  40. package/src/modules/dx/emptyState/emptyState.css +2 -2
  41. package/src/modules/dx/feature/feature.css +2 -2
  42. package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +4 -4
  43. package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +2 -2
  44. package/src/modules/dx/featuresList/featuresList.css +2 -2
  45. package/src/modules/dx/featuresList/featuresList.ts +1 -1
  46. package/src/modules/dx/filterMenu/filterMenu.css +1 -1
  47. package/src/modules/dx/footer/footer.css +2 -2
  48. package/src/modules/dx/footer/footer.ts +4 -4
  49. package/src/modules/dx/footerOption/footerOption.ts +1 -1
  50. package/src/modules/dx/groupText/groupText.css +2 -2
  51. package/src/modules/dx/groupText/groupText.ts +3 -3
  52. package/src/modules/dx/header/header.css +1 -1
  53. package/src/modules/dx/header/header.ts +4 -4
  54. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +1 -1
  55. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +5 -5
  56. package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.ts +1 -1
  57. package/src/modules/dx/headerNav/headerNav.css +1 -1
  58. package/src/modules/dx/headerNav/headerNav.ts +5 -5
  59. package/src/modules/dx/headerSearch/headerSearch.css +1 -1
  60. package/src/modules/dx/headerSearch/headerSearch.ts +3 -3
  61. package/src/modules/dx/helmet/helmet.css +2 -2
  62. package/src/modules/dx/hr/hr.css +2 -2
  63. package/src/modules/dx/icon/icon.css +1 -1
  64. package/src/modules/dx/icon/icon.ts +1 -1
  65. package/src/modules/dx/iconBadge/iconBadge.css +1 -1
  66. package/src/modules/dx/iconBadge/iconBadge.ts +1 -1
  67. package/src/modules/dx/imageAndLabel/imageAndLabel.css +3 -3
  68. package/src/modules/dx/input/input.css +2 -2
  69. package/src/modules/dx/input/input.ts +1 -1
  70. package/src/modules/dx/logo/logo.css +2 -2
  71. package/src/modules/dx/modalDrawer/modalDrawer.ts +1 -1
  72. package/src/modules/dx/pagination/pagination.css +1 -1
  73. package/src/modules/dx/pagination/pagination.ts +1 -1
  74. package/src/modules/dx/podcastHost/podcastHost.css +2 -2
  75. package/src/modules/dx/popover/popover.css +1 -1
  76. package/src/modules/dx/popover/popover.ts +1 -1
  77. package/src/modules/dx/radioGroup/radioGroup.css +1 -1
  78. package/src/modules/dx/radioGroup/radioGroup.ts +1 -1
  79. package/src/modules/dx/section/section.css +2 -2
  80. package/src/modules/dx/section/section.ts +1 -1
  81. package/src/modules/dx/select/select.css +181 -8
  82. package/src/modules/dx/select/select.html +51 -54
  83. package/src/modules/dx/select/select.ts +128 -10
  84. package/src/modules/dx/sidebar/sidebar.css +2 -2
  85. package/src/modules/dx/sidebar/sidebar.ts +4 -4
  86. package/src/modules/dx/sidebarOld/sidebarOld.css +2 -2
  87. package/src/modules/dx/sidebarOld/sidebarOld.ts +3 -3
  88. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +11 -5
  89. package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +3 -3
  90. package/src/modules/dx/skipNavLink/skipNavLink.css +1 -1
  91. package/src/modules/dx/socials/socials.ts +1 -1
  92. package/src/modules/dx/tab/tab.css +1 -1
  93. package/src/modules/dx/tab/tab.ts +2 -2
  94. package/src/modules/dx/toc/toc.css +2 -2
  95. package/src/modules/dx/toc/toc.ts +1 -1
  96. package/src/modules/dx/topics/topics.ts +1 -1
  97. package/src/modules/dx/tree/tree.css +1 -1
  98. package/src/modules/dx/tree/tree.ts +1 -1
  99. package/src/modules/dx/treeItem/treeItem.css +1 -1
  100. package/src/modules/dx/treeItem/treeItem.ts +2 -2
  101. package/src/modules/dx/treeTile/treeTile.css +2 -2
  102. package/src/modules/dx/typeBadge/typeBadge.css +1 -1
  103. package/src/modules/dx/typeBadge/typeBadge.ts +1 -1
  104. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +1 -1
  105. package/src/modules/dx/vimeoPlayer/vimeoPlayer.css +1 -1
  106. package/src/modules/{base-elements → dxBaseElements}/archiveCard/archiveCard.ts +0 -0
  107. package/src/modules/{base-elements → dxBaseElements}/headerBase/headerBase.ts +5 -5
  108. package/src/modules/{base-elements → dxBaseElements}/matchMediaElement/matchMediaElement.ts +1 -1
  109. package/src/modules/{base-elements → dxBaseElements}/sidebarBase/sidebarBase.ts +0 -0
  110. package/src/modules/{helpers → dxHelpers}/animations/animations.css +0 -0
  111. package/src/modules/{helpers → dxHelpers}/button/button.css +0 -0
  112. package/src/modules/{helpers → dxHelpers}/card/card.css +1 -1
  113. package/src/modules/{helpers → dxHelpers}/code/code.css +0 -0
  114. package/src/modules/{helpers → dxHelpers}/commonHeader/commonHeader.css +2 -2
  115. package/src/modules/{helpers → dxHelpers}/reset/reset.css +0 -0
  116. package/src/modules/{helpers → dxHelpers}/sidebar/sidebar.css +0 -0
  117. package/src/modules/{helpers → dxHelpers}/table/table.css +0 -0
  118. package/src/modules/{helpers → dxHelpers}/text/text.css +0 -0
  119. package/src/modules/{utils → dxUtils}/analytics/analytics.ts +0 -0
  120. package/src/modules/{utils → dxUtils}/browser/browser.ts +0 -0
  121. package/src/modules/{utils → dxUtils}/constants/breakpoints.ts +0 -0
  122. package/src/modules/{utils → dxUtils}/constants/constants.ts +0 -0
  123. package/src/modules/{utils → dxUtils}/coveo/coveo.ts +0 -0
  124. package/src/modules/{utils → dxUtils}/css/css.ts +0 -0
  125. package/src/modules/{utils → dxUtils}/dates/dates.ts +0 -0
  126. package/src/modules/{utils → dxUtils}/devices/devices.ts +0 -0
  127. package/src/modules/{utils → dxUtils}/highlight/highlight.ts +1 -1
  128. package/src/modules/dxUtils/language/language.ts +21 -0
  129. package/src/modules/{utils → dxUtils}/normalizers/normalizers.ts +9 -21
  130. package/src/modules/{utils → dxUtils}/options/options.ts +13 -9
  131. package/src/modules/{utils → dxUtils}/prismjs/prismjs.html +0 -0
  132. package/src/modules/{utils → dxUtils}/prismjs/prismjs.ts +0 -0
  133. package/src/modules/{utils → dxUtils}/queryCoordinator/queryCoordinator.ts +0 -0
  134. package/src/modules/{utils → dxUtils}/recentSearches/recentSearches.ts +0 -0
  135. package/src/modules/{utils → dxUtils}/regexps/regexps.ts +0 -0
  136. package/src/modules/{utils → dxUtils}/seo/seo.ts +0 -0
  137. package/src/modules/{utils → dxUtils}/slot/slot.ts +0 -0
  138. package/src/modules/{utils → dxUtils}/wordpress/wordpress.ts +0 -0
  139. package/LICENSE +0 -12
  140. package/src/modules/helpers/slds/slds.css +0 -191
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
- import { toJson } from "utils/normalizers";
4
- import { FooterVariant, Option } from "typings/custom";
3
+ import { FooterVariant, OptionWithLink } from "typings/custom";
4
+ import { toJson } from "dxUtils/normalizers";
5
5
  import {
6
6
  generalLinks,
7
7
  termsLinks,
@@ -9,7 +9,7 @@ import {
9
9
  privacyHref,
10
10
  intellectualHref
11
11
  } from "./links";
12
- import { track } from "utils/analytics";
12
+ import { track } from "dxUtils/analytics";
13
13
 
14
14
  const PATH = "/newsletter";
15
15
  const createNewsletterSignupHref = (email: string): string =>
@@ -31,7 +31,7 @@ export default class Footer extends LightningElement {
31
31
  this._locales = toJson(value);
32
32
  }
33
33
 
34
- private _locales?: Option[] | null = null;
34
+ private _locales?: OptionWithLink[] | null = null;
35
35
  private termsLinks = termsLinks;
36
36
  private generalLinks = generalLinks;
37
37
  private socialLinks = socialLinks;
@@ -1,5 +1,5 @@
1
1
  import { LightningElement, api } from "lwc";
2
- import { track } from "utils/analytics";
2
+ import { track } from "dxUtils/analytics";
3
3
 
4
4
  export default class FooterOption extends LightningElement {
5
5
  @api href: string | null = null;
@@ -1,5 +1,5 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
3
 
4
4
  :host {
5
5
  display: block;
@@ -1,9 +1,9 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
3
  import { LightningSlotElement, Link } from "typings/custom";
4
- import { isSlotEmpty } from "utils/slot";
5
- import { toJson } from "utils/normalizers";
6
- import { track } from "utils/analytics";
4
+ import { isSlotEmpty } from "dxUtils/slot";
5
+ import { toJson } from "dxUtils/normalizers";
6
+ import { track } from "dxUtils/analytics";
7
7
 
8
8
  type OptionalLink = Link | null;
9
9
 
@@ -1,4 +1,4 @@
1
- @import "helpers/commonHeader";
1
+ @import "dxHelpers/commonHeader";
2
2
 
3
3
  :host {
4
4
  --dx-c-header-search-width: 316px;
@@ -1,10 +1,10 @@
1
1
  import { api } from "lwc";
2
- import { HeaderBase } from "base-elements/headerBase";
3
- import { toJson } from "utils/normalizers";
4
- import type { Option } from "typings/custom";
2
+ import type { OptionWithNested } from "typings/custom";
3
+ import { HeaderBase } from "dxBaseElements/headerBase";
4
+ import { toJson } from "dxUtils/normalizers";
5
5
 
6
6
  export default class Header extends HeaderBase {
7
- private _breadcrumbs!: Option[];
7
+ private _breadcrumbs!: OptionWithNested[];
8
8
 
9
9
  @api
10
10
  get breadcrumbs() {
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  :host {
4
4
  --dx-c-color-background: var(--dx-g-brand-default-color-background);
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
- import { Option } from "typings/custom";
4
- import { deepmapOptions } from "utils/options";
3
+ import { OptionWithNested } from "typings/custom";
4
+ import { deepmapOptions } from "dxUtils/options";
5
5
 
6
6
  export default class HeaderMobileNavMenu extends LightningElement {
7
7
  @api open: boolean = false;
@@ -9,7 +9,7 @@ export default class HeaderMobileNavMenu extends LightningElement {
9
9
  @api pathname: string | null = null;
10
10
 
11
11
  @api
12
- set navItems(_navItems: Option[]) {
12
+ set navItems(_navItems: OptionWithNested[]) {
13
13
  this._navItems = _navItems;
14
14
  }
15
15
  get navItems() {
@@ -24,7 +24,7 @@ export default class HeaderMobileNavMenu extends LightningElement {
24
24
  // then we use deepmapper to affect the actual root options (actual links)
25
25
  return deepmapOptions(
26
26
  navItems,
27
- (app: Option, index: number, level: number) => {
27
+ (app: OptionWithNested, index: number, level: number) => {
28
28
  const active = app.link
29
29
  ? app.link.href === this.pathname
30
30
  : false;
@@ -47,7 +47,7 @@ export default class HeaderMobileNavMenu extends LightningElement {
47
47
  );
48
48
  }
49
49
 
50
- private _navItems: Option[] = [];
50
+ private _navItems: OptionWithNested[] = [];
51
51
  private navElement: HTMLElement | null = null;
52
52
  private wasOpen: boolean = false;
53
53
  private showScrollShadow: boolean = false;
@@ -1,5 +1,5 @@
1
1
  import { LightningElement, api } from "lwc";
2
- import { track } from "utils/analytics";
2
+ import { track } from "dxUtils/analytics";
3
3
 
4
4
  export default class HeaderMobileNavMenuOption extends LightningElement {
5
5
  @api href: string | null = null;
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  a {
4
4
  text-decoration: none;
@@ -1,18 +1,18 @@
1
1
  import { LightningElement, api } from "lwc";
2
- import { TabVariant, Option } from "typings/custom";
2
+ import { TabVariant, OptionWithNested } from "typings/custom";
3
3
  export default class HeaderNav extends LightningElement {
4
4
  @api pathname: string | null = null;
5
5
  @api variant: TabVariant = "default";
6
6
  @api ariaLabel: string = "Primary Navigation";
7
7
 
8
8
  @api
9
- set navItems(_navItems: Option[]) {
9
+ set navItems(_navItems: OptionWithNested[]) {
10
10
  this._navItems = _navItems;
11
11
  }
12
12
 
13
13
  get navItems() {
14
14
  const activeItem = this._navItems
15
- .filter((navItem: Option) => {
15
+ .filter((navItem: OptionWithNested) => {
16
16
  if (!navItem.link || navItem.link.href === "/") {
17
17
  return false;
18
18
  }
@@ -31,7 +31,7 @@ export default class HeaderNav extends LightningElement {
31
31
  (b.link?.href.length || 0) - (a.link?.href.length || 0)
32
32
  )[0];
33
33
 
34
- const items = this._navItems.map((navItem: Option) =>
34
+ const items = this._navItems.map((navItem: OptionWithNested) =>
35
35
  navItem.link
36
36
  ? {
37
37
  ...navItem,
@@ -45,7 +45,7 @@ export default class HeaderNav extends LightningElement {
45
45
  return items;
46
46
  }
47
47
 
48
- private _navItems: Option[] = [];
48
+ private _navItems: OptionWithNested[] = [];
49
49
 
50
50
  private requestOpenNavMenu(e: PointerEvent) {
51
51
  const detail = (<HTMLButtonElement>e.currentTarget).getAttribute(
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  /* DESKTOP */
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
- import { PopoverRequestCloseType, Option } from "typings/custom";
4
- import { buildSearchEngine } from "utils/coveo";
3
+ import { PopoverRequestCloseType, OptionWithLink } from "typings/custom";
4
+ import { buildSearchEngine } from "dxUtils/coveo";
5
5
  import {
6
6
  StandaloneSearchBox as StandaloneSearchBoxType,
7
7
  StandaloneSearchBoxState,
@@ -28,7 +28,7 @@ export default class HeaderSearch extends LightningElement {
28
28
  return this.mobile ? null : "desktop_search-container";
29
29
  }
30
30
 
31
- private get suggestions(): Option[] {
31
+ private get suggestions(): OptionWithLink[] {
32
32
  if (this.searchState) {
33
33
  return this.searchState.suggestions.map(
34
34
  ({ highlightedValue }: { highlightedValue: string }) => ({
@@ -1,5 +1,5 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
3
 
4
4
  span {
5
5
  font-family: var(--dx-g-font-sans);
@@ -1,5 +1,5 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
3
 
4
4
  :host {
5
5
  --dx-c-hr-padding-horizontal: var(--dx-g-page-padding-horizontal);
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  :host {
4
4
  display: block;
@@ -1,6 +1,6 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import { IconSprite, IconSize, IconSymbol } from "typings/custom";
3
- import { toDxColor } from "utils/css";
3
+ import { toDxColor } from "dxUtils/css";
4
4
 
5
5
  const fetches = new Map<string, Promise<any>>();
6
6
 
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  :host {
4
4
  display: block;
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
3
  import { IconSprite, IconSymbol, IconBadgeShape } from "typings/custom";
4
- import { toDxColor } from "utils/css";
4
+ import { toDxColor } from "dxUtils/css";
5
5
 
6
6
  const validShapes = ["square", "circle"];
7
7
 
@@ -1,6 +1,6 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
3
- @import "helpers/button";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
+ @import "dxHelpers/button";
4
4
 
5
5
  :host {
6
6
  --dx-c-image-and-label-text-color: var(--dx-g-text-label-color);
@@ -1,5 +1,5 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
3
 
4
4
  :host {
5
5
  --dx-c-input-background-active: white;
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
3
  import { IconSize, IconSymbol } from "typings/custom";
4
- import { isMac } from "utils/devices";
4
+ import { isMac } from "dxUtils/devices";
5
5
  import { isValidEmail } from "./validators";
6
6
 
7
7
  type ValidatorMap = {
@@ -1,5 +1,5 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
3
 
4
4
  :host {
5
5
  --dx-c-logo-label-color: var(--dx-g-blue-vibrant-20);
@@ -1,6 +1,6 @@
1
1
  import cx from "classnames";
2
2
  import { LightningElement, api } from "lwc";
3
- import { normalizeBoolean } from "utils/normalizers";
3
+ import { normalizeBoolean } from "dxUtils/normalizers";
4
4
 
5
5
  export default class ModalDrawer extends LightningElement {
6
6
  private _open = false;
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  .dx-pagination {
4
4
  display: flex;
@@ -1,6 +1,6 @@
1
1
  import classNames from "classnames";
2
2
  import { LightningElement, api } from "lwc";
3
- import { track } from "utils/analytics";
3
+ import { track } from "dxUtils/analytics";
4
4
 
5
5
  const ANALYTICS_INFO = {
6
6
  clickUrl: window.location.href,
@@ -1,5 +1,5 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
3
 
4
4
  :host {
5
5
  --dx-c-host-img-width: 48px;
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  :host {
4
4
  --popover-border-radius: var(
@@ -8,7 +8,7 @@ import {
8
8
  import { createPopper } from "@popperjs/core";
9
9
  import cx from "classnames";
10
10
  import debounce from "debounce";
11
- import { isPrerender } from "utils/seo";
11
+ import { isPrerender } from "dxUtils/seo";
12
12
 
13
13
  const isEventOutsideElements = (
14
14
  e: Event,
@@ -1,4 +1,4 @@
1
- @import "helpers/reset";
1
+ @import "dxHelpers/reset";
2
2
 
3
3
  fieldset {
4
4
  display: grid;
@@ -1,5 +1,5 @@
1
1
  import { LightningElement, api } from "lwc";
2
- import { toJson } from "utils/normalizers";
2
+ import { toJson } from "dxUtils/normalizers";
3
3
 
4
4
  type Option = {
5
5
  value: string;
@@ -1,5 +1,5 @@
1
- @import "helpers/reset";
2
- @import "helpers/text";
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
3
 
4
4
  :host {
5
5
  --dx-c-section-padding-vertical: var(--dx-g-spacing-5xl);
@@ -1,6 +1,6 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
- import { toDxColor } from "utils/css";
3
+ import { toDxColor } from "dxUtils/css";
4
4
 
5
5
  export default class Section extends LightningElement {
6
6
  @api backgroundColor: string = "transparent";
@@ -1,5 +1,3 @@
1
- @import "helpers/slds";
2
-
3
1
  :host {
4
2
  display: block;
5
3
  }
@@ -8,7 +6,7 @@
8
6
  outline: none;
9
7
  }
10
8
 
11
- .slds-select_container::before {
9
+ .select_container::before {
12
10
  --icon-size: 0.5em;
13
11
 
14
12
  border-style: solid;
@@ -24,21 +22,196 @@
24
22
  width: var(--icon-size);
25
23
  }
26
24
 
27
- .placeholder {
25
+ .select-element_placeholder {
28
26
  color: var(--sds-g-gray-9);
29
27
  }
30
28
 
31
- select.slds-select:focus:not([disabled]),
32
- select.slds-select:active:not([disabled]) {
29
+ select.select-element:focus:not([disabled]),
30
+ select.select-element:active:not([disabled]) {
33
31
  border-width: 2px;
34
32
  border-color: var(--dx-g-blue-vibrant-50);
35
33
  box-shadow: none;
36
34
  -webkit-box-shadow: none;
37
35
  }
38
36
 
39
- :host(.slds-has-error) select.slds-select:focus,
40
- :host(.slds-has-error) select.slds-select:active {
37
+ .has-error select.select-element:focus,
38
+ .has-error select.select-element:active {
41
39
  border-color: #ea001e;
42
40
  box-shadow: 0 0 3px var(--dx-g-blue-vibrant-50);
43
41
  -webkit-box-shadow: 0 0 3px var(--dx-g-blue-vibrant-50);
44
42
  }
43
+
44
+ @media (min-width: 48em) {
45
+ .form-element_horizontal .form-element_control {
46
+ padding-left: 33%;
47
+ clear: none;
48
+ }
49
+ }
50
+
51
+ abbr[title] {
52
+ border-bottom: 1px dotted;
53
+ text-decoration: none;
54
+ cursor: help;
55
+ }
56
+
57
+ abbr[title]::after {
58
+ content: " (" attr(title) ")";
59
+ }
60
+
61
+ abbr[title],
62
+ fieldset,
63
+ hr {
64
+ border: 0;
65
+ }
66
+
67
+ button,
68
+ select {
69
+ text-transform: none;
70
+ }
71
+
72
+ .form-element_control {
73
+ clear: left;
74
+ position: relative;
75
+ }
76
+
77
+ .form-element_label {
78
+ overflow-wrap: break-word;
79
+ word-wrap: break-word;
80
+ -webkit-hyphens: auto;
81
+ -ms-hyphens: auto;
82
+ hyphens: auto;
83
+ display: inline-block;
84
+ color: #3e3e3c;
85
+ font-size: 0.75rem;
86
+ padding-right: 0.5rem;
87
+ padding-top: 0.25rem;
88
+ margin-bottom: 0.125rem;
89
+ }
90
+
91
+ .form-element_label:empty {
92
+ margin: 0;
93
+ }
94
+
95
+ .form-element_stacked .form-element_label,
96
+ .form-element_stacked .form-element_control {
97
+ border-bottom: 0;
98
+ padding-left: 0;
99
+ }
100
+
101
+ .form-element_stacked .form-element_control {
102
+ width: 100%;
103
+ -ms-flex-preferred-size: 100%;
104
+ flex-basis: 100%;
105
+ clear: left;
106
+ }
107
+
108
+ .assistive-text {
109
+ position: absolute !important;
110
+ margin: -1px !important;
111
+ border: 0 !important;
112
+ padding: 0 !important;
113
+ width: 1px !important;
114
+ height: 1px !important;
115
+ overflow: hidden !important;
116
+ clip: rect(0 0 0 0) !important;
117
+ text-transform: none !important;
118
+ white-space: nowrap !important;
119
+ }
120
+
121
+ .required-element {
122
+ color: #ea001e;
123
+ margin: 0 0.125rem;
124
+ }
125
+
126
+ .select-element {
127
+ height: calc(1.875rem + (1px * 2));
128
+ width: 100%;
129
+ border: 1px solid #dddbda;
130
+ border-radius: 0.25rem;
131
+ background-color: white;
132
+ -webkit-transition: border 0.1s linear, background-color 0.1s linear;
133
+ transition: border 0.1s linear, background-color 0.1s linear;
134
+ }
135
+
136
+ .select-element:focus,
137
+ .select-element:active {
138
+ outline: 0;
139
+ border-color: #1b96ff;
140
+ background-color:white;
141
+ -webkit-box-shadow: 0 0 3px #0176d3;
142
+ box-shadow: 0 0 3px #0176d3;
143
+ }
144
+
145
+ .select-element[disabled],
146
+ .select-element.slds-is-disabled {
147
+ background-color: #ecebea;
148
+ border-color: #c9c7c5;
149
+ color: #3e3e3c;
150
+ cursor: not-allowed;
151
+ -webkit-user-select: none;
152
+ -moz-user-select: none;
153
+ -ms-user-select: none;
154
+ user-select: none;
155
+ opacity: 1;
156
+ }
157
+
158
+ .select-element[disabled]:focus,
159
+ .select-element[disabled]:active,
160
+ .select-element.slds-is-disabled:focus,
161
+ .select-element.slds-is-disabled:active {
162
+ -webkit-box-shadow: none;
163
+ box-shadow: none;
164
+ }
165
+
166
+ .select-element[size] {
167
+ min-height: calc(1.875rem + (1px * 2));
168
+ height: inherit;
169
+ }
170
+
171
+ .select-element[size] option {
172
+ padding: 0.5rem;
173
+ }
174
+
175
+ .has-error .select-element {
176
+ border-color: #ea001e;
177
+ -webkit-box-shadow: #ea001e 0 0 0 1px inset;
178
+ box-shadow: #ea001e 0 0 0 1px inset;
179
+ background-clip: padding-box;
180
+ }
181
+
182
+ .select_container {
183
+ position: relative;
184
+ }
185
+
186
+ .select_container .select-element {
187
+ -moz-appearance: none;
188
+ -webkit-appearance: none;
189
+ padding-left: 0.5rem;
190
+ padding-right: 1.5rem;
191
+ }
192
+
193
+ .select_container .select-element::-ms-expand {
194
+ display: none;
195
+ }
196
+
197
+ .has-error .select-element:focus,
198
+ .has-error .select-element:active {
199
+ -webkit-box-shadow: #ea001e 0 0 0 1px inset, 0 0 3px #0176d3;
200
+ box-shadow: #ea001e 0 0 0 1px inset, 0 0 3px #0176d3;
201
+ }
202
+
203
+ .form-element:not(.has-error) .select-element:required {
204
+ -webkit-box-shadow: none;
205
+ box-shadow: none;
206
+ }
207
+
208
+ .form-element_help,
209
+ .form-element_helper {
210
+ font-size: 0.75rem;
211
+ margin-top: 0.125rem;
212
+ display: block;
213
+ }
214
+
215
+ .has-error .form-element_help {
216
+ color: #ea001e;
217
+ }