@canonical/react-components 2.7.4 → 2.7.6

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.
@@ -14,6 +14,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
14
14
  * `ConfirmationModal` is a specialised version of the [Modal](?path=/docs/modal--default-story) component to prompt a confirmation from the user before executing an action.
15
15
  */
16
16
  const ConfirmationModal = _ref => {
17
+ var _cancelButtonProps$ty;
17
18
  let {
18
19
  cancelButtonLabel = "Cancel",
19
20
  cancelButtonProps,
@@ -37,6 +38,7 @@ const ConfirmationModal = _ref => {
37
38
  };
38
39
  return /*#__PURE__*/_react.default.createElement(_Modal.default, _extends({
39
40
  buttonRow: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, confirmExtra, /*#__PURE__*/_react.default.createElement(_Button.default, _extends({}, cancelButtonProps, {
41
+ type: (_cancelButtonProps$ty = cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.type) !== null && _cancelButtonProps$ty !== void 0 ? _cancelButtonProps$ty : "button",
40
42
  className: "u-no-margin--bottom",
41
43
  onClick: handleClick(props.close)
42
44
  }), cancelButtonLabel), /*#__PURE__*/_react.default.createElement(_ActionButton.default, _extends({}, confirmButtonProps, {
@@ -130,6 +130,7 @@ const Modal = _ref => {
130
130
  className: "p-modal__title",
131
131
  id: titleId
132
132
  }, title), !!close && /*#__PURE__*/_react.default.createElement("button", {
133
+ type: "button",
133
134
  className: "p-modal__close",
134
135
  "aria-label": "Close active modal",
135
136
  onClick: handleClose
@@ -1,3 +1,5 @@
1
+ @import "vanilla-framework";
2
+
1
3
  .toast-animate {
2
4
  position: relative;
3
5
  z-index: 101;
@@ -33,7 +35,7 @@
33
35
  }
34
36
 
35
37
  .toast-notification-list {
36
- background-color: white;
38
+ background-color: $colors--theme--background-default;
37
39
  box-shadow: 0 0 2rem 0.5rem rgb(0 0 0 / 22%);
38
40
  max-height: calc(100dvh - 4.5rem);
39
41
  overflow: auto;
@@ -47,7 +49,7 @@
47
49
 
48
50
  .dismiss {
49
51
  align-items: center;
50
- background-color: white;
52
+ background-color: $colors--theme--background-default;
51
53
  bottom: 0;
52
54
  display: flex;
53
55
  justify-content: space-between;
@@ -10,6 +10,7 @@ import ActionButton from "../ActionButton";
10
10
  * `ConfirmationModal` is a specialised version of the [Modal](?path=/docs/modal--default-story) component to prompt a confirmation from the user before executing an action.
11
11
  */
12
12
  export var ConfirmationModal = _ref => {
13
+ var _cancelButtonProps$ty;
13
14
  var {
14
15
  cancelButtonLabel = "Cancel",
15
16
  cancelButtonProps,
@@ -33,6 +34,7 @@ export var ConfirmationModal = _ref => {
33
34
  };
34
35
  return /*#__PURE__*/React.createElement(Modal, _extends({
35
36
  buttonRow: /*#__PURE__*/React.createElement(React.Fragment, null, confirmExtra, /*#__PURE__*/React.createElement(Button, _extends({}, cancelButtonProps, {
37
+ type: (_cancelButtonProps$ty = cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.type) !== null && _cancelButtonProps$ty !== void 0 ? _cancelButtonProps$ty : "button",
36
38
  className: "u-no-margin--bottom",
37
39
  onClick: handleClick(props.close)
38
40
  }), cancelButtonLabel), /*#__PURE__*/React.createElement(ActionButton, _extends({}, confirmButtonProps, {
@@ -124,6 +124,7 @@ export var Modal = _ref => {
124
124
  className: "p-modal__title",
125
125
  id: titleId
126
126
  }, title), !!close && /*#__PURE__*/React.createElement("button", {
127
+ type: "button",
127
128
  className: "p-modal__close",
128
129
  "aria-label": "Close active modal",
129
130
  onClick: handleClose
@@ -1,3 +1,5 @@
1
+ @import "vanilla-framework";
2
+
1
3
  .toast-animate {
2
4
  position: relative;
3
5
  z-index: 101;
@@ -33,7 +35,7 @@
33
35
  }
34
36
 
35
37
  .toast-notification-list {
36
- background-color: white;
38
+ background-color: $colors--theme--background-default;
37
39
  box-shadow: 0 0 2rem 0.5rem rgb(0 0 0 / 22%);
38
40
  max-height: calc(100dvh - 4.5rem);
39
41
  overflow: auto;
@@ -47,7 +49,7 @@
47
49
 
48
50
  .dismiss {
49
51
  align-items: center;
50
- background-color: white;
52
+ background-color: $colors--theme--background-default;
51
53
  bottom: 0;
52
54
  display: flex;
53
55
  justify-content: space-between;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "2.7.4",
3
+ "version": "2.7.6",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": {