@salesforcedevs/dx-components 0.26.3 → 0.28.1

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/lwc.config.json CHANGED
@@ -49,6 +49,7 @@
49
49
  "dx/interactiveImage",
50
50
  "dx/lazy",
51
51
  "dx/logo",
52
+ "dx/modalDrawer",
52
53
  "dx/pagination",
53
54
  "dx/podcastHost",
54
55
  "dx/podcastPlayer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "0.26.3",
3
+ "version": "0.28.1",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -25,5 +25,5 @@
25
25
  "@types/debounce": "^1.2.0",
26
26
  "@types/lodash.get": "^4.4.6"
27
27
  },
28
- "gitHead": "9c94c66a063751c3ada92ae0dbbded0b999feb98"
28
+ "gitHead": "01dbc1fb1d21c1b83ec997821bb33e8343732ec8"
29
29
  }
@@ -0,0 +1,40 @@
1
+ :host {
2
+ --dx-c-modal-drawer-z-index: 5000;
3
+ --dx-c-modal-padding-around: var(--dx-g-spacing-smd);
4
+ --dx-c-modal-height: calc(100vh - var(--dx-c-modal-padding-around) * 2);
5
+ }
6
+
7
+ dx-button {
8
+ display: block;
9
+ margin-left: auto;
10
+ }
11
+
12
+ .modal-drawer_container {
13
+ background-color: white;
14
+ height: var(--dx-c-modal-height);
15
+ left: 0;
16
+ padding: var(--dx-c-modal-padding-around);
17
+ position: fixed;
18
+ transform: translateX(-100%);
19
+ transition: transform 0.4s ease;
20
+ top: 0;
21
+ width: inherit;
22
+ z-index: var(--dx-c-modal-drawer-z-index);
23
+ }
24
+
25
+ .modal-drawer_container.modal-drawer_active {
26
+ transform: translateX(0);
27
+ }
28
+
29
+ .modal-drawer_overlay {
30
+ background-color: #195594;
31
+ bottom: 0;
32
+ height: 100%;
33
+ left: 0;
34
+ opacity: 0.62;
35
+ position: fixed;
36
+ right: 0;
37
+ top: 0;
38
+ width: 100%;
39
+ z-index: calc(var(--dx-c-modal-drawer-z-index) - 1);
40
+ }
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class={containerClass}>
3
+ <slot></slot>
4
+ <dx-button onclick={handleCloseModal}>Done</dx-button>
5
+ </div>
6
+ <div
7
+ if:true={open}
8
+ class="modal-drawer_overlay"
9
+ onclick={handleCloseModal}
10
+ ></div>
11
+ </template>
@@ -0,0 +1,27 @@
1
+ import cx from "classnames";
2
+ import { LightningElement, api } from "lwc";
3
+ import { normalizeBoolean } from "utils/normalizers";
4
+
5
+ export default class ModalDrawer extends LightningElement {
6
+ private _open = false;
7
+
8
+ @api get open() {
9
+ return this._open;
10
+ }
11
+
12
+ set open(value) {
13
+ this._open = normalizeBoolean(value);
14
+ }
15
+
16
+ get containerClass(): string {
17
+ return cx(
18
+ "modal-drawer_container",
19
+ this._open && "modal-drawer_active"
20
+ );
21
+ }
22
+
23
+ handleCloseModal() {
24
+ this._open = !this._open;
25
+ this.dispatchEvent(new CustomEvent("clickclose"));
26
+ }
27
+ }
@@ -38,7 +38,7 @@
38
38
  <dx-input
39
39
  class="search-box"
40
40
  type="search"
41
- placeholder="Search this list..."
41
+ placeholder="Search"
42
42
  role="search"
43
43
  aria-label="Content Search"
44
44
  icon-symbol="search"
@@ -26,7 +26,7 @@
26
26
  }
27
27
 
28
28
  .dx-text-heading-4 {
29
- font-size: var(--dx-g-text-lg);
29
+ font-size: var(--dx-g-text-xl);
30
30
  max-width: 370px;
31
31
  }
32
32
  @media screen and (max-width: 1000px) {
@@ -33,4 +33,5 @@
33
33
  font-family: var(--dx-g-font-sans);
34
34
  font-size: var(--dx-g-text-xs);
35
35
  color: white;
36
+ line-height: var(--dx-g-text-xs);
36
37
  }