impact-nova 3.0.0-alpha.4 → 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/components/data/expandable-list-item/sku-picker-chrome.d.ts +2 -1
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +41 -35
- 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/use-overflow-tooltip.js +44 -36
- package/dist/components/flows/iris-chat/iris-chat-menu.js +100 -73
- package/dist/components/forms/select/components/SelectMenuPanel.js +15 -15
- 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 +2 -1
- package/dist/components/primitives/iris/iris.js +57 -67
- package/dist/components/primitives/iris/iris.types.d.ts +7 -0
- package/dist/form-react/Fields/VirtualizedListField.js +69 -64
- package/dist/impact-nova-components.css +3 -4
- package/dist/impact-nova.css +1 -1
- 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/package.json +2 -2
|
@@ -1,167 +1,223 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { ChevronRight as
|
|
4
|
-
import { useVirtualizer as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsx as t, jsxs as h, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { ChevronRight as L } from "impact-nova-icons";
|
|
4
|
+
import { useVirtualizer as D } from "@tanstack/react-virtual";
|
|
5
|
+
import { cn as r } from "../../../lib/utils.js";
|
|
6
|
+
import { Button as I } from "../../primitives/button/button.js";
|
|
7
|
+
import { useImpactNovaI18n as _ } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { horizontalScrollerEdgeFadeClassName as E, buildHorizontalScrollerMaskImage as q } from "./horizontal-scroller-mask.js";
|
|
9
|
+
function G({
|
|
10
|
+
className: B,
|
|
11
|
+
items: u,
|
|
12
|
+
renderItem: H,
|
|
13
|
+
scrollStep: x = 200,
|
|
14
|
+
hideScrollbar: v = !0,
|
|
15
|
+
edgeAffordance: c = !1,
|
|
16
|
+
controlsPosition: z = "right",
|
|
17
|
+
renderPrevious: b,
|
|
18
|
+
renderNext: w,
|
|
19
|
+
maxWidth: W = "100%",
|
|
20
|
+
estimateSize: p = 200,
|
|
21
|
+
overscan: M = 5,
|
|
22
|
+
...V
|
|
23
|
+
}, j) {
|
|
24
|
+
const { t: S } = _(), o = i.useRef(null), [n, F] = i.useState(!1), [a, O] = i.useState(!1);
|
|
25
|
+
i.useImperativeHandle(j, () => o.current);
|
|
26
|
+
const f = D({
|
|
27
|
+
count: u.length,
|
|
28
|
+
getScrollElement: () => o.current,
|
|
29
|
+
estimateSize: typeof p == "function" ? p : () => p,
|
|
28
30
|
horizontal: !0,
|
|
29
|
-
overscan:
|
|
30
|
-
}),
|
|
31
|
-
const e =
|
|
32
|
-
e && (
|
|
31
|
+
overscan: M
|
|
32
|
+
}), T = f.getTotalSize(), m = i.useCallback(() => {
|
|
33
|
+
const e = o.current;
|
|
34
|
+
e && (F(e.scrollLeft > 0), O(
|
|
33
35
|
Math.ceil(e.scrollLeft + e.clientWidth) < e.scrollWidth
|
|
34
36
|
));
|
|
35
37
|
}, []);
|
|
36
|
-
|
|
37
|
-
const e =
|
|
38
|
+
i.useEffect(() => {
|
|
39
|
+
const e = o.current;
|
|
38
40
|
if (!e) return;
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
e.addEventListener("scroll",
|
|
42
|
-
const
|
|
43
|
-
|
|
41
|
+
m();
|
|
42
|
+
const l = () => m();
|
|
43
|
+
e.addEventListener("scroll", l);
|
|
44
|
+
const s = new ResizeObserver(() => {
|
|
45
|
+
m();
|
|
44
46
|
});
|
|
45
|
-
return
|
|
46
|
-
e.removeEventListener("scroll",
|
|
47
|
+
return s.observe(e), () => {
|
|
48
|
+
e.removeEventListener("scroll", l), s.disconnect();
|
|
47
49
|
};
|
|
48
|
-
}, [
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
50
|
+
}, [m, u, T]);
|
|
51
|
+
const N = () => {
|
|
52
|
+
o.current?.scrollBy({ left: -x, behavior: "smooth" });
|
|
53
|
+
}, y = () => {
|
|
54
|
+
o.current?.scrollBy({ left: x, behavior: "smooth" });
|
|
55
|
+
}, k = (e, l, s) => {
|
|
56
|
+
if (s) return null;
|
|
57
|
+
const g = S(e === "left" ? "horizontalScroller.scrollLeft" : "horizontalScroller.scrollRight");
|
|
58
|
+
return c ? /* @__PURE__ */ t(
|
|
59
|
+
I,
|
|
60
|
+
{
|
|
61
|
+
variant: "ghost",
|
|
62
|
+
size: "iconSm",
|
|
63
|
+
className: r(
|
|
64
|
+
"absolute top-1/2 z-20 !size-5 !min-h-5 !min-w-5 -translate-y-1/2 rounded-full border border-stroke-hairline p-0",
|
|
65
|
+
"bg-canvas-elevated/95 text-content-secondary shadow-sm",
|
|
66
|
+
"hover:bg-canvas-muted hover:text-content",
|
|
67
|
+
"[&_svg]:!size-3",
|
|
68
|
+
e === "left" ? "left-0.5" : "right-0.5"
|
|
69
|
+
),
|
|
70
|
+
onClick: l,
|
|
71
|
+
disabled: s,
|
|
72
|
+
"aria-label": g,
|
|
73
|
+
"data-component": e === "left" ? "horizontal-scroller-prev" : "horizontal-scroller-next",
|
|
74
|
+
tabIndex: -1,
|
|
75
|
+
children: /* @__PURE__ */ t(
|
|
76
|
+
L,
|
|
77
|
+
{
|
|
78
|
+
className: r(e === "left" && "rotate-180")
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
) : /* @__PURE__ */ h(
|
|
83
|
+
I,
|
|
58
84
|
{
|
|
59
85
|
variant: "ghost",
|
|
60
86
|
size: "icon",
|
|
61
|
-
className:
|
|
87
|
+
className: r(
|
|
62
88
|
"h-8 w-8 rounded-md bg-canvas-muted text-content-tertiary hover:bg-brand-tint hover:text-brand"
|
|
63
89
|
),
|
|
64
|
-
onClick:
|
|
65
|
-
disabled:
|
|
66
|
-
"aria-label":
|
|
90
|
+
onClick: l,
|
|
91
|
+
disabled: s,
|
|
92
|
+
"aria-label": g,
|
|
67
93
|
"data-component": e === "left" ? "horizontal-scroller-prev" : "horizontal-scroller-next",
|
|
68
94
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
95
|
+
/* @__PURE__ */ t(
|
|
96
|
+
L,
|
|
71
97
|
{
|
|
72
|
-
className:
|
|
98
|
+
className: r("h-4 w-4", e === "left" && "rotate-180")
|
|
73
99
|
}
|
|
74
100
|
),
|
|
75
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: g })
|
|
76
102
|
]
|
|
77
103
|
}
|
|
78
104
|
);
|
|
79
|
-
},
|
|
80
|
-
const e =
|
|
81
|
-
return
|
|
82
|
-
left:
|
|
83
|
-
right:
|
|
84
|
-
} :
|
|
85
|
-
left:
|
|
105
|
+
}, d = (() => {
|
|
106
|
+
const e = b ? b({ onClick: N, disabled: !n }) : k("left", N, !n), l = w ? w({ onClick: y, disabled: !a }) : k("right", y, !a);
|
|
107
|
+
return c || z === "split" ? {
|
|
108
|
+
left: n ? /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: e }) : null,
|
|
109
|
+
right: a ? /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: l }) : null
|
|
110
|
+
} : z === "left" ? {
|
|
111
|
+
left: n || a ? /* @__PURE__ */ h("div", { className: "flex-shrink-0 flex items-center gap-1", children: [
|
|
86
112
|
e,
|
|
87
|
-
|
|
113
|
+
l
|
|
88
114
|
] }) : null,
|
|
89
115
|
right: null
|
|
90
116
|
} : {
|
|
91
117
|
left: null,
|
|
92
|
-
right:
|
|
118
|
+
right: n || a ? /* @__PURE__ */ h("div", { className: "flex-shrink-0 flex items-center gap-1", children: [
|
|
93
119
|
e,
|
|
94
|
-
|
|
120
|
+
l
|
|
95
121
|
] }) : null
|
|
96
122
|
};
|
|
97
|
-
})()
|
|
98
|
-
return /* @__PURE__ */ i(
|
|
123
|
+
})(), C = c ? q(n, a) : void 0, R = /* @__PURE__ */ t(
|
|
99
124
|
"div",
|
|
100
125
|
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
126
|
+
ref: o,
|
|
127
|
+
tabIndex: 0,
|
|
128
|
+
className: r(
|
|
129
|
+
"flex flex-1 min-w-0 overflow-x-auto overflow-y-hidden whitespace-nowrap",
|
|
130
|
+
v && "scrollbar-hide",
|
|
131
|
+
"scroll-smooth",
|
|
132
|
+
c && "h-full overscroll-x-contain outline-none"
|
|
104
133
|
),
|
|
105
|
-
style: {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
msOverflowStyle: u ? "none" : "auto"
|
|
123
|
-
},
|
|
124
|
-
"data-component": "horizontal-scroller-viewport",
|
|
125
|
-
children: /* @__PURE__ */ i(
|
|
134
|
+
style: {
|
|
135
|
+
scrollbarWidth: v ? "none" : "auto",
|
|
136
|
+
msOverflowStyle: v ? "none" : "auto",
|
|
137
|
+
WebkitMaskImage: C,
|
|
138
|
+
maskImage: C
|
|
139
|
+
},
|
|
140
|
+
"data-component": "horizontal-scroller-viewport",
|
|
141
|
+
children: /* @__PURE__ */ h(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
style: {
|
|
145
|
+
width: `${f.getTotalSize()}px`,
|
|
146
|
+
display: "flex",
|
|
147
|
+
position: "relative"
|
|
148
|
+
},
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ t(
|
|
126
151
|
"div",
|
|
127
152
|
{
|
|
128
153
|
style: {
|
|
129
|
-
width: `${
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
children: [
|
|
134
|
-
/* @__PURE__ */ l(
|
|
135
|
-
"div",
|
|
136
|
-
{
|
|
137
|
-
style: {
|
|
138
|
-
width: `${c.getVirtualItems()[0]?.start ?? 0}px`,
|
|
139
|
-
flexShrink: 0
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
),
|
|
143
|
-
c.getVirtualItems().map((e) => /* @__PURE__ */ l(
|
|
144
|
-
"div",
|
|
145
|
-
{
|
|
146
|
-
ref: c.measureElement,
|
|
147
|
-
"data-index": e.index,
|
|
148
|
-
className: "flex-shrink-0",
|
|
149
|
-
children: R(d[e.index], e.index)
|
|
150
|
-
},
|
|
151
|
-
e.key
|
|
152
|
-
))
|
|
153
|
-
]
|
|
154
|
+
width: `${f.getVirtualItems()[0]?.start ?? 0}px`,
|
|
155
|
+
flexShrink: 0
|
|
156
|
+
}
|
|
154
157
|
}
|
|
158
|
+
),
|
|
159
|
+
f.getVirtualItems().map((e) => /* @__PURE__ */ t(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
ref: f.measureElement,
|
|
163
|
+
"data-index": e.index,
|
|
164
|
+
className: "flex-shrink-0",
|
|
165
|
+
children: H(u[e.index], e.index)
|
|
166
|
+
},
|
|
167
|
+
e.key
|
|
168
|
+
))
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
return /* @__PURE__ */ t(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
className: r(
|
|
178
|
+
"flex items-center gap-2 min-w-0 w-full bg-transparent",
|
|
179
|
+
c && "gap-0",
|
|
180
|
+
B
|
|
181
|
+
),
|
|
182
|
+
style: { maxWidth: W },
|
|
183
|
+
"data-component": "horizontal-scroller",
|
|
184
|
+
...V,
|
|
185
|
+
children: c ? /* @__PURE__ */ h("div", { className: "relative flex min-h-0 min-w-0 flex-1 self-stretch", children: [
|
|
186
|
+
n ? /* @__PURE__ */ t(
|
|
187
|
+
"div",
|
|
188
|
+
{
|
|
189
|
+
"aria-hidden": !0,
|
|
190
|
+
"data-component": "horizontal-scroller-fade-left",
|
|
191
|
+
className: r(
|
|
192
|
+
E,
|
|
193
|
+
"left-0 bg-gradient-to-r from-canvas-elevated from-10% via-canvas-elevated/90 via-50% to-transparent"
|
|
155
194
|
)
|
|
156
195
|
}
|
|
157
|
-
),
|
|
158
|
-
|
|
159
|
-
|
|
196
|
+
) : null,
|
|
197
|
+
a ? /* @__PURE__ */ t(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
"aria-hidden": !0,
|
|
201
|
+
"data-component": "horizontal-scroller-fade-right",
|
|
202
|
+
className: r(
|
|
203
|
+
E,
|
|
204
|
+
"right-0 bg-gradient-to-l from-canvas-elevated from-10% via-canvas-elevated/90 via-50% to-transparent"
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
) : null,
|
|
208
|
+
d.left,
|
|
209
|
+
d.right,
|
|
210
|
+
R
|
|
211
|
+
] }) : /* @__PURE__ */ h($, { children: [
|
|
212
|
+
d.left,
|
|
213
|
+
R,
|
|
214
|
+
d.right
|
|
215
|
+
] })
|
|
160
216
|
}
|
|
161
217
|
);
|
|
162
218
|
}
|
|
163
|
-
const
|
|
164
|
-
|
|
219
|
+
const J = i.forwardRef(G);
|
|
220
|
+
J.displayName = "HorizontalScroller";
|
|
165
221
|
export {
|
|
166
|
-
|
|
222
|
+
J as HorizontalScroller
|
|
167
223
|
};
|
|
@@ -4,6 +4,8 @@ export interface HorizontalScrollerProps<T> extends Omit<React.HTMLAttributes<HT
|
|
|
4
4
|
renderItem: (item: T, index: number) => React.ReactNode;
|
|
5
5
|
scrollStep?: number;
|
|
6
6
|
hideScrollbar?: boolean;
|
|
7
|
+
/** Overlay edge fades + split chevrons on the viewport (dashboard carousel pattern). */
|
|
8
|
+
edgeAffordance?: boolean;
|
|
7
9
|
controlsPosition?: "left" | "right" | "split";
|
|
8
10
|
renderPrevious?: (props: {
|
|
9
11
|
onClick: () => void;
|
|
@@ -6,5 +6,7 @@ export interface ScrollOverflowAffordanceProps extends Omit<React.HTMLAttributes
|
|
|
6
6
|
hideScrollbar?: boolean;
|
|
7
7
|
viewportClassName?: string;
|
|
8
8
|
viewportDataComponent?: string;
|
|
9
|
+
/** `compact` = small circular chevrons; `default` = 32px rounded-md dashboard controls. */
|
|
10
|
+
controlSize?: "compact" | "default";
|
|
9
11
|
}
|
|
10
|
-
export declare function ScrollOverflowAffordance({ children, scrollStep, contentDependency, hideScrollbar, viewportClassName, viewportDataComponent, className, ...props }: ScrollOverflowAffordanceProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ScrollOverflowAffordance({ children, scrollStep, contentDependency, hideScrollbar, viewportClassName, viewportDataComponent, controlSize, className, ...props }: ScrollOverflowAffordanceProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,118 +1,128 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as I, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { ChevronRight as
|
|
4
|
-
import { Button as
|
|
3
|
+
import { ChevronRight as R } from "impact-nova-icons";
|
|
4
|
+
import { Button as D } from "../../primitives/button/button.js";
|
|
5
5
|
import { useImpactNovaI18n as L } from "../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
-
import { cn as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
function $(a, o) {
|
|
10
|
-
if (!(!a && !o))
|
|
11
|
-
return a && o ? `linear-gradient(to right, transparent, black ${s}px, black calc(100% - ${s}px), transparent)` : o ? `linear-gradient(to right, black, black calc(100% - ${s}px), transparent 100%)` : `linear-gradient(to right, transparent, black ${s}px, black)`;
|
|
12
|
-
}
|
|
13
|
-
const u = "pointer-events-none absolute top-0 z-10 h-full w-14";
|
|
6
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
7
|
+
import { horizontalScrollerEdgeFadeClassName as v, buildHorizontalScrollerMaskImage as C } from "./horizontal-scroller-mask.js";
|
|
8
|
+
import { useHorizontalScrollOverflow as A } from "./use-horizontal-scroll-overflow.js";
|
|
14
9
|
function F({
|
|
15
|
-
children:
|
|
16
|
-
scrollStep:
|
|
17
|
-
contentDependency:
|
|
18
|
-
hideScrollbar:
|
|
10
|
+
children: m,
|
|
11
|
+
scrollStep: h,
|
|
12
|
+
contentDependency: u,
|
|
13
|
+
hideScrollbar: l = !0,
|
|
19
14
|
viewportClassName: g,
|
|
20
|
-
viewportDataComponent:
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
viewportDataComponent: b = "scroll-overflow-affordance-viewport",
|
|
16
|
+
controlSize: p = "compact",
|
|
17
|
+
className: w,
|
|
18
|
+
...x
|
|
23
19
|
}) {
|
|
24
|
-
const { t:
|
|
25
|
-
scrollRef:
|
|
26
|
-
canScrollLeft:
|
|
27
|
-
canScrollRight:
|
|
28
|
-
scrollLeft:
|
|
29
|
-
scrollRight:
|
|
30
|
-
} =
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
const { t: s } = L(), {
|
|
21
|
+
scrollRef: y,
|
|
22
|
+
canScrollLeft: t,
|
|
23
|
+
canScrollRight: a,
|
|
24
|
+
scrollLeft: i,
|
|
25
|
+
scrollRight: c
|
|
26
|
+
} = A({ scrollStep: h, contentDependency: u }), f = C(
|
|
27
|
+
t,
|
|
28
|
+
a
|
|
29
|
+
), k = (e) => {
|
|
30
|
+
if (e.key === "ArrowLeft" && t) {
|
|
31
|
+
e.preventDefault(), i();
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
35
|
-
e.key === "ArrowRight" &&
|
|
36
|
-
},
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
34
|
+
e.key === "ArrowRight" && a && (e.preventDefault(), c());
|
|
35
|
+
}, d = (e, z, N) => {
|
|
36
|
+
if (N) return null;
|
|
37
|
+
const S = s(e === "left" ? "horizontalScroller.scrollLeft" : "horizontalScroller.scrollRight"), n = p === "default";
|
|
38
|
+
return /* @__PURE__ */ r(
|
|
39
|
+
D,
|
|
41
40
|
{
|
|
42
41
|
variant: "ghost",
|
|
43
|
-
size: "iconSm",
|
|
44
|
-
className:
|
|
45
|
-
"absolute top-1/2 z-20
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
size: n ? "icon" : "iconSm",
|
|
43
|
+
className: o(
|
|
44
|
+
"absolute top-1/2 z-20 -translate-y-1/2",
|
|
45
|
+
n ? o(
|
|
46
|
+
"h-8 w-8 shrink-0 rounded-md border border-solid border-border-subtle",
|
|
47
|
+
"bg-canvas-elevated text-content-tertiary shadow-sm",
|
|
48
|
+
"hover:bg-canvas-elevated hover:text-brand",
|
|
49
|
+
e === "left" ? "left-1" : "right-1"
|
|
50
|
+
) : o(
|
|
51
|
+
"!size-5 !min-h-5 !min-w-5 rounded-full border border-stroke-hairline p-0",
|
|
52
|
+
"bg-canvas-elevated/95 text-content-secondary shadow-sm",
|
|
53
|
+
"hover:bg-canvas-muted hover:text-content",
|
|
54
|
+
"[&_svg]:!size-3",
|
|
55
|
+
e === "left" ? "left-0.5" : "right-0.5"
|
|
56
|
+
)
|
|
50
57
|
),
|
|
51
|
-
onClick:
|
|
52
|
-
"aria-label":
|
|
58
|
+
onClick: z,
|
|
59
|
+
"aria-label": S,
|
|
53
60
|
"data-component": e === "left" ? "scroll-overflow-affordance-prev" : "scroll-overflow-affordance-next",
|
|
54
61
|
tabIndex: -1,
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
-
|
|
62
|
+
children: /* @__PURE__ */ r(
|
|
63
|
+
R,
|
|
57
64
|
{
|
|
58
|
-
className:
|
|
65
|
+
className: o(
|
|
66
|
+
n ? "h-4 w-4" : void 0,
|
|
67
|
+
e === "left" && "rotate-180"
|
|
68
|
+
)
|
|
59
69
|
}
|
|
60
70
|
)
|
|
61
71
|
}
|
|
62
72
|
);
|
|
63
73
|
};
|
|
64
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ I(
|
|
65
75
|
"div",
|
|
66
76
|
{
|
|
67
|
-
className:
|
|
77
|
+
className: o("relative min-w-0", w),
|
|
68
78
|
"data-component": "scroll-overflow-affordance",
|
|
69
|
-
...
|
|
79
|
+
...x,
|
|
70
80
|
children: [
|
|
71
|
-
|
|
81
|
+
t ? /* @__PURE__ */ r(
|
|
72
82
|
"div",
|
|
73
83
|
{
|
|
74
84
|
"aria-hidden": !0,
|
|
75
85
|
"data-component": "scroll-overflow-affordance-fade-left",
|
|
76
|
-
className:
|
|
77
|
-
|
|
86
|
+
className: o(
|
|
87
|
+
v,
|
|
78
88
|
"left-0 bg-gradient-to-r from-canvas-elevated from-10% via-canvas-elevated/90 via-50% to-transparent"
|
|
79
89
|
)
|
|
80
90
|
}
|
|
81
91
|
) : null,
|
|
82
|
-
|
|
92
|
+
a ? /* @__PURE__ */ r(
|
|
83
93
|
"div",
|
|
84
94
|
{
|
|
85
95
|
"aria-hidden": !0,
|
|
86
96
|
"data-component": "scroll-overflow-affordance-fade-right",
|
|
87
|
-
className:
|
|
88
|
-
|
|
97
|
+
className: o(
|
|
98
|
+
v,
|
|
89
99
|
"right-0 bg-gradient-to-l from-canvas-elevated from-10% via-canvas-elevated/90 via-50% to-transparent"
|
|
90
100
|
)
|
|
91
101
|
}
|
|
92
102
|
) : null,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/* @__PURE__ */
|
|
103
|
+
d("left", i, !t),
|
|
104
|
+
d("right", c, !a),
|
|
105
|
+
/* @__PURE__ */ r(
|
|
96
106
|
"div",
|
|
97
107
|
{
|
|
98
|
-
ref:
|
|
108
|
+
ref: y,
|
|
99
109
|
tabIndex: 0,
|
|
100
|
-
onKeyDown:
|
|
101
|
-
className:
|
|
110
|
+
onKeyDown: k,
|
|
111
|
+
className: o(
|
|
102
112
|
"overflow-x-auto overflow-y-hidden overscroll-x-contain scroll-smooth outline-none",
|
|
103
113
|
"[-webkit-overflow-scrolling:touch]",
|
|
104
114
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
105
|
-
|
|
115
|
+
l && "scrollbar-hide",
|
|
106
116
|
g
|
|
107
117
|
),
|
|
108
118
|
style: {
|
|
109
|
-
scrollbarWidth:
|
|
110
|
-
msOverflowStyle:
|
|
111
|
-
WebkitMaskImage:
|
|
112
|
-
maskImage:
|
|
119
|
+
scrollbarWidth: l ? "none" : "auto",
|
|
120
|
+
msOverflowStyle: l ? "none" : "auto",
|
|
121
|
+
WebkitMaskImage: f,
|
|
122
|
+
maskImage: f
|
|
113
123
|
},
|
|
114
|
-
"data-component":
|
|
115
|
-
children:
|
|
124
|
+
"data-component": b,
|
|
125
|
+
children: m
|
|
116
126
|
}
|
|
117
127
|
)
|
|
118
128
|
]
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IrisInsightTruncatedTextProps } from './iris.types';
|
|
2
|
+
/** Default truncated Iris insight label + overflow tooltip (white fill, iris ring). */
|
|
3
|
+
export declare function IrisInsightTruncatedText({ children, overflowTooltipContent, className, triggerClassName, as, }: IrisInsightTruncatedTextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { OverflowTooltip as a } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
3
|
+
import { cn as p } from "../../../lib/utils.js";
|
|
4
|
+
function c({
|
|
5
|
+
children: t,
|
|
6
|
+
overflowTooltipContent: o,
|
|
7
|
+
className: n,
|
|
8
|
+
triggerClassName: e,
|
|
9
|
+
as: r = "span"
|
|
10
|
+
}) {
|
|
11
|
+
const s = o ?? (typeof t == "string" ? t : void 0);
|
|
12
|
+
return /* @__PURE__ */ i(
|
|
13
|
+
a,
|
|
14
|
+
{
|
|
15
|
+
as: r,
|
|
16
|
+
triggerClassName: p(
|
|
17
|
+
"block w-full min-w-0 truncate whitespace-nowrap normal-case",
|
|
18
|
+
e
|
|
19
|
+
),
|
|
20
|
+
contentClassName: "iris-menu-overflow-tooltip",
|
|
21
|
+
variant: "secondary",
|
|
22
|
+
side: "top",
|
|
23
|
+
align: "end",
|
|
24
|
+
sideOffset: 8,
|
|
25
|
+
content: s,
|
|
26
|
+
className: n,
|
|
27
|
+
children: t
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
c as IrisInsightTruncatedText
|
|
33
|
+
};
|
|
@@ -20,6 +20,7 @@ declare const IrisInsight: React.ForwardRefExoticComponent<IrisInsightProps & Re
|
|
|
20
20
|
export { IrisControlProvider, IrisControlRegion, } from './iris-control-region';
|
|
21
21
|
export { IrisAgentCursor } from './iris-agent-cursor';
|
|
22
22
|
export { useIrisControl } from './iris-control-context';
|
|
23
|
+
export { IrisInsightTruncatedText } from './iris-insight-truncated-text';
|
|
23
24
|
export { IrisButton, IrisIconButton, IrisMenu, IrisInsight };
|
|
24
|
-
export type { IrisButtonProps, IrisIconButtonProps, IrisMenuProps, IrisInsightProps, } from './iris.types';
|
|
25
|
+
export type { IrisButtonProps, IrisIconButtonProps, IrisMenuProps, IrisInsightProps, IrisInsightTruncatedTextProps, } from './iris.types';
|
|
25
26
|
export type { IrisControlProviderProps, IrisControlRegionProps, IrisControlGlowPhase, IrisControlRegionVariant, } from './iris-control.types';
|