@iress-oss/ids-components 6.0.1 → 6.1.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.
Files changed (85) hide show
  1. package/dist/Autocomplete-BRGD9dSh.js +321 -0
  2. package/dist/Shadow-D2KoVwxD.js +57 -0
  3. package/dist/components/Autocomplete/Autocomplete.js +1 -1
  4. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +1 -1
  5. package/dist/components/Autocomplete/index.js +2 -2
  6. package/dist/components/Field/Field.js +47 -47
  7. package/dist/components/Field/Field.styles.d.ts +1 -1
  8. package/dist/components/Field/Field.styles.js +6 -0
  9. package/dist/components/Field/components/FieldHint.js +27 -19
  10. package/dist/components/Field/index.d.ts +0 -2
  11. package/dist/components/Field/index.js +1 -3
  12. package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.js +9 -9
  13. package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.styles.d.ts +1 -1
  14. package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.styles.js +2 -2
  15. package/dist/components/FieldGroup/index.d.ts +2 -0
  16. package/dist/components/FieldGroup/index.js +3 -0
  17. package/dist/components/Input/Input.styles.d.ts +4 -4
  18. package/dist/components/Input/Input.styles.js +4 -4
  19. package/dist/components/Link/Link.styles.d.ts +1 -0
  20. package/dist/components/Link/Link.styles.js +4 -1
  21. package/dist/components/Menu/Menu.js +81 -77
  22. package/dist/components/Menu/Menu.styles.js +7 -0
  23. package/dist/components/Menu/MenuGroup/MenuGroup.d.ts +18 -3
  24. package/dist/components/Menu/MenuGroup/MenuGroup.js +38 -34
  25. package/dist/components/Menu/MenuHeading/MenuHeading.d.ts +20 -0
  26. package/dist/components/Menu/MenuHeading/MenuHeading.js +14 -0
  27. package/dist/components/Menu/MenuItem/MenuItem.styles.js +9 -0
  28. package/dist/components/Menu/MenuText/MenuText.d.ts +1 -5
  29. package/dist/components/Menu/MenuText/MenuText.js +11 -17
  30. package/dist/components/Menu/index.d.ts +1 -0
  31. package/dist/components/Menu/index.js +4 -3
  32. package/dist/components/Select/Select.js +1 -1
  33. package/dist/components/Select/SelectHeading/SelectHeading.js +5 -5
  34. package/dist/components/Select/SelectTags/SelectTags.js +15 -15
  35. package/dist/components/Select/components/SelectOptions.js +108 -95
  36. package/dist/components/Select/index.js +1 -1
  37. package/dist/components/Slideout/Slideout.styles.js +1 -0
  38. package/dist/components/TabSet/TabSet.d.ts +6 -1
  39. package/dist/components/TabSet/TabSet.js +34 -30
  40. package/dist/components/TabSet/TabSet.styles.d.ts +1 -1
  41. package/dist/components/TabSet/TabSet.styles.js +13 -1
  42. package/dist/components/Tag/Tag.styles.d.ts +14 -14
  43. package/dist/components/Tag/Tag.styles.js +16 -16
  44. package/dist/components/Tag/index.d.ts +0 -1
  45. package/dist/components/Tag/index.js +1 -2
  46. package/dist/components/{Tag/TagInput → TagInput}/TagInput.d.ts +1 -1
  47. package/dist/components/{Tag/TagInput → TagInput}/TagInput.js +7 -7
  48. package/dist/components/TagInput/TagInput.styles.d.ts +1 -0
  49. package/dist/components/{Tag/TagInput → TagInput}/TagInput.styles.js +2 -2
  50. package/dist/components/TagInput/index.d.ts +2 -0
  51. package/dist/components/TagInput/index.js +3 -0
  52. package/dist/components/Tooltip/Tooltip.d.ts +7 -2
  53. package/dist/components/Tooltip/Tooltip.js +48 -42
  54. package/dist/components/Tooltip/TooltipProvider.d.ts +27 -0
  55. package/dist/components/Tooltip/TooltipProvider.js +14 -0
  56. package/dist/components/Tooltip/hooks/useTooltipContainer.d.ts +17 -0
  57. package/dist/components/Tooltip/hooks/useTooltipContainer.js +5 -0
  58. package/dist/components/Tooltip/index.d.ts +4 -0
  59. package/dist/components/Tooltip/index.js +4 -2
  60. package/dist/components/ValidationMessage/ValidationMessage.js +2 -2
  61. package/dist/main.d.ts +2 -0
  62. package/dist/main.js +125 -121
  63. package/dist/patterns/DropdownMenu/DropdownMenu.js +113 -102
  64. package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.d.ts +1 -0
  65. package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.js +1 -0
  66. package/dist/patterns/Form/FormField/FormFieldset.d.ts +1 -1
  67. package/dist/patterns/Form/FormField/FormFieldset.js +1 -1
  68. package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.js +1 -0
  69. package/dist/patterns/Form/components/LongForm.js +3 -1
  70. package/dist/patterns/Form/components/ShortForm.js +1 -0
  71. package/dist/patterns/Loading/Loading.styles.d.ts +3 -0
  72. package/dist/patterns/Loading/Loading.styles.js +4 -1
  73. package/dist/patterns/Loading/components/PageLoading.js +4 -4
  74. package/dist/patterns/Shadow/Shadow.js +1 -1
  75. package/dist/patterns/Shadow/index.js +1 -1
  76. package/dist/patterns/SideNav/SideNav.d.ts +6 -0
  77. package/dist/patterns/SideNav/SideNav.js +74 -68
  78. package/dist/patterns/SideNav/SideNav.styles.js +6 -2
  79. package/dist/style.css +1 -1
  80. package/dist/{useAutocompleteSearch-BJ_hhoKp.js → useAutocompleteSearch-DxKxs6HH.js} +29 -24
  81. package/package.json +1 -1
  82. package/dist/Autocomplete-CuUjmIAw.js +0 -308
  83. package/dist/Shadow-OHZiBoEb.js +0 -57
  84. package/dist/components/Tag/TagInput/TagInput.styles.d.ts +0 -1
  85. /package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.d.ts +0 -0
