@m3e/snackbar 1.0.0-rc.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.
@@ -0,0 +1,507 @@
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": "*",
13
+ "declaration": {
14
+ "name": "*",
15
+ "package": "\"./Snackbar\""
16
+ }
17
+ },
18
+ {
19
+ "kind": "js",
20
+ "name": "*",
21
+ "declaration": {
22
+ "name": "*",
23
+ "package": "\"./SnackbarElement\""
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "kind": "javascript-module",
30
+ "path": "src/Snackbar.ts",
31
+ "declarations": [
32
+ {
33
+ "kind": "class",
34
+ "description": "Presents short updates about application processes at the bottom of the screen from anywhere in an application.",
35
+ "name": "M3eSnackbar",
36
+ "members": [
37
+ {
38
+ "kind": "method",
39
+ "name": "open",
40
+ "static": true,
41
+ "return": {
42
+ "type": {
43
+ "text": "void"
44
+ }
45
+ },
46
+ "parameters": [
47
+ {
48
+ "name": "message",
49
+ "type": {
50
+ "text": "string"
51
+ },
52
+ "description": "The message to show in the snackbar."
53
+ },
54
+ {
55
+ "name": "options",
56
+ "optional": true,
57
+ "type": {
58
+ "text": "SnackbarOptions | undefined"
59
+ },
60
+ "description": "Options that control the behavior of the snackbar."
61
+ }
62
+ ],
63
+ "description": "Opens a snackbar with a message."
64
+ },
65
+ {
66
+ "kind": "method",
67
+ "name": "open",
68
+ "static": true,
69
+ "return": {
70
+ "type": {
71
+ "text": "void"
72
+ }
73
+ },
74
+ "parameters": [
75
+ {
76
+ "name": "message",
77
+ "type": {
78
+ "text": "string"
79
+ },
80
+ "description": "The message to show in the snackbar."
81
+ },
82
+ {
83
+ "name": "action",
84
+ "type": {
85
+ "text": "string"
86
+ },
87
+ "description": "The label for the snackbar action."
88
+ },
89
+ {
90
+ "name": "options",
91
+ "optional": true,
92
+ "type": {
93
+ "text": "SnackbarOptions | undefined"
94
+ },
95
+ "description": "Options that control the behavior of the snackbar."
96
+ }
97
+ ],
98
+ "description": "Opens a snackbar with a message and action."
99
+ },
100
+ {
101
+ "kind": "method",
102
+ "name": "open",
103
+ "static": true,
104
+ "return": {
105
+ "type": {
106
+ "text": "void"
107
+ }
108
+ },
109
+ "parameters": [
110
+ {
111
+ "name": "message",
112
+ "type": {
113
+ "text": "string"
114
+ },
115
+ "description": "The message to show in the snackbar."
116
+ },
117
+ {
118
+ "name": "action",
119
+ "type": {
120
+ "text": "string"
121
+ },
122
+ "description": "The label for the snackbar action."
123
+ },
124
+ {
125
+ "name": "dismissible",
126
+ "type": {
127
+ "text": "boolean"
128
+ },
129
+ "description": "Whether to present close affordance."
130
+ },
131
+ {
132
+ "name": "options",
133
+ "optional": true,
134
+ "type": {
135
+ "text": "SnackbarOptions | undefined"
136
+ },
137
+ "description": "Options that control the behavior of the snackbar."
138
+ }
139
+ ],
140
+ "description": "Opens a snackbar with a message, action and optional close affordance."
141
+ },
142
+ {
143
+ "kind": "method",
144
+ "name": "open",
145
+ "static": true,
146
+ "return": {
147
+ "type": {
148
+ "text": "void"
149
+ }
150
+ },
151
+ "parameters": [
152
+ {
153
+ "name": "message",
154
+ "type": {
155
+ "text": "string"
156
+ },
157
+ "description": "The message to show in the snackbar."
158
+ },
159
+ {
160
+ "name": "dismissible",
161
+ "type": {
162
+ "text": "boolean"
163
+ },
164
+ "description": "Whether to present close affordance."
165
+ },
166
+ {
167
+ "name": "options",
168
+ "optional": true,
169
+ "type": {
170
+ "text": "SnackbarOptions | undefined"
171
+ },
172
+ "description": "Options that control the behavior of the snackbar."
173
+ }
174
+ ],
175
+ "description": "Opens a snackbar with a message and optional close affordance."
176
+ },
177
+ {
178
+ "kind": "method",
179
+ "name": "open",
180
+ "static": true,
181
+ "return": {
182
+ "type": {
183
+ "text": "void"
184
+ }
185
+ },
186
+ "parameters": [
187
+ {
188
+ "name": "message",
189
+ "type": {
190
+ "text": "string"
191
+ }
192
+ },
193
+ {
194
+ "name": "actionOrDismissibleOrOptions",
195
+ "optional": true,
196
+ "type": {
197
+ "text": "string | boolean | SnackbarOptions"
198
+ }
199
+ },
200
+ {
201
+ "name": "dismissibleOrOptions",
202
+ "optional": true,
203
+ "type": {
204
+ "text": "boolean | SnackbarOptions"
205
+ }
206
+ },
207
+ {
208
+ "name": "options",
209
+ "optional": true,
210
+ "type": {
211
+ "text": "SnackbarOptions"
212
+ }
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ "kind": "method",
218
+ "name": "dismiss",
219
+ "static": true,
220
+ "return": {
221
+ "type": {
222
+ "text": "void"
223
+ }
224
+ },
225
+ "description": "Dismisses the currently visible snackbar."
226
+ }
227
+ ]
228
+ }
229
+ ],
230
+ "exports": [
231
+ {
232
+ "kind": "js",
233
+ "name": "M3eSnackbar",
234
+ "declaration": {
235
+ "name": "M3eSnackbar",
236
+ "module": "src/Snackbar.ts"
237
+ }
238
+ }
239
+ ]
240
+ },
241
+ {
242
+ "kind": "javascript-module",
243
+ "path": "src/SnackbarElement.ts",
244
+ "declarations": [
245
+ {
246
+ "kind": "class",
247
+ "description": "Presents short updates about application processes at the bottom of the screen.",
248
+ "name": "M3eSnackbarElement",
249
+ "cssProperties": [
250
+ {
251
+ "description": "Vertical offset from the bottom of the viewport.",
252
+ "name": "--m3e-snackbar-margin"
253
+ },
254
+ {
255
+ "description": "Border radius of the snackbar container.",
256
+ "name": "--m3e-snackbar-container-shape"
257
+ },
258
+ {
259
+ "description": "Background color of the snackbar.",
260
+ "name": "--m3e-snackbar-container-color"
261
+ },
262
+ {
263
+ "description": "Internal spacing of the snackbar container.",
264
+ "name": "--m3e-snackbar-padding"
265
+ },
266
+ {
267
+ "description": "Minimum width of the snackbar.",
268
+ "name": "--m3e-snackbar-min-width"
269
+ },
270
+ {
271
+ "description": "Maximum width of the snackbar.",
272
+ "name": "--m3e-snackbar-max-width"
273
+ }
274
+ ],
275
+ "slots": [
276
+ {
277
+ "description": "Renders the content of the snackbar.",
278
+ "name": ""
279
+ },
280
+ {
281
+ "description": "Renders the icon of the button used to close the snackbar.",
282
+ "name": "close-icon"
283
+ }
284
+ ],
285
+ "members": [
286
+ {
287
+ "kind": "field",
288
+ "name": "__current",
289
+ "type": {
290
+ "text": "M3eSnackbarElement | null"
291
+ },
292
+ "static": true,
293
+ "default": "null",
294
+ "privacy": "private"
295
+ },
296
+ {
297
+ "kind": "field",
298
+ "name": "#timeoutId",
299
+ "privacy": "private",
300
+ "type": {
301
+ "text": "number"
302
+ },
303
+ "default": "-1"
304
+ },
305
+ {
306
+ "kind": "field",
307
+ "name": "#actionTaken",
308
+ "privacy": "private",
309
+ "type": {
310
+ "text": "boolean"
311
+ },
312
+ "default": "false"
313
+ },
314
+ {
315
+ "kind": "field",
316
+ "name": "#beforeToggleHandler",
317
+ "privacy": "private",
318
+ "readonly": true
319
+ },
320
+ {
321
+ "kind": "field",
322
+ "name": "current",
323
+ "type": {
324
+ "text": "M3eSnackbarElement | null"
325
+ },
326
+ "static": true,
327
+ "description": "The currently open snackbar.",
328
+ "readonly": true
329
+ },
330
+ {
331
+ "kind": "field",
332
+ "name": "duration",
333
+ "type": {
334
+ "text": "number"
335
+ },
336
+ "default": "3000",
337
+ "description": "The length of time, in milliseconds, to wait before automatically dismissing the snackbar.",
338
+ "attribute": "duration"
339
+ },
340
+ {
341
+ "kind": "field",
342
+ "name": "action",
343
+ "type": {
344
+ "text": "string"
345
+ },
346
+ "default": "\"\"",
347
+ "description": "The label of the snackbar's action.",
348
+ "attribute": "action"
349
+ },
350
+ {
351
+ "kind": "field",
352
+ "name": "dismissible",
353
+ "type": {
354
+ "text": "boolean"
355
+ },
356
+ "default": "false",
357
+ "description": "Whether a button is presented that can be used to close the snackbar.",
358
+ "attribute": "dismissible",
359
+ "reflects": true
360
+ },
361
+ {
362
+ "kind": "field",
363
+ "name": "closeLabel",
364
+ "type": {
365
+ "text": "string"
366
+ },
367
+ "default": "\"Close\"",
368
+ "description": "The accessible label given to the button used to dismiss the snackbar.",
369
+ "attribute": "close-label"
370
+ },
371
+ {
372
+ "kind": "field",
373
+ "name": "isActionTaken",
374
+ "type": {
375
+ "text": "boolean"
376
+ },
377
+ "description": "Whether the user clicked the action.",
378
+ "readonly": true
379
+ },
380
+ {
381
+ "kind": "method",
382
+ "name": "#renderActionButton",
383
+ "privacy": "private",
384
+ "return": {
385
+ "type": {
386
+ "text": "unknown"
387
+ }
388
+ }
389
+ },
390
+ {
391
+ "kind": "method",
392
+ "name": "#renderCloseButton",
393
+ "privacy": "private",
394
+ "return": {
395
+ "type": {
396
+ "text": "unknown"
397
+ }
398
+ }
399
+ },
400
+ {
401
+ "kind": "method",
402
+ "name": "#handleActionClick",
403
+ "privacy": "private",
404
+ "return": {
405
+ "type": {
406
+ "text": "void"
407
+ }
408
+ }
409
+ },
410
+ {
411
+ "kind": "method",
412
+ "name": "#handleBeforeToggle",
413
+ "privacy": "private",
414
+ "return": {
415
+ "type": {
416
+ "text": "void"
417
+ }
418
+ },
419
+ "parameters": [
420
+ {
421
+ "name": "e",
422
+ "type": {
423
+ "text": "ToggleEvent"
424
+ }
425
+ }
426
+ ]
427
+ }
428
+ ],
429
+ "events": [
430
+ {
431
+ "description": "Emitted when the opened state of the snackbar changes.",
432
+ "name": "toggle"
433
+ }
434
+ ],
435
+ "attributes": [
436
+ {
437
+ "description": "The label of the snackbar's action.",
438
+ "name": "action",
439
+ "type": {
440
+ "text": "string"
441
+ },
442
+ "default": "\"\"",
443
+ "fieldName": "action"
444
+ },
445
+ {
446
+ "description": "The accessible label given to the button used to dismiss the snackbar.",
447
+ "name": "close-label",
448
+ "type": {
449
+ "text": "string"
450
+ },
451
+ "default": "\"Close\"",
452
+ "fieldName": "closeLabel"
453
+ },
454
+ {
455
+ "description": "Whether a button is presented that can be used to close the snackbar.",
456
+ "name": "dismissible",
457
+ "type": {
458
+ "text": "boolean"
459
+ },
460
+ "default": "false",
461
+ "fieldName": "dismissible"
462
+ },
463
+ {
464
+ "description": "The length of time, in milliseconds, to wait before automatically dismissing the snackbar.",
465
+ "name": "duration",
466
+ "type": {
467
+ "text": "number"
468
+ },
469
+ "default": "3000",
470
+ "fieldName": "duration"
471
+ }
472
+ ],
473
+ "mixins": [
474
+ {
475
+ "name": "Role",
476
+ "package": "@m3e/core"
477
+ }
478
+ ],
479
+ "superclass": {
480
+ "name": "LitElement",
481
+ "package": "lit"
482
+ },
483
+ "tagName": "m3e-snackbar",
484
+ "customElement": true
485
+ }
486
+ ],
487
+ "exports": [
488
+ {
489
+ "kind": "js",
490
+ "name": "M3eSnackbarElement",
491
+ "declaration": {
492
+ "name": "M3eSnackbarElement",
493
+ "module": "src/SnackbarElement.ts"
494
+ }
495
+ },
496
+ {
497
+ "kind": "custom-element-definition",
498
+ "name": "m3e-snackbar",
499
+ "declaration": {
500
+ "name": "M3eSnackbarElement",
501
+ "module": "src/SnackbarElement.ts"
502
+ }
503
+ }
504
+ ]
505
+ }
506
+ ]
507
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "tags": [
5
+ {
6
+ "name": "m3e-snackbar",
7
+ "description": "Presents short updates about application processes at the bottom of the screen.\n---\n\n\n### **Events:**\n - **toggle** - Emitted when the opened state of the snackbar changes.\n\n### **Slots:**\n - _default_ - Renders the content of the snackbar.\n- **close-icon** - Renders the icon of the button used to close the snackbar.\n\n### **CSS Properties:**\n - **--m3e-snackbar-margin** - Vertical offset from the bottom of the viewport. _(default: undefined)_\n- **--m3e-snackbar-container-shape** - Border radius of the snackbar container. _(default: undefined)_\n- **--m3e-snackbar-container-color** - Background color of the snackbar. _(default: undefined)_\n- **--m3e-snackbar-padding** - Internal spacing of the snackbar container. _(default: undefined)_\n- **--m3e-snackbar-min-width** - Minimum width of the snackbar. _(default: undefined)_\n- **--m3e-snackbar-max-width** - Maximum width of the snackbar. _(default: undefined)_",
8
+ "attributes": [
9
+ {
10
+ "name": "action",
11
+ "description": "The label of the snackbar's action.",
12
+ "values": []
13
+ },
14
+ {
15
+ "name": "close-label",
16
+ "description": "The accessible label given to the button used to dismiss the snackbar.",
17
+ "values": []
18
+ },
19
+ {
20
+ "name": "dismissible",
21
+ "description": "Whether a button is presented that can be used to close the snackbar.",
22
+ "values": []
23
+ },
24
+ {
25
+ "name": "duration",
26
+ "description": "The length of time, in milliseconds, to wait before automatically dismissing the snackbar.",
27
+ "values": []
28
+ }
29
+ ],
30
+ "references": []
31
+ }
32
+ ]
33
+ }