@instructure/ui-tag 10.26.1-snapshot-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 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
- ## [10.26.1-snapshot-1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1-snapshot-1) (2025-10-06)
6
+ # [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-tag
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/Tag/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class, _Tag;
1
+ var _dec, _class, _Tag;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -28,11 +28,10 @@ import { IconXLine } from '@instructure/ui-icons';
28
28
  import { View } from '@instructure/ui-view';
29
29
  import { omitProps } from '@instructure/ui-react-utils';
30
30
  import { isActiveElement } from '@instructure/ui-dom-utils';
31
- import { testable } from '@instructure/ui-testable';
32
31
  import { withStyle } from '@instructure/emotion';
33
32
  import generateStyle from './styles';
34
33
  import generateComponentTheme from './theme';
35
- import { allowedProps, propTypes } from './props';
34
+ import { allowedProps } from './props';
36
35
 
37
36
  /**
38
37
  ---
@@ -40,7 +39,7 @@ category: components
40
39
  ---
41
40
  **/
42
41
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
43
- let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_Tag = class Tag extends Component {
42
+ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_Tag = class Tag extends Component {
44
43
  constructor(...args) {
45
44
  super(...args);
46
45
  this.ref = null;
@@ -103,6 +102,7 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
103
102
  disabled: disabled || readOnly,
104
103
  display: void 0,
105
104
  title: title || (typeof text === 'string' ? text : void 0),
105
+ "data-cid": "Tag",
106
106
  children: [_jsx("span", {
107
107
  css: styles === null || styles === void 0 ? void 0 : styles.text,
108
108
  children: text
@@ -111,12 +111,12 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
111
111
  }) : null]
112
112
  });
113
113
  }
114
- }, _Tag.displayName = "Tag", _Tag.componentId = 'Tag', _Tag.allowedProps = allowedProps, _Tag.propTypes = propTypes, _Tag.defaultProps = {
114
+ }, _Tag.displayName = "Tag", _Tag.componentId = 'Tag', _Tag.allowedProps = allowedProps, _Tag.defaultProps = {
115
115
  size: 'medium',
116
116
  dismissible: false,
117
117
  variant: 'default',
118
118
  disabled: false,
119
119
  readOnly: false
120
- }, _Tag)) || _class) || _class);
120
+ }, _Tag)) || _class);
121
121
  export default Tag;
122
122
  export { Tag };
package/es/Tag/props.js CHANGED
@@ -22,19 +22,5 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types';
26
- const propTypes = {
27
- className: PropTypes.string,
28
- text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
29
- title: PropTypes.string,
30
- disabled: PropTypes.bool,
31
- readOnly: PropTypes.bool,
32
- dismissible: PropTypes.bool,
33
- margin: PropTypes.string,
34
- onClick: PropTypes.func,
35
- elementRef: PropTypes.func,
36
- size: PropTypes.oneOf(['small', 'medium', 'large']),
37
- variant: PropTypes.oneOf(['default', 'inline'])
38
- };
39
25
  const allowedProps = ['className', 'text', 'title', 'disabled', 'readOnly', 'dismissible', 'margin', 'onClick', 'elementRef', 'size', 'variant'];
40
- export { propTypes, allowedProps };
26
+ export { allowedProps };
package/lib/Tag/index.js CHANGED
@@ -10,13 +10,12 @@ var _IconXLine = require("@instructure/ui-icons/lib/IconXLine.js");
10
10
  var _View = require("@instructure/ui-view/lib/View");
11
11
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
12
12
  var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
13
- var _testable = require("@instructure/ui-testable/lib/testable.js");
14
13
  var _emotion = require("@instructure/emotion");
15
14
  var _styles = _interopRequireDefault(require("./styles"));
16
15
  var _theme = _interopRequireDefault(require("./theme"));
17
16
  var _props = require("./props");
18
17
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
19
- var _dec, _dec2, _class, _Tag;
18
+ var _dec, _class, _Tag;
20
19
  /*
21
20
  * The MIT License (MIT)
22
21
  *
@@ -45,7 +44,7 @@ var _dec, _dec2, _class, _Tag;
45
44
  category: components
46
45
  ---
47
46
  **/
