@instructure/ui-buttons 8.12.1-snapshot.45 → 8.12.1-snapshot.51
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/es/BaseButton/BaseButtonLocator.js +5 -1
- package/es/BaseButton/index.js +2 -2
- package/es/BaseButton/theme.js +23 -21
- package/es/Button/ButtonLocator.js +5 -1
- package/es/Button/index.js +2 -2
- package/es/CloseButton/index.js +2 -2
- package/es/CondensedButton/CondensedButtonLocator.js +5 -1
- package/es/CondensedButton/index.js +2 -2
- package/es/IconButton/IconButtonLocator.js +5 -1
- package/es/IconButton/index.js +2 -2
- package/es/ToggleButton/ToggleButtonLocator.js +7 -3
- package/lib/BaseButton/BaseButtonLocator.js +5 -1
- package/lib/BaseButton/index.js +2 -2
- package/lib/BaseButton/props.js +1 -1
- package/lib/BaseButton/theme.js +23 -21
- package/lib/Button/ButtonLocator.js +5 -1
- package/lib/Button/index.js +3 -3
- package/lib/Button/props.js +1 -1
- package/lib/CloseButton/index.js +3 -3
- package/lib/CloseButton/props.js +1 -1
- package/lib/CondensedButton/CondensedButtonLocator.js +5 -1
- package/lib/CondensedButton/index.js +3 -3
- package/lib/CondensedButton/props.js +1 -1
- package/lib/IconButton/IconButtonLocator.js +5 -1
- package/lib/IconButton/index.js +3 -3
- package/lib/IconButton/props.js +1 -1
- package/lib/ToggleButton/ToggleButtonLocator.js +7 -3
- package/lib/ToggleButton/props.js +1 -1
- package/package.json +21 -21
|
@@ -25,7 +25,11 @@ import { locator } from '@instructure/ui-test-locator';
|
|
|
25
25
|
import { find } from '@instructure/ui-test-queries';
|
|
26
26
|
import { BaseButton } from './index';
|
|
27
27
|
export const BaseButtonLocator = locator(BaseButton.selector, {
|
|
28
|
-
click: async (element
|
|
28
|
+
click: async function (element) {
|
|
29
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
30
|
+
args[_key - 1] = arguments[_key];
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
return (await find(element, 'a,button,[role="button"]')).click(...args);
|
|
30
34
|
}
|
|
31
35
|
});
|
package/es/BaseButton/index.js
CHANGED
|
@@ -46,8 +46,8 @@ category: components/utilities
|
|
|
46
46
|
---
|
|
47
47
|
**/
|
|
48
48
|
let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class BaseButton extends Component {
|
|
49
|
-
constructor(
|
|
50
|
-
super(...
|
|
49
|
+
constructor() {
|
|
50
|
+
super(...arguments);
|
|
51
51
|
this.ref = null;
|
|
52
52
|
|
|
53
53
|
this.handleElementRef = el => {
|
package/es/BaseButton/theme.js
CHANGED
|
@@ -24,27 +24,29 @@
|
|
|
24
24
|
import { alpha, darken } from '@instructure/ui-color-utils';
|
|
25
25
|
const activeShadow = 'inset 0 0 0.1875rem 0.0625rem';
|
|
26
26
|
|
|
27
|
-
const generateButtonThemeVars =
|
|
28
|
-
style,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
27
|
+
const generateButtonThemeVars = _ref => {
|
|
28
|
+
let style = _ref.style,
|
|
29
|
+
textColor = _ref.textColor,
|
|
30
|
+
ghostTextColor = _ref.ghostTextColor,
|
|
31
|
+
backgroundColor = _ref.backgroundColor,
|
|
32
|
+
borderColor = _ref.borderColor,
|
|
33
|
+
_ref$ghostBorderColor = _ref.ghostBorderColor,
|
|
34
|
+
ghostBorderColor = _ref$ghostBorderColor === void 0 ? borderColor : _ref$ghostBorderColor;
|
|
35
|
+
return {
|
|
36
|
+
[`${style}Color`]: textColor,
|
|
37
|
+
[`${style}BorderColor`]: darken(borderColor, 10),
|
|
38
|
+
[`${style}Background`]: backgroundColor,
|
|
39
|
+
[`${style}HoverBackground`]: darken(backgroundColor, 10),
|
|
40
|
+
[`${style}ActiveBackground`]: darken(backgroundColor, 10),
|
|
41
|
+
[`${style}ActiveBoxShadow`]: `${activeShadow} ${darken(borderColor, 20, 0.45)}`,
|
|
42
|
+
[`${style}GhostColor`]: ghostTextColor,
|
|
43
|
+
[`${style}GhostBorderColor`]: ghostBorderColor,
|
|
44
|
+
[`${style}GhostBackground`]: 'transparent',
|
|
45
|
+
[`${style}GhostHoverBackground`]: alpha(ghostTextColor, 10),
|
|
46
|
+
[`${style}GhostActiveBackground`]: 'transparent',
|
|
47
|
+
[`${style}GhostActiveBoxShadow`]: `${activeShadow} ${alpha(ghostBorderColor, 28)}`
|
|
48
|
+
};
|
|
49
|
+
};
|
|
48
50
|
/**
|
|
49
51
|
* Generates the theme object for the component from the theme and provided additional information
|
|
50
52
|
* @param {Object} theme The actual theme object.
|
|
@@ -25,7 +25,11 @@ import { locator } from '@instructure/ui-test-locator';
|
|
|
25
25
|
import { find } from '@instructure/ui-test-queries';
|
|
26
26
|
import { Button } from './index';
|
|
27
27
|
export const ButtonLocator = locator(Button.selector, {
|
|
28
|
-
click: async (element
|
|
28
|
+
click: async function (element) {
|
|
29
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
30
|
+
args[_key - 1] = arguments[_key];
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
return (await find(element, 'a,button,[role="button"]')).click(...args);
|
|
30
34
|
}
|
|
31
35
|
});
|
package/es/Button/index.js
CHANGED
|
@@ -41,8 +41,8 @@ category: components
|
|
|
41
41
|
**/
|
|
42
42
|
// needed for listing the available theme variables on docs page
|
|
43
43
|
let Button = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class Button extends Component {
|
|
44
|
-
constructor(
|
|
45
|
-
super(...
|
|
44
|
+
constructor() {
|
|
45
|
+
super(...arguments);
|
|
46
46
|
this._buttonComponent = null;
|
|
47
47
|
this.ref = null;
|
|
48
48
|
|
package/es/CloseButton/index.js
CHANGED
|
@@ -45,8 +45,8 @@ category: components
|
|
|
45
45
|
---
|
|
46
46
|
**/
|
|
47
47
|
let CloseButton = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class CloseButton extends Component {
|
|
48
|
-
constructor(
|
|
49
|
-
super(...
|
|
48
|
+
constructor() {
|
|
49
|
+
super(...arguments);
|
|
50
50
|
this.ref = null;
|
|
51
51
|
|
|
52
52
|
this.handleRef = el => {
|
|
@@ -25,7 +25,11 @@ import { locator } from '@instructure/ui-test-locator';
|
|
|
25
25
|
import { find } from '@instructure/ui-test-queries';
|
|
26
26
|
import { CondensedButton } from './index';
|
|
27
27
|
export const CondensedButtonLocator = locator(CondensedButton.selector, {
|
|
28
|
-
click: async (element
|
|
28
|
+
click: async function (element) {
|
|
29
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
30
|
+
args[_key - 1] = arguments[_key];
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
return (await find(element, 'a,button,[role="button"]')).click(...args);
|
|
30
34
|
}
|
|
31
35
|
});
|
|
@@ -41,8 +41,8 @@ category: components
|
|
|
41
41
|
**/
|
|
42
42
|
// needed for listing the available theme variables on docs page
|
|
43
43
|
let CondensedButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class CondensedButton extends Component {
|
|
44
|
-
constructor(
|
|
45
|
-
super(...
|
|
44
|
+
constructor() {
|
|
45
|
+
super(...arguments);
|
|
46
46
|
this._baseButton = null;
|
|
47
47
|
this.ref = null;
|
|
48
48
|
|
|
@@ -25,7 +25,11 @@ import { locator } from '@instructure/ui-test-locator';
|
|
|
25
25
|
import { find } from '@instructure/ui-test-queries';
|
|
26
26
|
import { IconButton } from './index';
|
|
27
27
|
export const IconButtonLocator = locator(IconButton.selector, {
|
|
28
|
-
click: async (element
|
|
28
|
+
click: async function (element) {
|
|
29
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
30
|
+
args[_key - 1] = arguments[_key];
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
return (await find(element, 'a,button,[role="button"]')).click(...args);
|
|
30
34
|
}
|
|
31
35
|
});
|
package/es/IconButton/index.js
CHANGED
|
@@ -42,8 +42,8 @@ category: components
|
|
|
42
42
|
**/
|
|
43
43
|
// needed for listing the available theme variables on docs page
|
|
44
44
|
let IconButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class IconButton extends Component {
|
|
45
|
-
constructor(
|
|
46
|
-
super(...
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments);
|
|
47
47
|
this._baseButton = null;
|
|
48
48
|
this.ref = null;
|
|
49
49
|
|
|
@@ -27,8 +27,8 @@ import { find, parseQueryArguments } from '@instructure/ui-test-queries'; // esl
|
|
|
27
27
|
import { TooltipLocator } from '@instructure/ui-tooltip/es/Tooltip/TooltipLocator';
|
|
28
28
|
import { ToggleButton } from './index';
|
|
29
29
|
export const ToggleButtonLocator = locator(ToggleButton.selector, {
|
|
30
|
-
findTooltipContent: async (
|
|
31
|
-
const _parseQueryArguments = parseQueryArguments(...
|
|
30
|
+
findTooltipContent: async function () {
|
|
31
|
+
const _parseQueryArguments = parseQueryArguments(...arguments),
|
|
32
32
|
element = _parseQueryArguments.element,
|
|
33
33
|
selector = _parseQueryArguments.selector,
|
|
34
34
|
options = _parseQueryArguments.options;
|
|
@@ -36,7 +36,11 @@ export const ToggleButtonLocator = locator(ToggleButton.selector, {
|
|
|
36
36
|
const tooltip = await TooltipLocator.find(element, options);
|
|
37
37
|
return tooltip ? tooltip.findContent(selector, options) : null;
|
|
38
38
|
},
|
|
39
|
-
click: async (element
|
|
39
|
+
click: async function (element) {
|
|
40
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
41
|
+
args[_key - 1] = arguments[_key];
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
return (await find(element, 'a,button,[role="button"]')).click(...args);
|
|
41
45
|
}
|
|
42
46
|
});
|
|
@@ -35,7 +35,11 @@ var _index = require("./index");
|
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
37
|
const BaseButtonLocator = (0, _locator.locator)(_index.BaseButton.selector, {
|
|
38
|
-
click: async (element
|
|
38
|
+
click: async function (element) {
|
|
39
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
40
|
+
args[_key - 1] = arguments[_key];
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
return (await (0, _uiTestQueries.find)(element, 'a,button,[role="button"]')).click(...args);
|
|
40
44
|
}
|
|
41
45
|
});
|
package/lib/BaseButton/index.js
CHANGED
|
@@ -47,8 +47,8 @@ category: components/utilities
|
|
|
47
47
|
---
|
|
48
48
|
**/
|
|
49
49
|
let BaseButton = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class BaseButton extends _react.Component {
|
|
50
|
-
constructor(
|
|
51
|
-
super(...
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments);
|
|
52
52
|
this.ref = null;
|
|
53
53
|
|
|
54
54
|
this.handleElementRef = el => {
|
package/lib/BaseButton/props.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
package/lib/BaseButton/theme.js
CHANGED
|
@@ -34,27 +34,29 @@ var _darken = require("@instructure/ui-color-utils/lib/darken.js");
|
|
|
34
34
|
*/
|
|
35
35
|
const activeShadow = 'inset 0 0 0.1875rem 0.0625rem';
|
|
36
36
|
|
|
37
|
-
const generateButtonThemeVars =
|
|
38
|
-
style,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
37
|
+
const generateButtonThemeVars = _ref => {
|
|
38
|
+
let style = _ref.style,
|
|
39
|
+
textColor = _ref.textColor,
|
|
40
|
+
ghostTextColor = _ref.ghostTextColor,
|
|
41
|
+
backgroundColor = _ref.backgroundColor,
|
|
42
|
+
borderColor = _ref.borderColor,
|
|
43
|
+
_ref$ghostBorderColor = _ref.ghostBorderColor,
|
|
44
|
+
ghostBorderColor = _ref$ghostBorderColor === void 0 ? borderColor : _ref$ghostBorderColor;
|
|
45
|
+
return {
|
|
46
|
+
[`${style}Color`]: textColor,
|
|
47
|
+
[`${style}BorderColor`]: (0, _darken.darken)(borderColor, 10),
|
|
48
|
+
[`${style}Background`]: backgroundColor,
|
|
49
|
+
[`${style}HoverBackground`]: (0, _darken.darken)(backgroundColor, 10),
|
|
50
|
+
[`${style}ActiveBackground`]: (0, _darken.darken)(backgroundColor, 10),
|
|
51
|
+
[`${style}ActiveBoxShadow`]: `${activeShadow} ${(0, _darken.darken)(borderColor, 20, 0.45)}`,
|
|
52
|
+
[`${style}GhostColor`]: ghostTextColor,
|
|
53
|
+
[`${style}GhostBorderColor`]: ghostBorderColor,
|
|
54
|
+
[`${style}GhostBackground`]: 'transparent',
|
|
55
|
+
[`${style}GhostHoverBackground`]: (0, _alpha.alpha)(ghostTextColor, 10),
|
|
56
|
+
[`${style}GhostActiveBackground`]: 'transparent',
|
|
57
|
+
[`${style}GhostActiveBoxShadow`]: `${activeShadow} ${(0, _alpha.alpha)(ghostBorderColor, 28)}`
|
|
58
|
+
};
|
|
59
|
+
};
|
|
58
60
|
/**
|
|
59
61
|
* Generates the theme object for the component from the theme and provided additional information
|
|
60
62
|
* @param {Object} theme The actual theme object.
|
|
@@ -35,7 +35,11 @@ var _index = require("./index");
|
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
37
|
const ButtonLocator = (0, _locator.locator)(_index.Button.selector, {
|
|
38
|
-
click: async (element
|
|
38
|
+
click: async function (element) {
|
|
39
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
40
|
+
args[_key - 1] = arguments[_key];
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
return (await (0, _uiTestQueries.find)(element, 'a,button,[role="button"]')).click(...args);
|
|
40
44
|
}
|
|
41
45
|
});
|
package/lib/Button/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.default = exports.Button = void 0;
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
|
@@ -38,8 +38,8 @@ category: components
|
|
|
38
38
|
**/
|
|
39
39
|
// needed for listing the available theme variables on docs page
|
|
40
40
|
let Button = (_dec = (0, _emotion.withStyle)(null, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class Button extends _react.Component {
|
|
41
|
-
constructor(
|
|
42
|
-
super(...
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments);
|
|
43
43
|
this._buttonComponent = null;
|
|
44
44
|
this.ref = null;
|
|
45
45
|
|
package/lib/Button/props.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
package/lib/CloseButton/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.default = exports.CloseButton = void 0;
|
|
9
9
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
|
|
@@ -41,8 +41,8 @@ category: components
|
|
|
41
41
|
---
|
|
42
42
|
**/
|
|
43
43
|
let CloseButton = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class CloseButton extends _react.Component {
|
|
44
|
-
constructor(
|
|
45
|
-
super(...
|
|
44
|
+
constructor() {
|
|
45
|
+
super(...arguments);
|
|
46
46
|
this.ref = null;
|
|
47
47
|
|
|
48
48
|
this.handleRef = el => {
|
package/lib/CloseButton/props.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -35,7 +35,11 @@ var _index = require("./index");
|
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
37
|
const CondensedButtonLocator = (0, _locator.locator)(_index.CondensedButton.selector, {
|
|
38
|
-
click: async (element
|
|
38
|
+
click: async function (element) {
|
|
39
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
40
|
+
args[_key - 1] = arguments[_key];
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
return (await (0, _uiTestQueries.find)(element, 'a,button,[role="button"]')).click(...args);
|
|
40
44
|
}
|
|
41
45
|
});
|
|
@@ -7,7 +7,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.default = exports.CondensedButton = void 0;
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
|
@@ -36,8 +36,8 @@ category: components
|
|
|
36
36
|
**/
|
|
37
37
|
// needed for listing the available theme variables on docs page
|
|
38
38
|
let CondensedButton = (_dec = (0, _emotion.withStyle)(null, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class CondensedButton extends _react.Component {
|
|
39
|
-
constructor(
|
|
40
|
-
super(...
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
41
|
this._baseButton = null;
|
|
42
42
|
this.ref = null;
|
|
43
43
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -35,7 +35,11 @@ var _index = require("./index");
|
|
|
35
35
|
* SOFTWARE.
|
|
36
36
|
*/
|
|
37
37
|
const IconButtonLocator = (0, _locator.locator)(_index.IconButton.selector, {
|
|
38
|
-
click: async (element
|
|
38
|
+
click: async function (element) {
|
|
39
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
40
|
+
args[_key - 1] = arguments[_key];
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
return (await (0, _uiTestQueries.find)(element, 'a,button,[role="button"]')).click(...args);
|
|
40
44
|
}
|
|
41
45
|
});
|
package/lib/IconButton/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.default = exports.IconButton = void 0;
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
|
@@ -38,8 +38,8 @@ category: components
|
|
|
38
38
|
**/
|
|
39
39
|
// needed for listing the available theme variables on docs page
|
|
40
40
|
let IconButton = (_dec = (0, _emotion.withStyle)(null, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class IconButton extends _react.Component {
|
|
41
|
-
constructor(
|
|
42
|
-
super(...
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments);
|
|
43
43
|
this._baseButton = null;
|
|
44
44
|
this.ref = null;
|
|
45
45
|
|
package/lib/IconButton/props.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -38,8 +38,8 @@ var _index = require("./index");
|
|
|
38
38
|
*/
|
|
39
39
|
// eslint-disable-next-line no-restricted-imports
|
|
40
40
|
const ToggleButtonLocator = (0, _locator.locator)(_index.ToggleButton.selector, {
|
|
41
|
-
findTooltipContent: async (
|
|
42
|
-
const _parseQueryArguments = (0, _uiTestQueries.parseQueryArguments)(...
|
|
41
|
+
findTooltipContent: async function () {
|
|
42
|
+
const _parseQueryArguments = (0, _uiTestQueries.parseQueryArguments)(...arguments),
|
|
43
43
|
element = _parseQueryArguments.element,
|
|
44
44
|
selector = _parseQueryArguments.selector,
|
|
45
45
|
options = _parseQueryArguments.options;
|
|
@@ -47,7 +47,11 @@ const ToggleButtonLocator = (0, _locator.locator)(_index.ToggleButton.selector,
|
|
|
47
47
|
const tooltip = await _TooltipLocator.TooltipLocator.find(element, options);
|
|
48
48
|
return tooltip ? tooltip.findContent(selector, options) : null;
|
|
49
49
|
},
|
|
50
|
-
click: async (element
|
|
50
|
+
click: async function (element) {
|
|
51
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
52
|
+
args[_key - 1] = arguments[_key];
|
|
53
|
+
}
|
|
54
|
+
|
|
51
55
|
return (await (0, _uiTestQueries.find)(element, 'a,button,[role="button"]')).click(...args);
|
|
52
56
|
}
|
|
53
57
|
});
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-buttons",
|
|
3
|
-
"version": "8.12.1-snapshot.
|
|
3
|
+
"version": "8.12.1-snapshot.51+4d3697334",
|
|
4
4
|
"description": "Accessible button components",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.12.1-snapshot.
|
|
28
|
-
"@instructure/ui-test-locator": "8.12.1-snapshot.
|
|
29
|
-
"@instructure/ui-test-queries": "8.12.1-snapshot.
|
|
30
|
-
"@instructure/ui-test-utils": "8.12.1-snapshot.
|
|
31
|
-
"@instructure/ui-themes": "8.12.1-snapshot.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.12.1-snapshot.51+4d3697334",
|
|
28
|
+
"@instructure/ui-test-locator": "8.12.1-snapshot.51+4d3697334",
|
|
29
|
+
"@instructure/ui-test-queries": "8.12.1-snapshot.51+4d3697334",
|
|
30
|
+
"@instructure/ui-test-utils": "8.12.1-snapshot.51+4d3697334",
|
|
31
|
+
"@instructure/ui-themes": "8.12.1-snapshot.51+4d3697334"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.13.10",
|
|
35
|
-
"@instructure/console": "8.12.1-snapshot.
|
|
36
|
-
"@instructure/emotion": "8.12.1-snapshot.
|
|
37
|
-
"@instructure/shared-types": "8.12.1-snapshot.
|
|
38
|
-
"@instructure/ui-a11y-content": "8.12.1-snapshot.
|
|
39
|
-
"@instructure/ui-a11y-utils": "8.12.1-snapshot.
|
|
40
|
-
"@instructure/ui-color-utils": "8.12.1-snapshot.
|
|
41
|
-
"@instructure/ui-dom-utils": "8.12.1-snapshot.
|
|
42
|
-
"@instructure/ui-icons": "8.12.1-snapshot.
|
|
43
|
-
"@instructure/ui-position": "8.12.1-snapshot.
|
|
44
|
-
"@instructure/ui-react-utils": "8.12.1-snapshot.
|
|
45
|
-
"@instructure/ui-testable": "8.12.1-snapshot.
|
|
46
|
-
"@instructure/ui-tooltip": "8.12.1-snapshot.
|
|
47
|
-
"@instructure/ui-utils": "8.12.1-snapshot.
|
|
48
|
-
"@instructure/ui-view": "8.12.1-snapshot.
|
|
35
|
+
"@instructure/console": "8.12.1-snapshot.51+4d3697334",
|
|
36
|
+
"@instructure/emotion": "8.12.1-snapshot.51+4d3697334",
|
|
37
|
+
"@instructure/shared-types": "8.12.1-snapshot.51+4d3697334",
|
|
38
|
+
"@instructure/ui-a11y-content": "8.12.1-snapshot.51+4d3697334",
|
|
39
|
+
"@instructure/ui-a11y-utils": "8.12.1-snapshot.51+4d3697334",
|
|
40
|
+
"@instructure/ui-color-utils": "8.12.1-snapshot.51+4d3697334",
|
|
41
|
+
"@instructure/ui-dom-utils": "8.12.1-snapshot.51+4d3697334",
|
|
42
|
+
"@instructure/ui-icons": "8.12.1-snapshot.51+4d3697334",
|
|
43
|
+
"@instructure/ui-position": "8.12.1-snapshot.51+4d3697334",
|
|
44
|
+
"@instructure/ui-react-utils": "8.12.1-snapshot.51+4d3697334",
|
|
45
|
+
"@instructure/ui-testable": "8.12.1-snapshot.51+4d3697334",
|
|
46
|
+
"@instructure/ui-tooltip": "8.12.1-snapshot.51+4d3697334",
|
|
47
|
+
"@instructure/ui-utils": "8.12.1-snapshot.51+4d3697334",
|
|
48
|
+
"@instructure/ui-view": "8.12.1-snapshot.51+4d3697334",
|
|
49
49
|
"keycode": "^2",
|
|
50
50
|
"prop-types": "^15"
|
|
51
51
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"sideEffects": false,
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "4d369733414715a70bae0628378e8d82214eab3e"
|
|
60
60
|
}
|