@festo-ui/react 6.1.0-dev.291 → 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",
@@ -26,7 +26,7 @@ function PopoverMenu(_ref) {
26
26
  className: "fwe-btn fwe-btn-link fwe-dark",
27
27
  onClick: () => handleClick(item),
28
28
  children: [/*#__PURE__*/_jsx("i", {
29
- className: `fwe-icon fwe-pr-0 ${item.icon}`
29
+ className: `fwe-icon fwe-mr-0 ${item.icon}`
30
30
  }), /*#__PURE__*/_jsx("span", {
31
31
  children: item.text
32
32
  })]
@@ -46,7 +46,7 @@ function PopoverMenu(_ref) {
46
46
  "data-testid": "fwe-popover-menu-button",
47
47
  className: "fwe-btn fwe-btn-link fwe-dark origin",
48
48
  children: /*#__PURE__*/_jsx("i", {
49
- className: `fwe-icon fwe-pr-0 ${icon}`
49
+ className: `fwe-icon fwe-mr-0 ${icon}`
50
50
  })
51
51
  })
52
52
  })
@@ -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
  })
@@ -74,7 +74,7 @@ function TextEditorButton(_ref) {
74
74
  className: `fr-button-text fwe-text-${type}`,
75
75
  children: label
76
76
  }), icon && /*#__PURE__*/_jsx("i", {
77
- className: classNames('fwe-icon fwe-icon-toolbar-list', `fwe-icon-${icon}`, 'fwe-pr-0')
77
+ className: classNames('fwe-icon fwe-icon-toolbar-list', `fwe-icon-${icon}`, 'fwe-mr-0')
78
78
  })]
79
79
  })]
80
80
  });
@@ -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",
@@ -32,7 +32,7 @@ function PopoverMenu(_ref) {
32
32
  className: "fwe-btn fwe-btn-link fwe-dark",
33
33
  onClick: () => handleClick(item),
34
34
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
35
- className: `fwe-icon fwe-pr-0 ${item.icon}`
35
+ className: `fwe-icon fwe-mr-0 ${item.icon}`
36
36
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
37
37
  children: item.text
38
38
  })]
@@ -52,7 +52,7 @@ function PopoverMenu(_ref) {
52
52
  "data-testid": "fwe-popover-menu-button",
53
53
  className: "fwe-btn fwe-btn-link fwe-dark origin",
54
54
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
55
- className: `fwe-icon fwe-pr-0 ${icon}`
55
+ className: `fwe-icon fwe-mr-0 ${icon}`
56
56
  })
57
57
  })
58
58
  })
@@ -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
  })
@@ -79,7 +79,7 @@ function TextEditorButton(_ref) {
79
79
  className: `fr-button-text fwe-text-${type}`,
80
80
  children: label
81
81
  }), icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
82
- className: (0, _classnames.default)('fwe-icon fwe-icon-toolbar-list', `fwe-icon-${icon}`, 'fwe-pr-0')
82
+ className: (0, _classnames.default)('fwe-icon fwe-icon-toolbar-list', `fwe-icon-${icon}`, 'fwe-mr-0')
83
83
  })]
84
84
  })]
85
85
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "6.1.0-dev.291",
3
+ "version": "6.1.0-dev.294",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "exports": {