@instructure/ui-pill 8.56.0 → 8.56.2-pr-snapshot-1721749364069
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 +16 -0
- package/lib/Pill/PillLocator.js +3 -3
- package/lib/Pill/__new-tests__/Pill.test.js +4 -4
- package/lib/Pill/index.js +8 -8
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [8.56.2-pr-snapshot-1721749364069](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-pr-snapshot-1721749364069) (2024-07-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-pill
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [8.56.1](https://github.com/instructure/instructure-ui/compare/v8.56.0...v8.56.1) (2024-06-13)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @instructure/ui-pill
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [8.56.0](https://github.com/instructure/instructure-ui/compare/v8.55.1...v8.56.0) (2024-05-06)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @instructure/ui-pill
|
package/lib/Pill/PillLocator.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PillLocator = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _uiTestLocator = require("@instructure/ui-test-locator");
|
|
8
8
|
var _uiTestQueries = require("@instructure/ui-test-queries");
|
|
9
|
-
var _TooltipLocator = require("@instructure/ui-tooltip/
|
|
9
|
+
var _TooltipLocator = require("@instructure/ui-tooltip/es/Tooltip/TooltipLocator");
|
|
10
10
|
var _index = require("./index");
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
@@ -36,7 +36,7 @@ var _index = require("./index");
|
|
|
36
36
|
// eslint-disable-next-line no-restricted-imports
|
|
37
37
|
|
|
38
38
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
39
|
-
const PillLocator = exports.PillLocator = (0,
|
|
39
|
+
const PillLocator = exports.PillLocator = (0, _uiTestLocator.locator)(_index.Pill.selector, {
|
|
40
40
|
findTooltipContent: async (...args) => {
|
|
41
41
|
const _parseQueryArguments = (0, _uiTestQueries.parseQueryArguments)(...args),
|
|
42
42
|
element = _parseQueryArguments.element,
|
|
@@ -4,9 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
var _react = _interopRequireDefault(require("react"));
|
|
5
5
|
var _react2 = require("@testing-library/react");
|
|
6
6
|
require("@testing-library/jest-dom");
|
|
7
|
-
var
|
|
7
|
+
var _uiAxeCheck = require("@instructure/ui-axe-check");
|
|
8
8
|
var _index = require("../index");
|
|
9
|
-
var
|
|
9
|
+
var _uiIcons = require("@instructure/ui-icons");
|
|
10
10
|
var _Pill, _Pill2, _Pill3, _Pill4;
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
@@ -58,7 +58,7 @@ describe('<Pill />', () => {
|
|
|
58
58
|
it('should render icon text', async () => {
|
|
59
59
|
const _render3 = (0, _react2.render)(_Pill3 || (_Pill3 = /*#__PURE__*/_react.default.createElement(_index.Pill, {
|
|
60
60
|
statusLabel: "Statuslabel",
|
|
61
|
-
renderIcon: /*#__PURE__*/_react.default.createElement(
|
|
61
|
+
renderIcon: /*#__PURE__*/_react.default.createElement(_uiIcons.IconEyeLine, {
|
|
62
62
|
color: "auto",
|
|
63
63
|
title: "Love"
|
|
64
64
|
})
|
|
@@ -72,7 +72,7 @@ describe('<Pill />', () => {
|
|
|
72
72
|
it('should be accessible', async () => {
|
|
73
73
|
const _render4 = (0, _react2.render)(_Pill4 || (_Pill4 = /*#__PURE__*/_react.default.createElement(_index.Pill, null, "Overdue"))),
|
|
74
74
|
container = _render4.container;
|
|
75
|
-
const axeCheck = await (0,
|
|
75
|
+
const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
|
|
76
76
|
expect(axeCheck).toBe(true);
|
|
77
77
|
});
|
|
78
78
|
afterAll(() => {
|
package/lib/Pill/index.js
CHANGED
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.Pill = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
10
|
+
var _uiView = require("@instructure/ui-view");
|
|
11
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
12
|
+
var _uiTestable = require("@instructure/ui-testable");
|
|
13
|
+
var _uiTooltip = require("@instructure/ui-tooltip");
|
|
14
14
|
var _emotion = require("@instructure/emotion");
|
|
15
15
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
16
16
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -46,7 +46,7 @@ var _dec, _dec2, _class, _class2;
|
|
|
46
46
|
category: components
|
|
47
47
|
---
|
|
48
48
|
**/
|
|
49
|
-
let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0,
|
|
49
|
+
let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = (_class2 = class Pill extends _react.Component {
|
|
50
50
|
constructor(props) {
|
|
51
51
|
super(props);
|
|
52
52
|
this.ref = null;
|
|
@@ -90,12 +90,12 @@ let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
90
90
|
statusLabel = _this$props3.statusLabel,
|
|
91
91
|
renderIcon = _this$props3.renderIcon,
|
|
92
92
|
props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
93
|
-
const filteredProps = (0,
|
|
93
|
+
const filteredProps = (0, _uiReactUtils.passthroughProps)(props);
|
|
94
94
|
const containerProps = typeof getTriggerProps === 'function' ? getTriggerProps(filteredProps) : filteredProps;
|
|
95
95
|
const refProp = this.state.truncated ? {} : {
|
|
96
96
|
elementRef: this.handleRef
|
|
97
97
|
};
|
|
98
|
-
return (0, _emotion.jsx)(
|
|
98
|
+
return (0, _emotion.jsx)(_uiView.View, Object.assign({}, containerProps, {
|
|
99
99
|
as: as
|
|
100
100
|
}, refProp, {
|
|
101
101
|
margin: margin,
|
|
@@ -123,7 +123,7 @@ let Pill = exports.Pill = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
123
123
|
}
|
|
124
124
|
render() {
|
|
125
125
|
if (this.state.truncated) {
|
|
126
|
-
return (0, _emotion.jsx)(
|
|
126
|
+
return (0, _emotion.jsx)(_uiTooltip.Tooltip, {
|
|
127
127
|
renderTip: this.props.statusLabel ? this.props.statusLabel.concat(': ', this.props.children) : this.props.children,
|
|
128
128
|
elementRef: this.handleRef
|
|
129
129
|
}, ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pill",
|
|
3
|
-
"version": "8.56.
|
|
3
|
+
"version": "8.56.2-pr-snapshot-1721749364069",
|
|
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,27 +24,27 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.23.2",
|
|
27
|
-
"@instructure/console": "8.56.
|
|
28
|
-
"@instructure/emotion": "8.56.
|
|
29
|
-
"@instructure/shared-types": "8.56.
|
|
30
|
-
"@instructure/ui-react-utils": "8.56.
|
|
31
|
-
"@instructure/ui-testable": "8.56.
|
|
32
|
-
"@instructure/ui-tooltip": "8.56.
|
|
33
|
-
"@instructure/ui-truncate-text": "8.56.
|
|
34
|
-
"@instructure/ui-utils": "8.56.
|
|
35
|
-
"@instructure/ui-view": "8.56.
|
|
27
|
+
"@instructure/console": "8.56.2-pr-snapshot-1721749364069",
|
|
28
|
+
"@instructure/emotion": "8.56.2-pr-snapshot-1721749364069",
|
|
29
|
+
"@instructure/shared-types": "8.56.2-pr-snapshot-1721749364069",
|
|
30
|
+
"@instructure/ui-react-utils": "8.56.2-pr-snapshot-1721749364069",
|
|
31
|
+
"@instructure/ui-testable": "8.56.2-pr-snapshot-1721749364069",
|
|
32
|
+
"@instructure/ui-tooltip": "8.56.2-pr-snapshot-1721749364069",
|
|
33
|
+
"@instructure/ui-truncate-text": "8.56.2-pr-snapshot-1721749364069",
|
|
34
|
+
"@instructure/ui-utils": "8.56.2-pr-snapshot-1721749364069",
|
|
35
|
+
"@instructure/ui-view": "8.56.2-pr-snapshot-1721749364069",
|
|
36
36
|
"prop-types": "^15.8.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-axe-check": "8.56.
|
|
40
|
-
"@instructure/ui-babel-preset": "8.56.
|
|
41
|
-
"@instructure/ui-color-utils": "8.56.
|
|
42
|
-
"@instructure/ui-icons": "8.56.
|
|
43
|
-
"@instructure/ui-scripts": "8.56.
|
|
44
|
-
"@instructure/ui-test-locator": "8.56.
|
|
45
|
-
"@instructure/ui-test-queries": "8.56.
|
|
46
|
-
"@instructure/ui-test-utils": "8.56.
|
|
47
|
-
"@instructure/ui-themes": "8.56.
|
|
39
|
+
"@instructure/ui-axe-check": "8.56.2-pr-snapshot-1721749364069",
|
|
40
|
+
"@instructure/ui-babel-preset": "8.56.2-pr-snapshot-1721749364069",
|
|
41
|
+
"@instructure/ui-color-utils": "8.56.2-pr-snapshot-1721749364069",
|
|
42
|
+
"@instructure/ui-icons": "8.56.2-pr-snapshot-1721749364069",
|
|
43
|
+
"@instructure/ui-scripts": "8.56.2-pr-snapshot-1721749364069",
|
|
44
|
+
"@instructure/ui-test-locator": "8.56.2-pr-snapshot-1721749364069",
|
|
45
|
+
"@instructure/ui-test-queries": "8.56.2-pr-snapshot-1721749364069",
|
|
46
|
+
"@instructure/ui-test-utils": "8.56.2-pr-snapshot-1721749364069",
|
|
47
|
+
"@instructure/ui-themes": "8.56.2-pr-snapshot-1721749364069",
|
|
48
48
|
"@testing-library/jest-dom": "^6.1.4",
|
|
49
49
|
"@testing-library/react": "^14.1.2"
|
|
50
50
|
},
|