@ezeep/ezeep-js 1.0.140 → 1.0.144

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 (163) hide show
  1. package/dist/cjs/ezeep.cjs.js +2 -2
  2. package/dist/cjs/ezp-auth_14.cjs.entry.js +33754 -0
  3. package/dist/cjs/{index-a93095ed.js → index-62fc857c.js} +7 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +3 -1
  6. package/dist/collection/components/ezp-auth/ezp-auth.css +3 -77
  7. package/dist/collection/components/ezp-auth/ezp-auth.js +26 -20
  8. package/dist/collection/components/ezp-backdrop/ezp-backdrop.css +3 -3
  9. package/dist/collection/components/ezp-dialog/ezp-dialog.css +48 -0
  10. package/dist/collection/components/ezp-dialog/ezp-dialog.js +220 -0
  11. package/dist/collection/components/ezp-icon/assets/glyph-account.svg +2 -2
  12. package/dist/collection/components/ezp-icon/assets/glyph-checkmark-alt.svg +3 -0
  13. package/dist/collection/components/ezp-icon/assets/glyph-checkmark.svg +2 -2
  14. package/dist/collection/components/ezp-icon/assets/glyph-close.svg +2 -2
  15. package/dist/collection/components/ezp-icon/assets/glyph-color.svg +2 -2
  16. package/dist/collection/components/ezp-icon/assets/glyph-copies.svg +2 -2
  17. package/dist/collection/components/ezp-icon/assets/glyph-dark.svg +2 -2
  18. package/dist/collection/components/ezp-icon/assets/glyph-drag-drop.svg +3 -0
  19. package/dist/collection/components/ezp-icon/assets/glyph-duplex.svg +2 -2
  20. package/dist/collection/components/ezp-icon/assets/glyph-exclamation-mark.svg +3 -0
  21. package/dist/collection/components/ezp-icon/assets/glyph-expand.svg +2 -2
  22. package/dist/collection/components/ezp-icon/assets/glyph-help.svg +2 -2
  23. package/dist/collection/components/ezp-icon/assets/glyph-light.svg +2 -2
  24. package/dist/collection/components/ezp-icon/assets/glyph-logo.svg +3 -0
  25. package/dist/collection/components/ezp-icon/assets/glyph-logout.svg +2 -2
  26. package/dist/collection/components/ezp-icon/assets/glyph-menu.svg +2 -2
  27. package/dist/collection/components/ezp-icon/assets/glyph-minus.svg +2 -2
  28. package/dist/collection/components/ezp-icon/assets/glyph-orientation.svg +2 -2
  29. package/dist/collection/components/ezp-icon/assets/glyph-plus.svg +2 -2
  30. package/dist/collection/components/ezp-icon/assets/glyph-printer.svg +2 -2
  31. package/dist/collection/components/ezp-icon/assets/glyph-quality.svg +2 -2
  32. package/dist/collection/components/ezp-icon/assets/glyph-question-mark.svg +3 -0
  33. package/dist/collection/components/ezp-icon/assets/glyph-size.svg +2 -2
  34. package/dist/collection/components/ezp-icon/assets/glyph-system.svg +2 -2
  35. package/dist/collection/components/ezp-icon/ezp-icon.css +25 -9
  36. package/dist/collection/components/ezp-icon/ezp-icon.js +23 -3
  37. package/dist/collection/components/ezp-icon-button/ezp-icon-button.css +43 -34
  38. package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
  39. package/dist/collection/components/ezp-label/ezp-label.css +32 -32
  40. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +21 -27
  41. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +284 -90
  42. package/dist/collection/components/ezp-printing/ezp-printing.css +175 -273
  43. package/dist/collection/components/ezp-printing/ezp-printing.js +111 -13
  44. package/dist/collection/components/ezp-select/ezp-select.css +98 -151
  45. package/dist/collection/components/ezp-select/ezp-select.js +51 -20
  46. package/dist/collection/components/ezp-status/ezp-status.css +111 -0
  47. package/dist/collection/components/ezp-status/ezp-status.js +236 -0
  48. package/dist/collection/components/ezp-stepper/ezp-stepper.css +21 -21
  49. package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
  50. package/dist/collection/components/ezp-text-button/ezp-text-button.css +44 -34
  51. package/dist/collection/components/ezp-text-button/ezp-text-button.js +22 -2
  52. package/dist/collection/components/ezp-upload/ezp-upload.css +67 -0
  53. package/dist/collection/components/ezp-upload/ezp-upload.js +121 -0
  54. package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +75 -71
  55. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +12 -9
  56. package/dist/collection/services/print.js +50 -10
  57. package/dist/custom-elements/index.d.ts +18 -6
  58. package/dist/custom-elements/index.js +29059 -378
  59. package/dist/directives/proxies.ts +81 -25
  60. package/dist/esm/ezeep.js +2 -2
  61. package/dist/esm/ezp-auth_14.entry.js +33737 -0
  62. package/dist/esm/{index-9ecf6ae0.js → index-265d8cca.js} +7 -1
  63. package/dist/esm/loader.js +2 -2
  64. package/dist/esm-es5/ezeep.js +1 -1
  65. package/dist/esm-es5/ezp-auth_14.entry.js +21 -0
  66. package/dist/esm-es5/{index-9ecf6ae0.js → index-265d8cca.js} +1 -1
  67. package/dist/esm-es5/loader.js +1 -1
  68. package/dist/ezeep/assets/glyph-account.svg +2 -2
  69. package/dist/ezeep/assets/glyph-checkmark-alt.svg +3 -0
  70. package/dist/ezeep/assets/glyph-checkmark.svg +2 -2
  71. package/dist/ezeep/assets/glyph-close.svg +2 -2
  72. package/dist/ezeep/assets/glyph-color.svg +2 -2
  73. package/dist/ezeep/assets/glyph-copies.svg +2 -2
  74. package/dist/ezeep/assets/glyph-dark.svg +2 -2
  75. package/dist/ezeep/assets/glyph-drag-drop.svg +3 -0
  76. package/dist/ezeep/assets/glyph-duplex.svg +2 -2
  77. package/dist/ezeep/assets/glyph-exclamation-mark.svg +3 -0
  78. package/dist/ezeep/assets/glyph-expand.svg +2 -2
  79. package/dist/ezeep/assets/glyph-help.svg +2 -2
  80. package/dist/ezeep/assets/glyph-light.svg +2 -2
  81. package/dist/ezeep/assets/glyph-logo.svg +3 -0
  82. package/dist/ezeep/assets/glyph-logout.svg +2 -2
  83. package/dist/ezeep/assets/glyph-menu.svg +2 -2
  84. package/dist/ezeep/assets/glyph-minus.svg +2 -2
  85. package/dist/ezeep/assets/glyph-orientation.svg +2 -2
  86. package/dist/ezeep/assets/glyph-plus.svg +2 -2
  87. package/dist/ezeep/assets/glyph-printer.svg +2 -2
  88. package/dist/ezeep/assets/glyph-quality.svg +2 -2
  89. package/dist/ezeep/assets/glyph-question-mark.svg +3 -0
  90. package/dist/ezeep/assets/glyph-size.svg +2 -2
  91. package/dist/ezeep/assets/glyph-system.svg +2 -2
  92. package/dist/ezeep/ezeep.esm.js +1 -1
  93. package/dist/ezeep/ezeep.js +1 -1
  94. package/dist/ezeep/p-740e246f.entry.js +15 -0
  95. package/dist/ezeep/p-98ec6965.system.js +1 -0
  96. package/dist/ezeep/p-b481a50b.system.entry.js +21 -0
  97. package/dist/ezeep/p-f3065800.js +1 -0
  98. package/dist/ezeep/p-f89804ee.system.js +1 -0
  99. package/dist/types/components/ezp-auth/ezp-auth.d.ts +3 -2
  100. package/dist/types/components/ezp-dialog/ezp-dialog.d.ts +42 -0
  101. package/dist/types/components/ezp-icon/ezp-icon.d.ts +2 -0
  102. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +19 -1
  103. package/dist/types/components/ezp-printing/ezp-printing.d.ts +10 -3
  104. package/dist/types/components/ezp-select/ezp-select.d.ts +4 -0
  105. package/dist/types/components/ezp-status/ezp-status.d.ts +44 -0
  106. package/dist/types/components/ezp-text-button/ezp-text-button.d.ts +2 -0
  107. package/dist/types/components/ezp-upload/ezp-upload.d.ts +43 -0
  108. package/dist/types/components.d.ts +126 -21
  109. package/dist/types/services/print.d.ts +7 -2
  110. package/dist/types/shared/types.d.ts +15 -3
  111. package/package.json +12 -2
  112. package/readme.md +54 -18
  113. package/www/build/assets/glyph-account.svg +2 -2
  114. package/www/build/assets/glyph-checkmark-alt.svg +3 -0
  115. package/www/build/assets/glyph-checkmark.svg +2 -2
  116. package/www/build/assets/glyph-close.svg +2 -2
  117. package/www/build/assets/glyph-color.svg +2 -2
  118. package/www/build/assets/glyph-copies.svg +2 -2
  119. package/www/build/assets/glyph-dark.svg +2 -2
  120. package/www/build/assets/glyph-drag-drop.svg +3 -0
  121. package/www/build/assets/glyph-duplex.svg +2 -2
  122. package/www/build/assets/glyph-exclamation-mark.svg +3 -0
  123. package/www/build/assets/glyph-expand.svg +2 -2
  124. package/www/build/assets/glyph-help.svg +2 -2
  125. package/www/build/assets/glyph-light.svg +2 -2
  126. package/www/build/assets/glyph-logo.svg +3 -0
  127. package/www/build/assets/glyph-logout.svg +2 -2
  128. package/www/build/assets/glyph-menu.svg +2 -2
  129. package/www/build/assets/glyph-minus.svg +2 -2
  130. package/www/build/assets/glyph-orientation.svg +2 -2
  131. package/www/build/assets/glyph-plus.svg +2 -2
  132. package/www/build/assets/glyph-printer.svg +2 -2
  133. package/www/build/assets/glyph-quality.svg +2 -2
  134. package/www/build/assets/glyph-question-mark.svg +3 -0
  135. package/www/build/assets/glyph-size.svg +2 -2
  136. package/www/build/assets/glyph-system.svg +2 -2
  137. package/www/build/ezeep.esm.js +1 -1
  138. package/www/build/ezeep.js +1 -1
  139. package/www/build/p-740e246f.entry.js +15 -0
  140. package/www/build/p-98ec6965.system.js +1 -0
  141. package/www/build/p-b481a50b.system.entry.js +21 -0
  142. package/www/build/p-f3065800.js +1 -0
  143. package/www/build/p-f89804ee.system.js +1 -0
  144. package/www/data/file-types.json +68 -0
  145. package/www/data/locales/de.json +61 -30
  146. package/www/data/locales/en.json +61 -30
  147. package/www/index.html +27 -7
  148. package/dist/cjs/ezp-auth_12.cjs.entry.js +0 -5079
  149. package/dist/collection/components/ezp-progress/ezp-progress.css +0 -110
  150. package/dist/collection/components/ezp-progress/ezp-progress.js +0 -53
  151. package/dist/esm/ezp-auth_12.entry.js +0 -5064
  152. package/dist/esm-es5/ezp-auth_12.entry.js +0 -1
  153. package/dist/ezeep/p-0711b970.entry.js +0 -1
  154. package/dist/ezeep/p-c488ee3f.system.js +0 -1
  155. package/dist/ezeep/p-e8c8adc1.system.entry.js +0 -1
  156. package/dist/ezeep/p-eb3b8dbd.system.js +0 -1
  157. package/dist/ezeep/p-ff843eb4.js +0 -1
  158. package/dist/types/components/ezp-progress/ezp-progress.d.ts +0 -15
  159. package/www/build/p-0711b970.entry.js +0 -1
  160. package/www/build/p-c488ee3f.system.js +0 -1
  161. package/www/build/p-e8c8adc1.system.entry.js +0 -1
  162. package/www/build/p-eb3b8dbd.system.js +0 -1
  163. package/www/build/p-ff843eb4.js +0 -1
