@ezeep/ezeep-js 1.0.272 → 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 (132) hide show
  1. package/dist/cjs/{app-globals-D7ISNeUi.js → app-globals-L_3XPZxT.js} +7 -1
  2. package/dist/cjs/ezeep.cjs.js +4 -4
  3. package/dist/cjs/ezp-auth_15.cjs.entry.js +7338 -3700
  4. package/dist/cjs/{index-dv_gozsq.js → index-DM5v_sge.js} +3 -2
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/collection/collection-manifest.json +1 -1
  7. package/dist/collection/components/ezp-auth/ezp-auth.css +0 -12
  8. package/dist/collection/components/ezp-auth/ezp-auth.js +78 -18
  9. package/dist/collection/components/ezp-backdrop/ezp-backdrop.js +5 -5
  10. package/dist/collection/components/ezp-dialog/ezp-dialog.js +85 -13
  11. package/dist/collection/components/ezp-icon/assets/glyph-cloud-upload.svg +4 -0
  12. package/dist/collection/components/ezp-icon/assets/glyph-file.svg +3 -0
  13. package/dist/collection/components/ezp-icon/ezp-icon.js +8 -3
  14. package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +5 -2
  15. package/dist/collection/components/ezp-input/ezp-input.css +19 -38
  16. package/dist/collection/components/ezp-input/ezp-input.js +16 -14
  17. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +175 -48
  18. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +215 -329
  19. package/dist/collection/components/ezp-printing/ezp-printing.css +23 -23
  20. package/dist/collection/components/ezp-printing/ezp-printing.js +119 -35
  21. package/dist/collection/components/ezp-select/ezp-select.css +56 -38
  22. package/dist/collection/components/ezp-select/ezp-select.js +93 -14
  23. package/dist/collection/components/ezp-status/ezp-status.css +94 -9
  24. package/dist/collection/components/ezp-status/ezp-status.js +42 -13
  25. package/dist/collection/components/ezp-stepper/ezp-stepper.css +37 -35
  26. package/dist/collection/components/ezp-stepper/ezp-stepper.js +14 -7
  27. package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -3
  28. package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
  29. package/dist/collection/components/ezp-upload/ezp-upload.css +243 -77
  30. package/dist/collection/components/ezp-upload/ezp-upload.js +80 -10
  31. package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +2 -1
  32. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +15 -15
  33. package/dist/collection/services/auth.js +37 -36
  34. package/dist/collection/services/http.js +11 -0
  35. package/dist/collection/services/print-job.js +72 -0
  36. package/dist/collection/services/print.js +21 -69
  37. package/dist/collection/services/user.js +2 -9
  38. package/dist/collection/shared/constants.js +55 -0
  39. package/dist/collection/shared/global.js +7 -1
  40. package/dist/collection/shared/storage.js +71 -0
  41. package/dist/collection/types/shared/types.d.ts +42 -9
  42. package/dist/collection/utils/printer.js +68 -0
  43. package/dist/collection/utils/utils.js +24 -9
  44. package/dist/components/auth.js +1 -1
  45. package/dist/components/ezp-auth2.js +1 -1
  46. package/dist/components/ezp-backdrop2.js +1 -1
  47. package/dist/components/ezp-dialog2.js +1 -1
  48. package/dist/components/ezp-icon-button2.js +1 -1
  49. package/dist/components/ezp-icon2.js +1 -1
  50. package/dist/components/ezp-input2.js +1 -1
  51. package/dist/components/ezp-printer-selection2.js +1 -1
  52. package/dist/components/ezp-printing.js +1 -1
  53. package/dist/components/ezp-select2.js +1 -1
  54. package/dist/components/ezp-status2.js +1 -1
  55. package/dist/components/ezp-stepper2.js +1 -1
  56. package/dist/components/ezp-text-button2.js +1 -1
  57. package/dist/components/ezp-upload2.js +1 -1
  58. package/dist/components/ezp-user-menu.js +1 -1
  59. package/dist/components/ezp-user-menu2.js +1 -1
  60. package/dist/components/index.js +1 -1
  61. package/dist/components/utils.js +1 -0
  62. package/dist/directives/proxies.ts +74 -47
  63. package/dist/esm/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +7 -1
  64. package/dist/esm/ezeep.js +5 -5
  65. package/dist/esm/ezp-auth_15.entry.js +7338 -3700
  66. package/dist/esm/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
  67. package/dist/esm/loader.js +4 -4
  68. package/dist/esm-es5/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +1 -1
  69. package/dist/esm-es5/ezeep.js +1 -1
  70. package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
  71. package/dist/esm-es5/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
  72. package/dist/esm-es5/loader.js +1 -1
  73. package/dist/ezeep/assets/glyph-cloud-upload.svg +4 -0
  74. package/dist/ezeep/assets/glyph-file.svg +3 -0
  75. package/dist/ezeep/ezeep.esm.js +1 -1
  76. package/dist/ezeep/ezeep.js +1 -1
  77. package/dist/ezeep/p-1e286bd1.system.entry.js +7 -0
  78. package/dist/ezeep/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
  79. package/dist/ezeep/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
  80. package/{www/build/p-DhXN1yGM.system.js → dist/ezeep/p-CYpousxy.system.js} +2 -2
  81. package/dist/ezeep/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
  82. package/dist/ezeep/p-DCznw2Ee.system.js +1 -0
  83. package/dist/ezeep/p-a2b688f0.entry.js +1 -0
  84. package/dist/ezeep/types/shared/types.d.ts +42 -9
  85. package/dist/types/components/ezp-auth/ezp-auth.d.ts +8 -5
  86. package/dist/types/components/ezp-backdrop/ezp-backdrop.d.ts +2 -2
  87. package/dist/types/components/ezp-dialog/ezp-dialog.d.ts +14 -3
  88. package/dist/types/components/ezp-input/ezp-input.d.ts +17 -14
  89. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +23 -7
  90. package/dist/types/components/ezp-printing/ezp-printing.d.ts +26 -2
  91. package/dist/types/components/ezp-select/ezp-select.d.ts +10 -4
  92. package/dist/types/components/ezp-status/ezp-status.d.ts +7 -4
  93. package/dist/types/components/ezp-stepper/ezp-stepper.d.ts +1 -1
  94. package/dist/types/components/ezp-upload/ezp-upload.d.ts +13 -1
  95. package/dist/types/components/ezp-user-menu/ezp-user-menu.d.ts +5 -2
  96. package/dist/types/components.d.ts +47 -39
  97. package/dist/types/services/auth.d.ts +10 -0
  98. package/dist/types/services/http.d.ts +4 -0
  99. package/dist/types/services/print-job.d.ts +48 -0
  100. package/dist/types/services/print.d.ts +10 -9
  101. package/dist/types/services/user.d.ts +13 -2
  102. package/dist/types/shared/constants.d.ts +51 -0
  103. package/dist/types/shared/storage.d.ts +24 -0
  104. package/dist/types/shared/types.d.ts +42 -9
  105. package/dist/types/stencil-public-runtime.d.ts +1 -0
  106. package/dist/types/utils/printer.d.ts +22 -0
  107. package/dist/types/utils/utils.d.ts +22 -10
  108. package/package.json +30 -18
  109. package/readme.md +1 -0
  110. package/www/build/assets/glyph-cloud-upload.svg +4 -0
  111. package/www/build/assets/glyph-file.svg +3 -0
  112. package/www/build/ezeep.esm.js +1 -1
  113. package/www/build/ezeep.js +1 -1
  114. package/www/build/p-1e286bd1.system.entry.js +7 -0
  115. package/www/build/p-544b7033.js +1 -0
  116. package/www/build/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
  117. package/www/build/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
  118. package/{dist/ezeep/p-DhXN1yGM.system.js → www/build/p-CYpousxy.system.js} +2 -2
  119. package/www/build/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
  120. package/www/build/p-DCznw2Ee.system.js +1 -0
  121. package/www/build/p-a2b688f0.entry.js +1 -0
  122. package/www/data/locales/de.json +14 -5
  123. package/www/data/locales/en.json +14 -5
  124. package/www/index.html +2 -5
  125. package/dist/components/i18next.js +0 -1
  126. package/dist/ezeep/p-2177b8f4.system.entry.js +0 -7
  127. package/dist/ezeep/p-CfQRcOh8.system.js +0 -1
  128. package/dist/ezeep/p-de8f6583.entry.js +0 -1
  129. package/www/build/p-2177b8f4.system.entry.js +0 -7
  130. package/www/build/p-256870db.js +0 -1
  131. package/www/build/p-CfQRcOh8.system.js +0 -1
  132. package/www/build/p-de8f6583.entry.js +0 -1
