@ims360/svelte-ivory 0.0.24 → 0.0.26
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/basic/toggle/Toggle.svelte +3 -3
- package/dist/components/buttons/CopyToClipboardButton.svelte +0 -3
- package/dist/components/buttons/CopyToClipboardButton.svelte.d.ts.map +1 -1
- package/dist/components/layout/tooltip/Tooltip.svelte +1 -1
- package/dist/components/table/plugins/search.svelte.d.ts +1 -1
- package/dist/components/table/plugins/search.svelte.d.ts.map +1 -1
- package/dist/components/table/plugins/search.svelte.js +0 -1
- package/package.json +1 -1
- package/src/lib/components/basic/toggle/Toggle.svelte +3 -3
- package/src/lib/components/buttons/CopyToClipboardButton.svelte +0 -3
- package/src/lib/components/layout/tooltip/Tooltip.svelte +1 -1
- package/src/lib/components/table/plugins/search.svelte.ts +1 -3
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<svelte:element
|
|
20
|
-
this={onclick ? 'button' : 'div'}
|
|
20
|
+
this={rest.onclick ? 'button' : 'div'}
|
|
21
21
|
class={twMerge(
|
|
22
22
|
clsx(
|
|
23
23
|
'group relative flex h-5 w-9 flex-row items-center rounded-full p-0.5 transition-colors duration-100',
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
clazz
|
|
26
26
|
)
|
|
27
27
|
)}
|
|
28
|
-
type={onclick ? 'button' : undefined}
|
|
29
|
-
role={onclick ? 'button' : undefined}
|
|
28
|
+
type={rest.onclick ? 'button' : undefined}
|
|
29
|
+
role={rest.onclick ? 'button' : undefined}
|
|
30
30
|
{...rest}
|
|
31
31
|
>
|
|
32
32
|
<div
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
import type { ClassValue } from 'svelte/elements';
|
|
5
5
|
import { Toasts } from '../toast';
|
|
6
6
|
|
|
7
|
-
let lastCopied = $state<string>();
|
|
8
|
-
|
|
9
7
|
export interface CopyToClipboardButtonProps extends IvoryComponent<HTMLButtonElement> {
|
|
10
8
|
text: string;
|
|
11
9
|
class?: ClassValue;
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
|
|
19
17
|
async function copyText() {
|
|
20
18
|
await navigator.clipboard.writeText(text);
|
|
21
|
-
lastCopied = text;
|
|
22
19
|
if (toastMessage) {
|
|
23
20
|
Toasts.trigger({
|
|
24
21
|
variant: 'success',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboardButton.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/buttons/CopyToClipboardButton.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"CopyToClipboardButton.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/buttons/CopyToClipboardButton.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,WAAW,0BAA2B,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAyBL,QAAA,MAAM,qBAAqB,gEAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<!-- Ignoring this error is fine since it's a false positive -->
|
|
71
71
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
72
72
|
<svelte:element
|
|
73
|
-
this={href ? 'a' : onclick ? 'button' : 'div'}
|
|
73
|
+
this={href ? 'a' : rest.onclick ? 'button' : 'div'}
|
|
74
74
|
type={onclick ? 'button' : undefined}
|
|
75
75
|
{...rest}
|
|
76
76
|
{href}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/table/plugins/search.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"search.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/table/plugins/search.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEjD,UAAU,YAAY,CAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC;CAChC;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CA+BzF;AAED,wFAAwF;AACxF,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,EACxC,OAAO,CAAC,EAAE,EACV,cAAc,MAAM,EACpB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO;;;CA2B7C,CAAC"}
|
|
@@ -36,7 +36,6 @@ export const search = (nodes, searchString, stringsMatch) => {
|
|
|
36
36
|
const matches = stringsMatch(node, search);
|
|
37
37
|
const intermediateNode = node.children?.some((c) => recursor(c, matches || childOfMatch)) ?? false;
|
|
38
38
|
if (intermediateNode) {
|
|
39
|
-
console.log('intermediateNode', node);
|
|
40
39
|
expanded.add(node.id);
|
|
41
40
|
}
|
|
42
41
|
else if (!childOfMatch) {
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<svelte:element
|
|
20
|
-
this={onclick ? 'button' : 'div'}
|
|
20
|
+
this={rest.onclick ? 'button' : 'div'}
|
|
21
21
|
class={twMerge(
|
|
22
22
|
clsx(
|
|
23
23
|
'group relative flex h-5 w-9 flex-row items-center rounded-full p-0.5 transition-colors duration-100',
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
clazz
|
|
26
26
|
)
|
|
27
27
|
)}
|
|
28
|
-
type={onclick ? 'button' : undefined}
|
|
29
|
-
role={onclick ? 'button' : undefined}
|
|
28
|
+
type={rest.onclick ? 'button' : undefined}
|
|
29
|
+
role={rest.onclick ? 'button' : undefined}
|
|
30
30
|
{...rest}
|
|
31
31
|
>
|
|
32
32
|
<div
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
import type { ClassValue } from 'svelte/elements';
|
|
5
5
|
import { Toasts } from '../toast';
|
|
6
6
|
|
|
7
|
-
let lastCopied = $state<string>();
|
|
8
|
-
|
|
9
7
|
export interface CopyToClipboardButtonProps extends IvoryComponent<HTMLButtonElement> {
|
|
10
8
|
text: string;
|
|
11
9
|
class?: ClassValue;
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
|
|
19
17
|
async function copyText() {
|
|
20
18
|
await navigator.clipboard.writeText(text);
|
|
21
|
-
lastCopied = text;
|
|
22
19
|
if (toastMessage) {
|
|
23
20
|
Toasts.trigger({
|
|
24
21
|
variant: 'success',
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<!-- Ignoring this error is fine since it's a false positive -->
|
|
71
71
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
72
72
|
<svelte:element
|
|
73
|
-
this={href ? 'a' : onclick ? 'button' : 'div'}
|
|
73
|
+
this={href ? 'a' : rest.onclick ? 'button' : 'div'}
|
|
74
74
|
type={onclick ? 'button' : undefined}
|
|
75
75
|
{...rest}
|
|
76
76
|
{href}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteSet } from 'svelte/reactivity';
|
|
2
|
-
import type { TablePlugin, TableRow } from '../
|
|
2
|
+
import type { TablePlugin, TableRow } from '../';
|
|
3
3
|
|
|
4
4
|
interface SearchConfig<T extends TableRow<T>> {
|
|
5
5
|
search: string;
|
|
@@ -56,8 +56,6 @@ export const search = <T extends TableRow<T>>(
|
|
|
56
56
|
node.children?.some((c) => recursor(c, matches || childOfMatch)) ?? false;
|
|
57
57
|
|
|
58
58
|
if (intermediateNode) {
|
|
59
|
-
console.log('intermediateNode', node);
|
|
60
|
-
|
|
61
59
|
expanded.add(node.id);
|
|
62
60
|
} else if (!childOfMatch) {
|
|
63
61
|
hidden.add(node.id);
|