@orfium/ictinus 4.33.0 → 4.34.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.
Files changed (46) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +2 -20
  2. package/dist/components/Avatar/Avatar.js +9 -17
  3. package/dist/components/Avatar/Avatar.types.d.ts +20 -0
  4. package/dist/components/Avatar/Avatar.types.js +3 -0
  5. package/dist/components/Avatar/AvatarStack/AvatarStack.d.ts +3 -13
  6. package/dist/components/Avatar/AvatarStack/AvatarStack.js +11 -5
  7. package/dist/components/Avatar/AvatarStack/AvatarStack.types.d.ts +9 -0
  8. package/dist/components/Avatar/AvatarStack/AvatarStack.types.js +3 -0
  9. package/dist/components/Avatar/AvatarStack/utils.d.ts +6 -0
  10. package/dist/components/Avatar/AvatarStack/utils.js +16 -0
  11. package/dist/components/Avatar/utils.d.ts +2 -0
  12. package/dist/components/Avatar/utils.js +22 -0
  13. package/dist/components/Button/utils.d.ts +1 -1
  14. package/dist/components/ButtonBase/utils.d.ts +1 -1
  15. package/dist/components/Chip/Chip.d.ts +1 -34
  16. package/dist/components/Chip/Chip.js +27 -22
  17. package/dist/components/Chip/Chip.style.d.ts +2 -2
  18. package/dist/components/Chip/Chip.style.js +2 -2
  19. package/dist/components/Chip/Chip.types.d.ts +34 -0
  20. package/dist/components/Chip/Chip.types.js +10 -0
  21. package/dist/components/Chip/components/Badge/Badge.d.ts +3 -2
  22. package/dist/components/Chip/components/Badge/Badge.style.d.ts +2 -2
  23. package/dist/components/Chip/components/Badge/Badge.style.js +1 -1
  24. package/dist/components/Chip/utils.d.ts +11 -0
  25. package/dist/components/Chip/utils.js +34 -0
  26. package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +3 -50
  27. package/dist/components/ExpandCollapse/ExpandCollapse.js +19 -59
  28. package/dist/components/ExpandCollapse/ExpandCollapse.types.d.ts +64 -0
  29. package/dist/components/ExpandCollapse/ExpandCollapse.types.js +3 -0
  30. package/dist/components/ExpandCollapse/useManageContentRef.d.ts +2 -0
  31. package/dist/components/ExpandCollapse/useManageContentRef.js +56 -0
  32. package/dist/components/ExpandCollapse/utils.d.ts +6 -0
  33. package/dist/components/ExpandCollapse/utils.js +23 -0
  34. package/dist/components/Filter/Filter.js +3 -9
  35. package/dist/components/Filter/utils.d.ts +10 -1
  36. package/dist/components/Filter/utils.js +17 -2
  37. package/dist/theme/palette.js +5 -5
  38. package/dist/theme/utils.d.ts +5 -0
  39. package/dist/theme/utils.js +11 -2
  40. package/dist/utils/errors.d.ts +6 -0
  41. package/dist/utils/errors.js +50 -0
  42. package/dist/utils/helpers.d.ts +8 -0
  43. package/dist/utils/helpers.js +24 -2
  44. package/dist/utils/themeFunctions.d.ts +10 -0
  45. package/dist/utils/themeFunctions.js +40 -16
  46. package/package.json +1 -1
@@ -1,24 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DivProps } from '../../utils/common';
3
- import { AcceptedIconNames } from '../Icon/types';
4
- export declare type Props = {
5
- /** the src of the image to show **/
6
- src?: string;
7
- /** The icon name to pick from our library of icons
8
- * @default 'user'
9
- * */
10
- iconName?: AcceptedIconNames;
11
- /** The size of the avatar
12
- * @default 'md'
13
- * */
14
- size?: AvatarSizes;
15
- /** the color of the button based on our colors eg. red-500
16
- * @default 'darkGrey-500'
17
- * */
18
- color?: string;
19
- /** The class name of the avatar component if its styled **/
20
- className?: string;
21
- };
22
- export declare type AvatarSizes = 'xs' | 'sm' | 'md' | 'lg';
3
+ import { Props, AvatarSizes } from './Avatar.types';
23
4
  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>>;
24
5
  export default Avatar;
6
+ export { Props, AvatarSizes };
@@ -13,25 +13,16 @@ var _Icon = _interopRequireDefault(require("../Icon"));
13
13
 