@@ -1,4 +1,10 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ /**
3
+ * The "nothing selected" sentinel. Its empty `title` makes the toggle fall back
4
+ * to the placeholder (see render). Used as the initial state and to reset the
5
+ * selection when the current `preSelected` value has no matching option.
6
+ */
7
+ const EMPTY_SELECTION = { id: false, title: '', meta: '' };
2
8
  export class EzpSelect {
3
9
  constructor() {
4
10
  this.backdrop = document.createElement('ezp-backdrop');
@@ -28,7 +34,7 @@ export class EzpSelect {
28
34
  /** Description... */
29
35
  this.expanded = false;
30
36
  /** Description... */
31
- this.selected = { id: false, title: '', meta: '' };
37
+ this.selected = EMPTY_SELECTION;
32
38
  /**
33
39
  *
34
40
  * Private methods
@@ -48,6 +54,7 @@ export class EzpSelect {
48
54
  this.select = (id) => {
49
55
  var _a;
50
56
  const delay = ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) === id ? 0 : this.duration * 1000;
57
+ // The id always comes from an existing option, so a match is guaranteed.
51
58
  this.selected = this.options.find((option) => option.id === id);
52
59
  this.selectSelection.emit(this.selected);
53
60
  window.setTimeout(() => {
@@ -56,11 +63,67 @@ export class EzpSelect {
56
63
  };
57
64
  this.preSelect = () => {
58
65
  var _a;
59
- this.selected = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => typeof this.preSelected === 'number'
66
+ const match = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => typeof this.preSelected === 'number'
60
67
  ? option.id === this.preSelected
61
68
  : typeof this.preSelected === 'string'
62
69
  ? option.title === this.preSelected
63
70
  : null);
71
+ // Reset to the placeholder when the current printer has no matching option,
72
+ // rather than leaving the previous printer's (now-invalid) label showing.
73
+ this.selected = match !== null && match !== void 0 ? match : EMPTY_SELECTION;
74
+ };
75
+ // Open the list on Enter/Space/ArrowDown (moving focus to the first option);
76
+ // close it on Escape.
77
+ this.handleToggleKeydown = (event) => {
78
+ if (this.disabled)
79
+ return;
80
+ if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {
81
+ event.preventDefault();
82
+ if (!this.expanded) {
83
+ this.toggle();
84
+ // Focus the first option once the expanded list has rendered.
85
+ window.setTimeout(() => this.focusOption(0), 0);
86
+ }
87
+ }
88
+ else if (event.key === 'Escape' && this.expanded) {
89
+ this.toggle();
90
+ }
91
+ };
92
+ // Full listbox keyboard support: arrows/Home/End roam the options, Enter/Space
93
+ // selects, Escape closes and returns focus to the toggle.
94
+ this.handleOptionKeydown = (event, id) => {
95
+ var _a;
96
+ const options = this.getOptionElements();
97
+ const current = options.indexOf(event.currentTarget);
98
+ switch (event.key) {
99
+ case 'Enter':
100
+ case ' ':
101
+ event.preventDefault();
102
+ this.select(id);
103
+ break;
104
+ case 'ArrowDown':
105
+ event.preventDefault();
106
+ this.focusOption(current + 1);
107
+ break;
108
+ case 'ArrowUp':
109
+ event.preventDefault();
110
+ this.focusOption(current - 1);
111
+ break;
112
+ case 'Home':
113
+ event.preventDefault();
114
+ this.focusOption(0);
115
+ break;
116
+ case 'End':
117
+ event.preventDefault();
118
+ this.focusOption(options.length - 1);
119
+ break;
120
+ case 'Escape':
121
+ if (this.expanded) {
122
+ this.toggle();
123
+ (_a = this.toggleEl) === null || _a === void 0 ? void 0 : _a.focus();
124
+ }
125
+ break;
126
+ }
64
127
  };
65
128
  }
66
129
  /**
@@ -91,6 +154,15 @@ export class EzpSelect {
91
154
  preSelectedChanged() {
92
155
  this.preSelect();
93
156
  }
157
+ getOptionElements() {
158
+ return this.list ? Array.from(this.list.querySelectorAll('[role="option"]')) : [];
159
+ }
160
+ /** Move focus onto the option at `index` (clamped to the list bounds). */
161
+ focusOption(index) {
162
+ const options = this.getOptionElements();
163
+ const target = options[Math.max(0, Math.min(index, options.length - 1))];
164
+ target === null || target === void 0 ? void 0 : target.focus();
165
+ }
94
166
  /**
95
167
  *
96
168
  * Lifecycle methods
@@ -137,10 +209,10 @@ export class EzpSelect {
137
209
  this.disabled ? 'disabled' : '',
138
210
  ];
139
211
  const labelLevel = this.toggleFlow === 'horizontal' ? 'secondary' : 'tertiary';
140
- return (h(Host, { key: '83c7b61b1b9362a970ba6813a1bb5e906ee56141', class: hostClasses.join(' ') }, h("div", { key: 'df54f1cd115d4d7ca46c6d4719909747769a0b33', id: "wrap" }, h("div", { key: 'a5beb6bdb7918ee120f7e09b70a9e0cbcd15b309', id: "toggle", onClick: () => !this.disabled && this.toggle() }, this.icon ? h("ezp-icon", { id: "icon", name: this.icon }) : null, h("ezp-label", { key: '25e7315afd533ae3aeb6455aa95cfe9acb4f8448', id: "label", noWrap: true, level: labelLevel, text: this.label }), h("ezp-label", { key: 'ed4c2a0eb21930de52b1a1b5462d2e6fb78f4c0a', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), h("ezp-icon", { key: '46dacc59d23f3f8fb52181e6d23ac75ba4fd0ada', id: "accessory", name: "expand" })), h("div", { key: '0ca5ee65dc954ee6893e8f55b3529001654bb467', id: "list", ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
141
- var _a;
212
+ return (h(Host, { key: 'feebc96701d65827e984b1d75d9ef96974ae6df3', class: hostClasses.join(' ') }, h("div", { key: 'ef9d6ac76f626f74d0dfc0cff7e1747afae0df1b', id: "wrap" }, h("div", { key: '3a18e8c059d93be76f72b0244133b7dbddba5d0d', id: "toggle", role: "combobox", "aria-haspopup": "listbox", "aria-controls": "list", "aria-expanded": this.expanded ? 'true' : 'false', "aria-label": this.label, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, ref: (el) => (this.toggleEl = el), onClick: () => !this.disabled && this.toggle(), onKeyDown: this.handleToggleKeydown }, this.icon ? h("ezp-icon", { id: "icon", name: this.icon }) : null, h("ezp-label", { key: 'fda5f7c7f33343634df401890b1c580369273568', id: "label", noWrap: true, level: labelLevel, text: this.label }), h("ezp-label", { key: '2cad104bb14338efaf165c7edff5a7226b9f8a8c', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), h("ezp-icon", { key: 'e4e3a59e2ee36ee9d07232ca03e540b4e7dad6ba', id: "accessory", name: "expand" })), h("div", { key: '3f3c5bc0202985d4f64ba9df828c877df1240f6f', id: "list", role: "listbox", "aria-label": this.label, ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
213
+ var _a, _b;
142
214
  if (option.title !== '') {
143
- return (h("div", { class: `option ${option.id === ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) ? 'is-selected' : ''} ${option.meta !== '' ? 'has-meta' : ''} `, onClick: () => this.select(option.id) }, h("ezp-icon", { name: "checkmark", class: "indicator" }), h("div", { class: "details" }, h("ezp-label", { class: "title", ellipsis: true, text: option.title }), option.meta !== '' ? (h("ezp-label", { level: "tertiary", class: "meta", text: option.meta, ellipsis: true })) : null)));
215
+ return (h("div", { class: `option ${option.id === ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) ? 'is-selected' : ''} ${option.meta !== '' ? 'has-meta' : ''} `, role: "option", "aria-selected": option.id === ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.id) ? 'true' : 'false', tabindex: this.expanded ? 0 : -1, onClick: () => this.select(option.id), onKeyDown: (event) => this.handleOptionKeydown(event, option.id) }, h("ezp-icon", { name: "checkmark", class: "indicator" }), h("div", { class: "details" }, h("ezp-label", { class: "title", ellipsis: true, text: option.title }), option.meta !== '' ? (h("ezp-label", { level: "tertiary", class: "meta", text: option.meta, ellipsis: true })) : null)));
144
216
  }
145
217
  })))));
146
218
  }
@@ -163,7 +235,7 @@ export class EzpSelect {
163
235
  "mutable": false,
164
236
  "complexType": {
165
237
  "original": "IconNameTypes",
166
- "resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
238
+ "resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"cloud-upload\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"file\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
167
239
  "references": {
168
240
  "IconNameTypes": {
169
241
  "location": "import",
@@ -278,15 +350,15 @@ export class EzpSelect {
278
350
  "type": "any",
279
351
  "mutable": false,
280
352
  "complexType": {
281
- "original": "any",
282
- "resolved": "any",
353
+ "original": "string | number | null",
354
+ "resolved": "null | number | string",
283
355
  "references": {}
284
356
  },
285
357
  "required": false,
286
358
  "optional": false,
287
359
  "docs": {
288
360
  "tags": [],
289
- "text": "Description..."
361
+ "text": "The currently-selected option, matched by title (string) or id (number)."
290
362
  },
291
363
  "getter": false,
292
364
  "setter": false,
@@ -360,8 +432,8 @@ export class EzpSelect {
360
432
  "text": "\nEvents"
361
433
  },
362
434
  "complexType": {
363
- "original": "any",
364
- "resolved": "any",
435
+ "original": "boolean",
436
+ "resolved": "boolean",
365
437
  "references": {}
366
438
  }
367
439
  }, {
@@ -375,9 +447,16 @@ export class EzpSelect {
375
447
  "text": ""
376
448
  },
377
449
  "complexType": {
378
- "original": "any",
379
- "resolved": "any",
380
- "references": {}
450
+ "original": "SelectOptionType",
451
+ "resolved": "{ id: string | number | boolean; title: string; meta: string; type?: string | undefined; }",
452
+ "references": {
453
+ "SelectOptionType": {
454
+ "location": "import",
455
+ "path": "../../shared/types",
456
+ "id": "src/shared/types.d.ts::SelectOptionType",
457
+ "referenceLocation": "SelectOptionType"
458
+ }
459
+ }
381
460
  }
382
461
  }];
383
462
  }
@@ -29,15 +29,20 @@
29
29
  *
30
30
  */
31
31
  :host {
32
+ --ezp-status-gradient: linear-gradient(
33
+ 135deg,
34
+ color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%,
35
+ color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100%
36
+ );
32
37
  align-items: center;
33
38
  background: var(--ezp-core-backdrop);
34
- border-radius: var(--ezp-status-border-radius, 6px);
39
+ border-radius: var(--ezp-status-border-radius, 16px);
35
40
  box-sizing: border-box;
36
41
  display: flex;
37
42
  height: 100%;
38
43
  justify-content: center;
39
44
  left: 0;
40
- padding: var(--ezp-spacing-6);
45
+ padding: var(--ezp-spacing-5);
41
46
  position: absolute;
42
47
  top: 0;
43
48
  width: 100%;
@@ -49,24 +54,69 @@
49
54
  }
50
55
  }
51
56
 
57
+ *,
58
+ *::before,
59
+ *::after {
60
+ box-sizing: border-box;
61
+ }
62
+
52
63
  #box {
53
- --ezp-icon-fill: var(--ezp-theme-solid);
54
64
  align-items: center;
55
65
  background: var(--ezp-core-surface-tertiary);
56
- border-radius: 3px;
57
- box-shadow: var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-black-10));
66
+ border-radius: 16px;
67
+ box-shadow: var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));
58
68
  display: flex;
