@ezeep/ezeep-js 1.0.277 → 1.0.284

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 (72) hide show
  1. package/dist/cjs/ezeep.cjs.js +1 -1
  2. package/dist/cjs/ezp-auth_15.cjs.entry.js +114 -38
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/components/ezp-auth/ezp-auth.css +0 -12
  5. package/dist/collection/components/ezp-auth/ezp-auth.js +23 -4
  6. package/dist/collection/components/ezp-dialog/ezp-dialog.js +1 -1
  7. package/dist/collection/components/ezp-icon/assets/glyph-cloud-upload.svg +4 -0
  8. package/dist/collection/components/ezp-icon/assets/glyph-file.svg +3 -0
  9. package/dist/collection/components/ezp-icon/ezp-icon.js +1 -1
  10. package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
  11. package/dist/collection/components/ezp-input/ezp-input.css +17 -33
  12. package/dist/collection/components/ezp-input/ezp-input.js +1 -1
  13. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +175 -48
  14. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +10 -8
  15. package/dist/collection/components/ezp-printing/ezp-printing.css +14 -14
  16. package/dist/collection/components/ezp-printing/ezp-printing.js +13 -1
  17. package/dist/collection/components/ezp-select/ezp-select.css +54 -36
  18. package/dist/collection/components/ezp-select/ezp-select.js +1 -1
  19. package/dist/collection/components/ezp-status/ezp-status.css +94 -9
  20. package/dist/collection/components/ezp-status/ezp-status.js +22 -3
  21. package/dist/collection/components/ezp-stepper/ezp-stepper.css +37 -35
  22. package/dist/collection/components/ezp-stepper/ezp-stepper.js +2 -2
  23. package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -3
  24. package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
  25. package/dist/collection/components/ezp-upload/ezp-upload.css +241 -75
  26. package/dist/collection/components/ezp-upload/ezp-upload.js +55 -3
  27. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +1 -1
  28. package/dist/collection/types/shared/types.d.ts +2 -0
  29. package/dist/components/ezp-auth2.js +1 -1
  30. package/dist/components/ezp-input2.js +1 -1
  31. package/dist/components/ezp-printer-selection2.js +1 -1
  32. package/dist/components/ezp-printing.js +1 -1
  33. package/dist/components/ezp-select2.js +1 -1
  34. package/dist/components/ezp-status2.js +1 -1
  35. package/dist/components/ezp-stepper2.js +1 -1
  36. package/dist/components/ezp-text-button2.js +1 -1
  37. package/dist/components/ezp-upload2.js +1 -1
  38. package/dist/components/ezp-user-menu2.js +1 -1
  39. package/dist/components/utils.js +1 -1
  40. package/dist/directives/proxies.ts +9 -5
  41. package/dist/esm/ezeep.js +1 -1
  42. package/dist/esm/ezp-auth_15.entry.js +114 -38
  43. package/dist/esm/loader.js +1 -1
  44. package/dist/esm-es5/ezeep.js +1 -1
  45. package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
  46. package/dist/esm-es5/loader.js +1 -1
  47. package/dist/ezeep/assets/glyph-cloud-upload.svg +4 -0
  48. package/dist/ezeep/assets/glyph-file.svg +3 -0
  49. package/dist/ezeep/ezeep.esm.js +1 -1
  50. package/dist/ezeep/{p-644e48a0.system.entry.js → p-1e286bd1.system.entry.js} +2 -2
  51. package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
  52. package/dist/ezeep/p-a2b688f0.entry.js +1 -0
  53. package/dist/ezeep/types/shared/types.d.ts +2 -0
  54. package/dist/types/components/ezp-printing/ezp-printing.d.ts +1 -0
  55. package/dist/types/components/ezp-status/ezp-status.d.ts +1 -0
  56. package/dist/types/components/ezp-upload/ezp-upload.d.ts +9 -0
  57. package/dist/types/components.d.ts +9 -1
  58. package/dist/types/shared/types.d.ts +2 -0
  59. package/package.json +1 -1
  60. package/www/build/assets/glyph-cloud-upload.svg +4 -0
  61. package/www/build/assets/glyph-file.svg +3 -0
  62. package/www/build/ezeep.esm.js +1 -1
  63. package/www/build/{p-644e48a0.system.entry.js → p-1e286bd1.system.entry.js} +2 -2
  64. package/www/build/p-544b7033.js +1 -0
  65. package/www/build/p-DCznw2Ee.system.js +1 -1
  66. package/www/build/p-a2b688f0.entry.js +1 -0
  67. package/www/data/locales/de.json +13 -5
  68. package/www/data/locales/en.json +13 -5
  69. package/www/index.html +1 -1
  70. package/dist/ezeep/p-ebd2beda.entry.js +0 -1
  71. package/www/build/p-c7252f1c.js +0 -1
  72. package/www/build/p-ebd2beda.entry.js +0 -1
@@ -1,129 +1,295 @@
1
- @charset "UTF-8";
2
1
  /**
3
2
  *
4
3
  * Rules
5
4
  *
6
5
  */
7
6
  :host {
8
- align-content: center;
9
- background: var(--ezp-upload-background, transparent);
10
- border: 1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));
11
- border-radius: 3px;
7
+ --ezp-upload-gradient: linear-gradient(
8
+ 135deg,
9
+ color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%,
10
+ color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100%
11
+ );
12
12
  box-sizing: border-box;
13
13
  color: var(--ezp-core-foreground-primary);
14
- display: grid;
15
- grid-template: auto/minmax(auto, 280px);
16
- height: var(--ezp-upload-height, auto);
17
- justify-content: center;
18
- padding: var(--ezp-spacing-3);
19
- position: relative;
20
- transition: background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);
14
+ display: block;
21
15
  width: var(--ezp-upload-width, auto);
16
+ height: var(--ezp-upload-height, auto);
22
17
  }
