@iress-oss/ids-components 6.0.0-alpha.16 → 6.0.0-alpha.18

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.
Files changed (46) hide show
  1. package/dist/components/Autocomplete/Autocomplete.styles.js +5 -1
  2. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +53 -51
  3. package/dist/components/Badge/Badge.styles.js +2 -0
  4. package/dist/components/Card/Card.styles.d.ts +1 -1
  5. package/dist/components/Card/Card.styles.js +3 -1
  6. package/dist/components/Checkbox/Checkbox.styles.js +2 -0
  7. package/dist/components/Expander/Expander.styles.js +2 -0
  8. package/dist/components/Filter/Filter.styles.d.ts +1 -1
  9. package/dist/components/Filter/components/FilterSearch.d.ts +2 -1
  10. package/dist/components/Input/Input.d.ts +15 -6
  11. package/dist/components/Input/Input.js +92 -82
  12. package/dist/components/Input/Input.styles.d.ts +8 -0
  13. package/dist/components/Input/Input.styles.js +11 -1
  14. package/dist/components/Modal/Modal.styles.d.ts +0 -1
  15. package/dist/components/Modal/Modal.styles.js +7 -3
  16. package/dist/components/Panel/Panel.styles.js +2 -0
  17. package/dist/components/Popover/Popover.styles.js +2 -0
  18. package/dist/components/Progress/Progress.d.ts +6 -1
  19. package/dist/components/Progress/Progress.js +38 -36
  20. package/dist/components/Progress/Progress.styles.js +8 -0
  21. package/dist/components/Radio/Radio.styles.js +2 -0
  22. package/dist/components/RichSelect/RichSelect.styles.js +2 -0
  23. package/dist/components/RichSelect/SelectBody/SelectBody.styles.js +2 -0
  24. package/dist/components/RichSelect/SelectMenu/SelectMenu.styles.js +2 -0
  25. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.styles.js +2 -0
  26. package/dist/components/RichSelect/SelectTags/SelectTags.styles.js +2 -0
  27. package/dist/components/Select/Select.styles.js +4 -2
  28. package/dist/components/Slideout/Slideout.js +1 -1
  29. package/dist/components/Slideout/Slideout.styles.js +4 -1
  30. package/dist/components/Slider/Slider.styles.js +2 -0
  31. package/dist/components/Spinner/Spinner.d.ts +22 -3
  32. package/dist/components/Spinner/Spinner.js +35 -19
  33. package/dist/components/Spinner/Spinner.styles.d.ts +1 -0
  34. package/dist/components/Spinner/Spinner.styles.js +32 -4
  35. package/dist/components/Spinner/index.js +3 -2
  36. package/dist/components/TabSet/TabSet.styles.js +2 -0
  37. package/dist/components/Tag/Tag.styles.d.ts +6 -0
  38. package/dist/components/Tag/Tag.styles.js +10 -2
  39. package/dist/components/Toggle/Toggle.styles.js +2 -0
  40. package/dist/components/Tooltip/Tooltip.styles.js +4 -2
  41. package/dist/main.js +108 -107
  42. package/dist/patterns/Loading/Loading.styles.d.ts +1 -1
  43. package/dist/patterns/Shadow/Shadow.js +110 -38
  44. package/dist/style.css +1 -1
  45. package/dist/styled-system/types/prop-type.d.ts +1 -1
  46. package/package.json +3 -2
