@italia/upload 1.0.0-alpha.9 → 1.0.0-beta.0

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.
@@ -322,6 +322,16 @@
322
322
  "description": "Custom illustration URL. If not set, the built-in illustration is used.",
323
323
  "attribute": "illustration"
324
324
  },
325
+ {
326
+ "kind": "field",
327
+ "name": "headingLevel",
328
+ "type": {
329
+ "text": "DragDropHeadingLevel"
330
+ },
331
+ "default": "'h5'",
332
+ "description": "Heading level for the title element. Defaults to 'h5'; visual size stays at h5.",
333
+ "attribute": "heading-level"
334
+ },
325
335
  {
326
336
  "kind": "field",
327
337
  "name": "_currentFile",
@@ -395,6 +405,16 @@
395
405
  "privacy": "private",
396
406
  "default": "false"
397
407
  },
408
+ {
409
+ "kind": "method",
410
+ "name": "getHeadingLevel",
411
+ "privacy": "protected",
412
+ "return": {
413
+ "type": {
414
+ "text": "DragDropHeadingLevel"
415
+ }
416
+ }
417
+ },
398
418
  {
399
419
  "kind": "field",
400
420
  "name": "_formClass",
@@ -562,18 +582,6 @@
562
582
  }
563
583
  ],
564
584
  "events": [
565
- {
566
- "name": "it-dd-start",
567
- "type": {
568
- "text": "CustomEvent"
569
- }
570
- },
571
- {
572
- "name": "it-dd-drop",
573
- "type": {
574
- "text": "CustomEvent"
575
- }
576
- },
577
585
  {
578
586
  "name": "it-change",
579
587
  "type": {
@@ -597,6 +605,15 @@
597
605
  },
598
606
  "description": "Custom illustration URL. If not set, the built-in illustration is used.",
599
607
  "fieldName": "illustration"
608
+ },
609
+ {
610
+ "name": "heading-level",
611
+ "type": {
612
+ "text": "DragDropHeadingLevel"
613
+ },
614
+ "default": "'h5'",
615
+ "description": "Heading level for the title element. Defaults to 'h5'; visual size stays at h5.",
616
+ "fieldName": "headingLevel"
600
617
  }
601
618
  ],
