@design.estate/dees-catalog 1.0.190 → 1.0.192

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 (33) hide show
  1. package/dist_bundle/bundle.js +251 -161
  2. package/dist_bundle/bundle.js.map +4 -4
  3. package/dist_ts_web/00_commitinfo_data.js +1 -1
  4. package/dist_ts_web/elements/dees-button.demo.d.ts +1 -0
  5. package/dist_ts_web/elements/dees-button.demo.js +15 -0
  6. package/dist_ts_web/elements/dees-button.js +3 -12
  7. package/dist_ts_web/elements/dees-contextmenu.demo.js +1 -1
  8. package/dist_ts_web/elements/dees-contextmenu.js +2 -2
  9. package/dist_ts_web/elements/dees-modal.d.ts +22 -0
  10. package/dist_ts_web/elements/dees-modal.demo.d.ts +1 -0
  11. package/dist_ts_web/elements/dees-modal.demo.js +22 -0
  12. package/dist_ts_web/elements/dees-modal.js +157 -0
  13. package/dist_ts_web/elements/dees-simple-appdash.d.ts +1 -1
  14. package/dist_ts_web/elements/dees-simple-appdash.js +3 -3
  15. package/dist_ts_web/elements/dees-simple-login.d.ts +1 -1
  16. package/dist_ts_web/elements/dees-simple-login.demo.js +2 -2
  17. package/dist_ts_web/elements/dees-simple-login.js +4 -4
  18. package/dist_ts_web/elements/index.d.ts +1 -0
  19. package/dist_ts_web/elements/index.js +2 -1
  20. package/dist_watch/bundle.js +712 -3179
  21. package/dist_watch/bundle.js.map +4 -4
  22. package/package.json +3 -3
  23. package/ts_web/00_commitinfo_data.ts +1 -1
  24. package/ts_web/elements/dees-button.demo.ts +15 -0
  25. package/ts_web/elements/dees-button.ts +2 -11
  26. package/ts_web/elements/dees-contextmenu.demo.ts +1 -1
  27. package/ts_web/elements/dees-contextmenu.ts +1 -1
  28. package/ts_web/elements/dees-modal.demo.ts +22 -0
  29. package/ts_web/elements/dees-modal.ts +168 -0
  30. package/ts_web/elements/dees-simple-appdash.ts +1 -1
  31. package/ts_web/elements/dees-simple-login.demo.ts +1 -1
  32. package/ts_web/elements/dees-simple-login.ts +2 -2
  33. package/ts_web/elements/index.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "1.0.190",
3
+ "version": "1.0.192",
4
4
  "private": false,
5
5
  "description": "website for lossless.com",
6
6
  "main": "dist_ts_web/index.js",
@@ -15,7 +15,7 @@
15
15
  "author": "Lossless GmbH",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@design.estate/dees-domtools": "^2.0.39",
18
+ "@design.estate/dees-domtools": "^2.0.40",
19
19
  "@design.estate/dees-element": "^2.0.27",
20
20
  "@design.estate/dees-wcctools": "^1.0.78",
21
21
  "@fortawesome/fontawesome-svg-core": "^6.4.2",
@@ -35,7 +35,7 @@
35
35
  "@gitzone/tswatch": "^2.0.7",
36
36
  "@push.rocks/projectinfo": "^5.0.2",
37
37
  "@push.rocks/tapbundle": "^5.0.15",
38
- "@types/node": "^20.5.9"
38
+ "@types/node": "^20.6.0"
39
39
  },
40
40
  "files": [
41
41
  "ts/**/*",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '1.0.190',
6
+ version: '1.0.192',
7
7
  description: 'website for lossless.com'
8
8
  }
