impact-nova 3.0.0-alpha.3 → 3.0.0-alpha.5
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/_virtual/index.js +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +2 -1
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +42 -34
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +2 -1
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +4 -3
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +4 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +14 -12
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +44 -36
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/iris-chat/iris-chat-menu.js +100 -73
- package/dist/components/forms/choice-card/choice-card.variants.js +3 -3
- package/dist/components/forms/select/components/SelectMenuPanel.js +15 -15
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.d.ts +3 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.js +12 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.js +181 -125
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.types.d.ts +2 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +3 -1
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +77 -67
- package/dist/components/primitives/iris/iris-insight-truncated-text.d.ts +3 -0
- package/dist/components/primitives/iris/iris-insight-truncated-text.js +33 -0
- package/dist/components/primitives/iris/iris.d.ts +3 -1
- package/dist/components/primitives/iris/iris.js +76 -84
- package/dist/components/primitives/iris/iris.types.d.ts +9 -0
- package/dist/form-react/Fields/VirtualizedListField.js +76 -66
- package/dist/impact-nova-components.css +3 -4
- package/dist/impact-nova.css +1 -1
- package/dist/lib/alphabetical-sort.d.ts +3 -0
- package/dist/lib/alphabetical-sort.js +13 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
|
-
import { Alan as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Popover as B, PopoverTrigger as z, PopoverContent as
|
|
6
|
-
import {
|
|
7
|
-
import { createComponent as
|
|
3
|
+
import { Alan as N } from "impact-nova-icons";
|
|
4
|
+
import { Button as w } from "../button/button.js";
|
|
5
|
+
import { Popover as B, PopoverTrigger as z, PopoverContent as T } from "../../feedback/popover/popover.js";
|
|
6
|
+
import { IrisInsightTruncatedText as A } from "./iris-insight-truncated-text.js";
|
|
7
|
+
import { createComponent as g } from "../../../lib/primitives/create-component.js";
|
|
8
8
|
import { cn as l } from "../../../lib/utils.js";
|
|
9
|
-
import { IrisAlanGradientIcon as
|
|
10
|
-
import { irisButtonToButtonSize as V, irisButtonVariants as
|
|
9
|
+
import { IrisAlanGradientIcon as v } from "./iris-alan-gradient-icon.js";
|
|
10
|
+
import { irisButtonToButtonSize as V, irisButtonVariants as k, irisChromeWrapperVariants as P, irisIconChromeWrapperVariants as S, irisIconFilledButtonVariants as j, irisIconButtonToButtonSize as y, irisIconButtonVariants as M, irisMenuVariants as O } from "./iris.variants.js";
|
|
11
11
|
import { IrisControlProvider as _, IrisControlRegion as $ } from "./iris-control-region.js";
|
|
12
12
|
import { IrisAgentCursor as ii } from "./iris-agent-cursor.js";
|
|
13
13
|
import { useIrisControl as ni } from "./iris-control-context.js";
|
|
@@ -15,95 +15,96 @@ const G = {
|
|
|
15
15
|
sm: 14,
|
|
16
16
|
md: 16,
|
|
17
17
|
lg: 16
|
|
18
|
-
}, U =
|
|
18
|
+
}, U = g(
|
|
19
19
|
"IrisButton",
|
|
20
20
|
({
|
|
21
21
|
className: n,
|
|
22
22
|
size: i = "md",
|
|
23
23
|
shape: o = "default",
|
|
24
|
-
children:
|
|
25
|
-
type:
|
|
24
|
+
children: s,
|
|
25
|
+
type: e = "button",
|
|
26
26
|
...r
|
|
27
|
-
}, a) => /* @__PURE__ */ t("span", { className: P({ shape: o }), children: /* @__PURE__ */
|
|
28
|
-
|
|
27
|
+
}, a) => /* @__PURE__ */ t("span", { className: P({ shape: o }), children: /* @__PURE__ */ p(
|
|
28
|
+
w,
|
|
29
29
|
{
|
|
30
30
|
ref: a,
|
|
31
|
-
type:
|
|
31
|
+
type: e,
|
|
32
32
|
variant: "ghost",
|
|
33
33
|
size: V[i],
|
|
34
34
|
"data-component": "iris-button",
|
|
35
35
|
"data-size": i,
|
|
36
36
|
"data-shape": o,
|
|
37
|
-
className: l(
|
|
37
|
+
className: l(k({ size: i }), n),
|
|
38
38
|
...r,
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */ t(
|
|
41
|
-
|
|
40
|
+
/* @__PURE__ */ t(v, { size: G[i] }),
|
|
41
|
+
s ?? "Ask Iris"
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
44
|
) })
|
|
45
|
-
), R =
|
|
45
|
+
), R = g(
|
|
46
46
|
"IrisIconButton",
|
|
47
47
|
({
|
|
48
48
|
className: n,
|
|
49
49
|
appearance: i = "outline",
|
|
50
50
|
size: o = "md",
|
|
51
|
-
shape:
|
|
52
|
-
type:
|
|
51
|
+
shape: s = "default",
|
|
52
|
+
type: e = "button",
|
|
53
53
|
"aria-label": r = "Ask Iris",
|
|
54
54
|
...a
|
|
55
|
-
},
|
|
56
|
-
const
|
|
57
|
-
return i === "filled" ? /* @__PURE__ */ t("span", { className:
|
|
55
|
+
}, d) => {
|
|
56
|
+
const m = S({ appearance: i, shape: s }), c = i === "filled" ? /* @__PURE__ */ t(N, { size: 16, className: "text-brand-foreground" }) : /* @__PURE__ */ t(v, { size: 16 });
|
|
57
|
+
return i === "filled" ? /* @__PURE__ */ t("span", { className: m, children: /* @__PURE__ */ t(
|
|
58
58
|
"button",
|
|
59
59
|
{
|
|
60
|
-
ref:
|
|
61
|
-
type:
|
|
60
|
+
ref: d,
|
|
61
|
+
type: e,
|
|
62
62
|
"data-component": "iris-icon-button",
|
|
63
63
|
"data-appearance": i,
|
|
64
64
|
"data-size": o,
|
|
65
|
-
"data-shape":
|
|
65
|
+
"data-shape": s,
|
|
66
66
|
"aria-label": r,
|
|
67
|
-
className: l(
|
|
67
|
+
className: l(j({ size: o }), n),
|
|
68
68
|
...a,
|
|
69
|
-
children:
|
|
69
|
+
children: c
|
|
70
70
|
}
|
|
71
|
-
) }) : /* @__PURE__ */ t("span", { className:
|
|
72
|
-
|
|
71
|
+
) }) : /* @__PURE__ */ t("span", { className: m, children: /* @__PURE__ */ t(
|
|
72
|
+
w,
|
|
73
73
|
{
|
|
74
|
-
ref:
|
|
75
|
-
type:
|
|
74
|
+
ref: d,
|
|
75
|
+
type: e,
|
|
76
76
|
variant: "ghost",
|
|
77
|
-
size:
|
|
77
|
+
size: y[o],
|
|
78
78
|
"data-component": "iris-icon-button",
|
|
79
79
|
"data-appearance": i,
|
|
80
80
|
"data-size": o,
|
|
81
|
-
"data-shape":
|
|
81
|
+
"data-shape": s,
|
|
82
82
|
"aria-label": r,
|
|
83
|
-
className: l(
|
|
83
|
+
className: l(M({ size: o }), n),
|
|
84
84
|
...a,
|
|
85
|
-
children:
|
|
85
|
+
children: c
|
|
86
86
|
}
|
|
87
87
|
) });
|
|
88
88
|
}
|
|
89
|
-
),
|
|
89
|
+
), C = g(
|
|
90
90
|
"IrisMenu",
|
|
91
91
|
({
|
|
92
92
|
className: n,
|
|
93
93
|
appearance: i = "loading",
|
|
94
94
|
children: o,
|
|
95
|
-
onAskInChat:
|
|
96
|
-
askInChatLabel:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
onAskInChat: s,
|
|
96
|
+
askInChatLabel: e = "Ask in chat",
|
|
97
|
+
overflowTooltipContent: r,
|
|
98
|
+
...a
|
|
99
|
+
}, d) => {
|
|
100
|
+
const m = i === "loading" || i === "status", c = i === "card", f = r ?? (typeof o == "string" ? o : void 0), u = /* @__PURE__ */ p(
|
|
100
101
|
"div",
|
|
101
102
|
{
|
|
102
|
-
ref:
|
|
103
|
+
ref: d,
|
|
103
104
|
"data-component": "iris-menu",
|
|
104
105
|
"data-appearance": i,
|
|
105
|
-
className: l(
|
|
106
|
-
...
|
|
106
|
+
className: l(O({ appearance: i }), n),
|
|
107
|
+
...a,
|
|
107
108
|
children: [
|
|
108
109
|
m && /* @__PURE__ */ t(
|
|
109
110
|
"span",
|
|
@@ -112,7 +113,7 @@ const G = {
|
|
|
112
113
|
"inline-flex shrink-0 items-center justify-center",
|
|
113
114
|
i === "status" ? "size-4" : "size-6"
|
|
114
115
|
),
|
|
115
|
-
children: /* @__PURE__ */ t(
|
|
116
|
+
children: /* @__PURE__ */ t(v, { size: i === "status" ? 16 : 20 })
|
|
116
117
|
}
|
|
117
118
|
),
|
|
118
119
|
/* @__PURE__ */ t(
|
|
@@ -125,20 +126,10 @@ const G = {
|
|
|
125
126
|
i === "status" && "min-w-0 flex-1 overflow-hidden",
|
|
126
127
|
i === "loading" && "whitespace-nowrap"
|
|
127
128
|
),
|
|
128
|
-
children: i === "status" ? /* @__PURE__ */ t(
|
|
129
|
-
A,
|
|
130
|
-
{
|
|
131
|
-
triggerClassName: "block w-full min-w-0 truncate whitespace-nowrap normal-case",
|
|
132
|
-
contentClassName: "iris-menu-overflow-tooltip",
|
|
133
|
-
variant: "secondary",
|
|
134
|
-
side: "top",
|
|
135
|
-
sideOffset: 10,
|
|
136
|
-
children: o
|
|
137
|
-
}
|
|
138
|
-
) : o
|
|
129
|
+
children: i === "status" ? /* @__PURE__ */ t(A, { overflowTooltipContent: f, children: o }) : o
|
|
139
130
|
}
|
|
140
131
|
),
|
|
141
|
-
c &&
|
|
132
|
+
c && s && /* @__PURE__ */ t(w, { variant: "outline", size: "sm", className: "max-h-7 capitalize", onClick: s, children: e })
|
|
142
133
|
]
|
|
143
134
|
}
|
|
144
135
|
);
|
|
@@ -147,41 +138,41 @@ const G = {
|
|
|
147
138
|
{
|
|
148
139
|
className: l(
|
|
149
140
|
"iris-edge-wash-shell iris-edge-wash-shell--menu rounded-xl motion-reduce:animate-none",
|
|
150
|
-
i === "status" && "iris-edge-wash-shell--fluid iris-edge-wash-shell--menu-plain"
|
|
141
|
+
i === "status" && "iris-edge-wash-shell--fluid iris-edge-wash-shell--menu-plain w-full min-w-0"
|
|
151
142
|
),
|
|
152
|
-
children:
|
|
143
|
+
children: u
|
|
153
144
|
}
|
|
154
|
-
) :
|
|
145
|
+
) : u;
|
|
155
146
|
}
|
|
156
|
-
), X =
|
|
147
|
+
), X = g(
|
|
157
148
|
"IrisInsight",
|
|
158
149
|
({
|
|
159
150
|
status: n = "idle",
|
|
160
151
|
iconSize: i = "md",
|
|
161
152
|
iconAppearance: o = "outline",
|
|
162
|
-
loadingLabel:
|
|
163
|
-
onTriggerClick:
|
|
153
|
+
loadingLabel: s = "Gathering insights...",
|
|
154
|
+
onTriggerClick: e,
|
|
164
155
|
onAskInChat: r,
|
|
165
156
|
askInChatLabel: a,
|
|
166
|
-
className:
|
|
167
|
-
children:
|
|
168
|
-
},
|
|
169
|
-
const [
|
|
157
|
+
className: d,
|
|
158
|
+
children: m
|
|
159
|
+
}, c) => {
|
|
160
|
+
const [f, u] = x.useState(!1), h = n === "loading" || n === "ready", b = n === "loading";
|
|
170
161
|
return x.useEffect(() => {
|
|
171
|
-
n === "loading" &&
|
|
162
|
+
n === "loading" && u(!0);
|
|
172
163
|
}, [n]), /* @__PURE__ */ t(
|
|
173
164
|
"div",
|
|
174
165
|
{
|
|
175
|
-
ref:
|
|
166
|
+
ref: c,
|
|
176
167
|
"data-component": "iris",
|
|
177
168
|
"data-status": n,
|
|
178
|
-
className: l("relative inline-flex items-start",
|
|
179
|
-
children: /* @__PURE__ */
|
|
169
|
+
className: l("relative inline-flex items-start", d),
|
|
170
|
+
children: /* @__PURE__ */ p(
|
|
180
171
|
B,
|
|
181
172
|
{
|
|
182
|
-
open:
|
|
183
|
-
onOpenChange: (
|
|
184
|
-
|
|
173
|
+
open: h ? f : !1,
|
|
174
|
+
onOpenChange: (I) => {
|
|
175
|
+
h && u(I);
|
|
185
176
|
},
|
|
186
177
|
children: [
|
|
187
178
|
/* @__PURE__ */ t(z, { asChild: !0, children: /* @__PURE__ */ t(
|
|
@@ -189,26 +180,26 @@ const G = {
|
|
|
189
180
|
{
|
|
190
181
|
size: i,
|
|
191
182
|
appearance: b ? "filled" : o,
|
|
192
|
-
"aria-expanded":
|
|
193
|
-
onClick: (
|
|
194
|
-
n === "idle" && (
|
|
183
|
+
"aria-expanded": f && h,
|
|
184
|
+
onClick: (I) => {
|
|
185
|
+
n === "idle" && (e?.(), I.preventDefault());
|
|
195
186
|
}
|
|
196
187
|
}
|
|
197
188
|
) }),
|
|
198
|
-
|
|
199
|
-
|
|
189
|
+
h && /* @__PURE__ */ t(
|
|
190
|
+
T,
|
|
200
191
|
{
|
|
201
192
|
align: "end",
|
|
202
193
|
side: "bottom",
|
|
203
194
|
sideOffset: 7,
|
|
204
195
|
className: "w-auto border-0 bg-transparent p-0 shadow-none motion-reduce:animate-none",
|
|
205
|
-
children: n === "loading" ? /* @__PURE__ */ t(
|
|
206
|
-
|
|
196
|
+
children: n === "loading" ? /* @__PURE__ */ t(C, { appearance: "loading", children: s }) : /* @__PURE__ */ t(
|
|
197
|
+
C,
|
|
207
198
|
{
|
|
208
199
|
appearance: "card",
|
|
209
200
|
onAskInChat: r,
|
|
210
201
|
askInChatLabel: a,
|
|
211
|
-
children:
|
|
202
|
+
children: m
|
|
212
203
|
}
|
|
213
204
|
)
|
|
214
205
|
}
|
|
@@ -227,6 +218,7 @@ export {
|
|
|
227
218
|
$ as IrisControlRegion,
|
|
228
219
|
R as IrisIconButton,
|
|
229
220
|
X as IrisInsight,
|
|
230
|
-
|
|
221
|
+
A as IrisInsightTruncatedText,
|
|
222
|
+
C as IrisMenu,
|
|
231
223
|
ni as useIrisControl
|
|
232
224
|
};
|
|
@@ -19,6 +19,15 @@ export type IrisMenuProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
19
19
|
appearance?: IrisMenuAppearance;
|
|
20
20
|
onAskInChat?: () => void;
|
|
21
21
|
askInChatLabel?: string;
|
|
22
|
+
/** Tooltip body when `children` is not a plain string (e.g. formatted insight copy). */
|
|
23
|
+
overflowTooltipContent?: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export type IrisInsightTruncatedTextProps = {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
overflowTooltipContent?: React.ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
triggerClassName?: string;
|
|
30
|
+
as?: "span" | "p" | "div";
|
|
22
31
|
};
|
|
23
32
|
export type IrisInsightStatus = "idle" | "loading" | "ready";
|
|
24
33
|
export type IrisInsightProps = {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
1
|
+
import { jsx as i, jsxs as S } from "react/jsx-runtime";
|
|
2
2
|
import { useState as b } from "react";
|
|
3
|
-
import { Controller as
|
|
4
|
-
import { ChoiceCardGroup as
|
|
3
|
+
import { Controller as O } from "react-hook-form";
|
|
4
|
+
import { ChoiceCardGroup as k, ChoiceCard as I, ChoiceCardIndicator as j, ChoiceCardContent as q, ChoiceCardTitle as z } from "../../components/forms/choice-card/choice-card.js";
|
|
5
5
|
import { SkuPickerChrome as B } from "../../components/data/expandable-list-item/sku-picker-chrome.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { nextAlphabeticalSortDirection as M, compareAlphabeticalValues as P } from "../../lib/alphabetical-sort.js";
|
|
7
|
+
import { cn as y } from "../../lib/utils.js";
|
|
8
|
+
import { getFieldTestId as E } from "../utils/fieldTestIds.js";
|
|
9
|
+
function G(e) {
|
|
9
10
|
if (!Array.isArray(e))
|
|
10
11
|
return [];
|
|
11
12
|
const r = [];
|
|
@@ -13,49 +14,53 @@ function P(e) {
|
|
|
13
14
|
typeof t == "string" && r.push(t);
|
|
14
15
|
return r;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function x(e, r, t) {
|
|
17
18
|
if (t === "single") {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
19
|
+
const n = Array.from(r).find((s) => !e.includes(s));
|
|
20
|
+
return n ? [n] : Array.from(r).slice(0, 1);
|
|
20
21
|
}
|
|
21
22
|
const a = [];
|
|
22
|
-
for (const
|
|
23
|
-
r.has(
|
|
24
|
-
for (const
|
|
25
|
-
e.includes(
|
|
23
|
+
for (const n of e)
|
|
24
|
+
r.has(n) && a.push(n);
|
|
25
|
+
for (const n of r)
|
|
26
|
+
e.includes(n) || a.push(n);
|
|
26
27
|
return a;
|
|
27
28
|
}
|
|
28
29
|
function d(e) {
|
|
29
30
|
return typeof e.label == "string" ? e.label : e.value;
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
const a = r.trim().toLowerCase(),
|
|
33
|
-
(
|
|
32
|
+
function R(e, r, t) {
|
|
33
|
+
const a = r.trim().toLowerCase(), n = e.filter(
|
|
34
|
+
(s) => d(s).toLowerCase().includes(a)
|
|
35
|
+
);
|
|
36
|
+
return t === "none" ? n : n.sort(
|
|
37
|
+
(s, f) => P(
|
|
38
|
+
d(s),
|
|
39
|
+
d(f),
|
|
40
|
+
t
|
|
41
|
+
)
|
|
34
42
|
);
|
|
35
|
-
return t ? l.sort(
|
|
36
|
-
(o, f) => d(o).localeCompare(d(f))
|
|
37
|
-
) : l;
|
|
38
43
|
}
|
|
39
|
-
function
|
|
44
|
+
function _(e, r) {
|
|
40
45
|
let t = 0;
|
|
41
46
|
for (const a of e)
|
|
42
47
|
if (a.isDisabled !== !0 && (t += 1, !r.includes(a.value)))
|
|
43
48
|
return !1;
|
|
44
49
|
return t > 0;
|
|
45
50
|
}
|
|
46
|
-
function
|
|
51
|
+
function $(e, r) {
|
|
47
52
|
const t = [];
|
|
48
53
|
for (const a of r) {
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
54
|
+
const n = e.find((s) => s.value === a);
|
|
55
|
+
if (n && (t.push(d(n)), t.length === 5))
|
|
51
56
|
break;
|
|
52
57
|
}
|
|
53
58
|
return t;
|
|
54
59
|
}
|
|
55
|
-
function
|
|
60
|
+
function H(e) {
|
|
56
61
|
const r = e.view === "card";
|
|
57
62
|
return /* @__PURE__ */ i(
|
|
58
|
-
|
|
63
|
+
k,
|
|
59
64
|
{
|
|
60
65
|
type: "multiple",
|
|
61
66
|
value: e.selected ? [e.option.value] : [],
|
|
@@ -64,60 +69,65 @@ function _(e) {
|
|
|
64
69
|
},
|
|
65
70
|
disabled: e.disabled,
|
|
66
71
|
className: "min-w-0 w-full",
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
|
|
72
|
+
children: /* @__PURE__ */ S(
|
|
73
|
+
I,
|
|
69
74
|
{
|
|
70
75
|
value: e.option.value,
|
|
71
76
|
size: "sm",
|
|
72
77
|
disabled: e.disabled,
|
|
73
78
|
"aria-label": d(e.option),
|
|
74
|
-
className:
|
|
75
|
-
"w-full min-w-0",
|
|
76
|
-
!r && "
|
|
79
|
+
className: y(
|
|
80
|
+
"w-full min-w-0 items-center",
|
|
81
|
+
!r && "justify-start gap-3 rounded-none border-0 bg-transparent p-0 shadow-none hover:border-0 data-[selected]:border-0 data-[selected]:bg-transparent data-[selected]:shadow-none"
|
|
77
82
|
),
|
|
78
83
|
children: [
|
|
79
|
-
/* @__PURE__ */ i(
|
|
80
|
-
|
|
84
|
+
/* @__PURE__ */ i(
|
|
85
|
+
j,
|
|
86
|
+
{
|
|
87
|
+
className: r ? "order-last self-center" : "order-first self-center"
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ i(q, { className: "min-w-0", children: /* @__PURE__ */ i(z, { className: "whitespace-normal normal-case", children: d(e.option) }) })
|
|
81
91
|
]
|
|
82
92
|
}
|
|
83
93
|
)
|
|
84
94
|
}
|
|
85
95
|
);
|
|
86
96
|
}
|
|
87
|
-
const
|
|
97
|
+
const F = ({
|
|
88
98
|
field: e,
|
|
89
99
|
validationRules: r,
|
|
90
100
|
isDisabled: t,
|
|
91
101
|
formHelpers: a
|
|
92
102
|
}) => {
|
|
93
|
-
const [
|
|
103
|
+
const [n, s] = b(""), [f, N] = b("none"), [m, V] = b("card");
|
|
94
104
|
if (e.fieldType !== "virtualized_list") return null;
|
|
95
|
-
const C = e.options ?? [], g = e.selectionMode ?? "multi",
|
|
105
|
+
const C = e.options ?? [], g = e.selectionMode ?? "multi", A = a.form.control, h = R(C, n, f);
|
|
96
106
|
return /* @__PURE__ */ i(
|
|
97
|
-
|
|
107
|
+
O,
|
|
98
108
|
{
|
|
99
109
|
name: e.id,
|
|
100
|
-
control:
|
|
110
|
+
control: A,
|
|
101
111
|
disabled: t,
|
|
102
112
|
rules: r,
|
|
103
113
|
render: ({ field: u, fieldState: p }) => {
|
|
104
|
-
const c =
|
|
105
|
-
if (t ||
|
|
114
|
+
const c = G(u.value), v = !!p.error, w = v ? p.error?.message : e.helpText, L = (l) => {
|
|
115
|
+
if (t || l.isDisabled === !0)
|
|
106
116
|
return;
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
},
|
|
117
|
+
const o = new Set(c);
|
|
118
|
+
o.has(l.value) ? o.delete(l.value) : o.add(l.value), u.onChange(x(c, o, g));
|
|
119
|
+
}, T = () => {
|
|
110
120
|
if (g === "single") {
|
|
111
|
-
const
|
|
112
|
-
u.onChange(
|
|
121
|
+
const o = h.find((D) => D.isDisabled !== !0);
|
|
122
|
+
u.onChange(o ? [o.value] : []);
|
|
113
123
|
return;
|
|
114
124
|
}
|
|
115
|
-
const
|
|
116
|
-
for (const
|
|
117
|
-
|
|
118
|
-
u.onChange(
|
|
125
|
+
const l = new Set(c);
|
|
126
|
+
for (const o of h)
|
|
127
|
+
o.isDisabled !== !0 && l.add(o.value);
|
|
128
|
+
u.onChange(x(c, l, "multi"));
|
|
119
129
|
};
|
|
120
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ S("div", { "data-testid": E(e.id), children: [
|
|
121
131
|
/* @__PURE__ */ i(
|
|
122
132
|
B,
|
|
123
133
|
{
|
|
@@ -129,41 +139,41 @@ const X = ({
|
|
|
129
139
|
searchLabel: e.label ? `Search ${e.label}` : "Search",
|
|
130
140
|
showBack: !1,
|
|
131
141
|
view: m,
|
|
132
|
-
search:
|
|
133
|
-
|
|
142
|
+
search: n,
|
|
143
|
+
sortDirection: f,
|
|
134
144
|
selectedCount: c.length,
|
|
135
|
-
allSelected:
|
|
136
|
-
previewCodes:
|
|
137
|
-
onSearchChange:
|
|
138
|
-
onViewChange:
|
|
139
|
-
onToggleSort: () => N((
|
|
140
|
-
onSelectAll:
|
|
145
|
+
allSelected: _(h, c),
|
|
146
|
+
previewCodes: $(C, c),
|
|
147
|
+
onSearchChange: s,
|
|
148
|
+
onViewChange: V,
|
|
149
|
+
onToggleSort: () => N((l) => M(l)),
|
|
150
|
+
onSelectAll: T,
|
|
141
151
|
onClear: () => u.onChange([]),
|
|
142
152
|
children: /* @__PURE__ */ i(
|
|
143
153
|
"div",
|
|
144
154
|
{
|
|
145
155
|
className: m === "card" ? "grid w-full grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-3" : "flex w-full flex-col gap-2",
|
|
146
|
-
children: h.map((
|
|
147
|
-
|
|
156
|
+
children: h.map((l) => /* @__PURE__ */ i(
|
|
157
|
+
H,
|
|
148
158
|
{
|
|
149
|
-
option:
|
|
150
|
-
selected: c.includes(
|
|
151
|
-
disabled: t ||
|
|
159
|
+
option: l,
|
|
160
|
+
selected: c.includes(l.value),
|
|
161
|
+
disabled: t || l.isDisabled === !0,
|
|
152
162
|
view: m,
|
|
153
|
-
onToggle: () =>
|
|
163
|
+
onToggle: () => L(l)
|
|
154
164
|
},
|
|
155
|
-
|
|
165
|
+
l.value
|
|
156
166
|
))
|
|
157
167
|
}
|
|
158
168
|
)
|
|
159
169
|
}
|
|
160
170
|
),
|
|
161
|
-
w ? /* @__PURE__ */ i("p", { className:
|
|
171
|
+
w ? /* @__PURE__ */ i("p", { className: y("mt-1 text-xs", v ? "text-destructive" : "text-content-tertiary"), children: w }) : null
|
|
162
172
|
] });
|
|
163
173
|
}
|
|
164
174
|
}
|
|
165
175
|
);
|
|
166
176
|
};
|
|
167
177
|
export {
|
|
168
|
-
|
|
178
|
+
F as VirtualizedListField
|
|
169
179
|
};
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
border-color: var(--color-iris-border-violet);
|
|
833
833
|
}
|
|
834
834
|
|
|
835
|
-
/* Status overflow tooltip —
|
|
835
|
+
/* Status overflow tooltip — white fill + iris animated ring (same as menu wrap). */
|
|
836
836
|
.iris-menu-overflow-tooltip {
|
|
837
837
|
--iris-border-angle: 0deg;
|
|
838
838
|
position: relative;
|
|
@@ -842,10 +842,9 @@
|
|
|
842
842
|
border: 0 !important;
|
|
843
843
|
border-radius: 12px !important;
|
|
844
844
|
padding: 8px 12px !important;
|
|
845
|
-
background:
|
|
845
|
+
background: var(--color-surface-elevated) !important;
|
|
846
846
|
color: var(--color-foreground-title) !important;
|
|
847
847
|
box-shadow: var(--shadow-iris-menu), inset 0 0 0 1px var(--color-iris-border-violet);
|
|
848
|
-
backdrop-filter: blur(3px);
|
|
849
848
|
font-weight: 500;
|
|
850
849
|
text-transform: none;
|
|
851
850
|
}
|
|
@@ -870,7 +869,7 @@
|
|
|
870
869
|
}
|
|
871
870
|
}
|
|
872
871
|
.iris-menu-overflow-tooltip > svg {
|
|
873
|
-
fill: var(--color-
|
|
872
|
+
fill: var(--color-surface-elevated) !important;
|
|
874
873
|
stroke: var(--color-iris-border-violet);
|
|
875
874
|
stroke-width: 1px;
|
|
876
875
|
}
|