@uploadcare/file-uploader 1.13.1-alpha.0 → 1.13.2

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 (39) hide show
  1. package/abstract/l10nProcessor.d.ts.map +1 -1
  2. package/abstract/l10nProcessor.js +71 -58
  3. package/blocks/CameraSource/CameraSource.js +1 -1
  4. package/blocks/CloudImageEditor/src/EditorButtonControl.js +1 -1
  5. package/blocks/CloudImageEditor/src/EditorFilterControl.js +1 -1
  6. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -1
  7. package/blocks/CloudImageEditor/src/EditorToolbar.js +4 -0
  8. package/blocks/CloudImageEditor/src/css/common.css +4 -3
  9. package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +5 -1
  10. package/blocks/Copyright/copyright.css +1 -0
  11. package/blocks/ExternalSource/ExternalSource.js +1 -1
  12. package/blocks/FileItem/FileItem.js +4 -4
  13. package/blocks/Icon/Icon.d.ts.map +1 -1
  14. package/blocks/Icon/Icon.js +2 -0
  15. package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
  16. package/blocks/ProgressBar/ProgressBar.js +1 -2
  17. package/blocks/SourceList/SourceList.js +1 -1
  18. package/blocks/UploadList/UploadList.js +1 -1
  19. package/blocks/UrlSource/UrlSource.js +2 -2
  20. package/env.d.ts +1 -1
  21. package/env.js +1 -1
  22. package/index.ssr.d.ts +1 -1
  23. package/index.ssr.d.ts.map +1 -1
  24. package/index.ssr.js +18 -14
  25. package/package.json +4 -9
  26. package/solutions/file-uploader/inline/FileUploaderInline.js +1 -1
  27. package/solutions/file-uploader/regular/FileUploaderRegular.js +1 -1
  28. package/web/file-uploader.iife.min.js +4 -4
  29. package/web/file-uploader.min.js +1 -1
  30. package/web/uc-basic.min.css +1 -1
  31. package/web/uc-cloud-image-editor.min.css +1 -1
  32. package/web/uc-cloud-image-editor.min.js +1 -1
  33. package/web/uc-file-uploader-inline.min.css +1 -1
  34. package/web/uc-file-uploader-inline.min.js +1 -1
  35. package/web/uc-file-uploader-minimal.min.css +1 -1
  36. package/web/uc-file-uploader-minimal.min.js +1 -1
  37. package/web/uc-file-uploader-regular.min.css +1 -1
  38. package/web/uc-file-uploader-regular.min.js +1 -1
  39. package/web/uc-img.min.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"l10nProcessor.d.ts","sourceRoot":"","sources":["l10nProcessor.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wEAHW,gBAAgB,kBAyE1B"}
