@spw-ds/spw-stencil-library 1.3.3 → 1.3.4

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 (96) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/spw-card-content.cjs.entry.js +1 -1
  3. package/dist/cjs/spw-card-excerpt.cjs.entry.js +1 -1
  4. package/dist/cjs/spw-card-image.cjs.entry.js +22 -4
  5. package/dist/cjs/spw-card-subtag-item.cjs.entry.js +1 -1
  6. package/dist/cjs/spw-card-subtags.cjs.entry.js +5 -2
  7. package/dist/cjs/spw-card-title.cjs.entry.js +1 -1
  8. package/dist/cjs/spw-card.cjs.entry.js +2 -2
  9. package/dist/cjs/spw-custom-select.cjs.entry.js +22 -3
  10. package/dist/cjs/spw-file-upload.cjs.entry.js +34 -9
  11. package/dist/cjs/spw-mosaic-item.cjs.entry.js +47 -6
  12. package/dist/cjs/spw-mosaic.cjs.entry.js +5 -2
  13. package/dist/cjs/spw-select.cjs.entry.js +16 -10
  14. package/dist/cjs/spw-stencil-library.cjs.js +1 -1
  15. package/dist/cjs/spw-tile.cjs.entry.js +1 -1
  16. package/dist/collection/components/spw-card/spw-card-content/spw-card-content.css +36 -2
  17. package/dist/collection/components/spw-card/spw-card-excerpt/spw-card-excerpt.css +3 -0
  18. package/dist/collection/components/spw-card/spw-card-image/spw-card-image.css +35 -14
  19. package/dist/collection/components/spw-card/spw-card-image/spw-card-image.js +79 -4
  20. package/dist/collection/components/spw-card/spw-card-subtag-item/spw-card-subtag-item.css +3 -0
  21. package/dist/collection/components/spw-card/spw-card-subtags/spw-card-subtags.css +3 -0
  22. package/dist/collection/components/spw-card/spw-card-subtags/spw-card-subtags.js +4 -1
  23. package/dist/collection/components/spw-card/spw-card-title/spw-card-title.css +10 -2
  24. package/dist/collection/components/spw-card/spw-card.js +4 -4
  25. package/dist/collection/components/spw-custom-select/spw-custom-select.js +61 -4
  26. package/dist/collection/components/spw-file-upload/spw-file-upload.js +55 -10
  27. package/dist/collection/components/spw-mosaic/spw-mosaic-item/spw-mosaic-item.js +111 -6
  28. package/dist/collection/components/spw-mosaic/spw-mosaic.js +9 -2
  29. package/dist/collection/components/spw-select/spw-select.js +55 -11
  30. package/dist/collection/components/spw-tile/spw-tile.css +17 -0
  31. package/dist/collection/stories/organisms/spw-card/spw-card.stories.js +22 -0
  32. package/dist/collection/stories/organisms/spw-grid/spw-grid.stories.js +14 -14
  33. package/dist/collection/stories/organisms/spw-mosaic/spw-mosaic.stories.js +131 -0
  34. package/dist/components/spw-card-content.js +1 -1
  35. package/dist/components/spw-card-excerpt.js +1 -1
  36. package/dist/components/spw-card-image.js +1 -1
  37. package/dist/components/spw-card-subtag-item.js +1 -1
  38. package/dist/components/spw-card-subtags.js +1 -1
  39. package/dist/components/spw-card-title.js +1 -1
  40. package/dist/components/spw-card.js +1 -1
  41. package/dist/components/spw-custom-select.js +1 -1
  42. package/dist/components/spw-file-upload.js +1 -1
  43. package/dist/components/spw-mosaic-item.js +1 -1
  44. package/dist/components/spw-mosaic.js +4 -4
  45. package/dist/components/spw-select.js +1 -1
  46. package/dist/components/spw-tile.js +1 -1
  47. package/dist/components_json.json +297 -9
  48. package/dist/components_vscode.json +3499 -0
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/spw-card-content.entry.js +1 -1
  51. package/dist/esm/spw-card-excerpt.entry.js +1 -1
  52. package/dist/esm/spw-card-image.entry.js +22 -4
  53. package/dist/esm/spw-card-subtag-item.entry.js +1 -1
  54. package/dist/esm/spw-card-subtags.entry.js +5 -2
  55. package/dist/esm/spw-card-title.entry.js +1 -1
  56. package/dist/esm/spw-card.entry.js +2 -2
  57. package/dist/esm/spw-custom-select.entry.js +22 -3
  58. package/dist/esm/spw-file-upload.entry.js +34 -9
  59. package/dist/esm/spw-mosaic-item.entry.js +47 -6
  60. package/dist/esm/spw-mosaic.entry.js +5 -2
  61. package/dist/esm/spw-select.entry.js +16 -10
  62. package/dist/esm/spw-stencil-library.js +1 -1
  63. package/dist/esm/spw-tile.entry.js +1 -1
  64. package/dist/spw-stencil-library/p-1318262e.entry.js +1 -0
  65. package/dist/spw-stencil-library/p-1e806b7c.entry.js +1 -0
  66. package/dist/spw-stencil-library/{p-70424f67.entry.js → p-24de9d6f.entry.js} +1 -1
  67. package/dist/spw-stencil-library/{p-fdbda346.entry.js → p-25991392.entry.js} +1 -1
  68. package/dist/spw-stencil-library/p-36122fda.entry.js +1 -0
  69. package/dist/spw-stencil-library/{p-c833a6fb.entry.js → p-6a46c406.entry.js} +1 -1
  70. package/dist/spw-stencil-library/{p-6ccec3e1.entry.js → p-7368447c.entry.js} +1 -1
  71. package/dist/spw-stencil-library/p-7cb2f275.entry.js +1 -0
  72. package/dist/spw-stencil-library/p-94aa0e26.entry.js +1 -0
  73. package/dist/spw-stencil-library/{p-f0c7973a.entry.js → p-bc3ff922.entry.js} +1 -1
  74. package/dist/spw-stencil-library/p-e0f6f758.entry.js +1 -0
  75. package/dist/spw-stencil-library/{p-e8294025.entry.js → p-fa4bf37b.entry.js} +1 -1
  76. package/dist/spw-stencil-library/{p-d8e93516.entry.js → p-fbfb718d.entry.js} +1 -1
  77. package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
  78. package/dist/stats.json +618 -113
  79. package/dist/types/components/spw-card/spw-card-image/spw-card-image.d.ts +8 -1
  80. package/dist/types/components/spw-card/spw-card.d.ts +1 -1
  81. package/dist/types/components/spw-custom-select/spw-custom-select.d.ts +5 -0
  82. package/dist/types/components/spw-file-upload/spw-file-upload.d.ts +3 -1
  83. package/dist/types/components/spw-mosaic/spw-mosaic-item/spw-mosaic-item.d.ts +11 -0
  84. package/dist/types/components/spw-select/spw-select.d.ts +5 -1
  85. package/dist/types/components.d.ts +86 -6
  86. package/dist/types/stories/organisms/spw-card/spw-card.stories.d.ts +1 -0
  87. package/dist/types/stories/organisms/spw-mosaic/spw-mosaic.stories.d.ts +1 -0
  88. package/hydrate/index.js +174 -47
  89. package/hydrate/index.mjs +174 -47
  90. package/package.json +1 -1
  91. package/dist/spw-stencil-library/p-38bd2b93.entry.js +0 -1
  92. package/dist/spw-stencil-library/p-a5e811f0.entry.js +0 -1
  93. package/dist/spw-stencil-library/p-a92189cd.entry.js +0 -1
  94. package/dist/spw-stencil-library/p-aad1a377.entry.js +0 -1
  95. package/dist/spw-stencil-library/p-d7ed084c.entry.js +0 -1
  96. package/dist/spw-stencil-library/p-fb0c6681.entry.js +0 -1
