@salesforcedevs/dx-components 0.55.0 → 0.55.3-alpha-2

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 (33) hide show
  1. package/lwc.config.json +3 -0
  2. package/package.json +5 -3
  3. package/src/assets/svg/login-widget-bg.png +0 -0
  4. package/src/modules/dx/avatarButton/avatarButton.css +128 -0
  5. package/src/modules/dx/avatarButton/avatarButton.html +148 -0
  6. package/src/modules/dx/avatarButton/avatarButton.ts +99 -0
  7. package/src/modules/dx/breadcrumbs/breadcrumbs.ts +18 -15
  8. package/src/modules/dx/cardGridDocs/cardGridDocs.css +74 -0
  9. package/src/modules/dx/cardGridDocs/cardGridDocs.html +67 -0
  10. package/src/modules/dx/cardGridDocs/cardGridDocs.ts +86 -0
  11. package/src/modules/dx/dropdown/dropdown.ts +2 -2
  12. package/src/modules/dx/dropdownOption/dropdownOption.ts +2 -2
  13. package/src/modules/dx/featureGrid/featureGrid.html +3 -0
  14. package/src/modules/dx/featureGrid/featureGrid.ts +15 -0
  15. package/src/modules/dx/filterMenu/filterMenu.css +9 -3
  16. package/src/modules/dx/filterMenu/filterMenu.html +31 -28
  17. package/src/modules/dx/filterMenu/filterMenu.ts +14 -4
  18. package/src/modules/dx/footer/footer.ts +2 -2
  19. package/src/modules/dx/grid/grid.ts +3 -1
  20. package/src/modules/dx/header/header.html +1 -0
  21. package/src/modules/dx/header/header.ts +2 -2
  22. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +4 -4
  23. package/src/modules/dx/headerNav/headerNav.ts +5 -5
  24. package/src/modules/dx/headerSearch/headerSearch.ts +2 -2
  25. package/src/modules/dx/logo/logo.ts +1 -1
  26. package/src/modules/dx/select/select.css +181 -8
  27. package/src/modules/dx/select/select.html +51 -54
  28. package/src/modules/dx/select/select.ts +128 -10
  29. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +8 -2
  30. package/src/modules/dxBaseElements/headerBase/headerBase.ts +3 -3
  31. package/src/modules/dxHelpers/scrollbar/scrollbar.css +31 -0
  32. package/src/modules/dxUtils/options/options.ts +13 -9
  33. package/src/modules/dxHelpers/slds/slds.css +0 -191
@@ -0,0 +1,86 @@
1
+ import { LightningElement, api, track } from "lwc";
2
+ import { toJson } from "dxUtils/normalizers";
3
+ import { DocsCard } from "typings/custom";
4
+
5
+ const stringsMatch = (val1?: string, val2?: string): boolean => {
6
+ return (
7
+ typeof val1 === "string" &&
8
+ typeof val2 === "string" &&
9
+ val1.toLowerCase().includes(val2.toLowerCase())
10
+ );
11
+ };
12
+
13
+ export default class CardGridDocs extends LightningElement {
14
+ @api pageSize = 24;
15
+ @api
16
+ get cards(): DocsCard[] {
17
+ return this._cards;
18
+ }
19
+ set cards(value) {
20
+ this._cards = toJson(value);
21
+ }
22
+
23
+ private page: number = 1;
24
+ private _cards: DocsCard[] = [];
25
+ @track
26
+ private value?: string;
27
+
28
+ private get filteredCards(): DocsCard[] {
29
+ return this.value
30
+ ? this.cards.filter(({ title, body, label }) =>
31
+ [title, body, label].some((val) =>
32
+ stringsMatch(val, this.value)
33
+ )
34
+ )
35
+ : this.cards;
36
+ }
37
+
38
+ private get currentPageCards() {
39
+ return this.filteredCards.slice(
40
+ this.startingRecord - 1,
41
+ this.endingRecord
42
+ );
43
+ }
44
+
45
+ private get startingRecord() {
46
+ return this.page === 1
47
+ ? this.page
48
+ : (this.page - 1) * this.pageSize + 1;
49
+ }
50
+
51
+ private get endingRecord() {
52
+ const defaultEndingRecord = this.pageSize * this.page;
53
+ return defaultEndingRecord > this.filteredCards.length
54
+ ? this.filteredCards.length
55
+ : defaultEndingRecord;
56
+ }
57
+
58
+ private get totalPages() {
59
+ return Math.ceil(this.filteredCards.length / this.pageSize);
60
+ }
61
+
62
+ private get hidePagination() {
63
+ return this.totalPages < 2;
64
+ }
65
+
66
+ private get emptyStateSubtitle() {
67
+ return "No results" + (this.value !== "" ? ` for "${this.value}"` : "");
68
+ }
69
+
70
+ private get showEmptyState() {
71
+ return !this.filteredCards.length;
72
+ }
73
+
74
+ private onSearchChange(e: InputEvent): void {
75
+ const detail = `${e.detail}`;
76
+ this.value = detail === "" ? undefined : detail;
77
+
78
+ if (this.startingRecord > this.cards.length) {
79
+ this.page = 1;
80
+ }
81
+ }
82
+
83
+ private goToPage(e: CustomEvent) {
84
+ this.page = e.detail;
85
+ }
86
+ }
@@ -1,11 +1,11 @@
1
- import { Option, PopperPlacement } from "typings/custom";
1
+ import { OptionWithNested, PopperPlacement } from "typings/custom";
2
2
  import { LightningElement, api, track } from "lwc";
