impact-nova 2.2.4 → 2.2.6
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/ag-grid-tooltip-overflow.d.ts +2 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +109 -87
- package/dist/components/data/ag-grid-react/index.d.ts +2 -0
- package/dist/components/data/ag-grid-react/index.js +41 -36
- package/dist/components/data/data-table/data-table-saved-views.js +216 -191
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +2 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +30 -27
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +44 -30
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +162 -127
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +30 -29
- package/dist/components/data/expandable-list-item/expandable-list-item.types.d.ts +8 -1
- package/dist/components/data/expandable-list-item/index.d.ts +1 -1
- package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
- package/dist/components/feedback/tooltip/index.d.ts +3 -0
- package/dist/components/feedback/tooltip/index.js +13 -9
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.js +69 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +37 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +55 -0
- package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
- package/dist/components/flows/filter-panel/filter-panel.js +76 -69
- package/dist/components/flows/filter-strip/filter-summary.js +184 -163
- package/dist/components/flows/filter-strip/filter-tag-list.js +119 -103
- package/dist/components/forms/select/components/SelectOptionRow.js +35 -27
- package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
- package/dist/components/forms/select/components/Submenu.js +40 -31
- package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
- package/dist/components/layout/horizontal-scroller/index.js +6 -2
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
- package/dist/components/primitives/stepper/stepper.js +61 -42
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +468 -460
- package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
- package/dist/lib/overflow/is-text-overflowing.js +6 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/package.json +1 -1
|
@@ -1,171 +1,187 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import * as N from "react";
|
|
3
|
+
import { cn as O } from "../../../lib/utils.js";
|
|
4
|
+
import { HorizontalScroller as $ } from "../../layout/horizontal-scroller/horizontal-scroller.js";
|
|
5
|
+
import { TagGroup as A } from "../../primitives/tag-group/tag-group.js";
|
|
6
|
+
import { Tag as C } from "../../primitives/tag/tag.js";
|
|
7
|
+
import { Tooltip as k, TooltipTrigger as T, TooltipContent as z } from "../../feedback/tooltip/tooltip.js";
|
|
8
|
+
import { OverflowTooltip as P } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
9
|
+
import { PopoverContent as j, Popover as R, PopoverTrigger as B } from "../../feedback/popover/popover.js";
|
|
10
|
+
import { Button as F } from "../../primitives/button/button.js";
|
|
11
|
+
import { Checkmark as I, Copy as L, Cross as V } from "impact-nova-icons";
|
|
12
|
+
const S = "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", E = ({
|
|
13
|
+
remainingValues: a,
|
|
12
14
|
viewAllTrigger: c = "expand",
|
|
13
15
|
onViewAll: h,
|
|
14
|
-
onItemRemove:
|
|
15
|
-
isRemovable:
|
|
16
|
-
isCopyable:
|
|
16
|
+
onItemRemove: v,
|
|
17
|
+
isRemovable: f,
|
|
18
|
+
isCopyable: e = !1,
|
|
17
19
|
externalCopyFunction: m
|
|
18
20
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
navigator.clipboard.writeText(String(l)), d(
|
|
21
|
-
},
|
|
22
|
-
c === "custom" ? h?.() :
|
|
21
|
+
const [s, g] = N.useState(!1), [n, d] = N.useState(null), x = (t, l, i) => {
|
|
22
|
+
navigator.clipboard.writeText(String(l)), d(i), t.currentTarget.blur(), setTimeout(() => d(null), 1500);
|
|
23
|
+
}, b = s ? a : a.slice(0, 3), w = a.length > 3, u = () => {
|
|
24
|
+
c === "custom" ? h?.() : g(!0);
|
|
23
25
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
26
|
+
return /* @__PURE__ */ o(
|
|
27
|
+
j,
|
|
26
28
|
{
|
|
27
29
|
className: "w-[200px] p-0 rounded-[8px] bg-canvas-elevated shadow-elevation-floating border-none",
|
|
28
30
|
align: "start",
|
|
29
31
|
sideOffset: 8,
|
|
30
32
|
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
31
33
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col py-2 px-[6px]", children: [
|
|
32
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ o(
|
|
33
35
|
"div",
|
|
34
36
|
{
|
|
35
|
-
className: `flex flex-col gap-1 mb-2 ${
|
|
36
|
-
children:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */ r("div", { className: "flex items-center shrink-0", children: [
|
|
46
|
-
o && /* @__PURE__ */ e(
|
|
47
|
-
"button",
|
|
37
|
+
className: `flex flex-col gap-1 mb-2 ${s ? "max-h-[180px] overflow-y-auto" : ""}`,
|
|
38
|
+
children: b.map((t, l) => {
|
|
39
|
+
const i = String(t), y = !!(e || f);
|
|
40
|
+
return /* @__PURE__ */ r(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: "group relative shrink-0 overflow-hidden rounded px-3 py-2 text-[14px] font-medium leading-[20px] text-foreground hover:bg-secondary",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ o(
|
|
46
|
+
P,
|
|
48
47
|
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
triggerClassName: O(
|
|
49
|
+
"block min-w-0 w-full truncate",
|
|
50
|
+
y && "pe-0 group-hover:pe-10"
|
|
51
|
+
),
|
|
52
|
+
content: i,
|
|
53
|
+
side: "right",
|
|
54
|
+
variant: "tertiary",
|
|
55
|
+
children: i
|
|
55
56
|
}
|
|
56
57
|
),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
y ? /* @__PURE__ */ r("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
|
+
e ? /* @__PURE__ */ o(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
onClick: (p) => {
|
|
64
|
+
p.stopPropagation(), m ? m({ e: p, val: t, index: l }) : x(p, t, l);
|
|
65
|
+
},
|
|
66
|
+
"aria-label": `Copy ${i}`,
|
|
67
|
+
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: n === l ? /* @__PURE__ */ o(I, { size: 12, className: "text-success" }) : /* @__PURE__ */ o(L, { size: 12 })
|
|
69
|
+
}
|
|
70
|
+
) : null,
|
|
71
|
+
f ? /* @__PURE__ */ o(
|
|
72
|
+
"button",
|
|
73
|
+
{
|
|
74
|
+
type: "button",
|
|
75
|
+
onClick: (p) => {
|
|
76
|
+
p.stopPropagation(), v(t);
|
|
77
|
+
},
|
|
78
|
+
"aria-label": `Remove ${i}`,
|
|
79
|
+
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(V, { size: 12 })
|
|
81
|
+
}
|
|
82
|
+
) : null
|
|
83
|
+
] }) : null
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
l
|
|
87
|
+
);
|
|
88
|
+
})
|
|
73
89
|
}
|
|
74
90
|
),
|
|
75
|
-
!
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
91
|
+
!s && w && /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
92
|
+
/* @__PURE__ */ o("div", { className: "h-px bg-stroke-hairline w-full" }),
|
|
93
|
+
/* @__PURE__ */ o(
|
|
94
|
+
F,
|
|
79
95
|
{
|
|
80
96
|
variant: "secondary",
|
|
81
97
|
size: "md",
|
|
82
98
|
className: "w-full justify-center",
|
|
83
|
-
onClick:
|
|
84
|
-
children: c === "custom" ? "View all" : `View all (${
|
|
99
|
+
onClick: u,
|
|
100
|
+
children: c === "custom" ? "View all" : `View all (${a.length})`
|
|
85
101
|
}
|
|
86
102
|
)
|
|
87
103
|
] })
|
|
88
104
|
] })
|
|
89
105
|
}
|
|
90
106
|
);
|
|
91
|
-
},
|
|
92
|
-
filters:
|
|
107
|
+
}, X = ({
|
|
108
|
+
filters: a,
|
|
93
109
|
onFilterRemove: c,
|
|
94
110
|
onOverflowClick: h,
|
|
95
|
-
onViewAll:
|
|
96
|
-
}) => /* @__PURE__ */
|
|
97
|
-
|
|
111
|
+
onViewAll: v
|
|
112
|
+
}) => /* @__PURE__ */ o("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ o(
|
|
113
|
+
$,
|
|
98
114
|
{
|
|
99
|
-
items:
|
|
100
|
-
renderItem: (
|
|
101
|
-
const
|
|
115
|
+
items: a,
|
|
116
|
+
renderItem: (e, m) => {
|
|
117
|
+
const s = Array.isArray(e.value) ? e.value : [e.value], g = s.slice(0, 2), n = s.slice(2), d = !!e.overflow, x = e.overflow?.label ? e.overflow.label : e.overflow?.count ? `+${e.overflow.count}` : null, b = n.length > 0, w = d || b, u = `+${n.length}`;
|
|
102
118
|
return /* @__PURE__ */ r("div", { className: "flex items-center px-1", children: [
|
|
103
|
-
m > 0 && /* @__PURE__ */
|
|
119
|
+
m > 0 && /* @__PURE__ */ o("div", { className: "mx-3 h-4 w-px bg-stroke-hairline shrink-0" }),
|
|
104
120
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
105
121
|
/* @__PURE__ */ r("span", { className: "text-xs font-medium leading-[21px] text-secondary-foreground whitespace-nowrap", children: [
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
e.label,
|
|
123
|
+
e.required && /* @__PURE__ */ o("span", { className: "text-validation ms-0.5", children: "*" })
|
|
108
124
|
] }),
|
|
109
125
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
126
|
+
/* @__PURE__ */ o(
|
|
127
|
+
A,
|
|
112
128
|
{
|
|
113
129
|
spacing: "sm",
|
|
114
|
-
tags:
|
|
130
|
+
tags: g.map((t) => ({
|
|
115
131
|
label: String(t),
|
|
116
132
|
variant: "secondary",
|
|
117
133
|
size: "md",
|
|
118
134
|
shape: "rounded",
|
|
119
|
-
removable:
|
|
120
|
-
onRemove: () => c(
|
|
135
|
+
removable: e.removable,
|
|
136
|
+
onRemove: () => c(e.id, t)
|
|
121
137
|
}))
|
|
122
138
|
}
|
|
123
139
|
),
|
|
124
|
-
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
|
|
140
|
+
w && (d ? /* @__PURE__ */ r(k, { children: [
|
|
141
|
+
/* @__PURE__ */ o(T, { asChild: !0, children: /* @__PURE__ */ o(
|
|
142
|
+
C,
|
|
127
143
|
{
|
|
128
144
|
asButton: !0,
|
|
129
145
|
variant: "secondary",
|
|
130
146
|
size: "md",
|
|
131
147
|
shape: "rounded",
|
|
132
|
-
className:
|
|
133
|
-
"aria-label": `${
|
|
134
|
-
onClick: () => h?.(
|
|
135
|
-
children:
|
|
148
|
+
className: S,
|
|
149
|
+
"aria-label": `${e.overflow?.count || n.length} more filters for ${e.label}`,
|
|
150
|
+
onClick: () => h?.(e.id),
|
|
151
|
+
children: x || u
|
|
136
152
|
}
|
|
137
153
|
) }),
|
|
138
|
-
/* @__PURE__ */ r(
|
|
139
|
-
|
|
154
|
+
/* @__PURE__ */ r(z, { variant: "tertiary", side: "top", children: [
|
|
155
|
+
e.overflow?.count || n.length,
|
|
140
156
|
" more filters"
|
|
141
157
|
] })
|
|
142
|
-
] }) : /* @__PURE__ */ r(
|
|
143
|
-
/* @__PURE__ */ r(
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
|
|
158
|
+
] }) : /* @__PURE__ */ r(R, { children: [
|
|
159
|
+
/* @__PURE__ */ r(k, { children: [
|
|
160
|
+
/* @__PURE__ */ o(T, { asChild: !0, children: /* @__PURE__ */ o(B, { asChild: !0, children: /* @__PURE__ */ o(
|
|
161
|
+
C,
|
|
146
162
|
{
|
|
147
163
|
asButton: !0,
|
|
148
164
|
variant: "secondary",
|
|
149
165
|
size: "md",
|
|
150
166
|
shape: "rounded",
|
|
151
|
-
className:
|
|
152
|
-
children:
|
|
167
|
+
className: S,
|
|
168
|
+
children: u
|
|
153
169
|
}
|
|
154
170
|
) }) }),
|
|
155
|
-
/* @__PURE__ */ r(
|
|
171
|
+
/* @__PURE__ */ r(z, { variant: "tertiary", side: "top", children: [
|
|
156
172
|
n.length,
|
|
157
173
|
" more filters"
|
|
158
174
|
] })
|
|
159
175
|
] }),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
|
|
176
|
+
/* @__PURE__ */ o(
|
|
177
|
+
E,
|
|
162
178
|
{
|
|
163
179
|
remainingValues: n,
|
|
164
|
-
viewAllTrigger:
|
|
165
|
-
onViewAll:
|
|
166
|
-
onItemRemove: (t) => c(
|
|
167
|
-
isRemovable:
|
|
168
|
-
isCopyable:
|
|
180
|
+
viewAllTrigger: e.viewAllTrigger,
|
|
181
|
+
onViewAll: v,
|
|
182
|
+
onItemRemove: (t) => c(e.id, t),
|
|
183
|
+
isRemovable: e.removable,
|
|
184
|
+
isCopyable: e.copyable
|
|
169
185
|
}
|
|
170
186
|
)
|
|
171
187
|
] }))
|
|
@@ -178,6 +194,6 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
178
194
|
}
|
|
179
195
|
) });
|
|
180
196
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
197
|
+
E as FilterPopoverContent,
|
|
198
|
+
X as FilterTagList
|
|
183
199
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as w, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { Checkmark as
|
|
4
|
-
import { Badge as
|
|
5
|
-
import {
|
|
2
|
+
import { memo as T } from "react";
|
|
3
|
+
import { Checkmark as Y, ChevronRight as F } from "impact-nova-icons";
|
|
4
|
+
import { Badge as H } from "../../../data-display/badge/badge.js";
|
|
5
|
+
import { OverflowTooltip as J } from "../../../feedback/tooltip/overflow-tooltip.js";
|
|
6
|
+
import { cn as m } from "../../../../lib/utils.js";
|
|
6
7
|
import { selectOptionVariants as K } from "../select.variants.js";
|
|
7
8
|
import { isSelected as L } from "../utils/select.js";
|
|
8
9
|
import { Submenu as Q } from "./Submenu.js";
|
|
9
|
-
function
|
|
10
|
+
function U({
|
|
10
11
|
option: e,
|
|
11
12
|
virtualRow: s,
|
|
12
13
|
measureElement: j,
|
|
@@ -21,10 +22,10 @@ function T({
|
|
|
21
22
|
isOptDisabled: n,
|
|
22
23
|
indeterminate: h,
|
|
23
24
|
selectedCount: N,
|
|
24
|
-
isParentSelectable:
|
|
25
|
+
isParentSelectable: y,
|
|
25
26
|
highlighted: z,
|
|
26
27
|
activeSubmenu: B,
|
|
27
|
-
setActiveSubmenu:
|
|
28
|
+
setActiveSubmenu: $,
|
|
28
29
|
optionLabel: V,
|
|
29
30
|
optionLabelString: E,
|
|
30
31
|
sequence: d,
|
|
@@ -50,7 +51,7 @@ function T({
|
|
|
50
51
|
"div",
|
|
51
52
|
{
|
|
52
53
|
id: `${C}-option-${s.index}`,
|
|
53
|
-
className:
|
|
54
|
+
className: m(
|
|
54
55
|
K({
|
|
55
56
|
disabled: n,
|
|
56
57
|
readOnly: u,
|
|
@@ -62,10 +63,10 @@ function T({
|
|
|
62
63
|
paddingInlineStart: `${e.depth * 16 + 12}px`
|
|
63
64
|
},
|
|
64
65
|
onClick: () => {
|
|
65
|
-
n || (c && e.isGroup || a && e.isSubmenuParent) &&
|
|
66
|
+
n || (c && e.isGroup || a && e.isSubmenuParent) && !y || b(e);
|
|
66
67
|
},
|
|
67
68
|
onMouseEnter: () => {
|
|
68
|
-
a && e.isSubmenuParent ?
|
|
69
|
+
a && e.isSubmenuParent ? $(e.value) : $(null);
|
|
69
70
|
},
|
|
70
71
|
"data-testid": `select-option-${x}-${p}`,
|
|
71
72
|
"data-state": r ? "checked" : "unchecked",
|
|
@@ -84,44 +85,51 @@ function T({
|
|
|
84
85
|
},
|
|
85
86
|
e
|
|
86
87
|
) : /* @__PURE__ */ w("div", { className: "flex items-center flex-1 overflow-hidden", children: [
|
|
87
|
-
f && (c && e.isGroup || a && e.isSubmenuParent ?
|
|
88
|
+
f && (c && e.isGroup || a && e.isSubmenuParent ? y : !0) && /* @__PURE__ */ t(
|
|
88
89
|
"span",
|
|
89
90
|
{
|
|
90
91
|
"aria-hidden": "true",
|
|
91
|
-
className:
|
|
92
|
+
className: m(
|
|
92
93
|
"mr-[7px] flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border border-stroke-field bg-canvas-elevated",
|
|
93
94
|
(r || h) && "border-brand bg-accent text-brand",
|
|
94
95
|
(n || u) && "opacity-50"
|
|
95
96
|
),
|
|
96
|
-
children: r && !h ? /* @__PURE__ */ t(
|
|
97
|
+
children: r && !h ? /* @__PURE__ */ t(Y, { className: "h-3.5 w-3.5" }) : h ? /* @__PURE__ */ t("span", { className: "block h-0.5 w-2.5 bg-current" }) : null
|
|
97
98
|
}
|
|
98
99
|
),
|
|
99
100
|
/* @__PURE__ */ w(
|
|
100
101
|
"div",
|
|
101
102
|
{
|
|
102
|
-
className:
|
|
103
|
+
className: m(
|
|
103
104
|
"flex min-w-0 flex-1 items-center overflow-hidden",
|
|
104
105
|
k ? "justify-between gap-2" : "gap-2"
|
|
105
106
|
),
|
|
106
107
|
children: [
|
|
107
108
|
/* @__PURE__ */ t(
|
|
108
|
-
|
|
109
|
+
J,
|
|
109
110
|
{
|
|
110
|
-
|
|
111
|
+
triggerClassName: m(
|
|
111
112
|
"block min-w-0 truncate",
|
|
112
113
|
k && "flex-1",
|
|
113
114
|
l ? "text-xs font-semibold text-content-icon uppercase tracking-wider" : r && !g ? "font-medium" : "font-normal",
|
|
114
115
|
!l && "text-[14px]"
|
|
115
116
|
),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
children:
|
|
117
|
+
content: E,
|
|
118
|
+
side: "top",
|
|
119
|
+
variant: "tertiary",
|
|
120
|
+
children: /* @__PURE__ */ t(
|
|
121
|
+
"span",
|
|
122
|
+
{
|
|
123
|
+
"data-testid": `select-option-label-${x}-${p}`,
|
|
124
|
+
"data-state": r ? "checked" : "unchecked",
|
|
125
|
+
children: V
|
|
126
|
+
}
|
|
127
|
+
)
|
|
120
128
|
}
|
|
121
129
|
),
|
|
122
130
|
(l || g) && N > 0 && /* @__PURE__ */ t("span", { className: "inline-flex shrink-0 items-center justify-center rounded-full bg-brand-tint px-1.5 py-0.5 text-xs font-medium text-brand-on-subtle", children: N }),
|
|
123
131
|
k && /* @__PURE__ */ t("span", { className: "flex h-5 w-6 shrink-0 items-center justify-center", children: d !== void 0 && d > 0 ? /* @__PURE__ */ t(
|
|
124
|
-
|
|
132
|
+
H,
|
|
125
133
|
{
|
|
126
134
|
variant: "outline",
|
|
127
135
|
color: "primary",
|
|
@@ -133,7 +141,7 @@ function T({
|
|
|
133
141
|
]
|
|
134
142
|
}
|
|
135
143
|
),
|
|
136
|
-
a && e.isSubmenuParent && /* @__PURE__ */ t(
|
|
144
|
+
a && e.isSubmenuParent && /* @__PURE__ */ t(F, { size: "12px", className: "text-content-icon" })
|
|
137
145
|
] })
|
|
138
146
|
}
|
|
139
147
|
),
|
|
@@ -145,8 +153,8 @@ function T({
|
|
|
145
153
|
isReadOnly: !!u,
|
|
146
154
|
isSelected: (i) => L(i, G, !!f),
|
|
147
155
|
getIndeterminateState: (i) => {
|
|
148
|
-
const
|
|
149
|
-
return
|
|
156
|
+
const o = P(i);
|
|
157
|
+
return o ? o.selected > 0 && o.selected < o.total : !1;
|
|
150
158
|
},
|
|
151
159
|
getSelectedCount: (i) => P(i)?.selected || 0,
|
|
152
160
|
handleSelect: b,
|
|
@@ -158,8 +166,8 @@ function T({
|
|
|
158
166
|
s.key
|
|
159
167
|
);
|
|
160
168
|
}
|
|
161
|
-
const
|
|
169
|
+
const D = T(U);
|
|
162
170
|
export {
|
|
163
|
-
|
|
164
|
-
|
|
171
|
+
D as SelectOptionRow,
|
|
172
|
+
U as SelectOptionRowInner
|
|
165
173
|
};
|
|
@@ -1,28 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "../../../../lib/utils.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { OverflowTooltip as m } from "../../../feedback/tooltip/overflow-tooltip.js";
|
|
5
|
+
import { isInvertedSelection as h, isOptionArray as d } from "../utils/select.js";
|
|
6
|
+
function C({
|
|
7
|
+
isMulti: u,
|
|
8
|
+
isDisabled: p,
|
|
9
|
+
internalValue: o,
|
|
10
|
+
totalCount: s,
|
|
11
|
+
totalOptionsCount: g,
|
|
12
|
+
formatSelectedCount: v,
|
|
13
|
+
resolveOptionLabel: a,
|
|
14
|
+
placeholder: c
|
|
13
15
|
}) {
|
|
14
|
-
const
|
|
16
|
+
const n = x(
|
|
15
17
|
"text-[14px] font-medium truncate min-w-0 block",
|
|
16
|
-
|
|
18
|
+
p ? "text-disabled-foreground" : "text-foreground"
|
|
17
19
|
);
|
|
18
|
-
if (
|
|
19
|
-
const e =
|
|
20
|
+
if (u) {
|
|
21
|
+
const e = o || [];
|
|
20
22
|
let t = 0;
|
|
21
|
-
|
|
23
|
+
if (h(e) ? t = Math.max(0, (typeof s == "number" ? s : g) - e.excludedValues.length) : d(e) && (t = e.length), t === 0)
|
|
24
|
+
return c;
|
|
25
|
+
if (t === 1 && d(e)) {
|
|
26
|
+
const i = a(e[0]);
|
|
27
|
+
return /* @__PURE__ */ r(
|
|
28
|
+
m,
|
|
29
|
+
{
|
|
30
|
+
triggerClassName: n,
|
|
31
|
+
content: i,
|
|
32
|
+
side: "top",
|
|
33
|
+
variant: "tertiary",
|
|
34
|
+
children: /* @__PURE__ */ r("span", { children: i })
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ r("span", { className: n, children: v(t) });
|
|
22
39
|
}
|
|
23
|
-
const
|
|
24
|
-
|
|
40
|
+
const l = o;
|
|
41
|
+
if (!l)
|
|
42
|
+
return c;
|
|
43
|
+
const f = a(l);
|
|
44
|
+
return /* @__PURE__ */ r(
|
|
45
|
+
m,
|
|
46
|
+
{
|
|
47
|
+
triggerClassName: n,
|
|
48
|
+
content: f,
|
|
49
|
+
side: "top",
|
|
50
|
+
variant: "tertiary",
|
|
51
|
+
children: /* @__PURE__ */ r("span", { children: f })
|
|
52
|
+
}
|
|
53
|
+
);
|
|
25
54
|
}
|
|
26
55
|
export {
|
|
27
|
-
|
|
56
|
+
C as SelectTriggerValue
|
|
28
57
|
};
|