@@ -4,152 +4,163 @@ import { n } from "../../is-valid-prop-BoZ7GJt2.js";
4
4
  import { GlobalCSSClass as r } from "../../enums.js";
5
5
  import { IressIcon as i } from "../../components/Icon/Icon.js";
6
6
  import { t as a } from "../../Button-bZPKq0ue.js";
7
- import { propagateTestid as o } from "../../helpers/utility/propagateTestid.js";
8
- import { toArray as s } from "../../helpers/formatting/toArray.js";
9
- import { useControlledState as c } from "../../hooks/useControlledState.js";
10
- import { useIdIfNeeded as ee } from "../../hooks/useIdIfNeeded.js";
7
+ import { IressText as o } from "../../components/Text/Text.js";
8
+ import { propagateTestid as s } from "../../helpers/utility/propagateTestid.js";
9
+ import { IressSpinner as ee } from "../../components/Spinner/Spinner.js";
10
+ import { toArray as te } from "../../helpers/formatting/toArray.js";
11
+ import { useControlledState as ne } from "../../hooks/useControlledState.js";
12
+ import { useIdIfNeeded as c } from "../../hooks/useIdIfNeeded.js";
11
13
  import { IressPopover as l } from "../../components/Popover/Popover.js";
12
14
  import { usePopoverItem as u } from "../../components/Popover/hooks/usePopoverItem.js";
13
- import { t as d } from "../../useAutocompleteSearch-BJ_hhoKp.js";
14
- import { IressDivider as f } from "../../components/Divider/Divider.js";
15
- import { IressSelectMenu as p } from "../../components/Select/SelectMenu/SelectMenu.js";
16
- import { IressSelectSearchInput as m } from "../../components/Select/SelectSearchInput/SelectSearchInput.js";
17
- import { IressStyled as h } from "../../components/Styled/Styled.js";
18
- import { dropdownMenu as g } from "./DropdownMenu.styles.js";
19
- import { useDropdownMenuFlags as te } from "./hooks/useDropdownMenuFlags.js";
20
- import { forwardRef as _, useImperativeHandle as v, useMemo as y, useRef as b, useState as x } from "react";
21
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
15
+ import { t as re } from "../../useAutocompleteSearch-DxKxs6HH.js";
16
+ import { IressDivider as ie } from "../../components/Divider/Divider.js";
17
+ import { IressInline as ae } from "../../components/Inline/Inline.js";
18
+ import { IressSelectMenu as d } from "../../components/Select/SelectMenu/SelectMenu.js";
19
+ import { IressSelectSearchInput as f } from "../../components/Select/SelectSearchInput/SelectSearchInput.js";
20
+ import { IressStyled as p } from "../../components/Styled/Styled.js";
21
+ import { dropdownMenu as m } from "./DropdownMenu.styles.js";
22
+ import { useDropdownMenuFlags as h } from "./hooks/useDropdownMenuFlags.js";
23
+ import { forwardRef as g, useImperativeHandle as _, useMemo as v, useRef as y, useState as b } from "react";
24
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
22
25
  //#region src/patterns/DropdownMenu/DropdownMenu.tsx
