@true-engineering/true-react-common-ui-kit 3.49.0 → 3.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -4
- package/dist/components/Input/Input.styles.d.ts +1 -1
- package/dist/components/Select/Select.styles.d.ts +3 -3
- package/dist/components/TextArea/TextArea.styles.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +113 -44
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +113 -44
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Input/Input.styles.ts +43 -9
- package/src/components/Input/Input.tsx +32 -29
- package/src/components/SearchInput/SearchInput.styles.ts +2 -4
- package/src/components/Select/Select.styles.ts +18 -2
- package/src/components/Select/Select.tsx +3 -5
- package/src/components/TextArea/TextArea.styles.ts +28 -10
- package/src/components/TextArea/TextArea.tsx +1 -1
package/README.md
CHANGED
|
@@ -4,13 +4,37 @@
|
|
|
4
4
|
|
|
5
5
|
# Публикация
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Слить Pull Request с увеличением версии пакета в файле `package.json` в ветке `master`.
|
|
8
|
+
Не забыть добавить описание изменений в этот файл.
|
|
9
|
+
|
|
10
|
+
Публикация в npm и добавление тега на коммит c версией пакета происходит автоматически в пайплайне.
|
|
11
|
+
Так же автоматически будет создан коммит в репозиторий TE_TrueReactPlatform_Moduled и обновится наш сторибук
|
|
11
12
|
|
|
12
13
|
# Release Notes
|
|
13
14
|
|
|
15
|
+
## 3.50.1
|
|
16
|
+
|
|
17
|
+
### Changes
|
|
18
|
+
|
|
19
|
+
- **Select**: Исправлено обрезание лейбла многоточием
|
|
20
|
+
|
|
21
|
+
## 3.50.0
|
|
22
|
+
|
|
23
|
+
### Changes
|
|
24
|
+
|
|
25
|
+
- **TextArea**: Добавлено обрезание лейбла многоточием.
|
|
26
|
+
- **Input**: Добавлено обрезание лейбла многоточием. HTML-структура поменялась с `inputWrapper > input` на `inputWrapper > inputWithLabelWrapper > input`.
|
|
27
|
+
|
|
28
|
+
Это также повлияло на все компоненты, использующие **Input**:
|
|
29
|
+
- **DateInput**
|
|
30
|
+
- **NumberInput**
|
|
31
|
+
- **PhoneInput**
|
|
32
|
+
- **PhoneInputCountryList**
|
|
33
|
+
- **SearchInput** – если вы переопределяли через твик-стайлы правило `left` для класса `label`,
|
|
34
|
+
это переопределение нужно удалить, т.к. `left` теперь в стандартном случае должно быть равно `0`
|
|
35
|
+
- **Select**
|
|
36
|
+
- **SmartInput**
|
|
37
|
+
|
|
14
38
|
## 3.49.0
|
|
15
39
|
|
|
16
40
|
### Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../theme';
|
|
2
2
|
import { IThemedPreloaderStyles } from '../ThemedPreloader';
|
|
3
3
|
export declare const AUTOSIZE_MAX_WIDTH = 480;
|
|
4
|
-
export declare const useStyles: import("../../theme").IUseStyles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "
|
|
4
|
+
export declare const useStyles: import("../../theme").IUseStyles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputWithLabelWrapper" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "labelWithIcons" | "withIcons" | "labelText" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "withControls" | "invalidLabel" | "error-top" | "error-bottom" | "withUnits", unknown>;
|
|
5
5
|
export type IInputStyles = ITweakStyles<typeof useStyles, {
|
|
6
6
|
tweakPreloader: IThemedPreloaderStyles;
|
|
7
7
|
}>;
|
|
@@ -3,19 +3,19 @@ import { type IInputStyles } from '../Input';
|
|
|
3
3
|
import { type ISearchInputStyles } from '../SearchInput';
|
|
4
4
|
import { type ISelectListStyles } from './components';
|
|
5
5
|
export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon" | "disabled" | "inputWrapper" | "arrow" | "listWrapper" | "withoutPopper" | "listWrapperInBody" | "activeArrow" | "counter", unknown>;
|
|
6
|
-
export declare const readonlyInputStyles: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "
|
|
6
|
+
export declare const readonlyInputStyles: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputWithLabelWrapper" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "labelWithIcons" | "withIcons" | "labelText" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "withControls" | "invalidLabel" | "error-top" | "error-bottom" | "withUnits", unknown, undefined>> & Partial<{
|
|
7
7
|
tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
|
|
8
8
|
tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
|
|
9
9
|
tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
|
|
10
10
|
}>;
|
|
11
11
|
}>;
|
|
12
|
-
export declare const multiSelectInputStyles: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "
|
|
12
|
+
export declare const multiSelectInputStyles: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputWithLabelWrapper" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "labelWithIcons" | "withIcons" | "labelText" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "withControls" | "invalidLabel" | "error-top" | "error-bottom" | "withUnits", unknown, undefined>> & Partial<{
|
|
13
13
|
tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
|
|
14
14
|
tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
|
|
15
15
|
tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
|
|
16
16
|
}>;
|
|
17
17
|
}>;
|
|
18
|
-
export declare const readonlyMultiSelectStyles: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "
|
|
18
|
+
export declare const readonlyMultiSelectStyles: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputWithLabelWrapper" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "labelWithIcons" | "withIcons" | "labelText" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "withControls" | "invalidLabel" | "error-top" | "error-bottom" | "withUnits", unknown, undefined>> & Partial<{
|
|
19
19
|
tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
|
|
20
20
|
tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
|
|
21
21
|
tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../theme';
|
|
2
|
-
export declare const useStyles: import("../../theme").IUseStyles<"error" | "invalid" | "root" | "textarea" | "disabled" | "label" | "requiredLabel" | "footer" | "info" | "autosize" | "focused" | "withFloatingLabel" | "floating" | "activeLabel" | "required" | "invalidLabel" | "wrapper" | "symbolsCount" | "symbolsCountError", unknown>;
|
|
2
|
+
export declare const useStyles: import("../../theme").IUseStyles<"error" | "invalid" | "root" | "textarea" | "disabled" | "label" | "requiredLabel" | "footer" | "info" | "autosize" | "focused" | "withFloatingLabel" | "floating" | "activeLabel" | "required" | "labelText" | "invalidLabel" | "wrapper" | "symbolsCount" | "symbolsCountError", unknown>;
|
|
3
3
|
export type ITextAreaStyles = ITweakStyles<typeof useStyles>;
|
|
@@ -9638,7 +9638,6 @@ var CssBaseline = function(param) {
|
|
|
9638
9638
|
}, addDataTestId(testId), addDataAttributes(data)));
|
|
9639
9639
|
};
|
|
9640
9640
|
var DEFAULT_SIZE = 6;
|
|
9641
|
-
var PADDING_X$1 = 12;
|
|
9642
9641
|
var AUTOSIZE_MAX_WIDTH = 480;
|
|
9643
9642
|
var useStyles$H = createThemedStyles("Input", {
|
|
9644
9643
|
root: {
|
|
@@ -9647,6 +9646,8 @@ var useStyles$H = createThemedStyles("Input", {
|
|
|
9647
9646
|
position: "relative"
|
|
9648
9647
|
},
|
|
9649
9648
|
inputWrapper: {
|
|
9649
|
+
"--input-padding-x": "12px",
|
|
9650
|
+
"--input-with-icons-padding-right": "4px",
|
|
9650
9651
|
display: "flex",
|
|
9651
9652
|
width: "100%",
|
|
9652
9653
|
height: dimensions.CONTROL_HEIGHT,
|
|
@@ -9656,12 +9657,16 @@ var useStyles$H = createThemedStyles("Input", {
|
|
|
9656
9657
|
backgroundColor: "white",
|
|
9657
9658
|
position: "relative"
|
|
9658
9659
|
},
|
|
9660
|
+
inputWithLabelWrapper: {
|
|
9661
|
+
position: "relative",
|
|
9662
|
+
width: "100%"
|
|
9663
|
+
},
|
|
9659
9664
|
inputContent: {
|
|
9660
9665
|
fontSize: 16,
|
|
9661
9666
|
fontFamily: "inherit",
|
|
9662
9667
|
padding: [
|
|
9663
9668
|
0,
|
|
9664
|
-
|
|
9669
|
+
"var(--input-padding-x)"
|
|
9665
9670
|
]
|
|
9666
9671
|
},
|
|
9667
9672
|
input: {
|
|
@@ -9734,8 +9739,10 @@ var useStyles$H = createThemedStyles("Input", {
|
|
|
9734
9739
|
activeLabel: {
|
|
9735
9740
|
display: "none",
|
|
9736
9741
|
"&$floating": {
|
|
9742
|
+
"--scale-factor": "0.75",
|
|
9737
9743
|
display: "block",
|
|
9738
|
-
transform: "scale(
|
|
9744
|
+
transform: "scale(var(--scale-factor)) translateY(-120%)",
|
|
9745
|
+
maxWidth: "calc(var(--label-max-width) / var(--scale-factor))"
|
|
9739
9746
|
}
|
|
9740
9747
|
},
|
|
9741
9748
|
required: {
|
|
@@ -9751,31 +9758,54 @@ var useStyles$H = createThemedStyles("Input", {
|
|
|
9751
9758
|
}
|
|
9752
9759
|
},
|
|
9753
9760
|
label: {
|
|
9761
|
+
"--label-max-width": "calc(100% - var(--input-padding-x))",
|
|
9754
9762
|
position: "absolute",
|
|
9755
9763
|
pointerEvents: "none",
|
|
9756
|
-
left:
|
|
9764
|
+
left: "var(--input-padding-x)",
|
|
9757
9765
|
top: "50%",
|
|
9766
|
+
boxSizing: "border-box",
|
|
9767
|
+
maxWidth: "var(--label-max-width)",
|
|
9768
|
+
paddingRight: "var(--input-padding-x)",
|
|
9758
9769
|
transformOrigin: "top left",
|
|
9759
9770
|
transform: "translateY(-50%)",
|
|
9760
9771
|
transition: animations.defaultTransition,
|
|
9761
|
-
transitionProperty:
|
|
9772
|
+
transitionProperty: [
|
|
9773
|
+
"max-width",
|
|
9774
|
+
"transform",
|
|
9775
|
+
"color"
|
|
9776
|
+
],
|
|
9762
9777
|
fontSize: 16
|
|
9763
9778
|
},
|
|
9764
9779
|
floatingWithoutPadding: {
|
|
9765
9780
|
left: 0
|
|
9766
9781
|
},
|
|
9767
9782
|
requiredLabel: {
|
|
9783
|
+
"--input-padding-right": "var(--input-padding-x)",
|
|
9784
|
+
"--required-label-size": "6px",
|
|
9785
|
+
"--required-label-right": "calc(var(--input-padding-right) - var(--required-label-size) - 2px)",
|
|
9786
|
+
"&:is($labelWithIcons)": {
|
|
9787
|
+
"--input-padding-right": "var(--input-with-icons-padding-right)"
|
|
9788
|
+
},
|
|
9768
9789
|
"&:after": {
|
|
9769
9790
|
content: '""',
|
|
9770
9791
|
position: "absolute",
|
|
9771
|
-
right: -
|
|
9792
|
+
right: "var(--required-label-right)",
|
|
9772
9793
|
top: 4,
|
|
9773
9794
|
transform: "translate(0, -50%)",
|
|
9774
|
-
width:
|
|
9775
|
-
height:
|
|
9795
|
+
width: "var(--required-label-size)",
|
|
9796
|
+
height: "var(--required-label-size)",
|
|
9776
9797
|
borderRadius: "50%"
|
|
9777
9798
|
}
|
|
9778
9799
|
},
|
|
9800
|
+
labelWithIcons: {
|
|
9801
|
+
extend: "withIcons"
|
|
9802
|
+
},
|
|
9803
|
+
labelText: {
|
|
9804
|
+
display: "block",
|
|
9805
|
+
overflow: "hidden",
|
|
9806
|
+
textOverflow: "ellipsis",
|
|
9807
|
+
whiteSpace: "nowrap"
|
|
9808
|
+
},
|
|
9779
9809
|
activeIcon: {
|
|
9780
9810
|
cursor: "pointer"
|
|
9781
9811
|
},
|
|
@@ -9883,7 +9913,7 @@ var useStyles$H = createThemedStyles("Input", {
|
|
|
9883
9913
|
extend: "icon"
|
|
9884
9914
|
},
|
|
9885
9915
|
withIcons: {
|
|
9886
|
-
paddingRight:
|
|
9916
|
+
paddingRight: "var(--input-with-icons-padding-right)"
|
|
9887
9917
|
},
|
|
9888
9918
|
withControls: {},
|
|
9889
9919
|
invalid: {},
|
|
@@ -10302,19 +10332,27 @@ var Input = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10302
10332
|
"data-value": isAutoSizeable ? value : void 0
|
|
10303
10333
|
}, addDataAttributes(data)), {
|
|
10304
10334
|
children: [
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10335
|
+
/* @__PURE__ */ jsxs("div", {
|
|
10336
|
+
className: classes.inputWithLabelWrapper,
|
|
10337
|
+
children: [
|
|
10338
|
+
mask === void 0 ? /* @__PURE__ */ jsx("input", _object_spread$P({
|
|
10339
|
+
ref: ref !== null && ref !== void 0 ? ref : inputRef
|
|
10340
|
+
}, props)) : /* @__PURE__ */ jsx(InputMask, _object_spread$P({
|
|
10341
|
+
ref: ref !== null && ref !== void 0 ? ref : inputRef,
|
|
10342
|
+
mask,
|
|
10343
|
+
maskPlaceholder,
|
|
10344
|
+
alwaysShowMask,
|
|
10345
|
+
beforeMaskedStateChange
|
|
10346
|
+
}, props)),
|
|
10347
|
+
hasLabel && /* @__PURE__ */ jsx("span", {
|
|
10348
|
+
className: clsx(classes.label, (_obj22 = {}, _define_property$R(_obj22, classes.invalidLabel, isInvalid), _define_property$R(_obj22, classes.requiredLabel, hasRequiredLabel && !isRequired), _define_property$R(_obj22, classes.activeLabel, isLabelActive), _define_property$R(_obj22, classes.floating, hasFloatingLabel), // Обсуждаемо, сделал так, потому что не хочется создавать новую пропсу, на каждый чих в стилях
|
|
10349
|
+
_define_property$R(_obj22, classes.floatingWithoutPadding, hasFloatingLabel && border === "bottom"), _define_property$R(_obj22, classes.labelWithIcons, hasControls), _obj22)),
|
|
10350
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
10351
|
+
className: classes.labelText,
|
|
10352
|
+
children: label
|
|
10353
|
+
})
|
|
10354
|
+
})
|
|
10355
|
+
]
|
|
10318
10356
|
}),
|
|
10319
10357
|
shouldShowUnits && /* @__PURE__ */ jsxs("div", {
|
|
10320
10358
|
className: clsx(classes.unitsWrapper, _define_property$R({}, classes.withFloatingLabel, hasFloatingLabel && hasLabel)),
|
|
@@ -10519,7 +10557,6 @@ var DateInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10519
10557
|
}));
|
|
10520
10558
|
});
|
|
10521
10559
|
const reactDatepicker = "";
|
|
10522
|
-
var LEFT_PADDING = 44;
|
|
10523
10560
|
var useStyles$F = createThemedStyles("SearchInput", {
|
|
10524
10561
|
root: {
|
|
10525
10562
|
position: "relative"
|
|
@@ -10544,7 +10581,7 @@ var inputStyles$4 = {
|
|
|
10544
10581
|
borderColor: "transparent",
|
|
10545
10582
|
backgroundColor: rgba(colors.BORDER_MAIN, 0.3),
|
|
10546
10583
|
borderRadius: 18,
|
|
10547
|
-
paddingLeft:
|
|
10584
|
+
paddingLeft: 44,
|
|
10548
10585
|
transitionProperty: "background-color, border-color"
|
|
10549
10586
|
},
|
|
10550
10587
|
focused: {
|
|
@@ -10556,7 +10593,7 @@ var inputStyles$4 = {
|
|
|
10556
10593
|
paddingLeft: 0
|
|
10557
10594
|
},
|
|
10558
10595
|
label: {
|
|
10559
|
-
left:
|
|
10596
|
+
left: 0,
|
|
10560
10597
|
fontSize: 14
|
|
10561
10598
|
}
|
|
10562
10599
|
};
|
|
@@ -11261,6 +11298,7 @@ var useStyles$D = createThemedStyles("Select", {
|
|
|
11261
11298
|
boxSizing: "border-box"
|
|
11262
11299
|
},
|
|
11263
11300
|
inputWrapper: {
|
|
11301
|
+
"--select-arrow-size": "20px",
|
|
11264
11302
|
width: "100%",
|
|
11265
11303
|
cursor: "text",
|
|
11266
11304
|
position: "relative"
|
|
@@ -11284,8 +11322,8 @@ var useStyles$D = createThemedStyles("Select", {
|
|
|
11284
11322
|
position: "absolute",
|
|
11285
11323
|
right: 12,
|
|
11286
11324
|
top: 14,
|
|
11287
|
-
width:
|
|
11288
|
-
height:
|
|
11325
|
+
width: "var(--select-arrow-size)",
|
|
11326
|
+
height: "var(--select-arrow-size)",
|
|
11289
11327
|
cursor: "pointer",
|
|
11290
11328
|
zIndex: 1,
|
|
11291
11329
|
transition: animations.defaultTransition,
|
|
@@ -11320,6 +11358,17 @@ var baseInputStyles = {
|
|
|
11320
11358
|
},
|
|
11321
11359
|
controls: {
|
|
11322
11360
|
paddingRight: 32
|
|
11361
|
+
},
|
|
11362
|
+
label: {
|
|
11363
|
+
"--select-label-max-width": "calc(100% - var(--input-padding-x) - var(--select-arrow-size))",
|
|
11364
|
+
"&:not($labelWithIcons)": {
|
|
11365
|
+
"--label-max-width": "var(--select-label-max-width)"
|
|
11366
|
+
}
|
|
11367
|
+
},
|
|
11368
|
+
requiredLabel: {
|
|
11369
|
+
"&:not($labelWithIcons)": {
|
|
11370
|
+
"--label-max-width": "calc(var(--select-label-max-width) - var(--required-label-size))"
|
|
11371
|
+
}
|
|
11323
11372
|
}
|
|
11324
11373
|
};
|
|
11325
11374
|
var readonlyInputBaseStyles = {
|
|
@@ -11648,7 +11697,7 @@ function _ts_generator$4(thisArg, body) {
|
|
|
11648
11697
|
}
|
|
11649
11698
|
}
|
|
11650
11699
|
function Select(props) {
|
|
11651
|
-
var _input_current;
|
|
11700
|
+
var _input_current_parentElement, _input_current;
|
|
11652
11701
|
var options = props.options, isMultiSelect = props.isMultiSelect, value = props.value, header = props.header, footer = props.footer, defaultOptionLabel = props.defaultOptionLabel, allOptionsLabel = props.allOptionsLabel, _props_debounceTime = props.debounceTime, debounceTime = _props_debounceTime === void 0 ? 400 : _props_debounceTime, _props_optionsMode = props.optionsMode, optionsMode = _props_optionsMode === void 0 ? "normal" : _props_optionsMode, noMatchesLabel = props.noMatchesLabel, loadingLabel = props.loadingLabel, tweakStyles = props.tweakStyles, testId = props.testId, isActive = props.isActive, isReadonly = props.isReadonly, isDisabled = props.isDisabled, dropdownOptions = props.dropdownOptions, _props_minSymbolsCountToOpenList = props.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _props_minSymbolsCountToOpenList === void 0 ? 0 : _props_minSymbolsCountToOpenList, _props_dropdownIcon = props.dropdownIcon, dropdownIcon = _props_dropdownIcon === void 0 ? "chevron-down" : _props_dropdownIcon, _props_shouldScrollToList = props.shouldScrollToList, shouldScrollToList = _props_shouldScrollToList === void 0 ? true : _props_shouldScrollToList, searchInput = props.searchInput, iconType = props.iconType, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, onType = props.onType, onOpen = props.onOpen, _props_isOptionDisabled = props.isOptionDisabled, isOptionDisabled = _props_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _props_isOptionDisabled, _props_compareValuesOnChange = props.compareValuesOnChange, compareValuesOnChange = _props_compareValuesOnChange === void 0 ? defaultCompareFunction : _props_compareValuesOnChange, _props_convertValueToString = props.convertValueToString, convertValueToString = _props_convertValueToString === void 0 ? defaultConvertFunction$2 : _props_convertValueToString, convertValueToId = props.convertValueToId, convertValueToReactNode = props.convertValueToReactNode, optionsFilter = props.optionsFilter, inputProps = _object_without_properties$c(props, [
|
|
11653
11702
|
"options",
|
|
11654
11703
|
"isMultiSelect",
|
|
@@ -11783,12 +11832,12 @@ function Select(props) {
|
|
|
11783
11832
|
convertValueToString
|
|
11784
11833
|
]);
|
|
11785
11834
|
var getDropdownOffset = function() {
|
|
11786
|
-
var
|
|
11787
|
-
if (
|
|
11835
|
+
var _inputWrapper_current;
|
|
11836
|
+
if (inputProps.errorPosition === "top") {
|
|
11788
11837
|
return 0;
|
|
11789
11838
|
}
|
|
11790
|
-
var
|
|
11791
|
-
return (
|
|
11839
|
+
var _inputWrapper_current_offsetHeight;
|
|
11840
|
+
return (_inputWrapper_current_offsetHeight = (_inputWrapper_current = inputWrapper.current) === null || _inputWrapper_current === void 0 ? void 0 : _inputWrapper_current.offsetHeight) !== null && _inputWrapper_current_offsetHeight !== void 0 ? _inputWrapper_current_offsetHeight : 0;
|
|
11792
11841
|
};
|
|
11793
11842
|
var closeList = useCallback(function() {
|
|
11794
11843
|
setIsListOpen(false);
|
|
@@ -12025,11 +12074,11 @@ function Select(props) {
|
|
|
12025
12074
|
(optionsMode === "normal" || hasEnoughSymbolsToSearch)
|
|
12026
12075
|
);
|
|
12027
12076
|
var _ref1 = dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : {}, _ref_shouldUsePopper = _ref1.shouldUsePopper, shouldUsePopper = _ref_shouldUsePopper === void 0 ? false : _ref_shouldUsePopper, _ref_shouldRenderInBody = _ref1.shouldRenderInBody, shouldRenderInBody = _ref_shouldRenderInBody === void 0 ? false : _ref_shouldRenderInBody, _ref_shouldHideOnScroll = _ref1.shouldHideOnScroll, shouldHideOnScroll = _ref_shouldHideOnScroll === void 0 ? false : _ref_shouldHideOnScroll;
|
|
12028
|
-
var
|
|
12077
|
+
var _input_current_parentElement_parentElement;
|
|
12029
12078
|
var popperData = useDropdown({
|
|
12030
12079
|
isOpen,
|
|
12031
12080
|
onDropdownClose: handleListClose,
|
|
12032
|
-
referenceElement: (
|
|
12081
|
+
referenceElement: (_input_current_parentElement_parentElement = (_input_current = input.current) === null || _input_current === void 0 ? void 0 : (_input_current_parentElement = _input_current.parentElement) === null || _input_current_parentElement === void 0 ? void 0 : _input_current_parentElement.parentElement) !== null && _input_current_parentElement_parentElement !== void 0 ? _input_current_parentElement_parentElement : inputWrapper.current,
|
|
12033
12082
|
dropdownElement: list.current,
|
|
12034
12083
|
options: dropdownOptions,
|
|
12035
12084
|
dependenciesForPositionUpdating: [
|
|
@@ -30185,7 +30234,6 @@ function _object_spread_props$6(target, source) {
|
|
|
30185
30234
|
}
|
|
30186
30235
|
return target;
|
|
30187
30236
|
}
|
|
30188
|
-
var PADDING_X = 12;
|
|
30189
30237
|
var useStyles$4 = createThemedStyles("TextArea", {
|
|
30190
30238
|
root: {
|
|
30191
30239
|
width: "100%",
|
|
@@ -30194,6 +30242,7 @@ var useStyles$4 = createThemedStyles("TextArea", {
|
|
|
30194
30242
|
flexDirection: "column"
|
|
30195
30243
|
},
|
|
30196
30244
|
wrapper: {
|
|
30245
|
+
"--textarea-padding-x": "12px",
|
|
30197
30246
|
display: "flex",
|
|
30198
30247
|
position: "relative",
|
|
30199
30248
|
width: "100%",
|
|
@@ -30217,7 +30266,7 @@ var useStyles$4 = createThemedStyles("TextArea", {
|
|
|
30217
30266
|
fontSize: 16,
|
|
30218
30267
|
padding: [
|
|
30219
30268
|
14,
|
|
30220
|
-
|
|
30269
|
+
"var(--textarea-padding-x)",
|
|
30221
30270
|
8
|
|
30222
30271
|
],
|
|
30223
30272
|
scrollPadding: "14px 0 8px",
|
|
@@ -30266,8 +30315,10 @@ var useStyles$4 = createThemedStyles("TextArea", {
|
|
|
30266
30315
|
activeLabel: {
|
|
30267
30316
|
display: "none",
|
|
30268
30317
|
"&$floating": {
|
|
30318
|
+
"--scale-factor": "0.75",
|
|
30269
30319
|
display: "block",
|
|
30270
|
-
transform: "scale(
|
|
30320
|
+
transform: "scale(var(--scale-factor)) translateY(-120%)",
|
|
30321
|
+
maxWidth: "calc(var(--label-max-width) / var(--scale-factor))"
|
|
30271
30322
|
}
|
|
30272
30323
|
},
|
|
30273
30324
|
required: {
|
|
@@ -30284,14 +30335,20 @@ var useStyles$4 = createThemedStyles("TextArea", {
|
|
|
30284
30335
|
},
|
|
30285
30336
|
disabled: {},
|
|
30286
30337
|
label: {
|
|
30338
|
+
"--label-max-width": "calc(100% - 2 * var(--textarea-padding-x))",
|
|
30287
30339
|
position: "absolute",
|
|
30288
30340
|
pointerEvents: "none",
|
|
30289
|
-
left:
|
|
30290
|
-
top:
|
|
30341
|
+
left: "var(--textarea-padding-x)",
|
|
30342
|
+
top: 24,
|
|
30343
|
+
maxWidth: "var(--label-max-width)",
|
|
30291
30344
|
transformOrigin: "top left",
|
|
30292
30345
|
transform: "translateY(-50%)",
|
|
30293
30346
|
transition: animations.defaultTransition,
|
|
30294
|
-
transitionProperty:
|
|
30347
|
+
transitionProperty: [
|
|
30348
|
+
"max-width",
|
|
30349
|
+
"transform",
|
|
30350
|
+
"color"
|
|
30351
|
+
],
|
|
30295
30352
|
fontSize: 16
|
|
30296
30353
|
},
|
|
30297
30354
|
invalid: {
|
|
@@ -30305,18 +30362,27 @@ var useStyles$4 = createThemedStyles("TextArea", {
|
|
|
30305
30362
|
color: "red"
|
|
30306
30363
|
},
|
|
30307
30364
|
requiredLabel: {
|
|
30365
|
+
"--required-label-size": "6px",
|
|
30366
|
+
"--required-label-right": "8px",
|
|
30367
|
+
maxWidth: "calc(100% - 2 * var(--textarea-padding-x) - var(--required-label-right))",
|
|
30308
30368
|
"&:after": {
|
|
30309
30369
|
content: '""',
|
|
30310
30370
|
position: "absolute",
|
|
30311
|
-
right: -
|
|
30371
|
+
right: "calc(-1 * var(--required-label-right))",
|
|
30312
30372
|
top: 4,
|
|
30313
30373
|
transform: "translate(0, -50%)",
|
|
30314
|
-
width:
|
|
30315
|
-
height:
|
|
30374
|
+
width: "var(--required-label-size)",
|
|
30375
|
+
height: "var(--required-label-size)",
|
|
30316
30376
|
borderRadius: "50%",
|
|
30317
30377
|
backgroundColor: "red"
|
|
30318
30378
|
}
|
|
30319
30379
|
},
|
|
30380
|
+
labelText: {
|
|
30381
|
+
display: "block",
|
|
30382
|
+
overflow: "hidden",
|
|
30383
|
+
textOverflow: "ellipsis",
|
|
30384
|
+
whiteSpace: "nowrap"
|
|
30385
|
+
},
|
|
30320
30386
|
symbolsCount: {
|
|
30321
30387
|
display: "block",
|
|
30322
30388
|
textAlign: "right",
|
|
@@ -30502,7 +30568,10 @@ var TextArea = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
|
30502
30568
|
children: [
|
|
30503
30569
|
hasLabel && /* @__PURE__ */ jsx("span", {
|
|
30504
30570
|
className: clsx(classes.label, (_obj1 = {}, _define_property$5(_obj1, classes.invalidLabel, isInvalid), _define_property$5(_obj1, classes.requiredLabel, hasRequiredLabel && !isRequired), _define_property$5(_obj1, classes.activeLabel, hasFocus || hasValue), _define_property$5(_obj1, classes.floating, hasFloatingLabel), _obj1)),
|
|
30505
|
-
children:
|
|
30571
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
30572
|
+
className: classes.labelText,
|
|
30573
|
+
children: label
|
|
30574
|
+
})
|
|
30506
30575
|
}),
|
|
30507
30576
|
/* @__PURE__ */ jsx("textarea", _object_spread$5({
|
|
30508
30577
|
ref
|