1
+ {"version":3,"file":"l10nProcessor.d.ts","sourceRoot":"","sources":["l10nProcessor.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wEAHW,gBAAgB,kBAe1B"}
@@ -13,68 +13,81 @@ export function l10nProcessor(fr, fnCtx) {
13
13
  if (!key) {
14
14
  return;
15
15
  }
16
- let elProp = 'textContent';
17
- let useAttribute = false;
18
- if (key.includes(':')) {
19
- const arr = key.split(':');
20
- elProp = arr[0];
21
- key = arr[1];
22
- if (elProp.startsWith('@')) {
23
- elProp = elProp.slice(1);
24
- useAttribute = true;
25
- }
26
- }
16
+ const list = key.split(';');
27
17
 
28
- // Check if the key is present in the local context
29
- const localCtxKey = key;
30
- if (fnCtx.has(localCtxKey)) {
31
- fnCtx.sub(localCtxKey, (mappedKey) => {
32
- if (!mappedKey) {
33
- return;
34
- }
35
- // Store the subscription in a temporary map to be able to unsubscribe later
36
- if (!fnCtx.l10nProcessorSubs.has(localCtxKey)) {
37
- fnCtx.l10nProcessorSubs.set(localCtxKey, new Set());
38
- }
39
- const keySubs = fnCtx.l10nProcessorSubs.get(localCtxKey);
40
- keySubs?.forEach(
41
- /** @param {{ remove: () => void }} sub */
42
- (sub) => {
43
- sub.remove();
44
- keySubs.delete(sub);
45
- fnCtx.allSubs.delete(sub);
46
- },
47
- );
48
- // We don't need the leading * in the key because we use the key as a local context key relative to the global state
49
- const nodeStateKey = localeStateKey(mappedKey).replace('*', '');
50
- // If the key is not present in the node context, add it
51
- if (!fnCtx.nodeCtx.has(nodeStateKey)) {
52
- fnCtx.nodeCtx.add(nodeStateKey, mappedKey);
53
- }
54
- // Subscribe on the global l10n key change
55
- const sub = fnCtx.nodeCtx.sub(nodeStateKey, () => {
56
- el[/** @type {'textContent'} */ (elProp)] = fnCtx.l10n(mappedKey);
57
- });
58
- keySubs?.add(sub);
59
- // Store the subscription in the global context to make able Symbiote to unsubscribe it on destroy
60
- fnCtx.allSubs.add(sub);
61
- el.removeAttribute('l10n');
62
- });
18
+ for (const item of list) {
19
+ if (item) locale(el, item, fnCtx);
63
20
  }
21
+ });
22
+ }
64
23
 
