@ims360/svelte-ivory 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/table/Table.svelte +3 -2
- package/dist/components/table/Table.svelte.d.ts +1 -1
- package/dist/components/table/Table.svelte.d.ts.map +1 -1
- package/dist/components/toast/toasts.svelte.d.ts.map +1 -1
- package/dist/components/toast/toasts.svelte.js +2 -1
- package/package.json +1 -1
- package/src/lib/components/table/Table.svelte +3 -2
- package/src/lib/components/toast/toasts.svelte.ts +2 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
+
import { pseudoRandomId } from '../../utils/functions';
|
|
2
3
|
import { ChevronRight } from '@lucide/svelte';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
import { getContext, setContext, type Snippet } from 'svelte';
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
href?: (row: T) => string | undefined;
|
|
17
18
|
rowHeight?: number;
|
|
18
19
|
/** Renders the rows */
|
|
19
|
-
children
|
|
20
|
+
children?: Snippet<[{ row: T; nestingLevel?: number; index: number }]>;
|
|
20
21
|
/** Add columns in front of the tree-indicator */
|
|
21
22
|
firstColumn?: Snippet<[{ row: T }]>;
|
|
22
23
|
rowClass?: ClassValue;
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
});
|
|
65
66
|
|
|
66
67
|
setTableContext(table);
|
|
67
|
-
const treeIndicatorId =
|
|
68
|
+
const treeIndicatorId = pseudoRandomId('tree-indicator-');
|
|
68
69
|
</script>
|
|
69
70
|
|
|
70
71
|
<VirtualList
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/Table.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/Table.svelte.ts"],"names":[],"mappings":"A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AI,YAAY,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpE,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toasts.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/toast/toasts.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toasts.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/toast/toasts.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CACrD;AAED,UAAU,KAAM,SAAQ,aAAa;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;CAC7C;AASD,cAAM,UAAU;IACZ,MAAM,UAAuB;IAE7B,OAAO,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,SAA0B;IAW1D,KAAK,CAAC,EAAE,EAAE,MAAM;IAOhB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa;IAiBvC,MAAM,CAAC,EAAE,EAAE,MAAM;IAMjB,QAAQ,CAAC,EAAE,EAAE,MAAM;IAMnB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,YAAY;CAKvB;AAED,2EAA2E;AAC3E,eAAO,MAAM,MAAM,YAAmB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pseudoRandomId } from '../../utils/functions';
|
|
1
2
|
const TOAST_DEFAULTS = {
|
|
2
3
|
message: 'Missing Toast Message',
|
|
3
4
|
autohide: true,
|
|
@@ -6,7 +7,7 @@ const TOAST_DEFAULTS = {
|
|
|
6
7
|
};
|
|
7
8
|
class ToastStore {
|
|
8
9
|
toasts = $state([]);
|
|
9
|
-
trigger(toast, id =
|
|
10
|
+
trigger(toast, id = pseudoRandomId('toast')) {
|
|
10
11
|
const mergedToasts = { ...TOAST_DEFAULTS, ...toast, id };
|
|
11
12
|
// start the autohide timeout
|
|
12
13
|
this.startAutoHide(mergedToasts);
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
+
import { pseudoRandomId } from '$lib/utils/functions';
|
|
2
3
|
import { ChevronRight } from '@lucide/svelte';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
import { getContext, setContext, type Snippet } from 'svelte';
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
href?: (row: T) => string | undefined;
|
|
17
18
|
rowHeight?: number;
|
|
18
19
|
/** Renders the rows */
|
|
19
|
-
children
|
|
20
|
+
children?: Snippet<[{ row: T; nestingLevel?: number; index: number }]>;
|
|
20
21
|
/** Add columns in front of the tree-indicator */
|
|
21
22
|
firstColumn?: Snippet<[{ row: T }]>;
|
|
22
23
|
rowClass?: ClassValue;
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
});
|
|
65
66
|
|
|
66
67
|
setTableContext(table);
|
|
67
|
-
const treeIndicatorId =
|
|
68
|
+
const treeIndicatorId = pseudoRandomId('tree-indicator-');
|
|
68
69
|
</script>
|
|
69
70
|
|
|
70
71
|
<VirtualList
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pseudoRandomId } from '$lib/utils/functions';
|
|
1
2
|
import type { Icon } from '@lucide/svelte';
|
|
2
3
|
|
|
3
4
|
export interface ToastSettings {
|
|
@@ -24,7 +25,7 @@ const TOAST_DEFAULTS: ToastSettings = {
|
|
|
24
25
|
class ToastStore {
|
|
25
26
|
toasts = $state<Toast[]>([]);
|
|
26
27
|
|
|
27
|
-
trigger(toast: ToastSettings, id =
|
|
28
|
+
trigger(toast: ToastSettings, id = pseudoRandomId('toast')) {
|
|
28
29
|
const mergedToasts: Toast = { ...TOAST_DEFAULTS, ...toast, id };
|
|
29
30
|
|
|
30
31
|
// start the autohide timeout
|