@ims360/svelte-ivory 0.0.24 → 0.0.25

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.
@@ -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;AAKlD,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;AA0BL,QAAA,MAAM,qBAAqB,gEAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,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"}
@@ -1,4 +1,4 @@
1
- import type { TablePlugin, TableRow } from '../table.svelte';
1
+ import type { TablePlugin, TableRow } from '../';
2
2
  interface SearchConfig<T extends TableRow<T>> {
3
3
  search: string;
4
4
  matches: (row: T) => boolean;
@@ -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,iBAAiB,CAAC;AAE7D,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;;;CA6B7C,CAAC"}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ims360/svelte-ivory",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "keywords": [
5
5
  "svelte"
6
6
  ],
@@ -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,5 +1,5 @@
1
1
  import { SvelteSet } from 'svelte/reactivity';
2
- import type { TablePlugin, TableRow } from '../table.svelte';
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);