@pingux/astro 1.0.1 → 1.1.0-alpha.11
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 +137 -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/ListView/ListView.stories.js +580 -39
- package/lib/cjs/components/Messages/Message.js +2 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +3 -2
- 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/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
- package/lib/cjs/styles/variants/accordion.js +2 -2
- package/lib/cjs/styles/variants/boxes.js +2 -1
- package/lib/cjs/styles/variants/buttons.js +47 -2
- 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/ListView/ListView.stories.js +577 -39
- package/lib/components/Messages/Message.js +2 -2
- package/lib/components/MultivaluesField/MultivaluesField.js +3 -2
- 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/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
- package/lib/styles/variants/accordion.js +2 -2
- package/lib/styles/variants/boxes.js +1 -1
- package/lib/styles/variants/buttons.js +46 -2
- package/package.json +1 -1
@@ -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';
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import Earth from 'mdi-react/EarthIcon';
|
3
|
-
import
|
3
|
+
import PersonIcon from 'mdi-react/PersonIcon';
|
4
|
+
import { Box, Button, Icon, Tooltip, TooltipTrigger } from '../../index';
|
4
5
|
import IconButton from '../IconButton';
|
6
|
+
import Text from '../Text';
|
5
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
8
|
export default {
|
7
9
|
title: 'TooltipTrigger',
|
@@ -44,4 +46,34 @@ Disabled.parameters = {
|
|
44
46
|
story: 'The tooltip can be disabled without disabling the button press events.'
|
45
47
|
}
|
46
48
|
}
|
49
|
+
};
|
50
|
+
export var IconWithTooltip = function IconWithTooltip() {
|
51
|
+
return ___EmotionJSX(Box, {
|
52
|
+
pl: 50
|
53
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(IconButton, {
|
54
|
+
variant: "tooltipIconButton"
|
55
|
+
}, ___EmotionJSX(Icon, {
|
56
|
+
icon: PersonIcon
|
57
|
+
})), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
58
|
+
};
|
59
|
+
export var ChipWithTooltip = function ChipWithTooltip() {
|
60
|
+
return ___EmotionJSX(Box, {
|
61
|
+
pl: 50
|
62
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(Button, {
|
63
|
+
variant: "tooltipChip",
|
64
|
+
bg: "neutral.10"
|
65
|
+
}, ___EmotionJSX(Text, {
|
66
|
+
variant: "label",
|
67
|
+
sx: {
|
68
|
+
textTransform: 'uppercase'
|
69
|
+
},
|
70
|
+
color: "white"
|
71
|
+
}, "Some text")), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
72
|
+
};
|
73
|
+
export var TextWithTooltip = function TextWithTooltip() {
|
74
|
+
return ___EmotionJSX(Box, {
|
75
|
+
pl: 50
|
76
|
+
}, ___EmotionJSX(TooltipTrigger, null, ___EmotionJSX(Button, {
|
77
|
+
variant: "tooltipInline"
|
78
|
+
}, "Some text"), ___EmotionJSX(Tooltip, null, "Useful tooltip")));
|
47
79
|
};
|
@@ -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 = {
|
@@ -14,6 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
14
14
|
|
15
15
|
import { text as textVariants } from './text';
|
16
16
|
import { neutral } from '../colors';
|
17
|
+
import { chip } from './boxes';
|
17
18
|
|
18
19
|
var base = _objectSpread({
|
19
20
|
cursor: 'pointer',
|
@@ -66,7 +67,7 @@ var iconButton = {
|
|
66
67
|
width: 'inherit',
|
67
68
|
height: 'inherit',
|
68
69
|
path: {
|
69
|
-
fill: 'neutral.
|
70
|
+
fill: 'neutral.40'
|
70
71
|
},
|
71
72
|
outline: 'none',
|
72
73
|
'&.is-focused': _objectSpread({}, defaultFocus),
|
@@ -81,6 +82,10 @@ var iconButton = {
|
|
81
82
|
}
|
82
83
|
};
|
83
84
|
|
85
|
+
var square = _objectSpread(_objectSpread({}, iconButton), {}, {
|
86
|
+
borderRadius: '2px'
|
87
|
+
});
|
88
|
+
|
84
89
|
var modalCloseButton = _objectSpread(_objectSpread({}, iconButton), {}, {
|
85
90
|
position: 'absolute',
|
86
91
|
top: 14,
|
@@ -218,6 +223,10 @@ var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
|
|
218
223
|
}
|
219
224
|
});
|
220
225
|
|
226
|
+
var invertedSquare = _objectSpread(_objectSpread({}, inverted), {}, {
|
227
|
+
borderRadius: '2px'
|
228
|
+
});
|
229
|
+
|
221
230
|
var applicationPortal = _objectSpread(_objectSpread({}, iconButton), {}, {
|
222
231
|
background: 'transparent',
|
223
232
|
'&.is-focused': _objectSpread({}, defaultFocus),
|
@@ -446,6 +455,36 @@ var fileInputField = {
|
|
446
455
|
boxShadow: 'focus'
|
447
456
|
}
|
448
457
|
};
|
458
|
+
|
459
|
+
var tooltipChip = _objectSpread(_objectSpread({}, chip), {}, {
|
460
|
+
cursor: 'default',
|
461
|
+
'&.is-hovered, &.is-pressed': {
|
462
|
+
cursor: 'default',
|
463
|
+
outline: 'none'
|
464
|
+
}
|
465
|
+
});
|
466
|
+
|
467
|
+
var tooltipIconButton = _objectSpread(_objectSpread({}, iconButton), {}, {
|
468
|
+
cursor: 'default',
|
469
|
+
'&.is-hovered, &.is-pressed': {
|
470
|
+
backgroundColor: 'inherit',
|
471
|
+
cursor: 'default',
|
472
|
+
path: {
|
473
|
+
fill: 'neutral.20'
|
474
|
+
}
|
475
|
+
}
|
476
|
+
});
|
477
|
+
|
478
|
+
var tooltipInline = _objectSpread(_objectSpread({}, text), {}, {
|
479
|
+
cursor: 'default',
|
480
|
+
alignSelf: 'flex-start',
|
481
|
+
'&.is-hovered, &.is-pressed': {
|
482
|
+
backgroundColor: 'inherit',
|
483
|
+
cursor: 'default',
|
484
|
+
textDecoration: 'inherit'
|
485
|
+
}
|
486
|
+
});
|
487
|
+
|
449
488
|
export default {
|
450
489
|
accordionHeader: accordionHeader,
|
451
490
|
chipDeleteButton: chipDeleteButton,
|
@@ -478,5 +517,10 @@ export default {
|
|
478
517
|
helpHint: helpHint,
|
479
518
|
modalCloseButton: modalCloseButton,
|
480
519
|
applicationPortalPinned: applicationPortalPinned,
|
481
|
-
applicationPortal: applicationPortal
|
520
|
+
applicationPortal: applicationPortal,
|
521
|
+
square: square,
|
522
|
+
invertedSquare: invertedSquare,
|
523
|
+
tooltipChip: tooltipChip,
|
524
|
+
tooltipIconButton: tooltipIconButton,
|
525
|
+
tooltipInline: tooltipInline
|
482
526
|
};
|