@pingux/astro 2.145.1-alpha.0 → 2.146.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/Avatar/Avatar.js +14 -6
- package/lib/cjs/components/Avatar/Avatar.stories.d.ts +5 -0
- package/lib/cjs/components/Avatar/Avatar.stories.js +76 -2
- package/lib/cjs/components/Avatar/stories/Avatar.chromatic.stories.js +21 -0
- package/lib/cjs/components/Avatar/stories/AvatarNextGen.chromatic.stories.d.ts +6 -0
- package/lib/cjs/components/Avatar/stories/AvatarNextGen.chromatic.stories.js +22 -0
- package/lib/cjs/components/Avatar/stories/AvatarNextGen.d.ts +3 -0
- package/lib/cjs/components/Avatar/stories/AvatarNextGen.js +16 -0
- package/lib/cjs/components/Avatar/stories/AvatarNextGenDark.chromatic.stories.d.ts +6 -0
- package/lib/cjs/components/Avatar/stories/AvatarNextGenDark.chromatic.stories.js +22 -0
- package/lib/cjs/components/ListView/ListView.d.ts +2 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/avatar.d.ts +8 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/avatar.js +9 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +8 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +2 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +45 -0
- package/lib/cjs/styles/themes/next-gen/sizes.d.ts +6 -0
- package/lib/cjs/styles/themes/next-gen/sizes.js +8 -1
- package/lib/cjs/styles/themes/next-gen/variants/avatar.d.ts +39 -0
- package/lib/cjs/styles/themes/next-gen/variants/avatar.js +41 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +39 -0
- package/lib/cjs/types/avatar.d.ts +1 -0
- package/lib/cjs/types/listView.d.ts +1 -1
- package/lib/components/Avatar/Avatar.js +14 -6
- package/lib/components/Avatar/Avatar.stories.js +70 -1
- package/lib/components/Avatar/stories/Avatar.chromatic.stories.js +11 -0
- package/lib/components/Avatar/stories/AvatarNextGen.chromatic.stories.js +12 -0
- package/lib/components/Avatar/stories/AvatarNextGen.js +7 -0
- package/lib/components/Avatar/stories/AvatarNextGenDark.chromatic.stories.js +12 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/avatar.js +9 -1
- package/lib/styles/themes/next-gen/convertedComponentList.js +2 -1
- package/lib/styles/themes/next-gen/sizes.js +8 -1
- package/lib/styles/themes/next-gen/variants/avatar.js +40 -0
- package/package.json +1 -1
|
@@ -21,23 +21,29 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-c
|
|
|
21
21
|
var _react = _interopRequireWildcard(require("react"));
|
|
22
22
|
var _themeUi = require("theme-ui");
|
|
23
23
|
var _hooks = require("../../hooks");
|
|
24
|
+
var _sizes = _interopRequireDefault(require("../../styles/themes/next-gen/sizes"));
|
|
24
25
|
var _react2 = require("@emotion/react");
|
|
25
|
-
var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx"];
|
|
26
|
+
var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx", "children", "isSquare"];
|
|
26
27
|
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); }
|
|
27
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
28
29
|
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; }
|
|
29
30
|
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; }
|
|
30
31
|
var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
32
|
+
var _useStatusClasses2;
|
|
31
33
|
var _props$alt = props.alt,
|
|
32
34
|
alt = _props$alt === void 0 ? 'Avatar' : _props$alt,
|
|
33
|
-
defaultText = props.defaultText,
|
|
35
|
+
_props$defaultText = props.defaultText,
|
|
36
|
+
defaultText = _props$defaultText === void 0 ? 'AA' : _props$defaultText,
|
|
34
37
|
color = props.color,
|
|
35
38
|
className = props.className,
|
|
36
|
-
size = props.size,
|
|
39
|
+
_props$size = props.size,
|
|
40
|
+
size = _props$size === void 0 ? 'sm' : _props$size,
|
|
37
41
|
src = props.src,
|
|
38
42
|
sx = props.sx,
|
|
43
|
+
children = props.children,
|
|
44
|
+
isSquare = props.isSquare,
|
|
39
45
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
40
|
-
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, (0, _defineProperty2["default"])(
|
|
46
|
+
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, (_useStatusClasses2 = {}, (0, _defineProperty2["default"])(_useStatusClasses2, "is-".concat(color), color), (0, _defineProperty2["default"])(_useStatusClasses2, "size-".concat(size), size), (0, _defineProperty2["default"])(_useStatusClasses2, "font-size-".concat(size), size), (0, _defineProperty2["default"])(_useStatusClasses2, 'is-square', isSquare), _useStatusClasses2)),
|
|
41
47
|
classNames = _useStatusClasses.classNames;
|
|
42
48
|
if (src) {
|
|
43
49
|
return (0, _react2.jsx)(_themeUi.Avatar, (0, _extends2["default"])({
|
|
@@ -45,7 +51,9 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
45
51
|
alt: alt,
|
|
46
52
|
src: src,
|
|
47
53
|
sx: _objectSpread({
|
|
48
|
-
size: size
|
|
54
|
+
size: size,
|
|
55
|
+
width: _sizes["default"].avatar[size],
|
|
56
|
+
height: _sizes["default"].avatar[size]
|
|
49
57
|
}, sx)
|
|
50
58
|
}, others));
|
|
51
59
|
}
|
|
@@ -56,7 +64,7 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
56
64
|
size: size,
|
|
57
65
|
fontSize: size
|
|
58
66
|
}, sx)
|
|
59
|
-
}, others), defaultText);
|
|
67
|
+
}, others), children || defaultText);
|
|
60
68
|
});
|
|
61
69
|
Avatar.displayName = 'Avatar';
|
|
62
70
|
var _default = Avatar;
|
|
@@ -3,3 +3,8 @@ import { AvatarProps } from '../../types/avatar';
|
|
|
3
3
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: StoryFn<AvatarProps>;
|
|
6
|
+
export declare const WithSizeVariation: StoryFn<AvatarProps>;
|
|
7
|
+
export declare const WithColorVariation: StoryFn<AvatarProps>;
|
|
8
|
+
export declare const WithIconVariation: StoryFn<AvatarProps>;
|
|
9
|
+
export declare const WithImageVariation: StoryFn<AvatarProps>;
|
|
10
|
+
export declare const WithSquareVariation: StoryFn<AvatarProps>;
|
|
@@ -5,10 +5,11 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
5
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = exports.Default = void 0;
|
|
8
|
+
exports["default"] = exports.WithSquareVariation = exports.WithSizeVariation = exports.WithImageVariation = exports.WithIconVariation = exports.WithColorVariation = exports.Default = void 0;
|
|
9
9
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectDestructuringEmpty"));
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _CogOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/CogOutlineIcon"));
|
|
12
13
|
var _storybookAddonDesigns = require("storybook-addon-designs");
|
|
13
14
|
var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
|
|
14
15
|
var _index = require("../../index");
|
|
@@ -60,4 +61,77 @@ var Default = function Default(_ref) {
|
|
|
60
61
|
var args = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref), _ref));
|
|
61
62
|
return (0, _react2.jsx)(_index.Avatar, args);
|
|
62
63
|
};
|
|
63
|
-
exports.Default = Default;
|
|
64
|
+
exports.Default = Default;
|
|
65
|
+
var WithSizeVariation = function WithSizeVariation() {
|
|
66
|
+
return (0, _react2.jsx)(_index.Box, {
|
|
67
|
+
isRow: true,
|
|
68
|
+
gap: "sm",
|
|
69
|
+
alignItems: "center"
|
|
70
|
+
}, (0, _react2.jsx)(_index.Avatar, {
|
|
71
|
+
size: "sm",
|
|
72
|
+
color: "green"
|
|
73
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
74
|
+
size: "md",
|
|
75
|
+
color: "green"
|
|
76
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
77
|
+
size: "lg",
|
|
78
|
+
color: "green"
|
|
79
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
80
|
+
size: "xl",
|
|
81
|
+
color: "green"
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
|
+
exports.WithSizeVariation = WithSizeVariation;
|
|
85
|
+
var WithColorVariation = function WithColorVariation() {
|
|
86
|
+
return (0, _react2.jsx)(_index.Box, {
|
|
87
|
+
isRow: true,
|
|
88
|
+
gap: "sm",
|
|
89
|
+
alignItems: "center"
|
|
90
|
+
}, (0, _react2.jsx)(_index.Avatar, {
|
|
91
|
+
color: "green"
|
|
92
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
93
|
+
color: "purple"
|
|
94
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
95
|
+
color: "pink"
|
|
96
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
97
|
+
color: "red"
|
|
98
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
99
|
+
color: "orange"
|
|
100
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
101
|
+
color: "yellow"
|
|
102
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
103
|
+
color: "teal"
|
|
104
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
105
|
+
color: "cyan"
|
|
106
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
107
|
+
color: "blue"
|
|
108
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
109
|
+
color: "indigo"
|
|
110
|
+
}));
|
|
111
|
+
};
|
|
112
|
+
exports.WithColorVariation = WithColorVariation;
|
|
113
|
+
var WithIconVariation = function WithIconVariation() {
|
|
114
|
+
return (0, _react2.jsx)(_index.Avatar, {
|
|
115
|
+
color: "green"
|
|
116
|
+
}, (0, _react2.jsx)(_index.IconWrapper, {
|
|
117
|
+
icon: _CogOutlineIcon["default"],
|
|
118
|
+
color: "green",
|
|
119
|
+
size: "xs",
|
|
120
|
+
title: {
|
|
121
|
+
name: 'Cog Outline Icon'
|
|
122
|
+
}
|
|
123
|
+
}));
|
|
124
|
+
};
|
|
125
|
+
exports.WithIconVariation = WithIconVariation;
|
|
126
|
+
var WithImageVariation = function WithImageVariation(_ref2) {
|
|
127
|
+
var args = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref2), _ref2));
|
|
128
|
+
return (0, _react2.jsx)(_index.Avatar, args);
|
|
129
|
+
};
|
|
130
|
+
exports.WithImageVariation = WithImageVariation;
|
|
131
|
+
var WithSquareVariation = function WithSquareVariation() {
|
|
132
|
+
return (0, _react2.jsx)(_index.Avatar, {
|
|
133
|
+
color: "green",
|
|
134
|
+
isSquare: true
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
exports.WithSquareVariation = WithSquareVariation;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 _withUiLibraryCss = _interopRequireDefault(require("../../../styles/themeOverrides/withUiLibraryCss"));
|
|
11
|
+
var _AvatarNextGen = _interopRequireDefault(require("./AvatarNextGen"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
var _default = {
|
|
14
|
+
title: 'Chromatic Only Avatar',
|
|
15
|
+
decorators: [_withUiLibraryCss["default"]]
|
|
16
|
+
};
|
|
17
|
+
exports["default"] = _default;
|
|
18
|
+
var Default = function Default() {
|
|
19
|
+
return (0, _react2.jsx)(_AvatarNextGen["default"], null);
|
|
20
|
+
};
|
|
21
|
+
exports.Default = Default;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 _AvatarNextGen = _interopRequireDefault(require("./AvatarNextGen"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
var _default = {
|
|
14
|
+
title: 'Chromatic Only Onyx Avatar'
|
|
15
|
+
};
|
|
16
|
+
exports["default"] = _default;
|
|
17
|
+
var Default = function Default() {
|
|
18
|
+
return (0, _react2.jsx)(_.AstroProvider, {
|
|
19
|
+
theme: _.NextGenTheme
|
|
20
|
+
}, (0, _react2.jsx)(_AvatarNextGen["default"], null));
|
|
21
|
+
};
|
|
22
|
+
exports.Default = Default;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _index = require("../../../index");
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
var AvatarNextGen = function AvatarNextGen() {
|
|
13
|
+
return (0, _react2.jsx)(_index.Avatar, null);
|
|
14
|
+
};
|
|
15
|
+
var _default = AvatarNextGen;
|
|
16
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 _AvatarNextGen = _interopRequireDefault(require("./AvatarNextGen"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
var _default = {
|
|
14
|
+
title: 'Chromatic Only Onyx Dark Avatar'
|
|
15
|
+
};
|
|
16
|
+
exports["default"] = _default;
|
|
17
|
+
var Default = function Default() {
|
|
18
|
+
return (0, _react2.jsx)(_.AstroProvider, {
|
|
19
|
+
themeOverrides: [_.NextGenDarkTheme]
|
|
20
|
+
}, (0, _react2.jsx)(_AvatarNextGen["default"], null));
|
|
21
|
+
};
|
|
22
|
+
exports.Default = Default;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ListLayout } from '@react-stately/layout';
|
|
3
3
|
import { ListViewProps } from '../../types/listView';
|
|
4
|
+
import { ExampleItemProps } from './ListView.stories';
|
|
4
5
|
export declare const collectionTypes: {
|
|
5
6
|
ITEM: string;
|
|
6
7
|
LOADER: string;
|
|
7
8
|
PLACEHOLDER: string;
|
|
8
9
|
};
|
|
9
10
|
export declare function useListLayout(state: any): ListLayout<unknown>;
|
|
10
|
-
declare const ListView: React.ForwardRefExoticComponent<ListViewProps & React.RefAttributes<unknown>>;
|
|
11
|
+
declare const ListView: React.ForwardRefExoticComponent<ListViewProps<ExampleItemProps> & React.RefAttributes<unknown>>;
|
|
11
12
|
export default ListView;
|
|
@@ -34,6 +34,14 @@ export declare const avatar: {
|
|
|
34
34
|
backgroundColor: string;
|
|
35
35
|
color: string;
|
|
36
36
|
};
|
|
37
|
+
'&.is-blue': {
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
'&.is-indigo': {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
color: string;
|
|
44
|
+
};
|
|
37
45
|
display: string;
|
|
38
46
|
borderRadius: string;
|
|
39
47
|
textAlign: string;
|
|
@@ -18,7 +18,7 @@ var avatar = {
|
|
|
18
18
|
color: 'black'
|
|
19
19
|
},
|
|
20
20
|
'&.is-purple': {
|
|
21
|
-
backgroundColor: 'purple',
|
|
21
|
+
backgroundColor: 'purple-400',
|
|
22
22
|
color: 'black'
|
|
23
23
|
},
|
|
24
24
|
'&.is-pink': {
|
|
@@ -41,6 +41,14 @@ var avatar = {
|
|
|
41
41
|
backgroundColor: 'teal',
|
|
42
42
|
color: 'black'
|
|
43
43
|
},
|
|
44
|
+
'&.is-blue': {
|
|
45
|
+
backgroundColor: 'blue',
|
|
46
|
+
color: 'black'
|
|
47
|
+
},
|
|
48
|
+
'&.is-indigo': {
|
|
49
|
+
backgroundColor: 'indigo',
|
|
50
|
+
color: 'black'
|
|
51
|
+
},
|
|
44
52
|
display: 'flex',
|
|
45
53
|
borderRadius: '50%',
|
|
46
54
|
textAlign: 'center',
|
|
@@ -62,6 +62,14 @@ declare const _default: {
|
|
|
62
62
|
backgroundColor: string;
|
|
63
63
|
color: string;
|
|
64
64
|
};
|
|
65
|
+
'&.is-blue': {
|
|
66
|
+
backgroundColor: string;
|
|
67
|
+
color: string;
|
|
68
|
+
};
|
|
69
|
+
'&.is-indigo': {
|
|
70
|
+
backgroundColor: string;
|
|
71
|
+
color: string;
|
|
72
|
+
};
|
|
65
73
|
display: string;
|
|
66
74
|
borderRadius: string;
|
|
67
75
|
textAlign: string;
|
|
@@ -5,7 +5,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.nextGenOnlyComponents = exports["default"] = exports.componentSpecificNextGenBlacklist = exports.astroBlacklistStory = void 0;
|
|
8
|
-
var nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary'];
|
|
8
|
+
var nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary', 'Avatar'];
|
|
9
9
|
var componentSpecificNextGenBlacklist = {
|
|
10
10
|
AstroProvider: ['Default', 'With Custom Theme Override'],
|
|
11
11
|
Messages: ['Customization'],
|
|
@@ -24,6 +24,7 @@ var astroBlacklistStory = {
|
|
|
24
24
|
SearchField: ['Onyx With Filter'],
|
|
25
25
|
Callout: ['Customizations'],
|
|
26
26
|
StatusIcon: ['Default', 'In Rocker Button'],
|
|
27
|
+
Avatar: ['With Size Variation', 'With Color Variation', 'With Icon Variation', 'With Square Variation'],
|
|
27
28
|
Text: ['Onyx'],
|
|
28
29
|
Loader: ['Circular', 'CustomCircular']
|
|
29
30
|
};
|
|
@@ -2081,6 +2081,12 @@ declare const _default: {
|
|
|
2081
2081
|
lg: string;
|
|
2082
2082
|
xl: string;
|
|
2083
2083
|
};
|
|
2084
|
+
avatarFontSize: {
|
|
2085
|
+
sm: string;
|
|
2086
|
+
md: string;
|
|
2087
|
+
lg: string;
|
|
2088
|
+
xl: string;
|
|
2089
|
+
};
|
|
2084
2090
|
container: {
|
|
2085
2091
|
xs: string[];
|
|
2086
2092
|
sm: string[];
|
|
@@ -3593,6 +3599,45 @@ declare const _default: {
|
|
|
3593
3599
|
backgroundColor: string;
|
|
3594
3600
|
color: string;
|
|
3595
3601
|
};
|
|
3602
|
+
'&.is-blue': {
|
|
3603
|
+
backgroundColor: string;
|
|
3604
|
+
color: string;
|
|
3605
|
+
};
|
|
3606
|
+
'&.is-indigo': {
|
|
3607
|
+
backgroundColor: string;
|
|
3608
|
+
color: string;
|
|
3609
|
+
};
|
|
3610
|
+
'&.size-sm': {
|
|
3611
|
+
width: string;
|
|
3612
|
+
height: string;
|
|
3613
|
+
};
|
|
3614
|
+
'&.size-md': {
|
|
3615
|
+
width: string;
|
|
3616
|
+
height: string;
|
|
3617
|
+
};
|
|
3618
|
+
'&.size-lg': {
|
|
3619
|
+
width: string;
|
|
3620
|
+
height: string;
|
|
3621
|
+
};
|
|
3622
|
+
'&.size-xl': {
|
|
3623
|
+
width: string;
|
|
3624
|
+
height: string;
|
|
3625
|
+
};
|
|
3626
|
+
'&.font-size-sm': {
|
|
3627
|
+
fontSize: string;
|
|
3628
|
+
};
|
|
3629
|
+
'&.font-size-md': {
|
|
3630
|
+
fontSize: string;
|
|
3631
|
+
};
|
|
3632
|
+
'&.font-size-lg': {
|
|
3633
|
+
fontSize: string;
|
|
3634
|
+
};
|
|
3635
|
+
'&.font-size-xl': {
|
|
3636
|
+
fontSize: string;
|
|
3637
|
+
};
|
|
3638
|
+
'&.is-square': {
|
|
3639
|
+
borderRadius: string;
|
|
3640
|
+
};
|
|
3596
3641
|
display: string;
|
|
3597
3642
|
borderRadius: string;
|
|
3598
3643
|
textAlign: string;
|
|
@@ -7,10 +7,16 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var avatar = {
|
|
9
9
|
sm: '24px',
|
|
10
|
-
md: '
|
|
10
|
+
md: '32px',
|
|
11
11
|
lg: '72px',
|
|
12
12
|
xl: '104px'
|
|
13
13
|
};
|
|
14
|
+
var avatarFontSize = {
|
|
15
|
+
sm: '9.6px',
|
|
16
|
+
md: '13.6px',
|
|
17
|
+
lg: '28.8px',
|
|
18
|
+
xl: '41.6px'
|
|
19
|
+
};
|
|
14
20
|
var iconBadge = {
|
|
15
21
|
md: '48px',
|
|
16
22
|
xl: '104px'
|
|
@@ -29,6 +35,7 @@ var icons = {
|
|
|
29
35
|
};
|
|
30
36
|
var _default = {
|
|
31
37
|
avatar: avatar,
|
|
38
|
+
avatarFontSize: avatarFontSize,
|
|
32
39
|
container: container,
|
|
33
40
|
iconBadge: iconBadge,
|
|
34
41
|
icons: icons
|
|
@@ -34,6 +34,45 @@ export declare const avatar: {
|
|
|
34
34
|
backgroundColor: string;
|
|
35
35
|
color: string;
|
|
36
36
|
};
|
|
37
|
+
'&.is-blue': {
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
'&.is-indigo': {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
color: string;
|
|
44
|
+
};
|
|
45
|
+
'&.size-sm': {
|
|
46
|
+
width: string;
|
|
47
|
+
height: string;
|
|
48
|
+
};
|
|
49
|
+
'&.size-md': {
|
|
50
|
+
width: string;
|
|
51
|
+
height: string;
|
|
52
|
+
};
|
|
53
|
+
'&.size-lg': {
|
|
54
|
+
width: string;
|
|
55
|
+
height: string;
|
|
56
|
+
};
|
|
57
|
+
'&.size-xl': {
|
|
58
|
+
width: string;
|
|
59
|
+
height: string;
|
|
60
|
+
};
|
|
61
|
+
'&.font-size-sm': {
|
|
62
|
+
fontSize: string;
|
|
63
|
+
};
|
|
64
|
+
'&.font-size-md': {
|
|
65
|
+
fontSize: string;
|
|
66
|
+
};
|
|
67
|
+
'&.font-size-lg': {
|
|
68
|
+
fontSize: string;
|
|
69
|
+
};
|
|
70
|
+
'&.font-size-xl': {
|
|
71
|
+
fontSize: string;
|
|
72
|
+
};
|
|
73
|
+
'&.is-square': {
|
|
74
|
+
borderRadius: string;
|
|
75
|
+
};
|
|
37
76
|
display: string;
|
|
38
77
|
borderRadius: string;
|
|
39
78
|
textAlign: string;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.avatar = void 0;
|
|
9
|
+
var _sizes = _interopRequireDefault(require("../sizes"));
|
|
8
10
|
var avatar = {
|
|
9
11
|
backgroundColor: 'lightcyan',
|
|
10
12
|
color: 'darkcyan',
|
|
@@ -41,6 +43,45 @@ var avatar = {
|
|
|
41
43
|
backgroundColor: 'lightteal',
|
|
42
44
|
color: 'darkteal'
|
|
43
45
|
},
|
|
46
|
+
'&.is-blue': {
|
|
47
|
+
backgroundColor: 'lightblue',
|
|
48
|
+
color: 'darkblue'
|
|
49
|
+
},
|
|
50
|
+
'&.is-indigo': {
|
|
51
|
+
backgroundColor: 'lightindigo',
|
|
52
|
+
color: 'darkindigo'
|
|
53
|
+
},
|
|
54
|
+
'&.size-sm': {
|
|
55
|
+
width: _sizes["default"].avatar.sm,
|
|
56
|
+
height: _sizes["default"].avatar.sm
|
|
57
|
+
},
|
|
58
|
+
'&.size-md': {
|
|
59
|
+
width: _sizes["default"].avatar.md,
|
|
60
|
+
height: _sizes["default"].avatar.md
|
|
61
|
+
},
|
|
62
|
+
'&.size-lg': {
|
|
63
|
+
width: _sizes["default"].avatar.lg,
|
|
64
|
+
height: _sizes["default"].avatar.lg
|
|
65
|
+
},
|
|
66
|
+
'&.size-xl': {
|
|
67
|
+
width: _sizes["default"].avatar.xl,
|
|
68
|
+
height: _sizes["default"].avatar.xl
|
|
69
|
+
},
|
|
70
|
+
'&.font-size-sm': {
|
|
71
|
+
fontSize: _sizes["default"].avatarFontSize.sm
|
|
72
|
+
},
|
|
73
|
+
'&.font-size-md': {
|
|
74
|
+
fontSize: _sizes["default"].avatarFontSize.md
|
|
75
|
+
},
|
|
76
|
+
'&.font-size-lg': {
|
|
77
|
+
fontSize: _sizes["default"].avatarFontSize.lg
|
|
78
|
+
},
|
|
79
|
+
'&.font-size-xl': {
|
|
80
|
+
fontSize: _sizes["default"].avatarFontSize.xl
|
|
81
|
+
},
|
|
82
|
+
'&.is-square': {
|
|
83
|
+
borderRadius: '4px'
|
|
84
|
+
},
|
|
44
85
|
display: 'flex',
|
|
45
86
|
borderRadius: '50%',
|
|
46
87
|
textAlign: 'center',
|
|
@@ -103,6 +103,45 @@ declare const _default: {
|
|
|
103
103
|
backgroundColor: string;
|
|
104
104
|
color: string;
|
|
105
105
|
};
|
|
106
|
+
'&.is-blue': {
|
|
107
|
+
backgroundColor: string;
|
|
108
|
+
color: string;
|
|
109
|
+
};
|
|
110
|
+
'&.is-indigo': {
|
|
111
|
+
backgroundColor: string;
|
|
112
|
+
color: string;
|
|
113
|
+
};
|
|
114
|
+
'&.size-sm': {
|
|
115
|
+
width: string;
|
|
116
|
+
height: string;
|
|
117
|
+
};
|
|
118
|
+
'&.size-md': {
|
|
119
|
+
width: string;
|
|
120
|
+
height: string;
|
|
121
|
+
};
|
|
122
|
+
'&.size-lg': {
|
|
123
|
+
width: string;
|
|
124
|
+
height: string;
|
|
125
|
+
};
|
|
126
|
+
'&.size-xl': {
|
|
127
|
+
width: string;
|
|
128
|
+
height: string;
|
|
129
|
+
};
|
|
130
|
+
'&.font-size-sm': {
|
|
131
|
+
fontSize: string;
|
|
132
|
+
};
|
|
133
|
+
'&.font-size-md': {
|
|
134
|
+
fontSize: string;
|
|
135
|
+
};
|
|
136
|
+
'&.font-size-lg': {
|
|
137
|
+
fontSize: string;
|
|
138
|
+
};
|
|
139
|
+
'&.font-size-xl': {
|
|
140
|
+
fontSize: string;
|
|
141
|
+
};
|
|
142
|
+
'&.is-square': {
|
|
143
|
+
borderRadius: string;
|
|
144
|
+
};
|
|
106
145
|
display: string;
|
|
107
146
|
borderRadius: string;
|
|
108
147
|
textAlign: string;
|
|
@@ -5,7 +5,7 @@ import type { GridNode } from '@react-types/grid';
|
|
|
5
5
|
import { ThemeUICSSObject } from 'theme-ui';
|
|
6
6
|
import { ExampleItemProps } from '../components/ListView/ListView.stories';
|
|
7
7
|
export type SelectionOptions = 'expansion' | 'single' | 'multiple' | 'none';
|
|
8
|
-
export interface ListViewProps extends Omit<TreeProps<
|
|
8
|
+
export interface ListViewProps<T extends ExampleItemProps> extends Omit<TreeProps<T>, 'selectionMode'> {
|
|
9
9
|
selectionStyle?: string;
|
|
10
10
|
isHoverable?: boolean;
|
|
11
11
|
loadingState?: string;
|
|
@@ -9,24 +9,30 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
|
9
9
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
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 = ["alt", "defaultText", "color", "className", "size", "src", "sx"];
|
|
12
|
+
var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx", "children", "isSquare"];
|
|
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
15
|
import React, { forwardRef } from 'react';
|
|
16
16
|
import { Avatar as ThemeUIAvatar, Box } from 'theme-ui';
|
|
17
17
|
import { useStatusClasses } from '../../hooks';
|
|
18
|
+
import sizes from '../../styles/themes/next-gen/sizes';
|
|
18
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
20
|
var Avatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
+
var _useStatusClasses2;
|
|
20
22
|
var _props$alt = props.alt,
|
|
21
23
|
alt = _props$alt === void 0 ? 'Avatar' : _props$alt,
|
|
22
|
-
defaultText = props.defaultText,
|
|
24
|
+
_props$defaultText = props.defaultText,
|
|
25
|
+
defaultText = _props$defaultText === void 0 ? 'AA' : _props$defaultText,
|
|
23
26
|
color = props.color,
|
|
24
27
|
className = props.className,
|
|
25
|
-
size = props.size,
|
|
28
|
+
_props$size = props.size,
|
|
29
|
+
size = _props$size === void 0 ? 'sm' : _props$size,
|
|
26
30
|
src = props.src,
|
|
27
31
|
sx = props.sx,
|
|
32
|
+
children = props.children,
|
|
33
|
+
isSquare = props.isSquare,
|
|
28
34
|
others = _objectWithoutProperties(props, _excluded);
|
|
29
|
-
var _useStatusClasses = useStatusClasses(className,
|
|
35
|
+
var _useStatusClasses = useStatusClasses(className, (_useStatusClasses2 = {}, _defineProperty(_useStatusClasses2, "is-".concat(color), color), _defineProperty(_useStatusClasses2, "size-".concat(size), size), _defineProperty(_useStatusClasses2, "font-size-".concat(size), size), _defineProperty(_useStatusClasses2, 'is-square', isSquare), _useStatusClasses2)),
|
|
30
36
|
classNames = _useStatusClasses.classNames;
|
|
31
37
|
if (src) {
|
|
32
38
|
return ___EmotionJSX(ThemeUIAvatar, _extends({
|
|
@@ -34,7 +40,9 @@ var Avatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
34
40
|
alt: alt,
|
|
35
41
|
src: src,
|
|
36
42
|
sx: _objectSpread({
|
|
37
|
-
size: size
|
|
43
|
+
size: size,
|
|
44
|
+
width: sizes.avatar[size],
|
|
45
|
+
height: sizes.avatar[size]
|
|
38
46
|
}, sx)
|
|
39
47
|
}, others));
|
|
40
48
|
}
|
|
@@ -45,7 +53,7 @@ var Avatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
45
53
|
size: size,
|
|
46
54
|
fontSize: size
|
|
47
55
|
}, sx)
|
|
48
|
-
}, others), defaultText);
|
|
56
|
+
}, others), children || defaultText);
|
|
49
57
|
});
|
|
50
58
|
Avatar.displayName = 'Avatar';
|
|
51
59
|
export default Avatar;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/objectDestructuringEmpty";
|
|
2
2
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import CogOutlineIcon from '@pingux/mdi-react/CogOutlineIcon';
|
|
4
5
|
import { withDesign } from 'storybook-addon-designs';
|
|
5
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
6
|
-
import { Avatar } from '../../index';
|
|
7
|
+
import { Avatar, Box, IconWrapper } from '../../index';
|
|
7
8
|
import { pingImg } from '../../utils/devUtils/constants/images';
|
|
8
9
|
import AvatarReadme from './Avatar.mdx';
|
|
9
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -50,4 +51,72 @@ export default {
|
|
|
50
51
|
export var Default = function Default(_ref) {
|
|
51
52
|
var args = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
52
53
|
return ___EmotionJSX(Avatar, args);
|
|
54
|
+
};
|
|
55
|
+
export var WithSizeVariation = function WithSizeVariation() {
|
|
56
|
+
return ___EmotionJSX(Box, {
|
|
57
|
+
isRow: true,
|
|
58
|
+
gap: "sm",
|
|
59
|
+
alignItems: "center"
|
|
60
|
+
}, ___EmotionJSX(Avatar, {
|
|
61
|
+
size: "sm",
|
|
62
|
+
color: "green"
|
|
63
|
+
}), ___EmotionJSX(Avatar, {
|
|
64
|
+
size: "md",
|
|
65
|
+
color: "green"
|
|
66
|
+
}), ___EmotionJSX(Avatar, {
|
|
67
|
+
size: "lg",
|
|
68
|
+
color: "green"
|
|
69
|
+
}), ___EmotionJSX(Avatar, {
|
|
70
|
+
size: "xl",
|
|
71
|
+
color: "green"
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
export var WithColorVariation = function WithColorVariation() {
|
|
75
|
+
return ___EmotionJSX(Box, {
|
|
76
|
+
isRow: true,
|
|
77
|
+
gap: "sm",
|
|
78
|
+
alignItems: "center"
|
|
79
|
+
}, ___EmotionJSX(Avatar, {
|
|
80
|
+
color: "green"
|
|
81
|
+
}), ___EmotionJSX(Avatar, {
|
|
82
|
+
color: "purple"
|
|
83
|
+
}), ___EmotionJSX(Avatar, {
|
|
84
|
+
color: "pink"
|
|
85
|
+
}), ___EmotionJSX(Avatar, {
|
|
86
|
+
color: "red"
|
|
87
|
+
}), ___EmotionJSX(Avatar, {
|
|
88
|
+
color: "orange"
|
|
89
|
+
}), ___EmotionJSX(Avatar, {
|
|
90
|
+
color: "yellow"
|
|
91
|
+
}), ___EmotionJSX(Avatar, {
|
|
92
|
+
color: "teal"
|
|
93
|
+
}), ___EmotionJSX(Avatar, {
|
|
94
|
+
color: "cyan"
|
|
95
|
+
}), ___EmotionJSX(Avatar, {
|
|
96
|
+
color: "blue"
|
|
97
|
+
}), ___EmotionJSX(Avatar, {
|
|
98
|
+
color: "indigo"
|
|
99
|
+
}));
|
|
100
|
+
};
|
|
101
|
+
export var WithIconVariation = function WithIconVariation() {
|
|
102
|
+
return ___EmotionJSX(Avatar, {
|
|
103
|
+
color: "green"
|
|
104
|
+
}, ___EmotionJSX(IconWrapper, {
|
|
105
|
+
icon: CogOutlineIcon,
|
|
106
|
+
color: "green",
|
|
107
|
+
size: "xs",
|
|
108
|
+
title: {
|
|
109
|
+
name: 'Cog Outline Icon'
|
|
110
|
+
}
|
|
111
|
+
}));
|
|
112
|
+
};
|
|
113
|
+
export var WithImageVariation = function WithImageVariation(_ref2) {
|
|
114
|
+
var args = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
115
|
+
return ___EmotionJSX(Avatar, args);
|
|
116
|
+
};
|
|
117
|
+
export var WithSquareVariation = function WithSquareVariation() {
|
|
118
|
+
return ___EmotionJSX(Avatar, {
|
|
119
|
+
color: "green",
|
|
120
|
+
isSquare: true
|
|
121
|
+
});
|
|
53
122
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import WithUiLibraryCss from '../../../styles/themeOverrides/withUiLibraryCss';
|
|
3
|
+
import AvatarNextGen from './AvatarNextGen';
|
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Chromatic Only Avatar',
|
|
7
|
+
decorators: [WithUiLibraryCss]
|
|
8
|
+
};
|
|
9
|
+
export var Default = function Default() {
|
|
10
|
+
return ___EmotionJSX(AvatarNextGen, null);
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AstroProvider, NextGenTheme } from '../../..';
|
|
3
|
+
import AvatarNextGen from './AvatarNextGen';
|
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Chromatic Only Onyx Avatar'
|
|
7
|
+
};
|
|
8
|
+
export var Default = function Default() {
|
|
9
|
+
return ___EmotionJSX(AstroProvider, {
|
|
10
|
+
theme: NextGenTheme
|
|
11
|
+
}, ___EmotionJSX(AvatarNextGen, null));
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AstroProvider, NextGenDarkTheme } from '../../..';
|
|
3
|
+
import AvatarNextGen from './AvatarNextGen';
|
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Chromatic Only Onyx Dark Avatar'
|
|
7
|
+
};
|
|
8
|
+
export var Default = function Default() {
|
|
9
|
+
return ___EmotionJSX(AstroProvider, {
|
|
10
|
+
themeOverrides: [NextGenDarkTheme]
|
|
11
|
+
}, ___EmotionJSX(AvatarNextGen, null));
|
|
12
|
+
};
|
|
@@ -11,7 +11,7 @@ export var avatar = {
|
|
|
11
11
|
color: 'black'
|
|
12
12
|
},
|
|
13
13
|
'&.is-purple': {
|
|
14
|
-
backgroundColor: 'purple',
|
|
14
|
+
backgroundColor: 'purple-400',
|
|
15
15
|
color: 'black'
|
|
16
16
|
},
|
|
17
17
|
'&.is-pink': {
|
|
@@ -34,6 +34,14 @@ export var avatar = {
|
|
|
34
34
|
backgroundColor: 'teal',
|
|
35
35
|
color: 'black'
|
|
36
36
|
},
|
|
37
|
+
'&.is-blue': {
|
|
38
|
+
backgroundColor: 'blue',
|
|
39
|
+
color: 'black'
|
|
40
|
+
},
|
|
41
|
+
'&.is-indigo': {
|
|
42
|
+
backgroundColor: 'indigo',
|
|
43
|
+
color: 'black'
|
|
44
|
+
},
|
|
37
45
|
display: 'flex',
|
|
38
46
|
borderRadius: '50%',
|
|
39
47
|
textAlign: 'center',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary'];
|
|
1
|
+
var nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary', 'Avatar'];
|
|
2
2
|
export var componentSpecificNextGenBlacklist = {
|
|
3
3
|
AstroProvider: ['Default', 'With Custom Theme Override'],
|
|
4
4
|
Messages: ['Customization'],
|
|
@@ -16,6 +16,7 @@ export var astroBlacklistStory = {
|
|
|
16
16
|
SearchField: ['Onyx With Filter'],
|
|
17
17
|
Callout: ['Customizations'],
|
|
18
18
|
StatusIcon: ['Default', 'In Rocker Button'],
|
|
19
|
+
Avatar: ['With Size Variation', 'With Color Variation', 'With Icon Variation', 'With Square Variation'],
|
|
19
20
|
Text: ['Onyx'],
|
|
20
21
|
Loader: ['Circular', 'CustomCircular']
|
|
21
22
|
};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
var avatar = {
|
|
2
2
|
sm: '24px',
|
|
3
|
-
md: '
|
|
3
|
+
md: '32px',
|
|
4
4
|
lg: '72px',
|
|
5
5
|
xl: '104px'
|
|
6
6
|
};
|
|
7
|
+
var avatarFontSize = {
|
|
8
|
+
sm: '9.6px',
|
|
9
|
+
md: '13.6px',
|
|
10
|
+
lg: '28.8px',
|
|
11
|
+
xl: '41.6px'
|
|
12
|
+
};
|
|
7
13
|
var iconBadge = {
|
|
8
14
|
md: '48px',
|
|
9
15
|
xl: '104px'
|
|
@@ -22,6 +28,7 @@ var icons = {
|
|
|
22
28
|
};
|
|
23
29
|
export default {
|
|
24
30
|
avatar: avatar,
|
|
31
|
+
avatarFontSize: avatarFontSize,
|
|
25
32
|
container: container,
|
|
26
33
|
iconBadge: iconBadge,
|
|
27
34
|
icons: icons
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import sizes from '../sizes';
|
|
1
2
|
export var avatar = {
|
|
2
3
|
backgroundColor: 'lightcyan',
|
|
3
4
|
color: 'darkcyan',
|
|
@@ -34,6 +35,45 @@ export var avatar = {
|
|
|
34
35
|
backgroundColor: 'lightteal',
|
|
35
36
|
color: 'darkteal'
|
|
36
37
|
},
|
|
38
|
+
'&.is-blue': {
|
|
39
|
+
backgroundColor: 'lightblue',
|
|
40
|
+
color: 'darkblue'
|
|
41
|
+
},
|
|
42
|
+
'&.is-indigo': {
|
|
43
|
+
backgroundColor: 'lightindigo',
|
|
44
|
+
color: 'darkindigo'
|
|
45
|
+
},
|
|
46
|
+
'&.size-sm': {
|
|
47
|
+
width: sizes.avatar.sm,
|
|
48
|
+
height: sizes.avatar.sm
|
|
49
|
+
},
|
|
50
|
+
'&.size-md': {
|
|
51
|
+
width: sizes.avatar.md,
|
|
52
|
+
height: sizes.avatar.md
|
|
53
|
+
},
|
|
54
|
+
'&.size-lg': {
|
|
55
|
+
width: sizes.avatar.lg,
|
|
56
|
+
height: sizes.avatar.lg
|
|
57
|
+
},
|
|
58
|
+
'&.size-xl': {
|
|
59
|
+
width: sizes.avatar.xl,
|
|
60
|
+
height: sizes.avatar.xl
|
|
61
|
+
},
|
|
62
|
+
'&.font-size-sm': {
|
|
63
|
+
fontSize: sizes.avatarFontSize.sm
|
|
64
|
+
},
|
|
65
|
+
'&.font-size-md': {
|
|
66
|
+
fontSize: sizes.avatarFontSize.md
|
|
67
|
+
},
|
|
68
|
+
'&.font-size-lg': {
|
|
69
|
+
fontSize: sizes.avatarFontSize.lg
|
|
70
|
+
},
|
|
71
|
+
'&.font-size-xl': {
|
|
72
|
+
fontSize: sizes.avatarFontSize.xl
|
|
73
|
+
},
|
|
74
|
+
'&.is-square': {
|
|
75
|
+
borderRadius: '4px'
|
|
76
|
+
},
|
|
37
77
|
display: 'flex',
|
|
38
78
|
borderRadius: '50%',
|
|
39
79
|
textAlign: 'center',
|