@pingux/astro 1.41.0-alpha.1 → 1.41.0-alpha.3

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 (89) hide show
  1. package/lib/Patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +138 -0
  2. package/lib/Patterns/AttributeMappingEditViewPattern.stories.hidden.js +145 -0
  3. package/lib/Patterns/ListAndPanelPattern.stories.hidden.js +381 -0
  4. package/lib/Patterns/MessagesPattern.stories.hidden.js +69 -0
  5. package/lib/Patterns/SaveBarPattern.stories.hidden.js +80 -0
  6. package/lib/Patterns/UnsavedChangesPattern.stories.hidden.js +106 -0
  7. package/lib/cjs/Patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +158 -0
  8. package/lib/cjs/Patterns/AttributeMappingEditViewPattern.stories.hidden.js +167 -0
  9. package/lib/cjs/Patterns/ListAndPanelPattern.stories.hidden.js +418 -0
  10. package/lib/cjs/Patterns/MessagesPattern.stories.hidden.js +99 -0
  11. package/lib/cjs/Patterns/SaveBarPattern.stories.hidden.js +109 -0
  12. package/lib/cjs/Patterns/UnsavedChangesPattern.stories.hidden.js +136 -0
  13. package/lib/cjs/components/Bracket/Bracket.stories.js +1 -3
  14. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -1
  15. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +2 -18
  16. package/lib/cjs/components/Card/Card.js +117 -6
  17. package/lib/cjs/components/Card/Card.stories.js +55 -16
  18. package/lib/cjs/components/Card/Card.test.js +50 -0
  19. package/lib/cjs/components/Chip/Badge.js +0 -5
  20. package/lib/cjs/components/Chip/Badge.stories.js +11 -0
  21. package/lib/cjs/components/Chip/Chip.js +0 -5
  22. package/lib/cjs/components/CodeView/CodeView.js +0 -4
  23. package/lib/cjs/components/CodeView/CodeView.stories.js +9 -0
  24. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.js +0 -4
  25. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +7 -0
  26. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +13 -1
  27. package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +75 -4
  28. package/lib/cjs/components/CopyText/CopyText.js +0 -4
  29. package/lib/cjs/components/CopyText/CopyText.stories.js +11 -0
  30. package/lib/cjs/components/DataTable/DataTable.js +33 -15
  31. package/lib/cjs/components/DataTable/DataTable.stories.js +91 -17
  32. package/lib/cjs/components/DataTable/DataTable.test.js +38 -6
  33. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +1 -3
  34. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +25 -3
  35. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +19 -5
  36. package/lib/cjs/components/HelpHint/HelpHint.js +0 -7
  37. package/lib/cjs/components/HelpHint/HelpHint.stories.js +11 -0
  38. package/lib/cjs/components/Icon/Icon.js +0 -12
  39. package/lib/cjs/components/Icon/Icon.stories.js +7 -0
  40. package/lib/cjs/components/Image/Image.stories.js +2 -2
  41. package/lib/cjs/components/ListBox/ListBoxSection.js +8 -1
  42. package/lib/cjs/components/ListView/ListView.stories.js +6 -4
  43. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +2 -1
  44. package/lib/cjs/components/SelectField/SelectField.stories.js +13 -1
  45. package/lib/cjs/components/SelectField/SelectField.test.js +75 -0
  46. package/lib/cjs/recipes/ConditionalFilter.stories.js +0 -1
  47. package/lib/cjs/recipes/ScrollableListView.stories.js +3 -2
  48. package/lib/cjs/recipes/TrialExperienceIndustryButtons.stories.js +4 -8
  49. package/lib/cjs/styles/variants/boxes.js +6 -6
  50. package/lib/cjs/utils/devUtils/constants/text.js +11 -0
  51. package/lib/components/Bracket/Bracket.stories.js +1 -3
  52. package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -1
  53. package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +0 -13
  54. package/lib/components/Card/Card.js +110 -7
  55. package/lib/components/Card/Card.stories.js +44 -10
  56. package/lib/components/Card/Card.test.js +36 -0
  57. package/lib/components/Chip/Badge.js +0 -6
  58. package/lib/components/Chip/Badge.stories.js +9 -0
  59. package/lib/components/Chip/Chip.js +0 -6
  60. package/lib/components/CodeView/CodeView.js +0 -5
  61. package/lib/components/CodeView/CodeView.stories.js +7 -0
  62. package/lib/components/CollapsiblePanel/CollapsiblePanel.js +0 -5
  63. package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +5 -0
  64. package/lib/components/ComboBoxField/ComboBoxField.stories.js +13 -1
  65. package/lib/components/ComboBoxField/ComboBoxField.test.js +70 -5
  66. package/lib/components/CopyText/CopyText.js +0 -4
  67. package/lib/components/CopyText/CopyText.stories.js +9 -0
  68. package/lib/components/DataTable/DataTable.js +33 -15
  69. package/lib/components/DataTable/DataTable.stories.js +80 -17
  70. package/lib/components/DataTable/DataTable.test.js +36 -6
  71. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +1 -3
  72. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +23 -3
  73. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +16 -5
  74. package/lib/components/HelpHint/HelpHint.js +0 -7
  75. package/lib/components/HelpHint/HelpHint.stories.js +9 -0
  76. package/lib/components/Icon/Icon.js +0 -13
  77. package/lib/components/Icon/Icon.stories.js +5 -0
  78. package/lib/components/Image/Image.stories.js +2 -2
  79. package/lib/components/ListBox/ListBoxSection.js +7 -2
  80. package/lib/components/ListView/ListView.stories.js +6 -4
  81. package/lib/components/OverlayPanel/OverlayPanel.stories.js +2 -1
  82. package/lib/components/SelectField/SelectField.stories.js +13 -1
  83. package/lib/components/SelectField/SelectField.test.js +68 -1
  84. package/lib/recipes/ConditionalFilter.stories.js +0 -1
  85. package/lib/recipes/ScrollableListView.stories.js +3 -2
  86. package/lib/recipes/TrialExperienceIndustryButtons.stories.js +4 -8
  87. package/lib/styles/variants/boxes.js +6 -6
  88. package/lib/utils/devUtils/constants/text.js +1 -0
  89. package/package.json +1 -1
