@festo-ui/react 6.1.0-dev.292 → 6.1.0-dev.294

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.
@@ -2,8 +2,8 @@ import cn from 'classnames';
2
2
  import Modal from './Modal';
3
3
  import ModalFooter from './ModalFooter';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
5
  import { Fragment as _Fragment } from "react/jsx-runtime";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  function AlertModal(_ref) {
8
8
  let {
9
9
  alertType,
@@ -26,26 +26,12 @@ function AlertModal(_ref) {
26
26
  'fwe-modal--info': alertType === 'info'
27
27
  }, className),
28
28
  head: /*#__PURE__*/_jsxs(_Fragment, {
29
- children: [subtitle && /*#__PURE__*/_jsxs("h2", {
29
+ children: [subtitle && /*#__PURE__*/_jsx("h2", {
30
30
  className: "fwe-modal-h2",
31
- children: [/*#__PURE__*/_jsx("i", {
32
- className: cn({
33
- 'fwe-icon': true,
34
- 'fwe-icon-status-warning': alertType === 'warning',
35
- 'fwe-icon-status-failure': alertType === 'error',
36
- 'fwe-icon-status-check-status': alertType === 'info'
37
- })
38
- }), subtitle]
39
- }), /*#__PURE__*/_jsxs("h1", {
31
+ children: subtitle
32
+ }), /*#__PURE__*/_jsx("h1", {
40
33
  className: "fwe-modal-h1",
41
- children: [/*#__PURE__*/_jsx("i", {
42
- className: cn({
43
- 'fwe-icon': true,
44
- 'fwe-icon-status-warning': alertType === 'warning',
45
- 'fwe-icon-status-failure': alertType === 'error',
46
- 'fwe-icon-status-check-status': alertType === 'info'
47
- })
48
- }), title]
34
+ children: title
49
35
  })]
50
36
  }),
51
37
  body: typeof body === 'string' ? /*#__PURE__*/_jsx("p", {
@@ -16,20 +16,14 @@ const Modal = /*#__PURE__*/forwardRef((_ref, ref) => {
16
16
  className: className,
17
17
  ref: ref,
18
18
  onClose: onClose,
19
- children: [/*#__PURE__*/_jsx("div", {
20
- className: "fwe-modal-close",
21
- children: /*#__PURE__*/_jsxs("button", {
22
- type: "button",
23
- "aria-label": "Close",
24
- className: "fwe-btn fwe-btn-link fwe-dark",
25
- onClick: onClose,
26
- children: [/*#__PURE__*/_jsx("i", {
27
- "aria-hidden": "true",
28
- className: "fwe-icon fwe-icon-2x fwe-icon-close-small"
29
- }), /*#__PURE__*/_jsx("span", {
30
- className: "fwe-sr-only",
31
- children: "Close"
32
- })]
19
+ children: [/*#__PURE__*/_jsx("button", {
20
+ className: "fwe-modal-close-btn",
21
+ type: "button",
22
+ "aria-label": "Close",
23
+ onClick: onClose,
24
+ children: /*#__PURE__*/_jsx("span", {
25
+ className: "fwe-sr-only",
26
+ children: "Close"
33
27
  })
34
28
  }), /*#__PURE__*/_jsx("div", {
35
29
  className: "fwe-modal-header",
@@ -47,38 +47,30 @@ function Snackbar(props) {
47
47
  'fwe-snackbar': true,
48
48
  'fwe-snackbar-b': data?.variant === 'b',
49
49
  'fwe-snackbar-c': data?.variant === 'c',
50
+ 'fwe-snackbar-info': data?.type === 'info',
50
51
  'fwe-snackbar-warning': data?.type === 'warning',
51
52
  'fwe-snackbar-error': data?.type === 'error',
52
53
  'fwe-snackbar-shadow': data?.darkBackground
53
54
  }, data?.className),
54
- children: [data?.type && /*#__PURE__*/_jsx("i", {
55
- "aria-hidden": true,
56
- className: classNames({
57
- 'fwe-icon': true,
58
- 'fwe-icon-status-info': data?.type === 'info',
59
- 'fwe-icon-status-warning': data?.type === 'warning',
60
- 'fwe-icon-status-failure': data?.type === 'error'
61
- })
62
- }), /*#__PURE__*/_jsx("span", {
55
+ children: [/*#__PURE__*/_jsx("span", {
63
56
  children: data?.text
64
57
  }), data?.action && /*#__PURE__*/_jsx("button", {
65
58
  "aria-label": "UserAction",
66
59
  type: "button",
67
- className: "fwe-btn fwe-btn-link",
60
+ className: "fwe-snackbar-link-btn",
68
61
  onClick: () => onAction ? onAction() : undefined,
69
62
  children: data?.action
70
- }), data?.showClose && /*#__PURE__*/_jsxs("button", {
63
+ }), data?.action && data?.showClose && /*#__PURE__*/_jsx("div", {
64
+ className: "fwe-snackbar-separator"
65
+ }), data?.showClose && /*#__PURE__*/_jsx("button", {
71
66
  "aria-label": "Close",
72
67
  type: "button",
73
- className: "fwe-btn fwe-btn-link",
68
+ className: "fwe-snackbar-close-btn",
74
69
  onClick: handleClose,
75
- children: [/*#__PURE__*/_jsx("i", {
76
- "aria-hidden": true,
77
- className: "fwe-icon fwe-icon-close-small"
78
- }), /*#__PURE__*/_jsx("span", {
70
+ children: /*#__PURE__*/_jsx("span", {
79
71
  className: "fwe-sr-only",
80
72
  children: "Close"
81
- })]
73
+ })
82
74
  })]
83
75
  })
84
76
  })
@@ -31,26 +31,12 @@ function AlertModal(_ref) {
31
31
  'fwe-modal--info': alertType === 'info'
32
32
  }, className),
33
33
  head: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
34
- children: [subtitle && /*#__PURE__*/(0, _jsxRuntime.jsxs)("h2", {
34
+ children: [subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
35
35
  className: "fwe-modal-h2",
36
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
37
- className: (0, _classnames.default)({
38
- 'fwe-icon': true,
39
- 'fwe-icon-status-warning': alertType === 'warning',
40
- 'fwe-icon-status-failure': alertType === 'error',
41
- 'fwe-icon-status-check-status': alertType === 'info'
42
- })
43
- }), subtitle]
44
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("h1", {
36
+ children: subtitle
37
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("h1", {
45
38
  className: "fwe-modal-h1",
46
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
47
- className: (0, _classnames.default)({
48
- 'fwe-icon': true,
49
- 'fwe-icon-status-warning': alertType === 'warning',
50
- 'fwe-icon-status-failure': alertType === 'error',
51
- 'fwe-icon-status-check-status': alertType === 'info'
52
- })
53
- }), title]
39
+ children: title
54
40
  })]
55
41
  }),
56
42
  body: typeof body === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
@@ -24,20 +24,14 @@ const Modal = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
24
24
  className: className,
25
25
  ref: ref,
26
26
  onClose: onClose,
27
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
28
- className: "fwe-modal-close",
29
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
30
- type: "button",
31
- "aria-label": "Close",
32
- className: "fwe-btn fwe-btn-link fwe-dark",
33
- onClick: onClose,
34
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
35
- "aria-hidden": "true",
36
- className: "fwe-icon fwe-icon-2x fwe-icon-close-small"
37
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
38
- className: "fwe-sr-only",
39
- children: "Close"
40
- })]
27
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
28
+ className: "fwe-modal-close-btn",
29
+ type: "button",
30
+ "aria-label": "Close",
31
+ onClick: onClose,
32
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
33
+ className: "fwe-sr-only",
34
+ children: "Close"
41
35
  })
42
36
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
43
37
  className: "fwe-modal-header",
@@ -53,38 +53,30 @@ function Snackbar(props) {
53
53
  'fwe-snackbar': true,
54
54
  'fwe-snackbar-b': data?.variant === 'b',
55
55
  'fwe-snackbar-c': data?.variant === 'c',
56
+ 'fwe-snackbar-info': data?.type === 'info',
56
57
  'fwe-snackbar-warning': data?.type === 'warning',
57
58
  'fwe-snackbar-error': data?.type === 'error',
58
59
  'fwe-snackbar-shadow': data?.darkBackground
59
60
  }, data?.className),
60
- children: [data?.type && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
61
- "aria-hidden": true,
62
- className: (0, _classnames.default)({
63
- 'fwe-icon': true,
64
- 'fwe-icon-status-info': data?.type === 'info',
65
- 'fwe-icon-status-warning': data?.type === 'warning',
66
- 'fwe-icon-status-failure': data?.type === 'error'
67
- })
68
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
61
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
69
62
  children: data?.text
70
63
  }), data?.action && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
71
64
  "aria-label": "UserAction",
72
65
  type: "button",
73
- className: "fwe-btn fwe-btn-link",
66
+ className: "fwe-snackbar-link-btn",
74
67
  onClick: () => onAction ? onAction() : undefined,
75
68
  children: data?.action
76
- }), data?.showClose && /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
69
+ }), data?.action && data?.showClose && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
70
+ className: "fwe-snackbar-separator"
71
+ }), data?.showClose && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
77
72
  "aria-label": "Close",
78
73
  type: "button",
79
- className: "fwe-btn fwe-btn-link",
74
+ className: "fwe-snackbar-close-btn",
80
75
  onClick: handleClose,
81
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
82
- "aria-hidden": true,
83
- className: "fwe-icon fwe-icon-close-small"
84
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
76
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
85
77
  className: "fwe-sr-only",
86
78
  children: "Close"
87
- })]
79
+ })
88
80
  })]
89
81
  })
90
82
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "6.1.0-dev.292",
3
+ "version": "6.1.0-dev.294",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "exports": {