@@ -3,8 +3,11 @@ 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() {
10
+ this.hidemenu = false;
8
11
  this.theme = 'cyan';
9
12
  this.appearance = 'system';
10
13
  /**
@@ -15,6 +18,7 @@ export class EzpPrinting {
15
18
  /** Description... */
16
19
  this.printOpen = false;
17
20
  this.authOpen = false;
21
+ this.noDocumentOpen = false;
18
22
  }
19
23
  /**
20
24
  *
@@ -33,11 +37,28 @@ export class EzpPrinting {
33
37
  listenAuthCancel() {
34
38
  this.authOpen = false;
35
39
  }
36
- listenAuthShow() {
37
- this.authOpen = true;
40
+ listenAuthSuccess() {
41
+ if (this.filename) {
42
+ this.printOpen = true;
43
+ }
44
+ else {
45
+ this.noDocumentOpen = true;
46
+ }
47
+ }
48
+ listenUploadFile(event) {
49
+ this.filename = event.detail[0].name;
50
+ this.file = event.detail[0];
51
+ this.open();
52
+ }
53
+ listenDialogClose(event) {
54
+ if (event.detail === 'no-document-selected') {
55
+ this.noDocumentOpen = false;
56
+ }
38
57
  }
39
- listenPrintShow() {
40
- this.printOpen = true;
58
+ listenDialogAction(event) {
59
+ if (event.detail === 'no-document-selected') {
60
+ this.noDocumentOpen = false;
61
+ }
41
62
  }
42
63
  /**
43
64
  *
@@ -46,7 +67,12 @@ export class EzpPrinting {
46
67
  */