59
69
  flex-direction: column;
60
70
  gap: var(--ezp-spacing-4);
61
- padding: var(--ezp-spacing-4) var(--ezp-spacing-5);
71
+ max-width: 360px;
72
+ padding: var(--ezp-spacing-6) var(--ezp-spacing-5) var(--ezp-spacing-5);
73
+ text-align: center;
74
+ width: 100%;
75
+ }
76
+
77
+ /**
78
+ *
79
+ * Icon (haloed gradient badge)
80
+ *
81
+ */
82
+ #icon {
83
+ align-items: center;
84
+ background: var(--ezp-theme-translucent);
85
+ border-radius: 50%;
86
+ display: flex;
87
+ height: 132px;
88
+ justify-content: center;
89
+ margin-bottom: var(--ezp-spacing-2);
90
+ width: 132px;
91
+ }
92
+
93
+ #icon-inner {
94
+ align-items: center;
95
+ background: var(--ezp-status-gradient);
96
+ border-radius: 50%;
97
+ box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);
98
+ color: var(--ezp-white-100);
99
+ display: flex;
100
+ height: 84px;
101
+ justify-content: center;
102
+ width: 84px;
103
+ }
104
+ #icon-inner ezp-icon {
105
+ --ezp-icon-size: 40px;
106
+ --ezp-icon-gridTemplate: 40px;
62
107
  }
