@instructure/ui-color-picker 8.38.2-snapshot-5 → 8.38.2-snapshot-7
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 +1 -1
- package/es/ColorContrast/ColorContrastLocator.js +1 -4
- package/es/ColorIndicator/index.js +2 -2
- package/es/ColorMixer/ColorMixerLocator.js +5 -20
- package/es/ColorMixer/Slider/index.js +2 -2
- package/es/ColorPicker/ColorPickerLocator.js +22 -34
- package/es/ColorPreset/ColorPresetLocator.js +10 -16
- package/lib/ColorContrast/ColorContrastLocator.js +1 -4
- package/lib/ColorIndicator/index.js +2 -2
- package/lib/ColorMixer/ColorMixerLocator.js +5 -20
- package/lib/ColorMixer/Slider/index.js +2 -2
- package/lib/ColorPicker/ColorPickerLocator.js +22 -34
- package/lib/ColorPreset/ColorPresetLocator.js +10 -16
- package/package.json +26 -26
- package/tsconfig.build.tsbuildinfo +1 -1
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
|
-
## [8.38.2-snapshot-
|
|
6
|
+
## [8.38.2-snapshot-7](https://github.com/instructure/instructure-ui/compare/v8.38.1...v8.38.2-snapshot-7) (2023-07-21)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
@@ -33,10 +33,7 @@ import { ColorContrast } from './index';
|
|
|
33
33
|
|
|
34
34
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
35
35
|
export const ColorContrastLocator = locator(ColorContrast.selector, {
|
|
36
|
-
findPreview:
|
|
37
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
38
|
-
args[_key] = arguments[_key];
|
|
39
|
-
}
|
|
36
|
+
findPreview: (...args) => {
|
|
40
37
|
return find('[class$=-colorContrast__colorPreview]', ...args);
|
|
41
38
|
},
|
|
42
39
|
findNormalTextCheckPill: async () => {
|
|
@@ -39,8 +39,8 @@ category: components
|
|
|
39
39
|
@tsProps
|
|
40
40
|
**/
|
|
41
41
|
let ColorIndicator = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class ColorIndicator extends Component {
|
|
42
|
-
constructor() {
|
|
43
|
-
super(...
|
|
42
|
+
constructor(...args) {
|
|
43
|
+
super(...args);
|
|
44
44
|
this.ref = null;
|
|
45
45
|
this.handleRef = el => {
|
|
46
46
|
const elementRef = this.props.elementRef;
|
|
@@ -25,34 +25,19 @@ import { locator } from '@instructure/ui-test-locator';
|
|
|
25
25
|
import { find } from '@instructure/ui-test-utils';
|
|
26
26
|
import { ColorMixer } from './index';
|
|
27
27
|
const customMethos = {
|
|
28
|
-
findTextInput:
|
|
29
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
|
-
args[_key] = arguments[_key];
|
|
31
|
-
}
|
|
28
|
+
findTextInput: (...args) => {
|
|
32
29
|
return find('[id^=TextInput_]', ...args);
|
|
33
30
|
},
|
|
34
|
-
findColorPalette:
|
|
35
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
36
|
-
args[_key2] = arguments[_key2];
|
|
37
|
-
}
|
|
31
|
+
findColorPalette: (...args) => {
|
|
38
32
|
return find('[id^=ColorMixer__Palette]', ...args);
|
|
39
33
|
},
|
|
40
|
-
findColorSlider:
|
|
41
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
42
|
-
args[_key3] = arguments[_key3];
|
|
43
|
-
}
|
|
34
|
+
findColorSlider: (...args) => {
|
|
44
35
|
return find('[aria-label*="color slider"]', ...args);
|
|
45
36
|
},
|
|
46
|
-
findAlphaSlider:
|
|
47
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
48
|
-
args[_key4] = arguments[_key4];
|
|
49
|
-
}
|
|
37
|
+
findAlphaSlider: (...args) => {
|
|
50
38
|
return find('[aria-label*="alpha slider"]', ...args);
|
|
51
39
|
},
|
|
52
|
-
findIndicator:
|
|
53
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
54
|
-
args[_key5] = arguments[_key5];
|
|
55
|
-
}
|
|
40
|
+
findIndicator: (...args) => {
|
|
56
41
|
return find('[clas*=__indicator]', ...args);
|
|
57
42
|
}
|
|
58
43
|
};
|
|
@@ -39,8 +39,8 @@ private: true
|
|
|
39
39
|
@tsProps
|
|
40
40
|
**/
|
|
41
41
|
let Slider = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_class2 = class Slider extends Component {
|
|
42
|
-
constructor() {
|
|
43
|
-
super(...
|
|
42
|
+
constructor(...args) {
|
|
43
|
+
super(...args);
|
|
44
44
|
this.ref = null;
|
|
45
45
|
this._sliderRef = null;
|
|
46
46
|
this._mouseMoveListener = void 0;
|
|
@@ -33,44 +33,35 @@ import { PopoverLocator } from '@instructure/ui-popover/es/Popover/PopoverLocato
|
|
|
33
33
|
import { ColorIndicatorLocator } from '../ColorIndicator/ColorIndicatorLocator';
|
|
34
34
|
import { ColorMixerLocator } from '../ColorMixer/ColorMixerLocator';
|
|
35
35
|
import { ColorPresetLocator } from '../ColorPreset/ColorPresetLocator';
|
|
36
|
-
async function _findColorPreset() {
|
|
37
|
-
const popoverContent = await PopoverLocator.findContent(...
|
|
36
|
+
async function _findColorPreset(...args) {
|
|
37
|
+
const popoverContent = await PopoverLocator.findContent(...args);
|
|
38
38
|
const colorPreset = await ColorPresetLocator.find(popoverContent.getDOMNode());
|
|
39
39
|
return ColorIndicatorLocator.findAll(colorPreset.getDOMNode());
|
|
40
40
|
}
|
|
41
41
|
const customMethods = {
|
|
42
|
-
findTextInput:
|
|
43
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
|
-
args[_key] = arguments[_key];
|
|
45
|
-
}
|
|
42
|
+
findTextInput: (...args) => {
|
|
46
43
|
return find('[id^=TextInput_]', ...args);
|
|
47
44
|
},
|
|
48
|
-
findColorIndicator:
|
|
49
|
-
return ColorIndicatorLocator.find(...
|
|
45
|
+
findColorIndicator: (...args) => {
|
|
46
|
+
return ColorIndicatorLocator.find(...args);
|
|
50
47
|
},
|
|
51
|
-
findInputAfterIcon:
|
|
52
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
53
|
-
args[_key2] = arguments[_key2];
|
|
54
|
-
}
|
|
48
|
+
findInputAfterIcon: (...args) => {
|
|
55
49
|
return find('[class$=-textInput__afterElement]', ...args);
|
|
56
50
|
},
|
|
57
|
-
findFormMessages:
|
|
58
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
59
|
-
args[_key3] = arguments[_key3];
|
|
60
|
-
}
|
|
51
|
+
findFormMessages: (...args) => {
|
|
61
52
|
return findAll('[class$=-formFieldMessage]', ...args);
|
|
62
53
|
},
|
|
63
|
-
findPopoverRoot:
|
|
64
|
-
return PopoverLocator.find(...
|
|
54
|
+
findPopoverRoot: (...args) => {
|
|
55
|
+
return PopoverLocator.find(...args);
|
|
65
56
|
},
|
|
66
|
-
findPopoverTrigger:
|
|
67
|
-
return PopoverLocator.findTrigger(...
|
|
57
|
+
findPopoverTrigger: (...args) => {
|
|
58
|
+
return PopoverLocator.findTrigger(...args);
|
|
68
59
|
},
|
|
69
|
-
findColorMixer:
|
|
70
|
-
return ColorMixerLocator.find(...
|
|
60
|
+
findColorMixer: (...args) => {
|
|
61
|
+
return ColorMixerLocator.find(...args);
|
|
71
62
|
},
|
|
72
|
-
findPopoverContent:
|
|
73
|
-
const _parseQueryArguments = parseQueryArguments(...
|
|
63
|
+
findPopoverContent: (...args) => {
|
|
64
|
+
const _parseQueryArguments = parseQueryArguments(...args),
|
|
74
65
|
element = _parseQueryArguments.element,
|
|
75
66
|
selector = _parseQueryArguments.selector,
|
|
76
67
|
options = _parseQueryArguments.options;
|
|
@@ -82,15 +73,12 @@ const customMethods = {
|
|
|
82
73
|
}
|
|
83
74
|
});
|
|
84
75
|
},
|
|
85
|
-
findRGBAInputs: async
|
|
86
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
87
|
-
args[_key4] = arguments[_key4];
|
|
88
|
-
}
|
|
76
|
+
findRGBAInputs: async (...args) => {
|
|
89
77
|
const rgbaInputs = await findAll('[class$=-RGBAInput__rgbInput]', ...args);
|
|
90
78
|
return Promise.all(rgbaInputs.map(span => span.find('input')));
|
|
91
79
|
},
|
|
92
|
-
findPopoverButtonWithText: async
|
|
93
|
-
let el = await findWithText(...
|
|
80
|
+
findPopoverButtonWithText: async (...args) => {
|
|
81
|
+
let el = await findWithText(...args);
|
|
94
82
|
while (el.getTagName() !== 'button') {
|
|
95
83
|
const parentNode = el.getParentNode();
|
|
96
84
|
if (!parentNode) {
|
|
@@ -100,11 +88,11 @@ const customMethods = {
|
|
|
100
88
|
}
|
|
101
89
|
return el;
|
|
102
90
|
},
|
|
103
|
-
findColorPreset: async
|
|
104
|
-
return _findColorPreset(...
|
|
91
|
+
findColorPreset: async (...args) => {
|
|
92
|
+
return _findColorPreset(...args);
|
|
105
93
|
},
|
|
106
|
-
findColorPresetButtons: async
|
|
107
|
-
const colorPresets = await _findColorPreset(...
|
|
94
|
+
findColorPresetButtons: async (...args) => {
|
|
95
|
+
const colorPresets = await _findColorPreset(...args);
|
|
108
96
|
const colorPresetButtons = [];
|
|
109
97
|
for (let el of colorPresets) {
|
|
110
98
|
while (el.getTagName() !== 'button') {
|
|
@@ -38,33 +38,27 @@ import { ColorPreset } from './index';
|
|
|
38
38
|
|
|
39
39
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
40
40
|
export const ColorPresetLocator = locator(ColorPreset.selector, {
|
|
41
|
-
findAllColorIndicators:
|
|
42
|
-
return ColorIndicatorLocator.findAll(...
|
|
41
|
+
findAllColorIndicators: (...args) => {
|
|
42
|
+
return ColorIndicatorLocator.findAll(...args);
|
|
43
43
|
},
|
|
44
|
-
findAllColorTooltips:
|
|
45
|
-
return TooltipLocator.findAll(...
|
|
44
|
+
findAllColorTooltips: (...args) => {
|
|
45
|
+
return TooltipLocator.findAll(...args);
|
|
46
46
|
},
|
|
47
|
-
findAllColorMenus:
|
|
48
|
-
return DrilldownLocator.findAll(...
|
|
47
|
+
findAllColorMenus: (...args) => {
|
|
48
|
+
return DrilldownLocator.findAll(...args);
|
|
49
49
|
},
|
|
50
|
-
findSelectedIndicator: async
|
|
51
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52
|
-
args[_key] = arguments[_key];
|
|
53
|
-
}
|
|
50
|
+
findSelectedIndicator: async (...args) => {
|
|
54
51
|
const selected = await find('[aria-label="selected"]', ...args);
|
|
55
52
|
if (!selected) {
|
|
56
53
|
return selected;
|
|
57
54
|
}
|
|
58
55
|
return await ColorIndicatorLocator.find(selected.getDOMNode());
|
|
59
56
|
},
|
|
60
|
-
findSelectedIcon:
|
|
61
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
62
|
-
args[_key2] = arguments[_key2];
|
|
63
|
-
}
|
|
57
|
+
findSelectedIcon: (...args) => {
|
|
64
58
|
return find('[class$=-colorPreset__selectedIndicator]', ...args);
|
|
65
59
|
},
|
|
66
|
-
findAddColorPopoverContent:
|
|
67
|
-
return PopoverLocator.findContent(...
|
|
60
|
+
findAddColorPopoverContent: (...args) => {
|
|
61
|
+
return PopoverLocator.findContent(...args);
|
|
68
62
|
},
|
|
69
63
|
getMenuForIndex: async (_element, index) => {
|
|
70
64
|
const component = await ColorPresetLocator.find();
|
|
@@ -39,10 +39,7 @@ var _index = require("./index");
|
|
|
39
39
|
|
|
40
40
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
41
41
|
const ColorContrastLocator = (0, _locator.locator)(_index.ColorContrast.selector, {
|
|
42
|
-
findPreview:
|
|
43
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
|
-
args[_key] = arguments[_key];
|
|
45
|
-
}
|
|
42
|
+
findPreview: (...args) => {
|
|
46
43
|
return (0, _uiTestQueries.find)('[class$=-colorContrast__colorPreview]', ...args);
|
|
47
44
|
},
|
|
48
45
|
findNormalTextCheckPill: async () => {
|
|
@@ -44,8 +44,8 @@ category: components
|
|
|
44
44
|
@tsProps
|
|
45
45
|
**/
|
|
46
46
|
let ColorIndicator = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class ColorIndicator extends _react.Component {
|
|
47
|
-
constructor() {
|
|
48
|
-
super(...
|
|
47
|
+
constructor(...args) {
|
|
48
|
+
super(...args);
|
|
49
49
|
this.ref = null;
|
|
50
50
|
this.handleRef = el => {
|
|
51
51
|
const elementRef = this.props.elementRef;
|
|
@@ -32,34 +32,19 @@ var _index = require("./index");
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
const customMethos = {
|
|
35
|
-
findTextInput:
|
|
36
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
|
-
args[_key] = arguments[_key];
|
|
38
|
-
}
|
|
35
|
+
findTextInput: (...args) => {
|
|
39
36
|
return (0, _uiTestUtils.find)('[id^=TextInput_]', ...args);
|
|
40
37
|
},
|
|
41
|
-
findColorPalette:
|
|
42
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
43
|
-
args[_key2] = arguments[_key2];
|
|
44
|
-
}
|
|
38
|
+
findColorPalette: (...args) => {
|
|
45
39
|
return (0, _uiTestUtils.find)('[id^=ColorMixer__Palette]', ...args);
|
|
46
40
|
},
|
|
47
|
-
findColorSlider:
|
|
48
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
49
|
-
args[_key3] = arguments[_key3];
|
|
50
|
-
}
|
|
41
|
+
findColorSlider: (...args) => {
|
|
51
42
|
return (0, _uiTestUtils.find)('[aria-label*="color slider"]', ...args);
|
|
52
43
|
},
|
|
53
|
-
findAlphaSlider:
|
|
54
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
55
|
-
args[_key4] = arguments[_key4];
|
|
56
|
-
}
|
|
44
|
+
findAlphaSlider: (...args) => {
|
|
57
45
|
return (0, _uiTestUtils.find)('[aria-label*="alpha slider"]', ...args);
|
|
58
46
|
},
|
|
59
|
-
findIndicator:
|
|
60
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
61
|
-
args[_key5] = arguments[_key5];
|
|
62
|
-
}
|
|
47
|
+
findIndicator: (...args) => {
|
|
63
48
|
return (0, _uiTestUtils.find)('[clas*=__indicator]', ...args);
|
|
64
49
|
}
|
|
65
50
|
};
|
|
@@ -45,8 +45,8 @@ private: true
|
|
|
45
45
|
@tsProps
|
|
46
46
|
**/
|
|
47
47
|
let Slider = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_class2 = class Slider extends _react.Component {
|
|
48
|
-
constructor() {
|
|
49
|
-
super(...
|
|
48
|
+
constructor(...args) {
|
|
49
|
+
super(...args);
|
|
50
50
|
this.ref = null;
|
|
51
51
|
this._sliderRef = null;
|
|
52
52
|
this._mouseMoveListener = void 0;
|
|
@@ -37,44 +37,35 @@ var _ColorPresetLocator = require("../ColorPreset/ColorPresetLocator");
|
|
|
37
37
|
|
|
38
38
|
/* eslint-disable no-restricted-imports */ // @ts-expect-error bypass no type definition found error
|
|
39
39
|
/* eslint-enable no-restricted-imports */
|
|
40
|
-
async function _findColorPreset() {
|
|
41
|
-
const popoverContent = await _PopoverLocator.PopoverLocator.findContent(...
|
|
40
|
+
async function _findColorPreset(...args) {
|
|
41
|
+
const popoverContent = await _PopoverLocator.PopoverLocator.findContent(...args);
|
|
42
42
|
const colorPreset = await _ColorPresetLocator.ColorPresetLocator.find(popoverContent.getDOMNode());
|
|
43
43
|
return _ColorIndicatorLocator.ColorIndicatorLocator.findAll(colorPreset.getDOMNode());
|
|
44
44
|
}
|
|
45
45
|
const customMethods = {
|
|
46
|
-
findTextInput:
|
|
47
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
-
args[_key] = arguments[_key];
|
|
49
|
-
}
|
|
46
|
+
findTextInput: (...args) => {
|
|
50
47
|
return (0, _uiTestUtils.find)('[id^=TextInput_]', ...args);
|
|
51
48
|
},
|
|
52
|
-
findColorIndicator:
|
|
53
|
-
return _ColorIndicatorLocator.ColorIndicatorLocator.find(...
|
|
49
|
+
findColorIndicator: (...args) => {
|
|
50
|
+
return _ColorIndicatorLocator.ColorIndicatorLocator.find(...args);
|
|
54
51
|
},
|
|
55
|
-
findInputAfterIcon:
|
|
56
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
57
|
-
args[_key2] = arguments[_key2];
|
|
58
|
-
}
|
|
52
|
+
findInputAfterIcon: (...args) => {
|
|
59
53
|
return (0, _uiTestUtils.find)('[class$=-textInput__afterElement]', ...args);
|
|
60
54
|
},
|
|
61
|
-
findFormMessages:
|
|
62
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
63
|
-
args[_key3] = arguments[_key3];
|
|
64
|
-
}
|
|
55
|
+
findFormMessages: (...args) => {
|
|
65
56
|
return (0, _uiTestUtils.findAll)('[class$=-formFieldMessage]', ...args);
|
|
66
57
|
},
|
|
67
|
-
findPopoverRoot:
|
|
68
|
-
return _PopoverLocator.PopoverLocator.find(...
|
|
58
|
+
findPopoverRoot: (...args) => {
|
|
59
|
+
return _PopoverLocator.PopoverLocator.find(...args);
|
|
69
60
|
},
|
|
70
|
-
findPopoverTrigger:
|
|
71
|
-
return _PopoverLocator.PopoverLocator.findTrigger(...
|
|
61
|
+
findPopoverTrigger: (...args) => {
|
|
62
|
+
return _PopoverLocator.PopoverLocator.findTrigger(...args);
|
|
72
63
|
},
|
|
73
|
-
findColorMixer:
|
|
74
|
-
return _ColorMixerLocator.ColorMixerLocator.find(...
|
|
64
|
+
findColorMixer: (...args) => {
|
|
65
|
+
return _ColorMixerLocator.ColorMixerLocator.find(...args);
|
|
75
66
|
},
|
|
76
|
-
findPopoverContent:
|
|
77
|
-
const _parseQueryArguments = (0, _uiTestUtils.parseQueryArguments)(...
|
|
67
|
+
findPopoverContent: (...args) => {
|
|
68
|
+
const _parseQueryArguments = (0, _uiTestUtils.parseQueryArguments)(...args),
|
|
78
69
|
element = _parseQueryArguments.element,
|
|
79
70
|
selector = _parseQueryArguments.selector,
|
|
80
71
|
options = _parseQueryArguments.options;
|
|
@@ -86,15 +77,12 @@ const customMethods = {
|
|
|
86
77
|
}
|
|
87
78
|
});
|
|
88
79
|
},
|
|
89
|
-
findRGBAInputs: async
|
|
90
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
91
|
-
args[_key4] = arguments[_key4];
|
|
92
|
-
}
|
|
80
|
+
findRGBAInputs: async (...args) => {
|
|
93
81
|
const rgbaInputs = await (0, _uiTestUtils.findAll)('[class$=-RGBAInput__rgbInput]', ...args);
|
|
94
82
|
return Promise.all(rgbaInputs.map(span => span.find('input')));
|
|
95
83
|
},
|
|
96
|
-
findPopoverButtonWithText: async
|
|
97
|
-
let el = await (0, _uiTestUtils.findWithText)(...
|
|
84
|
+
findPopoverButtonWithText: async (...args) => {
|
|
85
|
+
let el = await (0, _uiTestUtils.findWithText)(...args);
|
|
98
86
|
while (el.getTagName() !== 'button') {
|
|
99
87
|
const parentNode = el.getParentNode();
|
|
100
88
|
if (!parentNode) {
|
|
@@ -104,11 +92,11 @@ const customMethods = {
|
|
|
104
92
|
}
|
|
105
93
|
return el;
|
|
106
94
|
},
|
|
107
|
-
findColorPreset: async
|
|
108
|
-
return _findColorPreset(...
|
|
95
|
+
findColorPreset: async (...args) => {
|
|
96
|
+
return _findColorPreset(...args);
|
|
109
97
|
},
|
|
110
|
-
findColorPresetButtons: async
|
|
111
|
-
const colorPresets = await _findColorPreset(...
|
|
98
|
+
findColorPresetButtons: async (...args) => {
|
|
99
|
+
const colorPresets = await _findColorPreset(...args);
|
|
112
100
|
const colorPresetButtons = [];
|
|
113
101
|
for (let el of colorPresets) {
|
|
114
102
|
while (el.getTagName() !== 'button') {
|
|
@@ -46,33 +46,27 @@ var _index = require("./index");
|
|
|
46
46
|
|
|
47
47
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
48
48
|
const ColorPresetLocator = (0, _locator.locator)(_index.ColorPreset.selector, {
|
|
49
|
-
findAllColorIndicators:
|
|
50
|
-
return _ColorIndicatorLocator.ColorIndicatorLocator.findAll(...
|
|
49
|
+
findAllColorIndicators: (...args) => {
|
|
50
|
+
return _ColorIndicatorLocator.ColorIndicatorLocator.findAll(...args);
|
|
51
51
|
},
|
|
52
|
-
findAllColorTooltips:
|
|
53
|
-
return _TooltipLocator.TooltipLocator.findAll(...
|
|
52
|
+
findAllColorTooltips: (...args) => {
|
|
53
|
+
return _TooltipLocator.TooltipLocator.findAll(...args);
|
|
54
54
|
},
|
|
55
|
-
findAllColorMenus:
|
|
56
|
-
return _DrilldownLocator.DrilldownLocator.findAll(...
|
|
55
|
+
findAllColorMenus: (...args) => {
|
|
56
|
+
return _DrilldownLocator.DrilldownLocator.findAll(...args);
|
|
57
57
|
},
|
|
58
|
-
findSelectedIndicator: async
|
|
59
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
60
|
-
args[_key] = arguments[_key];
|
|
61
|
-
}
|
|
58
|
+
findSelectedIndicator: async (...args) => {
|
|
62
59
|
const selected = await (0, _uiTestQueries.find)('[aria-label="selected"]', ...args);
|
|
63
60
|
if (!selected) {
|
|
64
61
|
return selected;
|
|
65
62
|
}
|
|
66
63
|
return await _ColorIndicatorLocator.ColorIndicatorLocator.find(selected.getDOMNode());
|
|
67
64
|
},
|
|
68
|
-
findSelectedIcon:
|
|
69
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
70
|
-
args[_key2] = arguments[_key2];
|
|
71
|
-
}
|
|
65
|
+
findSelectedIcon: (...args) => {
|
|
72
66
|
return (0, _uiTestQueries.find)('[class$=-colorPreset__selectedIndicator]', ...args);
|
|
73
67
|
},
|
|
74
|
-
findAddColorPopoverContent:
|
|
75
|
-
return _PopoverLocator.PopoverLocator.findContent(...
|
|
68
|
+
findAddColorPopoverContent: (...args) => {
|
|
69
|
+
return _PopoverLocator.PopoverLocator.findContent(...args);
|
|
76
70
|
},
|
|
77
71
|
getMenuForIndex: async (_element, index) => {
|
|
78
72
|
const component = await ColorPresetLocator.find();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-color-picker",
|
|
3
|
-
"version": "8.38.2-snapshot-
|
|
3
|
+
"version": "8.38.2-snapshot-7",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,34 +23,34 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "^7.22.
|
|
27
|
-
"@instructure/console": "8.38.2-snapshot-
|
|
28
|
-
"@instructure/emotion": "8.38.2-snapshot-
|
|
29
|
-
"@instructure/shared-types": "8.38.2-snapshot-
|
|
30
|
-
"@instructure/ui-a11y-content": "8.38.2-snapshot-
|
|
31
|
-
"@instructure/ui-buttons": "8.38.2-snapshot-
|
|
32
|
-
"@instructure/ui-color-utils": "8.38.2-snapshot-
|
|
33
|
-
"@instructure/ui-dom-utils": "8.38.2-snapshot-
|
|
34
|
-
"@instructure/ui-drilldown": "8.38.2-snapshot-
|
|
35
|
-
"@instructure/ui-form-field": "8.38.2-snapshot-
|
|
36
|
-
"@instructure/ui-icons": "8.38.2-snapshot-
|
|
37
|
-
"@instructure/ui-pill": "8.38.2-snapshot-
|
|
38
|
-
"@instructure/ui-popover": "8.38.2-snapshot-
|
|
39
|
-
"@instructure/ui-react-utils": "8.38.2-snapshot-
|
|
40
|
-
"@instructure/ui-testable": "8.38.2-snapshot-
|
|
41
|
-
"@instructure/ui-text": "8.38.2-snapshot-
|
|
42
|
-
"@instructure/ui-text-input": "8.38.2-snapshot-
|
|
43
|
-
"@instructure/ui-themes": "8.38.2-snapshot-
|
|
44
|
-
"@instructure/ui-tooltip": "8.38.2-snapshot-
|
|
45
|
-
"@instructure/ui-utils": "8.38.2-snapshot-
|
|
46
|
-
"@instructure/ui-view": "8.38.2-snapshot-
|
|
26
|
+
"@babel/runtime": "^7.22.6",
|
|
27
|
+
"@instructure/console": "8.38.2-snapshot-7",
|
|
28
|
+
"@instructure/emotion": "8.38.2-snapshot-7",
|
|
29
|
+
"@instructure/shared-types": "8.38.2-snapshot-7",
|
|
30
|
+
"@instructure/ui-a11y-content": "8.38.2-snapshot-7",
|
|
31
|
+
"@instructure/ui-buttons": "8.38.2-snapshot-7",
|
|
32
|
+
"@instructure/ui-color-utils": "8.38.2-snapshot-7",
|
|
33
|
+
"@instructure/ui-dom-utils": "8.38.2-snapshot-7",
|
|
34
|
+
"@instructure/ui-drilldown": "8.38.2-snapshot-7",
|
|
35
|
+
"@instructure/ui-form-field": "8.38.2-snapshot-7",
|
|
36
|
+
"@instructure/ui-icons": "8.38.2-snapshot-7",
|
|
37
|
+
"@instructure/ui-pill": "8.38.2-snapshot-7",
|
|
38
|
+
"@instructure/ui-popover": "8.38.2-snapshot-7",
|
|
39
|
+
"@instructure/ui-react-utils": "8.38.2-snapshot-7",
|
|
40
|
+
"@instructure/ui-testable": "8.38.2-snapshot-7",
|
|
41
|
+
"@instructure/ui-text": "8.38.2-snapshot-7",
|
|
42
|
+
"@instructure/ui-text-input": "8.38.2-snapshot-7",
|
|
43
|
+
"@instructure/ui-themes": "8.38.2-snapshot-7",
|
|
44
|
+
"@instructure/ui-tooltip": "8.38.2-snapshot-7",
|
|
45
|
+
"@instructure/ui-utils": "8.38.2-snapshot-7",
|
|
46
|
+
"@instructure/ui-view": "8.38.2-snapshot-7",
|
|
47
47
|
"prop-types": "^15.8.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@instructure/ui-babel-preset": "8.38.2-snapshot-
|
|
51
|
-
"@instructure/ui-test-locator": "8.38.2-snapshot-
|
|
52
|
-
"@instructure/ui-test-queries": "8.38.2-snapshot-
|
|
53
|
-
"@instructure/ui-test-utils": "8.38.2-snapshot-
|
|
50
|
+
"@instructure/ui-babel-preset": "8.38.2-snapshot-7",
|
|
51
|
+
"@instructure/ui-test-locator": "8.38.2-snapshot-7",
|
|
52
|
+
"@instructure/ui-test-queries": "8.38.2-snapshot-7",
|
|
53
|
+
"@instructure/ui-test-utils": "8.38.2-snapshot-7"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"react": ">=16.8 <=18"
|