@iress-oss/ids-components 6.0.0 → 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 (87) 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/Expander/Expander.styles.d.ts +4 -0
  7. package/dist/components/Expander/Expander.styles.js +5 -1
  8. package/dist/components/Field/Field.js +47 -47
  9. package/dist/components/Field/Field.styles.d.ts +2 -2
  10. package/dist/components/Field/Field.styles.js +8 -2
  11. package/dist/components/Field/components/FieldHint.js +27 -19
  12. package/dist/components/Field/index.d.ts +0 -2
  13. package/dist/components/Field/index.js +1 -3
  14. package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.js +10 -9
  15. package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.styles.d.ts +8 -1
  16. package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.styles.js +6 -4
  17. package/dist/components/FieldGroup/index.d.ts +2 -0
  18. package/dist/components/FieldGroup/index.js +3 -0
  19. package/dist/components/Input/Input.styles.d.ts +4 -4
  20. package/dist/components/Input/Input.styles.js +4 -4
  21. package/dist/components/Link/Link.styles.d.ts +1 -0
  22. package/dist/components/Link/Link.styles.js +4 -1
  23. package/dist/components/Menu/Menu.js +81 -77
  24. package/dist/components/Menu/Menu.styles.js +7 -0
  25. package/dist/components/Menu/MenuGroup/MenuGroup.d.ts +18 -3
  26. package/dist/components/Menu/MenuGroup/MenuGroup.js +38 -34
  27. package/dist/components/Menu/MenuHeading/MenuHeading.d.ts +20 -0
  28. package/dist/components/Menu/MenuHeading/MenuHeading.js +14 -0
  29. package/dist/components/Menu/MenuItem/MenuItem.styles.js +9 -0
  30. package/dist/components/Menu/MenuText/MenuText.d.ts +1 -5
  31. package/dist/components/Menu/MenuText/MenuText.js +11 -17
  32. package/dist/components/Menu/index.d.ts +1 -0
  33. package/dist/components/Menu/index.js +4 -3
  34. package/dist/components/Select/Select.js +1 -1
  35. package/dist/components/Select/SelectHeading/SelectHeading.js +5 -5
  36. package/dist/components/Select/SelectTags/SelectTags.js +15 -15
  37. package/dist/components/Select/components/SelectOptions.js +108 -95
  38. package/dist/components/Select/index.js +1 -1
  39. package/dist/components/Slideout/Slideout.styles.js +1 -0
  40. package/dist/components/TabSet/TabSet.d.ts +6 -1
  41. package/dist/components/TabSet/TabSet.js +34 -30
  42. package/dist/components/TabSet/TabSet.styles.d.ts +1 -1
  43. package/dist/components/TabSet/TabSet.styles.js +13 -1
  44. package/dist/components/Tag/Tag.styles.d.ts +14 -14
  45. package/dist/components/Tag/Tag.styles.js +16 -16
  46. package/dist/components/Tag/index.d.ts +0 -1
  47. package/dist/components/Tag/index.js +1 -2
  48. package/dist/components/{Tag/TagInput → TagInput}/TagInput.d.ts +1 -1
  49. package/dist/components/{Tag/TagInput → TagInput}/TagInput.js +7 -7
  50. package/dist/components/TagInput/TagInput.styles.d.ts +1 -0
  51. package/dist/components/{Tag/TagInput → TagInput}/TagInput.styles.js +2 -2
  52. package/dist/components/TagInput/index.d.ts +2 -0
  53. package/dist/components/TagInput/index.js +3 -0
  54. package/dist/components/Tooltip/Tooltip.d.ts +7 -2
  55. package/dist/components/Tooltip/Tooltip.js +48 -42
  56. package/dist/components/Tooltip/TooltipProvider.d.ts +27 -0
  57. package/dist/components/Tooltip/TooltipProvider.js +14 -0
  58. package/dist/components/Tooltip/hooks/useTooltipContainer.d.ts +17 -0
  59. package/dist/components/Tooltip/hooks/useTooltipContainer.js +5 -0
  60. package/dist/components/Tooltip/index.d.ts +4 -0
  61. package/dist/components/Tooltip/index.js +4 -2
  62. package/dist/components/ValidationMessage/ValidationMessage.js +2 -2
  63. package/dist/main.d.ts +2 -0
  64. package/dist/main.js +125 -121
  65. package/dist/patterns/DropdownMenu/DropdownMenu.js +113 -102
  66. package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.d.ts +1 -0
  67. package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.js +1 -0
  68. package/dist/patterns/Form/FormField/FormFieldset.d.ts +1 -1
  69. package/dist/patterns/Form/FormField/FormFieldset.js +1 -1
  70. package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.js +1 -0
  71. package/dist/patterns/Form/components/LongForm.js +3 -1
  72. package/dist/patterns/Form/components/ShortForm.js +1 -0
  73. package/dist/patterns/Loading/Loading.styles.d.ts +3 -0
  74. package/dist/patterns/Loading/Loading.styles.js +4 -1
  75. package/dist/patterns/Loading/components/PageLoading.js +4 -4
  76. package/dist/patterns/Shadow/Shadow.js +1 -1
  77. package/dist/patterns/Shadow/index.js +1 -1
  78. package/dist/patterns/SideNav/SideNav.d.ts +6 -0
  79. package/dist/patterns/SideNav/SideNav.js +74 -68
  80. package/dist/patterns/SideNav/SideNav.styles.js +6 -2
  81. package/dist/style.css +1 -1
  82. package/dist/{useAutocompleteSearch-BJ_hhoKp.js → useAutocompleteSearch-DxKxs6HH.js} +29 -24
  83. package/package.json +1 -1
  84. package/dist/Autocomplete-CuUjmIAw.js +0 -308
  85. package/dist/Shadow-BL3YAhE_.js +0 -57
  86. package/dist/components/Tag/TagInput/TagInput.styles.d.ts +0 -1
  87. /package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.d.ts +0 -0
@@ -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-BL3YAhE_.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-BL3YAhE_.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,