@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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/spw-card-content.cjs.entry.js +1 -1
- package/dist/cjs/spw-card-excerpt.cjs.entry.js +1 -1
- package/dist/cjs/spw-card-image.cjs.entry.js +22 -4
- package/dist/cjs/spw-card-subtag-item.cjs.entry.js +1 -1
- package/dist/cjs/spw-card-subtags.cjs.entry.js +5 -2
- package/dist/cjs/spw-card-title.cjs.entry.js +1 -1
- package/dist/cjs/spw-card.cjs.entry.js +2 -2
- package/dist/cjs/spw-custom-select.cjs.entry.js +22 -3
- package/dist/cjs/spw-file-upload.cjs.entry.js +34 -9
- package/dist/cjs/spw-mosaic-item.cjs.entry.js +47 -6
- package/dist/cjs/spw-mosaic.cjs.entry.js +5 -2
- package/dist/cjs/spw-select.cjs.entry.js +16 -10
- package/dist/cjs/spw-stencil-library.cjs.js +1 -1
- package/dist/cjs/spw-tile.cjs.entry.js +1 -1
- package/dist/collection/components/spw-card/spw-card-content/spw-card-content.css +36 -2
- package/dist/collection/components/spw-card/spw-card-excerpt/spw-card-excerpt.css +3 -0
- package/dist/collection/components/spw-card/spw-card-image/spw-card-image.css +35 -14
- package/dist/collection/components/spw-card/spw-card-image/spw-card-image.js +79 -4
- package/dist/collection/components/spw-card/spw-card-subtag-item/spw-card-subtag-item.css +3 -0
- package/dist/collection/components/spw-card/spw-card-subtags/spw-card-subtags.css +3 -0
- package/dist/collection/components/spw-card/spw-card-subtags/spw-card-subtags.js +4 -1
- package/dist/collection/components/spw-card/spw-card-title/spw-card-title.css +10 -2
- package/dist/collection/components/spw-card/spw-card.js +4 -4
- package/dist/collection/components/spw-custom-select/spw-custom-select.js +61 -4
- package/dist/collection/components/spw-file-upload/spw-file-upload.js +55 -10
- package/dist/collection/components/spw-mosaic/spw-mosaic-item/spw-mosaic-item.js +111 -6
- package/dist/collection/components/spw-mosaic/spw-mosaic.js +9 -2
- package/dist/collection/components/spw-select/spw-select.js +55 -11
- package/dist/collection/components/spw-tile/spw-tile.css +17 -0
- package/dist/collection/stories/organisms/spw-card/spw-card.stories.js +22 -0
- package/dist/collection/stories/organisms/spw-grid/spw-grid.stories.js +14 -14
- package/dist/collection/stories/organisms/spw-mosaic/spw-mosaic.stories.js +131 -0
- package/dist/components/spw-card-content.js +1 -1
- package/dist/components/spw-card-excerpt.js +1 -1
- package/dist/components/spw-card-image.js +1 -1
- package/dist/components/spw-card-subtag-item.js +1 -1
- package/dist/components/spw-card-subtags.js +1 -1
- package/dist/components/spw-card-title.js +1 -1
- package/dist/components/spw-card.js +1 -1
- package/dist/components/spw-custom-select.js +1 -1
- package/dist/components/spw-file-upload.js +1 -1
- package/dist/components/spw-mosaic-item.js +1 -1
- package/dist/components/spw-mosaic.js +4 -4
- package/dist/components/spw-select.js +1 -1
- package/dist/components/spw-tile.js +1 -1
- package/dist/components_json.json +297 -9
- package/dist/components_vscode.json +3499 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/spw-card-content.entry.js +1 -1
- package/dist/esm/spw-card-excerpt.entry.js +1 -1
- package/dist/esm/spw-card-image.entry.js +22 -4
- package/dist/esm/spw-card-subtag-item.entry.js +1 -1
- package/dist/esm/spw-card-subtags.entry.js +5 -2
- package/dist/esm/spw-card-title.entry.js +1 -1
- package/dist/esm/spw-card.entry.js +2 -2
- package/dist/esm/spw-custom-select.entry.js +22 -3
- package/dist/esm/spw-file-upload.entry.js +34 -9
- package/dist/esm/spw-mosaic-item.entry.js +47 -6
- package/dist/esm/spw-mosaic.entry.js +5 -2
- package/dist/esm/spw-select.entry.js +16 -10
- package/dist/esm/spw-stencil-library.js +1 -1
- package/dist/esm/spw-tile.entry.js +1 -1
- package/dist/spw-stencil-library/p-1318262e.entry.js +1 -0
- package/dist/spw-stencil-library/p-1e806b7c.entry.js +1 -0
- package/dist/spw-stencil-library/{p-70424f67.entry.js → p-24de9d6f.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-fdbda346.entry.js → p-25991392.entry.js} +1 -1
- package/dist/spw-stencil-library/p-36122fda.entry.js +1 -0
- package/dist/spw-stencil-library/{p-c833a6fb.entry.js → p-6a46c406.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-6ccec3e1.entry.js → p-7368447c.entry.js} +1 -1
- package/dist/spw-stencil-library/p-7cb2f275.entry.js +1 -0
- package/dist/spw-stencil-library/p-94aa0e26.entry.js +1 -0
- package/dist/spw-stencil-library/{p-f0c7973a.entry.js → p-bc3ff922.entry.js} +1 -1
- package/dist/spw-stencil-library/p-e0f6f758.entry.js +1 -0
- package/dist/spw-stencil-library/{p-e8294025.entry.js → p-fa4bf37b.entry.js} +1 -1
- package/dist/spw-stencil-library/{p-d8e93516.entry.js → p-fbfb718d.entry.js} +1 -1
- package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
- package/dist/stats.json +618 -113
- package/dist/types/components/spw-card/spw-card-image/spw-card-image.d.ts +8 -1
- package/dist/types/components/spw-card/spw-card.d.ts +1 -1
- package/dist/types/components/spw-custom-select/spw-custom-select.d.ts +5 -0
- package/dist/types/components/spw-file-upload/spw-file-upload.d.ts +3 -1
- package/dist/types/components/spw-mosaic/spw-mosaic-item/spw-mosaic-item.d.ts +11 -0
- package/dist/types/components/spw-select/spw-select.d.ts +5 -1
- package/dist/types/components.d.ts +86 -6
- package/dist/types/stories/organisms/spw-card/spw-card.stories.d.ts +1 -0
- package/dist/types/stories/organisms/spw-mosaic/spw-mosaic.stories.d.ts +1 -0
- package/hydrate/index.js +174 -47
- package/hydrate/index.mjs +174 -47
- package/package.json +1 -1
- package/dist/spw-stencil-library/p-38bd2b93.entry.js +0 -1
- package/dist/spw-stencil-library/p-a5e811f0.entry.js +0 -1
- package/dist/spw-stencil-library/p-a92189cd.entry.js +0 -1
- package/dist/spw-stencil-library/p-aad1a377.entry.js +0 -1
- package/dist/spw-stencil-library/p-d7ed084c.entry.js +0 -1
- 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: '
|
|
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;
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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 (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
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: '
|
|
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: '
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
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: '
|
|
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:
|
|
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: '
|
|
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: '
|
|
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%;
|