602
619
  "superclass": {
@@ -1114,8 +1131,26 @@
1114
1131
  {
1115
1132
  "kind": "javascript-module",
1116
1133
  "path": "src/types.ts",
1117
- "declarations": [],
1118
- "exports": []
1134
+ "declarations": [
1135
+ {
1136
+ "kind": "variable",
1137
+ "name": "DRAG_DROP_HEADING_LEVELS",
1138
+ "type": {
1139
+ "text": "['h2', 'h3', 'h4', 'h5', 'h6']"
1140
+ },
1141
+ "default": "['h2', 'h3', 'h4', 'h5', 'h6']"
1142
+ }
1143
+ ],
1144
+ "exports": [
1145
+ {
1146
+ "kind": "js",
1147
+ "name": "DRAG_DROP_HEADING_LEVELS",
1148
+ "declaration": {
1149
+ "name": "DRAG_DROP_HEADING_LEVELS",
1150
+ "module": "src/types.ts"
1151
+ }
1152
+ }
1153
+ ]
1119
1154
  },
1120
1155
  {
1121
1156
  "kind": "javascript-module",
@@ -1247,7 +1282,7 @@
1247
1282
  "type": {
1248
1283
  "text": "Story"
1249
1284
  },
1250
- "default": "{ name: 'Esempio interattivo Drag & Drop', tags: ['!autodocs', '!dev'], args: { accept: '', illustration: '', disabled: false, required: false, }, argTypes: { accept: { description: 'Tipi di file accettati, es. \"image/*,.pdf\".', control: 'text', }, illustration: { description: 'URL illustrazione personalizzata. Se omesso viene usata quella predefinita.', control: 'text', }, disabled: { description: 'Disabilita il componente.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, required: { description: 'Rende il campo obbligatorio nella validazione del form.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, }, parameters: { docs: { canvas: { sourceState: 'closed' }, }, }, render: (params) => renderUploadDragDrop(params as Partial<UploadDragDropProps>), }"
1285
+ "default": "{ name: 'Esempio interattivo Drag & Drop', tags: ['!autodocs', '!dev'], args: { accept: '', illustration: '', disabled: false, required: false, 'heading-level': 'h3', }, argTypes: { accept: { description: 'Tipi di file accettati, es. \"image/*,.pdf\".', control: 'text', }, illustration: { description: 'URL illustrazione personalizzata. Se omesso viene usata quella predefinita.', control: 'text', }, 'heading-level': { description: 'Livello del titolo semantico nella gerarchia della pagina. La dimensione visiva rimane h5.', control: { type: 'select' }, options: DRAG_DROP_HEADING_LEVELS, table: { defaultValue: { summary: 'h5' } }, }, disabled: { description: 'Disabilita il componente.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, required: { description: 'Rende il campo obbligatorio nella validazione del form.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, }, parameters: { docs: { canvas: { sourceState: 'closed' }, }, }, render: (params) => renderUploadDragDrop(params as Partial<UploadDragDropProps>), }"
1251
1286
  },
1252
1287
  {
1253
1288
  "kind": "variable",
package/dist/src/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  export { ItUpload } from './it-upload.js';
2
2
  export { ItUploadAvatar } from './it-upload-avatar.js';
3
3
  export { ItUploadDragDrop } from './it-upload-drag-drop.js';
4
- import '../en-A2XDPVTm.js';
4
+ import '../en-DgpsXg7c.js';
5
5
  import 'lit/directive.js';
6
6
  import 'lit';
7
7
  import 'lit/decorators.js';
8
8
  import 'lit/directives/if-defined.js';
9
9
  import 'lit/directives/when.js';
10
10
  import '../utils-xlxkOHqp.js';
11
+ import 'lit/static-html.js';
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -31,7 +31,6 @@ export declare class ItUploadAvatar extends FormControl {
31
31
  private _currentFile;
32
32
  connectedCallback(): void;
33
33
  willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
34
- updated(changedProperties: Map<string | number | symbol, unknown>): void;
35
34
  private _handleFileChange;
36
35
  render(): import("lit").TemplateResult<1>;
37
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"it-upload-avatar.d.ts","sourceRoot":"","sources":["../../src/it-upload-avatar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAarE,qBACa,cAAe,SAAQ,WAAW;IAC7C,MAAM,CAAC,MAA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G,SAAM;IAET,6DAA6D;IAE7D,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAS;IAEvD,0CAA0C;IAE1C,MAAM,SAAa;IAEnB;;;OAGG;IAEH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,6CAA6C;IAE7C,QAAQ,UAAS;IAGjB,OAAO,CAAC,WAAW,CAAM;IAEzB,qEAAqE;IAErE,OAAO,CAAC,YAAY,CAAqB;IAEhC,iBAAiB;IAKjB,UAAU,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC;IAsB7E,OAAO,CAAC,iBAAiB;IA0BhB,MAAM;CAsDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -1,23 +1,10 @@
1
- import { r as registerTranslation, t as translation, a as translation$1, F as FormControl, _ as __decorate, b as __metadata, c as FormControlController } from '../en-A2XDPVTm.js';
1
+ import { r as registerTranslation, t as translation, a as translation$1, F as FormControl, _ as __decorate, b as __metadata, c as FormControlController } from '../en-DgpsXg7c.js';
2
2
  import { css, nothing, html } from 'lit';
3
3
  import { query, property, state, customElement } from 'lit/decorators.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
5
5
  import 'lit/directive.js';
6
6
 
7
7
  var styles = css`@charset "UTF-8";
8
- /***************************** 1 ****************************************/
9
- /***************************** 2 ****************************************/
10
- /***************************** 1 ****************************************/
11
- /***************************** 2 ****************************************/
12
- /***************************** 1 ****************************************/
13
- /***************************** 2 ****************************************/
14
- /***************************** 3 ****************************************/
15
- /***************************** 1 ****************************************/
16
- /***************************** 2 ****************************************/
17
- /***************************** 3 ****************************************/
18
- /***************************** NEUTRAL 1 ****************************************/
19
- /***************************** NEUTRAL 2 ****************************************/
20
- /***************************** NEUTRAL 2 / 3 ****************************************/
21
8
  *,
22
9
  *::before,
23
10
  *::after {
@@ -1030,186 +1017,6 @@ a .avatar:hover p {
1030
1017
  display: none;
1031
1018
  }
1032
1019
  }
1033
- .valid-feedback {
1034
- display: none;
1035
- width: 100%;
1036
- margin-top: 0.25rem;
1037
- font-size: 0.875rem;
1038
- color: hsl(160, 100%, 25%);
1039
- }
1040
-
1041
- .valid-tooltip {
1042
- position: absolute;
1043
- top: 100%;
1044
- z-index: 5;
1045
- display: none;
1046
- max-width: 100%;
1047
- padding: 1rem 1rem;
1048
- margin-top: 0.1rem;
1049
- font-size: 0.875rem;
1050
- color: hsl(0, 0%, 100%);
1051
- background-color: rgb(0, 127.5, 85);
1052
- border-radius: 4px;
1053
- }
1054
-
1055
- .was-validated :valid ~ .valid-feedback,
1056
- .was-validated :valid ~ .valid-tooltip,
1057
- .is-valid ~ .valid-feedback,
1058
- .is-valid ~ .valid-tooltip {
1059
- display: block;
1060
- }
1061
-
1062
- .was-validated .form-control:valid, .form-control.is-valid {
1063
- border-color: hsl(160, 100%, 25%);
1064
- padding-right: calc(1.5em + 0.75rem);
1065
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='hsl%28160, 100%, 25%%29' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
1066
- background-repeat: no-repeat;
1067
- background-position: right calc(0.375em + 0.1875rem) center;
1068
- background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
1069
- }
1070
- .was-validated .form-control:valid:focus, .form-control.is-valid:focus {
1071
- border-color: hsl(160, 100%, 25%);
1072
- box-shadow: 0 0 0 0.25rem rgba(0, 127.5, 85, 0.25);
1073
- }
1074
-
1075
- .was-validated textarea.form-control:valid, textarea.form-control.is-valid {
1076
- padding-right: calc(1.5em + 0.75rem);
1077
- background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
1078
- }
1079
-
1080
- .was-validated .form-select:valid, .form-select.is-valid {
1081
- border-color: hsl(160, 100%, 25%);
1082
- }
1083
- .was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] {
1084
- padding-right: 4.125rem;
1085
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='hsl%280, 0%, 15%%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='hsl%28160, 100%, 25%%29' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
1086
- background-position: right 0.75rem center, center right 2.25rem;
1087
- background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
1088
- }
1089
- .was-validated .form-select:valid:focus, .form-select.is-valid:focus {
1090
- border-color: hsl(160, 100%, 25%);
1091
- box-shadow: 0 0 0 0.25rem rgba(0, 127.5, 85, 0.25);
1092
- }
1093
-
1094
- .was-validated .form-control-color:valid, .form-control-color.is-valid {
1095
- width: calc(3rem + calc(1.5em + 0.75rem));
1096
- }
1097
-
1098
- .was-validated .form-check-input:valid, .form-check-input.is-valid {
1099
- border-color: hsl(160, 100%, 25%);
1100
- }
1101
- .was-validated .form-check-input:valid:checked, .form-check-input.is-valid:checked {
1102
- background-color: hsl(160, 100%, 25%);
1103
- }
1104
- .was-validated .form-check-input:valid:focus, .form-check-input.is-valid:focus {
1105
- box-shadow: 0 0 0 0.25rem rgba(0, 127.5, 85, 0.25);
1106
- }
1107
- .was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label {
1108
- color: hsl(160, 100%, 25%);
1109
- }
1110
-
1111
- .form-check-inline .form-check-input ~ .valid-feedback {
1112
- margin-left: 0.5em;
1113
- }
1114
-
1115
- .was-validated .input-group > .form-control:not(:focus):valid, .input-group > .form-control:not(:focus).is-valid,
1116
- .was-validated .input-group > .form-select:not(:focus):valid,
1117
- .input-group > .form-select:not(:focus).is-valid,
1118
- .was-validated .input-group > .form-floating:not(:focus-within):valid,
1119
- .input-group > .form-floating:not(:focus-within).is-valid {
1120
- z-index: 3;
1121
- }
1122
-
1123
- .invalid-feedback {
1124
- display: none;
1125
- width: 100%;
1126
- margin-top: 0.25rem;
1127
- font-size: 0.875rem;
1128
- color: hsl(350, 60%, 50%);
1129
- }
1130
-
1131
- .invalid-tooltip {
1132
- position: absolute;
1133
- top: 100%;
1134
- z-index: 5;
1135
- display: none;
1136
- max-width: 100%;
1137
- padding: 1rem 1rem;
1138
- margin-top: 0.1rem;
1139
- font-size: 0.875rem;
1140
- color: hsl(0, 0%, 100%);
1141
- background-color: rgb(204, 51, 76.5);
1142
- border-radius: 4px;
1143
- }
1144
-
1145
- .was-validated :invalid ~ .invalid-feedback,
1146
- .was-validated :invalid ~ .invalid-tooltip,
1147
- .is-invalid ~ .invalid-feedback,
1148
- .is-invalid ~ .invalid-tooltip {
1149
- display: block;
1150
- }
1151
-
1152
- .was-validated .form-control:invalid, .form-control.is-invalid {
1153
- border-color: hsl(350, 60%, 50%);
1154
- padding-right: calc(1.5em + 0.75rem);
1155
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='hsl%28350, 60%, 50%%29'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='hsl%28350, 60%, 50%%29' stroke='none'/%3e%3c/svg%3e");
1156
- background-repeat: no-repeat;
1157
- background-position: right calc(0.375em + 0.1875rem) center;
1158
- background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
1159
- }
1160
- .was-validated .form-control:invalid:focus, .form-control.is-invalid:focus {
1161
- border-color: hsl(350, 60%, 50%);
1162
- box-shadow: 0 0 0 0.25rem rgba(204, 51, 76.5, 0.25);
1163
- }
1164
-
1165
- .was-validated textarea.form-control:invalid, textarea.form-control.is-invalid {
1166
- padding-right: calc(1.5em + 0.75rem);
1167
- background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
1168
- }
1169
-
1170
- .was-validated .form-select:invalid, .form-select.is-invalid {
1171
- border-color: hsl(350, 60%, 50%);
1172
- }
1173
- .was-validated .form-select:invalid:not([multiple]):not([size]), .was-validated .form-select:invalid:not([multiple])[size="1"], .form-select.is-invalid:not([multiple]):not([size]), .form-select.is-invalid:not([multiple])[size="1"] {
1174
- padding-right: 4.125rem;
1175
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='hsl%280, 0%, 15%%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='hsl%28350, 60%, 50%%29'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='hsl%28350, 60%, 50%%29' stroke='none'/%3e%3c/svg%3e");
1176
- background-position: right 0.75rem center, center right 2.25rem;
1177
- background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
1178
- }
1179
- .was-validated .form-select:invalid:focus, .form-select.is-invalid:focus {
1180
- border-color: hsl(350, 60%, 50%);
1181
- box-shadow: 0 0 0 0.25rem rgba(204, 51, 76.5, 0.25);
1182
- }
1183
-
1184
- .was-validated .form-control-color:invalid, .form-control-color.is-invalid {
1185
- width: calc(3rem + calc(1.5em + 0.75rem));
1186
- }
1187
-
1188
- .was-validated .form-check-input:invalid, .form-check-input.is-invalid {
1189
- border-color: hsl(350, 60%, 50%);
1190
- }
1191
- .was-validated .form-check-input:invalid:checked, .form-check-input.is-invalid:checked {
1192
- background-color: hsl(350, 60%, 50%);
1193
- }
1194
- .was-validated .form-check-input:invalid:focus, .form-check-input.is-invalid:focus {
1195
- box-shadow: 0 0 0 0.25rem rgba(204, 51, 76.5, 0.25);
1196
- }
1197
- .was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label {
1198
- color: hsl(350, 60%, 50%);
1199
- }
1200
-
1201
- .form-check-inline .form-check-input ~ .invalid-feedback {
1202
- margin-left: 0.5em;
1203
- }
1204
-
1205
- .was-validated .input-group > .form-control:not(:focus):invalid, .input-group > .form-control:not(:focus).is-invalid,
1206
- .was-validated .input-group > .form-select:not(:focus):invalid,
1207
- .input-group > .form-select:not(:focus).is-invalid,
1208
- .was-validated .input-group > .form-floating:not(:focus-within):invalid,
1209
- .input-group > .form-floating:not(:focus-within).is-invalid {
1210
- z-index: 4;
1211
- }
1212
-
1213
1020
  body {
1214
1021
  font-family: var(--bsi-font-sans);
1215
1022
  }
@@ -1592,10 +1399,6 @@ select.just-validate-success-field {
1592
1399
  display: inline-block;
1593
1400
  }
1594
1401
 
1595
- .it-form__control {
1596
- display: none;
1597
- }
1598
-
1599
1402
  input.upload-avatar {
1600
1403
  position: absolute;
1601
1404
  z-index: 1;
@@ -1741,12 +1544,18 @@ let ItUploadAvatar = class ItUploadAvatar extends FormControl {
1741
1544
  if (changedProperties.has('src') && !this._currentSrc) {
1742
1545
  this._currentSrc = this.src;
1743
1546
  }
1744
- }
1745
- updated(changedProperties) {
1746
- super.updated?.(changedProperties);
1747
- // Re-evaluate validity whenever the form value changes.
1748
- if (changedProperties.has('_currentFile') || changedProperties.has('_currentSrc')) {
1749
- this.handleValidationMessages();
1547
+ // Keep the displayed validation message in sync with the value here (pre-render) rather
1548
+ // than in updated(), so picking/clearing a file refreshes it without scheduling a second
1549
+ // render — avoids Lit's "scheduled an update after an update completed" warning. The native
1550
+ // `?required` attribute still drives checkValidity()/the constraint bubble. Guarded by
1551
+ // `hasUpdated` because `inputElement` only exists once the first render has produced the DOM.
1552
+ if (this.hasUpdated &&
1553
+ !this.customValidation &&
1554
+ (changedProperties.has('_currentFile') || changedProperties.has('_currentSrc'))) {
1555
+ const hasValue = Boolean(this._currentFile || this._currentSrc);
1556
+ const message = this.required && !hasValue ? this.$t('validityRequired') : '';
1557
+ this.inputElement?.setCustomValidity(message);
1558
+ this.validationMessage = message;
1750
1559
  }
1751
1560
  }
1752
1561
  _handleFileChange(e) {
@@ -1769,13 +1578,14 @@ let ItUploadAvatar = class ItUploadAvatar extends FormControl {
1769
1578
  composed: true,
1770
1579
  }));
1771
1580
  }
1772
- // Forward wrapper clicks to the hidden file input.
1773
- // If the click already originated from the label (which has a `for` association), skip to
1774
1581
  render() {
1775
1582
  const labelText = this.$t('upload_avatar_label');
1583
+ const fileInputLabel = this.required ? labelText : labelText;
1776
1584
  const overlayText = this.overlayLabel ?? this.$t('upload_avatar_overlay_label');
1777
- const proxyValue = this._currentSrc || this._currentFile?.name || '';
1585
+ // A pre-filled `src` or a freshly selected file both satisfy `required`.
1586
+ const hasValue = Boolean(this._currentFile || this._currentSrc);
1778
1587
  const isInvalid = this.formControlController.submittedOnce && this.validationMessage.length > 0;
1588
+ const feedbackId = `invalid-feedback-${this._id}`;
1779
1589
  return html `
1780
1590
  <div class="avatar-upload-wrapper size-${this.size}">
1781
1591
  <it-avatar
@@ -1789,11 +1599,15 @@ let ItUploadAvatar = class ItUploadAvatar extends FormControl {
1789
1599
  <div class="upload-avatar-container">
1790
1600
  <input
1791
1601
  type="file"
1792
- class="upload-avatar"
1602
+ class="upload-avatar it-form__control"
1793
1603
  id="${this._id}"
1794
1604
  accept="${this.accept}"
1795
1605
  ?disabled="${this.disabled}"
1796
- aria-label="${labelText}"
1606
+ ?required="${this.required && !hasValue}"
1607
+ aria-label="${fileInputLabel}"
1608
+ aria-required="${this.required ? 'true' : nothing}"
1609
+ aria-invalid="${isInvalid ? 'true' : nothing}"
1610
+ aria-describedby="${ifDefined(isInvalid ? feedbackId : undefined)}"
1797
1611
  @change="${this._handleFileChange}"
1798
1612
  />
1799
1613
  <label part="overlay-label" for="${this._id}" class="it-upload-avatar-label-container" aria-hidden="true">
@@ -1807,17 +1621,8 @@ let ItUploadAvatar = class ItUploadAvatar extends FormControl {
1807
1621
  </div>
1808
1622
  </div>
1809
1623
 
1810
- <!-- Hidden proxy input: drives native required/validity checking via FormControl base class -->
1811
- <input
1812
- type="text"
1813
- class="it-form__control"
1814
- .value="${proxyValue}"
1815
- ?required="${this.required}"
1816
- tabindex="-1"
1817
- aria-hidden="true"
1818
- />
1819
-
1820
1624
  <div
1625
+ id="${feedbackId}"
1821
1626
  class="invalid-feedback form-feedback form-text just-validate-error-label"
1822
1627
  role="alert"
1823
1628
  ?hidden=${!isInvalid}
@@ -1 +1 @@
1
- {"version":3,"file":"it-upload-avatar.js","sources":["../../../src/it-upload-avatar.ts"],"sourcesContent":["import { FormControl, FormControlController } from '@italia/globals';\nimport { registerTranslation } from '@italia/i18n';\nimport { html, nothing } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport it from './locales/it.js';\nimport en from './locales/en.js';\nimport styles from './upload-avatar.scss';\n\nregisterTranslation(it);\nregisterTranslation(en);\n\n@customElement('it-upload-avatar')\nexport class ItUploadAvatar extends FormControl {\n static styles = styles;\n\n static override shadowRootOptions = {\n ...FormControl.shadowRootOptions,\n delegatesFocus: true,\n };\n\n // Override the base FormControlController.\n // Value is the selected File, or falls back to the current src (pre-filled image satisfies required).\n protected override readonly formControlController: FormControlController = new FormControlController(this, {\n value: (el) => (el as ItUploadAvatar)._currentFile ?? ((el as ItUploadAvatar)._currentSrc || null),\n assumeInteractionOn: ['it-change'],\n });\n\n @query('.it-form__control')\n override inputElement!: HTMLInputElement;\n\n /** Current image source URL displayed in the avatar */\n @property({ type: String, reflect: true })\n src = '';\n\n /** Alt text for the current avatar image */\n @property({ type: String, reflect: true })\n alt = '';\n\n /** Size of the avatar. Accepts any BSI avatar size token. */\n @property({ type: String, reflect: true })\n size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' = 'xxl';\n\n /** Accepted file types, e.g. \"image/*\" */\n @property({ type: String })\n accept = 'image/*';\n\n /**\n * Text shown inside the desktop hover/focus overlay.\n * Defaults to the i18n key `upload_avatar_overlay_label` (\"Aggiorna\" / \"Update\").\n */\n @property({ type: String, attribute: 'overlay-label' })\n overlayLabel?: string;\n\n /** If true, the upload button is disabled */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @state()\n private _currentSrc = '';\n\n /** The currently selected File (null until a new file is chosen). */\n @state()\n private _currentFile: File | null = null;\n\n override connectedCallback() {\n super.connectedCallback?.();\n this._currentSrc = this.src;\n }\n\n override willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate?.(changedProperties);\n if (changedProperties.has('src') && !this._currentSrc) {\n this._currentSrc = this.src;\n }\n }\n\n override updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated?.(changedProperties);\n // Re-evaluate validity whenever the form value changes.\n if (changedProperties.has('_currentFile') || changedProperties.has('_currentSrc')) {\n this.handleValidationMessages();\n }\n }\n\n private _handleFileChange(e: Event) {\n const input = e.target as HTMLInputElement;\n const file = input.files?.[0];\n if (!file) return;\n\n this._currentFile = file;\n\n const reader = new FileReader();\n reader.onload = (event) => {\n this._currentSrc = event.target?.result as string;\n this.requestUpdate();\n };\n reader.readAsDataURL(file);\n\n // Reset the native input\n input.value = '';\n\n this.dispatchEvent(\n new CustomEvent('it-change', {\n detail: { file, name: this.name, id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n // Forward wrapper clicks to the hidden file input.\n // If the click already originated from the label (which has a `for` association), skip to\n\n override render() {\n const labelText = this.$t('upload_avatar_label');\n const overlayText = this.overlayLabel ?? this.$t('upload_avatar_overlay_label');\n const proxyValue = this._currentSrc || this._currentFile?.name || '';\n const isInvalid = this.formControlController.submittedOnce && this.validationMessage.length > 0;\n\n return html`\n <div class=\"avatar-upload-wrapper size-${this.size}\">\n <it-avatar\n type=\"image\"\n size=\"${this.size}\"\n src=\"${ifDefined(this._currentSrc || undefined)}\"\n alt=\"${this.alt}\"\n class=\"avatar-upload\"\n ></it-avatar>\n\n <div class=\"upload-avatar-container\">\n <input\n type=\"file\"\n class=\"upload-avatar\"\n id=\"${this._id!}\"\n accept=\"${this.accept}\"\n ?disabled=\"${this.disabled}\"\n aria-label=\"${labelText}\"\n @change=\"${this._handleFileChange}\"\n />\n <label part=\"overlay-label\" for=\"${this._id!}\" class=\"it-upload-avatar-label-container\" aria-hidden=\"true\">\n <it-icon name=\"it-camera\" size=\"sm\" color=\"inverse\" aria-hidden=\"true\"></it-icon>\n <span class=\"it-upload-avatar-label\">${overlayText}</span>\n </label>\n </div>\n\n <div class=\"avatar-upload-icon\" aria-hidden=\"true\">\n <it-icon name=\"it-camera\" size=\"${this.size === 'xl' ? 'xs' : 'sm'}\"></it-icon>\n </div>\n </div>\n\n <!-- Hidden proxy input: drives native required/validity checking via FormControl base class -->\n <input\n type=\"text\"\n class=\"it-form__control\"\n .value=\"${proxyValue}\"\n ?required=\"${this.required}\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n />\n\n <div\n class=\"invalid-feedback form-feedback form-text just-validate-error-label\"\n role=\"alert\"\n ?hidden=${!isInvalid}\n >\n ${isInvalid ? this.validationMessage : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-upload-avatar': ItUploadAvatar;\n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AA,cAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAOnB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;;AACjC,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAItB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;AAC1B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAGT,UAAA,CAAA;AADP,IAAA,KAAK,EAAE;;AACiB,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;AADP,IAAA,KAAK,EAAE;;AACiC,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAlD9B,cAAc,GAAA,UAAA,CAAA;IAD1B,aAAa,CAAC,kBAAkB;AACpB,CAAA,EAAA,cAAc,CA6J1B;;;;"}
1
+ {"version":3,"file":"it-upload-avatar.js","sources":["../../../src/it-upload-avatar.ts"],"sourcesContent":["import { FormControl, FormControlController } from '@italia/globals';\nimport { registerTranslation } from '@italia/i18n';\nimport { html, nothing } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport it from './locales/it.js';\nimport en from './locales/en.js';\nimport styles from './upload-avatar.scss';\n\nregisterTranslation(it);\nregisterTranslation(en);\n\n@customElement('it-upload-avatar')\nexport class ItUploadAvatar extends FormControl {\n static styles = styles;\n\n static override shadowRootOptions = {\n ...FormControl.shadowRootOptions,\n delegatesFocus: true,\n };\n\n // Override the base FormControlController.\n // Value is the selected File, or falls back to the current src (pre-filled image satisfies required).\n protected override readonly formControlController: FormControlController = new FormControlController(this, {\n value: (el) => (el as ItUploadAvatar)._currentFile ?? ((el as ItUploadAvatar)._currentSrc || null),\n assumeInteractionOn: ['it-change'],\n });\n\n @query('.it-form__control')\n override inputElement!: HTMLInputElement;\n\n /** Current image source URL displayed in the avatar */\n @property({ type: String, reflect: true })\n src = '';\n\n /** Alt text for the current avatar image */\n @property({ type: String, reflect: true })\n alt = '';\n\n /** Size of the avatar. Accepts any BSI avatar size token. */\n @property({ type: String, reflect: true })\n size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' = 'xxl';\n\n /** Accepted file types, e.g. \"image/*\" */\n @property({ type: String })\n accept = 'image/*';\n\n /**\n * Text shown inside the desktop hover/focus overlay.\n * Defaults to the i18n key `upload_avatar_overlay_label` (\"Aggiorna\" / \"Update\").\n */\n @property({ type: String, attribute: 'overlay-label' })\n overlayLabel?: string;\n\n /** If true, the upload button is disabled */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @state()\n private _currentSrc = '';\n\n /** The currently selected File (null until a new file is chosen). */\n @state()\n private _currentFile: File | null = null;\n\n override connectedCallback() {\n super.connectedCallback?.();\n this._currentSrc = this.src;\n }\n\n override willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate?.(changedProperties);\n if (changedProperties.has('src') && !this._currentSrc) {\n this._currentSrc = this.src;\n }\n // Keep the displayed validation message in sync with the value here (pre-render) rather\n // than in updated(), so picking/clearing a file refreshes it without scheduling a second\n // render — avoids Lit's \"scheduled an update after an update completed\" warning. The native\n // `?required` attribute still drives checkValidity()/the constraint bubble. Guarded by\n // `hasUpdated` because `inputElement` only exists once the first render has produced the DOM.\n if (\n this.hasUpdated &&\n !this.customValidation &&\n (changedProperties.has('_currentFile') || changedProperties.has('_currentSrc'))\n ) {\n const hasValue = Boolean(this._currentFile || this._currentSrc);\n const message = this.required && !hasValue ? this.$t('validityRequired') : '';\n this.inputElement?.setCustomValidity(message);\n this.validationMessage = message;\n }\n }\n\n private _handleFileChange(e: Event) {\n const input = e.target as HTMLInputElement;\n const file = input.files?.[0];\n if (!file) return;\n\n this._currentFile = file;\n\n const reader = new FileReader();\n reader.onload = (event) => {\n this._currentSrc = event.target?.result as string;\n this.requestUpdate();\n };\n reader.readAsDataURL(file);\n\n // Reset the native input\n input.value = '';\n\n this.dispatchEvent(\n new CustomEvent('it-change', {\n detail: { file, name: this.name, id: this.id },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n override render() {\n const labelText = this.$t('upload_avatar_label');\n const fileInputLabel = this.required ? labelText : labelText;\n const overlayText = this.overlayLabel ?? this.$t('upload_avatar_overlay_label');\n // A pre-filled `src` or a freshly selected file both satisfy `required`.\n const hasValue = Boolean(this._currentFile || this._currentSrc);\n const isInvalid = this.formControlController.submittedOnce && this.validationMessage.length > 0;\n const feedbackId = `invalid-feedback-${this._id}`;\n\n return html`\n <div class=\"avatar-upload-wrapper size-${this.size}\">\n <it-avatar\n type=\"image\"\n size=\"${this.size}\"\n src=\"${ifDefined(this._currentSrc || undefined)}\"\n alt=\"${this.alt}\"\n class=\"avatar-upload\"\n ></it-avatar>\n\n <div class=\"upload-avatar-container\">\n <input\n type=\"file\"\n class=\"upload-avatar it-form__control\"\n id=\"${this._id!}\"\n accept=\"${this.accept}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required && !hasValue}\"\n aria-label=\"${fileInputLabel}\"\n aria-required=\"${this.required ? 'true' : nothing}\"\n aria-invalid=\"${isInvalid ? 'true' : nothing}\"\n aria-describedby=\"${ifDefined(isInvalid ? feedbackId : undefined)}\"\n @change=\"${this._handleFileChange}\"\n />\n <label part=\"overlay-label\" for=\"${this._id!}\" class=\"it-upload-avatar-label-container\" aria-hidden=\"true\">\n <it-icon name=\"it-camera\" size=\"sm\" color=\"inverse\" aria-hidden=\"true\"></it-icon>\n <span class=\"it-upload-avatar-label\">${overlayText}</span>\n </label>\n </div>\n\n <div class=\"avatar-upload-icon\" aria-hidden=\"true\">\n <it-icon name=\"it-camera\" size=\"${this.size === 'xl' ? 'xs' : 'sm'}\"></it-icon>\n </div>\n </div>\n\n <div\n id=\"${feedbackId}\"\n class=\"invalid-feedback form-feedback form-text just-validate-error-label\"\n role=\"alert\"\n ?hidden=${!isInvalid}\n >\n ${isInvalid ? this.validationMessage : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-upload-avatar': ItUploadAvatar;\n }\n}\n"],"names":["it","en"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,EAAA,cAAc,CA+J1B;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { FormControl, FormControlController } from '@italia/globals';
2
+ import { type DragDropHeadingLevel } from './types.js';
2
3
  export declare class ItUploadDragDrop extends FormControl {
3
4
  static styles: import("lit").CSSResultGroup;
4
5
  protected readonly formControlController: FormControlController;
@@ -7,6 +8,8 @@ export declare class ItUploadDragDrop extends FormControl {
7
8
  accept?: string;
8
9
  /** Custom illustration URL. If not set, the built-in illustration is used. */
9
10
  illustration?: string;
11
+ /** Heading level for the title element. Defaults to 'h5'; visual size stays at h5. */
12
+ headingLevel: DragDropHeadingLevel;
10
13
  /** The currently selected File (null until file is chosen/dropped). */
11
14
  private _currentFile;
12
15
  private _state;
@@ -16,6 +19,7 @@ export declare class ItUploadDragDrop extends FormControl {
16
19
  private _fileType;
17
20
  private _indeterminate;
18
21
  private _autoStarted;
22
+ protected getHeadingLevel(): DragDropHeadingLevel;
19
23
  private get _formClass();
20
24
  /** Advance the donut progress. Value must be between 0 and 1. */
21
25
  progress(value: number): void;
@@ -1 +1 @@
1
- {"version":3,"file":"it-upload-drag-drop.d.ts","sourceRoot":"","sources":["../../src/it-upload-drag-drop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAqBrE,qBACa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,MAAM,+BAAU;IAGvB,mBAA4B,qBAAqB,EAAE,qBAAqB,CAGrE;IAGM,YAAY,EAAG,gBAAgB,CAAC;IAEzC,+CAA+C;IAE/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,8EAA8E;IAE9E,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,uEAAuE;IAEvE,OAAO,CAAC,YAAY,CAAqB;IAGzC,OAAO,CAAC,MAAM,CAAyB;IAGvC,OAAO,CAAC,SAAS,CAAK;IAGtB,OAAO,CAAC,SAAS,CAAM;IAGvB,OAAO,CAAC,WA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