@makolabs/ripple 0.0.1-dev.50 → 0.0.1-dev.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.
|
@@ -44,29 +44,14 @@
|
|
|
44
44
|
</script>
|
|
45
45
|
|
|
46
46
|
<div class={baseClasses}>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<div class="flex items-start justify-start gap-3">
|
|
56
|
-
{#if Icon}
|
|
57
|
-
<Icon class="text-default-500 size-5" />
|
|
58
|
-
{/if}
|
|
59
|
-
<div class="flex flex-col items-start text-left">
|
|
60
|
-
{#if title}
|
|
61
|
-
<h3 class={titleClass()}>{title}</h3>
|
|
62
|
-
{/if}
|
|
63
|
-
{#if description}
|
|
64
|
-
<p class="text-default-500 text-xs whitespace-nowrap">{description}</p>
|
|
65
|
-
{/if}
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
{@render summary?.()}
|
|
69
|
-
{#if children}
|
|
47
|
+
{#if children}
|
|
48
|
+
<button
|
|
49
|
+
class={twMerge(header(), 'flex gap-3')}
|
|
50
|
+
aria-expanded={open}
|
|
51
|
+
aria-controls={id}
|
|
52
|
+
onclick={handleClick}
|
|
53
|
+
>
|
|
54
|
+
{@render accordionHeaderContent()}
|
|
70
55
|
<div class="flex items-center">
|
|
71
56
|
<svg
|
|
72
57
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -82,11 +67,32 @@
|
|
|
82
67
|
/>
|
|
83
68
|
</svg>
|
|
84
69
|
</div>
|
|
70
|
+
</button>
|
|
71
|
+
{#if open}
|
|
72
|
+
<div class={body()} {id}>
|
|
73
|
+
{@render children()}
|
|
74
|
+
</div>
|
|
85
75
|
{/if}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
{@render children()}
|
|
76
|
+
{:else}
|
|
77
|
+
<div class={twMerge(header(), 'flex gap-3')}>
|
|
78
|
+
{@render accordionHeaderContent()}
|
|
90
79
|
</div>
|
|
91
80
|
{/if}
|
|
92
81
|
</div>
|
|
82
|
+
|
|
83
|
+
{#snippet accordionHeaderContent()}
|
|
84
|
+
<div class="flex items-start justify-start gap-3">
|
|
85
|
+
{#if Icon}
|
|
86
|
+
<Icon class="text-default-500 size-5" />
|
|
87
|
+
{/if}
|
|
88
|
+
<div class="flex flex-col items-start text-left">
|
|
89
|
+
{#if title}
|
|
90
|
+
<h3 class={titleClass()}>{title}</h3>
|
|
91
|
+
{/if}
|
|
92
|
+
{#if description}
|
|
93
|
+
<p class="text-default-500 text-xs whitespace-nowrap">{description}</p>
|
|
94
|
+
{/if}
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
{@render summary?.()}
|
|
98
|
+
{/snippet}
|
|
@@ -65,11 +65,11 @@ export const accordion = tv({
|
|
|
65
65
|
},
|
|
66
66
|
hasChildren: {
|
|
67
67
|
true: {
|
|
68
|
-
base: 'hover:shadow-
|
|
68
|
+
base: 'hover:shadow-none cursor-default',
|
|
69
69
|
header: 'hover:bg-default-50'
|
|
70
70
|
},
|
|
71
71
|
false: {
|
|
72
|
-
base: 'hover:shadow-
|
|
72
|
+
base: 'hover:shadow-none',
|
|
73
73
|
header: ''
|
|
74
74
|
}
|
|
75
75
|
},
|