@instructure/ui-pill 10.26.1 → 11.0.1-snapshot-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,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
- ## [10.26.1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1) (2025-10-06)
6
+ ## [11.0.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1-snapshot-0) (2025-10-07)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-pill
9
9
 
@@ -11,6 +11,35 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
+ # [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
15
+
16
+
17
+ ### Features
18
+
19
+ * **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * **many:** InstUI v11 contains the following breaking changes:
25
+ - React 16 and 17 are no longer supported
26
+ - remove `PropTypes` from all packages
27
+ - remove `CodeEditor` component
28
+ - remove `@instui/theme-registry` package
29
+ - remove `@testable`, `@experimental`, `@hack` decorators
30
+ - InstUISettingsProvider's `as` prop is removed
31
+ - `canvas.use()`, `canvasHighContrast.use()` functions are removed
32
+ - `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
33
+ - `variables` field on theme objects are removed
34
+ - remove deprecated props from Table: Row's `isStacked`, Body's
35
+ `isStacked`, `hover`, and `headers`
36
+ - `Table`'s `caption` prop is now required
37
+ - `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
38
+
39
+
40
+
41
+
42
+
14
43
  # [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
15
44
 
16
45
  **Note:** Version bump only for package @instructure/ui-pill
package/es/Pill/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["margin", "children", "color", "as", "elementRef", "styles", "makeStyles", "statusLabel", "renderIcon"];
3
- var _dec, _dec2, _class, _Pill;
3
+ var _dec, _class, _Pill;
4
4
  /*
5
5
  * The MIT License (MIT)
6
6
  *
@@ -28,12 +28,11 @@ var _dec, _dec2, _class, _Pill;
28
28
  import { Component } from 'react';
29
29
  import { View } from '@instructure/ui-view';
30
30
  import { passthroughProps } from '@instructure/ui-react-utils';
31
- import { testable } from '@instructure/ui-testable';
32
31
  import { Tooltip } from '@instructure/ui-tooltip';
33
32
  import { withStyle } from '@instructure/emotion';
34
33
  import generateStyle from './styles';
35
34
  import generateComponentTheme from './theme';
36
- import { allowedProps, propTypes } from './props';
35
+ import { allowedProps } from './props';
37
36
 
38
37
  /**
39
38
  ---
@@ -41,7 +40,7 @@ category: components
41
40
  ---
42
41
  **/
43
42
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
44
- let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_Pill = class Pill extends Component {
43
+ let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_Pill = class Pill extends Component {
45
44
  constructor(props) {
46
45
  super(props);
47
46
  this.ref = null;
@@ -104,6 +103,7 @@ let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
104
103
  position: "relative",
105
104
  withFocusOutline: focused,
106
105
  focusColor: "info",
106
+ "data-cid": "Pill",
107
107
  children: _jsxs("div", {
108
108
  css: styles === null || styles === void 0 ? void 0 : styles.pill,
109
109
  children: [renderIcon && _jsx("div", {
@@ -138,8 +138,8 @@ let Pill = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
138
138
  return this.renderPill();
139
139
  }
140
140
  }
141
- }, _Pill.displayName = "Pill", _Pill.componentId = 'Pill', _Pill.allowedProps = allowedProps, _Pill.propTypes = propTypes, _Pill.defaultProps = {
141
+ }, _Pill.displayName = "Pill", _Pill.componentId = 'Pill', _Pill.allowedProps = allowedProps, _Pill.defaultProps = {
142
142
  color: 'primary'
143
- }, _Pill)) || _class) || _class);
143
+ }, _Pill)) || _class);
144
144
  export default Pill;
145
145
  export { Pill };
package/es/Pill/props.js CHANGED
@@ -22,15 +22,5 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types';
26
- const propTypes = {
27
- as: PropTypes.elementType,
28
- children: PropTypes.node.isRequired,
29
- color: PropTypes.oneOf(['primary', 'success', 'danger', 'info', 'warning', 'alert']),
30
- elementRef: PropTypes.func,
31
- margin: PropTypes.string,
32
- statusLabel: PropTypes.string,
33
- renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
34
- };
35
25
  const allowedProps = ['as', 'children', 'color', 'elementRef', 'margin'];
36
- export { propTypes, allowedProps };
26
+ export { allowedProps };
package/lib/Pill/index.js CHANGED
@@ -9,7 +9,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
9
9
  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
- var _testable = require("@instructure/ui-testable/lib/testable.js");
13
12
  var _Tooltip = require("@instructure/ui-tooltip/lib/Tooltip");
14
13
  var _emotion = require("@instructure/emotion");
15
14
  var _styles = _interopRequireDefault(require("./styles"));
@@ -17,7 +16,7 @@ var _theme = _interopRequireDefault(require("./theme"));
17
16
  var _props = require("./props");
