@wallarm-org/design-system 4.14.0 → 4.15.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/AgentAvatar/AgentAvatar.js +71 -54
- package/dist/components/AgentGlyph/AgentGlyph.js +38 -87
- package/dist/components/Avatar/AgentItem.d.ts +33 -0
- package/dist/components/Avatar/AgentItem.js +183 -0
- package/dist/components/Avatar/classes.d.ts +3 -0
- package/dist/components/Avatar/classes.js +16 -1
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +1 -0
- package/dist/components/Chat/ChatTrigger.d.ts +1 -1
- package/dist/components/Chat/ChatTrigger.js +5 -3
- package/dist/components/FilterDropdown/FilterDropdownOption.d.ts +6 -1
- package/dist/components/FilterDropdown/FilterDropdownOption.js +66 -49
- package/dist/components/FilterDropdown/FilterDropdownTrigger.d.ts +6 -0
- package/dist/components/FilterDropdown/FilterDropdownTrigger.js +127 -109
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/FilterInputValueMenu.d.ts +3 -1
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/NestedValueMenuItem.js +12 -10
- package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/ValueMenuItem.js +13 -11
- package/dist/components/FilterInput/types.d.ts +5 -0
- package/dist/components/Select/SelectInput/SelectInputItemRenderer.js +19 -18
- package/dist/components/Select/SelectValueIcon.js +3 -1
- package/dist/components/Select/types.d.ts +6 -1
- package/dist/components/Table/TableBody/TableBodyCell.js +2 -2
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/agent-characters/geom.d.ts +4 -0
- package/dist/lib/agent-characters/geom.js +12 -1
- package/dist/lib/agent-characters/look.d.ts +2 -0
- package/dist/lib/agent-characters/look.js +2 -1
- package/dist/metadata/components.json +198 -8
- package/dist/metadata/guidelines.json +1 -1
- package/dist/utils/isValidSvg.js +1 -1
- package/package.json +1 -1
|
@@ -8,84 +8,101 @@ import { SelectOptionIndicator } from "../Select/SelectOptionIndicator.js";
|
|
|
8
8
|
import { SelectOptionText } from "../Select/SelectOptionText.js";
|
|
9
9
|
import { FilterDropdownAliasContext, useFilterDropdownContext } from "./FilterDropdownContext.js";
|
|
10
10
|
const FilterDropdownOption = (t0)=>{
|
|
11
|
-
const $ = c(
|
|
11
|
+
const $ = c(25);
|
|
12
12
|
let children;
|
|
13
13
|
let hint;
|
|
14
|
+
let icon;
|
|
14
15
|
let item;
|
|
15
16
|
let props;
|
|
16
17
|
let testIdProp;
|
|
17
18
|
if ($[0] !== t0) {
|
|
18
|
-
({ item, hint, children, "data-testid": testIdProp, ...props } = t0);
|
|
19
|
+
({ item, hint, icon, children, "data-testid": testIdProp, ...props } = t0);
|
|
19
20
|
$[0] = t0;
|
|
20
21
|
$[1] = children;
|
|
21
22
|
$[2] = hint;
|
|
22
|
-
$[3] =
|
|
23
|
-
$[4] =
|
|
24
|
-
$[5] =
|
|
23
|
+
$[3] = icon;
|
|
24
|
+
$[4] = item;
|
|
25
|
+
$[5] = props;
|
|
26
|
+
$[6] = testIdProp;
|
|
25
27
|
} else {
|
|
26
28
|
children = $[1];
|
|
27
29
|
hint = $[2];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
icon = $[3];
|
|
31
|
+
item = $[4];
|
|
32
|
+
props = $[5];
|
|
33
|
+
testIdProp = $[6];
|
|
31
34
|
}
|
|
32
35
|
const { collection } = useFilterDropdownContext();
|
|
33
36
|
const alias = useContext(FilterDropdownAliasContext);
|
|
34
37
|
const value = collection.getItemValue(item);
|
|
35
38
|
const isCopy = alias?.source !== void 0 && collection.getItemValue(alias.source) === value;
|
|
36
39
|
const copyTestId = useTestId("selected-option");
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
$[
|
|
43
|
-
$[
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
t4 = /*#__PURE__*/ jsx(SelectOptionText, {
|
|
50
|
-
children: t3
|
|
40
|
+
let t1;
|
|
41
|
+
if ($[7] !== children || $[8] !== collection || $[9] !== item) {
|
|
42
|
+
t1 = children ?? collection.stringifyItem(item);
|
|
43
|
+
$[7] = children;
|
|
44
|
+
$[8] = collection;
|
|
45
|
+
$[9] = item;
|
|
46
|
+
$[10] = t1;
|
|
47
|
+
} else t1 = $[10];
|
|
48
|
+
let t2;
|
|
49
|
+
if ($[11] !== t1) {
|
|
50
|
+
t2 = /*#__PURE__*/ jsx(SelectOptionText, {
|
|
51
|
+
children: t1
|
|
51
52
|
});
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
} else
|
|
53
|
+
$[11] = t1;
|
|
54
|
+
$[12] = t2;
|
|
55
|
+
} else t2 = $[12];
|
|
56
|
+
const text = t2;
|
|
57
|
+
const t3 = isCopy && alias ? alias : item;
|
|
58
|
+
const t4 = testIdProp ?? (isCopy ? copyTestId : void 0);
|
|
55
59
|
let t5;
|
|
56
|
-
if ($[
|
|
57
|
-
t5 = null
|
|
58
|
-
|
|
60
|
+
if ($[13] !== icon || $[14] !== text) {
|
|
61
|
+
t5 = null == icon ? text : /*#__PURE__*/ jsxs("span", {
|
|
62
|
+
className: "flex min-w-0 items-center gap-8",
|
|
63
|
+
children: [
|
|
64
|
+
icon,
|
|
65
|
+
text
|
|
66
|
+
]
|
|
59
67
|
});
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
|
|
68
|
+
$[13] = icon;
|
|
69
|
+
$[14] = text;
|
|
70
|
+
$[15] = t5;
|
|
71
|
+
} else t5 = $[15];
|
|
63
72
|
let t6;
|
|
64
|
-
if ($[
|
|
65
|
-
t6 = /*#__PURE__*/ jsx(
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
if ($[16] !== hint) {
|
|
74
|
+
t6 = null != hint && /*#__PURE__*/ jsx(SelectOptionHint, {
|
|
75
|
+
children: hint
|
|
76
|
+
});
|
|
77
|
+
$[16] = hint;
|
|
78
|
+
$[17] = t6;
|
|
79
|
+
} else t6 = $[17];
|
|
68
80
|
let t7;
|
|
69
|
-
if ($[
|
|
70
|
-
t7 = /*#__PURE__*/
|
|
81
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
82
|
+
t7 = /*#__PURE__*/ jsx(SelectOptionIndicator, {});
|
|
83
|
+
$[18] = t7;
|
|
84
|
+
} else t7 = $[18];
|
|
85
|
+
let t8;
|
|
86
|
+
if ($[19] !== props || $[20] !== t3 || $[21] !== t4 || $[22] !== t5 || $[23] !== t6) {
|
|
87
|
+
t8 = /*#__PURE__*/ jsxs(SelectOption, {
|
|
71
88
|
...props,
|
|
72
|
-
item:
|
|
89
|
+
item: t3,
|
|
73
90
|
"data-slot": "filter-dropdown-option",
|
|
74
|
-
"data-testid":
|
|
91
|
+
"data-testid": t4,
|
|
75
92
|
children: [
|
|
76
|
-
t4,
|
|
77
93
|
t5,
|
|
78
|
-
t6
|
|
94
|
+
t6,
|
|
95
|
+
t7
|
|
79
96
|
]
|
|
80
97
|
});
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
} else
|
|
88
|
-
return
|
|
98
|
+
$[19] = props;
|
|
99
|
+
$[20] = t3;
|
|
100
|
+
$[21] = t4;
|
|
101
|
+
$[22] = t5;
|
|
102
|
+
$[23] = t6;
|
|
103
|
+
$[24] = t8;
|
|
104
|
+
} else t8 = $[24];
|
|
105
|
+
return t8;
|
|
89
106
|
};
|
|
90
107
|
FilterDropdownOption.displayName = "FilterDropdownOption";
|
|
91
108
|
export { FilterDropdownOption };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type FC, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import type { CollectionItem } from '@ark-ui/react/collection';
|
|
2
3
|
import { type TestableProps } from '../../utils/testId.js';
|
|
3
4
|
export interface FilterDropdownTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, TestableProps {
|
|
4
5
|
ref?: Ref<HTMLButtonElement>;
|
|
@@ -7,6 +8,11 @@ export interface FilterDropdownTriggerProps extends Omit<ButtonHTMLAttributes<HT
|
|
|
7
8
|
* derived from the value and is not overridable.
|
|
8
9
|
*/
|
|
9
10
|
children?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Single mode: a leading element for the picked item, such as the agent's 16 px `AgentGlyph`
|
|
13
|
+
* before its name. Not called while unset or in multi mode.
|
|
14
|
+
*/
|
|
15
|
+
renderIcon?: (item: CollectionItem) => ReactNode;
|
|
10
16
|
}
|
|
11
17
|
/**
|
|
12
18
|
* The 36px trigger. Dashed while unset, solid once set; reads «All …» / the value in single mode
|
|
@@ -78,16 +78,17 @@ const Separator = ()=>{
|
|
|
78
78
|
return t0;
|
|
79
79
|
};
|
|
80
80
|
const FilterDropdownTrigger = (t0)=>{
|
|
81
|
-
const $ = c(
|
|
81
|
+
const $ = c(81);
|
|
82
82
|
let ariaLabel;
|
|
83
83
|
let children;
|
|
84
84
|
let className;
|
|
85
85
|
let onKeyDown;
|
|
86
86
|
let props;
|
|
87
87
|
let ref;
|
|
88
|
+
let renderIcon;
|
|
88
89
|
let testIdProp;
|
|
89
90
|
if ($[0] !== t0) {
|
|
90
|
-
({ ref, className, children, onKeyDown, "aria-label": ariaLabel, "data-testid": testIdProp, ...props } = t0);
|
|
91
|
+
({ ref, className, children, renderIcon, onKeyDown, "aria-label": ariaLabel, "data-testid": testIdProp, ...props } = t0);
|
|
91
92
|
$[0] = t0;
|
|
92
93
|
$[1] = ariaLabel;
|
|
93
94
|
$[2] = children;
|
|
@@ -95,7 +96,8 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
95
96
|
$[4] = onKeyDown;
|
|
96
97
|
$[5] = props;
|
|
97
98
|
$[6] = ref;
|
|
98
|
-
$[7] =
|
|
99
|
+
$[7] = renderIcon;
|
|
100
|
+
$[8] = testIdProp;
|
|
99
101
|
} else {
|
|
100
102
|
ariaLabel = $[1];
|
|
101
103
|
children = $[2];
|
|
@@ -103,7 +105,8 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
103
105
|
onKeyDown = $[4];
|
|
104
106
|
props = $[5];
|
|
105
107
|
ref = $[6];
|
|
106
|
-
|
|
108
|
+
renderIcon = $[7];
|
|
109
|
+
testIdProp = $[8];
|
|
107
110
|
}
|
|
108
111
|
const { label, allLabel, multiple, value, collection, clear, triggerRef } = useFilterDropdownContext();
|
|
109
112
|
const controlTestId = useTestId("control");
|
|
@@ -114,51 +117,52 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
114
117
|
let content;
|
|
115
118
|
let customClear;
|
|
116
119
|
let handleKeyDown;
|
|
117
|
-
|
|
120
|
+
let icon;
|
|
121
|
+
if ($[9] !== allLabel || $[10] !== children || $[11] !== clear || $[12] !== clearable || $[13] !== collection || $[14] !== isSet || $[15] !== label || $[16] !== multiple || $[17] !== onKeyDown || $[18] !== renderIcon || $[19] !== value) {
|
|
118
122
|
let t1;
|
|
119
|
-
if ($[
|
|
123
|
+
if ($[25] !== collection) {
|
|
120
124
|
t1 = (v)=>collection.stringify(v) ?? v;
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
} else t1 = $[
|
|
125
|
+
$[25] = collection;
|
|
126
|
+
$[26] = t1;
|
|
127
|
+
} else t1 = $[26];
|
|
124
128
|
const labels = value.map(t1);
|
|
125
129
|
let t2;
|
|
126
|
-
if ($[
|
|
130
|
+
if ($[27] !== children) {
|
|
127
131
|
t2 = Children.toArray(children).find(_temp);
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
} else t2 = $[
|
|
132
|
+
$[27] = children;
|
|
133
|
+
$[28] = t2;
|
|
134
|
+
} else t2 = $[28];
|
|
131
135
|
customClear = t2;
|
|
132
136
|
let t3;
|
|
133
|
-
if ($[
|
|
137
|
+
if ($[29] !== clear || $[30] !== clearable || $[31] !== onKeyDown) {
|
|
134
138
|
t3 = (event)=>{
|
|
135
139
|
onKeyDown?.(event);
|
|
136
140
|
if (event.defaultPrevented || !clearable || !CLEAR_KEYS.has(event.key)) return;
|
|
137
141
|
event.preventDefault();
|
|
138
142
|
clear();
|
|
139
143
|
};
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
} else t3 = $[
|
|
144
|
+
$[29] = clear;
|
|
145
|
+
$[30] = clearable;
|
|
146
|
+
$[31] = onKeyDown;
|
|
147
|
+
$[32] = t3;
|
|
148
|
+
} else t3 = $[32];
|
|
145
149
|
handleKeyDown = t3;
|
|
146
150
|
composedLabel = label;
|
|
147
151
|
if (multiple) if (isSet) if (1 === value.length) {
|
|
148
152
|
let t4;
|
|
149
|
-
if ($[
|
|
153
|
+
if ($[40] !== label) {
|
|
150
154
|
t4 = /*#__PURE__*/ jsx(TruncatedText, {
|
|
151
155
|
text: label,
|
|
152
156
|
emphasis: "name"
|
|
153
157
|
});
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
} else t4 = $[
|
|
158
|
+
$[40] = label;
|
|
159
|
+
$[41] = t4;
|
|
160
|
+
} else t4 = $[41];
|
|
157
161
|
let t5;
|
|
158
|
-
if ($[
|
|
162
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
159
163
|
t5 = /*#__PURE__*/ jsx(Separator, {});
|
|
160
|
-
$[
|
|
161
|
-
} else t5 = $[
|
|
164
|
+
$[42] = t5;
|
|
165
|
+
} else t5 = $[42];
|
|
162
166
|
content = /*#__PURE__*/ jsxs(Fragment, {
|
|
163
167
|
children: [
|
|
164
168
|
t4,
|
|
@@ -173,21 +177,21 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
173
177
|
composedLabel = `${label}, ${labels[0]}`;
|
|
174
178
|
} else {
|
|
175
179
|
let t4;
|
|
176
|
-
if ($[
|
|
180
|
+
if ($[43] !== label) {
|
|
177
181
|
t4 = /*#__PURE__*/ jsx(TruncatedText, {
|
|
178
182
|
text: label,
|
|
179
183
|
emphasis: "name"
|
|
180
184
|
});
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
} else t4 = $[
|
|
185
|
+
$[43] = label;
|
|
186
|
+
$[44] = t4;
|
|
187
|
+
} else t4 = $[44];
|
|
184
188
|
let t5;
|
|
185
|
-
if ($[
|
|
189
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
186
190
|
t5 = /*#__PURE__*/ jsx(Separator, {});
|
|
187
|
-
$[
|
|
188
|
-
} else t5 = $[
|
|
191
|
+
$[45] = t5;
|
|
192
|
+
} else t5 = $[45];
|
|
189
193
|
let t6;
|
|
190
|
-
if ($[
|
|
194
|
+
if ($[46] !== value.length) {
|
|
191
195
|
t6 = /*#__PURE__*/ jsx("span", {
|
|
192
196
|
"aria-hidden": true,
|
|
193
197
|
className: "inline-flex shrink-0",
|
|
@@ -197,11 +201,11 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
197
201
|
children: value.length
|
|
198
202
|
})
|
|
199
203
|
});
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
} else t6 = $[
|
|
204
|
+
$[46] = value.length;
|
|
205
|
+
$[47] = t6;
|
|
206
|
+
} else t6 = $[47];
|
|
203
207
|
let t7;
|
|
204
|
-
if ($[
|
|
208
|
+
if ($[48] !== t4 || $[49] !== t6) {
|
|
205
209
|
t7 = /*#__PURE__*/ jsxs(Fragment, {
|
|
206
210
|
children: [
|
|
207
211
|
t4,
|
|
@@ -209,26 +213,35 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
209
213
|
t6
|
|
210
214
|
]
|
|
211
215
|
});
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
} else t7 = $[
|
|
216
|
+
$[48] = t4;
|
|
217
|
+
$[49] = t6;
|
|
218
|
+
$[50] = t7;
|
|
219
|
+
} else t7 = $[50];
|
|
216
220
|
content = t7;
|
|
217
221
|
composedLabel = `${label}, ${value.length} selected: ${labels.join(", ")}`;
|
|
218
222
|
}
|
|
219
223
|
else {
|
|
220
224
|
let t4;
|
|
221
|
-
if ($[
|
|
225
|
+
if ($[38] !== label) {
|
|
222
226
|
t4 = /*#__PURE__*/ jsx(TruncatedText, {
|
|
223
227
|
text: label,
|
|
224
228
|
emphasis: "name"
|
|
225
229
|
});
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
} else t4 = $[
|
|
230
|
+
$[38] = label;
|
|
231
|
+
$[39] = t4;
|
|
232
|
+
} else t4 = $[39];
|
|
229
233
|
content = t4;
|
|
230
234
|
}
|
|
231
235
|
else {
|
|
236
|
+
if ($[33] !== collection || $[34] !== isSet || $[35] !== renderIcon || $[36] !== value[0]) {
|
|
237
|
+
const item = isSet && renderIcon ? collection.find(value[0]) : null;
|
|
238
|
+
if (item) icon = renderIcon?.(item);
|
|
239
|
+
$[33] = collection;
|
|
240
|
+
$[34] = isSet;
|
|
241
|
+
$[35] = renderIcon;
|
|
242
|
+
$[36] = value[0];
|
|
243
|
+
$[37] = icon;
|
|
244
|
+
} else icon = $[37];
|
|
232
245
|
content = isSet ? /*#__PURE__*/ jsx(TruncatedText, {
|
|
233
246
|
text: labels[0] ?? "",
|
|
234
247
|
emphasis: "value"
|
|
@@ -238,72 +251,75 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
238
251
|
});
|
|
239
252
|
if (isSet) composedLabel = `${label}, ${labels[0]}`;
|
|
240
253
|
}
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
254
|
+
$[9] = allLabel;
|
|
255
|
+
$[10] = children;
|
|
256
|
+
$[11] = clear;
|
|
257
|
+
$[12] = clearable;
|
|
258
|
+
$[13] = collection;
|
|
259
|
+
$[14] = isSet;
|
|
260
|
+
$[15] = label;
|
|
261
|
+
$[16] = multiple;
|
|
262
|
+
$[17] = onKeyDown;
|
|
263
|
+
$[18] = renderIcon;
|
|
264
|
+
$[19] = value;
|
|
265
|
+
$[20] = composedLabel;
|
|
266
|
+
$[21] = content;
|
|
267
|
+
$[22] = customClear;
|
|
268
|
+
$[23] = handleKeyDown;
|
|
269
|
+
$[24] = icon;
|
|
255
270
|
} else {
|
|
256
|
-
composedLabel = $[
|
|
257
|
-
content = $[
|
|
258
|
-
customClear = $[
|
|
259
|
-
handleKeyDown = $[
|
|
271
|
+
composedLabel = $[20];
|
|
272
|
+
content = $[21];
|
|
273
|
+
customClear = $[22];
|
|
274
|
+
handleKeyDown = $[23];
|
|
275
|
+
icon = $[24];
|
|
260
276
|
}
|
|
261
277
|
let t1;
|
|
262
|
-
if ($[
|
|
278
|
+
if ($[51] !== clearable || $[52] !== isSet) {
|
|
263
279
|
t1 = filterDropdownControlVariants({
|
|
264
280
|
applied: isSet,
|
|
265
281
|
clearable
|
|
266
282
|
});
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
} else t1 = $[
|
|
283
|
+
$[51] = clearable;
|
|
284
|
+
$[52] = isSet;
|
|
285
|
+
$[53] = t1;
|
|
286
|
+
} else t1 = $[53];
|
|
271
287
|
let t2;
|
|
272
|
-
if ($[
|
|
288
|
+
if ($[54] !== ref || $[55] !== triggerRef) {
|
|
273
289
|
t2 = mergeRefs(ref, triggerRef);
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
} else t2 = $[
|
|
290
|
+
$[54] = ref;
|
|
291
|
+
$[55] = triggerRef;
|
|
292
|
+
$[56] = t2;
|
|
293
|
+
} else t2 = $[56];
|
|
278
294
|
const t3 = ariaLabel ?? composedLabel;
|
|
279
295
|
let t4;
|
|
280
|
-
if ($[
|
|
296
|
+
if ($[57] !== className || $[58] !== clearable) {
|
|
281
297
|
t4 = cn(filterDropdownTriggerVariants({
|
|
282
298
|
clearable
|
|
283
299
|
}), className);
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
} else t4 = $[
|
|
300
|
+
$[57] = className;
|
|
301
|
+
$[58] = clearable;
|
|
302
|
+
$[59] = t4;
|
|
303
|
+
} else t4 = $[59];
|
|
288
304
|
let t5;
|
|
289
|
-
if ($[
|
|
305
|
+
if ($[60] !== content) {
|
|
290
306
|
t5 = /*#__PURE__*/ jsx("span", {
|
|
291
307
|
className: "flex min-w-0 items-center gap-4 overflow-hidden",
|
|
292
308
|
children: content
|
|
293
309
|
});
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
} else t5 = $[
|
|
310
|
+
$[60] = content;
|
|
311
|
+
$[61] = t5;
|
|
312
|
+
} else t5 = $[61];
|
|
297
313
|
let t6;
|
|
298
|
-
if ($[
|
|
314
|
+
if ($[62] !== clearable) {
|
|
299
315
|
t6 = !clearable && /*#__PURE__*/ jsx(SelectArrow, {
|
|
300
316
|
className: "text-icon-primary"
|
|
301
317
|
});
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
} else t6 = $[
|
|
318
|
+
$[62] = clearable;
|
|
319
|
+
$[63] = t6;
|
|
320
|
+
} else t6 = $[63];
|
|
305
321
|
let t7;
|
|
306
|
-
if ($[
|
|
322
|
+
if ($[64] !== handleKeyDown || $[65] !== icon || $[66] !== props || $[67] !== t2 || $[68] !== t3 || $[69] !== t4 || $[70] !== t5 || $[71] !== t6 || $[72] !== testId) {
|
|
307
323
|
t7 = /*#__PURE__*/ jsxs(Select.Trigger, {
|
|
308
324
|
...props,
|
|
309
325
|
ref: t2,
|
|
@@ -313,28 +329,30 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
313
329
|
onKeyDown: handleKeyDown,
|
|
314
330
|
className: t4,
|
|
315
331
|
children: [
|
|
332
|
+
icon,
|
|
316
333
|
t5,
|
|
317
334
|
t6
|
|
318
335
|
]
|
|
319
336
|
});
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
|
|
337
|
+
$[64] = handleKeyDown;
|
|
338
|
+
$[65] = icon;
|
|
339
|
+
$[66] = props;
|
|
340
|
+
$[67] = t2;
|
|
341
|
+
$[68] = t3;
|
|
342
|
+
$[69] = t4;
|
|
343
|
+
$[70] = t5;
|
|
344
|
+
$[71] = t6;
|
|
345
|
+
$[72] = testId;
|
|
346
|
+
$[73] = t7;
|
|
347
|
+
} else t7 = $[73];
|
|
330
348
|
let t8;
|
|
331
|
-
if ($[
|
|
349
|
+
if ($[74] !== customClear) {
|
|
332
350
|
t8 = customClear ?? /*#__PURE__*/ jsx(FilterDropdownClear, {});
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
} else t8 = $[
|
|
351
|
+
$[74] = customClear;
|
|
352
|
+
$[75] = t8;
|
|
353
|
+
} else t8 = $[75];
|
|
336
354
|
let t9;
|
|
337
|
-
if ($[
|
|
355
|
+
if ($[76] !== controlTestId || $[77] !== t1 || $[78] !== t7 || $[79] !== t8) {
|
|
338
356
|
t9 = /*#__PURE__*/ jsxs(Select.Control, {
|
|
339
357
|
"data-slot": "filter-dropdown-control",
|
|
340
358
|
"data-testid": controlTestId,
|
|
@@ -344,12 +362,12 @@ const FilterDropdownTrigger = (t0)=>{
|
|
|
344
362
|
t8
|
|
345
363
|
]
|
|
346
364
|
});
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
} else t9 = $[
|
|
365
|
+
$[76] = controlTestId;
|
|
366
|
+
$[77] = t1;
|
|
367
|
+
$[78] = t7;
|
|
368
|
+
$[79] = t8;
|
|
369
|
+
$[80] = t9;
|
|
370
|
+
} else t9 = $[80];
|
|
353
371
|
return t9;
|
|
354
372
|
};
|
|
355
373
|
FilterDropdownTrigger.displayName = "FilterDropdownTrigger";
|
package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/FilterInputValueMenu.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FC, RefObject } from 'react';
|
|
1
|
+
import type { FC, ReactNode, RefObject } from 'react';
|
|
2
2
|
import type { BadgeColor } from '../../../Badge/index.js';
|
|
3
3
|
export interface ValueOption {
|
|
4
4
|
/**
|
|
@@ -13,6 +13,8 @@ export interface ValueOption {
|
|
|
13
13
|
};
|
|
14
14
|
/** Muted secondary line rendered beneath the bold `label`. Display-only. */
|
|
15
15
|
description?: string;
|
|
16
|
+
/** Leading element of the row (an agent glyph). Display-only. */
|
|
17
|
+
icon?: ReactNode;
|
|
16
18
|
/**
|
|
17
19
|
* Nested sub-values. When present this option is a group: a section header at
|
|
18
20
|
* the top level, or a submenu trigger when nested. Only leaves are committed.
|
package/dist/components/FilterInput/FilterInputMenu/FilterInputValueMenu/NestedValueMenuItem.js
CHANGED
|
@@ -8,7 +8,7 @@ import { DropdownMenuItem } from "../../../DropdownMenu/index.js";
|
|
|
8
8
|
import { Text } from "../../../Text/index.js";
|
|
9
9
|
import { highlightMatch } from "./highlightMatch.js";
|
|
10
10
|
const NestedValueMenuItem = (t0)=>{
|
|
11
|
-
const $ = c(
|
|
11
|
+
const $ = c(33);
|
|
12
12
|
const { id, option, isGroup, checkedState, isPending, multiSelect, onSelect, onMouseEnter, onMouseLeave, registerRef, expanded, selectAll, highlight } = t0;
|
|
13
13
|
const isChecked = true === checkedState;
|
|
14
14
|
let t1;
|
|
@@ -96,7 +96,7 @@ const NestedValueMenuItem = (t0)=>{
|
|
|
96
96
|
$[20] = t9;
|
|
97
97
|
} else t9 = $[20];
|
|
98
98
|
let t10;
|
|
99
|
-
if ($[21] !== id || $[22] !== onMouseEnter || $[23] !== onMouseLeave || $[24] !== onSelect || $[25] !==
|
|
99
|
+
if ($[21] !== id || $[22] !== onMouseEnter || $[23] !== onMouseLeave || $[24] !== onSelect || $[25] !== option.icon || $[26] !== registerRef || $[27] !== t4 || $[28] !== t5 || $[29] !== t6 || $[30] !== t7 || $[31] !== t9) {
|
|
100
100
|
t10 = /*#__PURE__*/ jsxs(DropdownMenuItem, {
|
|
101
101
|
value: id,
|
|
102
102
|
ref: registerRef,
|
|
@@ -107,6 +107,7 @@ const NestedValueMenuItem = (t0)=>{
|
|
|
107
107
|
"aria-checked": t5,
|
|
108
108
|
...t6,
|
|
109
109
|
children: [
|
|
110
|
+
option.icon,
|
|
110
111
|
t7,
|
|
111
112
|
t9
|
|
112
113
|
]
|
|
@@ -115,14 +116,15 @@ const NestedValueMenuItem = (t0)=>{
|
|
|
115
116
|
$[22] = onMouseEnter;
|
|
116
117
|
$[23] = onMouseLeave;
|
|
117
118
|
$[24] = onSelect;
|
|
118
|
-
$[25] =
|
|
119
|
-
$[26] =
|
|
120
|
-
$[27] =
|
|
121
|
-
$[28] =
|
|
122
|
-
$[29] =
|
|
123
|
-
$[30] =
|
|
124
|
-
$[31] =
|
|
125
|
-
|
|
119
|
+
$[25] = option.icon;
|
|
120
|
+
$[26] = registerRef;
|
|
121
|
+
$[27] = t4;
|
|
122
|
+
$[28] = t5;
|
|
123
|
+
$[29] = t6;
|
|
124
|
+
$[30] = t7;
|
|
125
|
+
$[31] = t9;
|
|
126
|
+
$[32] = t10;
|
|
127
|
+
} else t10 = $[32];
|
|
126
128
|
return t10;
|
|
127
129
|
};
|
|
128
130
|
NestedValueMenuItem.displayName = "NestedValueMenuItem";
|
|
@@ -7,7 +7,7 @@ import { DropdownMenuItem } from "../../../DropdownMenu/index.js";
|
|
|
7
7
|
import { Text } from "../../../Text/index.js";
|
|
8
8
|
import { highlightMatch } from "./highlightMatch.js";
|
|
9
9
|
const ValueMenuItem = (t0)=>{
|
|
10
|
-
const $ = c(
|
|
10
|
+
const $ = c(24);
|
|
11
11
|
const { option, isChecked, isPending, multiSelect, onSelect, registerItem, highlight } = t0;
|
|
12
12
|
const t1 = String(option.value);
|
|
13
13
|
const t2 = String(option.value);
|
|
@@ -76,28 +76,30 @@ const ValueMenuItem = (t0)=>{
|
|
|
76
76
|
$[13] = t7;
|
|
77
77
|
} else t7 = $[13];
|
|
78
78
|
let t8;
|
|
79
|
-
if ($[14] !== onSelect || $[15] !==
|
|
79
|
+
if ($[14] !== onSelect || $[15] !== option.icon || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5 || $[21] !== t6 || $[22] !== t7) {
|
|
80
80
|
t8 = /*#__PURE__*/ jsxs(DropdownMenuItem, {
|
|
81
81
|
value: t2,
|
|
82
82
|
ref: t3,
|
|
83
83
|
onSelect: onSelect,
|
|
84
84
|
className: t4,
|
|
85
85
|
children: [
|
|
86
|
+
option.icon,
|
|
86
87
|
t5,
|
|
87
88
|
t6,
|
|
88
89
|
t7
|
|
89
90
|
]
|
|
90
91
|
}, t1);
|
|
91
92
|
$[14] = onSelect;
|
|
92
|
-
$[15] =
|
|
93
|
-
$[16] =
|
|
94
|
-
$[17] =
|
|
95
|
-
$[18] =
|
|
96
|
-
$[19] =
|
|
97
|
-
$[20] =
|
|
98
|
-
$[21] =
|
|
99
|
-
$[22] =
|
|
100
|
-
|
|
93
|
+
$[15] = option.icon;
|
|
94
|
+
$[16] = t1;
|
|
95
|
+
$[17] = t2;
|
|
96
|
+
$[18] = t3;
|
|
97
|
+
$[19] = t4;
|
|
98
|
+
$[20] = t5;
|
|
99
|
+
$[21] = t6;
|
|
100
|
+
$[22] = t7;
|
|
101
|
+
$[23] = t8;
|
|
102
|
+
} else t8 = $[23];
|
|
101
103
|
return t8;
|
|
102
104
|
};
|
|
103
105
|
ValueMenuItem.displayName = "ValueMenuItem";
|