@pingux/astro 2.151.2-alpha.1 → 2.152.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/Avatar/Avatar.js +9 -12
- package/lib/cjs/components/Avatar/Avatar.stories.d.ts +6 -5
- package/lib/cjs/components/Avatar/Avatar.stories.js +52 -13
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/avatar.d.ts +4 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/avatar.js +4 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/links.d.ts +3 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/links.js +3 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +4 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +115 -0
- package/lib/cjs/styles/themes/next-gen/sizes.d.ts +9 -0
- package/lib/cjs/styles/themes/next-gen/sizes.js +10 -0
- package/lib/cjs/styles/themes/next-gen/variants/avatar.d.ts +86 -0
- package/lib/cjs/styles/themes/next-gen/variants/avatar.js +86 -0
- package/lib/cjs/styles/themes/next-gen/variants/links.d.ts +20 -0
- package/lib/cjs/styles/themes/next-gen/variants/links.js +19 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +86 -0
- package/lib/cjs/types/avatar.d.ts +1 -0
- package/lib/components/Avatar/Avatar.js +9 -12
- package/lib/components/Avatar/Avatar.stories.js +45 -7
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/avatar.js +4 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/links.js +3 -1
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/sizes.js +10 -0
- package/lib/styles/themes/next-gen/variants/avatar.js +86 -0
- package/lib/styles/themes/next-gen/variants/links.js +19 -0
- package/package.json +1 -1
|
@@ -21,9 +21,8 @@ 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"));
|
|
25
24
|
var _react2 = require("@emotion/react");
|
|
26
|
-
var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx", "children", "isSquare"];
|
|
25
|
+
var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx", "children", "isSquare", "isLogo"];
|
|
27
26
|
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); }
|
|
28
27
|
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; }
|
|
29
28
|
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; }
|
|
@@ -42,21 +41,19 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
42
41
|
sx = props.sx,
|
|
43
42
|
children = props.children,
|
|
44
43
|
isSquare = props.isSquare,
|
|
44
|
+
isLogo = props.isLogo,
|
|
45
45
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
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)),
|
|
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), src ? false : size), (0, _defineProperty2["default"])(_useStatusClasses2, 'is-square', isSquare), (0, _defineProperty2["default"])(_useStatusClasses2, 'is-image', src), (0, _defineProperty2["default"])(_useStatusClasses2, 'is-logo', isLogo), _useStatusClasses2)),
|
|
47
47
|
classNames = _useStatusClasses.classNames;
|
|
48
48
|
if (src) {
|
|
49
|
-
return (0, _react2.jsx)(_themeUi.
|
|
49
|
+
return (0, _react2.jsx)(_themeUi.Box, {
|
|
50
|
+
variant: "avatar",
|
|
51
|
+
className: classNames
|
|
52
|
+
}, (0, _react2.jsx)(_themeUi.Avatar, (0, _extends2["default"])({
|
|
50
53
|
ref: ref,
|
|
51
54
|
alt: alt,
|
|
52
|
-
src: src
|
|
53
|
-
|
|
54
|
-
size: size,
|
|
55
|
-
width: _sizes["default"].avatar[size],
|
|
56
|
-
height: _sizes["default"].avatar[size],
|
|
57
|
-
borderRadius: isSquare ? '0px' : '100%'
|
|
58
|
-
}, sx)
|
|
59
|
-
}, others));
|
|
55
|
+
src: src
|
|
56
|
+
}, others)));
|
|
60
57
|
}
|
|
61
58
|
return (0, _react2.jsx)(_themeUi.Box, (0, _extends2["default"])({
|
|
62
59
|
variant: "avatar",
|
|
@@ -3,8 +3,9 @@ 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
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
6
|
+
export declare const SizeVariation: StoryFn<AvatarProps>;
|
|
7
|
+
export declare const ColorVariation: StoryFn<AvatarProps>;
|
|
8
|
+
export declare const IconVariation: StoryFn<AvatarProps>;
|
|
9
|
+
export declare const ImageVariation: StoryFn<AvatarProps>;
|
|
10
|
+
export declare const SquareVariation: StoryFn<AvatarProps>;
|
|
11
|
+
export declare const LogoVariation: StoryFn<AvatarProps>;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
5
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = exports.
|
|
8
|
+
exports["default"] = exports.SquareVariation = exports.SizeVariation = exports.LogoVariation = exports.ImageVariation = exports.IconVariation = exports.Default = exports.ColorVariation = 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"));
|
|
@@ -62,7 +62,7 @@ var Default = function Default(_ref) {
|
|
|
62
62
|
return (0, _react2.jsx)(_index.Avatar, args);
|
|
63
63
|
};
|
|
64
64
|
exports.Default = Default;
|
|
65
|
-
var
|
|
65
|
+
var SizeVariation = function SizeVariation() {
|
|
66
66
|
return (0, _react2.jsx)(_index.Box, {
|
|
67
67
|
isRow: true,
|
|
68
68
|
gap: "sm",
|
|
@@ -81,8 +81,8 @@ var WithSizeVariation = function WithSizeVariation() {
|
|
|
81
81
|
color: "green"
|
|
82
82
|
}));
|
|
83
83
|
};
|
|
84
|
-
exports.
|
|
85
|
-
var
|
|
84
|
+
exports.SizeVariation = SizeVariation;
|
|
85
|
+
var ColorVariation = function ColorVariation() {
|
|
86
86
|
return (0, _react2.jsx)(_index.Box, {
|
|
87
87
|
isRow: true,
|
|
88
88
|
gap: "sm",
|
|
@@ -109,8 +109,8 @@ var WithColorVariation = function WithColorVariation() {
|
|
|
109
109
|
color: "indigo"
|
|
110
110
|
}));
|
|
111
111
|
};
|
|
112
|
-
exports.
|
|
113
|
-
var
|
|
112
|
+
exports.ColorVariation = ColorVariation;
|
|
113
|
+
var IconVariation = function IconVariation() {
|
|
114
114
|
return (0, _react2.jsx)(_index.Avatar, {
|
|
115
115
|
color: "green"
|
|
116
116
|
}, (0, _react2.jsx)(_index.IconWrapper, {
|
|
@@ -122,16 +122,55 @@ var WithIconVariation = function WithIconVariation() {
|
|
|
122
122
|
}
|
|
123
123
|
}));
|
|
124
124
|
};
|
|
125
|
-
exports.
|
|
126
|
-
var
|
|
125
|
+
exports.IconVariation = IconVariation;
|
|
126
|
+
var ImageVariation = function ImageVariation(_ref2) {
|
|
127
127
|
var args = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref2), _ref2));
|
|
128
128
|
return (0, _react2.jsx)(_index.Avatar, args);
|
|
129
129
|
};
|
|
130
|
-
exports.
|
|
131
|
-
var
|
|
132
|
-
return (0, _react2.jsx)(_index.
|
|
130
|
+
exports.ImageVariation = ImageVariation;
|
|
131
|
+
var SquareVariation = function SquareVariation() {
|
|
132
|
+
return (0, _react2.jsx)(_index.Box, {
|
|
133
|
+
isRow: true,
|
|
134
|
+
gap: "sm",
|
|
135
|
+
alignItems: "center"
|
|
136
|
+
}, (0, _react2.jsx)(_index.Avatar, {
|
|
133
137
|
color: "green",
|
|
134
138
|
isSquare: true
|
|
135
|
-
})
|
|
139
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
140
|
+
color: "green",
|
|
141
|
+
isSquare: true,
|
|
142
|
+
size: "xmd"
|
|
143
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
144
|
+
color: "green",
|
|
145
|
+
isSquare: true,
|
|
146
|
+
size: "lg"
|
|
147
|
+
}), (0, _react2.jsx)(_index.Avatar, {
|
|
148
|
+
color: "green",
|
|
149
|
+
isSquare: true,
|
|
150
|
+
size: "xl"
|
|
151
|
+
}));
|
|
152
|
+
};
|
|
153
|
+
exports.SquareVariation = SquareVariation;
|
|
154
|
+
var LogoVariation = function LogoVariation(args) {
|
|
155
|
+
return (0, _react2.jsx)(_index.Box, {
|
|
156
|
+
isRow: true,
|
|
157
|
+
gap: "sm",
|
|
158
|
+
alignItems: "center"
|
|
159
|
+
}, (0, _react2.jsx)(_index.Avatar, (0, _extends2["default"])({}, args, {
|
|
160
|
+
isSquare: true,
|
|
161
|
+
isLogo: true
|
|
162
|
+
})), (0, _react2.jsx)(_index.Avatar, (0, _extends2["default"])({}, args, {
|
|
163
|
+
isSquare: true,
|
|
164
|
+
size: "xmd",
|
|
165
|
+
isLogo: true
|
|
166
|
+
})), (0, _react2.jsx)(_index.Avatar, (0, _extends2["default"])({}, args, {
|
|
167
|
+
isSquare: true,
|
|
168
|
+
size: "lg",
|
|
169
|
+
isLogo: true
|
|
170
|
+
})), (0, _react2.jsx)(_index.Avatar, (0, _extends2["default"])({}, args, {
|
|
171
|
+
isSquare: true,
|
|
172
|
+
size: "xl",
|
|
173
|
+
isLogo: true
|
|
174
|
+
})));
|
|
136
175
|
};
|
|
137
|
-
exports.
|
|
176
|
+
exports.LogoVariation = LogoVariation;
|
|
@@ -3,13 +3,15 @@ declare const _default: {
|
|
|
3
3
|
color: string;
|
|
4
4
|
'&.is-hovered': {
|
|
5
5
|
textDecoration: string;
|
|
6
|
+
textDecorationColor: string;
|
|
6
7
|
color: string;
|
|
7
8
|
};
|
|
8
9
|
'&.is-pressed': {
|
|
9
10
|
color: string;
|
|
11
|
+
textDecorationColor: string;
|
|
10
12
|
textDecoration: string;
|
|
11
13
|
};
|
|
12
|
-
'
|
|
14
|
+
'&:visited': {
|
|
13
15
|
color: string;
|
|
14
16
|
};
|
|
15
17
|
};
|
|
@@ -51,13 +51,15 @@ var app = {
|
|
|
51
51
|
color: 'blue-400',
|
|
52
52
|
'&.is-hovered': {
|
|
53
53
|
textDecoration: 'underline',
|
|
54
|
+
textDecorationColor: 'blue-300',
|
|
54
55
|
color: 'blue-300'
|
|
55
56
|
},
|
|
56
57
|
'&.is-pressed': {
|
|
57
58
|
color: 'blue-300',
|
|
59
|
+
textDecorationColor: 'blue-300',
|
|
58
60
|
textDecoration: 'underline'
|
|
59
61
|
},
|
|
60
|
-
'
|
|
62
|
+
'&:visited': {
|
|
61
63
|
color: 'purple-100'
|
|
62
64
|
}
|
|
63
65
|
};
|
|
@@ -24,7 +24,7 @@ var astroBlacklistStory = {
|
|
|
24
24
|
Callout: ['Customizations'],
|
|
25
25
|
CodeView: ['Light'],
|
|
26
26
|
StatusIcon: ['Default', 'In Rocker Button'],
|
|
27
|
-
Avatar: ['
|
|
27
|
+
Avatar: ['Size Variation', 'Color Variation', 'Icon Variation', 'Square Variation', 'Logo Variation'],
|
|
28
28
|
Text: ['Onyx'],
|
|
29
29
|
Loader: ['Circular', 'Custom Circular']
|
|
30
30
|
};
|
|
@@ -2101,12 +2101,21 @@ declare const _default: {
|
|
|
2101
2101
|
avatar: {
|
|
2102
2102
|
sm: string;
|
|
2103
2103
|
md: string;
|
|
2104
|
+
xmd: string;
|
|
2105
|
+
lg: string;
|
|
2106
|
+
xl: string;
|
|
2107
|
+
};
|
|
2108
|
+
avatarLogo: {
|
|
2109
|
+
sm: string;
|
|
2110
|
+
md: string;
|
|
2111
|
+
xmd: string;
|
|
2104
2112
|
lg: string;
|
|
2105
2113
|
xl: string;
|
|
2106
2114
|
};
|
|
2107
2115
|
avatarFontSize: {
|
|
2108
2116
|
sm: string;
|
|
2109
2117
|
md: string;
|
|
2118
|
+
xmd: string;
|
|
2110
2119
|
lg: string;
|
|
2111
2120
|
xl: string;
|
|
2112
2121
|
};
|
|
@@ -3144,6 +3153,26 @@ declare const _default: {
|
|
|
3144
3153
|
xx: string;
|
|
3145
3154
|
};
|
|
3146
3155
|
links: {
|
|
3156
|
+
app: {
|
|
3157
|
+
lineHeight: string;
|
|
3158
|
+
'&.is-hovered': {
|
|
3159
|
+
color: string;
|
|
3160
|
+
textDecorationColor: string;
|
|
3161
|
+
};
|
|
3162
|
+
'&.is-focused': {
|
|
3163
|
+
borderRadius: string;
|
|
3164
|
+
outline: string;
|
|
3165
|
+
outlineColor: string;
|
|
3166
|
+
};
|
|
3167
|
+
'&.is-pressed': {
|
|
3168
|
+
color: string;
|
|
3169
|
+
textDecorationColor: string;
|
|
3170
|
+
};
|
|
3171
|
+
'&:visited': {
|
|
3172
|
+
color: string;
|
|
3173
|
+
textDecoration: string;
|
|
3174
|
+
};
|
|
3175
|
+
};
|
|
3147
3176
|
nextGen: {
|
|
3148
3177
|
color: string;
|
|
3149
3178
|
fontSize: string;
|
|
@@ -3635,6 +3664,10 @@ declare const _default: {
|
|
|
3635
3664
|
width: string;
|
|
3636
3665
|
height: string;
|
|
3637
3666
|
};
|
|
3667
|
+
'&.size-xmd': {
|
|
3668
|
+
width: string;
|
|
3669
|
+
height: string;
|
|
3670
|
+
};
|
|
3638
3671
|
'&.size-lg': {
|
|
3639
3672
|
width: string;
|
|
3640
3673
|
height: string;
|
|
@@ -3649,6 +3682,9 @@ declare const _default: {
|
|
|
3649
3682
|
'&.font-size-md': {
|
|
3650
3683
|
fontSize: string;
|
|
3651
3684
|
};
|
|
3685
|
+
'&.font-size-xmd': {
|
|
3686
|
+
fontSize: string;
|
|
3687
|
+
};
|
|
3652
3688
|
'&.font-size-lg': {
|
|
3653
3689
|
fontSize: string;
|
|
3654
3690
|
};
|
|
@@ -3658,6 +3694,85 @@ declare const _default: {
|
|
|
3658
3694
|
'&.is-square': {
|
|
3659
3695
|
borderRadius: string;
|
|
3660
3696
|
};
|
|
3697
|
+
'&.is-square.size-lg': {
|
|
3698
|
+
borderRadius: string;
|
|
3699
|
+
};
|
|
3700
|
+
'&.is-square.size-xl': {
|
|
3701
|
+
borderRadius: string;
|
|
3702
|
+
};
|
|
3703
|
+
'&.is-logo': {
|
|
3704
|
+
borderWidth: string;
|
|
3705
|
+
borderStyle: string;
|
|
3706
|
+
borderColor: string;
|
|
3707
|
+
backgroundColor: string;
|
|
3708
|
+
'&.size-sm': {
|
|
3709
|
+
img: {
|
|
3710
|
+
width: string;
|
|
3711
|
+
height: string;
|
|
3712
|
+
borderRadius: string;
|
|
3713
|
+
};
|
|
3714
|
+
};
|
|
3715
|
+
'&.size-md': {
|
|
3716
|
+
img: {
|
|
3717
|
+
width: string;
|
|
3718
|
+
height: string;
|
|
3719
|
+
borderRadius: string;
|
|
3720
|
+
};
|
|
3721
|
+
};
|
|
3722
|
+
'&.size-xmd': {
|
|
3723
|
+
img: {
|
|
3724
|
+
width: string;
|
|
3725
|
+
height: string;
|
|
3726
|
+
borderRadius: string;
|
|
3727
|
+
};
|
|
3728
|
+
};
|
|
3729
|
+
'&.size-lg': {
|
|
3730
|
+
img: {
|
|
3731
|
+
width: string;
|
|
3732
|
+
height: string;
|
|
3733
|
+
borderRadius: string;
|
|
3734
|
+
};
|
|
3735
|
+
};
|
|
3736
|
+
'&.size-xl': {
|
|
3737
|
+
img: {
|
|
3738
|
+
width: string;
|
|
3739
|
+
height: string;
|
|
3740
|
+
borderRadius: string;
|
|
3741
|
+
};
|
|
3742
|
+
};
|
|
3743
|
+
};
|
|
3744
|
+
'&.is-image:not(.is-logo)': {
|
|
3745
|
+
'&.size-sm': {
|
|
3746
|
+
img: {
|
|
3747
|
+
width: string;
|
|
3748
|
+
height: string;
|
|
3749
|
+
};
|
|
3750
|
+
};
|
|
3751
|
+
'&.size-md': {
|
|
3752
|
+
img: {
|
|
3753
|
+
width: string;
|
|
3754
|
+
height: string;
|
|
3755
|
+
};
|
|
3756
|
+
};
|
|
3757
|
+
'&.size-xmd': {
|
|
3758
|
+
img: {
|
|
3759
|
+
width: string;
|
|
3760
|
+
height: string;
|
|
3761
|
+
};
|
|
3762
|
+
};
|
|
3763
|
+
'&.size-lg': {
|
|
3764
|
+
img: {
|
|
3765
|
+
width: string;
|
|
3766
|
+
height: string;
|
|
3767
|
+
};
|
|
3768
|
+
};
|
|
3769
|
+
'&.size-xl': {
|
|
3770
|
+
img: {
|
|
3771
|
+
width: string;
|
|
3772
|
+
height: string;
|
|
3773
|
+
};
|
|
3774
|
+
};
|
|
3775
|
+
};
|
|
3661
3776
|
display: string;
|
|
3662
3777
|
borderRadius: string;
|
|
3663
3778
|
textAlign: string;
|
|
@@ -2,12 +2,21 @@ declare const _default: {
|
|
|
2
2
|
avatar: {
|
|
3
3
|
sm: string;
|
|
4
4
|
md: string;
|
|
5
|
+
xmd: string;
|
|
6
|
+
lg: string;
|
|
7
|
+
xl: string;
|
|
8
|
+
};
|
|
9
|
+
avatarLogo: {
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
xmd: string;
|
|
5
13
|
lg: string;
|
|
6
14
|
xl: string;
|
|
7
15
|
};
|
|
8
16
|
avatarFontSize: {
|
|
9
17
|
sm: string;
|
|
10
18
|
md: string;
|
|
19
|
+
xmd: string;
|
|
11
20
|
lg: string;
|
|
12
21
|
xl: string;
|
|
13
22
|
};
|
|
@@ -8,12 +8,21 @@ exports["default"] = void 0;
|
|
|
8
8
|
var avatar = {
|
|
9
9
|
sm: '24px',
|
|
10
10
|
md: '32px',
|
|
11
|
+
xmd: '44px',
|
|
11
12
|
lg: '72px',
|
|
12
13
|
xl: '104px'
|
|
13
14
|
};
|
|
15
|
+
var avatarLogo = {
|
|
16
|
+
sm: '14px',
|
|
17
|
+
md: '20px',
|
|
18
|
+
xmd: '24px',
|
|
19
|
+
lg: '44px',
|
|
20
|
+
xl: '54px'
|
|
21
|
+
};
|
|
14
22
|
var avatarFontSize = {
|
|
15
23
|
sm: '9.6px',
|
|
16
24
|
md: '13.6px',
|
|
25
|
+
xmd: '18px',
|
|
17
26
|
lg: '28.8px',
|
|
18
27
|
xl: '41.6px'
|
|
19
28
|
};
|
|
@@ -35,6 +44,7 @@ var icons = {
|
|
|
35
44
|
};
|
|
36
45
|
var _default = {
|
|
37
46
|
avatar: avatar,
|
|
47
|
+
avatarLogo: avatarLogo,
|
|
38
48
|
avatarFontSize: avatarFontSize,
|
|
39
49
|
container: container,
|
|
40
50
|
iconBadge: iconBadge,
|
|
@@ -50,6 +50,10 @@ export declare const avatar: {
|
|
|
50
50
|
width: string;
|
|
51
51
|
height: string;
|
|
52
52
|
};
|
|
53
|
+
'&.size-xmd': {
|
|
54
|
+
width: string;
|
|
55
|
+
height: string;
|
|
56
|
+
};
|
|
53
57
|
'&.size-lg': {
|
|
54
58
|
width: string;
|
|
55
59
|
height: string;
|
|
@@ -64,6 +68,9 @@ export declare const avatar: {
|
|
|
64
68
|
'&.font-size-md': {
|
|
65
69
|
fontSize: string;
|
|
66
70
|
};
|
|
71
|
+
'&.font-size-xmd': {
|
|
72
|
+
fontSize: string;
|
|
73
|
+
};
|
|
67
74
|
'&.font-size-lg': {
|
|
68
75
|
fontSize: string;
|
|
69
76
|
};
|
|
@@ -73,6 +80,85 @@ export declare const avatar: {
|
|
|
73
80
|
'&.is-square': {
|
|
74
81
|
borderRadius: string;
|
|
75
82
|
};
|
|
83
|
+
'&.is-square.size-lg': {
|
|
84
|
+
borderRadius: string;
|
|
85
|
+
};
|
|
86
|
+
'&.is-square.size-xl': {
|
|
87
|
+
borderRadius: string;
|
|
88
|
+
};
|
|
89
|
+
'&.is-logo': {
|
|
90
|
+
borderWidth: string;
|
|
91
|
+
borderStyle: string;
|
|
92
|
+
borderColor: string;
|
|
93
|
+
backgroundColor: string;
|
|
94
|
+
'&.size-sm': {
|
|
95
|
+
img: {
|
|
96
|
+
width: string;
|
|
97
|
+
height: string;
|
|
98
|
+
borderRadius: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
'&.size-md': {
|
|
102
|
+
img: {
|
|
103
|
+
width: string;
|
|
104
|
+
height: string;
|
|
105
|
+
borderRadius: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
'&.size-xmd': {
|
|
109
|
+
img: {
|
|
110
|
+
width: string;
|
|
111
|
+
height: string;
|
|
112
|
+
borderRadius: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
'&.size-lg': {
|
|
116
|
+
img: {
|
|
117
|
+
width: string;
|
|
118
|
+
height: string;
|
|
119
|
+
borderRadius: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
'&.size-xl': {
|
|
123
|
+
img: {
|
|
124
|
+
width: string;
|
|
125
|
+
height: string;
|
|
126
|
+
borderRadius: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
'&.is-image:not(.is-logo)': {
|
|
131
|
+
'&.size-sm': {
|
|
132
|
+
img: {
|
|
133
|
+
width: string;
|
|
134
|
+
height: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
'&.size-md': {
|
|
138
|
+
img: {
|
|
139
|
+
width: string;
|
|
140
|
+
height: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
'&.size-xmd': {
|
|
144
|
+
img: {
|
|
145
|
+
width: string;
|
|
146
|
+
height: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
'&.size-lg': {
|
|
150
|
+
img: {
|
|
151
|
+
width: string;
|
|
152
|
+
height: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
'&.size-xl': {
|
|
156
|
+
img: {
|
|
157
|
+
width: string;
|
|
158
|
+
height: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
76
162
|
display: string;
|
|
77
163
|
borderRadius: string;
|
|
78
164
|
textAlign: string;
|
|
@@ -59,6 +59,10 @@ var avatar = {
|
|
|
59
59
|
width: _sizes["default"].avatar.md,
|
|
60
60
|
height: _sizes["default"].avatar.md
|
|
61
61
|
},
|
|
62
|
+
'&.size-xmd': {
|
|
63
|
+
width: _sizes["default"].avatar.xmd,
|
|
64
|
+
height: _sizes["default"].avatar.xmd
|
|
65
|
+
},
|
|
62
66
|
'&.size-lg': {
|
|
63
67
|
width: _sizes["default"].avatar.lg,
|
|
64
68
|
height: _sizes["default"].avatar.lg
|
|
@@ -73,6 +77,9 @@ var avatar = {
|
|
|
73
77
|
'&.font-size-md': {
|
|
74
78
|
fontSize: _sizes["default"].avatarFontSize.md
|
|
75
79
|
},
|
|
80
|
+
'&.font-size-xmd': {
|
|
81
|
+
fontSize: _sizes["default"].avatarFontSize.xmd
|
|
82
|
+
},
|
|
76
83
|
'&.font-size-lg': {
|
|
77
84
|
fontSize: _sizes["default"].avatarFontSize.lg
|
|
78
85
|
},
|
|
@@ -82,6 +89,85 @@ var avatar = {
|
|
|
82
89
|
'&.is-square': {
|
|
83
90
|
borderRadius: '4px'
|
|
84
91
|
},
|
|
92
|
+
'&.is-square.size-lg': {
|
|
93
|
+
borderRadius: '8px'
|
|
94
|
+
},
|
|
95
|
+
'&.is-square.size-xl': {
|
|
96
|
+
borderRadius: '16px'
|
|
97
|
+
},
|
|
98
|
+
'&.is-logo': {
|
|
99
|
+
borderWidth: '1px',
|
|
100
|
+
borderStyle: 'solid',
|
|
101
|
+
borderColor: 'gray-200',
|
|
102
|
+
backgroundColor: 'transparent',
|
|
103
|
+
'&.size-sm': {
|
|
104
|
+
img: {
|
|
105
|
+
width: _sizes["default"].avatarLogo.sm,
|
|
106
|
+
height: _sizes["default"].avatarLogo.sm,
|
|
107
|
+
borderRadius: '0px'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
'&.size-md': {
|
|
111
|
+
img: {
|
|
112
|
+
width: _sizes["default"].avatarLogo.md,
|
|
113
|
+
height: _sizes["default"].avatarLogo.md,
|
|
114
|
+
borderRadius: '0px'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
'&.size-xmd': {
|
|
118
|
+
img: {
|
|
119
|
+
width: _sizes["default"].avatarLogo.xmd,
|
|
120
|
+
height: _sizes["default"].avatarLogo.xmd,
|
|
121
|
+
borderRadius: '0px'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
'&.size-lg': {
|
|
125
|
+
img: {
|
|
126
|
+
width: _sizes["default"].avatarLogo.lg,
|
|
127
|
+
height: _sizes["default"].avatarLogo.lg,
|
|
128
|
+
borderRadius: '0px'
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
'&.size-xl': {
|
|
132
|
+
img: {
|
|
133
|
+
width: _sizes["default"].avatarLogo.xl,
|
|
134
|
+
height: _sizes["default"].avatarLogo.xl,
|
|
135
|
+
borderRadius: '0px'
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
'&.is-image:not(.is-logo)': {
|
|
140
|
+
'&.size-sm': {
|
|
141
|
+
img: {
|
|
142
|
+
width: _sizes["default"].avatar.sm,
|
|
143
|
+
height: _sizes["default"].avatar.sm
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
'&.size-md': {
|
|
147
|
+
img: {
|
|
148
|
+
width: _sizes["default"].avatar.md,
|
|
149
|
+
height: _sizes["default"].avatar.md
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
'&.size-xmd': {
|
|
153
|
+
img: {
|
|
154
|
+
width: _sizes["default"].avatar.xmd,
|
|
155
|
+
height: _sizes["default"].avatar.xmd
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
'&.size-lg': {
|
|
159
|
+
img: {
|
|
160
|
+
width: _sizes["default"].avatar.lg,
|
|
161
|
+
height: _sizes["default"].avatar.lg
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
'&.size-xl': {
|
|
165
|
+
img: {
|
|
166
|
+
width: _sizes["default"].avatar.xl,
|
|
167
|
+
height: _sizes["default"].avatar.xl
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
85
171
|
display: 'flex',
|
|
86
172
|
borderRadius: '50%',
|
|
87
173
|
textAlign: 'center',
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
app: {
|
|
3
|
+
lineHeight: string;
|
|
4
|
+
'&.is-hovered': {
|
|
5
|
+
color: string;
|
|
6
|
+
textDecorationColor: string;
|
|
7
|
+
};
|
|
8
|
+
'&.is-focused': {
|
|
9
|
+
borderRadius: string;
|
|
10
|
+
outline: string;
|
|
11
|
+
outlineColor: string;
|
|
12
|
+
};
|
|
13
|
+
'&.is-pressed': {
|
|
14
|
+
color: string;
|
|
15
|
+
textDecorationColor: string;
|
|
16
|
+
};
|
|
17
|
+
'&:visited': {
|
|
18
|
+
color: string;
|
|
19
|
+
textDecoration: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
2
22
|
nextGen: {
|
|
3
23
|
color: string;
|
|
4
24
|
fontSize: string;
|
|
@@ -25,6 +25,24 @@ var navBarFocus = {
|
|
|
25
25
|
outline: '2px solid',
|
|
26
26
|
outlineColor: 'active'
|
|
27
27
|
};
|
|
28
|
+
var app = {
|
|
29
|
+
lineHeight: '160%',
|
|
30
|
+
'&.is-hovered': {
|
|
31
|
+
color: 'blue-600',
|
|
32
|
+
textDecorationColor: 'blue-600'
|
|
33
|
+
},
|
|
34
|
+
'&.is-focused': _objectSpread(_objectSpread({}, navBarFocus), {}, {
|
|
35
|
+
borderRadius: '2px'
|
|
36
|
+
}),
|
|
37
|
+
'&.is-pressed': {
|
|
38
|
+
color: 'blue-600',
|
|
39
|
+
textDecorationColor: 'blue-600'
|
|
40
|
+
},
|
|
41
|
+
'&:visited': {
|
|
42
|
+
color: 'purple-700',
|
|
43
|
+
textDecoration: 'underline'
|
|
44
|
+
}
|
|
45
|
+
};
|
|
28
46
|
var nextGen = {
|
|
29
47
|
color: 'gray-800',
|
|
30
48
|
fontSize: 'md',
|
|
@@ -93,6 +111,7 @@ var footerEALink = {
|
|
|
93
111
|
'&.is-focused': _objectSpread({}, _button.defaultFocus)
|
|
94
112
|
};
|
|
95
113
|
var _default = {
|
|
114
|
+
app: app,
|
|
96
115
|
nextGen: nextGen,
|
|
97
116
|
onyx: onyx,
|
|
98
117
|
sideNav: sideNav,
|
|
@@ -118,6 +118,10 @@ declare const _default: {
|
|
|
118
118
|
width: string;
|
|
119
119
|
height: string;
|
|
120
120
|
};
|
|
121
|
+
'&.size-xmd': {
|
|
122
|
+
width: string;
|
|
123
|
+
height: string;
|
|
124
|
+
};
|
|
121
125
|
'&.size-lg': {
|
|
122
126
|
width: string;
|
|
123
127
|
height: string;
|
|
@@ -132,6 +136,9 @@ declare const _default: {
|
|
|
132
136
|
'&.font-size-md': {
|
|
133
137
|
fontSize: string;
|
|
134
138
|
};
|
|
139
|
+
'&.font-size-xmd': {
|
|
140
|
+
fontSize: string;
|
|
141
|
+
};
|
|
135
142
|
'&.font-size-lg': {
|
|
136
143
|
fontSize: string;
|
|
137
144
|
};
|
|
@@ -141,6 +148,85 @@ declare const _default: {
|
|
|
141
148
|
'&.is-square': {
|
|
142
149
|
borderRadius: string;
|
|
143
150
|
};
|
|
151
|
+
'&.is-square.size-lg': {
|
|
152
|
+
borderRadius: string;
|
|
153
|
+
};
|
|
154
|
+
'&.is-square.size-xl': {
|
|
155
|
+
borderRadius: string;
|
|
156
|
+
};
|
|
157
|
+
'&.is-logo': {
|
|
158
|
+
borderWidth: string;
|
|
159
|
+
borderStyle: string;
|
|
160
|
+
borderColor: string;
|
|
161
|
+
backgroundColor: string;
|
|
162
|
+
'&.size-sm': {
|
|
163
|
+
img: {
|
|
164
|
+
width: string;
|
|
165
|
+
height: string;
|
|
166
|
+
borderRadius: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
'&.size-md': {
|
|
170
|
+
img: {
|
|
171
|
+
width: string;
|
|
172
|
+
height: string;
|
|
173
|
+
borderRadius: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
'&.size-xmd': {
|
|
177
|
+
img: {
|
|
178
|
+
width: string;
|
|
179
|
+
height: string;
|
|
180
|
+
borderRadius: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
'&.size-lg': {
|
|
184
|
+
img: {
|
|
185
|
+
width: string;
|
|
186
|
+
height: string;
|
|
187
|
+
borderRadius: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
'&.size-xl': {
|
|
191
|
+
img: {
|
|
192
|
+
width: string;
|
|
193
|
+
height: string;
|
|
194
|
+
borderRadius: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
'&.is-image:not(.is-logo)': {
|
|
199
|
+
'&.size-sm': {
|
|
200
|
+
img: {
|
|
201
|
+
width: string;
|
|
202
|
+
height: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
'&.size-md': {
|
|
206
|
+
img: {
|
|
207
|
+
width: string;
|
|
208
|
+
height: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
'&.size-xmd': {
|
|
212
|
+
img: {
|
|
213
|
+
width: string;
|
|
214
|
+
height: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
'&.size-lg': {
|
|
218
|
+
img: {
|
|
219
|
+
width: string;
|
|
220
|
+
height: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
'&.size-xl': {
|
|
224
|
+
img: {
|
|
225
|
+
width: string;
|
|
226
|
+
height: string;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
144
230
|
display: string;
|
|
145
231
|
borderRadius: string;
|
|
146
232
|
textAlign: string;
|
|
@@ -9,13 +9,12 @@ 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", "children", "isSquare"];
|
|
12
|
+
var _excluded = ["alt", "defaultText", "color", "className", "size", "src", "sx", "children", "isSquare", "isLogo"];
|
|
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';
|
|
19
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
19
|
var Avatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
20
|
var _useStatusClasses2;
|
|
@@ -31,21 +30,19 @@ var Avatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
31
30
|
sx = props.sx,
|
|
32
31
|
children = props.children,
|
|
33
32
|
isSquare = props.isSquare,
|
|
33
|
+
isLogo = props.isLogo,
|
|
34
34
|
others = _objectWithoutProperties(props, _excluded);
|
|
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)),
|
|
35
|
+
var _useStatusClasses = useStatusClasses(className, (_useStatusClasses2 = {}, _defineProperty(_useStatusClasses2, "is-".concat(color), color), _defineProperty(_useStatusClasses2, "size-".concat(size), size), _defineProperty(_useStatusClasses2, "font-size-".concat(size), src ? false : size), _defineProperty(_useStatusClasses2, 'is-square', isSquare), _defineProperty(_useStatusClasses2, 'is-image', src), _defineProperty(_useStatusClasses2, 'is-logo', isLogo), _useStatusClasses2)),
|
|
36
36
|
classNames = _useStatusClasses.classNames;
|
|
37
37
|
if (src) {
|
|
38
|
-
return ___EmotionJSX(
|
|
38
|
+
return ___EmotionJSX(Box, {
|
|
39
|
+
variant: "avatar",
|
|
40
|
+
className: classNames
|
|
41
|
+
}, ___EmotionJSX(ThemeUIAvatar, _extends({
|
|
39
42
|
ref: ref,
|
|
40
43
|
alt: alt,
|
|
41
|
-
src: src
|
|
42
|
-
|
|
43
|
-
size: size,
|
|
44
|
-
width: sizes.avatar[size],
|
|
45
|
-
height: sizes.avatar[size],
|
|
46
|
-
borderRadius: isSquare ? '0px' : '100%'
|
|
47
|
-
}, sx)
|
|
48
|
-
}, others));
|
|
44
|
+
src: src
|
|
45
|
+
}, others)));
|
|
49
46
|
}
|
|
50
47
|
return ___EmotionJSX(Box, _extends({
|
|
51
48
|
variant: "avatar",
|
|
@@ -52,7 +52,7 @@ export var Default = function Default(_ref) {
|
|
|
52
52
|
var args = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
53
53
|
return ___EmotionJSX(Avatar, args);
|
|
54
54
|
};
|
|
55
|
-
export var
|
|
55
|
+
export var SizeVariation = function SizeVariation() {
|
|
56
56
|
return ___EmotionJSX(Box, {
|
|
57
57
|
isRow: true,
|
|
58
58
|
gap: "sm",
|
|
@@ -71,7 +71,7 @@ export var WithSizeVariation = function WithSizeVariation() {
|
|
|
71
71
|
color: "green"
|
|
72
72
|
}));
|
|
73
73
|
};
|
|
74
|
-
export var
|
|
74
|
+
export var ColorVariation = function ColorVariation() {
|
|
75
75
|
return ___EmotionJSX(Box, {
|
|
76
76
|
isRow: true,
|
|
77
77
|
gap: "sm",
|
|
@@ -98,7 +98,7 @@ export var WithColorVariation = function WithColorVariation() {
|
|
|
98
98
|
color: "indigo"
|
|
99
99
|
}));
|
|
100
100
|
};
|
|
101
|
-
export var
|
|
101
|
+
export var IconVariation = function IconVariation() {
|
|
102
102
|
return ___EmotionJSX(Avatar, {
|
|
103
103
|
color: "green"
|
|
104
104
|
}, ___EmotionJSX(IconWrapper, {
|
|
@@ -110,13 +110,51 @@ export var WithIconVariation = function WithIconVariation() {
|
|
|
110
110
|
}
|
|
111
111
|
}));
|
|
112
112
|
};
|
|
113
|
-
export var
|
|
113
|
+
export var ImageVariation = function ImageVariation(_ref2) {
|
|
114
114
|
var args = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
115
115
|
return ___EmotionJSX(Avatar, args);
|
|
116
116
|
};
|
|
117
|
-
export var
|
|
118
|
-
return ___EmotionJSX(
|
|
117
|
+
export var SquareVariation = function SquareVariation() {
|
|
118
|
+
return ___EmotionJSX(Box, {
|
|
119
|
+
isRow: true,
|
|
120
|
+
gap: "sm",
|
|
121
|
+
alignItems: "center"
|
|
122
|
+
}, ___EmotionJSX(Avatar, {
|
|
119
123
|
color: "green",
|
|
120
124
|
isSquare: true
|
|
121
|
-
})
|
|
125
|
+
}), ___EmotionJSX(Avatar, {
|
|
126
|
+
color: "green",
|
|
127
|
+
isSquare: true,
|
|
128
|
+
size: "xmd"
|
|
129
|
+
}), ___EmotionJSX(Avatar, {
|
|
130
|
+
color: "green",
|
|
131
|
+
isSquare: true,
|
|
132
|
+
size: "lg"
|
|
133
|
+
}), ___EmotionJSX(Avatar, {
|
|
134
|
+
color: "green",
|
|
135
|
+
isSquare: true,
|
|
136
|
+
size: "xl"
|
|
137
|
+
}));
|
|
138
|
+
};
|
|
139
|
+
export var LogoVariation = function LogoVariation(args) {
|
|
140
|
+
return ___EmotionJSX(Box, {
|
|
141
|
+
isRow: true,
|
|
142
|
+
gap: "sm",
|
|
143
|
+
alignItems: "center"
|
|
144
|
+
}, ___EmotionJSX(Avatar, _extends({}, args, {
|
|
145
|
+
isSquare: true,
|
|
146
|
+
isLogo: true
|
|
147
|
+
})), ___EmotionJSX(Avatar, _extends({}, args, {
|
|
148
|
+
isSquare: true,
|
|
149
|
+
size: "xmd",
|
|
150
|
+
isLogo: true
|
|
151
|
+
})), ___EmotionJSX(Avatar, _extends({}, args, {
|
|
152
|
+
isSquare: true,
|
|
153
|
+
size: "lg",
|
|
154
|
+
isLogo: true
|
|
155
|
+
})), ___EmotionJSX(Avatar, _extends({}, args, {
|
|
156
|
+
isSquare: true,
|
|
157
|
+
size: "xl",
|
|
158
|
+
isLogo: true
|
|
159
|
+
})));
|
|
122
160
|
};
|
|
@@ -44,13 +44,15 @@ var app = {
|
|
|
44
44
|
color: 'blue-400',
|
|
45
45
|
'&.is-hovered': {
|
|
46
46
|
textDecoration: 'underline',
|
|
47
|
+
textDecorationColor: 'blue-300',
|
|
47
48
|
color: 'blue-300'
|
|
48
49
|
},
|
|
49
50
|
'&.is-pressed': {
|
|
50
51
|
color: 'blue-300',
|
|
52
|
+
textDecorationColor: 'blue-300',
|
|
51
53
|
textDecoration: 'underline'
|
|
52
54
|
},
|
|
53
|
-
'
|
|
55
|
+
'&:visited': {
|
|
54
56
|
color: 'purple-100'
|
|
55
57
|
}
|
|
56
58
|
};
|
|
@@ -16,7 +16,7 @@ export var astroBlacklistStory = {
|
|
|
16
16
|
Callout: ['Customizations'],
|
|
17
17
|
CodeView: ['Light'],
|
|
18
18
|
StatusIcon: ['Default', 'In Rocker Button'],
|
|
19
|
-
Avatar: ['
|
|
19
|
+
Avatar: ['Size Variation', 'Color Variation', 'Icon Variation', 'Square Variation', 'Logo Variation'],
|
|
20
20
|
Text: ['Onyx'],
|
|
21
21
|
Loader: ['Circular', 'Custom Circular']
|
|
22
22
|
};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
var avatar = {
|
|
2
2
|
sm: '24px',
|
|
3
3
|
md: '32px',
|
|
4
|
+
xmd: '44px',
|
|
4
5
|
lg: '72px',
|
|
5
6
|
xl: '104px'
|
|
6
7
|
};
|
|
8
|
+
var avatarLogo = {
|
|
9
|
+
sm: '14px',
|
|
10
|
+
md: '20px',
|
|
11
|
+
xmd: '24px',
|
|
12
|
+
lg: '44px',
|
|
13
|
+
xl: '54px'
|
|
14
|
+
};
|
|
7
15
|
var avatarFontSize = {
|
|
8
16
|
sm: '9.6px',
|
|
9
17
|
md: '13.6px',
|
|
18
|
+
xmd: '18px',
|
|
10
19
|
lg: '28.8px',
|
|
11
20
|
xl: '41.6px'
|
|
12
21
|
};
|
|
@@ -28,6 +37,7 @@ var icons = {
|
|
|
28
37
|
};
|
|
29
38
|
export default {
|
|
30
39
|
avatar: avatar,
|
|
40
|
+
avatarLogo: avatarLogo,
|
|
31
41
|
avatarFontSize: avatarFontSize,
|
|
32
42
|
container: container,
|
|
33
43
|
iconBadge: iconBadge,
|
|
@@ -51,6 +51,10 @@ export var avatar = {
|
|
|
51
51
|
width: sizes.avatar.md,
|
|
52
52
|
height: sizes.avatar.md
|
|
53
53
|
},
|
|
54
|
+
'&.size-xmd': {
|
|
55
|
+
width: sizes.avatar.xmd,
|
|
56
|
+
height: sizes.avatar.xmd
|
|
57
|
+
},
|
|
54
58
|
'&.size-lg': {
|
|
55
59
|
width: sizes.avatar.lg,
|
|
56
60
|
height: sizes.avatar.lg
|
|
@@ -65,6 +69,9 @@ export var avatar = {
|
|
|
65
69
|
'&.font-size-md': {
|
|
66
70
|
fontSize: sizes.avatarFontSize.md
|
|
67
71
|
},
|
|
72
|
+
'&.font-size-xmd': {
|
|
73
|
+
fontSize: sizes.avatarFontSize.xmd
|
|
74
|
+
},
|
|
68
75
|
'&.font-size-lg': {
|
|
69
76
|
fontSize: sizes.avatarFontSize.lg
|
|
70
77
|
},
|
|
@@ -74,6 +81,85 @@ export var avatar = {
|
|
|
74
81
|
'&.is-square': {
|
|
75
82
|
borderRadius: '4px'
|
|
76
83
|
},
|
|
84
|
+
'&.is-square.size-lg': {
|
|
85
|
+
borderRadius: '8px'
|
|
86
|
+
},
|
|
87
|
+
'&.is-square.size-xl': {
|
|
88
|
+
borderRadius: '16px'
|
|
89
|
+
},
|
|
90
|
+
'&.is-logo': {
|
|
91
|
+
borderWidth: '1px',
|
|
92
|
+
borderStyle: 'solid',
|
|
93
|
+
borderColor: 'gray-200',
|
|
94
|
+
backgroundColor: 'transparent',
|
|
95
|
+
'&.size-sm': {
|
|
96
|
+
img: {
|
|
97
|
+
width: sizes.avatarLogo.sm,
|
|
98
|
+
height: sizes.avatarLogo.sm,
|
|
99
|
+
borderRadius: '0px'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
'&.size-md': {
|
|
103
|
+
img: {
|
|
104
|
+
width: sizes.avatarLogo.md,
|
|
105
|
+
height: sizes.avatarLogo.md,
|
|
106
|
+
borderRadius: '0px'
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
'&.size-xmd': {
|
|
110
|
+
img: {
|
|
111
|
+
width: sizes.avatarLogo.xmd,
|
|
112
|
+
height: sizes.avatarLogo.xmd,
|
|
113
|
+
borderRadius: '0px'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
'&.size-lg': {
|
|
117
|
+
img: {
|
|
118
|
+
width: sizes.avatarLogo.lg,
|
|
119
|
+
height: sizes.avatarLogo.lg,
|
|
120
|
+
borderRadius: '0px'
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
'&.size-xl': {
|
|
124
|
+
img: {
|
|
125
|
+
width: sizes.avatarLogo.xl,
|
|
126
|
+
height: sizes.avatarLogo.xl,
|
|
127
|
+
borderRadius: '0px'
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
'&.is-image:not(.is-logo)': {
|
|
132
|
+
'&.size-sm': {
|
|
133
|
+
img: {
|
|
134
|
+
width: sizes.avatar.sm,
|
|
135
|
+
height: sizes.avatar.sm
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
'&.size-md': {
|
|
139
|
+
img: {
|
|
140
|
+
width: sizes.avatar.md,
|
|
141
|
+
height: sizes.avatar.md
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
'&.size-xmd': {
|
|
145
|
+
img: {
|
|
146
|
+
width: sizes.avatar.xmd,
|
|
147
|
+
height: sizes.avatar.xmd
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
'&.size-lg': {
|
|
151
|
+
img: {
|
|
152
|
+
width: sizes.avatar.lg,
|
|
153
|
+
height: sizes.avatar.lg
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
'&.size-xl': {
|
|
157
|
+
img: {
|
|
158
|
+
width: sizes.avatar.xl,
|
|
159
|
+
height: sizes.avatar.xl
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
77
163
|
display: 'flex',
|
|
78
164
|
borderRadius: '50%',
|
|
79
165
|
textAlign: 'center',
|
|
@@ -14,6 +14,24 @@ var navBarFocus = {
|
|
|
14
14
|
outline: '2px solid',
|
|
15
15
|
outlineColor: 'active'
|
|
16
16
|
};
|
|
17
|
+
var app = {
|
|
18
|
+
lineHeight: '160%',
|
|
19
|
+
'&.is-hovered': {
|
|
20
|
+
color: 'blue-600',
|
|
21
|
+
textDecorationColor: 'blue-600'
|
|
22
|
+
},
|
|
23
|
+
'&.is-focused': _objectSpread(_objectSpread({}, navBarFocus), {}, {
|
|
24
|
+
borderRadius: '2px'
|
|
25
|
+
}),
|
|
26
|
+
'&.is-pressed': {
|
|
27
|
+
color: 'blue-600',
|
|
28
|
+
textDecorationColor: 'blue-600'
|
|
29
|
+
},
|
|
30
|
+
'&:visited': {
|
|
31
|
+
color: 'purple-700',
|
|
32
|
+
textDecoration: 'underline'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
17
35
|
var nextGen = {
|
|
18
36
|
color: 'gray-800',
|
|
19
37
|
fontSize: 'md',
|
|
@@ -82,6 +100,7 @@ var footerEALink = {
|
|
|
82
100
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
83
101
|
};
|
|
84
102
|
export default {
|
|
103
|
+
app: app,
|
|
85
104
|
nextGen: nextGen,
|
|
86
105
|
onyx: onyx,
|
|
87
106
|
sideNav: sideNav,
|