63
108
 
109
+ /**
110
+ *
111
+ * Processing spinner
112
+ *
113
+ */
64
114
  #indicator {
65
115
  animation: rotate var(--ezp-duration-6) linear infinite;
66
116
  display: block;
67
- height: 42px;
117
+ height: 48px;
68
118
  transform: rotate(0);
69
- width: 42px;
119
+ width: 48px;
70
120
  }
71
121
 
72
122
  #track {
@@ -85,13 +135,48 @@
85
135
  stroke-width: 4px;
86
136
  }
87
137
 
138
+ /**
139
+ *
140
+ * Text
141
+ *
142
+ */
88
143
  #description {
144
+ --ezp-label-fontSize: 22px;
145
+ --ezp-label-lineHeight: 28px;
89
146
  color: var(--ezp-core-foreground-primary);
90
147
  }
91
148
 
149
+ #subtext {
150
+ color: var(--ezp-core-foreground-secondary);
151
+ margin-top: calc(var(--ezp-spacing-4) * -1 + var(--ezp-spacing-2));
152
+ }
153
+
154
+ /**
155
+ *
156
+ * Footer
157
+ *
158
+ */
92
159
  #footer {
93
160
  display: flex;
94
- gap: var(--ezp-spacing-2);
161
+ gap: var(--ezp-spacing-3);
162
+ margin-top: var(--ezp-spacing-3);
163
+ width: 100%;
164
+ }
165
+
166
+ .action {
167
+ --ezp-textButton-borderRadius: 999px;
168
+ --ezp-textButton-padding: var(--ezp-spacing-4);
169
+ flex: 1;
170
+ }
171
+
172
+ ezp-text-button.action.primary {
173
+ --ezp-textButton-background-init: var(--ezp-status-gradient);
174
+ }
175
+
176
+ ezp-text-button.action.secondary {
177
+ --ezp-textButton-background-init: transparent;
178
+ --ezp-textButton-boxShadow: inset 0 0 0 1px var(--ezp-core-outline);
179
+ --ezp-textButton-color-init: var(--ezp-core-foreground-primary);
95
180
  }