23
- :host(.dragging) {
24
- --ezp-upload-background: var(--ezp-theme-translucent);
25
- --ezp-upload-border-color: var(--ezp-theme-translucent);
26
- --ezp-upload-header-blur: 16px;
27
- --ezp-upload-header-opacity: 0.42;
18
+
19
+ *,
20
+ *::before,
21
+ *::after {
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ #form {
26
+ display: block;
27
+ height: 100%;
28
28
  }
29
29
 
30
+ #input {
31
+ appearance: none;
32
+ height: 0;
33
+ opacity: 0;
34
+ pointer-events: none;
35
+ position: absolute;
36
+ width: 0;
37
+ }
38
+
39
+ #modal {
40
+ background: var(--ezp-core-surface-tertiary);
41
+ border-radius: 16px;
42
+ box-shadow: 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: var(--ezp-spacing-4);
46
+ height: 100%;
47
+ padding: var(--ezp-spacing-5);
48
+ }
49
+
50
+ /**
51
+ *
52
+ * Header
53
+ *
54
+ */
30
55
  #header {
31
- --ezp-icon-fill: var(--ezp-theme-solid);
32
56
  align-items: center;
57
+ border-bottom: 1px solid var(--ezp-core-outline);
33
58
  display: flex;
34
- filter: blur(var(--ezp-upload-header-blur, 0));
59
+ justify-content: space-between;
60
+ padding-bottom: var(--ezp-spacing-4);
61
+ }
62
+
63
+ #heading {
64
+ --ezp-label-fontSize: 22px;
65
+ --ezp-label-lineHeight: 28px;
66
+ }
67
+
68
+ /**
69
+ *
70
+ * Dropzone
71
+ *
72
+ */
73
+ #dropzone {
74
+ align-items: center;
75
+ background: var(--ezp-upload-background, transparent);
76
+ border: 1.5px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));
77
+ border-radius: 12px;
78
+ display: flex;
79
+ /* Grow to fill the modal body so the dashed box spans the available height,
80
+ and keep the contents centered vertically within it. */
81
+ flex: 1 1 auto;
35
82
  flex-direction: column;
36
- gap: var(--ezp-spacing-5);
37
- opacity: var(--ezp-upload-header-opacity, 1);
83
+ gap: var(--ezp-spacing-4);
84
+ justify-content: center;
85
+ min-height: 0;
86
+ padding: var(--ezp-spacing-6) var(--ezp-spacing-5);
38
87
  text-align: center;
39
- transition: filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);
40
- /* When files are selected, collapse the drop-zone icon and primary description
41
- so the file list has more breathing room. */
88
+ transition: background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);
42
89
  }
43
- #header:has(#file-list) {
44
- gap: var(--ezp-spacing-3);
90
+
91
+ :host(.dragging) {
92
+ --ezp-upload-background: var(--ezp-theme-translucent);
93
+ --ezp-upload-border-color: var(--ezp-theme-solid);
94
+ }
95
+
96
+ #cloud {
97
+ align-items: center;
98
+ background: var(--ezp-upload-gradient);
99
+ border-radius: 20px;
100
+ box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);
101
+ color: var(--ezp-white-100);
102
+ display: flex;
103
+ height: 84px;
104
+ justify-content: center;
105
+ width: 84px;
45
106
  }
46
- #header:has(#file-list) > ezp-icon {
47
- display: none;
107
+ #cloud ezp-icon {
108
+ --ezp-icon-size: 40px;
109
+ --ezp-icon-gridTemplate: 40px;
48
110
  }
49
- #header:has(#file-list) > ezp-label:first-of-type {
50
- display: none;
111
+
112
+ #dropzone-title {
113
+ --ezp-label-fontSize: 20px;
114
+ --ezp-label-lineHeight: 26px;
51
115
  }
52
116
 
53
117
  #meta {
118
+ align-items: baseline;
119
+ color: var(--ezp-core-foreground-secondary);
54
120
  display: flex;
55
121
  flex-wrap: wrap;
56
- gap: var(--ezp-spacing-3) 3px;
122
+ gap: 4px;
57
123
  justify-content: center;
58
124
  }
59
125
 
60
- #select {
126
+ #browse {
61
127
  color: var(--ezp-theme-solid);
62
128
  cursor: pointer;
63
- opacity: var(--ezp-upload-select-opacity, 1);
64
- text-decoration: underline;
65
- white-space: nowrap;
129
+ opacity: var(--ezp-upload-browse-opacity, 1);
66
130
  }
67
131
  @media (hover: hover) {
68
- #select:hover {
69
- --ezp-upload-select-opacity: 0.58;
132
+ #browse:hover {
133
+ --ezp-upload-browse-opacity: 0.6;
70
134
  }
71
135
  }
72
136
 
73
- #input {
74
- appearance: none;
75
- height: 0;
76
- opacity: 0;
77
- pointer-events: none;
78
- position: absolute;
79
- width: 0;
137
+ /**
138
+ *
139
+ * Format chips
140
+ *
141
+ */
142
+ #formats {
143
+ display: flex;
144
+ flex-wrap: wrap;
145
+ gap: var(--ezp-spacing-2);
146
+ justify-content: center;
147
+ }
148
+
149
+ .format {
150
+ background: transparent;
151
+ border: 1px solid var(--ezp-core-outline);
152
+ border-radius: 999px;
153
+ color: var(--ezp-core-foreground-secondary);
154
+ font-size: 12px;
155
+ font-weight: 600;
156
+ letter-spacing: 0.02em;
157
+ line-height: 1;
158
+ padding: 7px 14px;
80
159
  }
81
160
 
82
- #file-list {
161
+ /**
162
+ *
163
+ * File thumbnails
164
+ *
165
+ */
166
+ #thumbs {
83
167
  display: flex;
84
- flex-direction: column;
85
- gap: var(--ezp-spacing-3);
86
- max-height: var(--ezp-upload-fileList-maxHeight, 35vh);
168
+ flex-wrap: wrap;
169
+ gap: var(--ezp-spacing-4);
170
+ justify-content: center;
171
+ max-height: 40vh;
87
172
  overflow-y: auto;