@@ -390,6 +390,9 @@ template {
390
390
  :host(.--link) .spw-card-subtag-item--has-link:hover {
391
391
  text-decoration: none;
392
392
  }
393
+ :host(.--link.--highlighted) .spw-card-subtag-item {
394
+ color: white;
395
+ }
393
396
  :host(.--tag) .spw-card-subtag-item {
394
397
  display: inline-block;
395
398
  padding: 8px 12px;
@@ -383,6 +383,9 @@ template {
383
383
  margin-bottom: 8px;
384
384
  color: var(--spw-ds-primary);
385
385
  }
386
+ .--highlighted .spw-card-subtags {
387
+ color: white;
388
+ }
386
389
  .spw-card-subtags spw-card-subtag-item:after,
387
390
  .spw-card-subtags .spw-card-subtag-item:after {
388
391
  content: ",";
@@ -13,6 +13,9 @@ export class SpwCardSubtags {
13
13
  const contentElements = this.el.querySelectorAll('spw-card-subtag-item');
14
14
  contentElements.forEach(element => {
15
15
  element.classList.add(variantClass);
16
+ if (this.el.classList.contains('--highlighted')) {
17
+ element.classList.add('--highlighted');
18
+ }
16
19
  });
17
20
  });
18
21
  }
@@ -23,7 +26,7 @@ export class SpwCardSubtags {
23
26
  };
24
27
  }
25
28
  render() {
26
- return (h(Host, { key: 'f649df17747c0b15e378dc8ed9c8bffd387efc6c' }, h("div", { key: 'e7fb23264fd9dac808b653faeb293d8f27a56c2d', class: this.elementClass }, h("slot", { key: '06c3b96dd8644e797381ffc39ab987080a46bc21' }))));
29
+ return (h(Host, { key: 'f77ffa5b4f5fe8a47ede2bc8aad7774805e6b92b' }, h("div", { key: 'b2271dfdb69baf4902ac7725e7276bfa4c48341d', class: this.elementClass }, h("slot", { key: 'e372a3a027c94ec0e62cf59e144d9128ef1eedfb' }))));
27
30
  }
28
31
  static get is() { return "spw-card-subtags"; }
