@instructure/ui-alerts 10.26.1-snapshot-2 → 10.26.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 +5 -18
- package/es/Alert/index.js +2 -2
- package/es/Alert/props.js +19 -1
- package/lib/Alert/index.js +1 -1
- package/lib/Alert/props.js +20 -1
- package/package.json +20 -19
- package/src/Alert/index.tsx +2 -1
- package/src/Alert/props.ts +25 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Alert/index.d.ts +17 -0
- package/types/Alert/index.d.ts.map +1 -1
- package/types/Alert/props.d.ts +3 -2
- package/types/Alert/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,30 +3,17 @@
|
|
|
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.26.
|
|
6
|
+
## [10.26.2](https://github.com/instructure/instructure-ui/compare/v10.26.1...v10.26.2) (2025-10-13)
|
|
7
7
|
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-alerts
|
|
8
9
|
|
|
9
|
-
### Features
|
|
10
10
|
|
|
11
|
-
* **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
### BREAKING CHANGES
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- remove `CodeEditor` component
|
|
20
|
-
- remove `@instui/theme-registry` package
|
|
21
|
-
- remove `@testable`, `@experimental`, `@hack` decorators
|
|
22
|
-
- InstUISettingsProvider's `as` prop is removed
|
|
23
|
-
- `canvas.use()`, `canvasHighContrast.use()` functions are removed
|
|
24
|
-
- `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
|
|
25
|
-
- `variables` field on theme objects are removed
|
|
26
|
-
- remove deprecated props from Table: Row's `isStacked`, Body's
|
|
27
|
-
`isStacked`, `hover`, and `headers`
|
|
28
|
-
- `Table`'s `caption` prop is now required
|
|
29
|
-
- `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
|
|
14
|
+
## [10.26.1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1) (2025-10-06)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @instructure/ui-alerts
|
|
30
17
|
|
|
31
18
|
|
|
32
19
|
|
package/es/Alert/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import { logError as error } from '@instructure/console';
|
|
|
38
38
|
import { withStyle } from '@instructure/emotion';
|
|
39
39
|
import generateStyle from './styles';
|
|
40
40
|
import generateComponentTheme from './theme';
|
|
41
|
-
import { allowedProps } from './props';
|
|
41
|
+
import { propTypes, allowedProps } from './props';
|
|
42
42
|
import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
43
43
|
/**
|
|
44
44
|
---
|
|
@@ -248,7 +248,7 @@ let Alert = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
248
248
|
})]
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
}, _Alert.displayName = "Alert", _Alert.componentId = 'Alert', _Alert.allowedProps = allowedProps, _Alert.defaultProps = {
|
|
251
|
+
}, _Alert.displayName = "Alert", _Alert.componentId = 'Alert', _Alert.propTypes = propTypes, _Alert.allowedProps = allowedProps, _Alert.defaultProps = {
|
|
252
252
|
variant: 'info',
|
|
253
253
|
margin: 'x-small 0',
|
|
254
254
|
timeout: 0,
|
package/es/Alert/props.js
CHANGED
|
@@ -22,5 +22,23 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
import PropTypes from 'prop-types';
|
|
26
|
+
const propTypes = {
|
|
27
|
+
children: PropTypes.node,
|
|
28
|
+
variant: PropTypes.oneOf(['info', 'success', 'warning', 'error']),
|
|
29
|
+
margin: PropTypes.string,
|
|
30
|
+
liveRegion: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
|
|
31
|
+
liveRegionPoliteness: PropTypes.oneOf(['polite', 'assertive']),
|
|
32
|
+
isLiveRegionAtomic: PropTypes.bool,
|
|
33
|
+
screenReaderOnly: PropTypes.bool,
|
|
34
|
+
timeout: PropTypes.number,
|
|
35
|
+
renderCloseButtonLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
36
|
+
onDismiss: PropTypes.func,
|
|
37
|
+
transition: PropTypes.oneOf(['none', 'fade']),
|
|
38
|
+
open: PropTypes.bool,
|
|
39
|
+
hasShadow: PropTypes.bool,
|
|
40
|
+
variantScreenReaderLabel: PropTypes.string,
|
|
41
|
+
renderCustomIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
42
|
+
};
|
|
25
43
|
const allowedProps = ['children', 'variant', 'margin', 'liveRegion', 'liveRegionPoliteness', 'isLiveRegionAtomic', 'screenReaderOnly', 'timeout', 'renderCloseButtonLabel', 'onDismiss', 'transition', 'open', 'hasShadow', 'renderCustomIcon'];
|
|
26
|
-
export { allowedProps };
|
|
44
|
+
export { propTypes, allowedProps };
|
package/lib/Alert/index.js
CHANGED
|
@@ -259,7 +259,7 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
259
259
|
})]
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
|
-
}, _Alert.displayName = "Alert", _Alert.componentId = 'Alert', _Alert.allowedProps = _props.allowedProps, _Alert.defaultProps = {
|
|
262
|
+
}, _Alert.displayName = "Alert", _Alert.componentId = 'Alert', _Alert.propTypes = _props.propTypes, _Alert.allowedProps = _props.allowedProps, _Alert.defaultProps = {
|
|
263
263
|
variant: 'info',
|
|
264
264
|
margin: 'x-small 0',
|
|
265
265
|
timeout: 0,
|
package/lib/Alert/props.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
9
|
/*
|
|
8
10
|
* The MIT License (MIT)
|
|
9
11
|
*
|
|
@@ -28,4 +30,21 @@ exports.allowedProps = void 0;
|
|
|
28
30
|
* SOFTWARE.
|
|
29
31
|
*/
|
|
30
32
|
|
|
33
|
+
const propTypes = exports.propTypes = {
|
|
34
|
+
children: _propTypes.default.node,
|
|
35
|
+
variant: _propTypes.default.oneOf(['info', 'success', 'warning', 'error']),
|
|
36
|
+
margin: _propTypes.default.string,
|
|
37
|
+
liveRegion: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.element]),
|
|
38
|
+
liveRegionPoliteness: _propTypes.default.oneOf(['polite', 'assertive']),
|
|
39
|
+
isLiveRegionAtomic: _propTypes.default.bool,
|
|
40
|
+
screenReaderOnly: _propTypes.default.bool,
|
|
41
|
+
timeout: _propTypes.default.number,
|
|
42
|
+
renderCloseButtonLabel: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node]),
|
|
43
|
+
onDismiss: _propTypes.default.func,
|
|
44
|
+
transition: _propTypes.default.oneOf(['none', 'fade']),
|
|
45
|
+
open: _propTypes.default.bool,
|
|
46
|
+
hasShadow: _propTypes.default.bool,
|
|
47
|
+
variantScreenReaderLabel: _propTypes.default.string,
|
|
48
|
+
renderCustomIcon: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func])
|
|
49
|
+
};
|
|
31
50
|
const allowedProps = exports.allowedProps = ['children', 'variant', 'margin', 'liveRegion', 'liveRegionPoliteness', 'isLiveRegionAtomic', 'screenReaderOnly', 'timeout', 'renderCloseButtonLabel', 'onDismiss', 'transition', 'open', 'hasShadow', 'renderCustomIcon'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-alerts",
|
|
3
|
-
"version": "10.26.
|
|
3
|
+
"version": "10.26.2",
|
|
4
4
|
"description": "An alert component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,32 +23,33 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "10.26.
|
|
27
|
-
"@instructure/ui-babel-preset": "10.26.
|
|
28
|
-
"@instructure/ui-color-utils": "10.26.
|
|
29
|
-
"@instructure/ui-scripts": "10.26.
|
|
26
|
+
"@instructure/ui-axe-check": "10.26.2",
|
|
27
|
+
"@instructure/ui-babel-preset": "10.26.2",
|
|
28
|
+
"@instructure/ui-color-utils": "10.26.2",
|
|
29
|
+
"@instructure/ui-scripts": "10.26.2",
|
|
30
30
|
"@testing-library/jest-dom": "^6.6.3",
|
|
31
|
-
"@testing-library/react": "
|
|
31
|
+
"@testing-library/react": "^16.0.1",
|
|
32
32
|
"@testing-library/user-event": "^14.6.1",
|
|
33
33
|
"vitest": "^3.2.2"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/runtime": "^7.27.6",
|
|
37
|
-
"@instructure/console": "10.26.
|
|
38
|
-
"@instructure/emotion": "10.26.
|
|
39
|
-
"@instructure/shared-types": "10.26.
|
|
40
|
-
"@instructure/ui-a11y-content": "10.26.
|
|
41
|
-
"@instructure/ui-buttons": "10.26.
|
|
42
|
-
"@instructure/ui-icons": "10.26.
|
|
43
|
-
"@instructure/ui-motion": "10.26.
|
|
44
|
-
"@instructure/ui-react-utils": "10.26.
|
|
45
|
-
"@instructure/ui-themes": "10.26.
|
|
46
|
-
"@instructure/ui-view": "10.26.
|
|
47
|
-
"keycode": "^2"
|
|
37
|
+
"@instructure/console": "10.26.2",
|
|
38
|
+
"@instructure/emotion": "10.26.2",
|
|
39
|
+
"@instructure/shared-types": "10.26.2",
|
|
40
|
+
"@instructure/ui-a11y-content": "10.26.2",
|
|
41
|
+
"@instructure/ui-buttons": "10.26.2",
|
|
42
|
+
"@instructure/ui-icons": "10.26.2",
|
|
43
|
+
"@instructure/ui-motion": "10.26.2",
|
|
44
|
+
"@instructure/ui-react-utils": "10.26.2",
|
|
45
|
+
"@instructure/ui-themes": "10.26.2",
|
|
46
|
+
"@instructure/ui-view": "10.26.2",
|
|
47
|
+
"keycode": "^2",
|
|
48
|
+
"prop-types": "^15.8.1"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
|
-
"react": ">=
|
|
51
|
-
"react-dom": ">=
|
|
51
|
+
"react": ">=16.14 <=18",
|
|
52
|
+
"react-dom": ">=16.14 <=18"
|
|
52
53
|
},
|
|
53
54
|
"publishConfig": {
|
|
54
55
|
"access": "public"
|
package/src/Alert/index.tsx
CHANGED
|
@@ -48,7 +48,7 @@ import { withStyle } from '@instructure/emotion'
|
|
|
48
48
|
import generateStyle from './styles'
|
|
49
49
|
import generateComponentTheme from './theme'
|
|
50
50
|
|
|
51
|
-
import { allowedProps } from './props'
|
|
51
|
+
import { propTypes, allowedProps } from './props'
|
|
52
52
|
import type { AlertProps, AlertState } from './props'
|
|
53
53
|
|
|
54
54
|
/**
|
|
@@ -61,6 +61,7 @@ category: components
|
|
|
61
61
|
class Alert extends Component<AlertProps, AlertState> {
|
|
62
62
|
static readonly componentId = 'Alert'
|
|
63
63
|
|
|
64
|
+
static propTypes = propTypes
|
|
64
65
|
static allowedProps = allowedProps
|
|
65
66
|
static defaultProps = {
|
|
66
67
|
variant: 'info',
|
package/src/Alert/props.ts
CHANGED
|
@@ -23,13 +23,18 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import { ReactNode } from 'react'
|
|
26
|
+
import PropTypes from 'prop-types'
|
|
26
27
|
|
|
27
28
|
import type {
|
|
28
29
|
Spacing,
|
|
29
30
|
WithStyleProps,
|
|
30
31
|
ComponentStyle
|
|
31
32
|
} from '@instructure/emotion'
|
|
32
|
-
import type {
|
|
33
|
+
import type {
|
|
34
|
+
AlertTheme,
|
|
35
|
+
PropValidators,
|
|
36
|
+
Renderable
|
|
37
|
+
} from '@instructure/shared-types'
|
|
33
38
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
34
39
|
|
|
35
40
|
type AlertOwnProps = {
|
|
@@ -123,6 +128,24 @@ type AlertStyle = ComponentStyle<
|
|
|
123
128
|
'alert' | 'icon' | 'closeButton' | 'content' | 'variantScreenReaderLabel'
|
|
124
129
|
>
|
|
125
130
|
|
|
131
|
+
const propTypes: PropValidators<PropKeys> = {
|
|
132
|
+
children: PropTypes.node,
|
|
133
|
+
variant: PropTypes.oneOf(['info', 'success', 'warning', 'error']),
|
|
134
|
+
margin: PropTypes.string,
|
|
135
|
+
liveRegion: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
|
|
136
|
+
liveRegionPoliteness: PropTypes.oneOf(['polite', 'assertive']),
|
|
137
|
+
isLiveRegionAtomic: PropTypes.bool,
|
|
138
|
+
screenReaderOnly: PropTypes.bool,
|
|
139
|
+
timeout: PropTypes.number,
|
|
140
|
+
renderCloseButtonLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
141
|
+
onDismiss: PropTypes.func,
|
|
142
|
+
transition: PropTypes.oneOf(['none', 'fade']),
|
|
143
|
+
open: PropTypes.bool,
|
|
144
|
+
hasShadow: PropTypes.bool,
|
|
145
|
+
variantScreenReaderLabel: PropTypes.string,
|
|
146
|
+
renderCustomIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
|
|
147
|
+
}
|
|
148
|
+
|
|
126
149
|
const allowedProps: AllowedPropKeys = [
|
|
127
150
|
'children',
|
|
128
151
|
'variant',
|
|
@@ -145,4 +168,4 @@ type AlertState = {
|
|
|
145
168
|
}
|
|
146
169
|
|
|
147
170
|
export type { AlertProps, AlertStyle, AlertState }
|
|
148
|
-
export { allowedProps }
|
|
171
|
+
export { propTypes, allowedProps }
|