@italia/upload 1.0.0-beta.0 → 1.0.0-beta.1

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.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # <it-upload>
2
+
3
+ This package is part of [dev-kit-italia](https://italia.github.io/dev-kit-italia), a Web Components kit for the **.italia** design-system.
4
+
5
+ ## Installation and usage
6
+
7
+ Most users want to install the full kit by installing [`@italia/dev-kit-italia`](https://npmjs.com/package/@italia/dev-kit-italia), but you have the option of installing this single Web Component separately if needed. Please find detailed installation and usage instructions in the [official documentation](https://italia.github.io/dev-kit-italia/?path=/docs/introduzione--documentazione).
8
+
9
+ ## Documentation
10
+
11
+ Find the usage instructions for this specific component in its [dedicated documentation page](https://italia.github.io/dev-kit-italia/?path=/docs/componenti-form-upload--documentazione).
@@ -1266,7 +1266,7 @@
1266
1266
  "type": {
1267
1267
  "text": "Story"
1268
1268
  },
1269
- "default": "{ name: 'Esempio interattivo', tags: ['!autodocs', '!dev'], args: { variant: 'default', multiple: false, 'image-preview': false, accept: '', 'support-text': '', disabled: false, required: false, 'auto-success': true, }, argTypes: { variant: { description: 'Layout del componente.', control: { type: 'select' }, options: ['default', 'gallery'], table: { defaultValue: { summary: 'default' } }, }, multiple: { description: 'Consente la selezione multipla di file.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, 'image-preview': { description: \"Mostra un'anteprima thumbnail per le immagini caricate.\", control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, accept: { description: 'Tipi di file accettati, es. \"image/*,.pdf\".', control: 'text', }, 'support-text': { description: 'Testo di supporto visualizzato sotto il pulsante.', 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' } }, }, 'auto-success': { description: 'I file passano automaticamente allo stato success appena selezionati.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, }, parameters: { docs: { canvas: { sourceState: 'closed' }, }, }, render: (params) => renderUpload(params as Partial<UploadProps>), }"
1269
+ "default": "{ name: 'Esempio interattivo', tags: ['!autodocs', '!dev'], args: { variant: 'default', multiple: false, 'image-preview': false, accept: '', 'support-text': '', disabled: false, required: false, 'auto-success': true, 'custom-validation': false, 'validity-message': '', }, argTypes: { variant: { description: 'Layout del componente.', control: { type: 'select' }, options: ['default', 'gallery'], table: { defaultValue: { summary: 'default' } }, }, multiple: { description: 'Consente la selezione multipla di file.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, 'image-preview': { description: \"Mostra un'anteprima thumbnail per le immagini caricate.\", control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, accept: { description: 'Tipi di file accettati, es. \"image/*,.pdf\".', control: 'text', }, 'support-text': { description: 'Testo di supporto visualizzato sotto il pulsante.', 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' } }, }, 'auto-success': { description: 'I file passano automaticamente allo stato success appena selezionati.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, 'custom-validation': { description: 'Attiva la validazione personalizzata. Se abilitato, disabilita la validazione nativa del browser.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, 'validity-message': { description: 'Messaggio di validazione personalizzato da mostrare quando custom-validation è attivo.', control: 'text', }, }, parameters: { docs: { canvas: { sourceState: 'closed' }, }, }, render: (params) => renderUpload(params as Partial<UploadProps>), }"
1270
1270
  },
1271
1271
  {
1272
1272
  "kind": "variable",
@@ -1274,7 +1274,7 @@
1274
1274
  "type": {
1275
1275
  "text": "Story"
1276
1276
  },
1277
- "default": "{ name: 'Esempio interattivo Avatar', tags: ['!autodocs', '!dev'], args: { src: 'https://randomuser.me/api/portraits/men/21.jpg', alt: 'Mario Rossi', size: 'xxl' as AvatarSize, disabled: false, required: false, }, argTypes: { src: { description: \"URL dell'immagine avatar corrente.\", control: 'text', }, alt: { description: \"Testo alternativo per l'immagine.\", control: 'text', }, size: { description: 'Dimensione del componente.', control: { type: 'select' }, options: ['xl', 'xxl'], table: { defaultValue: { summary: 'xxl' } }, }, disabled: { description: 'Disabilita il componente.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, required: { description: 'Rende il campo obbligatorio nella validazione del form. Se src è già valorizzato, il requisito è soddisfatto.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, }, parameters: { docs: { canvas: { sourceState: 'closed' }, }, }, render: (params) => renderUploadAvatar(params as Partial<UploadAvatarProps>), }"
1277
+ "default": "{ name: 'Esempio interattivo Avatar', tags: ['!autodocs', '!dev'], args: { src: 'https://randomuser.me/api/portraits/men/21.jpg', alt: 'Mario Rossi', size: 'xxl' as AvatarSize, disabled: false, required: false, 'custom-validation': false, 'validity-message': '', }, argTypes: { src: { description: \"URL dell'immagine avatar corrente.\", control: 'text', }, alt: { description: \"Testo alternativo per l'immagine.\", control: 'text', }, size: { description: 'Dimensione del componente.', control: { type: 'select' }, options: ['xl', 'xxl'], table: { defaultValue: { summary: 'xxl' } }, }, disabled: { description: 'Disabilita il componente.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, required: { description: 'Rende il campo obbligatorio nella validazione del form. Se src è già valorizzato, il requisito è soddisfatto.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, 'custom-validation': { description: 'Attiva la validazione personalizzata. Se abilitato, disabilita la validazione nativa del browser.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, 'validity-message': { description: 'Messaggio di validazione personalizzato da mostrare quando custom-validation è attivo.', control: 'text', }, }, parameters: { docs: { canvas: { sourceState: 'closed' }, }, }, render: (params) => renderUploadAvatar(params as Partial<UploadAvatarProps>), }"
1278
1278
  },
1279
1279
  {
1280
1280
  "kind": "variable",
@@ -1282,7 +1282,7 @@
1282
1282
  "type": {
1283
1283
  "text": "Story"
1284
1284
  },
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>), }"
1285
+ "default": "{ name: 'Esempio interattivo Drag & Drop', tags: ['!autodocs', '!dev'], args: { accept: '', illustration: '', disabled: false, required: false, 'heading-level': 'h3', 'custom-validation': false, 'validity-message': '', }, 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' } }, }, 'custom-validation': { description: 'Attiva la validazione personalizzata. Se abilitato, disabilita la validazione nativa del browser.', control: 'boolean', table: { defaultValue: { summary: 'false' } }, }, 'validity-message': { description: 'Messaggio di validazione personalizzato da mostrare quando custom-validation è attivo.', control: 'text', }, }, parameters: { docs: { canvas: { sourceState: 'closed' }, }, }, render: (params) => renderUploadDragDrop(params as Partial<UploadDragDropProps>), }"
1286
1286
  },
