impact-nova 2.2.6 → 2.2.8
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/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +96 -120
- package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +19 -18
- package/dist/components/data/ag-grid-react/info-system-story-columns.d.ts +38 -1
- package/dist/components/data/data-table/data-table-saved-views.js +70 -79
- package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
- package/dist/components/feedback/alert/alert.variants.d.ts +1 -1
- package/dist/components/feedback/tooltip/badge-overflow-tooltip.d.ts +19 -0
- package/dist/components/feedback/tooltip/badge-overflow-tooltip.js +48 -0
- package/dist/components/feedback/tooltip/index.d.ts +2 -0
- package/dist/components/feedback/tooltip/index.js +11 -9
- package/dist/components/feedback/tooltip/overflow-tooltip.js +73 -50
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +5 -0
- package/dist/components/feedback/tooltip/tooltip.d.ts +2 -2
- package/dist/components/feedback/tooltip/tooltip.js +65 -28
- package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +89 -35
- package/dist/components/flows/filter-panel/filter-panel.js +33 -29
- package/dist/components/flows/filter-strip/filter-summary.js +126 -137
- package/dist/components/flows/filter-strip/filter-tag-list.js +97 -89
- package/dist/components/forms/prompt/prompt.js +13 -13
- package/dist/components/forms/prompt/prompt.variants.d.ts +1 -1
- package/dist/components/forms/select/components/SelectMenuPanel.js +26 -22
- package/dist/components/forms/select/components/SelectOptionRow.js +67 -64
- package/dist/components/forms/select/components/Submenu.js +40 -35
- package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.d.ts +5 -0
- package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.js +28 -0
- package/dist/components/forms/select/select.js +121 -120
- package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.d.ts +5 -0
- package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.js +16 -0
- package/dist/components/primitives/tag/tag.variants.d.ts +1 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +153 -151
- package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.d.ts +3 -0
- package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.js +34 -0
- package/dist/lib/tooltip/tooltip-content-interaction.d.ts +4 -0
- package/dist/lib/tooltip/tooltip-content-interaction.js +21 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/providers/app-providers.js +18 -11
- package/package.json +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import * as N from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as k } from "../../../lib/utils.js";
|
|
4
4
|
import { HorizontalScroller as $ } from "../../layout/horizontal-scroller/horizontal-scroller.js";
|
|
5
|
-
import { TagGroup as
|
|
6
|
-
import { Tag as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { OverflowTooltip as
|
|
9
|
-
import { PopoverContent as j, Popover as
|
|
10
|
-
import { Button as
|
|
11
|
-
import { Checkmark as
|
|
12
|
-
const
|
|
13
|
-
remainingValues:
|
|
14
|
-
viewAllTrigger:
|
|
15
|
-
onViewAll:
|
|
16
|
-
onItemRemove:
|
|
17
|
-
isRemovable:
|
|
5
|
+
import { TagGroup as I } from "../../primitives/tag-group/tag-group.js";
|
|
6
|
+
import { Tag as T } from "../../primitives/tag/tag.js";
|
|
7
|
+
import { Tooltip as P, TooltipTrigger as z, TooltipContent as S } from "../../feedback/tooltip/tooltip.js";
|
|
8
|
+
import { OverflowTooltip as R } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
9
|
+
import { PopoverContent as j, Popover as F, PopoverTrigger as V } from "../../feedback/popover/popover.js";
|
|
10
|
+
import { Button as B } from "../../primitives/button/button.js";
|
|
11
|
+
import { Checkmark as L, Copy as E, Cross as M } from "impact-nova-icons";
|
|
12
|
+
const O = "whitespace-nowrap bg-accent text-brand hover:bg-accent/80 border-0 px-2 text-xs font-medium font-['Manrope'] cursor-pointer focus:!ring-inset focus:!ring-offset-0 focus:!ring-brand data-[state=open]:!ring-inset data-[state=open]:!ring-offset-0 data-[state=open]:!ring-brand", A = 3, q = "max-h-[180px] min-h-0 overflow-y-auto", D = "group relative flex shrink-0 min-w-0 items-stretch overflow-hidden rounded px-3 py-2 text-[14px] font-medium leading-[20px] text-foreground hover:bg-secondary", G = ({
|
|
13
|
+
remainingValues: s,
|
|
14
|
+
viewAllTrigger: d = "expand",
|
|
15
|
+
onViewAll: f,
|
|
16
|
+
onItemRemove: g,
|
|
17
|
+
isRemovable: x,
|
|
18
18
|
isCopyable: e = !1,
|
|
19
|
-
externalCopyFunction:
|
|
19
|
+
externalCopyFunction: h
|
|
20
20
|
}) => {
|
|
21
|
-
const [
|
|
22
|
-
navigator.clipboard.writeText(String(
|
|
23
|
-
}, b =
|
|
24
|
-
|
|
21
|
+
const [a, u] = N.useState(!1), [r, l] = N.useState(null), w = (n, i, c) => {
|
|
22
|
+
navigator.clipboard.writeText(String(i)), l(c), n.currentTarget.blur(), setTimeout(() => l(null), 1500);
|
|
23
|
+
}, b = a ? s : s.slice(0, A), y = s.length > A, v = () => {
|
|
24
|
+
d === "custom" ? f?.() : u(!0);
|
|
25
25
|
};
|
|
26
26
|
return /* @__PURE__ */ o(
|
|
27
27
|
j,
|
|
@@ -29,157 +29,165 @@ const S = "whitespace-nowrap bg-accent text-brand hover:bg-accent/80 border-0 px
|
|
|
29
29
|
className: "w-[200px] p-0 rounded-[8px] bg-canvas-elevated shadow-elevation-floating border-none",
|
|
30
30
|
align: "start",
|
|
31
31
|
sideOffset: 8,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
"data-component": "filter-popover-content",
|
|
33
|
+
onOpenAutoFocus: (n) => n.preventDefault(),
|
|
34
|
+
onCloseAutoFocus: () => {
|
|
35
|
+
u(!1), l(null);
|
|
36
|
+
},
|
|
37
|
+
children: /* @__PURE__ */ t("div", { className: "flex flex-col py-2 px-[6px]", children: [
|
|
34
38
|
/* @__PURE__ */ o(
|
|
35
39
|
"div",
|
|
36
40
|
{
|
|
37
|
-
className:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
className: k(
|
|
42
|
+
"mb-2",
|
|
43
|
+
a && q
|
|
44
|
+
),
|
|
45
|
+
tabIndex: a ? 0 : void 0,
|
|
46
|
+
children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: b.map((n, i) => {
|
|
47
|
+
const c = String(n), C = !!(e || x);
|
|
48
|
+
return /* @__PURE__ */ t(
|
|
41
49
|
"div",
|
|
42
50
|
{
|
|
43
|
-
className:
|
|
51
|
+
className: D,
|
|
44
52
|
children: [
|
|
45
53
|
/* @__PURE__ */ o(
|
|
46
|
-
|
|
54
|
+
R,
|
|
47
55
|
{
|
|
48
|
-
triggerClassName:
|
|
49
|
-
"block min-w-0
|
|
50
|
-
|
|
56
|
+
triggerClassName: k(
|
|
57
|
+
"block min-w-0 flex-1 self-stretch truncate overflow-hidden",
|
|
58
|
+
C && "pe-0 group-hover:pe-10"
|
|
51
59
|
),
|
|
52
|
-
content:
|
|
60
|
+
content: c,
|
|
53
61
|
side: "right",
|
|
54
62
|
variant: "tertiary",
|
|
55
|
-
children:
|
|
63
|
+
children: c
|
|
56
64
|
}
|
|
57
65
|
),
|
|
58
|
-
|
|
66
|
+
C ? /* @__PURE__ */ t("div", { className: "pointer-events-none absolute end-2 top-1/2 z-10 flex -translate-y-1/2 items-center gap-1 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100", children: [
|
|
59
67
|
e ? /* @__PURE__ */ o(
|
|
60
68
|
"button",
|
|
61
69
|
{
|
|
62
70
|
type: "button",
|
|
63
|
-
onClick: (
|
|
64
|
-
|
|
71
|
+
onClick: (m) => {
|
|
72
|
+
m.stopPropagation(), h ? h({ e: m, val: n, index: i }) : w(m, n, i);
|
|
65
73
|
},
|
|
66
|
-
"aria-label": `Copy ${
|
|
74
|
+
"aria-label": `Copy ${c}`,
|
|
67
75
|
className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-content-icon hover:bg-scrim-hover hover:text-content-secondary",
|
|
68
|
-
children:
|
|
76
|
+
children: r === i ? /* @__PURE__ */ o(L, { size: 12, className: "text-success" }) : /* @__PURE__ */ o(E, { size: 12 })
|
|
69
77
|
}
|
|
70
78
|
) : null,
|
|
71
|
-
|
|
79
|
+
x ? /* @__PURE__ */ o(
|
|
72
80
|
"button",
|
|
73
81
|
{
|
|
74
82
|
type: "button",
|
|
75
|
-
onClick: (
|
|
76
|
-
|
|
83
|
+
onClick: (m) => {
|
|
84
|
+
m.stopPropagation(), g(n);
|
|
77
85
|
},
|
|
78
|
-
"aria-label": `Remove ${
|
|
86
|
+
"aria-label": `Remove ${c}`,
|
|
79
87
|
className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-content-icon hover:bg-scrim-hover hover:text-content-secondary",
|
|
80
|
-
children: /* @__PURE__ */ o(
|
|
88
|
+
children: /* @__PURE__ */ o(M, { size: 12 })
|
|
81
89
|
}
|
|
82
90
|
) : null
|
|
83
91
|
] }) : null
|
|
84
92
|
]
|
|
85
93
|
},
|
|
86
|
-
|
|
94
|
+
i
|
|
87
95
|
);
|
|
88
|
-
})
|
|
96
|
+
}) })
|
|
89
97
|
}
|
|
90
98
|
),
|
|
91
|
-
!
|
|
99
|
+
!a && y && /* @__PURE__ */ t("div", { className: "flex flex-col gap-2", children: [
|
|
92
100
|
/* @__PURE__ */ o("div", { className: "h-px bg-stroke-hairline w-full" }),
|
|
93
101
|
/* @__PURE__ */ o(
|
|
94
|
-
|
|
102
|
+
B,
|
|
95
103
|
{
|
|
96
104
|
variant: "secondary",
|
|
97
105
|
size: "md",
|
|
98
106
|
className: "w-full justify-center",
|
|
99
|
-
onClick:
|
|
100
|
-
children:
|
|
107
|
+
onClick: v,
|
|
108
|
+
children: d === "custom" ? "View all" : `View all (${s.length})`
|
|
101
109
|
}
|
|
102
110
|
)
|
|
103
111
|
] })
|
|
104
112
|
] })
|
|
105
113
|
}
|
|
106
114
|
);
|
|
107
|
-
},
|
|
108
|
-
filters:
|
|
109
|
-
onFilterRemove:
|
|
110
|
-
onOverflowClick:
|
|
111
|
-
onViewAll:
|
|
115
|
+
}, ee = ({
|
|
116
|
+
filters: s,
|
|
117
|
+
onFilterRemove: d,
|
|
118
|
+
onOverflowClick: f,
|
|
119
|
+
onViewAll: g
|
|
112
120
|
}) => /* @__PURE__ */ o("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ o(
|
|
113
121
|
$,
|
|
114
122
|
{
|
|
115
|
-
items:
|
|
116
|
-
renderItem: (e,
|
|
117
|
-
const
|
|
118
|
-
return /* @__PURE__ */
|
|
119
|
-
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
123
|
+
items: s,
|
|
124
|
+
renderItem: (e, h) => {
|
|
125
|
+
const a = Array.isArray(e.value) ? e.value : [e.value], u = a.slice(0, 2), r = a.slice(2), l = !!e.overflow, w = e.overflow?.label ? e.overflow.label : e.overflow?.count ? `+${e.overflow.count}` : null, b = r.length > 0, y = l || b, v = `+${r.length}`;
|
|
126
|
+
return /* @__PURE__ */ t("div", { className: "flex items-center px-1", children: [
|
|
127
|
+
h > 0 && /* @__PURE__ */ o("div", { className: "mx-3 h-4 w-px bg-stroke-hairline shrink-0" }),
|
|
128
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
129
|
+
/* @__PURE__ */ t("span", { className: "text-xs font-medium leading-[21px] text-secondary-foreground whitespace-nowrap", children: [
|
|
122
130
|
e.label,
|
|
123
131
|
e.required && /* @__PURE__ */ o("span", { className: "text-validation ms-0.5", children: "*" })
|
|
124
132
|
] }),
|
|
125
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
|
|
126
134
|
/* @__PURE__ */ o(
|
|
127
|
-
|
|
135
|
+
I,
|
|
128
136
|
{
|
|
129
137
|
spacing: "sm",
|
|
130
|
-
tags:
|
|
131
|
-
label: String(
|
|
138
|
+
tags: u.map((p) => ({
|
|
139
|
+
label: String(p),
|
|
132
140
|
variant: "secondary",
|
|
133
141
|
size: "md",
|
|
134
142
|
shape: "rounded",
|
|
135
143
|
removable: e.removable,
|
|
136
|
-
onRemove: () =>
|
|
144
|
+
onRemove: () => d(e.id, p)
|
|
137
145
|
}))
|
|
138
146
|
}
|
|
139
147
|
),
|
|
140
|
-
|
|
141
|
-
/* @__PURE__ */ o(
|
|
142
|
-
|
|
148
|
+
y && (l ? /* @__PURE__ */ t(P, { children: [
|
|
149
|
+
/* @__PURE__ */ o(z, { asChild: !0, children: /* @__PURE__ */ o(
|
|
150
|
+
T,
|
|
143
151
|
{
|
|
144
152
|
asButton: !0,
|
|
145
153
|
variant: "secondary",
|
|
146
154
|
size: "md",
|
|
147
155
|
shape: "rounded",
|
|
148
|
-
className:
|
|
149
|
-
"aria-label": `${e.overflow?.count ||
|
|
150
|
-
onClick: () =>
|
|
151
|
-
children:
|
|
156
|
+
className: O,
|
|
157
|
+
"aria-label": `${e.overflow?.count || r.length} more filters for ${e.label}`,
|
|
158
|
+
onClick: () => f?.(e.id),
|
|
159
|
+
children: w || v
|
|
152
160
|
}
|
|
153
161
|
) }),
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
e.overflow?.count ||
|
|
162
|
+
/* @__PURE__ */ t(S, { variant: "tertiary", side: "top", children: [
|
|
163
|
+
e.overflow?.count || r.length,
|
|
156
164
|
" more filters"
|
|
157
165
|
] })
|
|
158
|
-
] }) : /* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */ o(
|
|
161
|
-
|
|
166
|
+
] }) : /* @__PURE__ */ t(F, { children: [
|
|
167
|
+
/* @__PURE__ */ t(P, { children: [
|
|
168
|
+
/* @__PURE__ */ o(z, { asChild: !0, children: /* @__PURE__ */ o(V, { asChild: !0, children: /* @__PURE__ */ o(
|
|
169
|
+
T,
|
|
162
170
|
{
|
|
163
171
|
asButton: !0,
|
|
164
172
|
variant: "secondary",
|
|
165
173
|
size: "md",
|
|
166
174
|
shape: "rounded",
|
|
167
|
-
className:
|
|
168
|
-
children:
|
|
175
|
+
className: O,
|
|
176
|
+
children: v
|
|
169
177
|
}
|
|
170
178
|
) }) }),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
|
|
179
|
+
/* @__PURE__ */ t(S, { variant: "tertiary", side: "top", children: [
|
|
180
|
+
r.length,
|
|
173
181
|
" more filters"
|
|
174
182
|
] })
|
|
175
183
|
] }),
|
|
176
184
|
/* @__PURE__ */ o(
|
|
177
|
-
|
|
185
|
+
G,
|
|
178
186
|
{
|
|
179
|
-
remainingValues:
|
|
187
|
+
remainingValues: r,
|
|
180
188
|
viewAllTrigger: e.viewAllTrigger,
|
|
181
|
-
onViewAll:
|
|
182
|
-
onItemRemove: (
|
|
189
|
+
onViewAll: g,
|
|
190
|
+
onItemRemove: (p) => d(e.id, p),
|
|
183
191
|
isRemovable: e.removable,
|
|
184
192
|
isCopyable: e.copyable
|
|
185
193
|
}
|
|
@@ -194,6 +202,6 @@ const S = "whitespace-nowrap bg-accent text-brand hover:bg-accent/80 border-0 px
|
|
|
194
202
|
}
|
|
195
203
|
) });
|
|
196
204
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
205
|
+
G as FilterPopoverContent,
|
|
206
|
+
ee as FilterTagList
|
|
199
207
|
};
|
|
@@ -8,8 +8,8 @@ import { useImpactNovaI18n as u } from "../../../i18n/use-impact-nova-i18n.js";
|
|
|
8
8
|
import { Tooltip as W, TooltipTrigger as q, TooltipContent as A } from "../../feedback/tooltip/tooltip.js";
|
|
9
9
|
import { Button as f } from "../../primitives/button/button.js";
|
|
10
10
|
import { Dialog as E, DialogContent as G, DialogHeader as J, DialogTitle as K, DialogDescription as M, DialogFooter as Q } from "../../feedback/dialog/dialog.js";
|
|
11
|
-
const re = p("PromptClose", ({ className: i, ...
|
|
12
|
-
const { t:
|
|
11
|
+
const re = p("PromptClose", ({ className: i, ...c }, l) => {
|
|
12
|
+
const { t: s } = u();
|
|
13
13
|
return /* @__PURE__ */ n(W, { children: [
|
|
14
14
|
/* @__PURE__ */ e(q, { asChild: !0, children: /* @__PURE__ */ e(
|
|
15
15
|
"button",
|
|
@@ -17,20 +17,20 @@ const re = p("PromptClose", ({ className: i, ...s }, l) => {
|
|
|
17
17
|
ref: l,
|
|
18
18
|
className: r("text-content-tertiary hover:text-content transition-colors", i),
|
|
19
19
|
type: "button",
|
|
20
|
-
"aria-label":
|
|
21
|
-
...
|
|
20
|
+
"aria-label": s("aria.close"),
|
|
21
|
+
...c,
|
|
22
22
|
children: /* @__PURE__ */ e(B, { size: 16 })
|
|
23
23
|
}
|
|
24
24
|
) }),
|
|
25
|
-
/* @__PURE__ */ e(A, { side: "top", variant: "tertiary", children:
|
|
25
|
+
/* @__PURE__ */ e(A, { side: "top", variant: "tertiary", children: s("aria.close") })
|
|
26
26
|
] });
|
|
27
27
|
}), oe = p(
|
|
28
28
|
"Prompt",
|
|
29
29
|
({
|
|
30
30
|
open: i,
|
|
31
|
-
onOpenChange:
|
|
31
|
+
onOpenChange: c,
|
|
32
32
|
title: l,
|
|
33
|
-
description:
|
|
33
|
+
description: s,
|
|
34
34
|
confirmLabel: x,
|
|
35
35
|
cancelLabel: b,
|
|
36
36
|
onConfirm: h,
|
|
@@ -46,11 +46,11 @@ const re = p("PromptClose", ({ className: i, ...s }, l) => {
|
|
|
46
46
|
...D
|
|
47
47
|
}, j) => {
|
|
48
48
|
const { t: m } = u(), k = b ?? m("prompt.cancel"), z = x ?? m("prompt.confirm"), P = () => {
|
|
49
|
-
h?.(),
|
|
49
|
+
h?.(), c?.(!1);
|
|
50
50
|
}, T = () => {
|
|
51
|
-
g?.(),
|
|
51
|
+
g?.(), c?.(!1);
|
|
52
52
|
}, o = t !== "default", I = C || (t === "destructive" ? "destructive" : "default");
|
|
53
|
-
return /* @__PURE__ */ e(E, { open: i, onOpenChange:
|
|
53
|
+
return /* @__PURE__ */ e(E, { open: i, onOpenChange: c, ...D, children: /* @__PURE__ */ n(
|
|
54
54
|
G,
|
|
55
55
|
{
|
|
56
56
|
ref: j,
|
|
@@ -88,7 +88,7 @@ const re = p("PromptClose", ({ className: i, ...s }, l) => {
|
|
|
88
88
|
/* @__PURE__ */ n(
|
|
89
89
|
J,
|
|
90
90
|
{
|
|
91
|
-
className: r(o && "space-y-2 items-center bg-canvas-elevated border-none"),
|
|
91
|
+
className: r(o && "space-y-2 items-center bg-canvas-elevated border-none text-center sm:text-center pe-4"),
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ e(
|
|
94
94
|
K,
|
|
@@ -99,11 +99,11 @@ const re = p("PromptClose", ({ className: i, ...s }, l) => {
|
|
|
99
99
|
children: l
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
|
-
|
|
102
|
+
s && /* @__PURE__ */ e(
|
|
103
103
|
M,
|
|
104
104
|
{
|
|
105
105
|
className: r(o && "text-sm text-content-tertiary"),
|
|
106
|
-
children:
|
|
106
|
+
children: s
|
|
107
107
|
}
|
|
108
108
|
)
|
|
109
109
|
]
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const promptVariants: (props?: ({
|
|
2
|
-
variant?: "default" | "
|
|
2
|
+
variant?: "default" | "success" | "warning" | "destructive" | "info" | null | undefined;
|
|
3
3
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,58 +1,62 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import * as n from "@radix-ui/react-popover";
|
|
3
|
+
import { cn as a } from "../../../../lib/utils.js";
|
|
4
|
+
import { preventDismissOnTooltipOutside as t } from "../../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
|
|
5
|
+
import { useOverlayPortalContainer as v } from "../../../../lib/overlay/overlay-portal-context.js";
|
|
6
|
+
import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as f } from "../../../../lib/overlay/overlay-host.constants.js";
|
|
7
|
+
function O({
|
|
8
|
+
menuRef: l,
|
|
9
|
+
menuMinHeight: i,
|
|
10
|
+
menuWidth: s,
|
|
10
11
|
isReadOnly: r,
|
|
11
12
|
id: d,
|
|
12
|
-
menuLabel:
|
|
13
|
-
children:
|
|
13
|
+
menuLabel: p,
|
|
14
|
+
children: m
|
|
14
15
|
}) {
|
|
15
|
-
const c =
|
|
16
|
-
return /* @__PURE__ */ o(
|
|
17
|
-
|
|
16
|
+
const c = v();
|
|
17
|
+
return /* @__PURE__ */ o(n.Portal, { container: c, children: /* @__PURE__ */ o(
|
|
18
|
+
n.Content,
|
|
18
19
|
{
|
|
19
|
-
ref:
|
|
20
|
+
ref: l,
|
|
20
21
|
side: "bottom",
|
|
21
22
|
sideOffset: 4,
|
|
22
23
|
align: "start",
|
|
23
24
|
avoidCollisions: !0,
|
|
24
25
|
collisionPadding: 8,
|
|
25
|
-
"aria-label":
|
|
26
|
+
"aria-label": p,
|
|
26
27
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
28
|
+
onPointerDownOutside: t,
|
|
29
|
+
onInteractOutside: t,
|
|
30
|
+
onFocusOutside: t,
|
|
27
31
|
onWheel: (e) => e.stopPropagation(),
|
|
28
32
|
style: {
|
|
29
|
-
width:
|
|
33
|
+
width: s ?? "var(--radix-popover-trigger-width)",
|
|
30
34
|
minWidth: "var(--radix-popover-trigger-width)",
|
|
31
35
|
maxHeight: "min(320px, var(--radix-popover-content-available-height, 320px))"
|
|
32
36
|
},
|
|
33
|
-
className:
|
|
37
|
+
className: a(
|
|
34
38
|
"z-50 flex flex-col overflow-hidden rounded-[12px] p-0 text-base shadow-elevation-select focus:outline-none sm:text-sm border-none pointer-events-auto",
|
|
35
39
|
r ? "bg-disabled-surface" : "bg-canvas-elevated",
|
|
36
|
-
|
|
40
|
+
f
|
|
37
41
|
),
|
|
38
42
|
"data-testid": `select-menu-${d || "default"}`,
|
|
39
43
|
"data-component": "select-menu",
|
|
40
44
|
children: /* @__PURE__ */ o(
|
|
41
45
|
"div",
|
|
42
46
|
{
|
|
43
|
-
className:
|
|
47
|
+
className: a(
|
|
44
48
|
"flex min-h-0 flex-1 flex-col overflow-hidden rounded-[12px]",
|
|
45
49
|
r ? "bg-disabled-surface" : "bg-canvas-elevated"
|
|
46
50
|
),
|
|
47
51
|
style: {
|
|
48
|
-
minHeight:
|
|
52
|
+
minHeight: i ? `${i}px` : void 0
|
|
49
53
|
},
|
|
50
|
-
children:
|
|
54
|
+
children: m
|
|
51
55
|
}
|
|
52
56
|
)
|
|
53
57
|
}
|
|
54
58
|
) });
|
|
55
59
|
}
|
|
56
60
|
export {
|
|
57
|
-
|
|
61
|
+
O as SelectMenuPanel
|
|
58
62
|
};
|