@@ -3,7 +3,11 @@ const p = o({
3
3
  slots: ["root", "popoverContent", "optionList"],
4
4
  base: {
5
5
  root: {},
6
- popoverContent: {},
6
+ popoverContent: {
7
+ _empty: {
8
+ display: "none"
9
+ }
10
+ },
7
11
  optionList: {
8
12
  _empty: {
9
13
  display: "none"
@@ -1,8 +1,8 @@
1
- import { useRef as h, useState as T, useCallback as g, useEffect as _, useMemo as L } from "react";
1
+ import { useRef as g, useState as T, useCallback as p, useEffect as _, useMemo as L } from "react";
2
2
  import { searchLabelValues as U } from "../../../helpers/label-value/searchLabelValues.js";
3
3
  import { highlightQueryInLabelValue as I } from "../../../helpers/label-value/highlightQueryInLabelValue.js";
4
4
  function V(r, n, u, c) {
5
- var a = this, t = h(null), f = h(0), s = h(0), e = h(null), l = h([]), i = h(), p = h(), E = h(r), v = h(!0);
5
+ var a = this, t = g(null), f = g(0), s = g(0), e = g(null), i = g([]), l = g(), d = g(), E = g(r), v = g(!0);
6
6
  E.current = r;
7
7
  var S = typeof window < "u", m = !n && n !== 0 && S;
8
8
  if (typeof r != "function") throw new TypeError("Expected a function");
@@ -15,42 +15,42 @@ function V(r, n, u, c) {
15
15
  }, []);
16
16
  var M = L(function() {
17
17
  var x = function(o) {
18
- var d = l.current, b = i.current;
19
- return l.current = i.current = null, f.current = o, s.current = s.current || o, p.current = E.current.apply(b, d);
20
- }, D = function(o, d) {
21
- m && cancelAnimationFrame(e.current), e.current = m ? requestAnimationFrame(o) : setTimeout(o, d);
18
+ var h = i.current, b = l.current;
19
+ return i.current = l.current = null, f.current = o, s.current = s.current || o, d.current = E.current.apply(b, h);
20
+ }, D = function(o, h) {
21
+ m && cancelAnimationFrame(e.current), e.current = m ? requestAnimationFrame(o) : setTimeout(o, h);
22
22
  }, O = function(o) {
23
23
  if (!v.current) return !1;
24
- var d = o - t.current;
25
- return !t.current || d >= n || d < 0 || R && o - f.current >= y;
24
+ var h = o - t.current;
25
+ return !t.current || h >= n || h < 0 || R && o - f.current >= y;
26
26
  }, Q = function(o) {
27
- return e.current = null, A && l.current ? x(o) : (l.current = i.current = null, p.current);
27
+ return e.current = null, A && i.current ? x(o) : (i.current = l.current = null, d.current);
28
28
  }, F = function o() {
29
- var d = Date.now();
30
- if (w && s.current === f.current && N(), O(d)) return Q(d);
29
+ var h = Date.now();
30
+ if (w && s.current === f.current && N(), O(h)) return Q(h);
31
31
  if (v.current) {
32
- var b = n - (d - t.current), k = R ? Math.min(b, y - (d - f.current)) : b;
32
+ var b = n - (h - t.current), k = R ? Math.min(b, y - (h - f.current)) : b;
33
33
  D(o, k);
34
34
  }
35
35
  }, N = function() {
36
36
  c && c({});
37
37
  }, W = function() {
38
38
  if (S || H) {
39
- var o = Date.now(), d = O(o);
40
- if (l.current = [].slice.call(arguments), i.current = a, t.current = o, d) {
41
- if (!e.current && v.current) return f.current = t.current, D(F, n), w ? x(t.current) : p.current;
39
+ var o = Date.now(), h = O(o);
40
+ if (i.current = [].slice.call(arguments), l.current = a, t.current = o, h) {
41
+ if (!e.current && v.current) return f.current = t.current, D(F, n), w ? x(t.current) : d.current;
42
42
  if (R) return D(F, n), x(t.current);
43
43
  }
44
- return e.current || D(F, n), p.current;
44
+ return e.current || D(F, n), d.current;
45
45
  }
46
46
  };
47
47
  return W.cancel = function() {
48
48
  var o = e.current;
49
- o && (m ? cancelAnimationFrame(e.current) : clearTimeout(e.current)), f.current = 0, l.current = t.current = i.current = e.current = null, o && c && c({});
49
+ o && (m ? cancelAnimationFrame(e.current) : clearTimeout(e.current)), f.current = 0, i.current = t.current = l.current = e.current = null, o && c && c({});
50
50
  }, W.isPending = function() {
51
51
  return !!e.current;
52
52
  }, W.flush = function() {
53
- return e.current ? Q(Date.now()) : p.current;
53
+ return e.current ? Q(Date.now()) : d.current;
54
54
  }, W;
55
55
  }, [w, R, n, y, A, m, S, H, c]);
56
56
  return M;
@@ -59,15 +59,15 @@ function B(r, n) {
59
59
  return r === n;
60
60
  }
61
61
  function C(r, n, u) {
62
- var c = B, a = h(r), t = T({})[1], f = V(g(function(e) {
62
+ var c = B, a = g(r), t = T({})[1], f = V(p(function(e) {
63
63
  a.current = e, t({});
64
- }, [t]), n, u, t), s = h(r);
64
+ }, [t]), n, u, t), s = g(r);
65
65
  return c(s.current, r) || (f(r), s.current = r), [a.current, f];
66
66
  }
67
67
  const G = 500, P = 1, j = (r) => r instanceof Error && r.message ? r.message : typeof r == "string" ? r : !0, z = () => {
68
- const [r, n] = T(!1), [u, c] = T(!1), [a, t] = T([]), [f, s] = T(!1), e = g(() => {
68
+ const [r, n] = T(!1), [u, c] = T(!1), [a, t] = T([]), [f, s] = T(!1), e = p(() => {
69
69
  t([]), n(!1), c(!1), s(!1);
70
- }, []), l = g(
70
+ }, []), i = p(
71
71
  (m, w) => {
72
72
  t(
73
73
  m.map(
@@ -76,15 +76,15 @@ const G = 500, P = 1, j = (r) => r instanceof Error && r.message ? r.message : t
76
76
  ), c(!1), n(!1);
77
77
  },
78
78
  []
79
- ), i = g((m) => {
79
+ ), l = p((m) => {
80
80
  t([]), c(m), n(!1);
81
- }, []), p = g(() => {
81
+ }, []), d = p(() => {
82
82
  c(!1);
83
- }, []), E = g((m) => {
83
+ }, []), E = p((m) => {
84
84
  n(m);
85
- }, []), v = g((m) => {
85
+ }, []), v = p((m) => {
86
86
  s(m);
87
- }, []), S = g(() => {
87
+ }, []), S = p(() => {
88
88
  c(!1);
89
89
  }, []);
90
90
  return {
@@ -93,28 +93,28 @@ const G = 500, P = 1, j = (r) => r instanceof Error && r.message ? r.message : t
93
93
  results: a,
94
94
  hasSearched: f,
95
95
  reset: e,
96
- updateWithResults: l,
97
- updateWithError: i,
98
- clearError: p,
96
+ updateWithResults: i,
97
+ updateWithError: l,
98
+ clearError: d,
99
99
  setLoadingState: E,
100
100
  setSearched: v,
101
101
  clearErrorState: S
102
102
  };
103
103
  }, J = (r, n) => {
104
- const u = h(""), c = g((s) => u.current === s, []), a = g((s) => {
104
+ const u = g(""), c = p((s) => u.current === s, []), a = p((s) => {
105
105
  u.current = s;
106
- }, []), t = g(
107
- async (s, e, l, i = !1) => {
108
- if (c(e) && !i) return;
109
- const p = ++n.current;
110
- if (a(e), e.length >= l || i) {
106
+ }, []), t = p(
107
+ async (s, e, i, l = !1) => {
108
+ if (c(e) && !l) return;
109
+ const d = ++n.current;
110
+ if (a(e), e.length >= i || l) {
111
111
  r.setLoadingState(!0), r.clearErrorState();
112
112
  try {
113
113
  const E = await s(e);
114
- if (p !== n.current) return;
114
+ if (d !== n.current) return;
115
115
  r.setSearched(!0), r.updateWithResults(E, e);
116
116
  } catch (E) {
117
- if (p !== n.current) return;
117
+ if (d !== n.current) return;
118
118
  r.setSearched(!0), r.updateWithError(
119
119
  j(E)
120
120
  );
@@ -123,13 +123,13 @@ const G = 500, P = 1, j = (r) => r instanceof Error && r.message ? r.message : t
123
123
  r.reset();
124
124
  },
125
125
  [r, c, a, n]
126
- ), f = g(
127
- (s, e, l, i = !1) => {
128
- if (!(c(e) && !i))
129
- if (a(e), e.length >= l || i) {
126
+ ), f = p(
127
+ (s, e, i, l = !1) => {
128
+ if (!(c(e) && !l))
129
+ if (a(e), e.length >= i || l) {
130
130
  r.setSearched(!0);
131
- const p = U(e, s);
132
- r.updateWithResults(p, e);
131
+ const d = U(e, s);
132
+ r.updateWithResults(d, e);
133
133
  } else
134
134
  r.reset();
135
135
  },
@@ -146,14 +146,14 @@ const G = 500, P = 1, j = (r) => r instanceof Error && r.message ? r.message : t
146
146
  options: c = [],
147
147
  query: a = ""
148
148
  }) => {
149
- const t = z(), f = h(0), s = J(t, f), [e] = C(a, r), l = g(
150
- (i = !1) => {
149
+ const t = z(), f = g(0), s = J(t, f), [e] = C(a, r), i = p(
150
+ (d = !1) => {
151
151
  if (typeof c == "function") {
152
152
  s.handleAsync(
153
153
  c,
154
154
  e,
155
155
  u,
156
- i
156
+ d
157
157
  );
158
158
  return;
159
159
  }
@@ -161,12 +161,14 @@ const G = 500, P = 1, j = (r) => r instanceof Error && r.message ? r.message : t
161
161
  c,
162
162
  e,
163
163
  u,
164
- i
164
+ d
165
165
  );
166
166
  },
167
167
  [e, u, c, s]
168
168
  );
169
- return _(l, [l]), {
169
+ _(i, [i]);
170
+ let l;
171
+ return t.results.length ? l = t.results : e.length ? l = [] : l = n ?? [], {
170
172
  clearError: t.clearError,
171
173
  debouncedQuery: e,
172
174
  error: t.error,
@@ -174,8 +176,8 @@ const G = 500, P = 1, j = (r) => r instanceof Error && r.message ? r.message : t
174
176
  shouldShowInstructions: a.length < u && !t.results.length && !n?.length,
175
177
  shouldShowDebounceWaiting: a.length >= u && e.length < u && !t.loading && !t.hasSearched,
176
178
  shouldShowNoResults: t.hasSearched && !t.loading && t.results.length === 0 && a.length >= u,
177
- results: t.results.length ? t.results : n ?? [],
178
- startSearch: l,
179
+ results: l,
180
+ startSearch: i,
179
181
  stopSearch: t.reset
180
182
  };
181
183
  };
@@ -3,6 +3,8 @@ const r = o({
3
3
  slots: ["root", "badge", "host"],
4
4
  base: {
5
5
  root: {
6
+ // Performance: CSS containment limits style recalculation scope
7
+ contain: "layout style paint",
6
8
  display: "inline-block",
7
9
  overflow: "visible",
8
10
  textStyle: "typography.body.sm.regular",
@@ -34,7 +34,7 @@ export declare const card: import('../../styled-system/types').SlotRecipeRuntime
34
34
  borderColor: "colour.primary.fill";
35
35
  borderStyle: "solid";
36
36
  borderWidth: "[2px]";
37
- borderRadius: "radius.system.form";
37
+ borderRadius: "radius.system.layout";
38
38
  pointerEvents: "[none]";
39
39
  };
40
40
  };
@@ -3,6 +3,8 @@ const e = t({
3
3
  slots: ["root", "prepend", "heading", "topRight", "media", "body", "footer"],
4
4
  base: {
5
5
  root: {
6
+ // Performance: CSS containment (no paint to allow overflow)
7
+ contain: "layout style",
6
8
  position: "relative",
7
9
  borderRadius: "radius.system.layout",
8
10
  bg: "colour.neutral.10",
@@ -101,7 +103,7 @@ const e = t({
101
103
  borderColor: "colour.primary.fill",
102
104
  borderStyle: "solid",
103
105
  borderWidth: "[2px]",
104
- borderRadius: "radius.system.form",
106
+ borderRadius: "radius.system.layout",
105
107
  pointerEvents: "[none]"
106
108
  }
107
109
  }
@@ -14,6 +14,8 @@ const o = r({
14
14
  base: {
15
15
  formElement: {},
16
16
  root: {
17
+ // Performance: CSS containment (no paint to allow focus ring/shadow)
18
+ contain: "layout style",
17
19
  color: "colour.primary.fill",
18
20
  display: "flex",
19
21
  position: "relative",
@@ -10,6 +10,8 @@ const r = o({
10
10
  ],
11
11
  base: {
12
12
  root: {
13
+ // Performance: CSS containment (no paint to allow overflow)
14
+ contain: "layout style",
13
15
  display: "block",
14
16
  "&:has([aria-controls]:focus-visible)": {
15
17
  layerStyle: "elevation.focusNoBorder"
@@ -1,2 +1,2 @@
1
- export declare const filter: import('../../styled-system/types').SlotRecipeRuntimeFn<"reset" | "root" | "popoverContent" | "optionList" | "noResults" | "chevron" | "searchInput" | "optionContent" | "optionMeta" | "optionMetaText", {}>;
1
+ export declare const filter: import('../../styled-system/types').SlotRecipeRuntimeFn<"root" | "reset" | "popoverContent" | "optionList" | "noResults" | "chevron" | "searchInput" | "optionContent" | "optionMeta" | "optionMetaText", {}>;
2
2
  export type FilterVariants = Parameters<typeof filter>[0];
@@ -2,7 +2,6 @@ import { InputRef } from '../../Input/InputBase/InputBase';
2
2
  export declare const FilterSearch: import('react').ForwardRefExoticComponent<Omit<import('../../Input').InputBaseProps<undefined>, "defaultValue" | "onChange" | "value"> & {
3
3
  alignRight?: boolean;
4
4
  append?: import('react').ReactNode;
5
- clearable?: boolean;
6
5
  defaultValue?: string | number | undefined;
7
6
  formatter?: ((value?: string | number | undefined) => string | number) | undefined;
8
7
  inline?: boolean;
@@ -12,4 +11,6 @@ export declare const FilterSearch: import('react').ForwardRefExoticComponent<Omi
12
11
  prepend?: import('react').ReactNode;
13
12
  value?: string | number | undefined;
14
13
  width?: import('../../../types').FormElementWidths;
14
+ } & {
15
+ clearable?: boolean;
15
16
  } & import('react').RefAttributes<InputRef>>;
@@ -11,11 +11,6 @@ export type IressInputProps<T extends FormControlValue = string | number, TRows
11
11
  * Content to append to the input field, usually a button or icon.
12
12
  **/
13
13
  append?: ReactNode;
14
- /**
15
- * If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
16
- * @default false
17
- */
18
- clearable?: boolean;
19
14
  /**
20
15
  * The value of the input. Can be a string or a number. Use for uncontrolled inputs.
21
16
  */
@@ -53,7 +48,21 @@ export type IressInputProps<T extends FormControlValue = string | number, TRows
53
48
  * The width of the input.
54
49
  */
55
50
  width?: FormElementWidths;
56
- };
51
+ } & (TRows extends number ? {
52
+ /**
53
+ * Controls the auto-grow behaviour of the textarea when `rows` is set.
54
+ * - Set to a number (e.g. `autoGrow={10}`) to define the maximum number of visible rows before the textarea starts scrolling.
55
+ * - Set to `true` to enable auto-grow with a default maximum of 5 visible rows.
56
+ * @default false (no auto-grow) or 5 rows when `autoGrow` is `true`
57
+ */
58
+ autoGrow?: number | boolean;
59
+ } : {
60
+ /**
61
+ * If `true`, then user can clear the value of the input.
62
+ * @default false
63
+ */
64
+ clearable?: boolean;
65
+ });
57
66
  export declare const IressInput: (<T extends FormControlValue = string | number, TRows extends number | undefined = undefined>(props: IressInputProps<T, TRows> & RefAttributes<InputRef<TRows> | null>) => ReactElement) & {
58
67
  displayName: "IressInput";
59
68
  };
@@ -1,132 +1,142 @@
1
- import { jsx as r, jsxs as w } from "react/jsx-runtime";
2
- import { forwardRef as A, useRef as F, useState as G, useImperativeHandle as H } from "react";
3
- import { GlobalCSSClass as d } from "../../enums.js";
4
- import { getFormControlValueAsString as U } from "../../helpers/form/getFormControlValueAsString.js";
5
- import { InputBase as z } from "./InputBase/InputBase.js";
6
- import { IressSpinner as J } from "../Spinner/Spinner.js";
1
+ import { jsx as a, jsxs as V } from "react/jsx-runtime";
2
+ import { forwardRef as U, useRef as b, useState as Y, useImperativeHandle as $, useEffect as z } from "react";
3
+ import { GlobalCSSClass as h } from "../../enums.js";
4
+ import { getFormControlValueAsString as J } from "../../helpers/form/getFormControlValueAsString.js";
5
+ import { InputBase as K } from "./InputBase/InputBase.js";
6
+ import { IressSpinner as L } from "../Spinner/Spinner.js";
7
7
  import "../Spinner/Spinner.styles.js";
8
- import { useControlledState as K } from "../../hooks/useControlledState.js";
9
- import { IressReadonly as L } from "../Readonly/Readonly.js";
8
+ import { useControlledState as Q } from "../../hooks/useControlledState.js";
9
+ import { IressReadonly as W } from "../Readonly/Readonly.js";
10
10
  import "../Readonly/Readonly.styles.js";
11
- import { c as s } from "../../cx-DN21T1EH.js";
12
- import { input as Q } from "./Input.styles.js";
13
- import { s as W } from "../../factory-CsinCTPr.js";
14
- import { s as X } from "../../is-valid-prop-DweT-eOL.js";
15
- import { useNoDefaultValueInForms as Y } from "../../patterns/Form/hooks/useNoDefaultValueInForms.js";
11
+ import { c as u } from "../../cx-DN21T1EH.js";
12
+ import { input as X } from "./Input.styles.js";
13
+ import { s as Z } from "../../factory-CsinCTPr.js";
14
+ import { s as _ } from "../../is-valid-prop-DweT-eOL.js";
15
+ import { useNoDefaultValueInForms as ee } from "../../patterns/Form/hooks/useNoDefaultValueInForms.js";
16
16
  import "../../Button-BTkololu.js";
17
- import { IressCloseButton as Z } from "../Button/CloseButton/CloseButton.js";
18
- const _ = ({ rows: a, ...f }, S) => {
17
+ import { IressCloseButton as te } from "../Button/CloseButton/CloseButton.js";
18
+ const oe = ({ rows: t, ...c }, M) => {
19
19
  const {
20
- loading: l = !1,
20
+ loading: d = !1,
21
21
  clearable: P = !1,
22
- defaultValue: v,
22
+ defaultValue: g,
23
23
  onClear: D,
24
- width: M,
25
- prepend: I,
26
- append: u,
24
+ width: E,
25
+ prepend: v,
26
+ append: p,
27
27
  onChange: R,
28
- className: g,
28
+ className: I,
29
29
  readOnly: B,
30
- formatter: i,
31
- type: E,
30
+ formatter: m,
31
+ type: G,
32
32
  inline: T,
33
33
  alignRight: C,
34
- ...t
35
- } = f;
36
- Y({
34
+ ...o
35
+ } = c;
36
+ let n = t !== void 0 ? c.autoGrow : void 0;
37
+ n === !0 && (n = 5), ee({
37
38
  component: "IressInput",
38
- defaultValue: v
39
+ defaultValue: g
39
40
  });
40
- const c = F(null), p = F(null), { value: m, setValue: h } = K({
41
+ const s = b(null), f = b(null), { value: i, setValue: y } = Q({
41
42
  component: "IressInput",
42
- defaultValue: v,
43
- value: f.value
44
- }), y = U(m), [x, N] = G(!1), [j, O] = X(t), V = i && !x ? i(m) : y;
45
- let b = i && !x ? { type: "text" } : { type: E };
46
- if (a !== void 0 && (b = void 0), H(
47
- S,
43
+ defaultValue: g,
44
+ value: c.value
45
+ }), x = J(i), [w, F] = Y(!1), [j, O] = _(o), H = m && !w ? m(i) : x;
46
+ let N = m && !w ? { type: "text" } : { type: G };
47
+ if (t !== void 0 && (N = void 0), $(
48
+ M,
48
49
  () => ({
49
- ...c.current,
50
+ ...s.current,
50
51
  extras: {
51
52
  additionalOnChangeProps: ["onClear"]
52
53
  }
53
54
  })
54
- ), B)
55
- return /* @__PURE__ */ r(
56
- L,
55
+ ), z(() => {
56
+ if (t && n && s.current) {
57
+ const e = s.current.input;
58
+ if (!e) return;
59
+ e.style.height = "auto";
60
+ const S = parseFloat(getComputedStyle(e).lineHeight) * 1.075 * n, A = Math.min(e.scrollHeight, S);
61
+ e.style.height = `${A}px`, e.style.overflowY = e.scrollHeight > S ? "auto" : "hidden";
62
+ }
63
+ }, [i, t, n]), B)
64
+ return /* @__PURE__ */ a(
65
+ W,
57
66
  {
58
- ...t,
67
+ ...o,
59
68
  defaultValue: void 0,
60
- value: m,
69
+ value: i,
61
70
  alignRight: C,
62
- append: u,
63
- className: g,
64
- children: V
71
+ append: p,
72
+ className: I,
73
+ children: H
65
74
  }
66
75
  );
67
76
  const k = (e) => {
68
- h(""), c.current?.focus();
69
- const o = new Event("change", {
77
+ y(""), s.current?.focus();
78
+ const r = new Event("change", {
70
79
  bubbles: !0
71
80
  });
72
- Object.defineProperty(o, "target", {
81
+ Object.defineProperty(r, "target", {
73
82
  writable: !1,
74
83
  value: { value: "", ...e.target }
75
- }), D?.(o);
84
+ }), D?.(r);
76
85
  }, q = (e) => {
77
- const o = e.target.value;
78
- h(o), R?.(e, o);
79
- }, n = Q({
86
+ const r = e.target.value;
87
+ y(r), R?.(e, r);
88
+ }, l = X({
80
89
  alignRight: C,
90
+ autoGrow: !!n,
81
91
  inline: T,
82
- isTextarea: a !== void 0,
83
- width: M
92
+ isTextarea: t !== void 0,
93
+ width: E
84
94
  });
85
- return /* @__PURE__ */ w(
86
- W.div,
95
+ return /* @__PURE__ */ V(
96
+ Z.div,
87
97
  {
88
- className: s(
98
+ className: u(
89
99
  // classes.root,
90
- d.FormElement,
91
- d.Input,
92
- g,
93
- n.wrapper,
94
- d.FormElementInner
100
+ h.FormElement,
101
+ h.Input,
102
+ I,
103
+ l.wrapper,
104
+ h.FormElementInner
95
105
  ),
96
- "data-testid": t["data-testid"],
106
+ "data-testid": o["data-testid"],
97
107
  ...j,
98
108
  children: [
99
- I && /* @__PURE__ */ r("div", { className: s(n.addon), children: I }),
100
- /* @__PURE__ */ r(
101
- z,
109
+ v && /* @__PURE__ */ a("div", { className: u(l.addon), children: v }),
110
+ /* @__PURE__ */ a(
111
+ K,
102
112
  {
103
113
  ...O,
104
- ...b,
105
- className: n.formControl,
106
- value: V,
114
+ ...N,
115
+ className: l.formControl,
116
+ value: H,
107
117
  onChange: q,
108
118
  onFocus: (e) => {
109
- N(!0), t?.onFocus?.(e), p.current ? p.current = null : queueMicrotask(() => e.target.select());
119
+ F(!0), o?.onFocus?.(e), f.current ? f.current = null : queueMicrotask(() => e.target.select());
110
120
  },
111
121
  onMouseDown: (e) => {
112
- t?.onMouseDown?.(e), p.current = !0;
122
+ o?.onMouseDown?.(e), f.current = !0;
113
123
  },
114
124
  onBlur: (e) => {
115
- N(!1), t?.onBlur?.(e);
125
+ F(!1), o?.onBlur?.(e);
116
126
  },
117
- rows: a,
118
- ref: c
127
+ rows: t,
128
+ ref: s
119
129
  }
120
130
  ),
121
- /* @__PURE__ */ w("div", { className: s(n.internal), children: [
122
- l && /* @__PURE__ */ r(
123
- J,
131
+ /* @__PURE__ */ V("div", { className: u(l.internal), children: [
132
+ d && /* @__PURE__ */ a(
133
+ L,
124
134
  {
125
- screenreaderText: l === !0 ? "loading" : l
135
+ screenreaderText: d === !0 ? "loading" : d
126
136
  }
127
137
  ),
128
- y && P && /* @__PURE__ */ r(
129
- Z,
138
+ x && P && /* @__PURE__ */ a(
139
+ te,
130
140
  {
131
141
  onClick: k,
132
142
  onMouseDown: (e) => e.preventDefault(),
@@ -134,12 +144,12 @@ const _ = ({ rows: a, ...f }, S) => {
134
144
  }
135
145
  )
136
146
  ] }),
137
- u && /* @__PURE__ */ r("div", { className: s(n.addon), children: u })
147
+ p && /* @__PURE__ */ a("div", { className: u(l.addon), children: p })
138
148
  ]
139
149
  }
140
150
  );
141
- }, $ = A(_);
142
- $.displayName = "IressInput";
151
+ }, ne = U(oe);
152
+ ne.displayName = "IressInput";
143
153
  export {
144
- $ as IressInput
154
+ ne as IressInput
145
155
  };
@@ -6,6 +6,13 @@ export declare const input: import('../../styled-system/types').SlotRecipeRuntim
6
6
  };
7
7
  };
8
8
  };
9
+ autoGrow: {
10
+ true: {
11
+ formControl: {
12
+ resize: "none";
13
+ };
14
+ };
15
+ };
9
16
  inline: {
10
17
  true: {
11
18
  wrapper: {
@@ -18,6 +25,7 @@ export declare const input: import('../../styled-system/types').SlotRecipeRuntim
18
25
  formControl: {
19
26
  lineHeight: number;
20
27
  height: "auto";
28
+ scrollable: "y";
21
29
  };
22
30
  };
23
31
  };
@@ -3,6 +3,8 @@ const o = r({
3
3
  slots: ["root", "wrapper", "inline", "addon", "internal", "formControl"],
4
4
  base: {
5
5
  wrapper: {
6
+ // Performance: CSS containment limits style recalculation scope
7
+ contain: "layout style paint",
6
8
  display: "flex",
7
9
  alignItems: "stretch",
8
10
  borderRadius: "radius.system.form",
@@ -88,6 +90,13 @@ const o = r({
88
90
  }
89
91
  }
90
92
  },
93
+ autoGrow: {
94
+ true: {
95
+ formControl: {
96
+ resize: "none"
97
+ }
98
+ }
99
+ },
91
100
  inline: {
92
101
  true: {
93
102
  wrapper: {
@@ -99,7 +108,8 @@ const o = r({
99
108
  true: {
100
109
  formControl: {
101
110
  lineHeight: 1.5,
102
- height: "auto"
111
+ height: "auto",
112
+ scrollable: "y"
103
113
  }
104
114
  }
105
115
  },
@@ -21,7 +21,6 @@ export declare const modal: import('../../styled-system/types').SlotRecipeRuntim
21
21
  content: {
22
22
  flex: "[1]";
23
23
  overflowX: "hidden";
24
- scrollable: "y";
25
24
  maxHeight: "[calc(100vh - ({spacing.spacing.7} * 2))]";
26
25
  '@media (min-height: 600px)': {
27
26
  maxHeight: "[calc(100vh - (100px * 2))]";