@wallarm-org/design-system 3.4.1-rc-fix-data-display-category.3 → 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.
Files changed (40) hide show
  1. package/dist/components/Chat/Chat.js +20 -18
  2. package/dist/components/Chat/ChatTrigger.js +37 -33
  3. package/dist/components/DateInput/internal/DateInputInternal.js +8 -4
  4. package/dist/components/DateRangeInput/DateRangeInputInternal.js +8 -4
  5. package/dist/components/DateRangeInput/DateRangeSeparator.js +15 -6
  6. package/dist/components/FileUpload/FileUploadItemReplaceTrigger.js +14 -11
  7. package/dist/components/FilterCascade/FilterCascadeLevel.js +18 -10
  8. package/dist/components/FilterInput/FilterInput.d.ts +2 -1
  9. package/dist/components/FilterInput/FilterInput.js +160 -142
  10. package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.d.ts +2 -1
  11. package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.js +157 -138
  12. package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputRemoveButton.js +8 -4
  13. package/dist/components/FilterInput/FilterInputField/FilterInputChip/PairSeparator.js +20 -11
  14. package/dist/components/FilterInput/FilterInputField/FilterInputChip/Segment.js +4 -0
  15. package/dist/components/FilterInput/FilterInputField/FilterInputConnectorChip/FilterInputConnectorChip.js +98 -86
  16. package/dist/components/FilterInput/FilterInputField/FilterInputField.js +82 -70
  17. package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.d.ts +2 -1
  18. package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.js +5 -1
  19. package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.d.ts +2 -1
  20. package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.js +20 -14
  21. package/dist/components/NavRail/NavRailItem.js +57 -55
  22. package/dist/components/Select/SelectInput/SelectInputItemRenderer.js +20 -13
  23. package/dist/components/Selection/SelectionItem.js +8 -4
  24. package/dist/components/SimpleCharts/AreaChart/AreaChartArea.js +8 -4
  25. package/dist/components/SimpleCharts/BarList/BarListPercent.js +16 -13
  26. package/dist/components/SimpleCharts/LineChart/LineChartHoverPopover.js +8 -4
  27. package/dist/components/SimpleCharts/LineChart/LineChartLine.js +8 -4
  28. package/dist/components/SimpleCharts/LineChart/LineChartZoomBrush.js +3 -0
  29. package/dist/components/SimpleCharts/PieChart/PieChartDonut.js +33 -30
  30. package/dist/components/Tree/TreeItemContent.js +18 -12
  31. package/dist/components/Tree/TreeItemHeader.js +49 -38
  32. package/dist/components/TreeView/TreeViewItem.js +46 -40
  33. package/dist/metadata/components.json +68 -512
  34. package/package.json +1 -1
  35. package/dist/components/TreeBase/TreeBase.d.ts +0 -31
  36. package/dist/components/TreeBase/TreeBase.js +0 -245
  37. package/dist/components/TreeBase/classes.d.ts +0 -7
  38. package/dist/components/TreeBase/classes.js +0 -10
  39. package/dist/components/TreeBase/index.d.ts +0 -1
  40. package/dist/components/TreeBase/index.js +0 -1
@@ -5,7 +5,7 @@ import { TestIdProvider } from "../../utils/testId.js";
5
5
  import { BlurBackground } from "../AnimatedBackground/blur/index.js";
6
6
  import { chatBackgroundVariants, chatVariants } from "./classes.js";
7
7
  const Chat = (t0)=>{
8
- const $ = c(21);
8
+ const $ = c(22);
9
9
  let children;
10
10
  let className;
11
11
  let props;
@@ -37,10 +37,11 @@ const Chat = (t0)=>{
37
37
  $[8] = t2;
38
38
  } else t2 = $[8];
39
39
  let t3;
40
- if ($[9] !== background) {
40
+ if ($[9] !== background || $[10] !== testId) {
41
41
  t3 = "none" !== background && /*#__PURE__*/ jsx("div", {
42
42
  "aria-hidden": true,
43
43
  "data-slot": "chat-background",
44
+ "data-testid": testId && `${testId}--background`,
44
45
  className: chatBackgroundVariants({
45
46
  background
46
47
  }),
@@ -50,20 +51,21 @@ const Chat = (t0)=>{
50
51
  })
51
52
  });
52
53
  $[9] = background;
53
- $[10] = t3;
54
- } else t3 = $[10];
54
+ $[10] = testId;
55
+ $[11] = t3;
56
+ } else t3 = $[11];
55
57
  let t4;
