@true-engineering/true-react-common-ui-kit 4.0.0-alpha29 → 4.0.0-alpha30
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/ControlWrapper/ControlWrapper.d.ts +3 -3
- package/dist/components/ControlWrapper/helpers.d.ts +4 -0
- package/dist/components/ControlWrapper/index.d.ts +1 -0
- package/dist/components/ControlWrapper/types.d.ts +9 -0
- package/dist/components/Input/InputBase.d.ts +1 -1
- package/dist/components/Select/Select.styles.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +76 -101
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +74 -99
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ControlWrapper/ControlWrapper.stories.tsx +7 -2
- package/src/components/ControlWrapper/ControlWrapper.tsx +24 -19
- package/src/components/ControlWrapper/helpers.ts +11 -0
- package/src/components/ControlWrapper/index.ts +1 -0
- package/src/components/ControlWrapper/types.ts +12 -0
- package/src/components/DateInput/DateInput.stories.tsx +0 -1
- package/src/components/DatePicker/DatePicker.stories.tsx +1 -10
- package/src/components/Input/Input.stories.tsx +1 -6
- package/src/components/Input/InputBase.tsx +0 -3
- package/src/components/Select/CustomSelect.stories.tsx +1 -0
- package/src/components/Select/MultiSelect.stories.tsx +5 -0
- package/src/components/Select/Select.stories.tsx +6 -0
- package/src/components/Select/Select.styles.ts +5 -40
- package/src/components/Select/Select.tsx +24 -20
- package/src/components/TextArea/TextArea.stories.tsx +1 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { IMaybeArray } from '../../theme';
|
|
2
3
|
import { IClickHandlerEvent, ICommonProps } from '../../types';
|
|
3
4
|
import { IIcon } from '../Icon';
|
|
4
|
-
import { IControlWrapperSize } from './types';
|
|
5
|
+
import { IControlWrapperIcon, IControlWrapperSize } from './types';
|
|
5
6
|
import { IControlWrapperStyles } from './ControlWrapper.styles';
|
|
6
7
|
export interface IControlWrapperProps extends ICommonProps<IControlWrapperStyles> {
|
|
7
8
|
children: ReactNode;
|
|
8
9
|
label?: ReactNode;
|
|
9
|
-
icon?: IIcon
|
|
10
|
+
icon?: IMaybeArray<IIcon | IControlWrapperIcon>;
|
|
10
11
|
size?: IControlWrapperSize;
|
|
11
12
|
groupPlacement?: 'left' | 'right' | 'middle' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
12
13
|
/** @default false */
|
|
@@ -23,7 +24,6 @@ export interface IControlWrapperProps extends ICommonProps<IControlWrapperStyles
|
|
|
23
24
|
isLoading?: boolean;
|
|
24
25
|
/** @default false */
|
|
25
26
|
isDisabled?: boolean;
|
|
26
|
-
onIconClick?: (event: IClickHandlerEvent) => void;
|
|
27
27
|
onClear?: (event: IClickHandlerEvent) => void;
|
|
28
28
|
}
|
|
29
29
|
export declare const ControlWrapper: FC<IControlWrapperProps>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IIcon } from '../Icon';
|
|
2
|
+
import { IControlWrapperIcon } from './types';
|
|
3
|
+
export declare const isControlWrapperIcon: (iconItem: IIcon | IControlWrapperIcon) => iconItem is IControlWrapperIcon;
|
|
4
|
+
export declare const convertToControlWrapperIcon: (iconItem: IIcon | IControlWrapperIcon) => IControlWrapperIcon;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import { type Key } from 'react';
|
|
2
|
+
import { IClickHandlerEvent } from '../../types';
|
|
3
|
+
import { IIcon } from '../Icon';
|
|
1
4
|
export interface IControlWrapperSizes {
|
|
2
5
|
}
|
|
3
6
|
export type IControlWrapperSize = keyof IControlWrapperSizes;
|
|
7
|
+
export interface IControlWrapperIcon {
|
|
8
|
+
key?: Key;
|
|
9
|
+
iconComponent: IIcon;
|
|
10
|
+
onClick?: (event: IClickHandlerEvent) => void;
|
|
11
|
+
shouldResetSize?: boolean;
|
|
12
|
+
}
|
|
@@ -4,7 +4,7 @@ import { ICommonProps } from '../../types';
|
|
|
4
4
|
import { IControlWrapperProps } from '../ControlWrapper';
|
|
5
5
|
import { IChangeInputEvent } from './types';
|
|
6
6
|
import { IInputStyles } from './Input.styles';
|
|
7
|
-
export interface IInputBaseProps extends ICommonProps<IInputStyles>, Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size'>, Pick<IControlWrapperProps, 'label' | 'icon' | 'size' | 'groupPlacement' | 'isInvalid' | 'isRequired' | 'isLoading' | 'isDisabled'
|
|
7
|
+
export interface IInputBaseProps extends ICommonProps<IInputStyles>, Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size'>, Pick<IControlWrapperProps, 'label' | 'icon' | 'size' | 'groupPlacement' | 'isInvalid' | 'isRequired' | 'isLoading' | 'isDisabled'>, Pick<Partial<ReactInputMaskBaseProps>, 'mask' | 'maskPlaceholder' | 'alwaysShowMask' | 'beforeMaskedStateChange'> {
|
|
8
8
|
value?: string;
|
|
9
9
|
units?: ReactNode;
|
|
10
10
|
/** @default false */
|
|
@@ -3,7 +3,7 @@ import { type IInputStyles } from '../Input';
|
|
|
3
3
|
import { type ISearchInputStyles } from '../SearchInput';
|
|
4
4
|
import { IWithMessagesStyles } from '../WithMessages';
|
|
5
5
|
import { type ISelectListStyles } from './components';
|
|
6
|
-
export declare const useStyles: import("../../theme").IUseStyles<"root" | "
|
|
6
|
+
export declare const useStyles: import("../../theme").IUseStyles<"root" | "disabled" | "inputWrapper" | "arrow" | "listWrapper" | "withoutPopper" | "listWrapperInBody" | "activeArrow" | "counter", unknown>;
|
|
7
7
|
export declare const readonlyInputStyles: Partial<import("jss").Styles<"input" | "withValue" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
|
|
8
8
|
tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "wrapper" | "controlWrapper" | "minContent" | "activeLabel" | "disabledLabel" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown, undefined>> & Partial<{
|
|
9
9
|
tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useMemo, useContext, useInsertionEffect, useRef, useEffect, useCallback, useState, createElement, Fragment as Fragment$1, forwardRef, createRef, PureComponent, memo } from "react";
|
|
2
2
|
import { jss, JssContext as JssContext$1, createUseStyles } from "react-jss";
|
|
3
|
-
import { isNotEmpty, isArrayNotEmpty, mergeStyles, joinStrings, isObject as isObject$1, isStringEmpty, isString, isStringNotEmpty, mergeRefs, addDataTestId, applyAction, addDataAttributes as addDataAttributes$1, stopPropagation, isReactNodeNotEmpty, addClickHandler, getTestId, getSelectKeyHandler,
|
|
4
|
-
import { merge as merge$2 } from "lodash-es";
|
|
3
|
+
import { isNotEmpty, isArrayNotEmpty, mergeStyles, joinStrings, isObject as isObject$1, isStringEmpty, isString, isStringNotEmpty, mergeRefs, addDataTestId, applyAction, addDataAttributes as addDataAttributes$1, stopPropagation, isReactNodeNotEmpty, addClickHandler, getTestId, getSelectKeyHandler, getArray, isArrayLikeNotEmpty, createFilter, isEmpty, isFunction as isFunction$1, getTransition, indexMap, isNumberInteger, hasDuplicates, isArrayEmpty } from "@true-engineering/true-react-platform-helpers";
|
|
4
|
+
import { merge as merge$2, isObject as isObject$2 } from "lodash-es";
|
|
5
5
|
import { CSSTransition } from "react-transition-group";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import hexToRgba from "hex-to-rgba";
|
|
@@ -9972,15 +9972,23 @@ var WithMessages = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
9972
9972
|
]
|
|
9973
9973
|
}));
|
|
9974
9974
|
});
|
|
9975
|
-
var
|
|
9975
|
+
var isControlWrapperIcon = function(iconItem) {
|
|
9976
|
+
return isObject$2(iconItem) && "iconComponent" in iconItem;
|
|
9977
|
+
};
|
|
9978
|
+
var convertToControlWrapperIcon = function(iconItem) {
|
|
9979
|
+
return isControlWrapperIcon(iconItem) ? iconItem : {
|
|
9980
|
+
iconComponent: iconItem
|
|
9981
|
+
};
|
|
9982
|
+
};
|
|
9983
|
+
var CONTROL = dimensions.CONTROL, Z_INDEX$1 = dimensions.Z_INDEX;
|
|
9976
9984
|
var useStyles$H = createThemedStyles("ControlWrapper", {
|
|
9977
9985
|
controlWrapper: {
|
|
9978
|
-
"--control-height": "".concat(CONTROL
|
|
9986
|
+
"--control-height": "".concat(CONTROL.HEIGHT - 2, "px"),
|
|
9979
9987
|
// borders
|
|
9980
|
-
"--control-padding": "".concat(CONTROL
|
|
9981
|
-
"--icon-size": "".concat(CONTROL
|
|
9982
|
-
"--icon-inner-size": "".concat(CONTROL
|
|
9983
|
-
"--icon-gap": "".concat(CONTROL
|
|
9988
|
+
"--control-padding": "".concat(CONTROL.PADDING, "px"),
|
|
9989
|
+
"--icon-size": "".concat(CONTROL.ICON_SIZE, "px"),
|
|
9990
|
+
"--icon-inner-size": "".concat(CONTROL.ICON_INNER_SIZE, "px"),
|
|
9991
|
+
"--icon-gap": "".concat(CONTROL.ICON_GAP, "px"),
|
|
9984
9992
|
display: "flex",
|
|
9985
9993
|
width: "100%",
|
|
9986
9994
|
backgroundColor: "white",
|
|
@@ -10177,20 +10185,21 @@ function _object_spread_props$I(target, source) {
|
|
|
10177
10185
|
return target;
|
|
10178
10186
|
}
|
|
10179
10187
|
var ControlWrapper = function(param) {
|
|
10180
|
-
var label = param.label, icon = param.icon, groupPlacement = param.groupPlacement, isInvalid = param.isInvalid, isFocused = param.isFocused, isRequired = param.isRequired, isLoading = param.isLoading, isFullWidth = param.isFullWidth, isDisabled = param.isDisabled, hasValue = param.hasValue, size2 = param.size, testId = param.testId, children = param.children, tweakStyles = param.tweakStyles, data = param.data,
|
|
10188
|
+
var label = param.label, icon = param.icon, groupPlacement = param.groupPlacement, isInvalid = param.isInvalid, isFocused = param.isFocused, isRequired = param.isRequired, isLoading = param.isLoading, isFullWidth = param.isFullWidth, isDisabled = param.isDisabled, hasValue = param.hasValue, size2 = param.size, testId = param.testId, children = param.children, tweakStyles = param.tweakStyles, data = param.data, onClear = param.onClear;
|
|
10181
10189
|
var classes = useStyles$H({
|
|
10182
10190
|
theme: tweakStyles
|
|
10183
10191
|
});
|
|
10184
|
-
var
|
|
10192
|
+
var icons = getArray(icon).map(convertToControlWrapperIcon);
|
|
10193
|
+
var hasIcons = !isLoading && isArrayNotEmpty(icons);
|
|
10185
10194
|
var hasClearButton = !isDisabled && !isLoading && hasValue && isNotEmpty(onClear);
|
|
10186
|
-
var hasControls =
|
|
10195
|
+
var hasControls = hasIcons || hasClearButton || isLoading;
|
|
10187
10196
|
var isActive = isFocused || hasValue;
|
|
10188
10197
|
var tweakPreloaderStyles = useTweakStyles({
|
|
10189
10198
|
tweakStyles,
|
|
10190
10199
|
className: "tweakPreloader",
|
|
10191
10200
|
currentComponentName: "ControlWrapper"
|
|
10192
10201
|
});
|
|
10193
|
-
var _obj2, _obj1
|
|
10202
|
+
var _obj2, _obj1;
|
|
10194
10203
|
return /* @__PURE__ */ jsxs("div", _object_spread_props$I(_object_spread$S({
|
|
10195
10204
|
className: clsx(classes.controlWrapper, isNotEmpty(groupPlacement) && classes["placement-".concat(groupPlacement)], isNotEmpty(size2) && classes[size2], (_obj2 = {}, _define_property$U(_obj2, classes.invalid, isInvalid), _define_property$U(_obj2, classes.focused, isFocused), _define_property$U(_obj2, classes.withValue, hasValue), _define_property$U(_obj2, classes.disabled, isDisabled), _define_property$U(_obj2, classes.loading, isLoading), _define_property$U(_obj2, classes.minContent, !isFullWidth), _obj2))
|
|
10196
10205
|
}, addDataAttributes$1(data, testId)), {
|
|
@@ -10216,14 +10225,18 @@ var ControlWrapper = function(param) {
|
|
|
10216
10225
|
})
|
|
10217
10226
|
})
|
|
10218
10227
|
})),
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
className: classes.
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10228
|
+
hasIcons && icons.map(function(param2, index) {
|
|
10229
|
+
var key = param2.key, iconComponent = param2.iconComponent, onClick = param2.onClick, _param_shouldResetSize = param2.shouldResetSize, shouldResetSize = _param_shouldResetSize === void 0 ? false : _param_shouldResetSize;
|
|
10230
|
+
var _obj3;
|
|
10231
|
+
return /* @__PURE__ */ jsx("div", _object_spread_props$I(_object_spread$S({
|
|
10232
|
+
className: clsx(classes.icon, classes.endIcon, (_obj3 = {}, _define_property$U(_obj3, classes.activeIcon, !isDisabled && isNotEmpty(onClick)), _define_property$U(_obj3, classes.customIcon, shouldResetSize), _obj3))
|
|
10233
|
+
}, addClickHandler(onClick, !isDisabled), addDataTestId(testId, "icon")), {
|
|
10234
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
10235
|
+
className: classes.iconInner,
|
|
10236
|
+
children: renderIcon(iconComponent)
|
|
10237
|
+
})
|
|
10238
|
+
}), key !== null && key !== void 0 ? key : index);
|
|
10239
|
+
}),
|
|
10227
10240
|
isLoading && /* @__PURE__ */ jsx("div", _object_spread_props$I(_object_spread$S({
|
|
10228
10241
|
className: clsx(classes.icon, classes.loader)
|
|
10229
10242
|
}, addDataTestId(testId, "loading")), {
|
|
@@ -10565,7 +10578,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
10565
10578
|
}
|
|
10566
10579
|
}
|
|
10567
10580
|
var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
10568
|
-
var _param_value = _param.value, value = _param_value === void 0 ? "" : _param_value, placeholder = _param.placeholder, label = _param.label, _param_type = _param.type, type = _param_type === void 0 ? "text" : _param_type, isDisabled = _param.isDisabled, autoComplete = _param.autoComplete, initialInputMode = _param.inputMode, isReadonly = _param.isReadonly, isInvalid = _param.isInvalid, isActive = _param.isActive, isClearable = _param.isClearable, isAutoSized = _param.isAutoSized, name = _param.name, tweakStyles = _param.tweakStyles, maxLength = _param.maxLength, shouldFocusOnMount = _param.shouldFocusOnMount, units = _param.units, testId = _param.testId, tabIndex = _param.tabIndex, shouldAlwaysShowPlaceholder = _param.shouldAlwaysShowPlaceholder, onChange = _param.onChange, onPaste = _param.onPaste, onFocus = _param.onFocus, onBlur = _param.onBlur, onKeyDown = _param.onKeyDown, mask = _param.mask, maskPlaceholder = _param.maskPlaceholder, alwaysShowMask = _param.alwaysShowMask, beforeMaskedStateChange = _param.beforeMaskedStateChange, data = _param.data, groupPlacement = _param.groupPlacement, icon = _param.icon, isLoading = _param.isLoading, isRequired = _param.isRequired, size2 = _param.size,
|
|
10581
|
+
var _param_value = _param.value, value = _param_value === void 0 ? "" : _param_value, placeholder = _param.placeholder, label = _param.label, _param_type = _param.type, type = _param_type === void 0 ? "text" : _param_type, isDisabled = _param.isDisabled, autoComplete = _param.autoComplete, initialInputMode = _param.inputMode, isReadonly = _param.isReadonly, isInvalid = _param.isInvalid, isActive = _param.isActive, isClearable = _param.isClearable, isAutoSized = _param.isAutoSized, name = _param.name, tweakStyles = _param.tweakStyles, maxLength = _param.maxLength, shouldFocusOnMount = _param.shouldFocusOnMount, units = _param.units, testId = _param.testId, tabIndex = _param.tabIndex, shouldAlwaysShowPlaceholder = _param.shouldAlwaysShowPlaceholder, onChange = _param.onChange, onPaste = _param.onPaste, onFocus = _param.onFocus, onBlur = _param.onBlur, onKeyDown = _param.onKeyDown, mask = _param.mask, maskPlaceholder = _param.maskPlaceholder, alwaysShowMask = _param.alwaysShowMask, beforeMaskedStateChange = _param.beforeMaskedStateChange, data = _param.data, groupPlacement = _param.groupPlacement, icon = _param.icon, isLoading = _param.isLoading, isRequired = _param.isRequired, size2 = _param.size, children = _param.children, inputProps = _object_without_properties$i(_param, [
|
|
10569
10582
|
"value",
|
|
10570
10583
|
"placeholder",
|
|
10571
10584
|
"label",
|
|
@@ -10601,7 +10614,6 @@ var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10601
10614
|
"isLoading",
|
|
10602
10615
|
"isRequired",
|
|
10603
10616
|
"size",
|
|
10604
|
-
"onIconClick",
|
|
10605
10617
|
"children"
|
|
10606
10618
|
]);
|
|
10607
10619
|
var classes = useStyles$G({
|
|
@@ -10731,7 +10743,6 @@ var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10731
10743
|
icon,
|
|
10732
10744
|
isLoading,
|
|
10733
10745
|
isRequired,
|
|
10734
|
-
onIconClick,
|
|
10735
10746
|
size: size2,
|
|
10736
10747
|
children: [
|
|
10737
10748
|
hasUnits || isAutoSized ? /* @__PURE__ */ jsx("div", {
|
|
@@ -11675,7 +11686,7 @@ var getDefaultConvertToIdFunction = function(convertValueToString) {
|
|
|
11675
11686
|
return isNotEmpty(value === null || value === void 0 ? void 0 : value.id) ? String(value.id) : convertValueToString(value);
|
|
11676
11687
|
};
|
|
11677
11688
|
};
|
|
11678
|
-
var
|
|
11689
|
+
var Z_INDEX = dimensions.Z_INDEX;
|
|
11679
11690
|
var useStyles$D = createThemedStyles("Select", {
|
|
11680
11691
|
root: {
|
|
11681
11692
|
width: "100%",
|
|
@@ -11684,8 +11695,7 @@ var useStyles$D = createThemedStyles("Select", {
|
|
|
11684
11695
|
},
|
|
11685
11696
|
inputWrapper: {
|
|
11686
11697
|
width: "100%",
|
|
11687
|
-
cursor: "text"
|
|
11688
|
-
position: "relative"
|
|
11698
|
+
cursor: "text"
|
|
11689
11699
|
},
|
|
11690
11700
|
listWrapper: {
|
|
11691
11701
|
left: -1,
|
|
@@ -11704,57 +11714,28 @@ var useStyles$D = createThemedStyles("Select", {
|
|
|
11704
11714
|
maxWidth: "min-content"
|
|
11705
11715
|
},
|
|
11706
11716
|
arrow: {
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
top: "50%",
|
|
11710
|
-
width: 20,
|
|
11711
|
-
height: 20,
|
|
11717
|
+
width: "var(--icon-inner-size, 20px)",
|
|
11718
|
+
height: "var(--icon-inner-size, 20px)",
|
|
11712
11719
|
cursor: "pointer",
|
|
11713
|
-
transform: "translateY(-50%)",
|
|
11714
11720
|
transition: animations.defaultTransition,
|
|
11715
11721
|
transitionProperty: "transform",
|
|
11716
11722
|
zIndex: Z_INDEX.CONTROL_FOCUS + 1
|
|
11717
11723
|
},
|
|
11718
11724
|
activeArrow: {
|
|
11719
|
-
transform: "
|
|
11725
|
+
transform: "rotate(180deg)"
|
|
11720
11726
|
},
|
|
11721
11727
|
disabled: {
|
|
11722
11728
|
"& $arrow": {
|
|
11723
11729
|
cursor: "default"
|
|
11724
11730
|
}
|
|
11725
11731
|
},
|
|
11726
|
-
counter: {
|
|
11727
|
-
"&:not(:last-child)": {
|
|
11728
|
-
paddingRight: 8
|
|
11729
|
-
}
|
|
11730
|
-
},
|
|
11731
|
-
icon: {
|
|
11732
|
-
width: CONTROL.ICON_INNER_SIZE,
|
|
11733
|
-
height: CONTROL.ICON_INNER_SIZE
|
|
11734
|
-
},
|
|
11735
|
-
iconWrapper: {
|
|
11736
|
-
display: "flex",
|
|
11737
|
-
alignItems: "center"
|
|
11738
|
-
}
|
|
11732
|
+
counter: {}
|
|
11739
11733
|
});
|
|
11740
11734
|
var baseInputStyles = {
|
|
11741
|
-
inputContent: {
|
|
11742
|
-
paddingRight: 32
|
|
11743
|
-
},
|
|
11744
11735
|
input: {
|
|
11745
11736
|
"&[readonly]": {
|
|
11746
11737
|
cursor: "pointer"
|
|
11747
11738
|
}
|
|
11748
|
-
},
|
|
11749
|
-
tweakControlWrapper: {
|
|
11750
|
-
controls: {
|
|
11751
|
-
paddingRight: 40
|
|
11752
|
-
},
|
|
11753
|
-
icon: {
|
|
11754
|
-
"&:last-child": {
|
|
11755
|
-
paddingRight: 0
|
|
11756
|
-
}
|
|
11757
|
-
}
|
|
11758
11739
|
}
|
|
11759
11740
|
};
|
|
11760
11741
|
var readonlyInputBaseStyles = {
|
|
@@ -12501,23 +12482,6 @@ function Select(props) {
|
|
|
12501
12482
|
onToggleCheckbox: handleToggleOptionCheckbox
|
|
12502
12483
|
})
|
|
12503
12484
|
}));
|
|
12504
|
-
var multiSelectCounterWithIcon = shouldShowMultiSelectCounter || isNotEmpty(icon) ? /* @__PURE__ */ jsxs("div", {
|
|
12505
|
-
className: classes.iconWrapper,
|
|
12506
|
-
children: [
|
|
12507
|
-
shouldShowMultiSelectCounter && /* @__PURE__ */ jsxs("div", {
|
|
12508
|
-
className: classes.counter,
|
|
12509
|
-
children: [
|
|
12510
|
-
"(+",
|
|
12511
|
-
value.length - 1,
|
|
12512
|
-
")"
|
|
12513
|
-
]
|
|
12514
|
-
}),
|
|
12515
|
-
isNotEmpty(icon) && /* @__PURE__ */ jsx("div", {
|
|
12516
|
-
className: classes.icon,
|
|
12517
|
-
children: renderIcon(icon)
|
|
12518
|
-
})
|
|
12519
|
-
]
|
|
12520
|
-
}) : void 0;
|
|
12521
12485
|
return /* @__PURE__ */ jsx(WithMessages, {
|
|
12522
12486
|
errorMessage,
|
|
12523
12487
|
infoMessage,
|
|
@@ -12528,34 +12492,43 @@ function Select(props) {
|
|
|
12528
12492
|
onKeyDown: handleKeyDown,
|
|
12529
12493
|
ref: root2,
|
|
12530
12494
|
children: [
|
|
12531
|
-
/* @__PURE__ */
|
|
12495
|
+
/* @__PURE__ */ jsx("div", {
|
|
12532
12496
|
className: clsx(classes.inputWrapper, isDisabled && classes.disabled),
|
|
12533
12497
|
onClick: isDisabled || isReadonly ? void 0 : handleOnClick,
|
|
12534
12498
|
ref: inputWrapper,
|
|
12535
|
-
children:
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12499
|
+
children: /* @__PURE__ */ jsx(InputBase, _object_spread$J({
|
|
12500
|
+
value: searchValue !== "" && !shouldRenderSearchInputInList ? searchValue : showedStringValue,
|
|
12501
|
+
onChange: handleInputChange,
|
|
12502
|
+
isActive: isListOpen || isActive,
|
|
12503
|
+
isReadonly: hasReadonlyInput,
|
|
12504
|
+
onFocus: handleFocus,
|
|
12505
|
+
onBlur: handleBlur,
|
|
12506
|
+
isDisabled,
|
|
12507
|
+
ref: input,
|
|
12508
|
+
isLoading: areOptionsLoading,
|
|
12509
|
+
tweakStyles: tweakInputStyles,
|
|
12510
|
+
testId,
|
|
12511
|
+
icon: [
|
|
12512
|
+
isMultiSelect && shouldShowMultiSelectCounter ? {
|
|
12513
|
+
key: "counter",
|
|
12514
|
+
iconComponent: /* @__PURE__ */ jsxs("div", {
|
|
12515
|
+
className: classes.counter,
|
|
12516
|
+
children: [
|
|
12517
|
+
"(+",
|
|
12518
|
+
value.length - 1,
|
|
12519
|
+
")"
|
|
12520
|
+
]
|
|
12521
|
+
}, "counter"),
|
|
12522
|
+
shouldResetSize: true
|
|
12523
|
+
} : void 0
|
|
12524
|
+
].concat(_to_consumable_array$7(getArray(icon)), [
|
|
12525
|
+
/* @__PURE__ */ jsx("div", {
|
|
12526
|
+
className: clsx(classes.arrow, isOpen && classes.activeArrow),
|
|
12527
|
+
onClick: onArrowClick,
|
|
12528
|
+
children: renderIcon(dropdownIcon)
|
|
12529
|
+
}, "arrow")
|
|
12530
|
+
]).filter(isNotEmpty)
|
|
12531
|
+
}, inputProps))
|
|
12559
12532
|
}),
|
|
12560
12533
|
shouldUsePopper ? /* @__PURE__ */ jsx(Portal, {
|
|
12561
12534
|
container: shouldRenderInBody ? document.body : inputWrapper.current,
|
|
@@ -32675,6 +32648,7 @@ export {
|
|
|
32675
32648
|
cleanStyles,
|
|
32676
32649
|
colors,
|
|
32677
32650
|
common,
|
|
32651
|
+
convertToControlWrapperIcon,
|
|
32678
32652
|
createThemedStyles,
|
|
32679
32653
|
dimensions,
|
|
32680
32654
|
findCountryByCode,
|
|
@@ -32699,6 +32673,7 @@ export {
|
|
|
32699
32673
|
hasExactParent,
|
|
32700
32674
|
helpers,
|
|
32701
32675
|
iconsList,
|
|
32676
|
+
isControlWrapperIcon,
|
|
32702
32677
|
isElementOffScreen,
|
|
32703
32678
|
isElementOneOfParents,
|
|
32704
32679
|
isSpaceChar,
|