@zextras/carbonio-design-system 1.1.0 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.2.0](https://github.com/Zextras/carbonio-design-system/compare/v1.1.0...v1.2.0) (2023-02-28)
6
+
7
+
8
+ ### Features
9
+
10
+ * **icons:** update icons ([ffc0078](https://github.com/Zextras/carbonio-design-system/commit/ffc0078e0c0e35cdd67803c57f1c20e0394b761d)), closes [#169](https://github.com/Zextras/carbonio-design-system/issues/169)
11
+ * **Modal:** add a prop to specify the container window ([1ce58e4](https://github.com/Zextras/carbonio-design-system/commit/1ce58e4a309fee68e4a96b0f685629204ecb1fa1)), closes [#171](https://github.com/Zextras/carbonio-design-system/issues/171)
12
+ * **TextArea:** create TextArea component ([1215455](https://github.com/Zextras/carbonio-design-system/commit/12154559fa9737a98f3c7a4248c5e54d3233a691)), closes [#174](https://github.com/Zextras/carbonio-design-system/issues/174)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **Button:** avoid accents to be cut off ([8864376](https://github.com/Zextras/carbonio-design-system/commit/88643761c9607d9e1c843412dee875ef22c4246f)), closes [#175](https://github.com/Zextras/carbonio-design-system/issues/175)
18
+
5
19
  ## [1.1.0](https://github.com/Zextras/carbonio-design-system/compare/v1.0.1...v1.1.0) (2023-02-01)
6
20
 
7
21
 
@@ -19,6 +19,7 @@ import { setDefaultLocale } from 'react-datepicker';
19
19
  import { StyledComponent } from 'styled-components';
20
20
  import { SVGAttributes } from 'react';
21
21
  import { SVGProps } from 'react';
22
+ import { TextareaHTMLAttributes } from 'react';
22
23
  import { ThemeContext } from 'styled-components';
23
24
 
24
25
  export declare const Accordion: React_2.ForwardRefExoticComponent<AccordionProps & React_2.RefAttributes<HTMLDivElement>>;
@@ -966,6 +967,8 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
966
967
  [K in keyof HTMLElementEventMap]: HTMLElementEventMap[K] extends KeyboardEvent ? K : never;
967
968
  }[keyof HTMLElementEventMap];
968
969
 
970
+ declare type HTMLTextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
971
+
969
972
  export declare const Icon: StyledComponent<React_2.ForwardRefExoticComponent<IconComponentProps & React_2.RefAttributes<SVGSVGElement>>, DefaultTheme, Required<Pick<IconProps, "color" | "size">> & IconProps & React_2.SVGAttributes<SVGSVGElement>, "color" | "size">;
970
973
 
971
974
  export declare const IconButton: React_2.ForwardRefExoticComponent<IconButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
@@ -1269,6 +1272,11 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
1269
1272
  disablePortal?: boolean | undefined;
1270
1273
  /** Content of the modal */
1271
1274
  children?: React_2.ReactNode | React_2.ReactNode[];
1275
+ /**
1276
+ * The window where to insert the Portal's children.
1277
+ * The default value is 'windowObj' obtained from the ThemContext.
1278
+ * */
1279
+ containerWindow?: Window | undefined;
1272
1280
  /** Label for copy button in the Error Modal */
1273
1281
  copyLabel?: ModalFooterProps['errorActionLabel'];
1274
1282
  /** Close icon tooltip label */
@@ -1361,6 +1369,11 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
1361
1369
  disablePortal?: boolean;
1362
1370
  /** Content of the modal */
1363
1371
  children?: React_2.ReactNode | React_2.ReactNode[];
1372
+ /**
1373
+ * The window where to insert the Portal's children.
1374
+ * The default value is 'windowObj' obtained from the ThemContext.
1375
+ * */
1376
+ containerWindow?: Window;
1364
1377
  /** Label for copy button in the Error Modal */
1365
1378
  copyLabel?: ModalFooterProps['errorActionLabel'];
1366
1379
  /** Close icon tooltip label */
@@ -1848,6 +1861,31 @@ export declare function generateHighlightSet(fromColorSet: Parameters<typeof gen
1848
1861
  declare const Text_2: React_2.ForwardRefExoticComponent<TextProps & React_2.RefAttributes<HTMLDivElement>>;
1849
1862
  export { Text_2 as Text }
1850
1863
 
1864
+ export declare type TextArea = ReturnType<typeof React_2.forwardRef<HTMLDivElement, TextAreaProps>> & {
1865
+ _newId?: number;
1866
+ };
1867
+
1868
+ export declare const TextArea: TextArea;
1869
+
1870
+ export declare interface TextAreaProps extends HTMLTextAreaProps {
1871
+ /** Description - helper text */
1872
+ description?: string;
1873
+ /** Error state */
1874
+ hasError?: boolean;
1875
+ /** Ref for the textarea element */
1876
+ textAreaRef?: React_2.Ref<HTMLTextAreaElement> | null;
1877
+ /** Label for the textarea */
1878
+ label?: string;
1879
+ /** Background color for the textarea */
1880
+ backgroundColor?: string | keyof DefaultTheme['palette'];
1881
+ /** Color for the text */
1882
+ textColor?: string;
1883
+ /** Max height for the text area, limit beyond which the scroll is enabled */
1884
+ maxHeight?: string;
1885
+ /** Divider color */
1886
+ borderColor?: string | keyof DefaultTheme['palette'];
1887
+ }
1888
+
1851
1889
  declare type TextOverflow = 'ellipsis' | 'break-word';
1852
1890
 
1853
1891
  export declare interface TextProps extends HTMLAttributes<HTMLDivElement> {
@@ -7586,7 +7586,7 @@ const StyledButton = styled__default["default"].button.attrs(_ref8 => {
7586
7586
  }).withConfig({
7587
7587
  displayName: "Button__StyledButton",
7588
7588
  componentId: "sc-1oof15b-3"
7589
- })(["line-height:1;display:flex;justify-content:center;align-items:center;position:relative;text-transform:uppercase;padding:", ";gap:", ";width:", ";max-width:100%;min-width:0;", "{order:", ";}", "{order:", ";}border:", ";border-radius:", ";", ";cursor:pointer;&:disabled{cursor:default;}"], _ref9 => {
7589
+ })(["line-height:normal;display:flex;justify-content:center;align-items:center;position:relative;text-transform:uppercase;padding:", ";gap:", ";width:", ";max-width:100%;min-width:0;", "{order:", ";}", "{order:", ";}border:", ";border-radius:", ";", ";cursor:pointer;&:disabled{cursor:default;}"], _ref9 => {
7590
7590
  let {
7591
7591
  outerPadding
7592
7592
  } = _ref9;
@@ -7932,7 +7932,7 @@ const Link = /*#__PURE__*/React__default["default"].forwardRef(function LinkFn(_
7932
7932
  }, rest), children);
7933
7933
  });
7934
7934
 
7935
- const ContainerEl$5 = styled__default["default"].div.withConfig({
7935
+ const ContainerEl$4 = styled__default["default"].div.withConfig({
7936
7936
  displayName: "Container__ContainerEl",
7937
7937
  componentId: "sc-1ihvhjw-0"
7938
7938
  })(["display:flex;flex-direction:", ";align-items:", ";justify-content:", ";flex-wrap:", ";flex-grow:", ";flex-shrink:", ";flex-basis:", ";", ";border-radius:", ";background:", ";box-sizing:border-box;width:", ";min-width:", ";max-width:", ";height:", ";min-height:", ";max-height:", ";", ";padding:", ";gap:", ";&::-webkit-scrollbar{width:0.5rem;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-thumb{background-color:", ";border-radius:0.25rem;}"], _ref => {
@@ -8074,7 +8074,7 @@ const Container = /*#__PURE__*/React__default["default"].forwardRef(function Con
8074
8074
  ...rest
8075
8075
  } = _ref21;
8076
8076
  const direction = React.useMemo(() => orientation.replace('horizontal', 'row').replace('vertical', 'column'), [orientation]);
8077
- return /*#__PURE__*/React__default["default"].createElement(ContainerEl$5, _extends({
8077
+ return /*#__PURE__*/React__default["default"].createElement(ContainerEl$4, _extends({
8078
8078
  ref: ref,
8079
8079
  orientation: direction
8080
8080
  }, rest), children);
@@ -8127,7 +8127,7 @@ Padding.defaultProps = {
8127
8127
  height: 'fit-content'
8128
8128
  };
8129
8129
 
8130
- const CustomText$8 = styled__default["default"](Text).withConfig({
8130
+ const CustomText$6 = styled__default["default"](Text).withConfig({
8131
8131
  displayName: "LoadMore__CustomText",
8132
8132
  componentId: "sc-jeh4v5-0"
8133
8133
  })(["user-select:none;"]);
@@ -8145,13 +8145,13 @@ const LoadMore = /*#__PURE__*/React__default["default"].forwardRef(function Load
8145
8145
  icon: "Sync"
8146
8146
  }), label && /*#__PURE__*/React__default["default"].createElement(Padding, {
8147
8147
  left: "small"
8148
- }, /*#__PURE__*/React__default["default"].createElement(CustomText$8, null, label)));
8148
+ }, /*#__PURE__*/React__default["default"].createElement(CustomText$6, null, label)));
8149
8149
  });
8150
8150
 
8151
- const DividerEl$2 = styled__default["default"].div.withConfig({
8151
+ const DividerEl = styled__default["default"].div.withConfig({
8152
8152
  displayName: "Divider__DividerEl",
8153
8153
  componentId: "sc-deqttz-0"
8154
- })(["box-sizing:border-box;border-bottom:0.0625rem solid ", ";height:0.0625rem;max-height:0.0625rem;min-height:0.0625rem;width:100%;"], _ref => {
8154
+ })(["box-sizing:border-box;background-color:", ";height:0.0625rem;max-height:0.0625rem;min-height:0.0625rem;width:100%;"], _ref => {
8155
8155
  let {
8156
8156
  theme,
8157
8157
  color
@@ -8163,7 +8163,7 @@ const Divider = /*#__PURE__*/React__default["default"].forwardRef(function Divid
8163
8163
  color = 'gray2',
8164
8164
  ...rest
8165
8165
  } = _ref2;
8166
- return /*#__PURE__*/React__default["default"].createElement(DividerEl$2, _extends({
8166
+ return /*#__PURE__*/React__default["default"].createElement(DividerEl, _extends({
8167
8167
  ref: ref,
8168
8168
  color: color
8169
8169
  }, rest));
@@ -8301,7 +8301,7 @@ Paragraph.defaultProps = {
8301
8301
  overflow: 'break-word'
8302
8302
  };
8303
8303
 
8304
- const ContainerEl$4 = styled__default["default"](Container).withConfig({
8304
+ const ContainerEl$3 = styled__default["default"](Container).withConfig({
8305
8305
  displayName: "Row__ContainerEl",
8306
8306
  componentId: "sc-1tnd2kq-0"
8307
8307
  })(["display:", ";flex-basis:", ";flex-grow:", ";flex-shrink:", ";order:", ";", ";"], _ref => {
@@ -8340,7 +8340,7 @@ const Row = /*#__PURE__*/React__default["default"].forwardRef(function RowFn(_re
8340
8340
  children,
8341
8341
  ...rest
8342
8342
  } = _ref7;
8343
- return /*#__PURE__*/React__default["default"].createElement(ContainerEl$4, _extends({
8343
+ return /*#__PURE__*/React__default["default"].createElement(ContainerEl$3, _extends({
8344
8344
  ref: ref
8345
8345
  }, rest), children);
8346
8346
  });
@@ -8421,7 +8421,7 @@ const IconWrapper$2 = styled__default["default"].div.withConfig({
8421
8421
  } = _ref2;
8422
8422
  return !disabled && styled.css(["&:focus{outline:none;> ", "{color:", ";}}&:hover{outline:none;> ", "{color:", ";}}&:active{outline:none;> ", "{color:", ";}}"], Icon, getColor(`${iconColor}.focus`, theme), Icon, getColor(`${iconColor}.hover`, theme), Icon, getColor(`${iconColor}.active`, theme));
8423
8423
  });
8424
- const CustomText$7 = styled__default["default"](Text).withConfig({
8424
+ const CustomText$5 = styled__default["default"](Text).withConfig({
8425
8425
  displayName: "Checkbox__CustomText",
8426
8426
  componentId: "sc-1hxecij-1"
8427
8427
  })(["user-select:none;line-height:1.5;"]);
@@ -8474,7 +8474,7 @@ const Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function Chec
8474
8474
  disabled: disabled
8475
8475
  })), label && /*#__PURE__*/React__default["default"].createElement(Padding, {
8476
8476
  left: "small"
8477
- }, /*#__PURE__*/React__default["default"].createElement(CustomText$7, {
8477
+ }, /*#__PURE__*/React__default["default"].createElement(CustomText$5, {
8478
8478
  size: size,
8479
8479
  weight: "regular",
8480
8480
  overflow: "break-word",
@@ -10163,7 +10163,7 @@ function some(collection, predicate, guard) {
10163
10163
 
10164
10164
  var some_1 = some;
10165
10165
 
10166
- const ContainerEl$3 = styled__default["default"](Container).withConfig({
10166
+ const ContainerEl$2 = styled__default["default"](Container).withConfig({
10167
10167
  displayName: "Dropdown__ContainerEl",
10168
10168
  componentId: "sc-1jmq2vf-0"
10169
10169
  })(["user-select:none;outline:none;", ";"], _ref => {
@@ -10235,7 +10235,7 @@ function PopperListItem(_ref3) {
10235
10235
  onClick(e);
10236
10236
  }
10237
10237
  }, [onClick, disabled, keepOpen]);
10238
- return /*#__PURE__*/React__default["default"].createElement(ContainerEl$3, _extends({
10238
+ return /*#__PURE__*/React__default["default"].createElement(ContainerEl$2, _extends({
10239
10239
  ref: itemRef,
10240
10240
  "data-keep-open": keepOpen,
10241
10241
  className: selected ? 'zapp-selected' : '',
@@ -10286,7 +10286,7 @@ function NestListItem(_ref4) {
10286
10286
  const itemRef = React.useRef(null);
10287
10287
  const keyEvents = React.useMemo(() => onClick && getKeyboardPreset('listItem', onClick) || [], [onClick]);
10288
10288
  useKeyboard(itemRef, keyEvents);
10289
- return /*#__PURE__*/React__default["default"].createElement(ContainerEl$3, _extends({
10289
+ return /*#__PURE__*/React__default["default"].createElement(ContainerEl$2, _extends({
10290
10290
  "data-keep-open": keepOpen,
10291
10291
  ref: itemRef,
10292
10292
  className: selected ? 'zapp-selected' : '',
@@ -10703,7 +10703,71 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(function Drop
10703
10703
  }))));
10704
10704
  });
10705
10705
 
10706
- const ContainerEl$2 = styled__default["default"](Container).withConfig({
10706
+ /*
10707
+ * SPDX-FileCopyrightText: 2023 Zextras <https://www.zextras.com>
10708
+ *
10709
+ * SPDX-License-Identifier: AGPL-3.0-only
10710
+ */
10711
+ const InputDescription = styled__default["default"](Text).attrs({
10712
+ overflow: 'break-word',
10713
+ size: 'extrasmall'
10714
+ }).withConfig({
10715
+ displayName: "InputDescription",
10716
+ componentId: "sc-6reo41-0"
10717
+ })(["line-height:1.5;padding-top:0.25rem;min-height:calc(", " * 1.5);"], _ref => {
10718
+ let {
10719
+ theme,
10720
+ size
10721
+ } = _ref;
10722
+ return theme.sizes.font[size];
10723
+ });
10724
+
10725
+ /*
10726
+ * SPDX-FileCopyrightText: 2023 Zextras <https://www.zextras.com>
10727
+ *
10728
+ * SPDX-License-Identifier: AGPL-3.0-only
10729
+ */
10730
+ const InputLabel = styled__default["default"].label.attrs(_ref => {
10731
+ let {
10732
+ $hasError,
10733
+ $hasFocus
10734
+ } = _ref;
10735
+ return {
10736
+ $textColor: $hasError && 'error' || $hasFocus && 'primary' || 'secondary'
10737
+ };
10738
+ }).withConfig({
10739
+ displayName: "InputLabel",
10740
+ componentId: "sc-1p96644-0"
10741
+ })(["position:absolute;top:50%;left:0.75rem;font-size:", ";font-weight:", ";font-family:", ";line-height:1.5;color:", ";transform:translateY(-50%);transition:transform 150ms ease-out,font-size 150ms ease-out,top 150ms ease-out,left 150ms ease-out;cursor:inherit;user-select:none;max-width:calc(100% - ", ");white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"], _ref2 => {
10742
+ let {
10743
+ theme
10744
+ } = _ref2;
10745
+ return theme.sizes.font.medium;
10746
+ }, _ref3 => {
10747
+ let {
10748
+ theme
10749
+ } = _ref3;
10750
+ return theme.fonts.weight.regular;
10751
+ }, _ref4 => {
10752
+ let {
10753
+ theme
10754
+ } = _ref4;
10755
+ return theme.fonts.default;
10756
+ }, _ref5 => {
10757
+ let {
10758
+ theme,
10759
+ $textColor,
10760
+ $disabled
10761
+ } = _ref5;
10762
+ return getColor(`${$textColor}.${$disabled ? 'disabled' : 'regular'}`, theme);
10763
+ }, _ref6 => {
10764
+ let {
10765
+ theme
10766
+ } = _ref6;
10767
+ return `${theme.sizes.padding.large} * 2`;
10768
+ });
10769
+
10770
+ const ContainerEl$1 = styled__default["default"](Container).withConfig({
10707
10771
  displayName: "ChipInput__ContainerEl",
10708
10772
  componentId: "sc-1y52mik-0"
10709
10773
  })(["cursor:", ";position:relative;", ";padding:", " 0.75rem;gap:0.5rem;min-height:calc( ", " * 1.5 + ", " * 1.5 + 0.125rem );border-radius:0.125rem 0.125rem 0 0;"], _ref => {
@@ -10812,7 +10876,7 @@ const HiddenSpan = styled__default["default"].span.withConfig({
10812
10876
  displayName: "ChipInput__HiddenSpan",
10813
10877
  componentId: "sc-1y52mik-3"
10814
10878
  })(["position:absolute;height:0;overflow:hidden;white-space:pre;"]);
10815
- const InputContainer$1 = styled__default["default"].div.withConfig({
10879
+ const InputContainer$2 = styled__default["default"].div.withConfig({
10816
10880
  displayName: "ChipInput__InputContainer",
10817
10881
  componentId: "sc-1y52mik-4"
10818
10882
  })(["position:relative;flex:1 1 auto;overflow-wrap:break-word;max-width:100%;"]);
@@ -10855,91 +10919,47 @@ const AdjustWidthInput = /*#__PURE__*/React__default["default"].forwardRef(funct
10855
10919
  }
10856
10920
  };
10857
10921
  }, [confirmChipOnBlur, inputRef, resizeInput]);
10858
- return /*#__PURE__*/React__default["default"].createElement(InputContainer$1, null, /*#__PURE__*/React__default["default"].createElement(HiddenSpan, {
10922
+ return /*#__PURE__*/React__default["default"].createElement(InputContainer$2, null, /*#__PURE__*/React__default["default"].createElement(HiddenSpan, {
10859
10923
  ref: hiddenSpanRef
10860
10924
  }), /*#__PURE__*/React__default["default"].createElement(InputEl$2, _extends({}, inputProps, {
10861
10925
  ref: inputRef
10862
10926
  })));
10863
10927
  });
10864
- const Label$3 = styled__default["default"].label.withConfig({
10928
+ const Label$4 = styled__default["default"](InputLabel).withConfig({
10865
10929
  displayName: "ChipInput__Label",
10866
10930
  componentId: "sc-1y52mik-5"
10867
- })(["position:absolute;top:50%;left:0.75rem;font-size:", ";font-weight:", ";font-family:", ";line-height:1.5;color:", ";transform:translateY(-50%);transition:transform 150ms ease-out,font-size 150ms ease-out,top 150ms ease-out,left 150ms ease-out;pointer-events:none;user-select:none;max-width:calc(100% - ", ");white-space:nowrap;overflow:hidden;text-overflow:ellipsis;", ":focus-within + &{top:0.0625rem;transform:translateY(0);font-size:", ";}", ";"], _ref18 => {
10931
+ })(["", ":focus-within + &{top:0.0625rem;transform:translateY(0);font-size:", ";}", ";"], InputContainer$2, _ref18 => {
10868
10932
  let {
10869
10933
  theme
10870
10934
  } = _ref18;
10871
- return theme.sizes.font.medium;
10935
+ return theme.sizes.font.extrasmall;
10872
10936
  }, _ref19 => {
10873
10937
  let {
10938
+ $hasItems,
10874
10939
  theme
10875
10940
  } = _ref19;
10876
- return theme.fonts.weight.regular;
10877
- }, _ref20 => {
10878
- let {
10879
- theme
10880
- } = _ref20;
10881
- return theme.fonts.default;
10882
- }, _ref21 => {
10883
- let {
10884
- theme,
10885
- hasError,
10886
- hasFocus,
10887
- disabled
10888
- } = _ref21;
10889
- return getColor(`${hasError && 'error' || hasFocus && 'primary' || 'secondary'}.${disabled ? 'disabled' : 'regular'}`, theme);
10890
- }, _ref22 => {
10891
- let {
10892
- theme
10893
- } = _ref22;
10894
- return `${theme.sizes.padding.large} * 2`;
10895
- }, InputContainer$1, _ref23 => {
10896
- let {
10897
- theme
10898
- } = _ref23;
10899
- return theme.sizes.font.extrasmall;
10900
- }, _ref24 => {
10901
- let {
10902
- hasItems,
10903
- theme
10904
- } = _ref24;
10905
- return hasItems && styled.css(["top:0.0625rem;transform:translateY(0);font-size:", ";"], theme.sizes.font.extrasmall);
10941
+ return $hasItems && styled.css(["top:0.0625rem;transform:translateY(0);font-size:", ";"], theme.sizes.font.extrasmall);
10906
10942
  });
10907
10943
  const CustomIconContainer$1 = styled__default["default"].span.withConfig({
10908
10944
  displayName: "ChipInput__CustomIconContainer",
10909
10945
  componentId: "sc-1y52mik-6"
10910
10946
  })(["align-self:center;"]);
10911
- const DividerEl$1 = styled__default["default"](Divider).withConfig({
10912
- displayName: "ChipInput__DividerEl",
10947
+ const CustomInputDescription = styled__default["default"](InputDescription).withConfig({
10948
+ displayName: "ChipInput__CustomInputDescription",
10913
10949
  componentId: "sc-1y52mik-7"
10914
- })(["&:disabled{color:", ";}"], _ref25 => {
10915
- let {
10916
- theme,
10917
- color
10918
- } = _ref25;
10919
- return getColor(`${color}.disabled`, theme);
10920
- });
10921
- const CustomText$6 = styled__default["default"](Text).withConfig({
10922
- displayName: "ChipInput__CustomText",
10923
- componentId: "sc-1y52mik-8"
10924
- })(["line-height:1.5;padding-top:0.25rem;min-height:calc(", " * 1.5);background-color:", ";"], _ref26 => {
10925
- let {
10926
- theme,
10927
- size
10928
- } = _ref26;
10929
- return theme.sizes.font[size];
10930
- }, _ref27 => {
10950
+ })(["background-color:", ";"], _ref20 => {
10931
10951
  let {
10932
10952
  $backgroundColor,
10933
10953
  theme
10934
- } = _ref27;
10954
+ } = _ref20;
10935
10955
  return $backgroundColor && getColor($backgroundColor, theme);
10936
10956
  });
10937
- const CustomIcon$1 = styled__default["default"](_ref28 => {
10957
+ const CustomIcon$1 = styled__default["default"](_ref21 => {
10938
10958
  let {
10939
10959
  onClick,
10940
10960
  iconColor,
10941
10961
  ...rest
10942
- } = _ref28;
10962
+ } = _ref21;
10943
10963
  return onClick ? /*#__PURE__*/React__default["default"].createElement(IconButton, _extends({
10944
10964
  onClick: onClick,
10945
10965
  iconColor: iconColor
@@ -10948,11 +10968,11 @@ const CustomIcon$1 = styled__default["default"](_ref28 => {
10948
10968
  }, rest));
10949
10969
  }).withConfig({
10950
10970
  displayName: "ChipInput__CustomIcon",
10951
- componentId: "sc-1y52mik-9"
10952
- })(["padding:0.125rem;", ";"], _ref29 => {
10971
+ componentId: "sc-1y52mik-8"
10972
+ })(["padding:0.125rem;", ";"], _ref22 => {
10953
10973
  let {
10954
10974
  onClick
10955
- } = _ref29;
10975
+ } = _ref22;
10956
10976
  return !onClick && styled.css(["width:1.25rem;height:1.25rem;"]);
10957
10977
  });
10958
10978
  function reducer(state, action) {
@@ -10990,7 +11010,7 @@ function DefaultOnAdd(valueToAdd) {
10990
11010
  label: 'unknown value'
10991
11011
  };
10992
11012
  }
10993
- const ChipInput = /*#__PURE__*/React__default["default"].forwardRef(function ChipInputFn(_ref30, ref) {
11013
+ const ChipInput = /*#__PURE__*/React__default["default"].forwardRef(function ChipInputFn(_ref23, ref) {
10994
11014
  let {
10995
11015
  inputRef = null,
10996
11016
  inputName,
@@ -11028,7 +11048,7 @@ const ChipInput = /*#__PURE__*/React__default["default"].forwardRef(function Chi
11028
11048
  wrap = 'wrap',
11029
11049
  maxHeight = '8.125rem',
11030
11050
  ...rest
11031
- } = _ref30;
11051
+ } = _ref23;
11032
11052
  const [items, dispatch] = React.useReducer(reducer, defaultValue || value || []);
11033
11053
  const [isActive, setIsActive] = React.useState(false);
11034
11054
  const inputElRef = useCombinedRefs(inputRef);
@@ -11234,6 +11254,7 @@ const ChipInput = /*#__PURE__*/React__default["default"].forwardRef(function Chi
11234
11254
  }
11235
11255
  }, [createChipOnPaste, pasteSeparators, requireUniqueChips, savePastedValue]);
11236
11256
  const ChipComp = React.useMemo(() => ChipComponent || Chip, [ChipComponent]);
11257
+ const dividerColor = React.useMemo(() => `${hideBorder && 'transparent' || hasError && 'error' || hasFocus && 'primary' || bottomBorderColor}${disabled ? '.disabled' : ''}`, [bottomBorderColor, disabled, hasError, hasFocus, hideBorder]);
11237
11258
  return /*#__PURE__*/React__default["default"].createElement(Container, {
11238
11259
  height: "fit",
11239
11260
  width: "fill",
@@ -11248,7 +11269,7 @@ const ChipInput = /*#__PURE__*/React__default["default"].forwardRef(function Chi
11248
11269
  onClose: onClose,
11249
11270
  disabled: dropdownDisabled,
11250
11271
  maxHeight: dropdownMaxHeight
11251
- }, /*#__PURE__*/React__default["default"].createElement(ContainerEl$2, _extends({
11272
+ }, /*#__PURE__*/React__default["default"].createElement(ContainerEl$1, _extends({
11252
11273
  ref: ref,
11253
11274
  orientation: "horizontal",
11254
11275
  width: "fill",
@@ -11286,25 +11307,23 @@ const ChipInput = /*#__PURE__*/React__default["default"].forwardRef(function Chi
11286
11307
  separators: separatorKeys,
11287
11308
  confirmChipOnBlur: confirmChipOnBlur,
11288
11309
  onPaste: onPaste
11289
- }), placeholder && /*#__PURE__*/React__default["default"].createElement(Label$3, {
11310
+ }), placeholder && /*#__PURE__*/React__default["default"].createElement(Label$4, {
11290
11311
  htmlFor: id,
11291
- hasFocus: hasFocus,
11292
- hasError: hasError,
11293
- disabled: disabled && dropdownDisabled && (!iconAction || iconDisabled),
11294
- hasItems: items.length > 0 || !!inputElRef.current?.value
11312
+ $hasFocus: hasFocus,
11313
+ $hasError: hasError,
11314
+ $disabled: disabled && dropdownDisabled && (!iconAction || iconDisabled),
11315
+ $hasItems: items.length > 0 || !!inputElRef.current?.value
11295
11316
  }, placeholder)), icon && /*#__PURE__*/React__default["default"].createElement(CustomIconContainer$1, null, /*#__PURE__*/React__default["default"].createElement(CustomIcon$1, {
11296
11317
  icon: icon,
11297
11318
  onClick: iconAction,
11298
11319
  disabled: iconDisabled,
11299
11320
  iconColor: iconColor,
11300
11321
  size: "large"
11301
- })))), /*#__PURE__*/React__default["default"].createElement(DividerEl$1, {
11302
- color: hideBorder && 'transparent' || hasError && 'error' || hasFocus && 'primary' || bottomBorderColor
11303
- }), (hasError && errorLabel !== undefined || description !== undefined) && /*#__PURE__*/React__default["default"].createElement(CustomText$6, {
11304
- size: "extrasmall",
11322
+ })))), /*#__PURE__*/React__default["default"].createElement(Divider, {
11323
+ color: dividerColor
11324
+ }), (hasError && errorLabel !== undefined || description !== undefined) && /*#__PURE__*/React__default["default"].createElement(CustomInputDescription, {
11305
11325
  color: hasError && 'error' || hasFocus && 'primary' || 'secondary',
11306
11326
  disabled: disabled && dropdownDisabled && (!iconAction || iconDisabled),
11307
- overflow: "break-word",
11308
11327
  $backgroundColor: errorBackgroundColor
11309
11328
  }, hasError && errorLabel || description));
11310
11329
  });
@@ -11381,7 +11400,7 @@ const EmailComposerInputWrapper = styled__default["default"].div.withConfig({
11381
11400
  } = _ref10;
11382
11401
  return placeholderType === 'default' ? '0' : theme.sizes.padding.medium;
11383
11402
  });
11384
- const InputContainer = styled__default["default"].div.withConfig({
11403
+ const InputContainer$1 = styled__default["default"].div.withConfig({
11385
11404
  displayName: "EmailComposerInput__InputContainer",
11386
11405
  componentId: "sc-7qn0kk-4"
11387
11406
  })(["flex-grow:1;flex-basis:0;max-width:100%;font-family:'Roboto',sans-serif;overflow:hidden;> input{width:100%;height:", ";margin:0;border:none;color:", ";padding:0;background-color:transparent !important;font-size:", ";line-height:", ";&:focus{outline:none;}}"], _ref11 => {
@@ -11443,7 +11462,7 @@ const EmailComposerInput = /*#__PURE__*/React__default["default"].forwardRef(fun
11443
11462
  role: "textbox"
11444
11463
  }, rest), /*#__PURE__*/React__default["default"].createElement(EmailComposerInputWrapper, {
11445
11464
  placeholderType: placeholderType
11446
- }, placeholderType === 'inline' ? /*#__PURE__*/React__default["default"].createElement(PlaceholderInline, null, placeholder) : /*#__PURE__*/React__default["default"].createElement(PlaceholderDefault, null, placeholder), /*#__PURE__*/React__default["default"].createElement(InputContainer, null, /*#__PURE__*/React__default["default"].createElement("input", {
11465
+ }, placeholderType === 'inline' ? /*#__PURE__*/React__default["default"].createElement(PlaceholderInline, null, placeholder) : /*#__PURE__*/React__default["default"].createElement(PlaceholderDefault, null, placeholder), /*#__PURE__*/React__default["default"].createElement(InputContainer$1, null, /*#__PURE__*/React__default["default"].createElement("input", {
11447
11466
  style: {
11448
11467
  transition: 'background 0.2s ease-out'
11449
11468
  },
@@ -11525,7 +11544,7 @@ const IconWrapper$1 = styled__default["default"].div.withConfig({
11525
11544
  } = _ref5;
11526
11545
  return !disabled && styled.css(["transition:background 0.2s ease-out;&:focus{outline:none;background:", ";svg{fill:", ";}}&:hover{outline:none;background:", ";svg{fill:", ";}}&:active{outline:none;background:", ";}"], theme.palette[isActive ? 'primary' : 'transparent'].focus, isActive ? theme.palette.gray6.focus : theme.palette.primary.focus, theme.palette[isActive ? 'primary' : 'transparent'].hover, isActive ? theme.palette.gray6.hover : theme.palette.primary.hover, theme.palette[isActive ? 'primary' : 'transparent'].active);
11527
11546
  });
11528
- const CustomText$5 = styled__default["default"](Text).withConfig({
11547
+ const CustomText$4 = styled__default["default"](Text).withConfig({
11529
11548
  displayName: "IconCheckbox__CustomText",
11530
11549
  componentId: "sc-1sflcvp-1"
11531
11550
  })(["white-space:normal;padding-left:", ";user-select:none;"], _ref6 => {
@@ -11589,7 +11608,7 @@ const IconCheckbox = /*#__PURE__*/React__default["default"].forwardRef(function
11589
11608
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
11590
11609
  size: iconSize,
11591
11610
  icon: icon
11592
- }))), label && /*#__PURE__*/React__default["default"].createElement(CustomText$5, {
11611
+ }))), label && /*#__PURE__*/React__default["default"].createElement(CustomText$4, {
11593
11612
  size: "medium",
11594
11613
  weight: "regular"
11595
11614
  }, label));
@@ -11659,9 +11678,14 @@ const MultiButton = /*#__PURE__*/React__default["default"].forwardRef(function M
11659
11678
  }, rest)));
11660
11679
  });
11661
11680
 
11662
- const ContainerEl$1 = styled__default["default"](Container).withConfig({
11663
- displayName: "Input__ContainerEl",
11664
- componentId: "sc-1ssz6rm-0"
11681
+ /*
11682
+ * SPDX-FileCopyrightText: 2023 Zextras <https://www.zextras.com>
11683
+ *
11684
+ * SPDX-License-Identifier: AGPL-3.0-only
11685
+ */
11686
+ const InputContainer = styled__default["default"](Container).withConfig({
11687
+ displayName: "InputContainer",
11688
+ componentId: "sc-s8x21t-0"
11665
11689
  })(["position:relative;", ";padding:", " 0.75rem;gap:0.5rem;min-height:calc( ", " * 1.5 + ", " * 1.5 + 0.125rem );"], _ref => {
11666
11690
  let {
11667
11691
  $disabled,
@@ -11685,99 +11709,52 @@ const ContainerEl$1 = styled__default["default"](Container).withConfig({
11685
11709
  } = _ref4;
11686
11710
  return theme.sizes.font.extrasmall;
11687
11711
  });
11712
+
11688
11713
  const InputEl$1 = styled__default["default"].input.withConfig({
11689
11714
  displayName: "Input__InputEl",
11690
- componentId: "sc-1ssz6rm-1"
11691
- })(["border:none !important;height:auto !important;width:100%;outline:0;background:transparent !important;font-size:", ";font-weight:", ";font-family:", ";color:", ";&:disabled{color:", ";}transition:background 0.2s ease-out;line-height:1.5;padding:0;&::placeholder{color:transparent;font-size:0;}"], _ref5 => {
11715
+ componentId: "sc-1ssz6rm-0"
11716
+ })(["border:none !important;height:auto !important;width:100%;outline:0;background:transparent !important;font-size:", ";font-weight:", ";font-family:", ";color:", ";&:disabled{color:", ";}transition:background 0.2s ease-out;line-height:1.5;padding:0;&::placeholder{color:transparent;font-size:0;}"], _ref => {
11692
11717
  let {
11693
11718
  theme
11694
- } = _ref5;
11719
+ } = _ref;
11695
11720
  return theme.sizes.font.medium;
11696
- }, _ref6 => {
11721
+ }, _ref2 => {
11697
11722
  let {
11698
11723
  theme
11699
- } = _ref6;
11724
+ } = _ref2;
11700
11725
  return theme.fonts.weight.regular;
11701
- }, _ref7 => {
11726
+ }, _ref3 => {
11702
11727
  let {
11703
11728
  theme
11704
- } = _ref7;
11729
+ } = _ref3;
11705
11730
  return theme.fonts.default;
11706
- }, _ref8 => {
11731
+ }, _ref4 => {
11707
11732
  let {
11708
11733
  theme,
11709
11734
  color
11710
- } = _ref8;
11735
+ } = _ref4;
11711
11736
  return getColor(color, theme);
11712
- }, _ref9 => {
11737
+ }, _ref5 => {
11713
11738
  let {
11714
11739
  theme,
11715
11740
  color
11716
- } = _ref9;
11741
+ } = _ref5;
11717
11742
  return getColor(`${color}.disabled`, theme);
11718
11743
  });
11719
- const Label$2 = styled__default["default"].label.withConfig({
11744
+ const Label$3 = styled__default["default"](InputLabel).withConfig({
11720
11745
  displayName: "Input__Label",
11721
- componentId: "sc-1ssz6rm-2"
11722
- })(["position:absolute;top:50%;left:0.75rem;font-size:", ";font-weight:", ";font-family:", ";line-height:1.5;color:", ";transform:translateY(-50%);transition:transform 150ms ease-out,font-size 150ms ease-out,top 150ms ease-out,left 150ms ease-out;pointer-events:none;user-select:none;max-width:calc(100% - ", ");white-space:nowrap;overflow:hidden;text-overflow:ellipsis;", ":focus + &,", ":not(:placeholder-shown) + &{top:0.0625rem;transform:translateY(0);font-size:", ";}"], _ref10 => {
11723
- let {
11724
- theme
11725
- } = _ref10;
11726
- return theme.sizes.font.medium;
11727
- }, _ref11 => {
11728
- let {
11729
- theme
11730
- } = _ref11;
11731
- return theme.fonts.weight.regular;
11732
- }, _ref12 => {
11733
- let {
11734
- theme
11735
- } = _ref12;
11736
- return theme.fonts.default;
11737
- }, _ref13 => {
11738
- let {
11739
- theme,
11740
- hasError,
11741
- hasFocus,
11742
- disabled
11743
- } = _ref13;
11744
- return getColor(`${hasError && 'error' || hasFocus && 'primary' || 'secondary'}.${disabled ? 'disabled' : 'regular'}`, theme);
11745
- }, _ref14 => {
11746
- let {
11747
- theme
11748
- } = _ref14;
11749
- return `${theme.sizes.padding.large} * 2`;
11750
- }, InputEl$1, InputEl$1, _ref15 => {
11746
+ componentId: "sc-1ssz6rm-1"
11747
+ })(["", ":focus + &,", ":not(:placeholder-shown) + &{top:0.0625rem;transform:translateY(0);font-size:", ";}"], InputEl$1, InputEl$1, _ref6 => {
11751
11748
  let {
11752
11749
  theme
11753
- } = _ref15;
11750
+ } = _ref6;
11754
11751
  return theme.sizes.font.extrasmall;
11755
11752
  });
11756
11753
  const CustomIconContainer = styled__default["default"].span.withConfig({
11757
11754
  displayName: "Input__CustomIconContainer",
11758
- componentId: "sc-1ssz6rm-3"
11755
+ componentId: "sc-1ssz6rm-2"
11759
11756
  })(["align-self:center;"]);
11760
- const DividerEl = styled__default["default"](Divider).withConfig({
11761
- displayName: "Input__DividerEl",
11762
- componentId: "sc-1ssz6rm-4"
11763
- })(["&:disabled{color:", ";}"], _ref16 => {
11764
- let {
11765
- theme,
11766
- color
11767
- } = _ref16;
11768
- return getColor(`${color}.disabled`, theme);
11769
- });
11770
- const CustomText$4 = styled__default["default"](Text).withConfig({
11771
- displayName: "Input__CustomText",
11772
- componentId: "sc-1ssz6rm-5"
11773
- })(["line-height:1.5;padding-top:0.25rem;min-height:calc(", " * 1.5);"], _ref17 => {
11774
- let {
11775
- theme,
11776
- size
11777
- } = _ref17;
11778
- return theme.sizes.font[size];
11779
- });
11780
- const Input = /*#__PURE__*/React__default["default"].forwardRef(function InputFn(_ref18, ref) {
11757
+ const Input = /*#__PURE__*/React__default["default"].forwardRef(function InputFn(_ref7, ref) {
11781
11758
  let {
11782
11759
  autoFocus = false,
11783
11760
  autoComplete = 'off',
@@ -11798,7 +11775,7 @@ const Input = /*#__PURE__*/React__default["default"].forwardRef(function InputFn
11798
11775
  onEnter,
11799
11776
  description,
11800
11777
  ...rest
11801
- } = _ref18;
11778
+ } = _ref7;
11802
11779
  const [hasFocus, setHasFocus] = React.useState(false);
11803
11780
  const innerRef = useCombinedRefs(inputRef);
11804
11781
  const [id] = React.useState(() => {
@@ -11831,11 +11808,12 @@ const Input = /*#__PURE__*/React__default["default"].forwardRef(function InputFn
11831
11808
  return events;
11832
11809
  }, [onEnter]);
11833
11810
  useKeyboard(innerRef, keyboardEvents);
11811
+ const dividerColor = React.useMemo(() => `${hideBorder && 'transparent' || hasError && 'error' || hasFocus && 'primary' || borderColor}${disabled ? '.disabled' : ''}`, [borderColor, disabled, hasError, hasFocus, hideBorder]);
11834
11812
  return /*#__PURE__*/React__default["default"].createElement(Container, {
11835
11813
  height: "fit",
11836
11814
  width: "fill",
11837
11815
  crossAlignment: "flex-start"
11838
- }, /*#__PURE__*/React__default["default"].createElement(ContainerEl$1, _extends({
11816
+ }, /*#__PURE__*/React__default["default"].createElement(InputContainer, _extends({
11839
11817
  ref: ref,
11840
11818
  orientation: "horizontal",
11841
11819
  width: "fill",
@@ -11864,22 +11842,20 @@ const Input = /*#__PURE__*/React__default["default"].forwardRef(function InputFn
11864
11842
  onChange: onChange,
11865
11843
  disabled: disabled,
11866
11844
  placeholder: label
11867
- }), label && /*#__PURE__*/React__default["default"].createElement(Label$2, {
11845
+ }), label && /*#__PURE__*/React__default["default"].createElement(Label$3, {
11868
11846
  htmlFor: id,
11869
- hasFocus: hasFocus,
11870
- hasError: hasError,
11871
- disabled: disabled
11847
+ $hasFocus: hasFocus,
11848
+ $hasError: hasError,
11849
+ $disabled: disabled
11872
11850
  }, label), CustomIcon && /*#__PURE__*/React__default["default"].createElement(CustomIconContainer, null, /*#__PURE__*/React__default["default"].createElement(CustomIcon, {
11873
11851
  hasError: hasError,
11874
11852
  hasFocus: hasFocus,
11875
11853
  disabled: disabled
11876
- }))), /*#__PURE__*/React__default["default"].createElement(DividerEl, {
11877
- color: hideBorder && 'transparent' || hasError && 'error' || hasFocus && 'primary' || borderColor
11878
- }), description !== undefined && /*#__PURE__*/React__default["default"].createElement(CustomText$4, {
11879
- size: "extrasmall",
11854
+ }))), /*#__PURE__*/React__default["default"].createElement(Divider, {
11855
+ color: dividerColor
11856
+ }), description !== undefined && /*#__PURE__*/React__default["default"].createElement(InputDescription, {
11880
11857
  color: hasError && 'error' || hasFocus && 'primary' || 'secondary',
11881
- disabled: disabled,
11882
- overflow: "break-word"
11858
+ disabled: disabled
11883
11859
  }, description));
11884
11860
  });
11885
11861
  Input._newId = 0;
@@ -12075,7 +12051,7 @@ const InputEl = styled__default["default"].input.withConfig({
12075
12051
  } = _ref3;
12076
12052
  return theme.fonts.default;
12077
12053
  });
12078
- const Label$1 = styled__default["default"].label.withConfig({
12054
+ const Label$2 = styled__default["default"].label.withConfig({
12079
12055
  displayName: "SearchInput__Label",
12080
12056
  componentId: "sc-1x8msad-1"
12081
12057
  })(["position:absolute;left:calc( ", " + ", " + 0.125rem );font-size:", ";font-weight:", ";font-family:", ";color:", ";display:", ";"], _ref4 => {
@@ -12144,7 +12120,7 @@ const SearchInput = /*#__PURE__*/React__default["default"].forwardRef(function S
12144
12120
  position: 'relative'
12145
12121
  },
12146
12122
  onClick: onInputFocus
12147
- }, rest), /*#__PURE__*/React__default["default"].createElement(Label$1, {
12123
+ }, rest), /*#__PURE__*/React__default["default"].createElement(Label$2, {
12148
12124
  htmlFor: "search",
12149
12125
  active: active || comboRef.current !== null && comboRef.current.value !== ''
12150
12126
  }, "Search"), /*#__PURE__*/React__default["default"].createElement(Container, {
@@ -12208,7 +12184,7 @@ function isNil(value) {
12208
12184
 
12209
12185
  var isNil_1 = isNil;
12210
12186
 
12211
- const Label = styled__default["default"](Text).withConfig({
12187
+ const Label$1 = styled__default["default"](Text).withConfig({
12212
12188
  displayName: "Select__Label",
12213
12189
  componentId: "sc-1l1iaf2-0"
12214
12190
  })(["position:absolute;top:", ";left:", ";transform:translateY(", ");transition:150ms ease-out;"], _ref => {
@@ -12284,7 +12260,7 @@ const DefaultLabelFactory = _ref6 => {
12284
12260
  }, /*#__PURE__*/React__default["default"].createElement(CustomText$2, {
12285
12261
  size: "medium",
12286
12262
  color: disabled ? 'secondary' : 'text'
12287
- }, selectedLabels)), /*#__PURE__*/React__default["default"].createElement(Label, {
12263
+ }, selectedLabels)), /*#__PURE__*/React__default["default"].createElement(Label$1, {
12288
12264
  $selected: !isEmpty_1(selected),
12289
12265
  size: !isEmpty_1(selected) ? 'small' : 'medium',
12290
12266
  color: disabled && 'gray2' || (open || focus) && 'primary' || 'secondary'
@@ -21912,6 +21888,211 @@ const Slider = /*#__PURE__*/React__default["default"].forwardRef(function Slider
21912
21888
  }, stepComponents));
21913
21889
  });
21914
21890
 
21891
+ const StyledTextArea = styled__default["default"].textarea.withConfig({
21892
+ displayName: "TextArea__StyledTextArea",
21893
+ componentId: "sc-1bbn7sx-0"
21894
+ })(["resize:none;width:100%;max-height:100%;overflow-y:hidden;outline:none;background:transparent;font-size:", ";font-weight:", ";font-family:", ";line-height:1.5;border:none;padding:0;margin:0;&:disabled{color:", ";}&::placeholder{color:transparent;font-size:0;user-select:none;}"], _ref => {
21895
+ let {
21896
+ theme
21897
+ } = _ref;
21898
+ return theme.sizes.font.medium;
21899
+ }, _ref2 => {
21900
+ let {
21901
+ theme
21902
+ } = _ref2;
21903
+ return theme.fonts.weight.regular;
21904
+ }, _ref3 => {
21905
+ let {
21906
+ theme
21907
+ } = _ref3;
21908
+ return theme.fonts.default;
21909
+ }, _ref4 => {
21910
+ let {
21911
+ theme,
21912
+ $color
21913
+ } = _ref4;
21914
+ return getColor(`${$color}.disabled`, theme);
21915
+ });
21916
+ const GrowContainer = styled__default["default"].div.withConfig({
21917
+ displayName: "TextArea__GrowContainer",
21918
+ componentId: "sc-1bbn7sx-1"
21919
+ })(["width:100%;height:auto;margin-top:", ";max-height:", ";overflow-y:auto;font-size:", ";font-weight:", ";font-family:", ";line-height:1.5;cursor:auto;display:grid;&::after{content:attr(data-replicated-value) ' ';white-space:pre-wrap;visibility:hidden;}& > textarea,&::after{grid-area:1 / 1 / 2 / 2;}&::-webkit-scrollbar{width:0.5rem;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-thumb{background-color:", ";border-radius:0.25rem;}"], _ref5 => {
21920
+ let {
21921
+ $hasLabel,
21922
+ theme
21923
+ } = _ref5;
21924
+ return $hasLabel ? styled.css(["calc(", " * 1.5)"], theme.sizes.font.extrasmall) : '0px';
21925
+ }, _ref6 => {
21926
+ let {
21927
+ $maxHeight
21928
+ } = _ref6;
21929
+ return $maxHeight;
21930
+ }, _ref7 => {
21931
+ let {
21932
+ theme
21933
+ } = _ref7;
21934
+ return theme.sizes.font.medium;
21935
+ }, _ref8 => {
21936
+ let {
21937
+ theme
21938
+ } = _ref8;
21939
+ return theme.fonts.weight.regular;
21940
+ }, _ref9 => {
21941
+ let {
21942
+ theme
21943
+ } = _ref9;
21944
+ return theme.fonts.default;
21945
+ }, _ref10 => {
21946
+ let {
21947
+ theme
21948
+ } = _ref10;
21949
+ return theme.palette.gray2.regular;
21950
+ });
21951
+ const AdjustHeightTextArea = /*#__PURE__*/React__default["default"].forwardRef(function AdjustTextAreaHeightFn(_ref11, ref) {
21952
+ let {
21953
+ hasLabel,
21954
+ onInput,
21955
+ color,
21956
+ ...props
21957
+ } = _ref11;
21958
+ const {
21959
+ maxHeight
21960
+ } = props;
21961
+ const containerRef = React.useRef(null);
21962
+ const textAreaRef = useCombinedRefs(ref);
21963
+ React.useEffect(() => {
21964
+ if (containerRef.current) {
21965
+ // init grow container value to textarea value
21966
+ containerRef.current.dataset.replicatedValue = textAreaRef.current?.value || '';
21967
+ }
21968
+ }, [textAreaRef]);
21969
+ const resizeTextArea = React.useCallback(() => {
21970
+ if (containerRef.current) {
21971
+ containerRef.current.dataset.replicatedValue = textAreaRef.current?.value || '';
21972
+ }
21973
+ }, [textAreaRef]);
21974
+ const onInputHandler = React.useCallback(event => {
21975
+ resizeTextArea();
21976
+ onInput?.(event);
21977
+ }, [resizeTextArea, onInput]);
21978
+ return /*#__PURE__*/React__default["default"].createElement(GrowContainer, {
21979
+ $hasLabel: hasLabel,
21980
+ $maxHeight: maxHeight,
21981
+ ref: containerRef
21982
+ }, /*#__PURE__*/React__default["default"].createElement(StyledTextArea, _extends({}, props, {
21983
+ $color: color,
21984
+ onInput: onInputHandler,
21985
+ rows: 1,
21986
+ ref: textAreaRef
21987
+ })));
21988
+ });
21989
+ const Label = styled__default["default"](InputLabel).withConfig({
21990
+ displayName: "TextArea__Label",
21991
+ componentId: "sc-1bbn7sx-2"
21992
+ })(["", ":focus-within &{top:0.0625rem;transform:translateY(0);font-size:", ";}", ";"], InputContainer, _ref12 => {
21993
+ let {
21994
+ theme
21995
+ } = _ref12;
21996
+ return theme.sizes.font.extrasmall;
21997
+ }, _ref13 => {
21998
+ let {
21999
+ $textAreaHasValue,
22000
+ theme
22001
+ } = _ref13;
22002
+ return $textAreaHasValue && styled.css(["top:0.0625rem;transform:translateY(0);font-size:", ";"], theme.sizes.font.extrasmall);
22003
+ });
22004
+ const TextArea = /*#__PURE__*/React__default["default"].forwardRef(function TextAreaFn(_ref14, ref) {
22005
+ let {
22006
+ maxHeight = '10.313rem',
22007
+ hasError,
22008
+ textAreaRef = null,
22009
+ label,
22010
+ description,
22011
+ backgroundColor = 'gray5',
22012
+ textColor = 'text',
22013
+ borderColor = 'gray2',
22014
+ ...props
22015
+ } = _ref14;
22016
+ const {
22017
+ defaultValue,
22018
+ value,
22019
+ onInput,
22020
+ disabled,
22021
+ onFocus,
22022
+ onBlur
22023
+ } = props;
22024
+ const innerTextAreaRef = useCombinedRefs(textAreaRef);
22025
+ const [hasFocus, setHasFocus] = React.useState(false);
22026
+ const [textAreaHasValue, setTextAreaHasValue] = React.useState(!!defaultValue || !!value);
22027
+ const [id] = React.useState(() => {
22028
+ if (TextArea._newId === undefined) {
22029
+ TextArea._newId = 0;
22030
+ }
22031
+ TextArea._newId += 1;
22032
+ return `textarea-${TextArea._newId}`;
22033
+ });
22034
+ const onTextAreaFocus = React.useCallback(event => {
22035
+ if (!disabled && innerTextAreaRef.current) {
22036
+ setHasFocus(true);
22037
+ }
22038
+ onFocus?.(event);
22039
+ }, [disabled, innerTextAreaRef, onFocus]);
22040
+ const onTextAreaBlur = React.useCallback(event => {
22041
+ setHasFocus(false);
22042
+ onBlur?.(event);
22043
+ }, [onBlur]);
22044
+ const onTextAreaInput = React.useCallback(event => {
22045
+ setTextAreaHasValue(!!event.currentTarget.value);
22046
+ onInput?.(event);
22047
+ }, [onInput]);
22048
+ const forceFocusOnTextArea = React.useCallback(() => {
22049
+ if (!disabled && innerTextAreaRef.current) {
22050
+ setHasFocus(true);
22051
+ innerTextAreaRef.current.focus();
22052
+ }
22053
+ }, [disabled, innerTextAreaRef]);
22054
+ const dividerColor = React.useMemo(() => `${hasError && 'error' || hasFocus && 'primary' || borderColor}${disabled ? '.disabled' : ''}`, [borderColor, disabled, hasError, hasFocus]);
22055
+ const descriptionColor = React.useMemo(() => hasError && 'error' || hasFocus && 'primary' || 'secondary', [hasError, hasFocus]);
22056
+ return /*#__PURE__*/React__default["default"].createElement(Container, {
22057
+ height: "fit",
22058
+ width: "fill",
22059
+ crossAlignment: "flex-start",
22060
+ ref: ref
22061
+ }, /*#__PURE__*/React__default["default"].createElement(InputContainer, {
22062
+ orientation: "horizontal",
22063
+ width: "fill",
22064
+ height: "fit",
22065
+ crossAlignment: label ? 'flex-end' : 'center',
22066
+ borderRadius: "half",
22067
+ background: backgroundColor,
22068
+ onClick: forceFocusOnTextArea,
22069
+ $disabled: disabled,
22070
+ $hasLabel: !!label
22071
+ }, /*#__PURE__*/React__default["default"].createElement(AdjustHeightTextArea, _extends({
22072
+ maxHeight: maxHeight,
22073
+ placeholder: label,
22074
+ color: textColor
22075
+ }, props, {
22076
+ id: id,
22077
+ ref: innerTextAreaRef,
22078
+ onInput: onTextAreaInput,
22079
+ onFocus: onTextAreaFocus,
22080
+ onBlur: onTextAreaBlur,
22081
+ hasLabel: !!label
22082
+ })), label && /*#__PURE__*/React__default["default"].createElement(Label, {
22083
+ htmlFor: id,
22084
+ $hasFocus: hasFocus,
22085
+ $hasError: hasError,
22086
+ $disabled: disabled,
22087
+ $textAreaHasValue: textAreaHasValue
22088
+ }, label)), /*#__PURE__*/React__default["default"].createElement(Divider, {
22089
+ color: dividerColor
22090
+ }), description !== undefined && /*#__PURE__*/React__default["default"].createElement(InputDescription, {
22091
+ color: descriptionColor,
22092
+ disabled: disabled
22093
+ }, description));
22094
+ });
22095
+
21915
22096
  const DEFAULT_TRANSITION_TIMING = 'cubic-bezier(0.4, 0, 0.2, 1)';
21916
22097
  const DEFAULT_TRANSITION_DURATION = 225;
21917
22098
  const STYLES = {
@@ -24036,6 +24217,7 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef(function ModalFn
24036
24217
  minHeight,
24037
24218
  maxHeight,
24038
24219
  children,
24220
+ containerWindow,
24039
24221
  disablePortal = false,
24040
24222
  zIndex = 999,
24041
24223
  onClick,
@@ -24044,8 +24226,9 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef(function ModalFn
24044
24226
  } = _ref;
24045
24227
  const [delayedOpen, setDelayedOpen] = React.useState(false);
24046
24228
  const {
24047
- windowObj
24229
+ windowObj: themeWindowObj
24048
24230
  } = React.useContext(styled.ThemeContext);
24231
+ const windowObj = containerWindow ?? themeWindowObj;
24049
24232
  const innerRef = React.useRef(null);
24050
24233
  const modalRef = useCombinedRefs(ref, innerRef);
24051
24234
  const modalContentRef = React.useRef(null);
@@ -24115,7 +24298,8 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef(function ModalFn
24115
24298
  }, [open]);
24116
24299
  return /*#__PURE__*/React__default["default"].createElement(Portal, {
24117
24300
  show: open,
24118
- disablePortal: disablePortal
24301
+ disablePortal: disablePortal,
24302
+ container: windowObj.document.body
24119
24303
  }, /*#__PURE__*/React__default["default"].createElement(ModalContainer, _extends({
24120
24304
  ref: modalRef,
24121
24305
  open: delayedOpen,
@@ -30285,7 +30469,7 @@ const SvgZed = props => /*#__PURE__*/React__namespace.createElement("svg", _exte
30285
30469
  var SvgZed$1 = SvgZed;
30286
30470
 
30287
30471
  /*
30288
- * SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
30472
+ * SPDX-FileCopyrightText: 2023 Zextras <https://www.zextras.com>
30289
30473
  *
30290
30474
  * SPDX-License-Identifier: AGPL-3.0-only
30291
30475
  */
@@ -30667,6 +30851,26 @@ const SvgAzListOutline = props => /*#__PURE__*/React__namespace.createElement("s
30667
30851
  }));
30668
30852
  var SvgAzListOutline$1 = SvgAzListOutline;
30669
30853
 
30854
+ const SvgChevronSortDownOutline = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
30855
+ width: 24,
30856
+ height: 24,
30857
+ fill: "none",
30858
+ xmlns: "http://www.w3.org/2000/svg"
30859
+ }, props), /*#__PURE__*/React__namespace.createElement("path", {
30860
+ d: "M14.806 13H9.194a1.165 1.165 0 0 0-1.06.673 1.425 1.425 0 0 0 .173 1.487l2.806 3.431A1.175 1.175 0 0 0 12 19a1.164 1.164 0 0 0 .886-.409l2.807-3.431a1.42 1.42 0 0 0 .173-1.487 1.165 1.165 0 0 0-1.06-.673ZM12 5a1.146 1.146 0 0 0-.886.427l-2.807 3.4a1.4 1.4 0 0 0-.173 1.473 1.174 1.174 0 0 0 1.06.7h5.612a1.173 1.173 0 0 0 1.06-.7 1.4 1.4 0 0 0-.173-1.473l-2.806-3.4A1.146 1.146 0 0 0 12 5ZM9.394 9.667 12 6.453l2.666 3.214H9.394Z"
30861
+ }));
30862
+ var SvgChevronSortDownOutline$1 = SvgChevronSortDownOutline;
30863
+
30864
+ const SvgChevronSortUpOutline = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
30865
+ width: 24,
30866
+ height: 24,
30867
+ fill: "none",
30868
+ xmlns: "http://www.w3.org/2000/svg"
30869
+ }, props), /*#__PURE__*/React__namespace.createElement("path", {
30870
+ d: "M14.806 11H9.194a1.165 1.165 0 0 1-1.06-.673 1.425 1.425 0 0 1 .173-1.487l2.806-3.431A1.174 1.174 0 0 1 12 5a1.164 1.164 0 0 1 .886.409l2.807 3.431a1.42 1.42 0 0 1 .173 1.487 1.165 1.165 0 0 1-1.06.673ZM12 19a1.146 1.146 0 0 1-.886-.427l-2.807-3.4a1.4 1.4 0 0 1-.173-1.473 1.174 1.174 0 0 1 1.06-.7h5.612a1.173 1.173 0 0 1 1.06.7 1.4 1.4 0 0 1-.173 1.473l-2.806 3.4A1.146 1.146 0 0 1 12 19Zm-2.606-4.667L12 17.547l2.666-3.214H9.394Z"
30871
+ }));
30872
+ var SvgChevronSortUpOutline$1 = SvgChevronSortUpOutline;
30873
+
30670
30874
  const SvgZaListOutline = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
30671
30875
  width: 24,
30672
30876
  height: 24,
@@ -35538,7 +35742,7 @@ const SvgZedOutline = props => /*#__PURE__*/React__namespace.createElement("svg"
35538
35742
  var SvgZedOutline$1 = SvgZedOutline;
35539
35743
 
35540
35744
  /*
35541
- * SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
35745
+ * SPDX-FileCopyrightText: 2023 Zextras <https://www.zextras.com>
35542
35746
  *
35543
35747
  * SPDX-License-Identifier: AGPL-3.0-only
35544
35748
  */
@@ -35546,6 +35750,8 @@ var SvgZedOutline$1 = SvgZedOutline;
35546
35750
  var outlineData = /*#__PURE__*/Object.freeze({
35547
35751
  __proto__: null,
35548
35752
  AzListOutline: SvgAzListOutline$1,
35753
+ ChevronSortDownOutline: SvgChevronSortDownOutline$1,
35754
+ ChevronSortUpOutline: SvgChevronSortUpOutline$1,
35549
35755
  ZaListOutline: SvgZaListOutline$1,
35550
35756
  AcceptanceMeetingOutline: SvgAcceptanceMeetingOutline$1,
35551
35757
  ActiveBoardOutline: SvgActiveBoardOutline$1,
@@ -36558,6 +36764,7 @@ exports.Switch = Switch;
36558
36764
  exports.TabBar = TabBar;
36559
36765
  exports.Table = Table;
36560
36766
  exports.Text = Text;
36767
+ exports.TextArea = TextArea;
36561
36768
  exports.TextWithTooltip = TextWithTooltip;
36562
36769
  exports.ThemeProvider = ThemeProvider;
36563
36770
  exports.Tooltip = Tooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zextras/carbonio-design-system",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "An awesome UI for Zextras Projects.",
5
5
  "main": "dist/zapp-ui.bundle.js",
6
6
  "types": "dist/zapp-ui.bundle.d.ts",