@mailstep/design-system 0.7.40-beta.0 → 0.7.40-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.7.40-beta.0",
3
+ "version": "0.7.40-beta.2",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -9,7 +9,7 @@ export declare const ItemLabel: import("styled-components").StyledComponent<"div
9
9
  $isCompact?: boolean | undefined;
10
10
  isSubitem?: boolean | undefined;
11
11
  }, never>;
12
- export declare const ItemDropdownArrow: import("styled-components").StyledComponent<import("react").FC<import("../..").IconProps>, import("@xstyled/system").Theme, {
12
+ export declare const ItemDropdownArrow: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../..").IconProps) => JSX.Element, import("@xstyled/system").Theme, {
13
13
  $lightMode?: boolean | undefined;
14
14
  }, never>;
15
15
  export declare const TooltipItemLabel: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
@@ -3,7 +3,7 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
3
3
  export declare const LoadingIconWrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
4
4
  $addMarginRight: boolean;
5
5
  }, never>;
6
- export declare const StyledIcon: import("styled-components").StyledComponent<import("react").FC<import("../Icon").IconProps>, import("@xstyled/system").Theme, {
6
+ export declare const StyledIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../Icon").IconProps) => JSX.Element, import("@xstyled/system").Theme, {
7
7
  $addMarginRight?: boolean | undefined;
8
8
  $addMarginLeft?: boolean | undefined;
9
9
  }, never>;
@@ -1,9 +1,8 @@
1
- import type { FC } from 'react';
2
- import type { IconDefinition } from '@fortawesome/fontawesome-common-types';
3
- import type { FlipProp } from '@fortawesome/fontawesome-svg-core';
4
- import type { IconProps } from './types';
1
+ import { IconDefinition } from '@fortawesome/fontawesome-common-types';
2
+ import { FlipProp } from '@fortawesome/fontawesome-svg-core';
3
+ import { IconProps } from './types';
5
4
  export declare const iconDictionary: {
6
5
  [name: string]: IconDefinition | [IconDefinition, FlipProp];
7
6
  };
