@pingux/astro 1.1.0-alpha.1 → 1.1.0-alpha.10
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 +99 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +24 -0
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
- package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +33 -1
- package/lib/cjs/components/AccordionItem/AccordionItem.js +5 -4
- package/lib/cjs/components/Button/Button.js +1 -2
- package/lib/cjs/components/Button/Button.stories.js +2 -1
- package/lib/cjs/components/Button/Button.test.js +2 -1
- package/lib/cjs/components/ColorField/ColorField.js +1 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +7 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +25 -1
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +44 -0
- package/lib/cjs/components/FileInputField/FileItem.js +2 -1
- package/lib/cjs/components/IconButton/IconButton.js +1 -1
- package/lib/cjs/components/IconButton/IconButton.stories.js +8 -17
- package/lib/cjs/components/IconButton/IconButton.test.js +4 -5
- package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +2 -1
- package/lib/cjs/components/List/List.js +3 -0
- package/lib/cjs/components/List/List.stories.js +7 -2
- package/lib/cjs/components/ListBox/ListBox.js +3 -6
- package/lib/cjs/components/ListBox/ListBox.test.js +2 -0
- package/lib/cjs/components/ListBox/Option.js +6 -0
- package/lib/cjs/components/Messages/Message.js +2 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +2 -1
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +15 -14
- package/lib/cjs/components/PopoverContainer/PopoverContainer.test.js +15 -0
- package/lib/cjs/components/TextArea/TextArea.js +5 -1
- package/lib/cjs/styles/variants/accordion.js +2 -2
- package/lib/cjs/styles/variants/buttons.js +10 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +23 -1
- package/lib/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
- package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
- package/lib/components/AccordionGroup/AccordionGroup.test.js +30 -1
- package/lib/components/AccordionItem/AccordionItem.js +6 -5
- package/lib/components/Button/Button.js +2 -3
- package/lib/components/Button/Button.stories.js +2 -1
- package/lib/components/Button/Button.test.js +2 -1
- package/lib/components/ColorField/ColorField.js +1 -0
- package/lib/components/ComboBoxField/ComboBoxField.js +7 -0
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +21 -0
- package/lib/components/ComboBoxField/ComboBoxField.test.js +35 -0
- package/lib/components/FileInputField/FileItem.js +2 -1
- package/lib/components/IconButton/IconButton.js +1 -1
- package/lib/components/IconButton/IconButton.stories.js +7 -13
- package/lib/components/IconButton/IconButton.test.js +4 -5
- package/lib/components/ImageUploadField/ImagePreviewButton.js +2 -1
- package/lib/components/List/List.js +2 -0
- package/lib/components/List/List.stories.js +6 -2
- package/lib/components/ListBox/ListBox.js +3 -5
- package/lib/components/ListBox/ListBox.test.js +2 -0
- package/lib/components/ListBox/Option.js +6 -0
- package/lib/components/Messages/Message.js +2 -2
- package/lib/components/MultivaluesField/MultivaluesField.js +2 -1
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +7 -5
- package/lib/components/PopoverContainer/PopoverContainer.test.js +16 -1
- package/lib/components/TextArea/TextArea.js +5 -1
- package/lib/styles/variants/accordion.js +2 -2
- package/lib/styles/variants/buttons.js +10 -0
- package/package.json +1 -1
@@ -29,11 +29,13 @@ var itemsWithSections = [{
|
|
29
29
|
}];
|
30
30
|
var defaultProps = {
|
31
31
|
'data-testid': testId,
|
32
|
+
'aria-label': 'listbox',
|
32
33
|
'aria-labelledby': 'label',
|
33
34
|
items: items
|
34
35
|
};
|
35
36
|
var defaultWithSectionsProps = {
|
36
37
|
'data-testid': testId,
|
38
|
+
'aria-label': 'listbox',
|
37
39
|
'aria-labelledby': 'label',
|
38
40
|
items: itemsWithSections
|
39
41
|
};
|
@@ -63,7 +63,13 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
63
63
|
isSelected: isSelected
|
64
64
|
}),
|
65
65
|
classNames = _useStatusClasses.classNames;
|
66
|
+
/* Related to UIP-4992
|
67
|
+
* Need to remove these properties to avoid errors in the console on the external app.
|
68
|
+
* By the way, these properties return "undefined", so it shouldn't create issues */
|
66
69
|
|
70
|
+
|
71
|
+
delete optionProps.onPressStart;
|
72
|
+
delete optionProps.onPressUp;
|
67
73
|
return ___EmotionJSX(Box, _extends({
|
68
74
|
as: "li",
|
69
75
|
isRow: true,
|
@@ -20,8 +20,8 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
export var icons = {
|
21
21
|
"default": AlertCircleOutlineIcon,
|
22
22
|
success: CheckCircleIcon,
|
23
|
-
error:
|
24
|
-
warning:
|
23
|
+
error: AlertCircleIcon,
|
24
|
+
warning: AlertCircleOutlineIcon
|
25
25
|
};
|
26
26
|
|
27
27
|
var CloseButton = function CloseButton(_ref) {
|
@@ -311,7 +311,8 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
311
311
|
hasAutoFocus: hasAutoFocus,
|
312
312
|
hasVirtualFocus: true,
|
313
313
|
hasNoEmptySelection: true,
|
314
|
-
state: state
|
314
|
+
state: state,
|
315
|
+
"aria-label": "List of options"
|
315
316
|
})), ___EmotionJSX(DismissButton, {
|
316
317
|
onDismiss: close
|
317
318
|
}));
|
@@ -3,9 +3,8 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
3
3
|
import React, { useState } from 'react';
|
4
4
|
import { Item } from '@react-stately/collections';
|
5
5
|
import { useOverlayPanelState } from '../../hooks';
|
6
|
-
import Button from '../Button/Button';
|
7
6
|
import OverlayPanel from './OverlayPanel';
|
8
|
-
import { OverlayProvider, Box, Text, List, ListItem, Separator, Messages } from '../../index';
|
7
|
+
import { OverlayProvider, Box, Text, List, ListItem, Separator, Messages, Button, AccordionGroup } from '../../index';
|
9
8
|
import { panelSizes } from '../../utils/devUtils/constants/panelSizes';
|
10
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
11
10
|
export default {
|
@@ -47,9 +46,12 @@ export var Default = function Default(_ref) {
|
|
47
46
|
isOpen: state.isOpen
|
48
47
|
}, args), ___EmotionJSX(Box, null, ___EmotionJSX(Button, {
|
49
48
|
onPress: state.close
|
50
|
-
}, "Close Panel"), ___EmotionJSX(
|
51
|
-
|
52
|
-
|
49
|
+
}, "Close Panel"), ___EmotionJSX(AccordionGroup, args, ___EmotionJSX(Item, {
|
50
|
+
key: "accordionKey",
|
51
|
+
textValue: "accordionKey",
|
52
|
+
label: "Accordion Label",
|
53
|
+
"data-id": "accordionItem"
|
54
|
+
}, ___EmotionJSX(Text, null, "Render me!"))))))
|
53
55
|
);
|
54
56
|
};
|
55
57
|
export var InnerPanel = function InnerPanel(_ref2) {
|
@@ -1,13 +1,20 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import axeTest from '../../utils/testUtils/testAxe';
|
3
3
|
import { render, screen } from '../../utils/testUtils/testWrapper';
|
4
|
-
import { Box } from '../../index';
|
4
|
+
import { Box, OverlayPanel } from '../../index';
|
5
5
|
import PopoverContainer from './PopoverContainer';
|
6
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
7
|
|
8
8
|
var getComponent = function getComponent() {
|
9
9
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10
10
|
return render(___EmotionJSX(React.Fragment, null, ___EmotionJSX(PopoverContainer, props, ___EmotionJSX(Box, null, "I am in a popover"))));
|
11
|
+
};
|
12
|
+
|
13
|
+
var getComponentInOverlayPanel = function getComponentInOverlayPanel() {
|
14
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
15
|
+
return render(___EmotionJSX(OverlayPanel, {
|
16
|
+
isOpen: true
|
17
|
+
}, ___EmotionJSX(PopoverContainer, props, ___EmotionJSX(Box, null, "I am in a popover"))));
|
11
18
|
}; // Need to be added to each test file to test accessibility using axe.
|
12
19
|
|
13
20
|
|
@@ -26,4 +33,12 @@ test('should render a popover with no arrow', function () {
|
|
26
33
|
});
|
27
34
|
var arrow = screen.queryByTestId('popover-arrow');
|
28
35
|
expect(arrow).not.toBeInTheDocument();
|
36
|
+
});
|
37
|
+
test('popover will not open if wrapped in an overlayPanel', function () {
|
38
|
+
getComponentInOverlayPanel({
|
39
|
+
popoverProps: {
|
40
|
+
'data-test-id': 'popover-test'
|
41
|
+
}
|
42
|
+
});
|
43
|
+
expect(screen.queryByTestId('popover-test')).not.toBeInTheDocument();
|
29
44
|
});
|
@@ -12,7 +12,11 @@ import { Textarea as ThemeUITextArea } from 'theme-ui';
|
|
12
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
13
13
|
var TextArea = /*#__PURE__*/forwardRef(function (props, ref) {
|
14
14
|
return ___EmotionJSX(ThemeUITextArea, _extends({
|
15
|
-
ref: ref
|
15
|
+
ref: ref // this requires to fix safari resizing issue (UIP-4995)
|
16
|
+
,
|
17
|
+
sx: {
|
18
|
+
position: 'relative'
|
19
|
+
}
|
16
20
|
}, props));
|
17
21
|
});
|
18
22
|
TextArea.displayName = 'TextArea';
|
@@ -18,11 +18,11 @@ var accordion = {
|
|
18
18
|
alignItems: 'flex-start'
|
19
19
|
};
|
20
20
|
var accordionBody = {
|
21
|
-
display: 'none
|
21
|
+
display: 'none',
|
22
22
|
pt: 'md',
|
23
23
|
width: '100%',
|
24
24
|
'.is-open &': {
|
25
|
-
display: 'flex
|
25
|
+
display: 'flex'
|
26
26
|
}
|
27
27
|
};
|
28
28
|
var accordionGridHeader = {
|
@@ -82,6 +82,10 @@ var iconButton = {
|
|
82
82
|
}
|
83
83
|
};
|
84
84
|
|
85
|
+
var square = _objectSpread(_objectSpread({}, iconButton), {}, {
|
86
|
+
borderRadius: '2px'
|
87
|
+
});
|
88
|
+
|
85
89
|
var modalCloseButton = _objectSpread(_objectSpread({}, iconButton), {}, {
|
86
90
|
position: 'absolute',
|
87
91
|
top: 14,
|
@@ -219,6 +223,10 @@ var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
|
|
219
223
|
}
|
220
224
|
});
|
221
225
|
|
226
|
+
var invertedSquare = _objectSpread(_objectSpread({}, inverted), {}, {
|
227
|
+
borderRadius: '2px'
|
228
|
+
});
|
229
|
+
|
222
230
|
var applicationPortal = _objectSpread(_objectSpread({}, iconButton), {}, {
|
223
231
|
background: 'transparent',
|
224
232
|
'&.is-focused': _objectSpread({}, defaultFocus),
|
@@ -510,6 +518,8 @@ export default {
|
|
510
518
|
modalCloseButton: modalCloseButton,
|
511
519
|
applicationPortalPinned: applicationPortalPinned,
|
512
520
|
applicationPortal: applicationPortal,
|
521
|
+
square: square,
|
522
|
+
invertedSquare: invertedSquare,
|
513
523
|
tooltipChip: tooltipChip,
|
514
524
|
tooltipIconButton: tooltipIconButton,
|
515
525
|
tooltipInline: tooltipInline
|