@watermarkinsights/ripple 5.7.0-7 → 5.7.0-9

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 (79) hide show
  1. package/dist/cjs/{global-4e6e41e7.js → global-80ed0881.js} +1 -1
  2. package/dist/cjs/index-e86c28b6.js +8 -12
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/priv-option-list.cjs.entry.js +6 -2
  5. package/dist/cjs/ripple.cjs.js +2 -2
  6. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +213 -0
  7. package/dist/cjs/{wm-modal.cjs.entry.js → wm-modal_3.cjs.entry.js} +73 -0
  8. package/dist/cjs/wm-nested-select.cjs.entry.js +24 -15
  9. package/dist/cjs/wm-option_2.cjs.entry.js +1 -1
  10. package/dist/collection/collection-manifest.json +17 -5
  11. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +16 -6
  12. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +5 -1
  13. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +5 -5
  14. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +25 -15
  15. package/dist/collection/components/selects/wm-select/wm-select.css +3 -3
  16. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +61 -0
  17. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +138 -0
  18. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +55 -0
  19. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +81 -0
  20. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +134 -0
  21. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +361 -0
  22. package/dist/esm/{global-099ddc86.js → global-525745d2.js} +1 -1
  23. package/dist/esm/index-558b5a82.js +8 -12
  24. package/dist/esm/loader.js +2 -2
  25. package/dist/esm/priv-option-list.entry.js +6 -2
  26. package/dist/esm/ripple.js +2 -2
  27. package/dist/esm/wm-modal-pss_3.entry.js +207 -0
  28. package/dist/esm/{wm-modal.entry.js → wm-modal_3.entry.js} +73 -2
  29. package/dist/esm/wm-nested-select.entry.js +24 -15
  30. package/dist/esm/wm-option_2.entry.js +1 -1
  31. package/dist/esm-es5/{global-099ddc86.js → global-525745d2.js} +1 -1
  32. package/dist/esm-es5/index-558b5a82.js +1 -1
  33. package/dist/esm-es5/loader.js +1 -1
  34. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  35. package/dist/esm-es5/ripple.js +1 -1
  36. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -0
  37. package/dist/esm-es5/wm-modal_3.entry.js +1 -0
  38. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  39. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  40. package/dist/ripple/{p-c269536e.system.js → p-01035c8e.system.js} +1 -1
  41. package/dist/ripple/p-012cab20.entry.js +1 -0
  42. package/dist/ripple/p-02deae76.entry.js +1 -0
  43. package/dist/ripple/{p-320d06aa.js → p-1092e5ce.js} +1 -1
  44. package/dist/ripple/p-1d18d9d2.system.entry.js +1 -0
  45. package/dist/ripple/p-249add87.system.entry.js +1 -0
  46. package/dist/ripple/p-5254f902.entry.js +1 -0
  47. package/dist/ripple/p-6e725656.system.entry.js +1 -0
  48. package/dist/ripple/p-6fdfe9f4.system.entry.js +1 -0
  49. package/dist/ripple/{p-ad7c9d21.entry.js → p-bf7d98d8.entry.js} +1 -1
  50. package/dist/ripple/p-cff5d7e9.system.entry.js +1 -0
  51. package/dist/ripple/p-eefbca0e.system.js +1 -0
  52. package/dist/ripple/p-f13b034e.entry.js +1 -0
  53. package/dist/ripple/ripple.esm.js +1 -1
  54. package/dist/ripple/ripple.js +1 -1
  55. package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +1 -0
  56. package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +3 -0
  57. package/dist/types/components/wm-modal-pss/wm-modal-pss-footer.d.ts +14 -0
  58. package/dist/types/components/wm-modal-pss/wm-modal-pss-header.d.ts +10 -0
  59. package/dist/types/components.d.ts +88 -0
  60. package/package.json +1 -1
  61. package/dist/cjs/wm-modal-footer.cjs.entry.js +0 -47
  62. package/dist/cjs/wm-modal-header.cjs.entry.js +0 -39
  63. package/dist/esm/wm-modal-footer.entry.js +0 -43
  64. package/dist/esm/wm-modal-header.entry.js +0 -35
  65. package/dist/esm-es5/wm-modal-footer.entry.js +0 -1
  66. package/dist/esm-es5/wm-modal-header.entry.js +0 -1
  67. package/dist/esm-es5/wm-modal.entry.js +0 -1
  68. package/dist/ripple/p-13f51c06.entry.js +0 -1
  69. package/dist/ripple/p-1c170fb3.entry.js +0 -1
  70. package/dist/ripple/p-22930de9.system.entry.js +0 -1
  71. package/dist/ripple/p-294b38ca.system.entry.js +0 -1
  72. package/dist/ripple/p-2f664fdd.entry.js +0 -1
  73. package/dist/ripple/p-3568472c.entry.js +0 -1
  74. package/dist/ripple/p-4d956340.system.entry.js +0 -1
  75. package/dist/ripple/p-50388b6f.system.entry.js +0 -1
  76. package/dist/ripple/p-7c338485.entry.js +0 -1
  77. package/dist/ripple/p-84603f1f.system.entry.js +0 -1
  78. package/dist/ripple/p-b3a2bc1b.system.entry.js +0 -1
  79. package/dist/ripple/p-dcc367a9.system.js +0 -1