8
- declare const Icon: FC<IconProps>;
7
+ declare const Icon: ({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: IconProps) => JSX.Element;
9
8
  export default Icon;
@@ -20,7 +20,6 @@ import { faBell } from '@fortawesome/pro-regular-svg-icons/faBell';
20
20
  import { faBox as faBoxRegular } from '@fortawesome/pro-regular-svg-icons/faBox';
21
21
  import { faCalendar } from '@fortawesome/pro-regular-svg-icons/faCalendar';
22
22
  import { faCalendarPlus } from '@fortawesome/pro-regular-svg-icons/faCalendarPlus';
23
- import { faCartFlatbedBoxes } from '@fortawesome/pro-regular-svg-icons/faCartFlatbedBoxes';
24
23
  import { faChevronDown } from '@fortawesome/pro-regular-svg-icons/faChevronDown';
25
24
  import { faChevronRight as farChevronRight } from '@fortawesome/pro-regular-svg-icons/faChevronRight';
26
25
  import { faChevronUp } from '@fortawesome/pro-regular-svg-icons/faChevronUp';
@@ -49,6 +48,7 @@ import { faPenToSquare } from '@fortawesome/pro-regular-svg-icons/faPenToSquare'
49
48
  import { faShareSquare } from '@fortawesome/pro-regular-svg-icons/faShareSquare';
50
49
  import { faSquareMinus } from '@fortawesome/pro-regular-svg-icons/faSquareMinus';
51
50
  import { faTrashCan } from '@fortawesome/pro-regular-svg-icons/faTrashCan';
51
+ import { faCartFlatbedBoxes } from '@fortawesome/pro-regular-svg-icons/faCartFlatbedBoxes';
52
52
  import { faTriangleExclamation as farTriangleExclamation } from '@fortawesome/pro-regular-svg-icons/faTriangleExclamation';
53
53
  import { faAngleLeft } from '@fortawesome/pro-solid-svg-icons/faAngleLeft';
54
54
  import { faAngleRight } from '@fortawesome/pro-solid-svg-icons/faAngleRight';
@@ -58,12 +58,12 @@ import { faArrowLeft } from '@fortawesome/pro-solid-svg-icons/faArrowLeft';
58
58
  import { faArrowsRotate } from '@fortawesome/pro-solid-svg-icons/faArrowsRotate';
59
59
  import { faBadgeCheck } from '@fortawesome/pro-solid-svg-icons/faBadgeCheck';
60
60
  import { faBan } from '@fortawesome/pro-solid-svg-icons/faBan';
61
- import { faBatteryBolt } from '@fortawesome/pro-solid-svg-icons/faBatteryBolt';
62
61
  import { faBox } from '@fortawesome/pro-solid-svg-icons/faBox';
63
62
  import { faBoxArchive } from '@fortawesome/pro-solid-svg-icons/faBoxArchive';
64
63
  import { faBoxCircleCheck } from '@fortawesome/pro-solid-svg-icons/faBoxCircleCheck';
65
64
  import { faBoxOpen } from '@fortawesome/pro-solid-svg-icons/faBoxOpen';
66
65
  import { faBoxesStacked } from '@fortawesome/pro-solid-svg-icons/faBoxesStacked';
66
+ import { faUpDownLeftRight } from '@fortawesome/pro-solid-svg-icons/faUpDownLeftRight';
67
67
  import { faCamera } from '@fortawesome/pro-solid-svg-icons/faCamera';
68
68
  import { faCartArrowDown } from '@fortawesome/pro-solid-svg-icons/faCartArrowDown';
69
69
  import { faChartLine } from '@fortawesome/pro-solid-svg-icons/faChartLine';
@@ -80,10 +80,13 @@ import { faComputerMouseScrollwheel } from '@fortawesome/pro-solid-svg-icons/faC
80
80
  import { faCrop } from '@fortawesome/pro-solid-svg-icons/faCrop';
81
81
  import { faCube } from '@fortawesome/pro-solid-svg-icons/faCube';
82
82
  import { faEquals } from '@fortawesome/pro-solid-svg-icons/faEquals';
83
+ import { faFluxCapacitor } from '@fortawesome/pro-solid-svg-icons/faFluxCapacitor';
84
+ import { faWineGlassCrack } from '@fortawesome/pro-solid-svg-icons/faWineGlassCrack';
85
+ import { faBatteryBolt } from '@fortawesome/pro-solid-svg-icons/faBatteryBolt';
86
+ import { faPaperPlane } from '@fortawesome/pro-solid-svg-icons/faPaperPlane';
87
+ import { faFlaskRoundPotion } from '@fortawesome/pro-solid-svg-icons/faFlaskRoundPotion';
83
88
  import { faExchange } from '@fortawesome/pro-solid-svg-icons/faExchange';
84
89
  import { faFlag } from '@fortawesome/pro-solid-svg-icons/faFlag';
85
- import { faFlaskRoundPotion } from '@fortawesome/pro-solid-svg-icons/faFlaskRoundPotion';
86
- import { faFluxCapacitor } from '@fortawesome/pro-solid-svg-icons/faFluxCapacitor';
87
90
  import { faGlobe } from '@fortawesome/pro-solid-svg-icons/faGlobe';
88
91
  import { faGreaterThanEqual } from '@fortawesome/pro-solid-svg-icons/faGreaterThanEqual';
89
92
  import { faHome } from '@fortawesome/pro-solid-svg-icons/faHome';
@@ -95,7 +98,6 @@ import { faLuggageCart } from '@fortawesome/pro-solid-svg-icons/faLuggageCart';
95
98
  import { faMinus } from '@fortawesome/pro-solid-svg-icons/faMinus';
96
99
  import { faNotEqual } from '@fortawesome/pro-solid-svg-icons/faNotEqual';
97
100
  import { faNoteSticky } from '@fortawesome/pro-solid-svg-icons/faNoteSticky';
98
- import { faPaperPlane } from '@fortawesome/pro-solid-svg-icons/faPaperPlane';
99
101
  import { faPen } from '@fortawesome/pro-solid-svg-icons/faPen';
100
102
  import { faPeopleCarry as fasPeopleCarry } from '@fortawesome/pro-solid-svg-icons/faPeopleCarry';
101
103
  import { faPlus } from '@fortawesome/pro-solid-svg-icons/faPlus';
@@ -108,15 +110,14 @@ import { faTags } from '@fortawesome/pro-solid-svg-icons/faTags';
108
110
  import { faTriangleExclamation } from '@fortawesome/pro-solid-svg-icons/faTriangleExclamation';
109
111
  import { faTruck } from '@fortawesome/pro-solid-svg-icons/faTruck';
110
112
  import { faTruckRampBox } from '@fortawesome/pro-solid-svg-icons/faTruckRampBox';
111
- import { faUpDownLeftRight } from '@fortawesome/pro-solid-svg-icons/faUpDownLeftRight';
112
113
  import { faUser } from '@fortawesome/pro-solid-svg-icons/faUser';
113
114
  import { faUsersGear } from '@fortawesome/pro-solid-svg-icons/faUsersGear';
114
115
  import { faWatch } from '@fortawesome/pro-solid-svg-icons/faWatch';
115
116
  import { faWebhook } from '@fortawesome/pro-solid-svg-icons/faWebhook';
116
- import { faWineGlassCrack } from '@fortawesome/pro-solid-svg-icons/faWineGlassCrack';
117
117
  import { faXmark as fasXmark } from '@fortawesome/pro-solid-svg-icons/faXmark';
118
118
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
119
- import styled, { useTheme, th } from '@xstyled/styled-components';
119
+ import styled, { useTheme } from '@xstyled/styled-components';
120
+ import { th } from '@xstyled/styled-components';
120
121
  export var iconDictionary = {
121
122
  greaterThan: faAngleRight,
122
123
  startsWith: faAnglesRight,
@@ -254,7 +255,7 @@ var Icon = function (_a) {
254
255
  var theme = useTheme();
255
256
  var colorFill = fill && th.color(fill)({ theme: theme }); // React.Text wont return number here
256
257
  var colorSecondary = secondaryColor && th.color(secondaryColor)({ theme: theme });
257
- var namedIcon = (typeof icon === 'string' && (iconDictionary === null || iconDictionary === void 0 ? void 0 : iconDictionary[icon])) || false;
258
+ var namedIcon = (typeof icon == 'string' && (iconDictionary === null || iconDictionary === void 0 ? void 0 : iconDictionary[icon])) || false;
258
259
  var iconProp = React.useMemo(function () {
259
260
  if (namedIcon) {
260
261
  return Array.isArray(namedIcon) ? namedIcon[0] : namedIcon;
@@ -262,10 +263,6 @@ var Icon = function (_a) {
262
263
  return [iconPrefixMap[style], icon];
263
264
  }, [icon, style, namedIcon]);
264
265
  var flipProp = (namedIcon && Array.isArray(namedIcon) && namedIcon[1]) || undefined;
265
- if (!namedIcon && typeof icon === 'function') {
266
- var IconComponent = icon;
267
- return _jsx(IconComponent, { width: size, height: size, fill: colorFill, stroke: colorSecondary });
268
- }
269
266
  return (_jsx(FaIconSizing, { size: size, className: className !== null && className !== void 0 ? className : '', "$colorSecondary": colorSecondary, "$fixedWidth": fixedWidth, children: _jsx(FontAwesomeIcon, { color: colorFill, flip: flipProp, icon: iconProp, className: "faIcon ".concat(fixedWidth ? 'fa-fw' : '', " ").concat(spinning ? 'fa-spin' : '') }) }));
270
267
  };
271
268
  export default Icon;
@@ -1,2 +1,3 @@
1
- import { type FC, type SVGProps } from 'react';
2
- export declare const Valuable: FC<SVGProps<SVGSVGElement>>;
1
+ import { type FC } from 'react';
2
+ import { type SvgProps } from '../types';
3
+ export declare const Valuable: FC<SvgProps>;
@@ -10,4 +10,4 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- export var Valuable = function (props) { return (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", stroke: "black", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [_jsx("path", { d: "M2 9L6 2H18L22 9L12 22L2 9Z", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M12 22L8 9M12 22L16 9M2 9H22", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6 2L12 9L18 2", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] }))); };
13
+ export var Valuable = function (props) { return (_jsxs("svg", __assign({ width: "100", height: "100", viewBox: "0 0 24 24", stroke: "black", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [_jsx("path", { d: "M2 9L6 2H18L22 9L12 22L2 9Z", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M12 22L8 9M12 22L16 9M2 9H22", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6 2L12 9L18 2", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] }))); };
@@ -7,7 +7,7 @@ declare const meta: {
7
7
  } & import("..").IconProps) => JSX.Element;
8
8
  decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react/dist/types-a5624094").R, {
9
9
  badge: "warning";
10
- icon: string | import("react").FC<import("react").SVGProps<SVGSVGElement>>;
10
+ icon: string;
11
11
  style?: "normal" | "light" | "solid" | undefined;
12
12
  fill?: string | undefined;
13
13
  size?: string | number | undefined;
@@ -2,7 +2,7 @@
2
2
  import type { StoryObj } from '@storybook/react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: import("react").FC<import("../types").IconProps>;
5
+ component: ({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../types").IconProps) => JSX.Element;
6
6
  tags: string[];
7
7
  argTypes: {};
8
8
  };
@@ -14,4 +14,3 @@ export declare const SmallExpedition: Story;
14
14
  export declare const BigExpedition: Story;
15
15
  export declare const ExpeditionPink: Story;
16
16
  export declare const ExpeditionPinkSolid: Story;
17
- export declare const CustomIcon: Story;
@@ -1,57 +1,48 @@
1
1
  import { Icon } from '../';
2
- import { Valuable } from '../icons/Valuable';
3
2
  var meta = {
4
3
  title: 'Elements/Icon',
5
4
  component: Icon,
6
5
  tags: ['autodocs'],
7
- argTypes: {}
6
+ argTypes: {},
8
7
  };
9
8
  export default meta;
10
9
  export var Expedition = {
11
10
  args: {
12
11
  icon: 'expedition',
13
- size: '40px'
14
- }
12
+ size: '40px',
13
+ },
15
14
  };
16
15
  export var Spinning = {
17
16
  args: {
18
17
  icon: 'expedition',
19
18
  size: '40px',
20
19
  spinning: true
21
- }
20
+ },
22
21
  };
23
22
  export var SmallExpedition = {
24
23
  args: {
25
24
  icon: 'expedition',
26
- size: '20px'
27
- }
25
+ size: '20px',
26
+ },
28
27
  };
29
28
  export var BigExpedition = {
30
29
  args: {
31
30
  icon: 'expedition',
32
- size: '80px'
33
- }
31
+ size: '80px',
32
+ },
34
33
  };
35
34
  export var ExpeditionPink = {
36
35
  args: {
37
36
  icon: 'expedition',
38
37
  fill: 'pink',
39
- size: '40px'
40
- }
38
+ size: '40px',
39
+ },
41
40
  };
42
41
  export var ExpeditionPinkSolid = {
43
42
  args: {
44
43
  icon: 'expedition',
45
44
  style: 'solid',
46
45
  fill: 'pink',
47
- size: '40px'
48
- }
49
- };
50
- export var CustomIcon = {
51
- args: {
52
- icon: Valuable,
53
- size: '60px',
54
- fill: 'pink',
55
- secondaryColor: 'red1'
56
- }
46
+ size: '40px',
47
+ },
57
48
  };
@@ -1,6 +1,6 @@
1
- import type { MouseEventHandler, SVGProps } from 'react';
1
+ import { MouseEventHandler } from 'react';
2
2
  export type IconProps = {
3
- icon: string | React.FC<SVGProps<SVGSVGElement>>;
3
+ icon: string;
4
4
  style?: 'normal' | 'light' | 'solid';
5
5
  fill?: string;
6
6
  size?: number | string;
@@ -3,10 +3,10 @@ export declare const Wrapper: import("styled-components").StyledComponent<(props
3
3
  export declare const Btn: import("styled-components").StyledComponent<"button", import("@xstyled/system").Theme, {
4
4
  disabled: boolean;
5
5
  }, never>;
6
- export declare const ArrowIcon: import("styled-components").StyledComponent<import("react").FC<import("../Icon").IconProps>, import("@xstyled/system").Theme, {
6
+ export declare const ArrowIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../Icon").IconProps) => JSX.Element, import("@xstyled/system").Theme, {
7
7
  isActive: boolean;
8
8
  }, never>;
9
- export declare const GoIcon: import("styled-components").StyledComponent<import("react").FC<import("../Icon").IconProps>, import("@xstyled/system").Theme, {
9
+ export declare const GoIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../Icon").IconProps) => JSX.Element, import("@xstyled/system").Theme, {
10
10
  isActive: boolean;
11
11
  }, never>;
12
12
  export declare const DotsWrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { CheckboxProps } from './types';
3
- declare const _default: import("react").MemoExoticComponent<({ name, label, onChange, checked, defaultChecked, size, className, disabled, inputRef, readOnly, minusIcon, }: CheckboxProps) => JSX.Element>;
2
+ import { type CheckboxProps } from './types';
3
+ declare const _default: import("react").MemoExoticComponent<({ name, label, onChange, checked, defaultChecked, size, className, disabled, inputRef, readOnly, minusIcon }: CheckboxProps) => JSX.Element>;
4
4
  export default _default;
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { memo, useId } from 'react';
3
- import { CheckboxWrap, CheckIcon, FakeInput, Label } from './styles';
4
3
  import { th, useTheme } from '@xstyled/styled-components';
4
+ import { CheckboxWrap, CheckIcon, FakeInput, Label } from './styles';
5
5
  var Checkbox = function (_a) {
6
6
  var name = _a.name, label = _a.label, onChange = _a.onChange, checked = _a.checked, defaultChecked = _a.defaultChecked, _b = _a.size, size = _b === void 0 ? 4 : _b, className = _a.className, disabled = _a.disabled, inputRef = _a.inputRef, readOnly = _a.readOnly, _c = _a.minusIcon, minusIcon = _c === void 0 ? false : _c;
7
7
  var theme = useTheme();
8
8
  var themeSize = th.fontSize(size)({ theme: theme });
9
9
  var id = useId();
10
- return (_jsxs(CheckboxWrap, { size: themeSize, className: className, children: [_jsx("input", { type: "checkbox", ref: inputRef, name: name, checked: checked, defaultChecked: defaultChecked, disabled: disabled, onChange: onChange, value: "", readOnly: readOnly, "data-cy": name && "".concat(name, "Checkbox"), id: id }), _jsx(FakeInput, { size: themeSize, children: _jsx(CheckIcon, { icon: minusIcon ? 'minus' : 'check', size: themeSize }) }), label && _jsx(Label, { htmlFor: id, children: label })] }));
10
+ return (_jsxs(CheckboxWrap, { size: themeSize, className: className, children: [_jsx("input", { type: "checkbox", ref: inputRef, name: name, checked: checked, defaultChecked: defaultChecked, disabled: disabled, onChange: onChange, value: "", readOnly: readOnly, "data-cy": name ? "".concat(name, "Checkbox") : undefined, "data-testid": name ? "checkbox-".concat(name) : undefined, id: id }), _jsx(FakeInput, { size: themeSize, children: _jsx(CheckIcon, { icon: minusIcon ? 'minus' : 'check', size: themeSize }) }), label && _jsx(Label, { htmlFor: id, children: label })] }));
11
11
  };
12
12
  export default memo(Checkbox);
@@ -2,7 +2,7 @@
2
2
  import { StoryObj } from '@storybook/react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: import("react").MemoExoticComponent<({ name, label, onChange, checked, defaultChecked, size, className, disabled, inputRef, readOnly, minusIcon, }: import("../types").CheckboxProps) => JSX.Element>;
5
+ component: import("react").MemoExoticComponent<({ name, label, onChange, checked, defaultChecked, size, className, disabled, inputRef, readOnly, minusIcon }: import("../types").CheckboxProps) => JSX.Element>;
6
6
  tags: string[];
7
7
  argTypes: {};
8
8
  };
@@ -2,7 +2,7 @@
2
2
  export declare const FakeInput: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
3
3
  size: string | number;
4
4
  }, never>;
5
- export declare const CheckIcon: import("styled-components").StyledComponent<import("react").FC<import("../../Elements/Icon").IconProps>, import("@xstyled/system").Theme, {
5
+ export declare const CheckIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../../Elements/Icon").IconProps) => JSX.Element, import("@xstyled/system").Theme, {
6
6
  size: string | number;
7
7
  }, never>;
8
8
  export declare const CheckboxWrap: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
@@ -1,2 +1,2 @@
1
- import { InputProps } from './types';
1
+ import { type InputProps } from './types';
2
2
  export declare const Input: ({ appearance, type, name, label, value, icon, variant, disabled, error, isInvalid, spaceAround, inputRef, autoComplete, isLoading, className, suffix, suffixOnClick, errorAppearance, iconPlacement, iconOnClick, iconTooltip, big, showArrowsController, onClear, alwaysShowClear, setNumber, onEnter, forceFocus, autoFocus, onBlur, asTextArea, ...rest }: InputProps) => JSX.Element;
@@ -35,7 +35,9 @@ export var Input = function (_a) {
35
35
  var $isClearable = !!onClear && (!!value || alwaysShowClear) && !disabled && !isLoading;
36
36
  var $hasSuffix = !!suffix;
37
37
  var checkIconPlacement = showArrowsController ? 'left' : iconPlacement;
38
- var onAddItem = useCallback(function () { return setNumber && setNumber(function (base) { return base + 1; }); }, [setNumber]);
38
+ var onAddItem = useCallback(function () {
39
+ setNumber && setNumber(function (base) { return base + 1; });
40
+ }, [setNumber]);
39
41
  var onRemoveItem = useCallback(function () {
40
42
  setNumber && setNumber(function (base) { return (base > 1 ? base - 1 : 1); });
41
43
  }, [setNumber]);
@@ -60,5 +62,5 @@ export var Input = function (_a) {
60
62
  onEnter === null || onEnter === void 0 ? void 0 : onEnter();
61
63
  }
62
64
  }, [onEnter]);
63
- return (_jsxs(SpaceAroundWrap, { spaceAround: spaceAround, className: className, children: [_jsxs(InputWrap, { children: [label && _jsx(FieldLabel, { htmlFor: name, children: label }), _jsxs(InputRow, { hasValue: !!value, "$isInvalid": $isInvalid, disabled: !!disabled, "$icon": icon, variant: variant, children: [_jsx(StyledInput, __assign({ autoFocus: autoFocus, className: "".concat(appearance, " ").concat(checkIconPlacement), type: type, name: name, "data-cy": "".concat(name, "Inp"), value: value, "$isInvalid": $isInvalid, "$isClearable": $isClearable, "$hasSuffix": $hasSuffix, disabled: disabled || isLoading, ref: ref, autoComplete: autoComplete, onKeyDown: handleKeyDown, big: big, onBlur: handleBlur, "$asTextArea": asTextArea, variant: variant }, rest)), icon && (_jsx(InputIcon, { right: showArrowsController ? false : iconPlacement === 'right', hasValue: !!value, "$isInvalid": $isInvalid, disabled: disabled, onClick: iconOnClick, children: _jsxs(Tooltip, { children: [_jsx(Icon, { icon: icon }), iconTooltip && _jsx("span", { children: iconTooltip })] }) })), showArrowsController && (_jsxs(IconsController, { children: [_jsx(IconWrapper, { onClick: onAddItem, children: _jsx(Icon, { icon: "goUp", fill: "gray1" }) }), _jsx(IconWrapper, { onClick: onRemoveItem, children: _jsx(Icon, { icon: "goDown", fill: "gray1" }) })] })), $isClearable && (_jsx(ClearableInputIcon, { right: true, onClick: onClear, children: _jsx(Icon, { icon: "deleteX", size: "16px", fill: "gray1" }) })), suffix && !isLoading && (_jsx(Suffix, { onClick: suffixOnClick, "$isPointer": !!suffixOnClick, "$isInvalid": $isInvalid, children: suffix })), isLoading && (_jsx(InputIcon, { right: true, children: _jsx(Spinner, { variant: "sm" }) }))] })] }), error && _jsx(ErrorMessage, { appearance: errorAppearance, children: error })] }));
65
+ return (_jsxs(SpaceAroundWrap, { spaceAround: spaceAround, className: className, children: [_jsxs(InputWrap, { children: [label && _jsx(FieldLabel, { htmlFor: name, children: label }), _jsxs(InputRow, { hasValue: !!value, "$isInvalid": $isInvalid, disabled: !!disabled, "$icon": icon, variant: variant, children: [_jsx(StyledInput, __assign({ autoFocus: autoFocus, className: "".concat(appearance, " ").concat(checkIconPlacement), type: type, name: name, "data-cy": name ? "".concat(name, "Inp") : undefined, "data-testid": name ? "input-".concat(name) : undefined, value: value, "$isInvalid": $isInvalid, "$isClearable": $isClearable, "$hasSuffix": $hasSuffix, disabled: disabled || isLoading, ref: ref, autoComplete: autoComplete, onKeyDown: handleKeyDown, big: big, onBlur: handleBlur, "$asTextArea": asTextArea, variant: variant }, rest)), icon && (_jsx(InputIcon, { right: showArrowsController ? false : iconPlacement === 'right', hasValue: !!value, "$isInvalid": $isInvalid, disabled: disabled, onClick: iconOnClick, children: _jsxs(Tooltip, { children: [_jsx(Icon, { icon: icon }), iconTooltip && _jsx("span", { children: iconTooltip })] }) })), showArrowsController && (_jsxs(IconsController, { children: [_jsx(IconWrapper, { onClick: onAddItem, children: _jsx(Icon, { icon: "goUp", fill: "gray1" }) }), _jsx(IconWrapper, { onClick: onRemoveItem, children: _jsx(Icon, { icon: "goDown", fill: "gray1" }) })] })), $isClearable && (_jsx(ClearableInputIcon, { right: true, onClick: onClear, children: _jsx(Icon, { icon: "deleteX", size: "16px", fill: "gray1" }) })), suffix && !isLoading && (_jsx(Suffix, { onClick: suffixOnClick, "$isPointer": !!suffixOnClick, "$isInvalid": $isInvalid, children: suffix })), isLoading && (_jsx(InputIcon, { right: true, children: _jsx(Spinner, { variant: "sm" }) }))] })] }), error && _jsx(ErrorMessage, { appearance: errorAppearance, children: error })] }));
64
66
  };