@instructure/ui-alerts 11.7.9-snapshot-0 → 11.7.9-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 +1 -1
- package/lib/Alert/v1/index.js +14 -19
- package/lib/Alert/v2/index.js +9 -11
- package/package.json +17 -17
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
## [11.7.9-snapshot-
|
|
6
|
+
## [11.7.9-snapshot-2](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-snapshot-2) (2026-10-12)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-alerts
|
|
9
9
|
|
package/lib/Alert/v1/index.js
CHANGED
|
@@ -8,17 +8,12 @@ exports.default = exports.Alert = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
10
|
var _keycode = _interopRequireDefault(require("keycode"));
|
|
11
|
-
var
|
|
12
|
-
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
13
|
-
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
11
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
14
12
|
var _v11_ = require("@instructure/ui-buttons/v11_6");
|
|
15
13
|
var _v11_2 = require("@instructure/ui-view/v11_6");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var _IconWarningBorderlessSolid = require("@instructure/ui-icons/lib/generated/IconWarningBorderlessSolid.js");
|
|
20
|
-
var _IconNoSolid = require("@instructure/ui-icons/lib/generated/IconNoSolid.js");
|
|
21
|
-
var _Transition = require("@instructure/ui-motion/lib/Transition");
|
|
14
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
15
|
+
var _uiIcons = require("@instructure/ui-icons");
|
|
16
|
+
var _uiMotion = require("@instructure/ui-motion");
|
|
22
17
|
var _console = require("@instructure/console");
|
|
23
18
|
var _emotion = require("@instructure/emotion");
|
|
24
19
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
@@ -54,7 +49,7 @@ var _dec, _dec2, _class;
|
|
|
54
49
|
category: components
|
|
55
50
|
---
|
|
56
51
|
**/
|
|
57
|
-
let Alert = exports.Alert = (_dec = (0,
|
|
52
|
+
let Alert = exports.Alert = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = class Alert extends _react.Component {
|
|
58
53
|
static displayName = 'Alert';
|
|
59
54
|
static componentId = 'Alert';
|
|
60
55
|
static allowedProps = _props.allowedProps;
|
|
@@ -80,10 +75,10 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
80
75
|
_timeouts = [];
|
|
81
76
|
srid;
|
|
82
77
|
variantUI = {
|
|
83
|
-
error:
|
|
84
|
-
info:
|
|
85
|
-
success:
|
|
86
|
-
warning:
|
|
78
|
+
error: _uiIcons.IconNoSolid,
|
|
79
|
+
info: _uiIcons.IconInfoBorderlessSolid,
|
|
80
|
+
success: _uiIcons.IconCheckMarkSolid,
|
|
81
|
+
warning: _uiIcons.IconWarningBorderlessSolid
|
|
87
82
|
};
|
|
88
83
|
ref = null;
|
|
89
84
|
handleRef = el => {
|
|
@@ -143,7 +138,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
143
138
|
}
|
|
144
139
|
}
|
|
145
140
|
createScreenreaderContentNode() {
|
|
146
|
-
return (0, _jsxRuntime.jsxs)(
|
|
141
|
+
return (0, _jsxRuntime.jsxs)(_uiA11yContent.ScreenReaderContent, {
|
|
147
142
|
children: [this.props.variantScreenReaderLabel || '', " ", this.props.children]
|
|
148
143
|
});
|
|
149
144
|
}
|
|
@@ -204,11 +199,11 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
204
199
|
const Icon = this.variantUI[variant];
|
|
205
200
|
return (0, _jsxRuntime.jsx)("div", {
|
|
206
201
|
css: styles?.icon,
|
|
207
|
-
children: renderCustomIcon ? (0,
|
|
202
|
+
children: renderCustomIcon ? (0, _uiReactUtils.callRenderProp)(renderCustomIcon) : (0, _jsxRuntime.jsx)(Icon, {})
|
|
208
203
|
});
|
|
209
204
|
}
|
|
210
205
|
renderCloseButton() {
|
|
211
|
-
const closeButtonLabel = this.props.renderCloseButtonLabel && (0,
|
|
206
|
+
const closeButtonLabel = this.props.renderCloseButtonLabel && (0, _uiReactUtils.callRenderProp)(this.props.renderCloseButtonLabel);
|
|
212
207
|
return closeButtonLabel ? (0, _jsxRuntime.jsx)("div", {
|
|
213
208
|
css: this.props.styles?.closeButton,
|
|
214
209
|
children: (0, _jsxRuntime.jsx)(_v11_.CloseButton, {
|
|
@@ -229,7 +224,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
229
224
|
...props
|
|
230
225
|
} = this.props;
|
|
231
226
|
return (0, _jsxRuntime.jsxs)(_v11_2.View, {
|
|
232
|
-
...(0,
|
|
227
|
+
...(0, _uiReactUtils.passthroughProps)({
|
|
233
228
|
...props
|
|
234
229
|
}),
|
|
235
230
|
as: "div",
|
|
@@ -269,7 +264,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
269
264
|
}) : null;
|
|
270
265
|
}
|
|
271
266
|
return (0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
272
|
-
children: [screenReaderContent, (0, _jsxRuntime.jsx)(
|
|
267
|
+
children: [screenReaderContent, (0, _jsxRuntime.jsx)(_uiMotion.Transition, {
|
|
273
268
|
type: this.props.transition,
|
|
274
269
|
transitionOnMount: true,
|
|
275
270
|
in: this.state.open,
|
package/lib/Alert/v2/index.js
CHANGED
|
@@ -8,14 +8,12 @@ exports.default = exports.Alert = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
10
|
var _keycode = _interopRequireDefault(require("keycode"));
|
|
11
|
-
var
|
|
12
|
-
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
13
|
-
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
11
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
14
12
|
var _latest = require("@instructure/ui-buttons/latest");
|
|
15
13
|
var _latest2 = require("@instructure/ui-view/latest");
|
|
16
|
-
var
|
|
14
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
17
15
|
var _uiIcons = require("@instructure/ui-icons");
|
|
18
|
-
var
|
|
16
|
+
var _uiMotion = require("@instructure/ui-motion");
|
|
19
17
|
var _console = require("@instructure/console");
|
|
20
18
|
var _emotion = require("@instructure/emotion");
|
|
21
19
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
@@ -51,7 +49,7 @@ var _dec, _dec2, _class;
|
|
|
51
49
|
category: components
|
|
52
50
|
---
|
|
53
51
|
**/
|
|
54
|
-
let Alert = exports.Alert = (_dec = (0,
|
|
52
|
+
let Alert = exports.Alert = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyleNew)(_styles.default, null, _uiThemes.frozenThemesDesignTokensV1), _dec(_class = _dec2(_class = class Alert extends _react.Component {
|
|
55
53
|
static displayName = 'Alert';
|
|
56
54
|
static componentId = 'Alert';
|
|
57
55
|
static allowedProps = _props.allowedProps;
|
|
@@ -139,7 +137,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
139
|
createScreenreaderContentNode() {
|
|
142
|
-
return (0, _jsxRuntime.jsxs)(
|
|
140
|
+
return (0, _jsxRuntime.jsxs)(_uiA11yContent.ScreenReaderContent, {
|
|
143
141
|
children: [this.props.variantScreenReaderLabel || '', " ", this.props.children]
|
|
144
142
|
});
|
|
145
143
|
}
|
|
@@ -200,11 +198,11 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
200
198
|
const Icon = this.variantUI[variant];
|
|
201
199
|
return (0, _jsxRuntime.jsx)("div", {
|
|
202
200
|
css: styles?.icon,
|
|
203
|
-
children: renderCustomIcon ? (0,
|
|
201
|
+
children: renderCustomIcon ? (0, _uiReactUtils.callRenderProp)(renderCustomIcon) : (0, _jsxRuntime.jsx)(Icon, {})
|
|
204
202
|
});
|
|
205
203
|
}
|
|
206
204
|
renderCloseButton() {
|
|
207
|
-
const closeButtonLabel = this.props.renderCloseButtonLabel && (0,
|
|
205
|
+
const closeButtonLabel = this.props.renderCloseButtonLabel && (0, _uiReactUtils.callRenderProp)(this.props.renderCloseButtonLabel);
|
|
208
206
|
return closeButtonLabel ? (0, _jsxRuntime.jsx)("div", {
|
|
209
207
|
css: this.props.styles?.closeButton,
|
|
210
208
|
children: (0, _jsxRuntime.jsx)(_latest.CloseButton, {
|
|
@@ -225,7 +223,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
225
223
|
...props
|
|
226
224
|
} = this.props;
|
|
227
225
|
return (0, _jsxRuntime.jsxs)(_latest2.View, {
|
|
228
|
-
...(0,
|
|
226
|
+
...(0, _uiReactUtils.passthroughProps)({
|
|
229
227
|
...props
|
|
230
228
|
}),
|
|
231
229
|
as: "div",
|
|
@@ -265,7 +263,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
265
263
|
}) : null;
|
|
266
264
|
}
|
|
267
265
|
return (0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
268
|
-
children: [screenReaderContent, (0, _jsxRuntime.jsx)(
|
|
266
|
+
children: [screenReaderContent, (0, _jsxRuntime.jsx)(_uiMotion.Transition, {
|
|
269
267
|
type: this.props.transition,
|
|
270
268
|
transitionOnMount: true,
|
|
271
269
|
in: this.state.open,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-alerts",
|
|
3
|
-
"version": "11.7.9-snapshot-
|
|
3
|
+
"version": "11.7.9-snapshot-2",
|
|
4
4
|
"description": "An alert component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,24 +15,24 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/ui-
|
|
24
|
-
"@instructure/ui-
|
|
25
|
-
"@instructure/ui-
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-view": "11.7.9-snapshot-
|
|
28
|
-
"
|
|
18
|
+
"@instructure/console": "11.7.9-snapshot-2",
|
|
19
|
+
"@instructure/emotion": "11.7.9-snapshot-2",
|
|
20
|
+
"@instructure/shared-types": "11.7.9-snapshot-2",
|
|
21
|
+
"@instructure/ui-a11y-content": "11.7.9-snapshot-2",
|
|
22
|
+
"@instructure/ui-buttons": "11.7.9-snapshot-2",
|
|
23
|
+
"@instructure/ui-icons": "11.7.9-snapshot-2",
|
|
24
|
+
"@instructure/ui-motion": "11.7.9-snapshot-2",
|
|
25
|
+
"@instructure/ui-react-utils": "11.7.9-snapshot-2",
|
|
26
|
+
"@instructure/ui-themes": "11.7.9-snapshot-2",
|
|
27
|
+
"@instructure/ui-view": "11.7.9-snapshot-2",
|
|
28
|
+
"keycode": "^2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"
|
|
32
|
-
"@instructure/ui-
|
|
33
|
-
"@instructure/ui-
|
|
34
|
-
"@instructure/ui-scripts": "11.7.9-snapshot-
|
|
35
|
-
"
|
|
31
|
+
"@instructure/ui-axe-check": "11.7.9-snapshot-2",
|
|
32
|
+
"@instructure/ui-babel-preset": "11.7.9-snapshot-2",
|
|
33
|
+
"@instructure/ui-color-utils": "11.7.9-snapshot-2",
|
|
34
|
+
"@instructure/ui-scripts": "11.7.9-snapshot-2",
|
|
35
|
+
"vitest": "^5.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": ">=18 <=19",
|