@pingux/astro 2.84.0-alpha.1 → 2.84.0-alpha.10

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 (115) hide show
  1. package/lib/cjs/components/Avatar/Avatar.js +43 -8
  2. package/lib/cjs/components/Avatar/Avatar.test.js +10 -1
  3. package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +5 -3
  4. package/lib/cjs/components/CodeView/CodeView.js +5 -2
  5. package/lib/cjs/components/CodeView/CodeView.styles.d.ts +2 -1
  6. package/lib/cjs/components/CodeView/CodeView.styles.js +4 -3
  7. package/lib/cjs/components/Link/Link.js +3 -1
  8. package/lib/cjs/components/LinkSelectField/LinkSelectField.stories.js +3 -6
  9. package/lib/cjs/components/ListBox/ListBox.styles.js +6 -3
  10. package/lib/cjs/components/Menu/Menu.js +15 -3
  11. package/lib/cjs/components/Menu/Menu.test.js +23 -0
  12. package/lib/cjs/components/MenuItem/MenuItem.styles.d.ts +1 -0
  13. package/lib/cjs/components/MenuItem/MenuItem.styles.js +2 -1
  14. package/lib/cjs/components/MenuSection/MenuSection.d.ts +9 -0
  15. package/lib/cjs/components/MenuSection/MenuSection.js +76 -0
  16. package/lib/cjs/components/MenuSection/MenuSection.styles.d.ts +21 -0
  17. package/lib/cjs/components/MenuSection/MenuSection.styles.js +35 -0
  18. package/lib/cjs/components/MenuSection/MenuSection.test.d.ts +1 -0
  19. package/lib/cjs/components/MenuSection/MenuSection.test.js +100 -0
  20. package/lib/cjs/components/MenuSection/index.d.ts +1 -0
  21. package/lib/cjs/components/MenuSection/index.js +14 -0
  22. package/lib/cjs/components/PopoverMenu/PopoverMenu.stories.d.ts +2 -0
  23. package/lib/cjs/components/PopoverMenu/PopoverMenu.stories.js +73 -5
  24. package/lib/cjs/components/SelectField/SelectField.stories.js +3 -6
  25. package/lib/cjs/components/SwitchField/SwitchField.d.ts +4 -0
  26. package/lib/cjs/components/SwitchField/SwitchField.js +12 -32
  27. package/lib/cjs/components/SwitchField/SwitchField.stories.d.ts +11 -0
  28. package/lib/cjs/components/SwitchField/SwitchField.stories.js +4 -2
  29. package/lib/cjs/components/SwitchField/SwitchField.test.d.ts +1 -0
  30. package/lib/cjs/components/SwitchField/index.d.ts +1 -0
  31. package/lib/cjs/components/SwitchField/switchFieldAttributes.d.ts +94 -0
  32. package/lib/cjs/components/SwitchField/switchFieldAttributes.js +2 -30
  33. package/lib/cjs/components/Tabs/Tabs.js +0 -1
  34. package/lib/cjs/components/Tabs/Tabs.style.d.ts +1 -0
  35. package/lib/cjs/components/Tabs/Tabs.style.js +2 -1
  36. package/lib/cjs/components/TimeField/TimeField.stories.js +2 -2
  37. package/lib/cjs/styles/theme.js +5 -1
  38. package/lib/cjs/styles/themes/next-gen/codeView/codeView.d.ts +105 -0
  39. package/lib/cjs/styles/themes/next-gen/codeView/codeView.js +134 -0
  40. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
  41. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +344 -36
  42. package/lib/cjs/styles/themes/next-gen/next-gen.js +24 -4
  43. package/lib/cjs/styles/themes/next-gen/sizes.d.ts +18 -0
  44. package/lib/cjs/styles/themes/next-gen/sizes.js +27 -0
  45. package/lib/cjs/styles/themes/next-gen/spacing.d.ts +9 -0
  46. package/lib/cjs/styles/themes/next-gen/spacing.js +17 -0
  47. package/lib/cjs/styles/themes/next-gen/text.d.ts +8 -2
  48. package/lib/cjs/styles/themes/next-gen/text.js +16 -13
  49. package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +36 -3
  50. package/lib/cjs/styles/themes/next-gen/variants/button.js +25 -5
  51. package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +20 -0
  52. package/lib/cjs/styles/themes/next-gen/variants/cards.js +28 -0
  53. package/lib/cjs/styles/themes/next-gen/variants/images.d.ts +4 -0
  54. package/lib/cjs/styles/themes/next-gen/variants/images.js +12 -0
  55. package/lib/cjs/styles/themes/next-gen/variants/links.d.ts +56 -0
  56. package/lib/cjs/styles/themes/next-gen/variants/links.js +62 -0
  57. package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +7 -0
  58. package/lib/cjs/styles/themes/next-gen/variants/text.js +9 -2
  59. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +82 -31
  60. package/lib/cjs/styles/themes/next-gen/variants/variants.js +91 -30
  61. package/lib/cjs/styles/variants/variants.js +2 -0
  62. package/lib/cjs/types/avatar.d.ts +5 -1
  63. package/lib/cjs/types/checkboxField.d.ts +3 -1
  64. package/lib/cjs/types/codeView.d.ts +1 -0
  65. package/lib/cjs/types/index.d.ts +2 -0
  66. package/lib/cjs/types/index.js +43 -21
  67. package/lib/cjs/types/link.d.ts +1 -0
  68. package/lib/cjs/types/menuSection.d.ts +24 -0
  69. package/lib/cjs/types/menuSection.js +6 -0
  70. package/lib/cjs/types/switchField.d.ts +29 -0
  71. package/lib/cjs/types/switchField.js +6 -0
  72. package/lib/components/Avatar/Avatar.js +44 -7
  73. package/lib/components/Avatar/Avatar.test.js +10 -1
  74. package/lib/components/CheckboxField/CheckboxField.stories.js +5 -3
  75. package/lib/components/CodeView/CodeView.js +5 -2
  76. package/lib/components/CodeView/CodeView.styles.js +4 -3
  77. package/lib/components/Link/Link.js +3 -1
  78. package/lib/components/LinkSelectField/LinkSelectField.stories.js +4 -7
  79. package/lib/components/ListBox/ListBox.styles.js +6 -3
  80. package/lib/components/Menu/Menu.js +15 -3
  81. package/lib/components/Menu/Menu.test.js +24 -1
  82. package/lib/components/MenuItem/MenuItem.styles.js +2 -1
  83. package/lib/components/MenuSection/MenuSection.js +64 -0
  84. package/lib/components/MenuSection/MenuSection.styles.js +27 -0
  85. package/lib/components/MenuSection/MenuSection.test.js +97 -0
  86. package/lib/components/MenuSection/index.js +1 -0
  87. package/lib/components/PopoverMenu/PopoverMenu.stories.js +70 -4
  88. package/lib/components/SelectField/SelectField.stories.js +4 -7
  89. package/lib/components/SwitchField/SwitchField.js +14 -34
  90. package/lib/components/SwitchField/SwitchField.stories.js +4 -2
  91. package/lib/components/SwitchField/switchFieldAttributes.js +1 -28
  92. package/lib/components/Tabs/Tabs.js +0 -1
  93. package/lib/components/Tabs/Tabs.style.js +2 -1
  94. package/lib/components/TimeField/TimeField.stories.js +2 -2
  95. package/lib/styles/theme.js +5 -1
  96. package/lib/styles/themes/next-gen/codeView/codeView.js +126 -0
  97. package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
  98. package/lib/styles/themes/next-gen/next-gen.js +24 -4
  99. package/lib/styles/themes/next-gen/sizes.js +19 -0
  100. package/lib/styles/themes/next-gen/spacing.js +9 -0
  101. package/lib/styles/themes/next-gen/text.js +16 -13
  102. package/lib/styles/themes/next-gen/variants/button.js +25 -5
  103. package/lib/styles/themes/next-gen/variants/cards.js +20 -0
  104. package/lib/styles/themes/next-gen/variants/images.js +4 -0
  105. package/lib/styles/themes/next-gen/variants/links.js +54 -0
  106. package/lib/styles/themes/next-gen/variants/text.js +9 -2
  107. package/lib/styles/themes/next-gen/variants/variants.js +91 -30
  108. package/lib/styles/variants/variants.js +2 -0
  109. package/lib/types/index.js +2 -0
  110. package/lib/types/menuSection.js +1 -0
  111. package/lib/types/switchField.js +1 -0
  112. package/package.json +1 -1
  113. package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.d.ts +0 -6
  114. package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.js +0 -41
  115. package/lib/recipes/NextGen/DefaultAvatar.stories.js +0 -31