56
- if ($[11] !== children || $[12] !== testId) {
58
+ if ($[12] !== children || $[13] !== testId) {
57
59
  t4 = /*#__PURE__*/ jsx(TestIdProvider, {
58
60
  value: testId,
59
61
  children: children
60
62
  });
61
- $[11] = children;
62
- $[12] = testId;
63
- $[13] = t4;
64
- } else t4 = $[13];
63
+ $[12] = children;
64
+ $[13] = testId;
65
+ $[14] = t4;
66
+ } else t4 = $[14];
65
67
  let t5;
66
- if ($[14] !== props || $[15] !== ref || $[16] !== t2 || $[17] !== t3 || $[18] !== t4 || $[19] !== testId) {
68
+ if ($[15] !== props || $[16] !== ref || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== testId) {
67
69
  t5 = /*#__PURE__*/ jsxs("section", {
68
70
  "aria-label": "Wally chat",
69
71
  ...props,
@@ -76,14 +78,14 @@ const Chat = (t0)=>{
76
78
  t4
77
79
  ]
78
80
  });
79
- $[14] = props;
80
- $[15] = ref;
81
- $[16] = t2;
82
- $[17] = t3;
83
- $[18] = t4;
84
- $[19] = testId;
85
- $[20] = t5;
86
- } else t5 = $[20];
81
+ $[15] = props;
82
+ $[16] = ref;
83
+ $[17] = t2;
84
+ $[18] = t3;
85
+ $[19] = t4;
86
+ $[20] = testId;
87
+ $[21] = t5;
88
+ } else t5 = $[21];
87
89
  return t5;
88
90
  };
89
91
  Chat.displayName = "Chat";
@@ -6,7 +6,7 @@ import { Button } from "../Button/index.js";
6
6
  import { Tooltip, TooltipContent, TooltipTrigger } from "../Tooltip/index.js";
7
7
  import { WallyIcon } from "../WallyIcon/index.js";