14
14
  var _Avatar = require("./Avatar.style");
15
15
 
16
- var _react2 = require("@emotion/react");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
+ var _Avatar2 = require("./Avatar.types");
19
17
 
20
- var iconSizeBasedOnAvatar = function iconSizeBasedOnAvatar(size) {
21
- switch (size) {
22
- case 'md':
23
- return 16;
18
+ exports.Props = _Avatar2.Props;
19
+ exports.AvatarSizes = _Avatar2.AvatarSizes;
24
20
 
25
- case 'sm':
26
- return 12;
21
+ var _utils = require("./utils");
27
22
 
28
- case 'xs':
29
- return 10;
23
+ var _react2 = require("@emotion/react");
30
24
 
31
- default:
32
- return 28;
33
- }
34
- };
25
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
26
 
36
27
  var Avatar = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
37
28
  var _ref$src = _ref.src,
@@ -59,10 +50,11 @@ var Avatar = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
59
50
  }), !src && !children && iconName && (0, _react2.jsx)(_Icon["default"], {
60
51
  color: theme.utils.getAAColorFromSwatches(calculatedColor.color, calculatedColor.shade),
61
52
  name: iconName,
62
- size: iconSizeBasedOnAvatar(size)
53
+ size: (0, _utils.iconSizeBasedOnAvatar)(size)
63
54
  }), !src && children);
64
55
  });
65
56
 
66
57
  Avatar.displayName = 'Avatar';
67
- var _default = Avatar;
58
+ var _default = Avatar; //TODO: Remove on v5 and change import where necessary
59
+
68
60
  exports["default"] = _default;
@@ -0,0 +1,20 @@
1
+ import { AcceptedIconNames } from '../Icon/types';
2
+ export declare type Props = {
3
+ /** the src of the image to show **/
4
+ src?: string;
5
+ /** The icon name to pick from our library of icons
6
+ * @default 'user'
7
+ * */
8
+ iconName?: AcceptedIconNames;
9
+ /** The size of the avatar
10
+ * @default 'md'
11
+ * */
12
+ size?: AvatarSizes;
13
+ /** the color of the button based on our colors eg. red-500
14
+ * @default 'darkGrey-500'
15
+ * */
16
+ color?: string;
17
+ /** The class name of the avatar component if its styled **/
18
+ className?: string;
19
+ };
20
+ export declare type AvatarSizes = 'xs' | 'sm' | 'md' | 'lg';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
@@ -1,17 +1,7 @@
1
1
  import React from 'react';
2
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
- };
3
+ import { TestProps } from 'utils/types';
4
+ import { Props } from './AvatarStack.types';
16
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" | "dataTestId" | keyof Props> & React.RefAttributes<HTMLDivElement>>;
17
6
  export default AvatarStack;
7
+ export { Props };
@@ -11,6 +11,12 @@ var _Avatar = _interopRequireDefault(require("../Avatar"));
11
11
 
12
12
  var _AvatarStack = require("./AvatarStack.style");
13
13
 
14
+ var _AvatarStack2 = require("./AvatarStack.types");
15
+
16
+ exports.Props = _AvatarStack2.Props;
17
+
18
+ var _utils = require("./utils");
19
+
14
20
  var _react2 = require("@emotion/react");
15
21
 
16
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -29,10 +35,9 @@ var AvatarStack = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref)
29
35
  _ref$dataTestId = _ref.dataTestId,
30
36
  dataTestId = _ref$dataTestId === void 0 ? '' : _ref$dataTestId,
31
37
  childrenProp = _ref.children;
32
-
33
- if (maxAvatars < 1) {
34
- throw new Error('maxAvatars prop must be greater than 0');
35
- }
38
+ (0, _helpers.errorHandler)(_utils.errors, {
39
+ maxAvatars: maxAvatars
40
+ });
36
41
 
37
42
  var children = _react["default"].Children.toArray(childrenProp);
38
43
 
@@ -66,5 +71,6 @@ var AvatarStack = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref)
66
71
  });
67
72
 
68
73
  AvatarStack.displayName = 'AvatarStack';
69
- var _default = AvatarStack;
74
+ var _default = AvatarStack; //TODO: Remove on v5 and change import where necessary
75
+
70
76
  exports["default"] = _default;
