@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.
Files changed (102) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/README.md +5 -0
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  4. package/lib/cjs/components/Button/Button.js +5 -24
  5. package/lib/cjs/components/Button/Button.stories.js +5 -11
  6. package/lib/cjs/components/Button/Button.test.js +0 -24
  7. package/lib/cjs/components/Chip/Chip.js +26 -10
  8. package/lib/cjs/components/Chip/Chip.stories.js +44 -5
  9. package/lib/cjs/components/Chip/Chip.test.js +9 -0
  10. package/lib/cjs/components/{DropdownField/index.js → Chip/ChipContext.js} +8 -7
  11. package/lib/cjs/components/IconButton/IconButton.js +17 -7
  12. package/lib/cjs/components/IconButton/IconButton.stories.js +8 -17
  13. package/lib/cjs/components/IconButton/IconButton.test.js +0 -1
  14. package/lib/cjs/components/ListItem/ListItem.stories.js +0 -2
  15. package/lib/cjs/components/ListView/ListView.js +4 -3
  16. package/lib/cjs/components/ListView/ListView.stories.js +580 -39
  17. package/lib/cjs/components/ListViewItem/ListViewItem.js +3 -6
  18. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +1 -1
  19. package/lib/cjs/components/Stepper/Stepper.js +1 -0
  20. package/lib/cjs/components/Tab/Tab.js +5 -3
  21. package/lib/cjs/components/Tabs/Tabs.js +3 -0
  22. package/lib/cjs/components/Tabs/Tabs.stories.js +3 -4
  23. package/lib/cjs/components/Tabs/Tabs.test.js +44 -15
  24. package/lib/cjs/components/TextAreaField/TextAreaField.test.js +10 -0
  25. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
  26. package/lib/cjs/index.js +48 -136
  27. package/lib/cjs/layouts/ListLayout.stories.js +2 -1
  28. package/lib/cjs/layouts/SchemaFormLayout.stories.js +2 -21
  29. package/lib/cjs/recipes/ArrayField.stories.js +3 -3
  30. package/lib/cjs/styles/forms/input.js +4 -0
  31. package/lib/cjs/styles/theme.js +0 -3
  32. package/lib/cjs/styles/variants/accordion.js +5 -7
  33. package/lib/cjs/styles/variants/boxes.js +22 -19
  34. package/lib/cjs/styles/variants/buttons.js +48 -29
  35. package/lib/cjs/styles/variants/variants.js +0 -3
  36. package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  37. package/lib/components/Button/Button.js +7 -24
  38. package/lib/components/Button/Button.stories.js +5 -10
  39. package/lib/components/Button/Button.test.js +0 -20
  40. package/lib/components/Chip/Chip.js +25 -10
  41. package/lib/components/Chip/Chip.stories.js +41 -5
  42. package/lib/components/Chip/Chip.test.js +9 -0
  43. package/lib/components/Chip/ChipContext.js +3 -0
  44. package/lib/components/IconButton/IconButton.js +17 -9
  45. package/lib/components/IconButton/IconButton.stories.js +7 -13
  46. package/lib/components/IconButton/IconButton.test.js +0 -1
  47. package/lib/components/ListItem/ListItem.stories.js +0 -2
  48. package/lib/components/ListView/ListView.js +4 -3
  49. package/lib/components/ListView/ListView.stories.js +577 -39
  50. package/lib/components/ListViewItem/ListViewItem.js +3 -5
  51. package/lib/components/MultivaluesField/MultivaluesField.js +1 -1
  52. package/lib/components/Stepper/Stepper.js +1 -0
  53. package/lib/components/Tab/Tab.js +5 -3
  54. package/lib/components/Tabs/Tabs.js +3 -0
  55. package/lib/components/Tabs/Tabs.stories.js +3 -4
  56. package/lib/components/Tabs/Tabs.test.js +40 -15
  57. package/lib/components/TextAreaField/TextAreaField.test.js +8 -0
  58. package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
  59. package/lib/index.js +0 -8
  60. package/lib/layouts/ListLayout.stories.js +2 -1
  61. package/lib/layouts/SchemaFormLayout.stories.js +2 -19
  62. package/lib/recipes/ArrayField.stories.js +3 -3
  63. package/lib/styles/forms/input.js +4 -0
  64. package/lib/styles/theme.js +0 -3
  65. package/lib/styles/variants/accordion.js +5 -7
  66. package/lib/styles/variants/boxes.js +21 -19
  67. package/lib/styles/variants/buttons.js +47 -29
  68. package/lib/styles/variants/variants.js +0 -2
  69. package/package.json +1 -1
  70. package/lib/cjs/components/Dropdown/Dropdown.js +0 -112
  71. package/lib/cjs/components/Dropdown/Dropdown.test.js +0 -80
  72. package/lib/cjs/components/Dropdown/index.js +0 -18
  73. package/lib/cjs/components/DropdownField/DropdownField.js +0 -187
  74. package/lib/cjs/components/DropdownField/DropdownField.stories.js +0 -278
  75. package/lib/cjs/components/DropdownField/DropdownField.test.js +0 -80
  76. package/lib/cjs/components/Panel/Panel.js +0 -101
  77. package/lib/cjs/components/Panel/Panel.stories.js +0 -57
  78. package/lib/cjs/components/Panel/Panel.test.js +0 -72
  79. package/lib/cjs/components/Panel/index.js +0 -18
  80. package/lib/cjs/components/Popover/Popover.js +0 -87
  81. package/lib/cjs/components/Popover/Popover.stories.js +0 -80
  82. package/lib/cjs/components/Popover/Popover.test.js +0 -91
  83. package/lib/cjs/components/Popover/index.js +0 -18
  84. package/lib/cjs/recipes/InputBoxWithLinkedChip.stories.js +0 -67
  85. package/lib/cjs/styles/variants/popover.js +0 -86
  86. package/lib/components/Dropdown/Dropdown.js +0 -90
  87. package/lib/components/Dropdown/Dropdown.test.js +0 -62
  88. package/lib/components/Dropdown/index.js +0 -1
  89. package/lib/components/DropdownField/DropdownField.js +0 -155
  90. package/lib/components/DropdownField/DropdownField.stories.js +0 -222
  91. package/lib/components/DropdownField/DropdownField.test.js +0 -60
  92. package/lib/components/DropdownField/index.js +0 -1
  93. package/lib/components/Panel/Panel.js +0 -71
  94. package/lib/components/Panel/Panel.stories.js +0 -35
  95. package/lib/components/Panel/Panel.test.js +0 -52
  96. package/lib/components/Panel/index.js +0 -1
  97. package/lib/components/Popover/Popover.js +0 -65
  98. package/lib/components/Popover/Popover.stories.js +0 -52
  99. package/lib/components/Popover/Popover.test.js +0 -75
  100. package/lib/components/Popover/index.js +0 -2
  101. package/lib/recipes/InputBoxWithLinkedChip.stories.js +0 -43
  102. 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: 'none'
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": "my-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": "my-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": "my-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: 81,
47
+ estimatedRowHeight: ROW_HEIGHT,
47
48
  estimatedHeadingHeight: 26,
48
49
  paddingRight: 4,
49
50
  paddingLeft: 4,
50
- loaderHeight: 81,
51
- placeholderHeight: 81,
51
+ loaderHeight: ROW_HEIGHT,
52
+ placeholderHeight: ROW_HEIGHT,
52
53
  collator: collator
53
54
  });
54
55
  }, [collator]);