@pingux/astro 2.0.0-beta.0 → 2.0.0-rc.0

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 (63) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +5 -5
  3. package/lib/MIGRATION.md +100 -0
  4. package/lib/README.md +92 -0
  5. package/lib/cjs/components/Bracket/Bracket.stories.js +0 -1
  6. package/lib/cjs/components/Button/Button.js +3 -1
  7. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +8 -4
  8. package/lib/cjs/components/ComboBox/ComboBoxInput.js +12 -11
  9. package/lib/cjs/components/DataTable/DataTable.styles.js +2 -2
  10. package/lib/cjs/components/IconButton/IconButton.js +3 -1
  11. package/lib/cjs/components/ListItem/ListItem.stories.js +8 -3
  12. package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +4 -4
  13. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +1 -1
  14. package/lib/cjs/components/NumberField/NumberField.js +2 -2
  15. package/lib/cjs/components/NumberField/NumberField.test.js +3 -3
  16. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +23 -7
  17. package/lib/cjs/components/OverlayPanel/OverlayPanel.styles.js +1 -0
  18. package/lib/cjs/components/PasswordField/PasswordField.js +7 -4
  19. package/lib/cjs/components/PasswordField/PasswordField.test.js +12 -0
  20. package/lib/cjs/components/PopoverMenu/PopoverMenu.test.js +10 -0
  21. package/lib/cjs/components/SearchField/Search.styles.js +3 -0
  22. package/lib/cjs/{styles/theme-ui → docs/theme}/ThemeView.js +1 -1
  23. package/lib/cjs/hooks/index.js +7 -0
  24. package/lib/cjs/patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +2 -2
  25. package/lib/cjs/patterns/AttributeMappingEditViewPattern.stories.hidden.js +3 -3
  26. package/lib/cjs/recipes/CountryPicker.stories.js +2 -2
  27. package/lib/cjs/recipes/LinkedListView.stories.js +2 -2
  28. package/lib/cjs/recipes/PageHeader.stories.js +16 -32
  29. package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +1 -1
  30. package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +18 -2
  31. package/lib/cjs/styles/themeOverrides/withUiLibraryCss.js +5 -3
  32. package/lib/cjs/styles/themes/end-user/end-user.js +15 -14
  33. package/lib/components/Bracket/Bracket.stories.js +0 -1
  34. package/lib/components/Button/Button.js +4 -2
  35. package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +8 -4
  36. package/lib/components/ComboBox/ComboBoxInput.js +12 -11
  37. package/lib/components/DataTable/DataTable.styles.js +2 -2
  38. package/lib/components/IconButton/IconButton.js +4 -2
  39. package/lib/components/ListItem/ListItem.stories.js +8 -3
  40. package/lib/components/ListViewItem/ListViewItem.styles.js +4 -4
  41. package/lib/components/MultivaluesField/MultivaluesField.js +1 -1
  42. package/lib/components/NumberField/NumberField.js +2 -2
  43. package/lib/components/NumberField/NumberField.test.js +3 -3
  44. package/lib/components/OverlayPanel/OverlayPanel.stories.js +20 -4
  45. package/lib/components/OverlayPanel/OverlayPanel.styles.js +1 -0
  46. package/lib/components/PasswordField/PasswordField.js +7 -4
  47. package/lib/components/PasswordField/PasswordField.test.js +12 -0
  48. package/lib/components/PopoverMenu/PopoverMenu.test.js +10 -0
  49. package/lib/components/SearchField/Search.styles.js +3 -0
  50. package/lib/{styles/theme-ui → docs/theme}/ThemeView.js +1 -1
  51. package/lib/hooks/index.js +1 -0
  52. package/lib/patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +2 -2
  53. package/lib/patterns/AttributeMappingEditViewPattern.stories.hidden.js +3 -3
  54. package/lib/recipes/CountryPicker.stories.js +2 -2
  55. package/lib/recipes/LinkedListView.stories.js +2 -2
  56. package/lib/recipes/PageHeader.stories.js +17 -33
  57. package/lib/recipes/RadioButtonsWithLinks.stories.js +1 -1
  58. package/lib/styles/themeOverrides/uiLibraryOverride.js +18 -2
  59. package/lib/styles/themeOverrides/withUiLibraryCss.js +5 -2
  60. package/lib/styles/themes/end-user/end-user.js +15 -14
  61. package/package.json +4 -5
  62. package/lib/cjs/docs/theme/ThemeDocumentation.js +0 -16
  63. package/lib/docs/theme/ThemeDocumentation.js +0 -7
