impact-nova 2.1.0-alpha.2 → 2.1.0-alpha.4
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/feedback/dropdown-menu/dropdown-menu.js +2 -2
- package/dist/components/feedback/popover/popover.js +9 -2
- package/dist/components/forms/combobox/combobox.js +1 -1
- package/dist/components/forms/select/components/SelectMenuPanel.js +1 -1
- package/dist/components/forms/select/components/SelectTrigger.js +90 -85
- package/dist/components/forms/select/components/Submenu.js +1 -1
- package/dist/components/forms/select/select.js +28 -28
- package/dist/components/forms/select/select.variants.js +3 -3
- package/dist/components/layout/header/header.js +34 -34
- package/dist/components/primitives/tag/tag.variants.js +2 -2
- package/dist/impact-nova-components.css +5 -0
- package/dist/impact-nova-tokens.scss +13 -0
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ const w = l.forwardRef(({ className: n, ...a }, o) => /* @__PURE__ */ e(t.Portal
|
|
|
46
46
|
{
|
|
47
47
|
ref: o,
|
|
48
48
|
className: s(
|
|
49
|
-
"z-
|
|
49
|
+
"z-[100] min-w-[8rem] overflow-hidden rounded-lg bg-canvas-overlay p-2 text-canvas-overlay-foreground shadow-elevation-floating text-[13px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin] motion-reduce:animate-none motion-reduce:transition-none",
|
|
50
50
|
n
|
|
51
51
|
),
|
|
52
52
|
...a
|
|
@@ -61,7 +61,7 @@ const N = l.forwardRef(({ className: n, sideOffset: a = 4, portalled: o = !0, ..
|
|
|
61
61
|
sideOffset: a,
|
|
62
62
|
"data-component": "dropdown-menu-content",
|
|
63
63
|
className: s(
|
|
64
|
-
"z-
|
|
64
|
+
"z-[100] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[12rem] overflow-y-auto overflow-x-hidden rounded-lg bg-canvas-overlay p-2 text-canvas-overlay-foreground shadow-elevation-floating flex flex-col gap-0.5",
|
|
65
65
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin] motion-reduce:animate-none motion-reduce:transition-none",
|
|
66
66
|
n
|
|
67
67
|
),
|
|
@@ -6,7 +6,14 @@ import { Tooltip as h, TooltipTrigger as g, TooltipContent as y } from "../toolt
|
|
|
6
6
|
import { wrapRadixPart as l, createCompoundPart as u } from "../../../lib/primitives/create-compound.js";
|
|
7
7
|
import { cn as n } from "../../../lib/utils.js";
|
|
8
8
|
import { useImpactNovaI18n as c } from "../../../i18n/use-impact-nova-i18n.js";
|
|
9
|
-
const B = (o) => /* @__PURE__ */ e(
|
|
9
|
+
const B = (o) => /* @__PURE__ */ e(
|
|
10
|
+
a.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-component": "popover",
|
|
13
|
+
modal: !1,
|
|
14
|
+
...o
|
|
15
|
+
}
|
|
16
|
+
), F = l(
|
|
10
17
|
"popover",
|
|
11
18
|
"trigger",
|
|
12
19
|
"PopoverTrigger",
|
|
@@ -27,7 +34,7 @@ const B = (o) => /* @__PURE__ */ e(a.Root, { "data-component": "popover", ...o }
|
|
|
27
34
|
"aria-label": s ?? v("aria.popover"),
|
|
28
35
|
"data-component": "popover-content",
|
|
29
36
|
className: n(
|
|
30
|
-
"z-
|
|
37
|
+
"z-[100] min-w-[240px] rounded-xl border bg-canvas-overlay p-3 text-canvas-overlay-foreground shadow-md outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin] pointer-events-auto motion-reduce:animate-none motion-reduce:transition-none",
|
|
31
38
|
o
|
|
32
39
|
),
|
|
33
40
|
...r
|
|
@@ -260,7 +260,7 @@ const De = ve.forwardRef(
|
|
|
260
260
|
className: _(
|
|
261
261
|
"cursor-default select-none py-[6px] px-3 flex items-center transition-colors rounded-md",
|
|
262
262
|
E ? "justify-end text-right" : "justify-between",
|
|
263
|
-
i && G === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content-primary" : i && G === "mouse" ? "bg-muted text-content-primary" : g ? "bg-accent text-content-primary" : "text-content-primary hover:bg-muted cursor-pointer"
|
|
263
|
+
i && G === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content-primary" : i && G === "mouse" ? "bg-muted text-content-primary" : g ? "bg-accent text-content-primary" : "text-content-primary hover:bg-canvas-muted cursor-pointer"
|
|
264
264
|
),
|
|
265
265
|
onMouseEnter: () => {
|
|
266
266
|
w("mouse"), m(t);
|
|
@@ -30,7 +30,7 @@ function x({
|
|
|
30
30
|
maxHeight: "var(--radix-popover-content-available-height)"
|
|
31
31
|
},
|
|
32
32
|
className: r(
|
|
33
|
-
"z-
|
|
33
|
+
"z-[100] flex flex-col overflow-hidden rounded-[12px] p-0 text-base shadow-[0px_1px_6px_0px_rgba(26,39,124,0.14)] focus:outline-none sm:text-sm border-none pointer-events-auto",
|
|
34
34
|
a ? "bg-disabled-surface" : "bg-canvas"
|
|
35
35
|
),
|
|
36
36
|
"data-testid": `select-menu-${d || "default"}`,
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as H } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingSpinner as J, Cross as K, ChevronRight as Q } from "impact-nova-icons";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
4
4
|
import { selectTriggerVariants as U } from "../select.variants.js";
|
|
5
5
|
import { hasClearableSelectValue as W } from "../utils/hasClearableSelectValue.js";
|
|
6
6
|
import { SelectTriggerValue as X } from "./SelectTriggerValue.js";
|
|
7
|
-
function
|
|
8
|
-
triggerRef:
|
|
9
|
-
inputRef:
|
|
10
|
-
selectFieldId:
|
|
11
|
-
listboxId:
|
|
12
|
-
id:
|
|
13
|
-
className:
|
|
14
|
-
size:
|
|
15
|
-
error:
|
|
16
|
-
isDisabled:
|
|
17
|
-
isReadOnly:
|
|
18
|
-
isOpen:
|
|
19
|
-
isLoading:
|
|
20
|
-
isProcessing:
|
|
21
|
-
isClearable:
|
|
22
|
-
isSearchable:
|
|
23
|
-
searchPosition:
|
|
24
|
-
searchValue:
|
|
25
|
-
setSearchValue:
|
|
26
|
-
autoFocus:
|
|
27
|
-
name:
|
|
28
|
-
label:
|
|
29
|
-
placeholder:
|
|
30
|
-
leftContent:
|
|
31
|
-
activeDescendantId:
|
|
32
|
-
internalValue:
|
|
33
|
-
totalCount:
|
|
7
|
+
function tt({
|
|
8
|
+
triggerRef: x,
|
|
9
|
+
inputRef: g,
|
|
10
|
+
selectFieldId: h,
|
|
11
|
+
listboxId: b,
|
|
12
|
+
id: c,
|
|
13
|
+
className: v,
|
|
14
|
+
size: w = "default",
|
|
15
|
+
error: N,
|
|
16
|
+
isDisabled: a,
|
|
17
|
+
isReadOnly: n,
|
|
18
|
+
isOpen: r,
|
|
19
|
+
isLoading: C,
|
|
20
|
+
isProcessing: P,
|
|
21
|
+
isClearable: k,
|
|
22
|
+
isSearchable: z,
|
|
23
|
+
searchPosition: S,
|
|
24
|
+
searchValue: y,
|
|
25
|
+
setSearchValue: j,
|
|
26
|
+
autoFocus: T,
|
|
27
|
+
name: V,
|
|
28
|
+
label: i,
|
|
29
|
+
placeholder: s,
|
|
30
|
+
leftContent: d,
|
|
31
|
+
activeDescendantId: $,
|
|
32
|
+
internalValue: u,
|
|
33
|
+
totalCount: D,
|
|
34
34
|
totalOptionsCount: F,
|
|
35
35
|
formatSelectedCount: I,
|
|
36
36
|
resolveOptionLabel: L,
|
|
@@ -38,122 +38,127 @@ function ee({
|
|
|
38
38
|
onFocus: q,
|
|
39
39
|
onBlur: A,
|
|
40
40
|
onKeyDown: B,
|
|
41
|
-
onOpenChange:
|
|
41
|
+
onOpenChange: p,
|
|
42
42
|
onClear: E
|
|
43
43
|
}) {
|
|
44
|
-
const G =
|
|
45
|
-
return /* @__PURE__ */
|
|
44
|
+
const G = k && !n && !a && W(m, u);
|
|
45
|
+
return /* @__PURE__ */ e(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
|
-
ref:
|
|
49
|
-
className:
|
|
48
|
+
ref: x,
|
|
49
|
+
className: f(
|
|
50
50
|
U({
|
|
51
|
-
size:
|
|
52
|
-
error: !!
|
|
53
|
-
disabled: !!
|
|
54
|
-
readOnly:
|
|
55
|
-
open:
|
|
51
|
+
size: w,
|
|
52
|
+
error: !!N,
|
|
53
|
+
disabled: !!a,
|
|
54
|
+
readOnly: n,
|
|
55
|
+
open: r
|
|
56
56
|
}),
|
|
57
|
-
|
|
57
|
+
v
|
|
58
58
|
),
|
|
59
|
-
id:
|
|
60
|
-
tabIndex:
|
|
59
|
+
id: h,
|
|
60
|
+
tabIndex: a ? -1 : 0,
|
|
61
61
|
onFocus: q,
|
|
62
62
|
onBlur: A,
|
|
63
63
|
role: "combobox",
|
|
64
|
-
"aria-expanded":
|
|
64
|
+
"aria-expanded": r,
|
|
65
65
|
"aria-haspopup": "listbox",
|
|
66
|
-
"aria-controls":
|
|
67
|
-
"aria-activedescendant":
|
|
68
|
-
"aria-label":
|
|
69
|
-
"aria-disabled":
|
|
66
|
+
"aria-controls": b,
|
|
67
|
+
"aria-activedescendant": $,
|
|
68
|
+
"aria-label": i ? String(i) : s,
|
|
69
|
+
"aria-disabled": a || void 0,
|
|
70
70
|
"data-component": "select-trigger",
|
|
71
|
-
"data-disabled":
|
|
72
|
-
"data-state":
|
|
71
|
+
"data-disabled": a || void 0,
|
|
72
|
+
"data-state": r ? "open" : "closed",
|
|
73
73
|
onKeyDown: B,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
onPointerDown: (t) => {
|
|
75
|
+
if (a || n) return;
|
|
76
|
+
const o = t.target;
|
|
77
|
+
o.closest("[data-chevron-button]") || o.closest("[data-clear-button]") || (t.preventDefault(), p(!r));
|
|
77
78
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
onClick: (t) => {
|
|
80
|
+
const o = t.target;
|
|
81
|
+
(o.closest("[data-chevron-button]") || o.closest("[data-clear-button]")) && (t.preventDefault(), t.stopPropagation());
|
|
82
|
+
},
|
|
83
|
+
children: /* @__PURE__ */ l("div", { className: "flex items-center justify-between w-full min-w-0 max-w-full", children: [
|
|
84
|
+
d ? /* @__PURE__ */ e("div", { className: "flex items-center text-content-muted shrink-0", children: d }) : null,
|
|
85
|
+
/* @__PURE__ */ l(
|
|
81
86
|
"div",
|
|
82
87
|
{
|
|
83
88
|
className: "flex-1 flex items-center overflow-hidden min-w-0 max-w-full",
|
|
84
|
-
"data-testid": `select-value-${
|
|
89
|
+
"data-testid": `select-value-${c || "default"}`,
|
|
85
90
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ e(
|
|
87
92
|
X,
|
|
88
93
|
{
|
|
89
94
|
isMulti: m,
|
|
90
|
-
isDisabled:
|
|
91
|
-
internalValue:
|
|
92
|
-
totalCount:
|
|
95
|
+
isDisabled: a,
|
|
96
|
+
internalValue: u,
|
|
97
|
+
totalCount: D,
|
|
93
98
|
totalOptionsCount: F,
|
|
94
99
|
formatSelectedCount: I,
|
|
95
100
|
resolveOptionLabel: L,
|
|
96
|
-
placeholder: /* @__PURE__ */
|
|
101
|
+
placeholder: /* @__PURE__ */ e(
|
|
97
102
|
"span",
|
|
98
103
|
{
|
|
99
104
|
className: "text-content-placeholder font-normal text-[14px] truncate min-w-0 block",
|
|
100
|
-
"data-testid": `select-placeholder-${
|
|
105
|
+
"data-testid": `select-placeholder-${c || "default"}`,
|
|
101
106
|
"data-has-value": !1,
|
|
102
|
-
children:
|
|
107
|
+
children: s
|
|
103
108
|
}
|
|
104
109
|
)
|
|
105
110
|
}
|
|
106
111
|
),
|
|
107
|
-
|
|
112
|
+
z && r && S === "trigger" && !n ? /* @__PURE__ */ e(
|
|
108
113
|
"input",
|
|
109
114
|
{
|
|
110
|
-
ref:
|
|
115
|
+
ref: g,
|
|
111
116
|
type: "text",
|
|
112
117
|
className: "flex-1 min-w-[50px] border-none p-0 focus:ring-0 text-sm outline-none h-full",
|
|
113
|
-
value:
|
|
114
|
-
onChange: (
|
|
115
|
-
|
|
118
|
+
value: y,
|
|
119
|
+
onChange: (t) => {
|
|
120
|
+
j(t.target.value);
|
|
116
121
|
},
|
|
117
|
-
onClick: (
|
|
118
|
-
autoFocus:
|
|
119
|
-
name:
|
|
122
|
+
onClick: (t) => t.stopPropagation(),
|
|
123
|
+
autoFocus: T,
|
|
124
|
+
name: V || void 0
|
|
120
125
|
}
|
|
121
126
|
) : null
|
|
122
127
|
]
|
|
123
128
|
}
|
|
124
129
|
),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
G ? /* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-content-muted shrink-0", children: !r && (C || P) ? /* @__PURE__ */ e(J, { size: "14px" }) : /* @__PURE__ */ l(H, { children: [
|
|
131
|
+
G ? /* @__PURE__ */ e(
|
|
127
132
|
"button",
|
|
128
133
|
{
|
|
129
134
|
type: "button",
|
|
130
135
|
"data-clear-button": !0,
|
|
131
136
|
"aria-label": "Clear selection",
|
|
132
|
-
onPointerDown: (
|
|
133
|
-
|
|
137
|
+
onPointerDown: (t) => {
|
|
138
|
+
t.preventDefault(), t.stopPropagation(), E(t);
|
|
134
139
|
},
|
|
135
140
|
className: "hover:text-content-secondary p-0.5 cursor-pointer z-10 relative border-0 bg-transparent",
|
|
136
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ e(K, { size: "11px", className: "text-content-muted" })
|
|
137
142
|
}
|
|
138
143
|
) : null,
|
|
139
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ e(
|
|
140
145
|
"button",
|
|
141
146
|
{
|
|
142
147
|
type: "button",
|
|
143
148
|
"data-chevron-button": !0,
|
|
144
|
-
"aria-label":
|
|
145
|
-
"aria-expanded":
|
|
146
|
-
onPointerDown: (
|
|
147
|
-
|
|
149
|
+
"aria-label": r ? "Close dropdown" : "Open dropdown",
|
|
150
|
+
"aria-expanded": r,
|
|
151
|
+
onPointerDown: (t) => {
|
|
152
|
+
t.preventDefault(), t.stopPropagation(), p(!r);
|
|
148
153
|
},
|
|
149
154
|
className: "hover:text-content-secondary p-0.5 cursor-pointer z-10 relative border-0 bg-transparent",
|
|
150
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ e(
|
|
151
156
|
Q,
|
|
152
157
|
{
|
|
153
158
|
size: "16px",
|
|
154
|
-
className:
|
|
159
|
+
className: f(
|
|
155
160
|
"transition-transform duration-200",
|
|
156
|
-
|
|
161
|
+
r ? "-rotate-90" : "rotate-90"
|
|
157
162
|
)
|
|
158
163
|
}
|
|
159
164
|
)
|
|
@@ -165,5 +170,5 @@ function ee({
|
|
|
165
170
|
);
|
|
166
171
|
}
|
|
167
172
|
export {
|
|
168
|
-
|
|
173
|
+
tt as SelectTrigger
|
|
169
174
|
};
|
|
@@ -29,7 +29,7 @@ const $ = ({
|
|
|
29
29
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
30
30
|
onInteractOutside: (e) => e.preventDefault(),
|
|
31
31
|
onFocusOutside: (e) => e.preventDefault(),
|
|
32
|
-
className: "select-submenu-container z-
|
|
32
|
+
className: "select-submenu-container z-[100] min-w-[180px] max-h-[300px] overflow-auto rounded-xl bg-canvas-elevated py-1 shadow-elevation-floating",
|
|
33
33
|
"data-component": "select-menu",
|
|
34
34
|
children: d.map((e) => {
|
|
35
35
|
const a = f(e), g = x(e), o = e.isDisabled, m = v(e), s = "children" in e && Array.isArray(e.children) && e.children.length > 0, p = e.isParentSelectable !== !1, b = String(e.value || "");
|
|
@@ -18,8 +18,8 @@ import { useSelectMenuScroll as vt } from "./hooks/useSelectMenuScroll.js";
|
|
|
18
18
|
import { useSelectOpenEffects as It } from "./hooks/useSelectOpenEffects.js";
|
|
19
19
|
import { useSelectOutsideScrollLock as Lt } from "./hooks/useSelectOutsideScrollLock.js";
|
|
20
20
|
import { useSelectSearchFocus as xt } from "./hooks/useSelectSearchFocus.js";
|
|
21
|
-
import { useSelectSelectionHandlers as
|
|
22
|
-
import { useSelectionModel as
|
|
21
|
+
import { useSelectSelectionHandlers as At } from "./hooks/useSelectSelectionHandlers.js";
|
|
22
|
+
import { useSelectionModel as yt } from "./hooks/useSelectionModel.js";
|
|
23
23
|
import { useVisibleStats as Rt } from "./hooks/useVisibleStats.js";
|
|
24
24
|
import { SELECT_ALL_INDEX as Pt } from "./select.constants.js";
|
|
25
25
|
import { getSelectableOptionIndices as wt } from "./utils/getSelectableOptionIndices.js";
|
|
@@ -44,7 +44,7 @@ const qt = (oe) => {
|
|
|
44
44
|
defaultMenuIsOpen: pe = !1,
|
|
45
45
|
scrollToSelectedOnOpen: Se = !1,
|
|
46
46
|
maxSelectableOptions: g,
|
|
47
|
-
showSequence:
|
|
47
|
+
showSequence: N,
|
|
48
48
|
selectionOrder: he,
|
|
49
49
|
label: d,
|
|
50
50
|
required: ge,
|
|
@@ -58,13 +58,13 @@ const qt = (oe) => {
|
|
|
58
58
|
onMenuScrollToBottom: Ie,
|
|
59
59
|
totalCount: Le,
|
|
60
60
|
name: xe,
|
|
61
|
-
isSelectAllEnabled:
|
|
61
|
+
isSelectAllEnabled: y = !0,
|
|
62
62
|
isReadOnly: s = !1,
|
|
63
63
|
searchPosition: b = "menu",
|
|
64
|
-
footerContent:
|
|
65
|
-
onInputChange:
|
|
64
|
+
footerContent: T,
|
|
65
|
+
onInputChange: Ae,
|
|
66
66
|
getOptionLabel: H,
|
|
67
|
-
renderOption:
|
|
67
|
+
renderOption: ye,
|
|
68
68
|
onMenuOpen: Re,
|
|
69
69
|
onMenuClose: K,
|
|
70
70
|
labelOrientation: z = "top",
|
|
@@ -74,8 +74,8 @@ const qt = (oe) => {
|
|
|
74
74
|
ignoreAccents: De,
|
|
75
75
|
matchFrom: Ee,
|
|
76
76
|
stringify: Fe,
|
|
77
|
-
trim:
|
|
78
|
-
filterOption:
|
|
77
|
+
trim: Ne,
|
|
78
|
+
filterOption: Te,
|
|
79
79
|
enableSubMenus: v = !1,
|
|
80
80
|
enableGroups: R = !1,
|
|
81
81
|
enableInvertedSelection: He,
|
|
@@ -99,8 +99,8 @@ const qt = (oe) => {
|
|
|
99
99
|
ignoreAccents: De,
|
|
100
100
|
matchFrom: Ee,
|
|
101
101
|
stringify: Fe,
|
|
102
|
-
trim:
|
|
103
|
-
filterOption:
|
|
102
|
+
trim: Ne,
|
|
103
|
+
filterOption: Te,
|
|
104
104
|
enableSubMenus: v,
|
|
105
105
|
enableGroups: R
|
|
106
106
|
}), et = Vt(
|
|
@@ -108,7 +108,7 @@ const qt = (oe) => {
|
|
|
108
108
|
!!r,
|
|
109
109
|
c,
|
|
110
110
|
q
|
|
111
|
-
), C =
|
|
111
|
+
), C = yt(o, t ?? !1), { stats: W, getGroupStats: tt } = Rt(
|
|
112
112
|
n,
|
|
113
113
|
U,
|
|
114
114
|
f,
|
|
@@ -130,7 +130,7 @@ const qt = (oe) => {
|
|
|
130
130
|
isProcessing: c,
|
|
131
131
|
fetchError: I,
|
|
132
132
|
isMulti: t,
|
|
133
|
-
isSelectAllEnabled:
|
|
133
|
+
isSelectAllEnabled: y,
|
|
134
134
|
flatOptions: n,
|
|
135
135
|
searchValue: f,
|
|
136
136
|
highlightedIndex: a,
|
|
@@ -149,7 +149,7 @@ const qt = (oe) => {
|
|
|
149
149
|
rowVirtualizer: x,
|
|
150
150
|
onMenuScrollToBottom: Ie
|
|
151
151
|
});
|
|
152
|
-
const
|
|
152
|
+
const A = (e) => {
|
|
153
153
|
if (!(i && e))
|
|
154
154
|
if (B(e), e)
|
|
155
155
|
Re?.();
|
|
@@ -159,7 +159,7 @@ const qt = (oe) => {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
Lt(l, q);
|
|
162
|
-
const X = (e) => H ? H(e) : e.label, { handleSelect: J, handleSelectAll: Q, clearValue: lt } =
|
|
162
|
+
const X = (e) => H ? H(e) : e.label, { handleSelect: J, handleSelectAll: Q, clearValue: lt } = At({
|
|
163
163
|
isMulti: t,
|
|
164
164
|
isDisabled: i,
|
|
165
165
|
isReadOnly: s,
|
|
@@ -183,7 +183,7 @@ const qt = (oe) => {
|
|
|
183
183
|
setSearchValue: L
|
|
184
184
|
}), ot = (e) => bt(
|
|
185
185
|
e,
|
|
186
|
-
|
|
186
|
+
N ?? !1,
|
|
187
187
|
t ?? !1,
|
|
188
188
|
he,
|
|
189
189
|
o
|
|
@@ -192,7 +192,7 @@ const qt = (oe) => {
|
|
|
192
192
|
isProcessing: c,
|
|
193
193
|
fetchError: I,
|
|
194
194
|
isMulti: t,
|
|
195
|
-
isSelectAllEnabled:
|
|
195
|
+
isSelectAllEnabled: y,
|
|
196
196
|
isReadOnly: s,
|
|
197
197
|
flatOptions: n,
|
|
198
198
|
enableSubMenus: v
|
|
@@ -207,7 +207,7 @@ const qt = (oe) => {
|
|
|
207
207
|
setHighlightedIndex: _,
|
|
208
208
|
flatOptions: n,
|
|
209
209
|
rowVirtualizer: x,
|
|
210
|
-
handleOpenChange:
|
|
210
|
+
handleOpenChange: A,
|
|
211
211
|
handleSelect: J,
|
|
212
212
|
handleSelectAll: Q,
|
|
213
213
|
openedViaKeyboardRef: k,
|
|
@@ -230,8 +230,8 @@ const qt = (oe) => {
|
|
|
230
230
|
"data-testid": `select-${m || "default"}`,
|
|
231
231
|
"data-component": "select",
|
|
232
232
|
children: Y.wrapControl(
|
|
233
|
-
/* @__PURE__ */ Z(te.Root, { open: l && !i, onOpenChange:
|
|
234
|
-
/* @__PURE__ */ u(te.
|
|
233
|
+
/* @__PURE__ */ Z(te.Root, { open: l && !i, onOpenChange: A, modal: !1, children: [
|
|
234
|
+
/* @__PURE__ */ u(te.Anchor, { asChild: !0, children: /* @__PURE__ */ u(
|
|
235
235
|
St,
|
|
236
236
|
{
|
|
237
237
|
triggerRef: G,
|
|
@@ -267,7 +267,7 @@ const qt = (oe) => {
|
|
|
267
267
|
onFocus: $e,
|
|
268
268
|
onBlur: _e,
|
|
269
269
|
onKeyDown: st,
|
|
270
|
-
onOpenChange:
|
|
270
|
+
onOpenChange: A,
|
|
271
271
|
onClear: lt
|
|
272
272
|
}
|
|
273
273
|
) }),
|
|
@@ -280,7 +280,7 @@ const qt = (oe) => {
|
|
|
280
280
|
isReadOnly: s,
|
|
281
281
|
id: m,
|
|
282
282
|
menuLabel: String(d || P),
|
|
283
|
-
onClose: () =>
|
|
283
|
+
onClose: () => A(!1),
|
|
284
284
|
children: [
|
|
285
285
|
/* @__PURE__ */ u(
|
|
286
286
|
mt,
|
|
@@ -295,7 +295,7 @@ const qt = (oe) => {
|
|
|
295
295
|
fetchError: I,
|
|
296
296
|
isLoading: r,
|
|
297
297
|
isProcessing: c,
|
|
298
|
-
isSelectAllEnabled:
|
|
298
|
+
isSelectAllEnabled: y ?? !1,
|
|
299
299
|
flatOptionsLength: n.length,
|
|
300
300
|
searchInputRef: E,
|
|
301
301
|
searchValue: f,
|
|
@@ -306,7 +306,7 @@ const qt = (oe) => {
|
|
|
306
306
|
selectAllLabel: O("select.selectAll"),
|
|
307
307
|
unselectAllLabel: O("select.unselectAll"),
|
|
308
308
|
onSearchChange: (e) => {
|
|
309
|
-
L(e),
|
|
309
|
+
L(e), Ae?.(e);
|
|
310
310
|
},
|
|
311
311
|
onSearchKeyDown: rt,
|
|
312
312
|
onSelectAll: Q
|
|
@@ -317,7 +317,7 @@ const qt = (oe) => {
|
|
|
317
317
|
{
|
|
318
318
|
className: le(
|
|
319
319
|
"flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
320
|
-
!(
|
|
320
|
+
!(T || g || V.length > 5e3) && "rounded-b-[12px]"
|
|
321
321
|
),
|
|
322
322
|
children: /* @__PURE__ */ u(
|
|
323
323
|
ft,
|
|
@@ -331,7 +331,7 @@ const qt = (oe) => {
|
|
|
331
331
|
isReadOnly: s,
|
|
332
332
|
enableGroups: R,
|
|
333
333
|
enableSubMenus: v,
|
|
334
|
-
showSequence:
|
|
334
|
+
showSequence: N,
|
|
335
335
|
maxSelectableOptions: g,
|
|
336
336
|
listRef: D,
|
|
337
337
|
listboxId: j,
|
|
@@ -347,7 +347,7 @@ const qt = (oe) => {
|
|
|
347
347
|
selectionSet: C.set,
|
|
348
348
|
resolveOptionLabel: X,
|
|
349
349
|
getSequenceForOption: ot,
|
|
350
|
-
renderOption:
|
|
350
|
+
renderOption: ye,
|
|
351
351
|
onSelect: J,
|
|
352
352
|
getGroupStats: tt
|
|
353
353
|
}
|
|
@@ -357,7 +357,7 @@ const qt = (oe) => {
|
|
|
357
357
|
/* @__PURE__ */ u(
|
|
358
358
|
dt,
|
|
359
359
|
{
|
|
360
|
-
footerContent:
|
|
360
|
+
footerContent: T,
|
|
361
361
|
maxSelectableOptions: g,
|
|
362
362
|
optionCount: V.length
|
|
363
363
|
}
|
|
@@ -47,18 +47,18 @@ const s = e(
|
|
|
47
47
|
variants: {
|
|
48
48
|
disabled: {
|
|
49
49
|
true: "opacity-50 cursor-not-allowed bg-disabled-surface",
|
|
50
|
-
false: "hover:bg-muted cursor-pointer"
|
|
50
|
+
false: "hover:bg-canvas-muted cursor-pointer"
|
|
51
51
|
},
|
|
52
52
|
readOnly: {
|
|
53
53
|
true: "cursor-default hover:bg-transparent",
|
|
54
54
|
false: ""
|
|
55
55
|
},
|
|
56
56
|
selected: {
|
|
57
|
-
true: "bg-
|
|
57
|
+
true: "bg-brand-subtle text-foreground",
|
|
58
58
|
false: ""
|
|
59
59
|
},
|
|
60
60
|
highlighted: {
|
|
61
|
-
true: "ring-2 ring-inset ring-
|
|
61
|
+
true: "ring-2 ring-inset ring-brand bg-brand-subtle",
|
|
62
62
|
false: ""
|
|
63
63
|
}
|
|
64
64
|
},
|