47
68
  async open() {
48
69
  if (authStore.state.isAuthorized) {
49
- this.printOpen = true;
70
+ if (this.filename) {
71
+ this.printOpen = true;
72
+ }
73
+ else {
74
+ this.noDocumentOpen = true;
75
+ }
50
76
  }
51
77
  else {
52
78
  this.authOpen = true;
@@ -63,11 +89,26 @@ export class EzpPrinting {
63
89
  authStore.state.isAuthorized = !!localStorage.getItem('isAuthorized');
64
90
  this.authOpen = !authStore.state.isAuthorized;
65
91
  }
66
- printService.getConfig(authStore.state.accessToken).catch(() => {
92
+ printService
93
+ .getConfig(authStore.state.accessToken)
94
+ .then((response) => {
95
+ if (response.ok) {
96
+ authStore.state.isAuthorized = true;
97
+ }
98
+ if (!response.ok) {
99
+ throw new Error('http status ' + response.status);
100
+ }
101
+ })
102
+ .catch(() => {
67
103
  authStore.state.isAuthorized = false;
68
104
  });
69
105
  }
70
106
  componentWillLoad() {
107
+ const systemAppearanceDark = window.matchMedia('(prefers-color-scheme: dark)');
108
+ this.systemAppearance = systemAppearanceDark.matches ? 'dark' : 'light';
109
+ systemAppearanceDark.addEventListener('change', (event) => {
110
+ this.systemAppearance = event.matches ? 'dark' : 'light';
111
+ });
71
112
  authStore.state.redirectUri = this.redirecturi;
72
113
  userStore.state.theme = this.theme;
73
114
  userStore.state.appearance = this.appearance;
@@ -83,6 +124,7 @@ export class EzpPrinting {
83
124
  else {
84
125
  printStore.state.printApiHostUrl = config.printingApiHostUrl;
85
126
  }
127
+ initi18n();
86
128
  sendCodeToParentWindow();
87
129
  this.checkAuth();
88
130
  }
@@ -92,7 +134,9 @@ export class EzpPrinting {
92
134
  *
93
135
  */
94
136
  render() {
95
- return (h(Host, { class: `${userStore.state.theme} ${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 })) : this.custom ? (h("slot", null)) : (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))));
137
+ return (h(Host, { class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
138
+ ? this.systemAppearance
139
+ : 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
140
  }
97
141
  static get is() { return "ezp-printing"; }
98
142
  static get encapsulation() { return "shadow"; }
@@ -139,7 +183,7 @@ export class EzpPrinting {
139
183
  },
140
184
  "filename": {
141
185
  "type": "string",
142
- "mutable": false,
186
+ "mutable": true,
143
187
  "complexType": {
144
188
  "original": "string",
145
189
  "resolved": "string",
@@ -222,6 +266,24 @@ export class EzpPrinting {
222
266
  "attribute": "hidelogin",
223
267
  "reflect": false
224
268
  },
269
+ "hidemenu": {
270
+ "type": "boolean",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "boolean",
274
+ "resolved": "boolean",
275
+ "references": {}
276
+ },
277
+ "required": false,
278
+ "optional": false,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": ""
282
+ },
283
+ "attribute": "hidemenu",
284
+ "reflect": false,
285
+ "defaultValue": "false"
286
+ },
225
287
  "authapihosturl": {
226
288
  "type": "string",
227
289
  "mutable": false,
@@ -318,11 +380,35 @@ export class EzpPrinting {
318
380
  "attribute": "appearance",
319
381
  "reflect": false,
320
382
  "defaultValue": "'system'"
383
+ },
384
+ "trigger": {
385
+ "type": "string",
386
+ "mutable": false,
387
+ "complexType": {
388
+ "original": "TriggerTypes",
389
+ "resolved": "\"button\" | \"custom\" | \"file\"",
390
+ "references": {
391
+ "TriggerTypes": {
392
+ "location": "import",
393
+ "path": "./../../shared/types"
394
+ }
395
+ }
396
+ },
397
+ "required": false,
398
+ "optional": false,
399
+ "docs": {
400
+ "tags": [],
401
+ "text": ""
402
+ },
403
+ "attribute": "trigger",
404
+ "reflect": false
321
405
  }
322
406
  }; }
323
407
  static get states() { return {
324
408
  "printOpen": {},
325
- "authOpen": {}
409
+ "authOpen": {},
410
+ "noDocumentOpen": {},
411
+ "systemAppearance": {}
326
412
  }; }
327
413
  static get methods() { return {
328
414
  "open": {
@@ -361,14 +447,26 @@ export class EzpPrinting {
361
447
  "capture": false,
362
448
  "passive": false
363
449
  }, {
364
- "name": "authShow",
365
- "method": "listenAuthShow",
450
+ "name": "authSuccess",
451
+ "method": "listenAuthSuccess",
452
+ "target": undefined,
453
+ "capture": false,
454
+ "passive": false
455
+ }, {
456
+ "name": "uploadFile",
457
+ "method": "listenUploadFile",
458
+ "target": undefined,
459
+ "capture": false,
460
+ "passive": false
461
+ }, {
462
+ "name": "dialogClose",
463
+ "method": "listenDialogClose",
366
464
  "target": undefined,
367
465
  "capture": false,
368
466
  "passive": false
369
467
  }, {
370
- "name": "printShow",
371
- "method": "listenPrintShow",
468
+ "name": "dialogAction",
469
+ "method": "listenDialogAction",
372
470
  "target": undefined,
373
471
  "capture": false,
374
472
  "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
- --accessory-color: var(--color-foreground-secondary);
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(--host-height);
9
+ height: var(--ezp-select-toggle-height);
63
10
  position: relative;
64
- transition: var(--host-transition);
65
- z-index: var(--host-z-index);
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-radius: 3px 3px 0 0;
15
+ --ezp-select-wrap-borderRadius: 3px 3px 0 0;
69
16
  }
70
17
 
71
18
  :host(:last-child) {
72
- --wrap-radius: 0 0 3px 3px;
19
+ --ezp-select-wrap-borderRadius: 0 0 3px 3px;
73
20
  }
74
21
 
75
22
  :host(:first-child:last-child) {
76
- --wrap-radius: 3px;
23
+ --ezp-select-wrap-borderRadius: 3px;
77
24
  }
78
25
 
79
26
  :host(:not(:last-child):not(.is-expanded)) {
80
- --wrap-separator-position-bottom: 0 0 0 0;
27
+ --ezp-select-wrap-boxShadowPositionBottom: 0 0 0 0;
81
28
  }
82
29
 
83
30
  :host(.toggle-horizontal) {
84
- --label-align: start;
85
- --toggle-areas: "label value accessory";
86
- --toggle-columns: 1fr repeat(2, auto);
87
- --toggle-height: 30px;
88
- --toggle-rows: auto;
89
- --value-align: end;
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-areas: "icon label value accessory";
94
- --toggle-columns: auto 1fr repeat(2, auto);
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-align: center;
99
- --toggle-areas: "label accessory" "value accessory";
100
- --toggle-columns: 1fr auto;
101
- --toggle-height: 48px;
102
- --toggle-rows: repeat(2, auto);
103
- --value-align: center;
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-areas: "icon label accessory" "icon value accessory";
108
- --toggle-columns: auto 1fr auto;
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-columns: repeat(2, 1fr);
113
- --details-rows: auto;
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-columns: 1fr;
119
- --details-rows: repeat(2, auto);
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
- --host-transition: z-index 0s 0s;
126
- --host-z-index: 9999;
127
- --icon-color: var(--color-theme-solid);
128
- --label-color: var(--color-theme-solid);
129
- --wrap-radius: 3px;
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
- @media (prefers-color-scheme: dark) {
133
- :host {
134
- --list-separator-position: 0 var(--hairline-width-negative) 0 0;
135
- --wrap-separator-position-bottom: inset 0 var(--hairline-width-negative) 0 0;
136
- --wrap-separator-position-left: inset var(--hairline-width-positive) 0 0 0;
137
- --wrap-separator-position-right: inset var(--hairline-width-negative) 0 0 0;
138
- --wrap-separator-position-top: inset 0 var(--hairline-width-positive) 0 0;
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-radius);
145
- box-shadow: var(--wrap-separator-position-top) var(--wrap-separator-color), var(--wrap-separator-position-right) var(--wrap-separator-color), var(--wrap-separator-position-bottom) var(--wrap-separator-color), var(--wrap-separator-position-left) var(--wrap-separator-color);
146
- transform: translateY(var(--wrap-translate-y));
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-areas);
156
- grid-template-columns: var(--toggle-columns);
157
- grid-template-rows: var(--toggle-rows);
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(--color-shade-primary);
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-align);
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-align);
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: var(--list-separator-position) var(--hairline-color);
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(:first-child) {
209
- --details-separator: 0 var(--hairline-width-negative) 0 0 var(--hairline-color);
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(--duration) var(--easing-out-quart),
225
- transform var(--duration) var(--easing-out-quart), visibility 0s 0s;
226
- --indicator-visibility: visible;
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-separator);
187
+ box-shadow: var(--ezp-select-details-boxShadow);
241
188
  display: grid;
242
- gap: var(--spacing-2);
243
- grid-template-columns: var(--details-columns);
244
- grid-template-rows: var(--details-rows);
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
  }