@@ -52,13 +52,6 @@ var HelpIcon = function HelpIcon() {
52
52
  fill: "#3B4A58"
53
53
  }));
54
54
  };
55
- /**
56
- * A `HelpHint` is a composed component using tooltip trigger and icon button.
57
- *
58
- * For customization the trigger icon,
59
- * please see the [TooltipTrigger](./?path=/docs/tooltiptrigger--default) docs.
60
- */
61
-
62
55
 
63
56
  var HelpHint = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
64
57
  var children = props.children,
@@ -16,11 +16,22 @@ var _ = _interopRequireDefault(require("."));
16
16
 
17
17
  var _Box = _interopRequireDefault(require("../Box"));
18
18
 
19
+ var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
20
+
21
+ var _HelpHint = _interopRequireDefault(require("./HelpHint.mdx"));
22
+
19
23
  var _react2 = require("@emotion/react");
20
24
 
21
25
  var _default = {
22
26
  title: 'Components/HelpHint',
23
27
  component: _["default"],
28
+ parameters: {
29
+ docs: {
30
+ page: function page() {
31
+ return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_HelpHint["default"], null), (0, _react2.jsx)(_storybookDocsLayout["default"], null));
32
+ }
33
+ }
34
+ },
24
35
  argTypes: {
25
36
  children: {
26
37
  description: 'Tooltip content',
@@ -50,18 +50,6 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
50
50
 
51
51
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
52
52
 
53
- /**
54
- * Basic icon component.
55
- * Icons will fill the given container, which is '1em' x '1em' by default, and will maintain their
56
- * aspect ratio.
57
- * Use SVGR to import SVG files as React components and pass them into this component, and you can
58
- * use the theme to color the icon. But ensure you pass `dimensions: false` in webpack config
59
- * (see [SVGR docs](https://react-svgr.com/docs/options/#dimensions)).
60
- * Otherwise icon will not be resizable by `size` prop.
61
- * Icons can also be used from the [Material UI Icon Library](https://materialdesignicons.com/).
62
- * Built on top of the [Box from Theme-UI](https://theme-ui.com/components/box/) and uses the
63
- * available [props from Theme-UI](https://theme-ui.com/sx-prop).
64
- */
65
53
  var Icon = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
66
54
  var color = props.color,
67
55
  IconComponent = props.icon,
@@ -38,6 +38,10 @@ var _colors = require("../../styles/colors");
38
38
 
39
39
  var _tShirtSizes = require("../../utils/devUtils/constants/tShirtSizes");
40
40
 
41
+ var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
42
+
43
+ var _Icon = _interopRequireDefault(require("./Icon.mdx"));
44
+
41
45
  var _react2 = require("@emotion/react");
42
46
 
43
47
  var _default = {
@@ -45,6 +49,9 @@ var _default = {
45
49
  component: _index.Icon,
46
50
  parameters: {
47
51
  docs: {
52
+ page: function page() {
53
+ return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_Icon["default"], null), (0, _react2.jsx)(_storybookDocsLayout["default"], null));
54
+ },
48
55
  source: {
49
56
  type: 'code'
50
57
  }
@@ -125,7 +125,7 @@ exports.FallbackImage = FallbackImage;
125
125
 
126
126
  var WithSkeletonLoadSuccess = function WithSkeletonLoadSuccess(_ref2) {
127
127
  var useLocalSrc = _ref2.useLocalSrc;
128
- var imageSrc = useLocalSrc ? _images.pingImg : 'https://deelay.me/3000/https://picsum.photos/150/150';
128
+ var imageSrc = useLocalSrc ? _images.pingImg : 'https://app.requestly.io/delay/3000/https://picsum.photos/150/150';
129
129
  return (0, _react2.jsx)(_["default"], {
130
130
  src: imageSrc,
131
131
  sx: {
@@ -143,7 +143,7 @@ WithSkeletonLoadSuccess.args = {
143
143
 
144
144
  var WithSkeletonLoadTimeout = function WithSkeletonLoadTimeout() {
145
145
  return (0, _react2.jsx)(_["default"], {
146
- src: "https://deelay.me/7000/https://picsum.photos/150/150",
146
+ src: "https://app.requestly.io/delay/7000/https://picsum.photos/150/150",
147
147
  sx: {
148
148
  width: '150px',
149
149
  height: '150px'
@@ -28,8 +28,12 @@ var _i18n = require("@react-aria/i18n");
28
28
 
29
29
  var _virtualizer = require("@react-aria/virtualizer");
30
30
 
31
+ var _ListBoxContext = require("./ListBoxContext");
32
+
31
33
  var _Box = _interopRequireDefault(require("../Box"));
32
34
 
35
+ var _Separator = _interopRequireDefault(require("../Separator"));
36
+
33
37
  var _react2 = require("@emotion/react");
34
38
 
35
39
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -58,6 +62,7 @@ var ListBoxSection = function ListBoxSection(props) {
58
62
  var _useLocale = (0, _i18n.useLocale)(),
59
63
  direction = _useLocale.direction;
60
64
 
65
+ var state = (0, _react.useContext)(_ListBoxContext.ListBoxContext);
61
66
  return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
62
67
  as: "ul",
63
68
  ref: headerRef,
@@ -66,7 +71,9 @@ var ListBoxSection = function ListBoxSection(props) {
66
71
  sx: {
67
72
  paddingInlineStart: '0px'
68
73
  }
69
- }, groupProps), item.rendered && (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({}, headingProps, {
74
+ }, groupProps), item.key !== state.collection.getFirstKey() && (0, _react2.jsx)(_Separator["default"], {
75
+ mt: "0px"
76
+ }), item.rendered && (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({}, headingProps, {
70
77
  variant: "boxes.listBoxSectionTitle"
71
78
  }), item.rendered)), (0, _react2.jsx)(_Box["default"], {
72
79
  style: (0, _virtualizer.layoutInfoToStyle)(reusableView.layoutInfo, direction)
@@ -572,14 +572,15 @@ var ListElement = function ListElement(_ref) {
572
572
  }, (0, _react2.jsx)(_Icon["default"], {
573
573
  icon: _FormSelectIcon["default"],
574
574
  mr: "sm",
575
- color: "text.primary",
575
+ color: "accent.40",
576
576
  size: "md"
577
577
  }), (0, _react2.jsx)(_Text["default"], {
578
578
  variant: "itemTitle",
579
579
  alignSelf: "center"
580
580
  }, item.name)), (0, _react2.jsx)(_Box["default"], {
581
581
  isRow: true,
582
- alignSelf: "center"
582
+ alignSelf: "center",
583
+ gap: "sm"
583
584
  }, (0, _react2.jsx)(_IconButton["default"], {
584
585
  "aria-label": "create-icon"
585
586
  }, (0, _react2.jsx)(_Icon["default"], {
@@ -611,14 +612,15 @@ var Default = function Default(_ref2) {
611
612
  }, (0, _react2.jsx)(_Icon["default"], {
612
613
  icon: _FormSelectIcon["default"],
613
614
  mr: "sm",
614
- color: "text.primary",
615
+ color: "accent.40",
615
616
  size: "md"
616
617
  }), (0, _react2.jsx)(_Text["default"], {
617
618
  variant: "itemTitle",
618
619
  alignSelf: "center"
619
620
  }, item.name)), (0, _react2.jsx)(_Box["default"], {
620
621
  isRow: true,
621
- alignSelf: "center"
622
+ alignSelf: "center",
623
+ gap: "sm"
622
624
  }, (0, _react2.jsx)(_IconButton["default"], {
623
625
  "aria-label": "create-icon"
624
626
  }, (0, _react2.jsx)(_Icon["default"], {
@@ -207,7 +207,8 @@ var InnerPanel = function InnerPanel(_ref2) {
207
207
  }, "Open Panel"), outer), messagesOpen && (0, _react2.jsx)(_index.Messages, {
208
208
  sx: {
209
209
  zIndex: 11
210
- }
210
+ },
211
+ onClose: toggleMessagesOpen
211
212
  }, (0, _react2.jsx)(_collections.Item, {
212
213
  key: "message2",
213
214
  status: "success"
@@ -122,6 +122,7 @@ var animals = [{
122
122
  }];
123
123
  var withSection = [{
124
124
  name: 'Animals',
125
+ key: 'Animals',
125
126
  children: [{
126
127
  name: 'Aardvark'
127
128
  }, {
@@ -131,6 +132,7 @@ var withSection = [{
131
132
  }]
132
133
  }, {
133
134
  name: 'People',
135
+ key: 'People',
134
136
  children: [{
135
137
  name: 'Michael'
136
138
  }, {
@@ -138,6 +140,16 @@ var withSection = [{
138
140
  }, {
139
141
  name: 'Creed'
140
142
  }]
143
+ }, {
144
+ name: null,
145
+ key: 'Fruit',
146
+ children: [{
147
+ name: 'Apple'
148
+ }, {
149
+ name: 'Strawberry'
150
+ }, {
151
+ name: 'Blueberry'
152
+ }]
141
153
  }];
142
154
  var _default = {
143
155
  title: 'Form/SelectField',
@@ -221,7 +233,7 @@ var WithSections = function WithSections(args) {
221
233
  items: withSection
222
234
  }, args), function (section) {
223
235
  return (0, _react2.jsx)(_2.Section, {
224
- key: section.name,
236
+ key: section.key,
225
237
  items: section.children,
226
238
  title: section.name
227
239
  }, function (item) {
@@ -6,6 +6,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/e
6
6
 
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
 
9
+ var _overlays = require("@react-aria/overlays");
10
+
11
+ var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
12
+
9
13
  var _testAxe = _interopRequireDefault(require("../../utils/testUtils/testAxe"));
10
14
 
11
15
  var _testWrapper = require("../../utils/testUtils/testWrapper");
@@ -23,6 +27,37 @@ var items = [{
23
27
  }, {
24
28
  name: 'c'
25
29
  }];
30
+ var withSection = [{
31
+ name: 'Animals',
32
+ key: 'Animals',
33
+ kids: [{
34
+ name: 'Aardvark'
35
+ }, {
36
+ name: 'Kangaroo'
37
+ }, {
38
+ name: 'Snake'
39
+ }]
40
+ }, {
41
+ name: 'People',
42
+ key: 'People',
43
+ kids: [{
44
+ name: 'Michael'
45
+ }, {
46
+ name: 'Dwight'
47
+ }, {
48
+ name: 'Creed'
49
+ }]
50
+ }, {
51
+ name: null,
52
+ key: 'Fruit',
53
+ kids: [{
54
+ name: 'Apple'
55
+ }, {
56
+ name: 'Strawberry'
57
+ }, {
58
+ name: 'Blueberry'
59
+ }]
60
+ }];
26
61
  var testId = 'test-dropdown';
27
62
  var controlTestId = "".concat(testId, "-input");
28
63
  var testValue = 'test';
@@ -48,6 +83,28 @@ var getComponent = function getComponent() {
48
83
  key: item.name
49
84
  }, item.name);
50
85
  }));
86
+ };
87
+
88
+ var getComponentWithSections = function getComponentWithSections() {
89
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
90
+
91
+ var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
92
+ _ref2$renderFn = _ref2.renderFn,
93
+ renderFn = _ref2$renderFn === void 0 ? _testWrapper.render : _ref2$renderFn;
94
+
95
+ return renderFn((0, _react2.jsx)(_overlays.OverlayProvider, null, (0, _react2.jsx)(_index.SelectField, (0, _extends2["default"])({}, defaultProps, props, {
96
+ items: withSection
97
+ }), function (section) {
98
+ return (0, _react2.jsx)(_index.Section, {
99
+ key: section.key,
100
+ items: section.kids,
101
+ title: section.name
102
+ }, function (item) {
103
+ return (0, _react2.jsx)(_index.Item, {
104
+ key: item.name
105
+ }, item.name);
106
+ });
107
+ })));
51
108
  }; // Need to be added to each test file to test accessibility using axe.
52
109
 
53
110
 
@@ -102,4 +159,22 @@ test('passing helper text should display it and correct aria attributes on input
102
159
  expect(visibleInput).toHaveAttribute('aria-invalid', 'true');
103
160
  var helperTextID = helper.getAttribute('id');
104
161
  expect(_testWrapper.screen.getByRole('button')).toHaveAttribute('aria-describedby', helperTextID);
162
+ });
163
+ test('passing sections, renders separators', function () {
164
+ getComponentWithSections();
165
+
166
+ var button = _testWrapper.screen.getByRole('button');
167
+
168
+ _userEvent["default"].click(button);
169
+
170
+ expect(_testWrapper.screen.queryAllByRole('separator')).toHaveLength(2);
171
+ });
172
+ test('a blank title does not render', function () {
173
+ getComponentWithSections();
174
+
175
+ var button = _testWrapper.screen.getByRole('button');
176
+
177
+ _userEvent["default"].click(button);
178
+
179
+ expect(_testWrapper.screen.queryByText('Fruit')).not.toBeInTheDocument();
105
180
  });
@@ -141,7 +141,6 @@ var Default = function Default() {
141
141
  isRow: true,
142
142
  key: item.key
143
143
  }, (0, _react2.jsx)(_index.Bracket, null), (0, _react2.jsx)(_index.Box, {
144
- ml: "3px",
145
144
  width: "100%"
146
145
  }, (0, _react2.jsx)(_index.Box, {
147
146
  variant: "forms.input.container",
@@ -128,14 +128,15 @@ var Default = function Default(_ref) {
128
128
  }, (0, _react2.jsx)(_index.Icon, {
129
129
  icon: _FormSelectIcon["default"],
130
130
  mr: "sm",
131
- color: "text.primary",
131
+ color: "accent.40",
132
132
  size: 25
133
133
  }), (0, _react2.jsx)(_index.Text, {
134
134
  variant: "itemTitle",
135
135
  alignSelf: "center"
136
136
  }, item.name)), (0, _react2.jsx)(_index.Box, {
137
137
  isRow: true,
138
- alignSelf: "center"
138
+ alignSelf: "center",
139
+ gap: "sm"
139
140
  }, (0, _react2.jsx)(_index.IconButton, {
140
141
  "aria-label": "create-icon"
141
142
  }, (0, _react2.jsx)(_index.Icon, {
@@ -667,14 +667,10 @@ var buttons = [{
667
667
 
668
668
  var Default = function Default() {
669
669
  var state = (0, _useModalState["default"])();
670
- return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
671
- onPress: state.open,
672
- "aria-label": "Open modal"
673
- }, "Open Modal"), state.isOpen && (0, _react2.jsx)(_index.Modal, {
674
- isOpen: state.isOpen,
670
+ return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Modal, {
671
+ isOpen: true,
675
672
  onClose: state.close,
676
- contentProps: sx.contentProps,
677
- isDismissable: true
673
+ contentProps: sx.contentProps
678
674
  }, (0, _react2.jsx)(_index.Box, {
679
675
  contentProps: true
680
676
  }, (0, _react2.jsx)(_index.IconButton, {
@@ -701,7 +697,7 @@ var Default = function Default() {
701
697
  }, (0, _react2.jsx)(_index.Icon, {
702
698
  icon: button.icon,
703
699
  sx: sx.iconStyle,
704
- size: "58"
700
+ size: 58
705
701
  }), (0, _react2.jsx)(_index.Text, {
706
702
  sx: sx.buttonLabelStyle
707
703
  }, button.name)));
@@ -36,13 +36,13 @@ var base = {
36
36
  display: 'flex'
37
37
  };
38
38
  var card = {
39
- boxShadow: 'standard',
39
+ boxShadow: '0px 1px 14px rgba(37, 55, 70, 0.15)',
40
+ borderRadius: '3px',
40
41
  p: 'lg',
41
- alignItems: 'center',
42
- justifyContent: 'center',
43
42
  flex: '1 1 0',
44
- fontWeight: 1,
45
- fontSize: 'md'
43
+ fontWeight: 0,
44
+ fontSize: 'md',
45
+ color: 'text.primary'
46
46
  }; // Used to give a border to radio elements
47
47
 
48
48
  var radioContainer = {
@@ -96,7 +96,7 @@ var listViewItem = _objectSpread(_objectSpread({}, base), {}, {
96
96
  },
97
97
  '&.has-separator': {
98
98
  borderBottom: '1px solid',
99
- borderBottomColor: 'line.hairline'
99
+ borderBottomColor: 'neutral.80'
100
100
  },
101
101
  '&.is-focused': {
102
102
  boxShadow: '0 0 0 1px inset #D033FF'
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+
9
+ exports.DummyText = void 0;
10
+ var DummyText = "\nSed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,\ntotam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae\ndicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, \nsed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, \nqui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora\nincidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum\nexercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel\neum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem \neum fugiat quo voluptas nulla pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis \npraesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate \nnon provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. \nEt harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi \noptio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis \ndolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et \nvoluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut \nreiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.\n";
11
+ exports.DummyText = DummyText;
@@ -41,8 +41,7 @@ export var Default = function Default() {
41
41
  ml: "sm",
42
42
  bg: "background"
43
43
  }, ___EmotionJSX(Box, {
44
- isRow: true,
45
- mb: "xs"
44
+ isRow: true
46
45
  }, ___EmotionJSX(Chip, {
47
46
  label: "Any",
48
47
  bg: "neutral.20",
@@ -57,7 +56,6 @@ export var Default = function Default() {
57
56
  isLast: index === anyConditions.length - 1
58
57
  }), ___EmotionJSX(Box, {
59
58
  mt: "md",
60
- ml: "xs",
61
59
  variant: "forms.input.container",
62
60
  bg: "white",
63
61
  isRow: true,
@@ -55,7 +55,7 @@ var Breadcrumbs = /*#__PURE__*/forwardRef(function (props, ref) {
55
55
  "aria-hidden": "true",
56
56
  icon: icon,
57
57
  mx: 5,
58
- size: 16
58
+ size: "xs"
59
59
  }, iconProps)));
60
60
  }, [children.length, filteredChildren, icon, iconProps, onAction]);
61
61
  return ___EmotionJSX("nav", {
@@ -61,17 +61,4 @@ export var Default = function Default(args) {
61
61
  "data-id": "march",
62
62
  href: "https://www.pingidentity.com"
63
63
  }, "March 2020 Assets"));
64
- };
65
- export var WithSpan = function WithSpan() {
66
- return ___EmotionJSX(Breadcrumbs, {
67
- icon: ChevronRightIcon
68
- }, ___EmotionJSX(Item, {
69
- key: "Parent",
70
- "aria-label": "parent",
71
- elementType: "span"
72
- }, "Parent"), ___EmotionJSX(Item, {
73
- key: "FonsVernall",
74
- "aria-label": "fons-vernall",
75
- elementType: "span"
76
- }, "Fons Vernall"));
77
64
  };
@@ -1,17 +1,120 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["className", "onHoverStart", "onHoverChange", "onHoverEnd", "onPress", "onPressStart", "onPressEnd", "onPressChange", "onPressUp"];
2
4
  import React, { forwardRef } from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import { mergeProps } from '@react-aria/utils';
7
+ import { useHover, usePress } from '@react-aria/interactions';
8
+ import { useFocusRing } from '@react-aria/focus';
3
9
  import Box from '../Box';
4
- /**
5
- * A Box component built for the common "Card" use case. Has default variant of card.
6
- * See Box for list of props.
7
- */
8
-
10
+ import { useStatusClasses } from '../../hooks';
9
11
  import { jsx as ___EmotionJSX } from "@emotion/react";
10
12
  var Card = /*#__PURE__*/forwardRef(function (props, ref) {
13
+ var className = props.className,
14
+ onHoverStart = props.onHoverStart,
15
+ onHoverChange = props.onHoverChange,
16
+ onHoverEnd = props.onHoverEnd,
17
+ onPress = props.onPress,
18
+ onPressStart = props.onPressStart,
19
+ onPressEnd = props.onPressEnd,
20
+ onPressChange = props.onPressChange,
21
+ onPressUp = props.onPressUp,
22
+ others = _objectWithoutProperties(props, _excluded);
23
+
24
+ var _useHover = useHover(props),
25
+ hoverProps = _useHover.hoverProps,
26
+ isHovered = _useHover.isHovered;
27
+
28
+ var _useFocusRing = useFocusRing(),
29
+ focusProps = _useFocusRing.focusProps,
30
+ isFocusVisible = _useFocusRing.isFocusVisible;
31
+
32
+ var _usePress = usePress({
33
+ ref: ref,
34
+ onPress: onPress,
35
+ onPressStart: onPressStart,
36
+ onPressEnd: onPressEnd,
37
+ onPressChange: onPressChange,
38
+ onPressUp: onPressUp
39
+ }),
40
+ pressProps = _usePress.pressProps,
41
+ isPressed = _usePress.isPressed;
42
+
43
+ var _useFocusRing2 = useFocusRing({
44
+ within: true
45
+ }),
46
+ focusWithinProps = _useFocusRing2.focusProps,
47
+ isFocusedWithin = _useFocusRing2.isFocusVisible;
48
+
49
+ var _useStatusClasses = useStatusClasses(className, {
50
+ isHovered: isHovered,
51
+ isPressed: isPressed,
52
+ isFocused: isFocusVisible || isFocusedWithin
53
+ }),
54
+ classNames = _useStatusClasses.classNames;
55
+
56
+ var ariaLabel = props['aria-label'];
11
57
  return ___EmotionJSX(Box, _extends({
58
+ "aria-label": ariaLabel,
12
59
  variant: "boxes.card",
13
- ref: ref
14
- }, props));
60
+ className: classNames,
61
+ ref: ref,
62
+ isFocused: isFocusVisible
63
+ }, others, mergeProps(hoverProps, pressProps, focusProps, focusWithinProps)));
15
64
  });
65
+ Card.propTypes = {
66
+ /** Defines a string value that labels the current element. */
67
+ 'aria-label': PropTypes.string,
68
+
69
+ /**
70
+ * Handler that is called when a hover interaction starts.
71
+ * (e: HoverEvent) => void
72
+ */
73
+ onHoverStart: PropTypes.func,
74
+
75
+ /**
76
+ * Handler that is called when a hover interaction ends.
77
+ * (e: HoverEvent) => void
78
+ */
79
+ onHoverEnd: PropTypes.func,
80
+
81
+ /**
82
+ * Handler that is called when the hover state changes.
83
+ * (isHovering: boolean) => void
84
+ */
85
+ onHoverChange: PropTypes.func,
86
+
87
+ /**
88
+ * Handler that is called when the press is released over the target.
89
+ * (e: PressEvent) => void
90
+ */
91
+ onPress: PropTypes.func,
92
+
93
+ /**
94
+ * Handler that is called when a press interaction starts.
95
+ * (e: PressEvent) => void
96
+ */
97
+ onPressStart: PropTypes.func,
98
+
99
+ /**
100
+ * Handler that is called when a press interaction ends, either over the target or when the
101
+ * pointer leaves the target.
102
+ * (e: PressEvent) => void
103
+ */
104
+ onPressEnd: PropTypes.func,
105
+
106
+ /**
107
+ * Handler that is called when the press state changes.
108
+ * (isPressed: boolean) => void
109
+ */
110
+ onPressChange: PropTypes.func,
111
+
112
+ /**
113
+ * Handler that is called when a press is released over the target, regardless of whether it
114
+ * started on the target or not.
115
+ * (e: PressEvent) => void
116
+ */
117
+ onPressUp: PropTypes.func
118
+ };
16
119
  Card.displayName = 'Card';
17
120
  export default Card;