@italia/thumbnav 1.0.0-beta.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -37
- package/custom-elements.json +232 -232
- package/dist/src/index.js +1 -1
- package/dist/src/it-thumbnav-item.js +5 -1
- package/dist/src/it-thumbnav-item.js.map +1 -1
- package/dist/src/it-thumbnav.js +5 -1
- package/dist/src/it-thumbnav.js.map +1 -1
- package/package.json +23 -23
- 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",
|
|
@@ -314,238 +546,6 @@
|
|
|
314
546
|
}
|
|
315
547
|
}
|
|
316
548
|
]
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"kind": "javascript-module",
|
|
320
|
-
"path": "stories/it-thumbnav.stories.ts",
|
|
321
|
-
"declarations": [
|
|
322
|
-
{
|
|
323
|
-
"kind": "variable",
|
|
324
|
-
"name": "meta",
|
|
325
|
-
"type": {
|
|
326
|
-
"text": "Meta<ThumbnnavProps>"
|
|
327
|
-
},
|
|
328
|
-
"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', 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> \\`\\`\\` `, }, }, }, }"
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"kind": "variable",
|
|
332
|
-
"name": "EsempioInterattivo",
|
|
333
|
-
"type": {
|
|
334
|
-
"text": "Story"
|
|
335
|
-
},
|
|
336
|
-
"default": "{ name: 'Esempio interattivo', tags: ['!dev'], parameters: { docs: { canvas: { sourceState: 'hidden' } } }, render: (args) => renderComponent(args), }"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"kind": "variable",
|
|
340
|
-
"name": "VersioneSmall",
|
|
341
|
-
"type": {
|
|
342
|
-
"text": "Story"
|
|
343
|
-
},
|
|
344
|
-
"default": "{ name: 'Versione small', render: () => html` <it-thumbnav small> ${renderItems(3)} </it-thumbnav> `, }"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"kind": "variable",
|
|
348
|
-
"name": "HoverSenzaZoom",
|
|
349
|
-
"type": {
|
|
350
|
-
"text": "Story"
|
|
351
|
-
},
|
|
352
|
-
"default": "{ name: 'Hover senza zoom', render: () => html` <it-thumbnav hover=\"nozoom\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"kind": "variable",
|
|
356
|
-
"name": "HoverLayerNero",
|
|
357
|
-
"type": {
|
|
358
|
-
"text": "Story"
|
|
359
|
-
},
|
|
360
|
-
"default": "{ name: 'Hover con layer nero', render: () => html` <it-thumbnav hover=\"black\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"kind": "variable",
|
|
364
|
-
"name": "HoverLayerPrimary",
|
|
365
|
-
"type": {
|
|
366
|
-
"text": "Story"
|
|
367
|
-
},
|
|
368
|
-
"default": "{ name: 'Hover con layer primary', render: () => html` <it-thumbnav hover=\"primary\"> ${renderItems(3)} </it-thumbnav> `, }"
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"kind": "variable",
|
|
372
|
-
"name": "Verticale",
|
|
373
|
-
"type": {
|
|
374
|
-
"text": "Story"
|
|
375
|
-
},
|
|
376
|
-
"default": "{ name: 'Thumbnav verticale', render: () => html` <it-thumbnav vertical> ${renderItems(3)} </it-thumbnav> `, }"
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"kind": "variable",
|
|
380
|
-
"name": "OverlayInferiore",
|
|
381
|
-
"type": {
|
|
382
|
-
"text": "Story"
|
|
383
|
-
},
|
|
384
|
-
"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> `, }"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
"kind": "variable",
|
|
388
|
-
"name": "OverlaySuperiore",
|
|
389
|
-
"type": {
|
|
390
|
-
"text": "Story"
|
|
391
|
-
},
|
|
392
|
-
"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> `, }"
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"kind": "variable",
|
|
396
|
-
"name": "OverlayVerticaleLeft",
|
|
397
|
-
"type": {
|
|
398
|
-
"text": "Story"
|
|
399
|
-
},
|
|
400
|
-
"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> `, }"
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
"kind": "variable",
|
|
404
|
-
"name": "OverlayVerticaleRight",
|
|
405
|
-
"type": {
|
|
406
|
-
"text": "Story"
|
|
407
|
-
},
|
|
408
|
-
"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> `, }"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"kind": "variable",
|
|
412
|
-
"name": "GrigliaFissa",
|
|
413
|
-
"type": {
|
|
414
|
-
"text": "Story"
|
|
415
|
-
},
|
|
416
|
-
"default": "{ name: 'Griglia a larghezza fissa', parameters: { pageLayout: 'w-100' }, render: () => html` <it-thumbnav fixed> ${renderItems(5)} </it-thumbnav> `, }"
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
"kind": "variable",
|
|
420
|
-
"name": "GrigliaAutomatica3",
|
|
421
|
-
"type": {
|
|
422
|
-
"text": "Story"
|
|
423
|
-
},
|
|
424
|
-
"default": "{ name: 'Griglia automatica - 3 per riga', parameters: { pageLayout: 'w-100' }, render: () => html` <it-thumbnav auto=\"3\"> ${renderItems(5)} </it-thumbnav> `, }"
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"kind": "variable",
|
|
428
|
-
"name": "GrigliaAutomatica5",
|
|
429
|
-
"type": {
|
|
430
|
-
"text": "Story"
|
|
431
|
-
},
|
|
432
|
-
"default": "{ name: 'Griglia automatica - 5 per riga', parameters: { pageLayout: 'w-100' }, render: () => html` <it-thumbnav auto=\"5\"> ${renderItems(5)} </it-thumbnav> `, }"
|
|
433
|
-
}
|
|
434
|
-
],
|
|
435
|
-
"exports": [
|
|
436
|
-
{
|
|
437
|
-
"kind": "js",
|
|
438
|
-
"name": "default",
|
|
439
|
-
"declaration": {
|
|
440
|
-
"name": "meta",
|
|
441
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"kind": "js",
|
|
446
|
-
"name": "EsempioInterattivo",
|
|
447
|
-
"declaration": {
|
|
448
|
-
"name": "EsempioInterattivo",
|
|
449
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
450
|
-
}
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
"kind": "js",
|
|
454
|
-
"name": "VersioneSmall",
|
|
455
|
-
"declaration": {
|
|
456
|
-
"name": "VersioneSmall",
|
|
457
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"kind": "js",
|
|
462
|
-
"name": "HoverSenzaZoom",
|
|
463
|
-
"declaration": {
|
|
464
|
-
"name": "HoverSenzaZoom",
|
|
465
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
"kind": "js",
|
|
470
|
-
"name": "HoverLayerNero",
|
|
471
|
-
"declaration": {
|
|
472
|
-
"name": "HoverLayerNero",
|
|
473
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
"kind": "js",
|
|
478
|
-
"name": "HoverLayerPrimary",
|
|
479
|
-
"declaration": {
|
|
480
|
-
"name": "HoverLayerPrimary",
|
|
481
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
{
|
|
485
|
-
"kind": "js",
|
|
486
|
-
"name": "Verticale",
|
|
487
|
-
"declaration": {
|
|
488
|
-
"name": "Verticale",
|
|
489
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
490
|
-
}
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
"kind": "js",
|
|
494
|
-
"name": "OverlayInferiore",
|
|
495
|
-
"declaration": {
|
|
496
|
-
"name": "OverlayInferiore",
|
|
497
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
"kind": "js",
|
|
502
|
-
"name": "OverlaySuperiore",
|
|
503
|
-
"declaration": {
|
|
504
|
-
"name": "OverlaySuperiore",
|
|
505
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
506
|
-
}
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
"kind": "js",
|
|
510
|
-
"name": "OverlayVerticaleLeft",
|
|
511
|
-
"declaration": {
|
|
512
|
-
"name": "OverlayVerticaleLeft",
|
|
513
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
514
|
-
}
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
"kind": "js",
|
|
518
|
-
"name": "OverlayVerticaleRight",
|
|
519
|
-
"declaration": {
|
|
520
|
-
"name": "OverlayVerticaleRight",
|
|
521
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
"kind": "js",
|
|
526
|
-
"name": "GrigliaFissa",
|
|
527
|
-
"declaration": {
|
|
528
|
-
"name": "GrigliaFissa",
|
|
529
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
"kind": "js",
|
|
534
|
-
"name": "GrigliaAutomatica3",
|
|
535
|
-
"declaration": {
|
|
536
|
-
"name": "GrigliaAutomatica3",
|
|
537
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
538
|
-
}
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
"kind": "js",
|
|
542
|
-
"name": "GrigliaAutomatica5",
|
|
543
|
-
"declaration": {
|
|
544
|
-
"name": "GrigliaAutomatica5",
|
|
545
|
-
"module": "stories/it-thumbnav.stories.ts"
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
]
|
|
549
549
|
}
|
|
550
550
|
]
|
|
551
551
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
3
|
import { property, customElement } from 'lit/decorators.js';
|
|
4
4
|
import 'lit/directive.js';
|
|
@@ -16,6 +16,10 @@ var styles = css`.thumb-nav {
|
|
|
16
16
|
--bsi-thumb-nav-transition-duration: 0.4s;
|
|
17
17
|
--bsi-thumb-nav-transition-duration-hover: 1s;
|
|
18
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 {
|
|
19
23
|
display: flex;
|
|
20
24
|
justify-content: center;
|
|
21
25
|
margin: 0 calc(var(--bsi-thumb-nav-gap) * -1);
|
|
@@ -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, 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":"
|
|
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;;;;"}
|
package/dist/src/it-thumbnav.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
3
|
import { property, query, customElement } from 'lit/decorators.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
@@ -17,6 +17,10 @@ var styles = css`.thumb-nav {
|
|
|
17
17
|
--bsi-thumb-nav-transition-duration: 0.4s;
|
|
18
18
|
--bsi-thumb-nav-transition-duration-hover: 1s;
|
|
19
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 {
|
|
20
24
|
display: flex;
|
|
21
25
|
justify-content: center;
|
|
22
26
|
margin: 0 calc(var(--bsi-thumb-nav-gap) * -1);
|
|
@@ -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, 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":"
|
|
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-beta.
|
|
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": "^1.0.0-beta.0",
|
|
57
|
-
"@italia/typescript-config": "^1.0.0-beta.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/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.
|