@nuralyui/toast 0.0.2 → 0.0.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.
@@ -1,82 +1,370 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
1
6
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
7
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
8
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
9
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
10
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
11
  };
7
- import { LitElement, html, property, customElement, css } from 'lit-element';
8
- let LitToast = class LitToast extends LitElement {
12
+ import { LitElement, html, nothing } from 'lit';
13
+ import { customElement, property, state } from 'lit/decorators.js';
14
+ import { repeat } from 'lit/directives/repeat.js';
15
+ import { classMap } from 'lit/directives/class-map.js';
16
+ import { styles } from './toast.style.js';
17
+ import { NuralyUIBaseMixin } from '../../shared/base-mixin.js';
18
+ import { DEFAULT_TOAST_DURATION, DEFAULT_MAX_TOASTS, EMPTY_STRING } from './toast.types.js';
19
+ // Import required components
20
+ import '../icon/icon.component.js';
21
+ import '../button/index.js';
22
+ /**
23
+ * Toast notification component for displaying temporary messages.
24
+ *
25
+ * Provides a flexible notification system with multiple types, positions, and animations.
26
+ * Supports stacking multiple toasts, auto-dismiss (enabled by default), action buttons,
27
+ * custom HTML content, and manual closing.
28
+ *
29
+ * @example
30
+ * ```html
31
+ * <!-- Basic usage with auto-dismiss -->
32
+ * <nr-toast position="top-right"></nr-toast>
33
+ *
34
+ * <!-- Disable auto-dismiss to require manual closing -->
35
+ * <nr-toast position="top-right" auto-dismiss="false"></nr-toast>
36
+ *
37
+ * <!-- Programmatic usage -->
38
+ * <script>
39
+ * const toast = document.querySelector('nr-toast');
40
+ * toast.show({ text: 'Success!', type: 'success' });
41
+ * toast.show({ text: 'Error occurred', type: 'error', duration: 7000 });
42
+ *
43
+ * // Disable auto-dismiss for specific toast
44
+ * toast.show({ text: 'Persistent message', autoDismiss: false });
45
+ *
46
+ * // Toast with action button
47
+ * toast.show({
48
+ * text: 'Item deleted',
49
+ * type: 'success',
50
+ * button: {
51
+ * label: 'Undo',
52
+ * onClick: () => console.log('Undo clicked'),
53
+ * type: 'primary'
54
+ * }
55
+ * });
56
+ *
57
+ * // Custom HTML content (GDPR consent example)
58
+ * toast.show({
59
+ * content: html`
60
+ * <div>
61
+ * <h4>Cookie Consent</h4>
62
+ * <p>We use cookies to improve your experience.</p>
63
+ * <div style="display: flex; gap: 0.5rem; margin-top: 0.5rem;">
64
+ * <nr-button size="small" type="primary">Accept</nr-button>
65
+ * <nr-button size="small" type="secondary">Decline</nr-button>
66
+ * </div>
67
+ * </div>
68
+ * `,
69
+ * autoDismiss: false,
70
+ * closable: true
71
+ * });
72
+ * </script>
73
+ * ```
74
+ *
75
+ * @fires nr-toast-show - Toast shown
76
+ * @fires nr-toast-close - Toast closed
77
+ * @fires nr-toast-click - Toast clicked
78
+ *
79
+ * @cssproperty --nuraly-z-index-toast - Toast z-index
80
+ * @cssproperty --nuraly-toast-default-background - Default toast background
81
+ * @cssproperty --nuraly-toast-success-background - Success toast background
82
+ * @cssproperty --nuraly-toast-error-background - Error toast background
83
+ * @cssproperty --nuraly-toast-warning-background - Warning toast background
84
+ * @cssproperty --nuraly-toast-info-background - Info toast background
85
+ */
86
+ let NrToastElement = class NrToastElement extends NuralyUIBaseMixin(LitElement) {
9
87
  constructor() {
10
88
  super(...arguments);
89
+ this.requiredComponents = ['nr-icon', 'nr-button'];
90
+ /** Position of toast container on screen */
91
+ this.position = "top-right" /* ToastPosition.TopRight */;
92
+ /** Maximum number of toasts to display */
93
+ this.maxToasts = DEFAULT_MAX_TOASTS;
94
+ /** Default duration for toasts in milliseconds */
95
+ this.defaultDuration = DEFAULT_TOAST_DURATION;
96
+ /** Animation type for toasts */
97
+ this.animation = "fade" /* ToastAnimation.Fade */;
98
+ /** Whether to stack toasts or replace */
99
+ this.stack = true;
100
+ /** Auto dismiss toasts after duration (default: true) */
101
+ this.autoDismiss = true;
102
+ /** Internal state: active toasts */
11
103
  this.toasts = [];
104
+ /** Timeout map for auto-dismiss */
105
+ this.timeouts = new Map();
106
+ }
107
+ /**
108
+ * Show a new toast notification
109
+ * @param config - Toast configuration
110
+ * @returns Toast ID for manual control
111
+ */
112
+ show(config) {
113
+ var _a, _b, _c;
114
+ const toastConfig = typeof config === 'string'
115
+ ? { text: config }
116
+ : config;
117
+ const toast = {
118
+ id: this.generateId(),
119
+ timestamp: Date.now(),
120
+ text: toastConfig.text,
121
+ content: toastConfig.content,
122
+ type: toastConfig.type || "default" /* ToastType.Default */,
123
+ duration: (_a = toastConfig.duration) !== null && _a !== void 0 ? _a : this.defaultDuration,
124
+ autoDismiss: (_b = toastConfig.autoDismiss) !== null && _b !== void 0 ? _b : this.autoDismiss,
125
+ closable: (_c = toastConfig.closable) !== null && _c !== void 0 ? _c : true,
126
+ icon: toastConfig.icon || this.getDefaultIcon(toastConfig.type),
127
+ customClass: toastConfig.customClass,
128
+ button: toastConfig.button,
129
+ onClose: toastConfig.onClose,
130
+ onClick: toastConfig.onClick,
131
+ };
132
+ // Handle max toasts
133
+ if (!this.stack) {
134
+ this.clearAll();
135
+ }
136
+ else if (this.toasts.length >= this.maxToasts) {
137
+ this.removeToast(this.toasts[0].id);
138
+ }
139
+ // Add toast
140
+ this.toasts = [...this.toasts, toast];
141
+ // Emit show event
142
+ this.emitToastEvent('nr-toast-show', toast, 'show');
143
+ // Set auto-dismiss timeout
144
+ if (toast.autoDismiss && toast.duration && toast.duration > 0) {
145
+ const timeoutId = window.setTimeout(() => {
146
+ this.removeToast(toast.id);
147
+ }, toast.duration);
148
+ this.timeouts.set(toast.id, timeoutId);
149
+ }
150
+ return toast.id;
151
+ }
152
+ /**
153
+ * Show success toast
154
+ */
155
+ success(text, duration) {
156
+ return this.show({ text, type: "success" /* ToastType.Success */, duration });
157
+ }
158
+ /**
159
+ * Show error toast
160
+ */
161
+ error(text, duration) {
162
+ return this.show({ text, type: "error" /* ToastType.Error */, duration });
163
+ }
164
+ /**
165
+ * Show warning toast
166
+ */
167
+ warning(text, duration) {
168
+ return this.show({ text, type: "warning" /* ToastType.Warning */, duration });
169
+ }
170
+ /**
171
+ * Show info toast
172
+ */
173
+ info(text, duration) {
174
+ return this.show({ text, type: "info" /* ToastType.Info */, duration });
175
+ }
176
+ /**
177
+ * Remove a specific toast
178
+ */
179
+ removeToast(id) {
180
+ const toast = this.toasts.find(t => t.id === id);
181
+ if (!toast)
182
+ return;
183
+ // Mark as removing for animation
184
+ toast.removing = true;
185
+ this.requestUpdate();
186
+ // Clear timeout
187
+ const timeoutId = this.timeouts.get(id);
188
+ if (timeoutId) {
189
+ clearTimeout(timeoutId);
190
+ this.timeouts.delete(id);
191
+ }
192
+ // Remove after animation
193
+ setTimeout(() => {
194
+ var _a;
195
+ this.toasts = this.toasts.filter(t => t.id !== id);
196
+ // Emit close event
197
+ this.emitToastEvent('nr-toast-close', toast, 'close');
198
+ // Call onClose callback
199
+ (_a = toast.onClose) === null || _a === void 0 ? void 0 : _a.call(toast);
200
+ }, 300); // Animation duration
201
+ }
202
+ /**
203
+ * Clear all toasts
204
+ */
205
+ clearAll() {
206
+ this.toasts.forEach(toast => {
207
+ const timeoutId = this.timeouts.get(toast.id);
208
+ if (timeoutId) {
209
+ clearTimeout(timeoutId);
210
+ }
211
+ });
212
+ this.timeouts.clear();
213
+ this.toasts = [];
214
+ }
215
+ /**
216
+ * Handle toast click
217
+ */
218
+ handleToastClick(toast) {
219
+ var _a;
220
+ this.emitToastEvent('nr-toast-click', toast, 'click');
221
+ (_a = toast.onClick) === null || _a === void 0 ? void 0 : _a.call(toast);
222
+ }
223
+ /**
224
+ * Handle close button click
225
+ */
226
+ handleCloseClick(event, toast) {
227
+ event.stopPropagation();
228
+ this.removeToast(toast.id);
229
+ }
230
+ /**
231
+ * Get default icon for toast type
232
+ */
233
+ getDefaultIcon(type) {
234
+ switch (type) {
235
+ case "success" /* ToastType.Success */:
236
+ return 'check-circle';
237
+ case "error" /* ToastType.Error */:
238
+ return 'x-circle';
239
+ case "warning" /* ToastType.Warning */:
240
+ return 'alert-triangle';
241
+ case "info" /* ToastType.Info */:
242
+ return 'info';
243
+ default:
244
+ return EMPTY_STRING;
245
+ }
246
+ }
247
+ /**
248
+ * Generate unique ID
249
+ */
250
+ generateId() {
251
+ return `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
252
+ }
253
+ /**
254
+ * Get animation class
255
+ */
256
+ getAnimationClass(toast) {
257
+ const isRemoving = toast.removing;
258
+ const suffix = isRemoving ? 'out' : 'in';
259
+ return `toast--${this.animation}-${suffix}`;
260
+ }
261
+ /**
262
+ * Emit toast event
263
+ */
264
+ emitToastEvent(eventName, toast, action) {
265
+ this.dispatchEvent(new CustomEvent(eventName, {
266
+ detail: { toast, action },
267
+ bubbles: true,
268
+ composed: true
269
+ }));
270
+ }
271
+ disconnectedCallback() {
272
+ super.disconnectedCallback();
273
+ this.clearAll();
12
274
  }
13
275
  render() {
14
276
  return html `
15
277
  <div class="toast-container">
16
- ${this.toasts.map((toast, index) => html `
17
- <div class="toast show" @animationend="${() => this.handleAnimationEnd(index)}">${toast.text}</div>
18
- `)}
278
+ ${repeat(this.toasts, toast => toast.id, toast => this.renderToast(toast))}
19
279
  </div>
20
280
  `;
21
281
  }
22
- show(text = '', duration = 5000) {
23
- const newToast = { text, duration };
24
- this.toasts = [...this.toasts, newToast];
25
- if (this.toasts.length === 1) {
26
- }
27
- setTimeout(() => {
28
- this.toasts.shift();
29
- this.requestUpdate('toasts');
30
- }, duration);
31
- }
32
- handleAnimationEnd(index) {
33
- this.toasts.splice(index, 1);
34
- this.requestUpdate('toasts');
35
- if (this.toasts.length > 0) {
36
- }
282
+ renderToast(toast) {
283
+ const classes = {
284
+ 'toast': true,
285
+ [`toast--${toast.type}`]: true,
286
+ [this.getAnimationClass(toast)]: true,
287
+ [toast.customClass || EMPTY_STRING]: !!toast.customClass,
288
+ };
289
+ return html `
290
+ <div
291
+ class=${classMap(classes)}
292
+ @click=${() => this.handleToastClick(toast)}
293
+ role="alert"
294
+ aria-live="polite"
295
+ >
296
+ ${toast.icon ? html `
297
+ <div class="toast__icon">
298
+ <nr-icon name=${toast.icon} size="medium"></nr-icon>
299
+ </div>
300
+ ` : nothing}
301
+
302
+ <div class="toast__content">
303
+ ${toast.content
304
+ ? toast.content
305
+ : html `
306
+ <div class="toast__text">${toast.text}</div>
307
+ ${toast.button ? this.renderButton(toast.button) : nothing}
308
+ `}
309
+ </div>
310
+
311
+ ${toast.closable ? html `
312
+ <button
313
+ class="toast__close"
314
+ @click=${(e) => this.handleCloseClick(e, toast)}
315
+ aria-label="Close notification"
316
+ type="button"
317
+ >
318
+ <nr-icon name="x" size="small"></nr-icon>
319
+ </button>
320
+ ` : nothing}
321
+ </div>
322
+ `;
323
+ }
324
+ renderButton(button) {
325
+ const handleButtonClick = (e) => {
326
+ e.stopPropagation();
327
+ button.onClick(e);
328
+ };
329
+ return html `
330
+ <div class="toast__button">
331
+ <nr-button
332
+ type=${button.type || 'default'}
333
+ size=${button.size || 'small'}
334
+ ?disabled=${button.disabled || false}
335
+ @click=${handleButtonClick}
336
+ >
337
+ ${button.icon ? html `<nr-icon slot="icon-left" name=${button.icon}></nr-icon>` : nothing}
338
+ ${button.label}
339
+ </nr-button>
340
+ </div>
341
+ `;
37
342
  }
38
343
  };
39
- LitToast.styles = css `
40
- .toast-container {
41
- position: fixed;
42
- top: 20px;
43
- right: 20px;
44
- z-index: 1000;
45
- }
46
-
47
- .toast {
48
- background-color: #333;
49
- color: #fff;
50
- padding: 10px 20px;
51
- margin-bottom: 10px;
52
- border-radius: 5px;
53
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
54
- animation: fadein 0.5s, fadeout 0.5s 2.5s 3000ms;
55
- }
56
-
57
- @keyframes fadein {
58
- from {
59
- opacity: 0;
60
- }
61
- to {
62
- opacity: 1;
63
- }
64
- }
65
-
66
- @keyframes fadeout {
67
- from {
68
- opacity: 1;
69
- }
70
- to {
71
- opacity: 0;
72
- }
73
- }
74
- `;
344
+ NrToastElement.styles = styles;
345
+ __decorate([
346
+ property({ type: String, reflect: true })
347
+ ], NrToastElement.prototype, "position", void 0);
348
+ __decorate([
349
+ property({ type: Number })
350
+ ], NrToastElement.prototype, "maxToasts", void 0);
351
+ __decorate([
352
+ property({ type: Number })
353
+ ], NrToastElement.prototype, "defaultDuration", void 0);
354
+ __decorate([
355
+ property({ type: String })
356
+ ], NrToastElement.prototype, "animation", void 0);
357
+ __decorate([
358
+ property({ type: Boolean })
359
+ ], NrToastElement.prototype, "stack", void 0);
360
+ __decorate([
361
+ property({ type: Boolean })
362
+ ], NrToastElement.prototype, "autoDismiss", void 0);
75
363
  __decorate([
76
- property({ type: Array })
77
- ], LitToast.prototype, "toasts", void 0);
78
- LitToast = __decorate([
79
- customElement('hy-toast')
80
- ], LitToast);
81
- export { LitToast };
364
+ state()
365
+ ], NrToastElement.prototype, "toasts", void 0);
366
+ NrToastElement = __decorate([
367
+ customElement('nr-toast')
368
+ ], NrToastElement);
369
+ export { NrToastElement };
82
370
  //# sourceMappingURL=toast.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.component.js","sourceRoot":"","sources":["../../../src/components/toast/toast.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAG7E,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,UAAU;IAAxC;;QAsC6B,WAAM,GAAU,EAAE,CAAC;IAoChD,CAAC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\n\n@customElement('hy-toast')\nexport class LitToast extends LitElement {\n static override styles = css`\n .toast-container {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 1000;\n }\n\n .toast {\n background-color: #333;\n color: #fff;\n padding: 10px 20px;\n margin-bottom: 10px;\n border-radius: 5px;\n box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);\n animation: fadein 0.5s, fadeout 0.5s 2.5s 3000ms;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes fadeout {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n `;\n\n @property({ type: Array }) toasts :any[]= [];\n\n override render() {\n return html`\n <div class=\"toast-container\">\n ${this.toasts.map(\n (toast, index) => html`\n <div class=\"toast show\" @animationend=\"${() =>\n this.handleAnimationEnd(index)}\">${toast.text}</div>\n `\n )}\n </div>\n `;\n }\n\n show(text = '', duration = 5000) {\n const newToast = { text, duration };\n this.toasts = [...this.toasts, newToast];\n\n if (this.toasts.length === 1) {\n }\n\n setTimeout(() => {\n this.toasts.shift();\n this.requestUpdate('toasts');\n }, duration);\n }\n\n\n\n handleAnimationEnd(index :any) {\n this.toasts.splice(index, 1);\n this.requestUpdate('toasts');\n if (this.toasts.length > 0) {\n }\n }\n}\n"]}
1
+ {"version":3,"file":"toast.component.js","sourceRoot":"","sources":["../../../src/components/toast/toast.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,iBAAiB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AAkC,MAAM,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,OAAO;YACtF,MAAM,CAAC,KAAK;;;KAGnB,CAAC;IACJ,CAAC;CACF,CAAA;AA5SiB,qBAAM,GAAG,MAAO,CAAA;AAMhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDACO;AAIjD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDACI;AAI/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACc;AAIzC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDACqB;AAIhD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACf;AAIb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACT;AAInB;IADC,KAAK,EAAE;8CACyB;AA/BtB,cAAc;IAD1B,aAAa,CAAC,UAAU,CAAC;GACb,cAAc,CA6S1B;SA7SY,cAAc","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './toast.style.js';\nimport { NuralyUIBaseMixin } from '../../shared/base-mixin.js';\nimport {\n ToastType,\n ToastPosition,\n ToastAnimation,\n ToastConfig,\n ToastItem,\n ToastEventDetail,\n ToastButton,\n DEFAULT_TOAST_DURATION,\n DEFAULT_MAX_TOASTS,\n EMPTY_STRING\n} from './toast.types.js';\n\n// Import required components\nimport '../icon/icon.component.js';\nimport '../button/index.js';\n\n/**\n * Toast notification component for displaying temporary messages.\n * \n * Provides a flexible notification system with multiple types, positions, and animations.\n * Supports stacking multiple toasts, auto-dismiss (enabled by default), action buttons, \n * custom HTML content, and manual closing.\n * \n * @example\n * ```html\n * <!-- Basic usage with auto-dismiss -->\n * <nr-toast position=\"top-right\"></nr-toast>\n * \n * <!-- Disable auto-dismiss to require manual closing -->\n * <nr-toast position=\"top-right\" auto-dismiss=\"false\"></nr-toast>\n * \n * <!-- Programmatic usage -->\n * <script>\n * const toast = document.querySelector('nr-toast');\n * toast.show({ text: 'Success!', type: 'success' });\n * toast.show({ text: 'Error occurred', type: 'error', duration: 7000 });\n * \n * // Disable auto-dismiss for specific toast\n * toast.show({ text: 'Persistent message', autoDismiss: false });\n * \n * // Toast with action button\n * toast.show({\n * text: 'Item deleted',\n * type: 'success',\n * button: {\n * label: 'Undo',\n * onClick: () => console.log('Undo clicked'),\n * type: 'primary'\n * }\n * });\n * \n * // Custom HTML content (GDPR consent example)\n * toast.show({\n * content: html`\n * <div>\n * <h4>Cookie Consent</h4>\n * <p>We use cookies to improve your experience.</p>\n * <div style=\"display: flex; gap: 0.5rem; margin-top: 0.5rem;\">\n * <nr-button size=\"small\" type=\"primary\">Accept</nr-button>\n * <nr-button size=\"small\" type=\"secondary\">Decline</nr-button>\n * </div>\n * </div>\n * `,\n * autoDismiss: false,\n * closable: true\n * });\n * </script>\n * ```\n * \n * @fires nr-toast-show - Toast shown\n * @fires nr-toast-close - Toast closed\n * @fires nr-toast-click - Toast clicked\n * \n * @cssproperty --nuraly-z-index-toast - Toast z-index\n * @cssproperty --nuraly-toast-default-background - Default toast background\n * @cssproperty --nuraly-toast-success-background - Success toast background\n * @cssproperty --nuraly-toast-error-background - Error toast background\n * @cssproperty --nuraly-toast-warning-background - Warning toast background\n * @cssproperty --nuraly-toast-info-background - Info toast background\n */\n@customElement('nr-toast')\nexport class NrToastElement extends NuralyUIBaseMixin(LitElement) {\n static override styles = styles;\n\n override requiredComponents = ['nr-icon', 'nr-button'];\n\n /** Position of toast container on screen */\n @property({ type: String, reflect: true })\n position: ToastPosition = ToastPosition.TopRight;\n\n /** Maximum number of toasts to display */\n @property({ type: Number })\n maxToasts = DEFAULT_MAX_TOASTS;\n\n /** Default duration for toasts in milliseconds */\n @property({ type: Number })\n defaultDuration = DEFAULT_TOAST_DURATION;\n\n /** Animation type for toasts */\n @property({ type: String })\n animation: ToastAnimation = ToastAnimation.Fade;\n\n /** Whether to stack toasts or replace */\n @property({ type: Boolean })\n stack = true;\n\n /** Auto dismiss toasts after duration (default: true) */\n @property({ type: Boolean })\n autoDismiss = true;\n\n /** Internal state: active toasts */\n @state()\n private toasts: ToastItem[] = [];\n\n /** Timeout map for auto-dismiss */\n private timeouts = new Map<string, number>();\n\n /**\n * Show a new toast notification\n * @param config - Toast configuration\n * @returns Toast ID for manual control\n */\n show(config: string | ToastConfig): string {\n const toastConfig: ToastConfig = typeof config === 'string' \n ? { text: config }\n : config;\n\n const toast: ToastItem = {\n id: this.generateId(),\n timestamp: Date.now(),\n text: toastConfig.text,\n content: toastConfig.content,\n type: toastConfig.type || ToastType.Default,\n duration: toastConfig.duration ?? this.defaultDuration,\n autoDismiss: toastConfig.autoDismiss ?? this.autoDismiss,\n closable: toastConfig.closable ?? true,\n icon: toastConfig.icon || this.getDefaultIcon(toastConfig.type),\n customClass: toastConfig.customClass,\n button: toastConfig.button,\n onClose: toastConfig.onClose,\n onClick: toastConfig.onClick,\n };\n\n // Handle max toasts\n if (!this.stack) {\n this.clearAll();\n } else if (this.toasts.length >= this.maxToasts) {\n this.removeToast(this.toasts[0].id);\n }\n\n // Add toast\n this.toasts = [...this.toasts, toast];\n\n // Emit show event\n this.emitToastEvent('nr-toast-show', toast, 'show');\n\n // Set auto-dismiss timeout\n if (toast.autoDismiss && toast.duration && toast.duration > 0) {\n const timeoutId = window.setTimeout(() => {\n this.removeToast(toast.id);\n }, toast.duration);\n this.timeouts.set(toast.id, timeoutId);\n }\n\n return toast.id;\n }\n\n /**\n * Show success toast\n */\n success(text: string, duration?: number): string {\n return this.show({ text, type: ToastType.Success, duration });\n }\n\n /**\n * Show error toast\n */\n error(text: string, duration?: number): string {\n return this.show({ text, type: ToastType.Error, duration });\n }\n\n /**\n * Show warning toast\n */\n warning(text: string, duration?: number): string {\n return this.show({ text, type: ToastType.Warning, duration });\n }\n\n /**\n * Show info toast\n */\n info(text: string, duration?: number): string {\n return this.show({ text, type: ToastType.Info, duration });\n }\n\n /**\n * Remove a specific toast\n */\n removeToast(id: string): void {\n const toast = this.toasts.find(t => t.id === id);\n if (!toast) return;\n\n // Mark as removing for animation\n toast.removing = true;\n this.requestUpdate();\n\n // Clear timeout\n const timeoutId = this.timeouts.get(id);\n if (timeoutId) {\n clearTimeout(timeoutId);\n this.timeouts.delete(id);\n }\n\n // Remove after animation\n setTimeout(() => {\n this.toasts = this.toasts.filter(t => t.id !== id);\n \n // Emit close event\n this.emitToastEvent('nr-toast-close', toast, 'close');\n \n // Call onClose callback\n toast.onClose?.();\n }, 300); // Animation duration\n }\n\n /**\n * Clear all toasts\n */\n clearAll(): void {\n this.toasts.forEach(toast => {\n const timeoutId = this.timeouts.get(toast.id);\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n });\n this.timeouts.clear();\n this.toasts = [];\n }\n\n /**\n * Handle toast click\n */\n private handleToastClick(toast: ToastItem): void {\n this.emitToastEvent('nr-toast-click', toast, 'click');\n toast.onClick?.();\n }\n\n /**\n * Handle close button click\n */\n private handleCloseClick(event: Event, toast: ToastItem): void {\n event.stopPropagation();\n this.removeToast(toast.id);\n }\n\n /**\n * Get default icon for toast type\n */\n private getDefaultIcon(type?: ToastType): string {\n switch (type) {\n case ToastType.Success:\n return 'check-circle';\n case ToastType.Error:\n return 'x-circle';\n case ToastType.Warning:\n return 'alert-triangle';\n case ToastType.Info:\n return 'info';\n default:\n return EMPTY_STRING;\n }\n }\n\n /**\n * Generate unique ID\n */\n private generateId(): string {\n return `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n /**\n * Get animation class\n */\n private getAnimationClass(toast: ToastItem): string {\n const isRemoving = toast.removing;\n const suffix = isRemoving ? 'out' : 'in';\n return `toast--${this.animation}-${suffix}`;\n }\n\n /**\n * Emit toast event\n */\n private emitToastEvent(eventName: string, toast: ToastItem, action: ToastEventDetail['action']): void {\n this.dispatchEvent(new CustomEvent<ToastEventDetail>(eventName, {\n detail: { toast, action },\n bubbles: true,\n composed: true\n }));\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.clearAll();\n }\n\n override render() {\n return html`\n <div class=\"toast-container\">\n ${repeat(\n this.toasts,\n toast => toast.id,\n toast => this.renderToast(toast)\n )}\n </div>\n `;\n }\n\n private renderToast(toast: ToastItem) {\n const classes = {\n 'toast': true,\n [`toast--${toast.type}`]: true,\n [this.getAnimationClass(toast)]: true,\n [toast.customClass || EMPTY_STRING]: !!toast.customClass,\n };\n\n return html`\n <div\n class=${classMap(classes)}\n @click=${() => this.handleToastClick(toast)}\n role=\"alert\"\n aria-live=\"polite\"\n >\n ${toast.icon ? html`\n <div class=\"toast__icon\">\n <nr-icon name=${toast.icon} size=\"medium\"></nr-icon>\n </div>\n ` : nothing}\n \n <div class=\"toast__content\">\n ${toast.content \n ? toast.content \n : html`\n <div class=\"toast__text\">${toast.text}</div>\n ${toast.button ? this.renderButton(toast.button) : nothing}\n `\n }\n </div>\n \n ${toast.closable ? html`\n <button\n class=\"toast__close\"\n @click=${(e: Event) => this.handleCloseClick(e, toast)}\n aria-label=\"Close notification\"\n type=\"button\"\n >\n <nr-icon name=\"x\" size=\"small\"></nr-icon>\n </button>\n ` : nothing}\n </div>\n `;\n }\n\n private renderButton(button: ToastButton) {\n const handleButtonClick = (e: Event) => {\n e.stopPropagation();\n button.onClick(e);\n };\n\n return html`\n <div class=\"toast__button\">\n <nr-button\n type=${button.type || 'default'}\n size=${button.size || 'small'}\n ?disabled=${button.disabled || false}\n @click=${handleButtonClick}\n >\n ${button.icon ? html`<nr-icon slot=\"icon-left\" name=${button.icon}></nr-icon>` : nothing}\n ${button.label}\n </nr-button>\n </div>\n `;\n }\n}\n"]}
package/toast.style.d.ts CHANGED
@@ -1,3 +1,14 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ /**
7
+ * Toast component styles for the Hybrid UI Library
8
+ * Using shared CSS variables from /src/shared/themes/
9
+ *
10
+ * This file contains all the styling for the nr-toast component with
11
+ * clean CSS variable usage without local fallbacks and proper theme switching support.
12
+ */
13
+ export declare const styles: import("lit").CSSResult;
3
14
  //# sourceMappingURL=toast.style.d.ts.map