18
17
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
19
18
  const _excluded = ["margin", "children", "color", "as", "elementRef", "styles", "makeStyles", "statusLabel", "renderIcon"];
20
- var _dec, _dec2, _class, _Pill;
19
+ var _dec, _class, _Pill;
21
20
  /*
22
21
  * The MIT License (MIT)
23
22
  *
@@ -46,7 +45,7 @@ var _dec, _dec2, _class, _Pill;
46
45
  category: components
47
46
  ---
48
47
  **/
49
- let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_Pill = class Pill extends _react.Component {
48
+ let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_Pill = class Pill extends _react.Component {
50
49
  constructor(props) {
51
50
  super(props);
52
51
  this.ref = null;
@@ -109,6 +108,7 @@ let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _them
109
108
  position: "relative",
110
109
  withFocusOutline: focused,
111
110
  focusColor: "info",
111
+ "data-cid": "Pill",
112
112
  children: (0, _jsxRuntime.jsxs)("div", {
113
113
  css: styles === null || styles === void 0 ? void 0 : styles.pill,
114
114
  children: [renderIcon && (0, _jsxRuntime.jsx)("div", {
@@ -143,7 +143,7 @@ let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _them
143
143
  return this.renderPill();
144
144
  }
145
145
  }
146
- }, _Pill.displayName = "Pill", _Pill.componentId = 'Pill', _Pill.allowedProps = _props.allowedProps, _Pill.propTypes = _props.propTypes, _Pill.defaultProps = {
146
+ }, _Pill.displayName = "Pill", _Pill.componentId = 'Pill', _Pill.allowedProps = _props.allowedProps, _Pill.defaultProps = {
147
147
  color: 'primary'
148
- }, _Pill)) || _class) || _class);
148
+ }, _Pill)) || _class);
149
149
  var _default = exports.default = Pill;
package/lib/Pill/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,13 +28,4 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
30
28
  * SOFTWARE.
31
29
  */
32
30
 
33
- const propTypes = exports.propTypes = {
34
- as: _propTypes.default.elementType,
35
- children: _propTypes.default.node.isRequired,
36
- color: _propTypes.default.oneOf(['primary', 'success', 'danger', 'info', 'warning', 'alert']),
37
- elementRef: _propTypes.default.func,
38
- margin: _propTypes.default.string,
39
- statusLabel: _propTypes.default.string,
40
- renderIcon: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func])
41
- };
42
31
  const allowedProps = exports.allowedProps = ['as', 'children', 'color', 'elementRef', 'margin'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-pill",
3
- "version": "10.26.1",
3
+ "version": "11.0.1-snapshot-0",
4
4
  "description": "A UI component to communicate concise status.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,30 +24,28 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "10.26.1",
28
- "@instructure/emotion": "10.26.1",
29
- "@instructure/shared-types": "10.26.1",
30
- "@instructure/ui-react-utils": "10.26.1",
31
- "@instructure/ui-testable": "10.26.1",
32
- "@instructure/ui-tooltip": "10.26.1",
33
- "@instructure/ui-truncate-text": "10.26.1",
34
- "@instructure/ui-utils": "10.26.1",
35
- "@instructure/ui-view": "10.26.1",
36
- "prop-types": "^15.8.1"
27
+ "@instructure/console": "11.0.1-snapshot-0",
28
+ "@instructure/emotion": "11.0.1-snapshot-0",
29
+ "@instructure/shared-types": "11.0.1-snapshot-0",
30
+ "@instructure/ui-react-utils": "11.0.1-snapshot-0",
31
+ "@instructure/ui-tooltip": "11.0.1-snapshot-0",
32
+ "@instructure/ui-truncate-text": "11.0.1-snapshot-0",
33
+ "@instructure/ui-utils": "11.0.1-snapshot-0",
34
+ "@instructure/ui-view": "11.0.1-snapshot-0"
37
35
  },
38
36
  "devDependencies": {
39
- "@instructure/ui-axe-check": "10.26.1",
40
- "@instructure/ui-babel-preset": "10.26.1",
41
- "@instructure/ui-color-utils": "10.26.1",
42
- "@instructure/ui-icons": "10.26.1",
43
- "@instructure/ui-scripts": "10.26.1",
44
- "@instructure/ui-themes": "10.26.1",
37
+ "@instructure/ui-axe-check": "11.0.1-snapshot-0",
38
+ "@instructure/ui-babel-preset": "11.0.1-snapshot-0",
39
+ "@instructure/ui-color-utils": "11.0.1-snapshot-0",
40
+ "@instructure/ui-icons": "11.0.1-snapshot-0",
41
+ "@instructure/ui-scripts": "11.0.1-snapshot-0",
42
+ "@instructure/ui-themes": "11.0.1-snapshot-0",
45
43
  "@testing-library/jest-dom": "^6.6.3",
46
- "@testing-library/react": "^16.0.1",
44
+ "@testing-library/react": "15.0.7",
47
45
  "vitest": "^3.2.2"
48
46
  },
