@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.
- package/dist/Autocomplete-BRGD9dSh.js +321 -0
- package/dist/Shadow-D2KoVwxD.js +57 -0
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +1 -1
- package/dist/components/Autocomplete/index.js +2 -2
- package/dist/components/Expander/Expander.styles.d.ts +4 -0
- package/dist/components/Expander/Expander.styles.js +5 -1
- package/dist/components/Field/Field.js +47 -47
- package/dist/components/Field/Field.styles.d.ts +2 -2
- package/dist/components/Field/Field.styles.js +8 -2
- package/dist/components/Field/components/FieldHint.js +27 -19
- package/dist/components/Field/index.d.ts +0 -2
- package/dist/components/Field/index.js +1 -3
- package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.js +10 -9
- package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.styles.d.ts +8 -1
- package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.styles.js +6 -4
- package/dist/components/FieldGroup/index.d.ts +2 -0
- package/dist/components/FieldGroup/index.js +3 -0
- package/dist/components/Input/Input.styles.d.ts +4 -4
- package/dist/components/Input/Input.styles.js +4 -4
- package/dist/components/Link/Link.styles.d.ts +1 -0
- package/dist/components/Link/Link.styles.js +4 -1
- package/dist/components/Menu/Menu.js +81 -77
- package/dist/components/Menu/Menu.styles.js +7 -0
- package/dist/components/Menu/MenuGroup/MenuGroup.d.ts +18 -3
- package/dist/components/Menu/MenuGroup/MenuGroup.js +38 -34
- package/dist/components/Menu/MenuHeading/MenuHeading.d.ts +20 -0
- package/dist/components/Menu/MenuHeading/MenuHeading.js +14 -0
- package/dist/components/Menu/MenuItem/MenuItem.styles.js +9 -0
- package/dist/components/Menu/MenuText/MenuText.d.ts +1 -5
- package/dist/components/Menu/MenuText/MenuText.js +11 -17
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.js +4 -3
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/SelectHeading/SelectHeading.js +5 -5
- package/dist/components/Select/SelectTags/SelectTags.js +15 -15
- package/dist/components/Select/components/SelectOptions.js +108 -95
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Slideout/Slideout.styles.js +1 -0
- package/dist/components/TabSet/TabSet.d.ts +6 -1
- package/dist/components/TabSet/TabSet.js +34 -30
- package/dist/components/TabSet/TabSet.styles.d.ts +1 -1
- package/dist/components/TabSet/TabSet.styles.js +13 -1
- package/dist/components/Tag/Tag.styles.d.ts +14 -14
- package/dist/components/Tag/Tag.styles.js +16 -16
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/Tag/index.js +1 -2
- package/dist/components/{Tag/TagInput → TagInput}/TagInput.d.ts +1 -1
- package/dist/components/{Tag/TagInput → TagInput}/TagInput.js +7 -7
- package/dist/components/TagInput/TagInput.styles.d.ts +1 -0
- package/dist/components/{Tag/TagInput → TagInput}/TagInput.styles.js +2 -2
- package/dist/components/TagInput/index.d.ts +2 -0
- package/dist/components/TagInput/index.js +3 -0
- package/dist/components/Tooltip/Tooltip.d.ts +7 -2
- package/dist/components/Tooltip/Tooltip.js +48 -42
- package/dist/components/Tooltip/TooltipProvider.d.ts +27 -0
- package/dist/components/Tooltip/TooltipProvider.js +14 -0
- package/dist/components/Tooltip/hooks/useTooltipContainer.d.ts +17 -0
- package/dist/components/Tooltip/hooks/useTooltipContainer.js +5 -0
- package/dist/components/Tooltip/index.d.ts +4 -0
- package/dist/components/Tooltip/index.js +4 -2
- package/dist/components/ValidationMessage/ValidationMessage.js +2 -2
- package/dist/main.d.ts +2 -0
- package/dist/main.js +125 -121
- package/dist/patterns/DropdownMenu/DropdownMenu.js +113 -102
- package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.d.ts +1 -0
- package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.js +1 -0
- package/dist/patterns/Form/FormField/FormFieldset.d.ts +1 -1
- package/dist/patterns/Form/FormField/FormFieldset.js +1 -1
- package/dist/patterns/Form/FormValidationSummary/FormValidationSummary.js +1 -0
- package/dist/patterns/Form/components/LongForm.js +3 -1
- package/dist/patterns/Form/components/ShortForm.js +1 -0
- package/dist/patterns/Loading/Loading.styles.d.ts +3 -0
- package/dist/patterns/Loading/Loading.styles.js +4 -1
- package/dist/patterns/Loading/components/PageLoading.js +4 -4
- package/dist/patterns/Shadow/Shadow.js +1 -1
- package/dist/patterns/Shadow/index.js +1 -1
- package/dist/patterns/SideNav/SideNav.d.ts +6 -0
- package/dist/patterns/SideNav/SideNav.js +74 -68
- package/dist/patterns/SideNav/SideNav.styles.js +6 -2
- package/dist/style.css +1 -1
- package/dist/{useAutocompleteSearch-BJ_hhoKp.js → useAutocompleteSearch-DxKxs6HH.js} +29 -24
- package/package.json +1 -1
- package/dist/Autocomplete-CuUjmIAw.js +0 -308
- package/dist/Shadow-BL3YAhE_.js +0 -57
- package/dist/components/Tag/TagInput/TagInput.styles.d.ts +0 -1
- /package/dist/components/{Field/FieldGroup → FieldGroup}/FieldGroup.d.ts +0 -0
|
@@ -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 = {
|
|
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 {
|
|
6
|
-
import {
|
|
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(
|
|
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(
|
|
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-
|
|
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-
|
|
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
|
|
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
|
|
18
|
-
let [
|
|
19
|
-
items:
|
|
20
|
-
activeItemKey:
|
|
21
|
-
onActiveItemKeyChange:
|
|
22
|
-
sideMenuItems:
|
|
23
|
-
sideMenuLabel:
|
|
24
|
-
expanded:
|
|
25
|
-
defaultExpanded:
|
|
26
|
-
onExpandedChange:
|
|
27
|
-
}),
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
...
|
|
30
|
-
"aria-label":
|
|
31
|
-
className: t(e(
|
|
32
|
-
"data-testid":
|
|
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":
|
|
35
|
-
...
|
|
34
|
+
"--iress-width": R,
|
|
35
|
+
...N
|
|
36
36
|
},
|
|
37
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ g(s, {
|
|
38
38
|
variant: "rail",
|
|
39
|
-
"data-testid": o(
|
|
40
|
-
children: [
|
|
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
|
-
|
|
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:
|
|
49
|
-
"data-testid": o(
|
|
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__ */
|
|
53
|
-
className:
|
|
54
|
-
listItemStyle: { className:
|
|
55
|
-
icon:
|
|
56
|
-
onClick:
|
|
57
|
-
"aria-expanded":
|
|
58
|
-
"aria-label":
|
|
59
|
-
"data-testid": o(
|
|
60
|
-
children:
|
|
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__ */
|
|
63
|
-
className:
|
|
64
|
-
"data-testid": o(
|
|
65
|
-
"aria-hidden": !
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
className:
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
-
className:
|
|
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
|
-
|
|
72
|
-
className:
|
|
73
|
-
"data-testid": o(
|
|
74
|
-
children:
|
|
71
|
+
E && /* @__PURE__ */ h("div", {
|
|
72
|
+
className: J.header,
|
|
73
|
+
"data-testid": o(x, "header"),
|
|
74
|
+
children: E
|
|
75
75
|
}),
|
|
76
|
-
|
|
77
|
-
className:
|
|
76
|
+
W && /* @__PURE__ */ h(a, {
|
|
77
|
+
className: J.panelHeading,
|
|
78
78
|
element: "h2",
|
|
79
79
|
textStyle: "typography.heading.3",
|
|
80
|
-
"data-testid": o(
|
|
81
|
-
children:
|
|
80
|
+
"data-testid": o(x, "panel-heading"),
|
|
81
|
+
children: W
|
|
82
82
|
}),
|
|
83
|
-
|
|
83
|
+
G && /* @__PURE__ */ h(s, {
|
|
84
84
|
variant: "side",
|
|
85
|
-
numbered:
|
|
86
|
-
"data-testid": o(
|
|
87
|
-
children:
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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(
|
|
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__ */
|
|
103
|
+
}, e.key ?? t) : /* @__PURE__ */ h(c, {
|
|
100
104
|
href: e.href,
|
|
101
105
|
element: e.element,
|
|
102
|
-
onClick:
|
|
106
|
+
onClick: (t) => {
|
|
107
|
+
q(void 0), e.onClick?.(t);
|
|
108
|
+
},
|
|
103
109
|
selected: e.active,
|
|
104
|
-
"data-testid": o(
|
|
110
|
+
"data-testid": o(x, `side-item-${e.key ?? t}`),
|
|
105
111
|
children: e.label
|
|
106
112
|
}, e.key ?? t))
|
|
107
113
|
}),
|
|
108
|
-
|
|
109
|
-
className:
|
|
110
|
-
"data-testid": o(
|
|
111
|
-
children:
|
|
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
|
-
|
|
125
|
+
_.displayName = "IressSideNav";
|
|
120
126
|
//#endregion
|
|
121
|
-
export {
|
|
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: {
|
|
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,
|