48
- let Tag = exports.Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_Tag = class Tag extends _react.Component {
47
+ let Tag = exports.Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_Tag = class Tag extends _react.Component {
49
48
  constructor(...args) {
50
49
  super(...args);
51
50
  this.ref = null;
@@ -108,6 +107,7 @@ let Tag = exports.Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
108
107
  disabled: disabled || readOnly,
109
108
  display: void 0,
110
109
  title: title || (typeof text === 'string' ? text : void 0),
110
+ "data-cid": "Tag",
111
111
  children: [(0, _jsxRuntime.jsx)("span", {
112
112
  css: styles === null || styles === void 0 ? void 0 : styles.text,
113
113
  children: text
@@ -116,11 +116,11 @@ let Tag = exports.Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
116
116
  }) : null]
117
117
  });
118
118
  }
119
- }, _Tag.displayName = "Tag", _Tag.componentId = 'Tag', _Tag.allowedProps = _props.allowedProps, _Tag.propTypes = _props.propTypes, _Tag.defaultProps = {
119
+ }, _Tag.displayName = "Tag", _Tag.componentId = 'Tag', _Tag.allowedProps = _props.allowedProps, _Tag.defaultProps = {
120
120
  size: 'medium',
121
121
  dismissible: false,
122
122
  variant: 'default',
123
123
  disabled: false,
124
124
  readOnly: false
125
- }, _Tag)) || _class) || _class);
125
+ }, _Tag)) || _class);
126
126
  var _default = exports.default = Tag;
package/lib/Tag/props.js CHANGED
@@ -1,11 +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.propTypes = exports.allowedProps = void 0;
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
6
+ exports.allowedProps = void 0;
9
7
  /*
10
8
  * The MIT License (MIT)
11
9
  *
@@ -30,17 +28,4 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
30
28
  * SOFTWARE.
31
29
  */
32
30
 
33
- const propTypes = exports.propTypes = {
34
- className: _propTypes.default.string,
35
- text: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]).isRequired,
36
- title: _propTypes.default.string,
37
- disabled: _propTypes.default.bool,
38
- readOnly: _propTypes.default.bool,
39
- dismissible: _propTypes.default.bool,
40
- margin: _propTypes.default.string,
41
- onClick: _propTypes.default.func,
42
- elementRef: _propTypes.default.func,
43
- size: _propTypes.default.oneOf(['small', 'medium', 'large']),
44
- variant: _propTypes.default.oneOf(['default', 'inline'])
45
- };
46
31
  const allowedProps = exports.allowedProps = ['className', 'text', 'title', 'disabled', 'readOnly', 'dismissible', 'margin', 'onClick', 'elementRef', 'size', 'variant'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tag",
3
- "version": "10.26.1-snapshot-1",
3
+ "version": "11.0.0",
4
4
  "description": "A tag component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,28 +24,26 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "10.26.1-snapshot-1",
28
- "@instructure/emotion": "10.26.1-snapshot-1",
29
- "@instructure/shared-types": "10.26.1-snapshot-1",
30
- "@instructure/ui-color-utils": "10.26.1-snapshot-1",
31
- "@instructure/ui-dom-utils": "10.26.1-snapshot-1",
32
- "@instructure/ui-icons": "10.26.1-snapshot-1",
33
- "@instructure/ui-react-utils": "10.26.1-snapshot-1",
34
- "@instructure/ui-testable": "10.26.1-snapshot-1",
35
- "@instructure/ui-view": "10.26.1-snapshot-1",
36
- "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-color-utils": "11.0.0",
31
+ "@instructure/ui-dom-utils": "11.0.0",
32
+ "@instructure/ui-icons": "11.0.0",
33
+ "@instructure/ui-react-utils": "11.0.0",
34
+ "@instructure/ui-view": "11.0.0"
37
35
  },
38
36
  "devDependencies": {
39
- "@instructure/ui-axe-check": "10.26.1-snapshot-1",
40
- "@instructure/ui-babel-preset": "10.26.1-snapshot-1",
41
- "@instructure/ui-themes": "10.26.1-snapshot-1",
37
+ "@instructure/ui-axe-check": "11.0.0",
38
+ "@instructure/ui-babel-preset": "11.0.0",
39
+ "@instructure/ui-themes": "11.0.0",
42
40
  "@testing-library/jest-dom": "^6.6.3",
43
- "@testing-library/react": "^16.0.1",
41
+ "@testing-library/react": "15.0.7",
44
42
  "@testing-library/user-event": "^14.6.1",
45
43
  "vitest": "^3.2.2"
46
44
  },
47
45
  "peerDependencies": {
48
- "react": ">=16.14 <=18"
46
+ "react": ">=18 <=19"
49
47
  },