@@ -0,0 +1,9 @@
1
+ import { AvatarSizes } from '../Avatar';
2
+ export declare type Props = {
3
+ /** the maximum number of avatars to be displayed **/
4
+ maxAvatars?: number;
5
+ /** The size of the extra avatar, if any **/
6
+ size?: AvatarSizes;
7
+ /** the color of the extra avatar based on our colors eg. red-500 **/
8
+ color?: string;
9
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
@@ -0,0 +1,6 @@
1
+ import { PropsValidationError } from '../../../utils/errors';
2
+ import { Props } from './AvatarStack.types';
3
+ export declare const errors: {
4
+ condition: ({ maxAvatars }: Props) => boolean;
5
+ error: PropsValidationError;
6
+ }[];
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.errors = void 0;
5
+
6
+ var _errors = require("../../../utils/errors");
7
+
8
+ var errors = [{
9
+ condition: function condition(_ref) {
10
+ var _ref$maxAvatars = _ref.maxAvatars,
11
+ maxAvatars = _ref$maxAvatars === void 0 ? 4 : _ref$maxAvatars;
12
+ return Boolean(maxAvatars < 1);
13
+ },
14
+ error: new _errors.PropsValidationError('maxAvatars prop must be greater than 0')
15
+ }];
16
+ exports.errors = errors;
@@ -0,0 +1,2 @@
1
+ import { AvatarSizes } from './Avatar.types';
2
+ export declare const iconSizeBasedOnAvatar: (size: AvatarSizes) => 16 | 10 | 12 | 28;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.iconSizeBasedOnAvatar = void 0;
5
+
6
+ var iconSizeBasedOnAvatar = function iconSizeBasedOnAvatar(size) {
7
+ switch (size) {
8
+ case 'md':
9
+ return 16;
10
+
11
+ case 'sm':
12
+ return 12;
13
+
14
+ case 'xs':
15
+ return 10;
16
+
17
+ default:
18
+ return 28;
19
+ }
20
+ };
21
+
22
+ exports.iconSizeBasedOnAvatar = iconSizeBasedOnAvatar;
@@ -5,7 +5,7 @@ import { ColorShapeFromComponent } from '../../utils/themeFunctions';
5
5
  * if color it retrieves the color directly from the palette
6
6
  * if type it gets the specific type color from the palette
7
7
  */
8
- export declare const defineBackgroundColor: (theme: Theme, color: ColorShapeFromComponent | undefined, type?: "primary" | "secondary" | "success" | "error" | "warning" | "info" | "light" | "link" | undefined, iconExists?: boolean | undefined, childrenExists?: boolean | undefined) => string;
8
+ export declare const defineBackgroundColor: (theme: Theme, color: ColorShapeFromComponent | undefined, type?: "primary" | "secondary" | "light" | "success" | "error" | "warning" | "info" | "link" | undefined, iconExists?: boolean | undefined, childrenExists?: boolean | undefined) => string;
9
9
  /**
10
10
  * return the correct color to show based on the state that is passed
11
11
  * The state must be 'hover' or 'active' for now
@@ -6,7 +6,7 @@ import { Props } from './ButtonBase';
6
6
  * if color it retrieves the color directly from the palette
7
7
  * if type it gets the specific type color from the palette
8
8
  */
9
- export declare const defineBackgroundColor: (theme: Theme, color: ColorShapeFromComponent | undefined, type?: "primary" | "secondary" | "success" | "error" | "warning" | "info" | "light" | "link" | undefined, childrenExists?: boolean | undefined) => string;
9
+ export declare const defineBackgroundColor: (theme: Theme, color: ColorShapeFromComponent | undefined, type?: "primary" | "secondary" | "light" | "success" | "error" | "warning" | "info" | "link" | undefined, childrenExists?: boolean | undefined) => string;
10
10
  /**
11
11
  * This function defines what color to show based on type or color passed
12
12
  * if type is link uses the link color
@@ -1,36 +1,3 @@
1
- import { ClickEvent } from 'hooks/useLoading';
2
1
  import React from 'react';
3
- import { flatColors } from 'theme/palette';
4
- import { TestId } from 'utils/types';
5
- import { DivProps } from '../../utils/common';
6
- export declare type Props = {
7
- /**
8
- * Determines whether the chip should be read-only or interactive.
9
- * @default read-only
10
- */
11
- styleType?: 'read-only' | 'interactive';
12
- /** Defines the fill color of the component, if filled. */
13
- fill?: typeof flatColors[number];
14
- /** An optional thumbnail to show to the left. */
15
- thumbnail?: {
16
- src?: string;
17
- name?: string;
18
- };
19
- /** Boolean defining if the chip is selected. */
20
- isSelected?: boolean;
21
- /** Boolean defining if the check icon is shown. */
22
- isChecked?: boolean;
23
- /** Defines the number value of the badge */
24
- badgeNumber?: number;
25
- /** Callback function for onClick. */
26
- onClick?: (event: ClickEvent) => void;
27
- /** A callback that is being triggered when type is interactive and you press the X icon. */
28
- onClear?: () => void;
29
- /** Boolean defining if the chip is disabled. Interactive only. */
30
- disabled?: boolean;
31
- };
32
- declare type TestProps = {
33
- dataTestId?: TestId;
34
- };
35
- declare const Chip: React.ForwardRefExoticComponent<Pick<Props & TestProps & DivProps, "children" | "onChange" | "color" | "onBlur" | "type" | "autoFocus" | "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<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>>;
36
3
  export default Chip;
