@instructure/ui-alerts 10.13.0 → 10.13.1-pr-snapshot-1741357986437

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.13.1-pr-snapshot-1741357986437](https://github.com/instructure/instructure-ui/compare/v10.13.0...v10.13.1-pr-snapshot-1741357986437) (2025-03-07)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-alerts
9
+
10
+
11
+
12
+
13
+
6
14
  # [10.13.0](https://github.com/instructure/instructure-ui/compare/v10.12.0...v10.13.0) (2025-03-06)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-alerts
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  var _react = _interopRequireDefault(require("react"));
5
5
  var _react2 = require("@testing-library/react");
6
6
  var _vitest = require("vitest");
7
- var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
7
+ var _uiAxeCheck = require("@instructure/ui-axe-check");
8
8
  require("@testing-library/jest-dom");
9
9
  var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
10
10
  var _index = require("../index");
@@ -71,7 +71,7 @@ describe('<Alert />', () => {
71
71
  it(component.description, async () => {
72
72
  const _render = (0, _react2.render)(component.content),
73
73
  container = _render.container;
74
- const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
74
+ const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
75
75
  expect(axeCheck).toBe(true);
76
76
  });
77
77
  }
@@ -120,7 +120,7 @@ describe('<Alert />', () => {
120
120
  transition: "none"
121
121
  }, "Success: Sample alert text."))),
122
122
  container = _render3.container;
123
- const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
123
+ const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
124
124
  expect(axeCheck).toBe(true);
125
125
  });
