@gradio/dataframe 0.16.5 → 0.17.1

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 (87) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/Dataframe.stories.svelte +202 -9
  3. package/Index.svelte +7 -13
  4. package/dist/Index.svelte +5 -9
  5. package/dist/Index.svelte.d.ts +9 -2
  6. package/dist/shared/CellMenu.svelte +91 -10
  7. package/dist/shared/CellMenu.svelte.d.ts +6 -0
  8. package/dist/shared/CellMenuButton.svelte +45 -0
  9. package/dist/shared/CellMenuButton.svelte.d.ts +16 -0
  10. package/dist/shared/CellMenuIcons.svelte +79 -0
  11. package/dist/shared/EditableCell.svelte +83 -14
  12. package/dist/shared/EditableCell.svelte.d.ts +12 -3
  13. package/dist/shared/EmptyRowButton.svelte +28 -0
  14. package/dist/shared/EmptyRowButton.svelte.d.ts +16 -0
  15. package/dist/shared/RowNumber.svelte +40 -0
  16. package/dist/shared/RowNumber.svelte.d.ts +17 -0
  17. package/dist/shared/Table.svelte +564 -1121
  18. package/dist/shared/Table.svelte.d.ts +4 -0
  19. package/dist/shared/TableCell.svelte +291 -0
  20. package/dist/shared/TableCell.svelte.d.ts +57 -0
  21. package/dist/shared/TableHeader.svelte +239 -0
  22. package/dist/shared/TableHeader.svelte.d.ts +45 -0
  23. package/dist/shared/Toolbar.svelte +18 -8
  24. package/dist/shared/VirtualTable.svelte +66 -19
  25. package/dist/shared/VirtualTable.svelte.d.ts +4 -0
  26. package/dist/shared/context/keyboard_context.d.ts +37 -0
  27. package/dist/shared/context/keyboard_context.js +12 -0
  28. package/dist/shared/context/selection_context.d.ts +32 -0
  29. package/dist/shared/context/selection_context.js +107 -0
  30. package/dist/shared/context/table_context.d.ts +141 -0
  31. package/dist/shared/context/table_context.js +375 -0
  32. package/dist/shared/icons/Padlock.svelte +24 -0
  33. package/dist/shared/icons/Padlock.svelte.d.ts +23 -0
  34. package/dist/shared/icons/SelectionButtons.svelte +85 -0
  35. package/dist/shared/icons/SelectionButtons.svelte.d.ts +18 -0
  36. package/dist/shared/icons/SortArrowDown.svelte +24 -0
  37. package/dist/shared/icons/SortArrowDown.svelte.d.ts +16 -0
  38. package/dist/shared/icons/SortArrowUp.svelte +24 -0
  39. package/dist/shared/icons/SortArrowUp.svelte.d.ts +16 -0
  40. package/dist/shared/icons/SortButtonDown.svelte +14 -0
  41. package/dist/shared/icons/SortButtonDown.svelte.d.ts +23 -0
  42. package/dist/shared/icons/SortButtonUp.svelte +15 -0
  43. package/dist/shared/icons/SortButtonUp.svelte.d.ts +23 -0
  44. package/dist/shared/icons/SortIcon.svelte +46 -68
  45. package/dist/shared/icons/SortIcon.svelte.d.ts +3 -2
  46. package/dist/shared/selection_utils.d.ts +2 -1
  47. package/dist/shared/selection_utils.js +39 -10
  48. package/dist/shared/utils/data_processing.d.ts +13 -0
  49. package/dist/shared/utils/data_processing.js +45 -0
  50. package/dist/shared/utils/drag_utils.d.ts +15 -0
  51. package/dist/shared/utils/drag_utils.js +57 -0
  52. package/dist/shared/utils/keyboard_utils.d.ts +2 -0
  53. package/dist/shared/utils/keyboard_utils.js +186 -0
  54. package/dist/shared/utils/sort_utils.d.ts +22 -3
  55. package/dist/shared/utils/sort_utils.js +44 -24
  56. package/dist/shared/utils/table_utils.d.ts +6 -5
  57. package/dist/shared/utils/table_utils.js +13 -56
  58. package/package.json +7 -7
  59. package/shared/CellMenu.svelte +90 -10
  60. package/shared/CellMenuButton.svelte +46 -0
  61. package/shared/CellMenuIcons.svelte +79 -0
  62. package/shared/EditableCell.svelte +97 -18
  63. package/shared/EmptyRowButton.svelte +29 -0
  64. package/shared/RowNumber.svelte +41 -0
  65. package/shared/Table.svelte +604 -1235
  66. package/shared/TableCell.svelte +324 -0
  67. package/shared/TableHeader.svelte +256 -0
  68. package/shared/Toolbar.svelte +19 -8
  69. package/shared/VirtualTable.svelte +72 -19
  70. package/shared/context/keyboard_context.ts +65 -0
  71. package/shared/context/selection_context.ts +168 -0
  72. package/shared/context/table_context.ts +625 -0
  73. package/shared/icons/Padlock.svelte +24 -0
  74. package/shared/icons/SelectionButtons.svelte +93 -0
  75. package/shared/icons/SortArrowDown.svelte +25 -0
  76. package/shared/icons/SortArrowUp.svelte +25 -0
  77. package/shared/icons/SortButtonDown.svelte +14 -0
  78. package/shared/icons/SortButtonUp.svelte +15 -0
  79. package/shared/icons/SortIcon.svelte +47 -70
  80. package/shared/selection_utils.ts +39 -13
  81. package/shared/utils/data_processing.ts +72 -0
  82. package/shared/utils/drag_utils.ts +92 -0
  83. package/shared/utils/keyboard_utils.ts +238 -0
  84. package/shared/utils/sort_utils.test.ts +262 -14
  85. package/shared/utils/sort_utils.ts +67 -31
  86. package/shared/utils/table_utils.test.ts +66 -45
  87. package/shared/utils/table_utils.ts +16 -86