@@ -13,38 +13,44 @@ var _Chip = require("./Chip.style");
13
13
 
14
14
  var _Badge = _interopRequireDefault(require("./components/Badge"));
15
15
 
16
+ var _utils = require("./utils");
17
+
16
18
  var _Avatar = _interopRequireDefault(require("../Avatar"));
17
19
 
18
20
  var _Icon = _interopRequireDefault(require("../Icon"));
19
21
 
20
22
  var _react2 = require("@emotion/react");
21
23
 
24
+ var _excluded = ["styleType", "disabled", "dataTestId"];
25
+
22
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
27
 
28
+ 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
+
24
30
  var Chip = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
25
31
  var _ref$styleType = _ref.styleType,
26
- styleType = _ref$styleType === void 0 ? 'read-only' : _ref$styleType,
27
- fill = _ref.fill,
28
- thumbnail = _ref.thumbnail,
29
- isSelected = _ref.isSelected,
30
- isChecked = _ref.isChecked,
32
+ styleType = _ref$styleType === void 0 ? _utils.defaultProps.styleType : _ref$styleType,
31
33
  _ref$disabled = _ref.disabled,
32
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
33
- badgeNumber = _ref.badgeNumber,
34
- onClick = _ref.onClick,
35
- onClear = _ref.onClear,
34
+ disabled = _ref$disabled === void 0 ? _utils.defaultProps.disabled : _ref$disabled,
36
35
  _ref$dataTestId = _ref.dataTestId,
37
- dataTestId = _ref$dataTestId === void 0 ? '' : _ref$dataTestId,
38
- children = _ref.children;
39
-
40
- if (styleType === 'read-only' && (isSelected || isChecked || badgeNumber || disabled)) {
41
- throw new Error('The properties isSelected, isChecked, badgeNumber and disabled are only for Interactive style type Chips.');
42
- }
43
-
44
- if (styleType === 'interactive' && thumbnail) {
45
- throw new Error('The property thumbnail is only for Read-Only style type Chips.');
46
- }
47
-
36
+ dataTestId = _ref$dataTestId === void 0 ? _utils.defaultProps.dataTestId : _ref$dataTestId,
37
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
38
+
39
+ var onClick = rest.onClick,
40
+ isChecked = rest.isChecked,
41
+ thumbnail = rest.thumbnail,
42
+ fill = rest.fill,
43
+ isSelected = rest.isSelected,
44
+ onClear = rest.onClear,
45
+ children = rest.children,
46
+ badgeNumber = rest.badgeNumber;
47
+ (0, _helpers.errorHandler)(_utils.errors, {
48
+ styleType: styleType,
49
+ isSelected: isSelected,
50
+ isChecked: isChecked,
51
+ badgeNumber: badgeNumber,
52
+ disabled: disabled
53
+ });
48
54
  return (0, _react2.jsx)("button", {
49
55
  ref: ref,
50
56
  "data-testid": (0, _helpers.generateTestDataId)('chip', dataTestId),
@@ -55,8 +61,7 @@ var Chip = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
55
61
  fill: fill,
56
62
  isSelected: isSelected,
57
63
  onClear: onClear,
58
- onClick: onClick,
59
- disabled: disabled
64
+ onClick: onClick
60
65
  })
