@italia/navscroll 1.0.0-alpha.10

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.
@@ -0,0 +1,631 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/index.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "js",
12
+ "name": "ItNavscroll",
13
+ "declaration": {
14
+ "name": "ItNavscroll",
15
+ "module": "./it-navscroll.js"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/it-navscroll.ts",
23
+ "declarations": [
24
+ {
25
+ "kind": "class",
26
+ "description": "",
27
+ "name": "ItNavscroll",
28
+ "members": [
29
+ {
30
+ "kind": "field",
31
+ "name": "breakpoint",
32
+ "type": {
33
+ "text": "number"
34
+ },
35
+ "default": "991",
36
+ "description": "Breakpoint di usabilità (zoom-safe)",
37
+ "attribute": "breakpoint"
38
+ },
39
+ {
40
+ "kind": "field",
41
+ "name": "openLabel",
42
+ "type": {
43
+ "text": "string"
44
+ },
45
+ "default": "'Indice di navigazione'",
46
+ "description": "Label del trigger modale",
47
+ "attribute": "open-label"
48
+ },
49
+ {
50
+ "kind": "field",
51
+ "name": "openAriaLabel",
52
+ "type": {
53
+ "text": "string"
54
+ },
55
+ "default": "'Apri/Chiudi indice di navigazione'",
56
+ "description": "Aria-Label del trigger modale",
57
+ "attribute": "open-aria-label"
58
+ },
59
+ {
60
+ "kind": "field",
61
+ "name": "backLabel",
62
+ "type": {
63
+ "text": "string"
64
+ },
65
+ "default": "'Indietro'",
66
+ "description": "Label per il pulsante di 'Torna indietro' nella modale",
67
+ "attribute": "back-label"
68
+ },
69
+ {
70
+ "kind": "field",
71
+ "name": "for",
72
+ "type": {
73
+ "text": "string | null"
74
+ },
75
+ "default": "null",
76
+ "description": "Selettore del contenitore scrollabile da monitorare per la progress bar",
77
+ "attribute": "for"
78
+ },
79
+ {
80
+ "kind": "field",
81
+ "name": "position",
82
+ "type": {
83
+ "text": "Position"
84
+ },
85
+ "default": "'bottom'",
86
+ "description": "Posizione dello navscroll su mobile quando è chiuso",
87
+ "attribute": "position"
88
+ },
89
+ {
90
+ "kind": "field",
91
+ "name": "sticky",
92
+ "type": {
93
+ "text": "boolean"
94
+ },
95
+ "default": "false",
96
+ "description": "If on desktop you want navscroll to be sticky on top",
97
+ "attribute": "sticky"
98
+ },
99
+ {
100
+ "kind": "field",
101
+ "name": "linePosition",
102
+ "type": {
103
+ "text": "LinePosition"
104
+ },
105
+ "default": "null",
106
+ "description": "Where you want to display separation line on desktop",
107
+ "attribute": "line-position"
108
+ },
109
+ {
110
+ "kind": "field",
111
+ "name": "darkMode",
112
+ "type": {
113
+ "text": "DarkMode"
114
+ },
115
+ "default": "null",
116
+ "description": "If you want dark mode only on mobile or desktop, or both",
117
+ "attribute": "dark-mode"
118
+ },
119
+ {
120
+ "kind": "field",
121
+ "name": "mql",
122
+ "type": {
123
+ "text": "MediaQueryList"
124
+ },
125
+ "privacy": "private"
126
+ },
127
+ {
128
+ "kind": "field",
129
+ "name": "navEl",
130
+ "type": {
131
+ "text": "HTMLElement"
132
+ },
133
+ "privacy": "private"
134
+ },
135
+ {
136
+ "kind": "field",
137
+ "name": "modalEl",
138
+ "type": {
139
+ "text": "HTMLElement | undefined"
140
+ },
141
+ "privacy": "private"
142
+ },
143
+ {
144
+ "kind": "field",
145
+ "name": "mode",
146
+ "type": {
147
+ "text": "'inline' | 'modal'"
148
+ },
149
+ "privacy": "private",
150
+ "default": "'inline'"
151
+ },
152
+ {
153
+ "kind": "field",
154
+ "name": "progressEl",
155
+ "type": {
156
+ "text": "HTMLElement"
157
+ },
158
+ "privacy": "private"
159
+ },
160
+ {
161
+ "kind": "field",
162
+ "name": "scrollContainer",
163
+ "type": {
164
+ "text": "HTMLElement"
165
+ },
166
+ "privacy": "private"
167
+ },
168
+ {
169
+ "kind": "field",
170
+ "name": "wrapper",
171
+ "type": {
172
+ "text": "HTMLElement"
173
+ },
174
+ "privacy": "private"
175
+ },
176
+ {
177
+ "kind": "field",
178
+ "name": "menuWrapper",
179
+ "type": {
180
+ "text": "HTMLElement"
181
+ },
182
+ "privacy": "private"
183
+ },
184
+ {
185
+ "kind": "field",
186
+ "name": "activeTarget",
187
+ "type": {
188
+ "text": "string | null"
189
+ },
190
+ "privacy": "private",
191
+ "default": "null"
192
+ },
193
+ {
194
+ "kind": "field",
195
+ "name": "mediaQuery",
196
+ "privacy": "private",
197
+ "readonly": true
198
+ },
199
+ {
200
+ "kind": "field",
201
+ "name": "onMediaChange",
202
+ "privacy": "private"
203
+ },
204
+ {
205
+ "kind": "method",
206
+ "name": "updateMode",
207
+ "privacy": "public",
208
+ "parameters": [
209
+ {
210
+ "name": "isConstrained",
211
+ "type": {
212
+ "text": "boolean"
213
+ }
214
+ }
215
+ ]
216
+ },
217
+ {
218
+ "kind": "method",
219
+ "name": "enterModal",
220
+ "privacy": "private"
221
+ },
222
+ {
223
+ "kind": "method",
224
+ "name": "exitModal",
225
+ "privacy": "public"
226
+ },
227
+ {
228
+ "kind": "method",
229
+ "name": "createModal",
230
+ "privacy": "private",
231
+ "return": {
232
+ "type": {
233
+ "text": "HTMLElement"
234
+ }
235
+ }
236
+ },
237
+ {
238
+ "kind": "field",
239
+ "name": "scrollContainerTop",
240
+ "privacy": "private",
241
+ "readonly": true
242
+ },
243
+ {
244
+ "kind": "method",
245
+ "name": "initContainers",
246
+ "privacy": "private"
247
+ },
248
+ {
249
+ "kind": "method",
250
+ "name": "setCurrent",
251
+ "privacy": "private",
252
+ "parameters": [
253
+ {
254
+ "name": "hash",
255
+ "type": {
256
+ "text": "string"
257
+ }
258
+ }
259
+ ]
260
+ },
261
+ {
262
+ "kind": "method",
263
+ "name": "updateTriggerText",
264
+ "privacy": "private"
265
+ },
266
+ {
267
+ "kind": "method",
268
+ "name": "onScroll",
269
+ "privacy": "private"
270
+ },
271
+ {
272
+ "kind": "method",
273
+ "name": "scrollHandler",
274
+ "privacy": "private"
275
+ },
276
+ {
277
+ "kind": "method",
278
+ "name": "updateProgress",
279
+ "privacy": "private"
280
+ },
281
+ {
282
+ "kind": "method",
283
+ "name": "attachLinkListeners",
284
+ "privacy": "private"
285
+ },
286
+ {
287
+ "kind": "method",
288
+ "name": "scrollToElement",
289
+ "privacy": "private",
290
+ "parameters": [
291
+ {
292
+ "name": "targetEl",
293
+ "type": {
294
+ "text": "HTMLElement"
295
+ }
296
+ },
297
+ {
298
+ "name": "duration",
299
+ "default": "700"
300
+ },
301
+ {
302
+ "name": "offset",
303
+ "default": "0"
304
+ },
305
+ {
306
+ "name": "callback",
307
+ "optional": true,
308
+ "type": {
309
+ "text": "() => void"
310
+ }
311
+ }
312
+ ]
313
+ }
314
+ ],
315
+ "attributes": [
316
+ {
317
+ "name": "breakpoint",
318
+ "type": {
319
+ "text": "number"
320
+ },
321
+ "default": "991",
322
+ "description": "Breakpoint di usabilità (zoom-safe)",
323
+ "fieldName": "breakpoint"
324
+ },
325
+ {
326
+ "name": "open-label",
327
+ "type": {
328
+ "text": "string"
329
+ },
330
+ "default": "'Indice di navigazione'",
331
+ "description": "Label del trigger modale",
332
+ "fieldName": "openLabel"
333
+ },
334
+ {
335
+ "name": "open-aria-label",
336
+ "type": {
337
+ "text": "string"
338
+ },
339
+ "default": "'Apri/Chiudi indice di navigazione'",
340
+ "description": "Aria-Label del trigger modale",
341
+ "fieldName": "openAriaLabel"
342
+ },
343
+ {
344
+ "name": "back-label",
345
+ "type": {
346
+ "text": "string"
347
+ },
348
+ "default": "'Indietro'",
349
+ "description": "Label per il pulsante di 'Torna indietro' nella modale",
350
+ "fieldName": "backLabel"
351
+ },
352
+ {
353
+ "name": "for",
354
+ "type": {
355
+ "text": "string | null"
356
+ },
357
+ "default": "null",
358
+ "description": "Selettore del contenitore scrollabile da monitorare per la progress bar",
359
+ "fieldName": "for"
360
+ },
361
+ {
362
+ "name": "position",
363
+ "type": {
364
+ "text": "Position"
365
+ },
366
+ "default": "'bottom'",
367
+ "description": "Posizione dello navscroll su mobile quando è chiuso",
368
+ "fieldName": "position"
369
+ },
370
+ {
371
+ "name": "sticky",
372
+ "type": {
373
+ "text": "boolean"
374
+ },
375
+ "default": "false",
376
+ "description": "If on desktop you want navscroll to be sticky on top",
377
+ "fieldName": "sticky"
378
+ },
379
+ {
380
+ "name": "line-position",
381
+ "type": {
382
+ "text": "LinePosition"
383
+ },
384
+ "default": "null",
385
+ "description": "Where you want to display separation line on desktop",
386
+ "fieldName": "linePosition"
387
+ },
388
+ {
389
+ "name": "dark-mode",
390
+ "type": {
391
+ "text": "DarkMode"
392
+ },
393
+ "default": "null",
394
+ "description": "If you want dark mode only on mobile or desktop, or both",
395
+ "fieldName": "darkMode"
396
+ }
397
+ ],
398
+ "superclass": {
399
+ "name": "BaseComponent",
400
+ "package": "@italia/globals"
401
+ },
402
+ "tagName": "it-navscroll",
403
+ "customElement": true
404
+ }
405
+ ],
406
+ "exports": [
407
+ {
408
+ "kind": "js",
409
+ "name": "ItNavscroll",
410
+ "declaration": {
411
+ "name": "ItNavscroll",
412
+ "module": "src/it-navscroll.ts"
413
+ }
414
+ },
415
+ {
416
+ "kind": "custom-element-definition",
417
+ "name": "it-navscroll",
418
+ "declaration": {
419
+ "name": "ItNavscroll",
420
+ "module": "src/it-navscroll.ts"
421
+ }
422
+ }
423
+ ]
424
+ },
425
+ {
426
+ "kind": "javascript-module",
427
+ "path": "src/types.ts",
428
+ "declarations": [
429
+ {
430
+ "kind": "variable",
431
+ "name": "POSITION",
432
+ "type": {
433
+ "text": "['top', 'bottom']"
434
+ },
435
+ "default": "['top', 'bottom']"
436
+ },
437
+ {
438
+ "kind": "variable",
439
+ "name": "LINE_POSITION",
440
+ "type": {
441
+ "text": "[null, 'left', 'right']"
442
+ },
443
+ "default": "[null, 'left', 'right']"
444
+ },
445
+ {
446
+ "kind": "variable",
447
+ "name": "DARK_MODE",
448
+ "type": {
449
+ "text": "[null, 'mobile', 'desktop', 'always']"
450
+ },
451
+ "default": "[null, 'mobile', 'desktop', 'always']"
452
+ }
453
+ ],
454
+ "exports": [
455
+ {
456
+ "kind": "js",
457
+ "name": "POSITION",
458
+ "declaration": {
459
+ "name": "POSITION",
460
+ "module": "src/types.ts"
461
+ }
462
+ },
463
+ {
464
+ "kind": "js",
465
+ "name": "LINE_POSITION",
466
+ "declaration": {
467
+ "name": "LINE_POSITION",
468
+ "module": "src/types.ts"
469
+ }
470
+ },
471
+ {
472
+ "kind": "js",
473
+ "name": "DARK_MODE",
474
+ "declaration": {
475
+ "name": "DARK_MODE",
476
+ "module": "src/types.ts"
477
+ }
478
+ }
479
+ ]
480
+ },
481
+ {
482
+ "kind": "javascript-module",
483
+ "path": "stories/it-navscroll.stories.ts",
484
+ "declarations": [
485
+ {
486
+ "kind": "variable",
487
+ "name": "meta",
488
+ "default": "{ title: 'Componenti/Navscroll', tags: ['web-component', 'a11y-ok'], component: 'it-navscroll', args: { for: '#scroll-container', position: undefined, sticky: undefined, 'line-position': undefined, 'dark-mode': undefined, breakpoint: undefined, 'open-label': undefined, 'open-aria-label': undefined, 'back-label': undefined, }, argTypes: { for: { control: 'text', description: \"Selettore del contenitore scrollabile da monitorare per determinare l'elemento attivo corrente ed eventualmente aggioranre la progress bar. Se non definito, viene usato document.scrollingElement\", }, position: { control: 'select', description: 'Posizione dello navscroll su mobile quando è chiuso', options: POSITION, type: 'string', table: { defaultValue: { summary: 'bottom' } }, }, sticky: { control: 'boolean', type: 'boolean', description: 'Quando abilitato, il nav viene fissato in alto durante lo scroll della pagina (su desktop)', table: { defaultValue: { summary: 'false' } }, }, 'line-position': { control: 'select', description: 'Posizione della linea laterale su desktop', type: 'string', options: LINE_POSITION, }, 'dark-mode': { control: 'select', description: 'Quando mostrare la modalità \"dark\"', type: 'string', options: DARK_MODE, }, breakpoint: { control: 'number', description: 'Breakpoint sotto il quale la navigazione viene collassata', type: 'number', table: { defaultValue: { summary: '991' } }, }, 'open-label': { control: 'text', description: \"Etichetta per l'apertura del menu collassato su mobile, quando nessuna sezione è ancora attiva\", type: 'string', table: { defaultValue: { summary: 'Indice di navigazione' } }, }, 'open-aria-label': { control: 'text', description: 'aria-label per il menu collassato su mobile', type: 'string', table: { defaultValue: { summary: 'Apri/Chiudi indice di navigazione' } }, }, 'back-label': { control: 'text', description: 'Testo da mostrare sul pulsante di chiusura del menu su mobile', type: 'string', table: { defaultValue: { summary: 'Indietro' } }, }, }, parameters: { docs: { canvas: { sourceState: 'hidden', }, description: { component: ` <Description>Lista di link con àncore per navigare velocemente a una sezione specifica della pagina in cui è contenuto il componente.</Description> `, }, }, }, } satisfies Meta<NavscrollProps>"
489
+ },
490
+ {
491
+ "kind": "variable",
492
+ "name": "EsempioInterattivo",
493
+ "type": {
494
+ "text": "Story"
495
+ },
496
+ "default": "{ ...meta, name: 'Esempio', args: {}, render: (params) => html` ${renderComponent({ ...params, _uniqueStoryID: '-story1', })}`, }"
497
+ },
498
+ {
499
+ "kind": "variable",
500
+ "name": "DesktopOnLeft",
501
+ "type": {
502
+ "text": "Story"
503
+ },
504
+ "default": "{ ...meta, name: 'Posizionata a sinistra su desktop', args: { 'line-position': 'right' }, render: (params) => html` ${renderComponent({ ...params, _progress: false, _uniqueStoryID: '-story2-1', })}`, }"
505
+ },
506
+ {
507
+ "kind": "variable",
508
+ "name": "DesktopOnRight",
509
+ "type": {
510
+ "text": "Story"
511
+ },
512
+ "default": "{ ...meta, name: 'Posizionata a destra su desktop', args: { 'line-position': 'left' }, render: (params) => html` ${renderComponent({ ...params, _progress: false, _uniqueStoryID: '-story2-2', })}`, }"
513
+ },
514
+ {
515
+ "kind": "variable",
516
+ "name": "MobileBottom",
517
+ "type": {
518
+ "text": "Story"
519
+ },
520
+ "default": "{ ...meta, name: 'Posizionata a fondo pagina', args: { position: 'bottom' }, render: (params) => html` ${renderComponent({ ...params, _progress: false, _uniqueStoryID: '-story3-1', })}`, }"
521
+ },
522
+ {
523
+ "kind": "variable",
524
+ "name": "MobileTop",
525
+ "type": {
526
+ "text": "Story"
527
+ },
528
+ "default": "{ ...meta, name: 'Posizionata in testa alla pagina', args: { position: 'top' }, render: (params) => html` ${renderComponent({ ...params, _progress: false, _uniqueStoryID: '-story3-2', })}`, }"
529
+ },
530
+ {
531
+ "kind": "variable",
532
+ "name": "Progress",
533
+ "type": {
534
+ "text": "Story"
535
+ },
536
+ "default": "{ ...meta, name: 'Con barra di progresso', render: (params) => html` ${renderComponent({ ...params, _uniqueStoryID: '-story4', })}`, }"
537
+ },
538
+ {
539
+ "kind": "variable",
540
+ "name": "DarkModeStory",
541
+ "type": {
542
+ "text": "Story"
543
+ },
544
+ "default": "{ ...meta, name: 'Variante scura', render: (params) => html` ${renderComponent({ ...params, 'dark-mode': 'always', _progress: false, _uniqueStoryID: '-story5', })}`, }"
545
+ },
546
+ {
547
+ "kind": "variable",
548
+ "name": "MenuInline",
549
+ "type": {
550
+ "text": "Story"
551
+ },
552
+ "default": "{ ...meta, name: 'Menu inline', render: (params) => html` ${renderComponent({ ...params, _inlineMenu: true, _progress: false, _uniqueStoryID: '-story6', })}`, }"
553
+ }
554
+ ],
555
+ "exports": [
556
+ {
557
+ "kind": "js",
558
+ "name": "default",
559
+ "declaration": {
560
+ "name": "meta",
561
+ "module": "stories/it-navscroll.stories.ts"
562
+ }
563
+ },
564
+ {
565
+ "kind": "js",
566
+ "name": "EsempioInterattivo",
567
+ "declaration": {
568
+ "name": "EsempioInterattivo",
569
+ "module": "stories/it-navscroll.stories.ts"
570
+ }
571
+ },
572
+ {
573
+ "kind": "js",
574
+ "name": "DesktopOnLeft",
575
+ "declaration": {
576
+ "name": "DesktopOnLeft",
577
+ "module": "stories/it-navscroll.stories.ts"
578
+ }
579
+ },
580
+ {
581
+ "kind": "js",
582
+ "name": "DesktopOnRight",
583
+ "declaration": {
584
+ "name": "DesktopOnRight",
585
+ "module": "stories/it-navscroll.stories.ts"
586
+ }
587
+ },
588
+ {
589
+ "kind": "js",
590
+ "name": "MobileBottom",
591
+ "declaration": {
592
+ "name": "MobileBottom",
593
+ "module": "stories/it-navscroll.stories.ts"
594
+ }
595
+ },
596
+ {
597
+ "kind": "js",
598
+ "name": "MobileTop",
599
+ "declaration": {
600
+ "name": "MobileTop",
601
+ "module": "stories/it-navscroll.stories.ts"
602
+ }
603
+ },
604
+ {
605
+ "kind": "js",
606
+ "name": "Progress",
607
+ "declaration": {
608
+ "name": "Progress",
609
+ "module": "stories/it-navscroll.stories.ts"
610
+ }
611
+ },
612
+ {
613
+ "kind": "js",
614
+ "name": "DarkModeStory",
615
+ "declaration": {
616
+ "name": "DarkModeStory",
617
+ "module": "stories/it-navscroll.stories.ts"
618
+ }
619
+ },
620
+ {
621
+ "kind": "js",
622
+ "name": "MenuInline",
623
+ "declaration": {
624
+ "name": "MenuInline",
625
+ "module": "stories/it-navscroll.stories.ts"
626
+ }
627
+ }
628
+ ]
629
+ }
630
+ ]
631
+ }
@@ -0,0 +1,2 @@
1
+ export { ItNavscroll } from './it-navscroll.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { ItNavscroll } from './it-navscroll.js';
2
+ import 'lit';
3
+ import 'lit/decorators.js';
4
+ import 'lit/directive.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}