88
- scrollbar-color: var(--ezp-core-foreground-tertiary) transparent;
89
- /* Cross-platform thin scrollbar — Windows default is too chunky for this size. */
173
+ padding: var(--ezp-spacing-1);
90
174
  scrollbar-width: thin;
91
175
  width: 100%;
92
- /* WebKit fallback for older Safari / Chrome that don't honor scrollbar-width. */
93
176
  }
94
- #file-list::-webkit-scrollbar {
95
- height: 8px;
96
- width: 8px;
177
+
178
+ .thumb {
179
+ align-items: center;
180
+ display: flex;
181
+ flex-direction: column;
182
+ gap: 6px;
183
+ position: relative;
184
+ width: 88px;
97
185
  }
98
- #file-list::-webkit-scrollbar-thumb {
99
- background: var(--ezp-core-foreground-tertiary);
100
- border-radius: 4px;
186
+
187
+ .thumb-icon {
188
+ align-items: center;
189
+ background: var(--ezp-upload-gradient);
190
+ border-radius: 50%;
191
+ color: var(--ezp-white-100);
192
+ display: flex;
193
+ height: 56px;
194
+ justify-content: center;
195
+ width: 56px;
101
196
  }
102
- #file-list::-webkit-scrollbar-track {
103
- background: transparent;
197
+ .thumb-icon ezp-icon {
198
+ --ezp-icon-size: 26px;
199
+ --ezp-icon-gridTemplate: 26px;
104
200
  }
105
201
 
106
- .file-item {
107
- align-items: center;
108
- background: var(--ezp-core-background-secondary);
109
- border-radius: 3px;
110
- display: grid;
111
- gap: var(--ezp-spacing-3);
112
- grid-template-columns: 1fr auto;
113
- min-height: 32px;
114
- padding: var(--ezp-spacing-2) var(--ezp-spacing-3);
202
+ .thumb-name {
203
+ --ezp-label-minWidth: 0;
204
+ max-width: 100%;
115
205
  }
116
206
 
117
- .file-name {
118
- grid-column: 1;
119
- min-width: 0;
207
+ .thumb-meta {
208
+ letter-spacing: 0.02em;
120
209
  }
121
- .file-name ezp-label {
122
- --ezp-label-minWidth: 0;
210
+
211
+ .thumb-remove {
212
+ align-items: center;
213
+ appearance: none;
214
+ background: var(--ezp-core-surface-tertiary);
215
+ border: 1px solid var(--ezp-core-outline);
216
+ border-radius: 50%;
217
+ color: var(--ezp-core-foreground-secondary);
218
+ cursor: pointer;
219
+ display: flex;
220
+ height: 20px;
221
+ justify-content: center;
222
+ padding: 0;
223
+ position: absolute;
224
+ right: 8px;
225
+ top: -4px;
226
+ transition: color var(--ezp-duration-2) var(--ezp-easing-out-quart);
227
+ width: 20px;
228
+ z-index: 1;
229
+ }
230
+ .thumb-remove ezp-icon {
231
+ --ezp-icon-size: 12px;
232
+ --ezp-icon-gridTemplate: 12px;
233
+ }
234
+ @media (hover: hover) {
235
+ .thumb-remove:hover {
236
+ color: var(--ezp-core-foreground-primary);
237
+ }
123
238
  }
124
239
 
125
- .file-remove {
240
+ .thumb-add {
241
+ cursor: pointer;
242
+ }
243
+ .thumb-add .thumb-add-icon {
126
244
  align-items: center;
245
+ border: 1.5px dashed var(--ezp-core-foreground-tertiary);
246
+ border-radius: 50%;
247
+ color: var(--ezp-core-foreground-secondary);
127
248
  display: flex;
128
- grid-column: 2;
249
+ height: 56px;
250
+ justify-content: center;
251
+ transition: border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);
252
+ width: 56px;
253
+ }
254
+ .thumb-add .thumb-add-icon ezp-icon {
255
+ --ezp-icon-size: 24px;
256
+ --ezp-icon-gridTemplate: 24px;
257
+ }
258
+ @media (hover: hover) {
259
+ .thumb-add:hover .thumb-add-icon {
260
+ border-color: var(--ezp-theme-solid);
261
+ color: var(--ezp-theme-solid);
262
+ }
263
+ }
264
+
265
+ /**
266
+ *
267
+ * Ready counter
268
+ *
269
+ */
270
+ #ready {
271
+ color: var(--ezp-core-foreground-secondary);
272
+ letter-spacing: 0.08em;
273
+ text-align: center;
274
+ text-transform: uppercase;
275
+ }
276
+
277
+ /**
278
+ *
279
+ * Footer
280
+ *
281
+ */
282
+ #footer {
283
+ display: grid;
284
+ gap: var(--ezp-spacing-3);
285
+ grid-template-columns: 1fr 1.4fr;
286
+ }
287
+
288
+ .action {
289
+ --ezp-textButton-borderRadius: 999px;
290
+ --ezp-textButton-padding: var(--ezp-spacing-4);
291
+ }
292
+
293
+ #continue {
294
+ --ezp-textButton-background-init: var(--ezp-upload-gradient);
129
295
  }
@@ -1,6 +1,8 @@
1
- import { Host, h, Fragment } from "@stencil/core";
1
+ import { Host, h } from "@stencil/core";
2
2
  import { subscribeToLanguageChange } from "../../utils/utils";
3
3
  import i18next from "i18next";