@@ -0,0 +1,375 @@
1
+ import { getContext, setContext } from "svelte";
2
+ import { writable, get } from "svelte/store";
3
+ import { sort_table_data } from "../utils/table_utils";
4
+ import { dequal } from "dequal/lite";
5
+ export const DATAFRAME_KEY = Symbol("dataframe");
6
+ export function create_actions(state) {
7
+ const add_row = (data, make_id, index) => {
8
+ if (!data || data.length === 0) {
9
+ return [[{ value: "", id: make_id() }]];
10
+ }
11
+ const new_row = Array(data[0].length)
12
+ .fill(null)
13
+ .map(() => ({
14
+ value: "",
15
+ id: make_id()
16
+ }));
17
+ const new_data = [...data];
18
+ if (typeof index === "number" && index >= 0 && index <= data.length) {
19
+ new_data.splice(index, 0, new_row);
20
+ }
21
+ else {
22
+ new_data.push(new_row);
23
+ }
24
+ return new_data;
25
+ };
26
+ const add_col = (data, headers, make_id, index) => {
27
+ if (!data || data.length === 0) {
28
+ return {
29
+ data: [[{ value: "", id: make_id() }]],
30
+ headers: ["Header 1"]
31
+ };
32
+ }
33
+ const new_headers = [...headers];
34
+ const new_data = data.map((row) => [...row]);
35
+ if (typeof index === "number" &&
36
+ index >= 0 &&
37
+ index <= (data[0]?.length || 0)) {
38
+ new_headers.splice(index, 0, `Header ${headers.length + 1}`);
39
+ new_data.forEach((row) => {
40
+ const id = make_id();
41
+ row.splice(index, 0, { value: "", id });
42
+ });
43
+ }
44
+ else {
45
+ new_headers.push(`Header ${headers.length + 1}`);
46
+ new_data.forEach((row) => {
47
+ const id = make_id();
48
+ row.push({ value: "", id });
49
+ });
50
+ }
51
+ return { data: new_data, headers: new_headers };
52
+ };
53
+ const reset_sort_state = () => {
54
+ state.update((s) => ({
55
+ ...s,
56
+ sort_state: {
57
+ sort_columns: [],
58
+ row_order: []
59
+ }
60
+ }));
61
+ };
62
+ return {
63
+ handle_search: (search_query) => {
64
+ state.update((s) => ({ ...s, current_search_query: search_query }));
65
+ },
66
+ handle_sort: (col, direction) => {
67
+ state.update((s) => {
68
+ const sort_columns = [...s.sort_state.sort_columns];
69
+ const existing_index = sort_columns.findIndex((item) => item.col === col);
70
+ if (existing_index !== -1) {
71
+ const existing_item = sort_columns[existing_index];
72
+ if (existing_item.direction === direction) {
73
+ sort_columns.splice(existing_index, 1);
74
+ }
75
+ else {
76
+ sort_columns[existing_index] = { col, direction };
77
+ }
78
+ }
79
+ else {
80
+ if (sort_columns.length >= 3) {
81
+ sort_columns.shift();
82
+ }
83
+ sort_columns.push({ col, direction });
84
+ }
85
+ return {
86
+ ...s,
87
+ sort_state: {
88
+ ...s.sort_state,
89
+ sort_columns
90
+ }
91
+ };
92
+ });
93
+ },
94
+ get_sort_status: (name, headers) => {
95
+ const current_state = get(state);
96
+ const sort_item = current_state.sort_state.sort_columns.find((item) => headers[item.col] === name);
97
+ if (!sort_item)
98
+ return "none";
99
+ return sort_item.direction;
100
+ },
101
+ sort_data: (data, display_value, styling) => {
102
+ const current_state = get(state);
103
+ if (current_state.sort_state.sort_columns.length > 0) {
104
+ sort_table_data(data, display_value, styling, current_state.sort_state.sort_columns);
105
+ }
106
+ },
107
+ update_row_order: (data) => {
108
+ state.update((s) => {
109
+ const current_sort_state = { ...s.sort_state };
110
+ if (current_sort_state.sort_columns.length > 0 && data[0]) {
111
+ const indices = [...Array(data.length)].map((_, i) => i);
112
+ indices.sort((a, b) => {
113
+ const row_a = data[a];
114
+ const row_b = data[b];
115
+ for (const { col: sort_index, direction } of current_sort_state.sort_columns) {
116
+ if (!row_a ||
117
+ !row_b ||
118
+ sort_index < 0 ||
119
+ sort_index >= row_a.length ||
120
+ sort_index >= row_b.length) {
121
+ continue;
122
+ }
123
+ const val_a = row_a[sort_index].value;
124
+ const val_b = row_b[sort_index].value;
125
+ const comp = val_a < val_b ? -1 : val_a > val_b ? 1 : 0;
126
+ if (comp !== 0) {
127
+ return direction === "asc" ? comp : -comp;
128
+ }
129
+ }
130
+ return 0;
131
+ });
132
+ current_sort_state.row_order = indices;
133
+ }
134
+ else {
135
+ current_sort_state.row_order = [...Array(data.length)].map((_, i) => i);
136
+ }
137
+ return { ...s, sort_state: current_sort_state };
138
+ });
139
+ },
140
+ filter_data: (data) => {
141
+ const current_state = get(state);
142
+ if (!current_state.current_search_query) {
143
+ return data;
144
+ }
145
+ const search_query = current_state.current_search_query.toLowerCase();
146
+ const filtered = data.filter((row) => {
147
+ return row.some((cell) => {
148
+ if (!cell) {
149
+ return false;
150
+ }
151
+ const cell_value = cell.value;
152
+ if (cell_value === null || cell_value === undefined) {
153
+ return false;
154
+ }
155
+ const string_value = String(cell_value).toLowerCase();
156
+ return string_value.includes(search_query);
157
+ });
158
+ });
159
+ return filtered;
160
+ },
161
+ add_row,
162
+ add_col,
163
+ add_row_at: (data, index, position, make_id) => {
164
+ const row_index = position === "above" ? index : index + 1;
165
+ return add_row(data, make_id, row_index);
166
+ },
167
+ add_col_at: (data, headers, index, position, make_id) => {
168
+ const col_index = position === "left" ? index : index + 1;
169
+ return add_col(data, headers, make_id, col_index);
170
+ },
171
+ delete_row: (data, index) => {
172
+ if (data.length <= 1) {
173
+ return data;
174
+ }
175
+ const new_data = [...data];
176
+ new_data.splice(index, 1);
177
+ return new_data;
178
+ },
179
+ delete_col: (data, headers, index) => {
180
+ if (headers.length <= 1) {
181
+ return { data, headers };
182
+ }
183
+ const new_headers = [...headers];
184
+ new_headers.splice(index, 1);
185
+ const new_data = data.map((row) => {
186
+ const new_row = [...row];
187
+ new_row.splice(index, 1);
188
+ return new_row;
189
+ });
190
+ return { data: new_data, headers: new_headers };
191
+ },
192
+ delete_row_at: (data, index) => {
193
+ if (data.length <= 1)
194
+ return data;
195
+ data.splice(index, 1);
196
+ return data;
197
+ },
198
+ delete_col_at: (data, headers, index) => {
199
+ if (headers.length <= 1) {
200
+ return { data, headers };
201
+ }
202
+ const new_headers = [...headers];
203
+ new_headers.splice(index, 1);
204
+ const new_data = data.map((row) => {
205
+ const new_row = [...row];
206
+ new_row.splice(index, 1);
207
+ return new_row;
208
+ });
209
+ return { data: new_data, headers: new_headers };
210
+ },
211
+ set_active_cell_menu: (menu) => {
212
+ state.update((s) => ({
213
+ ...s,
214
+ ui_state: { ...s.ui_state, active_cell_menu: menu }
215
+ }));
216
+ },
217
+ set_active_header_menu: (menu) => {
218
+ state.update((s) => ({
219
+ ...s,
220
+ ui_state: { ...s.ui_state, active_header_menu: menu }
221
+ }));
222
+ },
223
+ set_selected_cells: (cells) => {
224
+ state.update((s) => ({
225
+ ...s,
226
+ ui_state: { ...s.ui_state, selected_cells: cells }
227
+ }));
228
+ },
229
+ set_selected: (selected) => {
230
+ state.update((s) => ({
231
+ ...s,
232
+ ui_state: { ...s.ui_state, selected: selected }
233
+ }));
234
+ },
235
+ set_editing: (editing) => {
236
+ state.update((s) => ({
237
+ ...s,
238
+ ui_state: { ...s.ui_state, editing: editing }
239
+ }));
240
+ },
241
+ clear_ui_state: () => {
242
+ state.update((s) => ({
243
+ ...s,
244
+ ui_state: {
245
+ active_cell_menu: null,
246
+ active_header_menu: null,
247
+ selected_cells: [],
248
+ selected: false,
249
+ editing: false,
250
+ header_edit: false,
251
+ selected_header: false,
252
+ active_button: null
253
+ }
254
+ }));
255
+ },
256
+ set_header_edit: (header_index) => {
257
+ state.update((s) => ({
258
+ ...s,
259
+ ui_state: {
260
+ ...s.ui_state,
261
+ selected_cells: [],
262
+ selected_header: header_index,
263
+ header_edit: header_index
264
+ }
265
+ }));
266
+ },
267
+ set_selected_header: (header_index) => {
268
+ state.update((s) => ({
269
+ ...s,
270
+ ui_state: {
271
+ ...s.ui_state,
272
+ selected_header: header_index,
273
+ selected: false,
274
+ selected_cells: []
275
+ }
276
+ }));
277
+ },
278
+ handle_header_click: (col, editable) => {
279
+ state.update((s) => ({
280
+ ...s,
281
+ ui_state: {
282
+ ...s.ui_state,
283
+ active_cell_menu: null,
284
+ active_header_menu: null,
285
+ selected: false,
286
+ selected_cells: [],
287
+ selected_header: col,
288
+ header_edit: editable ? col : false
289
+ }
290
+ }));
291
+ },
292
+ end_header_edit: (key) => {
293
+ if (key === "Escape" || key === "Enter" || key === "Tab") {
294
+ state.update((s) => ({
295
+ ...s,
296
+ ui_state: {
297
+ ...s.ui_state,
298
+ selected: false,
299
+ header_edit: false
300
+ }
301
+ }));
302
+ }
303
+ },
304
+ trigger_change: async (data, headers, previous_data, previous_headers, value_is_output, dispatch) => {
305
+ const current_state = get(state);
306
+ if (current_state.current_search_query)
307
+ return;
308
+ const current_headers = headers.map((h) => h.value);
309
+ const current_data = data.map((row) => row.map((cell) => String(cell.value)));
310
+ if (!dequal(current_data, previous_data) ||
311
+ !dequal(current_headers, previous_headers)) {
312
+ if (!dequal(current_headers, previous_headers)) {
313
+ reset_sort_state();
314
+ }
315
+ dispatch("change", {
316
+ data: data.map((row) => row.map((cell) => cell.value)),
317
+ headers: headers.map((h) => h.value),
318
+ metadata: null
319
+ });
320
+ if (!value_is_output) {
321
+ dispatch("input");
322
+ }
323
+ }
324
+ },
325
+ get_selected_cells: () => {
326
+ const current_state = get(state);
327
+ return current_state.ui_state.selected_cells;
328
+ },
329
+ get_active_cell_menu: () => {
330
+ const current_state = get(state);
331
+ return current_state.ui_state.active_cell_menu;
332
+ },
333
+ get_active_button: () => {
334
+ const current_state = get(state);
335
+ return current_state.ui_state.active_button;
336
+ },
337
+ set_active_button: (button) => {
338
+ state.update((s) => ({
339
+ ...s,
340
+ ui_state: { ...s.ui_state, active_button: button }
341
+ }));
342
+ },
343
+ reset_sort_state
344
+ };
345
+ }
346
+ export function create_dataframe_context(config) {
347
+ const instance_id = Symbol(`dataframe_${Math.random().toString(36).substring(2)}`);
348
+ const state = writable({
349
+ config,
350
+ current_search_query: null,
351
+ sort_state: {
352
+ sort_columns: [],
353
+ row_order: []
354
+ },
355
+ ui_state: {
356
+ active_cell_menu: null,
357
+ active_header_menu: null,
358
+ selected_cells: [],
359
+ selected: false,
360
+ editing: false,
361
+ header_edit: false,
362
+ selected_header: false,
363
+ active_button: null
364
+ }
365
+ });
366
+ const actions = create_actions(state);
367
+ const context = { state, actions };
368
+ setContext(instance_id, context);
369
+ setContext(DATAFRAME_KEY, { instance_id, context });
370
+ return context;
371
+ }
372
+ export function get_dataframe_context() {
373
+ const ctx = getContext(DATAFRAME_KEY);
374
+ return ctx ? ctx.context : getContext(DATAFRAME_KEY);
375
+ }
@@ -0,0 +1,24 @@
1
+ <div class="wrapper" aria-label="Static column">
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="13"
5
+ height="13"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ >
13
+ <rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
14
+ <path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
15
+ </svg>
16
+ </div>
17
+
18
+ <style>
19
+ .wrapper {
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ }
24
+ </style>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} PadlockProps */
2
+ /** @typedef {typeof __propDef.events} PadlockEvents */
3
+ /** @typedef {typeof __propDef.slots} PadlockSlots */
4
+ export default class Padlock extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type PadlockProps = typeof __propDef.props;
11
+ export type PadlockEvents = typeof __propDef.events;
12
+ export type PadlockSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1,85 @@
1
+ <script>export let position;
2
+ export let coords;
3
+ export let on_click = null;
4
+ $:
5
+ is_first_position = position === "column" ? coords[0] === 0 : coords[1] === 0;
6
+ $:
7
+ direction = position === "column" ? is_first_position ? "down" : "up" : is_first_position ? "right" : "left";
8
+ </script>
9
+
10
+ <button
11
+ class="selection-button selection-button-{position} {is_first_position
12
+ ? `move-${direction}`
13
+ : ''}"
14
+ on:click|stopPropagation={() => on_click && on_click()}
15
+ aria-label={`Select ${position}`}
16
+ >
17
+ <span class={direction}>
18
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
19
+ <path
20
+ d="m16.707 13.293-4-4a1 1 0 0 0-1.414 0l-4 4A1 1 0 0 0 8 15h8a1 1 0 0 0 .707-1.707z"
21
+ data-name={direction}
22
+ />
23
+ </svg>
24
+ </span>
25
+ </button>
26
+
27
+ <style>
28
+ .selection-button {
29
+ position: absolute;
30
+ background: var(--color-accent);
31
+ width: var(--size-3);
32
+ height: var(--size-5);
33
+ color: var(--background-fill-primary);
34
+ }
35
+
36
+ .selection-button-column {
37
+ top: -15px;
38
+ left: 50%;
39
+ transform: translateX(-50%) rotate(90deg);
40
+ border-radius: var(--radius-sm) 0 0 var(--radius-sm);
41
+ }
42
+
43
+ .selection-button-row {
44
+ left: calc(var(--size-2-5) * -1);
45
+ border-radius: var(--radius-sm) 0 0 var(--radius-sm);
46
+ }
47
+
48
+ .move-down {
49
+ bottom: -14px;
50
+ top: auto;
51
+ border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
52
+ }
53
+
54
+ .move-right {
55
+ left: auto;
56
+ right: calc(var(--size-2-5) * -1);
57
+ border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
58
+ }
59
+
60
+ svg {
61
+ fill: currentColor;
62
+ }
63
+
64
+ span {
65
+ display: flex;
66
+ width: 100%;
67
+ height: 100%;
68
+ }
69
+
70
+ .up {
71
+ transform: rotate(-90deg);
72
+ }
73
+
74
+ .down {
75
+ transform: rotate(90deg);
76
+ }
77
+
78
+ .left {
79
+ transform: rotate(-90deg);
80
+ }
81
+
82
+ .right {
83
+ transform: rotate(90deg);
84
+ }
85
+ </style>
@@ -0,0 +1,18 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ position: "column" | "row";
5
+ coords: [number, number];
6
+ on_click?: ((() => void) | null) | undefined;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {};
12
+ };
13
+ export type SelectionButtonsProps = typeof __propDef.props;
14
+ export type SelectionButtonsEvents = typeof __propDef.events;
15
+ export type SelectionButtonsSlots = typeof __propDef.slots;
16
+ export default class SelectionButtons extends SvelteComponent<SelectionButtonsProps, SelectionButtonsEvents, SelectionButtonsSlots> {
17
+ }
18
+ export {};
@@ -0,0 +1,24 @@
1
+ <script>export let size = 16;
2
+ </script>
3
+
4
+ <svg
5
+ width={size}
6
+ height={size}
7
+ viewBox="0 0 16 16"
8
+ fill="none"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ >
11
+ <path
12
+ d="M4 8L8 12L12 8"
13
+ stroke="currentColor"
14
+ stroke-width="1.5"
15
+ stroke-linecap="round"
16
+ stroke-linejoin="round"
17
+ />
18
+ <path
19
+ d="M8 12V4"
20
+ stroke="currentColor"
21
+ stroke-width="1.5"
22
+ stroke-linecap="round"
23
+ />
24
+ </svg>
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ size?: number | undefined;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {};
10
+ };
11
+ export type SortArrowDownProps = typeof __propDef.props;
12
+ export type SortArrowDownEvents = typeof __propDef.events;
13
+ export type SortArrowDownSlots = typeof __propDef.slots;
14
+ export default class SortArrowDown extends SvelteComponent<SortArrowDownProps, SortArrowDownEvents, SortArrowDownSlots> {
15
+ }
16
+ export {};
@@ -0,0 +1,24 @@
1
+ <script>export let size = 16;
2
+ </script>
3
+
4
+ <svg
5
+ width={size}
6
+ height={size}
7
+ viewBox="0 0 16 16"
8
+ fill="none"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ >
11
+ <path
12
+ d="M4 8L8 4L12 8"
13
+ stroke="currentColor"
14
+ stroke-width="1.5"
15
+ stroke-linecap="round"
16
+ stroke-linejoin="round"
17
+ />
18
+ <path
19
+ d="M8 4V12"
20
+ stroke="currentColor"
21
+ stroke-width="1.5"
22
+ stroke-linecap="round"
23
+ />
24
+ </svg>
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ size?: number | undefined;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {};
10
+ };
11
+ export type SortArrowUpProps = typeof __propDef.props;
12
+ export type SortArrowUpEvents = typeof __propDef.events;
13
+ export type SortArrowUpSlots = typeof __propDef.slots;
14
+ export default class SortArrowUp extends SvelteComponent<SortArrowUpProps, SortArrowUpEvents, SortArrowUpSlots> {
15
+ }
16
+ export {};
@@ -0,0 +1,14 @@
1
+ <svg
2
+ viewBox="0 0 24 24"
3
+ fill="none"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ focusable="false"
6
+ >
7
+ <path
8
+ d="M7 10l5 5 5-5"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ />
14
+ </svg>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} SortButtonDownProps */
2
+ /** @typedef {typeof __propDef.events} SortButtonDownEvents */
3
+ /** @typedef {typeof __propDef.slots} SortButtonDownSlots */
4
+ export default class SortButtonDown extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type SortButtonDownProps = typeof __propDef.props;
11
+ export type SortButtonDownEvents = typeof __propDef.events;
12
+ export type SortButtonDownSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1,15 @@
1
+ <svg
2
+ viewBox="0 0 24 24"
3
+ fill="none"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ aria-hidden="true"
6
+ focusable="false"
7
+ >
8
+ <path
9
+ d="M7 14l5-5 5 5"
10
+ stroke="currentColor"
11
+ stroke-width="2"
12
+ stroke-linecap="round"
13
+ stroke-linejoin="round"
14
+ />
15
+ </svg>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} SortButtonUpProps */
2
+ /** @typedef {typeof __propDef.events} SortButtonUpEvents */
3
+ /** @typedef {typeof __propDef.slots} SortButtonUpSlots */
4
+ export default class SortButtonUp extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type SortButtonUpProps = typeof __propDef.props;
11
+ export type SortButtonUpEvents = typeof __propDef.events;
12
+ export type SortButtonUpSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};