@design.estate/dees-catalog 1.0.241 → 1.0.243

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "1.0.241",
3
+ "version": "1.0.243",
4
4
  "private": false,
5
5
  "description": "website for lossless.com",
6
6
  "main": "dist_ts_web/index.js",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '1.0.241',
6
+ version: '1.0.243',
7
7
  description: 'website for lossless.com'
8
8
  }
@@ -2,7 +2,13 @@ import { html } from '@design.estate/dees-element';
2
2
 
3
3
  export const demoFunc = () => html`
4
4
  <dees-input-multitoggle
5
- .options=${['option 1', 'option 2', 'option 3']}
5
+ .options=${['option 1', 'option 2', 'a longer option with multiple words']}
6
6
  .selectedOption=${'option 2'}
7
7
  ></dees-input-multitoggle>
8
+ <dees-input-multitoggle
9
+ .type=${'boolean'}
10
+ .booleanTrueName=${'enabled'}
11
+ .booleanFalseName=${'disabled'}
12
+ .selectedOption=${'true'}
13
+ ></dees-input-multitoggle>
8
14
  `;
@@ -55,12 +55,18 @@ export class DeesInputMultitoggle extends DeesElement {
55
55
  }
56
56
 
57
57
  .option {
58
+ color: #CCC;
58
59
  position: relative;
59
60
  padding: 0px 16px;
60
61
  line-height: 40px;
61
- cursor: pointer;
62
+ cursor: default;
62
63
  width: min-content; /* Make the width as per the content */
63
64
  white-space: nowrap; /* Prevent text wrapping */
65
+ transition: all 0.1s;
66
+ }
67
+
68
+ .option:hover {
69
+ color: #fff;
64
70
  }
65
71
 
