@veeyem/react-transfer-list 1.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 (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +206 -0
  3. package/dist/components/FilterPanel/FilterPanel.d.ts +4 -0
  4. package/dist/components/FilterPanel/FilterPanel.d.ts.map +1 -0
  5. package/dist/components/ListPanel/ListPanel.d.ts +23 -0
  6. package/dist/components/ListPanel/ListPanel.d.ts.map +1 -0
  7. package/dist/components/RemoteAutoComplete/RemoteAutoComplete.d.ts +9 -0
  8. package/dist/components/RemoteAutoComplete/RemoteAutoComplete.d.ts.map +1 -0
  9. package/dist/components/RemoteSelect/RemoteSelect.d.ts +9 -0
  10. package/dist/components/RemoteSelect/RemoteSelect.d.ts.map +1 -0
  11. package/dist/components/TransferList/TransferList.d.ts +5 -0
  12. package/dist/components/TransferList/TransferList.d.ts.map +1 -0
  13. package/dist/components/filter/FilterField.d.ts +11 -0
  14. package/dist/components/filter/FilterField.d.ts.map +1 -0
  15. package/dist/components/filter/FloatingDropdown.d.ts +11 -0
  16. package/dist/components/filter/FloatingDropdown.d.ts.map +1 -0
  17. package/dist/components/filter/MultiSelect.d.ts +31 -0
  18. package/dist/components/filter/MultiSelect.d.ts.map +1 -0
  19. package/dist/components/filter/fieldStyles.d.ts +2 -0
  20. package/dist/components/filter/fieldStyles.d.ts.map +1 -0
  21. package/dist/hooks/index.d.ts +4 -0
  22. package/dist/hooks/index.d.ts.map +1 -0
  23. package/dist/hooks/useDebouncedValue.d.ts +2 -0
  24. package/dist/hooks/useDebouncedValue.d.ts.map +1 -0
  25. package/dist/hooks/useRemoteListOptions.d.ts +24 -0
  26. package/dist/hooks/useRemoteListOptions.d.ts.map +1 -0
  27. package/dist/hooks/useTransferData.d.ts +18 -0
  28. package/dist/hooks/useTransferData.d.ts.map +1 -0
  29. package/dist/icons/index.d.ts +22 -0
  30. package/dist/icons/index.d.ts.map +1 -0
  31. package/dist/index.cjs.js +2116 -0
  32. package/dist/index.d.ts +6 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.esm.js +2083 -0
  35. package/dist/styles/componentStyles.d.ts +2 -0
  36. package/dist/styles/componentStyles.d.ts.map +1 -0
  37. package/dist/styles/index.d.ts +4 -0
  38. package/dist/styles/index.d.ts.map +1 -0
  39. package/dist/styles/injectStyles.d.ts +2 -0
  40. package/dist/styles/injectStyles.d.ts.map +1 -0
  41. package/dist/styles/tokens.d.ts +31 -0
  42. package/dist/styles/tokens.d.ts.map +1 -0
  43. package/dist/types/index.d.ts +61 -0
  44. package/dist/types/index.d.ts.map +1 -0
  45. package/dist/utils/clipboard.d.ts +5 -0
  46. package/dist/utils/clipboard.d.ts.map +1 -0
  47. package/dist/utils/fetch.d.ts +3 -0
  48. package/dist/utils/fetch.d.ts.map +1 -0
  49. package/dist/utils/filters.d.ts +5 -0
  50. package/dist/utils/filters.d.ts.map +1 -0
  51. package/dist/utils/index.d.ts +6 -0
  52. package/dist/utils/index.d.ts.map +1 -0
  53. package/dist/utils/items.d.ts +7 -0
  54. package/dist/utils/items.d.ts.map +1 -0
  55. package/dist/utils/listFetch.d.ts +7 -0
  56. package/dist/utils/listFetch.d.ts.map +1 -0
  57. package/package.json +81 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shamil
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,206 @@
1
+ # @veeyem/react-transfer-list
2
+
3
+ A React dual-list (transfer list) component with search, configurable filters, remote data fetching, and copy/paste support.
4
+
5
+ ## Features
6
+
7
+ - Two-panel picker: move items between **excluded** and **included** lists
8
+ - Search on both sides
9
+ - Optional filter panel (text, select, autocomplete, checkbox, and more)
10
+ - Remote list loading via pluggable `fetchFn` / `autocompleteFetchFn`
11
+ - Copy/paste selected items as JSON
12
+ - Zero runtime dependencies (React peer deps only)
13
+ - Styles injected automatically on first render
14
+
15
+ ## Requirements
16
+
17
+ - React 18 or 19
18
+ - React DOM 18 or 19
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install @veeyem/react-transfer-list
24
+ ```
25
+
26
+ ## Quick start
27
+
28
+ ### Static data
29
+
30
+ Pass an array as `remoteUrl` when you already have items in memory:
31
+
32
+ ```tsx
33
+ import { useState } from "react";
34
+ import TransferList from "@veeyem/react-transfer-list";
35
+ import type { TransferItem } from "@veeyem/react-transfer-list";
36
+
37
+ const users: TransferItem[] = [
38
+ { id: 1, text: "Alice" },
39
+ { id: 2, text: "Bob" },
40
+ ];
41
+
42
+ export function Example() {
43
+ const [selected, setSelected] = useState<TransferItem[]>([]);
44
+
45
+ return (
46
+ <TransferList
47
+ label="Users"
48
+ remoteUrl={users}
49
+ value={selected}
50
+ onChange={setSelected}
51
+ isFilter={false}
52
+ />
53
+ );
54
+ }
55
+ ```
56
+
57
+ ### Remote API
58
+
59
+ Pass a URL and optional custom fetch function:
60
+
61
+ ```tsx
62
+ import TransferList, { defaultFetchFn } from "@veeyem/react-transfer-list";
63
+
64
+ <TransferList
65
+ label="Employees"
66
+ remoteUrl="/api/employees/list"
67
+ fetchFn={defaultFetchFn}
68
+ value={selected}
69
+ onChange={setSelected}
70
+ />;
71
+ ```
72
+
73
+ `defaultFetchFn` sends `search` and `filter` query params and accepts either a raw array or `{ data: [...] }` in the JSON response.
74
+
75
+ ## Filters
76
+
77
+ Enable the filter panel with `isFilter` and a `filters` config:
78
+
79
+ ```tsx
80
+ import TransferList, { defaultAutocompleteFetchFn } from "@veeyem/react-transfer-list";
81
+
82
+ <TransferList
83
+ label="Employees"
84
+ remoteUrl="/api/employees/list"
85
+ value={selected}
86
+ onChange={setSelected}
87
+ isFilter
88
+ autocompleteFetchFn={defaultAutocompleteFetchFn}
89
+ filters={[
90
+ {
91
+ type: "autocomplete",
92
+ key: "group",
93
+ label: "Group",
94
+ remoteUrl: "/api/groups/list",
95
+ limit: 50,
96
+ colSpan: 2,
97
+ },
98
+ {
99
+ type: "checkbox",
100
+ key: "status",
101
+ label: "Status",
102
+ options: [
103
+ { label: "Active", value: "active" },
104
+ { label: "Inactive", value: "inactive" },
105
+ ],
106
+ },
107
+ ]}
108
+ />;
109
+ ```
110
+
111
+ Supported filter field types: `text`, `number`, `textarea`, `select`, `autocomplete`, `checkbox`, `switch`, `radio`, `date`, `time`, `datetime`, `slider`, `tags`, `color`, `chip`.
112
+
113
+ ## Custom fetch functions
114
+
115
+ ### List fetch (`FetchFn`)
116
+
117
+ ```tsx
118
+ import type { FetchFn } from "@veeyem/react-transfer-list";
119
+
120
+ const fetchFn: FetchFn = async (url, { search, filter }) => {
121
+ const response = await fetch(`${url}?search=${search ?? ""}`);
122
+ const json = await response.json();
123
+ return json.data;
124
+ };
125
+ ```
126
+
127
+ ### Autocomplete fetch (`AutocompleteFetchFn`)
128
+
129
+ Use `mapToFilterOptions` to normalize API rows shaped as `{ id, text }` or `{ label, value }`:
130
+
131
+ ```tsx
132
+ import { mapToFilterOptions } from "@veeyem/react-transfer-list";
133
+ import type { AutocompleteFetchFn } from "@veeyem/react-transfer-list";
134
+
135
+ const autocompleteFetchFn: AutocompleteFetchFn = async (url, params) => {
136
+ const response = await fetch(
137
+ `${url}?search=${params?.search ?? ""}&limit=${params?.limit ?? 50}`,
138
+ );
139
+ const json = await response.json();
140
+ return mapToFilterOptions(json.data ?? json);
141
+ };
142
+ ```
143
+
144
+ ## Props
145
+
146
+ | Prop | Type | Default | Description |
147
+ | --------------------- | --------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------- |
148
+ | `label` | `string` | — | Base label for both panels (e.g. `"Users"` → `"Users excluded"` / `"Users included"`) |
149
+ | `remoteUrl` | `string \| TransferItem[]` | — | API URL or static item list for the left panel |
150
+ | `fetchFn` | `FetchFn` | `defaultFetchFn` | Loads available items when `remoteUrl` is a string |
151
+ | `value` | `TransferItem[]` | — | Controlled list of included (right-side) items |
152
+ | `onChange` | `(items: TransferItem[]) => void` | — | Called when the included list changes |
153
+ | `filters` | `FilterConfig[]` | `[]` | Filter field definitions |
154
+ | `autocompleteFetchFn` | `AutocompleteFetchFn` | `defaultAutocompleteFetchFn` | Loads remote options for select/autocomplete filters |
155
+ | `className` | `string` | — | Extra class on the root element |
156
+ | `isFilter` | `boolean` | `true` | Show filter toggle and filter panel |
157
+
158
+ ### `TransferItem`
159
+
160
+ ```ts
161
+ type TransferItem = {
162
+ id: string | number;
163
+ text: string;
164
+ media?: string; // optional avatar URL
165
+ };
166
+ ```
167
+
168
+ ## Exported helpers
169
+
170
+ | Export | Description |
171
+ | ------------------------------------------------------- | ------------------------------------------------- |
172
+ | `defaultFetchFn` | Default GET fetch for list endpoints |
173
+ | `defaultAutocompleteFetchFn` | Default GET fetch for paginated option lists |
174
+ | `mapToFilterOptions` | Maps API rows to `{ label, value }` |
175
+ | `dedupeById` | Deduplicates items by `id` |
176
+ | `parseTransferItems` | Parses and validates clipboard JSON |
177
+ | `buildFilterArray` | Builds active filter payload from form values |
178
+ | `copyToClipboard` | Copies text to the clipboard |
179
+ | `setTransferListClipboard` / `getTransferListClipboard` | In-memory clipboard shared between list instances |
180
+
181
+ Types are exported from the package entry: `TransferItem`, `TransferListProps`, `FilterConfig`, `FetchFn`, `AutocompleteFetchFn`, and others.
182
+
183
+ ## Local demo
184
+
185
+ Clone the repo and run the demo app (uses live `src/`, not the built `dist/`):
186
+
187
+ ```bash
188
+ npm install
189
+ npm run demo
190
+ ```
191
+
192
+ Open [http://localhost:3000](http://localhost:3000).
193
+
194
+ ## Development
195
+
196
+ ```bash
197
+ npm run build # Build dist/ for publishing
198
+ npm run typecheck # TypeScript check
199
+ npm run lint # ESLint
200
+ npm run format # Prettier
201
+ npm run test # Vitest
202
+ ```
203
+
204
+ ## License
205
+
206
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { FilterPanelProps } from "../../types";
3
+ export declare function FilterPanel({ filters, filterValues, onChange, onApply, onReset, autocompleteFetchFn, }: FilterPanelProps): React.JSX.Element;
4
+ //# sourceMappingURL=FilterPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterPanel.d.ts","sourceRoot":"","sources":["../../../src/components/FilterPanel/FilterPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAY/C,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,OAAO,EACP,mBAAmB,GACpB,EAAE,gBAAgB,qBAsElB"}
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ import { TransferItem } from "../../types";
3
+ type ListPanelProps = {
4
+ items: TransferItem[];
5
+ title: string;
6
+ count: number;
7
+ totalCount?: number;
8
+ showCount?: boolean;
9
+ isRight?: boolean;
10
+ onToggleItem: (item: TransferItem) => void;
11
+ onMoveAll: () => void;
12
+ loading?: boolean;
13
+ error?: string | null;
14
+ search?: string;
15
+ onSearchChange?: (value: string) => void;
16
+ searchPlaceholder?: string;
17
+ onCopy?: () => void;
18
+ onPaste?: () => void;
19
+ copyPasteMessage?: string | null;
20
+ };
21
+ export declare function ListPanel({ items, title, count, totalCount, showCount, isRight, onToggleItem, onMoveAll, loading, error, search, onSearchChange, searchPlaceholder, onCopy, onPaste, copyPasteMessage, }: ListPanelProps): React.JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=ListPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ListPanel/ListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAW3C,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,SAAS,EACT,OAAe,EACf,YAAY,EACZ,SAAS,EACT,OAAe,EACf,KAAY,EACZ,MAAM,EACN,cAAc,EACd,iBAA+B,EAC/B,MAAM,EACN,OAAO,EACP,gBAAgB,GACjB,EAAE,cAAc,qBAgKhB"}
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { AutocompleteFetchFn, FilterConfig, FilterOption } from "../../types";
3
+ export declare function RemoteAutocomplete({ config, value, onChange, autocompleteFetchFn, }: {
4
+ config: FilterConfig;
5
+ value: FilterOption[];
6
+ onChange: (val: FilterOption[]) => void;
7
+ autocompleteFetchFn?: AutocompleteFetchFn;
8
+ }): React.JSX.Element;
9
+ //# sourceMappingURL=RemoteAutoComplete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoteAutoComplete.d.ts","sourceRoot":"","sources":["../../../src/components/RemoteAutoComplete/RemoteAutoComplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAa9E,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,mBAAgD,GACjD,EAAE;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C,qBA8OA"}
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { AutocompleteFetchFn, FilterConfig } from "../../types";
3
+ export declare function RemoteSelect({ config, value, onChange, autocompleteFetchFn, }: {
4
+ config: FilterConfig;
5
+ value: string;
6
+ onChange: (val: string) => void;
7
+ autocompleteFetchFn?: AutocompleteFetchFn;
8
+ }): React.JSX.Element;
9
+ //# sourceMappingURL=RemoteSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoteSelect.d.ts","sourceRoot":"","sources":["../../../src/components/RemoteSelect/RemoteSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQhE,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,QAAQ,EACR,mBAAgD,GACjD,EAAE;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C,qBAqNA"}
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { TransferListProps } from "../../types";
3
+ export declare function TransferList({ label, remoteUrl, fetchFn, value, onChange, filters, autocompleteFetchFn, className, isFilter, }: TransferListProps): React.JSX.Element;
4
+ export default TransferList;
5
+ //# sourceMappingURL=TransferList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransferList.d.ts","sourceRoot":"","sources":["../../../src/components/TransferList/TransferList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA8B,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAoB5E,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,SAAS,EACT,OAAwB,EACxB,KAAK,EACL,QAAQ,EACR,OAAY,EACZ,mBAAgD,EAChD,SAAS,EACT,QAAe,GAChB,EAAE,iBAAiB,qBA8QnB;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { AutocompleteFetchFn, FilterConfig } from "../../types";
3
+ type FilterFieldProps = {
4
+ config: FilterConfig;
5
+ value: unknown;
6
+ onChange: (value: unknown) => void;
7
+ autocompleteFetchFn?: AutocompleteFetchFn;
8
+ };
9
+ export declare function FilterField({ config, value, onChange, autocompleteFetchFn, }: FilterFieldProps): React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=FilterField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterField.d.ts","sourceRoot":"","sources":["../../../src/components/filter/FilterField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAgB,MAAM,aAAa,CAAC;AAoB9E,KAAK,gBAAgB,GAAG;IACtB,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C,CAAC;AAwNF,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,KAAK,EACL,QAAQ,EACR,mBAAmB,GACpB,EAAE,gBAAgB,qBAyTlB"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ type FloatingDropdownProps = {
3
+ anchorRef: React.RefObject<HTMLElement | null>;
4
+ open: boolean;
5
+ children: React.ReactNode;
6
+ estimatedHeight?: number;
7
+ dropdownRef?: React.RefObject<HTMLDivElement | null>;
8
+ };
9
+ export declare function FloatingDropdown({ anchorRef, open, children, estimatedHeight, dropdownRef, }: FloatingDropdownProps): React.ReactPortal | null;
10
+ export {};
11
+ //# sourceMappingURL=FloatingDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/filter/FloatingDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,qBAAqB,GAAG;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC/C,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACtD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,eAAqB,EACrB,WAAW,GACZ,EAAE,qBAAqB,4BAuDvB"}
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ import { inlineSearchStyle } from "../../styles/tokens";
3
+ export declare function SelectionChip({ label, onRemove, }: {
4
+ label: string;
5
+ onRemove: () => void;
6
+ }): React.JSX.Element;
7
+ type MultiSelectBoxProps = {
8
+ children: React.ReactNode;
9
+ focused?: boolean;
10
+ onClick?: () => void;
11
+ minHeight?: number;
12
+ };
13
+ export declare function MultiSelectBox({ children, focused, onClick, minHeight, }: MultiSelectBoxProps): React.JSX.Element;
14
+ export declare function MultiSelectToolbar({ selectedCount, totalCount, onSelectAll, onClear, }: {
15
+ selectedCount: number;
16
+ totalCount: number;
17
+ onSelectAll: () => void;
18
+ onClear: () => void;
19
+ }): React.JSX.Element;
20
+ export declare function ToggleOptionPill({ label, selected, onClick, }: {
21
+ label: string;
22
+ selected: boolean;
23
+ onClick: () => void;
24
+ }): React.JSX.Element;
25
+ export declare function DropdownOptionRow({ label, selected, onClick, }: {
26
+ label: string;
27
+ selected: boolean;
28
+ onClick: () => void;
29
+ }): React.JSX.Element;
30
+ export { inlineSearchStyle };
31
+ //# sourceMappingURL=MultiSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../src/components/filter/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAa,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGnE,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,qBAwCA;AAED,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,OAAe,EACf,OAAO,EACP,SAAc,GACf,EAAE,mBAAmB,qBAsBrB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,UAAU,EACV,WAAW,EACX,OAAO,GACR,EAAE;IACD,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,qBAqDA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,qBA0CA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,qBA8CA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { inputStyle, labelStyle, fieldWrapStyle, focusInput, blurInput, } from "../../styles/tokens";
2
+ //# sourceMappingURL=fieldStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldStyles.d.ts","sourceRoot":"","sources":["../../../src/components/filter/fieldStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,SAAS,GACV,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { useDebouncedValue } from "./useDebouncedValue";
2
+ export { useTransferData } from "./useTransferData";
3
+ export { useRemoteListOptions, getListLimit } from "./useRemoteListOptions";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function useDebouncedValue<T>(value: T, delayMs?: number): T;
2
+ //# sourceMappingURL=useDebouncedValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDebouncedValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useDebouncedValue.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,SAAM,GAAG,CAAC,CAS/D"}
@@ -0,0 +1,24 @@
1
+ import { AutocompleteFetchFn, FilterOption } from "../types";
2
+ type UseRemoteListOptionsProps = {
3
+ remoteUrl?: string;
4
+ staticOptions?: FilterOption[];
5
+ fetchFn?: AutocompleteFetchFn;
6
+ search?: string;
7
+ limit?: number;
8
+ enabled?: boolean;
9
+ selected?: FilterOption[];
10
+ };
11
+ export declare function useRemoteListOptions({ remoteUrl, staticOptions, fetchFn, search, limit, enabled, selected, }: UseRemoteListOptionsProps): {
12
+ options: FilterOption[];
13
+ loading: boolean;
14
+ loadingMore: boolean;
15
+ hasMore: boolean;
16
+ error: string | null;
17
+ loadMore: () => void;
18
+ refresh: () => void;
19
+ };
20
+ export declare function getListLimit(config: {
21
+ limit?: number;
22
+ }): number;
23
+ export {};
24
+ //# sourceMappingURL=useRemoteListOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRemoteListOptions.d.ts","sourceRoot":"","sources":["../../src/hooks/useRemoteListOptions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7D,KAAK,yBAAyB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,aAAkB,EAClB,OAAoC,EACpC,MAAW,EACX,KAAU,EACV,OAAc,EACd,QAAa,GACd,EAAE,yBAAyB;;;;;;;;EAuF3B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAE/D"}
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import { ActiveFilter, FetchFn, TransferItem } from "../types";
3
+ type UseTransferDataProps = {
4
+ remoteUrl: string | TransferItem[];
5
+ fetchFn: FetchFn;
6
+ search: string;
7
+ filter: ActiveFilter[];
8
+ dataRight: TransferItem[];
9
+ };
10
+ export declare function useTransferData({ remoteUrl, fetchFn, search, filter, dataRight, }: UseTransferDataProps): {
11
+ dataLeft: TransferItem[];
12
+ setDataLeft: React.Dispatch<React.SetStateAction<TransferItem[]>>;
13
+ loading: boolean;
14
+ error: string | null;
15
+ refetch: () => Promise<void>;
16
+ };
17
+ export {};
18
+ //# sourceMappingURL=useTransferData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTransferData.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransferData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG/D,KAAK,oBAAoB,GAAG;IAC1B,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,GACV,EAAE,oBAAoB;;;;;;EA4CtB"}
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ type IconProps = {
3
+ size?: number;
4
+ className?: string;
5
+ };
6
+ export declare function FilterToggleIcon({ open, size }: IconProps & {
7
+ open: boolean;
8
+ }): React.JSX.Element;
9
+ export declare function FilterPanelIcon({ size }: IconProps): React.JSX.Element;
10
+ export declare function ResetIcon({ size }: IconProps): React.JSX.Element;
11
+ export declare function ApplyIcon({ size }: IconProps): React.JSX.Element;
12
+ export declare function ChevronDoubleRightIcon({ size }: IconProps): React.JSX.Element;
13
+ export declare function XMarkIcon({ size }: IconProps): React.JSX.Element;
14
+ export declare function SearchIcon({ size }: IconProps): React.JSX.Element;
15
+ export declare function CopyIcon({ size }: IconProps): React.JSX.Element;
16
+ export declare function PasteIcon({ size }: IconProps): React.JSX.Element;
17
+ export declare function ExcludedPanelIcon({ size }: IconProps): React.JSX.Element;
18
+ export declare function IncludedPanelIcon({ size }: IconProps): React.JSX.Element;
19
+ export declare function CheckIcon({ size }: IconProps): React.JSX.Element;
20
+ export declare function ChevronDownIcon({ size }: IconProps): React.JSX.Element;
21
+ export {};
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,qBAiBlF;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAWvD;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAiBjD;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAYjD;AAED,wBAAgB,sBAAsB,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAqB9D;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAgBjD;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAiBlD;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAiBhD;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAiBjD;AAED,wBAAgB,iBAAiB,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBA0BzD;AAED,wBAAgB,iBAAiB,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAazD;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAgBjD;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,qBAgBvD"}