@true-engineering/true-react-common-ui-kit 4.0.0-alpha12 → 4.0.0-alpha14

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.
@@ -1,8 +1,7 @@
1
1
  import { ITweakStyles } from '../../theme';
2
2
  import { IControlWrapperStyles } from '../ControlWrapper';
3
3
  import { IWithMessagesStyles } from '../WithMessages';
4
- export declare const useStyles: import("../../theme").IUseStyles<"textarea" | "autoSized" | "wrapper" | "symbolsCount" | "symbolsCountError", unknown>;
5
- export declare const controlWrapperStyles: IControlWrapperStyles;
4
+ export declare const useStyles: import("../../theme").IUseStyles<"textarea" | "autoSized" | "withLabel" | "wrapper" | "symbolsCount" | "symbolsCountError", unknown>;
6
5
  export type ITextAreaStyles = ITweakStyles<typeof useStyles, {
7
6
  tweakWithMessages: IWithMessagesStyles;
8
7
  tweakControlWrapper: IControlWrapperStyles;
@@ -9931,7 +9931,7 @@ var useStyles$H = createThemedStyles("ControlWrapper", {
9931
9931
  position: "absolute",
9932
9932
  pointerEvents: "none",
9933
9933
  left: "var(--control-padding)",
9934
- top: "50%",
9934
+ top: "calc(var(--control-height) / 2)",
9935
9935
  transformOrigin: "top left",
9936
9936
  transform: "translateY(-50%)",
9937
9937
  transition: animations.defaultTransition,
@@ -11001,15 +11001,9 @@ function _object_without_properties_loose$f(source, excluded) {
11001
11001
  return target;
11002
11002
  }
11003
11003
  var SearchInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
11004
- var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, placeholder = _param.placeholder, value = _param.value, testId = _param.testId, tweakStyles = _param.tweakStyles;
11005
- _param.data;
11006
- var props = _object_without_properties$f(_param, [
11004
+ var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, props = _object_without_properties$f(_param, [
11007
11005
  "isClearable",
11008
- "placeholder",
11009
- "value",
11010
- "testId",
11011
- "tweakStyles",
11012
- "data"
11006
+ "tweakStyles"
11013
11007
  ]);
11014
11008
  var tweakInputStyles = useTweakStyles({
11015
11009
  innerStyles: inputStyles$4,
@@ -11019,11 +11013,8 @@ var SearchInput = /* @__PURE__ */ forwardRef(function(_param, ref) {
11019
11013
  });
11020
11014
  return /* @__PURE__ */ jsx(Input, _object_spread$N({
11021
11015
  ref,
11022
- value,
11023
- placeholder,
11024
11016
  icon: "search",
11025
11017
  isClearable,
11026
- testId: getTestId(testId, "input"),
11027
11018
  tweakStyles: tweakInputStyles
11028
11019
  }, props));
11029
11020
  });
@@ -31272,13 +31263,9 @@ var useStyles$4 = createThemedStyles("TextArea", {
31272
31263
  },
31273
31264
  symbolsCountError: {
31274
31265
  color: "red"
31275
- }
31266
+ },
31267
+ withLabel: {}
31276
31268
  });
31277
- var controlWrapperStyles = {
31278
- label: {
31279
- top: 16
31280
- }
31281
- };
31282
31269
  function _array_like_to_array(arr, len) {
31283
31270
  if (len == null || len > arr.length)
31284
31271
  len = arr.length;
@@ -31461,7 +31448,6 @@ var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
31461
31448
  currentComponentName: "TextArea"
31462
31449
  });
31463
31450
  var tweakControlWrapperStyles = useTweakStyles({
31464
- innerStyles: controlWrapperStyles,
31465
31451
  tweakStyles,
31466
31452
  className: "tweakControlWrapper",
31467
31453
  currentComponentName: "TextArea"
@@ -31482,6 +31468,7 @@ var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
31482
31468
  setFocused(false);
31483
31469
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
31484
31470
  };
31471
+ var _obj2;
31485
31472
  return /* @__PURE__ */ jsxs(WithMessages, {
31486
31473
  errorMessage,
31487
31474
  infoMessage,
@@ -31499,10 +31486,10 @@ var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
31499
31486
  size: size2,
31500
31487
  isFullWidth: true,
31501
31488
  children: /* @__PURE__ */ jsx("div", _object_spread_props$5(_object_spread$5({
31502
- className: clsx(classes.wrapper, _define_property$5({}, classes.autoSized, isAutoSized))
31503
- }, isAutoSized && addDataAttributes$1({
31504
- value
31505
- })), {
31489
+ className: clsx(classes.wrapper, (_obj2 = {}, _define_property$5(_obj2, classes.autoSized, isAutoSized), _define_property$5(_obj2, classes.withLabel, hasLabel), _obj2))
31490
+ }, isAutoSized && {
31491
+ "data-value": value
31492
+ }), {
31506
31493
  children: /* @__PURE__ */ jsx("textarea", _object_spread$5({
31507
31494
  ref,
31508
31495
  className: classes.textarea,