96
181
 
97
182
  /**
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
+ import { subscribeToLanguageChange } from "../../utils/utils";
2
3
  import i18next from "i18next";
3
4
  export class EzpStatus {
4
5
  constructor() {
@@ -29,16 +30,25 @@ export class EzpStatus {
29
30
  * Lifecycle methods
30
31
  *
31
32
  */
32
- componentWillLoad() { }
33
+ connectedCallback() {
34
+ this.unsubscribeLanguage = subscribeToLanguageChange(this);
35
+ }
36
+ disconnectedCallback() {
37
+ var _a;
38
+ (_a = this.unsubscribeLanguage) === null || _a === void 0 ? void 0 : _a.call(this);
39
+ }
33
40
  /**
34
41
  *
35
42
  * Render method
36
43
  *
37
44
  */
38
45
  render() {
39
- return (h(Host, { key: 'e04ad6bd97cdcc28cd5b0bdf2d2ff6a33ceab129' }, h("div", { key: '4f725c25965dc80f1d1e68c0a6611e6b654853e4', id: "box" }, this.processing ? (h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg" }, h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (h("ezp-icon", { name: this.icon, framed: true })) : null, h("ezp-label", { key: '7ec34d3592bee4684d4907f630ae0b8220d87f5f', id: "description", level: "tertiary", weight: "strong", text: this.description }), (this.cancel || this.close || this.retry) && (h("div", { key: 'd726baeb1e9c7b3e8fa60a2801183e33fbaccc03', id: "footer" }, this.cancel && (h("ezp-text-button", { key: 'c2d85e5dd6506298e444691bd90644bc29fcbcc3', level: "secondary", small: true, onClick: this.handleCancel, label: typeof this.cancel === 'string'
46
+ return (
47
+ // Live region so screen readers announce status changes (loading,
48
+ // processing, success, error) as they render.
49
+ h(Host, { key: '5956a42fc8d74042fe88418c5f98011d0bf728c8', role: "status", "aria-live": "polite" }, h("div", { key: 'b1aebc3725a621c0e4474481064988167ca80328', id: "box" }, this.processing ? (h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (h("div", { id: "icon" }, h("div", { id: "icon-inner" }, h("ezp-icon", { name: this.icon })))) : null, h("ezp-label", { key: '34baad28a5ffc3fac42eef6a886ae52f772e3576', id: "description", weight: "heavy", text: this.description }), this.subtext && (h("ezp-label", { key: '321659cc9ae7a40f62c8fc6447556d1aa026a9dc', id: "subtext", level: "secondary", text: this.subtext })), (this.cancel || this.close || this.retry) && (h("div", { key: 'ce83d1db0aad512f282f1a2bbfbf112a3d2f7aed', id: "footer" }, this.cancel && (h("ezp-text-button", { key: '9eb72f9e158b1e2c6a4fd2d2755705c2041b67f5', class: "action secondary", level: "secondary", onClick: this.handleCancel, label: typeof this.cancel === 'string'
40
50
  ? this.cancel
41
- : i18next.t('button_actions.cancel') })), this.close && (h("ezp-text-button", { key: 'ac07d54b361c71d1bc2697f4b3477056a6d81cf3', level: this.retry ? 'secondary' : 'primary', small: true, onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : i18next.t('button_actions.close') })), this.retry && (h("ezp-text-button", { key: '4deb60cd315e298b822bb0ba74eed94776f20c82', level: "primary", small: true, onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : i18next.t('button_actions.retry') })))))));
51
+ : i18next.t('button_actions.cancel') })), this.close && (h("ezp-text-button", { key: '9a10f49011bf0f0cba24905e82574199837e122a', class: `action ${this.retry ? 'secondary' : 'primary'}`, level: this.retry ? 'secondary' : 'primary', onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : i18next.t('button_actions.close') })), this.retry && (h("ezp-text-button", { key: '2522cfae37af2c9e8800af545f04b986affac356', class: "action primary", level: "primary", onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : i18next.t('button_actions.retry') })))))));
42
52
  }