@@ -8,54 +8,32 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
8
8
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
9
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
10
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
11
- var _excluded = ["label", "helperText", "isDefaultSelected", "isSelected", "onChange", "value", "name", "id", "isDisabled", "isReadOnly", "isRequired", "hasAutoFocus", "onFocus", "onBlur", "onFocusChange", "onKeyDown", "onKeyUp", "status", "controlProps"];
11
+ var _excluded = ["label", "helperText", "isDefaultSelected", "isDisabled", "status", "controlProps"];
12
12
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
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 _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(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; }
15
- /* eslint-disable no-unused-vars */
16
- import React, { forwardRef, useImperativeHandle, useRef } from 'react';
15
+ import React, { forwardRef } from 'react';
17
16
  import { useSwitch } from 'react-aria';
18
17
  import { useToggleState } from 'react-stately';
19
18
  import { usePress } from '@react-aria/interactions';
20
19
  import omit from 'lodash/omit';
21
20
  import { Box, FieldHelperText, Label, Switch } from '../..';
22
- import { useField, usePropWarning } from '../../hooks';
21
+ import { useField, useLocalOrForwardRef, usePropWarning } from '../../hooks';
23
22
  import { getPendoID } from '../../utils/devUtils/constants/pendoID';
24
- import { statusDefaultProp } from '../../utils/docUtils/statusProp';
25
- import { switchFieldPropTypes } from './switchFieldAttributes';
23
+ import statuses from '../../utils/devUtils/constants/statuses';
26
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
25
  var displayName = 'SwitchField';
