@instructure/ui-buttons 8.22.1-snapshot.4 → 8.23.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 +4 -0
- package/es/CloseButton/index.js +2 -2
- package/es/ToggleButton/index.js +2 -2
- package/lib/CloseButton/index.js +2 -2
- package/lib/ToggleButton/index.js +2 -2
- package/package.json +21 -22
- package/src/CloseButton/index.tsx +5 -4
- package/src/ToggleButton/index.tsx +1 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/CloseButton/index.d.ts.map +1 -1
- package/types/ToggleButton/index.d.ts.map +1 -1
- package/LICENSE.md +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.23.0](https://github.com/instructure/instructure-ui/compare/v8.22.0...v8.23.0) (2022-04-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-buttons
|
|
9
|
+
|
|
6
10
|
# [8.22.0](https://github.com/instructure/instructure-ui/compare/v8.21.0...v8.22.0) (2022-03-31)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-buttons
|
package/es/CloseButton/index.js
CHANGED
|
@@ -52,7 +52,6 @@ let CloseButton = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
52
52
|
|
|
53
53
|
this.handleRef = el => {
|
|
54
54
|
const elementRef = this.props.elementRef;
|
|
55
|
-
this.ref = el;
|
|
56
55
|
|
|
57
56
|
if (typeof elementRef === 'function') {
|
|
58
57
|
elementRef(el);
|
|
@@ -101,7 +100,8 @@ let CloseButton = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
101
100
|
props = _objectWithoutProperties(_this$props3, _excluded);
|
|
102
101
|
|
|
103
102
|
return jsx("span", Object.assign({}, passthroughProps(props), {
|
|
104
|
-
css: styles === null || styles === void 0 ? void 0 : styles.closeButton
|
|
103
|
+
css: styles === null || styles === void 0 ? void 0 : styles.closeButton,
|
|
104
|
+
ref: el => this.ref = el
|
|
105
105
|
}), jsx(BaseButton, {
|
|
106
106
|
renderIcon: IconXSolid,
|
|
107
107
|
elementRef: this.handleRef,
|
package/es/ToggleButton/index.js
CHANGED
|
@@ -46,7 +46,6 @@ let ToggleButton = (_dec = testable(), _dec(_class = (_temp = _class2 = class To
|
|
|
46
46
|
|
|
47
47
|
this.handleRef = el => {
|
|
48
48
|
const elementRef = this.props.elementRef;
|
|
49
|
-
this.ref = el;
|
|
50
49
|
|
|
51
50
|
if (typeof elementRef === 'function') {
|
|
52
51
|
elementRef(el);
|
|
@@ -94,7 +93,8 @@ let ToggleButton = (_dec = testable(), _dec(_class = (_temp = _class2 = class To
|
|
|
94
93
|
isShowingTooltip: false
|
|
95
94
|
});
|
|
96
95
|
},
|
|
97
|
-
mountNode: mountNode
|
|
96
|
+
mountNode: mountNode,
|
|
97
|
+
elementRef: el => this.ref = el
|
|
98
98
|
}, /*#__PURE__*/React.createElement(IconButton, Object.assign({}, passthroughProps(props), {
|
|
99
99
|
screenReaderLabel: screenReaderLabel,
|
|
100
100
|
withBackground: false,
|
package/lib/CloseButton/index.js
CHANGED
|
@@ -48,7 +48,6 @@ let CloseButton = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
|
|
|
48
48
|
|
|
49
49
|
this.handleRef = el => {
|
|
50
50
|
const elementRef = this.props.elementRef;
|
|
51
|
-
this.ref = el;
|
|
52
51
|
|
|
53
52
|
if (typeof elementRef === 'function') {
|
|
54
53
|
elementRef(el);
|
|
@@ -96,7 +95,8 @@ let CloseButton = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
|
|
|
96
95
|
styles = _this$props3.styles,
|
|
97
96
|
props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
98
97
|
return (0, _emotion.jsx)("span", Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
99
|
-
css: styles === null || styles === void 0 ? void 0 : styles.closeButton
|
|
98
|
+
css: styles === null || styles === void 0 ? void 0 : styles.closeButton,
|
|
99
|
+
ref: el => this.ref = el
|
|
100
100
|
}), (0, _emotion.jsx)(_BaseButton.BaseButton, {
|
|
101
101
|
renderIcon: _IconXSolid.IconXSolid,
|
|
102
102
|
elementRef: this.handleRef,
|
|
@@ -42,7 +42,6 @@ let ToggleButton = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
|
|
|
42
42
|
|
|
43
43
|
this.handleRef = el => {
|
|
44
44
|
const elementRef = this.props.elementRef;
|
|
45
|
-
this.ref = el;
|
|
46
45
|
|
|
47
46
|
if (typeof elementRef === 'function') {
|
|
48
47
|
elementRef(el);
|
|
@@ -89,7 +88,8 @@ let ToggleButton = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
|
|
|
89
88
|
isShowingTooltip: false
|
|
90
89
|
});
|
|
91
90
|
},
|
|
92
|
-
mountNode: mountNode
|
|
91
|
+
mountNode: mountNode,
|
|
92
|
+
elementRef: el => this.ref = el
|
|
93
93
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
94
94
|
screenReaderLabel: screenReaderLabel,
|
|
95
95
|
withBackground: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-buttons",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.23.0",
|
|
4
4
|
"description": "Accessible button components",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.
|
|
27
|
-
"@instructure/ui-test-locator": "8.
|
|
28
|
-
"@instructure/ui-test-queries": "8.
|
|
29
|
-
"@instructure/ui-test-utils": "8.
|
|
30
|
-
"@instructure/ui-themes": "8.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.23.0",
|
|
27
|
+
"@instructure/ui-test-locator": "8.23.0",
|
|
28
|
+
"@instructure/ui-test-queries": "8.23.0",
|
|
29
|
+
"@instructure/ui-test-utils": "8.23.0",
|
|
30
|
+
"@instructure/ui-themes": "8.23.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/console": "8.
|
|
35
|
-
"@instructure/emotion": "8.
|
|
36
|
-
"@instructure/shared-types": "8.
|
|
37
|
-
"@instructure/ui-a11y-content": "8.
|
|
38
|
-
"@instructure/ui-a11y-utils": "8.
|
|
39
|
-
"@instructure/ui-color-utils": "8.
|
|
40
|
-
"@instructure/ui-dom-utils": "8.
|
|
41
|
-
"@instructure/ui-icons": "8.
|
|
42
|
-
"@instructure/ui-position": "8.
|
|
43
|
-
"@instructure/ui-react-utils": "8.
|
|
44
|
-
"@instructure/ui-testable": "8.
|
|
45
|
-
"@instructure/ui-tooltip": "8.
|
|
46
|
-
"@instructure/ui-utils": "8.
|
|
47
|
-
"@instructure/ui-view": "8.
|
|
34
|
+
"@instructure/console": "8.23.0",
|
|
35
|
+
"@instructure/emotion": "8.23.0",
|
|
36
|
+
"@instructure/shared-types": "8.23.0",
|
|
37
|
+
"@instructure/ui-a11y-content": "8.23.0",
|
|
38
|
+
"@instructure/ui-a11y-utils": "8.23.0",
|
|
39
|
+
"@instructure/ui-color-utils": "8.23.0",
|
|
40
|
+
"@instructure/ui-dom-utils": "8.23.0",
|
|
41
|
+
"@instructure/ui-icons": "8.23.0",
|
|
42
|
+
"@instructure/ui-position": "8.23.0",
|
|
43
|
+
"@instructure/ui-react-utils": "8.23.0",
|
|
44
|
+
"@instructure/ui-testable": "8.23.0",
|
|
45
|
+
"@instructure/ui-tooltip": "8.23.0",
|
|
46
|
+
"@instructure/ui-utils": "8.23.0",
|
|
47
|
+
"@instructure/ui-view": "8.23.0",
|
|
48
48
|
"keycode": "^2",
|
|
49
49
|
"prop-types": "^15"
|
|
50
50
|
},
|
|
@@ -54,6 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"sideEffects": false
|
|
58
|
-
"gitHead": "5809c01bc3fc6e7b468d18d44c22f364304561ed"
|
|
57
|
+
"sideEffects": false
|
|
59
58
|
}
|
|
@@ -68,9 +68,6 @@ class CloseButton extends Component<CloseButtonProps> {
|
|
|
68
68
|
|
|
69
69
|
handleRef = (el: Element | null) => {
|
|
70
70
|
const { elementRef } = this.props
|
|
71
|
-
|
|
72
|
-
this.ref = el
|
|
73
|
-
|
|
74
71
|
if (typeof elementRef === 'function') {
|
|
75
72
|
elementRef(el)
|
|
76
73
|
}
|
|
@@ -113,7 +110,11 @@ class CloseButton extends Component<CloseButtonProps> {
|
|
|
113
110
|
} = this.props
|
|
114
111
|
|
|
115
112
|
return (
|
|
116
|
-
<span
|
|
113
|
+
<span
|
|
114
|
+
{...passthroughProps(props)}
|
|
115
|
+
css={styles?.closeButton}
|
|
116
|
+
ref={(el) => (this.ref = el)}
|
|
117
|
+
>
|
|
117
118
|
<BaseButton
|
|
118
119
|
renderIcon={IconXSolid}
|
|
119
120
|
elementRef={this.handleRef}
|
|
@@ -70,9 +70,6 @@ class ToggleButton extends Component<ToggleButtonProps, ToggleButtonState> {
|
|
|
70
70
|
|
|
71
71
|
handleRef = (el: Element | null) => {
|
|
72
72
|
const { elementRef } = this.props
|
|
73
|
-
|
|
74
|
-
this.ref = el
|
|
75
|
-
|
|
76
73
|
if (typeof elementRef === 'function') {
|
|
77
74
|
elementRef(el)
|
|
78
75
|
}
|
|
@@ -115,6 +112,7 @@ class ToggleButton extends Component<ToggleButtonProps, ToggleButtonState> {
|
|
|
115
112
|
this.setState({ isShowingTooltip: false })
|
|
116
113
|
}}
|
|
117
114
|
mountNode={mountNode}
|
|
115
|
+
elementRef={(el) => (this.ref = el)}
|
|
118
116
|
>
|
|
119
117
|
<IconButton
|
|
120
118
|
{...passthroughProps(props)}
|