61
66
  }, isChecked && (0, _react2.jsx)(_Icon["default"], {
62
67
  size: 14,
@@ -1,5 +1,5 @@
1
1
  import { SerializedStyles } from '@emotion/react';
2
2
  import { Theme } from '../../theme';
3
- import { Props } from './Chip';
4
- export declare const chipStyle: ({ styleType, fill, isSelected, onClear, onClick, }: Props) => (theme: Theme) => SerializedStyles;
3
+ import { Props } from './Chip.types';
4
+ export declare const chipStyle: ({ styleType, fill, isSelected, onClear, onClick, }: Pick<Props, 'styleType' | 'fill' | 'isSelected' | 'onClear' | 'onClick'>) => (theme: Theme) => SerializedStyles;
5
5
  export declare const closeIconWrapperStyle: (disabled?: boolean | undefined) => () => SerializedStyles;
@@ -38,7 +38,7 @@ var chipStyle = function chipStyle(_ref) {
38
38
  theme: theme,
39
39
  color: fill,
40
40
  shade: 50
41
- }).backgroundColor + ";\n }\n\n \n :disabled {\n opacity: " + (0, _states.getDisabled)().opacity + ";\n cursor: " + (0, _states.getDisabled)().cursor + ";\n }\n ", ">:not(:last-child){margin-right:", theme.spacing.xsm, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:chipStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NoaXAvQ2hpcC5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQlkiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQ2hpcC9DaGlwLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZmxleENlbnRlclZlcnRpY2FsIH0gZnJvbSAndGhlbWUvZnVuY3Rpb25zJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3RoZW1lL3V0aWxzJztcblxuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICcuLi8uLi90aGVtZSc7XG5pbXBvcnQgeyBnZXREaXNhYmxlZCwgZ2V0Rm9jdXMsIGdldEhvdmVyLCBnZXRQcmVzc2VkIH0gZnJvbSAnLi4vLi4vdGhlbWUvc3RhdGVzJztcbmltcG9ydCB7IFByb3BzIH0gZnJvbSAnLi9DaGlwJztcblxuZXhwb3J0IGNvbnN0IGNoaXBT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9O1xuICAgICAgICBjdXJzb3I6ICR7Z2V0RGlzYWJsZWQoKS5jdXJzb3J9O1xuICAgICAgfVxuICAgIGB9XG5cbiAgICA+IDpub3QoOmxhc3QtY2hpbGQpIHtcbiAgICAgIG1hcmdpbi1yaWdodDogJHt0aGVtZS5zcGFjaW5nLnhzbX07XG4gICAgfVxuICBgO1xufTtcblxuZXhwb3J0IGNvbnN0IGNsb3NlSWNvbldyYXBwZXJTdHlsZSA9IChkaXNhYmxlZD86IGJvb2xlYW4pID0+ICgpOiBTZXJpYWxpemVkU3R5bGVzID0+IGNzc2BcbiAgY3Vyc29yOiAke2Rpc2FibGVkID8gZ2V0RGlzYWJsZWQoKS5jdXJzb3IgOiAncG9pbnRlcid9O1xuYDtcbiJdfQ== */", process.env.NODE_ENV === "production" ? "" : ";label:chipStyle;")
41
+ }).backgroundColor + ";\n }\n\n \n :disabled {\n opacity: " + (0, _states.getDisabled)().opacity + ";\n cursor: " + (0, _states.getDisabled)().cursor + ";\n }\n ", ">:not(:last-child){margin-right:", theme.spacing.xsm, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:chipStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NoaXAvQ2hpcC5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQlkiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQ2hpcC9DaGlwLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZmxleENlbnRlclZlcnRpY2FsIH0gZnJvbSAndGhlbWUvZnVuY3Rpb25zJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ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Y3RpdmUgJiZcbiAgICAgIGBcbiAgICAmOmFjdGl2ZTpub3QoOmRpc2FibGVkKSB7XG4gICAgICBiYWNrZ3JvdW5kOiAke1xuICAgICAgICBnZXRQcmVzc2VkKHtcbiAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICBjb2xvcjogZmlsbCxcbiAgICAgICAgICBzaGFkZTogNTAsXG4gICAgICAgIH0pLmJhY2tncm91bmRDb2xvclxuICAgICAgfTtcbiAgICB9XG5cbiAgICBcbiAgICAgIDpkaXNhYmxlZCB7XG4gICAgICAgIG9wYWNpdHk6ICR7Z2V0RGlzYWJsZWQoKS5vcGFjaXR5fTtcbiAgICAgICAgY3Vyc29yOiAke2dldERpc2FibGVkKCkuY3Vyc29yfTtcbiAgICAgIH1cbiAgICBgfVxuXG4gICAgPiA6bm90KDpsYXN0LWNoaWxkKSB7XG4gICAgICBtYXJnaW4tcmlnaHQ6ICR7dGhlbWUuc3BhY2luZy54c219O1xuICAgIH1cbiAgYDtcbn07XG5cbmV4cG9ydCBjb25zdCBjbG9zZUljb25XcmFwcGVyU3R5bGUgPSAoZGlzYWJsZWQ/OiBib29sZWFuKSA9PiAoKTogU2VyaWFsaXplZFN0eWxlcyA9PiBjc3NgXG4gIGN1cnNvcjogJHtkaXNhYmxlZCA/IGdldERpc2FibGVkKCkuY3Vyc29yIDogJ3BvaW50ZXInfTtcbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:chipStyle;")
42
42
  );
