fuma 0.3.49 → 0.3.51

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.
@@ -10,26 +10,18 @@ export { klass as class };
10
10
  export let classHeader = "";
11
11
  export let classBody = "";
12
12
  export let classTitle = "";
13
- export let classSubtitle = "";
14
13
  $:
15
14
  isOpen = $urlParam.hasValue("section", value);
16
- let section;
17
15
  let timeout;
18
16
  async function handleClick() {
19
17
  await goto($urlParam.toggle({ section: value }), { noScroll: true, keepFocus: true });
20
- if (!section)
21
- return;
22
- const bound = section.getBoundingClientRect();
23
- window.scrollTo({ top: bound.top, behavior: "smooth" });
24
- timeout = setTimeout(() => {
25
- }, 225);
26
18
  }
27
19
  onDestroy(() => {
28
20
  clearTimeout(timeout);
29
21
  });
30
22
  </script>
31
23
 
32
- <section class="card bordered border bg-base-100 shadow-md {klass}" bind:this={section}>
24
+ <section class="card bordered border bg-base-100 shadow-md {klass}">
33
25
  <div
34
26
  id={value}
35
27
  tabindex="0"
@@ -38,21 +30,19 @@ onDestroy(() => {
38
30
  on:click={handleClick}
39
31
  on:keydown={(e) => e.key === ' ' && handleClick()}
40
32
  >
41
- <div class="flex gap-2">
42
- <div class="min-w-0 overflow-hidden text-ellipsis font-medium {classTitle}">
43
- <slot name="title" />
33
+ <slot name="header">
34
+ <div class="flex gap-2">
35
+ <div class="min-w-0 overflow-hidden text-ellipsis font-medium {classTitle}">
36
+ <slot name="title" />
37
+ </div>
38
+ <Icon
39
+ path={mdiChevronRight}
40
+ class="ml-auto opacity-80 transition-transform {isOpen ? 'rotate-90' : ''}"
41
+ />
44
42
  </div>
45
- <Icon
46
- path={mdiChevronRight}
47
- class="ml-auto opacity-80 transition-transform {isOpen ? 'rotate-90' : ''}"
48
- />
49
- </div>
50
43
 
51
- {#if $$slots.subtitle}
52
- <div class="text-sm {classSubtitle}">
53
- <slot name="subtitle" />
54
- </div>
55
- {/if}
44
+ <slot name="subtitle" />
45
+ </slot>
56
46
  </div>
57
47
 
58
48
  {#if isOpen}
@@ -6,12 +6,12 @@ declare const __propDef: {
6
6
  classHeader?: string | undefined;
7
7
  classBody?: string | undefined;
8
8
  classTitle?: string | undefined;
9
- classSubtitle?: string | undefined;
10
9
  };
11
10
  events: {
12
11
  [evt: string]: CustomEvent<any>;
13
12
  };
14
13
  slots: {
14
+ header: {};
15
15
  title: {};
16
16
  subtitle: {};
17
17
  default: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "0.3.49",
3
+ "version": "0.3.51",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",