43
53
  static get is() { return "ezp-status"; }
44
54
  static get encapsulation() { return "shadow"; }
@@ -74,6 +84,25 @@ export class EzpStatus {
74
84
  "attribute": "description",
75
85
  "defaultValue": "'Description'"
76
86
  },
87
+ "subtext": {
88
+ "type": "string",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "string",
92
+ "resolved": "string | undefined",
93
+ "references": {}
94
+ },
95
+ "required": false,
96
+ "optional": true,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": ""
100
+ },
101
+ "getter": false,
102
+ "setter": false,
103
+ "reflect": false,
104
+ "attribute": "subtext"
105
+ },
77
106
  "processing": {
78
107
  "type": "boolean",
79
108
  "mutable": false,
@@ -118,7 +147,7 @@ export class EzpStatus {
118
147
  "mutable": false,
119
148
  "complexType": {
120
149
  "original": "IconNameTypes",
121
- "resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
150
+ "resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"cloud-upload\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"file\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\" | undefined",
122
151
  "references": {
123
152
  "IconNameTypes": {
124
153
  "location": "import",
@@ -144,7 +173,7 @@ export class EzpStatus {
144
173
  "mutable": false,
145
174
  "complexType": {
146
175
  "original": "string | boolean",
147
- "resolved": "boolean | string",
176
+ "resolved": "boolean | string | undefined",
148
177
  "references": {}
149
178
  },
150
179
  "required": false,
@@ -163,7 +192,7 @@ export class EzpStatus {
163
192
  "mutable": false,
164
193
  "complexType": {
165
194
  "original": "string | boolean",
166
- "resolved": "boolean | string",
195
+ "resolved": "boolean | string | undefined",
167
196
  "references": {}
168
197
  },
169
198
  "required": false,
@@ -182,7 +211,7 @@ export class EzpStatus {
182
211
  "mutable": false,
183
212
  "complexType": {
184
213
  "original": "string | boolean",
185
- "resolved": "boolean | string",
214
+ "resolved": "boolean | string | undefined",
186
215
  "references": {}
187
216
  },
188
217
  "required": false,
@@ -210,8 +239,8 @@ export class EzpStatus {
210
239
  "text": "\nEvents"
211
240
  },
212
241
  "complexType": {
213
- "original": "any",
214
- "resolved": "any",
242
+ "original": "string",
243
+ "resolved": "string",
215
244
  "references": {}
216
245
  }
217
246
  }, {
@@ -225,8 +254,8 @@ export class EzpStatus {
225
254
  "text": ""
226
255
  },
227
256
  "complexType": {
228
- "original": "any",
229
- "resolved": "any",
257
+ "original": "string",
258
+ "resolved": "string",
230
259
  "references": {}
231
260
  }
232
261
  }, {
@@ -240,8 +269,8 @@ export class EzpStatus {
240
269
  "text": ""
241
270
  },
242
271
  "complexType": {
243
- "original": "any",
244
- "resolved": "any",
272
+ "original": "string",
273
+ "resolved": "string",
245
274
  "references": {}
246
275
  }
247
276
  }];
@@ -30,28 +30,26 @@
30
30
  */
31
31
  :host {
32
32
  align-items: center;
33
- background: var(--ezp-core-surface-tertiary);
34
- border-radius: 3px;
35
- box-shadow: var(--ezp-stepper-boxShadowPosition, 0 0 0 1px) var(--ezp-core-outline);
33
+ background: transparent;
36
34
  display: grid;
37
35
  gap: var(--ezp-spacing-3);
38
- grid-template: var(--ezp-stepper-gridTemplate, auto/auto 1fr auto);
39
- padding: 0 var(--ezp-spacing-2) 0 var(--ezp-spacing-3);
36
+ grid-template: var(--ezp-stepper-gridTemplate, auto/1fr auto);
37
+ height: 56px;
38
+ padding: var(--ezp-spacing-2) var(--ezp-spacing-3);
40
39
  position: relative;
41
40
  z-index: 0;
42
41
  }
43
42
  :host(.focused) {
44
- --ezp-stepper-icon-color: var(--ezp-theme-solid);
45
- --ezp-stepper-label-color: var(--ezp-theme-solid);
43
+ --ezp-stepper-label-color: var(--ezp-core-foreground-primary);
46
44
  }
47
45
 
48
46
  :host(.has-icon) {
49
- --ezp-stepper-gridTemplate: auto / repeat(2, auto) 1fr auto;
47
+ --ezp-stepper-gridTemplate: auto / auto 1fr auto;
50
48
  }
51
49
 
52
50
  #toggle {
53
- background: var(--ezp-stepper-toggle-background, transparent);
54
- border-radius: 3px;
51
+ background: transparent;
52
+ border-radius: 12px;
55
53
  cursor: pointer;
56
54
  height: 100%;
57
55
  left: 0;
@@ -60,31 +58,22 @@
60
58
  width: 100%;
61
59
  z-index: -1;
62
60
  }
63
- @media (hover: hover) {
64
- #toggle:hover {
65
- --ezp-stepper-toggle-background: var(--ezp-core-shade-primary);
66
- }
67
- }
68
61
 
69
62
  #icon {
70
- color: var(--ezp-stepper-icon-color, var(--ezp-core-foreground-secondary));
63
+ --ezp-icon-background: var(--ezp-theme-translucent);
64
+ --ezp-icon-borderRadius: 50%;
65
+ --ezp-icon-height: 40px;
66
+ --ezp-icon-width: 40px;
67
+ color: var(--ezp-stepper-icon-color, var(--ezp-theme-solid));
71
68
  pointer-events: none;
72
69
  }
73
70
 
74
71
  #label {
75
- color: var(--ezp-stepper-label-color, var(--ezp-core-foreground-secondary));
72
+ color: var(--ezp-stepper-label-color, var(--ezp-core-foreground-primary));
76
73
  pointer-events: none;
77
74
  }
78
75
 
79
76
  #input {
80
- /**
81
- *
82
- * FIXME
83
- *
84
- * - adapt font properties
85
- * - hover / focus state
86
- *
87
- */
88
77
  -moz-appearance: textfield;
89
78
  appearance: none;
90
79
  background: transparent;
@@ -93,19 +82,20 @@
93
82
  box-shadow: none;
94
83
  box-sizing: border-box;
95
84
  color: var(--ezp-core-foreground-primary);
96
- cursor: inherit;
85
+ cursor: text;
97
86
  font-family: inherit;
98
87
  font-feature-settings: "tnum";
99
- font-size: 14px;
88
+ font-size: 16px;
89
+ font-weight: 600;
100
90
  -webkit-font-smoothing: antialiased;
101
91
  height: 30px;
102
- letter-spacing: -0.0062235443em;
92
+ letter-spacing: -0.0109597786em;
103
93
  margin: 0;
94
+ min-width: 28px;
104
95
  outline: none;
105
96
  padding: 0;
106
- pointer-events: none;
107
- text-align: right;
108
- width: 100%;
97
+ text-align: center;
98
+ width: 28px;
109
99
  }
110
100
 
111
101
  #input::-webkit-outer-spin-button,
@@ -115,33 +105,45 @@
115
105
  }