43
43
  };
44
44
  };
@@ -51,7 +51,7 @@ var closeIconWrapperStyle = function closeIconWrapperStyle(disabled) {
51
51
  /*#__PURE__*/
52
52
 
53
53
  /*#__PURE__*/
54
- (0, _react.css)("cursor:", disabled ? (0, _states.getDisabled)().cursor : 'pointer', ";" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIconWrapperStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2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gICAgIDogZ2V0SG92ZXIoeyB0aGVtZSB9KS5iYWNrZ3JvdW5kQ29sb3J9O1xuICAgIH1cblxuICAgICY6Zm9jdXMtdmlzaWJsZTpub3QoOmRpc2FibGVkKSB7XG4gICAgICBvdXRsaW5lOiAkeyFpc0ludGVyYWN0aXZlID8gJ25vbmUnIDogZ2V0Rm9jdXMoeyB0aGVtZSwgYm9yZGVyV2lkdGg6IDEgfSkuc3R5bGVPdXRsaW5lfTtcbiAgICB9XG5cbiAgICAke2lzSW50ZXJhY3RpdmUgJiZcbiAgICAgIGBcbiAgICAmOmFjdGl2ZTpub3QoOmRpc2FibGVkKSB7XG4gICAgICBiYWNrZ3JvdW5kOiAke1xuICAgICAgICBnZXRQcmVzc2VkKHtcbiAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICBjb2xvcjogZmlsbCxcbiAgICAgICAgICBzaGFkZTogNTAsXG4gICAgICAgIH0pLmJhY2tncm91bmRDb2xvclxuICAgICAgfTtcbiAgICB9XG5cbiAgICBcbiAgICAgIDpkaXNhYmxlZCB7XG4gICAgICAgIG9wYWNpdHk6ICR7Z2V0RGlzYWJsZWQoKS5vcGFjaXR5fTtcbiAgICAgICAgY3Vyc29yOiAke2dldERpc2FibGVkKCkuY3Vyc29yfTtcbiAgICAgIH1cbiAgICBgfVxuXG4gICAgPiA6bm90KDpsYXN0LWNoaWxkKSB7XG4gICAgICBtYXJnaW4tcmlnaHQ6ICR7dGhlbWUuc3BhY2luZy54c219O1xuICAgIH1cbiAgYDtcbn07XG5cbmV4cG9ydCBjb25zdCBjbG9zZUljb25XcmFwcGVyU3R5bGUgPSAoZGlzYWJsZWQ/OiBib29sZWFuKSA9PiAoKTogU2VyaWFsaXplZFN0eWxlcyA9PiBjc3NgXG4gIGN1cnNvcjogJHtkaXNhYmxlZCA/IGdldERpc2FibGVkKCkuY3Vyc29yIDogJ3BvaW50ZXInfTtcbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:closeIconWrapperStyle;")
54
+ (0, _react.css)("cursor:", disabled ? (0, _states.getDisabled)().cursor : 'pointer', ";" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIconWrapperStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NoaXAvQ2hpcC5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RXdGIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NoaXAvQ2hpcC5zdHlsZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcywgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IGZsZXhDZW50ZXJWZXJ0aWNhbCB9IGZyb20gJ3RoZW1lL2Z1bmN0aW9ucyc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICd0aGVtZS91dGlscyc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vdGhlbWUnO1xuaW1wb3J0IHsgZ2V0RGlzYWJsZWQsIGdldEZvY3VzLCBnZXRIb3ZlciwgZ2V0UHJlc3NlZCB9IGZyb20gJy4uLy4uL3RoZW1lL3N0YXRlcyc7XG5pbXBvcnQgeyBQcm9wcyB9IGZyb20gJy4vQ2hpcC50eXBlcyc7XG5cbmV4cG9ydCBjb25zdCBjaGlwU3R5bGUgPSAoe1xuICBzdHlsZVR5cGUsXG4gIGZpbGwgPSAnZ3JleVNjYWxlJyxcbiAgaXNTZWxlY3RlZCxcbiAgb25DbGVhcixcbiAgb25DbGljayxcbn06IFBpY2s8UHJvcHMsICdzdHlsZVR5cGUnIHwgJ2ZpbGwnIHwgJ2lzU2VsZWN0ZWQnIHwgJ29uQ2xlYXInIHwgJ29uQ2xpY2snPikgPT4gKFxuICB0aGVtZ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B9XG4gIGA7XG59O1xuXG5leHBvcnQgY29uc3QgY2xvc2VJY29uV3JhcHBlclN0eWxlID0gKGRpc2FibGVkPzogYm9vbGVhbikgPT4gKCk6IFNlcmlhbGl6ZWRTdHlsZXMgPT4gY3NzYFxuICBjdXJzb3I6ICR7ZGlzYWJsZWQgPyBnZXREaXNhYmxlZCgpLmN1cnNvciA6ICdwb2ludGVyJ307XG5gO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:closeIconWrapperStyle;")
55
55
  );
56
56
  };
57
57
  };