28
26
  var SwitchField = /*#__PURE__*/forwardRef(function (props, ref) {
27
+ var _inputProps$checked;
29
28
  var label = props.label,
30
29
  helperText = props.helperText,
31
30
  isDefaultSelected = props.isDefaultSelected,
32
- isSelected = props.isSelected,
33
- onChange = props.onChange,
34
- value = props.value,
35
- name = props.name,
36
- id = props.id,
37
- _props$isDisabled = props.isDisabled,
38
- isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
39
- _props$isReadOnly = props.isReadOnly,
40
- isReadOnly = _props$isReadOnly === void 0 ? false : _props$isReadOnly,
41
- _props$isRequired = props.isRequired,
42
- isRequired = _props$isRequired === void 0 ? false : _props$isRequired,
43
- _props$hasAutoFocus = props.hasAutoFocus,
44
- hasAutoFocus = _props$hasAutoFocus === void 0 ? false : _props$hasAutoFocus,
45
- onFocus = props.onFocus,
46
- onBlur = props.onBlur,
47
- onFocusChange = props.onFocusChange,
48
- onKeyDown = props.onKeyDown,
49
- onKeyUp = props.onKeyUp,
31
+ isDisabled = props.isDisabled,
50
32
  status = props.status,
51
33
  controlProps = props.controlProps,
52
34
  others = _objectWithoutProperties(props, _excluded);
53
- var switchRef = useRef();
54
35
  usePropWarning(props, 'disabled', 'isDisabled');
55
- /* istanbul ignore next */
56
- useImperativeHandle(ref, function () {
57
- return switchRef.current;
58
- });
36
+ var switchRef = useLocalOrForwardRef(ref);
59
37
  var state = useToggleState(_objectSpread({
60
38
  defaultSelected: isDefaultSelected
61
39
  }, props));
@@ -67,11 +45,11 @@ var SwitchField = /*#__PURE__*/forwardRef(function (props, ref) {
67
45
  var _useSwitch = useSwitch(_objectSpread(_objectSpread({
68
46
  children: label
69
47
  }, whitelistedProps), {}, {
70
- 'aria-label': 'switch-field'
48
+ 'aria-label': others['aria-label'] || 'switch-field'
71
49
  }), state, switchRef),
72
50
  inputProps = _useSwitch.inputProps;
73
51
  var statusClasses = {
74
- isSelected: inputProps.checked
52
+ isSelected: (_inputProps$checked = inputProps.checked) !== null && _inputProps$checked !== void 0 ? _inputProps$checked : false
75
53
  };
76
54
  var _useField = useField(_objectSpread(_objectSpread(_objectSpread({
77
55
  statusClasses: statusClasses
@@ -91,11 +69,13 @@ var SwitchField = /*#__PURE__*/forwardRef(function (props, ref) {
91
69
  }, fieldLabelProps), ___EmotionJSX(Box, fieldControlWrapperProps, ___EmotionJSX(Switch, _extends({
92
70
  ref: switchRef,
93
71
  inputProps: fieldControlInputProps
94
- }, unhandledAriaProps, omit(others, 'data-pendo-id')))), label), helperText && ___EmotionJSX(FieldHelperText, {
72
+ }, unhandledAriaProps, omit(others, 'data-pendo-id', 'aria-label')))), label), helperText && ___EmotionJSX(FieldHelperText, {
95
73
  status: status
96
74
  }, helperText));
97
75
  });
98
- SwitchField.propTypes = switchFieldPropTypes;
99
- SwitchField.defaultProps = _objectSpread({}, statusDefaultProp);
76
+ SwitchField.defaultProps = {
77
+ status: statuses.DEFAULT,
78
+ isDisabled: false
79
+ };
100
80
  SwitchField.displayName = displayName;
101
81
  export default SwitchField;
@@ -47,7 +47,9 @@ export var Controlled = function Controlled() {
47
47
  return ___EmotionJSX(SwitchField, {
48
48
  isSelected: isSelected,
49
49
  label: "Controlled",
50
- onChange: setIsSelected,
50
+ onChange: function onChange() {
51
+ return setIsSelected(!isSelected);
52
+ },
51
53
  value: "my-switch"
52
54
  });
53
55
  };
@@ -79,7 +81,7 @@ export var Required = function Required() {
79
81
  });
80
82
  };
