@pingux/astro 2.84.0 → 2.85.0-alpha.15
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.
- package/lib/cjs/components/Avatar/Avatar.js +43 -8
- package/lib/cjs/components/Avatar/Avatar.test.js +10 -1
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +5 -3
- package/lib/cjs/components/SwitchField/SwitchField.d.ts +4 -0
- package/lib/cjs/components/SwitchField/SwitchField.js +12 -32
- package/lib/cjs/components/SwitchField/SwitchField.stories.d.ts +11 -0
- package/lib/cjs/components/SwitchField/SwitchField.stories.js +4 -2
- package/lib/cjs/components/SwitchField/SwitchField.test.d.ts +1 -0
- package/lib/cjs/components/SwitchField/index.d.ts +1 -0
- package/lib/cjs/components/SwitchField/switchFieldAttributes.d.ts +94 -0
- package/lib/cjs/components/SwitchField/switchFieldAttributes.js +2 -30
- package/lib/cjs/components/TimeField/TimeField.stories.js +2 -2
- package/lib/cjs/styles/themes/next-gen/codeView/codeView.d.ts +1 -1
- package/lib/cjs/styles/themes/next-gen/codeView/codeView.js +2 -2
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +64 -31
- package/lib/cjs/styles/themes/next-gen/next-gen.js +4 -11
- package/lib/cjs/styles/themes/next-gen/sizes.d.ts +18 -0
- package/lib/cjs/styles/themes/next-gen/sizes.js +27 -0
- package/lib/cjs/styles/themes/next-gen/text.d.ts +6 -0
- package/lib/cjs/styles/themes/next-gen/text.js +14 -6
- package/lib/cjs/styles/themes/next-gen/variants/cards.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/images.d.ts +4 -0
- package/lib/cjs/styles/themes/next-gen/variants/images.js +12 -0
- package/lib/cjs/styles/themes/next-gen/variants/links.js +4 -4
- package/lib/cjs/styles/themes/next-gen/variants/text.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +48 -30
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +51 -26
- package/lib/cjs/types/avatar.d.ts +5 -1
- package/lib/cjs/types/checkboxField.d.ts +3 -1
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +19 -8
- package/lib/cjs/types/switchField.d.ts +29 -0
- package/lib/cjs/types/switchField.js +6 -0
- package/lib/components/Avatar/Avatar.js +44 -7
- package/lib/components/Avatar/Avatar.test.js +10 -1
- package/lib/components/CheckboxField/CheckboxField.stories.js +5 -3
- package/lib/components/SwitchField/SwitchField.js +14 -34
- package/lib/components/SwitchField/SwitchField.stories.js +4 -2
- package/lib/components/SwitchField/switchFieldAttributes.js +1 -28
- package/lib/components/TimeField/TimeField.stories.js +2 -2
- package/lib/styles/themes/next-gen/codeView/codeView.js +2 -2
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/next-gen.js +4 -11
- package/lib/styles/themes/next-gen/sizes.js +19 -0
- package/lib/styles/themes/next-gen/text.js +14 -6
- package/lib/styles/themes/next-gen/variants/cards.js +1 -1
- package/lib/styles/themes/next-gen/variants/images.js +4 -0
- package/lib/styles/themes/next-gen/variants/links.js +4 -4
- package/lib/styles/themes/next-gen/variants/text.js +1 -1
- package/lib/styles/themes/next-gen/variants/variants.js +51 -26
- package/lib/types/index.js +1 -0
- package/lib/types/switchField.js +1 -0
- package/package.json +1 -1
- package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.d.ts +0 -6
- package/lib/cjs/recipes/NextGen/DefaultAvatar.stories.js +0 -41
- 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", "
|
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
|
-
|
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
|
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
|
-
|
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
|
-
|
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.
|
99
|
-
|
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:
|
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
|
+
};
|
@@ -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: "
|
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: "
|
80
|
+
label: "Lorem Ipsum",
|
81
81
|
"aria-label": "timefield-default"
|
82
82
|
}));
|
83
83
|
};
|
@@ -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', 'MultivaluesField', 'Text', 'Link', 'Card'];
|
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;
|
@@ -15,10 +15,12 @@ import codeView from './codeView/codeView';
|
|
15
15
|
import colors from './colors/colors';
|
16
16
|
import buttons from './variants/button';
|
17
17
|
import cards from './variants/cards';
|
18
|
+
import images from './variants/images';
|
18
19
|
import links from './variants/links';
|
19
20
|
import { text as newText } from './variants/text';
|
20
21
|
import variants, { badges } from './variants/variants';
|
21
22
|
import forms from './forms';
|
23
|
+
import sizes from './sizes';
|
22
24
|
import spacing from './spacing';
|
23
25
|
import { fontSizes, fontWeights } from './text';
|
24
26
|
import './open_sans.css';
|
@@ -42,22 +44,13 @@ var nextGenTheme = {
|
|
42
44
|
heading: '"Open Sans", sans-serif',
|
43
45
|
codeView: 'Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace'
|
44
46
|
},
|
45
|
-
sizes:
|
46
|
-
container: {
|
47
|
-
xs: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
|
48
|
-
sm: ['100%', '540px', '720px', '960px', '1140px', '1540px'],
|
49
|
-
md: ['100%', '100%', '720px', '960px', '1140px', '1540px'],
|
50
|
-
lg: ['100%', '100%', '100%', '960px', '1140px', '1540px'],
|
51
|
-
xl: ['100%', '100%', '100%', '100%', '1140px', '1540px'],
|
52
|
-
xx: ['100%', '100%', '100%', '100%', '100%', '1540px'],
|
53
|
-
fluid: ['100%', '100%', '100%', '100%', '100%', '100%']
|
54
|
-
}
|
55
|
-
},
|
47
|
+
sizes: sizes,
|
56
48
|
badges: badges,
|
57
49
|
space: spacing,
|
58
50
|
links: links,
|
59
51
|
cards: cards,
|
60
52
|
variants: variants,
|
53
|
+
images: images,
|
61
54
|
overrides: {
|
62
55
|
codeView: codeView
|
63
56
|
}
|
@@ -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
|
+
};
|
@@ -1,12 +1,20 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
2
2
|
var _fontWeights;
|
3
|
+
import sizes from './sizes';
|
4
|
+
var fontSizeBase = 0.9375;
|
3
5
|
export var fontSizes = {
|
4
|
-
|
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"),
|
5
13
|
'sm': '0.875rem',
|
6
|
-
'md':
|
7
|
-
'lg':
|
8
|
-
'xl':
|
9
|
-
'xx':
|
10
|
-
'xxx':
|
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")
|
11
19
|
};
|
12
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);
|
@@ -16,14 +16,14 @@ var nextGen = {
|
|
16
16
|
px: 'md',
|
17
17
|
textDecoration: 'none',
|
18
18
|
borderRadius: '4px',
|
19
|
-
lineHeight: '
|
19
|
+
lineHeight: '1.5',
|
20
20
|
minHeight: '22.5px',
|
21
21
|
fontFamily: 'standard',
|
22
22
|
'&.is-hovered': {
|
23
|
-
color: '
|
23
|
+
color: 'blue-600'
|
24
24
|
},
|
25
25
|
'&.is-pressed': {
|
26
|
-
color: '
|
26
|
+
color: 'blue-600'
|
27
27
|
}
|
28
28
|
};
|
29
29
|
var sideNav = _objectSpread(_objectSpread({}, nextGen), {}, {
|
@@ -42,7 +42,7 @@ var sideNav = _objectSpread(_objectSpread({}, nextGen), {}, {
|
|
42
42
|
transition: 'background-color .15s ease'
|
43
43
|
},
|
44
44
|
'&.is-selected': {
|
45
|
-
color: '
|
45
|
+
color: 'blue-600',
|
46
46
|
'&:before': {
|
47
47
|
backgroundColor: 'active_light'
|
48
48
|
}
|
@@ -239,33 +239,49 @@ var separator = {
|
|
239
239
|
bg: 'gray-300'
|
240
240
|
}
|
241
241
|
};
|
242
|
-
var
|
242
|
+
var avatar = {
|
243
|
+
backgroundColor: 'lightcyan',
|
244
|
+
color: 'darkcyan',
|
245
|
+
cursor: 'pointer',
|
246
|
+
'&.is-orange': {
|
247
|
+
backgroundColor: 'lightorange',
|
248
|
+
color: 'darkorange'
|
249
|
+
},
|
250
|
+
'&.is-green': {
|
251
|
+
backgroundColor: 'lightgreen',
|
252
|
+
color: 'darkgreen'
|
253
|
+
},
|
254
|
+
'&.is-purple': {
|
255
|
+
backgroundColor: 'lightpurple',
|
256
|
+
color: 'darkpurple'
|
257
|
+
},
|
258
|
+
'&.is-pink': {
|
259
|
+
backgroundColor: 'lightpink',
|
260
|
+
color: 'darkpink'
|
261
|
+
},
|
262
|
+
'&.is-red': {
|
263
|
+
backgroundColor: 'lightred',
|
264
|
+
color: 'darkred'
|
265
|
+
},
|
266
|
+
'&.is-yellow': {
|
267
|
+
backgroundColor: 'lightyellow',
|
268
|
+
color: 'darkyellow'
|
269
|
+
},
|
270
|
+
'&.is-cyan': {
|
271
|
+
backgroundColor: 'lightcyan',
|
272
|
+
color: 'darkcyan'
|
273
|
+
},
|
274
|
+
'&.is-teal': {
|
275
|
+
backgroundColor: 'lightteal',
|
276
|
+
color: 'darkteal'
|
277
|
+
},
|
278
|
+
display: 'flex',
|
243
279
|
borderRadius: '50%',
|
244
280
|
textAlign: 'center',
|
281
|
+
alignItems: 'center',
|
245
282
|
justifyContent: 'center',
|
246
283
|
fontFamily: 'standard'
|
247
284
|
};
|
248
|
-
var avatar = {
|
249
|
-
xl: _objectSpread({
|
250
|
-
size: '104px',
|
251
|
-
fontSize: 'calc(104px * .4)'
|
252
|
-
}, avatarBase),
|
253
|
-
lg: _objectSpread(_objectSpread({
|
254
|
-
size: '72px'
|
255
|
-
}, avatarBase), {}, {
|
256
|
-
fontSize: 'calc(72px * .4)'
|
257
|
-
}),
|
258
|
-
md: _objectSpread(_objectSpread({
|
259
|
-
size: '34px'
|
260
|
-
}, avatarBase), {}, {
|
261
|
-
fontSize: 'calc(34px * .4)'
|
262
|
-
}),
|
263
|
-
sm: _objectSpread(_objectSpread({
|
264
|
-
size: '24px'
|
265
|
-
}, avatarBase), {}, {
|
266
|
-
fontSize: 'calc(24px * .4)'
|
267
|
-
})
|
268
|
-
};
|
269
285
|
var progressBarContainer = {
|
270
286
|
backgroundColor: 'gray-200',
|
271
287
|
borderRadius: '.5rem',
|
@@ -305,8 +321,8 @@ var listViewItem = {
|
|
305
321
|
}
|
306
322
|
},
|
307
323
|
styledContainer: {
|
308
|
-
py: '
|
309
|
-
px: '
|
324
|
+
py: 'md',
|
325
|
+
px: 'lg',
|
310
326
|
bg: 'transparent',
|
311
327
|
'&.is-hovered': {
|
312
328
|
bg: 'transparent',
|
@@ -428,8 +444,17 @@ var listView = {
|
|
428
444
|
borderRadius: '16px',
|
429
445
|
border: '1px solid',
|
430
446
|
borderColor: '#e7eef4',
|
431
|
-
'& > div': {
|
432
|
-
|
447
|
+
'& > div > div': {
|
448
|
+
'& > div:first-of-type': {
|
449
|
+
'& > div > div': {
|
450
|
+
borderRadius: '16px 16px 0 0'
|
451
|
+
}
|
452
|
+
},
|
453
|
+
'& > div:last-of-type': {
|
454
|
+
'& > div > div': {
|
455
|
+
borderRadius: ' 0 0 16px 16px'
|
456
|
+
}
|
457
|
+
}
|
433
458
|
}
|
434
459
|
}
|
435
460
|
};
|
package/lib/types/index.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/package.json
CHANGED
@@ -1,41 +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"] = exports.Default = void 0;
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
10
|
-
var _ = require("../..");
|
11
|
-
var _react2 = require("@emotion/react");
|
12
|
-
var _default = {
|
13
|
-
title: 'Next Gen Recipes/Default Avatar'
|
14
|
-
};
|
15
|
-
exports["default"] = _default;
|
16
|
-
var Default = function Default() {
|
17
|
-
return (0, _react2.jsx)(_.AstroProvider, {
|
18
|
-
themeOverrides: [_.NextGenTheme]
|
19
|
-
}, (0, _react2.jsx)(_.Box, {
|
20
|
-
isRow: true,
|
21
|
-
gap: "md",
|
22
|
-
alignItems: "center"
|
23
|
-
}, (0, _react2.jsx)(_.Box, {
|
24
|
-
variant: "avatar.sm",
|
25
|
-
backgroundColor: "green-100",
|
26
|
-
color: "green-800"
|
27
|
-
}, "AT"), (0, _react2.jsx)(_.Box, {
|
28
|
-
variant: "avatar.md",
|
29
|
-
backgroundColor: "blue-100",
|
30
|
-
color: "blue-800"
|
31
|
-
}, "LP"), (0, _react2.jsx)(_.Box, {
|
32
|
-
variant: "avatar.lg",
|
33
|
-
backgroundColor: "teal-100",
|
34
|
-
color: "teal-800"
|
35
|
-
}, "WP"), (0, _react2.jsx)(_.Box, {
|
36
|
-
variant: "avatar.xl",
|
37
|
-
backgroundColor: "red-100",
|
38
|
-
color: "red-800"
|
39
|
-
}, "JS")));
|
40
|
-
};
|
41
|
-
exports.Default = Default;
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { AstroProvider, Box, NextGenTheme } from '../..';
|
3
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
4
|
-
export default {
|
5
|
-
title: 'Next Gen Recipes/Default Avatar'
|
6
|
-
};
|
7
|
-
export var Default = function Default() {
|
8
|
-
return ___EmotionJSX(AstroProvider, {
|
9
|
-
themeOverrides: [NextGenTheme]
|
10
|
-
}, ___EmotionJSX(Box, {
|
11
|
-
isRow: true,
|
12
|
-
gap: "md",
|
13
|
-
alignItems: "center"
|
14
|
-
}, ___EmotionJSX(Box, {
|
15
|
-
variant: "avatar.sm",
|
16
|
-
backgroundColor: "green-100",
|
17
|
-
color: "green-800"
|
18
|
-
}, "AT"), ___EmotionJSX(Box, {
|
19
|
-
variant: "avatar.md",
|
20
|
-
backgroundColor: "blue-100",
|
21
|
-
color: "blue-800"
|
22
|
-
}, "LP"), ___EmotionJSX(Box, {
|
23
|
-
variant: "avatar.lg",
|
24
|
-
backgroundColor: "teal-100",
|
25
|
-
color: "teal-800"
|
26
|
-
}, "WP"), ___EmotionJSX(Box, {
|
27
|
-
variant: "avatar.xl",
|
28
|
-
backgroundColor: "red-100",
|
29
|
-
color: "red-800"
|
30
|
-
}, "JS")));
|
31
|
-
};
|