@pingux/astro 1.0.0-alpha.9 → 1.1.0-alpha.2
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 +169 -0
- package/README.md +5 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
- package/lib/cjs/components/Button/Button.js +5 -24
- package/lib/cjs/components/Button/Button.stories.js +5 -11
- package/lib/cjs/components/Button/Button.test.js +0 -24
- package/lib/cjs/components/Chip/Chip.js +26 -10
- package/lib/cjs/components/Chip/Chip.stories.js +44 -5
- package/lib/cjs/components/Chip/Chip.test.js +9 -0
- package/lib/cjs/components/{DropdownField/index.js → Chip/ChipContext.js} +8 -7
- package/lib/cjs/components/IconButton/IconButton.js +17 -7
- package/lib/cjs/components/IconButton/IconButton.stories.js +8 -17
- package/lib/cjs/components/IconButton/IconButton.test.js +0 -1
- package/lib/cjs/components/ListItem/ListItem.stories.js +0 -2
- package/lib/cjs/components/ListView/ListView.js +4 -3
- package/lib/cjs/components/ListView/ListView.stories.js +580 -39
- package/lib/cjs/components/ListViewItem/ListViewItem.js +3 -6
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +1 -1
- package/lib/cjs/components/Stepper/Stepper.js +1 -0
- package/lib/cjs/components/Tab/Tab.js +5 -3
- package/lib/cjs/components/Tabs/Tabs.js +3 -0
- package/lib/cjs/components/Tabs/Tabs.stories.js +3 -4
- package/lib/cjs/components/Tabs/Tabs.test.js +44 -15
- package/lib/cjs/components/TextAreaField/TextAreaField.test.js +10 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
- package/lib/cjs/index.js +48 -136
- package/lib/cjs/layouts/ListLayout.stories.js +2 -1
- package/lib/cjs/layouts/SchemaFormLayout.stories.js +2 -21
- package/lib/cjs/recipes/ArrayField.stories.js +3 -3
- package/lib/cjs/styles/forms/input.js +4 -0
- package/lib/cjs/styles/theme.js +0 -3
- package/lib/cjs/styles/variants/accordion.js +5 -7
- package/lib/cjs/styles/variants/boxes.js +22 -19
- package/lib/cjs/styles/variants/buttons.js +48 -29
- package/lib/cjs/styles/variants/variants.js +0 -3
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
- package/lib/components/Button/Button.js +7 -24
- package/lib/components/Button/Button.stories.js +5 -10
- package/lib/components/Button/Button.test.js +0 -20
- package/lib/components/Chip/Chip.js +25 -10
- package/lib/components/Chip/Chip.stories.js +41 -5
- package/lib/components/Chip/Chip.test.js +9 -0
- package/lib/components/Chip/ChipContext.js +3 -0
- package/lib/components/IconButton/IconButton.js +17 -9
- package/lib/components/IconButton/IconButton.stories.js +7 -13
- package/lib/components/IconButton/IconButton.test.js +0 -1
- package/lib/components/ListItem/ListItem.stories.js +0 -2
- package/lib/components/ListView/ListView.js +4 -3
- package/lib/components/ListView/ListView.stories.js +577 -39
- package/lib/components/ListViewItem/ListViewItem.js +3 -5
- package/lib/components/MultivaluesField/MultivaluesField.js +1 -1
- package/lib/components/Stepper/Stepper.js +1 -0
- package/lib/components/Tab/Tab.js +5 -3
- package/lib/components/Tabs/Tabs.js +3 -0
- package/lib/components/Tabs/Tabs.stories.js +3 -4
- package/lib/components/Tabs/Tabs.test.js +40 -15
- package/lib/components/TextAreaField/TextAreaField.test.js +8 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
- package/lib/index.js +0 -8
- package/lib/layouts/ListLayout.stories.js +2 -1
- package/lib/layouts/SchemaFormLayout.stories.js +2 -19
- package/lib/recipes/ArrayField.stories.js +3 -3
- package/lib/styles/forms/input.js +4 -0
- package/lib/styles/theme.js +0 -3
- package/lib/styles/variants/accordion.js +5 -7
- package/lib/styles/variants/boxes.js +21 -19
- package/lib/styles/variants/buttons.js +47 -29
- package/lib/styles/variants/variants.js +0 -2
- package/package.json +1 -1
- package/lib/cjs/components/Dropdown/Dropdown.js +0 -112
- package/lib/cjs/components/Dropdown/Dropdown.test.js +0 -80
- package/lib/cjs/components/Dropdown/index.js +0 -18
- package/lib/cjs/components/DropdownField/DropdownField.js +0 -187
- package/lib/cjs/components/DropdownField/DropdownField.stories.js +0 -278
- package/lib/cjs/components/DropdownField/DropdownField.test.js +0 -80
- package/lib/cjs/components/Panel/Panel.js +0 -101
- package/lib/cjs/components/Panel/Panel.stories.js +0 -57
- package/lib/cjs/components/Panel/Panel.test.js +0 -72
- package/lib/cjs/components/Panel/index.js +0 -18
- package/lib/cjs/components/Popover/Popover.js +0 -87
- package/lib/cjs/components/Popover/Popover.stories.js +0 -80
- package/lib/cjs/components/Popover/Popover.test.js +0 -91
- package/lib/cjs/components/Popover/index.js +0 -18
- package/lib/cjs/recipes/InputBoxWithLinkedChip.stories.js +0 -67
- package/lib/cjs/styles/variants/popover.js +0 -86
- package/lib/components/Dropdown/Dropdown.js +0 -90
- package/lib/components/Dropdown/Dropdown.test.js +0 -62
- package/lib/components/Dropdown/index.js +0 -1
- package/lib/components/DropdownField/DropdownField.js +0 -155
- package/lib/components/DropdownField/DropdownField.stories.js +0 -222
- package/lib/components/DropdownField/DropdownField.test.js +0 -60
- package/lib/components/DropdownField/index.js +0 -1
- package/lib/components/Panel/Panel.js +0 -71
- package/lib/components/Panel/Panel.stories.js +0 -35
- package/lib/components/Panel/Panel.test.js +0 -52
- package/lib/components/Panel/index.js +0 -1
- package/lib/components/Popover/Popover.js +0 -65
- package/lib/components/Popover/Popover.stories.js +0 -52
- package/lib/components/Popover/Popover.test.js +0 -75
- package/lib/components/Popover/index.js +0 -2
- package/lib/recipes/InputBoxWithLinkedChip.stories.js +0 -43
- package/lib/styles/variants/popover.js +0 -76
@@ -35,29 +35,23 @@ export default {
|
|
35
35
|
isDisabled: {},
|
36
36
|
variant: {
|
37
37
|
control: {
|
38
|
-
type: '
|
39
|
-
|
38
|
+
type: 'select',
|
39
|
+
options: ['iconButton', 'inverted', 'square', 'invertedSquare']
|
40
|
+
},
|
41
|
+
defaultValue: 'iconButton'
|
40
42
|
}
|
41
43
|
}
|
42
44
|
};
|
43
45
|
export var Default = function Default(args) {
|
44
46
|
return ___EmotionJSX(IconButton, _extends({
|
45
|
-
"aria-label": "
|
47
|
+
"aria-label": "default icon button"
|
46
48
|
}, args), ___EmotionJSX(Icon, {
|
47
49
|
icon: CreateIcon
|
48
50
|
}));
|
49
51
|
};
|
50
|
-
export var Inverted = function Inverted() {
|
51
|
-
return ___EmotionJSX(IconButton, {
|
52
|
-
"aria-label": "my-label",
|
53
|
-
variant: "inverted"
|
54
|
-
}, ___EmotionJSX(Icon, {
|
55
|
-
icon: CreateIcon
|
56
|
-
}));
|
57
|
-
};
|
58
52
|
export var WithTooltip = function WithTooltip() {
|
59
53
|
return ___EmotionJSX(IconButton, {
|
60
|
-
"aria-label": "
|
54
|
+
"aria-label": "icon button with tooltip",
|
61
55
|
title: "Edit"
|
62
56
|
}, ___EmotionJSX(Icon, {
|
63
57
|
icon: CreateIcon
|
@@ -65,7 +59,7 @@ export var WithTooltip = function WithTooltip() {
|
|
65
59
|
};
|
66
60
|
export var Disabled = function Disabled() {
|
67
61
|
return ___EmotionJSX(IconButton, {
|
68
|
-
"aria-label": "
|
62
|
+
"aria-label": "disabled icon button",
|
69
63
|
isDisabled: true
|
70
64
|
}, ___EmotionJSX(Icon, {
|
71
65
|
icon: CreateIcon
|
@@ -32,7 +32,6 @@ test('default icon button', function () {
|
|
32
32
|
var button = screen.getByRole('button');
|
33
33
|
expect(button).toHaveAttribute('data-testid', testId);
|
34
34
|
expect(button).toBeInstanceOf(HTMLButtonElement);
|
35
|
-
expect(button).toHaveAttribute('tabindex', '0');
|
36
35
|
expect(button).toBeInTheDocument();
|
37
36
|
});
|
38
37
|
test('icon button hover', function () {
|
@@ -32,7 +32,6 @@ export var Default = function Default(args) {
|
|
32
32
|
isRow: true,
|
33
33
|
alignSelf: "center"
|
34
34
|
}, ___EmotionJSX(IconButton, {
|
35
|
-
variant: "icon",
|
36
35
|
size: 26
|
37
36
|
}, ___EmotionJSX(Icon, {
|
38
37
|
icon: MoreVertIcon,
|
@@ -64,7 +63,6 @@ export var WithSubtitle = function WithSubtitle(args) {
|
|
64
63
|
isRow: true,
|
65
64
|
alignSelf: "center"
|
66
65
|
}, ___EmotionJSX(IconButton, {
|
67
|
-
variant: "icon",
|
68
66
|
size: 26
|
69
67
|
}, ___EmotionJSX(Icon, {
|
70
68
|
icon: MoreVertIcon,
|
@@ -37,18 +37,19 @@ export var collectionTypes = {
|
|
37
37
|
PLACEHOLDER: 'placeholder'
|
38
38
|
};
|
39
39
|
export function useListLayout(state) {
|
40
|
+
var ROW_HEIGHT = 81;
|
40
41
|
var collator = useCollator({
|
41
42
|
usage: 'search',
|
42
43
|
sensitivity: 'base'
|
43
44
|
});
|
44
45
|
var layout = useMemo(function () {
|
45
46
|
return new ListLayout({
|
46
|
-
estimatedRowHeight:
|
47
|
+
estimatedRowHeight: ROW_HEIGHT,
|
47
48
|
estimatedHeadingHeight: 26,
|
48
49
|
paddingRight: 4,
|
49
50
|
paddingLeft: 4,
|
50
|
-
loaderHeight:
|
51
|
-
placeholderHeight:
|
51
|
+
loaderHeight: ROW_HEIGHT,
|
52
|
+
placeholderHeight: ROW_HEIGHT,
|
52
53
|
collator: collator
|
53
54
|
});
|
54
55
|
}, [collator]);
|