@italia/thumbnav 1.0.0-alpha.9 → 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 +6 -37
- package/custom-elements.json +279 -234
- package/dist/src/index.js +1 -1
- package/dist/src/it-thumbnav-item.d.ts +4 -2
- package/dist/src/it-thumbnav-item.d.ts.map +1 -1
- package/dist/src/it-thumbnav-item.js +21 -19
- package/dist/src/it-thumbnav-item.js.map +1 -1
- package/dist/src/it-thumbnav.d.ts +5 -0
- package/dist/src/it-thumbnav.d.ts.map +1 -1
- package/dist/src/it-thumbnav.js +27 -17
- package/dist/src/it-thumbnav.js.map +1 -1
- package/package.json +23 -23
- package/styles/globals.scss +2 -1
- package/LICENSE +0 -11
package/README.md
CHANGED
|
@@ -1,42 +1,11 @@
|
|
|
1
|
-
# it-thumbnav
|
|
1
|
+
# <it-thumbnav>
|
|
2
2
|
|
|
3
|
-
Web
|
|
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
4
|
|
|
5
|
-
|
|
5
|
+
## Installation and usage
|
|
6
6
|
|
|
7
|
-
|
|
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
8
|
|
|
9
|
-
|
|
10
|
-
npm install @italia/thumbnav
|
|
11
|
-
```
|
|
9
|
+
## Documentation
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```html
|
|
16
|
-
<it-thumbnav>
|
|
17
|
-
<it-thumbnav-item>
|
|
18
|
-
<a href="#" class="ratio ratio-3x2">
|
|
19
|
-
<img src="..." alt="Visualizza immagine 1">
|
|
20
|
-
</a>
|
|
21
|
-
</it-thumbnav-item>
|
|
22
|
-
</it-thumbnav>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Attributi
|
|
26
|
-
|
|
27
|
-
### it-thumbnav
|
|
28
|
-
|
|
29
|
-
- `small` (boolean): Thumbnail di dimensione ridotta (120px invece di 240px)
|
|
30
|
-
- `vertical` (boolean): Disposizione verticale
|
|
31
|
-
- `fixed` (boolean): Larghezza fissa per ogni thumbnail
|
|
32
|
-
- `hover` (string): Effetto hover - `nozoom`, `black`, `primary`
|
|
33
|
-
- `auto` (number): Griglia automatica - numero di colonne (2-5)
|
|
34
|
-
- `position` (string): Posizione in overlay - `bottom`, `top`, `left`, `right`
|
|
35
|
-
|
|
36
|
-
## Documentazione
|
|
37
|
-
|
|
38
|
-
Visita la [documentazione ufficiale](https://designers.italia.it/design-system/componenti/thumbnav/) per dettagli completi sull'utilizzo del componente.
|
|
39
|
-
|
|
40
|
-
## Licenza
|
|
41
|
-
|
|
42
|
-
BSD 3-Clause License
|
|
11
|
+
Find the usage instructions for this specific component in its [dedicated documentation page](https://italia.github.io/dev-kit-italia/?path=/docs/componenti-thumbnav--documentazione).
|
package/custom-elements.json
CHANGED
|
@@ -2,6 +2,238 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "stories/it-thumbnav.stories.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"name": "meta",
|
|
12
|
+
"type": {
|
|
13
|
+
"text": "Meta<ThumbnnavProps>"
|
|
14
|
+
},
|
|
15
|
+
"default": "{ title: 'Componenti/Thumbnav', tags: ['a11y-ok', 'web-component'], component: 'it-thumbnav', args: { small: false, vertical: false, fixed: false, hover: undefined, auto: undefined, position: undefined, }, argTypes: { small: { control: 'boolean', description: 'Usa thumbnail di dimensione ridotta (120px invece di 240px).', table: { defaultValue: { summary: 'false' } }, }, vertical: { control: 'boolean', description: 'Dispone le thumbnail in colonna verticale invece che orizzontale.', table: { defaultValue: { summary: 'false' } }, }, fixed: { control: 'boolean', description: 'Imposta larghezza fissa per ogni thumbnail: 240px per default, 120px se combinato con `small`.', table: { defaultValue: { summary: 'false' } }, }, hover: { control: 'select', options: THUMBNAV_HOVER_EFFECTS, description: \"Personalizza l'effetto al passaggio del mouse. Ometti l'attributo per lo zoom predefinito. Usa `nozoom` per disabilitarlo, `black` o `primary` per aggiungere un layer colorato sull'immagine.\", }, auto: { control: 'select', options: THUMBNAV_AUTO_COLUMNS, description: 'Attiva la griglia a larghezza automatica e imposta il numero di thumbnail per riga (2, 3, 4 o 5).', }, position: { control: 'select', options: THUMBNAV_POSITIONS, description: \"Posiziona la Thumbnav in overlay rispetto a un contenitore con classe `.position-relative`. Usa `bottom` o `top` per la versione orizzontale, `left` o `right` per la verticale (il comportamento verticale viene applicato automaticamente). Questo attributo non ha effetto nell'esempio interattivo: richiede la struttura HTML corretta con un contenitore esterno. Vedi le stories dedicate agli overlay.\", }, }, parameters: { layout: 'padded', docs: { description: { component: ` Componente di navigazione con immagini thumbnail. Il componente Thumbnav è composto da due elementi: - \\`it-thumbnav\\`: contenitore che raggruppa le thumbnail e gestisce il layout; - \\`it-thumbnav-item\\`: singolo elemento, che accetta nello slot un anchor con immagine. Ogni \\`it-thumbnav-item\\` si aspetta un anchor con la classe Bootstrap \\`.ratio\\` per il corretto rapporto d'aspetto: \\`\\`\\`html <it-thumbnav> <it-thumbnav-item> <a href=\"#\" class=\"ratio ratio-3x2\"> <img src=\"…\" alt=\"Descrizione azione\"> </a> </it-thumbnav-item> </it-thumbnav> \\`\\`\\` `, }, }, }, }"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "variable",
|
|
19
|
+
"name": "EsempioInterattivo",
|
|
20
|
+
"type": {
|
|
21
|
+
"text": "Story"
|
|
22
|
+
},
|
|
23
|
+
"default": "{ name: 'Esempio interattivo', tags: ['!dev'], parameters: { docs: { canvas: { sourceState: 'hidden' } } }, render: (args) => renderComponent(args), }"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"kind": "variable",
|
|
27
|
+
"name": "VersioneSmall",
|
|
28
|
+
"type": {
|
|
29
|
+
"text": "Story"
|
|
30
|
+
},
|
|
31
|
+
"default": "{ name: 'Versione small', render: () => html` <it-thumbnav small> ${renderItems(3)} </it-thumbnav> `, }"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"kind": "variable",
|
|
35
|
+
"name": "HoverSenzaZoom",
|
|
36
|
+
"type": {
|
|
37
|
+
"text": "Story"
|
|
38
|
+
},
|
|
39
|
+
"default": "{ name: 'Hover senza zoom', render: () => html` <it-thumbnav hover=\"nozoom\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"kind": "variable",
|
|
43
|
+
"name": "HoverLayerNero",
|
|
44
|
+
"type": {
|
|
45
|
+
"text": "Story"
|
|
46
|
+
},
|
|
47
|
+
"default": "{ name: 'Hover con layer nero', render: () => html` <it-thumbnav hover=\"black\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"kind": "variable",
|
|
51
|
+
"name": "HoverLayerPrimary",
|
|
52
|
+
"type": {
|
|
53
|
+
"text": "Story"
|
|
54
|
+
},
|
|
55
|
+
"default": "{ name: 'Hover con layer primary', render: () => html` <it-thumbnav hover=\"primary\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"kind": "variable",
|
|
59
|
+
"name": "Verticale",
|
|
60
|
+
"type": {
|
|
61
|
+
"text": "Story"
|
|
62
|
+
},
|
|
63
|
+
"default": "{ name: 'Thumbnav verticale', render: () => html` <it-thumbnav vertical> ${renderItems(3)} </it-thumbnav> `, }"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"kind": "variable",
|
|
67
|
+
"name": "OverlayInferiore",
|
|
68
|
+
"type": {
|
|
69
|
+
"text": "Story"
|
|
70
|
+
},
|
|
71
|
+
"default": "{ name: 'Overlay orizzontale inferiore', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 400px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"bottom\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "variable",
|
|
75
|
+
"name": "OverlaySuperiore",
|
|
76
|
+
"type": {
|
|
77
|
+
"text": "Story"
|
|
78
|
+
},
|
|
79
|
+
"default": "{ name: 'Overlay orizzontale superiore', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 400px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"top\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"kind": "variable",
|
|
83
|
+
"name": "OverlayVerticaleLeft",
|
|
84
|
+
"type": {
|
|
85
|
+
"text": "Story"
|
|
86
|
+
},
|
|
87
|
+
"default": "{ name: 'Overlay verticale a sinistra', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 500px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"left\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"kind": "variable",
|
|
91
|
+
"name": "OverlayVerticaleRight",
|
|
92
|
+
"type": {
|
|
93
|
+
"text": "Story"
|
|
94
|
+
},
|
|
95
|
+
"default": "{ name: 'Overlay verticale a destra', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 500px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"right\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "variable",
|
|
99
|
+
"name": "GrigliaFissa",
|
|
100
|
+
"type": {
|
|
101
|
+
"text": "Story"
|
|
102
|
+
},
|
|
103
|
+
"default": "{ name: 'Griglia a larghezza fissa', parameters: { pageLayout: 'w-100' }, render: () => html` <it-thumbnav fixed> ${renderItems(5)} </it-thumbnav> `, }"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"kind": "variable",
|
|
107
|
+
"name": "GrigliaAutomatica3",
|
|
108
|
+
"type": {
|
|
109
|
+
"text": "Story"
|
|
110
|
+
},
|
|
111
|
+
"default": "{ name: 'Griglia automatica - 3 per riga', parameters: { pageLayout: 'w-100' }, render: () => html` <it-thumbnav auto=\"3\"> ${renderItems(5)} </it-thumbnav> `, }"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"kind": "variable",
|
|
115
|
+
"name": "GrigliaAutomatica5",
|
|
116
|
+
"type": {
|
|
117
|
+
"text": "Story"
|
|
118
|
+
},
|
|
119
|
+
"default": "{ name: 'Griglia automatica - 5 per riga', parameters: { pageLayout: 'w-100' }, render: () => html` <it-thumbnav auto=\"5\"> ${renderItems(5)} </it-thumbnav> `, }"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"exports": [
|
|
123
|
+
{
|
|
124
|
+
"kind": "js",
|
|
125
|
+
"name": "default",
|
|
126
|
+
"declaration": {
|
|
127
|
+
"name": "meta",
|
|
128
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"kind": "js",
|
|
133
|
+
"name": "EsempioInterattivo",
|
|
134
|
+
"declaration": {
|
|
135
|
+
"name": "EsempioInterattivo",
|
|
136
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"kind": "js",
|
|
141
|
+
"name": "VersioneSmall",
|
|
142
|
+
"declaration": {
|
|
143
|
+
"name": "VersioneSmall",
|
|
144
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"kind": "js",
|
|
149
|
+
"name": "HoverSenzaZoom",
|
|
150
|
+
"declaration": {
|
|
151
|
+
"name": "HoverSenzaZoom",
|
|
152
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"kind": "js",
|
|
157
|
+
"name": "HoverLayerNero",
|
|
158
|
+
"declaration": {
|
|
159
|
+
"name": "HoverLayerNero",
|
|
160
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"kind": "js",
|
|
165
|
+
"name": "HoverLayerPrimary",
|
|
166
|
+
"declaration": {
|
|
167
|
+
"name": "HoverLayerPrimary",
|
|
168
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"kind": "js",
|
|
173
|
+
"name": "Verticale",
|
|
174
|
+
"declaration": {
|
|
175
|
+
"name": "Verticale",
|
|
176
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"kind": "js",
|
|
181
|
+
"name": "OverlayInferiore",
|
|
182
|
+
"declaration": {
|
|
183
|
+
"name": "OverlayInferiore",
|
|
184
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"kind": "js",
|
|
189
|
+
"name": "OverlaySuperiore",
|
|
190
|
+
"declaration": {
|
|
191
|
+
"name": "OverlaySuperiore",
|
|
192
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"kind": "js",
|
|
197
|
+
"name": "OverlayVerticaleLeft",
|
|
198
|
+
"declaration": {
|
|
199
|
+
"name": "OverlayVerticaleLeft",
|
|
200
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"kind": "js",
|
|
205
|
+
"name": "OverlayVerticaleRight",
|
|
206
|
+
"declaration": {
|
|
207
|
+
"name": "OverlayVerticaleRight",
|
|
208
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"kind": "js",
|
|
213
|
+
"name": "GrigliaFissa",
|
|
214
|
+
"declaration": {
|
|
215
|
+
"name": "GrigliaFissa",
|
|
216
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"kind": "js",
|
|
221
|
+
"name": "GrigliaAutomatica3",
|
|
222
|
+
"declaration": {
|
|
223
|
+
"name": "GrigliaAutomatica3",
|
|
224
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"kind": "js",
|
|
229
|
+
"name": "GrigliaAutomatica5",
|
|
230
|
+
"declaration": {
|
|
231
|
+
"name": "GrigliaAutomatica5",
|
|
232
|
+
"module": "stories/it-thumbnav.stories.ts"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
5
237
|
{
|
|
6
238
|
"kind": "javascript-module",
|
|
7
239
|
"path": "src/index.ts",
|
|
@@ -31,9 +263,32 @@
|
|
|
31
263
|
"declarations": [
|
|
32
264
|
{
|
|
33
265
|
"kind": "class",
|
|
34
|
-
"description": "Singolo elemento della Thumbnav.\nInserisce il contenuto (tipicamente un anchor con immagine) in un elemento `<li>`.\
|
|
266
|
+
"description": "Singolo elemento della Thumbnav.\nInserisce il contenuto (tipicamente un anchor con immagine) in un elemento `<li>`.\nUsa l'attributo `active` per indicare l'elemento corrente:\n`<it-thumbnav-item active><a href=\"#\" class=\"ratio ratio-3x2\"><img …></a></it-thumbnav-item>`",
|
|
35
267
|
"name": "ItThumbnavItem",
|
|
36
|
-
"members": [
|
|
268
|
+
"members": [
|
|
269
|
+
{
|
|
270
|
+
"kind": "field",
|
|
271
|
+
"name": "active",
|
|
272
|
+
"type": {
|
|
273
|
+
"text": "boolean"
|
|
274
|
+
},
|
|
275
|
+
"default": "false",
|
|
276
|
+
"description": "Indica l'elemento attivo/corrente nella navigazione.",
|
|
277
|
+
"attribute": "active",
|
|
278
|
+
"reflects": true
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"attributes": [
|
|
282
|
+
{
|
|
283
|
+
"name": "active",
|
|
284
|
+
"type": {
|
|
285
|
+
"text": "boolean"
|
|
286
|
+
},
|
|
287
|
+
"default": "false",
|
|
288
|
+
"description": "Indica l'elemento attivo/corrente nella navigazione.",
|
|
289
|
+
"fieldName": "active"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
37
292
|
"superclass": {
|
|
38
293
|
"name": "BaseComponent",
|
|
39
294
|
"package": "@italia/globals"
|
|
@@ -132,6 +387,28 @@
|
|
|
132
387
|
"description": "Posizione in overlay all'interno di un contenitore `.position-relative`.\nValori: `bottom`, `top`, `left`, `right`.",
|
|
133
388
|
"attribute": "position",
|
|
134
389
|
"reflects": true
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"kind": "field",
|
|
393
|
+
"name": "_slotEl",
|
|
394
|
+
"type": {
|
|
395
|
+
"text": "HTMLSlotElement"
|
|
396
|
+
},
|
|
397
|
+
"privacy": "private"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"kind": "field",
|
|
401
|
+
"name": "_items",
|
|
402
|
+
"type": {
|
|
403
|
+
"text": "ItThumbnavItem[]"
|
|
404
|
+
},
|
|
405
|
+
"privacy": "protected",
|
|
406
|
+
"readonly": true
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"kind": "field",
|
|
410
|
+
"name": "_setChildrenProperties",
|
|
411
|
+
"privacy": "protected"
|
|
135
412
|
}
|
|
136
413
|
],
|
|
137
414
|
"attributes": [
|
|
@@ -269,238 +546,6 @@
|
|
|
269
546
|
}
|
|
270
547
|
}
|
|
271
548
|
]
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"kind": "javascript-module",
|
|
275
|
-
"path": "stories/it-thumbnav.stories.ts",
|
|
276
|
-
"declarations": [
|
|
277
|
-
{
|
|
278
|
-
"kind": "variable",
|
|
279
|
-
"name": "meta",
|
|
280
|
-
"type": {
|
|
281
|
-
"text": "Meta<ThumbnnavProps>"
|
|
282
|
-
},
|
|
283
|
-
"default": "{ title: 'Componenti/Thumbnav', tags: ['a11y-ok', 'web-component', 'alpha'], component: 'it-thumbnav', args: { small: false, vertical: false, fixed: false, hover: undefined, auto: undefined, position: undefined, }, argTypes: { small: { control: 'boolean', description: 'Usa thumbnail di dimensione ridotta (120px invece di 240px).', table: { defaultValue: { summary: 'false' } }, }, vertical: { control: 'boolean', description: 'Dispone le thumbnail in colonna verticale invece che orizzontale.', table: { defaultValue: { summary: 'false' } }, }, fixed: { control: 'boolean', description: 'Imposta larghezza fissa per ogni thumbnail: 240px per default, 120px se combinato con `small`.', table: { defaultValue: { summary: 'false' } }, }, hover: { control: 'select', options: THUMBNAV_HOVER_EFFECTS, description: \"Personalizza l'effetto al passaggio del mouse. Ometti l'attributo per lo zoom predefinito. Usa `nozoom` per disabilitarlo, `black` o `primary` per aggiungere un layer colorato sull'immagine.\", }, auto: { control: 'select', options: THUMBNAV_AUTO_COLUMNS, description: 'Attiva la griglia a larghezza automatica e imposta il numero di thumbnail per riga (2, 3, 4 o 5).', }, position: { control: 'select', options: THUMBNAV_POSITIONS, description: \"Posiziona la Thumbnav in overlay rispetto a un contenitore con classe `.position-relative`. Usa `bottom` o `top` per la versione orizzontale, `left` o `right` per la verticale (il comportamento verticale viene applicato automaticamente). Questo attributo non ha effetto nell'esempio interattivo: richiede la struttura HTML corretta con un contenitore esterno. Vedi le stories dedicate agli overlay.\", }, }, parameters: { layout: 'padded', a11y: { config: { rules: [ { id: 'list', enabled: false, }, { id: 'listitem', enabled: false, }, ], }, }, docs: { description: { component: ` Componente di navigazione con immagini thumbnail. Il componente Thumbnav è composto da due elementi: - \\`it-thumbnav\\`: contenitore che raggruppa le thumbnail e gestisce il layout; - \\`it-thumbnav-item\\`: singolo elemento, che accetta nello slot un anchor con immagine. Ogni \\`it-thumbnav-item\\` si aspetta un anchor con la classe Bootstrap \\`.ratio\\` per il corretto rapporto d'aspetto: \\`\\`\\`html <it-thumbnav> <it-thumbnav-item> <a href=\"#\" class=\"ratio ratio-3x2\"> <img src=\"…\" alt=\"Descrizione azione\"> </a> </it-thumbnav-item> </it-thumbnav> \\`\\`\\` `, }, }, }, }"
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"kind": "variable",
|
|
287
|
-
"name": "EsempioInterattivo",
|
|
288
|
-
"type": {
|
|
289
|
-
"text": "Story"
|
|
290
|
-
},
|
|
291
|
-
"default": "{ name: 'Esempio interattivo', tags: ['!dev'], parameters: { docs: { canvas: { sourceState: 'hidden' } } }, render: (args) => renderComponent(args), }"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"kind": "variable",
|
|
295
|
-
"name": "VersioneSmall",
|
|
296
|
-
"type": {
|
|
297
|
-
"text": "Story"
|
|
298
|
-
},
|
|
299
|
-
"default": "{ name: 'Versione small', render: () => html` <it-thumbnav small> ${renderItems(3)} </it-thumbnav> `, }"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"kind": "variable",
|
|
303
|
-
"name": "HoverSenzaZoom",
|
|
304
|
-
"type": {
|
|
305
|
-
"text": "Story"
|
|
306
|
-
},
|
|
307
|
-
"default": "{ name: 'Hover senza zoom', render: () => html` <it-thumbnav hover=\"nozoom\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
"kind": "variable",
|
|
311
|
-
"name": "HoverLayerNero",
|
|
312
|
-
"type": {
|
|
313
|
-
"text": "Story"
|
|
314
|
-
},
|
|
315
|
-
"default": "{ name: 'Hover con layer nero', render: () => html` <it-thumbnav hover=\"black\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"kind": "variable",
|
|
319
|
-
"name": "HoverLayerPrimary",
|
|
320
|
-
"type": {
|
|
321
|
-
"text": "Story"
|
|
322
|
-
},
|
|
323
|
-
"default": "{ name: 'Hover con layer primary', render: () => html` <it-thumbnav hover=\"primary\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
"kind": "variable",
|
|
327
|
-
"name": "Verticale",
|
|
328
|
-
"type": {
|
|
329
|
-
"text": "Story"
|
|
330
|
-
},
|
|
331
|
-
"default": "{ name: 'Thumbnav verticale', render: () => html` <it-thumbnav vertical> ${renderItems(3)} </it-thumbnav> `, }"
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
"kind": "variable",
|
|
335
|
-
"name": "OverlayInferiore",
|
|
336
|
-
"type": {
|
|
337
|
-
"text": "Story"
|
|
338
|
-
},
|
|
339
|
-
"default": "{ name: 'Overlay orizzontale inferiore', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 400px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"bottom\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"kind": "variable",
|
|
343
|
-
"name": "OverlaySuperiore",
|
|
344
|
-
"type": {
|
|
345
|
-
"text": "Story"
|
|
346
|
-
},
|
|
347
|
-
"default": "{ name: 'Overlay orizzontale superiore', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 400px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"top\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"kind": "variable",
|
|
351
|
-
"name": "OverlayVerticaleLeft",
|
|
352
|
-
"type": {
|
|
353
|
-
"text": "Story"
|
|
354
|
-
},
|
|
355
|
-
"default": "{ name: 'Overlay verticale a sinistra', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 500px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"left\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
"kind": "variable",
|
|
359
|
-
"name": "OverlayVerticaleRight",
|
|
360
|
-
"type": {
|
|
361
|
-
"text": "Story"
|
|
362
|
-
},
|
|
363
|
-
"default": "{ name: 'Overlay verticale a destra', parameters: { layout: 'fullscreen' }, render: () => html` <div class=\"position-relative\" style=\"height: 500px;\"> <img src=\"https://picsum.photos/1280/720?image=1056\" alt=\"Descrizione immagine\" style=\"width:100%;height:100%;object-fit:cover;\" /> <it-thumbnav position=\"right\" small> ${renderItems(3)} </it-thumbnav> </div> `, }"
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
"kind": "variable",
|
|
367
|
-
"name": "GrigliaFissa",
|
|
368
|
-
"type": {
|
|
369
|
-
"text": "Story"
|
|
370
|
-
},
|
|
371
|
-
"default": "{ name: 'Griglia a larghezza fissa', render: () => html` <it-thumbnav fixed> ${renderItems(5)} </it-thumbnav> `, }"
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"kind": "variable",
|
|
375
|
-
"name": "GrigliaAutomatica3",
|
|
376
|
-
"type": {
|
|
377
|
-
"text": "Story"
|
|
378
|
-
},
|
|
379
|
-
"default": "{ name: 'Griglia automatica - 3 per riga', render: () => html` <it-thumbnav auto=\"3\"> ${renderItems(5)} </it-thumbnav> `, }"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"kind": "variable",
|
|
383
|
-
"name": "GrigliaAutomatica5",
|
|
384
|
-
"type": {
|
|
385
|
-
"text": "Story"
|
|
386
|
-
},
|
|
387
|
-
"default": "{ name: 'Griglia automatica - 5 per riga', render: () => html` <it-thumbnav auto=\"5\"> ${renderItems(5)} </it-thumbnav> `, }"
|
|
388
|
-
}
|
|
389
|
-
],
|
|
390
|
-
"exports": [
|
|
391
|
-
{
|
|
392
|
-
"kind": "js",
|
|
393
|
-
"name": "default",
|
|
394
|
-
"declaration": {
|
|
395
|
-
"name": "meta",
|
|
396
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
"kind": "js",
|
|
401
|
-
"name": "EsempioInterattivo",
|
|
402
|
-
"declaration": {
|
|
403
|
-
"name": "EsempioInterattivo",
|
|
404
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
"kind": "js",
|
|
409
|
-
"name": "VersioneSmall",
|
|
410
|
-
"declaration": {
|
|
411
|
-
"name": "VersioneSmall",
|
|
412
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
"kind": "js",
|
|
417
|
-
"name": "HoverSenzaZoom",
|
|
418
|
-
"declaration": {
|
|
419
|
-
"name": "HoverSenzaZoom",
|
|
420
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
"kind": "js",
|
|
425
|
-
"name": "HoverLayerNero",
|
|
426
|
-
"declaration": {
|
|
427
|
-
"name": "HoverLayerNero",
|
|
428
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
"kind": "js",
|
|
433
|
-
"name": "HoverLayerPrimary",
|
|
434
|
-
"declaration": {
|
|
435
|
-
"name": "HoverLayerPrimary",
|
|
436
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
437
|
-
}
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
"kind": "js",
|
|
441
|
-
"name": "Verticale",
|
|
442
|
-
"declaration": {
|
|
443
|
-
"name": "Verticale",
|
|
444
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
"kind": "js",
|
|
449
|
-
"name": "OverlayInferiore",
|
|
450
|
-
"declaration": {
|
|
451
|
-
"name": "OverlayInferiore",
|
|
452
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
"kind": "js",
|
|
457
|
-
"name": "OverlaySuperiore",
|
|
458
|
-
"declaration": {
|
|
459
|
-
"name": "OverlaySuperiore",
|
|
460
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"kind": "js",
|
|
465
|
-
"name": "OverlayVerticaleLeft",
|
|
466
|
-
"declaration": {
|
|
467
|
-
"name": "OverlayVerticaleLeft",
|
|
468
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
"kind": "js",
|
|
473
|
-
"name": "OverlayVerticaleRight",
|
|
474
|
-
"declaration": {
|
|
475
|
-
"name": "OverlayVerticaleRight",
|
|
476
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"kind": "js",
|
|
481
|
-
"name": "GrigliaFissa",
|
|
482
|
-
"declaration": {
|
|
483
|
-
"name": "GrigliaFissa",
|
|
484
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"kind": "js",
|
|
489
|
-
"name": "GrigliaAutomatica3",
|
|
490
|
-
"declaration": {
|
|
491
|
-
"name": "GrigliaAutomatica3",
|
|
492
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"kind": "js",
|
|
497
|
-
"name": "GrigliaAutomatica5",
|
|
498
|
-
"declaration": {
|
|
499
|
-
"name": "GrigliaAutomatica5",
|
|
500
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
]
|
|
504
549
|
}
|
|
505
550
|
]
|
|
506
551
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -2,11 +2,13 @@ import { BaseComponent } from '@italia/globals';
|
|
|
2
2
|
/**
|
|
3
3
|
* Singolo elemento della Thumbnav.
|
|
4
4
|
* Inserisce il contenuto (tipicamente un anchor con immagine) in un elemento `<li>`.
|
|
5
|
-
*
|
|
6
|
-
* `<a href="#" class="ratio ratio-3x2
|
|
5
|
+
* Usa l'attributo `active` per indicare l'elemento corrente:
|
|
6
|
+
* `<it-thumbnav-item active><a href="#" class="ratio ratio-3x2"><img …></a></it-thumbnav-item>`
|
|
7
7
|
*/
|
|
8
8
|
export declare class ItThumbnavItem extends BaseComponent {
|
|
9
9
|
static styles: import("lit").CSSResultGroup;
|
|
10
|
+
/** Indica l'elemento attivo/corrente nella navigazione. */
|
|
11
|
+
active: boolean;
|
|
10
12
|
render(): import("lit").TemplateResult<1>;
|
|
11
13
|
}
|
|
12
14
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it-thumbnav-item.d.ts","sourceRoot":"","sources":["../../src/it-thumbnav-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD;;;;;GAKG;AACH,qBACa,cAAe,SAAQ,aAAa;IAC/C,MAAM,CAAC,MAAM,+BAAU;
|
|
1
|
+
{"version":3,"file":"it-thumbnav-item.d.ts","sourceRoot":"","sources":["../../src/it-thumbnav-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD;;;;;GAKG;AACH,qBACa,cAAe,SAAQ,aAAa;IAC/C,MAAM,CAAC,MAAM,+BAAU;IAEvB,2DAA2D;IAE3D,MAAM,UAAS;IAEN,MAAM;CAGhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
import { _ as __decorate, B as BaseComponent } from '../index-
|
|
1
|
+
import { _ as __decorate, a as __metadata, B as BaseComponent } from '../index-Bb8Vpns-.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
import { property, customElement } from 'lit/decorators.js';
|
|
4
4
|
import 'lit/directive.js';
|
|
5
5
|
|
|
6
|
-
var styles = css
|
|
7
|
-
/***************************** 2 ****************************************/
|
|
8
|
-
/***************************** 1 ****************************************/
|
|
9
|
-
/***************************** 2 ****************************************/
|
|
10
|
-
/***************************** 1 ****************************************/
|
|
11
|
-
/***************************** 2 ****************************************/
|
|
12
|
-
/***************************** 3 ****************************************/
|
|
13
|
-
/***************************** 1 ****************************************/
|
|
14
|
-
/***************************** 2 ****************************************/
|
|
15
|
-
/***************************** 3 ****************************************/
|
|
16
|
-
/***************************** NEUTRAL 1 ****************************************/
|
|
17
|
-
/***************************** NEUTRAL 2 ****************************************/
|
|
18
|
-
/***************************** NEUTRAL 2 / 3 ****************************************/
|
|
19
|
-
.thumb-nav {
|
|
6
|
+
var styles = css`.thumb-nav {
|
|
20
7
|
--bsi-thumb-nav-gap: var(--bsi-spacing-xxs);
|
|
21
8
|
--bsi-thumb-nav-auto-basis-offset: var(--bsi-spacing-s);
|
|
22
9
|
--bsi-thumb-nav-overlay-offset: var(--bsi-spacing-s);
|
|
@@ -29,6 +16,10 @@ var styles = css`/***************************** 1 ******************************
|
|
|
29
16
|
--bsi-thumb-nav-transition-duration: 0.4s;
|
|
30
17
|
--bsi-thumb-nav-transition-duration-hover: 1s;
|
|
31
18
|
--bsi-thumb-nav-transition-easing: cubic-bezier(0.15, 0.7, 0.36, 0.99);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
22
|
+
.thumb-nav {
|
|
32
23
|
display: flex;
|
|
33
24
|
justify-content: center;
|
|
34
25
|
margin: 0 calc(var(--bsi-thumb-nav-gap) * -1);
|
|
@@ -209,10 +200,12 @@ li {
|
|
|
209
200
|
transition-duration: 1s;
|
|
210
201
|
}
|
|
211
202
|
|
|
203
|
+
:host([active]) ::slotted(a),
|
|
212
204
|
::slotted(a.active) {
|
|
213
205
|
pointer-events: none;
|
|
214
206
|
}
|
|
215
207
|
|
|
208
|
+
:host([active]) ::slotted(a)::after,
|
|
216
209
|
::slotted(a.active)::after {
|
|
217
210
|
background: var(--bsi-color-background-primary);
|
|
218
211
|
opacity: 0.6;
|
|
@@ -221,15 +214,24 @@ li {
|
|
|
221
214
|
/**
|
|
222
215
|
* Singolo elemento della Thumbnav.
|
|
223
216
|
* Inserisce il contenuto (tipicamente un anchor con immagine) in un elemento `<li>`.
|
|
224
|
-
*
|
|
225
|
-
* `<a href="#" class="ratio ratio-3x2
|
|
217
|
+
* Usa l'attributo `active` per indicare l'elemento corrente:
|
|
218
|
+
* `<it-thumbnav-item active><a href="#" class="ratio ratio-3x2"><img …></a></it-thumbnav-item>`
|
|
226
219
|
*/
|
|
227
220
|
let ItThumbnavItem = class ItThumbnavItem extends BaseComponent {
|
|
221
|
+
constructor() {
|
|
222
|
+
super(...arguments);
|
|
223
|
+
/** Indica l'elemento attivo/corrente nella navigazione. */
|
|
224
|
+
this.active = false;
|
|
225
|
+
}
|
|
228
226
|
render() {
|
|
229
|
-
return html `<li><slot></slot></li>`;
|
|
227
|
+
return html `<li role="presentation"><slot></slot></li>`;
|
|
230
228
|
}
|
|
231
229
|
};
|
|
232
230
|
ItThumbnavItem.styles = styles;
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ type: Boolean, reflect: true }),
|
|
233
|
+
__metadata("design:type", Object)
|
|
234
|
+
], ItThumbnavItem.prototype, "active", void 0);
|
|
233
235
|
ItThumbnavItem = __decorate([
|
|
234
236
|
customElement('it-thumbnav-item')
|
|
235
237
|
], ItThumbnavItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it-thumbnav-item.js","sources":["../../../src/it-thumbnav-item.ts"],"sourcesContent":["import { BaseComponent } from '@italia/globals';\nimport { html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport styles from './thumbnav-item.scss';\n\n/**\n * Singolo elemento della Thumbnav.\n * Inserisce il contenuto (tipicamente un anchor con immagine) in un elemento `<li>`.\n *
|
|
1
|
+
{"version":3,"file":"it-thumbnav-item.js","sources":["../../../src/it-thumbnav-item.ts"],"sourcesContent":["import { BaseComponent } from '@italia/globals';\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport styles from './thumbnav-item.scss';\n\n/**\n * Singolo elemento della Thumbnav.\n * Inserisce il contenuto (tipicamente un anchor con immagine) in un elemento `<li>`.\n * Usa l'attributo `active` per indicare l'elemento corrente:\n * `<it-thumbnav-item active><a href=\"#\" class=\"ratio ratio-3x2\"><img …></a></it-thumbnav-item>`\n */\n@customElement('it-thumbnav-item')\nexport class ItThumbnavItem extends BaseComponent {\n static styles = styles;\n\n /** Indica l'elemento attivo/corrente nella navigazione. */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n override render() {\n return html`<li role=\"presentation\"><slot></slot></li>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-thumbnav-item': ItThumbnavItem;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;;;;AAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,aAAa,CAAA;AAA1C,IAAA,WAAA,GAAA;;;QAKL,IAAA,CAAA,MAAM,GAAG,KAAK;IAKhB;IAHW,MAAM,GAAA;QACb,OAAO,IAAI,CAAA,CAAA,0CAAA,CAA4C;IACzD;;AARO,cAAA,CAAA,MAAM,GAAG,MAAH;AAIb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;AAC5B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AALJ,cAAc,GAAA,UAAA,CAAA;IAD1B,aAAa,CAAC,kBAAkB;AACpB,CAAA,EAAA,cAAc,CAU1B;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseComponent } from '@italia/globals';
|
|
2
2
|
import type { ThumbnnavHoverEffect, ThumbnnavPosition, ThumbnnavAutoColumns } from './types.js';
|
|
3
|
+
import type { ItThumbnavItem } from './it-thumbnav-item.js';
|
|
3
4
|
/**
|
|
4
5
|
* Contenitore Thumbnav: lista di link con immagini thumbnail.
|
|
5
6
|
* I singoli elementi vanno inseriti tramite `it-thumbnav-item`.
|
|
@@ -40,6 +41,10 @@ export declare class ItThumbnav extends BaseComponent {
|
|
|
40
41
|
* Valori: `bottom`, `top`, `left`, `right`.
|
|
41
42
|
*/
|
|
42
43
|
position?: ThumbnnavPosition;
|
|
44
|
+
private _slotEl;
|
|
45
|
+
protected get _items(): ItThumbnavItem[];
|
|
46
|
+
protected _setChildrenProperties: () => void;
|
|
47
|
+
protected updated(): void;
|
|
43
48
|
render(): import("lit").TemplateResult<1>;
|
|
44
49
|
}
|
|
45
50
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it-thumbnav.d.ts","sourceRoot":"","sources":["../../src/it-thumbnav.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"it-thumbnav.d.ts","sourceRoot":"","sources":["../../src/it-thumbnav.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D;;;;;;;;;;;GAWG;AACH,qBACa,UAAW,SAAQ,aAAa;IAC3C,MAAM,CAAC,MAAM,+BAAU;IAEvB,mEAAmE;IAEnE,KAAK,UAAS;IAEd;;;OAGG;IAEH,QAAQ,UAAS;IAEjB,qEAAqE;IAErE,KAAK,UAAS;IAEd;;;;;OAKG;IAEH,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAE7B;;;OAGG;IAEH,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAE5B;;;OAGG;IAEH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAEd,OAAO,CAAC,OAAO,CAAmB;IAEjD,SAAS,KAAK,MAAM,IAAI,cAAc,EAAE,CAKvC;IAED,SAAS,CAAC,sBAAsB,aAI9B;cAEiB,OAAO;IAIjB,MAAM;CAsBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
package/dist/src/it-thumbnav.js
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
import { _ as __decorate, a as __metadata, B as BaseComponent } from '../index-
|
|
1
|
+
import { _ as __decorate, a as __metadata, B as BaseComponent } from '../index-Bb8Vpns-.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
|
-
import { property, customElement } from 'lit/decorators.js';
|
|
3
|
+
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit/directive.js';
|
|
6
6
|
|
|
7
|
-
var styles = css
|
|
8
|
-
/***************************** 2 ****************************************/
|
|
9
|
-
/***************************** 1 ****************************************/
|
|
10
|
-
/***************************** 2 ****************************************/
|
|
11
|
-
/***************************** 1 ****************************************/
|
|
12
|
-
/***************************** 2 ****************************************/
|
|
13
|
-
/***************************** 3 ****************************************/
|
|
14
|
-
/***************************** 1 ****************************************/
|
|
15
|
-
/***************************** 2 ****************************************/
|
|
16
|
-
/***************************** 3 ****************************************/
|
|
17
|
-
/***************************** NEUTRAL 1 ****************************************/
|
|
18
|
-
/***************************** NEUTRAL 2 ****************************************/
|
|
19
|
-
/***************************** NEUTRAL 2 / 3 ****************************************/
|
|
20
|
-
.thumb-nav {
|
|
7
|
+
var styles = css`.thumb-nav {
|
|
21
8
|
--bsi-thumb-nav-gap: var(--bsi-spacing-xxs);
|
|
22
9
|
--bsi-thumb-nav-auto-basis-offset: var(--bsi-spacing-s);
|
|
23
10
|
--bsi-thumb-nav-overlay-offset: var(--bsi-spacing-s);
|
|
@@ -30,6 +17,10 @@ var styles = css`/***************************** 1 ******************************
|
|
|
30
17
|
--bsi-thumb-nav-transition-duration: 0.4s;
|
|
31
18
|
--bsi-thumb-nav-transition-duration-hover: 1s;
|
|
32
19
|
--bsi-thumb-nav-transition-easing: cubic-bezier(0.15, 0.7, 0.36, 0.99);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
23
|
+
.thumb-nav {
|
|
33
24
|
display: flex;
|
|
34
25
|
justify-content: center;
|
|
35
26
|
margin: 0 calc(var(--bsi-thumb-nav-gap) * -1);
|
|
@@ -261,6 +252,21 @@ let ItThumbnav = class ItThumbnav extends BaseComponent {
|
|
|
261
252
|
this.vertical = false;
|
|
262
253
|
/** Larghezza fissa per ogni thumbnail (240px o 120px se `small`). */
|
|
263
254
|
this.fixed = false;
|
|
255
|
+
this._setChildrenProperties = () => {
|
|
256
|
+
for (const item of this._items) {
|
|
257
|
+
item.role = 'listitem';
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
get _items() {
|
|
262
|
+
if (!this._slotEl)
|
|
263
|
+
return [];
|
|
264
|
+
return this._slotEl
|
|
265
|
+
.assignedElements({ flatten: true })
|
|
266
|
+
.filter((el) => el.tagName === 'IT-THUMBNAV-ITEM');
|
|
267
|
+
}
|
|
268
|
+
updated() {
|
|
269
|
+
this._setChildrenProperties();
|
|
264
270
|
}
|
|
265
271
|
render() {
|
|
266
272
|
const effectiveVertical = this.vertical || this.position === 'left' || this.position === 'right';
|
|
@@ -280,7 +286,7 @@ let ItThumbnav = class ItThumbnav extends BaseComponent {
|
|
|
280
286
|
'thumb-nav-right': this.position === 'right',
|
|
281
287
|
});
|
|
282
288
|
return html `<ul class="${classes}" part="thumbnav" role="list">
|
|
283
|
-
<slot></slot>
|
|
289
|
+
<slot @slotchange=${this._setChildrenProperties}></slot>
|
|
284
290
|
</ul>`;
|
|
285
291
|
}
|
|
286
292
|
};
|
|
@@ -309,6 +315,10 @@ __decorate([
|
|
|
309
315
|
property({ type: String, reflect: true }),
|
|
310
316
|
__metadata("design:type", String)
|
|
311
317
|
], ItThumbnav.prototype, "position", void 0);
|
|
318
|
+
__decorate([
|
|
319
|
+
query('slot'),
|
|
320
|
+
__metadata("design:type", HTMLSlotElement)
|
|
321
|
+
], ItThumbnav.prototype, "_slotEl", void 0);
|
|
312
322
|
ItThumbnav = __decorate([
|
|
313
323
|
customElement('it-thumbnav')
|
|
314
324
|
], ItThumbnav);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it-thumbnav.js","sources":["../../../src/it-thumbnav.ts"],"sourcesContent":["/* eslint-disable lit-a11y/no-redundant-role */\n/* eslint-disable lit-a11y/list */\nimport { BaseComponent } from '@italia/globals';\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport type { ThumbnnavHoverEffect, ThumbnnavPosition, ThumbnnavAutoColumns } from './types.js';\nimport styles from './thumbnav.scss';\n\n/**\n * Contenitore Thumbnav: lista di link con immagini thumbnail.\n * I singoli elementi vanno inseriti tramite `it-thumbnav-item`.\n *\n * ```html\n * <it-thumbnav>\n * <it-thumbnav-item>\n * <a href=\"#\" class=\"ratio ratio-3x2\"><img src=\"…\" alt=\"…\"></a>\n * </it-thumbnav-item>\n * </it-thumbnav>\n * ```\n */\n@customElement('it-thumbnav')\nexport class ItThumbnav extends BaseComponent {\n static styles = styles;\n\n /** Usa thumbnail di dimensione ridotta (120px invece di 240px). */\n @property({ type: Boolean, reflect: true })\n small = false;\n\n /**\n * Dispone le thumbnail in colonna verticale.\n * Viene applicato automaticamente quando `position` è `left` o `right`.\n */\n @property({ type: Boolean, reflect: true })\n vertical = false;\n\n /** Larghezza fissa per ogni thumbnail (240px o 120px se `small`). */\n @property({ type: Boolean, reflect: true })\n fixed = false;\n\n /**\n * Effetto hover sull'immagine.\n * - `nozoom`: disabilita lo zoom al passaggio del mouse.\n * - `black`: overlay nero semitrasparente.\n * - `primary`: overlay di colore primary semitrasparente.\n */\n @property({ type: String, reflect: true })\n hover?: ThumbnnavHoverEffect;\n\n /**\n * Griglia a larghezza automatica: numero di thumbnail per riga (2–5).\n * Equivale alle classi `.thumb-nav-auto.thumb-nav-auto-N`.\n */\n @property({ type: Number, reflect: true })\n auto?: ThumbnnavAutoColumns;\n\n /**\n * Posizione in overlay all'interno di un contenitore `.position-relative`.\n * Valori: `bottom`, `top`, `left`, `right`.\n */\n @property({ type: String, reflect: true })\n position?: ThumbnnavPosition;\n\n override render() {\n const effectiveVertical = this.vertical || this.position === 'left' || this.position === 'right';\n const classes = classMap({\n 'thumb-nav': true,\n 'thumb-nav-small': this.small,\n 'thumb-nav-vertical': effectiveVertical,\n 'thumb-nav-fixed': this.fixed,\n 'thumb-nav-nozoom': this.hover === 'nozoom',\n 'thumb-nav-black': this.hover === 'black',\n 'thumb-nav-primary': this.hover === 'primary',\n 'thumb-nav-auto': this.auto != null,\n [`thumb-nav-auto-${this.auto}`]: this.auto != null,\n 'thumb-nav-bottom': this.position === 'bottom',\n 'thumb-nav-top': this.position === 'top',\n 'thumb-nav-left': this.position === 'left',\n 'thumb-nav-right': this.position === 'right',\n });\n\n return html`<ul class=\"${classes}\" part=\"thumbnav\" role=\"list\">\n <slot></slot>\n </ul>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-thumbnav': ItThumbnav;\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"it-thumbnav.js","sources":["../../../src/it-thumbnav.ts"],"sourcesContent":["/* eslint-disable lit-a11y/no-redundant-role */\n/* eslint-disable lit-a11y/list */\nimport { BaseComponent } from '@italia/globals';\nimport { html } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport type { ThumbnnavHoverEffect, ThumbnnavPosition, ThumbnnavAutoColumns } from './types.js';\nimport type { ItThumbnavItem } from './it-thumbnav-item.js';\nimport styles from './thumbnav.scss';\n\n/**\n * Contenitore Thumbnav: lista di link con immagini thumbnail.\n * I singoli elementi vanno inseriti tramite `it-thumbnav-item`.\n *\n * ```html\n * <it-thumbnav>\n * <it-thumbnav-item>\n * <a href=\"#\" class=\"ratio ratio-3x2\"><img src=\"…\" alt=\"…\"></a>\n * </it-thumbnav-item>\n * </it-thumbnav>\n * ```\n */\n@customElement('it-thumbnav')\nexport class ItThumbnav extends BaseComponent {\n static styles = styles;\n\n /** Usa thumbnail di dimensione ridotta (120px invece di 240px). */\n @property({ type: Boolean, reflect: true })\n small = false;\n\n /**\n * Dispone le thumbnail in colonna verticale.\n * Viene applicato automaticamente quando `position` è `left` o `right`.\n */\n @property({ type: Boolean, reflect: true })\n vertical = false;\n\n /** Larghezza fissa per ogni thumbnail (240px o 120px se `small`). */\n @property({ type: Boolean, reflect: true })\n fixed = false;\n\n /**\n * Effetto hover sull'immagine.\n * - `nozoom`: disabilita lo zoom al passaggio del mouse.\n * - `black`: overlay nero semitrasparente.\n * - `primary`: overlay di colore primary semitrasparente.\n */\n @property({ type: String, reflect: true })\n hover?: ThumbnnavHoverEffect;\n\n /**\n * Griglia a larghezza automatica: numero di thumbnail per riga (2–5).\n * Equivale alle classi `.thumb-nav-auto.thumb-nav-auto-N`.\n */\n @property({ type: Number, reflect: true })\n auto?: ThumbnnavAutoColumns;\n\n /**\n * Posizione in overlay all'interno di un contenitore `.position-relative`.\n * Valori: `bottom`, `top`, `left`, `right`.\n */\n @property({ type: String, reflect: true })\n position?: ThumbnnavPosition;\n\n @query('slot') private _slotEl!: HTMLSlotElement;\n\n protected get _items(): ItThumbnavItem[] {\n if (!this._slotEl) return [];\n return this._slotEl\n .assignedElements({ flatten: true })\n .filter((el) => el.tagName === 'IT-THUMBNAV-ITEM') as ItThumbnavItem[];\n }\n\n protected _setChildrenProperties = () => {\n for (const item of this._items) {\n item.role = 'listitem';\n }\n };\n\n protected override updated() {\n this._setChildrenProperties();\n }\n\n override render() {\n const effectiveVertical = this.vertical || this.position === 'left' || this.position === 'right';\n const classes = classMap({\n 'thumb-nav': true,\n 'thumb-nav-small': this.small,\n 'thumb-nav-vertical': effectiveVertical,\n 'thumb-nav-fixed': this.fixed,\n 'thumb-nav-nozoom': this.hover === 'nozoom',\n 'thumb-nav-black': this.hover === 'black',\n 'thumb-nav-primary': this.hover === 'primary',\n 'thumb-nav-auto': this.auto != null,\n [`thumb-nav-auto-${this.auto}`]: this.auto != null,\n 'thumb-nav-bottom': this.position === 'bottom',\n 'thumb-nav-top': this.position === 'top',\n 'thumb-nav-left': this.position === 'left',\n 'thumb-nav-right': this.position === 'right',\n });\n\n return html`<ul class=\"${classes}\" part=\"thumbnav\" role=\"list\">\n <slot @slotchange=${this._setChildrenProperties}></slot>\n </ul>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-thumbnav': ItThumbnav;\n }\n}\n"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@italia/thumbnav",
|
|
3
3
|
"description": "Web component it-thumbnav del Design system .italia",
|
|
4
|
-
"version": "1.0.0-
|
|
4
|
+
"version": "1.0.0-beta.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -34,37 +34,37 @@
|
|
|
34
34
|
"LICENSE",
|
|
35
35
|
"custom-elements.json"
|
|
36
36
|
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"analyze": "cem analyze --litelement --exclude dist",
|
|
39
|
+
"build": "rollup --config rollup.config.js",
|
|
40
|
+
"clean": "rimraf node_modules .turbo .rollup.cache dist coverage",
|
|
41
|
+
"prepublish": "pnpm build",
|
|
42
|
+
"lint": "eslint --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint \"styles/**/*.scss\" \"src/**/*.scss\" && prettier \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" --check",
|
|
43
|
+
"format": "eslint --fix --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint --fix \"styles/**/*.scss\" \"src/**/*.scss\" && prettier --write \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\"",
|
|
44
|
+
"test": "wtr --coverage --node-resolve --config web-test-runner.config.js",
|
|
45
|
+
"test:watch": "wtr --coverage --node-resolve --config web-test-runner.config.js --watch"
|
|
46
|
+
},
|
|
37
47
|
"dependencies": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
48
|
+
"@italia/globals": "workspace:^",
|
|
49
|
+
"bootstrap-italia": "catalog:",
|
|
50
|
+
"lit": "catalog:"
|
|
41
51
|
},
|
|
42
52
|
"devDependencies": {
|
|
43
53
|
"@custom-elements-manifest/analyzer": "^0.10.3",
|
|
44
|
-
"@
|
|
54
|
+
"@italia/test-config": "workspace:^",
|
|
55
|
+
"@italia/typescript-config": "workspace:^",
|
|
56
|
+
"@open-wc/testing": "catalog:",
|
|
45
57
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
46
58
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
47
|
-
"@types/mocha": "
|
|
48
|
-
"@web/test-runner": "
|
|
59
|
+
"@types/mocha": "catalog:",
|
|
60
|
+
"@web/test-runner": "catalog:",
|
|
49
61
|
"rimraf": "^6.0.1",
|
|
50
62
|
"rollup": "^4.31.0",
|
|
51
63
|
"rollup-plugin-scss-lit": "^2.1.0",
|
|
52
|
-
"sass": "
|
|
64
|
+
"sass": "catalog:",
|
|
53
65
|
"stylelint": "^16.19.1",
|
|
54
66
|
"tslib": "^2.8.1",
|
|
55
|
-
"typescript": "
|
|
56
|
-
"@italia/test-config": "^0.0.0",
|
|
57
|
-
"@italia/typescript-config": "^0.0.0"
|
|
67
|
+
"typescript": "catalog:"
|
|
58
68
|
},
|
|
59
|
-
"customElements": "custom-elements.json"
|
|
60
|
-
|
|
61
|
-
"analyze": "cem analyze --litelement --exclude dist",
|
|
62
|
-
"build": "rollup --config rollup.config.js",
|
|
63
|
-
"clean": "rimraf node_modules .turbo .rollup.cache dist coverage",
|
|
64
|
-
"prepublish": "pnpm build",
|
|
65
|
-
"lint": "eslint --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint \"styles/**/*.scss\" \"src/**/*.scss\" && prettier \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" --check",
|
|
66
|
-
"format": "eslint --fix --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint --fix \"styles/**/*.scss\" \"src/**/*.scss\" && prettier --write \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\"",
|
|
67
|
-
"test": "wtr --coverage --node-resolve --config web-test-runner.config.js",
|
|
68
|
-
"test:watch": "wtr --coverage --node-resolve --config web-test-runner.config.js --watch"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
69
|
+
"customElements": "custom-elements.json"
|
|
70
|
+
}
|
package/styles/globals.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use 'bootstrap-italia/src/scss/base/config' as *;
|
|
2
|
+
@use 'bootstrap-italia/src/scss/components/thumbnav' as *;
|
|
2
3
|
|
|
3
4
|
// Zoom immagine al passaggio del mouse:
|
|
4
5
|
// non è gestibile da shadow DOM perché richiede di stilizzare
|
package/LICENSE
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2025, the respective contributors, as shown by the AUTHORS file.
|
|
2
|
-
|
|
3
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
4
|
-
|
|
5
|
-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
6
|
-
|
|
7
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
-
|
|
9
|
-
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
|
-
|
|
11
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|