@@ -0,0 +1,15 @@
1
+ import { html } from '@design.estate/dees-element';
2
+
3
+ export const demoFunc = () => html`
4
+ <dees-button>This is a slotted Text</dees-button>
5
+ <p>
6
+ <dees-button text="Highlighted: This text shows" type="highlighted">Highlighted</dees-button>
7
+ </p>
8
+ <p><dees-button type="discreet">This is discreete button</dees-button></p>
9
+ <p><dees-button disabled>This is a disabled button</dees-button></p>
10
+ <p><dees-button type="big">This is a slotted Text</dees-button></p>
11
+ <p><dees-button status="normal">Normal Status</dees-button></p>
12
+ <p><dees-button disabled status="pending">Pending Status</dees-button></p>
13
+ <p><dees-button disabled status="success">Success Status</dees-button></p>
14
+ <p><dees-button disabled status="error">Error Status</dees-button></p>
15
+ `;
@@ -1,3 +1,4 @@
1
+ import { demoFunc } from './dees-button.demo.js';
1
2
  import {
2
3
  customElement,
3
4
  html,
@@ -20,17 +21,7 @@ declare global {
20
21
 
21
22
  @customElement('dees-button')
22
23
  export class DeesButton extends DeesElement {
23
- public static demo = () => html`
24
- <dees-button>This is a slotted Text</dees-button>
25
- <p><dees-button text="Highlighted: This text shows" type="highlighted">Highlighted</dees-button></p>
26
- <p><dees-button type="discreet">This is discreete button</dees-button></p>
27
- <p><dees-button disabled>This is a disabled button</dees-button></p>
28
- <p><dees-button type="big">This is a slotted Text</dees-button></p>
29
- <p><dees-button status="normal">Normal Status</dees-button></p>
30
- <p><dees-button disabled status="pending">Pending Status</dees-button></p>
31
- <p><dees-button disabled status="success">Success Status</dees-button></p>
32
- <p><dees-button disabled status="error">Error Status</dees-button></p>
33
- `;
24
+ public static demo = demoFunc;
34
25
 
35
26
  @property({
36
27
  reflect: true,
@@ -33,7 +33,7 @@ export const demoFunc = () => html`
33
33
  },
34
34
  },
35
35
  ]);
36
- }}>Hello</dees-button>
36
+ }}>Right-Click for contextmenu</dees-button>
37
37
  <dees-contextmenu class="withMargin"></dees-contextmenu>
38
38
  <dees-contextmenu
39
39
  class="withMargin"
@@ -31,7 +31,7 @@ export class DeesContextmenu extends DeesElement {
31
31
  eventArg.preventDefault();
32
32
  eventArg.stopPropagation();
33
33
  const contextMenu = new DeesContextmenu();
34
- contextMenu.style.position = 'absolute';
34
+ contextMenu.style.position = 'fixed';
35
35
  contextMenu.style.zIndex = '2000';
36
36
  contextMenu.style.top = `${eventArg.clientY.toString()}px`;
37
37
  contextMenu.style.left = `${eventArg.clientX.toString()}px`;
@@ -0,0 +1,22 @@
1
+ import { html } from '@design.estate/dees-element';
2
+ import { DeesModal } from './dees-modal.js';
3
+
4
+ export const demoFunc = () => html`
5
+ <dees-button @click=${() => {
6
+ DeesModal.createAndShow({
7
+ heading: 'This is a heading',
8
+ content: html`
9
+ <dees-form>
10
+ <dees-input-text
11
+ .label=${'Username'}
12
+ >
13
+ </dees-input-text>
14
+ <dees-input-text
15
+ .label=${'Password'}
16
+ >
17
+ </dees-input-text>
18
+ </dees-form>
19
+ `
20
+ });
21
+ }}>open modal</dees-button>
22
+ `
@@ -0,0 +1,168 @@
1
+ import { demoFunc } from './dees-modal.demo.js';
2
+ import {
3
+ customElement,
4
+ html,
5
+ DeesElement,
6
+ property,
7
+ type TemplateResult,
8
+ cssManager,
9
+ css,
10
+ type CSSResult,
11
+ unsafeCSS,
12
+ unsafeHTML,
13
+ state,
14
+ } from '@design.estate/dees-element';
15
+
16
+ import * as domtools from '@design.estate/dees-domtools';
17
+ import { DeesWindowLayer } from './dees-windowlayer.js';
18
+
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ 'dees-modal': DeesModal;
22
+ }
23
+ }
24
+
25
+ @customElement('dees-modal')
26
+ export class DeesModal extends DeesElement {
27
+ // STATIC
28
+ public static demo = demoFunc;
29
+
30
+ public static async createAndShow(optionsArg: { heading: string; content: TemplateResult }) {
31
+ const body = document.body;
32
+ const modal = new DeesModal();
33
+ modal.heading = optionsArg.heading;
34
+ modal.content = optionsArg.content;
35
+ modal.windowLayer = await DeesWindowLayer.createAndShow();
36
+ modal.windowLayer.addEventListener('click', async () => {
37
+ await modal.destroy();
38
+ });
39
+ body.append(modal.windowLayer);
40
+ body.append(modal);
41
+ }
42
+
43
+ // INSTANCE
44
+
45
+ @property({
46
+ type: String,
47
+ })
48
+ public heading = '';
49
+
50
+ @state({})
51
+ public content: TemplateResult;
52
+
53
+ constructor() {
54
+ super();
55
+ }
56
+
57
+ public static styles = [
58
+ cssManager.defaultStyles,
59
+ css`
60
+ :host {
61
+ font-family: 'Mona Sans', 'Inter', sans-serif;
62
+ color: ${cssManager.bdTheme('#333', '#fff')};
63
+ }
64
+ .modalContainer {
65
+ display: flex;
66
+ position: fixed;
67
+ width: 100vw;
68
+ height: 100vh;
69
+ box-sizing: border-box;
70
+ align-items: center;
71
+ justify-content: center;
72
+ z-index: 2000;
73
+ }
74
+ .modal {
75
+ will-change: transform;
76
+ transform: translateY(10px);
77
+ opacity: 0;
78
+ width: 480px;
79
+ min-height: 120px;
80
+ background: #111;
81
+ border-radius: 8px;
82
+ border: 1px solid #222;
83
+ transition: all 0.2s;
84
+ overflow: hidden;
85
+ }
86
+
87
+ .modal.show {
88
+ opacity: 1;
89
+ transform: translateY(0px);
90
+ }
91
+
92
+ .modal .heading {
93
+ height: 32px;
94
+ font-family: 'Hubot Sans', 'Inter', sans-serif;
95
+ line-height: 32px;
96
+ text-align: center;
97
+ font-weight: 600;
98
+ font-size: 12px;
99
+ border-bottom: 1px solid #222;
100
+ }
101
+
102
+ .modal .content {
103
+ padding: 16px;
104
+ }
105
+ .modal .bottomButtons {
106
+ display: grid;
107
+ grid-template-columns: 1fr 1fr;
108
+ border-top: 1px solid #222;
109
+ }
110
+
111
+ .modal .bottomButtons .bottomButton {
112
+ height: 40px;
113
+ line-height: 40px;
114
+ text-align: center;
115
+ font-size: 14px;
116
+ border-right: 1px solid #222;
117
+ cursor: pointer;
118
+ }
119
+ .modal .bottomButtons .bottomButton:hover {
120
+ background: #222;
121
+ }
122
+ .modal .bottomButtons .bottomButton:last-child {
123
+ border-right: none;
124
+ }
125
+ `,
126
+ ];
127
+
128
+ public render(): TemplateResult {
129
+ return html`
130
+ <div class="modalContainer" @click=${this.handleOutsideClick}>
131
+ <div class="modal">
132
+ <div class="heading">${this.heading}</div>
133
+ <div class="content">${this.content}</div>
134
+ <div class="bottomButtons">
135
+ <div class="bottomButton">Cancel</div>
136
+ <div class="bottomButton">OK</div>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ `;
141
+ }
142
+
143
+ private windowLayer: DeesWindowLayer;
144
+ public async firstUpdated(_changedProperties: Map<string | number | symbol, unknown>) {
145
+ super.firstUpdated(_changedProperties);
146
+ const domtools = await this.domtoolsPromise;
147
+ await domtools.convenience.smartdelay.delayFor(30);
148
+ const modal = this.shadowRoot.querySelector('.modal');
149
+ modal.classList.add('show');
150
+ }
151
+
152
+ public async handleOutsideClick(eventArg: MouseEvent) {
153
+ eventArg.stopPropagation();
154
+ const modalContainer = this.shadowRoot.querySelector('.modalContainer');
155
+ if (eventArg.target === modalContainer) {
156
+ await this.destroy();
157
+ }
158
+ }
159
+
160
+ public async destroy() {
161
+ const domtools = await this.domtoolsPromise;
162
+ const modal = this.shadowRoot.querySelector('.modal');
163
+ modal.classList.remove('show');
164
+ await domtools.convenience.smartdelay.delayFor(200);
165
+ document.body.removeChild(this);
166
+ await this.windowLayer.destroy();
167
+ }
168
+ }
@@ -25,7 +25,7 @@ export class DeesSimpleAppDash extends DeesElement {
25
25
  // INSTANCE
26
26
 
27
27
  @property()
28
- public title = 'Dees Simple Login';
28
+ public name = 'Dees Simple Login';
29
29
 
30
30
  public static styles = [
31
31
  cssManager.defaultStyles,
@@ -1,3 +1,3 @@
1
1
  import { html } from '@design.estate/dees-element';
2
2
 
3
- export const demoFunc = () => html` <dees-simple-login> Hello there </dees-simple-login> `;
3
+ export const demoFunc = () => html` <dees-simple-login name="someapp"> Hello there </dees-simple-login> `;
@@ -26,7 +26,7 @@ export class DeesSimpleLogin extends DeesElement {
26
26
  // INSTANCE
27
27
 
28
28
  @property()
29
- public title = 'Dees Simple Login';
29
+ public name = 'Dees Simple Login';
30
30
 
31
31
  public static styles = [
32
32
  cssManager.defaultStyles,
@@ -69,7 +69,7 @@ export class DeesSimpleLogin extends DeesElement {
69
69
  <div class="loginContainer">
70
70
  <div class="login">
71
71
  <dees-form>
72
- <div class="header">Login to ${this.title}</div>
72
+ <div class="header">Login to ${this.name}</div>
73
73
  <dees-input-text key="username" label="username" required></dees-input-text>
74
74
  <dees-input-text key="password" label="password" isPasswordBool required></dees-input-text>
75
75
  <dees-form-submit disabled>login</dees-form-submit>
@@ -14,6 +14,7 @@ export * from './dees-input-quantityselector.js';
14
14
  export * from './dees-input-radio.js';
15
15
  export * from './dees-input-text.js';
16
16
  export * from './dees-mobilenavigation.js';
17
+ export * from './dees-modal.js';
17
18
  export * from './dees-pdf.js';
18
19
  export * from './dees-simple-appdash.js';
19
20
  export * from './dees-simple-login.js';