8
8
  const ChatTrigger = (t0)=>{
9
- const $ = c(22);
9
+ const $ = c(24);
10
10
  let id;
11
11
  let ref;
12
12
  let rest;
@@ -39,16 +39,19 @@ const ChatTrigger = (t0)=>{
39
39
  $[6] = triggerId;
40
40
  $[7] = t2;
41
41
  } else t2 = $[7];
42
- let t3;
43
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
44
- t3 = /*#__PURE__*/ jsx(WallyIcon, {
45
- size: "md"
42
+ const t3 = testId && `${testId}--icon`;
43
+ let t4;
44
+ if ($[8] !== t3) {
45
+ t4 = /*#__PURE__*/ jsx(WallyIcon, {
46
+ size: "md",
47
+ "data-testid": t3
46
48
  });
47
49
  $[8] = t3;
48
- } else t3 = $[8];
49
- let t4;
50
- if ($[9] !== label || $[10] !== ref || $[11] !== rest || $[12] !== testId || $[13] !== triggerId) {
51
- t4 = /*#__PURE__*/ jsx(TooltipTrigger, {
50
+ $[9] = t4;
51
+ } else t4 = $[9];
52
+ let t5;
53
+ if ($[10] !== label || $[11] !== ref || $[12] !== rest || $[13] !== t4 || $[14] !== testId || $[15] !== triggerId) {
54
+ t5 = /*#__PURE__*/ jsx(TooltipTrigger, {
52
55
  asChild: true,
53
56
  children: /*#__PURE__*/ jsx(Button, {
54
57
  variant: "ghost",
@@ -61,41 +64,42 @@ const ChatTrigger = (t0)=>{
61
64
  ref: ref,
62
65
  "data-slot": "chat-trigger",
63
66
  "data-testid": testId,
64
- children: t3
67
+ children: t4
65
68
  })
66
69
  });
67
- $[9] = label;
68
- $[10] = ref;
69
- $[11] = rest;
70
- $[12] = testId;
71
- $[13] = triggerId;
72
- $[14] = t4;
73
- } else t4 = $[14];
74
- let t5;
75
- if ($[15] !== label) {
76
- t5 = /*#__PURE__*/ jsx(TooltipContent, {
77
- children: label
78
- });
79
- $[15] = label;
70
+ $[10] = label;
71
+ $[11] = ref;
72
+ $[12] = rest;
73
+ $[13] = t4;
74
+ $[14] = testId;
75
+ $[15] = triggerId;
80
76
  $[16] = t5;
81
77
  } else t5 = $[16];
82
78
  let t6;
83
- if ($[17] !== t2 || $[18] !== t4 || $[19] !== t5 || $[20] !== testId) {
84
- t6 = /*#__PURE__*/ jsxs(Tooltip, {
79
+ if ($[17] !== label) {
80
+ t6 = /*#__PURE__*/ jsx(TooltipContent, {
81
+ children: label
82
+ });
83
+ $[17] = label;
84
+ $[18] = t6;
85
+ } else t6 = $[18];
86
+ let t7;
87
+ if ($[19] !== t2 || $[20] !== t5 || $[21] !== t6 || $[22] !== testId) {
88
+ t7 = /*#__PURE__*/ jsxs(Tooltip, {
85
89
  ids: t2,
86
90
  "data-testid": testId,
87
91
  children: [
88
- t4,
89
- t5
92
+ t5,
93
+ t6
90
94
  ]
91
95
  });
92
- $[17] = t2;
93
- $[18] = t4;
94
- $[19] = t5;
95
- $[20] = testId;
96
+ $[19] = t2;
97
+ $[20] = t5;
96
98
  $[21] = t6;
97
- } else t6 = $[21];
98
- return t6;
99
+ $[22] = testId;
100
+ $[23] = t7;
101
+ } else t7 = $[23];
102
+ return t7;
99
103
  };
100
104
  ChatTrigger.displayName = "ChatTrigger";
101
105
  export { ChatTrigger };
@@ -3,6 +3,7 @@ import { c } from "react/compiler-runtime";
3
3
  import { useRef, useState } from "react";
4
4
  import { CalendarDateTime, getLocalTimeZone, now } from "@internationalized/date";
5
5
  import { cn } from "../../../utils/cn.js";
6
+ import { useTestId } from "../../../utils/testId.js";
6
7
  import { InputGroup, InputGroupAddon } from "../../InputGroup/index.js";
7
8
  import { TemporalClear, TemporalPlaceholder, TemporalSegmentGroup, TimeDropdown, useTimeDropdownKeyCapture } from "../../TemporalCore/index.js";
8
9
  function anchorTimeToToday(timeValue) {
@@ -10,7 +11,7 @@ function anchorTimeToToday(timeValue) {
10
11
  return new CalendarDateTime(t.year, t.month, t.day, timeValue.hour, timeValue.minute, 0);
11
12
  }
12
13
  const DateInputInternal = (t0)=>{
13
- const $ = c(78);
14
+ const $ = c(79);
14
15
  let IconComponent;
15
16
  let disabled;
16
17
  let error;
@@ -52,6 +53,7 @@ const DateInputInternal = (t0)=>{
52
53
  state = $[11];
53
54
  timeStep = $[12];
54
55
  }
56
+ const testId = useTestId("input-group");
55
57
  const dropdownRef = useRef(null);
56
58
  const [isFocused, setIsFocused] = useState(false);
57
59
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
@@ -269,9 +271,10 @@ const DateInputInternal = (t0)=>{
269
271
  $[72] = t24;
270
272
  } else t24 = $[72];
271
273
  let t25;
272
- if ($[73] !== size || $[74] !== t11 || $[75] !== t23 || $[76] !== t24) {
274
+ if ($[73] !== size || $[74] !== t11 || $[75] !== t23 || $[76] !== t24 || $[77] !== testId) {
273
275
  t25 = /*#__PURE__*/ jsxs(InputGroup, {
274
276
  size: size,
277
+ "data-testid": testId,
275
278
  children: [
276
279
  t11,
277
280
  t23,
@@ -282,8 +285,9 @@ const DateInputInternal = (t0)=>{
282
285
  $[74] = t11;
283
286
  $[75] = t23;
284
287
  $[76] = t24;
285
- $[77] = t25;
286
- } else t25 = $[77];
288
+ $[77] = testId;
289
+ $[78] = t25;
290
+ } else t25 = $[78];
287
291
  return t25;
288
292
  };
289
293
  DateInputInternal.displayName = "DateInputInternal";
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useState } from "react";
4
4
  import { cn } from "../../utils/cn.js";
5
+ import { useTestId } from "../../utils/testId.js";
5
6
  import { InputGroup, InputGroupAddon } from "../InputGroup/index.js";
6
7
  import { TemporalClear, TemporalPlaceholder } from "../TemporalCore/index.js";
7
8
  import { useDateRangeContext } from "./DateRangeContext/index.js";
@@ -9,8 +10,9 @@ import { DateRangeGroup } from "./DateRangeGroup.js";
9
10
  import { DateRangeSegmentGroup } from "./DateRangeSegmentGroup.js";
10
11
  import { DateRangeSeparator } from "./DateRangeSeparator.js";
11
12
  const DateRangeInputInternal = ()=>{
12
- const $ = c(39);
13
+ const $ = c(40);
13
14
  const { icon: IconComponent, state, startFieldProps, startRef, endFieldProps, endRef, disabled, readOnly, placeholder, size } = useDateRangeContext();
15
+ const testId = useTestId("input-group");
14
16
  const [startHasValue, setStartHasValue] = useState(false);
15
17
  const [endHasValue, setEndHasValue] = useState(false);
16
18
  const [isFocused, setIsFocused] = useState(false);
@@ -151,13 +153,14 @@ const DateRangeInputInternal = ()=>{
151
153
  $[33] = t15;
152
154
  } else t15 = $[33];
153
155
  let t16;
154
- if ($[34] !== size || $[35] !== t14 || $[36] !== t15 || $[37] !== t4) {
156
+ if ($[34] !== size || $[35] !== t14 || $[36] !== t15 || $[37] !== t4 || $[38] !== testId) {
155
157
  t16 = /*#__PURE__*/ jsx("div", {
156
158
  className: t3,
157
159
  onFocusCapture: handleFocusCapture,
158
160
  onBlurCapture: handleBlurCapture,
159
161
  children: /*#__PURE__*/ jsxs(InputGroup, {
160
162
  size: size,
163
+ "data-testid": testId,
161
164
  children: [
162
165
  t4,
163
166
  t14,
@@ -169,8 +172,9 @@ const DateRangeInputInternal = ()=>{
169
172
  $[35] = t14;
170
173
  $[36] = t15;
171
174
  $[37] = t4;
172
- $[38] = t16;
173
- } else t16 = $[38];
175
+ $[38] = testId;
176
+ $[39] = t16;
177
+ } else t16 = $[39];
174
178
  return t16;
175
179
  };
176
180
  DateRangeInputInternal.displayName = "DateRangeInputInternal";
@@ -1,19 +1,28 @@
1
1
  import { jsx } 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
  const DateRangeSeparator = ()=>{
5
- const $ = c(1);
6
+ const $ = c(3);
7
+ const testId = useTestId("separator");
6
8
  let t0;
7
9
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
8
- t0 = /*#__PURE__*/ jsx("span", {
10
+ t0 = cn("text-sm text-text-secondary select-none");
11
+ $[0] = t0;
12
+ } else t0 = $[0];
13
+ let t1;
14
+ if ($[1] !== testId) {
15
+ t1 = /*#__PURE__*/ jsx("span", {
9
16
  "data-slot": "date-range-separator",
10
- className: cn("text-sm text-text-secondary select-none"),
17
+ "data-testid": testId,
18
+ className: t0,
11
19
  "aria-hidden": "true",
12
20
  children: "→"
13
21
  });
14
- $[0] = t0;
15
- } else t0 = $[0];
16
- return t0;
22
+ $[1] = testId;
23
+ $[2] = t1;
24
+ } else t1 = $[2];
25
+ return t1;
17
26
  };
18
27
  DateRangeSeparator.displayName = "DateRangeSeparator";
19
28
  export { DateRangeSeparator };
@@ -9,7 +9,7 @@ import { useFileUploadRootContext } from "./FileUploadContext.js";
9
9
  import { useRequiredFileUploadItemContext } from "./FileUploadItemContext.js";
10
10
  import { checkFile, isSameFile } from "./lib/index.js";
11
11
  const FileUploadItemReplaceTrigger = (t0)=>{
12
- const $ = c(40);
12
+ const $ = c(41);
13
13
  let ariaLabel;
14
14
  let children;
15
15
  let disabled;
@@ -37,6 +37,7 @@ const FileUploadItemReplaceTrigger = (t0)=>{
37
37
  const item = useRequiredFileUploadItemContext("FileUploadItemReplaceTrigger");
38
38
  const inputRef = useRef(null);
39
39
  const testId = useTestId("item-replace-trigger", testIdProp);
40
+ const inputTestId = useTestId("item-replace-input");
40
41
  if (!root || root.readOnly || item.loading) return null;
41
42
  const current = item.file;
42
43
  if (!root.single && !(current instanceof File)) return null;
@@ -155,7 +156,7 @@ const FileUploadItemReplaceTrigger = (t0)=>{
155
156
  $[32] = t10;
156
157
  } else t10 = $[32];
157
158
  let t11;
158
- if ($[33] !== handleReplace || $[34] !== root.accept || $[35] !== root.single) {
159
+ if ($[33] !== handleReplace || $[34] !== inputTestId || $[35] !== root.accept || $[36] !== root.single) {
159
160
  t11 = root.single ? null : /*#__PURE__*/ jsx("input", {
160
161
  ref: inputRef,
161
162
  type: "file",
@@ -164,25 +165,27 @@ const FileUploadItemReplaceTrigger = (t0)=>{
164
165
  tabIndex: -1,
165
166
  "aria-hidden": true,
166
167
  "data-slot": "file-upload-item-replace-input",
168
+ "data-testid": inputTestId,
167
169
  onChange: handleReplace
168
170
  });
169
171
  $[33] = handleReplace;
170
- $[34] = root.accept;
171
- $[35] = root.single;
172
- $[36] = t11;
173
- } else t11 = $[36];
172
+ $[34] = inputTestId;
173
+ $[35] = root.accept;
174
+ $[36] = root.single;
175
+ $[37] = t11;
176
+ } else t11 = $[37];
174
177
  let t12;
175
- if ($[37] !== t10 || $[38] !== t11) {
178
+ if ($[38] !== t10 || $[39] !== t11) {
176
179
  t12 = /*#__PURE__*/ jsxs(Fragment, {
177
180
  children: [
178
181
  t10,
179
182
  t11
180
183
  ]
181
184
  });
182
- $[37] = t10;
183
- $[38] = t11;
184
- $[39] = t12;
185
- } else t12 = $[39];
185
+ $[38] = t10;
186
+ $[39] = t11;
187
+ $[40] = t12;
188
+ } else t12 = $[40];
186
189
  return t12;
187
190
  };
188
191
  FileUploadItemReplaceTrigger.displayName = "FileUploadItemReplaceTrigger";
@@ -149,22 +149,30 @@ const FilterCascadeLevel = (t0)=>{
149
149
  };
150
150
  FilterCascadeLevel.displayName = "FilterCascadeLevel";
151
151
  const LevelLoading = ()=>{
152
- const $ = c(1);
152
+ const $ = c(3);
153
+ const testId = useTestId("level-loading");
153
154
  let t0;
154
155
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
155
- t0 = /*#__PURE__*/ jsx("div", {
156
+ t0 = [
157
+ 64,
158
+ 48,
159
+ 56
160
+ ].map(_temp);
161
+ $[0] = t0;
162
+ } else t0 = $[0];
163
+ let t1;
164
+ if ($[1] !== testId) {
165
+ t1 = /*#__PURE__*/ jsx("div", {
156
166
  "aria-busy": true,
157
167
  "data-slot": "filter-cascade-level-loading",
168
+ "data-testid": testId,
158
169
  className: "flex flex-col gap-1",
159
- children: [
160
- 64,
161
- 48,
162
- 56
163
- ].map(_temp)
170
+ children: t0
164
171
  });
165
- $[0] = t0;
166
- } else t0 = $[0];
167
- return t0;
172
+ $[1] = testId;
173
+ $[2] = t1;
174
+ } else t1 = $[2];
175
+ return t1;
168
176
  };
169
177
  const FilterCascadeItems = (t0)=>{
170
178
  const $ = c(8);
@@ -1,6 +1,7 @@
1
1
  import type { FC, HTMLAttributes } from 'react';
2
+ import { type TestableProps } from '../../utils/testId.js';
2
3
  import type { ExprNode, FieldGroup, FieldMetadata } from './types.js';
3
- export interface FilterInputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange'> {
4
+ export interface FilterInputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange'>, TestableProps {
4
5
  /**
5
6
  * Filter-field configurations driving the autocomplete. A few names are
6
7
  * **reserved** and auto-wired with design-system helpers — DS-supplied