@orfium/ictinus 4.18.0 → 4.21.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/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/Breadcrumb/Breadcrumb.js +17 -54
- package/dist/components/Breadcrumb/Breadcrumb.style.d.ts +3 -2
- package/dist/components/Breadcrumb/Breadcrumb.style.js +10 -15
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.d.ts +0 -6
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.js +5 -16
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.style.d.ts +2 -1
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.style.js +2 -2
- package/dist/components/Breadcrumb/Separator/Separator.js +3 -2
- package/dist/components/Breadcrumb/Separator/Separator.style.d.ts +2 -1
- package/dist/components/Breadcrumb/Separator/Separator.style.js +1 -1
- package/dist/components/Breadcrumb/types.d.ts +1 -5
- package/dist/components/ButtonBase/ButtonBase.js +2 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/DatePicker/Month/Month.utils.d.ts +1 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +2 -2
- package/dist/components/Filter/components/FilterBase/FilterBase.d.ts +1 -1
- package/dist/components/Loader/components/Spinner/Spinner.style.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Tooltip/Tooltip.style.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -1
- package/package.json +1 -1
- package/dist/components/Breadcrumb/BreadcrumbCollapsed/BreadcrumbCollapsed.d.ts +0 -7
- package/dist/components/Breadcrumb/BreadcrumbCollapsed/BreadcrumbCollapsed.js +0 -81
- package/dist/components/Breadcrumb/BreadcrumbCollapsed/BreadcrumbCollapsed.style.d.ts +0 -16
- package/dist/components/Breadcrumb/BreadcrumbCollapsed/BreadcrumbCollapsed.style.js +0 -52
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbAdvancedItem.d.ts +0 -11
- package/dist/components/Breadcrumb/BreadcrumbItem/BreadcrumbAdvancedItem.js +0 -46
|
@@ -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+IHtcbiAgc3dpdGNoIChzaXplKSB7XG4gICAgY2FzZSAnbWQnOlxuICAgICAgcmV0dXJuIDI0O1xuICAgIGNhc2UgJ3NtJzpcbiAgICAgIHJldHVybiAyMDtcbiAgICBjYXNlICd4cyc6XG4gICAgICByZXR1cm4gMTY7XG4gICAgZGVmYX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3VuZDogJHt0aGVtZS51dGlscy5nZXRDb2xvcihmaWxsLCBmaWxsU2hhZGUpfTtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBmb250LXNpemU6ICR7Zm9udFNpemVCYXNlZE9uUHJvcCh0aGVtZSwgc2l6ZSl9O1xuICBmb250LXdlaWdodDogJHt0aGVtZS50eXBvZ3JhcGh5LndlaWdodHMubWVkaXVtfTtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgZmxleC1zaHJpbms6IDA7XG4gIGxpbmUtaGVpZ2h0OiAxO1xuICB1c2VyLXNlbGVjdDogbm9uZTtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGNvbG9yOiAke3BpY2tUZXh0Q29sb3JGcm9tU3dhdGNoZXMoZmlsbCwgZmlsbFNoYWRlKX07XG5cbiAgaW1nIHtcbiAgICBib3JkZXItcmFkaXVzOiAxMDAlO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIGhlaWdodDogMTAwJTtcbiAgfVxuYDtcbiJdfQ== */", 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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb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gICB3aWR0aDogJHtyZW0oc2l6ZUJhc2VkT25Qcm9wKHNpemUpICogT1ZFUkxBUF9GQUNUT1IpfTtcbiAgYDtcbiJdfQ== */", 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 }; }
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
5
|
|
|
6
|
-
var _lodash = require("lodash");
|
|
7
|
-
|
|
8
6
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
9
7
|
|
|
10
8
|
var _uniqueId = _interopRequireDefault(require("lodash/uniqueId"));
|
|
@@ -15,8 +13,6 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
15
13
|
|
|
16
14
|
var _Breadcrumb = require("./Breadcrumb.style");
|
|
17
15
|
|
|
18
|
-
var _BreadcrumbCollapsed = _interopRequireDefault(require("./BreadcrumbCollapsed/BreadcrumbCollapsed"));
|
|
19
|
-
|
|
20
16
|
var _BreadcrumbItem = _interopRequireDefault(require("./BreadcrumbItem/BreadcrumbItem"));
|
|
21
17
|
|
|
22
18
|
var _react2 = require("@emotion/react");
|
|
@@ -27,71 +23,38 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
23
|
|
|
28
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
25
|
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var Breadcrumb = function Breadcrumb(props) {
|
|
35
|
-
var children = props.children,
|
|
36
|
-
_props$data = props.data,
|
|
37
|
-
data = _props$data === void 0 ? [] : _props$data;
|
|
26
|
+
var isLastItem = function isLastItem(dataItems, itemIndex) {
|
|
27
|
+
return itemIndex === dataItems.length - 1;
|
|
28
|
+
};
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
var Breadcrumb = function Breadcrumb(_ref) {
|
|
31
|
+
var children = _ref.children,
|
|
32
|
+
_ref$data = _ref.data,
|
|
33
|
+
data = _ref$data === void 0 ? [] : _ref$data;
|
|
34
|
+
var passDataToRouterLink = React.useCallback(function (dataItem, index) {
|
|
35
|
+
var to = dataItem.to,
|
|
36
|
+
label = dataItem.label;
|
|
37
|
+
var isLast = isLastItem(data, index);
|
|
38
|
+
return to ? (0, _react2.jsx)(_reactRouterDom.Link, {
|
|
39
|
+
css: (0, _Breadcrumb.breadcrumbLinkStyles)(isLast),
|
|
44
40
|
key: to,
|
|
45
41
|
to: to
|
|
46
|
-
}, label);
|
|
47
|
-
};
|
|
48
|
-
|
|
42
|
+
}, label) : (0, _react2.jsx)("div", null, label);
|
|
43
|
+
}, [data]);
|
|
49
44
|
var childrenCollection = React.Children.toArray(children);
|
|
50
45
|
var dataItems = (0, _isEmpty["default"])(data) ? childrenCollection : data.map(passDataToRouterLink);
|
|
51
|
-
|
|
52
|
-
var isLastItem = function isLastItem(dataItems, itemIndex) {
|
|
53
|
-
return itemIndex === dataItems.length - 1;
|
|
54
|
-
}; //Checks if an item is in collapsed area and if should break the breadcrumb items with a collapsed view
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var shouldCollapse = React.useCallback(function (item, itemIndex) {
|
|
58
|
-
return item && dataItems.length > MAX_LIMIT_BREADCRUMB_LENGTH && itemIndex >= MAX_ITEMS_TO_SHOW_BEFORE_COLLAPSE && itemIndex < dataItems.length - MAX_ITEMS_TO_SHOW_AFTER_COLLAPSE;
|
|
59
|
-
}, [dataItems]);
|
|
60
|
-
var collapsedItems = React.useMemo(function () {
|
|
61
|
-
return dataItems.filter(shouldCollapse);
|
|
62
|
-
}, [shouldCollapse, dataItems]);
|
|
63
|
-
|
|
64
|
-
var _pick = (0, _lodash.pick)((0, _lodash.last)(data), ['label', 'onChangeHandler', 'options']),
|
|
65
|
-
lastItemLabel = _pick.label,
|
|
66
|
-
lastItemOnChangeHandler = _pick.onChangeHandler,
|
|
67
|
-
lastItemOptions = _pick.options;
|
|
68
|
-
|
|
69
46
|
var getBreadcrumbItem = React.useMemo( // eslint-disable-next-line react/display-name
|
|
70
47
|
function () {
|
|
71
48
|
return function (child, index) {
|
|
72
49
|
var itemKey = (0, _uniqueId["default"])('data_item_');
|
|
73
|
-
|
|
74
|
-
if (shouldCollapse(child, index)) {
|
|
75
|
-
return index === MAX_ITEMS_TO_SHOW_BEFORE_COLLAPSE ? (0, _react2.jsx)(_BreadcrumbCollapsed["default"], {
|
|
76
|
-
collapsedItems: collapsedItems,
|
|
77
|
-
key: itemKey
|
|
78
|
-
}) : null;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
50
|
var isLast = isLastItem(dataItems, index);
|
|
82
|
-
return
|
|
51
|
+
return (0, _react2.jsx)(_BreadcrumbItem["default"], {
|
|
83
52
|
key: itemKey,
|
|
84
|
-
lastItemLabel: lastItemLabel,
|
|
85
|
-
onChangeHandler: lastItemOnChangeHandler,
|
|
86
|
-
options: lastItemOptions,
|
|
87
53
|
childComponent: child,
|
|
88
54
|
isLastItem: isLast
|
|
89
|
-
}) : (0, _react2.jsx)(_BreadcrumbItem["default"], {
|
|
90
|
-
key: itemKey,
|
|
91
|
-
childComponent: child
|
|
92
55
|
});
|
|
93
56
|
};
|
|
94
|
-
}, [dataItems
|
|
57
|
+
}, [dataItems]);
|
|
95
58
|
return (0, _react2.jsx)("ol", {
|
|
96
59
|
"aria-label": "Breadcrumb",
|
|
97
60
|
css: (0, _Breadcrumb.breadcrumbStyles)()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/react';
|
|
1
2
|
import { Theme } from '../../theme';
|
|
2
|
-
export declare const breadcrumbStyles: () => (
|
|
3
|
-
export declare const breadcrumbLinkStyles: () => (theme: Theme) =>
|
|
3
|
+
export declare const breadcrumbStyles: () => () => SerializedStyles;
|
|
4
|
+
export declare const breadcrumbLinkStyles: (isLast: boolean) => (theme: Theme) => SerializedStyles;
|
|
@@ -5,33 +5,28 @@ exports.breadcrumbLinkStyles = exports.breadcrumbStyles = void 0;
|
|
|
5
5
|
|
|
6
6
|
var _react = require("@emotion/react");
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
11
|
-
name: "4ka015",
|
|
12
|
-
styles: "display:flex;flex-wrap:nowrap;list-style:none;padding:0;margin:0;&>li{margin:auto;}"
|
|
13
|
-
} : {
|
|
14
|
-
name: "1vmw4de-breadcrumbStyles",
|
|
15
|
-
styles: "display:flex;flex-wrap:nowrap;list-style:none;padding:0;margin:0;&>li{margin:auto;};label:breadcrumbStyles;",
|
|
16
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JyZWFkY3J1bWIvQnJlYWRjcnVtYi5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJMkQiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQnJlYWRjcnVtYi9CcmVhZGNydW1iLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lJztcblxuZXhwb3J0IGNvbnN0IGJyZWFkY3J1bWJTdHlsZXMgPSAoKSA9PiAodGhlbWU6IFRoZW1lKSA9PiBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsZXgtd3JhcDogbm93cmFwO1xuICBsaXN0LXN0eWxlOiBub25lO1xuICBwYWRkaW5nOiAwO1xuICBtYXJnaW46IDA7XG5cbiAgJiA+IGxpIHtcbiAgICBtYXJnaW46IGF1dG87XG4gIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBicmVhZGNydW1iTGlua1N0eWxlcyA9ICgpID0+ICh0aGVtZTogVGhlbWUpID0+IGNzc2BcbiAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICBjb2xvcjogaW5oZXJpdDtcbiAgcGFkZGluZzogJHt0aGVtZS5zcGFjaW5nLnNtfTtcbiAgJjpob3ZlciB7XG4gICAgY29sb3I6ICR7dGhlbWUudXRpbHMuZ2V0Q29sb3IoJ2RhcmtHcmV5JywgNjUwKX07XG4gIH1cbmA7XG4iXX0= */",
|
|
17
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
18
|
-
};
|
|
8
|
+
var _functions = require("../../theme/functions");
|
|
19
9
|
|
|
20
10
|
var breadcrumbStyles = function breadcrumbStyles() {
|
|
21
|
-
return function (
|
|
22
|
-
return
|
|
11
|
+
return function () {
|
|
12
|
+
return (
|
|
13
|
+
/*#__PURE__*/
|
|
14
|
+
|
|
15
|
+
/*#__PURE__*/
|
|
16
|
+
(0, _react.css)(_functions.flex, ";flex-wrap:nowrap;list-style:none;padding:0;margin:0;" + (process.env.NODE_ENV === "production" ? "" : ";label:breadcrumbStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JyZWFkY3J1bWIvQnJlYWRjcnVtYi5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLaUUiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQnJlYWRjcnVtYi9CcmVhZGNydW1iLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZmxleCB9IGZyb20gJ3RoZW1lL2Z1bmN0aW9ucyc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vdGhlbWUnO1xuXG5leHBvcnQgY29uc3QgYnJlYWRjcnVtYlN0eWxlcyA9ICgpID0+ICgpOiBTZXJpYWxpemVkU3R5bGVzID0+IGNzc2BcbiAgJHtmbGV4fTtcbiAgZmxleC13cmFwOiBub3dyYXA7XG4gIGxpc3Qtc3R5bGU6IG5vbmU7XG4gIHBhZGRpbmc6IDA7XG4gIG1hcmdpbjogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBicmVhZGNydW1iTGlua1N0eWxlcyA9IChpc0xhc3Q6IGJvb2xlYW4pID0+ICh0aGVtZTogVGhlbWUpOiBTZXJpYWxpemVkU3R5bGVzID0+IGNzc2BcbiAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICBjb2xvcjogaW5oZXJpdDtcbiAgJjpob3ZlciB7XG4gICAgY29sb3I6ICR7aXNMYXN0ID8gdGhlbWUudXRpbHMuZ2V0Q29sb3IoJ2JsdWUnLCA2NTApIDogdGhlbWUudXRpbHMuZ2V0Q29sb3IoJ2RhcmtHcmV5JywgNjUwKX07XG4gIH1cbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:breadcrumbStyles;")
|
|
17
|
+
);
|
|
23
18
|
};
|
|
24
19
|
};
|
|
25
20
|
|
|
26
21
|
exports.breadcrumbStyles = breadcrumbStyles;
|
|
27
22
|
|
|
28
|
-
var breadcrumbLinkStyles = function breadcrumbLinkStyles() {
|
|
23
|
+
var breadcrumbLinkStyles = function breadcrumbLinkStyles(isLast) {
|
|
29
24
|
return function (theme) {
|
|
30
25
|
return (
|
|
31
26
|
/*#__PURE__*/
|
|
32
27
|
|
|
33
28
|
/*#__PURE__*/
|
|
34
|
-
(0, _react.css)("text-decoration:none;color:inherit
|
|
29
|
+
(0, _react.css)("text-decoration:none;color:inherit;&:hover{color:", isLast ? theme.utils.getColor('blue', 650) : theme.utils.getColor('darkGrey', 650), ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:breadcrumbLinkStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMapp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: ";label:breadcrumbLinkStyles;")
|
|
35
30
|
);
|
|
36
31
|
};
|
|
37
32
|
};
|
|
@@ -4,12 +4,6 @@ declare type Props = {
|
|
|
4
4
|
childComponent: React.ReactNode;
|
|
5
5
|
/** Defines if the current item of the breadcrumb is the last one */
|
|
6
6
|
isLastItem?: boolean;
|
|
7
|
-
/** Defines the options used to render a Menu button */
|
|
8
|
-
options?: string[];
|
|
9
|
-
/** Defines the method where a developer can manipulate the selection of an menu item */
|
|
10
|
-
onChangeHandler?: (selectedItem: string) => void;
|
|
11
|
-
/** Defines the label of the current level of breadcrumb */
|
|
12
|
-
lastItemLabel?: string;
|
|
13
7
|
};
|
|
14
8
|
declare const BreadcrumbItem: React.FC<Props>;
|
|
15
9
|
export default BreadcrumbItem;
|
|
@@ -5,8 +5,6 @@ exports["default"] = void 0;
|
|
|
5
5
|
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
|
|
8
|
-
var _BreadcrumbAdvancedItem = _interopRequireDefault(require("./BreadcrumbAdvancedItem"));
|
|
9
|
-
|
|
10
8
|
var _BreadcrumbItem = require("./BreadcrumbItem.style");
|
|
11
9
|
|
|
12
10
|
var _Separator = _interopRequireDefault(require("../Separator/Separator"));
|
|
@@ -15,24 +13,15 @@ var _react2 = require("@emotion/react");
|
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
15
|
|
|
18
|
-
var BreadcrumbItem = function BreadcrumbItem(
|
|
19
|
-
var childComponent =
|
|
20
|
-
|
|
21
|
-
isLastItem =
|
|
22
|
-
_props$options = props.options,
|
|
23
|
-
options = _props$options === void 0 ? undefined : _props$options,
|
|
24
|
-
onChangeHandler = props.onChangeHandler,
|
|
25
|
-
lastItemLabel = props.lastItemLabel;
|
|
26
|
-
var renderComponentBasedOnOptions = options ? (0, _react2.jsx)(_BreadcrumbAdvancedItem["default"], {
|
|
27
|
-
onChangeHandler: onChangeHandler,
|
|
28
|
-
options: options,
|
|
29
|
-
label: lastItemLabel
|
|
30
|
-
}) : childComponent;
|
|
16
|
+
var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
17
|
+
var childComponent = _ref.childComponent,
|
|
18
|
+
_ref$isLastItem = _ref.isLastItem,
|
|
19
|
+
isLastItem = _ref$isLastItem === void 0 ? false : _ref$isLastItem;
|
|
31
20
|
return (0, _react2.jsx)("li", null, (0, _react2.jsx)("div", {
|
|
32
21
|
css: (0, _BreadcrumbItem.breadcrumbItemStyles)({
|
|
33
22
|
active: isLastItem
|
|
34
23
|
})
|
|
35
|
-
},
|
|
24
|
+
}, childComponent, (0, _react2.jsx)(_Separator["default"], {
|
|
36
25
|
isLastItem: isLastItem
|
|
37
26
|
})));
|
|
38
27
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/react';
|
|
1
2
|
import { Theme } from '../../../theme';
|
|
2
3
|
import { RequiredProperties } from '../../../utils/common';
|
|
3
4
|
declare type StyleProps = {
|
|
4
5
|
active: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare const breadcrumbItemStyles: ({ active }: RequiredProperties<StyleProps>) => (theme: Theme) =>
|
|
7
|
+
export declare const breadcrumbItemStyles: ({ active }: RequiredProperties<StyleProps>) => (theme: Theme) => SerializedStyles;
|
|
7
8
|
export {};
|
|
@@ -5,7 +5,7 @@ exports.breadcrumbItemStyles = void 0;
|
|
|
5
5
|
|
|
6
6
|
var _react = require("@emotion/react");
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _palette = require("../../../theme/palette");
|
|
9
9
|
|
|
10
10
|
var breadcrumbItemStyles = function breadcrumbItemStyles(_ref) {
|
|
11
11
|
var active = _ref.active;
|
|
@@ -14,7 +14,7 @@ var breadcrumbItemStyles = function breadcrumbItemStyles(_ref) {
|
|
|
14
14
|
/*#__PURE__*/
|
|
15
15
|
|
|
16
16
|
/*#__PURE__*/
|
|
17
|
-
(0, _react.css)("display:flex;cursor:default;font-weight:", active ? theme.typography.weights.medium : theme.typography.weights.regular, ";color:", active ? theme.utils.getColor('
|
|
17
|
+
(0, _react.css)("display:flex;cursor:default;font-size:", theme.typography.fontSizes[15], ";font-weight:", active ? theme.typography.weights.medium : theme.typography.weights.regular, ";color:", active ? theme.utils.getColor('primary', _palette.BASE_SHADE, 'normal') : theme.utils.getColor('lightGrey', 650), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:breadcrumbItemStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JyZWFkY3J1bWIvQnJlYWRjcnVtYkl0ZW0vQnJlYWRjcnVtYkl0ZW0uc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWTBCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JyZWFkY3J1bWIvQnJlYWRjcnVtYkl0ZW0vQnJlYWRjcnVtYkl0ZW0uc3R5bGUudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBCQVNFX1NIQURFIH0gZnJvbSAndGhlbWUvcGFsZXR0ZSc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vLi4vdGhlbWUnO1xuaW1wb3J0IHsgUmVxdWlyZWRQcm9wZXJ0aWVzIH0gZnJvbSAnLi4vLi4vLi4vdXRpbHMvY29tbW9uJztcblxudHlwZSBTdHlsZVByb3BzID0ge1xuICBhY3RpdmU6IGJvb2xlYW47XG59O1xuXG5leHBvcnQgY29uc3QgYnJlYWRjcnVtYkl0ZW1TdHlsZXMgPSAoeyBhY3RpdmUgfTogUmVxdWlyZWRQcm9wZXJ0aWVzPFN0eWxlUHJvcHM+KSA9PiAoXG4gIHRoZW1lOiBUaGVtZVxuKTogU2VyaWFsaXplZFN0eWxlcyA9PiBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG4gIGN1cnNvcjogZGVmYXVsdDtcbiAgZm9udC1zaXplOiAke3RoZW1lLnR5cG9ncmFwaHkuZm9udFNpemVzWzE1XX07XG4gIGZvbnQtd2VpZ2h0OiAke2FjdGl2ZSA/IHRoZW1lLnR5cG9ncmFwaHkud2VpZ2h0cy5tZWRpdW0gOiB0aGVtZS50eXBvZ3JhcGh5LndlaWdodHMucmVndWxhcn07XG4gIGNvbG9yOiAke2FjdGl2ZVxuICAgID8gdGhlbWUudXRpbHMuZ2V0Q29sb3IoJ3ByaW1hcnknLCBCQVNFX1NIQURFLCAnbm9ybWFsJylcbiAgICA6IHRoZW1lLnV0aWxzLmdldENvbG9yKCdsaWdodEdyZXknLCA2NTApfTtcbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:breadcrumbItemStyles;")
|
|
18
18
|
);
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -25,8 +25,9 @@ var Separator = function Separator(props) {
|
|
|
25
25
|
css: (0, _Separator.separatorStyles)()
|
|
26
26
|
}, (0, _react2.jsx)(_Icon["default"], {
|
|
27
27
|
name: 'triangleRight',
|
|
28
|
-
color:
|
|
29
|
-
|
|
28
|
+
color: 'lightGrey',
|
|
29
|
+
variant: 650,
|
|
30
|
+
size: 12
|
|
30
31
|
}));
|
|
31
32
|
};
|
|
32
33
|
|
|
@@ -11,7 +11,7 @@ var separatorStyles = function separatorStyles() {
|
|
|
11
11
|
/*#__PURE__*/
|
|
12
12
|
|
|
13
13
|
/*#__PURE__*/
|
|
14
|
-
(0, _react.css)("margin:auto ", theme.spacing.
|
|
14
|
+
(0, _react.css)("margin:auto ", theme.spacing.md, ";cursor:default;" + (process.env.NODE_ENV === "production" ? "" : ";label:separatorStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JyZWFkY3J1bWIvU2VwYXJhdG9yL1NlcGFyYXRvci5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHNEUiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQnJlYWRjcnVtYi9TZXBhcmF0b3IvU2VwYXJhdG9yLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICd0aGVtZSc7XG5cbmV4cG9ydCBjb25zdCBzZXBhcmF0b3JTdHlsZXMgPSAoKSA9PiAodGhlbWU6IFRoZW1lKTogU2VyaWFsaXplZFN0eWxlcyA9PiBjc3NgXG4gIG1hcmdpbjogYXV0byAke3RoZW1lLnNwYWNpbmcubWR9O1xuICBjdXJzb3I6IGRlZmF1bHQ7XG5gO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:separatorStyles;")
|
|
15
15
|
);
|
|
16
16
|
};
|
|
17
17
|
};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export declare type BreadcrumbItemData = {
|
|
2
2
|
/** Defines the path used for a link breadcrumb item*/
|
|
3
|
-
to
|
|
3
|
+
to?: string;
|
|
4
4
|
/** Defines the label used for a link breadcrumb item */
|
|
5
5
|
label: string;
|
|
6
|
-
/** Defines the options used to render a Menu button */
|
|
7
|
-
options?: string[];
|
|
8
|
-
/** Defines the method where a developer can manipulate the selection of an menu item */
|
|
9
|
-
onChangeHandler?: (selectedItem: string) => void;
|
|
10
6
|
};
|
|
@@ -42,7 +42,8 @@ var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
42
42
|
children = props.children,
|
|
43
43
|
_props$dataTestId = props.dataTestId,
|
|
44
44
|
dataTestId = _props$dataTestId === void 0 ? '' : _props$dataTestId,
|
|
45
|
-
buttonType = props.buttonType,
|
|
45
|
+
_props$buttonType = props.buttonType,
|
|
46
|
+
buttonType = _props$buttonType === void 0 ? 'button' : _props$buttonType,
|
|
46
47
|
_onClick = props.onClick,
|
|
47
48
|
onBlur = props.onBlur;
|
|
48
49
|
|
|
@@ -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"], {
|
|
@@ -2,5 +2,5 @@ import { Dayjs } from 'dayjs';
|
|
|
2
2
|
import { DisabledDates } from '../DatePicker';
|
|
3
3
|
export declare const calculateDisabledDays: (day: number | undefined, month: number, year: number, disabledDates?: DisabledDates | undefined) => boolean;
|
|
4
4
|
export declare const calculatedDayIsBetween: (day: number | undefined, month: number, year: number, from: Dayjs | undefined, to: Dayjs | undefined) => boolean | undefined;
|
|
5
|
-
export declare const calculateSelectedDayPosition: (day: number | undefined, position: "
|
|
5
|
+
export declare const calculateSelectedDayPosition: (day: number | undefined, position: "last" | "first" | undefined, month: number, year: number, from: Dayjs | undefined, to: Dayjs | undefined) => boolean | 0 | undefined;
|
|
6
6
|
export declare const calculateSelectedDay: (day: number, month: number, year: number, from: Dayjs | undefined, to: Dayjs | undefined) => boolean;
|
|
@@ -40,12 +40,12 @@ export declare type Props = {
|
|
|
40
40
|
* A function accepting a boolean representing the current expansion state. Returns the
|
|
41
41
|
* collapsible/expandable content. Mutually exclusive with children.
|
|
42
42
|
*/
|
|
43
|
-
content?: (x: boolean) => React.
|
|
43
|
+
content?: (x: boolean) => React.ReactNode;
|
|
44
44
|
/**
|
|
45
45
|
* A function accepting a boolean representing the current expansion state. Returns the
|
|
46
46
|
* collapsible/expandable content. Mutually exclusive with content.
|
|
47
47
|
*/
|
|
48
|
-
children?: (x: boolean) => React.
|
|
48
|
+
children?: (x: boolean) => React.ReactNode;
|
|
49
49
|
} & TestProps;
|
|
50
50
|
declare function ExpandCollapse(props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
51
51
|
export default ExpandCollapse;
|
|
@@ -11,5 +11,5 @@ declare type FilterBaseProps = {
|
|
|
11
11
|
open: boolean;
|
|
12
12
|
hasSelectedValue: boolean;
|
|
13
13
|
};
|
|
14
|
-
export declare const FilterBase: React.ForwardRefExoticComponent<FilterBaseProps & Pick<Props, "disabled" | "label" | "dataTestId" | "
|
|
14
|
+
export declare const FilterBase: React.ForwardRefExoticComponent<FilterBaseProps & Pick<Props, "disabled" | "label" | "dataTestId" | "buttonType" | "styleType" | "filterType"> & React.RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
export default FilterBase;
|
|
@@ -19,7 +19,7 @@ var spinnerContainer = function spinnerContainer() {
|
|
|
19
19
|
/*#__PURE__*/
|
|
20
20
|
|
|
21
21
|
/*#__PURE__*/
|
|
22
|
-
(0, _react.css)("width:",
|
|
22
|
+
(0, _react.css)("width:", theme.spacing.lg, ";height:", theme.spacing.lg, ";margin:auto;box-sizing:border-box;border-top:", spinnerBorderStyle(theme), ";border-right:", spinnerBorderStyle(theme), ";border-bottom:", spinnerBorderStyle(theme), ";border-left:", spinnerBorderStyle(theme, 'transparent'), ";border-radius:50%;animation:spin 1.1s infinite linear;@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg);}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg);}}" + (process.env.NODE_ENV === "production" ? "" : ";label:spinnerContainer;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0xvYWRlci9jb21wb25lbnRzL1NwaW5uZXIvU3Bpbm5lci5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUTZFIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0xvYWRlci9jb21wb25lbnRzL1NwaW5uZXIvU3Bpbm5lci5zdHlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJ3RoZW1lJztcbmltcG9ydCB7IEJBU0VfU0hBREUgfSBmcm9tICd0aGVtZS9wYWxldHRlJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3RoZW1lL3V0aWxzJztcblxuY29uc3Qgc3Bpbm5lckJvcmRlclN0eWxlID0gKHRoZW1lOiBUaGVtZSwgY29sb3I/OiBzdHJpbmcpID0+XG4gIGAke3JlbSgyKX0gc29saWQgJHtjb2xvciB8fCB0aGVtZS51dGlscy5nZXRDb2xvcigncHJpbWFyeScsIEJBU0VfU0hBREUsICdub3JtYWwnKX07YDtcblxuZXhwb3J0IGNvbnN0IHNwaW5uZXJDb250YWluZXIgPSAoKSA9PiAodGhlbWU6IFRoZW1lKTogU2VyaWFsaXplZFN0eWxlcyA9PiBjc3NgXG4gIHdpZHRoOiAke3RoZW1lLnNwYWNpbmcubGd9O1xuICBoZWlnaHQ6ICR7dGhlbWUuc3BhY2luZy5sZ307XG4gIG1hcmdpbjogYXV0bztcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgYm9yZGVyLXRvcDogJHtzcGlubmVyQm9yZGVyU3R5bGUodGhlbWUpfTtcbiAgYm9yZGVyLXJpZ2h0OiAke3NwaW5uZXJCb3JkZXJTdHlsZSh0aGVtZSl9O1xuICBib3JkZXItYm90dG9tOiAke3NwaW5uZXJCb3JkZXJTdHlsZSh0aGVtZSl9O1xuICBib3JkZXItbGVmdDogJHtzcGlubmVyQm9yZGVyU3R5bGUodGhlbWUsICd0cmFuc3BhcmVudCcpfTtcbiAgYm9yZGVyLXJhZGl1czogNTAlO1xuICBhbmltYXRpb246IHNwaW4gMS4xcyBpbmZpbml0ZSBsaW5lYXI7XG5cbiAgQGtleWZyYW1lcyBzcGluIHtcbiAgICAwJSB7XG4gICAgICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDBkZWcpO1xuICAgICAgdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG4gICAgfVxuICAgIDEwMCUge1xuICAgICAgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpO1xuICAgICAgdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTtcbiAgICB9XG4gIH1cbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:spinnerContainer;")
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -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'
|
|
@@ -33,7 +33,7 @@ var tooltipStyle = function tooltipStyle(_ref) {
|
|
|
33
33
|
/*#__PURE__*/
|
|
34
34
|
|
|
35
35
|
/*#__PURE__*/
|
|
36
|
-
(0, _react.css)("background:transparent;.tippy-content{color:", (0, _palette.pickTextColorFromSwatches)(color, shade), ";background-color:", backgroundColor, ";max-width:", (0, _utils.rem)(256), ";padding:", theme.spacing.sm, ";font-size:", defineFontSizeBasedOnTooltipSize(size), ";line-height:110%;border-radius:", theme.spacing.sm, ";text-align:start;}.tippy-arrow{color:", backgroundColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:tooltipStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
36
|
+
(0, _react.css)("background:transparent;.tippy-content{color:", (0, _palette.pickTextColorFromSwatches)(color, shade), ";background-color:", backgroundColor, ";max-width:", (0, _utils.rem)(256), ";padding:", theme.spacing.sm, ";font-size:", defineFontSizeBasedOnTooltipSize(size), ";font-weight:", theme.typography.weights.regular, ";line-height:110%;border-radius:", theme.spacing.sm, ";text-align:start;white-space:pre-wrap;word-break:break-all;}.tippy-arrow{color:", backgroundColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:tooltipStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1Rvb2x0aXAvVG9vbHRpcC5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QlkiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvVG9vbHRpcC9Ub29sdGlwLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAndGhlbWUvdXRpbHMnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lJztcbmltcG9ydCB7IHBpY2tUZXh0Q29sb3JGcm9tU3dhdGNoZXMgf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hhZGUpfTtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6ICR7YmFja2dyb3VuZENvbG9yfTtcbiAgICAgIG1heC13aWR0aDogJHtyZW0oMjU2KX07XG4gICAgICBwYWRkaW5nOiAke3RoZW1lLnNwYWNpbmcuc219O1xuICAgICAgZm9udC1zaXplOiAke2RlZmluZUZvbnRTaXplQmFzZWRPblRvb2x0aXBTaXplKHNpemUpfTtcbiAgICAgIGZvbnQtd2VpZ2h0OiAke3RoZW1lLnR5cG9ncmFwaHkud2VpZ2h0cy5yZWd1bGFyfTtcbiAgICAgIGxpbmUtaGVpZ2h0OiAxMTAlO1xuICAgICAgYm9yZGVyLXJhZGl1czogJHt0aGVtZS5zcGFjaW5nLnNtfTtcbiAgICAgIHRleHQtYWxpZ246IHN0YXJ0O1xuICAgICAgd2hpdGUtc3BhY2U6IHByZS13cmFwO1xuICAgICAgd29yZC1icmVhazogYnJlYWstYWxsO1xuICAgIH1cbiAgICAudGlwcHktYXJyb3cge1xuICAgICAgY29sb3I6ICR7YmFja2dyb3VuZENvbG9yfTtcbiAgICB9XG4gIGA7XG59O1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:tooltipStyle;")
|
|
37
37
|
);
|
|
38
38
|
};
|
|
39
39
|
};
|
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"];
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare type Props = {
|
|
3
|
-
/** Defines the react nodes that will be included in the breadcrumb's collapsed view */
|
|
4
|
-
collapsedItems: React.ReactNode[];
|
|
5
|
-
};
|
|
6
|
-
declare const BreadcrumbCollapsed: React.FC<Props>;
|
|
7
|
-
export default BreadcrumbCollapsed;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var React = _interopRequireWildcard(require("react"));
|
|
7
|
-
|
|
8
|
-
var _useTheme = _interopRequireDefault(require("../../../hooks/useTheme"));
|
|
9
|
-
|
|
10
|
-
var _Separator = _interopRequireDefault(require("../../Breadcrumb/Separator/Separator"));
|
|
11
|
-
|
|
12
|
-
var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
13
|
-
|
|
14
|
-
var _List = _interopRequireDefault(require("../../List"));
|
|
15
|
-
|
|
16
|
-
var _ClickAwayListener = _interopRequireDefault(require("../../utils/ClickAwayListener"));
|
|
17
|
-
|
|
18
|
-
var _DropdownOptions = require("../../utils/DropdownOptions");
|
|
19
|
-
|
|
20
|
-
var _BreadcrumbCollapsed = require("./BreadcrumbCollapsed.style");
|
|
21
|
-
|
|
22
|
-
var _react2 = require("@emotion/react");
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
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); }
|
|
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; }
|
|
29
|
-
|
|
30
|
-
var BreadcrumbCollapsed = function BreadcrumbCollapsed(props) {
|
|
31
|
-
var _React$useState = React.useState(false),
|
|
32
|
-
open = _React$useState[0],
|
|
33
|
-
setOpen = _React$useState[1];
|
|
34
|
-
|
|
35
|
-
var collapsedItems = props.collapsedItems;
|
|
36
|
-
var theme = (0, _useTheme["default"])();
|
|
37
|
-
|
|
38
|
-
var expandHandler = function expandHandler() {
|
|
39
|
-
setOpen(function (prevState) {
|
|
40
|
-
return !prevState;
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
var collapsedItemsList = (0, _react2.jsx)("div", {
|
|
45
|
-
style: _BreadcrumbCollapsed.inlineBreadcrumbWrapperStyles,
|
|
46
|
-
css: (0, _DropdownOptions.optionsStyle)({
|
|
47
|
-
menuPosition: 'left'
|
|
48
|
-
})
|
|
49
|
-
}, (0, _react2.jsx)(_List["default"], {
|
|
50
|
-
data: collapsedItems,
|
|
51
|
-
rowSize: 'small',
|
|
52
|
-
dataTestId: 'collapsed_',
|
|
53
|
-
handleOptionClick: function handleOptionClick() {
|
|
54
|
-
setOpen(false);
|
|
55
|
-
}
|
|
56
|
-
}));
|
|
57
|
-
var iconColor = 'lightGrey';
|
|
58
|
-
var iconColorShade = open ? 100 : 700;
|
|
59
|
-
return (0, _react2.jsx)(_ClickAwayListener["default"], {
|
|
60
|
-
CustomHtmlTag: "li",
|
|
61
|
-
ariaRole: "listitem",
|
|
62
|
-
onClick: function onClick() {
|
|
63
|
-
return setOpen(false);
|
|
64
|
-
},
|
|
65
|
-
cssStyles: _BreadcrumbCollapsed.ClickAwayListenerStyle
|
|
66
|
-
}, (0, _react2.jsx)("div", {
|
|
67
|
-
css: (0, _BreadcrumbCollapsed.breadcrumbCollapsedWrapperStyles)()
|
|
68
|
-
}, (0, _react2.jsx)("span", {
|
|
69
|
-
css: (0, _BreadcrumbCollapsed.breadcrumbCollapsedStyles)({
|
|
70
|
-
open: open
|
|
71
|
-
}),
|
|
72
|
-
onClick: expandHandler
|
|
73
|
-
}, (0, _react2.jsx)(_Icon["default"], {
|
|
74
|
-
name: "dotsVertical",
|
|
75
|
-
size: 22,
|
|
76
|
-
color: theme.utils.getColor(iconColor, iconColorShade)
|
|
77
|
-
})), (0, _react2.jsx)(_Separator["default"], null), open && collapsedItemsList));
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var _default = BreadcrumbCollapsed;
|
|
81
|
-
exports["default"] = _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Theme } from '../../../theme';
|
|
2
|
-
declare type BreadcrumbIconStyle = {
|
|
3
|
-
open: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare const ClickAwayListenerStyle: {
|
|
6
|
-
margin: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const breadcrumbCollapsedStyles: ({ open }: BreadcrumbIconStyle) => (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
9
|
-
export declare const breadcrumbCollapsedWrapperStyles: () => import("@emotion/react").SerializedStyles;
|
|
10
|
-
export declare const inlineBreadcrumbWrapperStyles: {
|
|
11
|
-
padding: number;
|
|
12
|
-
boxShadow: string;
|
|
13
|
-
top: string;
|
|
14
|
-
width: string;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.inlineBreadcrumbWrapperStyles = exports.breadcrumbCollapsedWrapperStyles = exports.breadcrumbCollapsedStyles = exports.ClickAwayListenerStyle = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = require("@emotion/react");
|
|
7
|
-
|
|
8
|
-
var _utils = require("../../../theme/utils");
|
|
9
|
-
|
|
10
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
11
|
-
|
|
12
|
-
var ClickAwayListenerStyle = {
|
|
13
|
-
margin: 'auto'
|
|
14
|
-
};
|
|
15
|
-
exports.ClickAwayListenerStyle = ClickAwayListenerStyle;
|
|
16
|
-
|
|
17
|
-
var breadcrumbCollapsedStyles = function breadcrumbCollapsedStyles(_ref2) {
|
|
18
|
-
var open = _ref2.open;
|
|
19
|
-
return function (theme) {
|
|
20
|
-
return (
|
|
21
|
-
/*#__PURE__*/
|
|
22
|
-
|
|
23
|
-
/*#__PURE__*/
|
|
24
|
-
(0, _react.css)("padding:", (0, _utils.rem)(2), ";margin-top:", (0, _utils.rem)(1), ";transform:rotate(90deg);border-radius:3rem;background-color:", open ? theme.utils.getColor('lightGrey', 650) : theme.utils.getColor('lightGrey', 200), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:breadcrumbCollapsedStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JyZWF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lsZXMgPSAoKSA9PiBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IGNvbnN0IGlubGluZUJyZWFkY3J1bWJXcmFwcGVyU3R5bGVzID0ge1xuICBwYWRkaW5nOiAwLFxuICBib3hTaGFkb3c6IGAjODA4MDgwMmIgMHB4IDBweCAke3JlbSgxNil9YCxcbiAgdG9wOiByZW0oNDApLFxuICB3aWR0aDogcmVtKDE2NCksXG59O1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:breadcrumbCollapsedStyles;")
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
exports.breadcrumbCollapsedStyles = breadcrumbCollapsedStyles;
|
|
30
|
-
|
|
31
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
32
|
-
name: "5o2vmf",
|
|
33
|
-
styles: "display:flex;cursor:pointer;position:relative"
|
|
34
|
-
} : {
|
|
35
|
-
name: "orgln1-breadcrumbCollapsedWrapperStyles",
|
|
36
|
-
styles: "display:flex;cursor:pointer;position:relative;label:breadcrumbCollapsedWrapperStyles;",
|
|
37
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0JyZWFkY3J1bWIvQnJlYWRjcnVtYkNvbGxhcHNlZC9CcmVhZGNydW1iQ29sbGFwc2VkLnN0eWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNCeUQiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQnJlYWRjcnVtYi9CcmVhZGNydW1iQ29sbGFwc2VkL0JyZWFkY3J1bWJDb2xsYXBzZWQuc3R5bGUudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcn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KDQwKSxcbiAgd2lkdGg6IHJlbSgxNjQpLFxufTtcbiJdfQ== */",
|
|
38
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var breadcrumbCollapsedWrapperStyles = function breadcrumbCollapsedWrapperStyles() {
|
|
42
|
-
return _ref;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.breadcrumbCollapsedWrapperStyles = breadcrumbCollapsedWrapperStyles;
|
|
46
|
-
var inlineBreadcrumbWrapperStyles = {
|
|
47
|
-
padding: 0,
|
|
48
|
-
boxShadow: "#8080802b 0px 0px " + (0, _utils.rem)(16),
|
|
49
|
-
top: (0, _utils.rem)(40),
|
|
50
|
-
width: (0, _utils.rem)(164)
|
|
51
|
-
};
|
|
52
|
-
exports.inlineBreadcrumbWrapperStyles = inlineBreadcrumbWrapperStyles;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare type Props = {
|
|
3
|
-
/** Defines the options used to render a Menu button */
|
|
4
|
-
options?: string[];
|
|
5
|
-
/** Defines the method where a developer can manipulate the selection of an menu item */
|
|
6
|
-
onChangeHandler?: (selectedItem: string) => void;
|
|
7
|
-
/** Defines the label of the current level of breadcrumb */
|
|
8
|
-
label?: string;
|
|
9
|
-
};
|
|
10
|
-
declare const BreadcrumbAdvancedItem: React.FC<Props>;
|
|
11
|
-
export default BreadcrumbAdvancedItem;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var React = _interopRequireWildcard(require("react"));
|
|
7
|
-
|
|
8
|
-
var _index = _interopRequireDefault(require("../../Menu/index"));
|
|
9
|
-
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
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); }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
var BreadcrumbAdvancedItem = function BreadcrumbAdvancedItem(props) {
|
|
19
|
-
var _props$options = props.options,
|
|
20
|
-
options = _props$options === void 0 ? undefined : _props$options,
|
|
21
|
-
onChangeHandler = props.onChangeHandler,
|
|
22
|
-
label = props.label;
|
|
23
|
-
|
|
24
|
-
var _React$useState = React.useState(''),
|
|
25
|
-
selectedItem = _React$useState[0],
|
|
26
|
-
setSelectedItem = _React$useState[1];
|
|
27
|
-
|
|
28
|
-
React.useEffect(function () {
|
|
29
|
-
if (onChangeHandler) {
|
|
30
|
-
onChangeHandler(selectedItem);
|
|
31
|
-
}
|
|
32
|
-
}, [selectedItem]);
|
|
33
|
-
return (0, _react2.jsx)(_index["default"], {
|
|
34
|
-
items: options,
|
|
35
|
-
selectedItem: selectedItem,
|
|
36
|
-
onSelect: function onSelect(option) {
|
|
37
|
-
return setSelectedItem(option);
|
|
38
|
-
},
|
|
39
|
-
buttonText: label,
|
|
40
|
-
rightIconName: "arrowDown",
|
|
41
|
-
iconSize: 12
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var _default = BreadcrumbAdvancedItem;
|
|
46
|
-
exports["default"] = _default;
|