65
- // Otherwise, assume the key is in the global context
66
- const stateKey = localeStateKey(key);
67
- if (!fnCtx.has(stateKey)) {
68
- fnCtx.add(stateKey, '');
24
+ /**
25
+ * @param {Element} el
26
+ * @param {string} key
27
+ * @param {any} fnCtx
28
+ */
29
+ const locale = (el, key, fnCtx) => {
30
+ let elProp = 'textContent';
31
+ let useAttribute = false;
32
+ if (key.includes(':')) {
33
+ const arr = key.split(':');
34
+ elProp = arr[0];
35
+ key = arr[1];
36
+ if (elProp.startsWith('@')) {
37
+ elProp = elProp.slice(1);
38
+ useAttribute = true;
69
39
  }
70
- fnCtx.sub(stateKey, () => {
71
- key = /** @type {string} */ (key);
72
- if (useAttribute) {
73
- el.setAttribute(elProp, fnCtx.l10n(key));
74
- } else {
75
- el[/** @type {'textContent'} */ (elProp)] = fnCtx.l10n(key);
40
+ }
41
+
42
+ // Check if the key is present in the local context
43
+ const localCtxKey = key;
44
+ if (fnCtx.has(localCtxKey)) {
45
+ fnCtx.sub(localCtxKey, (/** @type {string} */ mappedKey) => {
46
+ if (!mappedKey) {
47
+ return;
48
+ }
49
+ // Store the subscription in a temporary map to be able to unsubscribe later
50
+ if (!fnCtx.l10nProcessorSubs.has(localCtxKey)) {
51
+ fnCtx.l10nProcessorSubs.set(localCtxKey, new Set());
76
52
  }
53
+ const keySubs = fnCtx.l10nProcessorSubs.get(localCtxKey);
54
+ keySubs?.forEach(
55
+ /** @param {{ remove: () => void }} sub */
56
+ (sub) => {
57
+ sub.remove();
58
+ keySubs.delete(sub);
59
+ fnCtx.allSubs.delete(sub);
60
+ },
61
+ );
62
+ // We don't need the leading * in the key because we use the key as a local context key relative to the global state
63
+ const nodeStateKey = localeStateKey(mappedKey).replace('*', '');
64
+ // If the key is not present in the node context, add it
65
+ if (!fnCtx.nodeCtx.has(nodeStateKey)) {
66
+ fnCtx.nodeCtx.add(nodeStateKey, mappedKey);
67
+ }
68
+ // Subscribe on the global l10n key change
69
+ const sub = fnCtx.nodeCtx.sub(nodeStateKey, () => {
70
+ el[/** @type {'textContent'} */ (elProp)] = fnCtx.l10n(mappedKey);
71
+ });
72
+ keySubs?.add(sub);
73
+ // Store the subscription in the global context to make able Symbiote to unsubscribe it on destroy
74
+ fnCtx.allSubs.add(sub);
75
+ el.removeAttribute('l10n');
77
76
  });
78
- el.removeAttribute('l10n');
77
+ }
78
+
79
+ // Otherwise, assume the key is in the global context
80
+ const stateKey = localeStateKey(key);
81
+ if (!fnCtx.has(stateKey)) {
82
+ fnCtx.add(stateKey, '');
83
+ }
84
+ fnCtx.sub(stateKey, () => {
85
+ key = /** @type {string} */ (key);
86
+ if (useAttribute) {
87
+ el.setAttribute(elProp, fnCtx.l10n(key));
88
+ } else {
89
+ el[/** @type {'textContent'} */ (elProp)] = fnCtx.l10n(key);
90
+ }
79
91
  });
80
- }
92
+ el.removeAttribute('l10n');
93
+ };
@@ -844,7 +844,7 @@ CameraSource.template = /* HTML */ `
844
844
  type="button"
845
845
  class="uc-mini-btn uc-close-btn"
846
846
  set="onclick: *closeModal"
847
- l10n="@title:a11y-activity-header-button-close"
847
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
848
848
  >
849
849
  <uc-icon name="close"></uc-icon>
850
850
  </button>
@@ -38,7 +38,7 @@ export class EditorButtonControl extends Block {
38
38
  }
39
39
 
40
40
  EditorButtonControl.template = /* HTML */ `
41
- <button type="button" role="option" l10n="@title:title-prop">
41
+ <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">
42
42
  <uc-icon set="@name: icon;"></uc-icon>
43
43
  <div class="uc-title" ref="title-el">{{title}}</div>
44
44
  </button>
@@ -164,7 +164,7 @@ export class EditorFilterControl extends EditorButtonControl {
164
164
  }
165
165
 
166
166
  EditorFilterControl.template = /* HTML */ `
167
- <button type="button" role="option" l10n="@title:title-prop">
167
+ <button type="button" role="option" l10n="@title:title-prop;@aria-label:title-prop">
168
168
  <div class="uc-preview" ref="preview-el"></div>
169
169
  <uc-icon ref="icon-el" set="@name: icon; @size: iconSize;"></uc-icon>
170
170
  </button>
@@ -1 +1 @@
1
- {"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["EditorToolbar.js"],"names":[],"mappings":"AA2DA;IAII;;QAGE,qDAAqD;8BAA1C,OAAO,YAAY,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuDjD,4BAA4B;2BAAhB,UAAU;;;;;;;MAgBvB;IAED,eAAe;IAEf,6BAAsE;IAGxE,eAAe;IACf,uBAKC;IAED;;;OAGG;IACH,gCAKC;IAED;;;OAGG;IACH,6BAKC;IAED;;;OAGG;IACH,6BAKC;IAED;;;OAGG;IACH,4BAoCC;IAED;;;;OAIG;IACH,qBAyBC;IAED;;;OAGG;IACH,4BAKC;IAED,eAAe;IACf,0BAIC;IAED,eAAe;IACf,4BAWC;IALG,oBAGC;IAIL;;;OAGG;IACH,oBAEC;IAED;;MAwBM;CAiFP;;;;sBAlZqB,4BAA4B"}
1
+ {"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["EditorToolbar.js"],"names":[],"mappings":"AA2DA;IAII;;QAGE,qDAAqD;8BAA1C,OAAO,YAAY,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuDjD,4BAA4B;2BAAhB,UAAU;;;;;;;MAgBvB;IAED,eAAe;IAEf,6BAAsE;IAGxE,eAAe;IACf,uBAKC;IAED;;;OAGG;IACH,gCAKC;IAED;;;OAGG;IACH,6BAKC;IAED;;;OAGG;IACH,6BAKC;IAED;;;OAGG;IACH,4BAoCC;IAED;;;;OAIG;IACH,qBAyBC;IAED;;;OAGG;IACH,4BAKC;IAED,eAAe;IACf,0BAIC;IAED,eAAe;IACf,4BAWC;IALG,oBAGC;IAIL;;;OAGG;IACH,oBAEC;IAED;;MAwBM;CAqFP;;;;sBAtZqB,4BAA4B"}
@@ -402,6 +402,10 @@ export class EditorToolbar extends Block {
402
402
 
403
403
  this._updateInfoTooltip();
404
404
  }
405
+
406
+ destroyCallback() {
407
+ this.$['*showSlider'] = false;
408
+ }
405
409
  }
406
410
 
407
411
  EditorToolbar.template = /* HTML */ `
@@ -17,7 +17,9 @@
17
17
  --size-ui-min-width: 130px;
18
18
  --size-line-width: 1px;
19
19
  --size-modal-width: 650px;
20
- --size-icon: calc(var(--uc-button-size) / 2); /* TODO: remove icon size overrides */
20
+ --size-icon: calc(var(--uc-button-size) / 2);
21
+
22
+ /* TODO: remove icon size overrides */
21
23
 
22
24
  --border-radius-editor: var(--uc-radius);
23
25
  --border-radius-thumb: var(--uc-radius);
@@ -365,7 +367,6 @@ uc-editor-operation-control > button {
365
367
  height: var(--l-base-height);
366
368
  color: var(--color-effect);
367
369
  opacity: var(--opacity-effect);
368
- outline: none;
369
370
  cursor: pointer;
370
371
  transition: var(--l-width-transition);
371
372
  }
@@ -882,7 +883,6 @@ uc-btn-ui > button {
882
883
  background-color: var(--background-effect);
883
884
  border-radius: var(--uc-radius);
884
885
  opacity: var(--opacity-effect);
885
- outline: none;
886
886
  cursor: pointer;
887
887
  filter: brightness(var(--filter-effect));
888
888
  transition: var(--l-transition-effect);
@@ -1188,5 +1188,6 @@ uc-presence-toggle.uc-initial {
1188
1188
 
1189
1189
  [uc-cloud-image-editor] [role='button']:focus-visible,
1190
1190
  [uc-cloud-image-editor] button:focus-visible {
1191
+ outline: 1px auto Highlight;
1191
1192
  outline: 1px auto -webkit-focus-ring-color;
1192
1193
  }
@@ -88,7 +88,11 @@ export class BtnUi extends Block {
88
88
  BtnUi.bindAttributes({ text: 'text', icon: 'icon', reverse: 'reverse', theme: 'theme' });
89
89
 
90
90
  BtnUi.template = /* HTML */ `
91
- <button type="button" set="@role:aria-role; @aria-controls: aria-controls;" l10n="@title:title-prop">
91
+ <button
92
+ type="button"
93
+ set="@role:aria-role; @aria-controls: aria-controls; @aria-label:title-prop"
94
+ l10n="@title:title-prop;"
95
+ >
92
96
  <uc-icon set="className: iconCss; @name: icon; @hidden: !icon"></uc-icon>
93
97
  <div class="uc-text">{{text}}</div>
94
98
  </button>
@@ -22,6 +22,7 @@ uc-copyright .uc-credits {
22
22
  }
23
23
 
24
24
  uc-copyright .uc-credits:focus-visible {
25
+ outline: 1px auto Highlight;
25
26
  outline: 1px auto -webkit-focus-ring-color;
26
27
  }
27
28
 
@@ -274,7 +274,7 @@ ExternalSource.template = /* HTML */ `
274
274
  type="button"
275
275
  class="uc-mini-btn uc-close-btn"
276
276
  set="onclick: *historyBack"
277
- l10n="@title:a11y-activity-header-button-close"
277
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
278
278
  >
279
279
  <uc-icon name="close"></uc-icon>
280
280
  </button>
@@ -450,15 +450,15 @@ FileItem.template = /* HTML */ `
450
450
  <uc-icon set="@name: badgeIcon"></uc-icon>
451
451
  </div>
452
452
  </div>
453
- <div aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">
454
- <span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
453
+ <div aria-atomic="true" aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">
454
+ <span class="uc-file-name">{{itemName}}</span>
455
455
  <span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
456
456
  <span class="uc-file-hint" set="@hidden: !hint">{{hint}}</span>
457
457
  </div>
458
458
  <div class="uc-file-actions">
459
459
  <button
460
460
  type="button"
461
- l10n="@title:file-item-edit-button"
461
+ l10n="@title:file-item-edit-button;@aria-label:file-item-edit-button"
462
462
  class="uc-edit-btn uc-mini-btn"
463
463
  set="onclick: onEdit; @hidden: !isEditable"
464
464
  >
@@ -466,7 +466,7 @@ FileItem.template = /* HTML */ `
466
466
  </button>
467
467
  <button
468
468
  type="button"
469
- l10n="@title:file-item-remove-button"
469
+ l10n="@title:file-item-remove-button;@aria-label:file-item-remove-button"
470
470
  class="uc-remove-btn uc-mini-btn"
471
471
  set="onclick: onRemove;"
472
472
  >
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":"AAGA;IAII;;;MAIC;CAmBJ;;;;sBA7BqB,yBAAyB"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":"AAGA;IAII;;;MAIC;CAqBJ;;;;sBA/BqB,yBAAyB"}
@@ -27,6 +27,8 @@ export class Icon extends Block {
27
27
  this.$.href = iconHref;
28
28
  });
29
29
  });
30
+
31
+ this.setAttribute('aria-hidden', 'true');
30
32
  }
31
33
  }
