avalynx-alert 0.0.6 → 0.0.8
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 +10 -10
- package/dist/css/avalynx-alert.css +1 -1
- package/dist/js/avalynx-alert.esm.js +11 -9
- package/dist/js/avalynx-alert.js +11 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,8 +46,8 @@ Replace `path/to/avalynx-alert.js` and `path/to/avalynx-alert.css` with the actu
|
|
|
46
46
|
AvalynxAlert is also available via [jsDelivr](https://www.jsdelivr.com/). You can include it in your project like this:
|
|
47
47
|
|
|
48
48
|
```html
|
|
49
|
-
<link href="https://cdn.jsdelivr.net/npm/avalynx-alert/dist/avalynx-alert.css" rel="stylesheet">
|
|
50
|
-
<script src="https://cdn.jsdelivr.net/npm/avalynx-alert/dist/avalynx-alert.js"></script>
|
|
49
|
+
<link href="https://cdn.jsdelivr.net/npm/avalynx-alert@0.0.8/dist/css/avalynx-alert.css" rel="stylesheet">
|
|
50
|
+
<script src="https://cdn.jsdelivr.net/npm/avalynx-alert@0.0.8/dist/js/avalynx-alert.js"></script>
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxAlert displays correctly.
|
|
@@ -102,15 +102,15 @@ new AvalynxAlert('Your message here', 'success', {
|
|
|
102
102
|
|
|
103
103
|
AvalynxAlert allows the following options for customization:
|
|
104
104
|
|
|
105
|
-
- `message`: The message to display in the alert.
|
|
106
|
-
- `type`: The type of alert (`primary`, `secondary`, `success`, `danger`, `warning`, `info`, `light`, `dark`).
|
|
105
|
+
- `message`: (string) The message to display in the alert (default: `''`).
|
|
106
|
+
- `type`: (string) The type of alert. One of (`primary`, `secondary`, `success`, `danger`, `warning`, `info`, `light`, `dark`) (default: `'info'`).
|
|
107
107
|
- `options`: An object containing the following keys:
|
|
108
|
-
- `duration`: Duration in milliseconds for the alert to be displayed (default: 5000).
|
|
109
|
-
- `position`: Position of the alert on the screen (default: `top-
|
|
110
|
-
- `closeable`: Whether the alert can be closed by the user (default: true).
|
|
111
|
-
- `autoClose`: Whether the alert will close automatically after the duration (default: true).
|
|
112
|
-
- `width`: The width of the alert (default: `400px`).
|
|
113
|
-
- `onClose`: A callback function to
|
|
108
|
+
- `duration`: (number) Duration in milliseconds for the alert to be displayed (default: `5000`).
|
|
109
|
+
- `position`: (string) Position of the alert on the screen. One of `top-left`, `top-center`, `top-right`, `bottom-left`, `bottom-center`, `bottom-right` (default: `'top-right'`).
|
|
110
|
+
- `closeable`: (boolean) Whether the alert can be closed by the user (default: `true`).
|
|
111
|
+
- `autoClose`: (boolean) Whether the alert will close automatically after the duration (default: `true`).
|
|
112
|
+
- `width`: (string) The width of the alert (default: `400px`).
|
|
113
|
+
- `onClose`: (function) A callback function to execute when the alert is closed (default: `null`).
|
|
114
114
|
|
|
115
115
|
## Contributing
|
|
116
116
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A simple alert system for web applications. Based on Bootstrap >=5.3 without any framework dependencies.
|
|
5
5
|
*
|
|
6
|
-
* @version 0.0.
|
|
6
|
+
* @version 0.0.8
|
|
7
7
|
* @license MIT
|
|
8
8
|
* @author https://github.com/avalynx/avalynx-alert/graphs/contributors
|
|
9
9
|
* @website https://github.com/avalynx/
|
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A simple alert system for web applications. Based on Bootstrap >=5.3 without any framework dependencies.
|
|
5
5
|
*
|
|
6
|
-
* @version 0.0.
|
|
6
|
+
* @version 0.0.8
|
|
7
7
|
* @license MIT
|
|
8
8
|
* @author https://github.com/avalynx/avalynx-alert/graphs/contributors
|
|
9
9
|
* @website https://github.com/avalynx/
|
|
10
10
|
* @repository https://github.com/avalynx/avalynx-alert.git
|
|
11
11
|
* @bugs https://github.com/avalynx/avalynx-alert/issues
|
|
12
12
|
*
|
|
13
|
-
* @param {string} message - The message to display in the alert.
|
|
14
|
-
* @param {string} type - The type of alert. One of 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'.
|
|
15
|
-
* @param {object} options -
|
|
16
|
-
* @param {number} options.duration -
|
|
17
|
-
* @param {string} options.position -
|
|
18
|
-
* @param {boolean} options.closeable - Whether the alert can be closed by the user
|
|
19
|
-
* @param {boolean} options.autoClose - Whether the alert will close automatically after the duration
|
|
20
|
-
* @param {string} options.width - The width of the alert
|
|
13
|
+
* @param {string} message - The message to display in the alert (default: '').
|
|
14
|
+
* @param {string} type - The type of alert. One of 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark' (default: 'info').
|
|
15
|
+
* @param {object} options - An object containing the following keys:
|
|
16
|
+
* @param {number} options.duration - Duration in milliseconds for the alert to be displayed (default: 5000).
|
|
17
|
+
* @param {string} options.position - Position of the alert on the screen. One of 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right' (default: 'top-center').
|
|
18
|
+
* @param {boolean} options.closeable - Whether the alert can be closed by the user (default: true).
|
|
19
|
+
* @param {boolean} options.autoClose - Whether the alert will close automatically after the duration (default: true).
|
|
20
|
+
* @param {string} options.width - The width of the alert (default: '400px').
|
|
21
|
+
* @param {function} options.onClose - A callback function to execute when the alert is closed (default: null).
|
|
22
|
+
*
|
|
21
23
|
*/
|
|
22
24
|
|
|
23
25
|
export class AvalynxAlert {
|
package/dist/js/avalynx-alert.js
CHANGED
|
@@ -3,22 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A simple alert system for web applications. Based on Bootstrap >=5.3 without any framework dependencies.
|
|
5
5
|
*
|
|
6
|
-
* @version 0.0.
|
|
6
|
+
* @version 0.0.8
|
|
7
7
|
* @license MIT
|
|
8
8
|
* @author https://github.com/avalynx/avalynx-alert/graphs/contributors
|
|
9
9
|
* @website https://github.com/avalynx/
|
|
10
10
|
* @repository https://github.com/avalynx/avalynx-alert.git
|
|
11
11
|
* @bugs https://github.com/avalynx/avalynx-alert/issues
|
|
12
12
|
*
|
|
13
|
-
* @param {string} message - The message to display in the alert.
|
|
14
|
-
* @param {string} type - The type of alert. One of 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'.
|
|
15
|
-
* @param {object} options -
|
|
16
|
-
* @param {number} options.duration -
|
|
17
|
-
* @param {string} options.position -
|
|
18
|
-
* @param {boolean} options.closeable - Whether the alert can be closed by the user
|
|
19
|
-
* @param {boolean} options.autoClose - Whether the alert will close automatically after the duration
|
|
20
|
-
* @param {string} options.width - The width of the alert
|
|
21
|
-
* @param {function} options.onClose - A callback function to
|
|
13
|
+
* @param {string} message - The message to display in the alert (default: '').
|
|
14
|
+
* @param {string} type - The type of alert. One of 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark' (default: 'info').
|
|
15
|
+
* @param {object} options - An object containing the following keys:
|
|
16
|
+
* @param {number} options.duration - Duration in milliseconds for the alert to be displayed (default: 5000).
|
|
17
|
+
* @param {string} options.position - Position of the alert on the screen. One of 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right' (default: 'top-center').
|
|
18
|
+
* @param {boolean} options.closeable - Whether the alert can be closed by the user (default: true).
|
|
19
|
+
* @param {boolean} options.autoClose - Whether the alert will close automatically after the duration (default: true).
|
|
20
|
+
* @param {string} options.width - The width of the alert (default: '400px').
|
|
21
|
+
* @param {function} options.onClose - A callback function to execute when the alert is closed (default: null).
|
|
22
|
+
*
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
25
|
class AvalynxAlert {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "avalynx-alert",
|
|
3
3
|
"title": "AvalynxAlert",
|
|
4
4
|
"description": "AvalynxAlert is a simple alert system for web applications. Based on Bootstrap >=5.3 without any framework dependencies.",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.8",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/js/avalynx-alert.js",
|
|
8
8
|
"module": "dist/js/avalynx-alert.esm.js",
|