49
47
  "peerDependencies": {
50
- "react": ">=16.14 <=18"
48
+ "react": ">=18 <=19"
51
49
  },
52
50
  "publishConfig": {
53
51
  "access": "public"
@@ -56,8 +56,9 @@ type: example
56
56
  </div>
57
57
  ```
58
58
 
59
- The component has a max-width, set by its theme. Any overflowing text will
60
- be handled via ellipses.
59
+ The component has a `max-width`, set by its theme. Any overflowing text will be handled via ellipses.
60
+
61
+ > **DEPRECATED** Please do not make Pills 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 Pill 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)
61
62
 
62
63
  ```js
63
64
  ---
@@ -26,7 +26,6 @@ import { Component } from 'react'
26
26
 
27
27
  import { View } from '@instructure/ui-view'
28
28
  import { passthroughProps } from '@instructure/ui-react-utils'
29
- import { testable } from '@instructure/ui-testable'
30
29
  import { Tooltip } from '@instructure/ui-tooltip'
31
30
  import type { TooltipRenderChildrenArgs } from '@instructure/ui-tooltip'
32
31
 
@@ -36,7 +35,7 @@ import generateStyle from './styles'
36
35
  import generateComponentTheme from './theme'
37
36
 
38
37
  import type { PillProps, PillState } from './props'
39
- import { allowedProps, propTypes } from './props'
38
+ import { allowedProps } from './props'
40
39
 
41
40
  /**
42
41
  ---
@@ -44,12 +43,10 @@ category: components
44
43
  ---
45
44
  **/
46
45
  @withStyle(generateStyle, generateComponentTheme)
47
- @testable()
48
46
  class Pill extends Component<PillProps, PillState> {
49
47
  static readonly componentId = 'Pill'
50
48
 
51
49
  static allowedProps = allowedProps
52
- static propTypes = propTypes
53
50
 
54
51
  static defaultProps = {
55
52
  color: 'primary'
@@ -134,6 +131,7 @@ class Pill extends Component<PillProps, PillState> {
134
131
  position="relative"
135
132
  withFocusOutline={focused}
136
133
  focusColor="info"
134
+ data-cid="Pill"
137
135
  >
138
136
  <div css={styles?.pill}>
139
137
  {renderIcon && <div css={styles?.icon}>{renderIcon}</div>}
package/src/Pill/props.ts CHANGED
@@ -22,15 +22,12 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import React from 'react'
25
- import PropTypes from 'prop-types'
26
-
27
25
  import type {
28
26
  Spacing,
29
27
  WithStyleProps,
30
28
  ComponentStyle
31
29
  } from '@instructure/emotion'
32
30
  import type {
33
- PropValidators,
34
31
  AsElementType,
35
32
  PillTheme,
36
33
  OtherHTMLAttributes
@@ -72,24 +69,6 @@ type PillProps = PillOwnProps &
72
69
  type PillStyle = ComponentStyle<
73
70
  'pill' | 'text' | 'maxWidth' | 'status' | 'icon'
74
71
  >
75
-
76
- const propTypes: PropValidators<PropKeys> = {
77
- as: PropTypes.elementType,
78
- children: PropTypes.node.isRequired,
79
- color: PropTypes.oneOf([
80
- 'primary',
81
- 'success',
82
- 'danger',
83
- 'info',
84
- 'warning',
85
- 'alert'
86
- ]),
87
- elementRef: PropTypes.func,
88
- margin: PropTypes.string,
89
- statusLabel: PropTypes.string,
90
- renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
91
- }
92
-
93
72
  const allowedProps: AllowedPropKeys = [
94
73
  'as',
95
74
  'children',
@@ -103,4 +82,4 @@ type PillState = {
103
82
  }
104
83
 
105
84
  export type { PillProps, PillStyle, PillState }
106
- export { propTypes, allowedProps }
85
+ export { allowedProps }
@@ -11,7 +11,6 @@
11
11
  { "path": "../emotion/tsconfig.build.json" },
12
12
  { "path": "../shared-types/tsconfig.build.json" },
13
13
  { "path": "../ui-react-utils/tsconfig.build.json" },
14
- { "path": "../ui-testable/tsconfig.build.json" },
15
14
  { "path": "../ui-tooltip/tsconfig.build.json" },
16
15
  { "path": "../ui-truncate-text/tsconfig.build.json" },
17
16
  { "path": "../ui-utils/tsconfig.build.json" },