3
3
  import cx from "classnames";
4
4
  import get from "lodash.get";
5
5
  import { deepmapOptions } from "dxUtils/options";
6
6
  import { toJson } from "dxUtils/normalizers";
7
7
 
8
- interface DropdownOption extends Option {
8
+ interface DropdownOption extends OptionWithNested {
9
9
  // link that gets shown as a highlighted link at end of option group
10
10
  calloutLink?: {
11
11
  href: string;
@@ -1,10 +1,10 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
- import { Option } from "typings/custom";
3
+ import { OptionWithNested } from "typings/custom";
4
4
  import { track } from "dxUtils/analytics";
5
5
 
6
6
  export default class DropdownOption extends LightningElement {
7
- @api option!: Option;
7
+ @api option!: OptionWithNested;
8
8
  @api suppressGtmNavHeadings: boolean = false;
9
9
  @api keyValue!: string;
10
10
  @api active: boolean = false;
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <slot onslotchange={onSlotChange}></slot>
3
+ </template>
@@ -0,0 +1,15 @@
1
+ import { LightningElement } from "lwc";
2
+ import { LightningSlotElement } from "typings/custom";
3
+
4
+ export default class FeatureGrid extends LightningElement {
5
+ private onSlotChange(e: LightningSlotElement) {
6
+ // @ts-ignore
7
+ const slot = e.target;
8
+ slot.assignedElements().forEach(
9
+ (featureElement: any, index: number) => {
10
+ featureElement.descriptionPosition =
11
+ index % 2 === 0 ? "left" : "right";
12
+ }
13
+ );
14
+ }
15
+ }
@@ -1,4 +1,5 @@
1
1
  @import "dxHelpers/reset";
2
+ @import "dxHelpers/scrollbar";
2
3
 
3
4
  :host {
4
5
  --dx-c-filter-menu-margin: 0;
@@ -37,8 +38,14 @@
37
38
  }
38
39
 
39
40
  .title-group {
41
+ display: flex;
42
+ }
43
+
44
+ .title-group-main {
40
45
  position: relative;
46
+ justify-content: space-between;
41
47
  margin: 0 var(--horizontal-padding);
48
+ width: calc(100% - 2 * var(--horizontal-padding));
42
49
  }
43
50
 
44
51
  .filter-menu-title {
@@ -77,9 +84,6 @@ label {
77
84
  }
78
85
 
79
86
  svg {
80
- position: absolute;
81
- right: 0;
82
- top: 0;
83
87
  background: transparent;
84
88
  stroke: var(--dx-g-blue-vibrant-50);
85
89
  }
@@ -105,6 +109,8 @@ svg,
105
109
 
106
110
  .checkbox-year {
107
111
  --dx-c-filter-menu-font-weight: bold;
112
+
113
+ width: 130px;
108
114
  }
109
115
 
110
116
  .view-more-btn {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <form class="container">
3
- <span class="title-group" onclick={dropdownToggle}>
3
+ <span class="title-group-main title-group" onclick={dropdownToggle}>
4
4
  <p class="filter-menu-title">{title}</p>
5
5
  <svg
6
6
  xmlns="http://www.w3.org/2000/svg"
@@ -16,7 +16,7 @@
16
16
  <polyline points="6 9 12 15 18 9"></polyline>
17
17
  </svg>
18
18
  </span>
19
- <ul class="nested first-layer">
19
+ <ul class="nested first-layer always-visible-scrollbar">
20
20
  <li>
21
21
  <template if:true={isBaseVariant}>
22
22
  <template for:each={filterMenuOptions} for:item="option">
@@ -37,33 +37,36 @@
37
37
  for:item="option"
38
38
  >
39
39
  <li key={option.id}>
40
- <dx-checkbox-native
41
- class="checkbox-year"
42
- value={option}
43
- onchange={onChange}
44
- >
45
- {option.name} ({option.totalNumberOfPosts})
46
- </dx-checkbox-native>
47
- <span onclick={dropdownToggle}>
48
- <svg
49
- xmlns="http://www.w3.org/2000/svg"
50
- width="24"
51
- height="24"
52
- viewBox="0 0 24 24"
53
- fill="none"
54
- stroke-width="2"
55
- stroke-linecap="round"
56
- stroke-linejoin="round"
57
- class="
58
- feather feather-chevron-down
59
- year-svg
60
- "
40
+ <div class="title-group">
41
+ <dx-checkbox-native
42
+ class="checkbox-year"
43
+ value={option}
44
+ onchange={onChange}
61
45
  >
62
- <polyline
63
- points="6 9 12 15 18 9"
64
- ></polyline>
65
- </svg>
66
- </span>
46
+ {option.name}
47
+ ({option.totalNumberOfPosts})
48
+ </dx-checkbox-native>
49
+ <span onclick={dropdownToggle}>
50
+ <svg
51
+ xmlns="http://www.w3.org/2000/svg"
52
+ width="24"
53
+ height="24"
54
+ viewBox="0 0 24 24"
55
+ fill="none"
56
+ stroke-width="2"
57
+ stroke-linecap="round"
58
+ stroke-linejoin="round"
59
+ class="
60
+ feather feather-chevron-down
61
+ year-svg
62
+ "
63
+ >
64
+ <polyline
65
+ points="6 9 12 15 18 9"
66
+ ></polyline>
67
+ </svg>
68
+ </span>
69
+ </div>
67
70
  <ul class="nested second-layer">
68
71
  <template
69
72
  for:each={option.months}
@@ -1,4 +1,5 @@
1
1
  import { LightningElement, api } from "lwc";
2
+ import { toJson } from "dxUtils/normalizers";
2
3
 
3
4
  interface Option {
4
5
  id: number;
@@ -8,9 +9,17 @@ interface Option {
8
9
  export default class FilterMenu extends LightningElement {
9
10
  @api name: string = "";
10
11
  @api title: string = "Filter Menu";
11
- @api options: Option[] = [];
12
12
  @api variant: string = "base";
13
13
 
14
+ @api
15
+ get options(): Option[] {
16
+ return this._options;
17
+ }
18
+ set options(value: any) {
19
+ this._options = toJson(value);
20
+ }
21
+
22
+ private _options: Option[] = [];
14
23
  private showMore: boolean = false;
15
24
 
16
25
  get isBaseVariant() {
@@ -99,9 +108,10 @@ export default class FilterMenu extends LightningElement {
99
108
  }
100
109
 
101
110
  private dropdownToggle(e: any) {
102
- e.currentTarget.parentElement
103
- .querySelector(".nested")
104
- .classList.toggle("active");
111
+ (
112
+ e.currentTarget.parentElement.querySelector(".nested") ||
113
+ e.currentTarget.parentElement.parentElement.querySelector(".nested")
114
+ ).classList.toggle("active");
105
115
 
106
116
  e.currentTarget.querySelector("svg").classList.toggle("caret-down");
107
117
  }
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
+ import { FooterVariant, OptionWithLink } from "typings/custom";
3
4
  import { toJson } from "dxUtils/normalizers";
4
- import { FooterVariant, Option } from "typings/custom";
5
5
  import {
6
6
  generalLinks,
7
7
  termsLinks,
@@ -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;
@@ -67,6 +67,8 @@ export default class Grid extends LightningElement {
67
67
  }
68
68
 
69
69
  onSlotChange(e: Event) {
70
- this._itemCount = (e.target as LightningSlotElement).assignedElements().length;
70
+ this._itemCount = (
71
+ e.target as LightningSlotElement
72
+ ).assignedElements().length;
71
73
  }
72
74
  }
@@ -26,6 +26,7 @@
26
26
  onstatechange={handleStateChange}
27
27
  ></dx-header-search>
28
28
  </div>
29
+ <dx-avatar-button></dx-avatar-button>
29
30
  <div if:true={showSignup} class="header-login-signup">
30
31
  <dx-button
31
32
  aria-label="Sign Up For Salesforce Developer Edition"
@@ -1,10 +1,10 @@
1
1
  import { api } from "lwc";
2
+ import type { OptionWithNested } from "typings/custom";
2
3
  import { HeaderBase } from "dxBaseElements/headerBase";
3
4
  import { toJson } from "dxUtils/normalizers";
4
- import type { Option } from "typings/custom";
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,6 +1,6 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
- import { Option } from "typings/custom";
3
+ import { OptionWithNested } from "typings/custom";
4
4
  import { deepmapOptions } from "dxUtils/options";
5
5
 
6
6
  export default class HeaderMobileNavMenu extends LightningElement {
@@ -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,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,6 +1,6 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
- import { PopoverRequestCloseType, Option } from "typings/custom";
3
+ import { PopoverRequestCloseType, OptionWithLink } from "typings/custom";
4
4
  import { buildSearchEngine } from "dxUtils/coveo";
5
5
  import {
6
6
  StandaloneSearchBox as StandaloneSearchBoxType,
@@ -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 }) => ({
@@ -3,6 +3,6 @@ import { LightningElement, api } from "lwc";
3
3
  export default class Logo extends LightningElement {
4
4
  @api href: string = "/";
5
5
  @api imgSrc: string = "/assets/svg/salesforce-cloud.svg";
6
- @api imgAlt: string = "Salesforce log";
6
+ @api imgAlt: string = "Salesforce logo";
7
7
  @api label!: string;
8
8
  }
@@ -1,5 +1,3 @@
1
- @import "dxHelpers/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
+ }