4
+ /** File formats advertised to the user as supported for printing. */
5
+ const SUPPORTED_FORMATS = ['PDF', 'DOCX', 'PNG', 'JPG', 'XLSX'];
4
6
  export class EzpUpload {
5
7
  constructor() {
6
8
  /**
@@ -36,6 +38,17 @@ export class EzpUpload {
36
38
  this.input.value = '';
37
39
  }
38
40
  };
41
+ this.clearSelection = () => {
42
+ var _a;
43
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
44
+ this.selectedFiles = [];
45
+ this.uploadFile.emit(this.selectedFiles);
46
+ };
47
+ this.handleContinue = () => {
48
+ if (this.selectedFiles.length === 0)
49
+ return;
50
+ this.uploadContinue.emit(this.selectedFiles);
51
+ };
39
52
  }
40
53
  connectedCallback() {
41
54
  this.unsubscribeLanguage = subscribeToLanguageChange(this);
@@ -77,13 +90,32 @@ export class EzpUpload {
77
90
  (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
78
91
  this.selectedFiles = [];
79
92
  }
93
+ /** Extract a short, upper-cased file-type label from the file name. */
94
+ fileType(name) {
95
+ const extension = name.split('.').pop();
96
+ return extension && extension !== name ? extension.toUpperCase() : i18next.t('upload.file_type_fallback');
97
+ }
98
+ /** Human-readable file size (matches the mockup's "14.6 KB" style). */
99
+ formatSize(bytes) {
100
+ if (bytes < 1024)
101
+ return `${bytes} B`;
102
+ const units = ['KB', 'MB', 'GB'];
103
+ let size = bytes / 1024;
104
+ let unit = 0;
105
+ while (size >= 1024 && unit < units.length - 1) {
106
+ size /= 1024;
107
+ unit++;
108
+ }
109
+ return `${size.toFixed(1)} ${units[unit]}`;
110
+ }
80
111
  /**
81
112
  *
82
113
  * Render method
83
114
  *
84
115
  */
85
116
  render() {
86
- return (h(Host, { key: '3ed4218a2085c92c782e460894149608b8bc4136', class: { dragging: this.dragging } }, h("form", { key: 'de62cb59d82367edc013683d54d55f1807a1d6c7', id: "form", ref: (form) => (this.form = form) }, h("div", { key: 'a6de2ece802087868d0b0a7bf28f60a058737c6c', id: "header" }, h("ezp-icon", { key: '6c0f86cbc078a47b0c8383d9e7a68ae4a3e19c47', name: "drag-drop", size: "huge", framed: true }), h("ezp-label", { key: '8ad91024fcdecb6dfe3821ac9d04b31c47b76496', weight: "strong", text: i18next.t('upload.description') }), h("div", { key: '233ba9e003abc33cc7f95f3faba507a33fcc09f1', id: "meta" }, h("ezp-label", { key: 'e257eb18a98d5578f6476b81ffaef5813dcd2eda', level: "tertiary", text: i18next.t('upload.meta_leading') }), h("label", { key: 'a7127233e97c89af6ab3d562dd909ff79b8122d5', htmlFor: "input", id: "select" }, h("ezp-label", { key: '5d4fa0a05a2e56377a6e6130cbfab206fff4dd29', level: "tertiary", weight: "strong", text: i18next.t('upload.meta_select') })), h("input", { key: '7f3e8e45b58629176d4f41392d20dc30fd27b420', type: "file", name: "input", id: "input", multiple: true, "aria-label": i18next.t('upload.description'), ref: (input) => (this.input = input), onInput: this.handleInput }), h("ezp-label", { key: '2ab851d12e712f3fdbbee0cea2f248ad8e7de807', level: "tertiary", text: i18next.t('upload.meta_trailing') })), this.selectedFiles.length > 0 && (h(Fragment, null, h("ezp-label", { key: '12050e4b680fe14796af60bf526468dda308f439', level: "secondary", text: i18next.t('upload.selected_files') }), h("div", { key: 'fbfcb67db6d426fe45a431dcaa15db43040f9c97', id: "file-list" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "file-item" }, h("div", { class: "file-name" }, h("ezp-label", { level: "tertiary", text: file.name })), h("div", { class: "file-remove" }, h("ezp-icon-button", { icon: "close", type: "button", level: "tertiary", onClick: (event) => this.removeFile(event, index) }))))))))))));
117
+ const hasFiles = this.selectedFiles.length > 0;
118
+ return (h(Host, { key: '80a675de624854f74f5996c37d24aff661d5f9e3', class: { dragging: this.dragging } }, h("form", { key: '4d301b144501b7ec147942a9e17f3bf25dea2d11', id: "form", ref: (form) => (this.form = form) }, h("input", { key: '65a6ba2d294fb77c8de9dba0ea9a5174b44d21a2', type: "file", name: "input", id: "input", multiple: true, "aria-label": i18next.t('upload.description'), ref: (input) => (this.input = input), onInput: this.handleInput }), h("div", { key: '42837b813a19478cc44007e05c1171a0cd8569a6', id: "modal" }, h("div", { key: '23243241f17024bde96c98f415dca2696f34d4ee', id: "header" }, h("ezp-label", { key: 'f3b41b967b6632e79d8bee2af682fc6d97685223', id: "heading", weight: "heavy", text: i18next.t('upload.heading') }), h("ezp-icon-button", { key: '9b239f06f0c75cede6a5312f2913f002441064a4', icon: "close", type: "button", level: "tertiary", onClick: this.clearSelection })), h("div", { key: '3c04a276ef24b3763a3ca0638d031dd8c1705300', id: "dropzone" }, hasFiles && (h("div", { key: '95610c71e57beccf2f6457dee6120952a1f924c7', id: "thumbs" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "thumb" }, h("button", { type: "button", class: "thumb-remove", "aria-label": i18next.t('button_actions.close'), onClick: (event) => this.removeFile(event, index) }, h("ezp-icon", { name: "close" })), h("div", { class: "thumb-icon" }, h("ezp-icon", { name: "file" })), h("ezp-label", { class: "thumb-name", ellipsis: true, text: file.name }), h("ezp-label", { class: "thumb-meta", level: "tertiary", weight: "strong", text: `${this.fileType(file.name)} · ${this.formatSize(file.size)}` })))), h("label", { key: 'f4126b83f2947acbe861febb7a36a3adb9083022', htmlFor: "input", class: "thumb thumb-add" }, h("div", { key: '74d6094429e62377fa64a6b9dd69fb112f61807e', class: "thumb-add-icon" }, h("ezp-icon", { key: 'ed4ba315c9f03f63c3a459d887df2fa0d151339a', name: "plus" })), h("ezp-label", { key: '945c95ded15e1449c0c07fab74fa8bddfc1f712a', class: "thumb-name", level: "tertiary", text: i18next.t('upload.add_more') })))), !hasFiles && (h("div", { key: '3f177a95ddb406beaf4590d14e80979d61f47ef0', id: "cloud" }, h("ezp-icon", { key: 'df1646e18945ed7ae06e5768aa38ac5a41ece898', name: "cloud-upload" }))), h("ezp-label", { key: 'ac690849856ef1f333ac07977bf037c50bf932b2', id: "dropzone-title", weight: "heavy", text: i18next.t('upload.dropzone_title') }), h("div", { key: '75450a0a252eb1d89f712694b5a2c53f2af49716', id: "meta" }, h("ezp-label", { key: 'f2a47822f778492be7dae45b34201b42b11529e2', level: "secondary", text: i18next.t('upload.meta_leading') }), h("label", { key: '1da677a25803eb46551dc6073af83ab2280f0f25', htmlFor: "input", id: "browse" }, h("ezp-label", { key: 'f3ccd35677e9c982455f7cc0602e82722f181912', level: "secondary", weight: "strong", text: i18next.t('upload.browse') })), h("ezp-label", { key: '72033ea8583a30304523156e70db582dea34949a', level: "secondary", text: i18next.t('upload.meta_multiple') })), h("div", { key: 'e366576f4a0f553b879e15596eaa8abee39268b4', id: "formats" }, SUPPORTED_FORMATS.map((format) => (h("span", { class: "format", key: format }, format))))), hasFiles && (h("ezp-label", { key: '1d3286a144d9a18117b5c8ff656df8ca60d14287', id: "ready", level: "secondary", weight: "strong", text: i18next.t('upload.files_ready', { count: this.selectedFiles.length }) })), h("div", { key: '9508e04611014e3308b3552ac022dd35fe089f94', id: "footer" }, h("ezp-text-button", { key: '140f08816c3ed3474dd1485d07635090a55f6042', type: "button", level: "secondary", onClick: this.clearSelection, label: i18next.t('button_actions.cancel'), class: "action" }), h("ezp-text-button", { key: 'edd9ecceff3efa596bc2fb1073a26b1e8915b283', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: i18next.t('upload.continue'), class: "action" }))))));
87
119
  }