66
72
  .indicator {
@@ -90,7 +96,7 @@ export class DeesInputMultitoggle extends DeesElement {
90
96
 
91
97
  public async firstUpdated() {
92
98
  if (this.type === 'boolean') {
93
- this.options = [this.booleanTrueName || 'true', this.booleanFalseName];
99
+ this.options = [this.booleanTrueName || 'true', this.booleanFalseName || 'false'];
94
100
  }
95
101
  this.setIndicator();
96
102
  }
@@ -1,5 +1,15 @@
1
1
  import { html } from '@design.estate/dees-element';
2
2
 
3
3
  export const demoFunc = () => html`
4
- <dees-input-multiselect></dees-input-multiselect>
4
+ <style>
5
+ .demoContainer {
6
+ max-width: 600px;
7
+ margin: auto;
8
+ padding: 40px;
9
+ background: #000;
10
+ }
11
+ </style>
12
+ <div class="demoContainer">
13
+ <dees-input-typelist></dees-input-typelist>
14
+ </div>
5
15
  `;
@@ -40,29 +40,48 @@ export class DeesInputTypelist extends DeesElement {
40
40
  border-left: ${cssManager.bdTheme('1px solid #CCC', 'none')};
41
41
  }
42
42
 
43
- .selections {
44
- padding: 8px;
43
+ .tags {
44
+ padding: 16px;
45
+ cursor: default;
46
+ }
47
+
48
+ .notags {
49
+ text-align: center;
50
+ opacity: 0.5;
51
+ font-size: 12px;
45
52
  }
46
53
 
47
54
  input {
55
+ display: block;
56
+ box-sizing: border-box;
48
57
  background: #181818;
49
58
  width: 100%;
50
59
  outline: none;
51
60
  border: none;
52
61
  color: inherit;
53
- padding: 8px;
62
+ padding: 0px 16px;
63
+ overflow: hidden;
64
+ line-height: 32px;
65
+ height: 0px;
66
+ transition: height 0.2s;
67
+ }
68
+
69
+ input:focus {
70
+ height: 32px;
54
71
  }
55
72
  `,
56
73
  ];
57
74
 
58
75
  public render(): TemplateResult {
59
76
  return html`
60
- <div class="label">MultiSelect</div>
77
+ <div class="label">Type List</div>
61
78
  <div class="mainbox">
62
- <div class="selections">
63
- Nothing selected...
79
+ <div class="tags" @click=${() => {
80
+ this.shadowRoot.querySelector('input').focus();
81
+ }}>
82
+ <div class="notags">No tags yet</div>
64
83
  </div>
65
- <input type="text" placeholder="Type to select" />
84
+ <input type="text" placeholder="Type, press Enter to add it..." />
66
85
  </div>
67
86
  `;
68
87
  }
@@ -57,18 +57,9 @@ export class DeesPdf extends DeesElement {
57
57
  if (!DeesPdf.pdfJsReady) {
58
58
  const pdfJsReadyDeferred = domtools.plugins.smartpromise.defer();
59
59
  DeesPdf.pdfJsReady = pdfJsReadyDeferred.promise;
60
- const loadDeferred = domtools.plugins.smartpromise.defer();
61
- const script = document.createElement('script');
62
- script.addEventListener('load', () => {
63
- console.log('pdf.js loaded!');
64
- loadDeferred.resolve();
65
- });
66
- script.src = 'https:////mozilla.github.io/pdf.js/build/pdf.js';
67
- document.getElementsByTagName('head')[0].appendChild(script);
68
- // The workerSrc property shall be specified.
69
- await loadDeferred.promise;
70
- DeesPdf.pdfjsLib = window['pdfjs-dist/build/pdf'];
71
- DeesPdf.pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
60
+ // @ts-ignore
61
+ DeesPdf.pdfjsLib = await import('https://cdn.jsdelivr.net/npm/pdfjs-dist@4.0.379/+esm');
62
+ DeesPdf.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdn.jsdelivr.net/npm/pdfjs-dist@4.0.379/build/pdf.worker.mjs';
72
63
  pdfJsReadyDeferred.resolve();
73
64
  }
74
65
  await DeesPdf.pdfJsReady;
File without changes
@@ -0,0 +1,7 @@
1
+ import { html } from '@design.estate/dees-element';
2
+
3
+ import { DeesUpdater } from './dees-updater.js';
4
+
5
+ export const demoFunc = () => {
6
+
7
+ }
@@ -1,7 +1,5 @@
1
- import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, } from '@design.estate/dees-element';
2
-
3
- import * as domtools from '@design.estate/dees-domtools';
4
-
1
+ import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, domtools } from '@design.estate/dees-element';
2
+ import { demoFunc } from './dees-updater.demo.js';
5
3
 
6
4
  import './dees-windowlayer';
7
5
  import { css, cssManager } from '@design.estate/dees-element';
@@ -14,7 +12,11 @@ declare global {
14
12
 
15
13
  @customElement('dees-updater')
16
14
  export class DeesUpdater extends DeesElement {
17
- public static demo = () => html`<dees-updater></dees-updater>`;
15
+ public static demo = demoFunc;
16
+
17
+ public static async createAndShow() {
18
+
19
+ }
18
20
 
19
21
  @property({
20
22
  type: String,
@@ -38,9 +40,8 @@ export class DeesUpdater extends DeesElement {
38
40
  will-change: transform;
39
41
  position: relative;
40
42
  background: ${cssManager.bdTheme('#eeeeeb', '#222')};
41
- margin: auto;
42
43
  max-width: 800px;
43
- border-radius: 3px;
44
+ border-radius: 8px;
44
45
  border-top: 1px solid ${cssManager.bdTheme('#eeeeeb', '#333')};
45
46
  }
46
47
 
@@ -68,7 +69,9 @@ export class DeesUpdater extends DeesElement {
68
69
 
69
70
  public render(): TemplateResult {
70
71
  return html`
71
- <dees-windowlayer @clicked="${this.windowLayerClicked}">
72
+ <dees-windowlayer @clicked="${this.windowLayerClicked}" .options=${{
73
+ blur: true,
74
+ }}>
72
75
  <div class="modalContainer">
73
76
  <div class="headingContainer">
74
77
  <dees-spinner .size=${60}></dees-spinner>
@@ -84,7 +87,6 @@ export class DeesUpdater extends DeesElement {
84
87
  }
85
88
 
86
89
  private windowLayerClicked() {
87
- const windowLayer = this.shadowRoot.querySelector('dees-windowlayer');
88
- windowLayer.toggleVisibility();
90
+
89
91
  }
90
92
  }