@@ -0,0 +1,34 @@
1
+ import { ClickEvent } from '../../hooks/useLoading';
2
+ import { flatColors } from '../../theme/palette';
3
+ import { ButtonProps } from '../../utils/common';
4
+ import { TestProps } from '../../utils/types';
5
+ export declare const READ_ONLY: "read-only";
6
+ export declare const INTERACTIVE: "interactive";
7
+ export declare const styleType: readonly ["read-only", "interactive"];
8
+ export declare type Props = {
9
+ /**
10
+ * Determines whether the chip should be read-only or interactive.
11
+ * @default read-only
12
+ */
13
+ styleType?: typeof styleType[number];
14
+ /** Defines the fill color of the component, if filled. */
15
+ fill?: typeof flatColors[number];
16
+ /** An optional thumbnail to show to the left. */
17
+ thumbnail?: {
18
+ src?: string;
19
+ name?: string;
20
+ };
21
+ /** Boolean defining if the chip is selected. */
22
+ isSelected?: boolean;
23
+ /** Boolean defining if the check icon is shown. */
24
+ isChecked?: boolean;
25
+ /** Defines the number value of the badge */
26
+ badgeNumber?: number;
27
+ /** Callback function for onClick. */
28
+ onClick?: (event: ClickEvent) => void;
29
+ /** A callback that is being triggered when type is interactive and you press the X icon. */
30
+ onClear?: () => void;
31
+ /** Boolean defining if the chip is disabled. Interactive only. */
32
+ disabled?: boolean;
33
+ };
34
+ export declare type ChipProps = Props & TestProps & ButtonProps;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.styleType = exports.INTERACTIVE = exports.READ_ONLY = void 0;
5
+ var READ_ONLY = 'read-only';
6
+ exports.READ_ONLY = READ_ONLY;
7
+ var INTERACTIVE = 'interactive';
8
+ exports.INTERACTIVE = INTERACTIVE;
9
+ var styleType = [READ_ONLY, INTERACTIVE];
10
+ exports.styleType = styleType;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { TestId } from 'utils/types';
3
- import { Props } from '../../Chip';
3
+ import { Props } from '../../Chip.types';
4
4
  declare type TestProps = {
5
5
  dataTestId?: TestId;
6
6
  };
7
- declare const Badge: React.FC<Props & TestProps>;
7
+ export declare type BadgeProps = Pick<Props, 'fill' | 'isSelected' | 'badgeNumber'> & TestProps;
8
+ declare const Badge: React.FC<BadgeProps>;
8
9
  export default Badge;
@@ -1,4 +1,4 @@
1
1
  import { SerializedStyles } from '@emotion/react';
2
2
  import { Theme } from 'theme';
