@pingux/astro 1.39.0 → 1.39.1

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 (45) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/NOTICE.html +1 -1
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.js +2 -1
  4. package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +0 -1
  5. package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +7 -0
  6. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +7 -0
  7. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +7 -0
  8. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +8 -1
  9. package/lib/cjs/components/IconButton/IconButton.js +3 -1
  10. package/lib/cjs/components/ListBox/ListBox.test.js +18 -0
  11. package/lib/cjs/components/ListBox/Option.js +11 -2
  12. package/lib/cjs/components/ListItem/ListItem.stories.js +8 -1
  13. package/lib/cjs/components/ListView/ListView.stories.js +7 -0
  14. package/lib/cjs/components/MultivaluesField/MultivaluesField.stories.js +4 -4
  15. package/lib/cjs/components/PasswordField/PasswordField.stories.js +7 -0
  16. package/lib/cjs/components/SearchField/SearchField.stories.js +7 -0
  17. package/lib/cjs/components/SwitchField/SwitchField.stories.js +7 -0
  18. package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +7 -0
  19. package/lib/cjs/components/TextField/TextField.stories.js +7 -0
  20. package/lib/cjs/recipes/DatePicker.stories.js +8 -1
  21. package/lib/cjs/recipes/ListAndPanel.stories.js +1 -0
  22. package/lib/cjs/recipes/MaskedValue.stories.js +7 -0
  23. package/lib/cjs/styles/variants/buttons.js +4 -1
  24. package/lib/components/AccordionGridGroup/AccordionGridGroup.js +2 -1
  25. package/lib/components/AccordionGridItem/AccordionGridItem.js +0 -1
  26. package/lib/components/CheckboxField/CheckboxField.stories.js +7 -0
  27. package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +7 -0
  28. package/lib/components/ComboBoxField/ComboBoxField.stories.js +7 -0
  29. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +8 -1
  30. package/lib/components/IconButton/IconButton.js +3 -1
  31. package/lib/components/ListBox/ListBox.test.js +11 -0
  32. package/lib/components/ListBox/Option.js +11 -2
  33. package/lib/components/ListItem/ListItem.stories.js +8 -1
  34. package/lib/components/ListView/ListView.stories.js +7 -0
  35. package/lib/components/MultivaluesField/MultivaluesField.stories.js +4 -4
  36. package/lib/components/PasswordField/PasswordField.stories.js +7 -0
  37. package/lib/components/SearchField/SearchField.stories.js +7 -0
  38. package/lib/components/SwitchField/SwitchField.stories.js +7 -0
  39. package/lib/components/TextAreaField/TextAreaField.stories.js +7 -0
  40. package/lib/components/TextField/TextField.stories.js +7 -0
  41. package/lib/recipes/DatePicker.stories.js +8 -1
  42. package/lib/recipes/ListAndPanel.stories.js +1 -0
  43. package/lib/recipes/MaskedValue.stories.js +7 -0
  44. package/lib/styles/variants/buttons.js +4 -1
  45. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.39.1](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.39.0...@pingux/astro@1.39.1) (2023-01-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * [UIP-5910] hover for IconButton component ([7861d57](https://gitlab.corp.pingidentity.com/ux/pingux/commit/7861d57dd0262cbbca6326e9666e9fc947fddeb6))
12
+ * [UIP-5912] MultivaluesField focusing on hover ([feab343](https://gitlab.corp.pingidentity.com/ux/pingux/commit/feab34344ed02d270effcce78a4d02712df5a5f3))
13
+ * [UIP-5937] ListAndPanel: add aria-label to icon button ([3fa5f46](https://gitlab.corp.pingidentity.com/ux/pingux/commit/3fa5f468d08adbc5fc93e510374322303feb817d))
14
+ * [UIP-5944] Fix Accordion Grid Group Accessibility Violation ([1058ac7](https://gitlab.corp.pingidentity.com/ux/pingux/commit/1058ac75816df16e6b8ce90f10ef8d0575bb0768))
15
+ * [UIP-5945] Storybook: fix code blocks formatting ([78b29ee](https://gitlab.corp.pingidentity.com/ux/pingux/commit/78b29ee7d28e6a82113333b8107a00ba5820087d))
16
+ * [UIP-5946] Fix A11y Violation Icon Chip Multivalues Story ([d52bf42](https://gitlab.corp.pingidentity.com/ux/pingux/commit/d52bf42c4c62b02efdeb7461cdc50814eb760b3e))
17
+ * [UIP-5955] MultivaluesField: remove button focus styles on hover ([4503298](https://gitlab.corp.pingidentity.com/ux/pingux/commit/450329829271f3e19727238bc891768ccccefb6e))
18
+
19
+
20
+
21
+
22
+
6
23
  # [1.39.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.38.1...@pingux/astro@1.39.0) (2023-01-05)
7
24
 
8
25
 
package/NOTICE.html CHANGED
@@ -146,7 +146,7 @@
146
146
 
147
147
  <main class="u-padding--xl">
148
148
  <h1>Snyk Licenses Attribution Report</h1>
149
- <h4>Report date: 1/5/2023</h4>
149
+ <h4>Report date: 1/10/2023</h4>
150
150
  <h2>Organization: <a href="https://app.snyk.io/org/ux-fbf">UX</a></h2>
151
151
  <div class="u-padding-top--sm">
152
152
  <h1>
@@ -172,7 +172,8 @@ var AccordionGridGroup = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
172
172
  keyboardDelegate: keyboardDelegate
173
173
  }
174
174
  }, (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({}, (0, _utils.mergeProps)(gridProps, containerProps), {
175
- ref: accordionGridRef
175
+ ref: accordionGridRef,
176
+ role: "treegrid"
176
177
  }), (0, _map["default"])(_context2 = (0, _from["default"])(state.collection)).call(_context2, function (item) {
177
178
  return (0, _react2.jsx)(_AccordionGridItem["default"], (0, _extends2["default"])({
178
179
  key: item.key,
@@ -102,7 +102,6 @@ var AccordionGridItem = function AccordionGridItem(props) {
102
102
  delete rowProps.onClick;
103
103
  return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
104
104
  as: "div",
105
- role: "row",
106
105
  tabindex: "0"
107
106
  }, (0, _utils.mergeProps)(rowProps, others), {
108
107
  "aria-selected": isSelected,
@@ -65,6 +65,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
65
65
  var _default = {
66
66
  title: 'Form/CheckboxField',
67
67
  component: _CheckboxField["default"],
68
+ parameters: {
69
+ docs: {
70
+ source: {
71
+ type: 'code'
72
+ }
73
+ }
74
+ },
68
75
  argTypes: _objectSpread({
69
76
  label: {
70
77
  control: {
@@ -75,6 +75,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
75
75
  var _default = {
76
76
  title: 'Components/CollapsiblePanel',
77
77
  component: _CollapsiblePanel["default"],
78
+ parameters: {
79
+ docs: {
80
+ source: {
81
+ type: 'code'
82
+ }
83
+ }
84
+ },
78
85
  argTypes: {
79
86
  listTitle: {
80
87
  defaultValue: 'Selected Groups'
@@ -162,6 +162,13 @@ var actions = {
162
162
  var _default = {
163
163
  title: 'Form/ComboBoxField',
164
164
  component: _ComboBoxField["default"],
165
+ parameters: {
166
+ docs: {
167
+ source: {
168
+ type: 'code'
169
+ }
170
+ }
171
+ },
165
172
  argTypes: _objectSpread({
166
173
  label: {
167
174
  control: {
@@ -64,7 +64,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
64
64
 
65
65
  var _default = {
66
66
  title: 'Components/EnvironmentBreadcrumb',
67
- component: _EnvironmentBreadcrumb["default"]
67
+ component: _EnvironmentBreadcrumb["default"],
68
+ parameters: {
69
+ docs: {
70
+ source: {
71
+ type: 'code'
72
+ }
73
+ }
74
+ }
68
75
  };
69
76
  exports["default"] = _default;
70
77
  var defaultEnvironments = [{
@@ -127,7 +127,9 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
127
127
  fill: chipBg
128
128
  }
129
129
  }
130
- }, (0, _utils.mergeProps)(buttonProps, others, hoverProps, focusProps)), children);
130
+ }, (0, _utils.mergeProps)(buttonProps, others, hoverProps, focusProps), {
131
+ onPointerOver: hoverProps.onPointerEnter
132
+ }), children);
131
133
 
132
134
  if (title) {
133
135
  return (0, _react2.jsx)(_TooltipTrigger["default"], {
@@ -18,6 +18,8 @@ var _react2 = require("@testing-library/react");
18
18
 
19
19
  var _collections = require("@react-stately/collections");
20
20
 
21
+ var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
22
+
21
23
  var _ = _interopRequireDefault(require("."));
22
24
 
23
25
  var _index = require("../../index");
@@ -168,4 +170,20 @@ test('renders sections and items within section', function () {
168
170
  var options = _react2.screen.getAllByRole('option');
169
171
 
170
172
  expect(options.length).toBe(itemsWithSections[0].options.length);
173
+ });
174
+ test('should have is-focused class when hover', function () {
175
+ getSectionsComponent();
176
+
177
+ var options = _react2.screen.getAllByRole('option');
178
+
179
+ expect(options[0]).not.toHaveClass('is-focused');
180
+
181
+ _userEvent["default"].hover(options[0]);
182
+
183
+ expect(options[0]).toHaveClass('is-focused');
184
+
185
+ _userEvent["default"].hover(options[1]);
186
+
187
+ expect(options[0]).not.toHaveClass('is-focused');
188
+ expect(options[1]).toHaveClass('is-focused');
171
189
  });
@@ -96,9 +96,17 @@ var Option = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
96
96
  isSelected = _useOption.isSelected,
97
97
  isFocused = _useOption.isFocused;
98
98
 
99
+ var focused = isFocused || (state === null || state === void 0 ? void 0 : (_state$selectionManag = state.selectionManager) === null || _state$selectionManag === void 0 ? void 0 : _state$selectionManag.focusedKey) === item.key;
100
+
101
+ var setFocusOnHover = function setFocusOnHover() {
102
+ if (!focused) {
103
+ state.selectionManager.setFocusedKey(item.key);
104
+ }
105
+ };
106
+
99
107
  var _useStatusClasses = (0, _hooks.useStatusClasses)(null, {
100
108
  isDisabled: isDisabled || isSeparator,
101
- isFocused: isFocused || (state === null || state === void 0 ? void 0 : (_state$selectionManag = state.selectionManager) === null || _state$selectionManag === void 0 ? void 0 : _state$selectionManag.focusedKey) === item.key,
109
+ isFocused: focused,
102
110
  isSelected: isSelected
103
111
  }),
104
112
  classNames = _useStatusClasses.classNames;
@@ -115,7 +123,8 @@ var Option = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
115
123
  ref: optionRef,
116
124
  variant: "listBox.option",
117
125
  "data-id": dataId,
118
- className: classNames
126
+ className: classNames,
127
+ onPointerOver: setFocusOnHover
119
128
  }, optionProps, others), isSelected && (0, _react2.jsx)(_Icon["default"], {
120
129
  icon: _CircleSmallIcon["default"]
121
130
  }), rendered);
@@ -32,7 +32,14 @@ var _react2 = require("@emotion/react");
32
32
 
33
33
  var _default = {
34
34
  title: 'Components/ListItem',
35
- component: _ListItem["default"]
35
+ component: _ListItem["default"],
36
+ parameters: {
37
+ docs: {
38
+ source: {
39
+ type: 'code'
40
+ }
41
+ }
42
+ }
36
43
  };
37
44
  exports["default"] = _default;
38
45
 
@@ -59,6 +59,13 @@ var _react2 = require("@emotion/react");
59
59
  var _default = {
60
60
  title: 'Components/ListView',
61
61
  component: _["default"],
62
+ parameters: {
63
+ docs: {
64
+ source: {
65
+ type: 'code'
66
+ }
67
+ }
68
+ },
62
69
  argTypes: {
63
70
  loadingState: {
64
71
  control: {
@@ -186,26 +186,26 @@ var HTMLIcon = function HTMLIcon(props) {
186
186
  d: "M9.81667 8.83325C9.85 8.55825 9.875 8.28325 9.875 7.99992C9.875 7.71659 9.85 7.44159 9.81667 7.16659H11.225C11.2917 7.43325 11.3333 7.71242 11.3333 7.99992C11.3333 8.28742 11.2917 8.56659 11.225 8.83325H9.81667ZM9.07917 11.1499C9.32917 10.6874 9.52084 10.1874 9.65417 9.66659H10.8833C10.4833 10.3541 9.84584 10.8874 9.07917 11.1499ZM8.975 8.83325H7.025C6.98334 8.55825 6.95834 8.28325 6.95834 7.99992C6.95834 7.71659 6.98334 7.43742 7.025 7.16659H8.975C9.0125 7.43742 9.04167 7.71659 9.04167 7.99992C9.04167 8.28325 9.0125 8.55825 8.975 8.83325ZM8 11.3166C7.65417 10.8166 7.375 10.2624 7.20417 9.66659H8.79584C8.625 10.2624 8.34584 10.8166 8 11.3166ZM6.33334 6.33325H5.11667C5.5125 5.64159 6.15417 5.10825 6.91667 4.84992C6.66667 5.31242 6.47917 5.81242 6.33334 6.33325ZM5.11667 9.66659H6.33334C6.47917 10.1874 6.66667 10.6874 6.91667 11.1499C6.15417 10.8874 5.5125 10.3541 5.11667 9.66659ZM4.775 8.83325C4.70834 8.56659 4.66667 8.28742 4.66667 7.99992C4.66667 7.71242 4.70834 7.43325 4.775 7.16659H6.18334C6.15 7.44159 6.125 7.71659 6.125 7.99992C6.125 8.28325 6.15 8.55825 6.18334 8.83325H4.775ZM8 4.67909C8.34584 5.17909 8.625 5.73742 8.79584 6.33325H7.20417C7.375 5.73742 7.65417 5.17909 8 4.67909ZM10.8833 6.33325H9.65417C9.52084 5.81242 9.32917 5.31242 9.07917 4.84992C9.84584 5.11242 10.4833 5.64159 10.8833 6.33325ZM8 3.83325C5.69584 3.83325 3.83334 5.70825 3.83334 7.99992C3.83334 9.10499 4.27232 10.1648 5.05372 10.9462C5.44064 11.3331 5.89996 11.64 6.40549 11.8494C6.91101 12.0588 7.45283 12.1666 8 12.1666C9.10507 12.1666 10.1649 11.7276 10.9463 10.9462C11.7277 10.1648 12.1667 9.10499 12.1667 7.99992C12.1667 7.45274 12.0589 6.91093 11.8495 6.4054C11.6401 5.89988 11.3332 5.44055 10.9463 5.05364C10.5594 4.66673 10.1 4.35982 9.59452 4.15042C9.08899 3.94103 8.54718 3.83325 8 3.83325Z",
187
187
  fill: "#4660A2"
188
188
  }))), (0, _react2.jsx)("defs", null, (0, _react2.jsx)("clipPath", {
189
- id: "clip0_709_18936"
189
+ className: "clip0_709_18936"
190
190
  }, (0, _react2.jsx)("rect", {
191
191
  width: "16",
192
192
  height: "16",
193
193
  fill: "white"
194
194
  })), (0, _react2.jsx)("clipPath", {
195
- id: "clip1_709_18936"
195
+ className: "clip1_709_18936"
196
196
  }, (0, _react2.jsx)("rect", {
197
197
  width: "10",
198
198
  height: "10",
199
199
  fill: "white",
200
200
  transform: "translate(3 3)"
201
201
  })), (0, _react2.jsx)("clipPath", {
202
- id: "clip2_709_18936"
202
+ className: "clip2_709_18936"
203
203
  }, (0, _react2.jsx)("rect", {
204
204
  width: "16",
205
205
  height: "16",
206
206
  fill: "white"
207
207
  })), (0, _react2.jsx)("clipPath", {
208
- id: "clip3_709_18936"
208
+ className: "clip3_709_18936"
209
209
  }, (0, _react2.jsx)("rect", {
210
210
  width: "10",
211
211
  height: "10",
@@ -57,6 +57,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
57
57
  var _default = {
58
58
  title: 'Form/PasswordField',
59
59
  component: _["default"],
60
+ parameters: {
61
+ docs: {
62
+ source: {
63
+ type: 'code'
64
+ }
65
+ }
66
+ },
60
67
  argTypes: _objectSpread({
61
68
  status: {
62
69
  control: {
@@ -59,6 +59,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
59
59
  var _default = {
60
60
  title: 'Form/SearchField',
61
61
  component: _.SearchField,
62
+ parameters: {
63
+ docs: {
64
+ source: {
65
+ type: 'code'
66
+ }
67
+ }
68
+ },
62
69
  argTypes: _objectSpread({
63
70
  label: {
64
71
  control: {
@@ -57,6 +57,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
57
57
  var _default = {
58
58
  title: 'Form/SwitchField',
59
59
  component: _["default"],
60
+ parameters: {
61
+ docs: {
62
+ source: {
63
+ type: 'code'
64
+ }
65
+ }
66
+ },
60
67
  argTypes: _objectSpread({
61
68
  label: {
62
69
  control: {
@@ -63,6 +63,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
63
63
  var _default = {
64
64
  title: 'Form/TextAreaField',
65
65
  component: _["default"],
66
+ parameters: {
67
+ docs: {
68
+ source: {
69
+ type: 'code'
70
+ }
71
+ }
72
+ },
66
73
  argTypes: _objectSpread({
67
74
  label: {
68
75
  control: {
@@ -71,6 +71,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
71
71
  var _default = {
72
72
  title: 'Form/TextField',
73
73
  component: _["default"],
74
+ parameters: {
75
+ docs: {
76
+ source: {
77
+ type: 'code'
78
+ }
79
+ }
80
+ },
74
81
  argTypes: _objectSpread({
75
82
  labelMode: {
76
83
  control: {
@@ -43,7 +43,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
43
43
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
44
44
 
45
45
  var _default = {
46
- title: 'Recipes/Date Picker'
46
+ title: 'Recipes/Date Picker',
47
+ parameters: {
48
+ docs: {
49
+ source: {
50
+ type: 'code'
51
+ }
52
+ }
53
+ }
47
54
  };
48
55
  exports["default"] = _default;
49
56
  var sx = {
@@ -379,6 +379,7 @@ var Default = function Default() {
379
379
  title: "Profile"
380
380
  }, selectedItemId >= 0 && (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.IconButton, {
381
381
  variant: "inverted",
382
+ "aria-label": "pencil icon button",
382
383
  sx: sx.iconButton
383
384
  }, (0, _react2.jsx)(_PencilIcon["default"], {
384
385
  size: 20
@@ -51,6 +51,13 @@ var _default = {
51
51
  },
52
52
  defaultValue: 'A secret piece of text'
53
53
  }
54
+ },
55
+ parameters: {
56
+ docs: {
57
+ source: {
58
+ type: 'code'
59
+ }
60
+ }
54
61
  }
55
62
  };
56
63
  exports["default"] = _default;
@@ -445,9 +445,12 @@ var chipDeleteStandard = {
445
445
  };
446
446
 
447
447
  var chipDeleteButton = _objectSpread(_objectSpread({}, chipDeleteStandard), {}, {
448
- '&.is-focused, &.is-hovered': _objectSpread({
448
+ '&.is-focused': _objectSpread({
449
449
  bg: 'accent.40'
450
450
  }, focusWithCroppedOutline),
451
+ '&.is-hovered': {
452
+ bg: 'accent.40'
453
+ },
451
454
  '&.is-pressed': {
452
455
  bg: 'accent.20',
453
456
  borderColor: 'accent.20'
@@ -130,7 +130,8 @@ var AccordionGridGroup = /*#__PURE__*/forwardRef(function (props, ref) {
130
130
  keyboardDelegate: keyboardDelegate
131
131
  }
132
132
  }, ___EmotionJSX(Box, _extends({}, mergeProps(gridProps, containerProps), {
133
- ref: accordionGridRef
133
+ ref: accordionGridRef,
134
+ role: "treegrid"
134
135
  }), _mapInstanceProperty(_context2 = _Array$from(state.collection)).call(_context2, function (item) {
135
136
  return ___EmotionJSX(AccordionGridItem, _extends({
136
137
  key: item.key,
@@ -65,7 +65,6 @@ var AccordionGridItem = function AccordionGridItem(props) {
65
65
  delete rowProps.onClick;
66
66
  return ___EmotionJSX(Box, _extends({
67
67
  as: "div",
68
- role: "row",
69
68
  tabindex: "0"
70
69
  }, mergeProps(rowProps, others), {
71
70
  "aria-selected": isSelected,
@@ -27,6 +27,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
27
27
  export default {
28
28
  title: 'Form/CheckboxField',
29
29
  component: CheckboxField,
30
+ parameters: {
31
+ docs: {
32
+ source: {
33
+ type: 'code'
34
+ }
35
+ }
36
+ },
30
37
  argTypes: _objectSpread({
31
38
  label: {
32
39
  control: {
@@ -31,6 +31,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
31
31
  export default {
32
32
  title: 'Components/CollapsiblePanel',
33
33
  component: CollapsiblePanel,
34
+ parameters: {
35
+ docs: {
36
+ source: {
37
+ type: 'code'
38
+ }
39
+ }
40
+ },
34
41
  argTypes: {
35
42
  listTitle: {
36
43
  defaultValue: 'Selected Groups'
@@ -116,6 +116,13 @@ var actions = {
116
116
  export default {
117
117
  title: 'Form/ComboBoxField',
118
118
  component: ComboBoxField,
119
+ parameters: {
120
+ docs: {
121
+ source: {
122
+ type: 'code'
123
+ }
124
+ }
125
+ },
119
126
  argTypes: _objectSpread({
120
127
  label: {
121
128
  control: {
@@ -25,7 +25,14 @@ import { Item, Section, Chip, Box, Text } from '../../index';
25
25
  import { jsx as ___EmotionJSX } from "@emotion/react";
26
26
  export default {
27
27
  title: 'Components/EnvironmentBreadcrumb',
28
- component: EnvironmentBreadcrumb
28
+ component: EnvironmentBreadcrumb,
29
+ parameters: {
30
+ docs: {
31
+ source: {
32
+ type: 'code'
33
+ }
34
+ }
35
+ }
29
36
  };
30
37
  var defaultEnvironments = [{
31
38
  name: 'Default'
@@ -90,7 +90,9 @@ var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
90
90
  fill: chipBg
91
91
  }
92
92
  }
93
- }, mergeProps(buttonProps, others, hoverProps, focusProps)), children);
93
+ }, mergeProps(buttonProps, others, hoverProps, focusProps), {
94
+ onPointerOver: hoverProps.onPointerEnter
95
+ }), children);
94
96
 
95
97
  if (title) {
96
98
  return ___EmotionJSX(TooltipTrigger, {
@@ -6,6 +6,7 @@ import { axe } from 'jest-axe';
6
6
  import { useListState } from '@react-stately/list';
7
7
  import { render, screen } from '@testing-library/react';
8
8
  import { Section } from '@react-stately/collections';
9
+ import userEvent from '@testing-library/user-event';
9
10
  import ListBox from '.';
10
11
  import { Item } from '../../index';
11
12
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -145,4 +146,14 @@ test('renders sections and items within section', function () {
145
146
  expect(section).toBeInTheDocument();
146
147
  var options = screen.getAllByRole('option');
147
148
  expect(options.length).toBe(itemsWithSections[0].options.length);
149
+ });
150
+ test('should have is-focused class when hover', function () {
151
+ getSectionsComponent();
152
+ var options = screen.getAllByRole('option');
153
+ expect(options[0]).not.toHaveClass('is-focused');
154
+ userEvent.hover(options[0]);
155
+ expect(options[0]).toHaveClass('is-focused');
156
+ userEvent.hover(options[1]);
157
+ expect(options[0]).not.toHaveClass('is-focused');
158
+ expect(options[1]).toHaveClass('is-focused');
148
159
  });
@@ -58,9 +58,17 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
58
58
  isSelected = _useOption.isSelected,
59
59
  isFocused = _useOption.isFocused;
60
60
 
61
+ var focused = isFocused || (state === null || state === void 0 ? void 0 : (_state$selectionManag = state.selectionManager) === null || _state$selectionManag === void 0 ? void 0 : _state$selectionManag.focusedKey) === item.key;
62
+
63
+ var setFocusOnHover = function setFocusOnHover() {
64
+ if (!focused) {
65
+ state.selectionManager.setFocusedKey(item.key);
66
+ }
67
+ };
68
+
61
69
  var _useStatusClasses = useStatusClasses(null, {
62
70
  isDisabled: isDisabled || isSeparator,
63
- isFocused: isFocused || (state === null || state === void 0 ? void 0 : (_state$selectionManag = state.selectionManager) === null || _state$selectionManag === void 0 ? void 0 : _state$selectionManag.focusedKey) === item.key,
71
+ isFocused: focused,
64
72
  isSelected: isSelected
65
73
  }),
66
74
  classNames = _useStatusClasses.classNames;
@@ -77,7 +85,8 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
77
85
  ref: optionRef,
78
86
  variant: "listBox.option",
79
87
  "data-id": dataId,
80
- className: classNames
88
+ className: classNames,
89
+ onPointerOver: setFocusOnHover
81
90
  }, optionProps, others), isSelected && ___EmotionJSX(Icon, {
82
91
  icon: CircleSmallIcon
83
92
  }), rendered);
@@ -10,7 +10,14 @@ import Separator from '../Separator';
10
10
  import { jsx as ___EmotionJSX } from "@emotion/react";
11
11
  export default {
12
12
  title: 'Components/ListItem',
13
- component: ListItem
13
+ component: ListItem,
14
+ parameters: {
15
+ docs: {
16
+ source: {
17
+ type: 'code'
18
+ }
19
+ }
20
+ }
14
21
  };
15
22
  export var Default = function Default(args) {
16
23
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Separator, {
@@ -24,6 +24,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
24
24
  export default {
25
25
  title: 'Components/ListView',
26
26
  component: ListView,
27
+ parameters: {
28
+ docs: {
29
+ source: {
30
+ type: 'code'
31
+ }
32
+ }
33
+ },
27
34
  argTypes: {
28
35
  loadingState: {
29
36
  control: {
@@ -152,26 +152,26 @@ var HTMLIcon = function HTMLIcon(props) {
152
152
  d: "M9.81667 8.83325C9.85 8.55825 9.875 8.28325 9.875 7.99992C9.875 7.71659 9.85 7.44159 9.81667 7.16659H11.225C11.2917 7.43325 11.3333 7.71242 11.3333 7.99992C11.3333 8.28742 11.2917 8.56659 11.225 8.83325H9.81667ZM9.07917 11.1499C9.32917 10.6874 9.52084 10.1874 9.65417 9.66659H10.8833C10.4833 10.3541 9.84584 10.8874 9.07917 11.1499ZM8.975 8.83325H7.025C6.98334 8.55825 6.95834 8.28325 6.95834 7.99992C6.95834 7.71659 6.98334 7.43742 7.025 7.16659H8.975C9.0125 7.43742 9.04167 7.71659 9.04167 7.99992C9.04167 8.28325 9.0125 8.55825 8.975 8.83325ZM8 11.3166C7.65417 10.8166 7.375 10.2624 7.20417 9.66659H8.79584C8.625 10.2624 8.34584 10.8166 8 11.3166ZM6.33334 6.33325H5.11667C5.5125 5.64159 6.15417 5.10825 6.91667 4.84992C6.66667 5.31242 6.47917 5.81242 6.33334 6.33325ZM5.11667 9.66659H6.33334C6.47917 10.1874 6.66667 10.6874 6.91667 11.1499C6.15417 10.8874 5.5125 10.3541 5.11667 9.66659ZM4.775 8.83325C4.70834 8.56659 4.66667 8.28742 4.66667 7.99992C4.66667 7.71242 4.70834 7.43325 4.775 7.16659H6.18334C6.15 7.44159 6.125 7.71659 6.125 7.99992C6.125 8.28325 6.15 8.55825 6.18334 8.83325H4.775ZM8 4.67909C8.34584 5.17909 8.625 5.73742 8.79584 6.33325H7.20417C7.375 5.73742 7.65417 5.17909 8 4.67909ZM10.8833 6.33325H9.65417C9.52084 5.81242 9.32917 5.31242 9.07917 4.84992C9.84584 5.11242 10.4833 5.64159 10.8833 6.33325ZM8 3.83325C5.69584 3.83325 3.83334 5.70825 3.83334 7.99992C3.83334 9.10499 4.27232 10.1648 5.05372 10.9462C5.44064 11.3331 5.89996 11.64 6.40549 11.8494C6.91101 12.0588 7.45283 12.1666 8 12.1666C9.10507 12.1666 10.1649 11.7276 10.9463 10.9462C11.7277 10.1648 12.1667 9.10499 12.1667 7.99992C12.1667 7.45274 12.0589 6.91093 11.8495 6.4054C11.6401 5.89988 11.3332 5.44055 10.9463 5.05364C10.5594 4.66673 10.1 4.35982 9.59452 4.15042C9.08899 3.94103 8.54718 3.83325 8 3.83325Z",
153
153
  fill: "#4660A2"
154
154
  }))), ___EmotionJSX("defs", null, ___EmotionJSX("clipPath", {
155
- id: "clip0_709_18936"
155
+ className: "clip0_709_18936"
156
156
  }, ___EmotionJSX("rect", {
157
157
  width: "16",
158
158
  height: "16",
159
159
  fill: "white"
160
160
  })), ___EmotionJSX("clipPath", {
161
- id: "clip1_709_18936"
161
+ className: "clip1_709_18936"
162
162
  }, ___EmotionJSX("rect", {
163
163
  width: "10",
164
164
  height: "10",
165
165
  fill: "white",
166
166
  transform: "translate(3 3)"
167
167
  })), ___EmotionJSX("clipPath", {
168
- id: "clip2_709_18936"
168
+ className: "clip2_709_18936"
169
169
  }, ___EmotionJSX("rect", {
170
170
  width: "16",
171
171
  height: "16",
172
172
  fill: "white"
173
173
  })), ___EmotionJSX("clipPath", {
174
- id: "clip3_709_18936"
174
+ className: "clip3_709_18936"
175
175
  }, ___EmotionJSX("rect", {
176
176
  width: "10",
177
177
  height: "10",
@@ -23,6 +23,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
23
23
  export default {
24
24
  title: 'Form/PasswordField',
25
25
  component: PasswordField,
26
+ parameters: {
27
+ docs: {
28
+ source: {
29
+ type: 'code'
30
+ }
31
+ }
32
+ },
26
33
  argTypes: _objectSpread({
27
34
  status: {
28
35
  control: {
@@ -24,6 +24,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
24
24
  export default {
25
25
  title: 'Form/SearchField',
26
26
  component: SearchField,
27
+ parameters: {
28
+ docs: {
29
+ source: {
30
+ type: 'code'
31
+ }
32
+ }
33
+ },
27
34
  argTypes: _objectSpread({
28
35
  label: {
29
36
  control: {
@@ -23,6 +23,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
23
23
  export default {
24
24
  title: 'Form/SwitchField',
25
25
  component: SwitchField,
26
+ parameters: {
27
+ docs: {
28
+ source: {
29
+ type: 'code'
30
+ }
31
+ }
32
+ },
26
33
  argTypes: _objectSpread({
27
34
  label: {
28
35
  control: {
@@ -26,6 +26,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
26
26
  export default {
27
27
  title: 'Form/TextAreaField',
28
28
  component: TextAreaField,
29
+ parameters: {
30
+ docs: {
31
+ source: {
32
+ type: 'code'
33
+ }
34
+ }
35
+ },
29
36
  argTypes: _objectSpread({
30
37
  label: {
31
38
  control: {
@@ -30,6 +30,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
30
30
  export default {
31
31
  title: 'Form/TextField',
32
32
  component: TextField,
33
+ parameters: {
34
+ docs: {
35
+ source: {
36
+ type: 'code'
37
+ }
38
+ }
39
+ },
33
40
  argTypes: _objectSpread({
34
41
  labelMode: {
35
42
  control: {
@@ -10,7 +10,14 @@ import statuses from '../utils/devUtils/constants/statuses';
10
10
  import PopoverContainer from '../components/PopoverContainer';
11
11
  import { jsx as ___EmotionJSX } from "@emotion/react";
12
12
  export default {
13
- title: 'Recipes/Date Picker'
13
+ title: 'Recipes/Date Picker',
14
+ parameters: {
15
+ docs: {
16
+ source: {
17
+ type: 'code'
18
+ }
19
+ }
20
+ }
14
21
  };
15
22
  var sx = {
16
23
  calendarIcon: {
@@ -342,6 +342,7 @@ export var Default = function Default() {
342
342
  title: "Profile"
343
343
  }, selectedItemId >= 0 && ___EmotionJSX(React.Fragment, null, ___EmotionJSX(IconButton, {
344
344
  variant: "inverted",
345
+ "aria-label": "pencil icon button",
345
346
  sx: sx.iconButton
346
347
  }, ___EmotionJSX(PencilIcon, {
347
348
  size: 20
@@ -21,6 +21,13 @@ export default {
21
21
  },
22
22
  defaultValue: 'A secret piece of text'
23
23
  }
24
+ },
25
+ parameters: {
26
+ docs: {
27
+ source: {
28
+ type: 'code'
29
+ }
30
+ }
24
31
  }
25
32
  };
26
33
  var sx = {
@@ -423,9 +423,12 @@ var chipDeleteStandard = {
423
423
  };
424
424
 
425
425
  var chipDeleteButton = _objectSpread(_objectSpread({}, chipDeleteStandard), {}, {
426
- '&.is-focused, &.is-hovered': _objectSpread({
426
+ '&.is-focused': _objectSpread({
427
427
  bg: 'accent.40'
428
428
  }, focusWithCroppedOutline),
429
+ '&.is-hovered': {
430
+ bg: 'accent.40'
431
+ },
429
432
  '&.is-pressed': {
430
433
  bg: 'accent.20',
431
434
  borderColor: 'accent.20'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.39.0",
3
+ "version": "1.39.1",
4
4
  "description": "PingUX themeable React component library",
5
5
  "repository": {
6
6
  "type": "git",