@@ -1,14 +1,16 @@
1
1
  import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
2
2
  import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/objectDestructuringEmpty";
3
3
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
4
- import React, { useRef, useState } from 'react';
4
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
5
+ import React, { useCallback, useRef, useState } from 'react';
6
+ import { Item } from 'react-stately';
5
7
  import ArrowCollapse from 'mdi-react/ArrowCollapseIcon';
6
8
  import ArrowTopRightBottomLeft from 'mdi-react/ArrowTopRightBottomLeftIcon';
7
9
  import ChevronRightIcon from 'mdi-react/ChevronRightIcon';
8
10
  import CloseIcon from 'mdi-react/CloseIcon';
9
11
  import CogIcon from 'mdi-react/CogIcon';
10
12
  import { useOverlayPanelState } from '../../hooks';
11
- import { Avatar, Box, Breadcrumbs, Button, ColorField, IconButton, Item, ListView, Messages, MultivaluesField, OverlayPanel, OverlayProvider, SwitchField, Tab, Tabs, Text, TextField } from '../../index';
13
+ import { Avatar, Box, Breadcrumbs, Button, ColorField, IconButton, ListView, Messages, MultivaluesField, OverlayPanel, OverlayProvider, SwitchField, Tab, Tabs, Text, TextField } from '../../index';
12
14
  import { pingImg } from '../../utils/devUtils/constants/images';
13
15
  import { panelSizes } from '../../utils/devUtils/constants/panelSizes';
