@pingux/astro 2.32.0-alpha.12 → 2.32.0-alpha.14
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/lib/cjs/components/ImageUploadField/ImageUploadField.test.js +47 -14
- package/lib/cjs/components/TreeView/TreeView.js +99 -11
- package/lib/cjs/components/TreeView/TreeView.stories.js +23 -10
- package/lib/cjs/components/TreeView/TreeView.styles.js +22 -2
- package/lib/cjs/components/TreeView/TreeView.test.js +91 -11
- package/lib/cjs/components/TreeView/TreeViewItem.js +112 -14
- package/lib/cjs/components/TreeView/TreeViewKeyboardDelegate.js +200 -0
- package/lib/cjs/components/TreeView/TreeViewKeyboardDelegate.test.js +511 -0
- package/lib/cjs/components/TreeView/TreeViewRow.js +20 -5
- package/lib/cjs/components/TreeView/TreeViewSection.js +164 -16
- package/lib/cjs/components/TreeView/TreeViewWrapper.js +40 -0
- package/lib/cjs/hooks/useImageUploadState/index.d.ts +1 -0
- package/lib/cjs/hooks/useImageUploadState/useImageUploadState.d.ts +28 -0
- package/lib/cjs/hooks/useImageUploadState/useImageUploadState.js +9 -6
- package/lib/cjs/hooks/useModalState/index.d.ts +1 -0
- package/lib/cjs/hooks/useModalState/useModalState.d.ts +21 -0
- package/lib/cjs/hooks/useModalState/useModalState.js +0 -9
- package/lib/cjs/hooks/useModalState/useModalState.test.d.ts +1 -0
- package/lib/cjs/hooks/useMountTransition/index.d.ts +1 -0
- package/lib/cjs/hooks/useMountTransition/useMountTransition.d.ts +14 -0
- package/lib/cjs/hooks/useMountTransition/useMountTransition.js +0 -9
- package/lib/cjs/hooks/useMountTransition/useMountTransition.test.d.ts +1 -0
- package/lib/cjs/hooks/useMountTransition/useMountTransition.test.js +2 -2
- package/lib/cjs/utils/testUtils/setupTests.d.ts +4 -0
- package/lib/cjs/utils/testUtils/testAxe.d.ts +2 -0
- package/lib/cjs/utils/testUtils/testTheme.d.ts +21 -0
- package/lib/cjs/utils/testUtils/testWrapper.d.ts +5 -0
- package/lib/cjs/utils/testUtils/testWrapper.js +3 -2
- package/lib/components/ImageUploadField/ImageUploadField.test.js +47 -14
- package/lib/components/TreeView/TreeView.js +100 -12
- package/lib/components/TreeView/TreeView.stories.js +23 -10
- package/lib/components/TreeView/TreeView.styles.js +22 -2
- package/lib/components/TreeView/TreeView.test.js +92 -12
- package/lib/components/TreeView/TreeViewItem.js +111 -14
- package/lib/components/TreeView/TreeViewKeyboardDelegate.js +176 -0
- package/lib/components/TreeView/TreeViewKeyboardDelegate.test.js +496 -0
- package/lib/components/TreeView/TreeViewRow.js +20 -5
- package/lib/components/TreeView/TreeViewSection.js +161 -16
- package/lib/components/TreeView/TreeViewWrapper.js +31 -0
- package/lib/hooks/useImageUploadState/useImageUploadState.js +9 -6
- package/lib/hooks/useModalState/useModalState.js +0 -10
- package/lib/hooks/useMountTransition/useMountTransition.js +0 -10
- package/lib/hooks/useMountTransition/useMountTransition.test.js +2 -2
- package/lib/utils/testUtils/testWrapper.js +3 -2
- package/package.json +1 -1
@@ -1,19 +1,105 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
+
import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
|
3
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
4
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
2
5
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
3
6
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
4
|
-
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
7
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';
|
8
|
+
import { useFocusRing } from '@react-aria/focus';
|
5
9
|
import { useOption } from '@react-aria/listbox';
|
10
|
+
import { mergeProps } from '@react-aria/utils';
|
6
11
|
import PropTypes from 'prop-types';
|
7
12
|
import { useTreeViewContext } from '../../context/TreeViewContext';
|
13
|
+
import { useStatusClasses } from '../../hooks';
|
8
14
|
import { Box, TreeViewItem } from '../../index';
|
9
15
|
import { SectionOrItemRender } from './TreeView';
|
16
|
+
import { sectionPressHandlers } from './TreeViewKeyboardDelegate';
|
10
17
|
import TreeViewRow from './TreeViewRow';
|
11
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
19
|
+
export var onKeyDownSection = function onKeyDownSection(e, state, key, tree, isSelected, isExpanded, focusManager, flatKeyArray, refArray, pageLength, isFocused) {
|
20
|
+
switch (e.which) {
|
21
|
+
case 9:
|
22
|
+
if (isFocused) {
|
23
|
+
sectionPressHandlers.onTabPress(e, refArray, focusManager, true, key);
|
24
|
+
}
|
25
|
+
break;
|
26
|
+
case 13:
|
27
|
+
sectionPressHandlers.onEnterPress(e, state, key);
|
28
|
+
break;
|
29
|
+
case 32:
|
30
|
+
sectionPressHandlers.onSpacePress(e, tree, key, isSelected);
|
31
|
+
break;
|
32
|
+
case 33:
|
33
|
+
sectionPressHandlers.onPageUpPress(e, key, flatKeyArray, refArray, pageLength);
|
34
|
+
break;
|
35
|
+
case 34:
|
36
|
+
sectionPressHandlers.onPageDownPress(e, key, flatKeyArray, refArray, pageLength);
|
37
|
+
break;
|
38
|
+
case 36:
|
39
|
+
sectionPressHandlers.onHomePress(key, flatKeyArray, refArray);
|
40
|
+
e.preventDefault();
|
41
|
+
e.stopPropagation();
|
42
|
+
break;
|
43
|
+
case 35:
|
44
|
+
sectionPressHandlers.onEndPress(key, flatKeyArray, refArray);
|
45
|
+
e.preventDefault();
|
46
|
+
e.stopPropagation();
|
47
|
+
break;
|
48
|
+
case 37:
|
49
|
+
sectionPressHandlers.onLeftPress(e, focusManager, state, key, isExpanded, refArray);
|
50
|
+
break;
|
51
|
+
case 38:
|
52
|
+
sectionPressHandlers.onUpPress(e, key, refArray, flatKeyArray);
|
53
|
+
e.preventDefault();
|
54
|
+
e.stopPropagation();
|
55
|
+
break;
|
56
|
+
case 39:
|
57
|
+
if (isFocused) {
|
58
|
+
sectionPressHandlers.onRightPress(e, focusManager, state, key, isExpanded, refArray);
|
59
|
+
}
|
60
|
+
break;
|
61
|
+
case 40:
|
62
|
+
sectionPressHandlers.onDownPress(e, key, refArray, flatKeyArray);
|
63
|
+
e.preventDefault();
|
64
|
+
e.stopPropagation();
|
65
|
+
break;
|
66
|
+
default:
|
67
|
+
/* istanbul ignore next */
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
};
|
71
|
+
export var removeRefFromArrayHelper = function removeRefFromArrayHelper(prevState, keyToRemove) {
|
72
|
+
if (_someInstanceProperty(prevState).call(prevState, function (item) {
|
73
|
+
return item.key === keyToRemove;
|
74
|
+
})) {
|
75
|
+
var _context;
|
76
|
+
var newArray = _concatInstanceProperty(_context = []).call(_context, _filterInstanceProperty(prevState).call(prevState, function (_item) {
|
77
|
+
return _item.key !== keyToRemove;
|
78
|
+
}));
|
79
|
+
return newArray;
|
80
|
+
}
|
81
|
+
return prevState;
|
82
|
+
};
|
83
|
+
export var addRefToArrayHelper = function addRefToArrayHelper(prevState, keyToAdd, refToAdd) {
|
84
|
+
if (!_someInstanceProperty(prevState).call(prevState, function (i) {
|
85
|
+
return i.key === keyToAdd;
|
86
|
+
})) {
|
87
|
+
var _context2;
|
88
|
+
var thisObj = {
|
89
|
+
key: keyToAdd,
|
90
|
+
thisRef: refToAdd
|
91
|
+
};
|
92
|
+
return _concatInstanceProperty(_context2 = []).call(_context2, prevState, [thisObj]);
|
93
|
+
}
|
94
|
+
return prevState;
|
95
|
+
};
|
12
96
|
var TreeViewSection = /*#__PURE__*/forwardRef(function (props, ref) {
|
13
|
-
var
|
97
|
+
var _context3;
|
14
98
|
var item = props.item,
|
15
99
|
items = props.items,
|
16
100
|
title = props.title,
|
101
|
+
focusManager = props.focusManager,
|
102
|
+
onKeyDown = props.onKeyDown,
|
17
103
|
level = props.level,
|
18
104
|
position = props.position,
|
19
105
|
setSize = props.setSize;
|
@@ -24,51 +110,107 @@ var TreeViewSection = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
24
110
|
return treeSectionRef.current;
|
25
111
|
});
|
26
112
|
var _useTreeViewContext = useTreeViewContext(),
|
27
|
-
state = _useTreeViewContext.state
|
113
|
+
state = _useTreeViewContext.state,
|
114
|
+
tree = _useTreeViewContext.tree,
|
115
|
+
refArray = _useTreeViewContext.refArray,
|
116
|
+
setRefs = _useTreeViewContext.setRefs,
|
117
|
+
flatKeyArray = _useTreeViewContext.flatKeyArray,
|
118
|
+
pageLength = _useTreeViewContext.pageLength,
|
119
|
+
setLastFocusedItem = _useTreeViewContext.setLastFocusedItem,
|
120
|
+
lastFocusedItem = _useTreeViewContext.lastFocusedItem;
|
28
121
|
var _useOption = useOption({
|
29
122
|
key: key
|
30
123
|
}, state, treeSectionRef),
|
31
124
|
optionProps = _useOption.optionProps,
|
32
125
|
isDisabled = _useOption.isDisabled,
|
33
126
|
isSelected = _useOption.isSelected;
|
127
|
+
var _useFocusRing = useFocusRing(),
|
128
|
+
focusProps = _useFocusRing.focusProps,
|
129
|
+
isFocused = _useFocusRing.isFocused;
|
130
|
+
var _useFocusRing2 = useFocusRing({
|
131
|
+
within: true
|
132
|
+
}),
|
133
|
+
focusPropsWithin = _useFocusRing2.focusProps,
|
134
|
+
isFocusedWithin = _useFocusRing2.isFocused;
|
34
135
|
var isExpanded = state.expandedKeys.has(key);
|
136
|
+
var onKeyDownFunction = function onKeyDownFunction(e) {
|
137
|
+
onKeyDownSection(e, state, key, tree, isSelected, isExpanded, focusManager, flatKeyArray, refArray, pageLength, isFocused);
|
138
|
+
if (onKeyDown) {
|
139
|
+
onKeyDown(e, key);
|
140
|
+
}
|
141
|
+
};
|
142
|
+
var addRefToArray = function addRefToArray(thisKey, thisRef) {
|
143
|
+
setRefs(function (prev) {
|
144
|
+
return addRefToArrayHelper(prev, thisKey, thisRef);
|
145
|
+
});
|
146
|
+
};
|
147
|
+
var removeRefFromArray = function removeRefFromArray() {
|
148
|
+
setRefs(function (prev) {
|
149
|
+
return removeRefFromArrayHelper(prev, key);
|
150
|
+
});
|
151
|
+
};
|
152
|
+
|
153
|
+
// adds and removes refs on mount and dismount
|
154
|
+
useEffect(function () {
|
155
|
+
// this runs on mount
|
156
|
+
addRefToArray(key, treeSectionRef);
|
157
|
+
return function () {
|
158
|
+
// this runs on cleanup
|
159
|
+
removeRefFromArray(key, refArray);
|
160
|
+
};
|
161
|
+
}, []);
|
162
|
+
var mergedProps = mergeProps(focusPropsWithin, focusProps, optionProps, {
|
163
|
+
onFocus: function onFocus() {
|
164
|
+
return setLastFocusedItem(key);
|
165
|
+
}
|
166
|
+
});
|
167
|
+
var _useStatusClasses = useStatusClasses('', {
|
168
|
+
isFocused: isFocused
|
169
|
+
}),
|
170
|
+
classNames = _useStatusClasses.classNames;
|
35
171
|
return ___EmotionJSX(Box, _extends({
|
36
172
|
ref: treeSectionRef,
|
37
173
|
as: "li",
|
38
|
-
sx: {
|
39
|
-
':not(:last-child)': {
|
40
|
-
pb: 'sm'
|
41
|
-
}
|
42
|
-
},
|
43
174
|
"aria-expanded": isExpanded,
|
44
|
-
"aria-disabled": isDisabled
|
175
|
+
"aria-disabled": isDisabled
|
176
|
+
}, mergedProps, {
|
177
|
+
role: "treeitem",
|
178
|
+
variant: "treeView.wrapper",
|
179
|
+
className: classNames,
|
180
|
+
"aria-selected": isSelected,
|
45
181
|
"aria-level": level,
|
46
182
|
"aria-setsize": setSize,
|
47
|
-
"aria-posinset": position + 1
|
48
|
-
|
49
|
-
|
50
|
-
|
183
|
+
"aria-posinset": position + 1,
|
184
|
+
onKeyDown: function onKeyDown(e) {
|
185
|
+
return onKeyDownFunction(e);
|
186
|
+
},
|
187
|
+
tabIndex: lastFocusedItem === key ? 0 : -1
|
51
188
|
}), ___EmotionJSX(TreeViewRow, {
|
52
189
|
item: item,
|
53
190
|
title: title,
|
54
191
|
items: items,
|
55
192
|
isExpanded: isExpanded,
|
56
193
|
isSelected: isSelected,
|
57
|
-
isDisabled: isDisabled
|
194
|
+
isDisabled: isDisabled,
|
195
|
+
isParentFocused: isFocusedWithin
|
58
196
|
}), isExpanded && ___EmotionJSX(Box, {
|
59
197
|
as: "ul",
|
60
198
|
role: "group",
|
61
199
|
key: "".concat(item.key, " ul"),
|
62
200
|
sx: {
|
63
|
-
pl: 'md'
|
201
|
+
pl: 'md',
|
202
|
+
'& :focus': {
|
203
|
+
border: 'none'
|
204
|
+
}
|
64
205
|
}
|
65
|
-
}, _mapInstanceProperty(
|
206
|
+
}, _mapInstanceProperty(_context3 = _Array$from(items)).call(_context3, function (_item, _index) {
|
66
207
|
var _item$value$items;
|
67
208
|
return SectionOrItemRender(((_item$value$items = _item.value.items) === null || _item$value$items === void 0 ? void 0 : _item$value$items.length) > 0, ___EmotionJSX(TreeViewSection, {
|
68
209
|
item: _item,
|
69
210
|
items: _item.children,
|
70
211
|
title: _item.value.title,
|
71
212
|
key: _item.value.title,
|
213
|
+
focusManager: focusManager,
|
72
214
|
level: level + 1,
|
73
215
|
position: _index,
|
74
216
|
setSize: items.length
|
@@ -76,6 +218,7 @@ var TreeViewSection = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
76
218
|
item: _item,
|
77
219
|
title: _item.value.title,
|
78
220
|
key: _item.value.title,
|
221
|
+
focusManager: focusManager,
|
79
222
|
level: level + 1,
|
80
223
|
position: _index,
|
81
224
|
setSize: items.length
|
@@ -88,6 +231,8 @@ TreeViewSection.propTypes = {
|
|
88
231
|
key: PropTypes.string
|
89
232
|
}),
|
90
233
|
title: PropTypes.string,
|
234
|
+
focusManager: PropTypes.shape({}),
|
235
|
+
onKeyDown: PropTypes.func,
|
91
236
|
level: PropTypes.number,
|
92
237
|
position: PropTypes.number,
|
93
238
|
setSize: PropTypes.number
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
2
|
+
import React from 'react';
|
3
|
+
import { FocusScope, useFocusManager } from '@react-aria/focus';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
var TreeViewWrapper = function TreeViewWrapper(props) {
|
6
|
+
var children = props.children;
|
7
|
+
var items = _mapInstanceProperty(children).call(children, function (child) {
|
8
|
+
return {
|
9
|
+
item: child,
|
10
|
+
key: child.key
|
11
|
+
};
|
12
|
+
});
|
13
|
+
return ___EmotionJSX(FocusScope, {
|
14
|
+
restoreFocus: false,
|
15
|
+
contain: false
|
16
|
+
}, _mapInstanceProperty(items).call(items, function (_ref) {
|
17
|
+
var item = _ref.item,
|
18
|
+
key = _ref.key;
|
19
|
+
return ___EmotionJSX(FocusableItem, {
|
20
|
+
key: key
|
21
|
+
}, item);
|
22
|
+
}));
|
23
|
+
};
|
24
|
+
var FocusableItem = function FocusableItem(props) {
|
25
|
+
var focusManager = useFocusManager();
|
26
|
+
var childWithFocusHandle = /*#__PURE__*/React.cloneElement(props.children, {
|
27
|
+
focusManager: focusManager
|
28
|
+
});
|
29
|
+
return childWithFocusHandle;
|
30
|
+
};
|
31
|
+
export default TreeViewWrapper;
|
@@ -35,11 +35,15 @@ var useImageUploadState = function useImageUploadState(inputRef) {
|
|
35
35
|
if (previewImage && previewImage !== defaultPreviewImage) {
|
36
36
|
setIsMenuOpen(true);
|
37
37
|
} else {
|
38
|
-
|
38
|
+
var _inputRef$current;
|
39
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click();
|
39
40
|
}
|
40
41
|
}, [defaultPreviewImage, previewImage, inputRef]);
|
41
42
|
var handleInputChange = useCallback(function (event) {
|
42
43
|
var _event$target;
|
44
|
+
if (!event.target.files) {
|
45
|
+
return;
|
46
|
+
}
|
43
47
|
var eventFileType = (_event$target = event.target) === null || _event$target === void 0 || (_event$target = _event$target.files[0]) === null || _event$target === void 0 || (_event$target = _event$target.type) === null || _event$target === void 0 ? void 0 : _event$target.split('/')[0];
|
44
48
|
if (fileTypes !== null && fileTypes !== void 0 && _includesInstanceProperty(fileTypes).call(fileTypes, eventFileType)) {
|
45
49
|
if (onChange && typeof onChange === 'function') {
|
@@ -52,9 +56,8 @@ var useImageUploadState = function useImageUploadState(inputRef) {
|
|
52
56
|
var _event$target2;
|
53
57
|
setIsImageType(true);
|
54
58
|
var reader = new FileReader();
|
55
|
-
reader.onload = function (
|
56
|
-
|
57
|
-
setPreviewImage(result);
|
59
|
+
reader.onload = function () {
|
60
|
+
setPreviewImage(reader.result);
|
58
61
|
};
|
59
62
|
reader.readAsDataURL((_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.files[0]);
|
60
63
|
} else {
|
@@ -76,8 +79,8 @@ var useImageUploadState = function useImageUploadState(inputRef) {
|
|
76
79
|
return setPreviewImage(defaultPreviewImage);
|
77
80
|
}, [defaultPreviewImage]);
|
78
81
|
var showFileDialog = useCallback(function () {
|
79
|
-
var _inputRef$
|
80
|
-
return inputRef === null || inputRef === void 0 || (_inputRef$
|
82
|
+
var _inputRef$current2;
|
83
|
+
return inputRef === null || inputRef === void 0 || (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.click();
|
81
84
|
}, [inputRef]);
|
82
85
|
var handleLabelClick = useCallback(function (e) {
|
83
86
|
e.preventDefault();
|
@@ -1,14 +1,4 @@
|
|
1
1
|
import { useOverlayTriggerState } from 'react-stately';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Returns state-related data and functions for use with a Modal component.
|
5
|
-
* @param {Object} [props] Properties provided to the state
|
6
|
-
* @param {Boolean} [props.isDefaultOpen] Whether the modal is open by default (uncontrolled).
|
7
|
-
* @param {Boolean} [props.isOpen] Whether the modal is currently open (controlled).
|
8
|
-
* @param {Function} [props.onOpenChange] Handler that is called when the open state changes.
|
9
|
-
* `(isOpen: boolean) => void`
|
10
|
-
* @returns {Object} `{ isOpen: Boolean, open: Function, close: Function, toggle: Function }`
|
11
|
-
*/
|
12
2
|
var useModalState = function useModalState() {
|
13
3
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
14
4
|
var isDefaultOpen = props.isDefaultOpen,
|
@@ -1,16 +1,6 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
2
|
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
3
3
|
import { useEffect, useState } from 'react';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Allows for css transitions to be applied to components, while mounting or unmounting.
|
7
|
-
* @param {Object} [props] Properties provided to the state
|
8
|
-
* @param {Boolean} [props.isMounted] Whether the component has been mounted.
|
9
|
-
* @param {Number} [props.unmountDelay] Number value of the length of the transition in ms.
|
10
|
-
* `(isOpen: boolean) => void`
|
11
|
-
* @returns {Boolean} `isTransitioning`
|
12
|
-
*/
|
13
|
-
|
14
4
|
var useMountTransition = function useMountTransition(isMounted, unmountDelay) {
|
15
5
|
var _useState = useState(false),
|
16
6
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -23,7 +23,7 @@ var ControlledWithTransition = function ControlledWithTransition() {
|
|
23
23
|
var _useOverlayPanelState = useOverlayPanelState(),
|
24
24
|
state = _useOverlayPanelState.state,
|
25
25
|
onClose = _useOverlayPanelState.onClose;
|
26
|
-
var triggerRef = useRef();
|
26
|
+
var triggerRef = useRef(null);
|
27
27
|
return (
|
28
28
|
// Application must be wrapped in an OverlayProvider so that it can be hidden from screen
|
29
29
|
// readers when an overlay is open.
|
@@ -42,7 +42,7 @@ var ControlledWithTransition = function ControlledWithTransition() {
|
|
42
42
|
},
|
43
43
|
"aria-expanded": state.isOpen
|
44
44
|
}, defaultCloseButtonProps), "Close Panel"), ___EmotionJSX("p", {
|
45
|
-
|
45
|
+
"padding-top": "md"
|
46
46
|
}, _JSON$stringify(state.isOpen)))))
|
47
47
|
);
|
48
48
|
};
|
@@ -22,7 +22,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
22
22
|
} : {
|
23
23
|
name: "zxbwtf-GlobalTestStyles",
|
24
24
|
styles: ".is-disabled{opacity:0.5;pointer-events:none;};label:GlobalTestStyles;",
|
25
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
25
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy90ZXN0VXRpbHMvdGVzdFdyYXBwZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVVTIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy91dGlscy90ZXN0VXRpbHMvdGVzdFdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGNzcywgR2xvYmFsIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVuZGVyLCBSZW5kZXJPcHRpb25zIH0gZnJvbSAnQHRlc3RpbmctbGlicmFyeS9yZWFjdCc7XG5pbXBvcnQgeyBUaGVtZVByb3ZpZGVyIH0gZnJvbSAndGhlbWUtdWknO1xuXG5pbXBvcnQgdGhlbWUgZnJvbSAnLi4vLi4vc3R5bGVzL3RoZW1lJztcblxuY29uc3QgR2xvYmFsVGVzdFN0eWxlczogUmVhY3QuRkMgPSAoKSA9PiAoXG4gIDxHbG9iYWxcbiAgICBzdHlsZXM9e1xuICAgICAgY3NzYFxuICAgICAgICAuaXMtZGlzYWJsZWQge1xuICAgICAgICAgIG9wYWNpdHk6IDAuNTtcbiAgICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICAgICAgfVxuICAgICAgYFxuICAgIH1cbiAgLz5cbik7XG5cbi8qKlxuICogVE9ETzogQ2hhbmdlIEplc3QgY29uZmlnIHNvIHRoaXMgZG9lc24ndCBoYXZlIHRvIGJlIGltcG9ydGVkIHJlbGF0aXZlbHkuLi5cbiAqIGh0dHBzOi8vdGVzdGluZy1saWJyYXJ5LmNvbS9kb2NzL3JlYWN0LXRlc3RpbmctbGlicmFyeS9zZXR1cC8jY29uZmlndXJpbmctamVzdC13aXRoLXRlc3QtdXRpbHNcbiAqXG4gKiBVc2UgdGhpcyB3cmFwcGVyIHdoZW4gdGVzdGluZyB0aGUgdGhlbWUgb3V0cHV0IGZvclxuICogYSBjb21wb25lbnQgdXNpbmcgLnRvSGF2ZVN0eWxlIG9yIC50b0hhdmVTdHlsZVJ1bGVcbiAqXG4gKiBTZWUgQnV0dG9uLnRlc3QuanMgYXMgYW4gZXhhbXBsZSBmb3IgaG93IHRvIGFwcGx5IGNvbmRpdGlvbmFsIGNsYXNzZXMgYW5kIHRoZW4gdGVzdGluZyB0aGF0XG4gKiB0aG9zZSBjbGFzc2VzIGhhdmUgdGhlIGFwcHJvcHJpYXRlIHN0eWxlcyB0aWVkIHRvIHRoZW0gaW4gdGhlIHRoZW1lLlxuICovXG5cbmludGVyZmFjZSBXcmFwcGVyUHJvcHMge1xuICBjaGlsZHJlbjogUmVhY3ROb2RlO1xufVxuXG5jb25zdCBXcmFwcGVyOiBSZWFjdC5GQzxXcmFwcGVyUHJvcHM+ID0gKHsgY2hpbGRyZW4gfSkgPT4gKFxuICA8VGhlbWVQcm92aWRlciB0aGVtZT17dGhlbWV9PlxuICAgIDxHbG9iYWxUZXN0U3R5bGVzIC8+XG4gICAge2NoaWxkcmVufVxuICA8L1RoZW1lUHJvdmlkZXI+XG4pO1xuXG5jb25zdCBjdXN0b21SZW5kZXIgPSAodWk6IFJlYWN0LlJlYWN0RWxlbWVudCwgb3B0aW9ucz86IFJlbmRlck9wdGlvbnMpID0+IHJlbmRlcih1aSxcbiAgeyB3cmFwcGVyOiBXcmFwcGVyIGFzIFJlYWN0LkZDLCAuLi5vcHRpb25zIH0sXG4pO1xuXG4vLyByZS1leHBvcnQgZXZlcnl0aGluZyAtXG5leHBvcnQgKiBmcm9tICdAdGVzdGluZy1saWJyYXJ5L3JlYWN0JztcblxuLy8gb3ZlcnJpZGUgcmVuZGVyIG1ldGhvZFxuZXhwb3J0IHsgY3VzdG9tUmVuZGVyIGFzIHJlbmRlciB9O1xuIl19 */",
|
26
26
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
27
27
|
};
|
28
28
|
var GlobalTestStyles = function GlobalTestStyles() {
|
@@ -41,6 +41,7 @@ var GlobalTestStyles = function GlobalTestStyles() {
|
|
41
41
|
* See Button.test.js as an example for how to apply conditional classes and then testing that
|
42
42
|
* those classes have the appropriate styles tied to them in the theme.
|
43
43
|
*/
|
44
|
+
|
44
45
|
var Wrapper = function Wrapper(_ref2) {
|
45
46
|
var children = _ref2.children;
|
46
47
|
return ___EmotionJSX(ThemeProvider, {
|
@@ -53,7 +54,7 @@ var customRender = function customRender(ui, options) {
|
|
53
54
|
}, options));
|
54
55
|
};
|
55
56
|
|
56
|
-
// re-export everything
|
57
|
+
// re-export everything -
|
57
58
|
export * from '@testing-library/react';
|
58
59
|
|
59
60
|
// override render method
|