runeforge 0.0.53 → 0.0.55
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/LICENSE +21 -21
- package/README.md +1342 -1222
- package/dist/components/Avatar.svelte +31 -31
- package/dist/components/IconRenderer.svelte +22 -22
- package/dist/components/Modal.svelte +75 -75
- package/dist/components/common/Header.svelte +40 -40
- package/dist/components/crud/EmbeddedField.svelte +175 -175
- package/dist/components/crud/Field.svelte +376 -376
- package/dist/components/crud/GenericCRUD.svelte +426 -435
- package/dist/components/crud/GenericCRUD.svelte.d.ts +6 -9
- package/dist/components/crud/SearchInput.svelte +53 -53
- package/dist/components/crud/columns/Avatar.svelte +15 -15
- package/dist/components/crud/columns/Icon.svelte +8 -8
- package/dist/components/crud/utils/reorder.d.ts +4 -0
- package/dist/components/crud/utils/reorder.js +13 -0
- package/dist/components/crud/views/Create.svelte +232 -232
- package/dist/components/crud/views/Read.svelte +124 -124
- package/dist/components/crud/views/Update.svelte +208 -208
- package/dist/components/crud/views/list/List.svelte +291 -0
- package/dist/components/crud/views/{List.svelte.d.ts → list/List.svelte.d.ts} +4 -14
- package/dist/components/crud/views/list/Modals.svelte +56 -0
- package/dist/components/crud/views/list/Modals.svelte.d.ts +36 -0
- package/dist/components/crud/views/list/Table.svelte +176 -0
- package/dist/components/crud/views/list/Table.svelte.d.ts +59 -0
- package/dist/components/crud/views/list/Toolbar.svelte +341 -0
- package/dist/components/crud/views/list/Toolbar.svelte.d.ts +46 -0
- package/dist/components/form/Button.svelte +27 -27
- package/dist/components/form/Label.svelte +37 -37
- package/dist/components/form/MultiSelect.svelte +248 -248
- package/dist/components/form/PasswordInput.svelte +68 -68
- package/dist/components/form/Required.svelte +1 -1
- package/dist/components/form/Select.svelte +209 -209
- package/dist/components/form/Tree.svelte +62 -62
- package/dist/components/form/TreeNode.svelte +66 -66
- package/dist/components/navigation/Breadcrumbs.svelte +111 -111
- package/dist/components/table/ColumnFilter.svelte +168 -168
- package/dist/components/table/PaginatedTable.svelte +536 -215
- package/dist/components/table/PaginatedTable.svelte.d.ts +11 -2
- package/dist/components/table/Paginator.svelte +113 -113
- package/dist/components/table/SortHeader.svelte +43 -43
- package/dist/components/table/TableBody.svelte +150 -70
- package/dist/components/table/TableBody.svelte.d.ts +14 -1
- package/dist/components/table/TableHeader.svelte +88 -83
- package/dist/components/table/TableHeader.svelte.d.ts +1 -0
- package/dist/components/table/sortable.d.ts +27 -0
- package/dist/components/table/sortable.js +55 -0
- package/dist/components/table/utils.d.ts +28 -1
- package/dist/components/table/utils.js +75 -0
- package/dist/i18n/en.js +2 -0
- package/dist/i18n/es.js +2 -0
- package/dist/i18n/types.d.ts +2 -0
- package/dist/icons/defaults/Clear.svelte +6 -6
- package/dist/icons/defaults/Create.svelte +6 -6
- package/dist/icons/defaults/Delete.svelte +6 -6
- package/dist/icons/defaults/Download.svelte +7 -7
- package/dist/icons/defaults/Edit.svelte +7 -7
- package/dist/icons/defaults/Filter.svelte +6 -6
- package/dist/icons/defaults/FilterActive.svelte +6 -6
- package/dist/icons/defaults/Folder.svelte +6 -6
- package/dist/icons/defaults/Grip.svelte +7 -0
- package/dist/icons/defaults/Grip.svelte.d.ts +7 -0
- package/dist/icons/defaults/Home.svelte +6 -6
- package/dist/icons/defaults/PasswordHide.svelte +9 -9
- package/dist/icons/defaults/PasswordShow.svelte +7 -7
- package/dist/icons/defaults/SortAsc.svelte +6 -6
- package/dist/icons/defaults/SortDesc.svelte +6 -6
- package/dist/icons/defaults/SortNone.svelte +6 -6
- package/dist/icons/defaults/View.svelte +7 -7
- package/dist/icons/sets/bootstrap.js +2 -1
- package/dist/icons/sets/default.js +2 -0
- package/dist/icons/types.d.ts +3 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -2
- package/dist/types/attribute.d.ts +9 -0
- package/dist/types/crud.d.ts +72 -1
- package/dist/types/table.d.ts +56 -0
- package/package.json +3 -1
- package/dist/components/crud/views/List.svelte +0 -584
|
@@ -1,83 +1,88 @@
|
|
|
1
|
-
<script lang="ts" generics="T extends object">
|
|
2
|
-
import SortHeader from './SortHeader.svelte';
|
|
3
|
-
import ColumnFilter from './ColumnFilter.svelte';
|
|
4
|
-
import { isSortable, isFilterable } from './utils.js';
|
|
5
|
-
import type { DistinctEntry } from '../../types/table.js';
|
|
6
|
-
import type { ColumnDefinition } from '../../types/crud.js';
|
|
7
|
-
import type { SortState, FilterState } from './state.svelte.js';
|
|
8
|
-
import { getStrings } from '../../i18n/context.js';
|
|
9
|
-
|
|
10
|
-
const strings = getStrings();
|
|
11
|
-
|
|
12
|
-
let {
|
|
13
|
-
columns,
|
|
14
|
-
selectable,
|
|
15
|
-
allChecked,
|
|
16
|
-
someChecked,
|
|
17
|
-
onToggleAll,
|
|
18
|
-
sort,
|
|
19
|
-
filter,
|
|
20
|
-
distinctValues,
|
|
21
|
-
hasRowActions = false,
|
|
22
|
-
actionsLabel = strings.actions,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
<script lang="ts" generics="T extends object">
|
|
2
|
+
import SortHeader from './SortHeader.svelte';
|
|
3
|
+
import ColumnFilter from './ColumnFilter.svelte';
|
|
4
|
+
import { isSortable, isFilterable } from './utils.js';
|
|
5
|
+
import type { DistinctEntry } from '../../types/table.js';
|
|
6
|
+
import type { ColumnDefinition } from '../../types/crud.js';
|
|
7
|
+
import type { SortState, FilterState } from './state.svelte.js';
|
|
8
|
+
import { getStrings } from '../../i18n/context.js';
|
|
9
|
+
|
|
10
|
+
const strings = getStrings();
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
columns,
|
|
14
|
+
selectable,
|
|
15
|
+
allChecked,
|
|
16
|
+
someChecked,
|
|
17
|
+
onToggleAll,
|
|
18
|
+
sort,
|
|
19
|
+
filter,
|
|
20
|
+
distinctValues,
|
|
21
|
+
hasRowActions = false,
|
|
22
|
+
actionsLabel = strings.actions,
|
|
23
|
+
reorderActive = false,
|
|
24
|
+
onchange,
|
|
25
|
+
}: {
|
|
26
|
+
columns: ColumnDefinition<T>[];
|
|
27
|
+
selectable: boolean;
|
|
28
|
+
allChecked: boolean;
|
|
29
|
+
someChecked: boolean;
|
|
30
|
+
onToggleAll: () => void;
|
|
31
|
+
sort: SortState;
|
|
32
|
+
filter: FilterState;
|
|
33
|
+
distinctValues: Record<string, DistinctEntry<T>[]>;
|
|
34
|
+
hasRowActions?: boolean;
|
|
35
|
+
actionsLabel?: string;
|
|
36
|
+
reorderActive?: boolean;
|
|
37
|
+
onchange?: () => void;
|
|
38
|
+
} = $props();
|
|
39
|
+
|
|
40
|
+
function sortBy(col: ColumnDefinition<T>) {
|
|
41
|
+
if (reorderActive || !isSortable(col)) return;
|
|
42
|
+
sort.cycle(col.attribute);
|
|
43
|
+
onchange?.();
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<thead class="bg-base-200">
|
|
48
|
+
<tr>
|
|
49
|
+
{#if reorderActive}
|
|
50
|
+
<th class="w-10"></th>
|
|
51
|
+
{/if}
|
|
52
|
+
{#if selectable}
|
|
53
|
+
<th>
|
|
54
|
+
<input
|
|
55
|
+
type="checkbox"
|
|
56
|
+
class="checkbox checkbox-sm"
|
|
57
|
+
checked={allChecked}
|
|
58
|
+
indeterminate={someChecked && !allChecked}
|
|
59
|
+
onchange={onToggleAll}
|
|
60
|
+
/>
|
|
61
|
+
</th>
|
|
62
|
+
{/if}
|
|
63
|
+
{#each columns as col (col.attribute)}
|
|
64
|
+
{@const title = (col.title ?? col.attribute).replace(/_/g, ' ')}
|
|
65
|
+
<th>
|
|
66
|
+
<div class="flex items-center gap-1">
|
|
67
|
+
<SortHeader
|
|
68
|
+
{title}
|
|
69
|
+
sortable={isSortable(col) && !reorderActive}
|
|
70
|
+
direction={reorderActive ? null : sort.directionFor(col.attribute)}
|
|
71
|
+
onsort={() => sortBy(col)}
|
|
72
|
+
/>
|
|
73
|
+
{#if isFilterable(col) && !reorderActive}
|
|
74
|
+
<ColumnFilter
|
|
75
|
+
column={col}
|
|
76
|
+
entries={distinctValues[col.attribute] ?? []}
|
|
77
|
+
{filter}
|
|
78
|
+
{onchange}
|
|
79
|
+
/>
|
|
80
|
+
{/if}
|
|
81
|
+
</div>
|
|
82
|
+
</th>
|
|
83
|
+
{/each}
|
|
84
|
+
{#if hasRowActions}
|
|
85
|
+
<th class="text-right">{actionsLabel}</th>
|
|
86
|
+
{/if}
|
|
87
|
+
</tr>
|
|
88
|
+
</thead>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Action } from 'svelte/action';
|
|
2
|
+
import type { SortableModule } from '../../types/table.js';
|
|
3
|
+
/** The indices SortableJS reports a drag settled at — `oldIndex`/`newIndex`
|
|
4
|
+
* for a single-row drag, `oldIndicies`/`newIndicies` (one entry per row)
|
|
5
|
+
* instead when `multiDrag` moved a whole selection together. */
|
|
6
|
+
export interface SortEndIndices {
|
|
7
|
+
oldIndex?: number;
|
|
8
|
+
newIndex?: number;
|
|
9
|
+
oldIndicies: number[];
|
|
10
|
+
newIndicies: number[];
|
|
11
|
+
}
|
|
12
|
+
export interface SortableRowsParams {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
/** The resolved `sortablejs` module — required whenever `enabled` is true.
|
|
15
|
+
* Runeforge never imports `sortablejs` itself; the caller supplies it. */
|
|
16
|
+
sortable?: SortableModule;
|
|
17
|
+
multiDrag?: boolean;
|
|
18
|
+
onStart?: () => void;
|
|
19
|
+
onEnd?: (indices: SortEndIndices) => void;
|
|
20
|
+
}
|
|
21
|
+
/** Mounts SortableJS on a `<tbody>` to drive drag-to-reorder, restricting
|
|
22
|
+
* drag initiation to elements carrying `data-reorder-handle`. The settled
|
|
23
|
+
* order is computed from SortableJS's own before/after indices (see
|
|
24
|
+
* TableBody) rather than read back from the DOM — `multiDrag` in particular
|
|
25
|
+
* doesn't reliably leave the DOM in the dropped state, only its event data
|
|
26
|
+
* reflects it correctly. */
|
|
27
|
+
export declare const sortableRows: Action<HTMLElement, SortableRowsParams>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// A real Tailwind utility (not a hand-rolled class) so it's picked up by the
|
|
2
|
+
// consuming project's own Tailwind build — see the README's "Tailwind source
|
|
3
|
+
// scanning" note about `@source`-ing this package's `dist` output.
|
|
4
|
+
const MULTI_DRAG_SELECTED_CLASS = 'bg-primary/10';
|
|
5
|
+
/** Mounts SortableJS on a `<tbody>` to drive drag-to-reorder, restricting
|
|
6
|
+
* drag initiation to elements carrying `data-reorder-handle`. The settled
|
|
7
|
+
* order is computed from SortableJS's own before/after indices (see
|
|
8
|
+
* TableBody) rather than read back from the DOM — `multiDrag` in particular
|
|
9
|
+
* doesn't reliably leave the DOM in the dropped state, only its event data
|
|
10
|
+
* reflects it correctly. */
|
|
11
|
+
export const sortableRows = (node, params) => {
|
|
12
|
+
let instance;
|
|
13
|
+
function setup(p) {
|
|
14
|
+
instance?.destroy();
|
|
15
|
+
instance = undefined;
|
|
16
|
+
if (!p.enabled || !p.sortable)
|
|
17
|
+
return;
|
|
18
|
+
instance = p.sortable.create(node, {
|
|
19
|
+
handle: '[data-reorder-handle]',
|
|
20
|
+
animation: 150,
|
|
21
|
+
// Mouse/touch-simulated dragging instead of native HTML5 DnD: avoids
|
|
22
|
+
// native drag-ghost/Firefox quirks and (usefully) makes drags
|
|
23
|
+
// reproducible with plain mouse events in end-to-end tests. Not used
|
|
24
|
+
// together with `multiDrag`, though — SortableJS's MultiDrag plugin
|
|
25
|
+
// relies on native HTML5 DnD to track a multi-item drag correctly;
|
|
26
|
+
// paired with `forceFallback` it reports the drop as a no-op.
|
|
27
|
+
forceFallback: !p.multiDrag,
|
|
28
|
+
// Keeps the floating drag clone out of the `<tbody>` — otherwise it's
|
|
29
|
+
// an extra element carrying the same `data-row-key` as the row it was
|
|
30
|
+
// cloned from, which could confuse the multi-drag selection sync query.
|
|
31
|
+
fallbackOnBody: true,
|
|
32
|
+
multiDrag: p.multiDrag || undefined,
|
|
33
|
+
selectedClass: p.multiDrag ? MULTI_DRAG_SELECTED_CLASS : undefined,
|
|
34
|
+
onStart: () => p.onStart?.(),
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
|
+
onEnd: (evt) => {
|
|
37
|
+
p.onEnd?.({
|
|
38
|
+
oldIndex: evt.oldIndex,
|
|
39
|
+
newIndex: evt.newIndex,
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
|
+
oldIndicies: (evt.oldIndicies ?? []).map((e) => e.index),
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
|
+
newIndicies: (evt.newIndicies ?? []).map((e) => e.index),
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
setup(params);
|
|
49
|
+
return {
|
|
50
|
+
update: setup,
|
|
51
|
+
destroy() {
|
|
52
|
+
instance?.destroy();
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -1,7 +1,34 @@
|
|
|
1
1
|
import type { ColumnDefinition } from '../../types/crud.js';
|
|
2
|
-
import type { DistinctEntry } from '../../types/table.js';
|
|
2
|
+
import type { DistinctEntry, IndexedRow } from '../../types/table.js';
|
|
3
3
|
export declare function cellRenderedText<T extends object>(row: T, col: ColumnDefinition<T>): string;
|
|
4
4
|
export declare function isSortable<T extends object>(col: ColumnDefinition<T>): boolean;
|
|
5
5
|
export declare function isFilterable<T extends object>(col: ColumnDefinition<T>): boolean;
|
|
6
6
|
export declare function compare(a: unknown, b: unknown): number;
|
|
7
7
|
export declare function distinctEntries<T extends object>(data: T[], columns: ColumnDefinition<T>[]): Record<string, DistinctEntry<T>[]>;
|
|
8
|
+
/** Resolves the checkbox-list entries for every filterable column: a
|
|
9
|
+
* column's own `filterOptions` wins when present (a static, exhaustive
|
|
10
|
+
* list — see its doc comment); a `boolean` column always gets its two known
|
|
11
|
+
* states; everything else falls back to values actually seen in `data`,
|
|
12
|
+
* truncated to `sampleSize` when given. Sampling off `data` is only ever a
|
|
13
|
+
* hint under server-side pagination, where `data` is just the current
|
|
14
|
+
* page — pass `sampleSize` there; omit it in client mode, where `data` is
|
|
15
|
+
* the complete, already-filtered row set. */
|
|
16
|
+
export declare function resolveDistinctValues<T extends object>(data: T[], columns: ColumnDefinition<T>[], sampleSize?: number): Record<string, DistinctEntry<T>[]>;
|
|
17
|
+
/** Returns a copy of `rows` with the item at `from` moved to `to` — pure
|
|
18
|
+
* array surgery, handy for building custom reorder UIs on `PaginatedTable`.
|
|
19
|
+
* Out-of-range indices are a no-op. */
|
|
20
|
+
export declare function moveIndexedRow<T extends object>(rows: IndexedRow<T>[], from: number, to: number): IndexedRow<T>[];
|
|
21
|
+
/** Generalizes `moveIndexedRow` to moving a *set* of items (SortableJS's
|
|
22
|
+
* `multiDrag`) to `toIndex` in one go, preserving their relative order.
|
|
23
|
+
* `toIndex` is a position in the *result* array, same convention as
|
|
24
|
+
* `moveIndexedRow`'s `to` (and SortableJS's own `newIndex`) — not an index
|
|
25
|
+
* into the pre-move array. Duplicate/out-of-range `fromIndices` are ignored;
|
|
26
|
+
* an empty valid set is a no-op. */
|
|
27
|
+
export declare function moveIndexedRows<T extends object>(rows: IndexedRow<T>[], fromIndices: number[], toIndex: number): IndexedRow<T>[];
|
|
28
|
+
/** Resolves the comparator establishing reorder mode's row order: `compare`
|
|
29
|
+
* when given (composite orders — a related record's order first, then this
|
|
30
|
+
* row's own `attribute`), otherwise plain ascending by `attribute`. */
|
|
31
|
+
export declare function resolveReorderComparator<T extends object>(reorder: {
|
|
32
|
+
attribute: keyof T & string;
|
|
33
|
+
compare?: (a: T, b: T) => number;
|
|
34
|
+
}): (a: T, b: T) => number;
|
|
@@ -42,3 +42,78 @@ export function distinctEntries(data, columns) {
|
|
|
42
42
|
}
|
|
43
43
|
return result;
|
|
44
44
|
}
|
|
45
|
+
/** Resolves the checkbox-list entries for every filterable column: a
|
|
46
|
+
* column's own `filterOptions` wins when present (a static, exhaustive
|
|
47
|
+
* list — see its doc comment); a `boolean` column always gets its two known
|
|
48
|
+
* states; everything else falls back to values actually seen in `data`,
|
|
49
|
+
* truncated to `sampleSize` when given. Sampling off `data` is only ever a
|
|
50
|
+
* hint under server-side pagination, where `data` is just the current
|
|
51
|
+
* page — pass `sampleSize` there; omit it in client mode, where `data` is
|
|
52
|
+
* the complete, already-filtered row set. */
|
|
53
|
+
export function resolveDistinctValues(data, columns, sampleSize) {
|
|
54
|
+
const result = {};
|
|
55
|
+
for (const col of columns) {
|
|
56
|
+
if (!isFilterable(col))
|
|
57
|
+
continue;
|
|
58
|
+
if (col.filterOptions) {
|
|
59
|
+
result[col.attribute] = col.filterOptions.map((o) => ({
|
|
60
|
+
key: o.value,
|
|
61
|
+
label: o.label,
|
|
62
|
+
row: {},
|
|
63
|
+
}));
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (col.type === 'boolean') {
|
|
67
|
+
result[col.attribute] = [
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
|
+
{ key: 'true', label: col.formatter?.(true, {}), row: {} },
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
71
|
+
{ key: 'false', label: col.formatter?.(false, {}), row: {} },
|
|
72
|
+
];
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const entries = distinctEntries(data, [col])[col.attribute] ?? [];
|
|
76
|
+
result[col.attribute] = sampleSize != null ? entries.slice(0, sampleSize) : entries;
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
/** Returns a copy of `rows` with the item at `from` moved to `to` — pure
|
|
81
|
+
* array surgery, handy for building custom reorder UIs on `PaginatedTable`.
|
|
82
|
+
* Out-of-range indices are a no-op. */
|
|
83
|
+
export function moveIndexedRow(rows, from, to) {
|
|
84
|
+
if (from === to || from < 0 || to < 0 || from >= rows.length || to >= rows.length)
|
|
85
|
+
return rows;
|
|
86
|
+
const next = [...rows];
|
|
87
|
+
const [moved] = next.splice(from, 1);
|
|
88
|
+
next.splice(to, 0, moved);
|
|
89
|
+
return next;
|
|
90
|
+
}
|
|
91
|
+
/** Generalizes `moveIndexedRow` to moving a *set* of items (SortableJS's
|
|
92
|
+
* `multiDrag`) to `toIndex` in one go, preserving their relative order.
|
|
93
|
+
* `toIndex` is a position in the *result* array, same convention as
|
|
94
|
+
* `moveIndexedRow`'s `to` (and SortableJS's own `newIndex`) — not an index
|
|
95
|
+
* into the pre-move array. Duplicate/out-of-range `fromIndices` are ignored;
|
|
96
|
+
* an empty valid set is a no-op. */
|
|
97
|
+
export function moveIndexedRows(rows, fromIndices, toIndex) {
|
|
98
|
+
const validFrom = [...new Set(fromIndices)]
|
|
99
|
+
.filter((i) => i >= 0 && i < rows.length)
|
|
100
|
+
.sort((a, b) => a - b);
|
|
101
|
+
if (validFrom.length === 0)
|
|
102
|
+
return rows;
|
|
103
|
+
const fromSet = new Set(validFrom);
|
|
104
|
+
const moved = validFrom.map((i) => rows[i]);
|
|
105
|
+
const remaining = rows.filter((_, i) => !fromSet.has(i));
|
|
106
|
+
const insertAt = Math.min(remaining.length, Math.max(0, toIndex));
|
|
107
|
+
const next = [...remaining];
|
|
108
|
+
next.splice(insertAt, 0, ...moved);
|
|
109
|
+
return next;
|
|
110
|
+
}
|
|
111
|
+
/** Resolves the comparator establishing reorder mode's row order: `compare`
|
|
112
|
+
* when given (composite orders — a related record's order first, then this
|
|
113
|
+
* row's own `attribute`), otherwise plain ascending by `attribute`. */
|
|
114
|
+
export function resolveReorderComparator(reorder) {
|
|
115
|
+
if (reorder.compare)
|
|
116
|
+
return reorder.compare;
|
|
117
|
+
const { attribute } = reorder;
|
|
118
|
+
return (a, b) => compare(a[attribute], b[attribute]);
|
|
119
|
+
}
|
package/dist/i18n/en.js
CHANGED
package/dist/i18n/es.js
CHANGED
|
@@ -20,6 +20,8 @@ export const es = {
|
|
|
20
20
|
delete: 'Eliminar',
|
|
21
21
|
create: 'Crear',
|
|
22
22
|
searchPlaceholder: 'Buscar...',
|
|
23
|
+
reorder: 'Arrastrar para reordenar',
|
|
24
|
+
reorderPage: (page) => `Pág ${page}`,
|
|
23
25
|
export: 'Exportar',
|
|
24
26
|
exportCsv: 'Exportar a CSV',
|
|
25
27
|
exportExcel: 'Exportar a Excel',
|
package/dist/i18n/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M2.146 2.146a.5.5 0 0 1 .708 0L8 7.293l5.146-5.147a.5.5 0 1 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854a.5.5 0 0 1 0-.708z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M2.146 2.146a.5.5 0 0 1 .708 0L8 7.293l5.146-5.147a.5.5 0 1 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854a.5.5 0 0 1 0-.708z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5M11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 0 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47M8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5M11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 0 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47M8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
-
<path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
+
<path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/>
|
|
7
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12z"/>
|
|
6
|
-
<path d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12z"/>
|
|
6
|
+
<path d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
|
|
7
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.826a2 2 0 0 1-1.991-1.819l-.637-7a2 2 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3m-8.322.12q.322-.119.684-.12h5.396l-.707-.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.826a2 2 0 0 1-1.991-1.819l-.637-7a2 2 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3m-8.322.12q.322-.119.684-.12h5.396l-.707-.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981z"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
6
|
+
<path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/>
|
|
7
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755l.708.709z"/>
|
|
6
|
-
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
|
7
|
-
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238z"/>
|
|
8
|
-
<path fill-rule="evenodd" d="M13.646 14.354l-12-12 .708-.708 12 12-.708.708z"/>
|
|
9
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755l.708.709z"/>
|
|
6
|
+
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
|
7
|
+
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238z"/>
|
|
8
|
+
<path fill-rule="evenodd" d="M13.646 14.354l-12-12 .708-.708 12 12-.708.708z"/>
|
|
9
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
|
6
|
-
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
|
6
|
+
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
|
|
7
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z"/>
|
|
6
|
+
</svg>
|