14
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -280,6 +282,19 @@ export var Expandable = function Expandable() {
280
282
  var onCloseHandler = function onCloseHandler() {
281
283
  return onClose(state, triggerRef);
282
284
  };
285
+ var _useState5 = useState('#EACE91'),
286
+ _useState6 = _slicedToArray(_useState5, 2),
287
+ color = _useState6[0],
288
+ setColor = _useState6[1];
289
+ var handleColorChange = useCallback(function (_ref3) {
290
+ var _context, _context2, _context3;
291
+ var rgb = _ref3.rgb;
292
+ var r = rgb.r,
293
+ b = rgb.b,
294
+ g = rgb.g,
295
+ a = rgb.a;
296
+ setColor(_concatInstanceProperty(_context = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "rgba(".concat(r, ", ")).call(_context3, g, ", ")).call(_context2, b, ", ")).call(_context, a, ")"));
297
+ }, []);
283
298
  var header = ___EmotionJSX(Box, {
284
299
  sx: sx.header
285
300
  }, ___EmotionJSX(Box, {
@@ -339,11 +354,12 @@ export var Expandable = function Expandable() {
339
354
  label: "Node Description",
340
355
  defaultValue: "The Value of the Text Input"
341
356
  }), ___EmotionJSX(ColorField, {
342
- value: "#EACE91",
357
+ value: color,
343
358
  label: "Node Background Color",
344
359
  buttonProps: {
345
360
  sx: sx.colorField
346
- }
361
+ },
362
+ onChange: handleColorChange
347
363
  }), ___EmotionJSX(SwitchField, {
348
364
  hintText: "Example Hint",
349
365
  labelProps: {
@@ -11,6 +11,7 @@ var container = {
11
11
  borderLeft: '1px solid',
12
12
  borderLeftColor: 'neutral.80',
13
13
  boxShadow: '-2px 0px 2px 1px rgba(37, 55, 70, 0.15)',
14
+ display: 'none !important',
14
15
  p: '25px',
15
16
  transition: 'right 500ms',
16
17
  maxWidth: '100%',
@@ -9,7 +9,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
9
9
  import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
10
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
11
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
12
- var _excluded = ["helperText", "isVisible", "onVisibleChange", "requirements", "slots", "status", "viewHiddenIconTestId", "viewIconTestId"];
12
+ var _excluded = ["helperText", "isVisible", "onVisibleChange", "requirements", "requirementsListProps", "slots", "status", "viewHiddenIconTestId", "viewIconTestId"];
13
13
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
15
15
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
@@ -41,6 +41,7 @@ var PasswordField = /*#__PURE__*/forwardRef(function (props, ref) {
41
41
  isVisibleProp = props.isVisible,
42
42
  onVisibleChangeProp = props.onVisibleChange,
43
43
  requirements = props.requirements,
44
+ requirementsListProps = props.requirementsListProps,
44
45
  slots = props.slots,
45
46
  status = props.status,
46
47
  viewHiddenIconTestId = props.viewHiddenIconTestId,
@@ -157,9 +158,9 @@ var PasswordField = /*#__PURE__*/forwardRef(function (props, ref) {
157
158
  placement: placement,
158
159
  ref: popoverRef,
159
160
  style: style
160
- }, ___EmotionJSX(RequirementsList, {
161
+ }, ___EmotionJSX(RequirementsList, _extends({
161
162
  requirements: requirements
162
- })));
163
+ }, requirementsListProps))));
163
164
  });
164
165
  PasswordField.propTypes = _objectSpread(_objectSpread({
165
166
  /** The rendered label for the field. */
@@ -228,7 +229,9 @@ PasswordField.propTypes = _objectSpread(_objectSpread({
228
229
  requirements: PropTypes.arrayOf(PropTypes.shape({
229
230
  name: PropTypes.string.isRequired,
230
231
  status: PropTypes.oneOf(['default', 'success', 'warning', 'error'])
231
- }))
232
+ })),
233
+ /** Props object that is spread to the requirements list. */
234
+ requirementsListProps: PropTypes.shape({})
232
235
  }, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
233
236
  PasswordField.defaultProps = {
234
237
  hasAutoFocus: false,
@@ -191,6 +191,18 @@ test('if all requirements are successful, do not render popover', function () {
191
191
  userEvent.click(input);
192
192
  expect(screen.queryByRole('presentation')).not.toBeInTheDocument();
193
193
  });
194
+ test('passing in props to the requirements list works', function () {
195
+ var requirementsListProps = {
196
+ 'data-testid': 'my-custom-id'
197
+ };
198
+ getComponent({
199
+ requirements: defaultRequirements,
200
+ requirementsListProps: requirementsListProps
201
+ });
202
+ expect(screen.queryByTestId(requirementsListProps['data-testid'])).not.toBeInTheDocument();
203
+ userEvent.click(screen.getByRole('textbox'));
204
+ expect(screen.queryByTestId(requirementsListProps['data-testid'])).toBeInTheDocument();
205
+ });
194
206
  test('password field with helper text', function () {
195
207
  var helperText = 'helper text';
196
208
  getComponent({
@@ -153,4 +153,14 @@ test('two menus can not be open at the same time', function () {
153
153
  expect(screen.queryByRole('menuitem', {
154
154
  name: 'C'
155
155
  })).toBeInTheDocument();
156
+ });
157
+ test('holds a pressed state for menu trigger when isOpen is true', function () {
158
+ getComponent();
159
+ var button = screen.getByRole('button');
160
+ expect(screen.queryByRole('presentation')).not.toBeInTheDocument();
161
+ expect(screen.queryByRole('menu')).not.toBeInTheDocument();
162
+ expect(button).not.toHaveClass('is-pressed');
163
+ userEvent.click(button);
164
+ expect(screen.queryByRole('menu')).toBeInTheDocument();
165
+ expect(button).toHaveClass('is-pressed');
156
166
  });
@@ -6,6 +6,9 @@ export var wrapper = {
6
6
  justifyContent: 'center',
7
7
  '> input::-webkit-search-cancel-button, > input::-webkit-search-decoration': {
8
8
  WebkitAppearance: 'none'
9
+ },
10
+ '&.is-focused > *': {
11
+ zIndex: 1
9
12
  }
10
13
  };
11
14
  export var icon = {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { JSONTree } from 'react-json-tree';
3
- import theme from '../theme';
3
+ import theme from '../../styles/theme';
4
4
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
5
  export default (function () {
6
6
  return ___EmotionJSX(JSONTree, {
@@ -1,6 +1,7 @@
1
1
  export { default as useAriaLabelWarning } from './useAriaLabelWarning';
2
2
  export { default as useColumnStyles } from './useColumnStyles';
3
3
  export { default as useComponentToggle } from './useComponentToggle';
4
+ export { default as useCopyToClipboard } from './useCopyToClipboard';
4
5
  export { default as useDebounce } from './useDebounce';
5
6
  export { default as useDeprecationWarning } from './useDeprecationWarning';
6
7
  export { default as useFallbackImage } from './useFallbackImage';
@@ -68,7 +68,7 @@ var sx = {
68
68
  mb: 'auto',
69
69
  width: '21px'
70
70
  },
71
- badgeStyles: {
71
+ badgeStyle: {
72
72
  width: '65px',
73
73
  height: '22px',
74
74
  minWidth: 'fit-content',
@@ -132,7 +132,7 @@ export var Default = function Default() {
132
132
  }), hasBadge && ___EmotionJSX(Badge, {
133
133
  label: "Required",
134
134
  textColor: "#253746",
135
- sx: sx.badgeStyles
135
+ sx: sx.badgeStyle
136
136
  }));
137
137
  })));
138
138
  };
@@ -14,17 +14,17 @@ var editFieldValues = [{
14
14
  }, {
15
15
  field1: 'firstName',
16
16
  field2: 'Given Name',
17
- hasBadge: false,
17
+ hasChip: false,
18
18
  key: 2
19
19
  }, {
20
20
  field1: 'lastName',
21
21
  field2: 'Family Name',
22
- hasBadge: false,
22
+ hasChip: false,
23
23
  key: 3
24
24
  }, {
25
25
  field1: 'population',
26
26
  field2: 'Population',
27
- hasBadge: false,
27
+ hasChip: false,
28
28
  key: 4
29
29
  }];
30
30
  var sx = {
@@ -26,7 +26,7 @@ var sx = {
26
26
  comboBoxFieldWrapperClose: {
27
27
  position: 'absolute',
28
28
  transition: '0.2s width ease',
29
- maxWidth: '110px'
29
+ width: '110px'
30
30
  },
31
31
  inputWrapper: {
32
32
  width: '100%',
@@ -92,7 +92,7 @@ export var Default = function Default() {
92
92
  width: "100%",
93
93
  isOpen: isOpen,
94
94
  onOpenChange: setIsOpen,
95
- containerProps: {
95
+ wrapperProps: {
96
96
  sx: isOpen ? sx.comboBoxFieldWrapperOpen : sx.comboBoxFieldWrapperClose
97
97
  },
98
98
  controlProps: {
@@ -113,7 +113,7 @@ export var Default = function Default(_ref) {
113
113
  var color = '#CACED3';
114
114
  return ___EmotionJSX(Box, {
115
115
  sx: {
116
- width: '20px',
116
+ width: '15px',
117
117
  position: 'relative'
118
118
  }
119
119
  }, ___EmotionJSX(Box, {
@@ -171,7 +171,7 @@ export var Default = function Default(_ref) {
171
171
  position: 'absolute',
172
172
  bottom: 0,
173
173
  left: 12,
174
- top: 55
174
+ top: 50
175
175
  }
176
176
  }, ___EmotionJSX("svg", {
177
177
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,53 +1,37 @@
1
1
  import React from 'react';
2
2
  import PlusIcon from 'mdi-react/PlusIcon';
3
- import { Box, Button, Icon, IconButton, Text } from '../index';
3
+ import { Box, Icon, IconButton, Link, Text } from '../index';
4
4
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
5
  export default {
6
6
  title: 'Recipes/Page Header'
7
7
  };
8
8
  export var Default = function Default() {
9
- var heading = 'Title of the Page';
10
- var description = 'The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page.';
11
- return ___EmotionJSX(Box, null, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
9
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
12
10
  align: "center",
13
11
  isRow: true,
14
12
  mb: "xs",
15
13
  role: "heading",
16
14
  "aria-level": "1"
17
15
  }, ___EmotionJSX(Text, {
18
- variant: "title",
19
- fontWeight: 3
20
- }, heading), ___EmotionJSX(Button, {
21
- variant: "inlinePrimary",
22
- ml: "sm"
23
- }, ___EmotionJSX(Icon, {
24
- icon: PlusIcon,
25
- color: "white",
26
- size: 13,
27
- mr: "4px"
28
- }), "\xA0", "Add")), ___EmotionJSX(Text, {
29
- variant: "bodyWeak"
30
- }, description)), ___EmotionJSX(Box, {
31
- mt: "xl"
32
- }, ___EmotionJSX(Box, {
33
- align: "center",
34
- isRow: true,
35
- mb: "xs",
36
- role: "heading",
37
- "aria-level": "1"
38
- }, ___EmotionJSX(Text, {
39
- variant: "title",
40
- fontWeight: 3
41
- }, heading), ___EmotionJSX(IconButton, {
16
+ fontSize: "xx",
17
+ fontWeight: "3",
18
+ fontColor: "text.primary"
19
+ }, "Title of the Page"), ___EmotionJSX(IconButton, {
42
20
  "aria-label": "icon button",
43
21
  ml: "sm",
44
- mt: "3px",
45
22
  variant: "inverted"
46
23
  }, ___EmotionJSX(Icon, {
47
24
  icon: PlusIcon,
48
- color: "white",
49
- size: "xs"
25
+ size: "sm"
50
26
  }))), ___EmotionJSX(Text, {
51
- variant: "bodyWeak"
52
- }, description)));
27
+ fontSize: "sm",
28
+ color: "text.secondary",
29
+ fontWeight: "0",
30
+ width: "800px"
31
+ }, "The description of the page. The description of the page. The description of the page. The description of the page.The description of the page. The description of the page. The description of the page. The description of the page. The description of the page.\xA0", ___EmotionJSX(Link, {
32
+ href: "https://uilibrary.ping-eng.com/",
33
+ sx: {
34
+ fontSize: 'sm'
35
+ }
36
+ }, "Learn more")));
53
37
  };
@@ -73,7 +73,7 @@ export var Default = function Default() {
73
73
  }
74
74
  }, "Permissions"), ___EmotionJSX(IconButton, {
75
75
  onPress: onPress,
76
- "aria-label": "close icon button"
76
+ "aria-label": "close"
77
77
  }, ___EmotionJSX(Icon, {
78
78
  icon: CloseIcon,
79
79
  size: "sm"
@@ -27,6 +27,17 @@ var buttons = {
27
27
  inline: {
28
28
  '&:not(.disabled):hover': _objectSpread(_objectSpread({}, theme.buttons.inline), theme.buttons.defaultHover)
29
29
  },
30
+ inlinePrimary: {
31
+ '&:not(.disabled):hover': _objectSpread(_objectSpread({}, theme.buttons.inlinePrimary), theme.buttons.defaultHover)
32
+ },
33
+ text: {
34
+ '&:not(.disabled):hover': _objectSpread(_objectSpread({}, theme.buttons.text), theme.buttons.defaultHover)
35
+ },
36
+ inverted: _objectSpread(_objectSpread({}, theme.buttons.inverted), {}, {
37
+ ':focus': {
38
+ border: 'none'
39
+ }
40
+ }),
30
41
  primary: {
31
42
  '&:hover': _objectSpread({}, theme.buttons.primary)
32
43
  },
@@ -72,11 +83,16 @@ var forms = {
72
83
  wrapper: {
73
84
  '& input[type=search]': _objectSpread(_objectSpread({}, theme.text.inputValue), {}, {
74
85
  borderColor: 'neutral.80',
86
+ fontSize: '15px',
75
87
  bg: 'white',
76
88
  '::placeholder': _objectSpread(_objectSpread({}, theme.text.placeholder), {}, {
77
- fontStyle: 'unset'
89
+ fontStyle: 'unset',
90
+ fontSize: '15px'
78
91
  })
79
- })
92
+ }),
93
+ '& input[type=search]:focus': {
94
+ borderColor: 'neutral.80'
95
+ }
80
96
  }
81
97
  },
82
98
  label: {
@@ -1,6 +1,8 @@
1
1
  import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
2
2
  import React, { useEffect } from 'react';
3
- import { ThemeProvider } from 'theme-ui';
3
+ import { ThemeProvider } from '@emotion/react';
4
+ import { merge } from 'theme-ui';
5
+ import astroTheme from '../theme';
4
6
  import uiLibraryOverride from './uiLibraryOverride';
5
7
  import { jsx as ___EmotionJSX } from "@emotion/react";
6
8
  var UI_LIBRARY_CSS_LINK = 'https://assets.pingone.com/ux/ui-library/5.0.2/css/ui-library.css';
@@ -18,8 +20,9 @@ var WithUiLibraryCss = function WithUiLibraryCss(Story) {
18
20
  });
19
21
  };
20
22
  }, []);
23
+ var theme = merge(astroTheme, uiLibraryOverride);
21
24
  return ___EmotionJSX(ThemeProvider, {
22
- theme: uiLibraryOverride
25
+ theme: theme
23
26
  }, ___EmotionJSX(Story, null));
24
27
  };
25
28
  export default WithUiLibraryCss;
@@ -100,7 +100,7 @@ var buttonBase = _objectSpread(_objectSpread({}, buttonText), {}, {
100
100
  },
101
101
  '&.is-focused': _objectSpread({}, buttonFocus)
102
102
  });
103
- var card = {
103
+ var cards = {
104
104
  bg: 'cardBg',
105
105
  boxShadow: 'overlay',
106
106
  boxSizing: 'border-box',
@@ -145,16 +145,17 @@ var wordWrap = {
145
145
  wordWrap: 'break-word',
146
146
  wordBreak: 'break-word'
147
147
  };
148
- var fieldHelperText = _objectSpread(_objectSpread(_objectSpread({}, base), wordWrap), {}, {
149
- fontSize: 'sm',
150
- pb: 'sm',
151
- '&.is-default': {
152
- color: 'text.secondary'
153
- },
154
- '&.is-error': {
155
- color: 'critical'
156
- }
157
- });
148
+ var fieldHelperText = {
149
+ title: _objectSpread(_objectSpread(_objectSpread({}, base), wordWrap), {}, {
150
+ fontSize: 'sm',
151
+ '&.is-default': {
152
+ color: 'text.secondary'
153
+ },
154
+ '&.is-error': {
155
+ color: 'critical.dark'
156
+ }
157
+ })
158
+ };
158
159
  var text = {
159
160
  base: {
160
161
  color: 'neutral.20',
@@ -181,8 +182,7 @@ var text = {
181
182
  fontSize: 15,
182
183
  fontWeight: 500,
183
184
  fontFamily: 'proxima-nova, sans-serif'
184
- },
185
- fieldHelperText: fieldHelperText
185
+ }
186
186
  };
187
187
  var activeFloatLabel = {
188
188
  fontWeight: 0,
@@ -243,7 +243,8 @@ export default {
243
243
  input: input,
244
244
  label: label
245
245
  },
246
+ cards: cards,
246
247
  variants: {
247
- card: card
248
+ fieldHelperText: fieldHelperText
248
249
  }
249
250
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-rc.0",
4
4
  "description": "PingUX themeable React component library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "lib"
18
18
  ],
19
19
  "scripts": {
20
- "build": "rm -rf lib & yarn run build:cjs & yarn run build:esm",
20
+ "build": "rm -rf lib && yarn run build:cjs && yarn run build:esm && cp README.md ./lib && cp MIGRATION.md ./lib",
21
21
  "build-ci": "yarn build",
22
22
  "append-version": "node ../../append_current_version.js",
23
23
  "build:cjs": "BABEL_ENV=cjs babel --config-file ./babel.config.js ./src --out-dir lib/cjs",
@@ -36,8 +36,8 @@
36
36
  "@babel/runtime": "7.16.3",
37
37
  "@babel/runtime-corejs3": "7.13.8",
38
38
  "@emotion/jest": "^11.5.0",
39
- "@emotion/react": "^11.10.5",
40
- "@emotion/styled": "^11.10.5",
39
+ "@emotion/react": "^11.1.1",
40
+ "@emotion/styled": "^11.1.1",
41
41
  "@faker-js/faker": "~7.5.0",
42
42
  "@mdx-js/react": "^1.6.22",
43
43
  "@react-aria/accordion": "~3.0.0-alpha.11",
@@ -89,7 +89,6 @@
89
89
  "react-color": "^2.19.3",
90
90
  "react-dropzone": "^11.4.2",
91
91
  "react-stately": "~3.17.0",
92
- "rebass": "^4.0.7",
93
92
  "recharts": "^2.1.4",
94
93
  "regenerator-runtime": "^0.13.7",
95
94
  "styled-system": "^5.1.5",
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
- var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
10
- var _react = _interopRequireDefault(require("react"));
11
- var _theme = _interopRequireDefault(require("../../styles/theme"));
12
- var _react2 = require("@emotion/react");
13
- var _default = function _default() {
14
- return (0, _react2.jsx)("pre", null, (0, _stringify["default"])(_theme["default"], null, ' '));
15
- };
16
- exports["default"] = _default;
@@ -1,7 +0,0 @@
1
- import _JSON$stringify from "@babel/runtime-corejs3/core-js-stable/json/stringify";
2
- import React from 'react';
3
- import theme from '../../styles/theme';
4
- import { jsx as ___EmotionJSX } from "@emotion/react";
5
- export default (function () {
6
- return ___EmotionJSX("pre", null, _JSON$stringify(theme, null, ' '));
7
- });