@ims360/svelte-ivory 0.4.21 → 0.5.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 (72) hide show
  1. package/dist/components/basic/checkbox/Checkbox.svelte +3 -8
  2. package/dist/components/basic/checkbox/Checkbox.svelte.d.ts.map +1 -1
  3. package/dist/components/buttons/CopyToClipboardButton.svelte +1 -1
  4. package/dist/components/buttons/CopyToClipboardButton.svelte.d.ts.map +1 -1
  5. package/dist/components/inputs/FileInput.svelte +5 -2
  6. package/dist/components/inputs/FileInput.svelte.d.ts.map +1 -1
  7. package/dist/components/inputs/PasswordCreateInput.svelte +1 -1
  8. package/dist/components/layout/dialog/Dialog.svelte +19 -20
  9. package/dist/components/layout/dialog/Dialog.svelte.d.ts +1 -4
  10. package/dist/components/layout/dialog/Dialog.svelte.d.ts.map +1 -1
  11. package/dist/components/layout/drawer/Drawer.svelte +21 -41
  12. package/dist/components/layout/drawer/Drawer.svelte.d.ts +4 -5
  13. package/dist/components/layout/drawer/Drawer.svelte.d.ts.map +1 -1
  14. package/dist/components/layout/index.d.ts +1 -2
  15. package/dist/components/layout/index.d.ts.map +1 -1
  16. package/dist/components/layout/index.js +0 -1
  17. package/dist/components/layout/modal/Modal.svelte +19 -84
  18. package/dist/components/layout/modal/Modal.svelte.d.ts +5 -14
  19. package/dist/components/layout/modal/Modal.svelte.d.ts.map +1 -1
  20. package/dist/components/layout/popover/Popover.svelte +1 -2
  21. package/dist/components/layout/popover/Popover.svelte.d.ts.map +1 -1
  22. package/dist/components/layout/tabs/Tab.svelte +0 -2
  23. package/dist/components/layout/tabs/Tab.svelte.d.ts.map +1 -1
  24. package/dist/components/table/Column.svelte +0 -2
  25. package/dist/components/table/Column.svelte.d.ts.map +1 -1
  26. package/dist/components/table/ColumnHead.svelte +1 -2
  27. package/dist/components/table/ColumnHead.svelte.d.ts.map +1 -1
  28. package/dist/components/table/Table.svelte +9 -13
  29. package/dist/components/table/Table.svelte.d.ts +3 -3
  30. package/dist/components/table/Table.svelte.d.ts.map +1 -1
  31. package/dist/components/table/VirtualList.svelte +9 -5
  32. package/dist/components/table/VirtualList.svelte.d.ts +2 -2
  33. package/dist/components/table/VirtualList.svelte.d.ts.map +1 -1
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -0
  37. package/dist/theme.svelte.d.ts +0 -36
  38. package/dist/theme.svelte.d.ts.map +1 -1
  39. package/dist/{components/toast/toasts.svelte.d.ts → toasts.svelte.d.ts} +2 -1
  40. package/dist/toasts.svelte.d.ts.map +1 -0
  41. package/dist/{components/toast/toasts.svelte.js → toasts.svelte.js} +2 -2
  42. package/package.json +9 -13
  43. package/src/lib/components/basic/checkbox/Checkbox.svelte +3 -8
  44. package/src/lib/components/buttons/CopyToClipboardButton.svelte +1 -1
  45. package/src/lib/components/inputs/FileInput.svelte +5 -2
  46. package/src/lib/components/inputs/PasswordCreateInput.svelte +1 -1
  47. package/src/lib/components/layout/dialog/Dialog.svelte +19 -20
  48. package/src/lib/components/layout/drawer/Drawer.svelte +21 -41
  49. package/src/lib/components/layout/index.ts +1 -2
  50. package/src/lib/components/layout/modal/Modal.svelte +19 -84
  51. package/src/lib/components/layout/popover/Popover.svelte +1 -2
  52. package/src/lib/components/layout/tabs/Tab.svelte +0 -2
  53. package/src/lib/components/table/Column.svelte +0 -2
  54. package/src/lib/components/table/ColumnHead.svelte +1 -2
  55. package/src/lib/components/table/Table.svelte +9 -13
  56. package/src/lib/components/table/VirtualList.svelte +9 -5
  57. package/src/lib/index.ts +1 -0
  58. package/src/lib/theme.svelte.ts +0 -36
  59. package/src/lib/{components/toast/toasts.svelte.ts → toasts.svelte.ts} +3 -2
  60. package/dist/components/layout/Heading.svelte +0 -25
  61. package/dist/components/layout/Heading.svelte.d.ts +0 -9
  62. package/dist/components/layout/Heading.svelte.d.ts.map +0 -1
  63. package/dist/components/toast/Toast.svelte +0 -105
  64. package/dist/components/toast/Toast.svelte.d.ts +0 -18
  65. package/dist/components/toast/Toast.svelte.d.ts.map +0 -1
  66. package/dist/components/toast/index.d.ts +0 -3
  67. package/dist/components/toast/index.d.ts.map +0 -1
  68. package/dist/components/toast/index.js +0 -2
  69. package/dist/components/toast/toasts.svelte.d.ts.map +0 -1
  70. package/src/lib/components/layout/Heading.svelte +0 -25
  71. package/src/lib/components/toast/Toast.svelte +0 -105
  72. package/src/lib/components/toast/index.ts +0 -2
