@instructure/ui-alerts 10.4.2-snapshot-0 → 10.4.2-snapshot-2

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,9 +3,12 @@
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.4.2-snapshot-0](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.4.2-snapshot-0) (2024-10-28)
6
+ ## [10.4.2-snapshot-2](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.4.2-snapshot-2) (2024-10-30)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-alerts
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-alerts:** trigger onDismiss for SR only alerts ([98750f6](https://github.com/instructure/instructure-ui/commit/98750f689419aeb85969c93bceb31b2c74a34d68))
9
12
 
10
13
 
11
14
 
package/es/Alert/index.js CHANGED
@@ -75,7 +75,7 @@ let Alert = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
75
75
  this.setState({
76
76
  open: false
77
77
  }, () => {
78
- if (this.props.onDismiss && this.props.transition === 'none') {
78
+ if (this.props.onDismiss && (this.props.transition === 'none' || this.props.screenReaderOnly)) {
79
79
  this.props.onDismiss();
80
80
  }
81
81
  });
@@ -87,7 +87,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
87
87
  this.setState({
88
88
  open: false
89
89
  }, () => {
90
- if (this.props.onDismiss && this.props.transition === 'none') {
90
+ if (this.props.onDismiss && (this.props.transition === 'none' || this.props.screenReaderOnly)) {
91
91
  this.props.onDismiss();
92
92
  }
93
93
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-alerts",
3
- "version": "10.4.2-snapshot-0",
3
+ "version": "10.4.2-snapshot-2",
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.4.2-snapshot-0",
27
- "@instructure/ui-babel-preset": "10.4.2-snapshot-0",
28
- "@instructure/ui-color-utils": "10.4.2-snapshot-0",
29
- "@instructure/ui-scripts": "10.4.2-snapshot-0",
30
- "@instructure/ui-test-utils": "10.4.2-snapshot-0",
26
+ "@instructure/ui-axe-check": "10.4.2-snapshot-2",
27
+ "@instructure/ui-babel-preset": "10.4.2-snapshot-2",
28
+ "@instructure/ui-color-utils": "10.4.2-snapshot-2",
29
+ "@instructure/ui-scripts": "10.4.2-snapshot-2",
30
+ "@instructure/ui-test-utils": "10.4.2-snapshot-2",
31
31
  "@testing-library/jest-dom": "^6.4.6",
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.25.6",
38
- "@instructure/console": "10.4.2-snapshot-0",
39
- "@instructure/emotion": "10.4.2-snapshot-0",
40
- "@instructure/shared-types": "10.4.2-snapshot-0",
41
- "@instructure/ui-a11y-content": "10.4.2-snapshot-0",
42
- "@instructure/ui-buttons": "10.4.2-snapshot-0",
43
- "@instructure/ui-icons": "10.4.2-snapshot-0",
44
- "@instructure/ui-motion": "10.4.2-snapshot-0",
45
- "@instructure/ui-react-utils": "10.4.2-snapshot-0",
46
- "@instructure/ui-themes": "10.4.2-snapshot-0",
47
- "@instructure/ui-view": "10.4.2-snapshot-0",
38
+ "@instructure/console": "10.4.2-snapshot-2",
39
+ "@instructure/emotion": "10.4.2-snapshot-2",
40
+ "@instructure/shared-types": "10.4.2-snapshot-2",
41
+ "@instructure/ui-a11y-content": "10.4.2-snapshot-2",
42
+ "@instructure/ui-buttons": "10.4.2-snapshot-2",
43
+ "@instructure/ui-icons": "10.4.2-snapshot-2",
44
+ "@instructure/ui-motion": "10.4.2-snapshot-2",
45
+ "@instructure/ui-react-utils": "10.4.2-snapshot-2",
46
+ "@instructure/ui-themes": "10.4.2-snapshot-2",
47
+ "@instructure/ui-view": "10.4.2-snapshot-2",
48
48
  "keycode": "^2",
49
49
  "prop-types": "^15.8.1"
50
50
  },
@@ -125,7 +125,10 @@ class Alert extends Component<AlertProps, AlertState> {
125
125
  this.clearTimeouts()
126
126
  this.removeScreenreaderAlert()
127
127
  this.setState({ open: false }, () => {
128
- if (this.props.onDismiss && this.props.transition === 'none') {
128
+ if (
129
+ this.props.onDismiss &&
130
+ (this.props.transition === 'none' || this.props.screenReaderOnly)
131
+ ) {
129
132
  this.props.onDismiss()
130
133
  }
131
134
  })