126
126
  it('should add alert text to aria live region, when present', async () => {
@@ -9,16 +9,12 @@ exports.default = exports.Alert = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactDom = _interopRequireDefault(require("react-dom"));
11
11
  var _keycode = _interopRequireDefault(require("keycode"));
12
- var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
13
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
14
- var _CloseButton = require("@instructure/ui-buttons/lib/CloseButton");
15
- var _View = require("@instructure/ui-view/lib/View");
16
- var _ScreenReaderContent = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
17
- var _IconCheckMarkSolid = require("@instructure/ui-icons/lib/IconCheckMarkSolid.js");
18
- var _IconInfoBorderlessSolid = require("@instructure/ui-icons/lib/IconInfoBorderlessSolid.js");
19
- var _IconWarningBorderlessSolid = require("@instructure/ui-icons/lib/IconWarningBorderlessSolid.js");
20
- var _IconNoSolid = require("@instructure/ui-icons/lib/IconNoSolid.js");
21
- var _Transition = require("@instructure/ui-motion/lib/Transition");
12
+ var _uiReactUtils = require("@instructure/ui-react-utils");
13
+ var _uiButtons = require("@instructure/ui-buttons");
14
+ var _uiView = require("@instructure/ui-view");
15
+ var _uiA11yContent = require("@instructure/ui-a11y-content");
16
+ var _uiIcons = require("@instructure/ui-icons");
17
+ var _uiMotion = require("@instructure/ui-motion");
22
18
  var _console = require("@instructure/console");
23
19
  var _emotion = require("@instructure/emotion");
24
20
  var _styles = _interopRequireDefault(require("./styles"));
@@ -54,16 +50,16 @@ var _dec, _dec2, _class, _Alert;
54
50
  category: components
55
51
  ---
56
52
  **/
57
- let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_Alert = class Alert extends _react.Component {
53
+ let Alert = exports.Alert = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_Alert = class Alert extends _react.Component {
58
54
  constructor(props) {
59
55
  super(props);
60
56
  this._timeouts = [];
61
57
  this.srid = void 0;
62
58
  this.variantUI = {
63
- error: _IconNoSolid.IconNoSolid,
64
- info: _IconInfoBorderlessSolid.IconInfoBorderlessSolid,
65
- success: _IconCheckMarkSolid.IconCheckMarkSolid,
66
- warning: _IconWarningBorderlessSolid.IconWarningBorderlessSolid
59
+ error: _uiIcons.IconNoSolid,
60
+ info: _uiIcons.IconInfoBorderlessSolid,
61
+ success: _uiIcons.IconCheckMarkSolid,
62
+ warning: _uiIcons.IconWarningBorderlessSolid
67
63
  };
68
64
  this.ref = null;
69
65
  this.handleRef = el => {
@@ -129,7 +125,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
129
125
  }
130
126
  }
131
127
  createScreenreaderContentNode() {
132
- return (0, _emotion.jsx)(_ScreenReaderContent.ScreenReaderContent, null, this.props.children);
128
+ return (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, this.props.children);
133
129
  }
134
130
  createScreenreaderAlert() {
135
131
  const liveRegion = this.getLiveRegion();
@@ -185,11 +181,11 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
185
181
  }
186
182
  renderCloseButton() {
187
183
  var _this$props$styles2;
188
- const closeButtonLabel = this.props.renderCloseButtonLabel && (0, _callRenderProp.callRenderProp)(this.props.renderCloseButtonLabel);
184
+ const closeButtonLabel = this.props.renderCloseButtonLabel && (0, _uiReactUtils.callRenderProp)(this.props.renderCloseButtonLabel);
189
185
  return closeButtonLabel ? (0, _emotion.jsx)("div", {
190
186
  css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.closeButton,
191
187
  key: "closeButton"
192
- }, (0, _emotion.jsx)(_CloseButton.CloseButton, {
188
+ }, (0, _emotion.jsx)(_uiButtons.CloseButton, {
193
189
  onClick: this.close,
194
190
  size: "small",
195
191
  screenReaderLabel: closeButtonLabel
@@ -197,7 +193,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
197
193
  }
198
194
  renderAlert() {
199
195
  var _this$props$styles3, _this$props$styles4;
200
- return (0, _emotion.jsx)(_View.View, {
196
+ return (0, _emotion.jsx)(_uiView.View, {
201
197
  as: "div",
202
198
  margin: this.props.margin,
203
199
  css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.alert,
@@ -224,7 +220,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
224
220
  if (this.props.transition === 'none') {
225
221
  return this.state.open ? (0, _emotion.jsx)(_react.default.Fragment, null, screenReaderContent, this.renderAlert()) : null;
226
222
  }
227
- return (0, _emotion.jsx)(_react.default.Fragment, null, screenReaderContent, (0, _emotion.jsx)(_Transition.Transition, {
223
+ return (0, _emotion.jsx)(_react.default.Fragment, null, screenReaderContent, (0, _emotion.jsx)(_uiMotion.Transition, {
228
224
  type: this.props.transition,
229
225
  transitionOnMount: true,
230
226
  in: this.state.open,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-alerts",
3
- "version": "10.13.0",
3
+ "version": "10.13.1-pr-snapshot-1741357986437",
4
4
  "description": "An alert component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "10.13.0",
27
- "@instructure/ui-babel-preset": "10.13.0",
28
- "@instructure/ui-color-utils": "10.13.0",
29
- "@instructure/ui-scripts": "10.13.0",
30
- "@instructure/ui-test-utils": "10.13.0",
26
+ "@instructure/ui-axe-check": "10.13.1-pr-snapshot-1741357986437",
27
+ "@instructure/ui-babel-preset": "10.13.1-pr-snapshot-1741357986437",
28
+ "@instructure/ui-color-utils": "10.13.1-pr-snapshot-1741357986437",
29
+ "@instructure/ui-scripts": "10.13.1-pr-snapshot-1741357986437",
30
+ "@instructure/ui-test-utils": "10.13.1-pr-snapshot-1741357986437",
31
31
  "@testing-library/jest-dom": "^6.6.3",
32
32
  "@testing-library/react": "^16.0.1",
33
33
  "@testing-library/user-event": "^14.5.2",
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.26.0",
38
- "@instructure/console": "10.13.0",
39
- "@instructure/emotion": "10.13.0",
40
- "@instructure/shared-types": "10.13.0",
41
- "@instructure/ui-a11y-content": "10.13.0",
42
- "@instructure/ui-buttons": "10.13.0",
43
- "@instructure/ui-icons": "10.13.0",
44
- "@instructure/ui-motion": "10.13.0",
45
- "@instructure/ui-react-utils": "10.13.0",
46
- "@instructure/ui-themes": "10.13.0",
47
- "@instructure/ui-view": "10.13.0",
38
+ "@instructure/console": "10.13.1-pr-snapshot-1741357986437",
39
+ "@instructure/emotion": "10.13.1-pr-snapshot-1741357986437",
40
+ "@instructure/shared-types": "10.13.1-pr-snapshot-1741357986437",
41
+ "@instructure/ui-a11y-content": "10.13.1-pr-snapshot-1741357986437",
42
+ "@instructure/ui-buttons": "10.13.1-pr-snapshot-1741357986437",
43
+ "@instructure/ui-icons": "10.13.1-pr-snapshot-1741357986437",
44
+ "@instructure/ui-motion": "10.13.1-pr-snapshot-1741357986437",
45
+ "@instructure/ui-react-utils": "10.13.1-pr-snapshot-1741357986437",
46
+ "@instructure/ui-themes": "10.13.1-pr-snapshot-1741357986437",
47
+ "@instructure/ui-view": "10.13.1-pr-snapshot-1741357986437",
48
48
  "keycode": "^2",
49
49
  "prop-types": "^15.8.1"
50
50
  },