29
32
  static get originalStyleUrls() {
@@ -382,12 +382,20 @@ template {
382
382
  transition: all 0.3s ease;
383
383
  color: var(--spw-color-themes-grey-grey-900);
384
384
  }
385
- :host(.--hovered:not(.--video):not(.--people)) .spw-card-title {
385
+ :host(.--hovered:not(.--video):not(.--people):not(.--highlighted)) .spw-card-title {
386
386
  color: var(--spw-ds-primary);
387
387
  }
388
- :host(.--video) .spw-card-title {
388
+ :host(.--video) .spw-card-title, :host(.--highlighted) .spw-card-title {
389
389
  color: white;
390
390
  }
391
+ :host(.--highlighted) .spw-card-title {
392
+ font-size: 24px;
393
+ }
394
+ @media (min-width: 768px) {
395
+ :host(.--highlighted) .spw-card-title {
396
+ font-size: 32px;
397
+ }
398
+ }
391
399
  :host(.--sidebar) .spw-card-title {
392
400
  font-size: 18px;
393
401
  line-height: 1.2;
@@ -2,7 +2,7 @@ import { Host, h } from "@stencil/core";
2
2
  export class SpwCard {
3
3
  constructor() {
4
4
  this.hasImage = false;
5
- this.childHoveredCount = 0; // <-- Ajouté : pour suivre le nombre de sous-cartes survolées
5
+ this.childHoveredCount = 0;
6
6
  /** Type de variante de carte */
7
7
  this.variant = 'news';
8
8
  /** Type d'élément du bouton */
@@ -120,7 +120,7 @@ export class SpwCard {
120
120
  'aria-label': this === null || this === void 0 ? void 0 : this.accAriaLabel,
121
121
  'aria-disabled': this.disabled ? 'true' : null,
122
122
  };
123
- return (h(Host, { key: '6f0453f5b68c3176fa647d9de45dab2c8d2be7d9', class: { '--is-full-height': this.fullHeight } }, h("article", { key: 'fb8205ab094afa114abbe2557bc8e9e710f57c67', class: this.elementClass }, variant === 'event' && (h(TagType, Object.assign({ key: 'e6bd5924585802d0f819ba418df6cbee036343f6' }, attrs, { class: "spw-card__dates" }), dateStart && h("div", { key: 'fa5dda6da669c408e60a8604ed6cfa84b16cf6cf', class: "spw-card__date-item" }, this.formatDate(dateStart)), dateEnd && h("div", { key: '901b9d0c0ca88b0d625d2c068da8fed27c904b0f', class: "spw-card__date-item" }, this.formatDate(dateEnd)))), h(TagType, Object.assign({ key: '801115c5ab07fddcbd0a08d6ad240292ae8c085b' }, attrs, ariaAttributes, { class: "spw-card__link" }), h("slot", { key: 'edb7b8815ca7d7ccf775381c9de70258857df7c7' })))));
123
+ return (h(Host, { key: 'dd696a972dce8b2dd24bf4a32a91c48d647c8847', class: { '--is-full-height': this.fullHeight } }, h("article", { key: '3bedcc715c5ce3999bdd683aec295cf4a5f78afd', class: this.elementClass }, variant === 'event' && (h(TagType, Object.assign({ key: 'a562384022c312afe368de3b28d1746a3b0f5398' }, attrs, { class: "spw-card__dates" }), dateStart && h("div", { key: '1f91f1d6a773c48ff00fb71b0867eafa7b25a53e', class: "spw-card__date-item" }, this.formatDate(dateStart)), dateEnd && h("div", { key: 'bdce357cf092475ee1792950a686d02601d634bf', class: "spw-card__date-item" }, this.formatDate(dateEnd)))), h(TagType, Object.assign({ key: '8bae3ef221cf1edc713e89d23db08dda41bf22d8' }, attrs, ariaAttributes, { class: "spw-card__link" }), h("slot", { key: '89d675393747eadf75c55396cba1513566c9eace' })))));
124
124
  }
125
125
  static get is() { return "spw-card"; }
126
126
  static get encapsulation() { return "shadow"; }
@@ -140,8 +140,8 @@ export class SpwCard {
140
140
  "type": "string",
141
141
  "mutable": false,
142
142
  "complexType": {
143
- "original": "'news' | 'vertical' | 'video' | 'event' | 'sidebar' | 'people'",
144
- "resolved": "\"event\" | \"news\" | \"people\" | \"sidebar\" | \"vertical\" | \"video\"",
143
+ "original": "'news' | 'vertical' | 'video' | 'event' | 'sidebar' | 'highlighted' | 'people'",
144
+ "resolved": "\"event\" | \"highlighted\" | \"news\" | \"people\" | \"sidebar\" | \"vertical\" | \"video\"",
145
145
  "references": {}
146
146
  },
147
147
  "required": false,
@@ -86,6 +86,7 @@ export class SpwCustomSelect {
86
86
  }
87
87
  this.updateSelectedOption();
88
88
  }
89
+ /** Réinitialise le champ de sélection */
89
90
  async resetSelect() {
90
91
  if (this.multiple) {
91
92
  this.internalValue = [];
@@ -101,6 +102,24 @@ export class SpwCustomSelect {
101
102
  this.valueChanged.emit(this.internalValue);
102
103
  this.updateSelectedOption();
103
104
  }
105
+ /** Définit la valeur du champ de sélection */
106
+ async setValue(val) {
107
+ if (this.multiple) {
108
+ this.internalValue = Array.isArray(val) ? val : [val];
109
+ this.value = this.internalValue;
110
+ }
111
+ else {
112
+ this.internalValue = val;
113
+ this.value = val;
114
+ }
115
+ this.internals.setFormValue(this.getFormValue());
116
+ this.valueChanged.emit(this.internalValue);
117
+ this.updateSelectedOption();
118
+ }
119
+ /** Récupère la valeur actuelle du champ de sélection */
120
+ async getValue() {
121
+ return this.internalValue;
122
+ }
104
123
  formResetCallback() {
105
124
  this.resetSelect();
106
125
  }
@@ -384,18 +403,18 @@ export class SpwCustomSelect {
384
403
  render() {
385
404
  const filteredOptions = this.getFilteredOptions();
386
405
  const showPlaceholder = this.showPlaceholder();
387
- return (h("div", { key: 'b14db7d2386d766368355779964b2aaf1d12883a', class: this.elementClass, ref: el => (this.host = el) }, this.label && h("spw-field-label", { key: '23cc951518387d87fb2aac75fcb11d4e386c3a8a', label: this.label, name: this.name, required: this.required }), this.assistiveText && (h("spw-field-message", { key: '5e775c2e0d4f088aeac5936b60fae0d2a53984d5', class: "spw-custom-select__field-message", variant: "hint", showIcon: false }, this.assistiveText)), h("div", { key: '09ee394fa2c01bc88fa1d425e21b5873615758b1', class: "spw-custom-select__wrapper" }, h("div", { key: 'bcfbcc4cbc27591eac8e865af022a60318d42094', class: "spw-custom-select__container", id: this.name, ref: el => (this.selectContainer = el), onClick: event => this.toggleDropdown(event), onKeyDown: event => this.handleKeyDown(event), tabindex: this.disabled ? -1 : 0 }, h("div", { key: 'a66d964cc6958f878054c80db72f5a8fec38cc53', class: "spw-custom-select__selected" }, this.isSearchVisible() && (h("div", { key: '6c6db72cbd2bfba15d144be535449336196555be', class: "spw-custom-select__search" }, h("input", { key: '369521168c90323039c48a41689bd9fb71147ea1', class: "spw-custom-select__search-input", placeholder: "Entrez votre recherche", onInput: event => this.handleSearchInput(event), value: this.searchText }))), showPlaceholder && h("span", { key: '4840d3a851c1c3c2037f87ef2fd7f7d76d17345d' }, this.placeholder), this.multiple && this.internalValue.length > 0 && (h("div", { key: '83356082df969a094eeb6bd9688301585448b2d5', class: "spw-custom-select__selected-items" }, this.internalValue.map(val => {
406
+ return (h("div", { key: '5f7702579283fa011eba5c445de1fe29283a0239', class: this.elementClass, ref: el => (this.host = el) }, this.label && h("spw-field-label", { key: '451743b7254038fe4257378ac4f7c2206a47c60d', label: this.label, name: this.name, required: this.required }), this.assistiveText && (h("spw-field-message", { key: '817a94b7d7d2a1abd93986f3e03d0f769a6567d0', class: "spw-custom-select__field-message", variant: "hint", showIcon: false }, this.assistiveText)), h("div", { key: 'cf9e2cd0bcaf1a5bd9143fdf54046a241bd1a527', class: "spw-custom-select__wrapper" }, h("div", { key: '21a8fb2e0bb3dba93c582735db2072b150b157e4', class: "spw-custom-select__container", id: this.name, ref: el => (this.selectContainer = el), onClick: event => this.toggleDropdown(event), onKeyDown: event => this.handleKeyDown(event), tabindex: this.disabled ? -1 : 0 }, h("div", { key: '7acaa25439202ea6f30dd3542a757005534b2804', class: "spw-custom-select__selected" }, this.isSearchVisible() && (h("div", { key: 'e97c879fa5c70402ba331785f73747262e8854e1', class: "spw-custom-select__search" }, h("input", { key: '7047f755e5a4aaacf66a78ce80e1ad3520be1b85', class: "spw-custom-select__search-input", placeholder: "Entrez votre recherche", onInput: event => this.handleSearchInput(event), value: this.searchText }))), showPlaceholder && h("span", { key: '772afa04f989241e8e96c0ed25d444b66f72b282' }, this.placeholder), this.multiple && this.internalValue.length > 0 && (h("div", { key: '5d101958ee7f28ba19938a9dfbd137067d0c5a45', class: "spw-custom-select__selected-items" }, this.internalValue.map(val => {
388
407
  var _a;
389
408
  return (h("span", { class: "spw-custom-select__selected-item" }, (_a = this.parsedOptions.find(option => String(option.value) === String(val))) === null || _a === void 0 ? void 0 :
390
409
  _a.label, h("spw-icon", { icon: "fa-times", class: "spw-custom-select__deselect-icon", onClick: event => this.selectOption(val, event) })));
391
- }))), !this.multiple && h("span", { key: 'd3e7903216c507e2fc9fc94bec814a37576b4cc6' }, this.getSelectedLabels()))), h("div", { key: '654ca8a8a8b8f57ea7bf9e0488cf1530a03dd646', class: "spw-custom-select__arrow" }, h("spw-icon", { key: 'c051c6bb9f71ef36e80edda3dd7c9aff4abb8831', icon: this.isOpen ? 'fa-chevron-up' : 'fa-chevron-down' })), this.isOpen && (h("div", { key: 'ad29aae6e9a08f2e1f56bb570da6fa8cfd3c4ab7', class: `spw-custom-select__options spw-custom-select__options--${this.dropdownDirection}` }, !!filteredOptions.length && (h("ul", { key: '33154a536873077036837e0807cc2cf178df3b3c' }, filteredOptions.map((option, index) => (h("li", { class: {
410
+ }))), !this.multiple && h("span", { key: 'd6e00ae63c72be4e2bd86c4a46f3966cb7681592' }, this.getSelectedLabels()))), h("div", { key: '2dbf6b83c3c479e6251291ce13f77f43e1525841', class: "spw-custom-select__arrow" }, h("spw-icon", { key: '42e9d62768469dd064ccfca75dcfb45b0e6caf7b', icon: this.isOpen ? 'fa-chevron-up' : 'fa-chevron-down' })), this.isOpen && (h("div", { key: '9b53310eda74ea2ee34888a64f43ca5cfb48bca1', class: `spw-custom-select__options spw-custom-select__options--${this.dropdownDirection}` }, !!filteredOptions.length && (h("ul", { key: 'f30eb6a1d7839f241b9905ee3591ab9eed32e7df' }, filteredOptions.map((option, index) => (h("li", { class: {
392
411
  'spw-custom-select__option': true,
393
412
  'spw-custom-select__option--selected': this.multiple
394
413
  ? this.internalValue.some(val => String(val) === String(option.value))
395
414
  : option.value === this.internalValue,
396
415
  'spw-custom-select__option--focused': index === this.focusedOptionIndex,
397
416
  'spw-custom-select__option--disabled': option.disabled,
398
- }, onClick: () => this.selectOption(option.value) }, this.multiple && (h("spw-checkbox", { onKeyDown: event => this.handleOptionKeyDown(event, option.value), class: "spw-custom-select__checkbox", checked: this.internalValue.some(val => String(val) === String(option.value)), disabled: option.disabled })), option.label))))), !filteredOptions.length && h("p", { key: 'd715b43bee14b967de36fd7798540c82501ee9ff', class: "spw-custom-select__no-results" }, "Pas de r\u00E9sultats pour cette recherche.")))), this.renderErrorMessage(), this.renderHintMessage(), this.renderSuccessMessage(), this.renderWarningMessage()));
417
+ }, onClick: () => this.selectOption(option.value) }, this.multiple && (h("spw-checkbox", { onKeyDown: event => this.handleOptionKeyDown(event, option.value), class: "spw-custom-select__checkbox", checked: this.internalValue.some(val => String(val) === String(option.value)), disabled: option.disabled })), option.label))))), !filteredOptions.length && h("p", { key: '2b8efa73852cff382f97fa73e0f4bf0080b8dee9', class: "spw-custom-select__no-results" }, "Pas de r\u00E9sultats pour cette recherche.")))), this.renderErrorMessage(), this.renderHintMessage(), this.renderSuccessMessage(), this.renderWarningMessage()));
399
418
  }
400
419
  static get is() { return "spw-custom-select"; }
401
420
  static get encapsulation() { return "shadow"; }
@@ -834,7 +853,45 @@ export class SpwCustomSelect {
834
853
  "return": "Promise<void>"
835
854
  },
836
855
  "docs": {
837
- "text": "",
856
+ "text": "R\u00E9initialise le champ de s\u00E9lection",
857
+ "tags": []
858
+ }
859
+ },
860
+ "setValue": {
861
+ "complexType": {
862
+ "signature": "(val: (string | number)[] | string | number) => Promise<void>",
863
+ "parameters": [{
864
+ "name": "val",
865
+ "type": "string | number | (string | number)[]",
866
+ "docs": ""
867
+ }],
868
+ "references": {
869
+ "Promise": {
870
+ "location": "global",
871
+ "id": "global::Promise"
872
+ }
873
+ },
874
+ "return": "Promise<void>"
875
+ },
876
+ "docs": {
877
+ "text": "D\u00E9finit la valeur du champ de s\u00E9lection",
878
+ "tags": []
879
+ }
880
+ },
881
+ "getValue": {
882
+ "complexType": {
883
+ "signature": "() => Promise<(string | number)[] | string | number>",
884
+ "parameters": [],
885
+ "references": {
886
+ "Promise": {
887
+ "location": "global",
888
+ "id": "global::Promise"
889
+ }
890
+ },
891
+ "return": "Promise<string | number | (string | number)[]>"
892
+ },
893
+ "docs": {
894
+ "text": "R\u00E9cup\u00E8re la valeur actuelle du champ de s\u00E9lection",
838
895
  "tags": []
839
896
  }
840
897
  }
@@ -10,8 +10,10 @@ export class SpwFileUpload {
10
10
  this.enableDropZone = false;
11
11
  /** Permet de téléverser plusieurs fichiers si vrai */
12
12
  this.multiple = false;
13
- /** Types de fichiers acceptés, spécifiés sous forme de chaîne de types MIME */
13
+ /** Types de fichiers acceptés, spécifiés sous forme de chaîne de types MIME ou extensions (whitelist) */
14
14
  this.accept = '';
15
+ /** Types de fichiers refusés, spécifiés sous forme de chaîne de types MIME ou extensions (blacklist) */
16
+ this.refuse = '';
15
17
  /** Taille maximale autorisée pour chaque fichier, en Mo */
16
18
  this.maxFileSize = 100;
17
19
  /** Nombre maximal de fichiers pouvant être téléversés */
@@ -25,6 +27,9 @@ export class SpwFileUpload {
25
27
  componentWillLoad() {
26
28
  this.internalValue = this.value;
27
29
  this.maxFileSize = this.maxFileSize * 1024 * 1024;
30
+ if (this.accept && this.refuse) {
31
+ console.warn('spw-file-upload: Vous ne pouvez pas utiliser "accept" et "refuse" en même temps. Seul "accept" sera pris en compte.');
32
+ }
28
33
  }
29
34
  componentWillUpdate() {
30
35
  if (this.value !== this.internalValue) {
@@ -82,10 +87,20 @@ export class SpwFileUpload {
82
87
  this.updateFormValue();
83
88
  }
84
89
  isFileAccepted(file) {
85
- if (!this.accept)
86
- return true;
87
- const acceptedTypes = this.accept.split(',').map(type => type.trim());
88
- return acceptedTypes.includes(file.type) || acceptedTypes.some(type => file.name.endsWith(type));
90
+ if (this.accept && this.refuse) {
91
+ const acceptedTypes = this.accept.split(',').map(type => type.trim());
92
+ return acceptedTypes.includes(file.type) || acceptedTypes.some(type => file.name.endsWith(type));
93
+ }
94
+ if (this.accept) {
95
+ const acceptedTypes = this.accept.split(',').map(type => type.trim());
96
+ return acceptedTypes.includes(file.type) || acceptedTypes.some(type => file.name.endsWith(type));
97
+ }
98
+ if (this.refuse) {
99
+ const refusedTypes = this.refuse.split(',').map(type => type.trim());
100
+ const isRefused = refusedTypes.includes(file.type) || refusedTypes.some(type => file.name.endsWith(type));
101
+ return !isRefused;
102
+ }
103
+ return true;
89
104
  }
90
105
  isFileSizeValid(file) {
91
106
  return file.size <= this.maxFileSize;
@@ -158,7 +173,6 @@ export class SpwFileUpload {
158
173
  }
159
174
  get hintsMessages() {
160
175
  const maxSizeInMB = this.maxFileSize / (1024 * 1024);
161
- const acceptedFormats = this.accept ? this.accept : 'tous les formats';
162
176
  const messages = [];
163
177
  let message = `Taille maximale par fichier : ${maxSizeInMB} Mo`;
164
178
  if (this.multiple && this.maxFiles !== Infinity) {
@@ -169,16 +183,27 @@ export class SpwFileUpload {
169
183
  message += '.';
170
184
  }
171
185
  messages.push(message);
172
- messages.push(`Formats autorisés : ${acceptedFormats}.`);
186
+ if (this.accept && this.refuse) {
187
+ messages.push(`Formats autorisés : ${this.accept}.`);
188
+ }
189
+ else if (this.accept) {
190
+ messages.push(`Formats autorisés : ${this.accept}.`);
191
+ }
192
+ else if (this.refuse) {
193
+ messages.push(`Formats refusés : ${this.refuse}.`);
194
+ }
195
+ else {
196
+ messages.push(`Formats autorisés : tous les formats.`);
197
+ }
173
198
  return messages;
174
199
  }
175
200
  render() {
176
201
  const inputTextNoDrop = this.multiple ? 'Choisir vos fichiers...' : 'Choisir votre fichier...';
177
202
  const inputTextDrop = this.multiple ? 'Déposez vos fichiers ici' : 'Déposez votre fichier ici';
178
- return (h("div", { key: '196c01c219629f7e3c0b916f3961ac26c4b6ff62', class: this.elementClass, onDragOver: this.handleDragOver.bind(this), onDragLeave: this.handleDragLeave.bind(this), onDrop: this.handleDrop.bind(this) }, h("input", { key: 'bef05fd986b41b0e113952726eec82aa09c18488', type: "file", ref: el => (this.inputElement = el), onChange: this.handleFileChange.bind(this), name: this.name, multiple: this.multiple, accept: this.accept, style: { display: 'none' }, disabled: this.isMaxFilesReached }), this.enableDropZone ? (h("div", { tabindex: this.disabled || this.isMaxFilesReached ? -1 : 0, onKeyDown: this.handleKeydown.bind(this), onClick: () => !this.disabled && !this.isMaxFilesReached && this.inputElement.click(), class: "spw-file-upload__dropzone" }, inputTextDrop, " ou ", h("span", { class: "spw-file-upload__dropzone-link" }, "choisissez sur votre ordinateur..."))) : (h("spw-button", { variant: "secondary", onClick: () => !this.disabled && !this.isMaxFilesReached && this.inputElement.click(), disabled: this.disabled || this.isMaxFilesReached }, inputTextNoDrop)), h("div", { key: 'f0247eae6e516ccf4e5d18e67274056427fe22b3', class: "spw-file-upload__hints" }, this.hintsMessages.length > 0 && (h("ul", { key: '6616bb81473149b200e199f3db8a2e29b940dfec' }, this.hintsMessages.map((message, index) => (h("li", { key: index }, message)))))), h("div", { key: '1680d3f03ec73d312bf028069f44c7c8dd614bd3', class: "spw-file-upload__info" }, this.selectedFiles.length > 0 ? (h("ul", { class: "spw-file-upload__info-list" }, this.selectedFiles.map((file, index) => (h("li", { key: index }, h("span", { class: "spw-file-upload__info-list-name" }, file.name), h("div", { class: "spw-file-upload__info-list-actions" }, h("span", { class: "spw-file-upload__spacing" }, formatFileSize(file.size)), h("a", { class: "spw-file-upload__info-list-delete", href: "#", onClick: e => {
203
+ return (h("div", { key: '501bc95288cc670462c4545d44db80758195ddda', class: this.elementClass, onDragOver: this.handleDragOver.bind(this), onDragLeave: this.handleDragLeave.bind(this), onDrop: this.handleDrop.bind(this) }, h("input", { key: '6bf6586de3919a1f913ad7b371d83d322f6385a3', type: "file", ref: el => (this.inputElement = el), onChange: this.handleFileChange.bind(this), name: this.name, multiple: this.multiple, accept: this.accept, style: { display: 'none' }, disabled: this.isMaxFilesReached }), this.enableDropZone ? (h("div", { tabindex: this.disabled || this.isMaxFilesReached ? -1 : 0, onKeyDown: this.handleKeydown.bind(this), onClick: () => !this.disabled && !this.isMaxFilesReached && this.inputElement.click(), class: "spw-file-upload__dropzone" }, inputTextDrop, " ou ", h("span", { class: "spw-file-upload__dropzone-link" }, "choisissez sur votre ordinateur..."))) : (h("spw-button", { variant: "secondary", onClick: () => !this.disabled && !this.isMaxFilesReached && this.inputElement.click(), disabled: this.disabled || this.isMaxFilesReached }, inputTextNoDrop)), h("div", { key: '082e5f3f10f27b6435dcf47b5688d03b42d034f5', class: "spw-file-upload__hints" }, this.hintsMessages.length > 0 && (h("ul", { key: '62495fffa5ee797c7787535af7c349e18a3076b5' }, this.hintsMessages.map((message, index) => (h("li", { key: index }, message)))))), h("div", { key: 'd21de5e0f796829746ae8d3dc981e3150219f72e', class: "spw-file-upload__info" }, this.selectedFiles.length > 0 ? (h("ul", { class: "spw-file-upload__info-list" }, this.selectedFiles.map((file, index) => (h("li", { key: index }, h("span", { class: "spw-file-upload__info-list-name" }, file.name), h("div", { class: "spw-file-upload__info-list-actions" }, h("span", { class: "spw-file-upload__spacing" }, formatFileSize(file.size)), h("a", { class: "spw-file-upload__info-list-delete", href: "#", onClick: e => {
179
204
  e.preventDefault();
180
205
  this.removeFile(index);
181
- } }, "Supprimer"))))))) : (''), this.fileLimitErrors.length > 0 && (h("ul", { key: '07abd61c8d4fe0644b6ef4699828f718f3df74c7', class: `spw-file-upload__errors ${this.isMaxFilesReachedExact ? 'spw-file-upload__errors--warning' : ''}` }, this.fileLimitErrors.map((message, index) => (h("li", { key: index }, h("spw-icon", { class: "spw-file-upload__spacing", icon: this.isMaxFilesReachedExact ? 'fa-circle-exclamation' : 'fa-warning' }), message))))), this.fileTypeErrors.length > 0 && (h("ul", { key: '63ad9f2f1894abe7e512d08bebc453001343200a', class: "spw-file-upload__errors" }, this.fileTypeErrors.map((message, index) => (h("li", { key: index }, h("spw-icon", { class: "spw-file-upload__spacing", icon: "fa-warning" }), message))))))));
206
+ } }, "Supprimer"))))))) : (''), this.fileLimitErrors.length > 0 && (h("ul", { key: '7b4415ba4316aec17e08d91a6057505877686c2e', class: `spw-file-upload__errors ${this.isMaxFilesReachedExact ? 'spw-file-upload__errors--warning' : ''}` }, this.fileLimitErrors.map((message, index) => (h("li", { key: index }, h("spw-icon", { class: "spw-file-upload__spacing", icon: this.isMaxFilesReachedExact ? 'fa-circle-exclamation' : 'fa-warning' }), message))))), this.fileTypeErrors.length > 0 && (h("ul", { key: '0372034644a7a3158dc32933f8e431e487543d9a', class: "spw-file-upload__errors" }, this.fileTypeErrors.map((message, index) => (h("li", { key: index }, h("spw-icon", { class: "spw-file-upload__spacing", icon: "fa-warning" }), message))))))));
182
207
  }
183
208
  static get is() { return "spw-file-upload"; }
184
209
  static get encapsulation() { return "shadow"; }
@@ -325,7 +350,7 @@ export class SpwFileUpload {
325
350
  "optional": false,
326
351
  "docs": {
327
352
  "tags": [],
328
- "text": "Types de fichiers accept\u00E9s, sp\u00E9cifi\u00E9s sous forme de cha\u00EEne de types MIME"
353
+ "text": "Types de fichiers accept\u00E9s, sp\u00E9cifi\u00E9s sous forme de cha\u00EEne de types MIME ou extensions (whitelist)"
329
354
  },
330
355
  "getter": false,
331
356
  "setter": false,
@@ -333,6 +358,26 @@ export class SpwFileUpload {
333
358
  "attribute": "accept",
334
359
  "defaultValue": "''"
335
360
  },
361
+ "refuse": {
362
+ "type": "string",
363
+ "mutable": false,
364
+ "complexType": {
365
+ "original": "string",
366
+ "resolved": "string",
367
+ "references": {}
368
+ },
369
+ "required": false,
370
+ "optional": false,
371
+ "docs": {
372
+ "tags": [],
373
+ "text": "Types de fichiers refus\u00E9s, sp\u00E9cifi\u00E9s sous forme de cha\u00EEne de types MIME ou extensions (blacklist)"
374
+ },
375
+ "getter": false,
376
+ "setter": false,
377
+ "reflect": false,
378
+ "attribute": "refuse",
379
+ "defaultValue": "''"
380
+ },
336
381
  "maxFileSize": {
337
382
  "type": "number",
338
383
  "mutable": false,
@@ -1,19 +1,51 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class SpwMosaicItem {
3
+ constructor() {
4
+ this.parentColsMobile = 1;
5
+ this.parentColsTablet = 2;
6
+ this.parentColsDesktop = 3;
7
+ }
3
8
  componentDidLoad() {
4
- this.el.closest('spw-mosaic').addEventListener('mosaicConfigurationChanged', this.handleConfigurationChange.bind(this));
9
+ var _a;
10
+ (_a = this.el.closest('spw-mosaic')) === null || _a === void 0 ? void 0 : _a.addEventListener('mosaicConfigurationChanged', this.handleConfigurationChange.bind(this));
11
+ this.applyColSpans();
5
12
  }
6
13
  disconnectedCallback() {
7
- this.el.closest('spw-mosaic').removeEventListener('mosaicConfigurationChanged', this.handleConfigurationChange.bind(this));
14
+ var _a;
15
+ (_a = this.el.closest('spw-mosaic')) === null || _a === void 0 ? void 0 : _a.removeEventListener('mosaicConfigurationChanged', this.handleConfigurationChange.bind(this));
16
+ }
17
+ colSpanChanged() {
18
+ this.applyColSpans();
8
19
  }
9
20
  handleConfigurationChange(event) {
10
21
  const { colsMobile, colsTablet, colsDesktop } = event.detail;
11
- this.el.style.setProperty('--spw-mosaic-item-width-mobile', `calc(100% / ${colsMobile})`);
12
- this.el.style.setProperty('--spw-mosaic-item-width-tablet', `calc(100% / ${colsTablet})`);
13
- this.el.style.setProperty('--spw-mosaic-item-width-desktop', `calc(100% / ${colsDesktop})`);
22
+ this.parentColsMobile = colsMobile;
23
+ this.parentColsTablet = colsTablet;
24
+ this.parentColsDesktop = colsDesktop;
25
+ this.applyColSpans();
26
+ }
27
+ applyColSpans() {
28
+ if (this.colSpanMobile) {
29
+ this.el.style.setProperty('--spw-mosaic-item-width-mobile', `calc(100% / ${this.parentColsMobile} * ${this.colSpanMobile})`);
30
+ }
31
+ else {
32
+ this.el.style.setProperty('--spw-mosaic-item-width-mobile', `calc(100% / ${this.parentColsMobile})`);
33
+ }
34
+ if (this.colSpanTablet) {
35
+ this.el.style.setProperty('--spw-mosaic-item-width-tablet', `calc(100% / ${this.parentColsTablet} * ${this.colSpanTablet})`);
36
+ }
37
+ else {
38
+ this.el.style.setProperty('--spw-mosaic-item-width-tablet', `calc(100% / ${this.parentColsTablet})`);
39
+ }
40
+ if (this.colSpanDesktop) {
41
+ this.el.style.setProperty('--spw-mosaic-item-width-desktop', `calc(100% / ${this.parentColsDesktop} * ${this.colSpanDesktop})`);
42
+ }
43
+ else {
44
+ this.el.style.setProperty('--spw-mosaic-item-width-desktop', `calc(100% / ${this.parentColsDesktop})`);
45
+ }
14
46
  }
15
47
  render() {
16
- return (h(Host, { key: '9d7ac5809bee8a8ecf58bdee19a341eaffd217ef' }, h("slot", { key: '9adf812c99dc0ffcd918327672027395fc3db797' })));
48
+ return (h(Host, { key: 'c63e3ce803e887c548341162f7a890bfd1a315c4' }, h("slot", { key: 'b57cee581ed137ca253db8790b40a8e2ba28a201' })));
17
49
  }
18
50
  static get is() { return "spw-mosaic-item"; }
19
51
  static get encapsulation() { return "shadow"; }
@@ -27,5 +59,78 @@ export class SpwMosaicItem {
27
59
  "$": ["spw-mosaic-item.css"]
28
60
  };
29
61
  }
62
+ static get properties() {
63
+ return {
64
+ "colSpanMobile": {
65
+ "type": "number",
66
+ "mutable": false,
67
+ "complexType": {
68
+ "original": "number",
69
+ "resolved": "number",
70
+ "references": {}
71
+ },
72
+ "required": false,
73
+ "optional": true,
74
+ "docs": {
75
+ "tags": [],
76
+ "text": "Nombre de colonnes que l'item doit occuper en vue mobile (override la valeur h\u00E9rit\u00E9e du parent)"
77
+ },
78
+ "getter": false,
79
+ "setter": false,
80
+ "reflect": false,
81
+ "attribute": "col-span-mobile"
82
+ },
83
+ "colSpanTablet": {
84
+ "type": "number",
85
+ "mutable": false,
86
+ "complexType": {
87
+ "original": "number",
88
+ "resolved": "number",
89
+ "references": {}
90
+ },
91
+ "required": false,
92
+ "optional": true,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": "Nombre de colonnes que l'item doit occuper en vue tablette (override la valeur h\u00E9rit\u00E9e du parent)"
96
+ },
97
+ "getter": false,
98
+ "setter": false,
99
+ "reflect": false,
100
+ "attribute": "col-span-tablet"
101
+ },
102
+ "colSpanDesktop": {
103
+ "type": "number",
104
+ "mutable": false,
105
+ "complexType": {
106
+ "original": "number",
107
+ "resolved": "number",
108
+ "references": {}
109
+ },
110
+ "required": false,
111
+ "optional": true,
112
+ "docs": {
113
+ "tags": [],
114
+ "text": "Nombre de colonnes que l'item doit occuper en vue desktop (override la valeur h\u00E9rit\u00E9e du parent)"
115
+ },
116
+ "getter": false,
117
+ "setter": false,
118
+ "reflect": false,
119
+ "attribute": "col-span-desktop"
120
+ }
121
+ };
122
+ }
30
123
  static get elementRef() { return "el"; }
124
+ static get watchers() {
125
+ return [{
126
+ "propName": "colSpanMobile",
127
+ "methodName": "colSpanChanged"
128
+ }, {
129
+ "propName": "colSpanTablet",
130
+ "methodName": "colSpanChanged"
131
+ }, {
132
+ "propName": "colSpanDesktop",
133
+ "methodName": "colSpanChanged"
134
+ }];
135
+ }
31
136
  }
@@ -85,10 +85,13 @@ export class SpwMosaic {
85
85
  const slot = this.el.shadowRoot.querySelector('slot');
86
86
  const masonryItems = slot.assignedElements({ flatten: true });
87
87
  if (masonryItems.length > 0) {
88
+ // Trouver un item sans colSpan pour calculer la largeur de base d'une colonne
89
+ const baseItem = Array.from(masonryItems).find(item => !item.hasAttribute('col-span-desktop') && !item.hasAttribute('col-span-tablet') && !item.hasAttribute('col-span-mobile')) || masonryItems[0];
88
90
  this.masonry = new Masonry(this.el, {
89
91
  itemSelector: 'spw-mosaic-item',
90
- columnWidth: 'spw-mosaic-item',
92
+ columnWidth: baseItem,
91
93
  percentPosition: true,
94
+ gutter: 0,
92
95
  });
93
96
  this.initialized = true;
94
97
  masonryItems.forEach(item => {
@@ -131,7 +134,7 @@ export class SpwMosaic {
131
134
  };
132
135
  }
133
136
  render() {
134
- return (h(Host, { key: '315dbce69f6894a93dfea27c215ed6d74c43beb2' }, h("div", { key: '7383f3c38c7d90c3995c621824d28d5d8c46d37c', class: this.elementClass }, h("slot", { key: '2120301d6e1b24331a49c265c08e0f8f0aefb34c' }))));
137
+ return (h(Host, { key: 'f61eb75efa6cc8fe663e50f45568c5cb7dd8f2f3' }, h("div", { key: '1094aebb0e127ce6fa37c9884216cf0fa20ad781', class: this.elementClass }, h("slot", { key: '0788e769762d7d137fe4df586b6add1da6e723f8' }))));
135
138
  }
136
139
  static get is() { return "spw-mosaic"; }
137
140
  static get encapsulation() { return "shadow"; }
@@ -280,6 +283,10 @@ export class SpwMosaic {
280
283
  "Promise": {
281
284
  "location": "global",
282
285
  "id": "global::Promise"
286
+ },
287
+ "HTMLElement": {
288
+ "location": "global",
289
+ "id": "global::HTMLElement"
283
290
  }
284
291
  },
285
292
  "return": "Promise<void>"
@@ -32,6 +32,7 @@ export class SpwSelect {
32
32
  this.syncDynamicOptions();
33
33
  }
34
34
  }
35
+ /** Réinitialise le champ de sélection */
35
36
  async resetSelect() {
36
37
  this.internalValue = '';
37
38
  this.value = '';
@@ -41,6 +42,20 @@ export class SpwSelect {
41
42
  this.internals.setFormValue('');
42
43
  this.valueChanged.emit('');
43
44
  }
45
+ /** Définit la valeur du champ de sélection */
46
+ async setValue(val) {
47
+ this.internalValue = val;
48
+ this.value = val;
49
+ if (this.selectElement) {
50
+ this.selectElement.value = String(val);
51
+ }
52
+ this.internals.setFormValue(this.getFormValue());
53
+ this.valueChanged.emit(this.internalValue);
54
+ }
55
+ /** Récupère la valeur actuelle du champ de sélection */
56
+ async getValue() {
57
+ return this.internalValue;
58
+ }
44
59
  componentWillLoad() {
45
60
  var _a;
46
61
  this.defaultValue = (_a = this.value) !== null && _a !== void 0 ? _a : this.getInitialSelectedValue();
@@ -60,15 +75,6 @@ export class SpwSelect {
60
75
  this.setValue((_a = this.defaultValue) !== null && _a !== void 0 ? _a : '');
61
76
  this.resetSelect();
62
77
  }
63
- setValue(val) {
64
- this.internalValue = val;
65
- this.value = val;
66
- if (this.selectElement) {
67
- this.selectElement.value = String(val);
68
- }
69
- this.internals.setFormValue(this.getFormValue());
70
- this.valueChanged.emit(this.internalValue);
71
- }
72
78
  getFormValue() {
73
79
  return this.internalValue ? String(this.internalValue) : null;
74
80
  }
@@ -151,7 +157,7 @@ export class SpwSelect {
151
157
  };
152
158
  }
153
159
  render() {
154
- return (h(Host, { key: '03a8d7f699a02091c1769f6ea6d01bc6adfc1a5d' }, h("div", { key: 'e4e8df7f871ce76fdb8f19ea1b10006a5ae50ec0', class: this.elementClass }, this.label && h("spw-field-label", { key: 'e73bd6387bd7c647a11684300790f763bd1fea6e', label: this.label, name: this.name, required: this.required }), this.assistiveText && (h("spw-field-message", { key: 'df5f4b589ae18374bf50802d4ed8dc923d06c34c', class: "spw-select__field-message", variant: "hint", showIcon: false }, this.assistiveText)), h("div", { key: '3f1ee0d1e1e84919b387c14a1833ffe7f2058823', class: "spw-select__container" }, h("select", { key: 'e8a04cd43db7c56e23acd133a682c4f973194c41', id: this.name, name: this.name, "aria-label": this.accAriaLabel || this.label || this.name, class: "spw-select__trigger", onChange: event => this.handleSelectChange(event), disabled: this.disabled, ref: el => (this.selectElement = el), tabindex: this.disabled ? -1 : 0 }, h("option", { key: 'bae3d205bc526e60ac00fb492770b2614049b4cf', value: "", disabled: true, selected: !this.internalValue }, this.placeholder)), h("spw-icon", { key: '035d35a7db87d124d3102ff34c694a69bbccf0b3', class: "spw-select__arrow", icon: "fa-chevron-down" })), !this.items && h("slot", { key: '7efab927c453d175faf60d83eb120ee487427796' })), this.renderErrorMessage(), this.renderHintMessage(), this.renderSuccessMessage(), this.renderWarningMessage()));
160
+ return (h(Host, { key: 'c623e21b2b6e04d3a1f8b85dfc702cf3a2fb4c1e' }, h("div", { key: 'cc80bd65c5a6bd0612dc79c7a47fa8b15860211e', class: this.elementClass }, this.label && h("spw-field-label", { key: '98724278781185bc0060948baa65d79d9a263455', label: this.label, name: this.name, required: this.required }), this.assistiveText && (h("spw-field-message", { key: '9361a3d523b9ad611cb25ec10d3cab9664ce16f3', class: "spw-select__field-message", variant: "hint", showIcon: false }, this.assistiveText)), h("div", { key: 'b62735322558094dde5e4ee8efa8f6a2cd8f075e', class: "spw-select__container" }, h("select", { key: 'df5714c4a8ad2e469605f9ed000a8df325846304', id: this.name, name: this.name, "aria-label": this.accAriaLabel || this.label || this.name, class: "spw-select__trigger", onChange: event => this.handleSelectChange(event), disabled: this.disabled, ref: el => (this.selectElement = el), tabindex: this.disabled ? -1 : 0 }, h("option", { key: 'd74dbffc296ed6c9c5861fe7de2a7e4d4704461e', value: "", disabled: true, selected: !this.internalValue }, this.placeholder)), h("spw-icon", { key: '95147be8fa99af30865d61b65b2e5814482281b7', class: "spw-select__arrow", icon: "fa-chevron-down" })), !this.items && h("slot", { key: '68c022ef52e5df4b2fa5c5b9d443ac2005b25e4c' })), this.renderErrorMessage(), this.renderHintMessage(), this.renderSuccessMessage(), this.renderWarningMessage()));
155
161
  }
156
162
  static get is() { return "spw-select"; }
157
163
  static get encapsulation() { return "shadow"; }
@@ -604,7 +610,45 @@ export class SpwSelect {
604
610
  "return": "Promise<void>"
605
611
  },
606
612
  "docs": {
607
- "text": "",
613
+ "text": "R\u00E9initialise le champ de s\u00E9lection",
614
+ "tags": []
615
+ }
616
+ },
617
+ "setValue": {
618
+ "complexType": {
619
+ "signature": "(val: string | number) => Promise<void>",
620
+ "parameters": [{
621
+ "name": "val",
622
+ "type": "string | number",
623
+ "docs": ""
624
+ }],
625
+ "references": {
626
+ "Promise": {
627
+ "location": "global",
628
+ "id": "global::Promise"
629
+ }
630
+ },
631
+ "return": "Promise<void>"
632
+ },
633
+ "docs": {
634
+ "text": "D\u00E9finit la valeur du champ de s\u00E9lection",
635
+ "tags": []
636
+ }
637
+ },
638
+ "getValue": {
639
+ "complexType": {
640
+ "signature": "() => Promise<string | number>",
641
+ "parameters": [],
642
+ "references": {
643
+ "Promise": {
644
+ "location": "global",
645
+ "id": "global::Promise"
646
+ }
647
+ },
648
+ "return": "Promise<string | number>"
649
+ },
650
+ "docs": {
651
+ "text": "R\u00E9cup\u00E8re la valeur actuelle du champ de s\u00E9lection",
608
652
  "tags": []
609
653
  }
610
654
  }
@@ -398,6 +398,7 @@ template {
398
398
  padding: 16px 0;
399
399
  }
400
400
  .spw-tile--big, .spw-tile--light {
401
+ position: relative;
401
402
  padding-top: calc(70% - 12px);
402
403
  border-radius: 6px;
403
404
  overflow: hidden;
@@ -416,6 +417,22 @@ template {
416
417
  padding-top: 150%;
417
418
  }
418
419
  }
420
+ .spw-tile--big:before, .spw-tile--light:before {
421
+ content: "";
422
+ background: black;
423
+ opacity: 0;
424
+ transition: all linear 0.2s;
425
+ border-radius: 5px;
426
+ position: absolute;
427
+ top: 0;
428
+ left: 0;
429
+ width: 100%;
430
+ height: 100%;
431
+ z-index: 2;
432
+ }
433
+ .spw-tile--big:hover:before, .spw-tile--light:hover:before {
434
+ opacity: 0.3;
435
+ }
419
436
  .spw-tile__overlay, .spw-tile__image {
420
437
  position: absolute;
421
438
  width: 100%;