@wallarm-org/design-system 3.4.1-rc-fix-data-display-category.2 → 4.0.0
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/Chat/Chat.js +20 -18
- package/dist/components/Chat/ChatTrigger.js +37 -33
- package/dist/components/DateInput/internal/DateInputInternal.js +8 -4
- package/dist/components/DateRangeInput/DateRangeInputInternal.js +8 -4
- package/dist/components/DateRangeInput/DateRangeSeparator.js +15 -6
- package/dist/components/FileUpload/FileUploadItemReplaceTrigger.js +14 -11
- package/dist/components/FilterCascade/FilterCascadeLevel.js +18 -10
- package/dist/components/FilterInput/FilterInput.d.ts +2 -1
- package/dist/components/FilterInput/FilterInput.js +160 -142
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.d.ts +2 -1
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.js +157 -138
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputRemoveButton.js +8 -4
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/PairSeparator.js +20 -11
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/Segment.js +4 -0
- package/dist/components/FilterInput/FilterInputField/FilterInputConnectorChip/FilterInputConnectorChip.js +98 -86
- package/dist/components/FilterInput/FilterInputField/FilterInputField.js +82 -70
- package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.d.ts +2 -1
- package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.js +5 -1
- package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.d.ts +2 -1
- package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.js +20 -14
- package/dist/components/NavRail/NavRailItem.js +57 -55
- package/dist/components/Select/SelectInput/SelectInputItemRenderer.js +20 -13
- package/dist/components/Selection/SelectionItem.js +8 -4
- package/dist/components/SimpleCharts/AreaChart/AreaChartArea.js +8 -4
- package/dist/components/SimpleCharts/BarList/BarListPercent.js +16 -13
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopover.js +8 -4
- package/dist/components/SimpleCharts/LineChart/LineChartLine.js +8 -4
- package/dist/components/SimpleCharts/LineChart/LineChartZoomBrush.js +3 -0
- package/dist/components/SimpleCharts/PieChart/PieChartDonut.js +33 -30
- package/dist/components/Tree/TreeItemContent.js +18 -12
- package/dist/components/Tree/TreeItemHeader.js +49 -38
- package/dist/components/TreeView/TreeViewItem.js +46 -40
- package/dist/metadata/components.json +68 -512
- package/package.json +1 -1
- package/dist/components/TreeBase/TreeBase.d.ts +0 -31
- package/dist/components/TreeBase/TreeBase.js +0 -245
- package/dist/components/TreeBase/classes.d.ts +0 -7
- package/dist/components/TreeBase/classes.js +0 -10
- package/dist/components/TreeBase/index.d.ts +0 -1
- package/dist/components/TreeBase/index.js +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { Collapse } from "../../utils/Collapse.js";
|
|
4
|
+
import { useTestId } from "../../utils/testId.js";
|
|
4
5
|
import { useTreeItemContext } from "./TreeItemContext.js";
|
|
5
6
|
const TreeItemContent = (t0)=>{
|
|
6
|
-
const $ = c(
|
|
7
|
+
const $ = c(18);
|
|
7
8
|
let children;
|
|
8
9
|
let className;
|
|
9
10
|
let props;
|
|
@@ -22,12 +23,14 @@ const TreeItemContent = (t0)=>{
|
|
|
22
23
|
ref = $[4];
|
|
23
24
|
}
|
|
24
25
|
const { collapsible, open } = useTreeItemContext();
|
|
26
|
+
const testId = useTestId("content");
|
|
25
27
|
if (!collapsible) {
|
|
26
28
|
let t1;
|
|
27
|
-
if ($[5] !== children || $[6] !== className || $[7] !== props || $[8] !== ref) {
|
|
29
|
+
if ($[5] !== children || $[6] !== className || $[7] !== props || $[8] !== ref || $[9] !== testId) {
|
|
28
30
|
t1 = /*#__PURE__*/ jsx("div", {
|
|
29
31
|
ref: ref,
|
|
30
32
|
"data-slot": "tree-item-content",
|
|
33
|
+
"data-testid": testId,
|
|
31
34
|
className: className,
|
|
32
35
|
...props,
|
|
33
36
|
children: children
|
|
@@ -36,27 +39,30 @@ const TreeItemContent = (t0)=>{
|
|
|
36
39
|
$[6] = className;
|
|
37
40
|
$[7] = props;
|
|
38
41
|
$[8] = ref;
|
|
39
|
-
$[9] =
|
|
40
|
-
|
|
42
|
+
$[9] = testId;
|
|
43
|
+
$[10] = t1;
|
|
44
|
+
} else t1 = $[10];
|
|
41
45
|
return t1;
|
|
42
46
|
}
|
|
43
47
|
let t1;
|
|
44
|
-
if ($[
|
|
48
|
+
if ($[11] !== children || $[12] !== className || $[13] !== open || $[14] !== props || $[15] !== ref || $[16] !== testId) {
|
|
45
49
|
t1 = /*#__PURE__*/ jsx(Collapse, {
|
|
46
50
|
ref: ref,
|
|
47
51
|
open: open,
|
|
48
52
|
"data-slot": "tree-item-content",
|
|
53
|
+
"data-testid": testId,
|
|
49
54
|
className: className,
|
|
50
55
|
...props,
|
|
51
56
|
children: children
|
|
52
57
|
});
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
|
|
58
|
+
$[11] = children;
|
|
59
|
+
$[12] = className;
|
|
60
|
+
$[13] = open;
|
|
61
|
+
$[14] = props;
|
|
62
|
+
$[15] = ref;
|
|
63
|
+
$[16] = testId;
|
|
64
|
+
$[17] = t1;
|
|
65
|
+
} else t1 = $[17];
|
|
60
66
|
return t1;
|
|
61
67
|
};
|
|
62
68
|
TreeItemContent.displayName = "TreeItemContent";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { cn } from "../../utils/cn.js";
|
|
4
|
+
import { useTestId } from "../../utils/testId.js";
|
|
4
5
|
import { useTreeItemContext } from "./TreeItemContext.js";
|
|
5
6
|
import { TreeItemIcon } from "./TreeItemIcon.js";
|
|
6
7
|
const TreeItemHeader = (t0)=>{
|
|
7
|
-
const $ = c(
|
|
8
|
+
const $ = c(46);
|
|
8
9
|
let action;
|
|
9
10
|
let children;
|
|
10
11
|
let className;
|
|
@@ -29,6 +30,8 @@ const TreeItemHeader = (t0)=>{
|
|
|
29
30
|
ref = $[6];
|
|
30
31
|
}
|
|
31
32
|
const { collapsible, open, toggle } = useTreeItemContext();
|
|
33
|
+
const testId = useTestId("header");
|
|
34
|
+
const actionTestId = useTestId("action");
|
|
32
35
|
if (collapsible) {
|
|
33
36
|
const t1 = open ? "open" : "closed";
|
|
34
37
|
let t2;
|
|
@@ -76,20 +79,23 @@ const TreeItemHeader = (t0)=>{
|
|
|
76
79
|
$[17] = t6;
|
|
77
80
|
} else t6 = $[17];
|
|
78
81
|
let t7;
|
|
79
|
-
if ($[18] !== action) {
|
|
82
|
+
if ($[18] !== action || $[19] !== actionTestId) {
|
|
80
83
|
t7 = action && /*#__PURE__*/ jsx("div", {
|
|
81
84
|
className: "relative ml-2 shrink-0",
|
|
82
85
|
"data-slot": "tree-item-action",
|
|
86
|
+
"data-testid": actionTestId,
|
|
83
87
|
children: action
|
|
84
88
|
});
|
|
85
89
|
$[18] = action;
|
|
86
|
-
$[19] =
|
|
87
|
-
|
|
90
|
+
$[19] = actionTestId;
|
|
91
|
+
$[20] = t7;
|
|
92
|
+
} else t7 = $[20];
|
|
88
93
|
let t8;
|
|
89
|
-
if ($[
|
|
94
|
+
if ($[21] !== props || $[22] !== ref || $[23] !== t1 || $[24] !== t2 || $[25] !== t6 || $[26] !== t7 || $[27] !== testId) {
|
|
90
95
|
t8 = /*#__PURE__*/ jsxs("div", {
|
|
91
96
|
ref: ref,
|
|
92
97
|
"data-slot": "tree-item-header",
|
|
98
|
+
"data-testid": testId,
|
|
93
99
|
"data-state": t1,
|
|
94
100
|
className: t2,
|
|
95
101
|
...props,
|
|
@@ -98,54 +104,58 @@ const TreeItemHeader = (t0)=>{
|
|
|
98
104
|
t7
|
|
99
105
|
]
|
|
100
106
|
});
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
|
|
107
|
+
$[21] = props;
|
|
108
|
+
$[22] = ref;
|
|
109
|
+
$[23] = t1;
|
|
110
|
+
$[24] = t2;
|
|
111
|
+
$[25] = t6;
|
|
112
|
+
$[26] = t7;
|
|
113
|
+
$[27] = testId;
|
|
114
|
+
$[28] = t8;
|
|
115
|
+
} else t8 = $[28];
|
|
109
116
|
return t8;
|
|
110
117
|
}
|
|
111
118
|
let t1;
|
|
112
|
-
if ($[
|
|
119
|
+
if ($[29] !== className) {
|
|
113
120
|
t1 = cn("group relative pt-2 pb-4 flex w-full items-start justify-between", className);
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
} else t1 = $[
|
|
121
|
+
$[29] = className;
|
|
122
|
+
$[30] = t1;
|
|
123
|
+
} else t1 = $[30];
|
|
117
124
|
let t2;
|
|
118
|
-
if ($[
|
|
125
|
+
if ($[31] !== icon) {
|
|
119
126
|
t2 = /*#__PURE__*/ jsx(TreeItemIcon, {
|
|
120
127
|
icon: icon
|
|
121
128
|
});
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
} else t2 = $[
|
|
129
|
+
$[31] = icon;
|
|
130
|
+
$[32] = t2;
|
|
131
|
+
} else t2 = $[32];
|
|
125
132
|
let t3;
|
|
126
|
-
if ($[
|
|
133
|
+
if ($[33] !== children) {
|
|
127
134
|
t3 = /*#__PURE__*/ jsx("div", {
|
|
128
135
|
className: "min-w-0 flex-1",
|
|
129
136
|
children: children
|
|
130
137
|
});
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
} else t3 = $[
|
|
138
|
+
$[33] = children;
|
|
139
|
+
$[34] = t3;
|
|
140
|
+
} else t3 = $[34];
|
|
134
141
|
let t4;
|
|
135
|
-
if ($[
|
|
142
|
+
if ($[35] !== action || $[36] !== actionTestId) {
|
|
136
143
|
t4 = action && /*#__PURE__*/ jsx("div", {
|
|
137
144
|
className: "ml-2 shrink-0",
|
|
138
145
|
"data-slot": "tree-item-action",
|
|
146
|
+
"data-testid": actionTestId,
|
|
139
147
|
children: action
|
|
140
148
|
});
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
|
|
149
|
+
$[35] = action;
|
|
150
|
+
$[36] = actionTestId;
|
|
151
|
+
$[37] = t4;
|
|
152
|
+
} else t4 = $[37];
|
|
144
153
|
let t5;
|
|
145
|
-
if ($[
|
|
154
|
+
if ($[38] !== props || $[39] !== ref || $[40] !== t1 || $[41] !== t2 || $[42] !== t3 || $[43] !== t4 || $[44] !== testId) {
|
|
146
155
|
t5 = /*#__PURE__*/ jsxs("div", {
|
|
147
156
|
ref: ref,
|
|
148
157
|
"data-slot": "tree-item-header",
|
|
158
|
+
"data-testid": testId,
|
|
149
159
|
className: t1,
|
|
150
160
|
...props,
|
|
151
161
|
children: [
|
|
@@ -154,14 +164,15 @@ const TreeItemHeader = (t0)=>{
|
|
|
154
164
|
t4
|
|
155
165
|
]
|
|
156
166
|
});
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
|
|
167
|
+
$[38] = props;
|
|
168
|
+
$[39] = ref;
|
|
169
|
+
$[40] = t1;
|
|
170
|
+
$[41] = t2;
|
|
171
|
+
$[42] = t3;
|
|
172
|
+
$[43] = t4;
|
|
173
|
+
$[44] = testId;
|
|
174
|
+
$[45] = t5;
|
|
175
|
+
} else t5 = $[45];
|
|
165
176
|
return t5;
|
|
166
177
|
};
|
|
167
178
|
TreeItemHeader.displayName = "TreeItemHeader";
|
|
@@ -11,7 +11,7 @@ import { TREE_VIEW_INDENT_STEP } from "./TreeView.js";
|
|
|
11
11
|
import { useTreeViewContext } from "./TreeViewContext.js";
|
|
12
12
|
const RAIL_BASE_LEFT = 14;
|
|
13
13
|
const TreeViewItem = (t0)=>{
|
|
14
|
-
const $ = c(
|
|
14
|
+
const $ = c(85);
|
|
15
15
|
let children;
|
|
16
16
|
let className;
|
|
17
17
|
let controlledOpen;
|
|
@@ -57,6 +57,8 @@ const TreeViewItem = (t0)=>{
|
|
|
57
57
|
const disabled = void 0 === t2 ? false : t2;
|
|
58
58
|
const depth = useTreeDepth();
|
|
59
59
|
const testId = useTestId("item");
|
|
60
|
+
const toggleTestId = useTestId("toggle");
|
|
61
|
+
const groupTestId = useTestId("group");
|
|
60
62
|
const { selectable, selectedIds, toggleSelect } = useTreeViewContext();
|
|
61
63
|
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
62
64
|
const isControlled = void 0 !== controlledOpen;
|
|
@@ -205,10 +207,11 @@ const TreeViewItem = (t0)=>{
|
|
|
205
207
|
$[49] = t20;
|
|
206
208
|
} else t20 = $[49];
|
|
207
209
|
let t21;
|
|
208
|
-
if ($[50] !== disabled || $[51] !== handleToggle || $[52] !== isBranch || $[53] !== isOpen) {
|
|
210
|
+
if ($[50] !== disabled || $[51] !== handleToggle || $[52] !== isBranch || $[53] !== isOpen || $[54] !== toggleTestId) {
|
|
209
211
|
t21 = isBranch ? /*#__PURE__*/ jsx("button", {
|
|
210
212
|
type: "button",
|
|
211
213
|
"data-slot": "tree-view-toggle",
|
|
214
|
+
"data-testid": toggleTestId,
|
|
212
215
|
"aria-label": isOpen ? "Collapse" : "Expand",
|
|
213
216
|
disabled: disabled,
|
|
214
217
|
className: "flex shrink-0 cursor-pointer items-center justify-center text-text-secondary disabled:cursor-not-allowed",
|
|
@@ -228,10 +231,11 @@ const TreeViewItem = (t0)=>{
|
|
|
228
231
|
$[51] = handleToggle;
|
|
229
232
|
$[52] = isBranch;
|
|
230
233
|
$[53] = isOpen;
|
|
231
|
-
$[54] =
|
|
232
|
-
|
|
234
|
+
$[54] = toggleTestId;
|
|
235
|
+
$[55] = t21;
|
|
236
|
+
} else t21 = $[55];
|
|
233
237
|
let t22;
|
|
234
|
-
if ($[
|
|
238
|
+
if ($[56] !== content || $[57] !== t20 || $[58] !== t21) {
|
|
235
239
|
t22 = /*#__PURE__*/ jsxs("div", {
|
|
236
240
|
className: "flex h-24 min-w-0 flex-1 items-center gap-4 text-xs text-text-primary [&>svg]:icon-xs [&>svg]:shrink-0 [&>svg]:text-text-secondary",
|
|
237
241
|
style: t20,
|
|
@@ -241,13 +245,13 @@ const TreeViewItem = (t0)=>{
|
|
|
241
245
|
content
|
|
242
246
|
]
|
|
243
247
|
});
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
} else t22 = $[
|
|
248
|
+
$[56] = content;
|
|
249
|
+
$[57] = t20;
|
|
250
|
+
$[58] = t21;
|
|
251
|
+
$[59] = t22;
|
|
252
|
+
} else t22 = $[59];
|
|
249
253
|
let t23;
|
|
250
|
-
if ($[
|
|
254
|
+
if ($[60] !== t14 || $[61] !== t15 || $[62] !== t16 || $[63] !== t17 || $[64] !== t18 || $[65] !== t19 || $[66] !== t22) {
|
|
251
255
|
t23 = /*#__PURE__*/ jsxs("div", {
|
|
252
256
|
"data-slot": "tree-view-row",
|
|
253
257
|
"data-selected": t14,
|
|
@@ -260,22 +264,23 @@ const TreeViewItem = (t0)=>{
|
|
|
260
264
|
t22
|
|
261
265
|
]
|
|
262
266
|
});
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
} else t23 = $[
|
|
267
|
+
$[60] = t14;
|
|
268
|
+
$[61] = t15;
|
|
269
|
+
$[62] = t16;
|
|
270
|
+
$[63] = t17;
|
|
271
|
+
$[64] = t18;
|
|
272
|
+
$[65] = t19;
|
|
273
|
+
$[66] = t22;
|
|
274
|
+
$[67] = t23;
|
|
275
|
+
} else t23 = $[67];
|
|
272
276
|
let t24;
|
|
273
|
-
if ($[
|
|
277
|
+
if ($[68] !== depth || $[69] !== groupTestId || $[70] !== isBranch || $[71] !== isOpen || $[72] !== nestedItems) {
|
|
274
278
|
t24 = isBranch && /*#__PURE__*/ jsx(Collapse, {
|
|
275
279
|
open: isOpen,
|
|
276
280
|
inertWhenClosed: true,
|
|
277
281
|
role: "group",
|
|
278
282
|
"data-slot": "tree-view-group",
|
|
283
|
+
"data-testid": groupTestId,
|
|
279
284
|
children: /*#__PURE__*/ jsx(TreeDepthProvider, {
|
|
280
285
|
value: {
|
|
281
286
|
depth: depth + 1,
|
|
@@ -285,14 +290,15 @@ const TreeViewItem = (t0)=>{
|
|
|
285
290
|
children: nestedItems
|
|
286
291
|
})
|
|
287
292
|
});
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
|
|
293
|
+
$[68] = depth;
|
|
294
|
+
$[69] = groupTestId;
|
|
295
|
+
$[70] = isBranch;
|
|
296
|
+
$[71] = isOpen;
|
|
297
|
+
$[72] = nestedItems;
|
|
298
|
+
$[73] = t24;
|
|
299
|
+
} else t24 = $[73];
|
|
294
300
|
let t25;
|
|
295
|
-
if ($[
|
|
301
|
+
if ($[74] !== props || $[75] !== ref || $[76] !== t10 || $[77] !== t11 || $[78] !== t12 || $[79] !== t13 || $[80] !== t23 || $[81] !== t24 || $[82] !== t9 || $[83] !== testId) {
|
|
296
302
|
t25 = /*#__PURE__*/ jsxs("div", {
|
|
297
303
|
ref: ref,
|
|
298
304
|
role: "treeitem",
|
|
@@ -309,18 +315,18 @@ const TreeViewItem = (t0)=>{
|
|
|
309
315
|
t24
|
|
310
316
|
]
|
|
311
317
|
});
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
} else t25 = $[
|
|
318
|
+
$[74] = props;
|
|
319
|
+
$[75] = ref;
|
|
320
|
+
$[76] = t10;
|
|
321
|
+
$[77] = t11;
|
|
322
|
+
$[78] = t12;
|
|
323
|
+
$[79] = t13;
|
|
324
|
+
$[80] = t23;
|
|
325
|
+
$[81] = t24;
|
|
326
|
+
$[82] = t9;
|
|
327
|
+
$[83] = testId;
|
|
328
|
+
$[84] = t25;
|
|
329
|
+
} else t25 = $[84];
|
|
324
330
|
return t25;
|
|
325
331
|
};
|
|
326
332
|
TreeViewItem.displayName = "TreeViewItem";
|