@orfium/ictinus 4.20.0 → 4.21.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/dist/components/Avatar/Avatar.d.ts +2 -7
- package/dist/components/Avatar/Avatar.js +6 -6
- package/dist/components/Avatar/Avatar.style.d.ts +1 -0
- package/dist/components/Avatar/Avatar.style.js +15 -22
- package/dist/components/Avatar/AvatarStack/AvatarStack.d.ts +17 -0
- package/dist/components/Avatar/AvatarStack/AvatarStack.js +70 -0
- package/dist/components/Avatar/AvatarStack/AvatarStack.style.d.ts +9 -0
- package/dist/components/Avatar/AvatarStack/AvatarStack.style.js +43 -0
- package/dist/components/Avatar/AvatarStack/index.d.ts +1 -0
- package/dist/components/Avatar/AvatarStack/index.js +10 -0
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -1
- package/package.json +1 -1
|
@@ -16,14 +16,9 @@ export declare type Props = {
|
|
|
16
16
|
* @default 'darkGrey-500'
|
|
17
17
|
* */
|
|
18
18
|
color?: string;
|
|
19
|
-
/** the shape of the avatar
|
|
20
|
-
* @default 'circular'
|
|
21
|
-
* */
|
|
22
|
-
shape?: AvatarShapes;
|
|
23
19
|
/** The class name of the avatar component if its styled **/
|
|
24
20
|
className?: string;
|
|
25
21
|
};
|
|
26
|
-
export declare type AvatarSizes = '
|
|
27
|
-
|
|
28
|
-
declare const Avatar: React.ForwardRefExoticComponent<Pick<Props & DivProps, "children" | "onChange" | "onBlur" | "onClick" | "type" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "sizes" | "span" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "useMap" | "width" | "wmode" | "wrap" | "key" | keyof Props> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export declare type AvatarSizes = 'xs' | 'sm' | 'md' | 'lg';
|
|
23
|
+
declare const Avatar: React.ForwardRefExoticComponent<Pick<Props & DivProps, "children" | "onChange" | "onBlur" | "onClick" | "type" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "useMap" | "width" | "wmode" | "wrap" | "key" | keyof Props> & React.RefAttributes<HTMLDivElement>>;
|
|
29
24
|
export default Avatar;
|
|
@@ -19,17 +19,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
19
19
|
|
|
20
20
|
var iconSizeBasedOnAvatar = function iconSizeBasedOnAvatar(size) {
|
|
21
21
|
switch (size) {
|
|
22
|
-
case '
|
|
23
|
-
return
|
|
22
|
+
case 'md':
|
|
23
|
+
return 16;
|
|
24
24
|
|
|
25
|
-
case '
|
|
26
|
-
return
|
|
25
|
+
case 'sm':
|
|
26
|
+
return 12;
|
|
27
27
|
|
|
28
|
-
case '
|
|
28
|
+
case 'xs':
|
|
29
29
|
return 10;
|
|
30
30
|
|
|
31
31
|
default:
|
|
32
|
-
return
|
|
32
|
+
return 28;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -2,6 +2,7 @@ import { SerializedStyles } from '@emotion/react';
|
|
|
2
2
|
import { Theme } from '../../theme';
|
|
3
3
|
import { colorShades, flatColors } from '../../theme/palette';
|
|
4
4
|
import { AvatarSizes } from './Avatar';
|
|
5
|
+
export declare const sizeBasedOnProp: (size: AvatarSizes) => number;
|
|
5
6
|
export declare const avatarStyle: ({ size, fill, fillShade, }: {
|
|
6
7
|
size: AvatarSizes;
|
|
7
8
|
fill: typeof flatColors[number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.avatarStyle = void 0;
|
|
4
|
+
exports.avatarStyle = exports.sizeBasedOnProp = void 0;
|
|
5
5
|
|
|
6
6
|
var _react = require("@emotion/react");
|
|
7
7
|
|
|
@@ -13,42 +13,35 @@ var _palette = require("../../theme/palette");
|
|
|
13
13
|
|
|
14
14
|
var sizeBasedOnProp = function sizeBasedOnProp(size) {
|
|
15
15
|
switch (size) {
|
|
16
|
-
case 'sm':
|
|
17
|
-
return (0, _utils.rem)(36);
|
|
18
|
-
|
|
19
16
|
case 'md':
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
case 'xs':
|
|
23
|
-
return (0, _utils.rem)(24);
|
|
17
|
+
return 24;
|
|
24
18
|
|
|
25
|
-
case '
|
|
26
|
-
return
|
|
19
|
+
case 'sm':
|
|
20
|
+
return 20;
|
|
27
21
|
|
|
28
|
-
case '
|
|
29
|
-
return
|
|
22
|
+
case 'xs':
|
|
23
|
+
return 16;
|
|
30
24
|
|
|
31
25
|
default:
|
|
32
|
-
return
|
|
26
|
+
return 46;
|
|
33
27
|
}
|
|
34
28
|
};
|
|
35
29
|
|
|
30
|
+
exports.sizeBasedOnProp = sizeBasedOnProp;
|
|
31
|
+
|
|
36
32
|
var fontSizeBasedOnProp = function fontSizeBasedOnProp(theme, size) {
|
|
37
33
|
switch (size) {
|
|
34
|
+
case 'md':
|
|
35
|
+
return theme.typography.fontSizes['11'];
|
|
36
|
+
|
|
38
37
|
case 'sm':
|
|
39
|
-
return theme.typography.fontSizes['
|
|
38
|
+
return theme.typography.fontSizes['10'];
|
|
40
39
|
|
|
41
40
|
case 'xs':
|
|
42
|
-
return theme.typography.fontSizes['13'];
|
|
43
|
-
|
|
44
|
-
case 'xxs':
|
|
45
|
-
return theme.typography.fontSizes['11'];
|
|
46
|
-
|
|
47
|
-
case 'xxxs':
|
|
48
41
|
return theme.typography.fontSizes['8'];
|
|
49
42
|
|
|
50
43
|
default:
|
|
51
|
-
return theme.typography.fontSizes['
|
|
44
|
+
return theme.typography.fontSizes['16'];
|
|
52
45
|
}
|
|
53
46
|
};
|
|
54
47
|
|
|
@@ -61,7 +54,7 @@ var avatarStyle = function avatarStyle(_ref) {
|
|
|
61
54
|
/*#__PURE__*/
|
|
62
55
|
|
|
63
56
|
/*#__PURE__*/
|
|
64
|
-
(0, _react.css)(_functions.flex, ";width:", sizeBasedOnProp(size), ";height:", sizeBasedOnProp(size), ";border-radius:100%;background:", theme.utils.getColor(fill, fillShade), ";overflow:hidden;position:relative;font-size:", fontSizeBasedOnProp(theme, size), ";align-items:center;flex-shrink:0;line-height:1;user-select:none;justify-content:center;color:", (0, _palette.pickTextColorFromSwatches)(fill, fillShade), ";img{border-radius:100%;width:100%;height:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:avatarStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
57
|
+
(0, _react.css)(_functions.flex, ";width:", (0, _utils.rem)(sizeBasedOnProp(size)), ";height:", (0, _utils.rem)(sizeBasedOnProp(size)), ";border-radius:100%;border:", (0, _utils.rem)(1), " solid ", theme.utils.getColor('lightGrey', 100), ";box-sizing:border-box;background:", theme.utils.getColor(fill, fillShade), ";overflow:hidden;position:relative;font-size:", fontSizeBasedOnProp(theme, size), ";font-weight:", theme.typography.weights.medium, ";align-items:center;flex-shrink:0;line-height:1;user-select:none;justify-content:center;color:", (0, _palette.pickTextColorFromSwatches)(fill, fillShade), ";img{border-radius:100%;width:100%;height:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:avatarStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhci9BdmF0YXIuc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEM2QyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9BdmF0YXIvQXZhdGFyLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAndGhlbWUvdXRpbHMnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lJztcbmltcG9ydCB7IGZsZXggfSBmcm9tICcuLi8uLi90aGVtZS9mdW5jdGlvbnMnO1xuaW1wb3J0IHsgY29sb3JTaGFkZXMsIGZsYXRDb2xvcnMsIHBpY2tUZXh0Q29sb3JGcm9tU3dhdGNoZXMgfSBmcm9tICcuLi8uLi90aGVtZS9wYWxldHRlJztcbmltcG9ydCB7IEF2YXRhclNpemVzIH0gZnJvbSAnLi9BdmF0YXInO1xuXG5leHBvcnQgY29uc3Qgc2l6ZUJhc2VkT25Qcm9wID0gKHNpemU6IEF2YXRhclNpemVzKTogbnVtYmVyID0+IHtcbiAgc3dpdGNoIChzaXplKSB7XG4gICAgY2FzZSAnbWQnOlxuICAgICAgcmV0dXJuIDI0O1xuICAgIGNhc2UgJ3NtJzpcbiAgICAgIHJldHVybiAyMDtcbiAgICBjYXNlICd4cyc6XG4gICAgICByZXR1cm4gMTY7XG4gICAgZGVmYXVsdDpcbiAgICAgIHJldHVybiA0NjtcbiAgfVxufTtcblxuY29uc3QgZm9udFNpemVCYXNlZE9uUHJvcCA9ICh0aGVtZTogVGhlbWUsIHNpemU6IEF2YXRhclNpemVzKSA9PiB7XG4gIHN3aXRjaCAoc2l6ZSkge1xuICAgIGNhc2UgJ21kJzpcbiAgICAgIHJldHVybiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplc1snMTEnXTtcbiAgICBjYXNlICdzbSc6XG4gICAgICByZXR1cm4gdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZXNbJzEwJ107XG4gICAgY2FzZSAneHMnOlxuICAgICAgcmV0dXJuIHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemVzWyc4J107XG4gICAgZGVmYXVsdDpcbiAgICAgIHJldHVybiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplc1snMTYnXTtcbiAgfVxufTtcblxuZXhwb3J0IGNvbnN0IGF2YXRhclN0eWxlID0gKHtcbiAgc2l6ZSxcbiAgZmlsbCxcbiAgZmlsbFNoYWRlLFxufToge1xuICBzaXplOiBBdmF0YXJTaXplcztcbiAgZmlsbDogdHlwZW9mIGZsYXRDb2xvcnNbbnVtYmVyXTtcbiAgZmlsbFNoYWRlOiB0eXBlb2YgY29sb3JTaGFkZXNbbnVtYmVyXTtcbn0pID0+ICh0aGVtZTogVGhlbWUpOiBTZXJpYWxpemVkU3R5bGVzID0+IGNzc2BcbiAgJHtmbGV4fTtcbiAgd2lkdGg6ICR7cmVtKHNpemVCYXNlZE9uUHJvcChzaXplKSl9O1xuICBoZWlnaHQ6ICR7cmVtKHNpemVCYXNlZE9uUHJvcChzaXplKSl9O1xuICBib3JkZXItcmFkaXVzOiAxMDAlO1xuICBib3JkZXI6ICR7cmVtKDEpfSBzb2xpZCAke3RoZW1lLnV0aWxzLmdldENvbG9yKCdsaWdodEdyZXknLCAxMDApfTtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgYmFja2dyb3VuZDogJHt0aGVtZS51dGlscy5nZXRDb2xvcihmaWxsLCBmaWxsU2hhZGUpfTtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBmb250LXNpemU6ICR7Zm9udFNpemVCYXNlZE9uUHJvcCh0aGVtZSwgc2l6ZSl9O1xuICBmb250LXdlaWdodDogJHt0aGVtZS50eXBvZ3JhcGh5LndlaWdodHMubWVkaXVtfTtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgZmxleC1zaHJpbms6IDA7XG4gIGxpbmUtaGVpZ2h0OiAxO1xuICB1c2VyLXNlbGVjdDogbm9uZTtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGNvbG9yOiAke3BpY2tUZXh0Q29sb3JGcm9tU3dhdGNoZXMoZmlsbCwgZmlsbFNoYWRlKX07XG5cbiAgaW1nIHtcbiAgICBib3JkZXItcmFkaXVzOiAxMDAlO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIGhlaWdodDogMTAwJTtcbiAgfVxuYDtcbiJdfQ== */", process.env.NODE_ENV === "production" ? "" : ";label:avatarStyle;")
|
|
65
58
|
);
|
|
66
59
|
};
|
|
67
60
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DivProps } from 'utils/common';
|
|
3
|
+
import { TestId } from 'utils/types';
|
|
4
|
+
import { AvatarSizes } from '../Avatar';
|
|
5
|
+
export declare type Props = {
|
|
6
|
+
/** the maximum number of avatars to be displayed **/
|
|
7
|
+
maxAvatars?: number;
|
|
8
|
+
/** The size of the extra avatar, if any **/
|
|
9
|
+
size?: AvatarSizes;
|
|
10
|
+
/** the color of the extra avatar based on our colors eg. red-500 **/
|
|
11
|
+
color?: string;
|
|
12
|
+
};
|
|
13
|
+
declare type TestProps = {
|
|
14
|
+
dataTestId?: TestId;
|
|
15
|
+
};
|
|
16
|
+
declare const AvatarStack: React.ForwardRefExoticComponent<Pick<Props & TestProps & DivProps, "children" | "onChange" | "onBlur" | "onClick" | "type" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "useMap" | "width" | "wmode" | "wrap" | "key" | "dataTestId" | keyof Props> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export default AvatarStack;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _helpers = require("../../../utils/helpers");
|
|
9
|
+
|
|
10
|
+
var _Avatar = _interopRequireDefault(require("../Avatar"));
|
|
11
|
+
|
|
12
|
+
var _AvatarStack = require("./AvatarStack.style");
|
|
13
|
+
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
var AvatarStack = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
23
|
+
var _ref$maxAvatars = _ref.maxAvatars,
|
|
24
|
+
maxAvatars = _ref$maxAvatars === void 0 ? 4 : _ref$maxAvatars,
|
|
25
|
+
_ref$size = _ref.size,
|
|
26
|
+
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
27
|
+
_ref$color = _ref.color,
|
|
28
|
+
color = _ref$color === void 0 ? 'lightGrey-600' : _ref$color,
|
|
29
|
+
_ref$dataTestId = _ref.dataTestId,
|
|
30
|
+
dataTestId = _ref$dataTestId === void 0 ? '' : _ref$dataTestId,
|
|
31
|
+
childrenProp = _ref.children;
|
|
32
|
+
|
|
33
|
+
if (maxAvatars < 1) {
|
|
34
|
+
throw new Error('maxAvatars prop must be greater than 0');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var children = _react["default"].Children.toArray(childrenProp);
|
|
38
|
+
|
|
39
|
+
var extraAvatars = children.length > maxAvatars ? children.length - maxAvatars : 0;
|
|
40
|
+
var renderContent = (0, _react.useCallback)(function () {
|
|
41
|
+
return children.slice(0, children.length - extraAvatars).map(function (child, index) {
|
|
42
|
+
return (0, _react2.jsx)("div", {
|
|
43
|
+
key: index,
|
|
44
|
+
css: (0, _AvatarStack.avatarWrapperStyle)({
|
|
45
|
+
zIndex: children.length - index,
|
|
46
|
+
size: size
|
|
47
|
+
})
|
|
48
|
+
}, child);
|
|
49
|
+
});
|
|
50
|
+
}, [children, extraAvatars, size]);
|
|
51
|
+
return (0, _react2.jsx)("div", {
|
|
52
|
+
ref: ref,
|
|
53
|
+
"data-testid": (0, _helpers.generateTestDataId)('avatarstack', dataTestId),
|
|
54
|
+
css: (0, _AvatarStack.avatarStackStyle)({
|
|
55
|
+
size: size
|
|
56
|
+
})
|
|
57
|
+
}, renderContent(), extraAvatars ? (0, _react2.jsx)("div", {
|
|
58
|
+
css: (0, _AvatarStack.avatarWrapperStyle)({
|
|
59
|
+
zIndex: 0,
|
|
60
|
+
size: size
|
|
61
|
+
})
|
|
62
|
+
}, (0, _react2.jsx)(_Avatar["default"], {
|
|
63
|
+
size: size,
|
|
64
|
+
color: color
|
|
65
|
+
}, "+", extraAvatars)) : null);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
AvatarStack.displayName = 'AvatarStack';
|
|
69
|
+
var _default = AvatarStack;
|
|
70
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { AvatarSizes } from '../Avatar';
|
|
3
|
+
export declare const avatarStackStyle: ({ size }: {
|
|
4
|
+
size: AvatarSizes;
|
|
5
|
+
}) => () => SerializedStyles;
|
|
6
|
+
export declare const avatarWrapperStyle: ({ zIndex, size, }: {
|
|
7
|
+
zIndex: number;
|
|
8
|
+
size: AvatarSizes;
|
|
9
|
+
}) => () => SerializedStyles;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.avatarWrapperStyle = exports.avatarStackStyle = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = require("@emotion/react");
|
|
7
|
+
|
|
8
|
+
var _functions = require("../../../theme/functions");
|
|
9
|
+
|
|
10
|
+
var _utils = require("../../../theme/utils");
|
|
11
|
+
|
|
12
|
+
var _Avatar = require("../Avatar.style");
|
|
13
|
+
|
|
14
|
+
var OVERLAP_FACTOR = 0.8;
|
|
15
|
+
|
|
16
|
+
var avatarStackStyle = function avatarStackStyle(_ref) {
|
|
17
|
+
var size = _ref.size;
|
|
18
|
+
return function () {
|
|
19
|
+
return (
|
|
20
|
+
/*#__PURE__*/
|
|
21
|
+
|
|
22
|
+
/*#__PURE__*/
|
|
23
|
+
(0, _react.css)(_functions.flex, ";div:last-child{width:", (0, _utils.rem)((0, _Avatar.sizeBasedOnProp)(size)), ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:avatarStackStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhci9BdmF0YXJTdGFjay9BdmF0YXJTdGFjay5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVSyIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMvY29tcG9uZW50cy9BdmF0YXIvQXZhdGFyU3RhY2svQXZhdGFyU3RhY2suc3R5bGUudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBmbGV4IH0gZnJvbSAndGhlbWUvZnVuY3Rpb25zJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3RoZW1lL3V0aWxzJztcblxuaW1wb3J0IHsgQXZhdGFyU2l6ZXMgfSBmcm9tICcuLi9BdmF0YXInO1xuaW1wb3J0IHsgc2l6ZUJhc2VkT25Qcm9wIH0gZnJvbSAnLi4vQXZhdGFyLnN0eWxlJztcblxuY29uc3QgT1ZFUkxBUF9GQUNUT1IgPSAwLjg7XG5cbmV4cG9ydCBjb25zdCBhdmF0YXJTdGFja1N0eWxlID0gKHsgc2l6ZSB9OiB7IHNpemU6IEF2YXRhclNpemVzIH0pID0+ICgpOiBTZXJpYWxpemVkU3R5bGVzID0+XG4gIGNzc2BcbiAgICAke2ZsZXh9O1xuXG4gICAgZGl2Omxhc3QtY2hpbGQge1xuICAgICAgd2lkdGg6ICR7cmVtKHNpemVCYXNlZE9uUHJvcChzaXplKSl9O1xuICAgIH1cbiAgYDtcblxuZXhwb3J0IGNvbnN0IGF2YXRhcldyYXBwZXJTdHlsZSA9ICh7XG4gIHpJbmRleCxcbiAgc2l6ZSxcbn06IHtcbiAgekluZGV4OiBudW1iZXI7XG4gIHNpemU6IEF2YXRhclNpemVzO1xufSkgPT4gKCk6IFNlcmlhbGl6ZWRTdHlsZXMgPT5cbiAgY3NzYFxuICAgIHotaW5kZXg6ICR7ekluZGV4fTtcbiAgICB3aWR0aDogJHtyZW0oc2l6ZUJhc2VkT25Qcm9wKHNpemUpICogT1ZFUkxBUF9GQUNUT1IpfTtcbiAgYDtcbiJdfQ== */", process.env.NODE_ENV === "production" ? "" : ";label:avatarStackStyle;")
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.avatarStackStyle = avatarStackStyle;
|
|
29
|
+
|
|
30
|
+
var avatarWrapperStyle = function avatarWrapperStyle(_ref2) {
|
|
31
|
+
var zIndex = _ref2.zIndex,
|
|
32
|
+
size = _ref2.size;
|
|
33
|
+
return function () {
|
|
34
|
+
return (
|
|
35
|
+
/*#__PURE__*/
|
|
36
|
+
|
|
37
|
+
/*#__PURE__*/
|
|
38
|
+
(0, _react.css)("z-index:", zIndex, ";width:", (0, _utils.rem)((0, _Avatar.sizeBasedOnProp)(size) * OVERLAP_FACTOR), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:avatarWrapperStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhci9BdmF0YXJTdGFjay9BdmF0YXJTdGFjay5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QksiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQXZhdGFyL0F2YXRhclN0YWNrL0F2YXRhclN0YWNrLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZmxleCB9IGZyb20gJ3RoZW1lL2Z1bmN0aW9ucyc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICd0aGVtZS91dGlscyc7XG5cbmltcG9ydCB7IEF2YXRhclNpemVzIH0gZnJvbSAnLi4vQXZhdGFyJztcbmltcG9ydCB7IHNpemVCYXNlZE9uUHJvcCB9IGZyb20gJy4uL0F2YXRhci5zdHlsZSc7XG5cbmNvbnN0IE9WRVJMQVBfRkFDVE9SID0gMC44O1xuXG5leHBvcnQgY29uc3QgYXZhdGFyU3RhY2tTdHlsZSA9ICh7IHNpemUgfTogeyBzaXplOiBBdmF0YXJTaXplcyB9KSA9PiAoKTogU2VyaWFsaXplZFN0eWxlcyA9PlxuICBjc3NgXG4gICAgJHtmbGV4fTtcblxuICAgIGRpdjpsYXN0LWNoaWxkIHtcbiAgICAgIHdpZHRoOiAke3JlbShzaXplQmFzZWRPblByb3Aoc2l6ZSkpfTtcbiAgICB9XG4gIGA7XG5cbmV4cG9ydCBjb25zdCBhdmF0YXJXcmFwcGVyU3R5bGUgPSAoe1xuICB6SW5kZXgsXG4gIHNpemUsXG59OiB7XG4gIHpJbmRleDogbnVtYmVyO1xuICBzaXplOiBBdmF0YXJTaXplcztcbn0pID0+ICgpOiBTZXJpYWxpemVkU3R5bGVzID0+XG4gIGNzc2BcbiAgICB6LWluZGV4OiAke3pJbmRleH07XG4gICAgd2lkdGg6ICR7cmVtKHNpemVCYXNlZE9uUHJvcChzaXplKSAqIE9WRVJMQVBfRkFDVE9SKX07XG4gIGA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:avatarWrapperStyle;")
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.avatarWrapperStyle = avatarWrapperStyle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AvatarStack';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _AvatarStack = _interopRequireDefault(require("./AvatarStack"));
|
|
7
|
+
|
|
8
|
+
exports["default"] = _AvatarStack["default"];
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -60,7 +60,7 @@ var Chip = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
|
60
60
|
color: 'darkGrey',
|
|
61
61
|
variant: 850
|
|
62
62
|
}), thumbnail && (0, _react2.jsx)("div", null, (0, _react2.jsx)(_Avatar["default"], {
|
|
63
|
-
size: '
|
|
63
|
+
size: 'xs',
|
|
64
64
|
color: fill + "-" + _palette.BASE_SHADE,
|
|
65
65
|
src: thumbnail.src
|
|
66
66
|
}, thumbnail.name)), (0, _react2.jsx)("div", null, children), badgeNumber && (0, _react2.jsx)(_Badge["default"], {
|
|
@@ -94,7 +94,7 @@ var Menu = function Menu(props) {
|
|
|
94
94
|
size: iconSize
|
|
95
95
|
}) : null,
|
|
96
96
|
iconLeft: !(0, _isEmpty["default"])(avatar) ? (0, _react2.jsx)(_Avatar["default"], {
|
|
97
|
-
size: '
|
|
97
|
+
size: 'sm',
|
|
98
98
|
src: avatar == null ? void 0 : avatar.src,
|
|
99
99
|
color: avatar == null ? void 0 : avatar.color,
|
|
100
100
|
iconName: 'user'
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type { Typography } from './theme/typography';
|
|
|
13
13
|
export type { AcceptedColorComponentTypes } from './utils/themeFunctions';
|
|
14
14
|
export type { Theme } from './theme';
|
|
15
15
|
export { default as Avatar } from './components/Avatar';
|
|
16
|
+
export { default as AvatarStack } from './components/Avatar/AvatarStack';
|
|
16
17
|
export { default as Breadcrumb } from './components/Breadcrumb';
|
|
17
18
|
export { default as Button } from './components/Button';
|
|
18
19
|
export { default as Card } from './components/Card';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.typography = exports.spacing = exports.palette = exports.overrides = exports.themeFunctions = exports.elevation = exports.themeConfig = exports.TruncatedContent = exports.Filter = exports.useEscape = exports.useBreakpoints = exports.useTheme = exports.TopNavBar = exports.Tooltip = exports.Toast = exports.ThemeProvider = exports.TextArea = exports.SearchField = exports.TextField = exports.Table = exports.Select = exports.RadioGroup = exports.Radio = exports.Pagination = exports.Snackbar = exports.Banner = exports.NotificationVisual = exports.NotificationsContainer = exports.InlineNotification = exports.Modal = exports.Menu = exports.Loader = exports.List = exports.Label = exports.IconButton = exports.Icon = exports.ExpandCollapse = exports.Drawer = exports.DatePicker = exports.Chip = exports.CheckBox = exports.DonutChart = exports.BarChart = exports.LineChart = exports.Card = exports.Button = exports.Breadcrumb = exports.Avatar = void 0;
|
|
4
|
+
exports.typography = exports.spacing = exports.palette = exports.overrides = exports.themeFunctions = exports.elevation = exports.themeConfig = exports.TruncatedContent = exports.Filter = exports.useEscape = exports.useBreakpoints = exports.useTheme = exports.TopNavBar = exports.Tooltip = exports.Toast = exports.ThemeProvider = exports.TextArea = exports.SearchField = exports.TextField = exports.Table = exports.Select = exports.RadioGroup = exports.Radio = exports.Pagination = exports.Snackbar = exports.Banner = exports.NotificationVisual = exports.NotificationsContainer = exports.InlineNotification = exports.Modal = exports.Menu = exports.Loader = exports.List = exports.Label = exports.IconButton = exports.Icon = exports.ExpandCollapse = exports.Drawer = exports.DatePicker = exports.Chip = exports.CheckBox = exports.DonutChart = exports.BarChart = exports.LineChart = exports.Card = exports.Button = exports.Breadcrumb = exports.AvatarStack = exports.Avatar = void 0;
|
|
5
5
|
|
|
6
6
|
var _useBreakpoints = _interopRequireWildcard(require("./hooks/useBreakpoints"));
|
|
7
7
|
|
|
@@ -36,6 +36,10 @@ var _Avatar = _interopRequireDefault(require("./components/Avatar"));
|
|
|
36
36
|
|
|
37
37
|
exports.Avatar = _Avatar["default"];
|
|
38
38
|
|
|
39
|
+
var _AvatarStack = _interopRequireDefault(require("./components/Avatar/AvatarStack"));
|
|
40
|
+
|
|
41
|
+
exports.AvatarStack = _AvatarStack["default"];
|
|
42
|
+
|
|
39
43
|
var _Breadcrumb = _interopRequireDefault(require("./components/Breadcrumb"));
|
|
40
44
|
|
|
41
45
|
exports.Breadcrumb = _Breadcrumb["default"];
|