3
- import { Props } from '../../Chip';
4
- export declare const badgeStyle: ({ fill, isSelected }: Props) => (theme: Theme) => SerializedStyles;
3
+ import { BadgeProps } from './Badge';
4
+ export declare const badgeStyle: ({ fill, isSelected }: BadgeProps) => (theme: Theme) => SerializedStyles;
@@ -16,7 +16,7 @@ var badgeStyle = function badgeStyle(_ref) {
16
16
  /*#__PURE__*/
17
17
 
18
18
  /*#__PURE__*/
19
- (0, _react.css)(_functions.flex, ";width:", theme.spacing.md, ";height:", theme.spacing.md, ";border-radius:100%;background:", isSelected ? theme.utils.getColor(fill, 550) : theme.utils.getColor('lightGrey', 200), ";font-size:", theme.typography.fontSizes['10'], ";font-weight:", theme.typography.weights.medium, ";align-items:center;flex-shrink:0;line-height:normal;justify-content:center;color:", isSelected ? theme.utils.getAAColorFromSwatches(fill, 550) : theme.utils.getAAColorFromSwatches('lightGrey', 200), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:badgeStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0Noa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MDtcbiAgbGluZS1oZWlnaHQ6IG5vcm1hbDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGNvbG9yOiAke2lzU2VsZWN0ZWRcbiAgICA/IHRoZW1lLnV0aWxzLmdldEFBQ29sb3JGcm9tU3dhdGNoZXMoZmlsbCwgNTUwKVxuICAgIDogdGhlbWUudXRpbHMuZ2V0QUFDb2xvckZyb21Td2F0Y2hlcygnbGlnaHRHcmV5JywgMjAwKX07XG5gO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:badgeStyle;")
19
+ (0, _react.css)(_functions.flex, ";width:", theme.spacing.md, ";height:", theme.spacing.md, ";border-radius:100%;background:", isSelected ? theme.utils.getColor(fill, 550) : theme.utils.getColor('lightGrey', 200), ";font-size:", theme.typography.fontSizes['10'], ";font-weight:", theme.typography.weights.medium, ";align-items:center;flex-shrink:0;line-height:normal;justify-content:center;color:", isSelected ? theme.utils.getAAColorFromSwatches(fill, 550) : theme.utils.getAAColorFromSwatches('lightGrey', 200), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:badgeStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NoaXAvY29tcG9uZW50cy9CYWRnZS9CYWRnZS5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRMEIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQ2hpcC9jb21wb25lbnRzL0JhZGdlL0JhZGdlLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICd0aGVtZSc7XG5pbXBvcnQg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-0,0 +1,11 @@
1
+ import { PropsValidationError } from '../../utils/errors';
2
+ import { Props } from './Chip.types';
3
+ export declare const defaultProps: {
4
+ disabled: boolean;
5
+ styleType: "read-only" | "interactive";
6
+ dataTestId: string;
7
+ };
8
+ export declare const errors: {
9
+ condition: ({ styleType, isSelected, isChecked, badgeNumber, disabled }: Props) => boolean;
10
+ error: PropsValidationError;
11
+ }[];
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.errors = exports.defaultProps = void 0;
5
+
6
+ var _errors = require("../../utils/errors");
7
+
8
+ var _Chip = require("./Chip.types");
9
+
10
+ var defaultProps = {
11
+ disabled: false,
12
+ styleType: _Chip.READ_ONLY,
13
+ dataTestId: ''
14
+ };
15
+ exports.defaultProps = defaultProps;
16
+ var errors = [{
17
+ condition: function condition(_ref) {
18
+ var styleType = _ref.styleType,
19
+ isSelected = _ref.isSelected,
20
+ isChecked = _ref.isChecked,
21
+ badgeNumber = _ref.badgeNumber,
22
+ disabled = _ref.disabled;
23
+ return Boolean(styleType === _Chip.READ_ONLY && (isSelected || isChecked || badgeNumber || disabled));
24
+ },
25
+ error: new _errors.PropsValidationError('The properties isSelected, isChecked, badgeNumber and disabled are only for Interactive style type Chips.')
26
+ }, {
27
+ condition: function condition(_ref2) {
28
+ var styleType = _ref2.styleType,
29
+ thumbnail = _ref2.thumbnail;
30
+ return Boolean(styleType === _Chip.INTERACTIVE && thumbnail);
31
+ },
32
+ error: new _errors.PropsValidationError('The property thumbnail is only for Read-Only style type Chips.')
33
+ }];
34
+ exports.errors = errors;