@@ -0,0 +1,138 @@
1
+ import { h } from "@stencil/core";
2
+ export class ModalFooter {
3
+ constructor() {
4
+ this.secondaryText = "";
5
+ this.primaryText = "";
6
+ this.infoText = "";
7
+ this.primaryActionDisabled = false;
8
+ this.deleteStyle = false;
9
+ }
10
+ componentWillLoad() {
11
+ this.uid = this.el.parentElement.uid;
12
+ // Trap focus when user shift+tabs past first element in modal
13
+ // NB @Listen doesn't allow to listen on a specific element (the parent modal)
14
+ // if we listen to the whole doc each modal on the page reacts to every event
15
+ this.el.parentElement.addEventListener("focusLastElement", () => {
16
+ this.lastElement.focus();
17
+ });
18
+ }
19
+ emitParentPrimaryEvent() {
20
+ const parentModal = this.el.parentElement;
21
+ //@ts-ignore
22
+ parentModal.emitPrimaryEvent();
23
+ }
24
+ emitParentSecondaryEvent() {
25
+ const parentModal = this.el.parentElement;
26
+ //@ts-ignore
27
+ parentModal.emitSecondaryEvent();
28
+ }
29
+ render() {
30
+ return (h("div", { class: `wm-wrapper ${this.infoText ? " footer-text" : ""}` }, h("div", { class: "wm-info", "aria-live": "polite" }, this.infoText), h("div", { class: "wm-button-collection" }, this.secondaryText && (h("wm-button", { onClick: () => this.emitParentSecondaryEvent(), id: `wm-secondary-${this.uid}`, ref: (el) => (this.primaryActionDisabled ? (this.lastElement = el) : null) }, this.secondaryText)), h("wm-button", { "button-type": this.deleteStyle ? "secondary" : "primary", "permanently-delete": this.deleteStyle, onClick: () => this.emitParentPrimaryEvent(), disabled: this.primaryActionDisabled, id: `wm-primary-${this.uid}`, ref: (el) => (!this.primaryActionDisabled ? (this.lastElement = el) : null) }, this.primaryText))));
31
+ }
32
+ static get is() { return "wm-modal-pss-footer"; }
33
+ static get originalStyleUrls() {
34
+ return {
35
+ "$": ["wm-modal-pss-footer.scss"]
36
+ };
37
+ }
38
+ static get styleUrls() {
39
+ return {
40
+ "$": ["wm-modal-pss-footer.css"]
41
+ };
42
+ }
43
+ static get properties() {
44
+ return {
45
+ "secondaryText": {
46
+ "type": "string",
47
+ "mutable": false,
48
+ "complexType": {
49
+ "original": "string",
50
+ "resolved": "string | undefined",
51
+ "references": {}
52
+ },
53
+ "required": false,
54
+ "optional": true,
55
+ "docs": {
56
+ "tags": [],
57
+ "text": ""
58
+ },
59
+ "attribute": "secondary-text",
60
+ "reflect": false,
61
+ "defaultValue": "\"\""
62
+ },
63
+ "primaryText": {
64
+ "type": "string",
65
+ "mutable": false,
66
+ "complexType": {
67
+ "original": "string",
68
+ "resolved": "string | undefined",
69
+ "references": {}
70
+ },
71
+ "required": false,
72
+ "optional": true,
73
+ "docs": {
74
+ "tags": [],
75
+ "text": ""
76
+ },
77
+ "attribute": "primary-text",
78
+ "reflect": false,
79
+ "defaultValue": "\"\""
80
+ },
81
+ "infoText": {
82
+ "type": "string",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "string",
86
+ "resolved": "string | undefined",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": true,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": ""
94
+ },
95
+ "attribute": "info-text",
96
+ "reflect": false,
97
+ "defaultValue": "\"\""
98
+ },
99
+ "primaryActionDisabled": {
100
+ "type": "boolean",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "boolean",
104
+ "resolved": "boolean",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": ""
112
+ },
113
+ "attribute": "primary-action-disabled",
114
+ "reflect": false,
115
+ "defaultValue": "false"
116
+ },
117
+ "deleteStyle": {
118
+ "type": "boolean",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "boolean",
122
+ "resolved": "boolean",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": ""
130
+ },
131
+ "attribute": "delete-style",
132
+ "reflect": false,
133
+ "defaultValue": "false"
134
+ }
135
+ };
136
+ }
137
+ static get elementRef() { return "el"; }
138
+ }
@@ -0,0 +1,55 @@
1
+ /* --------------------------------------
2
+ 1. Box-shadow
3
+ -------------------------------------- */
4
+ /* --------------------------------------
5
+ 2. Border-radius
6
+ -------------------------------------- */
7
+ /* --------------------------------------
8
+ 3. Transforms
9
+ -------------------------------------- */
10
+ /* --------------------------------------
11
+ 4. Button Focus
12
+ -------------------------------------- */
13
+ /* --------------------------------------
14
+ 5. Flex
15
+ -------------------------------------- */
16
+ /* --------------------------------------
17
+ 7. Screen Reader Only
18
+ -------------------------------------- */
19
+ /* --------------------------------------
20
+ 8. Label styles
21
+ this mixin includes all the styles for the label
22
+ + flex rules on the parent container to switch between top and left position
23
+ + srOnly when label is hidden
24
+ Assumes the following markup:
25
+ div.wrapper[.label-left.invalid] > div.label-wrapper > label.label > span.required
26
+ .wrapper is for the flex rules
27
+ .label-wrapper is to set the height of the label when positioned left so it's the same height as
28
+ the input. It can't be done directly on .label because of possible line wrapping.
29
+ When the label is on top there's no line wrapping at all to ensure proper alignment of inlined elements
30
+ (they can't be aligned on the baseline because of possible description text and error message)
31
+ -------------------------------------- */
32
+ wm-modal-pss-header {
33
+ border-radius: 5px 5px 0 0px;
34
+ margin-bottom: -1px;
35
+ }
36
+ wm-modal-pss-header .wm-wrapper {
37
+ display: flex;
38
+ justify-content: space-between;
39
+ align-items: center;
40
+ }
41
+ wm-modal-pss-header .wm-wrapper .title {
42
+ margin: 0;
43
+ font-weight: 600;
44
+ font-size: 1.125rem;
45
+ color: var(--wmcolor-modal-heading);
46
+ line-height: normal;
47
+ }
48
+ wm-modal-pss-header .wm-wrapper .title .subtitle {
49
+ display: block;
50
+ font-size: 0.875rem;
51
+ font-weight: normal;
52
+ }
53
+ wm-modal-pss-header .wm-wrapper .title:focus {
54
+ outline: none;
55
+ }
@@ -0,0 +1,81 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class ModalHeader {
3
+ constructor() {
4
+ this.heading = "";
5
+ this.subheading = "";
6
+ }
7
+ componentWillLoad() {
8
+ this.uid = this.el.parentElement.uid;
9
+ // Trap focus when user tabs past last element in modal
10
+ // NB @Listen doesn't allow to listen on a specific element (the parent modal)
11
+ // if we listen to the whole doc each modal on the page reacts to every event
12
+ this.el.parentElement.addEventListener("focusFirstElement", () => {
13
+ this.closeButtonEl.focus();
14
+ });
15
+ }
16
+ emitParentCloseEvent() {
17
+ const parentModal = this.el.parentElement;
18
+ //@ts-ignore
19
+ parentModal.emitCloseEvent();
20
+ }
21
+ // @Listen("click")
22
+ // directFocusOnClick() {
23
+ // this.headingElement.tabIndex = 0;
24
+ // this.headingElement.focus();
25
+ // }
26
+ render() {
27
+ return (h(Host, null, h("div", { class: "wm-wrapper" }, h("div", null, h("h2", { class: "title", id: `wm-modal-heading-text-${this.uid}` }, this.heading, h("span", { class: "subtitle" }, this.subheading))), h("wm-button", { "button-type": "navigational", icon: "f156", tooltip: "Close", "tooltip-position": "left", id: `wm-modal-close-${this.uid}`, ref: (el) => (this.closeButtonEl = el), onClick: () => this.emitParentCloseEvent() }))));
28
+ }
29
+ static get is() { return "wm-modal-pss-header"; }
30
+ static get originalStyleUrls() {
31
+ return {
32
+ "$": ["wm-modal-pss-header.scss"]
33
+ };
34
+ }
35
+ static get styleUrls() {
36
+ return {
37
+ "$": ["wm-modal-pss-header.css"]
38
+ };
39
+ }
40
+ static get properties() {
41
+ return {
42
+ "heading": {
43
+ "type": "string",
44
+ "mutable": false,
45
+ "complexType": {
46
+ "original": "string",
47
+ "resolved": "string | undefined",
48
+ "references": {}
49
+ },
50
+ "required": false,
51
+ "optional": true,
52
+ "docs": {
53
+ "tags": [],
54
+ "text": ""
55
+ },
56
+ "attribute": "heading",
57
+ "reflect": false,
58
+ "defaultValue": "\"\""
59
+ },
60
+ "subheading": {
61
+ "type": "string",
62
+ "mutable": false,
63
+ "complexType": {
64
+ "original": "string",
65
+ "resolved": "string | undefined",
66
+ "references": {}
67
+ },
68
+ "required": false,
69
+ "optional": true,
70
+ "docs": {
71
+ "tags": [],
72
+ "text": ""
73
+ },
74
+ "attribute": "subheading",
75
+ "reflect": false,
76
+ "defaultValue": "\"\""
77
+ }
78
+ };
79
+ }
80
+ static get elementRef() { return "el"; }
81
+ }
@@ -0,0 +1,134 @@
1
+ /* --------------------------------------
2
+ 1. Box-shadow
3
+ -------------------------------------- */
4
+ /* --------------------------------------
5
+ 2. Border-radius
6
+ -------------------------------------- */
7
+ /* --------------------------------------
8
+ 3. Transforms
9
+ -------------------------------------- */
10
+ /* --------------------------------------
11
+ 4. Button Focus
12
+ -------------------------------------- */
13
+ /* --------------------------------------
14
+ 5. Flex
15
+ -------------------------------------- */
16
+ /* --------------------------------------
17
+ 7. Screen Reader Only
18
+ -------------------------------------- */
19
+ /* --------------------------------------
20
+ 8. Label styles
21
+ this mixin includes all the styles for the label
22
+ + flex rules on the parent container to switch between top and left position
23
+ + srOnly when label is hidden
24
+ Assumes the following markup:
25
+ div.wrapper[.label-left.invalid] > div.label-wrapper > label.label > span.required
26
+ .wrapper is for the flex rules
27
+ .label-wrapper is to set the height of the label when positioned left so it's the same height as
28
+ the input. It can't be done directly on .label because of possible line wrapping.
29
+ When the label is on top there's no line wrapping at all to ensure proper alignment of inlined elements
30
+ (they can't be aligned on the baseline because of possible description text and error message)
31
+ -------------------------------------- */
32
+ wm-modal-pss {
33
+ --wmcolor-modal-background: var(--wmcolor-background);
34
+ --wmcolor-modal-border: var(--wmcolor-border);
35
+ --wmcolor-modal-heading: var(--wmcolor-text);
36
+ --wmcolor-modal-overlay: var(--wmcolor-overlay);
37
+ display: flex;
38
+ justify-content: center;
39
+ align-items: center;
40
+ flex-direction: column;
41
+ position: fixed;
42
+ top: 50%;
43
+ left: 50%;
44
+ transform: translate(-50%, -50%);
45
+ z-index: 2001;
46
+ width: 80vw;
47
+ max-width: 750px;
48
+ max-height: 80vh;
49
+ box-shadow: 0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);
50
+ }
51
+ wm-modal-pss * {
52
+ box-sizing: border-box;
53
+ }
54
+ wm-modal-pss > * {
55
+ width: 80vw;
56
+ max-width: 750px;
57
+ background: var(--wmcolor-modal-background);
58
+ }
59
+ wm-modal-pss > *:focus {
60
+ outline: none;
61
+ }
62
+ wm-modal-pss wm-modal-pss-header,
63
+ wm-modal-pss wm-modal-pss-footer {
64
+ padding: 20px 30px;
65
+ }
66
+ wm-modal-pss wm-modal-pss-header {
67
+ z-index: 2003;
68
+ }
69
+ wm-modal-pss wm-modal-pss-footer {
70
+ z-index: 2003;
71
+ }
72
+ wm-modal-pss > :not(wm-modal-pss-header):not(wm-modal-pss-footer) {
73
+ max-height: calc(80vh - 166px);
74
+ z-index: 2002;
75
+ }
76
+ wm-modal-pss.wm-modal wm-modal-pss-header {
77
+ border-bottom: 1px solid var(--wmcolor-modal-border);
78
+ }
79
+ wm-modal-pss.wm-modal wm-modal-pss-footer {
80
+ border-top: 1px solid var(--wmcolor-modal-border);
81
+ }
82
+ @media only screen and (max-width: 768px) {
83
+ wm-modal-pss.wm-modal {
84
+ height: 100%;
85
+ max-height: none;
86
+ max-width: none;
87
+ width: 100vw;
88
+ }
89
+ wm-modal-pss.wm-modal > * {
90
+ max-width: none;
91
+ width: 100vw;
92
+ }
93
+ wm-modal-pss.wm-modal > *:not(wm-modal-pss-header):not(wm-modal-pss-footer) {
94
+ max-height: none;
95
+ height: calc(100vh - 166px);
96
+ }
97
+ }
98
+ wm-modal-pss.wm-dialog > :not(wm-modal-pss-header):not(wm-modal-pss-footer) {
99
+ padding: 0 30px 20px 30px;
100
+ font-size: 0.875rem;
101
+ border: none;
102
+ }
103
+ wm-modal-pss .overlay {
104
+ width: 100vw;
105
+ height: 100vh;
106
+ max-width: none;
107
+ max-height: none;
108
+ position: fixed !important;
109
+ top: -1;
110
+ bottom: 1;
111
+ left: -1;
112
+ right: 1;
113
+ transform: translate(0%, 0%);
114
+ background-color: var(--wmcolor-modal-overlay);
115
+ transition: opacity 0.5s ease-out;
116
+ z-index: 2000;
117
+ }
118
+ wm-modal-pss.hide {
119
+ visibility: hidden;
120
+ }
121
+ wm-modal-pss .sr-only {
122
+ position: absolute !important;
123
+ width: 1px !important;
124
+ height: 1px !important;
125
+ padding: 0 !important;
126
+ border: 0 !important;
127
+ overflow: hidden !important;
128
+ clip: rect(0, 0, 0, 0) !important;
129
+ clip-path: inset(50%) !important;
130
+ white-space: nowrap !important;
131
+ margin: -1px !important;
132
+ top: 0;
133
+ left: 0;
134
+ }