1287
1287
  {
1288
1288
  "kind": "variable",
package/dist/src/index.js CHANGED
@@ -1,7 +1,7 @@
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-DgpsXg7c.js';
4
+ import '../en-BVfEYZab.js';
5
5
  import 'lit/directive.js';
6
6
  import 'lit';
7
7
  import 'lit/decorators.js';
@@ -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,MAAM,+BAAU;IAEvB,OAAgB,iBAAiB;;;;;;;MAG/B;IAIF,mBAA4B,qBAAqB,EAAE,qBAAqB,CAGrE;IAGM,YAAY,EAAG,gBAAgB,CAAC;IAEzC,uDAAuD;IAEvD,GAAG,SAAM;IAET,4CAA4C;IAE5C,GAAG,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
+ {"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,MAAM,+BAAU;IAEvB,OAAgB,iBAAiB;;;;;;;MAG/B;IAIF,mBAA4B,qBAAqB,EAAE,qBAAqB,CAGrE;IAGM,YAAY,EAAG,gBAAgB,CAAC;IAEzC,uDAAuD;IAEvD,GAAG,SAAM;IAET,4CAA4C;IAE5C,GAAG,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;CAmDhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -1,4 +1,4 @@
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';
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-BVfEYZab.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';
@@ -771,6 +771,10 @@ a .avatar:hover p {
771
771
  overflow: hidden;
772
772
  }
773
773
 
774
+ .avatar-upload-wrapper {
775
+ position: relative;
776
+ display: inline-block;
777
+ }
774
778
  .avatar-upload-wrapper .avatar-upload-icon {
775
779
  position: absolute;
776
780
  right: 4px;
@@ -778,30 +782,23 @@ a .avatar:hover p {
778
782
  display: flex;
779
783
  align-items: center;
780
784
  justify-content: center;
781
- width: 26px;
782
- height: 26px;
785
+ width: 32px;
786
+ height: 32px;
783
787
  border: 2px solid var(--bsi-color-border-inverse);
784
788
  border-radius: 50%;
785
789
  background: hsl(210, 6.2290689886%, 92.535%);
786
790
  pointer-events: none;
787
- }
788
- .avatar-upload-wrapper .avatar-upload-icon > svg {
789
- width: 16px;
790
- height: 16px;
791
+ z-index: 1;
791
792
  }
792
793
  .avatar-upload-wrapper.size-sm .avatar {
793
794
  width: 80px;
794
795
  height: 80px;
795
796
  }
796
797
  .avatar-upload-wrapper.size-sm .avatar-upload-icon {
797
- right: 4px;
798
- bottom: 6px;
799
- width: 18px;
800
- height: 18px;
801
- }
802
- .avatar-upload-wrapper.size-sm .avatar-upload-icon > svg {
803
- width: 12px;
804
- height: 12px;
798
+ right: 6px;
799
+ bottom: 8px;
800
+ width: 24px;
801
+ height: 24px;
805
802
  }
806
803
 
807
804
  .upload-dragdrop {
@@ -1319,9 +1316,6 @@ blockquote.blockquote-card.dark .blockquote-footer,
1319
1316
  margin-top: 0.25rem;
1320
1317
  font-size: 0.75rem;
1321
1318
  }
1322
- .form-feedback.just-validate-error-label {
1323
- color: var(--bsi-color-text-danger);
1324
- }
1325
1319
 
1326
1320
  .input-group-text:has(~ [data-focus-mouse=true]:not(.btn)),
1327
1321
  [data-focus-mouse=true]:not(.btn) ~ .input-group-text,
@@ -1343,20 +1337,44 @@ button:has(~ .is-invalid),
1343
1337
  display: none;
1344
1338
  }
1345
1339
 
1346
- .just-validate-success-field {
1347
- border-color: var(--bsi-color-border-success) !important;
1340
+ .is-valid,
1341
+ .is-invalid {
1348
1342
  padding-right: calc(1.5em + 0.75rem) !important;
1349
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23008055' viewBox='0 0 192 512'%3E%3Cpath d='M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z'/%3E%3C/svg%3E");
1343
+ }
1344
+ .is-valid[type=number],
1345
+ .is-invalid[type=number] {
1346
+ padding-right: calc(1.5em + 0.75rem + var(--bsi-form-control-spacing) + 1rem) !important;
1347
+ }
1348
+
1349
+ .was-validated &:valid,
1350
+ .is-valid {
1351
+ border-color: var(--bsi-color-border-success) !important;
1352
+ background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="%23008055" xmlns="http://www.w3.org/2000/svg"><path d="M9.6,16.9L4,11.4l0.8-0.7l4.8,4.8l8.5-8.4l0.7,0.7L9.6,16.9z" /></svg>');
1353
+ }
1354
+ .was-validated &:valid ~ .warning-feedback,
1355
+ .is-valid ~ .warning-feedback {
1356
+ display: block;
1357
+ }
1358
+
1359
+ .was-validated &:invalid,
1360
+ .is-invalid {
1361
+ border-color: var(--bsi-color-border-danger) !important;
1362
+ background-image: url('data:image/svg+xml,<svg width="24" fill="%23cc334d" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.7,12l6.7,6.6l-0.8,0.8L12,12.7l-6.6,6.7l-0.8-0.8l6.7-6.6L4.6,5.4l0.8-0.8l6.6,6.7l6.6-6.7l0.8,0.8L12.7,12z" /></svg>');
1363
+ }
1364
+
1365
+ .form-control.warning {
1366
+ border-color: var(--bsi-color-border-warning) !important;
1367
+ background-image: url('data:image/svg+xml,<svg width="24" height="24" fill="%23995c00" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.5,17h-1V2h1V17z M12.5,20h-1v2h1V20z" /></svg>');
1350
1368
  }
1351
1369
 
1352
- .input-group-text:has(~ .just-validate-success-field),
1353
- .just-validate-success-field ~ .input-group-text,
1354
- button:has(~ .just-validate-success-field),
1355
- .just-validate-success-field + button {
1370
+ .input-group-text:has(~ .is-valid),
1371
+ .is-valid ~ .input-group-text,
1372
+ button:has(~ .is-valid),
1373
+ .is-valid + button {
1356
1374
  border-color: var(--bsi-color-border-success);
1357
1375
  }
1358
1376
 
1359
- .just-validate-success-field + .input-group-text.align-buttons,
1377
+ .is-valid + .input-group-text.align-buttons,
1360
1378
  .is-invalid + .input-group-text.align-buttons {
1361
1379
  right: 30px;
1362
1380
  }
@@ -1365,33 +1383,132 @@ button:has(~ .just-validate-success-field),
1365
1383
  bottom: 22px;
1366
1384
  }
1367
1385
 
1368
- .autocomplete__wrapper .form-feedback.just-validate-error-label {
1386
+ .autocomplete__wrapper .form-feedback {
1369
1387
  position: absolute;
1370
1388
  }
1371
1389
 
1372
1390
  textarea.form-control {
1373
- background-position: top 0.3em right 0.3em !important;
1374
- background-size: 37px 30% !important;
1391
+ background-position: top 0.5em right !important;
1375
1392
  }
1376
- textarea.is-invalid {
1377
- border-bottom-style: solid;
1378
- border-bottom-width: 1px;
1393
+
1394
+ .text-primary {
1395
+ --bsi-text-opacity: 1;
1396
+ color: rgba(var(--bsi-primary-rgb), var(--bsi-text-opacity)) !important;
1379
1397
  }
1380
- textarea.just-validate-success-field {
1381
- border-bottom-style: solid;
1382
- border-bottom-width: 1px;
1398
+
1399
+ .text-secondary {
1400
+ --bsi-text-opacity: 1;
1401
+ color: hsl(210, 33%, 28%) !important;
1383
1402
  }
1384
1403
 
1385
- input[type=checkbox].is-invalid,
1386
- input[type=radio].is-invalid {
1387
- --bsi-form-checkbox-border-color: var(--bsi-color-border-danger);
1404
+ .text-success {
1405
+ --bsi-text-opacity: 1;
1406
+ color: rgba(var(--bsi-success-rgb), var(--bsi-text-opacity)) !important;
1388
1407
  }
1389
1408
 
1390
- select.is-invalid {
1391
- border: 1px solid var(--bsi-color-border-danger);
1409
+ .text-info {
1410
+ --bsi-text-opacity: 1;
1411
+ color: rgba(var(--bsi-info-rgb), var(--bsi-text-opacity)) !important;
1392
1412
  }
1393
- select.just-validate-success-field {
1394
- border: 1px solid var(--bsi-color-border-success);
1413
+
1414
+ .text-warning {
1415
+ --bsi-text-opacity: 1;
1416
+ color: rgba(var(--bsi-warning-rgb), var(--bsi-text-opacity)) !important;
1417
+ }
1418
+
1419
+ .text-danger {
1420
+ --bsi-text-opacity: 1;
1421
+ color: rgba(var(--bsi-danger-rgb), var(--bsi-text-opacity)) !important;
1422
+ }
1423
+
1424
+ .text-light {
1425
+ --bsi-text-opacity: 1;
1426
+ color: rgba(var(--bsi-light-rgb), var(--bsi-text-opacity)) !important;
1427
+ }
1428
+
1429
+ .text-dark {
1430
+ --bsi-text-opacity: 1;
1431
+ color: rgba(var(--bsi-dark-rgb), var(--bsi-text-opacity)) !important;
1432
+ }
1433
+
1434
+ .text-black {
1435
+ --bsi-text-opacity: 1;
1436
+ color: rgba(var(--bsi-black-rgb), var(--bsi-text-opacity)) !important;
1437
+ }
1438
+
1439
+ .text-white {
1440
+ --bsi-text-opacity: 1;
1441
+ color: rgba(var(--bsi-white-rgb), var(--bsi-text-opacity)) !important;
1442
+ }
1443
+
1444
+ .text-100 {
1445
+ --bsi-text-opacity: 1;
1446
+ color: rgba(var(--bsi-100-rgb), var(--bsi-text-opacity)) !important;
1447
+ }
1448
+
1449
+ .text-200 {
1450
+ --bsi-text-opacity: 1;
1451
+ color: rgba(var(--bsi-200-rgb), var(--bsi-text-opacity)) !important;
1452
+ }
1453
+
1454
+ .text-300 {
1455
+ --bsi-text-opacity: 1;
1456
+ color: rgba(var(--bsi-300-rgb), var(--bsi-text-opacity)) !important;
1457
+ }
1458
+
1459
+ .text-400 {
1460
+ --bsi-text-opacity: 1;
1461
+ color: rgba(var(--bsi-400-rgb), var(--bsi-text-opacity)) !important;
1462
+ }
1463
+
1464
+ .text-500 {
1465
+ --bsi-text-opacity: 1;
1466
+ color: rgba(var(--bsi-500-rgb), var(--bsi-text-opacity)) !important;
1467
+ }
1468
+
1469
+ .text-600 {
1470
+ --bsi-text-opacity: 1;
1471
+ color: rgba(var(--bsi-600-rgb), var(--bsi-text-opacity)) !important;
1472
+ }
1473
+
1474
+ .text-700 {
1475
+ --bsi-text-opacity: 1;
1476
+ color: rgba(var(--bsi-700-rgb), var(--bsi-text-opacity)) !important;
1477
+ }
1478
+
1479
+ .text-800 {
1480
+ --bsi-text-opacity: 1;
1481
+ color: rgba(var(--bsi-800-rgb), var(--bsi-text-opacity)) !important;
1482
+ }
1483
+
1484
+ .text-900 {
1485
+ --bsi-text-opacity: 1;
1486
+ color: rgba(var(--bsi-900-rgb), var(--bsi-text-opacity)) !important;
1487
+ }
1488
+
1489
+ .text-body {
1490
+ --bsi-text-opacity: 1;
1491
+ color: rgba(var(--bsi-body-color-rgb), var(--bsi-text-opacity)) !important;
1492
+ }
1493
+
1494
+ .text-muted {
1495
+ --bsi-text-opacity: 1;
1496
+ color: hsl(210, 17%, 44%) !important;
1497
+ }
1498
+
1499
+ .text-black-50 {
1500
+ --bsi-text-opacity: 1;
1501
+ color: rgba(0, 0, 0, 0.5) !important;
1502
+ }
1503
+
1504
+ .text-white-50 {
1505
+ --bsi-text-opacity: 1;
1506
+ color: rgba(255, 255, 255, 0.5) !important;
1507
+ }
1508
+
1509
+ .text-reset {
1510
+ --bsi-text-opacity: 1;
1511
+ color: inherit !important;
1395
1512
  }
1396
1513
 
1397
1514
  :host {
@@ -1463,10 +1580,6 @@ input.upload-avatar {
1463
1580
  display: none;
1464
1581
  }
1465
1582
 
1466
- .invalid-feedback:not([hidden]) {
1467
- display: block;
1468
- }
1469
-
1470
1583
  .avatar-upload-wrapper:focus-within:not(:hover) {
1471
1584
  box-shadow: 0 0 0 2px hsl(0, 0%, 100%), 0 0 0 5px hsl(0, 0%, 0%) !important;
1472
1585
  outline: 3px solid rgba(0, 0, 0, 0) !important;
@@ -1584,7 +1697,8 @@ let ItUploadAvatar = class ItUploadAvatar extends FormControl {
1584
1697
  const overlayText = this.overlayLabel ?? this.$t('upload_avatar_overlay_label');
1585
1698
  // A pre-filled `src` or a freshly selected file both satisfy `required`.
1586
1699
  const hasValue = Boolean(this._currentFile || this._currentSrc);
1587
- const isInvalid = this.formControlController.submittedOnce && this.validationMessage.length > 0;
1700
+ const showValidation = this.formControlController.submittedOnce || this.customValidation;
1701
+ const isInvalid = showValidation && this.validationMessage.length > 0;
1588
1702
  const feedbackId = `invalid-feedback-${this._id}`;
1589
1703
  return html `
1590
1704
  <div class="avatar-upload-wrapper size-${this.size}">
@@ -1604,6 +1718,7 @@ let ItUploadAvatar = class ItUploadAvatar extends FormControl {
1604
1718
  accept="${this.accept}"
1605
1719
  ?disabled="${this.disabled}"
1606
1720
  ?required="${this.required && !hasValue}"
1721
+ ?formNoValidate="${this.customValidation}"
1607
1722
  aria-label="${fileInputLabel}"
1608
1723
  aria-required="${this.required ? 'true' : nothing}"
1609
1724
  aria-invalid="${isInvalid ? 'true' : nothing}"
@@ -1621,12 +1736,7 @@ let ItUploadAvatar = class ItUploadAvatar extends FormControl {
1621
1736
  </div>
1622
1737
  </div>
1623
1738
 
1624
- <div
1625
- id="${feedbackId}"
1626
- class="invalid-feedback form-feedback form-text just-validate-error-label"
1627
- role="alert"
1628
- ?hidden=${!isInvalid}
1629
- >
1739
+ <div id="${feedbackId}" class="form-feedback text-danger" role="alert" ?hidden=${!isInvalid}>
1630
1740
  ${isInvalid ? this.validationMessage : nothing}
1631
1741
  </div>
1632
1742
  `;
@@ -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 // 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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A,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,CA+J1B;;;;"}
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 showValidation = this.formControlController.submittedOnce || this.customValidation;\n const isInvalid = showValidation && 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 ?formNoValidate=\"${this.customValidation}\"\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 id=\"${feedbackId}\" class=\"form-feedback text-danger\" role=\"alert\" ?hidden=${!isInvalid}>\n ${isInvalid ? this.validationMessage : nothing}\n </div>\n `;\n }\n}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