@instructure/ui-heading 10.21.1-snapshot-9 → 10.22.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,11 +3,13 @@
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.21.1-snapshot-9](https://github.com/instructure/instructure-ui/compare/v10.21.0...v10.21.1-snapshot-9) (2025-07-04)
6
+ # [10.22.0](https://github.com/instructure/instructure-ui/compare/v10.21.0...v10.22.0) (2025-07-04)
7
7
 
8
8
 
9
9
  ### Features
10
10
 
11
+ * **many:** add new package (instructure) and three new components: AiInformation, NutritionFacts and DataPermissionLevels ([073be7b](https://github.com/instructure/instructure-ui/commit/073be7b50893e9ab77158ee8a83506eddfbd4113))
12
+ * **ui-heading,shared-types:** add new aiHeading prop and design. Also add h6 level to heading ([b6c7e0b](https://github.com/instructure/instructure-ui/commit/b6c7e0b9f650dc32ab4b571a8ebabc5ba149c20f))
11
13
  * **ui-heading,shared-types:** add new aiHeading prop and design. Also add h6 level to heading ([a74236a](https://github.com/instructure/instructure-ui/commit/a74236a4e245b8738e6fa7785806a9586666d33c))
12
14
 
13
15
 
@@ -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, _dec2, _class, _Heading, _IconAiColoredSolid, _IconAiColoredSolid2, _IconAiColoredSolid3;
3
+ var _dec, _dec2, _class, _Heading, _IconAiColoredSolid, _IconAiColoredSolid2, _IconAiColoredSolid3, _IconAiColoredSolid4, _IconAiColoredSolid5, _IconAiColoredSolid6;
4
4
  /*
5
5
  * The MIT License (MIT)
6
6
  *
@@ -34,7 +34,7 @@ import { withStyle } from '@instructure/emotion';
34
34
  import generateStyle from './styles';
35
35
  import generateComponentTheme from './theme';
36
36
  import { propTypes, allowedProps } from './props';
37
- import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
37
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
38
38
  const variantLevels = {
39
39
  titlePageDesktop: 'h1',
40
40
  titlePageMobile: 'h1',
@@ -129,6 +129,32 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
129
129
  children: [_IconAiColoredSolid3 || (_IconAiColoredSolid3 = _jsx(IconAiColoredSolid, {})), "\xA0", children]
130
130
  });
131
131
  }
132
+ if (aiVariant === 'stacked') {
133
+ var _this$props$styles8, _this$props$styles9;
134
+ return _jsxs(_Fragment, {
135
+ children: [_jsxs("span", {
136
+ css: (_this$props$styles8 = this.props.styles) === null || _this$props$styles8 === void 0 ? void 0 : _this$props$styles8.igniteAIStacked,
137
+ children: [_IconAiColoredSolid4 || (_IconAiColoredSolid4 = _jsx(IconAiColoredSolid, {})), _jsx("span", {
138
+ css: (_this$props$styles9 = this.props.styles) === null || _this$props$styles9 === void 0 ? void 0 : _this$props$styles9.igniteAI,
139
+ children: "IgniteAI"
140
+ })]
141
+ }), children]
142
+ });
143
+ }
144
+ if (aiVariant === 'horizontal') {
145
+ var _this$props$styles0;
146
+ return _jsxs(_Fragment, {
147
+ children: [_IconAiColoredSolid5 || (_IconAiColoredSolid5 = _jsx(IconAiColoredSolid, {})), _jsx("span", {
148
+ css: (_this$props$styles0 = this.props.styles) === null || _this$props$styles0 === void 0 ? void 0 : _this$props$styles0.igniteAI,
149
+ children: "IgniteAI"
150
+ }), children]
151
+ });
152
+ }
153
+ if (aiVariant === 'iconOnly') {
154
+ return _jsxs(_Fragment, {
155
+ children: [_IconAiColoredSolid6 || (_IconAiColoredSolid6 = _jsx(IconAiColoredSolid, {})), "\xA0", children]
156
+ });
157
+ }
132
158
  return children;
133
159
  }
134
160
 
@@ -147,7 +173,7 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
147
173
  return void 0;
148
174
  }
149
175
  render() {
150
- var _this$props$styles8;
176
+ var _this$props$styles1;
151
177
  const _this$props6 = this.props,
152
178
  border = _this$props6.border,
153
179
  children = _this$props6.children,
@@ -173,7 +199,7 @@ let Heading = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
173
199
  });
174
200
  return _jsx(View, {
175
201
  ...passthroughProps(props),
176
- css: (_this$props$styles8 = this.props.styles) === null || _this$props$styles8 === void 0 ? void 0 : _this$props$styles8.heading,
202
+ css: (_this$props$styles1 = this.props.styles) === null || _this$props$styles1 === void 0 ? void 0 : _this$props$styles1.heading,
177
203
  as: ElementType,
178
204
  elementRef: this.handleRef,
179
205
  margin: margin,
@@ -12,14 +12,14 @@ var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js
12
12
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
13
13
  var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
14
14
  var _testable = require("@instructure/ui-testable/lib/testable.js");
15
- var _IconAiColoredSolid4 = require("@instructure/ui-icons/lib/IconAiColoredSolid.js");
15
+ var _IconAiColoredSolid7 = require("@instructure/ui-icons/lib/IconAiColoredSolid.js");
16
16
  var _emotion = require("@instructure/emotion");
17
17
  var _styles = _interopRequireDefault(require("./styles"));
18
18
  var _theme = _interopRequireDefault(require("./theme"));
19
19
  var _props = require("./props");
20
20
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
21
21
  const _excluded = ["border", "children", "color", "level", "margin", "elementRef", "makeStyles", "variant"];
22
- var _dec, _dec2, _class, _Heading, _IconAiColoredSolid, _IconAiColoredSolid2, _IconAiColoredSolid3;
22
+ var _dec, _dec2, _class, _Heading, _IconAiColoredSolid, _IconAiColoredSolid2, _IconAiColoredSolid3, _IconAiColoredSolid4, _IconAiColoredSolid5, _IconAiColoredSolid6;
23
23
  /*
24
24
  * The MIT License (MIT)
25
25
  *
@@ -111,7 +111,7 @@ let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default,
111
111
  "aria-hidden": "true",
112
112
  children: [(0, _jsxRuntime.jsxs)("span", {
113
113
  css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.igniteAIStacked,
114
- children: [_IconAiColoredSolid || (_IconAiColoredSolid = (0, _jsxRuntime.jsx)(_IconAiColoredSolid4.IconAiColoredSolid, {})), (0, _jsxRuntime.jsx)("span", {
114
+ children: [_IconAiColoredSolid || (_IconAiColoredSolid = (0, _jsxRuntime.jsx)(_IconAiColoredSolid7.IconAiColoredSolid, {})), (0, _jsxRuntime.jsx)("span", {
115
115
  css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.igniteAI,
116
116
  children: "IgniteAI"
117
117
  })]
@@ -123,7 +123,7 @@ let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default,
123
123
  return (0, _jsxRuntime.jsxs)("span", {
124
124
  css: (_this$props$styles5 = this.props.styles) === null || _this$props$styles5 === void 0 ? void 0 : _this$props$styles5.withIcon,
125
125
  "aria-hidden": "true",
126
- children: [_IconAiColoredSolid2 || (_IconAiColoredSolid2 = (0, _jsxRuntime.jsx)(_IconAiColoredSolid4.IconAiColoredSolid, {})), (0, _jsxRuntime.jsx)("span", {
126
+ children: [_IconAiColoredSolid2 || (_IconAiColoredSolid2 = (0, _jsxRuntime.jsx)(_IconAiColoredSolid7.IconAiColoredSolid, {})), (0, _jsxRuntime.jsx)("span", {
127
127
  css: (_this$props$styles6 = this.props.styles) === null || _this$props$styles6 === void 0 ? void 0 : _this$props$styles6.igniteAI,
128
128
  children: "IgniteAI"
129
129
  }), children]
@@ -134,7 +134,33 @@ let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default,
134
134
  return (0, _jsxRuntime.jsxs)("span", {
135
135
  css: (_this$props$styles7 = this.props.styles) === null || _this$props$styles7 === void 0 ? void 0 : _this$props$styles7.withIcon,
136
136
  "aria-hidden": "true",
137
- children: [_IconAiColoredSolid3 || (_IconAiColoredSolid3 = (0, _jsxRuntime.jsx)(_IconAiColoredSolid4.IconAiColoredSolid, {})), "\xA0", children]
137
+ children: [_IconAiColoredSolid3 || (_IconAiColoredSolid3 = (0, _jsxRuntime.jsx)(_IconAiColoredSolid7.IconAiColoredSolid, {})), "\xA0", children]
138
+ });
139
+ }
140
+ if (aiVariant === 'stacked') {
141
+ var _this$props$styles8, _this$props$styles9;
142
+ return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
143
+ children: [(0, _jsxRuntime.jsxs)("span", {
144
+ css: (_this$props$styles8 = this.props.styles) === null || _this$props$styles8 === void 0 ? void 0 : _this$props$styles8.igniteAIStacked,
145
+ children: [_IconAiColoredSolid4 || (_IconAiColoredSolid4 = (0, _jsxRuntime.jsx)(_IconAiColoredSolid7.IconAiColoredSolid, {})), (0, _jsxRuntime.jsx)("span", {
146
+ css: (_this$props$styles9 = this.props.styles) === null || _this$props$styles9 === void 0 ? void 0 : _this$props$styles9.igniteAI,
147
+ children: "IgniteAI"
148
+ })]
149
+ }), children]
150
+ });
151
+ }
152
+ if (aiVariant === 'horizontal') {
153
+ var _this$props$styles0;
154
+ return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
155
+ children: [_IconAiColoredSolid5 || (_IconAiColoredSolid5 = (0, _jsxRuntime.jsx)(_IconAiColoredSolid7.IconAiColoredSolid, {})), (0, _jsxRuntime.jsx)("span", {
156
+ css: (_this$props$styles0 = this.props.styles) === null || _this$props$styles0 === void 0 ? void 0 : _this$props$styles0.igniteAI,
157
+ children: "IgniteAI"
158
+ }), children]
159
+ });
160
+ }
161
+ if (aiVariant === 'iconOnly') {
162
+ return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
163
+ children: [_IconAiColoredSolid6 || (_IconAiColoredSolid6 = (0, _jsxRuntime.jsx)(_IconAiColoredSolid7.IconAiColoredSolid, {})), "\xA0", children]
138
164
  });
139
165
  }
140
166
  return children;
@@ -155,7 +181,7 @@ let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default,
155
181
  return void 0;
156
182
  }
157
183
  render() {
158
- var _this$props$styles8;
184
+ var _this$props$styles1;
159
185
  const _this$props6 = this.props,
160
186
  border = _this$props6.border,
161
187
  children = _this$props6.children,
@@ -181,7 +207,7 @@ let Heading = exports.Heading = (_dec = (0, _emotion.withStyle)(_styles.default,
181
207
  });
182
208
  return (0, _jsxRuntime.jsx)(_View.View, {
183
209
  ...(0, _passthroughProps.passthroughProps)(props),
184
- css: (_this$props$styles8 = this.props.styles) === null || _this$props$styles8 === void 0 ? void 0 : _this$props$styles8.heading,
210
+ css: (_this$props$styles1 = this.props.styles) === null || _this$props$styles1 === void 0 ? void 0 : _this$props$styles1.heading,
185
211
  as: ElementType,
186
212
  elementRef: this.handleRef,
187
213
  margin: margin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-heading",
3
- "version": "10.21.1-snapshot-9",
3
+ "version": "10.22.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,20 +24,20 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "10.21.1-snapshot-9",
28
- "@instructure/emotion": "10.21.1-snapshot-9",
29
- "@instructure/shared-types": "10.21.1-snapshot-9",
30
- "@instructure/ui-icons": "10.21.1-snapshot-9",
31
- "@instructure/ui-prop-types": "10.21.1-snapshot-9",
32
- "@instructure/ui-react-utils": "10.21.1-snapshot-9",
33
- "@instructure/ui-testable": "10.21.1-snapshot-9",
34
- "@instructure/ui-view": "10.21.1-snapshot-9",
27
+ "@instructure/console": "10.22.0",
28
+ "@instructure/emotion": "10.22.0",
29
+ "@instructure/shared-types": "10.22.0",
30
+ "@instructure/ui-icons": "10.22.0",
31
+ "@instructure/ui-prop-types": "10.22.0",
32
+ "@instructure/ui-react-utils": "10.22.0",
33
+ "@instructure/ui-testable": "10.22.0",
34
+ "@instructure/ui-view": "10.22.0",
35
35
  "prop-types": "^15.8.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@instructure/ui-axe-check": "10.21.1-snapshot-9",
39
- "@instructure/ui-babel-preset": "10.21.1-snapshot-9",
40
- "@instructure/ui-themes": "10.21.1-snapshot-9",
38
+ "@instructure/ui-axe-check": "10.22.0",
39
+ "@instructure/ui-babel-preset": "10.22.0",
40
+ "@instructure/ui-themes": "10.22.0",
41
41
  "@testing-library/jest-dom": "^6.6.3",
42
42
  "@testing-library/react": "^16.0.1",
43
43
  "vitest": "^3.2.2"
@@ -145,6 +145,34 @@ class Heading extends Component<HeadingProps> {
145
145
  </span>
146
146
  )
147
147
  }
148
+ if (aiVariant === 'stacked') {
149
+ return (
150
+ <>
151
+ <span css={this.props.styles?.igniteAIStacked}>
152
+ <IconAiColoredSolid />
153
+ <span css={this.props.styles?.igniteAI}>IgniteAI</span>
154
+ </span>
155
+ {children}
156
+ </>
157
+ )
158
+ }
159
+ if (aiVariant === 'horizontal') {
160
+ return (
161
+ <>
162
+ <IconAiColoredSolid />
163
+ <span css={this.props.styles?.igniteAI}>IgniteAI</span>
164
+ {children}
165
+ </>
166
+ )
167
+ }
168
+ if (aiVariant === 'iconOnly') {
169
+ return (
170
+ <>
171
+ <IconAiColoredSolid />
172
+ &nbsp;{children}
173
+ </>
174
+ )
175
+ }
148
176
  return children
149
177
  }
150
178
 
@@ -58,12 +58,12 @@ type HeadingOwnProps = {
58
58
  * The font color to render, NOTE: `ai` color is deprecated. Use the `aiVariant` prop instead
59
59
  */
60
60
  color?:
61
- | 'primary'
62
- | 'secondary'
63
- | 'primary-inverse'
64
- | 'secondary-inverse'
65
- | 'inherit'
66
- | 'ai'
61
+ | 'primary'
62
+ | 'secondary'
63
+ | 'primary-inverse'
64
+ | 'secondary-inverse'
65
+ | 'inherit'
66
+ | 'ai'
67
67
  /**
68
68
  * The *visual* appearance of the Heading: h1 is largest; h5 is smallest.
69
69
  */
@@ -91,16 +91,16 @@ type HeadingOwnProps = {
91
91
  * Sets appearance of the heading.
92
92
  */
93
93
  variant?:
94
- | 'titlePageDesktop'
95
- | 'titlePageMobile'
96
- | 'titleSection'
97
- | 'titleCardSection'
98
- | 'titleModule'
99
- | 'titleCardLarge'
100
- | 'titleCardRegular'
101
- | 'titleCardMini'
102
- | 'label'
103
- | 'labelInline'
94
+ | 'titlePageDesktop'
95
+ | 'titlePageMobile'
96
+ | 'titleSection'
97
+ | 'titleCardSection'
98
+ | 'titleModule'
99
+ | 'titleCardLarge'
100
+ | 'titleCardRegular'
101
+ | 'titleCardMini'
102
+ | 'label'
103
+ | 'labelInline'
104
104
  }
105
105
 
106
106
  type PropKeys = keyof HeadingOwnProps