impact-nova 2.2.3 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data/ag-grid-react/headers/custom-header.js +133 -110
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
- package/dist/components/data/ag-grid-react/index.js +202 -206
- package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
- package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
- package/dist/components/data/data-table/data-table-column-list.js +64 -61
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
- package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
- package/dist/components/data/data-table/data-table-constants.js +3 -2
- package/dist/components/data/data-table/data-table-sheet.js +46 -49
- package/dist/components/data/data-table/data-table.js +137 -119
- package/dist/components/data/data-table/index.js +24 -23
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
- 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-parts.d.ts +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +179 -118
- 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/nested-list/components/NestedListContent.js +158 -96
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-constants.js +6 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
- package/dist/components/data/nested-list/nested-list.js +214 -215
- package/dist/components/data-display/card/card.js +6 -5
- package/dist/components/feedback/dialog/dialog.js +7 -5
- package/dist/components/feedback/sheet/sheet.js +28 -27
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/filter-panel/filter-panel.js +36 -35
- package/dist/components/flows/filter-strip/filter-tag-list.js +44 -44
- package/dist/components/forms/combobox/combobox.js +110 -100
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
- package/dist/components/forms/date-picker/date-picker.js +96 -90
- package/dist/components/forms/date-picker/date-range-picker.js +160 -152
- package/dist/components/forms/date-picker/month-picker.js +71 -65
- package/dist/components/forms/date-picker/month-range-picker.js +153 -145
- package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
- package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
- package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
- package/dist/components/forms/date-picker/week-picker.js +82 -76
- package/dist/components/forms/date-picker/week-range-picker.js +127 -119
- package/dist/impact-nova-base.scss +10 -5
- package/dist/impact-nova-components.css +9 -5
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +189 -188
- package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
- package/dist/lib/overlay/overlay-portal-context.js +39 -28
- package/dist/lib/primitives/create-compound.d.ts +5 -0
- package/dist/lib/primitives/create-compound.js +17 -16
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,83 +1,121 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { ChevronRight as
|
|
4
|
-
import { AccordionContent as
|
|
5
|
-
import { Checkbox as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { ChevronRight as R } from "impact-nova-icons";
|
|
4
|
+
import { AccordionContent as A, Accordion as O, AccordionItem as P, AccordionTrigger as V } from "../../primitives/accordion/accordion.js";
|
|
5
|
+
import { Checkbox as D } from "../../forms/checkbox/checkbox.js";
|
|
6
|
+
import { Tooltip as M, TooltipTrigger as S, TooltipContent as _ } from "../../feedback/tooltip/tooltip.js";
|
|
7
|
+
import { createCompoundPart as y } from "../../../lib/primitives/create-compound.js";
|
|
8
|
+
import { cn as d } from "../../../lib/utils.js";
|
|
9
|
+
import { useExpandableListItemContext as I, ExpandableListItemProvider as w, EXPANDABLE_LIST_ITEM_ACCORDION_VALUE as u } from "./expandable-list-item-context.js";
|
|
10
|
+
const g = s.forwardRef(
|
|
11
|
+
({ text: e, componentName: t, className: o, ...r }, a) => {
|
|
12
|
+
const l = s.useRef(null), [c, x] = s.useState(!1), p = s.useCallback(
|
|
13
|
+
(i) => {
|
|
14
|
+
l.current = i, typeof a == "function" ? a(i) : a && (a.current = i);
|
|
15
|
+
},
|
|
16
|
+
[a]
|
|
17
|
+
), m = s.useCallback(() => {
|
|
18
|
+
const i = l.current;
|
|
19
|
+
i && x(i.scrollWidth > i.clientWidth);
|
|
20
|
+
}, []);
|
|
21
|
+
s.useLayoutEffect(() => {
|
|
22
|
+
const i = l.current;
|
|
23
|
+
if (!i) return;
|
|
24
|
+
m();
|
|
25
|
+
const v = i.parentElement, f = new ResizeObserver(m);
|
|
26
|
+
return f.observe(i), v && f.observe(v), () => {
|
|
27
|
+
f.disconnect();
|
|
28
|
+
};
|
|
29
|
+
}, [e, m]);
|
|
30
|
+
const b = /* @__PURE__ */ n(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
ref: p,
|
|
34
|
+
"data-component": t,
|
|
35
|
+
className: o,
|
|
36
|
+
...r,
|
|
37
|
+
children: e
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
return /* @__PURE__ */ h(M, { open: c ? void 0 : !1, children: [
|
|
41
|
+
/* @__PURE__ */ n(S, { asChild: !0, children: b }),
|
|
42
|
+
/* @__PURE__ */ n(_, { side: "top", variant: "tertiary", children: e })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
g.displayName = "TruncatedTooltipText";
|
|
47
|
+
function C(e, t) {
|
|
48
|
+
return d(
|
|
11
49
|
"rounded-xl transition-[background-color,border-color,box-shadow] duration-200",
|
|
12
50
|
e ? "border-stroke-accent/40 bg-canvas-accent shadow-sm" : "border-stroke bg-canvas-elevated",
|
|
13
51
|
t
|
|
14
52
|
);
|
|
15
53
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
54
|
+
function z(e) {
|
|
55
|
+
return s.isValidElement(e) && e.type.displayName === "ExpandableListItemContent";
|
|
18
56
|
}
|
|
19
|
-
const
|
|
57
|
+
const j = s.forwardRef(
|
|
20
58
|
({
|
|
21
59
|
className: e,
|
|
22
60
|
selected: t,
|
|
23
|
-
expanded:
|
|
24
|
-
defaultExpanded:
|
|
25
|
-
onExpandedChange:
|
|
61
|
+
expanded: o,
|
|
62
|
+
defaultExpanded: r = !1,
|
|
63
|
+
onExpandedChange: a,
|
|
26
64
|
disabled: l,
|
|
27
|
-
expandAriaLabel:
|
|
28
|
-
collapseAriaLabel:
|
|
65
|
+
expandAriaLabel: c = "Expand details",
|
|
66
|
+
collapseAriaLabel: x = "Collapse details",
|
|
29
67
|
children: p,
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
const
|
|
68
|
+
...m
|
|
69
|
+
}, b) => {
|
|
70
|
+
const i = !!t, L = s.Children.toArray(p).find(z) != null, E = s.useMemo(
|
|
33
71
|
() => ({
|
|
34
|
-
showSelectionChrome:
|
|
72
|
+
showSelectionChrome: i,
|
|
35
73
|
disabled: l,
|
|
36
|
-
expandAriaLabel:
|
|
37
|
-
collapseAriaLabel:
|
|
74
|
+
expandAriaLabel: c,
|
|
75
|
+
collapseAriaLabel: x
|
|
38
76
|
}),
|
|
39
|
-
[
|
|
77
|
+
[i, l, c, x]
|
|
40
78
|
);
|
|
41
79
|
if (!L)
|
|
42
|
-
return /* @__PURE__ */ n(
|
|
80
|
+
return /* @__PURE__ */ n(w, { value: E, children: /* @__PURE__ */ n(
|
|
43
81
|
"div",
|
|
44
82
|
{
|
|
45
|
-
ref:
|
|
83
|
+
ref: b,
|
|
46
84
|
"data-component": "expandable-list-item-row",
|
|
47
85
|
"data-expandable": "false",
|
|
48
86
|
"data-selected": t ? "" : void 0,
|
|
49
|
-
"data-selection-chrome":
|
|
50
|
-
className:
|
|
51
|
-
...
|
|
87
|
+
"data-selection-chrome": i ? "" : void 0,
|
|
88
|
+
className: C(i, e),
|
|
89
|
+
...m,
|
|
52
90
|
children: p
|
|
53
91
|
}
|
|
54
92
|
) });
|
|
55
|
-
const
|
|
56
|
-
return /* @__PURE__ */ n(
|
|
93
|
+
const N = o !== void 0, T = N ? o ? u : "" : void 0;
|
|
94
|
+
return /* @__PURE__ */ n(w, { value: E, children: /* @__PURE__ */ n(
|
|
57
95
|
"div",
|
|
58
96
|
{
|
|
59
|
-
ref:
|
|
97
|
+
ref: b,
|
|
60
98
|
"data-component": "expandable-list-item",
|
|
61
99
|
"data-expandable": "true",
|
|
62
|
-
"data-expanded":
|
|
100
|
+
"data-expanded": o ?? void 0,
|
|
63
101
|
"data-selected": t ? "" : void 0,
|
|
64
|
-
"data-selection-chrome":
|
|
65
|
-
className:
|
|
66
|
-
...
|
|
102
|
+
"data-selection-chrome": i ? "" : void 0,
|
|
103
|
+
className: C(i, e),
|
|
104
|
+
...m,
|
|
67
105
|
children: /* @__PURE__ */ n(
|
|
68
|
-
|
|
106
|
+
O,
|
|
69
107
|
{
|
|
70
108
|
type: "single",
|
|
71
109
|
collapsible: !0,
|
|
72
110
|
disabled: l,
|
|
73
|
-
...
|
|
74
|
-
defaultValue:
|
|
111
|
+
...N ? { value: T } : {
|
|
112
|
+
defaultValue: r ? u : void 0
|
|
75
113
|
},
|
|
76
|
-
onValueChange: (
|
|
114
|
+
onValueChange: (k) => a?.(k === u),
|
|
77
115
|
children: /* @__PURE__ */ n(
|
|
78
|
-
|
|
116
|
+
P,
|
|
79
117
|
{
|
|
80
|
-
value:
|
|
118
|
+
value: u,
|
|
81
119
|
className: "overflow-visible rounded-none border-0 bg-transparent p-0 shadow-none",
|
|
82
120
|
children: p
|
|
83
121
|
}
|
|
@@ -88,146 +126,169 @@ const D = i.forwardRef(
|
|
|
88
126
|
) });
|
|
89
127
|
}
|
|
90
128
|
);
|
|
91
|
-
|
|
92
|
-
const
|
|
129
|
+
j.displayName = "ExpandableListItemRoot";
|
|
130
|
+
const te = y("expandable-list-item", {
|
|
93
131
|
part: "row",
|
|
94
132
|
displayName: "ExpandableListItemRow",
|
|
95
|
-
className: "flex items-start gap-
|
|
96
|
-
}),
|
|
133
|
+
className: "flex items-start gap-2 px-3 py-3"
|
|
134
|
+
}), B = s.forwardRef(({ className: e, onCheckedChange: t, ...o }, r) => /* @__PURE__ */ n(
|
|
97
135
|
"div",
|
|
98
136
|
{
|
|
99
|
-
className:
|
|
137
|
+
className: d("mt-1 shrink-0", e),
|
|
100
138
|
"data-component": "expandable-list-item-checkbox",
|
|
101
|
-
onClick: (
|
|
102
|
-
onKeyDown: (
|
|
139
|
+
onClick: (a) => a.stopPropagation(),
|
|
140
|
+
onKeyDown: (a) => a.stopPropagation(),
|
|
103
141
|
children: /* @__PURE__ */ n(
|
|
104
|
-
|
|
142
|
+
D,
|
|
105
143
|
{
|
|
106
|
-
ref:
|
|
107
|
-
onCheckedChange: (
|
|
108
|
-
...
|
|
144
|
+
ref: r,
|
|
145
|
+
onCheckedChange: (a) => t?.(a === !0),
|
|
146
|
+
...o
|
|
109
147
|
}
|
|
110
148
|
)
|
|
111
149
|
}
|
|
112
150
|
));
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
const { disabled:
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
-
|
|
151
|
+
B.displayName = "ExpandableListItemCheckbox";
|
|
152
|
+
const F = s.forwardRef(({ className: e, children: t, ...o }, r) => {
|
|
153
|
+
const { disabled: a, expandAriaLabel: l, collapseAriaLabel: c } = I();
|
|
154
|
+
return /* @__PURE__ */ h(
|
|
155
|
+
V,
|
|
118
156
|
{
|
|
119
|
-
ref:
|
|
157
|
+
ref: r,
|
|
120
158
|
variant: "plain",
|
|
121
159
|
"data-component": "expandable-list-item-trigger",
|
|
122
|
-
className:
|
|
123
|
-
"min-w-0 items-
|
|
124
|
-
|
|
160
|
+
className: d(
|
|
161
|
+
"min-w-0 flex-1 overflow-hidden items-start gap-1 text-left",
|
|
162
|
+
a && "pointer-events-none opacity-50",
|
|
125
163
|
e
|
|
126
164
|
),
|
|
127
|
-
disabled:
|
|
128
|
-
...
|
|
165
|
+
disabled: a,
|
|
166
|
+
...o,
|
|
129
167
|
children: [
|
|
130
168
|
t,
|
|
131
169
|
/* @__PURE__ */ n(
|
|
132
170
|
"span",
|
|
133
171
|
{
|
|
134
|
-
className: "mt-
|
|
172
|
+
className: "mt-1 inline-flex shrink-0 text-content-icon transition-transform duration-200 motion-reduce:transition-none group-data-[state=open]:rotate-180",
|
|
135
173
|
"aria-hidden": !0,
|
|
136
|
-
children: /* @__PURE__ */ n(
|
|
174
|
+
children: /* @__PURE__ */ n(R, { className: "size-4 rotate-90" })
|
|
137
175
|
}
|
|
138
176
|
),
|
|
139
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ h("span", { className: "sr-only", children: [
|
|
140
178
|
l,
|
|
141
179
|
" / ",
|
|
142
|
-
|
|
180
|
+
c
|
|
143
181
|
] })
|
|
144
182
|
]
|
|
145
183
|
}
|
|
146
184
|
);
|
|
147
185
|
});
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
|
|
186
|
+
F.displayName = "ExpandableListItemTrigger";
|
|
187
|
+
const H = s.forwardRef(({ className: e, children: t, ...o }, r) => {
|
|
188
|
+
const a = d(
|
|
189
|
+
"block min-w-0 w-0 flex-1 truncate text-sm font-semibold leading-6 tracking-tight text-content",
|
|
190
|
+
e
|
|
191
|
+
);
|
|
192
|
+
return typeof t != "string" ? /* @__PURE__ */ n(
|
|
152
193
|
"span",
|
|
153
194
|
{
|
|
154
|
-
ref:
|
|
195
|
+
ref: r,
|
|
155
196
|
"data-component": "expandable-list-item-title",
|
|
156
|
-
className:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
197
|
+
className: a,
|
|
198
|
+
...o,
|
|
199
|
+
children: t
|
|
200
|
+
}
|
|
201
|
+
) : /* @__PURE__ */ n(
|
|
202
|
+
g,
|
|
203
|
+
{
|
|
204
|
+
ref: r,
|
|
205
|
+
text: t,
|
|
206
|
+
componentName: "expandable-list-item-title",
|
|
207
|
+
className: a,
|
|
208
|
+
...o
|
|
162
209
|
}
|
|
163
210
|
);
|
|
164
211
|
});
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
212
|
+
H.displayName = "ExpandableListItemTitle";
|
|
213
|
+
const W = s.forwardRef(({ className: e, children: t, ...o }, r) => {
|
|
214
|
+
const a = d(
|
|
215
|
+
"mt-1 block min-w-0 w-full truncate text-xs font-medium leading-4 text-secondary-foreground",
|
|
216
|
+
e
|
|
217
|
+
);
|
|
218
|
+
return typeof t == "string" ? /* @__PURE__ */ n(
|
|
219
|
+
g,
|
|
220
|
+
{
|
|
221
|
+
text: t,
|
|
222
|
+
componentName: "expandable-list-item-description",
|
|
223
|
+
className: a
|
|
224
|
+
}
|
|
225
|
+
) : /* @__PURE__ */ n(
|
|
226
|
+
"div",
|
|
227
|
+
{
|
|
228
|
+
ref: r,
|
|
229
|
+
"data-component": "expandable-list-item-description",
|
|
230
|
+
className: a,
|
|
231
|
+
...o,
|
|
232
|
+
children: t
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
});
|
|
236
|
+
W.displayName = "ExpandableListItemDescription";
|
|
237
|
+
const K = s.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ n(
|
|
177
238
|
"div",
|
|
178
239
|
{
|
|
179
|
-
ref:
|
|
240
|
+
ref: o,
|
|
180
241
|
"data-component": "expandable-list-item-media",
|
|
181
|
-
className:
|
|
242
|
+
className: d("flex min-w-0 flex-1 flex-nowrap items-center gap-2 overflow-hidden", e),
|
|
182
243
|
...t
|
|
183
244
|
}
|
|
184
245
|
));
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
const { disabled:
|
|
246
|
+
K.displayName = "ExpandableListItemMedia";
|
|
247
|
+
const U = s.forwardRef(({ className: e, ...t }, o) => {
|
|
248
|
+
const { disabled: r } = I();
|
|
188
249
|
return /* @__PURE__ */ n(
|
|
189
250
|
"div",
|
|
190
251
|
{
|
|
191
|
-
ref:
|
|
252
|
+
ref: o,
|
|
192
253
|
"data-component": "expandable-list-item-header",
|
|
193
|
-
className:
|
|
194
|
-
"min-w-0 flex-1",
|
|
195
|
-
|
|
254
|
+
className: d(
|
|
255
|
+
"min-w-0 w-full flex-1 overflow-hidden",
|
|
256
|
+
r && "pointer-events-none opacity-50",
|
|
196
257
|
e
|
|
197
258
|
),
|
|
198
259
|
...t
|
|
199
260
|
}
|
|
200
261
|
);
|
|
201
262
|
});
|
|
202
|
-
|
|
203
|
-
const
|
|
263
|
+
U.displayName = "ExpandableListItemHeader";
|
|
264
|
+
const X = s.forwardRef(({ className: e, children: t, ...o }, r) => /* @__PURE__ */ n(A, { className: "border-0 bg-transparent p-0 pb-[0.01rem]", children: /* @__PURE__ */ n(
|
|
204
265
|
"div",
|
|
205
266
|
{
|
|
206
|
-
ref:
|
|
267
|
+
ref: r,
|
|
207
268
|
"data-component": "expandable-list-item-content",
|
|
208
|
-
className:
|
|
269
|
+
className: d(
|
|
209
270
|
"mx-2 mb-2 overflow-hidden rounded-lg bg-canvas-subtle pt-2",
|
|
210
271
|
e
|
|
211
272
|
),
|
|
212
|
-
...
|
|
273
|
+
...o,
|
|
213
274
|
children: t
|
|
214
275
|
}
|
|
215
276
|
) }));
|
|
216
|
-
|
|
217
|
-
const
|
|
277
|
+
X.displayName = "ExpandableListItemContent";
|
|
278
|
+
const ae = y("expandable-list-item", {
|
|
218
279
|
part: "footer",
|
|
219
280
|
displayName: "ExpandableListItemFooter",
|
|
220
281
|
className: "px-4 py-3 sm:px-5"
|
|
221
282
|
});
|
|
222
283
|
export {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
284
|
+
B as ExpandableListItemCheckbox,
|
|
285
|
+
X as ExpandableListItemContent,
|
|
286
|
+
W as ExpandableListItemDescription,
|
|
287
|
+
ae as ExpandableListItemFooter,
|
|
288
|
+
U as ExpandableListItemHeader,
|
|
289
|
+
K as ExpandableListItemMedia,
|
|
290
|
+
j as ExpandableListItemRoot,
|
|
291
|
+
te as ExpandableListItemRow,
|
|
292
|
+
H as ExpandableListItemTitle,
|
|
293
|
+
F as ExpandableListItemTrigger
|
|
233
294
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as l, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { ExpandableListItemAttributes as
|
|
4
|
-
import { ExpandableListItemMetrics as
|
|
5
|
-
import { ExpandableListItemRoot as
|
|
2
|
+
import * as P from "react";
|
|
3
|
+
import { ExpandableListItemAttributes as R } from "./expandable-list-item-attributes.js";
|
|
4
|
+
import { ExpandableListItemMetrics as T } from "./expandable-list-item-metrics.js";
|
|
5
|
+
import { ExpandableListItemRoot as o, ExpandableListItemRow as f, ExpandableListItemCheckbox as C, ExpandableListItemHeader as E, ExpandableListItemMedia as I, ExpandableListItemTitle as k, ExpandableListItemDescription as L, ExpandableListItemTrigger as v, ExpandableListItemContent as j, ExpandableListItemFooter as M } from "./expandable-list-item-parts.js";
|
|
6
6
|
function O(e) {
|
|
7
7
|
switch (e.type) {
|
|
8
8
|
case "metrics":
|
|
9
9
|
return /* @__PURE__ */ l(
|
|
10
|
-
|
|
10
|
+
T,
|
|
11
11
|
{
|
|
12
12
|
sectionId: e.id,
|
|
13
13
|
columns: e.columns
|
|
@@ -16,12 +16,13 @@ function O(e) {
|
|
|
16
16
|
);
|
|
17
17
|
case "attributes":
|
|
18
18
|
return /* @__PURE__ */ l(
|
|
19
|
-
|
|
19
|
+
R,
|
|
20
20
|
{
|
|
21
21
|
title: e.title,
|
|
22
22
|
tags: e.tags,
|
|
23
23
|
maxVisibleTags: e.maxVisibleTags,
|
|
24
|
-
formatOverflow: e.formatOverflow
|
|
24
|
+
formatOverflow: e.formatOverflow,
|
|
25
|
+
externalCopyFunction: e.externalCopyFunction
|
|
25
26
|
},
|
|
26
27
|
e.id
|
|
27
28
|
);
|
|
@@ -34,7 +35,7 @@ function O(e) {
|
|
|
34
35
|
function V({ section: e }) {
|
|
35
36
|
return /* @__PURE__ */ l("div", { className: "px-4 py-4 sm:px-5", children: e.content });
|
|
36
37
|
}
|
|
37
|
-
const $ =
|
|
38
|
+
const $ = P.forwardRef(
|
|
38
39
|
({
|
|
39
40
|
className: e,
|
|
40
41
|
title: t,
|
|
@@ -43,31 +44,31 @@ const $ = R.forwardRef(
|
|
|
43
44
|
selection: a,
|
|
44
45
|
selected: g,
|
|
45
46
|
expanded: w,
|
|
46
|
-
defaultExpanded:
|
|
47
|
-
onExpandedChange:
|
|
47
|
+
defaultExpanded: y = !1,
|
|
48
|
+
onExpandedChange: S,
|
|
48
49
|
disabled: c,
|
|
49
50
|
sections: i,
|
|
50
51
|
panelFooter: h,
|
|
51
|
-
expandAriaLabel:
|
|
52
|
-
collapseAriaLabel:
|
|
53
|
-
...
|
|
54
|
-
},
|
|
52
|
+
expandAriaLabel: u = "Expand details",
|
|
53
|
+
collapseAriaLabel: s = "Collapse details",
|
|
54
|
+
...p
|
|
55
|
+
}, b) => {
|
|
55
56
|
const x = !!(g || a?.checked);
|
|
56
57
|
return i != null && i.length > 0 || h != null ? /* @__PURE__ */ d(
|
|
57
|
-
|
|
58
|
+
o,
|
|
58
59
|
{
|
|
59
|
-
ref:
|
|
60
|
+
ref: b,
|
|
60
61
|
className: e,
|
|
61
62
|
selected: x,
|
|
62
63
|
expanded: w,
|
|
63
|
-
defaultExpanded:
|
|
64
|
-
onExpandedChange:
|
|
64
|
+
defaultExpanded: y,
|
|
65
|
+
onExpandedChange: S,
|
|
65
66
|
disabled: c,
|
|
66
|
-
expandAriaLabel:
|
|
67
|
-
collapseAriaLabel:
|
|
68
|
-
...
|
|
67
|
+
expandAriaLabel: u,
|
|
68
|
+
collapseAriaLabel: s,
|
|
69
|
+
...p,
|
|
69
70
|
children: [
|
|
70
|
-
/* @__PURE__ */ d(
|
|
71
|
+
/* @__PURE__ */ d(f, { children: [
|
|
71
72
|
a ? /* @__PURE__ */ l(
|
|
72
73
|
C,
|
|
73
74
|
{
|
|
@@ -79,7 +80,7 @@ const $ = R.forwardRef(
|
|
|
79
80
|
"aria-label": a["aria-label"] ?? `Select ${t}`
|
|
80
81
|
}
|
|
81
82
|
) : null,
|
|
82
|
-
/* @__PURE__ */ l(
|
|
83
|
+
/* @__PURE__ */ l(v, { children: /* @__PURE__ */ d(E, { children: [
|
|
83
84
|
/* @__PURE__ */ d(I, { children: [
|
|
84
85
|
/* @__PURE__ */ l(k, { children: t }),
|
|
85
86
|
m
|
|
@@ -94,16 +95,16 @@ const $ = R.forwardRef(
|
|
|
94
95
|
]
|
|
95
96
|
}
|
|
96
97
|
) : /* @__PURE__ */ l(
|
|
97
|
-
|
|
98
|
+
o,
|
|
98
99
|
{
|
|
99
|
-
ref:
|
|
100
|
+
ref: b,
|
|
100
101
|
className: e,
|
|
101
102
|
selected: x,
|
|
102
103
|
disabled: c,
|
|
103
|
-
expandAriaLabel:
|
|
104
|
-
collapseAriaLabel:
|
|
105
|
-
...
|
|
106
|
-
children: /* @__PURE__ */ d(
|
|
104
|
+
expandAriaLabel: u,
|
|
105
|
+
collapseAriaLabel: s,
|
|
106
|
+
...p,
|
|
107
|
+
children: /* @__PURE__ */ d(f, { children: [
|
|
107
108
|
a ? /* @__PURE__ */ l(
|
|
108
109
|
C,
|
|
109
110
|
{
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export interface ExternalCopyFunctionProps {
|
|
3
|
+
e: React.MouseEvent<HTMLButtonElement>;
|
|
4
|
+
val: string | number;
|
|
5
|
+
index: number;
|
|
6
|
+
}
|
|
2
7
|
export type ExpandableListItemMetricColumn = {
|
|
3
8
|
label: string;
|
|
4
9
|
value: string;
|
|
@@ -19,6 +24,8 @@ export type ExpandableListItemAttributesSection = {
|
|
|
19
24
|
maxVisibleTags?: number;
|
|
20
25
|
/** Default: `(n) => \`+\${n}\``. */
|
|
21
26
|
formatOverflow?: (hiddenCount: number) => string;
|
|
27
|
+
/** Override the default clipboard copy inside the overflow popover. */
|
|
28
|
+
externalCopyFunction?: (props: ExternalCopyFunctionProps) => void;
|
|
22
29
|
};
|
|
23
30
|
/** Arbitrary block inside the expanded panel. */
|
|
24
31
|
export type ExpandableListItemCustomSection = {
|
|
@@ -2,4 +2,4 @@ export { ExpandableListItem, type ExpandableListItemProps, } from './expandable-
|
|
|
2
2
|
export { ExpandableListItemRoot, ExpandableListItemRow, ExpandableListItemCheckbox, ExpandableListItemTrigger, ExpandableListItemTitle, ExpandableListItemDescription, ExpandableListItemMedia, ExpandableListItemHeader, ExpandableListItemContent, ExpandableListItemFooter, type ExpandableListItemRootProps, type ExpandableListItemCheckboxProps, } from './expandable-list-item-parts';
|
|
3
3
|
export { ExpandableListItemMetrics, type ExpandableListItemMetricsProps } from './expandable-list-item-metrics';
|
|
4
4
|
export { ExpandableListItemAttributes, type ExpandableListItemAttributesProps, } from './expandable-list-item-attributes';
|
|
5
|
-
export type { ExpandableListItemAttributesSection, ExpandableListItemCustomSection, ExpandableListItemMetricColumn, ExpandableListItemMetricsSection, ExpandableListItemSelection, ExpandableListItemSection, } from './expandable-list-item.types';
|
|
5
|
+
export type { ExternalCopyFunctionProps, ExpandableListItemAttributesSection, ExpandableListItemCustomSection, ExpandableListItemMetricColumn, ExpandableListItemMetricsSection, ExpandableListItemSelection, ExpandableListItemSection, } from './expandable-list-item.types';
|