81
83
  export var WithTooltip = function WithTooltip() {
82
- var tooltipTrigger = useRef();
84
+ var tooltipTrigger = useRef(null);
83
85
  return ___EmotionJSX(TooltipTrigger, {
84
86
  crossOffset: 15,
85
87
  offset: 20,
@@ -11,13 +11,8 @@ var _context;
11
11
  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; }
12
12
  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; }
13
13
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
14
- import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
15
- import PropTypes from 'prop-types';
16
14
  import statuses from '../../utils/devUtils/constants/statuses';
17
- import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
18
15
  import { booleanArg, docArgTypes, funcArg } from '../../utils/docUtils/docArgTypes';
19
- import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
20
- import { statusPropTypes } from '../../utils/docUtils/statusProp';
21
16
  var descriptions = {
22
17
  className: 'A list of class names to apply to the input element.',
23
18
  hasAutoFocus: 'Whether the element should receive focus on render.',
@@ -159,26 +154,4 @@ export var switchFieldArgs = {
159
154
  label: 'Example Label',
160
155
  value: 'my-switch',
161
156
  status: statuses.DEFAULT
162
- };
163
- export var switchFieldPropTypes = _objectSpread(_objectSpread(_objectSpread({
164
- className: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
165
- hasAutoFocus: PropTypes.bool,
166
- helperText: PropTypes.node,
167
- hintText: PropTypes.string,
168
- id: PropTypes.string,
169
- isDefaultSelected: PropTypes.bool,
170
- isDisabled: PropTypes.bool,
171
- isReadOnly: PropTypes.bool,
172
- isRequired: PropTypes.bool,
173
- isSelected: PropTypes.bool,
174
- label: PropTypes.node,
175
- name: PropTypes.string,
176
- onBlur: PropTypes.func,
177
- onChange: PropTypes.func,
178
- onFocus: PropTypes.func,
179
- onFocusChange: PropTypes.func,
180
- onKeyDown: PropTypes.func,
181
- onKeyUp: PropTypes.func,
182
- status: PropTypes.oneOf(_Object$values(statuses)),
183
- value: PropTypes.string
184
- }, ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes), statusPropTypes);
157
+ };
@@ -82,7 +82,6 @@ var Tabs = /*#__PURE__*/forwardRef(function (props, ref) {
82
82
  value: state
83
83
  }, ___EmotionJSX(Box, others, ___EmotionJSX(Box, _extends({
84
84
  variant: "tabs",
85
- gap: "25px",
86
85
  isRow: orientation === ORIENTATION.HORIZONTAL
87
86
  }, tabListProps, raTabListProps, {
88
87
  ref: tabListRef,
@@ -43,7 +43,8 @@ export var tabs = {
43
43
  borderBottomWidth: 1,
44
44
  borderBottomStyle: 'solid',
45
45
  borderBottomColor: 'neutral.90',
46
- mb: 'lg'
46
+ mb: 'lg',
47
+ gap: '25px'
47
48
  };
48
49
  export var menuTab = _objectSpread(_objectSpread({}, quiet), {}, {
49
50
  color: 'neutral.40',
@@ -72,12 +72,12 @@ export var Required = function Required(args) {
72
72
  return ___EmotionJSX(TimeField, _extends({}, args, {
73
73
  "aria-label": "timefield-default",
74
74
  isRequired: true,
75
- label: "Example label"
75
+ label: "Lorem Ipsum"
76
76
  }));
77
77
  };
78
78
  export var WithLabel = function WithLabel(args) {
79
79
  return ___EmotionJSX(TimeField, _extends({}, args, {
80
- label: "Loren Ipsum",
80
+ label: "Lorem Ipsum",
81
81
  "aria-label": "timefield-default"
82
82
  }));
83
83
  };
@@ -26,10 +26,14 @@ export default {
26
26
  },
27
27
  breakpoints: breakpoints,
28
28
  fonts: {
29
- standard: '"Helvetica Neue", Helvetica, sans-serif'
29
+ standard: '"Helvetica Neue", Helvetica, sans-serif',
30
+ codeView: '"Roboto Mono", "Lucida Console", Courier, monospace'
30
31
  },
31
32
  fontSizes: fontSizes,
32
33
  fontWeights: fontWeights,
34
+ lineHeights: {
35
+ md: '1.5'
36
+ },
33
37
  sizes: {
34
38
  buttonHeight: 36,
35
39
  column: 400,
@@ -0,0 +1,126 @@
1
+ var nextGenCodeViewTheme = {
2
+ plain: {
3
+ color: '#f8f8f2',
4
+ backgroundColor: '#272822'
5
+ },
6
+ styles: [{
7
+ types: ['comment', 'prolog', 'doctype', 'cdata'],
8
+ style: {
9
+ color: '#93a1a1'
10
+ }
11
+ }, {
12
+ types: ['punctuation'],
13
+ style: {
14
+ color: '#999999'
15
+ }
16
+ }, {
17
+ types: ['deleted', 'property', 'tag', 'boolean', 'number', 'constant', 'symbol'],
18
+ style: {
19
+ color: '#c792ea'
20
+ }
21
+ }, {
22
+ types: ['inserted', 'selector', 'string', 'char', 'builtin', 'inserted', 'attr-name'],
23
+ style: {
24
+ color: '#A1C281'
25
+ }
26
+ }, {
27
+ types: ['operator', 'entity', 'url', 'language-css', 'style'],
28
+ style: {
29
+ color: '#dfc084',
30
+ background: 'transparent'
31
+ }
32
+ }, {
33
+ types: ['atrule', 'attr-value', 'keyword'],
34
+ style: {
35
+ color: '#c792ea'
36
+ }
37
+ }, {
38
+ types: ['function'],
39
+ style: {
40
+ color: '#53bcfd'
41
+ }
42
+ }, {
43
+ types: ['regex', 'important', 'variable'],
44
+ style: {
45
+ color: '#f07178'
46
+ }
47
+ }, {
48
+ types: ['important', 'bold'],
49
+ style: {
50
+ fontWeight: 'bold'
51
+ }
52
+ }, {
53
+ types: ['entity'],
54
+ style: {
55
+ cursor: 'help'
56
+ }
57
+ }]
58
+ };
59
+ var nextGenCodeViewWrapper = {
60
+ bg: 'accent.99',
61
+ border: '1px solid',
62
+ borderColor: 'accent.95',
63
+ width: 400,
64
+ height: 200,
65
+ my: 'xs',
66
+ overflow: 'auto',
67
+ alignItems: 'center',
68
+ '&.is-focused, &:focus': {
69
+ boxShadow: 'focus',
70
+ outline: 'none'
71
+ },
72
+ pre: {
73
+ backgroundColor: 'transparent',
74
+ padding: '1em',
75
+ height: '100%',
76
+ width: '100%',
77
+ overflowX: 'hidden',
78
+ overflowY: 'auto',
79
+ fontSize: '13px',
80
+ '& .token-line': {
81
+ display: 'block',
82
+ alignItems: 'center',
83
+ '& .token': {
84
+ whiteSpace: 'pre-wrap',
85
+ wordBreak: 'break-all'
86
+ }
87
+ },
88
+ fontFamily: 'codeView',
89
+ lineHeight: 'md'
90
+ },
91
+ '&.has-no-copy-button': {
92
+ pre: {
93
+ p: 'sm'
94
+ }
95
+ },
96
+ '&.has-line-numbers': {
97
+ pre: {
98
+ p: '0 10px 0 0',
99
+ overflow: 'auto',
100
+ '& .token-line:first-of-type *': {
101
+ pt: 'sm'
102
+ },
103
+ '& .token-line': {
104
+ display: 'flex',
105
+ '& .token': {
106
+ whiteSpace: 'pre'
107
+ }
108
+ }
109
+ }
110
+ }
111
+ };
112
+ var lineNo = {
113
+ display: 'table-cell',
114
+ userSelect: 'none',
115
+ px: 'xs',
116
+ m: '0 10px 0 0',
117
+ bg: 'accent.30',
118
+ minWidth: 26,
119
+ color: 'white',
120
+ lineHeight: '20px'
121
+ };
122
+ export default {
123
+ theme: nextGenCodeViewTheme,
124
+ wrapper: nextGenCodeViewWrapper,
125
+ lineNo: lineNo
126
+ };
@@ -1,2 +1,2 @@
1
- var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView'];
1
+ var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card'];
2
2
  export default nextGenConvertedComponents;
@@ -11,31 +11,51 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
11
11
  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) { _defineProperty(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; }
12
12
  import merge from 'deepmerge';
13
13
  import theme from '../../theme.js';
14
+ import codeView from './codeView/codeView';
14
15
  import colors from './colors/colors';
15
16
  import buttons from './variants/button';
17
+ import cards from './variants/cards';
18
+ import images from './variants/images';
19
+ import links from './variants/links';
16
20
  import { text as newText } from './variants/text';
17
21
  import variants, { badges } from './variants/variants';
18
22
  import forms from './forms';
23
+ import sizes from './sizes';
24
+ import spacing from './spacing';
19
25
  import { fontSizes, fontWeights } from './text';
20
26
  import './open_sans.css';
27
+ var breakpoints = ['0px', '576px', '768px', '992px', '1200px', '1600px'];
21
28
  var nextGenTheme = {
22
29
  name: 'Next Gen',
23
30
  colors: colors,
31
+ breakpoints: breakpoints,
24
32
  buttons: buttons,
25
33
  forms: forms,
26
34
  fontSizes: fontSizes,
27
35
  fontWeights: fontWeights,
28
36
  lineHeights: {
29
- body: '1.5'
37
+ body: '1.5',
38
+ md: '1.75'
30
39
  },
31
40
  text: newText,
32
41
  fonts: {
33
42
  standard: '"Open Sans", sans-serif',
34
43
  body: '"Open Sans", sans-serif',
35
- heading: '"Open Sans", sans-serif'
44
+ heading: '"Open Sans", sans-serif',
45
+ codeView: 'Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace'
36
46
  },
47
+ sizes: sizes,
37
48
  badges: badges,
38
- variants: variants
49
+ space: spacing,
50
+ links: links,
51
+ cards: cards,
52
+ variants: variants,
53
+ images: images,
54
+ overrides: {
55
+ codeView: codeView
56
+ }
39
57
  };
40
58
  var mergedTheme = merge(theme, nextGenTheme);
41
- export default _objectSpread({}, mergedTheme);
59
+ export default _objectSpread(_objectSpread({}, mergedTheme), {}, {
60
+ breakpoints: breakpoints
61
+ });
@@ -0,0 +1,19 @@
1
+ var avatar = {
2
+ sm: '24px',
3
+ md: '34px',
4
+ lg: '72px',
5
+ xl: '104px'
6
+ };
7
+ var container = {
8
+ xs: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
9
+ sm: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
10
+ md: ['100%', '100%', '720px', '960px', '1140px', '1540px'],
11
+ lg: ['100%', '100%', '100%', '960px', '1140px', '1540px'],
12
+ xl: ['100%', '100%', '100%', '100%', '1140px', '1540px'],
13
+ xx: ['100%', '100%', '100%', '100%', '100%', '1540px'],
14
+ fluid: ['100%', '100%', '100%', '100%', '100%', '100%']
15
+ };
16
+ export default {
17
+ avatar: avatar,
18
+ container: container
19
+ };
@@ -0,0 +1,9 @@
1
+ var scale = {
2
+ xs: '.25rem',
3
+ sm: '.5rem',
4
+ md: '1rem',
5
+ lg: '1.5rem',
6
+ xl: '3rem',
7
+ xx: '4rem'
8
+ };
9
+ export default scale;
@@ -1,17 +1,20 @@
1
1
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
2
2
  var _fontWeights;
3
- var baseSize = 15;
4
- var majorMultiplier = 1.15;
5
- var getFontSize = function getFontSize(major) {
6
- return Math.round(baseSize * Math.pow(majorMultiplier, major));
7
- };
3
+ import sizes from './sizes';
4
+ var fontSizeBase = 0.9375;
8
5
  export var fontSizes = {
9
- 'xs': getFontSize(-2),
10
- 'sm': getFontSize(-1),
11
- 'md': '15px',
12
- 'lg': '18.75px',
13
- 'xl': '22.5px',
14
- 'xx': '26.25px',
15
- 'xxx': '33.75px'
6
+ avatar: {
7
+ 'sm': "calc(".concat(sizes.avatar.sm, " * .4)"),
8
+ 'md': "calc(".concat(sizes.avatar.md, " * .4)"),
9
+ 'lg': "calc(".concat(sizes.avatar.lg, " * .4)"),
10
+ 'xl': "calc(".concat(sizes.avatar.xl, " * .4)")
11
+ },
12
+ 'xs': "".concat(fontSizeBase * 0.8, "rem"),
13
+ 'sm': '0.875rem',
14
+ 'md': "".concat(fontSizeBase * 1, "rem"),
15
+ 'lg': "".concat(fontSizeBase * 1.25, "rem"),
16
+ 'xl': "".concat(fontSizeBase * 1.5, "rem"),
17
+ 'xx': "".concat(fontSizeBase * 1.75, "rem"),
18
+ 'xxx': "".concat(fontSizeBase * 2.25, "rem")
16
19
  };
17
- export var fontWeights = (_fontWeights = {}, _defineProperty(_fontWeights, -1, 400), _defineProperty(_fontWeights, 0, 400), _defineProperty(_fontWeights, 1, 400), _defineProperty(_fontWeights, 2, 600), _defineProperty(_fontWeights, 3, 600), _fontWeights);
20
+ export var fontWeights = (_fontWeights = {}, _defineProperty(_fontWeights, -1, 300), _defineProperty(_fontWeights, 0, 400), _defineProperty(_fontWeights, 1, 400), _defineProperty(_fontWeights, 2, 600), _defineProperty(_fontWeights, 3, 600), _fontWeights);
@@ -47,14 +47,14 @@ var buttonBase = _objectSpread(_objectSpread({}, transitions), {}, {
47
47
  },
48
48
  '&.is-focused': _objectSpread({}, defaultFocus)
49
49
  });
50
- var neutral = _objectSpread(_objectSpread({
50
+ var neutral = _objectSpread(_objectSpread(_objectSpread({
51
51
  color: 'gray-600'
52
- }, buttonBase), {}, {
52
+ }, buttonBase), transitions), {}, {
53
53
  '&.is-pressed': {
54
- backgroundColor: chroma.mix(primaryBlue, 'black', 0.125, 'rgb').hex()
54
+ color: 'white'
55
55
  },
56
56
  '&.is-hovered': {
57
- backgroundColor: chroma.mix(primaryBlue, 'black', 0.075, 'rgb').hex()
57
+ borderColor: 'primary'
58
58
  }
59
59
  });
60
60
  var primary = _objectSpread(_objectSpread({}, buttonBase), {}, {
@@ -152,6 +152,7 @@ var primaryWithIcon = _objectSpread(_objectSpread({}, primary), {}, {
152
152
  color: 'white'
153
153
  });
154
154
  var baseIconButton = {
155
+ cursor: 'pointer',
155
156
  transition: 'color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out',
156
157
  outline: 'none',
157
158
  borderRadius: '28px',
@@ -231,7 +232,26 @@ var iconButtons = {
231
232
  }
232
233
  }, transitions)
233
234
  },
234
- messageCloseButton: _objectSpread({}, baseIconButton)
235
+ messageCloseButton: _objectSpread({}, baseIconButton),
236
+ headerNav: _objectSpread(_objectSpread({}, baseIconButton), {}, {
237
+ borderRadius: '4px',
238
+ path: {
239
+ fill: 'gray-800'
240
+ },
241
+ px: 'md',
242
+ py: 'sm',
243
+ width: '56px',
244
+ '&.is-hovered': {
245
+ path: {
246
+ fill: 'gray-500'
247
+ }
248
+ },
249
+ '&.is-pressed': {
250
+ path: {
251
+ fill: 'gray-500'
252
+ }
253
+ }
254
+ })
235
255
  };
236
256
  var buttons = {
237
257
  neutral: neutral,
@@ -0,0 +1,20 @@
1
+ var interactive = {
2
+ boxShadow: 'none',
3
+ borderRadius: '1rem',
4
+ border: '1px solid',
5
+ borderColor: 'gray-300',
6
+ transition: 'border-color .15s ease-in',
7
+ '&.is-focused': {
8
+ outline: '2px solid',
9
+ outlineColor: 'focus',
10
+ outlineOffset: '0px'
11
+ },
12
+ '&.is-hovered': {
13
+ outline: 'none',
14
+ borderColor: 'blue',
15
+ bg: 'default'
16
+ }
17
+ };
18
+ export default {
19
+ interactive: interactive
20
+ };
@@ -0,0 +1,4 @@
1
+ var avatar = {};
2
+ export default {
3
+ avatar: avatar
4
+ };
@@ -0,0 +1,54 @@
1
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
2
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
+ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
5
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
+ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
+ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
+ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
+ 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; }
11
+ 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) { _defineProperty(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; }
12
+ var nextGen = {
13
+ color: 'gray-800',
14
+ fontSize: 'md',
15
+ py: 'sm',
16
+ px: 'md',
17
+ textDecoration: 'none',
18
+ borderRadius: '4px',
19
+ lineHeight: '1.5',
20
+ minHeight: '22.5px',
21
+ fontFamily: 'standard',
22
+ '&.is-hovered': {
23
+ color: 'blue-600'
24
+ },
25
+ '&.is-pressed': {
26
+ color: 'blue-600'
27
+ }
28
+ };
29
+ var sideNav = _objectSpread(_objectSpread({}, nextGen), {}, {
30
+ px: '0',
31
+ display: 'block',
32
+ position: 'relative',
33
+ '&:before': {
34
+ position: 'absolute',
35
+ display: 'block',
36
+ borderRadius: '.25rem',
37
+ content: '""',
38
+ top: '0',
39
+ right: '-1rem',
40
+ bottom: 0,
41
+ left: '-1rem',
42
+ transition: 'background-color .15s ease'
43
+ },
44
+ '&.is-selected': {
45
+ color: 'blue-600',
46
+ '&:before': {
47
+ backgroundColor: 'active_light'
48
+ }
49
+ }
50
+ });
51
+ export default {
52
+ nextGen: nextGen,
53
+ sideNav: sideNav
54
+ };
@@ -45,7 +45,7 @@ var hTags = {
45
45
  color: 'text.primary',
46
46
  fontFamily: 'standard',
47
47
  fontWeight: 1,
48
- fontSize: 'sm'
48
+ fontSize: 'xs'
49
49
  }
50
50
  };
51
51
  export var text = _objectSpread({
@@ -58,12 +58,19 @@ export var text = _objectSpread({
58
58
  color: 'text.primary'
59
59
  },
60
60
  placeholder: {
61
- color: 'text.primary'
61
+ color: 'text.primary',
62
+ fontWeight: 1
62
63
  },
63
64
  paragraph: {
64
65
  lineHeight: 'body'
65
66
  },
66
67
  listViewItemText: {
67
68
  fontWeight: 2
69
+ },
70
+ small: {
71
+ fontSize: 'sm',
72
+ color: 'gray-500',
73
+ fontFamily: 'standard',
74
+ lineHeight: 'md'
68
75
  }
69
76
  }, hTags);