@launchpad-ui/filter 0.7.56 → 0.7.58
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/index.es.js +218 -294
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +245 -298
- package/dist/index.js.map +1 -1
- package/dist/style.css +2 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import './style.css';
|
2
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
3
2
|
import { Dropdown } from "@launchpad-ui/dropdown";
|
4
3
|
import { Icon } from "@launchpad-ui/icons";
|
5
4
|
import { cx } from "classix";
|
6
|
-
import {
|
5
|
+
import { Children, forwardRef, useId } from "react";
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
7
7
|
import { Button, IconButton } from "@launchpad-ui/button";
|
8
|
-
import { Menu,
|
8
|
+
import { Menu, MenuDivider, MenuItem, MenuSearch } from "@launchpad-ui/menu";
|
9
9
|
import { Tooltip } from "@launchpad-ui/tooltip";
|
10
10
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
11
11
|
const appliedButton = "vLReaG_appliedButton";
|
@@ -20,306 +20,230 @@ const filter = "vLReaG_filter";
|
|
20
20
|
const filterClearButton = "vLReaG_filterClearButton";
|
21
21
|
const isClearable = "vLReaG_isClearable";
|
22
22
|
const name = "vLReaG_name";
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
23
|
+
var Filter_module_default = {
|
24
|
+
appliedButton,
|
25
|
+
appliedDescription,
|
26
|
+
appliedName,
|
27
|
+
button,
|
28
|
+
buttonContainer,
|
29
|
+
clear,
|
30
|
+
clearTooltip,
|
31
|
+
description,
|
32
|
+
filter,
|
33
|
+
filterClearButton,
|
34
|
+
isClearable,
|
35
|
+
name
|
36
36
|
};
|
37
37
|
const AppliedFilterButton = /* @__PURE__ */ forwardRef((props, ref) => {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
38
|
+
const { name: name$1, className, children, onClickFilterButton, "data-test-id": testId = "applied-filter-button" } = props;
|
39
|
+
const hasDescription = Children.count(children) !== 0;
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
41
|
+
"data-test-id": testId,
|
42
|
+
children: /* @__PURE__ */ jsxs("button", {
|
43
|
+
type: "button",
|
44
|
+
"aria-haspopup": true,
|
45
|
+
className: cx(Filter_module_default.appliedButton, className),
|
46
|
+
ref,
|
47
|
+
onClick: onClickFilterButton,
|
48
|
+
children: [
|
49
|
+
name$1 && /* @__PURE__ */ jsxs("span", {
|
50
|
+
className: Filter_module_default.appliedName,
|
51
|
+
"data-test-id": `${testId}-name`,
|
52
|
+
children: [name$1, hasDescription && ":"]
|
53
|
+
}),
|
54
|
+
hasDescription && /* @__PURE__ */ jsx("span", {
|
55
|
+
className: Filter_module_default.appliedDescription,
|
56
|
+
"data-test-id": `${testId}-description`,
|
57
|
+
children
|
58
|
+
}),
|
59
|
+
/* @__PURE__ */ jsx(Icon, {
|
60
|
+
name: "chevron-down",
|
61
|
+
size: "small",
|
62
|
+
"data-test-id": `${testId}-expand`
|
63
|
+
})
|
64
|
+
]
|
65
|
+
})
|
66
|
+
});
|
64
67
|
});
|
65
68
|
AppliedFilterButton.displayName = "AppliedFilterButton";
|
66
|
-
const FilterMenu = ({
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
value: searchValue,
|
107
|
-
id: searchId,
|
108
|
-
placeholder: searchPlaceholder,
|
109
|
-
onChange: onSearchChange,
|
110
|
-
ariaLabel: searchAriaLabel
|
111
|
-
}
|
112
|
-
),
|
113
|
-
filterOptions.map((option, index) => {
|
114
|
-
if (option.isDivider) {
|
115
|
-
return /* @__PURE__ */ jsx(MenuDivider, {}, `divider-${index}`);
|
116
|
-
}
|
117
|
-
return /* @__PURE__ */ jsx(
|
118
|
-
MenuItem,
|
119
|
-
{
|
120
|
-
item: option,
|
121
|
-
disabled: option.isDisabled,
|
122
|
-
icon: option.isChecked ? /* @__PURE__ */ jsx(Icon, { name: "check" }) : void 0,
|
123
|
-
role: "menuitemradio",
|
124
|
-
"aria-checked": option.isChecked ? "true" : void 0,
|
125
|
-
nested: option.nested,
|
126
|
-
groupHeader: option.groupHeader,
|
127
|
-
tooltip: option.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : void 0,
|
128
|
-
tooltipPlacement: "right",
|
129
|
-
children: option.name
|
130
|
-
},
|
131
|
-
option.value
|
132
|
-
);
|
133
|
-
})
|
134
|
-
]
|
135
|
-
}
|
136
|
-
)
|
137
|
-
] });
|
69
|
+
const FilterMenu = ({ options, onClearFilter, enableSearch, searchValue, searchPlaceholder, searchAriaLabel, searchId, onSelect, onSearchChange, isLoading = false, disabledOptionTooltip, enableVirtualization, size, "data-test-id": testId = "filter-menu" }) => {
|
70
|
+
const filterOptions = isLoading ? [{
|
71
|
+
name: "loading...",
|
72
|
+
value: "loading...",
|
73
|
+
isDisabled: true
|
74
|
+
}] : options;
|
75
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [onClearFilter && /* @__PURE__ */ jsx(Button, {
|
76
|
+
tabIndex: 0,
|
77
|
+
className: Filter_module_default.filterClearButton,
|
78
|
+
onClick: onClearFilter,
|
79
|
+
kind: "link",
|
80
|
+
"data-test-id": "clear-filter-button",
|
81
|
+
children: "CLEAR FILTER"
|
82
|
+
}), /* @__PURE__ */ jsxs(Menu, {
|
83
|
+
enableVirtualization,
|
84
|
+
size,
|
85
|
+
"data-test-id": testId,
|
86
|
+
onSelect,
|
87
|
+
children: [enableSearch && /* @__PURE__ */ jsx(MenuSearch, {
|
88
|
+
value: searchValue,
|
89
|
+
id: searchId,
|
90
|
+
placeholder: searchPlaceholder,
|
91
|
+
onChange: onSearchChange,
|
92
|
+
ariaLabel: searchAriaLabel
|
93
|
+
}), filterOptions.map((option, index) => {
|
94
|
+
if (option.isDivider) return /* @__PURE__ */ jsx(MenuDivider, {}, `divider-${index}`);
|
95
|
+
return /* @__PURE__ */ jsx(MenuItem, {
|
96
|
+
item: option,
|
97
|
+
disabled: option.isDisabled,
|
98
|
+
icon: option.isChecked ? /* @__PURE__ */ jsx(Icon, { name: "check" }) : void 0,
|
99
|
+
role: "menuitemradio",
|
100
|
+
"aria-checked": option.isChecked ? "true" : void 0,
|
101
|
+
nested: option.nested,
|
102
|
+
groupHeader: option.groupHeader,
|
103
|
+
tooltip: option.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : void 0,
|
104
|
+
tooltipPlacement: "right",
|
105
|
+
children: option.name
|
106
|
+
}, option.value);
|
107
|
+
})]
|
108
|
+
})] });
|
138
109
|
};
|
139
110
|
const SEARCH_INPUT_THRESHOLD$1 = 4;
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
FilterMenu,
|
170
|
-
{
|
171
|
-
options,
|
172
|
-
searchValue,
|
173
|
-
searchPlaceholder,
|
174
|
-
enableSearch,
|
175
|
-
searchAriaLabel,
|
176
|
-
searchId,
|
177
|
-
onSearchChange,
|
178
|
-
onClearFilter,
|
179
|
-
isLoading
|
180
|
-
}
|
181
|
-
)
|
182
|
-
] });
|
111
|
+
/**
|
112
|
+
* @deprecated use `Menu` from `@launchpad-ui/components` instead
|
113
|
+
*
|
114
|
+
* https://launchpad.launchdarkly.com/?path=/docs/components-collections-menu--docs
|
115
|
+
*/
|
116
|
+
const AppliedFilter = ({ searchValue, onSearchChange, searchPlaceholder, name: name$1, description: description$1, options, className, isEmpty, isLoading, onClickFilterButton, onClearFilter, searchAriaLabel, searchId, "data-test-id": testId = "applied-filter",...props }) => {
|
117
|
+
const enableSearch = onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD$1 || !isEmpty);
|
118
|
+
return /* @__PURE__ */ jsxs(Dropdown, {
|
119
|
+
targetClassName: className,
|
120
|
+
placement: "bottom-start",
|
121
|
+
enableArrow: false,
|
122
|
+
...props,
|
123
|
+
children: [/* @__PURE__ */ jsx(AppliedFilterButton, {
|
124
|
+
"data-test-id": testId,
|
125
|
+
name: name$1,
|
126
|
+
onClickFilterButton,
|
127
|
+
children: description$1
|
128
|
+
}), /* @__PURE__ */ jsx(FilterMenu, {
|
129
|
+
options,
|
130
|
+
searchValue,
|
131
|
+
searchPlaceholder,
|
132
|
+
enableSearch,
|
133
|
+
searchAriaLabel,
|
134
|
+
searchId,
|
135
|
+
onSearchChange,
|
136
|
+
onClearFilter,
|
137
|
+
isLoading
|
138
|
+
})]
|
139
|
+
});
|
183
140
|
};
|
184
141
|
const FilterButton = /* @__PURE__ */ forwardRef((props, ref) => {
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
142
|
+
const { children, name: name$1, hideName, isClearable: isClearable$1, clearTooltip: clearTooltip$1 = "Clear filter", onClear, disabled, isSelected, onClickFilterButton, className, "data-test-id": testId = "filter-button", ariaLabel = "Clear filter",...rest } = props;
|
143
|
+
const nameId = useId();
|
144
|
+
const descriptionId = useId();
|
145
|
+
const hasDescription = Children.count(children) !== 0;
|
146
|
+
const nameElement = /* @__PURE__ */ jsxs("span", {
|
147
|
+
className: Filter_module_default.name,
|
148
|
+
children: [name$1, hasDescription && ":"]
|
149
|
+
});
|
150
|
+
const isDisabled = disabled;
|
151
|
+
const handleClick = (event) => {
|
152
|
+
if (isDisabled) return event.preventDefault();
|
153
|
+
onClickFilterButton?.();
|
154
|
+
};
|
155
|
+
return /* @__PURE__ */ jsxs("div", {
|
156
|
+
className: Filter_module_default.buttonContainer,
|
157
|
+
"data-test-id": testId,
|
158
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
159
|
+
...rest,
|
160
|
+
type: "button",
|
161
|
+
"aria-labelledby": `${nameId} ${hasDescription ? descriptionId : ""}`,
|
162
|
+
"aria-haspopup": true,
|
163
|
+
disabled: isDisabled,
|
164
|
+
"aria-disabled": isDisabled,
|
165
|
+
className: cx(Filter_module_default.button, className, (isClearable$1 || isSelected) && Filter_module_default.isClearable),
|
166
|
+
ref,
|
167
|
+
onClick: handleClick,
|
168
|
+
children: [
|
169
|
+
hideName ? /* @__PURE__ */ jsx(VisuallyHidden, {
|
170
|
+
id: nameId,
|
171
|
+
children: nameElement
|
172
|
+
}) : /* @__PURE__ */ jsx("span", {
|
173
|
+
id: nameId,
|
174
|
+
children: nameElement
|
175
|
+
}),
|
176
|
+
hasDescription && /* @__PURE__ */ jsx("span", {
|
177
|
+
id: descriptionId,
|
178
|
+
className: Filter_module_default.description,
|
179
|
+
children
|
180
|
+
}),
|
181
|
+
!isClearable$1 && /* @__PURE__ */ jsx(Icon, {
|
182
|
+
name: "chevron-down",
|
183
|
+
size: "small"
|
184
|
+
})
|
185
|
+
]
|
186
|
+
}), isClearable$1 && /* @__PURE__ */ jsx(Tooltip, {
|
187
|
+
targetClassName: Filter_module_default.clearTooltip,
|
188
|
+
content: clearTooltip$1,
|
189
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
190
|
+
"aria-label": ariaLabel,
|
191
|
+
className: Filter_module_default.clear,
|
192
|
+
"data-test-id": "clear-filter-button",
|
193
|
+
icon: /* @__PURE__ */ jsx(Icon, {
|
194
|
+
name: "cancel",
|
195
|
+
size: "small"
|
196
|
+
}),
|
197
|
+
size: "small",
|
198
|
+
onClick: onClear
|
199
|
+
})
|
200
|
+
})]
|
201
|
+
});
|
244
202
|
});
|
245
203
|
FilterButton.displayName = "FilterButton";
|
246
204
|
const SEARCH_INPUT_THRESHOLD = 4;
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
{
|
289
|
-
isClearable: isClearable2,
|
290
|
-
onClear: handleClear,
|
291
|
-
name: name2,
|
292
|
-
hideName,
|
293
|
-
disabled,
|
294
|
-
isSelected,
|
295
|
-
onClickFilterButton,
|
296
|
-
ariaLabel: clearAriaLabel,
|
297
|
-
children: description2
|
298
|
-
}
|
299
|
-
),
|
300
|
-
/* @__PURE__ */ jsx(
|
301
|
-
FilterMenu,
|
302
|
-
{
|
303
|
-
options,
|
304
|
-
searchId,
|
305
|
-
searchValue,
|
306
|
-
searchPlaceholder,
|
307
|
-
searchAriaLabel,
|
308
|
-
enableSearch,
|
309
|
-
onSearchChange,
|
310
|
-
isLoading,
|
311
|
-
disabledOptionTooltip,
|
312
|
-
size,
|
313
|
-
enableVirtualization
|
314
|
-
}
|
315
|
-
)
|
316
|
-
]
|
317
|
-
}
|
318
|
-
);
|
205
|
+
/**
|
206
|
+
* @deprecated use `Menu` from `@launchpad-ui/components` instead
|
207
|
+
*
|
208
|
+
* https://launchpad.launchdarkly.com/?path=/docs/components-collections-menu--docs
|
209
|
+
*/
|
210
|
+
const Filter = ({ searchValue, onSearchChange, searchPlaceholder, searchAriaLabel, name: name$1, hideName, description: description$1, options, isClearable: isClearable$1, onClear, isSelected, className, isEmpty, searchId, isLoading, onClickFilterButton, disabledOptionTooltip, "data-test-id": testId = "filter", size, disabled, enableVirtualization, clearAriaLabel,...props }) => {
|
211
|
+
const enableSearch = onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);
|
212
|
+
const dropdownClasses = cx(Filter_module_default.filter, className);
|
213
|
+
const handleClear = (event) => {
|
214
|
+
event.preventDefault();
|
215
|
+
onClear?.();
|
216
|
+
};
|
217
|
+
return /* @__PURE__ */ jsxs(Dropdown, {
|
218
|
+
targetTestId: testId,
|
219
|
+
disabled,
|
220
|
+
targetClassName: dropdownClasses,
|
221
|
+
...props,
|
222
|
+
children: [/* @__PURE__ */ jsx(FilterButton, {
|
223
|
+
isClearable: isClearable$1,
|
224
|
+
onClear: handleClear,
|
225
|
+
name: name$1,
|
226
|
+
hideName,
|
227
|
+
disabled,
|
228
|
+
isSelected,
|
229
|
+
onClickFilterButton,
|
230
|
+
ariaLabel: clearAriaLabel,
|
231
|
+
children: description$1
|
232
|
+
}), /* @__PURE__ */ jsx(FilterMenu, {
|
233
|
+
options,
|
234
|
+
searchId,
|
235
|
+
searchValue,
|
236
|
+
searchPlaceholder,
|
237
|
+
searchAriaLabel,
|
238
|
+
enableSearch,
|
239
|
+
onSearchChange,
|
240
|
+
isLoading,
|
241
|
+
disabledOptionTooltip,
|
242
|
+
size,
|
243
|
+
enableVirtualization
|
244
|
+
})]
|
245
|
+
});
|
319
246
|
};
|
320
|
-
export {
|
321
|
-
|
322
|
-
|
323
|
-
FilterButton
|
324
|
-
};
|
325
|
-
//# sourceMappingURL=index.es.js.map
|
247
|
+
export { AppliedFilter, Filter, FilterButton };
|
248
|
+
|
249
|
+
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/AppliedFilterButton.tsx","../src/FilterMenu.tsx","../src/AppliedFilter.tsx","../src/FilterButton.tsx","../src/Filter.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\nimport { Children, forwardRef } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype AppliedFilterButtonProps = {\n\tname?: ReactNode;\n\tclassName?: string;\n\tchildren: ReactNode;\n\tonClickFilterButton?(): void;\n\t'data-test-id'?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst AppliedFilterButton = forwardRef<Ref, AppliedFilterButtonProps>((props, ref) => {\n\tconst {\n\t\tname,\n\t\tclassName,\n\t\tchildren,\n\t\tonClickFilterButton,\n\t\t'data-test-id': testId = 'applied-filter-button',\n\t} = props;\n\n\tconst hasDescription = Children.count(children) !== 0;\n\n\treturn (\n\t\t<div data-test-id={testId}>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-haspopup\n\t\t\t\tclassName={cx(styles.appliedButton, className)}\n\t\t\t\tref={ref}\n\t\t\t\tonClick={onClickFilterButton}\n\t\t\t>\n\t\t\t\t{name && (\n\t\t\t\t\t<span className={styles.appliedName} data-test-id={`${testId}-name`}>\n\t\t\t\t\t\t{name}\n\t\t\t\t\t\t{hasDescription && ':'}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t{hasDescription && (\n\t\t\t\t\t<span className={styles.appliedDescription} data-test-id={`${testId}-description`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<Icon name=\"chevron-down\" size=\"small\" data-test-id={`${testId}-expand`} />\n\t\t\t</button>\n\t\t</div>\n\t);\n});\n\nAppliedFilterButton.displayName = 'AppliedFilterButton';\n\nexport type { AppliedFilterButtonProps };\nexport { AppliedFilterButton };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Button } from '@launchpad-ui/button';\nimport { Icon } from '@launchpad-ui/icons';\nimport { Menu, MenuDivider, MenuItem, MenuSearch } from '@launchpad-ui/menu';\n\nimport styles from './styles/Filter.module.css';\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\ntype FilterOption<T = any> = {\n\tname?: ReactNode;\n\tisDisabled?: boolean;\n\tisDivider?: boolean;\n\tisChecked?: boolean;\n\tvalue: T | null;\n\tprojKey?: string;\n\tnested?: boolean;\n\tgroupHeader?: boolean;\n};\n\ntype FilterMenuProps = Pick<MenuProps<string>, 'enableVirtualization' | 'size' | 'data-test-id'> & {\n\toptions: FilterOption[];\n\tonClearFilter?(): void;\n\tenableSearch?: boolean;\n\tsearchValue?: string;\n\tsearchId?: string;\n\tsearchPlaceholder?: string;\n\tsearchAriaLabel?: string;\n\tonSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n\tonSelect?(): void;\n\tisLoading?: boolean;\n\tdisabledOptionTooltip?: string;\n};\n\nconst FilterMenu = ({\n\toptions,\n\tonClearFilter,\n\tenableSearch,\n\tsearchValue,\n\tsearchPlaceholder,\n\tsearchAriaLabel,\n\tsearchId,\n\tonSelect,\n\tonSearchChange,\n\tisLoading = false,\n\tdisabledOptionTooltip,\n\tenableVirtualization,\n\tsize,\n\t'data-test-id': testId = 'filter-menu',\n}: FilterMenuProps) => {\n\tconst filterOptions = isLoading\n\t\t? [{ name: 'loading...', value: 'loading...', isDisabled: true }]\n\t\t: options;\n\n\treturn (\n\t\t<>\n\t\t\t{onClearFilter && (\n\t\t\t\t<Button\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tclassName={styles.filterClearButton}\n\t\t\t\t\tonClick={onClearFilter}\n\t\t\t\t\tkind=\"link\"\n\t\t\t\t\tdata-test-id=\"clear-filter-button\"\n\t\t\t\t>\n\t\t\t\t\tCLEAR FILTER\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<Menu\n\t\t\t\tenableVirtualization={enableVirtualization}\n\t\t\t\tsize={size}\n\t\t\t\tdata-test-id={testId}\n\t\t\t\tonSelect={onSelect}\n\t\t\t>\n\t\t\t\t{enableSearch && (\n\t\t\t\t\t<MenuSearch\n\t\t\t\t\t\tvalue={searchValue}\n\t\t\t\t\t\tid={searchId}\n\t\t\t\t\t\tplaceholder={searchPlaceholder}\n\t\t\t\t\t\tonChange={onSearchChange}\n\t\t\t\t\t\tariaLabel={searchAriaLabel}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{filterOptions.map((option, index) => {\n\t\t\t\t\tif (option.isDivider) {\n\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>\n\t\t\t\t\t\treturn <MenuDivider key={`divider-${index}`} />;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\titem={option}\n\t\t\t\t\t\t\tdisabled={option.isDisabled}\n\t\t\t\t\t\t\ticon={option.isChecked ? <Icon name=\"check\" /> : undefined}\n\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\taria-checked={option.isChecked ? 'true' : undefined}\n\t\t\t\t\t\t\tnested={option.nested}\n\t\t\t\t\t\t\tgroupHeader={option.groupHeader}\n\t\t\t\t\t\t\ttooltip={\n\t\t\t\t\t\t\t\toption.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttooltipPlacement=\"right\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{option.name}\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Menu>\n\t\t</>\n\t);\n};\n\nexport { FilterMenu };\nexport type { FilterOption, FilterMenuProps };\n","import type { ChangeEvent, ReactNode } from 'react';\nimport type { FilterOption } from './FilterMenu';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\n\nimport { AppliedFilterButton } from './AppliedFilterButton';\nimport { FilterMenu } from './FilterMenu';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype AppliedFilterProps = {\n\tsearchValue?: string;\n\tonSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n\tonClearFilter?(): void;\n\tsearchPlaceholder?: string;\n\tname?: ReactNode;\n\tdescription: ReactNode;\n\toptions: FilterOption[];\n\tclassName?: string;\n\tonStateChange?({ isOpen }: { isOpen?: boolean }): void;\n\tonSelect?(item: FilterOption): void;\n\tisEmpty?: boolean;\n\tisLoading?: boolean;\n\tonClickFilterButton?(): void;\n\tsearchAriaLabel?: string;\n\tsearchId?: string;\n\t'data-test-id'?: string;\n};\n\n/**\n * @deprecated use `Menu` from `@launchpad-ui/components` instead\n *\n * https://launchpad.launchdarkly.com/?path=/docs/components-collections-menu--docs\n */\nconst AppliedFilter = ({\n\tsearchValue,\n\tonSearchChange,\n\tsearchPlaceholder,\n\tname,\n\tdescription,\n\toptions,\n\tclassName,\n\tisEmpty,\n\tisLoading,\n\tonClickFilterButton,\n\tonClearFilter,\n\tsearchAriaLabel,\n\tsearchId,\n\t'data-test-id': testId = 'applied-filter',\n\t...props\n}: AppliedFilterProps) => {\n\tconst enableSearch =\n\t\tonSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n\treturn (\n\t\t<Dropdown targetClassName={className} placement=\"bottom-start\" enableArrow={false} {...props}>\n\t\t\t<AppliedFilterButton\n\t\t\t\tdata-test-id={testId}\n\t\t\t\tname={name}\n\t\t\t\tonClickFilterButton={onClickFilterButton}\n\t\t\t>\n\t\t\t\t{description}\n\t\t\t</AppliedFilterButton>\n\t\t\t<FilterMenu\n\t\t\t\toptions={options}\n\t\t\t\tsearchValue={searchValue}\n\t\t\t\tsearchPlaceholder={searchPlaceholder}\n\t\t\t\tenableSearch={enableSearch}\n\t\t\t\tsearchAriaLabel={searchAriaLabel}\n\t\t\t\tsearchId={searchId}\n\t\t\t\tonSearchChange={onSearchChange}\n\t\t\t\tonClearFilter={onClearFilter}\n\t\t\t\tisLoading={isLoading}\n\t\t\t/>\n\t\t</Dropdown>\n\t);\n};\n\nexport type { AppliedFilterProps };\nexport { AppliedFilter };\n","import type { JSX, MouseEvent, ReactNode, SyntheticEvent } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Icon } from '@launchpad-ui/icons';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { cx } from 'classix';\nimport { Children, forwardRef, useId } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype FilterButtonProps = {\n\tname: ReactNode;\n\thideName?: boolean;\n\tisClearable?: boolean;\n\tonClear?(event: SyntheticEvent): void;\n\tclassName?: string;\n\tisSelected?: boolean;\n\tclearTooltip?: string | JSX.Element;\n\tchildren?: ReactNode;\n\tdisabled?: boolean;\n\tonClickFilterButton?(): void;\n\t'data-test-id'?: string;\n\tariaLabel?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst FilterButton = forwardRef<Ref, FilterButtonProps>((props, ref) => {\n\tconst {\n\t\tchildren,\n\t\tname,\n\t\thideName,\n\t\tisClearable,\n\t\tclearTooltip = 'Clear filter',\n\t\tonClear,\n\t\tdisabled,\n\t\tisSelected,\n\t\tonClickFilterButton,\n\t\tclassName,\n\t\t'data-test-id': testId = 'filter-button',\n\t\tariaLabel = 'Clear filter',\n\t\t...rest\n\t} = props;\n\tconst nameId = useId();\n\tconst descriptionId = useId();\n\n\tconst hasDescription = Children.count(children) !== 0;\n\n\tconst nameElement = (\n\t\t<span className={styles.name}>\n\t\t\t{name}\n\t\t\t{hasDescription && ':'}\n\t\t</span>\n\t);\n\n\tconst isDisabled = disabled;\n\n\tconst handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n\t\tif (isDisabled) return event.preventDefault();\n\t\tonClickFilterButton?.();\n\t};\n\n\treturn (\n\t\t<div className={styles.buttonContainer} data-test-id={testId}>\n\t\t\t<button\n\t\t\t\t{...rest}\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-labelledby={`${nameId} ${hasDescription ? descriptionId : ''}`}\n\t\t\t\taria-haspopup\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\taria-disabled={isDisabled}\n\t\t\t\tclassName={cx(styles.button, className, (isClearable || isSelected) && styles.isClearable)}\n\t\t\t\tref={ref}\n\t\t\t\tonClick={handleClick}\n\t\t\t>\n\t\t\t\t{hideName ? (\n\t\t\t\t\t<VisuallyHidden id={nameId}>{nameElement}</VisuallyHidden>\n\t\t\t\t) : (\n\t\t\t\t\t<span id={nameId}>{nameElement}</span>\n\t\t\t\t)}\n\t\t\t\t{hasDescription && (\n\t\t\t\t\t<span id={descriptionId} className={styles.description}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t{!isClearable && <Icon name=\"chevron-down\" size=\"small\" />}\n\t\t\t</button>\n\t\t\t{isClearable && (\n\t\t\t\t<Tooltip targetClassName={styles.clearTooltip} content={clearTooltip}>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\t\tclassName={styles.clear}\n\t\t\t\t\t\tdata-test-id=\"clear-filter-button\"\n\t\t\t\t\t\ticon={<Icon name=\"cancel\" size=\"small\" />}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tonClick={onClear}\n\t\t\t\t\t/>\n\t\t\t\t</Tooltip>\n\t\t\t)}\n\t\t</div>\n\t);\n});\n\nFilterButton.displayName = 'FilterButton';\n\nexport { FilterButton };\nexport type { FilterButtonProps };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode, SyntheticEvent } from 'react';\nimport type { FilterOption } from './FilterMenu';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\nimport { cx } from 'classix';\n\nimport { FilterButton } from './FilterButton';\nimport { FilterMenu } from './FilterMenu';\nimport styles from './styles/Filter.module.css';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype FilterProps = Pick<MenuProps<string>, 'size' | 'enableVirtualization'> & {\n\tsearchValue?: string;\n\tonSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n\tsearchPlaceholder?: string;\n\tsearchAriaLabel?: string;\n\tname: ReactNode;\n\thideName?: boolean;\n\tdescription: ReactNode;\n\toptions: FilterOption[];\n\tisClearable?: boolean;\n\tonClear?(): void;\n\tclassName?: string;\n\tonStateChange?({ isOpen }: { isOpen?: boolean }): void;\n\tisSelected?: boolean;\n\tsearchId?: string;\n\tonSelect?(item: FilterOption): void;\n\tisEmpty?: boolean;\n\tisLoading?: boolean;\n\tdisabled?: boolean;\n\tonClickFilterButton?(): void;\n\tdisabledOptionTooltip?: string;\n\t'data-test-id'?: string;\n\ttriggerTestId?: string;\n\tclearAriaLabel?: string;\n};\n\n/**\n * @deprecated use `Menu` from `@launchpad-ui/components` instead\n *\n * https://launchpad.launchdarkly.com/?path=/docs/components-collections-menu--docs\n */\nconst Filter = ({\n\tsearchValue,\n\tonSearchChange,\n\tsearchPlaceholder,\n\tsearchAriaLabel,\n\tname,\n\thideName,\n\tdescription,\n\toptions,\n\tisClearable,\n\tonClear,\n\tisSelected,\n\tclassName,\n\tisEmpty,\n\tsearchId,\n\tisLoading,\n\tonClickFilterButton,\n\tdisabledOptionTooltip,\n\t'data-test-id': testId = 'filter',\n\tsize,\n\tdisabled,\n\tenableVirtualization,\n\tclearAriaLabel,\n\t...props\n}: FilterProps) => {\n\tconst enableSearch =\n\t\tonSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n\tconst dropdownClasses = cx(styles.filter, className);\n\n\tconst handleClear = (event: SyntheticEvent) => {\n\t\tevent.preventDefault();\n\t\tonClear?.();\n\t};\n\n\treturn (\n\t\t<Dropdown\n\t\t\ttargetTestId={testId}\n\t\t\tdisabled={disabled}\n\t\t\ttargetClassName={dropdownClasses}\n\t\t\t{...props}\n\t\t>\n\t\t\t<FilterButton\n\t\t\t\tisClearable={isClearable}\n\t\t\t\tonClear={handleClear}\n\t\t\t\tname={name}\n\t\t\t\thideName={hideName}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\tonClickFilterButton={onClickFilterButton}\n\t\t\t\tariaLabel={clearAriaLabel}\n\t\t\t>\n\t\t\t\t{description}\n\t\t\t</FilterButton>\n\t\t\t<FilterMenu\n\t\t\t\toptions={options}\n\t\t\t\tsearchId={searchId}\n\t\t\t\tsearchValue={searchValue}\n\t\t\t\tsearchPlaceholder={searchPlaceholder}\n\t\t\t\tsearchAriaLabel={searchAriaLabel}\n\t\t\t\tenableSearch={enableSearch}\n\t\t\t\tonSearchChange={onSearchChange}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tdisabledOptionTooltip={disabledOptionTooltip}\n\t\t\t\tsize={size}\n\t\t\t\tenableVirtualization={enableVirtualization}\n\t\t\t/>\n\t\t</Dropdown>\n\t);\n};\n\nexport { Filter };\nexport type { FilterProps };\n"],"names":["name","SEARCH_INPUT_THRESHOLD","description","isClearable","clearTooltip"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAM,sBAAsB,2BAA0C,CAAC,OAAO,QAAQ;AAC/E,QAAA;AAAA,IACL,MAAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,SAAS;AAAA,EAAA,IACtB;AAEJ,QAAM,iBAAiB,SAAS,MAAM,QAAQ,MAAM;AAGnD,SAAA,oBAAC,OAAI,EAAA,gBAAc,QAClB,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,MAAK;AAAA,MACL,iBAAa;AAAA,MACb,WAAW,GAAG,OAAO,eAAe,SAAS;AAAA,MAC7C;AAAA,MACA,SAAS;AAAA,MAER,UAAA;AAAA,QACAA,SAAA,qBAAC,UAAK,WAAW,OAAO,aAAa,gBAAc,GAAG,MAAM,SAC1D,UAAA;AAAA,UAAAA;AAAA,UACA,kBAAkB;AAAA,QAAA,GACpB;AAAA,QAEA,kBACC,oBAAA,QAAA,EAAK,WAAW,OAAO,oBAAoB,gBAAc,GAAG,MAAM,gBACjE,SACF,CAAA;AAAA,QAED,oBAAC,QAAK,MAAK,gBAAe,MAAK,SAAQ,gBAAc,GAAG,MAAM,UAAW,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE3E;AAEF,CAAC;AAED,oBAAoB,cAAc;ACpBlC,MAAM,aAAa,CAAC;AAAA,EACnB;AAA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AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAAJ;AAAA,EACA;AAAA,EACA,aAAAE;AAAA,EACA;AAAA,EACA,aAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB,SAAS;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,MAAmB;AACZ,QAAA,eACL,mBAAmB,CAAC,CAAC,eAAe,QAAQ,SAAS,0BAA0B,CAAC;AAEjF,QAAM,kBAAkB,GAAG,OAAO,QAAQ,SAAS;AAE7C,QAAA,cAAc,CAAC,UAA0B;AAC9C,UAAM,eAAe;AACX;AAAA,EACX;AAGC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAc;AAAA,MACd;AAAA,MACA,iBAAiB;AAAA,MAChB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,aAAAA;AAAA,YACA,SAAS;AAAA,YACT,MAAAH;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,WAAW;AAAA,YAEV,UAAAE;AAAA,UAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,QAAA;AAAA,MACD;AAAA,IAAA;AAAA,EACD;AAEF;"}
|
1
|
+
{"version":3,"file":"index.es.js","names":["event: MouseEvent<HTMLButtonElement>","event: SyntheticEvent"],"sources":["../src/styles/Filter.module.css","../src/AppliedFilterButton.tsx","../src/FilterMenu.tsx","../src/AppliedFilter.tsx","../src/FilterButton.tsx","../src/Filter.tsx"],"sourcesContent":[":root,\n[data-theme='default'] {\n\t--lp-component-filter-color-bg-clearable: rgb(0 0 0 / 0.15);\n\t--lp-component-filter-color-bg-clearable-focus: rgb(0 0 0 / 0.2);\n\t--lp-component-filter-color-border-clearable-focus: var(--lp-color-gray-800);\n}\n\n[data-theme='dark'] {\n\t--lp-component-filter-color-bg-clearable: rgb(248 248 248 / 0.15);\n\t--lp-component-filter-color-bg-clearable-focus: rgb(248 248 248 / 0.2);\n\t--lp-component-filter-color-border-clearable-focus: var(--lp-color-gray-500);\n}\n\n.filter {\n\tfont-family: var(--lp-font-family-base);\n}\n\n.buttonContainer {\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tposition: relative;\n}\n\n.button {\n\tborder-radius: var(--lp-border-radius-medium);\n\tpadding-top: 0;\n\tpadding-bottom: 0;\n\tline-height: 2rem;\n\tdisplay: flex;\n\talign-items: center;\n\tmargin: 0;\n\tcolor: var(--lp-color-text-ui-primary-base);\n\tbackground-color: var(--lp-color-bg-interactive-secondary-base);\n}\n\n.appliedButton {\n\tcolor: var(--lp-color-text-ui-primary-base);\n\theight: 1.25rem;\n\tbackground-color: var(--lp-color-bg-interactive-secondary-hover);\n\tpadding: 0.125rem 0.375rem;\n\tborder-radius: 0.125rem;\n\tdisplay: flex;\n}\n\n.button,\n.appliedButton {\n\tfont-family: inherit;\n\tfont-size: 0.8125rem;\n\tcursor: pointer;\n\tborder-width: var(--lp-border-width-200);\n\tborder-style: solid;\n\tborder-color: transparent;\n\n\t&:hover {\n\t\tbackground-color: var(--lp-color-bg-interactive-secondary-hover);\n\t\tborder-color: var(--lp-color-border-interactive-secondary-hover);\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\tborder-color: var(--lp-color-border-interactive-secondary-focus);\n\t\tbox-shadow: 0 0 0 2px var(--lp-color-bg-ui-primary), 0 0 0 4px\n\t\t\tvar(--lp-color-shadow-interactive-focus);\n\t}\n}\n\n.name {\n\tmargin-right: 0.3125rem;\n\tfont-weight: var(--lp-font-weight-medium);\n}\n\n.appliedName {\n\tmargin-right: 0.1875rem;\n}\n\n.description {\n\tcolor: var(--lp-color-text-ui-primary-base);\n\tfont-weight: var(--lp-font-weight-medium);\n}\n\n.description,\n.appliedDescription {\n\tmargin-right: 0.3125rem;\n\tmax-width: 10rem;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.clear {\n\tcursor: pointer;\n\tpadding: 0.1875rem;\n}\n\n.button.isClearable {\n\tpadding-right: 1.9375rem;\n\tbackground-color: var(--lp-component-filter-color-bg-clearable);\n\n\t&:focus,\n\t&:hover,\n\t&:active {\n\t\tbackground-color: var(--lp-component-filter-color-bg-clearable-focus);\n\t\tborder-color: var(--lp-component-filter-color-border-clearable-focus);\n\t}\n}\n\n.button:hover:not(.isClearable),\n.button:focus:not(.isClearable),\n[data-state='open'] .button:not(.isClearable) {\n\tbackground-color: var(--lp-color-bg-interactive-secondary-hover);\n\tborder-color: var(--lp-color-border-interactive-secondary-hover);\n}\n\n.button:focus:not(:focus-visible):not(.isClearable) {\n\t&:hover {\n\t\tbackground-color: var(--lp-color-bg-interactive-secondary-hover);\n\t}\n}\n\n.clearTooltip {\n\tline-height: 1;\n\tposition: absolute;\n\tright: 0.4375rem;\n}\n\n.filterClearButton {\n\ttext-decoration: none;\n\tcolor: var(--lp-color-text-interactive-destructive);\n\tfont-size: 0.8125rem;\n\tfont-weight: var(--lp-font-weight-medium);\n\tpadding: 0.625rem;\n\twidth: 100%;\n\tborder-bottom: 1px solid var(--lp-color-border-interactive-secondary-base);\n}\n\n.filterClearButton:active,\n.filterClearButton:focus,\n.filterClearButton:hover {\n\toutline: none;\n\tbox-shadow: unset;\n\tcolor: var(--lp-color-text-interactive-destructive);\n}\n\n.filterClearButton:active {\n\tborder-bottom-color: var(--lp-color-border-interactive-secondary-active);\n\tbackground-color: var(--lp-color-bg-interactive-secondary-active);\n}\n\n.filterClearButton:focus {\n\tborder-bottom-color: var(--lp-color-border-interactive-secondary-focus);\n\tbackground-color: var(--lp-color-bg-interactive-secondary-focus);\n}\n\n.filterClearButton:hover {\n\tborder-bottom-color: var(--lp-color-border-interactive-secondary-hover);\n\tbackground-color: var(--lp-color-bg-interactive-secondary-hover);\n}\n","import type { ReactNode } from 'react';\n\nimport { Icon } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\nimport { Children, forwardRef } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype AppliedFilterButtonProps = {\n\tname?: ReactNode;\n\tclassName?: string;\n\tchildren: ReactNode;\n\tonClickFilterButton?(): void;\n\t'data-test-id'?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst AppliedFilterButton = forwardRef<Ref, AppliedFilterButtonProps>((props, ref) => {\n\tconst {\n\t\tname,\n\t\tclassName,\n\t\tchildren,\n\t\tonClickFilterButton,\n\t\t'data-test-id': testId = 'applied-filter-button',\n\t} = props;\n\n\tconst hasDescription = Children.count(children) !== 0;\n\n\treturn (\n\t\t<div data-test-id={testId}>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-haspopup\n\t\t\t\tclassName={cx(styles.appliedButton, className)}\n\t\t\t\tref={ref}\n\t\t\t\tonClick={onClickFilterButton}\n\t\t\t>\n\t\t\t\t{name && (\n\t\t\t\t\t<span className={styles.appliedName} data-test-id={`${testId}-name`}>\n\t\t\t\t\t\t{name}\n\t\t\t\t\t\t{hasDescription && ':'}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t{hasDescription && (\n\t\t\t\t\t<span className={styles.appliedDescription} data-test-id={`${testId}-description`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<Icon name=\"chevron-down\" size=\"small\" data-test-id={`${testId}-expand`} />\n\t\t\t</button>\n\t\t</div>\n\t);\n});\n\nAppliedFilterButton.displayName = 'AppliedFilterButton';\n\nexport type { AppliedFilterButtonProps };\nexport { AppliedFilterButton };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Button } from '@launchpad-ui/button';\nimport { Icon } from '@launchpad-ui/icons';\nimport { Menu, MenuDivider, MenuItem, MenuSearch } from '@launchpad-ui/menu';\n\nimport styles from './styles/Filter.module.css';\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\ntype FilterOption<T = any> = {\n\tname?: ReactNode;\n\tisDisabled?: boolean;\n\tisDivider?: boolean;\n\tisChecked?: boolean;\n\tvalue: T | null;\n\tprojKey?: string;\n\tnested?: boolean;\n\tgroupHeader?: boolean;\n};\n\ntype FilterMenuProps = Pick<MenuProps<string>, 'enableVirtualization' | 'size' | 'data-test-id'> & {\n\toptions: FilterOption[];\n\tonClearFilter?(): void;\n\tenableSearch?: boolean;\n\tsearchValue?: string;\n\tsearchId?: string;\n\tsearchPlaceholder?: string;\n\tsearchAriaLabel?: string;\n\tonSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n\tonSelect?(): void;\n\tisLoading?: boolean;\n\tdisabledOptionTooltip?: string;\n};\n\nconst FilterMenu = ({\n\toptions,\n\tonClearFilter,\n\tenableSearch,\n\tsearchValue,\n\tsearchPlaceholder,\n\tsearchAriaLabel,\n\tsearchId,\n\tonSelect,\n\tonSearchChange,\n\tisLoading = false,\n\tdisabledOptionTooltip,\n\tenableVirtualization,\n\tsize,\n\t'data-test-id': testId = 'filter-menu',\n}: FilterMenuProps) => {\n\tconst filterOptions = isLoading\n\t\t? [{ name: 'loading...', value: 'loading...', isDisabled: true }]\n\t\t: options;\n\n\treturn (\n\t\t<>\n\t\t\t{onClearFilter && (\n\t\t\t\t<Button\n\t\t\t\t\ttabIndex={0}\n\t\t\t\t\tclassName={styles.filterClearButton}\n\t\t\t\t\tonClick={onClearFilter}\n\t\t\t\t\tkind=\"link\"\n\t\t\t\t\tdata-test-id=\"clear-filter-button\"\n\t\t\t\t>\n\t\t\t\t\tCLEAR FILTER\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<Menu\n\t\t\t\tenableVirtualization={enableVirtualization}\n\t\t\t\tsize={size}\n\t\t\t\tdata-test-id={testId}\n\t\t\t\tonSelect={onSelect}\n\t\t\t>\n\t\t\t\t{enableSearch && (\n\t\t\t\t\t<MenuSearch\n\t\t\t\t\t\tvalue={searchValue}\n\t\t\t\t\t\tid={searchId}\n\t\t\t\t\t\tplaceholder={searchPlaceholder}\n\t\t\t\t\t\tonChange={onSearchChange}\n\t\t\t\t\t\tariaLabel={searchAriaLabel}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{filterOptions.map((option, index) => {\n\t\t\t\t\tif (option.isDivider) {\n\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>\n\t\t\t\t\t\treturn <MenuDivider key={`divider-${index}`} />;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\titem={option}\n\t\t\t\t\t\t\tdisabled={option.isDisabled}\n\t\t\t\t\t\t\ticon={option.isChecked ? <Icon name=\"check\" /> : undefined}\n\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\taria-checked={option.isChecked ? 'true' : undefined}\n\t\t\t\t\t\t\tnested={option.nested}\n\t\t\t\t\t\t\tgroupHeader={option.groupHeader}\n\t\t\t\t\t\t\ttooltip={\n\t\t\t\t\t\t\t\toption.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttooltipPlacement=\"right\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{option.name}\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Menu>\n\t\t</>\n\t);\n};\n\nexport { FilterMenu };\nexport type { FilterOption, FilterMenuProps };\n","import type { ChangeEvent, ReactNode } from 'react';\nimport type { FilterOption } from './FilterMenu';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\n\nimport { AppliedFilterButton } from './AppliedFilterButton';\nimport { FilterMenu } from './FilterMenu';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype AppliedFilterProps = {\n\tsearchValue?: string;\n\tonSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n\tonClearFilter?(): void;\n\tsearchPlaceholder?: string;\n\tname?: ReactNode;\n\tdescription: ReactNode;\n\toptions: FilterOption[];\n\tclassName?: string;\n\tonStateChange?({ isOpen }: { isOpen?: boolean }): void;\n\tonSelect?(item: FilterOption): void;\n\tisEmpty?: boolean;\n\tisLoading?: boolean;\n\tonClickFilterButton?(): void;\n\tsearchAriaLabel?: string;\n\tsearchId?: string;\n\t'data-test-id'?: string;\n};\n\n/**\n * @deprecated use `Menu` from `@launchpad-ui/components` instead\n *\n * https://launchpad.launchdarkly.com/?path=/docs/components-collections-menu--docs\n */\nconst AppliedFilter = ({\n\tsearchValue,\n\tonSearchChange,\n\tsearchPlaceholder,\n\tname,\n\tdescription,\n\toptions,\n\tclassName,\n\tisEmpty,\n\tisLoading,\n\tonClickFilterButton,\n\tonClearFilter,\n\tsearchAriaLabel,\n\tsearchId,\n\t'data-test-id': testId = 'applied-filter',\n\t...props\n}: AppliedFilterProps) => {\n\tconst enableSearch =\n\t\tonSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n\treturn (\n\t\t<Dropdown targetClassName={className} placement=\"bottom-start\" enableArrow={false} {...props}>\n\t\t\t<AppliedFilterButton\n\t\t\t\tdata-test-id={testId}\n\t\t\t\tname={name}\n\t\t\t\tonClickFilterButton={onClickFilterButton}\n\t\t\t>\n\t\t\t\t{description}\n\t\t\t</AppliedFilterButton>\n\t\t\t<FilterMenu\n\t\t\t\toptions={options}\n\t\t\t\tsearchValue={searchValue}\n\t\t\t\tsearchPlaceholder={searchPlaceholder}\n\t\t\t\tenableSearch={enableSearch}\n\t\t\t\tsearchAriaLabel={searchAriaLabel}\n\t\t\t\tsearchId={searchId}\n\t\t\t\tonSearchChange={onSearchChange}\n\t\t\t\tonClearFilter={onClearFilter}\n\t\t\t\tisLoading={isLoading}\n\t\t\t/>\n\t\t</Dropdown>\n\t);\n};\n\nexport type { AppliedFilterProps };\nexport { AppliedFilter };\n","import type { JSX, MouseEvent, ReactNode, SyntheticEvent } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Icon } from '@launchpad-ui/icons';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { cx } from 'classix';\nimport { Children, forwardRef, useId } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype FilterButtonProps = {\n\tname: ReactNode;\n\thideName?: boolean;\n\tisClearable?: boolean;\n\tonClear?(event: SyntheticEvent): void;\n\tclassName?: string;\n\tisSelected?: boolean;\n\tclearTooltip?: string | JSX.Element;\n\tchildren?: ReactNode;\n\tdisabled?: boolean;\n\tonClickFilterButton?(): void;\n\t'data-test-id'?: string;\n\tariaLabel?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst FilterButton = forwardRef<Ref, FilterButtonProps>((props, ref) => {\n\tconst {\n\t\tchildren,\n\t\tname,\n\t\thideName,\n\t\tisClearable,\n\t\tclearTooltip = 'Clear filter',\n\t\tonClear,\n\t\tdisabled,\n\t\tisSelected,\n\t\tonClickFilterButton,\n\t\tclassName,\n\t\t'data-test-id': testId = 'filter-button',\n\t\tariaLabel = 'Clear filter',\n\t\t...rest\n\t} = props;\n\tconst nameId = useId();\n\tconst descriptionId = useId();\n\n\tconst hasDescription = Children.count(children) !== 0;\n\n\tconst nameElement = (\n\t\t<span className={styles.name}>\n\t\t\t{name}\n\t\t\t{hasDescription && ':'}\n\t\t</span>\n\t);\n\n\tconst isDisabled = disabled;\n\n\tconst handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n\t\tif (isDisabled) return event.preventDefault();\n\t\tonClickFilterButton?.();\n\t};\n\n\treturn (\n\t\t<div className={styles.buttonContainer} data-test-id={testId}>\n\t\t\t<button\n\t\t\t\t{...rest}\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-labelledby={`${nameId} ${hasDescription ? descriptionId : ''}`}\n\t\t\t\taria-haspopup\n\t\t\t\tdisabled={isDisabled}\n\t\t\t\taria-disabled={isDisabled}\n\t\t\t\tclassName={cx(styles.button, className, (isClearable || isSelected) && styles.isClearable)}\n\t\t\t\tref={ref}\n\t\t\t\tonClick={handleClick}\n\t\t\t>\n\t\t\t\t{hideName ? (\n\t\t\t\t\t<VisuallyHidden id={nameId}>{nameElement}</VisuallyHidden>\n\t\t\t\t) : (\n\t\t\t\t\t<span id={nameId}>{nameElement}</span>\n\t\t\t\t)}\n\t\t\t\t{hasDescription && (\n\t\t\t\t\t<span id={descriptionId} className={styles.description}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t{!isClearable && <Icon name=\"chevron-down\" size=\"small\" />}\n\t\t\t</button>\n\t\t\t{isClearable && (\n\t\t\t\t<Tooltip targetClassName={styles.clearTooltip} content={clearTooltip}>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\t\tclassName={styles.clear}\n\t\t\t\t\t\tdata-test-id=\"clear-filter-button\"\n\t\t\t\t\t\ticon={<Icon name=\"cancel\" size=\"small\" />}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tonClick={onClear}\n\t\t\t\t\t/>\n\t\t\t\t</Tooltip>\n\t\t\t)}\n\t\t</div>\n\t);\n});\n\nFilterButton.displayName = 'FilterButton';\n\nexport { FilterButton };\nexport type { FilterButtonProps };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode, SyntheticEvent } from 'react';\nimport type { FilterOption } from './FilterMenu';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\nimport { cx } from 'classix';\n\nimport { FilterButton } from './FilterButton';\nimport { FilterMenu } from './FilterMenu';\nimport styles from './styles/Filter.module.css';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype FilterProps = Pick<MenuProps<string>, 'size' | 'enableVirtualization'> & {\n\tsearchValue?: string;\n\tonSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n\tsearchPlaceholder?: string;\n\tsearchAriaLabel?: string;\n\tname: ReactNode;\n\thideName?: boolean;\n\tdescription: ReactNode;\n\toptions: FilterOption[];\n\tisClearable?: boolean;\n\tonClear?(): void;\n\tclassName?: string;\n\tonStateChange?({ isOpen }: { isOpen?: boolean }): void;\n\tisSelected?: boolean;\n\tsearchId?: string;\n\tonSelect?(item: FilterOption): void;\n\tisEmpty?: boolean;\n\tisLoading?: boolean;\n\tdisabled?: boolean;\n\tonClickFilterButton?(): void;\n\tdisabledOptionTooltip?: string;\n\t'data-test-id'?: string;\n\ttriggerTestId?: string;\n\tclearAriaLabel?: string;\n};\n\n/**\n * @deprecated use `Menu` from `@launchpad-ui/components` instead\n *\n * https://launchpad.launchdarkly.com/?path=/docs/components-collections-menu--docs\n */\nconst Filter = ({\n\tsearchValue,\n\tonSearchChange,\n\tsearchPlaceholder,\n\tsearchAriaLabel,\n\tname,\n\thideName,\n\tdescription,\n\toptions,\n\tisClearable,\n\tonClear,\n\tisSelected,\n\tclassName,\n\tisEmpty,\n\tsearchId,\n\tisLoading,\n\tonClickFilterButton,\n\tdisabledOptionTooltip,\n\t'data-test-id': testId = 'filter',\n\tsize,\n\tdisabled,\n\tenableVirtualization,\n\tclearAriaLabel,\n\t...props\n}: FilterProps) => {\n\tconst enableSearch =\n\t\tonSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n\tconst dropdownClasses = cx(styles.filter, className);\n\n\tconst handleClear = (event: SyntheticEvent) => {\n\t\tevent.preventDefault();\n\t\tonClear?.();\n\t};\n\n\treturn (\n\t\t<Dropdown\n\t\t\ttargetTestId={testId}\n\t\t\tdisabled={disabled}\n\t\t\ttargetClassName={dropdownClasses}\n\t\t\t{...props}\n\t\t>\n\t\t\t<FilterButton\n\t\t\t\tisClearable={isClearable}\n\t\t\t\tonClear={handleClear}\n\t\t\t\tname={name}\n\t\t\t\thideName={hideName}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\tonClickFilterButton={onClickFilterButton}\n\t\t\t\tariaLabel={clearAriaLabel}\n\t\t\t>\n\t\t\t\t{description}\n\t\t\t</FilterButton>\n\t\t\t<FilterMenu\n\t\t\t\toptions={options}\n\t\t\t\tsearchId={searchId}\n\t\t\t\tsearchValue={searchValue}\n\t\t\t\tsearchPlaceholder={searchPlaceholder}\n\t\t\t\tsearchAriaLabel={searchAriaLabel}\n\t\t\t\tenableSearch={enableSearch}\n\t\t\t\tonSearchChange={onSearchChange}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tdisabledOptionTooltip={disabledOptionTooltip}\n\t\t\t\tsize={size}\n\t\t\t\tenableVirtualization={enableVirtualization}\n\t\t\t/>\n\t\t</Dropdown>\n\t);\n};\n\nexport { Filter };\nexport type { FilterProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACkBA,MAAM,sCAAsB,WAA0C,CAAC,OAAO,QAAQ;CACrF,MAAM,EACL,MAAA,QACA,WACA,UACA,qBACA,gBAAgB,SAAS,yBACzB,GAAG;CAEJ,MAAM,iBAAiB,SAAS,MAAM,SAAS,KAAK;AAEpD,wBACC,IAAC,OAAA;EAAI,gBAAc;4BAClB,KAAC,UAAA;GACA,MAAK;GACL,iBAAA;GACA,WAAW,GAAG,sBAAO,eAAe,UAAU;GACzC;GACL,SAAS;;IAER,0BACA,KAAC,QAAA;KAAK,WAAW,sBAAO;KAAa,iBAAe,EAAE,OAAO;gBAC3D,QACA,kBAAkB,GAAA;MACb;IAEP,kCACA,IAAC,QAAA;KAAK,WAAW,sBAAO;KAAoB,iBAAe,EAAE,OAAO;KAClE;MACK;oBAER,IAAC,MAAA;KAAK,MAA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