@instructure/ui-heading 10.26.1 → 11.0.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 +23 -2
- package/es/Heading/index.js +6 -6
- package/es/Heading/props.js +1 -15
- package/lib/Heading/index.js +5 -5
- package/lib/Heading/props.js +1 -16
- package/package.json +12 -15
- package/src/Heading/index.tsx +2 -4
- package/src/Heading/props.ts +4 -40
- package/tsconfig.build.json +0 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Heading/index.d.ts +0 -12
- package/types/Heading/index.d.ts.map +1 -1
- package/types/Heading/props.d.ts +5 -5
- package/types/Heading/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,30 @@
|
|
|
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
|
-
|
|
6
|
+
# [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **many:** InstUI v11 contains the following breaking changes:
|
|
17
|
+
- React 16 and 17 are no longer supported
|
|
18
|
+
- remove `PropTypes` from all packages
|
|
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`
|
|
9
30
|
|
|
10
31
|
|
|
11
32
|
|
package/es/Heading/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
const _excluded = ["border", "children", "color", "level", "margin", "elementRef", "makeStyles", "variant"];
|
|
3
|
-
var _dec,
|
|
3
|
+
var _dec, _class, _Heading, _IconAiColoredSolid, _IconAiColoredSolid2, _IconAiColoredSolid3, _IconAiColoredSolid4, _IconAiColoredSolid5, _IconAiColoredSolid6;
|
|
4
4
|
/*
|
|
5
5
|
* The MIT License (MIT)
|
|
6
6
|
*
|
|
@@ -28,12 +28,11 @@ var _dec, _dec2, _class, _Heading, _IconAiColoredSolid, _IconAiColoredSolid2, _I
|
|
|
28
28
|
import { Component } from 'react';
|
|
29
29
|
import { View } from '@instructure/ui-view';
|
|
30
30
|
import { passthroughProps, callRenderProp } from '@instructure/ui-react-utils';
|
|
31
|
-
import { testable } from '@instructure/ui-testable';
|
|
32
31
|
import { IconAiColoredSolid } from '@instructure/ui-icons';
|
|
33
32
|
import { withStyle } from '@instructure/emotion';
|
|
34
33
|
import generateStyle from './styles';
|
|
35
34
|
import generateComponentTheme from './theme';
|
|
36
|
-
import {
|
|
35
|
+
import { allowedProps } from './props';
|
|
37
36
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
38
37
|
const variantLevels = {
|
|
39
38
|
titlePageDesktop: 'h1',
|
|
@@ -53,7 +52,7 @@ const variantLevels = {
|
|
|
53
52
|
category: components
|
|
54
53
|
---
|
|
55
54
|
**/
|
|
56
|
-
let Heading = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
55
|
+
let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_Heading = class Heading extends Component {
|
|
57
56
|
constructor(...args) {
|
|
58
57
|
super(...args);
|
|
59
58
|
this.ref = null;
|
|
@@ -212,13 +211,14 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
212
211
|
as: ElementType,
|
|
213
212
|
elementRef: this.handleRef,
|
|
214
213
|
margin: margin,
|
|
214
|
+
"data-cid": "Heading",
|
|
215
215
|
children: this.renderContent()
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
|
-
}, _Heading.displayName = "Heading", _Heading.componentId = 'Heading', _Heading.
|
|
218
|
+
}, _Heading.displayName = "Heading", _Heading.componentId = 'Heading', _Heading.allowedProps = allowedProps, _Heading.defaultProps = {
|
|
219
219
|
children: null,
|
|
220
220
|
border: 'none',
|
|
221
221
|
color: 'inherit'
|
|
222
|
-
}, _Heading)) || _class)
|
|
222
|
+
}, _Heading)) || _class);
|
|
223
223
|
export default Heading;
|
|
224
224
|
export { Heading };
|
package/es/Heading/props.js
CHANGED
|
@@ -22,19 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
import { childrenOrValue } from '@instructure/ui-prop-types';
|
|
27
|
-
const propTypes = {
|
|
28
|
-
aiVariant: PropTypes.oneOf(['stacked', 'horizontal', 'iconOnly']),
|
|
29
|
-
border: PropTypes.oneOf(['none', 'top', 'bottom']),
|
|
30
|
-
children: childrenOrValue,
|
|
31
|
-
color: PropTypes.oneOf(['primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'inherit', 'ai']),
|
|
32
|
-
level: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'reset']),
|
|
33
|
-
as: PropTypes.elementType,
|
|
34
|
-
margin: PropTypes.string,
|
|
35
|
-
elementRef: PropTypes.func,
|
|
36
|
-
renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
37
|
-
variant: PropTypes.oneOf(['titlePageDesktop', 'titlePageMobile', 'titleSection', 'titleCardSection', 'titleModule', 'titleCardLarge', 'titleCardRegular', 'titleCardMini', 'label', 'labelInline'])
|
|
38
|
-
};
|
|
39
25
|
const allowedProps = ['aiVariant', 'border', 'children', 'color', 'level', 'as', 'margin', 'elementRef', 'variant'];
|
|
40
|
-
export {
|
|
26
|
+
export { allowedProps };
|
package/lib/Heading/index.js
CHANGED
|
@@ -10,7 +10,6 @@ var _react = require("react");
|
|
|
10
10
|
var _View = require("@instructure/ui-view/lib/View");
|
|
11
11
|
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
12
12
|
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
13
|
-
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
14
13
|
var _IconAiColoredSolid7 = require("@instructure/ui-icons/lib/IconAiColoredSolid.js");
|
|
15
14
|
var _emotion = require("@instructure/emotion");
|
|
16
15
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
@@ -18,7 +17,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
|
18
17
|
var _props = require("./props");
|
|
19
18
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
20
19
|
const _excluded = ["border", "children", "color", "level", "margin", "elementRef", "makeStyles", "variant"];
|
|
21
|
-
var _dec,
|
|
20
|
+
var _dec, _class, _Heading, _IconAiColoredSolid, _IconAiColoredSolid2, _IconAiColoredSolid3, _IconAiColoredSolid4, _IconAiColoredSolid5, _IconAiColoredSolid6;
|
|
22
21
|
/*
|
|
23
22
|
* The MIT License (MIT)
|
|
24
23
|
*
|
|
@@ -60,7 +59,7 @@ const variantLevels = {
|
|
|
60
59
|
category: components
|
|
61
60
|
---
|
|
62
61
|
**/
|
|
63
|
-
let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
62
|
+
let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_Heading = class Heading extends _react.Component {
|
|
64
63
|
constructor(...args) {
|
|
65
64
|
super(...args);
|
|
66
65
|
this.ref = null;
|
|
@@ -219,12 +218,13 @@ let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default,
|
|
|
219
218
|
as: ElementType,
|
|
220
219
|
elementRef: this.handleRef,
|
|
221
220
|
margin: margin,
|
|
221
|
+
"data-cid": "Heading",
|
|
222
222
|
children: this.renderContent()
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
|
-
}, _Heading.displayName = "Heading", _Heading.componentId = 'Heading', _Heading.
|
|
225
|
+
}, _Heading.displayName = "Heading", _Heading.componentId = 'Heading', _Heading.allowedProps = _props.allowedProps, _Heading.defaultProps = {
|
|
226
226
|
children: null,
|
|
227
227
|
border: 'none',
|
|
228
228
|
color: 'inherit'
|
|
229
|
-
}, _Heading)) || _class)
|
|
229
|
+
}, _Heading)) || _class);
|
|
230
230
|
var _default = exports.default = Heading;
|
package/lib/Heading/props.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _childrenOrValue = require("@instructure/ui-prop-types/lib/childrenOrValue.js");
|
|
6
|
+
exports.allowedProps = void 0;
|
|
10
7
|
/*
|
|
11
8
|
* The MIT License (MIT)
|
|
12
9
|
*
|
|
@@ -31,16 +28,4 @@ var _childrenOrValue = require("@instructure/ui-prop-types/lib/childrenOrValue.j
|
|
|
31
28
|
* SOFTWARE.
|
|
32
29
|
*/
|
|
33
30
|
|
|
34
|
-
const propTypes = exports.propTypes = {
|
|
35
|
-
aiVariant: _propTypes.default.oneOf(['stacked', 'horizontal', 'iconOnly']),
|
|
36
|
-
border: _propTypes.default.oneOf(['none', 'top', 'bottom']),
|
|
37
|
-
children: _childrenOrValue.childrenOrValue,
|
|
38
|
-
color: _propTypes.default.oneOf(['primary', 'secondary', 'primary-inverse', 'secondary-inverse', 'inherit', 'ai']),
|
|
39
|
-
level: _propTypes.default.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'reset']),
|
|
40
|
-
as: _propTypes.default.elementType,
|
|
41
|
-
margin: _propTypes.default.string,
|
|
42
|
-
elementRef: _propTypes.default.func,
|
|
43
|
-
renderIcon: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
44
|
-
variant: _propTypes.default.oneOf(['titlePageDesktop', 'titlePageMobile', 'titleSection', 'titleCardSection', 'titleModule', 'titleCardLarge', 'titleCardRegular', 'titleCardMini', 'label', 'labelInline'])
|
|
45
|
-
};
|
|
46
31
|
const allowedProps = exports.allowedProps = ['aiVariant', 'border', 'children', 'color', 'level', 'as', 'margin', 'elementRef', 'variant'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-heading",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "A component for creating typographic headings",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,26 +24,23 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.27.6",
|
|
27
|
-
"@instructure/console": "
|
|
28
|
-
"@instructure/emotion": "
|
|
29
|
-
"@instructure/shared-types": "
|
|
30
|
-
"@instructure/ui-icons": "
|
|
31
|
-
"@instructure/ui-
|
|
32
|
-
"@instructure/ui-
|
|
33
|
-
"@instructure/ui-testable": "10.26.1",
|
|
34
|
-
"@instructure/ui-view": "10.26.1",
|
|
35
|
-
"prop-types": "^15.8.1"
|
|
27
|
+
"@instructure/console": "11.0.0",
|
|
28
|
+
"@instructure/emotion": "11.0.0",
|
|
29
|
+
"@instructure/shared-types": "11.0.0",
|
|
30
|
+
"@instructure/ui-icons": "11.0.0",
|
|
31
|
+
"@instructure/ui-react-utils": "11.0.0",
|
|
32
|
+
"@instructure/ui-view": "11.0.0"
|
|
36
33
|
},
|
|
37
34
|
"devDependencies": {
|
|
38
|
-
"@instructure/ui-axe-check": "
|
|
39
|
-
"@instructure/ui-babel-preset": "
|
|
40
|
-
"@instructure/ui-themes": "
|
|
35
|
+
"@instructure/ui-axe-check": "11.0.0",
|
|
36
|
+
"@instructure/ui-babel-preset": "11.0.0",
|
|
37
|
+
"@instructure/ui-themes": "11.0.0",
|
|
41
38
|
"@testing-library/jest-dom": "^6.6.3",
|
|
42
|
-
"@testing-library/react": "
|
|
39
|
+
"@testing-library/react": "15.0.7",
|
|
43
40
|
"vitest": "^3.2.2"
|
|
44
41
|
},
|
|
45
42
|
"peerDependencies": {
|
|
46
|
-
"react": ">=
|
|
43
|
+
"react": ">=18 <=19"
|
|
47
44
|
},
|
|
48
45
|
"publishConfig": {
|
|
49
46
|
"access": "public"
|
package/src/Heading/index.tsx
CHANGED
|
@@ -26,7 +26,6 @@ import { Component } from 'react'
|
|
|
26
26
|
|
|
27
27
|
import { View } from '@instructure/ui-view'
|
|
28
28
|
import { passthroughProps, callRenderProp } from '@instructure/ui-react-utils'
|
|
29
|
-
import { testable } from '@instructure/ui-testable'
|
|
30
29
|
import { IconAiColoredSolid } from '@instructure/ui-icons'
|
|
31
30
|
|
|
32
31
|
import { withStyle } from '@instructure/emotion'
|
|
@@ -34,7 +33,7 @@ import { withStyle } from '@instructure/emotion'
|
|
|
34
33
|
import generateStyle from './styles'
|
|
35
34
|
import generateComponentTheme from './theme'
|
|
36
35
|
|
|
37
|
-
import {
|
|
36
|
+
import { allowedProps } from './props'
|
|
38
37
|
import type { HeadingProps } from './props'
|
|
39
38
|
import { AsElementType } from '@instructure/shared-types'
|
|
40
39
|
|
|
@@ -60,11 +59,9 @@ category: components
|
|
|
60
59
|
---
|
|
61
60
|
**/
|
|
62
61
|
@withStyle(generateStyle, generateComponentTheme)
|
|
63
|
-
@testable()
|
|
64
62
|
class Heading extends Component<HeadingProps> {
|
|
65
63
|
static readonly componentId = 'Heading'
|
|
66
64
|
|
|
67
|
-
static propTypes = propTypes
|
|
68
65
|
static allowedProps = allowedProps
|
|
69
66
|
static defaultProps = {
|
|
70
67
|
children: null,
|
|
@@ -226,6 +223,7 @@ class Heading extends Component<HeadingProps> {
|
|
|
226
223
|
as={ElementType}
|
|
227
224
|
elementRef={this.handleRef}
|
|
228
225
|
margin={margin}
|
|
226
|
+
data-cid="Heading"
|
|
229
227
|
>
|
|
230
228
|
{this.renderContent()}
|
|
231
229
|
</View>
|
package/src/Heading/props.ts
CHANGED
|
@@ -22,13 +22,9 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
import { childrenOrValue } from '@instructure/ui-prop-types'
|
|
28
|
-
|
|
25
|
+
import React from 'react'
|
|
29
26
|
import type {
|
|
30
27
|
AsElementType,
|
|
31
|
-
PropValidators,
|
|
32
28
|
HeadingTheme,
|
|
33
29
|
OtherHTMLAttributes,
|
|
34
30
|
Renderable
|
|
@@ -39,7 +35,7 @@ import type {
|
|
|
39
35
|
ComponentStyle
|
|
40
36
|
} from '@instructure/emotion'
|
|
41
37
|
|
|
42
|
-
type HeadingLevel<U extends keyof JSX.IntrinsicElements> = U
|
|
38
|
+
type HeadingLevel<U extends keyof React.JSX.IntrinsicElements> = U
|
|
43
39
|
|
|
44
40
|
type HeadingOwnProps = {
|
|
45
41
|
/**
|
|
@@ -65,7 +61,7 @@ type HeadingOwnProps = {
|
|
|
65
61
|
| 'inherit'
|
|
66
62
|
| 'ai'
|
|
67
63
|
/**
|
|
68
|
-
* The level of the heading in the DOM: h1 is largest;
|
|
64
|
+
* The level of the heading in the DOM: h1 is largest; h6 is smallest.
|
|
69
65
|
*/
|
|
70
66
|
level?: HeadingLevel<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> | 'reset'
|
|
71
67
|
/**
|
|
@@ -119,38 +115,6 @@ type HeadingProps = HeadingOwnProps &
|
|
|
119
115
|
type HeadingStyle = ComponentStyle<
|
|
120
116
|
'heading' | 'igniteAI' | 'igniteAIStacked' | 'withIcon'
|
|
121
117
|
>
|
|
122
|
-
|
|
123
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
124
|
-
aiVariant: PropTypes.oneOf(['stacked', 'horizontal', 'iconOnly']),
|
|
125
|
-
border: PropTypes.oneOf(['none', 'top', 'bottom']),
|
|
126
|
-
children: childrenOrValue,
|
|
127
|
-
color: PropTypes.oneOf([
|
|
128
|
-
'primary',
|
|
129
|
-
'secondary',
|
|
130
|
-
'primary-inverse',
|
|
131
|
-
'secondary-inverse',
|
|
132
|
-
'inherit',
|
|
133
|
-
'ai'
|
|
134
|
-
]),
|
|
135
|
-
level: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'reset']),
|
|
136
|
-
as: PropTypes.elementType,
|
|
137
|
-
margin: PropTypes.string,
|
|
138
|
-
elementRef: PropTypes.func,
|
|
139
|
-
renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
140
|
-
variant: PropTypes.oneOf([
|
|
141
|
-
'titlePageDesktop',
|
|
142
|
-
'titlePageMobile',
|
|
143
|
-
'titleSection',
|
|
144
|
-
'titleCardSection',
|
|
145
|
-
'titleModule',
|
|
146
|
-
'titleCardLarge',
|
|
147
|
-
'titleCardRegular',
|
|
148
|
-
'titleCardMini',
|
|
149
|
-
'label',
|
|
150
|
-
'labelInline'
|
|
151
|
-
])
|
|
152
|
-
}
|
|
153
|
-
|
|
154
118
|
const allowedProps: AllowedPropKeys = [
|
|
155
119
|
'aiVariant',
|
|
156
120
|
'border',
|
|
@@ -164,4 +128,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
164
128
|
]
|
|
165
129
|
|
|
166
130
|
export type { HeadingProps, HeadingStyle }
|
|
167
|
-
export {
|
|
131
|
+
export { allowedProps }
|
package/tsconfig.build.json
CHANGED
|
@@ -19,15 +19,9 @@
|
|
|
19
19
|
{
|
|
20
20
|
"path": "../ui-axe-check/tsconfig.build.json"
|
|
21
21
|
},
|
|
22
|
-
{
|
|
23
|
-
"path": "../ui-prop-types/tsconfig.build.json"
|
|
24
|
-
},
|
|
25
22
|
{
|
|
26
23
|
"path": "../ui-react-utils/tsconfig.build.json"
|
|
27
24
|
},
|
|
28
|
-
{
|
|
29
|
-
"path": "../ui-testable/tsconfig.build.json"
|
|
30
|
-
},
|
|
31
25
|
{
|
|
32
26
|
"path": "../ui-icons/tsconfig.build.json"
|
|
33
27
|
},
|