@gemeente-denhaag/alert 4.0.11 → 4.1.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.
- package/dist/cjs/index.js +4 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/mjs/index.js +4 -5
- package/dist/mjs/index.js.map +1 -1
- package/package.json +9 -5
package/dist/cjs/index.js
CHANGED
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
}/**
|
|
19
19
|
* Primary UI component for user interaction
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var icon;
|
|
21
|
+
const Alert = ({ id, title, text, variant, action, close, supportIcon, className }) => {
|
|
22
|
+
const rootClassNames = clsx('denhaag-alert', `denhaag-alert--${variant}`, className);
|
|
23
|
+
let icon;
|
|
25
24
|
if (supportIcon !== undefined) {
|
|
26
25
|
icon = supportIcon;
|
|
27
26
|
}
|
|
@@ -47,7 +46,7 @@ var Alert = function (_a) {
|
|
|
47
46
|
React.createElement("div", { className: "denhaag-alert__content" },
|
|
48
47
|
React.createElement(heading.Heading, { level: 4 }, title),
|
|
49
48
|
React.createElement("div", null, text)),
|
|
50
|
-
action && (React.createElement(button.Button, { type: "button", onClick:
|
|
49
|
+
action && (React.createElement(button.Button, { type: "button", onClick: () => action.onClick() }, action.buttonText))),
|
|
51
50
|
close && (React.createElement("div", { className: "denhaag-alert__close" },
|
|
52
51
|
React.createElement(iconbutton.IconButton, { "aria-label": "Close", onClick: close, tabIndex: 0 },
|
|
53
52
|
React.createElement(icons.CloseIcon, null))))));
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/mjs/index.js
CHANGED
|
@@ -18,10 +18,9 @@ import React from'react';import {Button}from'@gemeente-denhaag/button';import {H
|
|
|
18
18
|
}/**
|
|
19
19
|
* Primary UI component for user interaction
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var icon;
|
|
21
|
+
const Alert = ({ id, title, text, variant, action, close, supportIcon, className }) => {
|
|
22
|
+
const rootClassNames = clsx('denhaag-alert', `denhaag-alert--${variant}`, className);
|
|
23
|
+
let icon;
|
|
25
24
|
if (supportIcon !== undefined) {
|
|
26
25
|
icon = supportIcon;
|
|
27
26
|
}
|
|
@@ -47,7 +46,7 @@ var Alert = function (_a) {
|
|
|
47
46
|
React.createElement("div", { className: "denhaag-alert__content" },
|
|
48
47
|
React.createElement(Heading, { level: 4 }, title),
|
|
49
48
|
React.createElement("div", null, text)),
|
|
50
|
-
action && (React.createElement(Button, { type: "button", onClick:
|
|
49
|
+
action && (React.createElement(Button, { type: "button", onClick: () => action.onClick() }, action.buttonText))),
|
|
51
50
|
close && (React.createElement("div", { className: "denhaag-alert__close" },
|
|
52
51
|
React.createElement(IconButton, { "aria-label": "Close", onClick: close, tabIndex: 0 },
|
|
53
52
|
React.createElement(CloseIcon, null))))));
|
package/dist/mjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gemeente-denhaag/alert",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "An alert component",
|
|
5
5
|
"bugs": "https://github.com/nl-design-system/denhaag/issues",
|
|
6
6
|
"repository": {
|
|
@@ -26,15 +26,19 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"clsx": "2.1.1",
|
|
29
|
-
"@gemeente-denhaag/
|
|
30
|
-
"@gemeente-denhaag/
|
|
31
|
-
"@gemeente-denhaag/
|
|
32
|
-
"@gemeente-denhaag/
|
|
29
|
+
"@gemeente-denhaag/heading": "2.2.1",
|
|
30
|
+
"@gemeente-denhaag/iconbutton": "3.2.1",
|
|
31
|
+
"@gemeente-denhaag/icons": "4.2.1",
|
|
32
|
+
"@gemeente-denhaag/button": "3.1.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "18 || 19",
|
|
36
36
|
"react-dom": "18 || 19"
|
|
37
37
|
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public",
|
|
40
|
+
"provenance": true
|
|
41
|
+
},
|
|
38
42
|
"scripts": {
|
|
39
43
|
"build": "rollup -c ../../rollup.config.mjs",
|
|
40
44
|
"clean": "rimraf dist tsconfig.tsbuildinfo",
|