88
120
  static get is() { return "ezp-upload"; }
89
121
  static get encapsulation() { return "shadow"; }
@@ -112,7 +144,27 @@ export class EzpUpload {
112
144
  "composed": true,
113
145
  "docs": {
114
146
  "tags": [],
115
- "text": "\nEvents"
147
+ "text": "Keeps the parent's file state in sync as the selection changes."
148
+ },
149
+ "complexType": {
150
+ "original": "File[]",
151
+ "resolved": "File[]",
152
+ "references": {
153
+ "File": {
154
+ "location": "global",
155
+ "id": "global::File"
156
+ }
157
+ }
158
+ }
159
+ }, {
160
+ "method": "uploadContinue",
161
+ "name": "uploadContinue",
162
+ "bubbles": true,
163
+ "cancelable": true,
164
+ "composed": true,
165
+ "docs": {
166
+ "tags": [],
167
+ "text": "Fired when the user confirms the selection and wants to move on to print options."
116
168
  },
117
169
  "complexType": {
118
170
  "original": "File[]",
@@ -84,7 +84,7 @@ export class EzpUserMenu {
84
84
  *
85
85
  */
86
86
  render() {
87
- return (h(Host, { key: '76b6f86b18d8aab59578ab6a3ea25e4177ff6e54', class: this.open ? 'is-open' : '' }, h("div", { key: '4179c44a0477b59606ecb769453ccdfcda0c017b', id: "header" }, h("ezp-label", { key: 'ecb776a4c4c04eadae8599fa9d077238468fc809', ellipsis: true, id: "name", weight: "heavy", text: this.name }), h("ezp-icon-button", { key: 'fba99c75cee975801bdaeb861f41c8693a149843', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), h("div", { key: '16028fe80eb8851891ec618900ce488718d0ad3b', id: "links" }, this.links.map((link) => (h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, h("ezp-icon", { class: "link__icon", name: link.icon }), h("ezp-label", { text: link.title })))), h("a", { key: '7741d760a000a78eb96709a6ad87fa962efdc375', class: "link", onClick: this.logOut }, h("ezp-icon", { key: '33b280fcea4e039c5f0dd53f348ebf0400b97b64', class: "link__icon", name: "logout" }), h("ezp-label", { key: 'ccc22c5fbd9baaf5352a61ce845b3c98e8f83e7d', text: i18next.t('user_menu.logout') }))), h("div", { key: 'a7dce7b1073af19ff90bdf1fabe214ac08c55003', id: "theme" }, h("ezp-label", { key: '66ba8c16a9c6183a577edc403074f9e3fcf55345', class: "caption", text: `${i18next.t('user_menu.theme')}:`, weight: "heavy" }), h("div", { key: '1c6f931a3040d392720d0c7c1f7a9eee4114b935', id: "swatches" }, this.themes.map((theme) => (h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, h("span", { class: "dot" })))))), h("div", { key: '1b771bbce7b7ea213ecd489e6a3e917aed8a845b', id: "appearance" }, h("ezp-label", { key: '8f1a96513260500a6ce3319f72b6ea2ca6a0794a', class: "caption", text: `${i18next.t('user_menu.appearance')}:`, weight: "heavy" }), h("div", { key: '177a61b8f7210f6a90a36fc5bb9d4b23c64f2a10', id: "tabs" }, this.appearances.map((appearance) => (h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, h("ezp-icon", { name: appearance.name }), h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
87
+ return (h(Host, { key: 'ce0f05bb5ae8d4350d688b234c0a913b338a39c1', class: this.open ? 'is-open' : '' }, h("div", { key: '58448dac0a9d08e7d1bdaaaefae308dc32792837', id: "header" }, h("ezp-label", { key: '741b8f779bd0365452f83cd51030c621b87d9112', ellipsis: true, id: "name", weight: "heavy", text: this.name }), h("ezp-icon-button", { key: '7bb08461ef32207f533abfae0c11fa1b35796ad5', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), h("div", { key: '047a83ce4d3f7ae3f955dfb078effd95d151b0c1', id: "links" }, this.links.map((link) => (h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, h("ezp-icon", { class: "link__icon", name: link.icon }), h("ezp-label", { text: link.title })))), h("a", { key: 'b8d940d65aa2602c6b6c227ab13eb20b9047ae26', class: "link", onClick: this.logOut }, h("ezp-icon", { key: 'dc72f40d565077333ae95520ae156669c1aa41a9', class: "link__icon", name: "logout" }), h("ezp-label", { key: 'b9aef15622e67f60c7948dca008a2724be44c680', text: i18next.t('user_menu.logout') }))), h("div", { key: 'a4d0768275f2f9546381ba0cad73357c5e8b37e5', id: "theme" }, h("ezp-label", { key: '0b934d478dfb405b5349a782ea5f47f6b8ae6082', class: "caption", text: `${i18next.t('user_menu.theme')}:`, weight: "heavy" }), h("div", { key: '7c1665c4dcea007dd605229e001676312ef90f04', id: "swatches" }, this.themes.map((theme) => (h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, h("span", { class: "dot" })))))), h("div", { key: '68d4809c7872102eed4cbd104e1c42ad324c66b1', id: "appearance" }, h("ezp-label", { key: '2886504538c9dbfb1b92539f9ed85f604a2b834d', class: "caption", text: `${i18next.t('user_menu.appearance')}:`, weight: "heavy" }), h("div", { key: 'e614f865638be0007e726d02934a34c54e9f6e58', id: "tabs" }, this.appearances.map((appearance) => (h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, h("ezp-icon", { name: appearance.name }), h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
88
88
  }
89
89
  static get is() { return "ezp-user-menu"; }
90
90
  static get encapsulation() { return "shadow"; }
@@ -5,7 +5,9 @@ export type IconNameTypes =
5
5
  | 'checkmark-alt'
6
6
  | 'checkmark'
7
7
  | 'close'
8
+ | 'cloud-upload'
8
9
  | 'color'
10
+ | 'file'
9
11
  | 'copies'
10
12
  | 'dark'
11
13
  | 'drag-drop'
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,Host as n,transformTag as o}from"@stencil/core/internal/client";import{a,E as l}from"./auth.js";import{s as c,i as h}from"./utils.js";import{d as r}from"./ezp-dialog2.js";import{d as p}from"./ezp-icon2.js";import{d as u}from"./ezp-icon-button2.js";import{d}from"./ezp-label2.js";import{d as m}from"./ezp-status2.js";import{d as g}from"./ezp-text-button2.js";const z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.authCancel=s(this,"authCancel",7),this.authSuccess=s(this,"authSuccess",7),this.userCancel=s(this,"userCancel",7),this.oauthPopupWindow=null,this.previousUrl=null,this.receiveMessage=t=>{if(this.oauthPopupWindow&&t.source&&t.source!==this.oauthPopupWindow)return void console.warn("[ezeep] Ignored auth message from an unexpected source window.");let e=null;try{e=new URL(this.redirectURI).origin}catch(t){e=null}e&&t.origin!==e?console.warn(`[ezeep] Ignored auth message from unexpected origin "${t.origin}" (expected "${e}").`):(a.state.code=t.data,this.auth.getAccessToken().then((()=>{this.authCancel.emit(),this.authSuccess.emit()})))}}listenDialogAction(){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}listenDialogClose(){this.authCancel.emit()}listenStatusCancel(){this.authCancel.emit()}connectedCallback(){this.unsubscribeLanguage=c(this)}disconnectedCallback(){var t;null===(t=this.unsubscribeLanguage)||void 0===t||t.call(this),window.removeEventListener("message",this.receiveMessage)}openSignInWindow(t,e){var s;if(a.state.isAuthorized)return this.authCancel.emit(),void this.authSuccess.emit();window.removeEventListener("message",this.receiveMessage);const i="toolbar=no, menubar=no, width=600, height=7000, top=100, left=100";null===this.oauthPopupWindow||this.oauthPopupWindow.closed?this.oauthPopupWindow=window.open(t,e,i):this.previousUrl!==this.auth.authURI.toString()?(this.oauthPopupWindow=window.open(t,e,i),this.oauthPopupWindow&&!this.oauthPopupWindow.closed&&void 0!==this.oauthPopupWindow.closed||alert("popup blocked"),null===(s=this.oauthPopupWindow)||void 0===s||s.focus()):this.oauthPopupWindow.focus(),window.addEventListener("message",this.receiveMessage,!1),this.previousUrl=this.auth.authURI}async componentWillLoad(){this.auth=new l(this.redirectURI,this.clientID),this.code&&(a.state.code=this.code,await this.auth.getAccessToken(),this.authCancel.emit(),this.authSuccess.emit()),!1===a.state.isAuthorized&&(this.auth.generateCodeVerifier(),await this.auth.generateCodeChallenge(a.state.codeVerifier),this.auth.buildAuthURI()),this.hidelogin&&"button"===this.trigger&&this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}render(){return i(n,{key:"adde3ddd8f6afddc27c3a5503569b3c0d9eea420"},this.hidelogin&&"button"===this.trigger?i("ezp-status",{description:h.t("login_dialog.action"),processing:!0,cancel:!0}):this.hidelogin&&"file"===this.trigger?i("div",{class:"auth-actions"},i("ezp-text-button",{type:"button",level:"secondary",onClick:()=>this.userCancel.emit(),label:h.t("button_actions.cancel")}),i("ezp-text-button",{type:"button",level:"primary",onClick:()=>this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login"),label:h.t("button_actions.select_printer")})):i("ezp-dialog",{heading:h.t("login_dialog.heading"),description:h.t("login_dialog.description"),action:h.t("login_dialog.action"),iconName:"logo",iconSize:"huge",iconFramed:!1,instance:"login"}))}static get style(){return":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}.auth-actions{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;width:100%}.auth-actions ezp-text-button{-ms-flex:1;flex:1;max-width:calc(50% - var(--ezp-spacing-3) / 2)}"}},[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]]);function b(){"undefined"!=typeof customElements&&["ezp-auth","ezp-dialog","ezp-icon","ezp-icon-button","ezp-label","ezp-status","ezp-text-button"].forEach((t=>{switch(t){case"ezp-auth":customElements.get(o(t))||customElements.define(o(t),z);break;case"ezp-dialog":customElements.get(o(t))||r();break;case"ezp-icon":customElements.get(o(t))||p();break;case"ezp-icon-button":customElements.get(o(t))||u();break;case"ezp-label":customElements.get(o(t))||d();break;case"ezp-status":customElements.get(o(t))||m();break;case"ezp-text-button":customElements.get(o(t))||g()}}))}export{z as E,b as d}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a,E as l}from"./auth.js";import{s as c,i as h}from"./utils.js";import{d as r}from"./ezp-dialog2.js";import{d}from"./ezp-icon2.js";import{d as u}from"./ezp-icon-button2.js";import{d as p}from"./ezp-label2.js";import{d as m}from"./ezp-status2.js";import{d as g}from"./ezp-text-button2.js";const z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.authCancel=s(this,"authCancel",7),this.authSuccess=s(this,"authSuccess",7),this.userCancel=s(this,"userCancel",7),this.oauthPopupWindow=null,this.previousUrl=null,this.receiveMessage=t=>{if(this.oauthPopupWindow&&t.source&&t.source!==this.oauthPopupWindow)return void console.warn("[ezeep] Ignored auth message from an unexpected source window.");let e=null;try{e=new URL(this.redirectURI).origin}catch(t){e=null}e&&t.origin!==e?console.warn(`[ezeep] Ignored auth message from unexpected origin "${t.origin}" (expected "${e}").`):(a.state.code=t.data,this.auth.getAccessToken().then((()=>{this.authCancel.emit(),this.authSuccess.emit()})))}}listenDialogAction(){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}listenDialogClose(){this.authCancel.emit()}listenStatusCancel(){"file"===this.trigger?this.userCancel.emit():this.authCancel.emit()}connectedCallback(){this.unsubscribeLanguage=c(this)}disconnectedCallback(){var t;null===(t=this.unsubscribeLanguage)||void 0===t||t.call(this),window.removeEventListener("message",this.receiveMessage)}openSignInWindow(t,e){var s;if(a.state.isAuthorized)return this.authCancel.emit(),void this.authSuccess.emit();window.removeEventListener("message",this.receiveMessage);const i="toolbar=no, menubar=no, width=600, height=7000, top=100, left=100";null===this.oauthPopupWindow||this.oauthPopupWindow.closed?this.oauthPopupWindow=window.open(t,e,i):this.previousUrl!==this.auth.authURI.toString()?(this.oauthPopupWindow=window.open(t,e,i),this.oauthPopupWindow&&!this.oauthPopupWindow.closed&&void 0!==this.oauthPopupWindow.closed||alert("popup blocked"),null===(s=this.oauthPopupWindow)||void 0===s||s.focus()):this.oauthPopupWindow.focus(),window.addEventListener("message",this.receiveMessage,!1),this.previousUrl=this.auth.authURI}async componentWillLoad(){this.auth=new l(this.redirectURI,this.clientID),this.code&&(a.state.code=this.code,await this.auth.getAccessToken(),this.authCancel.emit(),this.authSuccess.emit()),!1===a.state.isAuthorized&&(this.auth.generateCodeVerifier(),await this.auth.generateCodeChallenge(a.state.codeVerifier),this.auth.buildAuthURI()),!this.hidelogin||"button"!==this.trigger&&"file"!==this.trigger||(a.state.isAuthorized?(this.authCancel.emit(),this.authSuccess.emit()):this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login"))}render(){return i(o,{key:"c00096b96d6d21508d1a78d5ae5a7f552516d01f"},!this.hidelogin||"button"!==this.trigger&&"file"!==this.trigger?i("ezp-dialog",{heading:h.t("login_dialog.heading"),description:h.t("login_dialog.description"),action:h.t("login_dialog.action"),iconName:"logo",iconSize:"huge",iconFramed:!1,instance:"login"}):i("ezp-status",{description:h.t("login_dialog.action"),processing:!0,cancel:!0}))}static get style(){return":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}"}},[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]]);function b(){"undefined"!=typeof customElements&&["ezp-auth","ezp-dialog","ezp-icon","ezp-icon-button","ezp-label","ezp-status","ezp-text-button"].forEach((t=>{switch(t){case"ezp-auth":customElements.get(n(t))||customElements.define(n(t),z);break;case"ezp-dialog":customElements.get(n(t))||r();break;case"ezp-icon":customElements.get(n(t))||d();break;case"ezp-icon-button":customElements.get(n(t))||u();break;case"ezp-label":customElements.get(n(t))||p();break;case"ezp-status":customElements.get(n(t))||m();break;case"ezp-text-button":customElements.get(n(t))||g()}}))}export{z as E,b as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as o,Host as r,transformTag as a}from"@stencil/core/internal/client";import{d as n}from"./ezp-icon2.js";import{d as p}from"./ezp-label2.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.inputValueChanged=i(this,"inputValueChanged",7),this.timeout=null,this.label="Label",this.type="text",this.icon="color",this.placeholder="",this.focused=!1,this.setFocus=()=>{var e;null===(e=this.input)||void 0===e||e.focus()},this.handleBlur=()=>{this.focused=!1},this.handleFocus=()=>{this.focused=!0}}handleChange(e){this.timeout&&clearTimeout(this.timeout);const t=e.target;this.value=t.value?t.value:"number"===this.type?0:"",this.timeout=setTimeout((()=>{this.inputValueChanged.emit({type:this.eventType.toLowerCase(),value:this.value})}),500)}render(){return o(r,{key:"ba8958137bce0592dbe4ec23c03284885f570e27",class:{focused:this.focused},onClick:this.setFocus},o("ezp-icon",{key:"9d3b108841ffdabec9b9a98d6d6b2ea19fba37fc",id:"icon",name:this.icon}),o("ezp-label",{key:"5fee00202e9c6407bddf8a1b7090d983d79e42b3",id:"label",noWrap:!0,level:"secondary",text:this.label}),o("input",{key:"99c71e9c6d29193046bd0b6094efbac828ffab15",id:"input",type:this.type,value:this.value,placeholder:this.placeholder,"aria-label":this.label,onInput:e=>this.handleChange(e),ref:e=>this.input=e,onFocus:this.handleFocus,onBlur:this.handleBlur}),this.suffix?o("ezp-label",{id:"suffix",level:"secondary",text:this.suffix}):null)}static get style(){return':host{-ms-flex-align:center;align-items:center;background:var(--ezp-input-background, var(--ezp-core-surface-tertiary));border-radius:var(--ezp-input-border-radius, 0);-webkit-box-shadow:var(--ezp-input-box-shadow-position-top, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-right, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-bottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-left, -1px 0 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-input-box-shadow-position-top, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-right, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-bottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-left, -1px 0 0 0) var(--ezp-core-outline);cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-input-grid-template, auto/auto auto 1fr);height:30px;padding:0 var(--ezp-spacing-3);position:relative;z-index:var(--ezp-input-z-index, 3)}:host([suffix]){--ezp-input-grid-template:auto / auto auto 1fr auto;--ezp-input-input-padding-right:0}:host(.focused){--ezp-input-icon-color:var(--ezp-theme-solid);--ezp-input-label-color:var(--ezp-theme-solid)}:host(:first-child){--ezp-input-border-radius:3px 3px 0 0}:host(:last-child){--ezp-input-border-radius:0 0 3px 3px}:host(:first-child:last-child){--ezp-input-border-radius:3px}:host(:not(:last-child)){--ezp-input-box-shadow-position-bottom:0 0 0 0}:host(:hover){--ezp-input-background:linear-gradient(0deg, var(--ezp-core-shade-primary) 0%, var(--ezp-core-shade-primary) 100%), var(--ezp-core-surface-tertiary)}#label{color:var(--ezp-input-label-color, var(--ezp-core-foreground-secondary))}#icon{color:var(--ezp-input-icon-color, var(--ezp-core-foreground-secondary))}#input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:inherit;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:14px;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0 var(--ezp-input-input-padding-right, var(--ezp-spacing-1)) 0 0;text-align:right;width:100%}#input[type=number]::-webkit-inner-spin-button,#input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}#suffix{color:var(--ezp-core-foreground-tertiary)}'}},[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}]);function u(){"undefined"!=typeof customElements&&["ezp-input","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-input":customElements.get(a(e))||customElements.define(a(e),s);break;case"ezp-icon":customElements.get(a(e))||n();break;case"ezp-label":customElements.get(a(e))||p()}}))}export{s as E,u as d}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as o,transformTag as n}from"@stencil/core/internal/client";import{d as a}from"./ezp-icon2.js";import{d as p}from"./ezp-label2.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.inputValueChanged=i(this,"inputValueChanged",7),this.timeout=null,this.label="Label",this.type="text",this.icon="color",this.placeholder="",this.focused=!1,this.setFocus=()=>{var e;null===(e=this.input)||void 0===e||e.focus()},this.handleBlur=()=>{this.focused=!1},this.handleFocus=()=>{this.focused=!0}}handleChange(e){this.timeout&&clearTimeout(this.timeout);const t=e.target;this.value=t.value?t.value:"number"===this.type?0:"",this.timeout=setTimeout((()=>{this.inputValueChanged.emit({type:this.eventType.toLowerCase(),value:this.value})}),500)}render(){return r(o,{key:"ba8958137bce0592dbe4ec23c03284885f570e27",class:{focused:this.focused},onClick:this.setFocus},r("ezp-icon",{key:"9d3b108841ffdabec9b9a98d6d6b2ea19fba37fc",id:"icon",name:this.icon}),r("ezp-label",{key:"5fee00202e9c6407bddf8a1b7090d983d79e42b3",id:"label",noWrap:!0,level:"secondary",text:this.label}),r("input",{key:"99c71e9c6d29193046bd0b6094efbac828ffab15",id:"input",type:this.type,value:this.value,placeholder:this.placeholder,"aria-label":this.label,onInput:e=>this.handleChange(e),ref:e=>this.input=e,onFocus:this.handleFocus,onBlur:this.handleBlur}),this.suffix?r("ezp-label",{id:"suffix",level:"secondary",text:this.suffix}):null)}static get style(){return':host{-ms-flex-align:center;align-items:center;background:transparent;cursor:text;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-input-grid-template, auto/auto auto 1fr);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:var(--ezp-input-z-index, 3)}:host([suffix]){--ezp-input-grid-template:auto / auto auto 1fr auto;--ezp-input-input-padding-right:0}:host(.focused){--ezp-input-label-color:var(--ezp-core-foreground-primary)}#label{color:var(--ezp-input-label-color, var(--ezp-core-foreground-primary))}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-input-icon-color, var(--ezp-theme-solid))}#input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:14px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0 var(--ezp-input-input-padding-right, var(--ezp-spacing-1)) 0 0;text-align:right;width:100%}#input::-webkit-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-moz-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input:-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input[type=number]::-webkit-inner-spin-button,#input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}#suffix{color:var(--ezp-core-foreground-tertiary)}'}},[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}]);function l(){"undefined"!=typeof customElements&&["ezp-input","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-input":customElements.get(n(e))||customElements.define(n(e),s);break;case"ezp-icon":customElements.get(n(e))||a();break;case"ezp-label":customElements.get(n(e))||p()}}))}export{s as E,l as d}