@italia/notification 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.
package/AUTHORS ADDED
@@ -0,0 +1,3 @@
1
+ Copyright (c) 2025 Dipartimento per la trasformazione digitale - Presidenza del Consiglio dei Ministri
2
+
3
+ The version control system provides attribution for specific lines of code.
package/LICENSE ADDED
@@ -0,0 +1,11 @@
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.
package/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # \<it-notification>
2
+
3
+ This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm i @italia/notification
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```html
14
+ <script type="module">
15
+ import '@italia/notification';
16
+ </script>
17
+
18
+ <it-notification></it-notification>
19
+ ```
20
+
21
+ ## Linting and formatting
22
+
23
+ To scan the project for linting and formatting errors, run
24
+
25
+ ```bash
26
+ npm run lint
27
+ ```
28
+
29
+ To automatically fix linting and formatting errors, run
30
+
31
+ ```bash
32
+ npm run format
33
+ ```
34
+
35
+ ## Testing with Web Test Runner
36
+
37
+ To execute a single test run:
38
+
39
+ ```bash
40
+ npm run test
41
+ ```
42
+
43
+ To run the tests in interactive watch mode run:
44
+
45
+ ```bash
46
+ npm run test:watch
47
+ ```
48
+
49
+ ## Demoing with Storybook
50
+
51
+ To run a local instance of Storybook for your component, run
52
+
53
+ ```bash
54
+ npm run storybook
55
+ ```
56
+
57
+ To build a production version of Storybook, run
58
+
59
+ ```bash
60
+ npm run storybook:build
61
+ ```
62
+
63
+ ## Tooling configs
64
+
65
+ For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
66
+
67
+ If you customize the configuration a lot, you can consider moving them to individual files.
68
+
69
+ ## Local Demo with `web-dev-server`
70
+
71
+ ```bash
72
+ npm start
73
+ ```
74
+
75
+ To run a local development server that serves the basic demo located in `demo/index.html`
@@ -0,0 +1,524 @@
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": "ItNotification",
13
+ "declaration": {
14
+ "name": "ItNotification",
15
+ "module": "./it-notification.js"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/it-notification.ts",
23
+ "declarations": [
24
+ {
25
+ "kind": "class",
26
+ "description": "",
27
+ "name": "ItNotification",
28
+ "members": [
29
+ {
30
+ "kind": "field",
31
+ "name": "CLASS_NAME_FADE",
32
+ "type": {
33
+ "text": "string"
34
+ },
35
+ "static": true,
36
+ "default": "'fade'"
37
+ },
38
+ {
39
+ "kind": "field",
40
+ "name": "CLASS_NAME_SHOW",
41
+ "type": {
42
+ "text": "string"
43
+ },
44
+ "static": true,
45
+ "default": "'show'"
46
+ },
47
+ {
48
+ "kind": "field",
49
+ "name": "TRANSITION_DURATION",
50
+ "type": {
51
+ "text": "number"
52
+ },
53
+ "static": true,
54
+ "default": "150"
55
+ },
56
+ {
57
+ "kind": "field",
58
+ "name": "headingLevel",
59
+ "type": {
60
+ "text": "NotificationHeadingLevel"
61
+ },
62
+ "default": "'h2'",
63
+ "attribute": "heading-level"
64
+ },
65
+ {
66
+ "kind": "field",
67
+ "name": "icon",
68
+ "type": {
69
+ "text": "string | undefined"
70
+ },
71
+ "attribute": "icon",
72
+ "reflects": true
73
+ },
74
+ {
75
+ "kind": "field",
76
+ "name": "status",
77
+ "type": {
78
+ "text": "NotificationStatus | undefined"
79
+ },
80
+ "attribute": "status"
81
+ },
82
+ {
83
+ "kind": "field",
84
+ "name": "dismissable",
85
+ "type": {
86
+ "text": "boolean"
87
+ },
88
+ "default": "false",
89
+ "attribute": "dismissable",
90
+ "reflects": true
91
+ },
92
+ {
93
+ "kind": "field",
94
+ "name": "fade",
95
+ "type": {
96
+ "text": "boolean"
97
+ },
98
+ "default": "true",
99
+ "attribute": "fade",
100
+ "reflects": true
101
+ },
102
+ {
103
+ "kind": "field",
104
+ "name": "fix",
105
+ "type": {
106
+ "text": "NotificationFix | undefined"
107
+ },
108
+ "attribute": "fix"
109
+ },
110
+ {
111
+ "kind": "field",
112
+ "name": "timeout",
113
+ "type": {
114
+ "text": "number"
115
+ },
116
+ "default": "3000",
117
+ "attribute": "timeout"
118
+ },
119
+ {
120
+ "kind": "field",
121
+ "name": "container",
122
+ "type": {
123
+ "text": "HTMLElement"
124
+ }
125
+ },
126
+ {
127
+ "kind": "field",
128
+ "name": "isShown",
129
+ "type": {
130
+ "text": "boolean"
131
+ },
132
+ "default": "false"
133
+ },
134
+ {
135
+ "kind": "field",
136
+ "name": "isTransitioning",
137
+ "type": {
138
+ "text": "boolean"
139
+ },
140
+ "default": "false"
141
+ },
142
+ {
143
+ "kind": "method",
144
+ "name": "show",
145
+ "privacy": "public",
146
+ "parameters": [
147
+ {
148
+ "name": "timeout",
149
+ "optional": true,
150
+ "type": {
151
+ "text": "number"
152
+ }
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "kind": "method",
158
+ "name": "hide",
159
+ "privacy": "public"
160
+ },
161
+ {
162
+ "kind": "method",
163
+ "name": "getHeadingLevel",
164
+ "privacy": "protected",
165
+ "return": {
166
+ "type": {
167
+ "text": "NotificationHeadingLevel"
168
+ }
169
+ }
170
+ }
171
+ ],
172
+ "attributes": [
173
+ {
174
+ "name": "heading-level",
175
+ "type": {
176
+ "text": "NotificationHeadingLevel"
177
+ },
178
+ "default": "'h2'",
179
+ "fieldName": "headingLevel"
180
+ },
181
+ {
182
+ "name": "icon",
183
+ "type": {
184
+ "text": "string | undefined"
185
+ },
186
+ "fieldName": "icon"
187
+ },
188
+ {
189
+ "name": "status",
190
+ "type": {
191
+ "text": "NotificationStatus | undefined"
192
+ },
193
+ "fieldName": "status"
194
+ },
195
+ {
196
+ "name": "dismissable",
197
+ "type": {
198
+ "text": "boolean"
199
+ },
200
+ "default": "false",
201
+ "fieldName": "dismissable"
202
+ },
203
+ {
204
+ "name": "fade",
205
+ "type": {
206
+ "text": "boolean"
207
+ },
208
+ "default": "true",
209
+ "fieldName": "fade"
210
+ },
211
+ {
212
+ "name": "fix",
213
+ "type": {
214
+ "text": "NotificationFix | undefined"
215
+ },
216
+ "fieldName": "fix"
217
+ },
218
+ {
219
+ "name": "timeout",
220
+ "type": {
221
+ "text": "number"
222
+ },
223
+ "default": "3000",
224
+ "fieldName": "timeout"
225
+ }
226
+ ],
227
+ "superclass": {
228
+ "name": "BaseLocalizedComponent",
229
+ "package": "@italia/globals"
230
+ },
231
+ "tagName": "it-notification",
232
+ "customElement": true
233
+ }
234
+ ],
235
+ "exports": [
236
+ {
237
+ "kind": "js",
238
+ "name": "ItNotification",
239
+ "declaration": {
240
+ "name": "ItNotification",
241
+ "module": "src/it-notification.ts"
242
+ }
243
+ },
244
+ {
245
+ "kind": "custom-element-definition",
246
+ "name": "it-notification",
247
+ "declaration": {
248
+ "name": "ItNotification",
249
+ "module": "src/it-notification.ts"
250
+ }
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "kind": "javascript-module",
256
+ "path": "src/types.ts",
257
+ "declarations": [
258
+ {
259
+ "kind": "variable",
260
+ "name": "NOTIFICATION_HEADING_LEVELS",
261
+ "type": {
262
+ "text": "['h2', 'h3', 'h4', 'h5', 'h6']"
263
+ },
264
+ "default": "['h2', 'h3', 'h4', 'h5', 'h6']"
265
+ },
266
+ {
267
+ "kind": "variable",
268
+ "name": "NOTIFICATION_STATUS",
269
+ "type": {
270
+ "text": "['success', 'error', 'warning', 'info']"
271
+ },
272
+ "default": "['success', 'error', 'warning', 'info']"
273
+ },
274
+ {
275
+ "kind": "variable",
276
+ "name": "NOTIFICATION_STATUS_COLORS",
277
+ "type": {
278
+ "text": "Record<NotificationStatus, string>"
279
+ },
280
+ "default": "{ success: 'success', error: 'danger', warning: 'warning', info: 'primary', }"
281
+ },
282
+ {
283
+ "kind": "variable",
284
+ "name": "NOTIFICATION_FIX",
285
+ "type": {
286
+ "text": "['top', 'bottom', 'left', 'right']"
287
+ },
288
+ "default": "['top', 'bottom', 'left', 'right']"
289
+ }
290
+ ],
291
+ "exports": [
292
+ {
293
+ "kind": "js",
294
+ "name": "NOTIFICATION_HEADING_LEVELS",
295
+ "declaration": {
296
+ "name": "NOTIFICATION_HEADING_LEVELS",
297
+ "module": "src/types.ts"
298
+ }
299
+ },
300
+ {
301
+ "kind": "js",
302
+ "name": "NOTIFICATION_STATUS",
303
+ "declaration": {
304
+ "name": "NOTIFICATION_STATUS",
305
+ "module": "src/types.ts"
306
+ }
307
+ },
308
+ {
309
+ "kind": "js",
310
+ "name": "NOTIFICATION_STATUS_COLORS",
311
+ "declaration": {
312
+ "name": "NOTIFICATION_STATUS_COLORS",
313
+ "module": "src/types.ts"
314
+ }
315
+ },
316
+ {
317
+ "kind": "js",
318
+ "name": "NOTIFICATION_FIX",
319
+ "declaration": {
320
+ "name": "NOTIFICATION_FIX",
321
+ "module": "src/types.ts"
322
+ }
323
+ }
324
+ ]
325
+ },
326
+ {
327
+ "kind": "javascript-module",
328
+ "path": "stories/it-notification.stories.ts",
329
+ "declarations": [
330
+ {
331
+ "kind": "variable",
332
+ "name": "meta",
333
+ "default": "{ title: 'Componenti/Notification', tags: ['a11y-ok', 'web-component', 'alpha'], component: 'it-notification', parameters: { layout: 'padded', }, // decorators: [(story) => html` <div class=\"container p-0\">${story()}</div> `], args: { icon: 'it-info-circle', dismissable: false, }, argTypes: { headingLevel: { name: 'heading-level', control: 'select', type: 'string', options: [undefined, ...NOTIFICATION_HEADING_LEVELS], description: 'Livello di heading da usare per il titolo della notifica. Se non specificato, viene usato h2. Vedi la sezione \"Accessibilità\" della documentazione per maggiori dettagli.', }, icon: { name: 'icon', control: 'text', description: \"Nome dell'icona da visualizzare nella notifica.\", }, status: { control: 'select', type: 'string', options: [undefined, ...NOTIFICATION_STATUS], description: 'Stato della notifica, che ne influenza il colore.', }, dismissable: { control: 'boolean', type: 'boolean', description: 'Se presente, mostra un pulsante per chiudere la notifica.', }, fix: { control: 'select', type: 'string', options: [undefined, ...NOTIFICATION_FIX], description: 'Fissa la posizione della notifica nel lato scelto dello schermo.', }, timeout: { control: 'number', type: 'number', description: 'Tempo di permanenza della notifica, espresso in millisecondi.', }, }, } satisfies Meta<NotificationProps>"
334
+ },
335
+ {
336
+ "kind": "variable",
337
+ "name": "EsempioInterattivo",
338
+ "type": {
339
+ "text": "Story"
340
+ },
341
+ "default": "{ name: 'Esempio interattivo', tags: ['!dev'], parameters: { docs: { canvas: { sourceState: 'shown', }, }, }, decorators: [ (story) => html` <div class=\"test-docs\" style=\"display:grid;gap:24px;grid-template-columns:1fr 1fr;\">${story()}</div> `, ], render: (args) => html` <div> <p class=\"mb-4\"><strong>Notification standard</strong></p> <it-notification heading-level=${ifDefined(args.headingLevel)} status=${ifDefined(args.status)} ?dismissable=${args.dismissable} ?fix=${args.fix} timeout=${ifDefined(args.timeout || undefined)} > <span slot=\"title\">Titolo notifica</span> </it-notification> </div> <div> <p class=\"mb-4\"><strong>Notification con icona</strong></p> <it-notification heading-level=${ifDefined(args.headingLevel)} icon=${ifDefined(args.icon || undefined)} status=${ifDefined(args.status)} ?dismissable=${args.dismissable} ?fix=${args.fix} timeout=${ifDefined(args.timeout || undefined)} > <span slot=\"title\">Titolo notifica</span> </it-notification> </div> `, }"
342
+ },
343
+ {
344
+ "kind": "variable",
345
+ "name": "ConMessaggio",
346
+ "type": {
347
+ "text": "Story"
348
+ },
349
+ "default": "{ name: 'Notifica con messaggio', decorators: [ (story) => html` <div class=\"test-docs\" style=\"display:grid;gap:24px;grid-template-columns:1fr 1fr;\">${story()}</div> `, ], argTypes: { ...disabledControls(['headingLevel', 'status']) }, render: (args) => html` <div> <p class=\"mb-4\"><strong>Notifica standard con testo</strong></p> <it-notification heading-level=${ifDefined(args.headingLevel)} status=${ifDefined(args.status)}> <span slot=\"title\">Titolo notifica</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> </div> <div> <p class=\"mb-4\"><strong>Notifica con icona e testo</strong></p> <it-notification heading-level=${ifDefined(args.headingLevel)} icon=${ifDefined(args.icon || undefined)} status=${ifDefined(args.status)} > <span slot=\"title\">Titolo notifica</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> </div> `, }"
350
+ },
351
+ {
352
+ "kind": "variable",
353
+ "name": "Eliminabili",
354
+ "type": {
355
+ "text": "Story"
356
+ },
357
+ "default": "{ decorators: [ (story) => html` <div class=\"test-docs\" style=\"display:grid;gap:24px;grid-template-columns:1fr 1fr;\">${story()}</div> `, ], argTypes: { ...disabledControls() }, render: (args) => html` <div> <p class=\"mb-4\"><strong>Notification standard</strong></p> <it-notification dismissable> <span slot=\"title\">Titolo notifica</span> </it-notification> </div> <div> <p class=\"mb-4\"><strong>Notification con icona</strong></p> <it-notification icon=${ifDefined(args.icon || undefined)} status=\"success\" dismissable> <span slot=\"title\">Titolo notifica</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> </div> `, }"
358
+ },
359
+ {
360
+ "kind": "variable",
361
+ "name": "Stati",
362
+ "type": {
363
+ "text": "Story"
364
+ },
365
+ "default": "{ decorators: [ (story) => html` <div class=\"test-docs\" style=\"display:grid;gap:24px;grid-template-columns:1fr 1fr;\">${story()}</div> `, ], argTypes: { ...disabledControls() }, render: () => html` <div> <p class=\"mb-4\"><strong>Successo</strong></p> <it-notification status=\"success\" icon=\"it-check-circle\"> <span slot=\"title\">Titolo notifica</span> </it-notification> </div> <div> <p class=\"mb-4\"><strong>Errore</strong></p> <it-notification status=\"error\" icon=\"it-close-circle\"> <span slot=\"title\">Titolo notifica</span> </it-notification> </div> <div> <p class=\"mb-4\"><strong>Info</strong></p> <it-notification status=\"info\" icon=\"it-info-circle\"> <span slot=\"title\">Titolo notifica</span> </it-notification> </div> <div> <p class=\"mb-4\"><strong>Precauzione</strong></p> <it-notification status=\"warning\" icon=\"it-error\"> <span slot=\"title\">Titolo notifica</span> </it-notification> </div> `, }"
366
+ },
367
+ {
368
+ "kind": "variable",
369
+ "name": "PosizionePredefinita",
370
+ "type": {
371
+ "text": "Story"
372
+ },
373
+ "default": "{ name: 'Posizione predefinita', decorators: [(story) => html` <div class=\"test-desktop\">${story()}</div> `], argTypes: { ...disabledControls() }, render: () => html` <it-notification icon=\"it-check-circle\" status=\"success\"> <span slot=\"title\">Titolo notifica</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> `, }"
374
+ },
375
+ {
376
+ "kind": "variable",
377
+ "name": "PosizioneFissa",
378
+ "type": {
379
+ "text": "Story"
380
+ },
381
+ "default": "{ name: 'Posizione fissa', parameters: { layout: 'fullscreen', }, decorators: [(story) => html` <div class=\"test-desktop\">${story()}</div> `], argTypes: { ...disabledControls() }, render: () => html` <it-notification icon=\"it-check-circle\" status=\"success\" fix=\"top\"> <span slot=\"title\">Top fix</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> <it-notification icon=\"it-check-circle\" status=\"success\" fix=\"bottom\"> <span slot=\"title\">Bottom fix</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> <it-notification icon=\"it-check-circle\" status=\"success\" fix=\"left\"> <span slot=\"title\">Titolo notifica</span> </it-notification> <it-notification icon=\"it-check-circle\" status=\"success\" fix=\"right\"> <span slot=\"title\">Titolo notifica</span> </it-notification> `, }"
382
+ },
383
+ {
384
+ "kind": "variable",
385
+ "name": "Attivazione",
386
+ "type": {
387
+ "text": "Story"
388
+ },
389
+ "default": "{ name: 'A scomparsa automatica', decorators: [(story) => html` <div style=\"position:relative;width:100%;height:400px\">${story()}</div> `], argTypes: { ...disabledControls(['timeout']) }, render: (args) => html` <div id=\"esempio-attivazione\"> <it-button type=\"button\" variant=\"primary\">Inviami una notifica</it-button> <it-button type=\"button\" variant=\"primary\" id=\"five-sec\"> Inviami una notifica (durata 5 secondi) </it-button> <it-notification icon=\"it-check-circle\" status=\"success\" timeout=\"${ifDefined(args.timeout || undefined)}\"> <span slot=\"title\">Titolo notifica</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> </div> <script> document.querySelector('#esempio-attivazione it-button').addEventListener('click', () => { document.querySelector('#esempio-attivazione it-notification').show(); }); document.querySelector('#esempio-attivazione it-button#five-sec').addEventListener('click', () => { document.querySelector('#esempio-attivazione it-notification').show(5000); }); </script> `, }"
390
+ },
391
+ {
392
+ "kind": "variable",
393
+ "name": "AttivazioneEdEliminazione",
394
+ "type": {
395
+ "text": "Story"
396
+ },
397
+ "default": "{ name: 'A scomparsa manuale', decorators: [(story) => html` <div style=\"position:relative;width:100%;height:400px\">${story()}</div> `], argTypes: { ...disabledControls() }, render: () => html` <div id=\"esempio-eliminazione\"> <it-button type=\"button\" variant=\"primary\">Inviami una notifica</it-button> <it-button type=\"button\" variant=\"primary\" id=\"delete-notification\"> Rimuovi notifica </it-button> <it-notification icon=\"it-check-circle\" status=\"success\" dismissable> <span slot=\"title\">Titolo notifica</span> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p> </it-notification> </div> <script> document.querySelector('#esempio-eliminazione it-button').addEventListener('click', () => { document.querySelector('#esempio-eliminazione it-notification').show(); }); document.querySelector('#esempio-eliminazione it-button#delete-notification').addEventListener('click', () => { document.querySelector('#esempio-eliminazione it-notification').hide(); }); </script> `, }"
398
+ }
399
+ ],
400
+ "exports": [
401
+ {
402
+ "kind": "js",
403
+ "name": "default",
404
+ "declaration": {
405
+ "name": "meta",
406
+ "module": "stories/it-notification.stories.ts"
407
+ }
408
+ },
409
+ {
410
+ "kind": "js",
411
+ "name": "EsempioInterattivo",
412
+ "declaration": {
413
+ "name": "EsempioInterattivo",
414
+ "module": "stories/it-notification.stories.ts"
415
+ }
416
+ },
417
+ {
418
+ "kind": "js",
419
+ "name": "ConMessaggio",
420
+ "declaration": {
421
+ "name": "ConMessaggio",
422
+ "module": "stories/it-notification.stories.ts"
423
+ }
424
+ },
425
+ {
426
+ "kind": "js",
427
+ "name": "Eliminabili",
428
+ "declaration": {
429
+ "name": "Eliminabili",
430
+ "module": "stories/it-notification.stories.ts"
431
+ }
432
+ },
433
+ {
434
+ "kind": "js",
435
+ "name": "Stati",
436
+ "declaration": {
437
+ "name": "Stati",
438
+ "module": "stories/it-notification.stories.ts"
439
+ }
440
+ },
441
+ {
442
+ "kind": "js",
443
+ "name": "PosizionePredefinita",
444
+ "declaration": {
445
+ "name": "PosizionePredefinita",
446
+ "module": "stories/it-notification.stories.ts"
447
+ }
448
+ },
449
+ {
450
+ "kind": "js",
451
+ "name": "PosizioneFissa",
452
+ "declaration": {
453
+ "name": "PosizioneFissa",
454
+ "module": "stories/it-notification.stories.ts"
455
+ }
456
+ },
457
+ {
458
+ "kind": "js",
459
+ "name": "Attivazione",
460
+ "declaration": {
461
+ "name": "Attivazione",
462
+ "module": "stories/it-notification.stories.ts"
463
+ }
464
+ },
465
+ {
466
+ "kind": "js",
467
+ "name": "AttivazioneEdEliminazione",
468
+ "declaration": {
469
+ "name": "AttivazioneEdEliminazione",
470
+ "module": "stories/it-notification.stories.ts"
471
+ }
472
+ }
473
+ ]
474
+ },
475
+ {
476
+ "kind": "javascript-module",
477
+ "path": "src/locales/en.ts",
478
+ "declarations": [
479
+ {
480
+ "kind": "variable",
481
+ "name": "translation",
482
+ "type": {
483
+ "text": "DefaultTranslation"
484
+ },
485
+ "default": "{ $code: 'en', $name: 'English', $dir: 'ltr', // Close button label notification_close_label: 'Close notification', }"
486
+ }
487
+ ],
488
+ "exports": [
489
+ {
490
+ "kind": "js",
491
+ "name": "default",
492
+ "declaration": {
493
+ "name": "translation",
494
+ "module": "src/locales/en.ts"
495
+ }
496
+ }
497
+ ]
498
+ },
499
+ {
500
+ "kind": "javascript-module",
501
+ "path": "src/locales/it.ts",
502
+ "declarations": [
503
+ {
504
+ "kind": "variable",
505
+ "name": "translation",
506
+ "type": {
507
+ "text": "DefaultTranslation"
508
+ },
509
+ "default": "{ $code: 'it', $name: 'Italiano', $dir: 'ltr', // Close button label notification_close_label: 'Chiudi notifica', }"
510
+ }
511
+ ],
512
+ "exports": [
513
+ {
514
+ "kind": "js",
515
+ "name": "default",
516
+ "declaration": {
517
+ "name": "translation",
518
+ "module": "src/locales/it.ts"
519
+ }
520
+ }
521
+ ]
522
+ }
523
+ ]
524
+ }
@@ -0,0 +1,2 @@
1
+ export { ItNotification } from './it-notification.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,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { ItNotification } from './it-notification.js';
2
+ import 'lit/directive.js';
3
+ import 'lit';
4
+ import 'lit/decorators.js';
5
+ import 'lit/static-html.js';
6
+ import 'lit/directives/if-defined.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,30 @@
1
+ import { BaseLocalizedComponent } from '@italia/globals';
2
+ import { PropertyValues } from 'lit';
3
+ import { type NotificationFix, type NotificationHeadingLevel, type NotificationStatus } from './types.js';
4
+ export declare class ItNotification extends BaseLocalizedComponent {
5
+ static styles: import("lit").CSSResultGroup;
6
+ static CLASS_NAME_FADE: string;
7
+ static CLASS_NAME_SHOW: string;
8
+ static TRANSITION_DURATION: number;
9
+ headingLevel: NotificationHeadingLevel;
10
+ icon?: string;
11
+ status?: NotificationStatus;
12
+ dismissable: boolean;
13
+ fade: boolean;
14
+ fix?: NotificationFix;
15
+ timeout: number;
16
+ container: HTMLElement;
17
+ isShown: boolean;
18
+ isTransitioning: boolean;
19
+ protected updated(_changedProperties: PropertyValues): void;
20
+ show(timeout?: number): void;
21
+ hide(): void;
22
+ protected getHeadingLevel(): NotificationHeadingLevel;
23
+ render(): import("lit").TemplateResult<1>;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ 'it-notification': ItNotification;
28
+ }
29
+ }
30
+ //# sourceMappingURL=it-notification.d.ts.map