32
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["ProgressBar.js"],"names":[],"mappings":"AAEA;IACE,qBAAqB;IACrB,eAAW;IAEX,sBAAsB;IACtB,kBAAgB;IAEhB,WAIE;CA+CH;;;;sBA5DqB,yBAAyB"}
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["ProgressBar.js"],"names":[],"mappings":"AAEA;IACE,qBAAqB;IACrB,eAAW;IAEX,sBAAsB;IACtB,kBAAgB;IAEhB,WAIE;CA8CH;;;;sBA3DqB,yBAAyB"}
@@ -16,11 +16,10 @@ export class ProgressBar extends Block {
16
16
  initCallback() {
17
17
  super.initCallback();
18
18
  this.defineAccessor('value', (value) => {
19
- if (!value) return;
19
+ if (value === undefined || value === null) return;
20
20
  const prevValue = this._value;
21
21
  this._value = value;
22
22
  if (!this._visible) return;
23
-
24
23
  if (value === 100) {
25
24
  this.ref.realProgressLine.addEventListener(
26
25
  'transitionend',
@@ -18,7 +18,7 @@ export class SourceList extends Block {
18
18
  return;
19
19
  }
20
20
 
21
- html += /* HTML */ `<uc-source-btn type="${srcName}"></uc-source-btn>`;
21
+ html += /* HTML */ `<uc-source-btn role="listitem" type="${srcName}"></uc-source-btn>`;
22
22
  });
23
23
 
24
24
  if (this.cfg.sourceListWrap) {
@@ -206,7 +206,7 @@ UploadList.template = /* HTML */ `
206
206
  type="button"
207
207
  class="uc-mini-btn uc-close-btn"
208
208
  set="onclick: *closeModal"
209
- l10n="@title:a11y-activity-header-button-close"
209
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
210
210
  >
211
211
  <uc-icon name="close"></uc-icon>
212
212
  </button>
@@ -38,7 +38,7 @@ export class UrlSource extends UploaderBlock {
38
38
 
39
39
  UrlSource.template = /* HTML */ `
40
40
  <uc-activity-header>
41
- <button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back">
41
+ <button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back;@aria-label:back">
42
42
  <uc-icon name="back"></uc-icon>
43
43
  </button>
44
44
  <div>
@@ -49,7 +49,7 @@ UrlSource.template = /* HTML */ `
49
49
  type="button"
50
50
  class="uc-mini-btn uc-close-btn"
51
51
  set="onclick: *closeModal"
52
- l10n="@title:a11y-activity-header-button-close"
52
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
53
53
  >
54
54
  <uc-icon name="close"></uc-icon>
55
55
  </button>
package/env.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /** Do not edit this file manually. It's generated during build process. */
2
2
  export const PACKAGE_NAME: "blocks";
3
- export const PACKAGE_VERSION: "1.13.0";
3
+ export const PACKAGE_VERSION: "1.13.2";
4
4
  //# sourceMappingURL=env.d.ts.map
package/env.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Do not edit this file manually. It's generated during build process. */
2
2
  export const PACKAGE_NAME = 'blocks';
3
- export const PACKAGE_VERSION = '1.13.0';
3
+ export const PACKAGE_VERSION = '1.13.2';
package/index.ssr.d.ts CHANGED
@@ -530,7 +530,7 @@ export const Modal: {
530
530
  bindAttributes: () => void;
531
531
  };
532
532
  export const PACKAGE_NAME: "blocks";
533
- export const PACKAGE_VERSION: "1.13.0";
533
+ export const PACKAGE_VERSION: "1.13.2";
534
534
  export const PresenceToggle: {
535
535
  new (): {};
536
536
  template: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.ssr.d.ts","sourceRoot":"","sources":["index.ssr.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;EAcE;AACF;;;;;;;;;;;;;;;EAcE;AACF;;;;;EAIE;AACF;;;;;;EAKE;AACF;;;;;;;;EAYE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0IE;AACF;;;;;;;;EAuCE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;EAuCE;AACF;;;;;;;EAsGE;AACF;;;;;;;EAaE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;EAeE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEE;AACF;;;;;;;EAWE;AACF;;;;;;;EAWE;AACF;;;;;;;EASE;AACF;;;;;;EAKE;AACF;;;;;;;EAWE;AACF;;;;;;;EAME;AACF;;;;;;;EAWE;AACF;;;;;;;EA2IE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEE;;;;;;;;;;;;;AAaF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkFE;AACF;;;;;;EAKE;AACF;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyEE;AACK,yCAAiC;AACjC,qCAA6B;AAC7B,6CAAqC;AACrC,oCAA4B"}
package/index.ssr.js CHANGED
@@ -42,7 +42,11 @@ export const Block = class {
42
42
  export const BtnUi = class {
43
43
  static observedAttributes = ["text", "icon", "reverse", "theme"];
44
44
  static template = `
45
- <button type="button" set="@role:aria-role; @aria-controls: aria-controls;" l10n="@title:title-prop">
45
+ <button
46
+ type="button"
47
+ set="@role:aria-role; @aria-controls: aria-controls; @aria-label:title-prop"
48
+ l10n="@title:title-prop;"
49
+ >
46
50
  <uc-icon set="className: iconCss; @name: icon; @hidden: !icon"></uc-icon>
47
51
  <div class="uc-text">{{text}}</div>
48
52
  </button>
@@ -71,7 +75,7 @@ export const CameraSource = class {
71
75
  type="button"
72
76
  class="uc-mini-btn uc-close-btn"
73
77
  set="onclick: *closeModal"
74
- l10n="@title:a11y-activity-header-button-close"
78
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
75
79
  >
76
80
  <uc-icon name="close"></uc-icon>
77
81
  </button>
@@ -524,7 +528,7 @@ export const DropArea = class {
524
528
  };
525
529
  export const EditorCropButtonControl = class {
526
530
  static template = `
527
- <button type="button" role="option" l10n="@title:title-prop">
531
+ <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">
528
532
  <uc-icon set="@name: icon;"></uc-icon>
529
533
  <div class="uc-title" ref="title-el">{{title}}</div>
530
534
  </button>
@@ -536,7 +540,7 @@ export const EditorCropButtonControl = class {
536
540
  };
537
541
  export const EditorFilterControl = class {
538
542
  static template = `
539
- <button type="button" role="option" l10n="@title:title-prop">
543
+ <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">
540
544
  <uc-icon set="@name: icon;"></uc-icon>
541
545
  <div class="uc-title" ref="title-el">{{title}}</div>
542
546
  </button>
@@ -564,7 +568,7 @@ export const EditorImageFader = class {
564
568
  };
565
569
  export const EditorOperationControl = class {
566
570
  static template = `
567
- <button type="button" role="option" l10n="@title:title-prop">
571
+ <button role="option" type="button" set="@aria-label:title-prop;" l10n="@title:title-prop;">
568
572
  <uc-icon set="@name: icon;"></uc-icon>
569
573
  <div class="uc-title" ref="title-el">{{title}}</div>
570
574
  </button>
@@ -740,7 +744,7 @@ export const ExternalSource = class {
740
744
  type="button"
741
745
  class="uc-mini-btn uc-close-btn"
742
746
  set="onclick: *historyBack"
743
- l10n="@title:a11y-activity-header-button-close"
747
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
744
748
  >
745
749
  <uc-icon name="close"></uc-icon>
746
750
  </button>
@@ -826,15 +830,15 @@ export const FileItem = class {
826
830
  <uc-icon set="@name: badgeIcon"></uc-icon>
827
831
  </div>
828
832
  </div>
829
- <div aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">
830
- <span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
833
+ <div aria-atomic="true" aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">
834
+ <span class="uc-file-name">{{itemName}}</span>
831
835
  <span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
832
836
  <span class="uc-file-hint" set="@hidden: !hint">{{hint}}</span>
833
837
  </div>
834
838
  <div class="uc-file-actions">
835
839
  <button
836
840
  type="button"
837
- l10n="@title:file-item-edit-button"
841
+ l10n="@title:file-item-edit-button;@aria-label:file-item-edit-button"
838
842
  class="uc-edit-btn uc-mini-btn"
839
843
  set="onclick: onEdit; @hidden: !isEditable"
840
844
  >
@@ -842,7 +846,7 @@ export const FileItem = class {
842
846
  </button>
843
847
  <button
844
848
  type="button"
845
- l10n="@title:file-item-remove-button"
849
+ l10n="@title:file-item-remove-button;@aria-label:file-item-remove-button"
846
850
  class="uc-remove-btn uc-mini-btn"
847
851
  set="onclick: onRemove;"
848
852
  >
@@ -1027,7 +1031,7 @@ export const Modal = class {
1027
1031
  static bindAttributes = () => {};
1028
1032
  };
1029
1033
  export const PACKAGE_NAME = `blocks`;
1030
- export const PACKAGE_VERSION = `1.13.0`;
1034
+ export const PACKAGE_VERSION = `1.13.2`;
1031
1035
  export const PresenceToggle = class {
1032
1036
  static template = `<slot></slot> `;
1033
1037
  static reg = () => {};
@@ -1345,7 +1349,7 @@ export const UploadList = class {
1345
1349
  type="button"
1346
1350
  class="uc-mini-btn uc-close-btn"
1347
1351
  set="onclick: *closeModal"
1348
- l10n="@title:a11y-activity-header-button-close"
1352
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
1349
1353
  >
1350
1354
  <uc-icon name="close"></uc-icon>
1351
1355
  </button>
@@ -1498,7 +1502,7 @@ export const UploaderBlock = class {
1498
1502
  export const UrlSource = class {
1499
1503
  static template = `
1500
1504
  <uc-activity-header>
1501
- <button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back">
1505
+ <button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back;@aria-label:back">
1502
1506
  <uc-icon name="back"></uc-icon>
1503
1507
  </button>
1504
1508
  <div>
@@ -1509,7 +1513,7 @@ export const UrlSource = class {
1509
1513
  type="button"
1510
1514
  class="uc-mini-btn uc-close-btn"
1511
1515
  set="onclick: *closeModal"
1512
- l10n="@title:a11y-activity-header-button-close"
1516
+ l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
1513
1517
  >
1514
1518
  <uc-icon name="close"></uc-icon>
1515
1519
  </button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/file-uploader",
3
- "version": "1.13.1-alpha.0",
3
+ "version": "1.13.2",
4
4
  "description": "Building blocks for Uploadcare products integration",
5
5
  "keywords": [
6
6
  "web components",
@@ -97,32 +97,27 @@
97
97
  "@babel/eslint-parser": "^7.23.3",
98
98
  "@babel/preset-env": "^7.21.4",
99
99
  "@esm-bundle/chai": "^4.3.4-fix.0",
100
- "@happy-dom/global-registrator": "^9.8.4",
101
- "@jam-do/jam-tools": "^0.0.4",
100
+ "@happy-dom/global-registrator": "^16.8.1",
102
101
  "@total-typescript/ts-reset": "^0.5.1",
103
102
  "@types/chai": "^4.3.4",
104
103
  "@types/mocha": "^10.0.1",
105
104
  "@types/node": "^18.15.11",
106
105
  "@types/react": "^18.2.34",
107
- "@web/dev-server": "^0.1.38",
108
- "@web/test-runner": "^0.15.3",
106
+ "@web/test-runner": "^0.19.0",
109
107
  "esbuild": "^0.19.9",
110
108
  "eslint": "^8.56.0",
111
109
  "eslint-config-prettier": "^9.1.0",
112
110
  "eslint-plugin-import": "^2.29.1",
113
- "highlight.js": "^11.7.0",
114
111
  "husky": "^8.0.3",
115
112
  "lint-staged": "^13.2.1",
116
- "marked": "^4.3.0",
117
113
  "node-watch": "^0.7.3",
118
114
  "npm-run-all": "^4.1.5",
119
115
  "playwright": "^1.49.1",
120
116
  "postcss": "^8.4.21",
121
117
  "prettier": "^3.2.4",
122
118
  "prettier-plugin-jsdoc": "1.3.0",
123
- "puppeteer": "^19.8.5",
124
119
  "rimraf": "^5.0.0",
125
- "shipjs": "^0.26.3",
120
+ "shipjs": "^0.27.0",
126
121
  "sinon": "^16.1.0",
127
122
  "stylelint": "^15.4.0",
128
123
  "stylelint-config-standard": "^32.0.0",
@@ -59,7 +59,7 @@ export class FileUploaderInline extends SolutionBlock {
59
59
  FileUploaderInline.template = /* HTML */ `
60
60
  <uc-start-from>
61
61
  <uc-drop-area with-icon clickable></uc-drop-area>
62
- <uc-source-list wrap></uc-source-list>
62
+ <uc-source-list role="list" wrap></uc-source-list>
63
63
  <button
64
64
  type="button"
65
65
  l10n="start-from-cancel"
@@ -46,7 +46,7 @@ FileUploaderRegular.template = /* HTML */ `
46
46
  <uc-modal strokes block-body-scrolling>
47
47
  <uc-start-from>
48
48
  <uc-drop-area with-icon clickable></uc-drop-area>
49
- <uc-source-list wrap></uc-source-list>
49
+ <uc-source-list role="list" wrap></uc-source-list>
50
50
  <button type="button" l10n="start-from-cancel" class="uc-secondary-btn" set="onclick: *historyBack"></button>
51
51
  <uc-copyright></uc-copyright>
52
52
  </uc-start-from>