50
48
  "publishConfig": {
51
49
  "access": "public"
package/src/Tag/README.md CHANGED
@@ -71,6 +71,8 @@ type: example
71
71
 
72
72
  ### Max-width
73
73
 
74
+ > **DEPRECATED** Please do not make Tags that have overflowing text, it's an a11y anti-pattern. The issue is if text overflows it cannot be read by keyboard-only users. We could make the Tag focusable, but that would be an anti-pattern too because only elements that are interactive should be focusable (and just displaying a tooltip is not a real interaction)
75
+
74
76
  ```js
75
77
  ---
76
78
  type: example
package/src/Tag/index.tsx CHANGED
@@ -29,13 +29,12 @@ import { View } from '@instructure/ui-view'
29
29
  import type { ViewProps } from '@instructure/ui-view'
30
30
  import { omitProps } from '@instructure/ui-react-utils'
31
31
  import { isActiveElement } from '@instructure/ui-dom-utils'
32
- import { testable } from '@instructure/ui-testable'
33
32
  import { withStyle } from '@instructure/emotion'
34
33
 
35
34
  import generateStyle from './styles'
36
35
  import generateComponentTheme from './theme'
37
36
  import type { TagProps } from './props'
38
- import { allowedProps, propTypes } from './props'
37
+ import { allowedProps } from './props'
39
38
 
40
39
  /**
41
40
  ---
@@ -44,12 +43,10 @@ category: components
44
43
  **/
45
44
 
46
45
  @withStyle(generateStyle, generateComponentTheme)
47
- @testable()
48
46
  class Tag extends Component<TagProps> {
49
47
  static readonly componentId = 'Tag'
50
48
 
51
49
  static allowedProps = allowedProps
52
- static propTypes = propTypes
53
50
  static defaultProps = {
54
51
  size: 'medium',
55
52
  dismissible: false,
@@ -126,6 +123,7 @@ class Tag extends Component<TagProps> {
126
123
  disabled={disabled || readOnly}
127
124
  display={undefined}
128
125
  title={title || (typeof text === 'string' ? text : undefined)}
126
+ data-cid="Tag"
129
127
  >
130
128
  <span css={styles?.text}>{text}</span>
131
129
  {onClick && dismissible ? <IconXLine css={styles?.icon} /> : null}
package/src/Tag/props.ts CHANGED
@@ -23,19 +23,13 @@
23
23
  */
24
24
 
25
25
  import React from 'react'
26
- import PropTypes from 'prop-types'
27
-
28
26
  import type { ViewProps } from '@instructure/ui-view'
29
27
  import type {
30
28
  Spacing,
31
29
  WithStyleProps,
32
30
  ComponentStyle
33
31
  } from '@instructure/emotion'
34
- import type {
35
- OtherHTMLAttributes,
36
- PropValidators,
37
- TagTheme
38
- } from '@instructure/shared-types'
32
+ import type { OtherHTMLAttributes, TagTheme } from '@instructure/shared-types'
39
33
 
40
34
  type TagOwnProps = {
41
35
  className?: string
@@ -81,21 +75,6 @@ type TagProps = TagOwnProps &
81
75
  OtherHTMLAttributes<TagOwnProps>
82
76
 
83
77
  type TagStyle = ComponentStyle<'tag' | 'text' | 'icon'>
84
-
85
- const propTypes: PropValidators<PropKeys> = {
86
- className: PropTypes.string,
87
- text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
88
- title: PropTypes.string,
89
- disabled: PropTypes.bool,
90
- readOnly: PropTypes.bool,
91
- dismissible: PropTypes.bool,
92
- margin: PropTypes.string,
93
- onClick: PropTypes.func,
94
- elementRef: PropTypes.func,
95
- size: PropTypes.oneOf(['small', 'medium', 'large']),
96
- variant: PropTypes.oneOf(['default', 'inline'])
97
- }
98
-
99
78
  const allowedProps: AllowedPropKeys = [
100
79
  'className',
101
80
  'text',
@@ -111,4 +90,4 @@ const allowedProps: AllowedPropKeys = [
111
90
  ]
112
91
 
113
92
  export type { TagProps, TagStyle }
114
- export { propTypes, allowedProps }
93
+ export { allowedProps }
@@ -31,9 +31,6 @@
31
31
  {
32
32
  "path": "../ui-react-utils/tsconfig.build.json"
33
33
  },
34
- {
35
- "path": "../ui-testable/tsconfig.build.json"
36
- },
37
34
  {
38
35
  "path": "../ui-view/tsconfig.build.json"
39
36
  },