@dile/ui 2.1.0 → 2.1.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.
@@ -65,6 +65,9 @@ export class DileInlineFeedback extends DileSlideDown(LitElement) {
65
65
  }
66
66
 
67
67
  doFeeedback(msg, status) {
68
+ if(this.delayedClear) {
69
+ clearTimeout(this.delayedClear);
70
+ }
68
71
  if(this.opened) {
69
72
  this.clear();
70
73
  setTimeout(() => this.doFeeedback(msg, status), 300);
@@ -87,10 +90,25 @@ export class DileInlineFeedback extends DileSlideDown(LitElement) {
87
90
  neutralFeedback(msg) {
88
91
  this.doFeeedback(msg, 'neutral');
89
92
  }
93
+ positiveFeedbackWithDelay(msg, milliseconds = 5000) {
94
+ this.positiveFeedback(msg);
95
+ this.clearAfterDelay(milliseconds);
96
+ }
97
+ negativeFeedbackWithDelay(msg, milliseconds = 5000) {
98
+ this.negativeFeedback(msg);
99
+ this.clearAfterDelay(milliseconds);
100
+ }
101
+ neutralFeedbackWithDelay(msg, milliseconds = 5000) {
102
+ this.neutralFeedback(msg);
103
+ this.clearAfterDelay(milliseconds);
104
+ }
90
105
  clear() {
91
106
  this.slideHide(this.msgElement);
92
107
  this.msg = '';
93
108
  this.status = '';
94
109
  this.opened = false;
95
110
  }
111
+ clearAfterDelay(miliseconds) {
112
+ this.delayedClear = setTimeout( () => this.clear(), miliseconds);
113
+ }
96
114
  }
@@ -22,7 +22,7 @@ export class DileModalHelp extends LitElement {
22
22
  font-weight: 300;
23
23
  color: var(--primary-dark-color, #303030);
24
24
  padding-bottom: 0.5rem;
25
- border-bottom: 1px solid var(--primary-color, #2962FF);
25
+ border-bottom: 1px solid var(--dile-primary-color, #2962FF);
26
26
  }
27
27
  dile-icon {
28
28
  cursor: pointer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/ui",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "UI Core components from dile-components.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,5 +26,5 @@
26
26
  "publishConfig": {
27
27
  "access": "public"
28
28
  },
29
- "gitHead": "9d26c17d9855b73203b87535fd2a8b83c890b4cb"
29
+ "gitHead": "86998576dd07b55c375671f4025eb9cb50ab13ac"
30
30
  }