@design.estate/dees-catalog 1.0.182 → 1.0.183
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/dist_bundle/bundle.js +16 -2
- package/dist_bundle/bundle.js.map +3 -3
- package/dist_ts_web/elements/dees-simple-login.d.ts +4 -0
- package/dist_ts_web/elements/dees-simple-login.js +36 -3
- package/dist_watch/bundle.js +34 -2
- package/dist_watch/bundle.js.map +2 -2
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/dees-simple-login.ts +39 -3
package/package.json
CHANGED
|
@@ -20,8 +20,11 @@ declare global {
|
|
|
20
20
|
@customElement('dees-simple-login')
|
|
21
21
|
export class DeesSimpleLogin extends DeesElement {
|
|
22
22
|
// STATIC
|
|
23
|
-
public static demo = () => html`
|
|
24
|
-
|
|
23
|
+
public static demo = () => html`
|
|
24
|
+
<dees-simple-login>
|
|
25
|
+
Hello there
|
|
26
|
+
</dees-simple-login>
|
|
27
|
+
`;
|
|
25
28
|
// INSTANCE
|
|
26
29
|
|
|
27
30
|
@property()
|
|
@@ -35,9 +38,11 @@ export class DeesSimpleLogin extends DeesElement {
|
|
|
35
38
|
user-select: none;
|
|
36
39
|
}
|
|
37
40
|
.loginContainer {
|
|
41
|
+
position: absolute;
|
|
38
42
|
display: flex;
|
|
39
43
|
justify-content: center; /* aligns horizontally */
|
|
40
44
|
align-items: center; /* aligns vertically */
|
|
45
|
+
width: 100%;
|
|
41
46
|
height: 100%;
|
|
42
47
|
}
|
|
43
48
|
.login {
|
|
@@ -47,11 +52,17 @@ export class DeesSimpleLogin extends DeesElement {
|
|
|
47
52
|
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
|
48
53
|
border-radius: 3px;
|
|
49
54
|
padding: 24px;
|
|
55
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
.header {
|
|
53
59
|
text-align: center;
|
|
54
60
|
}
|
|
61
|
+
.slotContainer {
|
|
62
|
+
opacity:0;
|
|
63
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
55
66
|
`,
|
|
56
67
|
];
|
|
57
68
|
|
|
@@ -67,7 +78,9 @@ export class DeesSimpleLogin extends DeesElement {
|
|
|
67
78
|
</dees-form>
|
|
68
79
|
</div>
|
|
69
80
|
</div>
|
|
70
|
-
<
|
|
81
|
+
<div class="slotContainer">
|
|
82
|
+
<slot></slot>
|
|
83
|
+
</div>
|
|
71
84
|
`;
|
|
72
85
|
}
|
|
73
86
|
|
|
@@ -81,6 +94,29 @@ export class DeesSimpleLogin extends DeesElement {
|
|
|
81
94
|
const submit = this.shadowRoot.querySelector('dees-form-submit');
|
|
82
95
|
form.addEventListener('formData', (event: CustomEvent) => {
|
|
83
96
|
this.dispatchEvent(new CustomEvent('login', { detail: event.detail }));
|
|
97
|
+
// this.switchToSlottedContent();
|
|
84
98
|
});
|
|
85
99
|
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* allows switching to slotted content
|
|
103
|
+
*/
|
|
104
|
+
public async switchToSlottedContent() {
|
|
105
|
+
const domtools = await this.domtoolsPromise;
|
|
106
|
+
const loginDiv: HTMLDivElement = this.shadowRoot.querySelector('.login');
|
|
107
|
+
const loginContainerDiv: HTMLDivElement = this.shadowRoot.querySelector('.loginContainer');
|
|
108
|
+
const slotContainerDiv: HTMLDivElement = this.shadowRoot.querySelector('.slotContainer');
|
|
109
|
+
loginDiv.style.opacity = '0';
|
|
110
|
+
loginDiv.style.transform = 'translateY(20px)';
|
|
111
|
+
loginContainerDiv.style.pointerEvents = 'none';
|
|
112
|
+
slotContainerDiv.style.transform = 'translateY(20px)';
|
|
113
|
+
await domtools.convenience.smartdelay.delayFor(300);
|
|
114
|
+
slotContainerDiv.style.opacity = '1';
|
|
115
|
+
slotContainerDiv.style.transform = 'translateY(0px)';
|
|
116
|
+
await domtools.convenience.smartdelay.delayFor(300);
|
|
117
|
+
slotContainerDiv.style.pointerEvents = 'all';
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
}
|
|
86
122
|
}
|