116
106
 
117
107
  .buttons {
108
+ align-items: center;
118
109
  display: flex;
110
+ gap: var(--ezp-spacing-3);
119
111
  }
120
112
 
121
113
  .button {
122
114
  align-items: center;
123
115
  appearance: none;
124
116
  background: var(--ezp-stepper-button-background, transparent);
125
- border: 0;
117
+ border: 1px solid var(--ezp-stepper-button-border, var(--ezp-core-outline));
126
118
  border-radius: 50%;
127
119
  box-shadow: none;
128
- color: var(--ezp-stepper-button-color, var(--ezp-theme-solid));
120
+ color: var(--ezp-stepper-button-color, var(--ezp-core-foreground-secondary));
129
121
  cursor: var(--ezp-stepper-button-cursor, pointer);
130
122
  display: flex;
123
+ height: 32px;
131
124
  justify-content: center;
132
125
  margin: 0;
133
126
  outline: none;
134
- padding: var(--ezp-spacing-1);
127
+ padding: 0;
128
+ transition: background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);
129
+ width: 32px;
130
+ }
131
+ .button ezp-icon {
132
+ --ezp-icon-size: 16px;
133
+ --ezp-icon-gridTemplate: 16px;
135
134
  }
136
135
  @media (hover: hover) {
137
136
  .button:not(:disabled):hover {
138
- --ezp-stepper-button-background: var(--ezp-core-shade-primary);
137
+ --ezp-stepper-button-background: var(--ezp-theme-translucent);
138
+ --ezp-stepper-button-border: var(--ezp-theme-solid);
139
+ --ezp-stepper-button-color: var(--ezp-theme-solid);
139
140
  }
140
141
  .button:not(:disabled):active {
141
142
  --ezp-stepper-button-background: var(--ezp-core-shade-secondary);
142
143
  }
143
144
  }
144
145
  .button:disabled {
146
+ --ezp-stepper-button-border: var(--ezp-core-shade-primary);
145
147
  --ezp-stepper-button-color: var(--ezp-core-foreground-tertiary);
146
148
  --ezp-stepper-button-cursor: default;
147
149
  }