23
- var T = g.raw(), E = g(), D = _((e, t) => {
24
- let n = b(null), { isActiveInPopover: r, ...i } = u();
25
- return v(t, () => n.current), /* @__PURE__ */ C(a, {
26
+ var oe = m.raw(), w = m(), se = g((e, t) => {
27
+ let n = y(null), { isActiveInPopover: r, ...i } = u();
28
+ return _(t, () => n.current), /* @__PURE__ */ S(a, {
26
29
  ...e,
27
30
  ...i,
28
- className: E.reset,
31
+ className: w.reset,
29
32
  mode: "quaternary",
30
33
  ref: (e) => {
31
34
  n.current = e, i?.ref?.(n.current);
32
35
  }
33
36
  });
34
- }), O = _(({ activatorStyle: a = {}, align: u = "bottom-start", container: g, className: _, "data-testid": O, defaultSelected: ne, debounceThreshold: re, footer: ie, header: ae, label: k, id: oe, initialOptions: se, inputProps: ce = {
37
+ }), T = g(({ activatorStyle: a = {}, align: u = "bottom-start", container: m, className: g, "data-testid": T, defaultSelected: ce, debounceThreshold: le, footer: ue, header: de, label: E, id: fe, initialOptions: pe, inputProps: D = {
35
38
  clearable: !0,
36
- prepend: /* @__PURE__ */ C(i, { name: "search" })
37
- }, limitDesktop: le = 12, limitMobile: A = 6, multiSelect: j, onChange: M, onReset: N, options: P, searchable: F, searchNoResultsText: I, selected: L, selectedOptionsText: R = " ({{numOptions}})", visibleResetButton: z, ...B }, V) => {
38
- let H = ee({ id: oe }), U = `${H}-sr-text`, W = b(null), G = y(() => F ?? typeof P == "function", [P, F]), ue = {
39
+ prepend: /* @__PURE__ */ S(i, { name: "search" })
40
+ }, limitDesktop: O = 12, limitMobile: k = 6, multiSelect: A, onChange: j, onReset: M, options: N, searchable: P, searchNoResultsText: F, selected: I, selectedOptionsText: L = " ({{numOptions}})", visibleResetButton: R, ...z }, B) => {
41
+ let V = c({ id: fe }), H = `${V}-sr-text`, U = y(null), W = v(() => P ?? typeof N == "function", [N, P]), me = {
39
42
  clearable: !0,
40
- prepend: /* @__PURE__ */ C(i, { name: "search" }),
41
- ...ce
42
- }, { value: K, setValue: de } = c({
43
+ prepend: /* @__PURE__ */ S(i, { name: "search" }),
44
+ ...D
45
+ }, { value: G, setValue: K } = ne({
43
46
  component: "IressDropdownMenu",
44
- defaultValue: ne,
45
- value: L
46
- }), [fe, q] = x(""), [J, Y] = x(!1), [pe, me] = y(() => n(B), [B]), [he, ge] = y(() => n(a), [a]), _e = (e) => {
47
+ defaultValue: ce,
48
+ value: I
49
+ }), [he, q] = b(""), [J, Y] = b(!1), [ge, _e] = v(() => n(z), [z]), [ve, ye] = v(() => n(a), [a]), be = (e) => {
47
50
  q(e.target.value);
48
- }, ve = () => {
51
+ }, xe = () => {
49
52
  q("");
50
- }, ye = (e) => {
51
- e && (M?.(e), de(e), j || Y(!1));
52
- }, be = () => {
53
- N?.(), j || Y(!1);
53
+ }, Se = (e) => {
54
+ e && (j?.(e), K(e), A || Y(!1));
55
+ }, Ce = () => {
56
+ K(void 0), M?.(), A || Y(!1);
54
57
  };
55
- v(V, () => ({
56
- ...W.current,
58
+ _(B, () => ({
59
+ ...U.current,
57
60
  clearSearch: () => q("")
58
61
  }));
59
- let { debouncedQuery: xe, loading: X, results: Z, shouldShowInstructions: Q, shouldShowDebounceWaiting: Se, shouldShowNoResults: Ce } = d({
60
- debounceThreshold: re,
61
- initialOptions: se ?? (typeof P == "function" ? void 0 : P),
62
- options: P,
63
- query: fe
64
- }), $ = te({
65
- debouncedQuery: xe,
62
+ let { debouncedQuery: we, loading: X, results: Z, shouldShowInstructions: Te, shouldShowDebounceWaiting: Q, shouldShowNoResults: Ee } = re({
63
+ debounceThreshold: le,
64
+ initialOptions: pe ?? (typeof N == "function" ? void 0 : N),
65
+ options: N,
66
+ query: he
67
+ }), $ = h({
68
+ debouncedQuery: we,
66
69
  loading: X,
67
70
  results: Z,
68
- searchable: G,
69
- shouldShowInstructions: Q,
70
- shouldShowDebounceWaiting: Se,
71
- shouldShowNoResults: Ce,
72
- visibleResetButton: z
73
- }), we = y(() => {
74
- let e = s(K);
75
- return j ? /* @__PURE__ */ w(S, { children: [k, R.replace("{{numOptions}}", e.length.toString())] }) : e[0]?.label ?? k;
71
+ searchable: W,
72
+ shouldShowInstructions: Te,
73
+ shouldShowDebounceWaiting: Q,
74
+ shouldShowNoResults: Ee,
75
+ visibleResetButton: R
76
+ }), De = v(() => {
77
+ let e = te(G);
78
+ return A ? /* @__PURE__ */ C(x, { children: [E, L.replace("{{numOptions}}", e.length.toString())] }) : e[0]?.label ?? E;
76
79
  }, [
77
- K,
78
- j,
79
- k,
80
- R
81
- ]), Te = y(() => X ? "loading" : J && !Z.length ? I : J && Z.length ? `${Z.length} results` : k, [
82
- k,
80
+ G,
81
+ A,
82
+ E,
83
+ L
84
+ ]), Oe = v(() => X ? "loading" : J && !Z.length ? F : J && Z.length ? `${Z.length} results` : E, [
85
+ E,
83
86
  X,
84
87
  Z.length,
85
- I,
88
+ F,
86
89
  J
87
90
  ]);
88
- return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(l, {
91
+ return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(l, {
89
92
  matchActivatorWidth: !0,
90
- ...me,
91
- activator: /* @__PURE__ */ C("button", {
92
- ...ge,
93
- "aria-describedby": U,
94
- "data-testid": a?.["data-testid"] ?? o(O, "activator-button__button"),
93
+ ..._e,
94
+ activator: /* @__PURE__ */ S("button", {
95
+ ...ye,
96
+ "aria-describedby": H,
97
+ "data-testid": a?.["data-testid"] ?? s(T, "activator-button__button"),
95
98
  onClick: () => Y(!0),
96
- className: t(a?.className, e(T.activator, he)),
97
- children: we
99
+ className: t(a?.className, e(oe.activator, ve)),
100
+ children: De
98
101
  }),
99
102
  align: u,
100
- className: t(_, e(pe), E.root, r.Filter),
101
- container: g,
103
+ className: t(g, e(ge), w.root, r.Filter),
104
+ container: m,
102
105
  contentStyle: {
103
- className: E.popoverContent,
106
+ className: w.popoverContent,
104
107
  p: "none"
105
108
  },
106
- "data-testid": O,
107
- id: H,
109
+ "data-testid": T,
110
+ id: V,
108
111
  show: J,
109
112
  onActivated: () => Y(!0),
110
113
  onDeactivated: () => Y(!1),
111
- ref: W,
114
+ ref: U,
112
115
  type: "listbox",
113
116
  children: [
114
- ae,
115
- $.showHeader && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(h, {
116
- className: E.searchHeader,
117
- children: [G && /* @__PURE__ */ C(m, {
118
- ...ue,
117
+ de,
118
+ $.showHeader && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(p, {
119
+ className: w.searchHeader,
120
+ children: [W && /* @__PURE__ */ S(f, {
121
+ ...me,
119
122
  role: "searchbox",
120
- className: E.searchInput,
121
- "data-testid": o(O, "input"),
122
- loading: X,
123
- onChange: _e,
124
- onClear: ve
125
- }), z && K && /* @__PURE__ */ C(D, {
126
- "data-testid": o(O, "reset-button"),
127
- onClick: be,
128
- children: typeof z == "string" ? z : "Reset filter"
123
+ className: w.searchInput,
124
+ "data-testid": s(T, "input"),
125
+ onChange: be,
126
+ onClear: xe
127
+ }), R && G && /* @__PURE__ */ S(se, {
128
+ "data-testid": s(T, "reset-button"),
129
+ onClick: Ce,
130
+ children: typeof R == "string" ? R : "Reset filter"
129
131
  })]
130
- }), $.showResults && /* @__PURE__ */ C(f, {})] }),
131
- $.showResults && /* @__PURE__ */ C(p, {
132
- className: E.optionList,
133
- "data-testid": o(O, "menu"),
132
+ }), $.showResults && /* @__PURE__ */ S(ie, {})] }),
133
+ $.showResults && /* @__PURE__ */ S(d, {
134
+ className: w.optionList,
135
+ "data-testid": s(T, "menu"),
134
136
  items: Z,
135
- limitDesktop: le,
136
- limitMobile: A,
137
- multiSelect: j,
138
- onChange: ye,
139
- selected: K
137
+ limitDesktop: O,
138
+ limitMobile: k,
139
+ multiSelect: A,
140
+ onChange: Se,
141
+ selected: G
142
+ }),
143
+ $.showLoading && /* @__PURE__ */ C(ae, {
144
+ gap: "sm",
145
+ verticalAlign: "middle",
146
+ p: "spacing.3",
147
+ children: [/* @__PURE__ */ S(ee, { color: "colour.neutral.70" }), /* @__PURE__ */ S(o, {
148
+ color: "colour.neutral.70",
149
+ children: "Loading results..."
150
+ })]
140
151
  }),
141
- $.showNoResults && /* @__PURE__ */ C("div", {
142
- className: E.noResults,
143
- children: I
152
+ $.showNoResults && /* @__PURE__ */ S("div", {
153
+ className: w.noResults,
154
+ children: F
144
155
  }),
145
- ie
156
+ ue
146
157
  ]
147
- }), /* @__PURE__ */ C(h, {
158
+ }), /* @__PURE__ */ S(p, {
148
159
  srOnly: !0,
149
- id: U,
150
- children: Te
160
+ id: H,
161
+ children: Oe
151
162
  })] });
152
163
  });
153
- O.displayName = "IressDropdownMenu";
164
+ T.displayName = "IressDropdownMenu";
154
165
  //#endregion
155
- export { O as IressDropdownMenu };
166
+ export { T as IressDropdownMenu };
@@ -2,6 +2,7 @@ import { AutocompleteSearchHookReturn } from '../../../components/Autocomplete';
2
2
  import { IressDropdownMenuProps } from '../DropdownMenu';
3
3
  export declare const useDropdownMenuFlags: ({ debouncedQuery, loading, results, searchable, visibleResetButton, }: Omit<AutocompleteSearchHookReturn, "clearError" | "error" | "startSearch" | "stopSearch"> & Pick<IressDropdownMenuProps, "searchable" | "visibleResetButton">) => {
4
4
  showHeader: string | boolean | undefined;
5
+ showLoading: boolean;
5
6
  showNoResults: string | false;
6
7
  showResults: boolean;
7
8
  };
@@ -4,6 +4,7 @@ var t = ({ debouncedQuery: t, loading: n, results: r, searchable: i, visibleRese
4
4
  let o = e(() => i || a, [i, a]), s = e(() => !!r.length, [r]);
5
5
  return {
6
6
  showHeader: o,
7
+ showLoading: e(() => n && !r.length, [n, r.length]),
7
8
  showNoResults: e(() => r.length === 0 && !n && t, [
8
9
  t,
9
10
  n,
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Control, FieldPath, FieldPathValue, FieldValues, UseControllerProps } from 'react-hook-form';
3
- import { IressFieldGroupProps } from '../../../components/Field';
3
+ import { IressFieldGroupProps } from '../../../components/FieldGroup';
4
4
  import { CustomRules } from './helpers/transformCustomRulesToValidateRule';
5
5
  import { FormFieldRenderProps } from './FormField';
6
6
  export interface IressFormFieldsetProps<T extends FieldValues = FieldValues, TName extends FieldPath<T> = FieldPath<T>> extends Omit<IressFieldGroupProps, 'children' | 'htmlFor' | 'required' | 'join' | 'inline'>, Omit<UseControllerProps<T, FieldPath<T>>, 'disabled'> {
@@ -1,5 +1,5 @@
1
1
  import { FormContext as e } from "../FormContext.js";
2
- import { IressFieldGroup as t } from "../../../components/Field/FieldGroup/FieldGroup.js";
2
+ import { IressFieldGroup as t } from "../../../components/FieldGroup/FieldGroup.js";
3
3
  import { getErrorTypeMessage as n } from "./helpers/getErrorTypeMessage.js";
4
4
  import { transformCustomRulesToValidateRule as r } from "./helpers/transformCustomRulesToValidateRule.js";
5
5
  import { useFieldRenderProps as i } from "./hooks/useFieldRenderProps.js";
@@ -42,6 +42,7 @@ var c = e("div", { base: {
42
42
  role: "none",
43
43
  status: "danger",
44
44
  variant: g,
45
+ multiLine: !0,
45
46
  children: /* @__PURE__ */ s(i, {
46
47
  ..._,
47
48
  "data-testid": t(u, "messages"),
@@ -7,7 +7,7 @@ import { IressHookForm as a } from "../HookForm/HookForm.js";
7
7
  import { forwardRef as o, useMemo as s } from "react";
8
8
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
9
  import { useForm as u } from "react-hook-form";
10
- var d = o(({ actions: o, alert: d, children: f, className: p, criteriaMode: m, context: h, defaultValues: g, delayError: _, footer: v, heading: y, mode: b = "onBlur", panelStyle: x = { bg: "alt" }, progressive: S, resetOptions: C, resolver: w, reValidateMode: T = "onChange", shouldUseNativeValidation: E, shouldUnregister: D, sticky: O = !1, values: k, ...A }, j) => {
10
+ var d = o(({ actions: o, alert: d, children: f, className: p, criteriaMode: m, context: h, defaultValues: g, delayError: _, footer: v, heading: y, mode: b = "onBlur", panelStyle: x = { p: "spacing.0" }, progressive: S, resetOptions: C, resolver: w, reValidateMode: T = "onChange", shouldUseNativeValidation: E, shouldUnregister: D, sticky: O = !1, values: k, ...A }, j) => {
11
11
  let M = u({
12
12
  criteriaMode: m,
13
13
  context: h,
@@ -40,6 +40,7 @@ var d = o(({ actions: o, alert: d, children: f, className: p, criteriaMode: m, c
40
40
  horizontalAlign: "between",
41
41
  verticalAlign: "bottom",
42
42
  className: N.header,
43
+ noWrap: !0,
43
44
  children: [P, /* @__PURE__ */ c("div", {
44
45
  className: N.actions,
45
46
  children: o
@@ -48,6 +49,7 @@ var d = o(({ actions: o, alert: d, children: f, className: p, criteriaMode: m, c
48
49
  /* @__PURE__ */ l(n, {
49
50
  ...x,
50
51
  className: e(N.children, x.className),
52
+ noBorder: !0,
51
53
  children: [d, f]
52
54
  }),
53
55
  v && /* @__PURE__ */ c("div", {
@@ -22,6 +22,7 @@ var l = i(({ actions: i, alert: l, children: u, className: d, criteriaMode: f, c
22
22
  values: w
23
23
  }), O = n({ pattern: "short" }), k = a(() => typeof g == "string" ? /* @__PURE__ */ o(t, {
24
24
  element: "h2",
25
+ mb: "spacing.4",
25
26
  children: g
26
27
  }) : g, [g]);
27
28
  return /* @__PURE__ */ s(r, {
@@ -37,6 +37,9 @@ export declare const loading: import('../../styled-system/types').SlotRecipeRunt
37
37
  opacity: number;
38
38
  transition: "[opacity 0.3s ease-in-out]";
39
39
  zIndex: "100";
40
+ display: "inline-flex";
41
+ alignItems: "center";
42
+ gap: "spacing.2";
40
43
  };
41
44
  overlay: {
42
45
  position: "absolute";
@@ -37,7 +37,10 @@ var t = e({
37
37
  borderRadius: "radius.system.tag",
38
38
  opacity: 0,
39
39
  transition: "[opacity 0.3s ease-in-out]",
40
- zIndex: "100"
40
+ zIndex: "100",
41
+ display: "inline-flex",
42
+ alignItems: "center",
43
+ gap: "spacing.2"
41
44
  },
42
45
  overlay: {
43
46
  position: "absolute",
@@ -2,8 +2,8 @@ import { t as e } from "../../../cx-CZ8IJJTy.js";
2
2
  import { t } from "../../../factory-sKbby7-S.js";
3
3
  import { propagateTestid as n } from "../../../helpers/utility/propagateTestid.js";
4
4
  import { IressCard as r } from "../../../components/Card/Card.js";
5
- import { IressInline as i } from "../../../components/Inline/Inline.js";
6
- import { IressDivider as a } from "../../../components/Divider/Divider.js";
5
+ import { IressDivider as i } from "../../../components/Divider/Divider.js";
6
+ import { IressInline as a } from "../../../components/Inline/Inline.js";
7
7
  import { IressCol as o } from "../../../components/Col/Col.js";
8
8
  import { IressContainer as s } from "../../../components/Container/Container.js";
9
9
  import { IressStack as c } from "../../../components/Stack/Stack.js";
@@ -75,7 +75,7 @@ var _ = () => /* @__PURE__ */ h(o, {
75
75
  children: [/* @__PURE__ */ h(u, {
76
76
  textStyle: "typography.heading.1",
77
77
  width: "25%"
78
- }), /* @__PURE__ */ g(i, {
78
+ }), /* @__PURE__ */ g(a, {
79
79
  gap: "lg",
80
80
  children: [/* @__PURE__ */ h(u, {
81
81
  textStyle: "typography.heading.4",
@@ -86,7 +86,7 @@ var _ = () => /* @__PURE__ */ h(o, {
86
86
  })]
87
87
  })]
88
88
  }),
89
- /* @__PURE__ */ h(a, {}),
89
+ /* @__PURE__ */ h(i, {}),
90
90
  /* @__PURE__ */ g(l, {
91
91
  gutter: "lg",
92
92
  children: [
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../Shadow-OHZiBoEb.js";
1
+ import { t as e } from "../../Shadow-D2KoVwxD.js";
2
2
  export { e as IressShadow };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../Shadow-OHZiBoEb.js";
1
+ import { t as e } from "../../Shadow-D2KoVwxD.js";
2
2
  export { e as IressShadow };
@@ -30,6 +30,12 @@ export interface SideNavSideMenuGroup {
30
30
  children: SideNavSubItem[];
31
31
  /** Whether this drawer is active/expanded. */
32
32
  active?: boolean;
33
+ /** URL for the group activator link. */
34
+ href?: string;
35
+ /** Custom element type for third-party routing libraries. */
36
+ element?: ElementType;
37
+ /** Optional click handler for the group activator. */
38
+ onClick?: MouseEventHandler;
33
39
  }
34
40
  /**
35
41
  * A panel content entry — either a flat item or a group of items.
@@ -11,104 +11,110 @@ import { IressMenuGroup as l } from "../../components/Menu/MenuGroup/MenuGroup.j
11
11
  import { sideNav as u } from "./SideNav.styles.js";
12
12
  import { useSideNavState as d } from "./hooks/useSideNavState.js";
13
13
  import { isSideNavGroup as f } from "./SideNav.helpers.js";
14
- import { useMemo as p } from "react";
15
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
14
+ import { useMemo as p, useState as m } from "react";
15
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
16
16
  //#region src/patterns/SideNav/SideNav.tsx
17
- var g = ({ "aria-label": g = "Side navigation", activeItemKey: _, className: v, collapseLabel: y = "Collapse navigation", "data-testid": b, defaultExpanded: x, expanded: S, expandLabel: C = "Expand navigation", footer: w, header: T, items: E, numbered: D = !1, onActiveItemKeyChange: O, onExpandedChange: k, sideMenuItems: A, sideMenuLabel: j, style: M, width: N, ...P }) => {
18
- let [F, I] = p(() => n(P), [P]), L = typeof N == "number" ? `${N}px` : N, { isExpanded: R, toggleExpanded: z, resolvedActiveItemKey: B, setActiveItemKey: V, panelContent: H, panelLabel: U, hasPanelContent: W } = d({
19
- items: E,
20
- activeItemKey: _,
21
- onActiveItemKeyChange: O,
22
- sideMenuItems: A,
23
- sideMenuLabel: j,
24
- expanded: S,
25
- defaultExpanded: x,
26
- onExpandedChange: k
27
- }), G = u({ expanded: R }), K = u.raw({ expanded: R });
28
- return /* @__PURE__ */ h(r.nav, {
29
- ...I,
30
- "aria-label": g,
31
- className: t(e(K.root, F), v, i.SideNav),
32
- "data-testid": b,
17
+ var _ = ({ "aria-label": _ = "Side navigation", activeItemKey: v, className: y, collapseLabel: b = "Collapse navigation", "data-testid": x, defaultExpanded: S, expanded: C, expandLabel: w = "Expand navigation", footer: T, header: E, items: D, numbered: O = !1, onActiveItemKeyChange: k, onExpandedChange: A, sideMenuItems: j, sideMenuLabel: M, style: N, width: P, ...F }) => {
18
+ let [I, L] = p(() => n(F), [F]), R = typeof P == "number" ? `${P}px` : P, { isExpanded: z, toggleExpanded: B, resolvedActiveItemKey: V, setActiveItemKey: H, panelContent: U, panelLabel: W, hasPanelContent: G } = d({
19
+ items: D,
20
+ activeItemKey: v,
21
+ onActiveItemKeyChange: k,
22
+ sideMenuItems: j,
23
+ sideMenuLabel: M,
24
+ expanded: C,
25
+ defaultExpanded: S,
26
+ onExpandedChange: A
27
+ }), [K, q] = m(() => U.find((e) => f(e) && e.active)?.key), J = u({ expanded: z }), Y = u.raw({ expanded: z });
28
+ return /* @__PURE__ */ g(r.nav, {
29
+ ...L,
30
+ "aria-label": _,
31
+ className: t(e(Y.root, I), y, i.SideNav),
32
+ "data-testid": x,
33
33
  style: {
34
- "--iress-width": L,
35
- ...M
34
+ "--iress-width": R,
35
+ ...N
36
36
  },
37
- children: [/* @__PURE__ */ h(s, {
37
+ children: [/* @__PURE__ */ g(s, {
38
38
  variant: "rail",
39
- "data-testid": o(b, "rail"),
40
- children: [E.map((e) => /* @__PURE__ */ m(c, {
39
+ "data-testid": o(x, "rail"),
40
+ children: [D.map((e) => /* @__PURE__ */ h(c, {
41
41
  icon: e.icon,
42
42
  href: e.href,
43
43
  element: e.element,
44
44
  onClick: (t) => {
45
- V(e.key), e.onClick?.(t);
45
+ H(e.key), e.onClick?.(t);
46
46
  },
47
47
  "aria-label": e.ariaLabel ?? (typeof e.label == "string" ? e.label : void 0),
48
- selected: B === e.key,
49
- "data-testid": o(b, `rail-item-${e.key}`),
48
+ selected: V === e.key,
49
+ "data-testid": o(x, `rail-item-${e.key}`),
50
50
  divider: e.divider,
51
51
  children: e.label
52
- }, e.key)), /* @__PURE__ */ m(c, {
53
- className: G.toggle,
54
- listItemStyle: { className: G.toggle },
55
- icon: R ? "keyboard_double_arrow_left" : "keyboard_double_arrow_right",
56
- onClick: z,
57
- "aria-expanded": R,
58
- "aria-label": R ? y : C,
59
- "data-testid": o(b, "toggle"),
60
- children: R ? y : C
52
+ }, e.key)), /* @__PURE__ */ h(c, {
53
+ className: J.toggle,
54
+ listItemStyle: { className: J.toggle },
55
+ icon: z ? "keyboard_double_arrow_left" : "keyboard_double_arrow_right",
56
+ onClick: B,
57
+ "aria-expanded": z,
58
+ "aria-label": z ? b : w,
59
+ "data-testid": o(x, "toggle"),
60
+ children: z ? b : w
61
61
  })]
62
- }), /* @__PURE__ */ m("div", {
63
- className: G.panel,
64
- "data-testid": o(b, "panel"),
65
- "aria-hidden": !R,
66
- children: /* @__PURE__ */ m("div", {
67
- className: G.panelContent,
68
- children: /* @__PURE__ */ h("div", {
69
- className: G.panelContentInner,
62
+ }), /* @__PURE__ */ h("div", {
63
+ className: J.panel,
64
+ "data-testid": o(x, "panel"),
65
+ "aria-hidden": !z,
66
+ children: /* @__PURE__ */ h("div", {
67
+ className: J.panelContent,
68
+ children: /* @__PURE__ */ g("div", {
69
+ className: J.panelContentInner,
70
70
  children: [
71
- T && /* @__PURE__ */ m("div", {
72
- className: G.header,
73
- "data-testid": o(b, "header"),
74
- children: T
71
+ E && /* @__PURE__ */ h("div", {
72
+ className: J.header,
73
+ "data-testid": o(x, "header"),
74
+ children: E
75
75
  }),
76
- U && /* @__PURE__ */ m(a, {
77
- className: G.panelHeading,
76
+ W && /* @__PURE__ */ h(a, {
77
+ className: J.panelHeading,
78
78
  element: "h2",
79
79
  textStyle: "typography.heading.3",
80
- "data-testid": o(b, "panel-heading"),
81
- children: U
80
+ "data-testid": o(x, "panel-heading"),
81
+ children: W
82
82
  }),
83
- W && /* @__PURE__ */ m(s, {
83
+ G && /* @__PURE__ */ h(s, {
84
84
  variant: "side",
85
- numbered: D,
86
- "data-testid": o(b, "side-menu"),
87
- children: H.map((e, t) => f(e) ? /* @__PURE__ */ m(l, {
85
+ numbered: O,
86
+ "data-testid": o(x, "side-menu"),
87
+ children: U.map((e, t) => f(e) ? /* @__PURE__ */ h(l, {
88
88
  label: e.label,
89
- defaultActive: e.active,
90
- "data-testid": o(b, `side-group-${e.key ?? t}`),
91
- children: e.children.map((e, t) => /* @__PURE__ */ m(c, {
89
+ href: e.href,
90
+ element: e.element,
91
+ onClick: e.onClick,
92
+ active: K === e.key,
93
+ onActiveChange: (t) => q(t ? e.key : void 0),
94
+ "data-testid": o(x, `side-group-${e.key ?? t}`),
95
+ children: e.children.map((e, t) => /* @__PURE__ */ h(c, {
92
96
  href: e.href,
93
97
  element: e.element,
94
98
  onClick: e.onClick,
95
99
  selected: e.active,
96
- "data-testid": o(b, `side-item-${e.key ?? t}`),
100
+ "data-testid": o(x, `side-item-${e.key ?? t}`),
97
101
  children: e.label
98
102
  }, e.key ?? t))
99
- }, e.key ?? t) : /* @__PURE__ */ m(c, {
103
+ }, e.key ?? t) : /* @__PURE__ */ h(c, {
100
104
  href: e.href,
101
105
  element: e.element,
102
- onClick: e.onClick,
106
+ onClick: (t) => {
107
+ q(void 0), e.onClick?.(t);
108
+ },
103
109
  selected: e.active,
104
- "data-testid": o(b, `side-item-${e.key ?? t}`),
110
+ "data-testid": o(x, `side-item-${e.key ?? t}`),
105
111
  children: e.label
106
112
  }, e.key ?? t))
107
113
  }),
108
- w && /* @__PURE__ */ m("div", {
109
- className: G.footer,
110
- "data-testid": o(b, "footer"),
111
- children: w
114
+ T && /* @__PURE__ */ h("div", {
115
+ className: J.footer,
116
+ "data-testid": o(x, "footer"),
117
+ children: T
112
118
  })
113
119
  ]
114
120
  })
@@ -116,6 +122,6 @@ var g = ({ "aria-label": g = "Side navigation", activeItemKey: _, className: v,
116
122
  })]
117
123
  });
118
124
  };
119
- g.displayName = "IressSideNav";
125
+ _.displayName = "IressSideNav";
120
126
  //#endregion
121
- export { g as IressSideNav };
127
+ export { _ as IressSideNav };
@@ -30,7 +30,10 @@ var t = e({
30
30
  overflow: "hidden",
31
31
  transition: "[max-width 0.3s ease-in-out]"
32
32
  },
33
- panelContent: { width: "var(--iress-width, 260px)" },
33
+ panelContent: {
34
+ width: "var(--iress-width, 260px)",
35
+ height: "12/12"
36
+ },
34
37
  panelContentInner: {
35
38
  display: "flex",
36
39
  flexDirection: "column",
@@ -38,7 +41,8 @@ var t = e({
38
41
  borderRadius: "radius.system.layout",
39
42
  m: "spacing.4",
40
43
  boxShadow: "0 4px 20px #00327126",
41
- pb: "spacing.2"
44
+ pb: "spacing.2",
45
+ maxHeight: "[calc(100% - ({spacing.spacing.4} * 2))]"
42
46
  },
43
47
  panelHeading: {
44
48
  flexShrink: 0,