@@ -1,9 +1,7 @@
1
1
  <script lang="ts" module>
2
- import { theme } from '../../../theme.svelte';
3
2
  import type { IvoryComponent } from '../../../types';
4
3
  import { merge } from '../../../utils/functions';
5
4
  import { Check, type Icon as LucideIcon, Minus } from '@lucide/svelte';
6
- import clsx from 'clsx';
7
5
  import type { ClassValue } from 'svelte/elements';
8
6
  import { scale } from 'svelte/transition';
9
7
 
@@ -41,19 +39,16 @@
41
39
  innerClass,
42
40
  style
43
41
  }: { icon?: typeof LucideIcon; innerClass?: string; style?: string } = $derived.by(() => {
44
- const overwrittenClass =
45
- theme.current.checkbox?.class &&
46
- clsx(theme.current.checkbox?.class?.(!!checked, !!partial));
47
- if (!checked && !partial) return { innerClass: overwrittenClass ?? 'border-surface-500' };
42
+ if (!checked && !partial) return { innerClass: 'border-surface-500' };
48
43
  if (checked)
49
44
  return {
50
45
  icon: Check,
51
- innerClass: overwrittenClass ?? 'bg-primary-500 border-primary-500 text-surface-50'
46
+ innerClass: 'bg-primary-500 border-primary-500 text-surface-50'
52
47
  };
53
48
  if (partial)
54
49
  return {
55
50
  icon: Minus,
56
- innerClass: overwrittenClass ?? 'border-primary-700 text-primary-500'
51
+ innerClass: 'border-primary-700 text-primary-500'
57
52
  };
58
53
  return {};
59
54
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/basic/checkbox/Checkbox.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACtD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAuDN,sBAAsB;AACtB,QAAA,MAAM,QAAQ,mDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Checkbox.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/basic/checkbox/Checkbox.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACtD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAoDN,sBAAsB;AACtB,QAAA,MAAM,QAAQ,mDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -1,8 +1,8 @@
1
1
  <script lang="ts" module>
2
+ import { Toasts } from '../..';
2
3
  import type { IvoryComponent } from '../../types';
3
4
  import { Copy } from '@lucide/svelte';
4
5
  import type { ClassValue } from 'svelte/elements';
5
- import { Toasts } from '../toast';
6
6
 
7
7
  export interface CopyToClipboardButtonProps extends IvoryComponent<HTMLButtonElement> {
8
8
  text: string;
@@ -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;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
+ {"version":3,"file":"CopyToClipboardButton.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/buttons/CopyToClipboardButton.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,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"}
@@ -27,7 +27,10 @@
27
27
  function add(files: File[]) {
28
28
  const value = rest.form.value();
29
29
  if (Array.isArray(value)) {
30
- rest.form.set([...value.filter((f) => !files.includes(f)), ...Array.from(files || [])]);
30
+ rest.form.set([
31
+ ...value.filter((f) => f && !files.includes(f)),
32
+ ...Array.from(files || [])
33
+ ]);
31
34
  } else {
32
35
  rest.form.set((files[0] ?? undefined) as File);
33
36
  }
@@ -81,7 +84,7 @@
81
84
  <div class="flex h-full w-full flex-col items-center justify-center gap-2 p-4">
82
85
  {#if files && files.length > 0}
83
86
  <div class="flex flex-row items-center gap-4">
84
- {#each files as file (file)}
87
+ {#each files.filter((f) => !!f) as file (file)}
85
88
  {@render fileRender(file)}
86
89
  {/each}
87
90
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputs/FileInput.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,MAAM,WAAW,cAAe,SAAQ,UAAU,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAwGL,QAAA,MAAM,SAAS,oDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"FileInput.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputs/FileInput.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,MAAM,WAAW,cAAe,SAAQ,UAAU,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AA2GL,QAAA,MAAM,SAAS,oDAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
@@ -20,7 +20,7 @@
20
20
  let popover = $state<Popover>();
21
21
  let target = $state<HTMLElement>();
22
22
 
23
- const value = $derived(props.form.value());
23
+ const value = $derived(props.form.value() ?? '');
24
24
  </script>
25
25
 
26
26
  <div bind:this={target} class={['bg-inherit ', clazz]}>
@@ -2,21 +2,13 @@
2
2
  import { theme } from '../../../theme.svelte';
3
3
  import type { IvoryComponent } from '../../../types';
4
4
  import { merge } from '../../../utils/functions';
5
- import type { MouseEventHandler } from 'svelte/elements';
5
+ import type { EventHandler, MouseEventHandler } from 'svelte/elements';
6
6
 
7
- export interface DialogProps extends IvoryComponent<HTMLElement> {
8
- /** Gets called when the dialog requests to close (Escape, backdrop click) */
9
- onclose?: () => void;
10
- }
7
+ export type DialogProps = IvoryComponent<HTMLDialogElement>;
11
8
  </script>
12
9
 
13
10
  <script lang="ts">
14
- let {
15
- class: clazz,
16
- onclose: onclose, // This is the prop from the parent
17
- children,
18
- ...rest
19
- }: DialogProps = $props();
11
+ let { children, ...props }: DialogProps = $props();
20
12
 
21
13
  let dialog = $state<HTMLDialogElement>();
22
14
 
@@ -34,28 +26,35 @@
34
26
  currentlyOpen = false;
35
27
  };
36
28
 
37
- const handleBackdropClick: MouseEventHandler<HTMLElement> = (event) => {
29
+ const onclick: MouseEventHandler<HTMLDialogElement> = (event) => {
38
30
  if (event.target !== dialog) return;
39
- onclose?.();
31
+ if (props.onclick) props.onclick(event);
32
+ else close();
33
+ };
34
+
35
+ const onclose: EventHandler<Event, HTMLDialogElement> = (event) => {
36
+ props.onclose?.(event);
37
+ currentlyOpen = false;
40
38
  };
41
39
 
42
- const handleClose = () => {
43
- onclose?.();
40
+ const oncancel: EventHandler<Event, HTMLDialogElement> = (event) => {
41
+ if (props.oncancel) props.oncancel(event);
42
+ else props.onclose?.(event);
44
43
  currentlyOpen = false;
45
44
  };
46
45
  </script>
47
46
 
48
47
  <dialog
49
48
  bind:this={dialog}
50
- onclick={handleBackdropClick}
51
- oncancel={handleClose}
52
- onclose={handleClose}
49
+ {...props}
50
+ {oncancel}
51
+ {onclose}
52
+ {onclick}
53
53
  class={merge(
54
54
  'backdrop:bg-surface-800-200/30 h-full max-h-none w-screen max-w-full overflow-hidden bg-transparent',
55
55
  theme.current.dialog?.class,
56
- clazz
56
+ props.class
57
57
  )}
58
- {...rest}
59
58
  >
60
59
  {@render children?.()}
61
60
  </dialog>
@@ -1,8 +1,5 @@
1
1
  import type { IvoryComponent } from '../../../types';
2
- export interface DialogProps extends IvoryComponent<HTMLElement> {
3
- /** Gets called when the dialog requests to close (Escape, backdrop click) */
4
- onclose?: () => void;
5
- }
2
+ export type DialogProps = IvoryComponent<HTMLDialogElement>;
6
3
  declare const Dialog: import("svelte").Component<DialogProps, {
7
4
  open: () => void;
8
5
  isOpen: () => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/dialog/Dialog.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,WAAW,CAAC;IAC5D,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAmDL,QAAA,MAAM,MAAM;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Dialog.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/dialog/Dialog.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;AAqDhE,QAAA,MAAM,MAAM;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -1,20 +1,16 @@
1
1
  <script lang="ts" module>
2
+ import type { IvoryComponent } from '../../../types';
2
3
  import { merge } from '../../../utils/functions';
3
- import { X } from '@lucide/svelte';
4
4
  import type { Snippet } from 'svelte';
5
- import Heading from '../Heading.svelte';
6
- import { Dialog } from '../dialog';
5
+ import type { MouseEventHandler } from 'svelte/elements';
6
+ import { Dialog, type DialogProps } from '../dialog';
7
7
 
8
8
  export type DrawerPlacement = 'left' | 'right';
9
-
10
- export type DrawerProps = {
9
+ export type DrawerProps = IvoryComponent<HTMLDivElement> & {
11
10
  class?: string;
12
- title?: string | Snippet;
13
11
  children?: Snippet;
14
12
  placement?: DrawerPlacement;
15
- closeOnOutsideClick?: boolean;
16
- /** Overwrites entire content of the drawer */
17
- inner?: Snippet;
13
+ dialog?: DialogProps;
18
14
  };
19
15
  </script>
20
16
 
@@ -22,33 +18,35 @@
22
18
  let {
23
19
  class: clazz,
24
20
  children,
25
- title,
26
21
  placement = 'right',
27
- closeOnOutsideClick = true,
28
- inner,
29
- ...rest
22
+ dialog: dialogProps,
23
+ ...props
30
24
  }: DrawerProps = $props();
31
25
 
32
26
  let dialog = $state<Dialog>();
33
27
 
34
28
  export const close = () => dialog?.close();
35
-
36
29
  export const open = () => dialog?.open();
37
-
38
30
  export const isOpen = () => dialog?.isOpen();
39
-
40
31
  export const toggle = () => {
41
32
  if (isOpen()) close();
42
33
  else open();
43
34
  };
35
+
36
+ const onclick: MouseEventHandler<HTMLDivElement> = (e) => {
37
+ e.stopPropagation();
38
+ props.onclick?.(e);
39
+ };
44
40
  </script>
45
41
 
46
42
  <Dialog
47
43
  bind:this={dialog}
48
- onclose={() => {
49
- if (closeOnOutsideClick) close();
50
- }}
51
- class={['flex flex-row justify-start overflow-visible', placement === 'right' && 'justify-end']}
44
+ {...dialogProps}
45
+ class={merge(
46
+ 'flex flex-row justify-start overflow-visible',
47
+ placement === 'right' && 'justify-end',
48
+ dialogProps?.class
49
+ )}
52
50
  >
53
51
  <div
54
52
  data-placement={placement}
@@ -56,28 +54,10 @@
56
54
  'drawer bg-surface-50-950 flex h-full flex-col gap-4 p-4 transition-transform ease-in-out',
57
55
  clazz
58
56
  )}
59
- onclick={(e) => e.stopPropagation()}
60
- {...rest}
57
+ {...props}
58
+ {onclick}
61
59
  >
62
- {#if inner}
63
- {@render inner()}
64
- {:else}
65
- <div class="flex flex-row items-center justify-between gap-8">
66
- {#if title}
67
- <Heading class="flex grow flex-row items-center gap-4">
68
- {#if typeof title === 'function'}
69
- {@render title()}
70
- {:else}
71
- {title}
72
- {/if}
73
- </Heading>
74
- {/if}
75
- <button class="group ml-auto flex justify-end" type="button" onclick={close}>
76
- <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
77
- </button>
78
- </div>
79
- {@render children?.()}
80
- {/if}
60
+ {@render children?.()}
81
61
  </div>
82
62
  </Dialog>
83
63
 
@@ -1,13 +1,12 @@
1
+ import type { IvoryComponent } from '../../../types';
1
2
  import type { Snippet } from 'svelte';
3
+ import { type DialogProps } from '../dialog';
2
4
  export type DrawerPlacement = 'left' | 'right';
3
- export type DrawerProps = {
5
+ export type DrawerProps = IvoryComponent<HTMLDivElement> & {
4
6
  class?: string;
5
- title?: string | Snippet;
6
7
  children?: Snippet;
7
8
  placement?: DrawerPlacement;
8
- closeOnOutsideClick?: boolean;
9
- /** Overwrites entire content of the drawer */
10
- inner?: Snippet;
9
+ dialog?: DialogProps;
11
10
  };
12
11
  declare const Drawer: import("svelte").Component<DrawerProps, {
13
12
  close: () => void | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAItC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA8DN,QAAA,MAAM,MAAM;;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAC/C,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;CACxB,CAAC;AA8CN,QAAA,MAAM,MAAM;;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export { Dialog, type DialogProps } from './dialog';
2
- export { default as Drawer } from './drawer/Drawer.svelte';
3
- export { default as Heading } from './Heading.svelte';
2
+ export { default as Drawer, type DrawerPlacement, type DrawerProps } from './drawer/Drawer.svelte';
4
3
  export { default as Modal, type ModalProps } from './modal/Modal.svelte';
5
4
  export { default as Popover, type PopoverPlacement, type PopoverProps } from './popover/Popover.svelte';
6
5
  export { getTabContext, Tab, TabPanel, Tabs, type TabPanelProps, type TabProps, type TabsProps } from './tabs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACH,OAAO,IAAI,OAAO,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,aAAa,EACb,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,SAAS,EACjB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACH,OAAO,IAAI,OAAO,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,aAAa,EACb,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,SAAS,EACjB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export { Dialog } from './dialog';
2
2
  export { default as Drawer } from './drawer/Drawer.svelte';
3
- export { default as Heading } from './Heading.svelte';
4
3
  export { default as Modal } from './modal/Modal.svelte';
5
4
  export { default as Popover } from './popover/Popover.svelte';
6
5
  export { getTabContext, Tab, TabPanel, Tabs } from './tabs';
@@ -1,30 +1,17 @@
1
1
  <script lang="ts" module>
2
- import type { Variant } from '../../..';
3
- import { theme } from '../../../theme.svelte';
2
+ import type { IvoryComponent } from '../../../types';
4
3
  import { merge } from '../../../utils/functions';
5
- import { X } from '@lucide/svelte';
6
4
  import { type Snippet } from 'svelte';
7
5
  import type { ClassValue, MouseEventHandler } from 'svelte/elements';
8
- import { Heading } from '..';
9
- import { Dialog } from '../dialog';
6
+ import { Dialog, type DialogProps } from '../dialog';
10
7
 
11
8
  /** Props for the modal, expose if you overwrite the defaults in a custom component */
12
- export type ModalProps = {
9
+ export type ModalProps = IvoryComponent<HTMLDivElement> & {
13
10
  /** Class of the modal itself, does not apply to the inner div */
14
11
  class?: ClassValue;
15
- /** Class of the div wrapping the children */
16
- innerClass?: ClassValue;
12
+ dialog?: DialogProps;
17
13
  /** Content of the modal */
18
14
  children?: Snippet;
19
- /**
20
- * If `true` the modal will not close when clicking outside of it
21
- *
22
- * Defaults to `true`
23
- * */
24
- closeOnOutsideClick?: boolean;
25
- /** Variant of the modal, applies styling to the header */
26
- variant?: Variant;
27
- title?: string | Snippet;
28
15
  onclick?: MouseEventHandler<HTMLDivElement>;
29
16
  };
30
17
  </script>
@@ -35,16 +22,7 @@
35
22
  inner?: Snippet;
36
23
  }
37
24
 
38
- let {
39
- class: clazz = 'flex flex-col',
40
- title,
41
- children,
42
- inner,
43
- closeOnOutsideClick = true,
44
- variant,
45
- innerClass,
46
- ...rest
47
- }: Props = $props();
25
+ let { children, dialog: dialogProps = {}, ...props }: Props = $props();
48
26
 
49
27
  let dialog = $state<Dialog>();
50
28
 
@@ -59,72 +37,29 @@
59
37
 
60
38
  const onclick: MouseEventHandler<HTMLDivElement> = (e) => {
61
39
  e.stopPropagation();
62
- rest.onclick?.(e);
40
+ props.onclick?.(e);
63
41
  };
64
42
  </script>
65
43
 
66
44
  <!--
67
45
  @component
68
- A modal, comes with a title, close button and different variants per default.
46
+ A modal inside a dialog element
69
47
  -->
70
48
  <Dialog
71
49
  bind:this={dialog}
72
- onclose={() => {
73
- if (closeOnOutsideClick) close();
74
- }}
75
- class="flex h-full w-full flex-col items-center justify-center p-2 sm:p-4 md:p-8 lg:p-12 xl:p-16"
50
+ {...dialogProps}
51
+ class={merge(
52
+ 'flex h-full w-full flex-col items-center justify-center p-2 sm:p-4 md:p-8 lg:p-12 xl:p-16',
53
+ dialogProps?.class
54
+ )}
76
55
  >
77
- {#if inner}
78
- <div {...rest} {onclick} class={merge('modal-content transition-all ease-in-out', clazz)}>
79
- {@render inner()}
80
- </div>
81
- {:else}
82
- <div
83
- class={merge(
84
- 'modal-content bg-surface-50-950 flex max-h-full max-w-full flex-col overflow-hidden rounded transition-all ease-in-out',
85
- theme.current.modal?.class,
86
- clazz
87
- )}
88
- {...rest}
89
- {onclick}
90
- >
91
- <div
92
- class={[
93
- 'flex flex-row items-center justify-between gap-4 px-4 py-3',
94
- !variant && 'pb-0',
95
- variant === 'primary' && 'preset-tonal-primary',
96
- variant === 'secondary' && 'preset-tonal-secondary',
97
- variant === 'tertiary' && 'preset-tonal-tertiary',
98
- variant === 'success' && 'preset-tonal-success',
99
- variant === 'warning' && 'preset-tonal-warning',
100
- variant === 'error' && 'preset-tonal-error',
101
- variant === 'surface' && 'preset-tonal-surface'
102
- ]}
103
- >
104
- {#if title}
105
- <Heading class="flex grow flex-row items-center gap-4">
106
- {#if typeof title === 'function'}
107
- {@render title()}
108
- {:else}
109
- {title}
110
- {/if}
111
- </Heading>
112
- {/if}
113
- <button class="group ml-auto flex justify-end" type="button" onclick={close}>
114
- <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
115
- </button>
116
- </div>
117
- <div
118
- class={merge(
119
- 'flex grow flex-col gap-4 overflow-hidden bg-inherit p-4 pt-3',
120
- theme.current.modal?.innerClass,
121
- innerClass
122
- )}
123
- >
124
- {@render children?.()}
125
- </div>
126
- </div>
127
- {/if}
56
+ <div
57
+ {...props}
58
+ {onclick}
59
+ class={merge('modal-content transition-all ease-in-out', props.class)}
60
+ >
61
+ {@render children?.()}
62
+ </div>
128
63
  </Dialog>
129
64
 
130
65
  <style>
@@ -1,30 +1,21 @@
1
- import type { Variant } from '../../..';
1
+ import type { IvoryComponent } from '../../../types';
2
2
  import { type Snippet } from 'svelte';
3
3
  import type { ClassValue, MouseEventHandler } from 'svelte/elements';
4
+ import { type DialogProps } from '../dialog';
4
5
  /** Props for the modal, expose if you overwrite the defaults in a custom component */
5
- export type ModalProps = {
6
+ export type ModalProps = IvoryComponent<HTMLDivElement> & {
6
7
  /** Class of the modal itself, does not apply to the inner div */
7
8
  class?: ClassValue;
8
- /** Class of the div wrapping the children */
9
- innerClass?: ClassValue;
9
+ dialog?: DialogProps;
10
10
  /** Content of the modal */
11
11
  children?: Snippet;
12
- /**
13
- * If `true` the modal will not close when clicking outside of it
14
- *
15
- * Defaults to `true`
16
- * */
17
- closeOnOutsideClick?: boolean;
18
- /** Variant of the modal, applies styling to the header */
19
- variant?: Variant;
20
- title?: string | Snippet;
21
12
  onclick?: MouseEventHandler<HTMLDivElement>;
22
13
  };
23
14
  interface Props extends ModalProps {
24
15
  /** If you don't want the title and close button to be included you can overwrite the default modal */
25
16
  inner?: Snippet;
26
17
  }
27
- /** A modal, comes with a title, close button and different variants per default. */
18
+ /** A modal inside a dialog element */
28
19
  declare const Modal: import("svelte").Component<Props, {
29
20
  close: () => void | undefined;
30
21
  open: () => void | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/modal/Modal.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIrE,sFAAsF;AACtF,MAAM,MAAM,UAAU,GAAG;IACrB,iEAAiE;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;SAIK;IACL,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC;AAEF,UAAU,KAAM,SAAQ,UAAU;IAC9B,sGAAsG;IACtG,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAuFL,oFAAoF;AACpF,QAAA,MAAM,KAAK;;;;;MAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Modal.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/modal/Modal.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAErD,sFAAsF;AACtF,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACtD,iEAAiE;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC;AAEF,UAAU,KAAM,SAAQ,UAAU;IAC9B,sGAAsG;IACtG,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAuCL,sCAAsC;AACtC,QAAA,MAAM,KAAK;;;;;MAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
@@ -1,5 +1,4 @@
1
1
  <script lang="ts" module>
2
- import { theme } from '../../../theme.svelte';
3
2
  import type { IvoryComponent } from '../../../types';
4
3
  import { merge, pseudoRandomId } from '../../../utils/functions';
5
4
 
@@ -173,7 +172,7 @@
173
172
  bind:this={popoverEl}
174
173
  style="{style} {externalStyle}"
175
174
  {popover}
176
- class={merge('bg-transparent not-open:hidden!', theme.current.popover?.class, clazz)}
175
+ class={merge('bg-transparent not-open:hidden!', clazz)}
177
176
  {...rest}
178
177
  >
179
178
  {@render children?.()}
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/popover/Popover.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GACtB,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;AAEjB,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,6DAA6D;IAC7D,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAiJL,QAAA,MAAM,OAAO;;;;;MAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Popover.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/popover/Popover.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GACtB,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;AAEjB,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,6DAA6D;IAC7D,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAiJL,QAAA,MAAM,OAAO;;;;;MAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
@@ -1,6 +1,5 @@
1
1
  <script lang="ts" module>
2
2
  import { page } from '$app/state';
3
- import { theme } from '../../../theme.svelte';
4
3
  import type { IvoryComponent } from '../../../types';
5
4
  import { merge, pseudoRandomId } from '../../../utils/functions';
6
5
  import { onMount, type Snippet } from 'svelte';
@@ -52,7 +51,6 @@
52
51
  this={href ? 'a' : 'button'}
53
52
  class={merge(
54
53
  'btn flex h-fit w-fit shrink-0 items-center justify-center px-0 text-xl font-bold select-none',
55
- theme.current.tabs?.tab?.class?.(selected),
56
54
  typeof clazz === 'function' ? clazz(selected) : clazz
57
55
  )}
58
56
  onclick={href
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tabs/Tab.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IAC3E,KAAK,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC3C,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AA8CL,QAAA,MAAM,GAAG,8CAAwC,CAAC;AAClD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAClC,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Tab.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tabs/Tab.svelte.ts"],"names":[],"mappings":"AAII,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IAC3E,KAAK,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC3C,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AA6CL,QAAA,MAAM,GAAG,8CAAwC,CAAC;AAClD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAClC,eAAe,GAAG,CAAC"}
@@ -1,5 +1,4 @@
1
1
  <script lang="ts" module>
2
- import { theme } from '../../theme.svelte';
3
2
  import { merge } from '../../utils/functions';
4
3
  import { type Snippet } from 'svelte';
5
4
  import type { ClassValue } from 'svelte/elements';
@@ -76,7 +75,6 @@
76
75
  class={merge(
77
76
  'box-border flex h-full shrink-0 flex-row items-center justify-start gap-1 truncate',
78
77
  column.width !== 0 && 'border-r-[calc(var(--spacing)*2)] border-transparent',
79
- theme.current.table?.column?.class,
80
78
  clazz
81
79
  )}
82
80
  />
@@ -1 +1 @@
1
- {"version":3,"file":"Column.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/Column.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI9D,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AA6DL,QAAA,MAAM,MAAM,iDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Column.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/Column.svelte.ts"],"names":[],"mappings":"AAII,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI9D,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AA4DL,QAAA,MAAM,MAAM,iDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -1,5 +1,4 @@
1
1
  <script lang="ts" module>
2
- import { theme } from '../../theme.svelte';
3
2
  import { merge } from '../../utils/functions';
4
3
  import { getContext, setContext, type Snippet } from 'svelte';
5
4
  import { resize } from '../../utils/attachments';
@@ -48,7 +47,7 @@
48
47
  </script>
49
48
 
50
49
  <div
51
- class={merge('group flex shrink-0 flex-row justify-start', theme.current.table?.head?.class)}
50
+ class={merge('group flex shrink-0 flex-row justify-start')}
52
51
  bind:this={target}
53
52
  style="width: {column?.width ?? 0}px;"
54
53
  >
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnHead.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/ColumnHead.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,EAA0B,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAOlE,wBAAgB,oBAAoB,IAAI,gBAAgB,CAEvD;AAED,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA6CN,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ColumnHead.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/table/ColumnHead.svelte.ts"],"names":[],"mappings":"AAII,OAAO,EAA0B,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAOlE,wBAAgB,oBAAoB,IAAI,gBAAgB,CAEvD;AAED,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA6CN,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}