@ezeep/ezeep-js 1.0.139 → 1.0.143
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/cjs/ezeep.cjs.js +2 -2
- package/dist/cjs/ezp-auth_14.cjs.entry.js +33750 -0
- package/dist/cjs/{index-a93095ed.js → index-62fc857c.js} +7 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ezp-auth/ezp-auth.css +3 -77
- package/dist/collection/components/ezp-auth/ezp-auth.js +26 -20
- package/dist/collection/components/ezp-backdrop/ezp-backdrop.css +3 -3
- package/dist/collection/components/ezp-dialog/ezp-dialog.css +48 -0
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +220 -0
- package/dist/collection/components/ezp-icon/assets/glyph-account.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-checkmark-alt.svg +3 -0
- package/dist/collection/components/ezp-icon/assets/glyph-checkmark.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-close.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-color.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-copies.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-dark.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-drag-drop.svg +3 -0
- package/dist/collection/components/ezp-icon/assets/glyph-duplex.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-exclamation-mark.svg +3 -0
- package/dist/collection/components/ezp-icon/assets/glyph-expand.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-help.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-light.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-logo.svg +3 -0
- package/dist/collection/components/ezp-icon/assets/glyph-logout.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-menu.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-minus.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-orientation.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-plus.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-printer.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-quality.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-question-mark.svg +3 -0
- package/dist/collection/components/ezp-icon/assets/glyph-size.svg +2 -2
- package/dist/collection/components/ezp-icon/assets/glyph-system.svg +2 -2
- package/dist/collection/components/ezp-icon/ezp-icon.css +25 -9
- package/dist/collection/components/ezp-icon/ezp-icon.js +23 -3
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.css +43 -34
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
- package/dist/collection/components/ezp-label/ezp-label.css +32 -32
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +21 -27
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +336 -75
- package/dist/collection/components/ezp-printing/ezp-printing.css +175 -273
- package/dist/collection/components/ezp-printing/ezp-printing.js +126 -13
- package/dist/collection/components/ezp-select/ezp-select.css +98 -151
- package/dist/collection/components/ezp-select/ezp-select.js +51 -20
- package/dist/collection/components/ezp-status/ezp-status.css +111 -0
- package/dist/collection/components/ezp-status/ezp-status.js +236 -0
- package/dist/collection/components/ezp-stepper/ezp-stepper.css +21 -21
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
- package/dist/collection/components/ezp-text-button/ezp-text-button.css +44 -34
- package/dist/collection/components/ezp-text-button/ezp-text-button.js +22 -2
- package/dist/collection/components/ezp-upload/ezp-upload.css +67 -0
- package/dist/collection/components/ezp-upload/ezp-upload.js +121 -0
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +75 -71
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +12 -9
- package/dist/collection/services/print.js +65 -9
- package/dist/custom-elements/index.d.ts +18 -6
- package/dist/custom-elements/index.js +29107 -361
- package/dist/directives/proxies.ts +81 -25
- package/dist/esm/ezeep.js +2 -2
- package/dist/esm/ezp-auth_14.entry.js +33733 -0
- package/dist/esm/{index-9ecf6ae0.js → index-265d8cca.js} +7 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_14.entry.js +21 -0
- package/dist/esm-es5/{index-9ecf6ae0.js → index-265d8cca.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/assets/glyph-account.svg +2 -2
- package/dist/ezeep/assets/glyph-checkmark-alt.svg +3 -0
- package/dist/ezeep/assets/glyph-checkmark.svg +2 -2
- package/dist/ezeep/assets/glyph-close.svg +2 -2
- package/dist/ezeep/assets/glyph-color.svg +2 -2
- package/dist/ezeep/assets/glyph-copies.svg +2 -2
- package/dist/ezeep/assets/glyph-dark.svg +2 -2
- package/dist/ezeep/assets/glyph-drag-drop.svg +3 -0
- package/dist/ezeep/assets/glyph-duplex.svg +2 -2
- package/dist/ezeep/assets/glyph-exclamation-mark.svg +3 -0
- package/dist/ezeep/assets/glyph-expand.svg +2 -2
- package/dist/ezeep/assets/glyph-help.svg +2 -2
- package/dist/ezeep/assets/glyph-light.svg +2 -2
- package/dist/ezeep/assets/glyph-logo.svg +3 -0
- package/dist/ezeep/assets/glyph-logout.svg +2 -2
- package/dist/ezeep/assets/glyph-menu.svg +2 -2
- package/dist/ezeep/assets/glyph-minus.svg +2 -2
- package/dist/ezeep/assets/glyph-orientation.svg +2 -2
- package/dist/ezeep/assets/glyph-plus.svg +2 -2
- package/dist/ezeep/assets/glyph-printer.svg +2 -2
- package/dist/ezeep/assets/glyph-quality.svg +2 -2
- package/dist/ezeep/assets/glyph-question-mark.svg +3 -0
- package/dist/ezeep/assets/glyph-size.svg +2 -2
- package/dist/ezeep/assets/glyph-system.svg +2 -2
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/ezeep.js +1 -1
- package/dist/ezeep/p-6d99f6f4.system.entry.js +21 -0
- package/dist/ezeep/p-972c2256.entry.js +15 -0
- package/dist/ezeep/p-98ec6965.system.js +1 -0
- package/dist/ezeep/p-f3065800.js +1 -0
- package/dist/ezeep/p-f89804ee.system.js +1 -0
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +3 -2
- package/dist/types/components/ezp-dialog/ezp-dialog.d.ts +42 -0
- package/dist/types/components/ezp-icon/ezp-icon.d.ts +2 -0
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +22 -2
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +11 -3
- package/dist/types/components/ezp-select/ezp-select.d.ts +4 -0
- package/dist/types/components/ezp-status/ezp-status.d.ts +44 -0
- package/dist/types/components/ezp-text-button/ezp-text-button.d.ts +2 -0
- package/dist/types/components/ezp-upload/ezp-upload.d.ts +43 -0
- package/dist/types/components.d.ts +130 -21
- package/dist/types/services/print.d.ts +14 -2
- package/dist/types/shared/types.d.ts +15 -3
- package/package.json +12 -2
- package/readme.md +54 -18
- package/www/build/assets/glyph-account.svg +2 -2
- package/www/build/assets/glyph-checkmark-alt.svg +3 -0
- package/www/build/assets/glyph-checkmark.svg +2 -2
- package/www/build/assets/glyph-close.svg +2 -2
- package/www/build/assets/glyph-color.svg +2 -2
- package/www/build/assets/glyph-copies.svg +2 -2
- package/www/build/assets/glyph-dark.svg +2 -2
- package/www/build/assets/glyph-drag-drop.svg +3 -0
- package/www/build/assets/glyph-duplex.svg +2 -2
- package/www/build/assets/glyph-exclamation-mark.svg +3 -0
- package/www/build/assets/glyph-expand.svg +2 -2
- package/www/build/assets/glyph-help.svg +2 -2
- package/www/build/assets/glyph-light.svg +2 -2
- package/www/build/assets/glyph-logo.svg +3 -0
- package/www/build/assets/glyph-logout.svg +2 -2
- package/www/build/assets/glyph-menu.svg +2 -2
- package/www/build/assets/glyph-minus.svg +2 -2
- package/www/build/assets/glyph-orientation.svg +2 -2
- package/www/build/assets/glyph-plus.svg +2 -2
- package/www/build/assets/glyph-printer.svg +2 -2
- package/www/build/assets/glyph-quality.svg +2 -2
- package/www/build/assets/glyph-question-mark.svg +3 -0
- package/www/build/assets/glyph-size.svg +2 -2
- package/www/build/assets/glyph-system.svg +2 -2
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/ezeep.js +1 -1
- package/www/build/p-6d99f6f4.system.entry.js +21 -0
- package/www/build/p-972c2256.entry.js +15 -0
- package/www/build/p-98ec6965.system.js +1 -0
- package/www/build/p-f3065800.js +1 -0
- package/www/build/p-f89804ee.system.js +1 -0
- package/www/data/file-types.json +68 -0
- package/www/data/locales/de.json +61 -30
- package/www/data/locales/en.json +61 -30
- package/www/index.html +27 -7
- package/dist/cjs/ezp-auth_12.cjs.entry.js +0 -5010
- package/dist/collection/components/ezp-progress/ezp-progress.css +0 -110
- package/dist/collection/components/ezp-progress/ezp-progress.js +0 -53
- package/dist/esm/ezp-auth_12.entry.js +0 -4995
- package/dist/esm-es5/ezp-auth_12.entry.js +0 -1
- package/dist/ezeep/p-1922e5fe.system.entry.js +0 -1
- package/dist/ezeep/p-649f6d96.entry.js +0 -1
- package/dist/ezeep/p-c488ee3f.system.js +0 -1
- package/dist/ezeep/p-eb3b8dbd.system.js +0 -1
- package/dist/ezeep/p-ff843eb4.js +0 -1
- package/dist/types/components/ezp-progress/ezp-progress.d.ts +0 -15
- package/www/build/p-1922e5fe.system.entry.js +0 -1
- package/www/build/p-649f6d96.entry.js +0 -1
- package/www/build/p-c488ee3f.system.js +0 -1
- package/www/build/p-eb3b8dbd.system.js +0 -1
- package/www/build/p-ff843eb4.js +0 -1
|
@@ -3,6 +3,8 @@ import authStore, { sendCodeToParentWindow } from '../../services/auth';
|
|
|
3
3
|
import printStore, { EzpPrintService } from '../../services/print';
|
|
4
4
|
import userStore from '../../services/user';
|
|
5
5
|
import config from '../../shared/config.json';
|
|
6
|
+
import i18next from 'i18next';
|
|
7
|
+
import { initi18n } from '../../utils/utils';
|
|
6
8
|
export class EzpPrinting {
|
|
7
9
|
constructor() {
|
|
8
10
|
this.theme = 'cyan';
|
|
@@ -15,6 +17,7 @@ export class EzpPrinting {
|
|
|
15
17
|
/** Description... */
|
|
16
18
|
this.printOpen = false;
|
|
17
19
|
this.authOpen = false;
|
|
20
|
+
this.noDocumentOpen = false;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
*
|
|
@@ -33,11 +36,28 @@ export class EzpPrinting {
|
|
|
33
36
|
listenAuthCancel() {
|
|
34
37
|
this.authOpen = false;
|
|
35
38
|
}
|
|
36
|
-
|
|
37
|
-
this.
|
|
39
|
+
listenAuthSuccess() {
|
|
40
|
+
if (this.filename) {
|
|
41
|
+
this.printOpen = true;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.noDocumentOpen = true;
|
|
45
|
+
}
|
|
38
46
|
}
|
|
39
|
-
|
|
40
|
-
this.
|
|
47
|
+
listenUploadFile(event) {
|
|
48
|
+
this.filename = event.detail[0].name;
|
|
49
|
+
this.file = event.detail[0];
|
|
50
|
+
this.open();
|
|
51
|
+
}
|
|
52
|
+
listenDialogClose(event) {
|
|
53
|
+
if (event.detail === 'no-document-selected') {
|
|
54
|
+
this.noDocumentOpen = false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
listenDialogAction(event) {
|
|
58
|
+
if (event.detail === 'no-document-selected') {
|
|
59
|
+
this.noDocumentOpen = false;
|
|
60
|
+
}
|
|
41
61
|
}
|
|
42
62
|
/**
|
|
43
63
|
*
|
|
@@ -46,7 +66,12 @@ export class EzpPrinting {
|
|
|
46
66
|
*/
|
|
47
67
|
async open() {
|
|
48
68
|
if (authStore.state.isAuthorized) {
|
|
49
|
-
this.
|
|
69
|
+
if (this.filename) {
|
|
70
|
+
this.printOpen = true;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.noDocumentOpen = true;
|
|
74
|
+
}
|
|
50
75
|
}
|
|
51
76
|
else {
|
|
52
77
|
this.authOpen = true;
|
|
@@ -63,11 +88,26 @@ export class EzpPrinting {
|
|
|
63
88
|
authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
|
|
64
89
|
this.authOpen = !authStore.state.isAuthorized;
|
|
65
90
|
}
|
|
66
|
-
printService
|
|
91
|
+
printService
|
|
92
|
+
.getConfig(authStore.state.accessToken)
|
|
93
|
+
.then((response) => {
|
|
94
|
+
if (response.ok) {
|
|
95
|
+
authStore.state.isAuthorized = true;
|
|
96
|
+
}
|
|
97
|
+
if (!response.ok) {
|
|
98
|
+
throw new Error('http status ' + response.status);
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
.catch(() => {
|
|
67
102
|
authStore.state.isAuthorized = false;
|
|
68
103
|
});
|
|
69
104
|
}
|
|
70
105
|
componentWillLoad() {
|
|
106
|
+
const systemAppearanceDark = window.matchMedia('(prefers-color-scheme: dark)');
|
|
107
|
+
this.systemAppearance = systemAppearanceDark.matches ? 'dark' : 'light';
|
|
108
|
+
systemAppearanceDark.addEventListener('change', (event) => {
|
|
109
|
+
this.systemAppearance = event.matches ? 'dark' : 'light';
|
|
110
|
+
});
|
|
71
111
|
authStore.state.redirectUri = this.redirecturi;
|
|
72
112
|
userStore.state.theme = this.theme;
|
|
73
113
|
userStore.state.appearance = this.appearance;
|
|
@@ -83,6 +123,7 @@ export class EzpPrinting {
|
|
|
83
123
|
else {
|
|
84
124
|
printStore.state.printApiHostUrl = config.printingApiHostUrl;
|
|
85
125
|
}
|
|
126
|
+
initi18n();
|
|
86
127
|
sendCodeToParentWindow();
|
|
87
128
|
this.checkAuth();
|
|
88
129
|
}
|
|
@@ -92,7 +133,9 @@ export class EzpPrinting {
|
|
|
92
133
|
*
|
|
93
134
|
*/
|
|
94
135
|
render() {
|
|
95
|
-
return (h(Host, { class: `${userStore.state.theme} ${userStore.state.appearance
|
|
136
|
+
return (h(Host, { class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
|
|
137
|
+
? this.systemAppearance
|
|
138
|
+
: userStore.state.appearance}` }, this.authOpen ? (h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin })) : this.printOpen ? (h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, file: this.file, hidemenu: this.hidemenu })) : this.noDocumentOpen ? (h("ezp-dialog", { heading: i18next.t('no_document_dialog.heading'), description: i18next.t('no_document_dialog.description'), action: i18next.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : this.trigger === 'custom' ? (h("slot", null)) : this.trigger === 'file' ? (h("ezp-upload", null)) : (this.trigger === 'button' && (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() })))));
|
|
96
139
|
}
|
|
97
140
|
static get is() { return "ezp-printing"; }
|
|
98
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -139,7 +182,7 @@ export class EzpPrinting {
|
|
|
139
182
|
},
|
|
140
183
|
"filename": {
|
|
141
184
|
"type": "string",
|
|
142
|
-
"mutable":
|
|
185
|
+
"mutable": true,
|
|
143
186
|
"complexType": {
|
|
144
187
|
"original": "string",
|
|
145
188
|
"resolved": "string",
|
|
@@ -222,6 +265,23 @@ export class EzpPrinting {
|
|
|
222
265
|
"attribute": "hidelogin",
|
|
223
266
|
"reflect": false
|
|
224
267
|
},
|
|
268
|
+
"hidemenu": {
|
|
269
|
+
"type": "boolean",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "boolean",
|
|
273
|
+
"resolved": "boolean",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": false,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": ""
|
|
281
|
+
},
|
|
282
|
+
"attribute": "hidemenu",
|
|
283
|
+
"reflect": false
|
|
284
|
+
},
|
|
225
285
|
"authapihosturl": {
|
|
226
286
|
"type": "string",
|
|
227
287
|
"mutable": false,
|
|
@@ -279,6 +339,23 @@ export class EzpPrinting {
|
|
|
279
339
|
"reflect": false,
|
|
280
340
|
"defaultValue": "'cyan'"
|
|
281
341
|
},
|
|
342
|
+
"fileid": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"mutable": false,
|
|
345
|
+
"complexType": {
|
|
346
|
+
"original": "string",
|
|
347
|
+
"resolved": "string",
|
|
348
|
+
"references": {}
|
|
349
|
+
},
|
|
350
|
+
"required": false,
|
|
351
|
+
"optional": false,
|
|
352
|
+
"docs": {
|
|
353
|
+
"tags": [],
|
|
354
|
+
"text": ""
|
|
355
|
+
},
|
|
356
|
+
"attribute": "fileid",
|
|
357
|
+
"reflect": false
|
|
358
|
+
},
|
|
282
359
|
"appearance": {
|
|
283
360
|
"type": "string",
|
|
284
361
|
"mutable": false,
|
|
@@ -301,11 +378,35 @@ export class EzpPrinting {
|
|
|
301
378
|
"attribute": "appearance",
|
|
302
379
|
"reflect": false,
|
|
303
380
|
"defaultValue": "'system'"
|
|
381
|
+
},
|
|
382
|
+
"trigger": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"mutable": false,
|
|
385
|
+
"complexType": {
|
|
386
|
+
"original": "TriggerTypes",
|
|
387
|
+
"resolved": "\"button\" | \"custom\" | \"file\"",
|
|
388
|
+
"references": {
|
|
389
|
+
"TriggerTypes": {
|
|
390
|
+
"location": "import",
|
|
391
|
+
"path": "./../../shared/types"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"required": false,
|
|
396
|
+
"optional": false,
|
|
397
|
+
"docs": {
|
|
398
|
+
"tags": [],
|
|
399
|
+
"text": ""
|
|
400
|
+
},
|
|
401
|
+
"attribute": "trigger",
|
|
402
|
+
"reflect": false
|
|
304
403
|
}
|
|
305
404
|
}; }
|
|
306
405
|
static get states() { return {
|
|
307
406
|
"printOpen": {},
|
|
308
|
-
"authOpen": {}
|
|
407
|
+
"authOpen": {},
|
|
408
|
+
"noDocumentOpen": {},
|
|
409
|
+
"systemAppearance": {}
|
|
309
410
|
}; }
|
|
310
411
|
static get methods() { return {
|
|
311
412
|
"open": {
|
|
@@ -344,14 +445,26 @@ export class EzpPrinting {
|
|
|
344
445
|
"capture": false,
|
|
345
446
|
"passive": false
|
|
346
447
|
}, {
|
|
347
|
-
"name": "
|
|
348
|
-
"method": "
|
|
448
|
+
"name": "authSuccess",
|
|
449
|
+
"method": "listenAuthSuccess",
|
|
450
|
+
"target": undefined,
|
|
451
|
+
"capture": false,
|
|
452
|
+
"passive": false
|
|
453
|
+
}, {
|
|
454
|
+
"name": "uploadFile",
|
|
455
|
+
"method": "listenUploadFile",
|
|
456
|
+
"target": undefined,
|
|
457
|
+
"capture": false,
|
|
458
|
+
"passive": false
|
|
459
|
+
}, {
|
|
460
|
+
"name": "dialogClose",
|
|
461
|
+
"method": "listenDialogClose",
|
|
349
462
|
"target": undefined,
|
|
350
463
|
"capture": false,
|
|
351
464
|
"passive": false
|
|
352
465
|
}, {
|
|
353
|
-
"name": "
|
|
354
|
-
"method": "
|
|
466
|
+
"name": "dialogAction",
|
|
467
|
+
"method": "listenDialogAction",
|
|
355
468
|
"target": undefined,
|
|
356
469
|
"capture": false,
|
|
357
470
|
"passive": false
|
|
@@ -1,256 +1,203 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Modules
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* Variables
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* Functions
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* Mixins
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* Modules
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
1
|
/**
|
|
27
2
|
*
|
|
28
3
|
* Rules
|
|
29
4
|
*
|
|
30
5
|
*/
|
|
31
6
|
:host {
|
|
32
|
-
--
|
|
33
|
-
--details-columns: 1fr;
|
|
34
|
-
--details-rows: auto;
|
|
35
|
-
--host-height: var(--toggle-height);
|
|
36
|
-
--duration: var(--duration-3);
|
|
37
|
-
--host-transition: z-index 0s var(--duration);
|
|
38
|
-
--host-z-index: 3;
|
|
39
|
-
--indicator-opacity: 0;
|
|
40
|
-
--indicator-transform: translateX(var(--spacing-3));
|
|
41
|
-
--indicator-transition: opacity var(--duration) var(--easing-out-quart),
|
|
42
|
-
transform var(--duration) var(--easing-out-quart), visibility 0s var(--duration);
|
|
43
|
-
--indicator-visibility: hidden;
|
|
44
|
-
--label-align: auto;
|
|
45
|
-
--label-color: var(--color-foreground-secondary);
|
|
46
|
-
--list-height: 0;
|
|
47
|
-
--list-separator-position: inset 0 var(--hairline-width-positive);
|
|
48
|
-
--option-height: auto;
|
|
49
|
-
--toggle-areas: none;
|
|
50
|
-
--toggle-columns: none;
|
|
51
|
-
--toggle-height: auto;
|
|
52
|
-
--toggle-rows: auto;
|
|
53
|
-
--value-align: auto;
|
|
54
|
-
--wrap-radius: 0;
|
|
55
|
-
--wrap-separator-color: var(--hairline-color);
|
|
56
|
-
--wrap-separator-position-bottom: 0 var(--hairline-width-positive) 0 0;
|
|
57
|
-
--wrap-separator-position-left: var(--hairline-width-negative) 0 0 0;
|
|
58
|
-
--wrap-separator-position-right: var(--hairline-width-positive) 0 0 0;
|
|
59
|
-
--wrap-separator-position-top: 0 var(--hairline-width-negative) 0 0;
|
|
60
|
-
--wrap-translate-y: 0;
|
|
7
|
+
--ezp-select-duration: var(--ezp-duration-3);
|
|
61
8
|
display: block;
|
|
62
|
-
height: var(--
|
|
9
|
+
height: var(--ezp-select-toggle-height);
|
|
63
10
|
position: relative;
|
|
64
|
-
transition: var(--
|
|
65
|
-
z-index: var(--
|
|
11
|
+
transition: var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));
|
|
12
|
+
z-index: var(--ezp-select-zIndex, 3);
|
|
66
13
|
}
|
|
67
14
|
:host(:first-child) {
|
|
68
|
-
--wrap-
|
|
15
|
+
--ezp-select-wrap-borderRadius: 3px 3px 0 0;
|
|
69
16
|
}
|
|
70
17
|
|
|
71
18
|
:host(:last-child) {
|
|
72
|
-
--wrap-
|
|
19
|
+
--ezp-select-wrap-borderRadius: 0 0 3px 3px;
|
|
73
20
|
}
|
|
74
21
|
|
|
75
22
|
:host(:first-child:last-child) {
|
|
76
|
-
--wrap-
|
|
23
|
+
--ezp-select-wrap-borderRadius: 3px;
|
|
77
24
|
}
|
|
78
25
|
|
|
79
26
|
:host(:not(:last-child):not(.is-expanded)) {
|
|
80
|
-
--
|
|
27
|
+
--ezp-select-wrap-boxShadowPositionBottom: 0 0 0 0;
|
|
81
28
|
}
|
|
82
29
|
|
|
83
30
|
:host(.toggle-horizontal) {
|
|
84
|
-
--label-
|
|
85
|
-
--toggle-
|
|
86
|
-
--toggle-
|
|
87
|
-
--toggle-height: 30px;
|
|
88
|
-
--toggle-
|
|
89
|
-
--value-
|
|
31
|
+
--ezp-select-label-alignSelf: start;
|
|
32
|
+
--ezp-select-toggle-gridTemplateAreas: "label value accessory";
|
|
33
|
+
--ezp-select-toggle-gridTemplateColumns: 1fr repeat(2, auto);
|
|
34
|
+
--ezp-select-toggle-height: 30px;
|
|
35
|
+
--ezp-select-toggle-gridTemplateRows: auto;
|
|
36
|
+
--ezp-select-value-alignSelf: end;
|
|
90
37
|
}
|
|
91
38
|
|
|
92
39
|
:host(.toggle-horizontal.has-icon) {
|
|
93
|
-
--toggle-
|
|
94
|
-
--toggle-
|
|
40
|
+
--ezp-select-toggle-gridTemplateAreas: "icon label value accessory";
|
|
41
|
+
--ezp-select-toggle-gridTemplateColumns: auto 1fr repeat(2, auto);
|
|
95
42
|
}
|
|
96
43
|
|
|
97
44
|
:host(.toggle-vertical) {
|
|
98
|
-
--label-
|
|
99
|
-
--toggle-
|
|
100
|
-
--toggle-
|
|
101
|
-
--toggle-height: 48px;
|
|
102
|
-
--toggle-
|
|
103
|
-
--value-
|
|
45
|
+
--ezp-select-label-alignSelf: center;
|
|
46
|
+
--ezp-select-toggle-gridTemplateAreas: "label accessory" "value accessory";
|
|
47
|
+
--ezp-select-toggle-gridTemplateColumns: 1fr auto;
|
|
48
|
+
--ezp-select-toggle-height: 48px;
|
|
49
|
+
--ezp-select-toggle-gridTemplateRows: repeat(2, auto);
|
|
50
|
+
--ezp-select-value-alignSelf: center;
|
|
104
51
|
}
|
|
105
52
|
|
|
106
53
|
:host(.toggle-vertical.has-icon) {
|
|
107
|
-
--toggle-
|
|
108
|
-
--toggle-
|
|
54
|
+
--ezp-select-toggle-gridTemplateAreas: "icon label accessory" "icon value accessory";
|
|
55
|
+
--ezp-select-toggle-gridTemplateColumns: auto 1fr auto;
|
|
109
56
|
}
|
|
110
57
|
|
|
111
58
|
:host(.option-horizontal) {
|
|
112
|
-
--details-
|
|
113
|
-
--details-
|
|
114
|
-
--option-height: 30px;
|
|
59
|
+
--ezp-select-details-gridTemplateColumns: repeat(2, 1fr);
|
|
60
|
+
--ezp-select-details-gridTemplateRows: auto;
|
|
61
|
+
--ezp-select-option-height: 30px;
|
|
115
62
|
}
|
|
116
63
|
|
|
117
64
|
:host(.option-vertical) {
|
|
118
|
-
--details-
|
|
119
|
-
--details-
|
|
120
|
-
--option-height: 48px;
|
|
65
|
+
--ezp-select-details-gridTemplateColumns: 1fr;
|
|
66
|
+
--ezp-select-details-gridTemplateRows: repeat(2, auto);
|
|
67
|
+
--ezp-select-option-height: 48px;
|
|
121
68
|
}
|
|
122
69
|
|
|
123
70
|
:host(.is-expanded) {
|
|
124
|
-
--accessory-color: var(--color-theme-solid);
|
|
125
|
-
--
|
|
126
|
-
--
|
|
127
|
-
--icon-color: var(--color-theme-solid);
|
|
128
|
-
--label-color: var(--color-theme-solid);
|
|
129
|
-
--wrap-
|
|
71
|
+
--ezp-select-accessory-color: var(--ezp-color-theme-solid);
|
|
72
|
+
--ezp-select-transition: z-index 0s 0s;
|
|
73
|
+
--ezp-select-zIndex: 9999;
|
|
74
|
+
--ezp-select-icon-color: var(--ezp-color-theme-solid);
|
|
75
|
+
--ezp-select-label-color: var(--ezp-color-theme-solid);
|
|
76
|
+
--ezp-select-wrap-borderRadius: 3px;
|
|
130
77
|
}
|
|
131
78
|
|
|
132
|
-
|
|
133
|
-
:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
79
|
+
:host(.disabled) {
|
|
80
|
+
--ezp-select-accessory-color: var(--ezp-color-foreground-tertiary);
|
|
81
|
+
--ezp-select-icon-color: var(--ezp-color-foreground-tertiary);
|
|
82
|
+
--ezp-select-label-color: var(--ezp-color-foreground-tertiary);
|
|
83
|
+
--ezp-select-toggle-background-hover: transparent;
|
|
84
|
+
--ezp-select-toggle-cursor: default;
|
|
85
|
+
--value-color: var(--ezp-color-foreground-tertiary);
|
|
140
86
|
}
|
|
141
87
|
|
|
142
88
|
#wrap {
|
|
143
|
-
background: var(--color-surface-tertiary);
|
|
144
|
-
border-radius: var(--wrap-
|
|
145
|
-
box-shadow: var(--wrap-
|
|
146
|
-
transform: translateY(var(--wrap-
|
|
147
|
-
transition: transform var(--duration) var(--easing-out-quart), border-radius var(--duration) var(--easing-out-quart), box-shadow var(--duration) var(--easing-out-quart);
|
|
89
|
+
background: var(--ezp-color-surface-tertiary);
|
|
90
|
+
border-radius: var(--ezp-select-wrap-borderRadius, 0);
|
|
91
|
+
box-shadow: var(--ezp-select-wrap-boxShadowPositionTop, 0 -1px 0 0) var(--ezp-color-outline), var(--ezp-select-wrap-boxShadowPositionRight, 1px 0 0 0) var(--ezp-color-outline), var(--ezp-select-wrap-boxShadowPositionBottom, 0 1px 0 0) var(--ezp-color-outline), var(--ezp-select-wrap-boxShadowPositionLeft, -1px 0 0 0) var(--ezp-color-outline);
|
|
92
|
+
transform: translateY(var(--ezp-select-wrap-translateY, 0));
|
|
93
|
+
transition: transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);
|
|
148
94
|
}
|
|
149
95
|
|
|
150
96
|
#toggle {
|
|
97
|
+
background: var(--ezp-select-toggle-background, transparent);
|
|
151
98
|
box-sizing: border-box;
|
|
152
|
-
cursor: pointer;
|
|
99
|
+
cursor: var(--ezp-select-toggle-cursor, pointer);
|
|
153
100
|
display: grid;
|
|
154
|
-
gap: var(--spacing-2) var(--spacing-3);
|
|
155
|
-
grid-template-areas: var(--toggle-
|
|
156
|
-
grid-template-columns: var(--toggle-
|
|
157
|
-
grid-template-rows: var(--toggle-
|
|
158
|
-
height: var(--toggle-height);
|
|
159
|
-
padding: var(--spacing-3);
|
|
101
|
+
gap: var(--ezp-spacing-2) var(--ezp-spacing-3);
|
|
102
|
+
grid-template-areas: var(--ezp-select-toggle-gridTemplateAreas, none);
|
|
103
|
+
grid-template-columns: var(--ezp-select-toggle-gridTemplateColumns, none);
|
|
104
|
+
grid-template-rows: var(--ezp-select-toggle-gridTemplateRows, auto);
|
|
105
|
+
height: var(--ezp-select-toggle-height, auto);
|
|
106
|
+
padding: var(--ezp-spacing-3);
|
|
160
107
|
}
|
|
161
108
|
#toggle:hover {
|
|
162
|
-
background: var(
|
|
109
|
+
--ezp-select-toggle-background: var(
|
|
110
|
+
--ezp-select-toggle-background-hover,
|
|
111
|
+
var(--ezp-color-shade-primary)
|
|
112
|
+
);
|
|
163
113
|
}
|
|
164
114
|
|
|
165
115
|
#icon {
|
|
166
116
|
align-self: center;
|
|
167
|
-
color: var(--icon-color, var(--color-foreground-secondary));
|
|
117
|
+
color: var(--ezp-select-icon-color, var(--ezp-color-foreground-secondary));
|
|
168
118
|
grid-area: icon;
|
|
169
|
-
margin: calc(var(--spacing-2) * -1) 0;
|
|
119
|
+
margin: calc(var(--ezp-spacing-2) * -1) 0;
|
|
170
120
|
}
|
|
171
121
|
|
|
172
122
|
#label {
|
|
173
|
-
align-self: var(--label-
|
|
174
|
-
color: var(--label-color);
|
|
123
|
+
align-self: var(--ezp-select-label-alignSelf, auto);
|
|
124
|
+
color: var(--ezp-select-label-color, var(--ezp-color-foreground-secondary));
|
|
175
125
|
grid-area: label;
|
|
176
126
|
}
|
|
177
127
|
|
|
178
128
|
#value {
|
|
179
|
-
align-self: var(--value-
|
|
180
|
-
color: var(--color-foreground-primary);
|
|
129
|
+
align-self: var(--ezp-select-value-alignSelf, auto);
|
|
130
|
+
color: var(--value-color, var(--ezp-color-foreground-primary));
|
|
181
131
|
grid-area: value;
|
|
182
132
|
}
|
|
183
133
|
|
|
184
134
|
#accessory {
|
|
185
135
|
align-self: center;
|
|
186
|
-
color: var(--accessory-color);
|
|
136
|
+
color: var(--ezp-select-accessory-color, var(--ezp-color-foreground-secondary));
|
|
187
137
|
grid-area: accessory;
|
|
188
|
-
margin: calc(var(--spacing-2) * -1) 0;
|
|
138
|
+
margin: calc(var(--ezp-spacing-2) * -1) 0;
|
|
189
139
|
}
|
|
190
140
|
|
|
191
141
|
#list {
|
|
192
|
-
box-shadow:
|
|
193
|
-
height: var(--list-height);
|
|
142
|
+
box-shadow: inset 0 1px 0 0 var(--ezp-color-outline);
|
|
143
|
+
height: var(--ezp-select-list-height, 0);
|
|
194
144
|
overflow: auto;
|
|
195
|
-
transition: height var(--duration) var(--easing-out-quart);
|
|
145
|
+
transition: height var(--ezp-select-duration) var(--ezp-easing-out-quart);
|
|
196
146
|
}
|
|
197
147
|
|
|
198
148
|
.option {
|
|
199
|
-
background: var(--option-background);
|
|
149
|
+
background: var(--ezp-select-option-background);
|
|
200
150
|
box-sizing: border-box;
|
|
201
151
|
cursor: pointer;
|
|
202
152
|
display: grid;
|
|
203
|
-
gap: var(--spacing-3);
|
|
153
|
+
gap: var(--ezp-spacing-3);
|
|
204
154
|
grid-template: auto/auto 1fr;
|
|
205
|
-
height: var(--option-height);
|
|
206
|
-
padding: 0 0 0 var(--spacing-3);
|
|
155
|
+
height: var(--ezp-select-option-height, auto);
|
|
156
|
+
padding: 0 0 0 var(--ezp-spacing-3);
|
|
207
157
|
}
|
|
208
|
-
.option:not(:
|
|
209
|
-
--details-
|
|
158
|
+
.option:not(:last-child) {
|
|
159
|
+
--ezp-select-details-boxShadow: inset 0 -1px 0 0 var(--ezp-color-outline);
|
|
210
160
|
}
|
|
211
161
|
.option:hover {
|
|
212
|
-
--option-background: var(--color-shade-primary);
|
|
213
|
-
}
|
|
214
|
-
.option:hover,
|
|
215
|
-
.option:hover + .option {
|
|
216
|
-
--details-separator: none;
|
|
162
|
+
--ezp-select-option-background: var(--ezp-color-shade-primary);
|
|
217
163
|
}
|
|
218
164
|
.option:active {
|
|
219
|
-
--option-background: var(--color-shade-secondary);
|
|
165
|
+
--ezp-select-option-background: var(--ezp-color-shade-secondary);
|
|
220
166
|
}
|
|
221
167
|
.option.is-selected {
|
|
222
|
-
--indicator-opacity: 1;
|
|
223
|
-
--indicator-transform: translateX(0);
|
|
224
|
-
--indicator-transition: opacity var(--
|
|
225
|
-
|
|
226
|
-
|
|
168
|
+
--ezp-select-indicator-opacity: 1;
|
|
169
|
+
--ezp-select-indicator-transform: translateX(0);
|
|
170
|
+
--ezp-select-indicator-transition: opacity var(--ezp-select-duration)
|
|
171
|
+
var(--ezp-easing-out-quart),
|
|
172
|
+
transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;
|
|
173
|
+
--ezp-select-indicator-visibility: visible;
|
|
227
174
|
}
|
|
228
175
|
|
|
229
176
|
.indicator {
|
|
230
177
|
align-self: center;
|
|
231
|
-
color: var(--color-theme-solid);
|
|
232
|
-
margin: calc(var(--spacing-2) * -1) 0;
|
|
233
|
-
opacity: var(--indicator-opacity);
|
|
234
|
-
transform: var(--indicator-transform);
|
|
235
|
-
transition: var(--indicator-transition);
|
|
236
|
-
visibility: var(--indicator-visibility);
|
|
178
|
+
color: var(--ezp-color-theme-solid);
|
|
179
|
+
margin: calc(var(--ezp-spacing-2) * -1) 0;
|
|
180
|
+
opacity: var(--ezp-select-indicator-opacity, 0);
|
|
181
|
+
transform: var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));
|
|
182
|
+
transition: var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));
|
|
183
|
+
visibility: var(--ezp-select-indicator-visibility, hidden);
|
|
237
184
|
}
|
|
238
185
|
|
|
239
186
|
.details {
|
|
240
|
-
box-shadow: var(--details-
|
|
187
|
+
box-shadow: var(--ezp-select-details-boxShadow);
|
|
241
188
|
display: grid;
|
|
242
|
-
gap: var(--spacing-2);
|
|
243
|
-
grid-template-columns: var(--details-
|
|
244
|
-
grid-template-rows: var(--details-
|
|
245
|
-
padding: var(--spacing-3) var(--spacing-3) var(--spacing-3) 0;
|
|
189
|
+
gap: var(--ezp-spacing-2);
|
|
190
|
+
grid-template-columns: var(--ezp-select-details-gridTemplateColumns, 1fr);
|
|
191
|
+
grid-template-rows: var(--ezp-select-details-gridTemplateRows, auto);
|
|
192
|
+
padding: var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0;
|
|
246
193
|
}
|
|
247
194
|
|
|
248
195
|
.title {
|
|
249
196
|
align-self: start;
|
|
250
|
-
color: var(--color-foreground-primary);
|
|
197
|
+
color: var(--ezp-color-foreground-primary);
|
|
251
198
|
}
|
|
252
199
|
|
|
253
200
|
.meta {
|
|
254
201
|
align-self: end;
|
|
255
|
-
color: var(--color-foreground-secondary);
|
|
202
|
+
color: var(--ezp-color-foreground-secondary);
|
|
256
203
|
}
|