@roots/bud-client 6.3.2 → 6.3.3
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/lib/components/indicator/indicator.component.cjs +70 -54
- package/lib/components/indicator/indicator.component.cjs.map +1 -1
- package/lib/components/indicator/indicator.component.d.cts +7 -7
- package/lib/components/indicator/indicator.component.d.cts.map +1 -1
- package/lib/components/indicator/indicator.pulse.cjs +10 -3
- package/lib/components/indicator/indicator.pulse.cjs.map +1 -1
- package/lib/components/indicator/indicator.pulse.d.cts +1 -1
- package/lib/components/indicator/indicator.pulse.d.cts.map +1 -1
- package/lib/components/overlay/overlay.component.cjs +119 -68
- package/lib/components/overlay/overlay.component.cjs.map +1 -1
- package/lib/components/overlay/overlay.component.d.cts +1 -14
- package/lib/components/overlay/overlay.component.d.cts.map +1 -1
- package/package.json +2 -2
|
@@ -19,12 +19,19 @@ class Component extends HTMLElement {
|
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
21
|
this.colors = {
|
|
22
|
-
success: [4, 120, 87],
|
|
23
|
-
error: [220, 38, 38],
|
|
24
|
-
warn: [252, 211, 77],
|
|
25
|
-
pending: [59, 130, 246],
|
|
22
|
+
success: [4, 120, 87, 1],
|
|
23
|
+
error: [220, 38, 38, 1],
|
|
24
|
+
warn: [252, 211, 77, 1],
|
|
25
|
+
pending: [59, 130, 246, 1],
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Root div querySelector selector
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
get selector() {
|
|
33
|
+
return `.${this.name}`;
|
|
34
|
+
}
|
|
28
35
|
/**
|
|
29
36
|
* Get accessor: has errors
|
|
30
37
|
* @public
|
|
@@ -43,54 +50,62 @@ class Component extends HTMLElement {
|
|
|
43
50
|
* Render status indicator
|
|
44
51
|
* @public
|
|
45
52
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.
|
|
53
|
+
renderShadow() {
|
|
54
|
+
const container = document.createElement('div');
|
|
55
|
+
container.classList.add(this.name);
|
|
56
|
+
container.innerHTML = `
|
|
49
57
|
<style>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
.bud-activity-indicator {
|
|
59
|
+
position: fixed;
|
|
60
|
+
width: 10px;
|
|
61
|
+
height: 10px;
|
|
62
|
+
left: 10px;
|
|
63
|
+
bottom: 10px;
|
|
64
|
+
z-index: 9999;
|
|
65
|
+
margin: 5px;
|
|
66
|
+
padding: 5px;
|
|
67
|
+
-webkit-transition:
|
|
68
|
+
all .6s ease-in-out,
|
|
69
|
+
transition:
|
|
70
|
+
all .6s ease-in-out;
|
|
71
|
+
animation-fill-mode: forwards;
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
border-radius: 50%;
|
|
74
|
+
transform: scale(0);
|
|
75
|
+
opacity: 0;
|
|
76
|
+
}
|
|
63
77
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
78
|
+
.show {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
background-color: rgba(255, 255, 255, 1);
|
|
81
|
+
transform: scale(1);
|
|
82
|
+
transition:
|
|
83
|
+
all .6s ease-in-out;
|
|
84
|
+
}
|
|
68
85
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
${(0, indicator_pulse_cjs_1.pulse)(`success`, this.colors.success)}
|
|
87
|
+
${(0, indicator_pulse_cjs_1.pulse)(`error`, this.colors.error)}
|
|
88
|
+
${(0, indicator_pulse_cjs_1.pulse)(`warning`, this.colors.warn)}
|
|
89
|
+
${(0, indicator_pulse_cjs_1.pulse)(`pending`, this.colors.pending)}
|
|
72
90
|
|
|
73
|
-
.${this.name}__hidden {
|
|
74
|
-
opacity: 0;
|
|
75
|
-
}
|
|
76
91
|
</style>
|
|
77
92
|
`;
|
|
93
|
+
this.attachShadow({ mode: 'open' }).appendChild(container);
|
|
78
94
|
}
|
|
79
95
|
/**
|
|
80
96
|
* Show status indicator
|
|
81
97
|
* @public
|
|
82
98
|
*/
|
|
83
99
|
show() {
|
|
84
|
-
clearTimeout(this.hideTimeout);
|
|
85
|
-
this.
|
|
100
|
+
this.hideTimeout && clearTimeout(this.hideTimeout);
|
|
101
|
+
this.shadowRoot.querySelector(this.selector).classList.add('show');
|
|
86
102
|
}
|
|
87
103
|
/**
|
|
88
104
|
* Hide status indicator
|
|
89
105
|
*/
|
|
90
106
|
hide() {
|
|
91
107
|
this.hideTimeout = setTimeout(() => {
|
|
92
|
-
this.
|
|
93
|
-
this.classList.add(`${this.name}__hidden`);
|
|
108
|
+
this.shadowRoot.querySelector(this.selector).classList.remove('show');
|
|
94
109
|
}, 2000);
|
|
95
110
|
}
|
|
96
111
|
/**
|
|
@@ -99,8 +114,10 @@ class Component extends HTMLElement {
|
|
|
99
114
|
*/
|
|
100
115
|
onPending() {
|
|
101
116
|
this.show();
|
|
102
|
-
this.
|
|
103
|
-
|
|
117
|
+
this.shadowRoot
|
|
118
|
+
.querySelector(this.selector)
|
|
119
|
+
.classList.remove(`error`, `warning`, `success`);
|
|
120
|
+
this.shadowRoot.querySelector(this.selector).classList.add('pending');
|
|
104
121
|
this.hide();
|
|
105
122
|
}
|
|
106
123
|
/**
|
|
@@ -109,8 +126,10 @@ class Component extends HTMLElement {
|
|
|
109
126
|
*/
|
|
110
127
|
onSuccess() {
|
|
111
128
|
this.show();
|
|
112
|
-
this.
|
|
113
|
-
|
|
129
|
+
this.shadowRoot
|
|
130
|
+
.querySelector(this.selector)
|
|
131
|
+
.classList.remove(`error`, `warning`, `pending`);
|
|
132
|
+
this.shadowRoot.querySelector(this.selector).classList.add(`success`);
|
|
114
133
|
this.hide();
|
|
115
134
|
}
|
|
116
135
|
/**
|
|
@@ -119,8 +138,10 @@ class Component extends HTMLElement {
|
|
|
119
138
|
*/
|
|
120
139
|
onError() {
|
|
121
140
|
this.show();
|
|
122
|
-
this.
|
|
123
|
-
|
|
141
|
+
this.shadowRoot
|
|
142
|
+
.querySelector(this.selector)
|
|
143
|
+
.classList.remove(`warning`, `success`, `pending`);
|
|
144
|
+
this.shadowRoot.querySelector(this.selector).classList.add(`error`);
|
|
124
145
|
}
|
|
125
146
|
/**
|
|
126
147
|
* Status is warning
|
|
@@ -128,14 +149,15 @@ class Component extends HTMLElement {
|
|
|
128
149
|
*/
|
|
129
150
|
onWarning() {
|
|
130
151
|
this.show();
|
|
131
|
-
this.
|
|
132
|
-
|
|
152
|
+
this.shadowRoot
|
|
153
|
+
.querySelector(this.selector)
|
|
154
|
+
.classList.remove(`error`, `success`, `pending`);
|
|
155
|
+
this.shadowRoot.querySelector(this.selector).classList.add(`warning`);
|
|
133
156
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
update() {
|
|
157
|
+
static get observedAttributes() {
|
|
158
|
+
return ['has-errors', 'has-warnings', 'action'];
|
|
159
|
+
}
|
|
160
|
+
attributeChangedCallback() {
|
|
139
161
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
140
162
|
if ((_b = (_a = this.payload) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b.length)
|
|
141
163
|
return this.onError();
|
|
@@ -149,15 +171,9 @@ class Component extends HTMLElement {
|
|
|
149
171
|
((_k = this.payload) === null || _k === void 0 ? void 0 : _k.action) == 'sync')
|
|
150
172
|
return this.onPending();
|
|
151
173
|
}
|
|
152
|
-
static get observedAttributes() {
|
|
153
|
-
return ['has-errors', 'has-warnings', 'action'];
|
|
154
|
-
}
|
|
155
|
-
attributeChangedCallback() {
|
|
156
|
-
this.update();
|
|
157
|
-
}
|
|
158
174
|
connectedCallback() {
|
|
159
175
|
if (!this.rendered) {
|
|
160
|
-
this.
|
|
176
|
+
this.renderShadow();
|
|
161
177
|
this.rendered = true;
|
|
162
178
|
}
|
|
163
179
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicator.component.cjs","sourceRoot":"","sources":["../../../src/components/indicator/indicator.component.cts"],"names":[],"mappings":";;;AAAA,+DAA2C;AAE3C;;;GAGG;AACH,MAAa,SAAU,SAAQ,WAAW;IAA1C;;QAOE;;;WAGG;QACI,SAAI,GAAW,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"indicator.component.cjs","sourceRoot":"","sources":["../../../src/components/indicator/indicator.component.cts"],"names":[],"mappings":";;;AAAA,+DAA2C;AAE3C;;;GAGG;AACH,MAAa,SAAU,SAAQ,WAAW;IAA1C;;QAOE;;;WAGG;QACI,SAAI,GAAW,wBAAwB,CAAA;QAsC9C;;;WAGG;QACI,WAAM,GAAqD;YAChE,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;YACxB,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACvB,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;YACvB,OAAO,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;SAC3B,CAAA;IAyJH,CAAC;IAtMC;;;OAGG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;IACxB,CAAC;IAcD;;;OAGG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,MAAM,CAAA;IAClD,CAAC;IAED;;;OAGG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,MAAM,CAAA;IACpD,CAAC;IAaD;;;OAGG;IACI,YAAY;QACjB,MAAM,SAAS,GAAG,QAAQ,CAAC,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ClC,OAAO,CAAC,YAAY,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAA;IACjD,CAAC;IAEM,wBAAwB;;QAC7B,IAAI,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,0CAAE,MAAM;YAAE,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;QACvD,IAAI,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,QAAQ,0CAAE,MAAM;YAAE,OAAO,IAAI,CAAC,SAAS,EAAE,CAAA;QAC3D,IACE,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,0CAAE,MAAM,CAAA;YAC7B,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,QAAQ,0CAAE,MAAM,CAAA;YAC/B,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO;YAE9B,OAAO,IAAI,CAAC,SAAS,EAAE,CAAA;QACzB,IACE,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,KAAI,UAAU;YAClC,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,KAAI,MAAM;YAE9B,OAAO,IAAI,CAAC,SAAS,EAAE,CAAA;IAC3B,CAAC;IAEM,iBAAiB;QACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,YAAY,EAAE,CAAA;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;SACrB;IACH,CAAC;CACF;AAnND,8BAmNC"}
|
|
@@ -14,6 +14,11 @@ export declare class Component extends HTMLElement {
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* Root div querySelector selector
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
get selector(): string;
|
|
17
22
|
/**
|
|
18
23
|
* Timer
|
|
19
24
|
* @public
|
|
@@ -38,12 +43,12 @@ export declare class Component extends HTMLElement {
|
|
|
38
43
|
* Status indicator colors
|
|
39
44
|
* @public
|
|
40
45
|
*/
|
|
41
|
-
colors: Record<string, [number, number, number]>;
|
|
46
|
+
colors: Record<string, [number, number, number, number]>;
|
|
42
47
|
/**
|
|
43
48
|
* Render status indicator
|
|
44
49
|
* @public
|
|
45
50
|
*/
|
|
46
|
-
|
|
51
|
+
renderShadow(): void;
|
|
47
52
|
/**
|
|
48
53
|
* Show status indicator
|
|
49
54
|
* @public
|
|
@@ -73,11 +78,6 @@ export declare class Component extends HTMLElement {
|
|
|
73
78
|
* @public
|
|
74
79
|
*/
|
|
75
80
|
onWarning(): void;
|
|
76
|
-
/**
|
|
77
|
-
* Update status
|
|
78
|
-
* @public
|
|
79
|
-
*/
|
|
80
|
-
update(): void;
|
|
81
81
|
static get observedAttributes(): string[];
|
|
82
82
|
attributeChangedCallback(): void;
|
|
83
83
|
connectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicator.component.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/indicator.component.cts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;OAGG;IACI,QAAQ,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACI,IAAI,EAAE,MAAM,CAA2B;IAE9C;;;OAGG;IACI,WAAW,EAAE,MAAM,CAAC,KAAK,CAAA;IAEhC;;;OAGG;IACI,OAAO,EAAE,GAAG,CAAA;IAEnB;;;OAGG;IACH,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED;;;OAGG;IACH,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED;;;OAGG;IACI,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"indicator.component.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/indicator.component.cts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;OAGG;IACI,QAAQ,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACI,IAAI,EAAE,MAAM,CAA2B;IAE9C;;;OAGG;IACH,IAAW,QAAQ,WAElB;IAED;;;OAGG;IACI,WAAW,EAAE,MAAM,CAAC,KAAK,CAAA;IAEhC;;;OAGG;IACI,OAAO,EAAE,GAAG,CAAA;IAEnB;;;OAGG;IACH,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED;;;OAGG;IACH,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED;;;OAGG;IACI,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAK9D;IAED;;;OAGG;IACI,YAAY;IA4CnB;;;OAGG;IACI,IAAI;IAKX;;OAEG;IACI,IAAI;IAMX;;;OAGG;IACI,SAAS;IAYhB;;;OAGG;IACI,SAAS;IAYhB;;;OAGG;IACI,OAAO;IASd;;;OAGG;IACI,SAAS;IAUhB,WAAkB,kBAAkB,aAEnC;IAEM,wBAAwB;IAgBxB,iBAAiB;CAMzB"}
|
|
@@ -7,10 +7,17 @@ exports.pulse = void 0;
|
|
|
7
7
|
*/
|
|
8
8
|
const pulse = (name, color) => `
|
|
9
9
|
.${name} {
|
|
10
|
-
|
|
11
|
-
background: rgba(${color[0]}, ${color[1]}, ${color[2]}, 1);
|
|
12
|
-
box-shadow: 0 0 0 0 rgba(${color[0]}, ${color[1]}, ${color[2]}, 1);
|
|
10
|
+
box-shadow: 0 0 0 0 rgba(${color[0]}, ${color[1]}, ${color[2]}, ${color[3]});
|
|
13
11
|
animation: ${name}__pulse 2s infinite;
|
|
12
|
+
transition: all 0.4s ease-in-out;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.${name}:not(.show) {
|
|
16
|
+
background-color: rgba(${color[0]}, ${color[1]}, ${color[2]}, 0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.${name}.show {
|
|
20
|
+
background-color: rgba(${color[0]}, ${color[1]}, ${color[2]}, ${color[3]});
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
@keyframes ${name}__pulse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicator.pulse.cjs","sourceRoot":"","sources":["../../../src/components/indicator/indicator.pulse.cts"],"names":[],"mappings":";;;AAIA;;;GAGG;AACI,MAAM,KAAK,GAAG,CACnB,IAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"indicator.pulse.cjs","sourceRoot":"","sources":["../../../src/components/indicator/indicator.pulse.cts"],"names":[],"mappings":";;;AAIA;;;GAGG;AACI,MAAM,KAAK,GAAG,CACnB,IAAY,EACZ,KAAuC,EAC/B,EAAE,CAAC;KACR,IAAI;+BACsB,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;iBAC7D,IAAI;;;;KAIhB,IAAI;6BACoB,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;KAG1D,IAAI;6BACoB,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;eAG7D,IAAI;;;iCAGc,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;;;oCAK/B,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;;;iCAKrC,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;CAGlE,CAAA;AAlCY,QAAA,KAAK,SAkCjB"}
|
|
@@ -5,5 +5,5 @@ export interface pulse {
|
|
|
5
5
|
* CSS animation for reload indicator
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export declare const pulse: (name: string, color: [number, number, number]) => string;
|
|
8
|
+
export declare const pulse: (name: string, color: [number, number, number, number]) => string;
|
|
9
9
|
//# sourceMappingURL=indicator.pulse.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicator.pulse.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/indicator.pulse.cts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;CACxD;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,SACV,MAAM,SACL,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"indicator.pulse.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/indicator.pulse.cts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;CACxD;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,SACV,MAAM,SACL,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KACtC,MA+BF,CAAA"}
|
|
@@ -8,71 +8,124 @@ exports.Component = void 0;
|
|
|
8
8
|
*/
|
|
9
9
|
class Component extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
11
|
-
super();
|
|
11
|
+
super(...arguments);
|
|
12
12
|
this.name = `bud-overlay`;
|
|
13
13
|
}
|
|
14
14
|
get message() {
|
|
15
15
|
return this.getAttribute('message');
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
17
|
+
renderShadow() {
|
|
18
|
+
const container = document.createElement('div');
|
|
19
|
+
container.classList.add('overlay');
|
|
20
|
+
container.innerHTML = `
|
|
21
|
+
<style>
|
|
22
|
+
.overlay {
|
|
23
|
+
width: 100vw;
|
|
24
|
+
backdrop-filter: blur(10px);
|
|
25
|
+
display: flex;
|
|
26
|
+
height: 100vh;
|
|
27
|
+
border-top: 2px solid transparent;
|
|
28
|
+
overflow-x: hidden;
|
|
29
|
+
overflow-y: scroll;
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: -1000px;
|
|
32
|
+
left: 0;
|
|
33
|
+
right: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
opacity: 0;
|
|
36
|
+
transition: opacity 0.2s ease-in-out, border 0.4s ease-in-out;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.visible {
|
|
41
|
+
border-top: 5px solid red;
|
|
42
|
+
top: 0;
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transition: opacity 0.2s ease-in-out, border 0.4s ease-in-out;
|
|
45
|
+
z-index: 9998;
|
|
46
|
+
max-width: 100vw;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.messages {
|
|
50
|
+
background-color: white;
|
|
51
|
+
border-radius: 5px;
|
|
52
|
+
filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06)); display: flex;
|
|
53
|
+
align-self: center;
|
|
54
|
+
width: 800px;
|
|
55
|
+
max-width: 90vw;
|
|
56
|
+
margin-left: auto;
|
|
57
|
+
margin-right: auto;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
flex-wrap: wrap;
|
|
60
|
+
align-items: center;
|
|
61
|
+
align-content: center;
|
|
62
|
+
padding: 2rem 2rem 0rem 2rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.visible .messages > div {
|
|
66
|
+
position: relative;
|
|
67
|
+
top: 0;
|
|
68
|
+
opacity: 1;
|
|
69
|
+
transition: all: 0.2s ease-in-out;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.messages > div {
|
|
73
|
+
position: relative;
|
|
74
|
+
top: 20px;
|
|
75
|
+
opacity: 0;
|
|
76
|
+
transition: all: 0.2s ease-in-out;
|
|
77
|
+
align-items: center;
|
|
78
|
+
align-content: center;
|
|
79
|
+
color: rgba(0, 0, 0, 0.87);
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
82
|
+
padding: 0rem 2rem 2rem 2rem;
|
|
83
|
+
width: 100%;
|
|
84
|
+
max-width:95vw;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.messages > div > span {
|
|
88
|
+
font-size: 1.2rem;
|
|
89
|
+
line-height: 2rem;
|
|
90
|
+
font-weight: 300;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.messages > div > pre {
|
|
94
|
+
font-weight: 300;
|
|
95
|
+
font-size: 0.8rem;
|
|
96
|
+
overflow-x: scroll;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
pre {
|
|
100
|
+
background: #303030;
|
|
101
|
+
color: #f1f1f1;
|
|
102
|
+
padding: 10px 16px;
|
|
103
|
+
border-radius: 2px;
|
|
104
|
+
border-top: 4px solid #dd0303;
|
|
105
|
+
-moz-box-shadow: inset 0 0 10px #000;
|
|
106
|
+
box-shadow: inset 0 0 10px #000;
|
|
107
|
+
counter-reset: line;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
pre span {
|
|
111
|
+
display: block;
|
|
112
|
+
line-height: 1.5rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
pre span:before {
|
|
116
|
+
counter-increment: line;
|
|
117
|
+
content: counter(line);
|
|
118
|
+
display: inline-block;
|
|
119
|
+
border-right: 1px solid #ddd;
|
|
120
|
+
padding: 0 .5em;
|
|
121
|
+
margin-right: .5em;
|
|
122
|
+
color: #888;
|
|
123
|
+
width: 30px;
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
126
|
+
<div class="messages"></div>
|
|
127
|
+
`;
|
|
128
|
+
this.attachShadow({ mode: 'open' }).appendChild(container);
|
|
76
129
|
}
|
|
77
130
|
static get observedAttributes() {
|
|
78
131
|
return ['message'];
|
|
@@ -83,23 +136,21 @@ class Component extends HTMLElement {
|
|
|
83
136
|
this.documentBodyStyle = (_a = document.body) === null || _a === void 0 ? void 0 : _a.style;
|
|
84
137
|
if (this.getAttribute('message')) {
|
|
85
138
|
document.body.style.overflow = 'hidden';
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
139
|
+
this.shadowRoot.querySelector('.overlay').classList.add(`visible`);
|
|
140
|
+
this.shadowRoot.querySelector('.messages').innerHTML =
|
|
141
|
+
this.getAttribute('message');
|
|
142
|
+
return;
|
|
89
143
|
}
|
|
90
144
|
if (((_b = this.documentBodyStyle) === null || _b === void 0 ? void 0 : _b.overflow) && ((_c = document === null || document === void 0 ? void 0 : document.body) === null || _c === void 0 ? void 0 : _c.style)) {
|
|
91
145
|
document.body.style.overflow = this.documentBodyStyle.overflow;
|
|
92
146
|
}
|
|
93
|
-
this.classList.
|
|
94
|
-
this.classList.remove(`${this.name}__visible`);
|
|
147
|
+
this.shadowRoot.querySelector('.overlay').classList.remove(`visible`);
|
|
95
148
|
}
|
|
96
149
|
connectedCallback() {
|
|
97
150
|
var _a;
|
|
98
151
|
if ((_a = document.body) === null || _a === void 0 ? void 0 : _a.style)
|
|
99
152
|
this.documentBodyStyle = document.body.style;
|
|
100
|
-
|
|
101
|
-
return;
|
|
102
|
-
this.render();
|
|
153
|
+
this.renderShadow();
|
|
103
154
|
}
|
|
104
155
|
}
|
|
105
156
|
exports.Component = Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.component.cjs","sourceRoot":"","sources":["../../../src/components/overlay/overlay.component.cts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,SAAU,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"overlay.component.cjs","sourceRoot":"","sources":["../../../src/components/overlay/overlay.component.cts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,SAAU,SAAQ,WAAW;IAA1C;;QACS,SAAI,GAAW,aAAa,CAAA;IAgKrC,CAAC;IArJC,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACrC,CAAC;IAEM,YAAY;QACjB,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAC/C,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QAClC,SAAS,CAAC,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAA;QACtE,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;CACF;AAjKD,8BAiKC"}
|
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class Component extends HTMLElement {
|
|
7
7
|
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* `true` if component has been rendered
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
rendered: boolean;
|
|
14
8
|
/**
|
|
15
9
|
* WHM payload
|
|
16
10
|
*
|
|
@@ -19,14 +13,7 @@ export declare class Component extends HTMLElement {
|
|
|
19
13
|
payload: any;
|
|
20
14
|
documentBodyStyle: any;
|
|
21
15
|
get message(): string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Render component
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
render(): void;
|
|
29
|
-
setInnerHtml(content: string): void;
|
|
16
|
+
renderShadow(): void;
|
|
30
17
|
static get observedAttributes(): string[];
|
|
31
18
|
attributeChangedCallback(): void;
|
|
32
19
|
connectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.component.d.cts","sourceRoot":"","sources":["../../../src/components/overlay/overlay.component.cts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACjC,IAAI,EAAE,MAAM,CAAgB;IAEnC;;;;OAIG;IACI,
|
|
1
|
+
{"version":3,"file":"overlay.component.d.cts","sourceRoot":"","sources":["../../../src/components/overlay/overlay.component.cts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACjC,IAAI,EAAE,MAAM,CAAgB;IAEnC;;;;OAIG;IACI,OAAO,EAAE,GAAG,CAAA;IAEZ,iBAAiB,EAAE,GAAG,CAAA;IAE7B,IAAW,OAAO,WAEjB;IAEM,YAAY,IAAI,IAAI;IAmH3B,WAAkB,kBAAkB,aAEnC;IAEM,wBAAwB;IAsBxB,iBAAiB;CAIzB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roots/bud-client",
|
|
3
3
|
"description": "Client scripts for @roots/bud",
|
|
4
|
-
"version": "6.3.
|
|
4
|
+
"version": "6.3.3",
|
|
5
5
|
"homepage": "https://roots.io/bud",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@skypack/package-check": "0.2.2",
|
|
65
|
-
"@types/node": "16.11.
|
|
65
|
+
"@types/node": "16.11.45",
|
|
66
66
|
"webpack": "5.73.0"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|