@orfium/ictinus 4.41.0 → 4.42.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/AvatarStack/AvatarStack.d.ts +1 -1
- package/dist/components/Button/Button.style.d.ts +2 -3
- package/dist/components/ButtonBase/ButtonBase.d.ts +5 -0
- package/dist/components/ButtonBase/ButtonBase.js +6 -5
- package/dist/components/ButtonBase/ButtonBase.style.d.ts +4 -51
- package/dist/components/ButtonBase/ButtonBase.style.js +18 -19
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +34 -14
- package/dist/components/DatePicker/Month/Month.utils.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +7 -1
- package/dist/components/IconButton/IconButton.style.d.ts +9 -13
- package/dist/components/IconButton/IconButton.style.js +7 -7
- package/dist/components/Notification/NotificationsContainer/NotificationsContainer.d.ts +4 -1
- package/dist/components/Notification/NotificationsContainer/NotificationsContainer.js +16 -9
- package/dist/components/Notification/NotificationsContainer/NotificationsContainer.style.d.ts +1 -1
- package/dist/components/Notification/NotificationsContainer/NotificationsContainer.style.js +3 -3
- package/dist/components/SearchField/SearchField.js +9 -3
- package/dist/components/Switch/Switch.style.js +4 -4
- package/dist/components/TextArea/TextArea.js +12 -7
- package/dist/components/TextArea/TextArea.style.d.ts +6 -4
- package/dist/components/TextArea/TextArea.style.js +21 -24
- package/dist/components/TextField/TextField.js +4 -2
- package/dist/components/TextInputBase/TextInputBase.d.ts +7 -4
- package/dist/components/TextInputBase/TextInputBase.js +5 -9
- package/dist/components/TextInputBase/TextInputBase.style.d.ts +3 -3
- package/dist/components/TextInputBase/TextInputBase.style.js +69 -11
- package/dist/utils/size-utils.d.ts +0 -1
- package/dist/utils/size-utils.js +1 -7
- package/dist/utils/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { DivProps } from 'utils/common';
|
|
3
3
|
import { TestProps } from 'utils/types';
|
|
4
4
|
import { Props } from './AvatarStack.types';
|
|
5
|
-
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" |
|
|
5
|
+
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" | keyof TestProps | keyof Props> & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export default AvatarStack;
|
|
7
7
|
export { Props };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Theme } from 'theme';
|
|
2
|
-
import { RequiredProperties } from 'utils/common';
|
|
3
2
|
import { Props } from './Button';
|
|
4
3
|
export declare const buttonSpanStyle: () => () => {
|
|
5
4
|
display: string;
|
|
@@ -9,9 +8,9 @@ export declare const buttonSpanStyle: () => () => {
|
|
|
9
8
|
export declare const iconStyle: () => () => {
|
|
10
9
|
display: string;
|
|
11
10
|
};
|
|
12
|
-
export declare const childrenWrapperStyle: ({ iconLeft, iconRight, hasChildren, }:
|
|
11
|
+
export declare const childrenWrapperStyle: ({ iconLeft, iconRight, hasChildren, }: Omit<Props, "onClick" | "dataTestId" | "block" | "isIconButton" | "buttonType"> & {
|
|
13
12
|
hasChildren: boolean;
|
|
14
|
-
}
|
|
13
|
+
}) => (theme: Theme) => {
|
|
15
14
|
marginLeft: number | "8";
|
|
16
15
|
marginRight: number | "8";
|
|
17
16
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/serialize';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { ClickEvent } from '../../hooks/useLoading';
|
|
3
4
|
import { AcceptedColorComponentTypes } from '../../utils/themeFunctions';
|
|
@@ -32,6 +33,10 @@ export declare type Props = {
|
|
|
32
33
|
disabled?: boolean;
|
|
33
34
|
/** Defines the button type */
|
|
34
35
|
buttonType?: 'submit' | 'reset' | 'button';
|
|
36
|
+
/** Sx prop to override specific properties */
|
|
37
|
+
sx?: {
|
|
38
|
+
container?: CSSObject;
|
|
39
|
+
};
|
|
35
40
|
};
|
|
36
41
|
declare const ButtonBase: React.ForwardRefExoticComponent<Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "css" | "onBlur" | "onClick" | "type">> & Props & TestProps & EventButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
37
42
|
export default ButtonBase;
|
|
@@ -29,8 +29,6 @@ var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
29
29
|
filled = _props$filled === void 0 ? true : _props$filled,
|
|
30
30
|
_props$transparent = props.transparent,
|
|
31
31
|
transparent = _props$transparent === void 0 ? false : _props$transparent,
|
|
32
|
-
_props$isIconButton = props.isIconButton,
|
|
33
|
-
isIconButton = _props$isIconButton === void 0 ? false : _props$isIconButton,
|
|
34
32
|
_props$iconLeft = props.iconLeft,
|
|
35
33
|
iconLeft = _props$iconLeft === void 0 ? null : _props$iconLeft,
|
|
36
34
|
_props$iconRight = props.iconRight,
|
|
@@ -42,16 +40,19 @@ var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
42
40
|
children = props.children,
|
|
43
41
|
_props$dataTestId = props.dataTestId,
|
|
44
42
|
dataTestId = _props$dataTestId === void 0 ? '' : _props$dataTestId,
|
|
43
|
+
_props$dataTestPrefix = props.dataTestPrefixId,
|
|
44
|
+
dataTestPrefixId = _props$dataTestPrefix === void 0 ? '' : _props$dataTestPrefix,
|
|
45
45
|
_props$buttonType = props.buttonType,
|
|
46
46
|
buttonType = _props$buttonType === void 0 ? 'button' : _props$buttonType,
|
|
47
47
|
_onClick = props.onClick,
|
|
48
|
-
onBlur = props.onBlur
|
|
48
|
+
onBlur = props.onBlur,
|
|
49
|
+
sx = props.sx;
|
|
49
50
|
|
|
50
51
|
var _useTypeColorToColorM = (0, _useTypeColorToColorMatch.useTypeColorToColorMatch)(),
|
|
51
52
|
calculateColorBetweenColorAndType = _useTypeColorToColorM.calculateColorBetweenColorAndType;
|
|
52
53
|
|
|
53
54
|
var calculatedColor = calculateColorBetweenColorAndType(color, type);
|
|
54
|
-
var testIdName =
|
|
55
|
+
var testIdName = dataTestPrefixId + "button";
|
|
55
56
|
return (0, _react2.jsx)("button", {
|
|
56
57
|
ref: ref,
|
|
57
58
|
type: buttonType,
|
|
@@ -65,10 +66,10 @@ var ButtonBase = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
65
66
|
color: color,
|
|
66
67
|
transparent: transparent,
|
|
67
68
|
calculatedColor: calculatedColor,
|
|
68
|
-
isIconButton: isIconButton,
|
|
69
69
|
disabled: disabled,
|
|
70
70
|
iconLeft: iconLeft,
|
|
71
71
|
iconRight: iconRight,
|
|
72
|
+
sx: sx,
|
|
72
73
|
childrenCount: _react["default"].Children.count(children)
|
|
73
74
|
}),
|
|
74
75
|
onClick: function onClick(event) {
|
|
@@ -1,61 +1,14 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/react';
|
|
1
2
|
import { Theme } from '../../theme';
|
|
2
|
-
import { RequiredProperties } from '../../utils/common';
|
|
3
3
|
import { ColorShapeFromComponent } from '../../utils/themeFunctions';
|
|
4
4
|
import { Props } from './ButtonBase';
|
|
5
5
|
import { buttonSizes } from './config';
|
|
6
6
|
/** Calculates the button specific height based on the size passed to it **/
|
|
7
|
-
export declare const heightBasedOnSize: (size: typeof buttonSizes[number]) => string;
|
|
8
|
-
export declare const buttonBaseStyle: ({ type, filled, calculatedColor, size, block,
|
|
7
|
+
export declare const heightBasedOnSize: (size: typeof buttonSizes[number] | 'default') => string;
|
|
8
|
+
export declare const buttonBaseStyle: ({ type, filled, calculatedColor, size, block, transparent, childrenCount, sx, }: Omit<Props, "buttonType"> & {
|
|
9
9
|
calculatedColor: ColorShapeFromComponent;
|
|
10
10
|
childrenCount: number;
|
|
11
|
-
}
|
|
12
|
-
fontSize: any;
|
|
13
|
-
fontWeight: 500;
|
|
14
|
-
color: string;
|
|
15
|
-
width: string | undefined;
|
|
16
|
-
backgroundColor: string;
|
|
17
|
-
padding: string;
|
|
18
|
-
height: string;
|
|
19
|
-
borderRadius: "4";
|
|
20
|
-
border: string;
|
|
21
|
-
cursor: string;
|
|
22
|
-
transition: string;
|
|
23
|
-
':focus-visible:not(:disabled)': {
|
|
24
|
-
outline: string;
|
|
25
|
-
};
|
|
26
|
-
':hover:not(:disabled)': {
|
|
27
|
-
backgroundColor: string;
|
|
28
|
-
};
|
|
29
|
-
':active:not(:disabled)': {
|
|
30
|
-
backgroundColor: string;
|
|
31
|
-
};
|
|
32
|
-
':disabled': import("../../theme/states/disabled").GetDisabled;
|
|
33
|
-
} | {
|
|
34
|
-
display: string;
|
|
35
|
-
justifyContent: string;
|
|
36
|
-
alignItems: string;
|
|
37
|
-
borderRadius: string;
|
|
38
|
-
padding: number;
|
|
39
|
-
width: string;
|
|
40
|
-
fontSize: any;
|
|
41
|
-
fontWeight: 500;
|
|
42
|
-
color: string;
|
|
43
|
-
backgroundColor: string;
|
|
44
|
-
height: string;
|
|
45
|
-
border: string;
|
|
46
|
-
cursor: string;
|
|
47
|
-
transition: string;
|
|
48
|
-
':focus-visible:not(:disabled)': {
|
|
49
|
-
outline: string;
|
|
50
|
-
};
|
|
51
|
-
':hover:not(:disabled)': {
|
|
52
|
-
backgroundColor: string;
|
|
53
|
-
};
|
|
54
|
-
':active:not(:disabled)': {
|
|
55
|
-
backgroundColor: string;
|
|
56
|
-
};
|
|
57
|
-
':disabled': import("../../theme/states/disabled").GetDisabled;
|
|
58
|
-
};
|
|
11
|
+
}) => (theme: Theme) => SerializedStyles;
|
|
59
12
|
export declare const buttonSpanStyle: () => () => {
|
|
60
13
|
display: string;
|
|
61
14
|
alignItems: string;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.iconStyle = exports.buttonSpanStyle = exports.buttonBaseStyle = exports.heightBasedOnSize = void 0;
|
|
5
5
|
|
|
6
|
+
var _react = require("@emotion/react");
|
|
7
|
+
|
|
6
8
|
var _utils = require("../../theme/utils");
|
|
7
9
|
|
|
8
10
|
var _states = require("../../theme/states");
|
|
@@ -15,7 +17,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
15
17
|
|
|
16
18
|
/** Calculates the button specific height based on the size passed to it **/
|
|
17
19
|
var heightBasedOnSize = function heightBasedOnSize(size) {
|
|
18
|
-
|
|
20
|
+
var _buttonConfig$sizes$s;
|
|
21
|
+
|
|
22
|
+
return (0, _utils.rem)((_buttonConfig$sizes$s = _config.buttonConfig.sizes[size]) != null ? _buttonConfig$sizes$s : _config.buttonConfig.sizes["default"]);
|
|
19
23
|
};
|
|
20
24
|
/** Calculates the button specific font size based on the size passed to it **/
|
|
21
25
|
|
|
@@ -23,7 +27,9 @@ var heightBasedOnSize = function heightBasedOnSize(size) {
|
|
|
23
27
|
exports.heightBasedOnSize = heightBasedOnSize;
|
|
24
28
|
|
|
25
29
|
var fontSizeBasedOnSize = function fontSizeBasedOnSize(theme, size) {
|
|
26
|
-
|
|
30
|
+
var _buttonConfig$fontSiz;
|
|
31
|
+
|
|
32
|
+
return theme.typography.fontSizes[(_buttonConfig$fontSiz = _config.buttonConfig.fontSize[size]) != null ? _buttonConfig$fontSiz : _config.buttonConfig.fontSize["default"]];
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
@@ -32,20 +38,20 @@ var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
|
32
38
|
calculatedColor = _ref.calculatedColor,
|
|
33
39
|
size = _ref.size,
|
|
34
40
|
block = _ref.block,
|
|
35
|
-
isIconButton = _ref.isIconButton,
|
|
36
41
|
transparent = _ref.transparent,
|
|
37
|
-
childrenCount = _ref.childrenCount
|
|
42
|
+
childrenCount = _ref.childrenCount,
|
|
43
|
+
sx = _ref.sx;
|
|
38
44
|
return function (theme) {
|
|
39
45
|
var backGroundColor = (0, _utils2.defineBackgroundColor)(theme, calculatedColor, type, childrenCount > 0);
|
|
40
46
|
var isOutlined = !filled && !transparent;
|
|
41
47
|
var isBackgroundTransparent = isOutlined || transparent;
|
|
42
48
|
var borderWidth = isOutlined ? _config.buttonConfig.types.outlined.border.width : 0;
|
|
43
49
|
var baseButtonStyles = {
|
|
44
|
-
fontSize: fontSizeBasedOnSize(theme, size),
|
|
50
|
+
fontSize: fontSizeBasedOnSize(theme, size || 'default'),
|
|
45
51
|
fontWeight: theme.typography.weights.medium,
|
|
46
52
|
color: (0, _utils2.calculateButtonColor)({
|
|
47
53
|
type: type,
|
|
48
|
-
isBackgroundTransparent: isBackgroundTransparent,
|
|
54
|
+
isBackgroundTransparent: Boolean(isBackgroundTransparent),
|
|
49
55
|
backGroundColor: backGroundColor,
|
|
50
56
|
calculatedColor: calculatedColor,
|
|
51
57
|
theme: theme
|
|
@@ -53,7 +59,7 @@ var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
|
53
59
|
width: block ? '100%' : undefined,
|
|
54
60
|
backgroundColor: isBackgroundTransparent ? 'transparent' : backGroundColor,
|
|
55
61
|
padding: size === 'lg' ? theme.spacing.md : "0 " + theme.spacing.md,
|
|
56
|
-
height: heightBasedOnSize(size),
|
|
62
|
+
height: heightBasedOnSize(size || 'default'),
|
|
57
63
|
borderRadius: theme.spacing.xsm,
|
|
58
64
|
border: isOutlined ? "solid " + (0, _utils.rem)(borderWidth) + " " + backGroundColor : 'none',
|
|
59
65
|
cursor: 'pointer',
|
|
@@ -80,19 +86,12 @@ var buttonBaseStyle = function buttonBaseStyle(_ref) {
|
|
|
80
86
|
},
|
|
81
87
|
':disabled': (0, _states.getDisabled)()
|
|
82
88
|
};
|
|
89
|
+
return (
|
|
90
|
+
/*#__PURE__*/
|
|
83
91
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
justifyContent: 'center',
|
|
88
|
-
alignItems: 'center',
|
|
89
|
-
borderRadius: '100%',
|
|
90
|
-
padding: 0,
|
|
91
|
-
width: heightBasedOnSize(size)
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return baseButtonStyles;
|
|
92
|
+
/*#__PURE__*/
|
|
93
|
+
(0, _react.css)(_extends({}, baseButtonStyles, sx == null ? void 0 : sx.container), process.env.NODE_ENV === "production" ? "" : ";label:buttonBaseStyle;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,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c3BsYXk6ICdmbGV4JyxcbiAgICBhbGlnbkl0ZW1zOiAnY2VudGVyJyxcbiAgfTtcbn07XG5cbmV4cG9ydCBjb25zdCBpY29uU3R5bGUgPSAoKSA9PiAoKSA9PiAoe1xuICBkaXNwbGF5OiAnaW5saW5lLWZsZXgnLFxufSk7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:buttonBaseStyle;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0J1dHRvbkJhc2UvQnV0dG9uQmFzZS5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyRVMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQnV0dG9uQmFzZS9CdXR0b25CYXNlLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAndGhlbWUvdXRpbHMnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lJztcbmltcG9ydCB7IGdldERpc2FibGVkLCBnZXRGb2N1cywgZ2V0SG92ZXIsIGdldFByZXNzZWQgfSBmcm9tICcuLi8uLi90aGVtZS9zdGF0ZXMnO1xuaW1wb3J0IHsgQ29sb3JTaGFwZUZyb21Db21wb25lbnQgfSBmcm9tICcuLi8uLi91dGlscy90aGVtZUZ1bmN0aW9ucyc7XG5pbXBvcnQgeyBQcm9wcyB9IGZyb20gJy4vQnV0dG9uQmFzZSc7XG5pbXBvcnQgeyBidXR0b25Db25maWcsIGJ1dHRvblNpemVzIH0gZnJvbSAnLi9jb25maWcnO1xuaW1wb3J0IHsgY2FsY3VsYXRlQnV0dG9uQ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WRlLFxuICAgICAgfSkuYmFja2dyb3VuZENvbG9yLFxuICAgIH0sXG4gICAgJzpkaXNhYmxlZCc6IGdldERpc2FibGVkKCksXG4gIH07XG5cbiAgcmV0dXJuIGNzcyh7IC4uLmJhc2VCdXR0b25TdHlsZXMsIC4uLnN4Py5jb250YWluZXIgfSk7XG59O1xuXG5leHBvcnQgY29uc3QgYnV0dG9uU3BhblN0eWxlID0gKCkgPT4gKCkgPT4ge1xuICByZXR1cm4ge1xuICAgIGRpc3BsYXk6ICdmbGV4JyxcbiAgICBhbGlnbkl0ZW1zOiAnY2VudGVyJyxcbiAgfTtcbn07XG5cbmV4cG9ydCBjb25zdCBpY29uU3R5bGUgPSAoKSA9PiAoKSA9PiAoe1xuICBkaXNwbGF5OiAnaW5saW5lLWZsZXgnLFxufSk7XG4iXX0= */")
|
|
94
|
+
);
|
|
96
95
|
};
|
|
97
96
|
};
|
|
98
97
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const Chip: React.ForwardRefExoticComponent<import("./Chip.types").Props & import("../../utils/types").TestProps & Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "css" | "onBlur" | "onClick" | "type">> & React.RefAttributes<HTMLButtonElement>>;
|
|
2
|
+
declare const Chip: React.ForwardRefExoticComponent<import("./Chip.types").Props & import("../../utils/types").TestProps & Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "css" | "onBlur" | "onClick" | "type">> & React.RefAttributes<HTMLButtonElement | HTMLDivElement>>;
|
|
3
3
|
export default Chip;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
5
|
|
|
6
|
-
var _react =
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
7
|
|
|
8
8
|
var _helpers = require("../../utils/helpers");
|
|
9
9
|
|
|
@@ -25,6 +25,10 @@ var _excluded = ["styleType", "disabled", "dataTestId"];
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
27
|
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
28
32
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
33
|
|
|
30
34
|
var Chip = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
@@ -51,19 +55,7 @@ var Chip = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
|
51
55
|
badgeNumber: badgeNumber,
|
|
52
56
|
disabled: disabled
|
|
53
57
|
});
|
|
54
|
-
|
|
55
|
-
ref: ref,
|
|
56
|
-
"data-testid": (0, _helpers.generateTestDataId)('chip', dataTestId),
|
|
57
|
-
onClick: onClick,
|
|
58
|
-
disabled: disabled,
|
|
59
|
-
css: (0, _Chip.chipStyle)({
|
|
60
|
-
styleType: styleType,
|
|
61
|
-
fill: fill,
|
|
62
|
-
isSelected: isSelected,
|
|
63
|
-
onClear: onClear,
|
|
64
|
-
onClick: onClick
|
|
65
|
-
})
|
|
66
|
-
}, isChecked && (0, _react2.jsx)(_Icon["default"], {
|
|
58
|
+
var contents = (0, _react2.jsx)(_react.Fragment, null, isChecked && (0, _react2.jsx)(_Icon["default"], {
|
|
67
59
|
size: 14,
|
|
68
60
|
name: 'checkmark',
|
|
69
61
|
color: 'darkGrey',
|
|
@@ -92,6 +84,34 @@ var Chip = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
|
92
84
|
}
|
|
93
85
|
}
|
|
94
86
|
})));
|
|
87
|
+
|
|
88
|
+
if (styleType === 'read-only') {
|
|
89
|
+
return (0, _react2.jsx)("div", {
|
|
90
|
+
ref: ref,
|
|
91
|
+
"data-testid": (0, _helpers.generateTestDataId)('chip', dataTestId),
|
|
92
|
+
css: (0, _Chip.chipStyle)({
|
|
93
|
+
styleType: styleType,
|
|
94
|
+
fill: fill,
|
|
95
|
+
isSelected: isSelected
|
|
96
|
+
}),
|
|
97
|
+
"aria-readonly": "true"
|
|
98
|
+
}, contents);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return (0, _react2.jsx)("button", {
|
|
102
|
+
role: "button",
|
|
103
|
+
ref: ref,
|
|
104
|
+
"data-testid": (0, _helpers.generateTestDataId)('chip', dataTestId),
|
|
105
|
+
css: (0, _Chip.chipStyle)({
|
|
106
|
+
styleType: styleType,
|
|
107
|
+
fill: fill,
|
|
108
|
+
isSelected: isSelected,
|
|
109
|
+
onClear: onClear,
|
|
110
|
+
onClick: onClick
|
|
111
|
+
}),
|
|
112
|
+
onClick: onClick,
|
|
113
|
+
disabled: disabled
|
|
114
|
+
}, contents);
|
|
95
115
|
});
|
|
96
116
|
|
|
97
117
|
Chip.displayName = 'Chip';
|
|
@@ -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: "first" | "last" | 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;
|
|
@@ -13,6 +13,8 @@ var _utils = require("../Button/utils");
|
|
|
13
13
|
|
|
14
14
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
15
15
|
|
|
16
|
+
var _IconButton = require("./IconButton.style");
|
|
17
|
+
|
|
16
18
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase/ButtonBase"));
|
|
17
19
|
|
|
18
20
|
var _react2 = require("@emotion/react");
|
|
@@ -38,9 +40,13 @@ var IconButton = /*#__PURE__*/_react["default"].forwardRef(function (props, ref)
|
|
|
38
40
|
|
|
39
41
|
var calculatedColor = calculateColorBetweenColorAndType(color, type);
|
|
40
42
|
var iconColor = filled && !transparent ? theme.utils.getAAColorFromSwatches(calculatedColor.color, calculatedColor.shade) : (0, _utils.defineBackgroundColor)(theme, calculatedColor, type, true, true);
|
|
43
|
+
var sx = (0, _IconButton.sxProp)({
|
|
44
|
+
size: props.size
|
|
45
|
+
});
|
|
41
46
|
return (0, _react2.jsx)(_ButtonBase["default"], _extends({}, props, {
|
|
42
47
|
ref: ref,
|
|
43
|
-
|
|
48
|
+
sx: sx,
|
|
49
|
+
dataTestPrefixId: 'icon-'
|
|
44
50
|
}), (0, _react2.jsx)(_Icon["default"], {
|
|
45
51
|
name: name,
|
|
46
52
|
color: iconColor,
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { RequiredProperties } from '../../utils/common';
|
|
2
|
-
import { ColorShapeFromComponent } from '../../utils/themeFunctions';
|
|
3
1
|
import { Props } from '../Button/Button';
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
padding: number;
|
|
14
|
-
width: string;
|
|
2
|
+
export declare const sxProp: ({ size }: Pick<Props, 'size'>) => {
|
|
3
|
+
container: {
|
|
4
|
+
display: string;
|
|
5
|
+
justifyContent: string;
|
|
6
|
+
alignItems: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
padding: number;
|
|
9
|
+
width: string;
|
|
10
|
+
};
|
|
15
11
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.sxProp = void 0;
|
|
5
5
|
|
|
6
6
|
var _ButtonBase = require("../ButtonBase/ButtonBase.style");
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var sxProp = function sxProp(_ref) {
|
|
9
9
|
var size = _ref.size;
|
|
10
|
-
return
|
|
11
|
-
|
|
10
|
+
return {
|
|
11
|
+
container: {
|
|
12
12
|
display: 'flex',
|
|
13
13
|
justifyContent: 'center',
|
|
14
14
|
alignItems: 'center',
|
|
15
15
|
borderRadius: '100%',
|
|
16
16
|
padding: 0,
|
|
17
|
-
width: (0, _ButtonBase.heightBasedOnSize)(size)
|
|
18
|
-
}
|
|
17
|
+
width: (0, _ButtonBase.heightBasedOnSize)(size || 'default')
|
|
18
|
+
}
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
exports.
|
|
22
|
+
exports.sxProp = sxProp;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
declare type Positions = 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right';
|
|
3
4
|
declare type Props = {
|
|
4
5
|
/** Notifications Container position */
|
|
5
6
|
position: Positions;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
parent?: HTMLElement | null;
|
|
6
9
|
};
|
|
7
10
|
declare const NotificationsContainer: React.FC<Props>;
|
|
8
11
|
export default NotificationsContainer;
|
|
@@ -3,22 +3,29 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
7
9
|
|
|
8
10
|
var _NotificationsContainer = require("./NotificationsContainer.style");
|
|
9
11
|
|
|
10
12
|
var _react2 = require("@emotion/react");
|
|
11
13
|
|
|
12
|
-
function
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var NotificationsContainer = function NotificationsContainer(props) {
|
|
17
|
+
var children = props.children,
|
|
18
|
+
position = props.position,
|
|
19
|
+
_props$parent = props.parent,
|
|
20
|
+
parent = _props$parent === void 0 ? document.body : _props$parent;
|
|
13
21
|
|
|
14
|
-
|
|
22
|
+
if (parent === null) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
15
25
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return (0, _react2.jsx)("div", {
|
|
20
|
-
css: (0, _NotificationsContainer.notificationsContainer)(position)
|
|
21
|
-
}, children);
|
|
26
|
+
return /*#__PURE__*/_reactDom["default"].createPortal((0, _react2.jsx)("div", {
|
|
27
|
+
css: (0, _NotificationsContainer.notificationsContainer)(position, parent)
|
|
28
|
+
}, children), parent);
|
|
22
29
|
};
|
|
23
30
|
|
|
24
31
|
var _default = NotificationsContainer;
|
package/dist/components/Notification/NotificationsContainer/NotificationsContainer.style.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SerializedStyles } from '@emotion/react';
|
|
2
2
|
import { Theme } from '../../../theme';
|
|
3
|
-
export declare const notificationsContainer: (currentPosition: string) => (theme: Theme) => SerializedStyles;
|
|
3
|
+
export declare const notificationsContainer: (currentPosition: string, parent: HTMLElement) => (theme: Theme) => SerializedStyles;
|
|
@@ -12,7 +12,7 @@ var getPositionStyle = function getPositionStyle(styleLiteral) {
|
|
|
12
12
|
/*#__PURE__*/
|
|
13
13
|
|
|
14
14
|
/*#__PURE__*/
|
|
15
|
-
(0, _react.css)(styleLiteral, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:getPositionStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
15
|
+
(0, _react.css)(styleLiteral, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:getPositionStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL05vdGlmaWNhdGlvbi9Ob3RpZmljYXRpb25zQ29udGFpbmVyL05vdGlmaWNhdGlvbnNDb250YWluZXIuc3R5bGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1ZIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL05vdGlmaWNhdGlvbi9Ob3RpZmljYXRpb25zQ29udGFpbmVyL05vdGlmaWNhdGlvbnNDb250YWluZXIuc3R5bGUudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJv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wMDtcbiAgbWFyZ2luOiAke3RoZW1lLnNwYWNpbmcuc219ICR7dGhlbWUuc3BhY2luZy5tZH0gJHt0aGVtZS5zcGFjaW5nLm1kfTtcbiAgPiBkaXYge1xuICAgIG1hcmdpbjogJHt0aGVtZS5zcGFjaW5nLnNtfSAwO1xuICB9XG5cbiAgZGl2W25vdGlmaWNhdGlvbi10eXBlPSd0b2FzdCddIHtcbiAgICBtaW4td2lkdGg6ICR7cmVtKDMzNil9O1xuICAgIHdpZHRoOiAxMDAlO1xuICB9XG5cbiAgZGl2W25vdGlmaWNhdGlvbi10eXBlPSdzbmFja2JhciddIHtcbiAgICBtaW4td2lkdGg6ICR7cmVtKDMzNil9O1xuICAgIHdpZHRoOiAxMDAlO1xuICB9XG5cbiAgZGl2W25vdGlmaWNhdGlvbi10eXBlPSdiYW5uZXInXSB7XG4gICAgbWluLXdpZHRoOiAke3JlbSg0OTApfTtcbiAgfVxuXG4gIGRpdltub3RpZmljYXRpb24tdHlwZT0nYmFubmVyJ10gfiBkaXZbbm90aWZpY2F0aW9uLXR5cGU9J3RvYXN0J10ge1xuICAgIHdpZHRoOiAxMDAlO1xuICB9XG5cbiAgZGl2W25vdGlmaWNhdGlvbi10eXBlPSdiYW5uZXInXSB+IGRpdltub3RpZmljYXRpb24tdHlwZT0nc25hY2tiYXInXSB7XG4gICAgd2lkdGg6IDEwMCU7XG4gIH1cbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:getPositionStyle;")
|
|
16
16
|
);
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -23,13 +23,13 @@ var positionOptions = {
|
|
|
23
23
|
'bottom-right': "bottom:0; right: 0; align-items: flex-end;"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var notificationsContainer = function notificationsContainer(currentPosition) {
|
|
26
|
+
var notificationsContainer = function notificationsContainer(currentPosition, parent) {
|
|
27
27
|
return function (theme) {
|
|
28
28
|
return (
|
|
29
29
|
/*#__PURE__*/
|
|
30
30
|
|
|
31
31
|
/*#__PURE__*/
|
|
32
|
-
(0, _react.css)("position:fixed;", getPositionStyle(positionOptions[currentPosition]), ";max-width:66%;display:flex;flex-direction:column;z-index:2500;margin:", theme.spacing.sm, " ", theme.spacing.md, " ", theme.spacing.md, ";>div{margin:", theme.spacing.sm, " 0;}div[notification-type='toast']{min-width:", (0, _utils.rem)(336), ";width:100%;}div[notification-type='snackbar']{min-width:", (0, _utils.rem)(336), ";width:100%;}div[notification-type='banner']{min-width:", (0, _utils.rem)(490), ";}div[notification-type='banner']~div[notification-type='toast']{width:100%;}div[notification-type='banner']~div[notification-type='snackbar']{width:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:notificationsContainer;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
32
|
+
(0, _react.css)("position:", parent === document.body ? 'fixed' : 'absolute', ";", getPositionStyle(positionOptions[currentPosition]), ";max-width:66%;display:flex;flex-direction:column;z-index:2500;margin:", theme.spacing.sm, " ", theme.spacing.md, " ", theme.spacing.md, ";>div{margin:", theme.spacing.sm, " 0;}div[notification-type='toast']{min-width:", (0, _utils.rem)(336), ";width:100%;}div[notification-type='snackbar']{min-width:", (0, _utils.rem)(336), ";width:100%;}div[notification-type='banner']{min-width:", (0, _utils.rem)(490), ";}div[notification-type='banner']~div[notification-type='toast']{width:100%;}div[notification-type='banner']~div[notification-type='snackbar']{width:100%;}" + (process.env.NODE_ENV === "production" ? "" : ";label:notificationsContainer;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL05vdGlmaWNhdGlvbi9Ob3RpZmljYXRpb25zQ29udGFpbmVyL05vdGlmaWNhdGlvbnNDb250YWluZXIuc3R5bGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9CMEIiL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T0gZG9jdW1lbnQuYm9keSA/ICdmaXhlZCcgOiAnYWJzb2x1dGUnfTtcbiAgJHtnZXRQb3NpdGlvblN0eWxlKHBvc2l0aW9uT3B0aW9uc1tjdXJyZW50UG9zaXRpb25dKX07XG4gIG1heC13aWR0aDogNjYlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICB6LWluZGV4OiAyNTAwO1xuICBtYXJnaW46ICR7dGhlbWUuc3BhY2luZy5zbX0gJHt0aGVtZS5zcGFjaW5nLm1kfSAke3RoZW1lLnNwYWNpbmcubWR9O1xuICA+IGRpdiB7XG4gICAgbWFyZ2luOiAke3RoZW1lLnNwYWNpbmcuc219IDA7XG4gIH1cblxuICBkaXZbbm90aWZpY2F0aW9uLXR5cGU9J3RvYXN0J10ge1xuICAgIG1pbi13aWR0aDogJHtyZW0oMzM2KX07XG4gICAgd2lkdGg6IDEwMCU7XG4gIH1cblxuICBkaXZbbm90aWZpY2F0aW9uLXR5cGU9J3NuYWNrYmFyJ10ge1xuICAgIG1pbi13aWR0aDogJHtyZW0oMzM2KX07XG4gICAgd2lkdGg6IDEwMCU7XG4gIH1cblxuICBkaXZbbm90aWZpY2F0aW9uLXR5cGU9J2Jhbm5lciddIHtcbiAgICBtaW4td2lkdGg6ICR7cmVtKDQ5MCl9O1xuICB9XG5cbiAgZGl2W25vdGlmaWNhdGlvbi10eXBlPSdiYW5uZXInXSB+IGRpdltub3RpZmljYXRpb24tdHlwZT0ndG9hc3QnXSB7XG4gICAgd2lkdGg6IDEwMCU7XG4gIH1cblxuICBkaXZbbm90aWZpY2F0aW9uLXR5cGU9J2Jhbm5lciddIH4gZGl2W25vdGlmaWNhdGlvbi10eXBlPSdzbmFja2JhciddIHtcbiAgICB3aWR0aDogMTAwJTtcbiAgfVxuYDtcbiJdfQ== */", process.env.NODE_ENV === "production" ? "" : ";label:notificationsContainer;")
|
|
33
33
|
);
|
|
34
34
|
};
|
|
35
35
|
};
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _sizeUtils = require("../../utils/size-utils");
|
|
11
11
|
|
|
12
|
+
var _utils = require("../../theme/utils");
|
|
13
|
+
|
|
12
14
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
13
15
|
|
|
14
16
|
var _commons = require("../TextField/components/commons");
|
|
@@ -35,7 +37,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
35
37
|
} : {
|
|
36
38
|
name: "1mz673n-SearchField",
|
|
37
39
|
styles: "width:100%;label:SearchField;",
|
|
38
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
40
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NlYXJjaEZpZWxkL1NlYXJjaEZpZWxkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpRGUiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvU2VhcmNoRmllbGQvU2VhcmNoRmllbGQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHVzZVRoZW1lIGZyb20gJ2hvb2tzL3VzZVRoZW1lJztcbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBERUZBVUxUX1NJWkUgfSBmcm9tICd1dGlscy9zaXplLXV0aWxzJztcblxuaW1wb3J0IHsgcmVtIH0gZnJvbSAnLi4vLi4vdGhlbWUvdXRpbHMnO1xuaW1wb3J0IHsgVGVzdFByb3BzIH0gZnJvbSAnLi4vLi4vdXRpbHMvdHlwZXMnO1xuaW1wb3J0IEljb24gZnJvbSAnLi4vSWNvbic7XG5pbXBvcnQgeyBJY29uV3JhcHBlciB9IGZyb20gJy4uL1RleHRGaWVsZC9jb21wb25lbnRzL2NvbW1vb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RhdGFUZXN0SWR9XG4gICAgICAgICAgZGlzYWJsZWQ9e2Rpc2FibGVkfVxuICAgICAgICAgIHNpemU9e3NpemV9XG4gICAgICAgICAgc3R5bGVUeXBlPXsnb3V0bGluZWQnfVxuICAgICAgICAgIGxlZnRJY29uPXsnc2VhcmNoJ31cbiAgICAgICAgICByaWdodEljb249eydjbG9zZSd9XG4gICAgICAgICAgc3g9e3sgd3JhcHBlcjogeyBib3JkZXJSYWRpdXM6IHJlbSgxMDApIH0gfX1cbiAgICAgICAgPlxuICAgICAgICAgIDxJY29uV3JhcHBlciBpY29uUG9zaXRpb249eydsZWZ0J30+XG4gICAgICAgICAgICA8SWNvbiBuYW1lPXsnc2VhcmNoJ30gc2l6ZT17MjB9IGNvbG9yPXt0aGVtZS51dGlscy5nZXRDb2xvcignbGlnaHRHcmV5JywgNjUwKX0gLz5cbiAgICAgICAgICA8L0ljb25XcmFwcGVyPlxuXG4gICAgICAgICAgPGRpdiBjc3M9e3sgd2lkdGg6ICcxMDAlJyB9fT5cbiAgICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgICBjc3M9e2lucHV0U3R5bGUoeyBzaXplLCBkYXJrLCBwbGFjZWhvbGRlciB9KX1cbiAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9e3BsYWNlaG9sZGVyfVxuICAgICAgICAgICAgICBkaXNhYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgICAgICAgIHZhbHVlPXt2YWx1ZX1cbiAgICAgICAgICAgICAgcmVmPXtyZWZ9XG4gICAgICAgICAgICAgIHsuLi5yZXN0fVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgIHtzaG91bGRTaG93Q2xlYXIgJiYgIWRpc2FibGVkICYmIChcbiAgICAgICAgICAgIDxJY29uV3JhcHBlclxuICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgb25DbGVhcigpO1xuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBpY29uUG9zaXRpb249eydyaWdodCd9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxJY29uIG5hbWU9eydjbG9zZSd9IHNpemU9ezIwfSBjb2xvcj17dGhlbWUudXRpbHMuZ2V0Q29sb3IoJ2xpZ2h0R3JleScsIDY1MCl9IC8+XG4gICAgICAgICAgICA8L0ljb25XcmFwcGVyPlxuICAgICAgICAgICl9XG4gICAgICAgIDwvVGV4dElucHV0QmFzZT5cbiAgICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gICAgKTtcbiAgfVxuKTtcblxuU2VhcmNoRmllbGQuZGlzcGxheU5hbWUgPSAnU2VhcmNoRmllbGQnO1xuXG5leHBvcnQgZGVmYXVsdCBTZWFyY2hGaWVsZDtcbiJdfQ== */",
|
|
39
41
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
40
42
|
};
|
|
41
43
|
|
|
@@ -60,10 +62,14 @@ var SearchField = /*#__PURE__*/_react["default"].forwardRef(function (props, ref
|
|
|
60
62
|
dataTestId: dataTestId,
|
|
61
63
|
disabled: disabled,
|
|
62
64
|
size: size,
|
|
63
|
-
isSearch: true,
|
|
64
65
|
styleType: 'outlined',
|
|
65
66
|
leftIcon: 'search',
|
|
66
|
-
rightIcon: 'close'
|
|
67
|
+
rightIcon: 'close',
|
|
68
|
+
sx: {
|
|
69
|
+
wrapper: {
|
|
70
|
+
borderRadius: (0, _utils.rem)(100)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
67
73
|
}, (0, _react2.jsx)(_commons.IconWrapper, {
|
|
68
74
|
iconPosition: 'left'
|
|
69
75
|
}, (0, _react2.jsx)(_Icon["default"], {
|