@instructure/ui-alerts 10.15.3-snapshot-1 → 10.15.3-snapshot-0

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,12 +3,9 @@
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.15.3-snapshot-1](https://github.com/instructure/instructure-ui/compare/v10.15.2...v10.15.3-snapshot-1) (2025-04-10)
6
+ ## [10.15.3-snapshot-0](https://github.com/instructure/instructure-ui/compare/v10.15.2...v10.15.3-snapshot-0) (2025-04-10)
7
7
 
8
-
9
- ### Bug Fixes
10
-
11
- * **ui-alerts:** no passthroughProps are set in component so Alert won't pass down props such as id to the underlaying DOM ([e481373](https://github.com/instructure/instructure-ui/commit/e481373d1b16dc26f7c808e4ea31bd8c59e41883))
8
+ **Note:** Version bump only for package @instructure/ui-alerts
12
9
 
13
10
 
14
11
 
package/es/Alert/index.js CHANGED
@@ -1,5 +1,3 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["margin", "styles", "children"];
3
1
  var _dec, _dec2, _class, _Alert;
4
2
  /*
5
3
  * The MIT License (MIT)
@@ -28,7 +26,7 @@ var _dec, _dec2, _class, _Alert;
28
26
  import React, { Component } from 'react';
29
27
  import ReactDOM from 'react-dom';
30
28
  import keycode from 'keycode';
31
- import { callRenderProp, withDeterministicId, passthroughProps } from '@instructure/ui-react-utils';
29
+ import { callRenderProp, withDeterministicId } from '@instructure/ui-react-utils';
32
30
  import { CloseButton } from '@instructure/ui-buttons';
33
31
  import { View } from '@instructure/ui-view';
34
32
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
@@ -186,22 +184,16 @@ let Alert = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
186
184
  })) : null;
187
185
  }
188
186
  renderAlert() {
189
- const _this$props3 = this.props,
190
- margin = _this$props3.margin,
191
- styles = _this$props3.styles,
192
- children = _this$props3.children,
193
- props = _objectWithoutProperties(_this$props3, _excluded);
194
- return jsx(View, Object.assign({}, passthroughProps({
195
- ...props
196
- }), {
187
+ var _this$props$styles3, _this$props$styles4;
188
+ return jsx(View, {
197
189
  as: "div",
198
- margin: margin,
199
- css: styles === null || styles === void 0 ? void 0 : styles.alert,
190
+ margin: this.props.margin,
191
+ css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.alert,
200
192
  onKeyUp: this.handleKeyUp,
201
193
  elementRef: this.handleRef
202
- }), this.renderIcon(), jsx("div", {
203
- css: styles === null || styles === void 0 ? void 0 : styles.content
204
- }, children), this.renderCloseButton());
194
+ }, this.renderIcon(), jsx("div", {
195
+ css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.content
196
+ }, this.props.children), this.renderCloseButton());
205
197
  }
206
198
  createScreenReaderPortal(liveRegion) {
207
199
  const open = this.state.open;
@@ -1,18 +1,16 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = exports.Alert = void 0;
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _reactDom = _interopRequireDefault(require("react-dom"));
12
11
  var _keycode = _interopRequireDefault(require("keycode"));
13
12
  var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
14
13
  var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
15
- var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
16
14
  var _CloseButton = require("@instructure/ui-buttons/lib/CloseButton");
17
15
  var _View = require("@instructure/ui-view/lib/View");
18
16
  var _ScreenReaderContent = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
@@ -26,7 +24,6 @@ var _emotion = require("@instructure/emotion");
26
24
  var _styles = _interopRequireDefault(require("./styles"));
27
25
  var _theme = _interopRequireDefault(require("./theme"));
28
26
  var _props = require("./props");
29
- const _excluded = ["margin", "styles", "children"];
30
27
  var _dec, _dec2, _class, _Alert;
31
28
  /*
32
29
  * The MIT License (MIT)
@@ -199,22 +196,16 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
199
196
  })) : null;
200
197
  }
201
198
  renderAlert() {
202
- const _this$props3 = this.props,
203
- margin = _this$props3.margin,
204
- styles = _this$props3.styles,
205
- children = _this$props3.children,
206
- props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
207
- return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)({
208
- ...props
209
- }), {
199
+ var _this$props$styles3, _this$props$styles4;
200
+ return (0, _emotion.jsx)(_View.View, {
210
201
  as: "div",
211
- margin: margin,
212
- css: styles === null || styles === void 0 ? void 0 : styles.alert,
202
+ margin: this.props.margin,
203
+ css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.alert,
213
204
  onKeyUp: this.handleKeyUp,
214
205
  elementRef: this.handleRef
215
- }), this.renderIcon(), (0, _emotion.jsx)("div", {
216
- css: styles === null || styles === void 0 ? void 0 : styles.content
217
- }, children), this.renderCloseButton());
206
+ }, this.renderIcon(), (0, _emotion.jsx)("div", {
207
+ css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.content
208
+ }, this.props.children), this.renderCloseButton());
218
209
  }
219
210
  createScreenReaderPortal(liveRegion) {
220
211
  const open = this.state.open;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-alerts",
3
- "version": "10.15.3-snapshot-1",
3
+ "version": "10.15.3-snapshot-0",
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.15.3-snapshot-1",
27
- "@instructure/ui-babel-preset": "10.15.3-snapshot-1",
28
- "@instructure/ui-color-utils": "10.15.3-snapshot-1",
29
- "@instructure/ui-scripts": "10.15.3-snapshot-1",
30
- "@instructure/ui-test-utils": "10.15.3-snapshot-1",
26
+ "@instructure/ui-axe-check": "10.15.3-snapshot-0",
27
+ "@instructure/ui-babel-preset": "10.15.3-snapshot-0",
28
+ "@instructure/ui-color-utils": "10.15.3-snapshot-0",
29
+ "@instructure/ui-scripts": "10.15.3-snapshot-0",
30
+ "@instructure/ui-test-utils": "10.15.3-snapshot-0",
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.15.3-snapshot-1",
39
- "@instructure/emotion": "10.15.3-snapshot-1",
40
- "@instructure/shared-types": "10.15.3-snapshot-1",
41
- "@instructure/ui-a11y-content": "10.15.3-snapshot-1",
42
- "@instructure/ui-buttons": "10.15.3-snapshot-1",
43
- "@instructure/ui-icons": "10.15.3-snapshot-1",
44
- "@instructure/ui-motion": "10.15.3-snapshot-1",
45
- "@instructure/ui-react-utils": "10.15.3-snapshot-1",
46
- "@instructure/ui-themes": "10.15.3-snapshot-1",
47
- "@instructure/ui-view": "10.15.3-snapshot-1",
38
+ "@instructure/console": "10.15.3-snapshot-0",
39
+ "@instructure/emotion": "10.15.3-snapshot-0",
40
+ "@instructure/shared-types": "10.15.3-snapshot-0",
41
+ "@instructure/ui-a11y-content": "10.15.3-snapshot-0",
42
+ "@instructure/ui-buttons": "10.15.3-snapshot-0",
43
+ "@instructure/ui-icons": "10.15.3-snapshot-0",
44
+ "@instructure/ui-motion": "10.15.3-snapshot-0",
45
+ "@instructure/ui-react-utils": "10.15.3-snapshot-0",
46
+ "@instructure/ui-themes": "10.15.3-snapshot-0",
47
+ "@instructure/ui-view": "10.15.3-snapshot-0",
48
48
  "keycode": "^2",
49
49
  "prop-types": "^15.8.1"
50
50
  },
@@ -28,8 +28,7 @@ import keycode from 'keycode'
28
28
 
29
29
  import {
30
30
  callRenderProp,
31
- withDeterministicId,
32
- passthroughProps
31
+ withDeterministicId
33
32
  } from '@instructure/ui-react-utils'
34
33
  import { CloseButton } from '@instructure/ui-buttons'
35
34
  import { View } from '@instructure/ui-view'
@@ -258,18 +257,16 @@ class Alert extends Component<AlertProps, AlertState> {
258
257
  }
259
258
 
260
259
  renderAlert() {
261
- const { margin, styles, children, ...props } = this.props
262
260
  return (
263
261
  <View
264
- {...passthroughProps({ ...props })}
265
262
  as="div"
266
- margin={margin}
267
- css={styles?.alert}
263
+ margin={this.props.margin}
264
+ css={this.props.styles?.alert}
268
265
  onKeyUp={this.handleKeyUp}
269
266
  elementRef={this.handleRef}
270
267
  >
271
268
  {this.renderIcon()}
272
- <div css={styles?.content}>{children}</div>
269
+ <div css={this.props.styles?.content}>{this.props.children}</div>
273
270
  {this.renderCloseButton()}
274
271
  </View>
275
272
  )