@doist/reactist 17.9.0 → 17.10.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.
@@ -1910,11 +1910,10 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
1910
1910
  }, hint) : null);
1911
1911
  });
1912
1912
 
1913
- var modules_2728c236 = {"textAreaContainer":"_61447829","bordered":"_76f4ad88","error":"_4df3452b"};
1913
+ var modules_2728c236 = {"textAreaContainer":"_21dbfa84","innerContainer":"_43588660","bordered":"f081b428","error":"a862f0e5","autoExpand":"_46360b15"};
1914
1914
 
1915
- const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby"];
1916
-
1917
- function TextArea(_ref) {
1915
+ const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
1916
+ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
1918
1917
  let {
1919
1918
  variant = 'default',
1920
1919
  id,
@@ -1926,10 +1925,29 @@ function TextArea(_ref) {
1926
1925
  tone,
1927
1926
  maxWidth,
1928
1927
  hidden,
1929
- 'aria-describedby': ariaDescribedBy
1928
+ 'aria-describedby': ariaDescribedBy,
1929
+ rows,
1930
+ autoExpand = false
1930
1931
  } = _ref,
1931
1932
  props = _objectWithoutProperties(_ref, _excluded$m);
1932
1933
 
1934
+ const containerRef = React.useRef(null);
1935
+ const internalRef = React.useRef(null);
1936
+ const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
1937
+ React.useEffect(function setupAutoExpand() {
1938
+ const containerElement = containerRef.current;
1939
+
1940
+ function handleInput(event) {
1941
+ if (containerElement) {
1942
+ containerElement.dataset.replicatedValue = event.currentTarget.value;
1943
+ }
1944
+ }
1945
+
1946
+ const textAreaElement = internalRef.current;
1947
+ if (!textAreaElement || !autoExpand) return undefined;
1948
+ textAreaElement.addEventListener('input', handleInput);
1949
+ return () => textAreaElement.removeEventListener('input', handleInput);
1950
+ }, [autoExpand]);
1933
1951
  return /*#__PURE__*/React.createElement(BaseField, {
1934
1952
  variant: variant,
1935
1953
  id: id,
@@ -1945,9 +1963,15 @@ function TextArea(_ref) {
1945
1963
  maxWidth: maxWidth
1946
1964
  }, extraProps => /*#__PURE__*/React.createElement(Box, {
1947
1965
  width: "full",
1948
- display: "flex"
1949
- }, /*#__PURE__*/React.createElement("textarea", _objectSpread2(_objectSpread2({}, props), extraProps))));
1950
- }
1966
+ display: "flex",
1967
+ className: modules_2728c236.innerContainer,
1968
+ ref: containerRef
1969
+ }, /*#__PURE__*/React.createElement("textarea", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
1970
+ ref: combinedRef,
1971
+ rows: rows,
1972
+ className: autoExpand ? modules_2728c236.autoExpand : undefined
1973
+ }))));
1974
+ });
1951
1975
 
1952
1976
  const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startIcon"];
1953
1977
  const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
@@ -2374,7 +2398,7 @@ function usePrevious(value) {
2374
2398
  return ref.current;
2375
2399
  }
2376
2400
 
2377
- var modules_40c67f5b = {"tab":"a1064a3b","track":"_06f1b8a1","tab-neutral":"dabbec7d","tab-themed":"e6f5ae4e","track-neutral":"_43913ce5","track-themed":"_39bdfdde","track-xsmall":"_1c148f4e","track-small":"_2a370df5","track-medium":"_77430437","track-large":"_33db5352","track-xlarge":"_60bf9564","track-xxlarge":"_29a35080"};
2401
+ var modules_40c67f5b = {"tab":"e96bf360","track":"_430e252d","tab-neutral":"f631ccbe","tab-themed":"_6ba96acc","track-neutral":"ef4cd8d3","track-themed":"_344b3b10"};
2378
2402
 
2379
2403
  const _excluded$r = ["as", "children", "id", "exceptionallySetClassName"],
2380
2404
  _excluded2$2 = ["children", "space"],
@@ -2419,6 +2443,7 @@ function Tabs({
2419
2443
  * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.
2420
2444
  */
2421
2445
 
2446
+
2422
2447
  const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref, ref) {
2423
2448
  let {
2424
2449
  as,
@@ -2477,7 +2502,7 @@ function TabList(_ref2) {
2477
2502
  position: "relative",
2478
2503
  width: "maxContent"
2479
2504
  }, props), /*#__PURE__*/React.createElement(Box, {
2480
- className: classNames(modules_40c67f5b.track, modules_40c67f5b["track-" + space], modules_40c67f5b["track-" + variant])
2505
+ className: [modules_40c67f5b.track, modules_40c67f5b["track-" + variant]]
2481
2506
  }), /*#__PURE__*/React.createElement(Inline, {
2482
2507
  space: space
2483
2508
  }, children)))
@@ -2487,6 +2512,7 @@ function TabList(_ref2) {
2487
2512
  * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.
2488
2513
  */
2489
2514
 
2515
+
2490
2516
  const TabPanel = /*#__PURE__*/polymorphicComponent(function TabPanel(_ref3, ref) {
2491
2517
  let {
2492
2518
  children,