impact-nova 2.2.5 → 2.2.7
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 +54 -56
- 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 +223 -207
- 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.js +158 -184
- package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
- package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
- 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 +5 -0
- package/dist/components/feedback/tooltip/index.js +16 -10
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.js +92 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +42 -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.d.ts +3 -0
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +109 -0
- package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
- package/dist/components/flows/filter-panel/filter-panel.js +94 -83
- package/dist/components/flows/filter-strip/filter-summary.js +187 -177
- package/dist/components/flows/filter-strip/filter-tag-list.js +123 -107
- 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 +77 -66
- package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
- package/dist/components/forms/select/components/Submenu.js +53 -39
- 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/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/components/primitives/tag/tag.variants.d.ts +1 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +473 -463
- package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
- package/dist/lib/overflow/is-text-overflowing.js +6 -0
- 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/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/dist/providers/app-providers.js +18 -11
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as u, jsxs as te } from "react/jsx-runtime";
|
|
2
|
-
import mt, { useState as
|
|
2
|
+
import mt, { useState as x, useRef as S } from "react";
|
|
3
3
|
import * as le from "@radix-ui/react-popover";
|
|
4
4
|
import { useVirtualizer as dt } from "@tanstack/react-virtual";
|
|
5
5
|
import { SelectMenuFooter as ft } from "./components/SelectMenuFooter.js";
|
|
@@ -9,28 +9,29 @@ import { SelectMenuPanel as ht } from "./components/SelectMenuPanel.js";
|
|
|
9
9
|
import { SelectTrigger as gt } from "./components/SelectTrigger.js";
|
|
10
10
|
import { cn as oe } from "../../../lib/utils.js";
|
|
11
11
|
import { useFieldChrome as bt } from "../../../lib/primitives/use-field-chrome.js";
|
|
12
|
-
import { isOptionArray as Ot, getSequence as
|
|
13
|
-
import { useImpactNovaI18n as
|
|
14
|
-
import { useFlattenOptions as
|
|
15
|
-
import { useSelectKeyboardHandlers as
|
|
16
|
-
import { useSelectValueState as
|
|
12
|
+
import { isOptionArray as Ot, getSequence as Ct } from "./utils/select.js";
|
|
13
|
+
import { useImpactNovaI18n as Mt } from "../../../i18n/use-impact-nova-i18n.js";
|
|
14
|
+
import { useFlattenOptions as vt } from "./hooks/useFlattenOptions.js";
|
|
15
|
+
import { useSelectKeyboardHandlers as yt } from "./hooks/useSelectKeyboardHandlers.js";
|
|
16
|
+
import { useSelectValueState as It } from "./hooks/useSelectValueState.js";
|
|
17
17
|
import { useSelectMenuHeight as Lt } from "./hooks/useSelectMenuHeight.js";
|
|
18
18
|
import { useSelectMenuScroll as Vt } from "./hooks/useSelectMenuScroll.js";
|
|
19
|
-
import { useSelectOpenEffects as
|
|
20
|
-
import { useSelectOutsideScrollLock as
|
|
19
|
+
import { useSelectOpenEffects as At } from "./hooks/useSelectOpenEffects.js";
|
|
20
|
+
import { useSelectOutsideScrollLock as xt } from "./hooks/useSelectOutsideScrollLock.js";
|
|
21
21
|
import { useSelectSearchFocus as Rt } from "./hooks/useSelectSearchFocus.js";
|
|
22
|
-
import { useSelectSelectionHandlers as
|
|
23
|
-
import { useSelectionModel as
|
|
22
|
+
import { useSelectSelectionHandlers as Pt } from "./hooks/useSelectSelectionHandlers.js";
|
|
23
|
+
import { useSelectionModel as wt } from "./hooks/useSelectionModel.js";
|
|
24
24
|
import { useVisibleStats as Dt } from "./hooks/useVisibleStats.js";
|
|
25
25
|
import { useOverlayNestedLayerDismiss as Nt } from "../../../lib/overlay/overlay-portal-context.js";
|
|
26
|
+
import { isTooltipContentPointerGestureActive as Tt } from "../../../lib/tooltip/tooltip-content-interaction.js";
|
|
26
27
|
import { SELECT_ALL_INDEX as qt } from "./select.constants.js";
|
|
27
28
|
import { getSelectableOptionIndices as Et } from "./utils/getSelectableOptionIndices.js";
|
|
28
29
|
function ne(R) {
|
|
29
30
|
const {
|
|
30
|
-
options:
|
|
31
|
-
value:
|
|
32
|
-
defaultValue:
|
|
33
|
-
onChange:
|
|
31
|
+
options: M,
|
|
32
|
+
value: re,
|
|
33
|
+
defaultValue: se,
|
|
34
|
+
onChange: F,
|
|
34
35
|
isMulti: ie,
|
|
35
36
|
multiple: ae,
|
|
36
37
|
isDisabled: ce,
|
|
@@ -40,7 +41,7 @@ function ne(R) {
|
|
|
40
41
|
isSearchable: h = !0,
|
|
41
42
|
placeholder: de,
|
|
42
43
|
// menuPortalTarget is kept for API compatibility but no longer used (Radix handles portalling)
|
|
43
|
-
menuPortalTarget:
|
|
44
|
+
menuPortalTarget: Ht,
|
|
44
45
|
autoFocus: fe,
|
|
45
46
|
closeMenuOnSelect: pe,
|
|
46
47
|
defaultMenuIsOpen: Se = !1,
|
|
@@ -51,188 +52,188 @@ function ne(R) {
|
|
|
51
52
|
label: m,
|
|
52
53
|
required: be,
|
|
53
54
|
isRequired: Oe,
|
|
54
|
-
error:
|
|
55
|
-
helperText:
|
|
56
|
-
helperTextPosition:
|
|
55
|
+
error: Ce,
|
|
56
|
+
helperText: Me,
|
|
57
|
+
helperTextPosition: ve = "absolute",
|
|
57
58
|
id: d,
|
|
58
|
-
className:
|
|
59
|
-
parentClassName:
|
|
59
|
+
className: ye,
|
|
60
|
+
parentClassName: Ie,
|
|
60
61
|
onMenuScrollToBottom: Le,
|
|
61
|
-
estimateRowSize:
|
|
62
|
+
estimateRowSize: v,
|
|
62
63
|
totalCount: Ve,
|
|
63
|
-
name:
|
|
64
|
-
isSelectAllEnabled:
|
|
64
|
+
name: Ae,
|
|
65
|
+
isSelectAllEnabled: P = !0,
|
|
65
66
|
isReadOnly: n = !1,
|
|
66
67
|
searchPosition: b = "menu",
|
|
67
68
|
footerContent: z,
|
|
68
|
-
onInputChange:
|
|
69
|
+
onInputChange: xe,
|
|
69
70
|
getOptionLabel: B,
|
|
70
71
|
renderOption: Re,
|
|
71
|
-
onMenuOpen:
|
|
72
|
+
onMenuOpen: Pe,
|
|
72
73
|
onMenuClose: K,
|
|
73
74
|
labelOrientation: $ = "top",
|
|
74
|
-
size:
|
|
75
|
+
size: we = "default",
|
|
75
76
|
leftContent: De,
|
|
76
77
|
ignoreCase: Ne,
|
|
77
|
-
ignoreAccents:
|
|
78
|
-
matchFrom:
|
|
79
|
-
stringify:
|
|
80
|
-
trim:
|
|
78
|
+
ignoreAccents: Te,
|
|
79
|
+
matchFrom: qe,
|
|
80
|
+
stringify: Ee,
|
|
81
|
+
trim: Fe,
|
|
81
82
|
filterOption: He,
|
|
82
|
-
enableSubMenus:
|
|
83
|
-
enableGroups:
|
|
83
|
+
enableSubMenus: y = !1,
|
|
84
|
+
enableGroups: w = !1,
|
|
84
85
|
enableInvertedSelection: ze,
|
|
85
|
-
fetchError:
|
|
86
|
+
fetchError: I,
|
|
86
87
|
onRefetch: Be,
|
|
87
88
|
menuWidth: Ke,
|
|
88
89
|
onClearAll: $e,
|
|
89
90
|
onFocus: _e,
|
|
90
|
-
onBlur:
|
|
91
|
-
} = R, t = ae ?? ie ?? !1,
|
|
91
|
+
onBlur: Ge
|
|
92
|
+
} = R, t = ae ?? ie ?? !1, r = ue ?? ce ?? !1, je = be ?? Oe ?? !1, ke = pe ?? !t, { t: O } = Mt(), D = de ?? O("select.placeholder"), [l, _] = x(Se), [f, L] = x(""), {
|
|
92
93
|
usesMenuSession: We,
|
|
93
|
-
currentValue:
|
|
94
|
+
currentValue: s,
|
|
94
95
|
setCurrentValue: Xe,
|
|
95
96
|
beginMenuSession: Je,
|
|
96
97
|
endMenuSession: Qe
|
|
97
|
-
} =
|
|
98
|
-
value:
|
|
99
|
-
defaultValue:
|
|
98
|
+
} = It({
|
|
99
|
+
value: re,
|
|
100
|
+
defaultValue: se,
|
|
100
101
|
isMulti: !!t,
|
|
101
|
-
onChange:
|
|
102
|
-
}), [Ue,
|
|
103
|
-
Rt(l, h, b,
|
|
104
|
-
const { flatOptions: o, isProcessing: c, totalOptionsCount: J, workerSelectAll: tt } =
|
|
102
|
+
onChange: F
|
|
103
|
+
}), [Ue, G] = x(null), [a, j] = x(-1), k = S(!1), Ye = mt.useId(), p = d ?? Ye, W = `${p}-listbox`, Ze = l && a >= 0 ? a === qt ? `${p}-option-select-all` : `${p}-option-${a}` : void 0, X = S(null), N = S(null), et = S(null), T = S(null), q = S(null);
|
|
104
|
+
Rt(l, h, b, q);
|
|
105
|
+
const { flatOptions: o, isProcessing: c, totalOptionsCount: J, workerSelectAll: tt } = vt(M, f, {
|
|
105
106
|
ignoreCase: Ne,
|
|
106
|
-
ignoreAccents:
|
|
107
|
-
matchFrom:
|
|
108
|
-
stringify:
|
|
109
|
-
trim:
|
|
107
|
+
ignoreAccents: Te,
|
|
108
|
+
matchFrom: qe,
|
|
109
|
+
stringify: Ee,
|
|
110
|
+
trim: Fe,
|
|
110
111
|
filterOption: He,
|
|
111
|
-
enableSubMenus:
|
|
112
|
-
enableGroups:
|
|
112
|
+
enableSubMenus: y,
|
|
113
|
+
enableGroups: w
|
|
113
114
|
}), lt = Lt(
|
|
114
115
|
l,
|
|
115
116
|
!!i,
|
|
116
117
|
c,
|
|
117
118
|
N
|
|
118
|
-
),
|
|
119
|
+
), C = wt(s, t ?? !1), { stats: Q, getGroupStats: ot } = Dt(
|
|
119
120
|
o,
|
|
120
121
|
J,
|
|
121
122
|
f,
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
C,
|
|
124
|
+
s,
|
|
124
125
|
t ?? !1
|
|
125
126
|
), V = dt({
|
|
126
127
|
count: o.length,
|
|
127
|
-
getScrollElement: () =>
|
|
128
|
+
getScrollElement: () => T.current,
|
|
128
129
|
// Estimates only seed unmeasured rows — mounted rows self-measure via
|
|
129
130
|
// `measureElement` refs. Consumers rendering taller custom `renderOption`
|
|
130
131
|
// rows should pass `estimateRowSize` to keep scroll offsets sane.
|
|
131
|
-
estimateSize: (e) => typeof
|
|
132
|
+
estimateSize: (e) => typeof v == "function" ? v(e) : typeof v == "number" ? v : 34,
|
|
132
133
|
overscan: 5
|
|
133
134
|
});
|
|
134
|
-
|
|
135
|
+
At({
|
|
135
136
|
isOpen: l,
|
|
136
137
|
isSearchable: h,
|
|
137
138
|
searchPosition: b,
|
|
138
139
|
isReadOnly: n,
|
|
139
140
|
isLoading: i,
|
|
140
141
|
isProcessing: c,
|
|
141
|
-
fetchError:
|
|
142
|
+
fetchError: I,
|
|
142
143
|
isMulti: t,
|
|
143
|
-
isSelectAllEnabled:
|
|
144
|
+
isSelectAllEnabled: P,
|
|
144
145
|
flatOptions: o,
|
|
145
146
|
searchValue: f,
|
|
146
147
|
highlightedIndex: a,
|
|
147
|
-
setHighlightedIndex:
|
|
148
|
-
openedViaKeyboardRef:
|
|
148
|
+
setHighlightedIndex: j,
|
|
149
|
+
openedViaKeyboardRef: k,
|
|
149
150
|
scrollToSelectedOnOpen: he,
|
|
150
|
-
selectionModel:
|
|
151
|
-
internalValue:
|
|
151
|
+
selectionModel: C,
|
|
152
|
+
internalValue: s,
|
|
152
153
|
rowVirtualizer: V
|
|
153
154
|
}), Vt({
|
|
154
155
|
isOpen: l,
|
|
155
156
|
isLoading: i,
|
|
156
157
|
isProcessing: c,
|
|
157
158
|
flatOptions: o,
|
|
158
|
-
listRef:
|
|
159
|
+
listRef: T,
|
|
159
160
|
rowVirtualizer: V,
|
|
160
161
|
onMenuScrollToBottom: Le
|
|
161
162
|
});
|
|
162
|
-
const
|
|
163
|
-
if (!(
|
|
163
|
+
const A = (e) => {
|
|
164
|
+
if (!(!e && Tt()) && !(r && e))
|
|
164
165
|
if (_(e), e)
|
|
165
|
-
Je(),
|
|
166
|
+
Je(), Pe?.();
|
|
166
167
|
else {
|
|
167
|
-
const
|
|
168
|
-
K?.(
|
|
168
|
+
const E = We ? Qe() : s, ct = t && Ot(E) ? E.map((ut) => ut.value) : void 0;
|
|
169
|
+
K?.(E, ct), L(""), G(null);
|
|
169
170
|
}
|
|
170
171
|
};
|
|
171
|
-
Nt(l && !
|
|
172
|
-
const U = (e) => B ? B(e) : e.label, { handleSelect: Y, handleSelectAll: Z, clearValue: nt } =
|
|
172
|
+
Nt(l && !r, A), xt(l, N);
|
|
173
|
+
const U = (e) => B ? B(e) : e.label, { handleSelect: Y, handleSelectAll: Z, clearValue: nt } = Pt({
|
|
173
174
|
isMulti: t,
|
|
174
|
-
isDisabled:
|
|
175
|
+
isDisabled: r,
|
|
175
176
|
isReadOnly: n,
|
|
176
|
-
internalValue:
|
|
177
|
+
internalValue: s,
|
|
177
178
|
setInternalValue: Xe,
|
|
178
|
-
onChange:
|
|
179
|
+
onChange: F,
|
|
179
180
|
onMenuClose: K,
|
|
180
181
|
onClearAll: $e,
|
|
181
|
-
enableSubMenus:
|
|
182
|
-
enableGroups:
|
|
182
|
+
enableSubMenus: y,
|
|
183
|
+
enableGroups: w,
|
|
183
184
|
enableInvertedSelection: ze,
|
|
184
185
|
maxSelectableOptions: g,
|
|
185
|
-
closeMenuOnSelect:
|
|
186
|
-
options:
|
|
186
|
+
closeMenuOnSelect: ke,
|
|
187
|
+
options: M,
|
|
187
188
|
flatOptions: o,
|
|
188
189
|
searchValue: f,
|
|
189
|
-
selectionModel:
|
|
190
|
+
selectionModel: C,
|
|
190
191
|
visibleStats: Q,
|
|
191
192
|
workerSelectAll: tt,
|
|
192
193
|
setIsOpen: _,
|
|
193
194
|
setSearchValue: L
|
|
194
|
-
}),
|
|
195
|
+
}), rt = (e) => Ct(
|
|
195
196
|
e,
|
|
196
197
|
H ?? !1,
|
|
197
198
|
t ?? !1,
|
|
198
199
|
ge,
|
|
199
|
-
|
|
200
|
-
),
|
|
200
|
+
s
|
|
201
|
+
), st = () => Et({
|
|
201
202
|
isLoading: !!i,
|
|
202
203
|
isProcessing: c,
|
|
203
|
-
fetchError:
|
|
204
|
+
fetchError: I,
|
|
204
205
|
isMulti: t,
|
|
205
|
-
isSelectAllEnabled:
|
|
206
|
+
isSelectAllEnabled: P,
|
|
206
207
|
isReadOnly: n,
|
|
207
208
|
flatOptions: o,
|
|
208
|
-
enableSubMenus:
|
|
209
|
-
}), { handleTriggerKeyDown: it, handleSearchKeyDown: at } =
|
|
210
|
-
isDisabled:
|
|
209
|
+
enableSubMenus: y
|
|
210
|
+
}), { handleTriggerKeyDown: it, handleSearchKeyDown: at } = yt({
|
|
211
|
+
isDisabled: r,
|
|
211
212
|
isReadOnly: n,
|
|
212
213
|
isOpen: l,
|
|
213
214
|
isSearchable: h,
|
|
214
215
|
searchPosition: b,
|
|
215
|
-
getSelectableIndices:
|
|
216
|
+
getSelectableIndices: st,
|
|
216
217
|
highlightedIndex: a,
|
|
217
|
-
setHighlightedIndex:
|
|
218
|
+
setHighlightedIndex: j,
|
|
218
219
|
flatOptions: o,
|
|
219
220
|
rowVirtualizer: V,
|
|
220
|
-
handleOpenChange:
|
|
221
|
+
handleOpenChange: A,
|
|
221
222
|
handleSelect: Y,
|
|
222
223
|
handleSelectAll: Z,
|
|
223
|
-
openedViaKeyboardRef:
|
|
224
|
-
searchInputRef:
|
|
224
|
+
openedViaKeyboardRef: k,
|
|
225
|
+
searchInputRef: q,
|
|
225
226
|
triggerRef: X
|
|
226
227
|
}), ee = bt({
|
|
227
228
|
label: m,
|
|
228
|
-
helperText:
|
|
229
|
-
helperTextPosition:
|
|
229
|
+
helperText: Me,
|
|
230
|
+
helperTextPosition: ve,
|
|
230
231
|
labelOrientation: $,
|
|
231
|
-
error:
|
|
232
|
-
required:
|
|
233
|
-
disabled:
|
|
232
|
+
error: Ce,
|
|
233
|
+
required: je,
|
|
234
|
+
disabled: r,
|
|
234
235
|
className: oe($ === "left" && "w-fit items-center"),
|
|
235
|
-
rootClassName:
|
|
236
|
+
rootClassName: Ie
|
|
236
237
|
});
|
|
237
238
|
return /* @__PURE__ */ u(
|
|
238
239
|
"div",
|
|
@@ -240,7 +241,7 @@ function ne(R) {
|
|
|
240
241
|
"data-testid": `select-${d || "default"}`,
|
|
241
242
|
"data-component": "select",
|
|
242
243
|
children: ee.wrapControl(
|
|
243
|
-
/* @__PURE__ */ te(le.Root, { open: l && !
|
|
244
|
+
/* @__PURE__ */ te(le.Root, { open: l && !r, onOpenChange: A, modal: !1, children: [
|
|
244
245
|
/* @__PURE__ */ u(le.Anchor, { asChild: !0, children: /* @__PURE__ */ u(
|
|
245
246
|
gt,
|
|
246
247
|
{
|
|
@@ -249,10 +250,10 @@ function ne(R) {
|
|
|
249
250
|
selectFieldId: p,
|
|
250
251
|
listboxId: W,
|
|
251
252
|
id: d,
|
|
252
|
-
className:
|
|
253
|
-
size:
|
|
253
|
+
className: ye,
|
|
254
|
+
size: we,
|
|
254
255
|
error: ee.hasError,
|
|
255
|
-
isDisabled:
|
|
256
|
+
isDisabled: r,
|
|
256
257
|
isReadOnly: n,
|
|
257
258
|
isOpen: l,
|
|
258
259
|
isLoading: i,
|
|
@@ -263,21 +264,21 @@ function ne(R) {
|
|
|
263
264
|
searchValue: f,
|
|
264
265
|
setSearchValue: L,
|
|
265
266
|
autoFocus: fe,
|
|
266
|
-
name:
|
|
267
|
+
name: Ae,
|
|
267
268
|
label: m,
|
|
268
269
|
placeholder: D,
|
|
269
270
|
leftContent: De,
|
|
270
271
|
activeDescendantId: Ze,
|
|
271
|
-
internalValue:
|
|
272
|
+
internalValue: s,
|
|
272
273
|
totalCount: Ve,
|
|
273
274
|
totalOptionsCount: J,
|
|
274
275
|
formatSelectedCount: (e) => O("select.selectedCount", { count: e }),
|
|
275
276
|
resolveOptionLabel: U,
|
|
276
277
|
isMulti: t,
|
|
277
278
|
onFocus: _e,
|
|
278
|
-
onBlur:
|
|
279
|
+
onBlur: Ge,
|
|
279
280
|
onKeyDown: it,
|
|
280
|
-
onToggle: () =>
|
|
281
|
+
onToggle: () => A(!l),
|
|
281
282
|
onClear: nt
|
|
282
283
|
}
|
|
283
284
|
) }),
|
|
@@ -297,16 +298,16 @@ function ne(R) {
|
|
|
297
298
|
id: d,
|
|
298
299
|
selectFieldId: p,
|
|
299
300
|
isReadOnly: n,
|
|
300
|
-
isDisabled:
|
|
301
|
+
isDisabled: r,
|
|
301
302
|
isMulti: t,
|
|
302
303
|
isSearchable: h,
|
|
303
304
|
searchPosition: b,
|
|
304
|
-
fetchError:
|
|
305
|
+
fetchError: I,
|
|
305
306
|
isLoading: i,
|
|
306
307
|
isProcessing: c,
|
|
307
|
-
isSelectAllEnabled:
|
|
308
|
+
isSelectAllEnabled: P ?? !1,
|
|
308
309
|
flatOptionsLength: o.length,
|
|
309
|
-
searchInputRef:
|
|
310
|
+
searchInputRef: q,
|
|
310
311
|
searchValue: f,
|
|
311
312
|
searchPlaceholder: O("select.searchHere"),
|
|
312
313
|
highlightedIndex: a,
|
|
@@ -315,7 +316,7 @@ function ne(R) {
|
|
|
315
316
|
selectAllLabel: O("select.selectAll"),
|
|
316
317
|
unselectAllLabel: O("select.unselectAll"),
|
|
317
318
|
onSearchChange: (e) => {
|
|
318
|
-
L(e),
|
|
319
|
+
L(e), xe?.(e);
|
|
319
320
|
},
|
|
320
321
|
onSearchKeyDown: at,
|
|
321
322
|
onSelectAll: Z
|
|
@@ -326,23 +327,23 @@ function ne(R) {
|
|
|
326
327
|
{
|
|
327
328
|
className: oe(
|
|
328
329
|
"flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
329
|
-
!(z || g ||
|
|
330
|
+
!(z || g || M.length > 5e3) && "rounded-b-[12px]"
|
|
330
331
|
),
|
|
331
332
|
children: /* @__PURE__ */ u(
|
|
332
333
|
St,
|
|
333
334
|
{
|
|
334
|
-
fetchError:
|
|
335
|
+
fetchError: I,
|
|
335
336
|
onRefetch: Be,
|
|
336
337
|
flatOptions: o,
|
|
337
338
|
isLoading: i,
|
|
338
339
|
isProcessing: c,
|
|
339
340
|
isMulti: t,
|
|
340
341
|
isReadOnly: n,
|
|
341
|
-
enableGroups:
|
|
342
|
-
enableSubMenus:
|
|
342
|
+
enableGroups: w,
|
|
343
|
+
enableSubMenus: y,
|
|
343
344
|
showSequence: H,
|
|
344
345
|
maxSelectableOptions: g,
|
|
345
|
-
listRef:
|
|
346
|
+
listRef: T,
|
|
346
347
|
listboxId: W,
|
|
347
348
|
listboxLabel: m ? String(m) : D,
|
|
348
349
|
rowVirtualizer: V,
|
|
@@ -350,12 +351,12 @@ function ne(R) {
|
|
|
350
351
|
id: d,
|
|
351
352
|
highlightedIndex: a,
|
|
352
353
|
activeSubmenu: Ue,
|
|
353
|
-
setActiveSubmenu:
|
|
354
|
-
internalValue:
|
|
355
|
-
selectionMode:
|
|
356
|
-
selectionSet:
|
|
354
|
+
setActiveSubmenu: G,
|
|
355
|
+
internalValue: s,
|
|
356
|
+
selectionMode: C.mode,
|
|
357
|
+
selectionSet: C.set,
|
|
357
358
|
resolveOptionLabel: U,
|
|
358
|
-
getSequenceForOption:
|
|
359
|
+
getSequenceForOption: rt,
|
|
359
360
|
renderOption: Re,
|
|
360
361
|
onSelect: Y,
|
|
361
362
|
getGroupStats: ot
|
|
@@ -368,7 +369,7 @@ function ne(R) {
|
|
|
368
369
|
{
|
|
369
370
|
footerContent: z,
|
|
370
371
|
maxSelectableOptions: g,
|
|
371
|
-
optionCount:
|
|
372
|
+
optionCount: M.length
|
|
372
373
|
}
|
|
373
374
|
)
|
|
374
375
|
]
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface PointerPosition {
|
|
2
|
+
clientX: number;
|
|
3
|
+
clientY: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function shouldSuppressOptionClickForTextSelection(pointerDownPosition: PointerPosition | null, clickEvent: Pick<MouseEvent, 'clientX' | 'clientY' | 'detail' | 'target'>): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isTooltipContentPointerGestureActive as o, isTooltipContentElement as s } from "../../../../lib/tooltip/tooltip-content-interaction.js";
|
|
2
|
+
const n = 4;
|
|
3
|
+
function a(e, t) {
|
|
4
|
+
if (o() || s(t.target) || t.detail >= 2)
|
|
5
|
+
return !0;
|
|
6
|
+
if (e) {
|
|
7
|
+
const i = Math.abs(t.clientX - e.clientX), l = Math.abs(t.clientY - e.clientY);
|
|
8
|
+
if (i > n || l > n)
|
|
9
|
+
return !0;
|
|
10
|
+
}
|
|
11
|
+
const r = window.getSelection();
|
|
12
|
+
return !r || r.isCollapsed ? !1 : r.toString().trim().length > 0;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as shouldSuppressOptionClickForTextSelection
|
|
16
|
+
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { HorizontalScroller } from './horizontal-scroller';
|
|
2
2
|
export { HorizontalScroller as default } from './horizontal-scroller';
|
|
3
3
|
export * from './horizontal-scroller.types';
|
|
4
|
+
export { ScrollOverflowAffordance } from './scroll-overflow-affordance';
|
|
5
|
+
export type { ScrollOverflowAffordanceProps } from './scroll-overflow-affordance';
|
|
6
|
+
export { useHorizontalScrollOverflow } from './use-horizontal-scroll-overflow';
|
|
7
|
+
export type { HorizontalScrollOverflowState, UseHorizontalScrollOverflowOptions, } from './use-horizontal-scroll-overflow';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { HorizontalScroller as l, HorizontalScroller as
|
|
1
|
+
import { HorizontalScroller as l, HorizontalScroller as e } from "./horizontal-scroller.js";
|
|
2
|
+
import { ScrollOverflowAffordance as t } from "./scroll-overflow-affordance.js";
|
|
3
|
+
import { useHorizontalScrollOverflow as c } from "./use-horizontal-scroll-overflow.js";
|
|
2
4
|
export {
|
|
3
5
|
l as HorizontalScroller,
|
|
4
|
-
|
|
6
|
+
t as ScrollOverflowAffordance,
|
|
7
|
+
e as default,
|
|
8
|
+
c as useHorizontalScrollOverflow
|
|
5
9
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ScrollOverflowAffordanceProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
scrollStep?: number;
|
|
5
|
+
contentDependency?: unknown;
|
|
6
|
+
hideScrollbar?: boolean;
|
|
7
|
+
viewportClassName?: string;
|
|
8
|
+
viewportDataComponent?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ScrollOverflowAffordance({ children, scrollStep, contentDependency, hideScrollbar, viewportClassName, viewportDataComponent, className, ...props }: ScrollOverflowAffordanceProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { jsxs as N, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ChevronRight as D } from "impact-nova-icons";
|
|
4
|
+
import { Button as A } from "../../primitives/button/button.js";
|
|
5
|
+
import { useImpactNovaI18n as L } from "../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { cn as r } from "../../../lib/utils.js";
|
|
7
|
+
import { useHorizontalScrollOverflow as R } from "./use-horizontal-scroll-overflow.js";
|
|
8
|
+
const s = 48;
|
|
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";
|
|
14
|
+
function F({
|
|
15
|
+
children: a,
|
|
16
|
+
scrollStep: o,
|
|
17
|
+
contentDependency: p,
|
|
18
|
+
hideScrollbar: i = !0,
|
|
19
|
+
viewportClassName: g,
|
|
20
|
+
viewportDataComponent: h = "scroll-overflow-affordance-viewport",
|
|
21
|
+
className: b,
|
|
22
|
+
...w
|
|
23
|
+
}) {
|
|
24
|
+
const { t: c } = L(), {
|
|
25
|
+
scrollRef: k,
|
|
26
|
+
canScrollLeft: n,
|
|
27
|
+
canScrollRight: l,
|
|
28
|
+
scrollLeft: f,
|
|
29
|
+
scrollRight: d
|
|
30
|
+
} = R({ scrollStep: o, contentDependency: p }), v = $(n, l), x = (e) => {
|
|
31
|
+
if (e.key === "ArrowLeft" && n) {
|
|
32
|
+
e.preventDefault(), f();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
e.key === "ArrowRight" && l && (e.preventDefault(), d());
|
|
36
|
+
}, m = (e, y, z) => {
|
|
37
|
+
if (z) return null;
|
|
38
|
+
const I = c(e === "left" ? "horizontalScroller.scrollLeft" : "horizontalScroller.scrollRight");
|
|
39
|
+
return /* @__PURE__ */ t(
|
|
40
|
+
A,
|
|
41
|
+
{
|
|
42
|
+
variant: "ghost",
|
|
43
|
+
size: "iconSm",
|
|
44
|
+
className: r(
|
|
45
|
+
"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",
|
|
46
|
+
"bg-canvas-elevated/95 text-content-secondary shadow-sm",
|
|
47
|
+
"hover:bg-canvas-muted hover:text-content",
|
|
48
|
+
"[&_svg]:!size-3",
|
|
49
|
+
e === "left" ? "left-0.5" : "right-0.5"
|
|
50
|
+
),
|
|
51
|
+
onClick: y,
|
|
52
|
+
"aria-label": I,
|
|
53
|
+
"data-component": e === "left" ? "scroll-overflow-affordance-prev" : "scroll-overflow-affordance-next",
|
|
54
|
+
tabIndex: -1,
|
|
55
|
+
children: /* @__PURE__ */ t(
|
|
56
|
+
D,
|
|
57
|
+
{
|
|
58
|
+
className: r(e === "left" && "rotate-180")
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ N(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: r("relative min-w-0", b),
|
|
68
|
+
"data-component": "scroll-overflow-affordance",
|
|
69
|
+
...w,
|
|
70
|
+
children: [
|
|
71
|
+
n ? /* @__PURE__ */ t(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
"aria-hidden": !0,
|
|
75
|
+
"data-component": "scroll-overflow-affordance-fade-left",
|
|
76
|
+
className: r(
|
|
77
|
+
u,
|
|
78
|
+
"left-0 bg-gradient-to-r from-canvas-elevated from-10% via-canvas-elevated/90 via-50% to-transparent"
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
) : null,
|
|
82
|
+
l ? /* @__PURE__ */ t(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
"aria-hidden": !0,
|
|
86
|
+
"data-component": "scroll-overflow-affordance-fade-right",
|
|
87
|
+
className: r(
|
|
88
|
+
u,
|
|
89
|
+
"right-0 bg-gradient-to-l from-canvas-elevated from-10% via-canvas-elevated/90 via-50% to-transparent"
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
) : null,
|
|
93
|
+
m("left", f, !n),
|
|
94
|
+
m("right", d, !l),
|
|
95
|
+
/* @__PURE__ */ t(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
ref: k,
|
|
99
|
+
tabIndex: 0,
|
|
100
|
+
onKeyDown: x,
|
|
101
|
+
className: r(
|
|
102
|
+
"overflow-x-auto overflow-y-hidden overscroll-x-contain scroll-smooth outline-none",
|
|
103
|
+
"[-webkit-overflow-scrolling:touch]",
|
|
104
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
105
|
+
i && "scrollbar-hide",
|
|
106
|
+
g
|
|
107
|
+
),
|
|
108
|
+
style: {
|
|
109
|
+
scrollbarWidth: i ? "none" : "auto",
|
|
110
|
+
msOverflowStyle: i ? "none" : "auto",
|
|
111
|
+
WebkitMaskImage: v,
|
|
112
|
+
maskImage: v
|
|
113
|
+
},
|
|
114
|
+
"data-component": h,
|
|
115
|
+
children: a
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
export {
|
|
123
|
+
F as ScrollOverflowAffordance
|
|
124
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface UseHorizontalScrollOverflowOptions {
|
|
3
|
+
scrollStep?: number;
|
|
4
|
+
contentDependency?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface HorizontalScrollOverflowState {
|
|
7
|
+
scrollRef: React.RefObject<HTMLDivElement | null>;
|
|
8
|
+
canScrollLeft: boolean;
|
|
9
|
+
canScrollRight: boolean;
|
|
10
|
+
scrollLeft: () => void;
|
|
11
|
+
scrollRight: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useHorizontalScrollOverflow({ scrollStep, contentDependency, }?: UseHorizontalScrollOverflowOptions): HorizontalScrollOverflowState;
|