y200subcontrols 0.0.371 → 0.0.373
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.
|
@@ -35,7 +35,10 @@ function dialogClicked(event) {
|
|
|
35
35
|
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
36
36
|
<dialog
|
|
37
37
|
bind:this={dialog}
|
|
38
|
-
class="p-2 w-full
|
|
38
|
+
class="p-2 w-full
|
|
39
|
+
{dialogSize === 'sm' ? 'md:w-1/2' : ''}
|
|
40
|
+
{dialogSize === 'md' ? 'md:w-3/4 lg:w-2/3 xl:w-1/2' : ''}
|
|
41
|
+
{dialogSize === 'lg' ? 'md:w-3/4' : ''}
|
|
39
42
|
bg-transparent
|
|
40
43
|
|
|
41
44
|
backdrop:bg-black/20 dark:backdrop:bg-white/20
|
|
@@ -79,8 +82,8 @@ function dialogClicked(event) {
|
|
|
79
82
|
</div>
|
|
80
83
|
<slot />
|
|
81
84
|
|
|
82
|
-
<div slot="buttons" class="grid {allowSubmit ? 'grid-cols-2' : 'grid-cols-1'} gap-2 my-2"
|
|
83
|
-
<slot name="buttons"
|
|
85
|
+
<div slot="buttons" class="grid {allowSubmit ? 'grid-cols-2' : 'grid-cols-1'} gap-2 my-2">
|
|
86
|
+
<slot name="buttons">
|
|
84
87
|
{#if allowSubmit}
|
|
85
88
|
<Button type="submit" isLoading={busy}>
|
|
86
89
|
<span>Ok</span>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script>export let theme = "teal";
|
|
2
2
|
export let size = "md";
|
|
3
|
+
export let isLight = false;
|
|
3
4
|
</script>
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
{#if !isLight}
|
|
7
|
+
<span
|
|
8
|
+
class="inline-block text-center
|
|
7
9
|
{size === 'sm' ? 'text-sm rounded-3xl px-3 py-1.5' : ''}
|
|
8
10
|
{size === 'md' ? 'text-base rounded-3xl px-4 py-2' : ''}
|
|
9
11
|
{size === 'lg' ? 'text-lg rounded-3xl px-6 py-3' : ''}
|
|
@@ -15,6 +17,26 @@ export let size = "md";
|
|
|
15
17
|
{theme === 'dark' ? 'bg-slate-950 text-slate-50' : ''}
|
|
16
18
|
{theme === 'purple' ? 'bg-purple-950 text-purple-50' : ''}
|
|
17
19
|
"
|
|
18
|
-
>
|
|
19
|
-
|
|
20
|
-
</span>
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</span>
|
|
23
|
+
{:else}
|
|
24
|
+
<span
|
|
25
|
+
class="inline-block text-center
|
|
26
|
+
{size === 'sm' ? 'text-sm rounded-3xl px-3 py-1.5' : ''}
|
|
27
|
+
{size === 'md' ? 'text-base rounded-3xl px-4 py-2' : ''}
|
|
28
|
+
{size === 'lg' ? 'text-lg rounded-3xl px-6 py-3' : ''}
|
|
29
|
+
|
|
30
|
+
{theme === 'teal' ? 'bg-teal-100 text-teal-500 border border-teal-500' : ''}
|
|
31
|
+
{theme === 'slate' ? 'bg-slate-100 text-slate-500 border border-slate-500' : ''}
|
|
32
|
+
{theme === 'blue' ? 'bg-blue-100 text-blue-500 border border-blue-500' : ''}
|
|
33
|
+
{theme === 'indigo' ? 'bg-indigo-100 text-indigo-500 border border-indigo-500' : ''}
|
|
34
|
+
{theme === 'red' ? 'bg-red-100 text-red-500 border border-red-500' : ''}
|
|
35
|
+
{theme === 'purple' ? 'bg-purple-100 text-purple-500 border border-purple-500' : ''}
|
|
36
|
+
{theme === 'dark' ? 'bg-slate-100 text-slate-950 border border-slate-950' : ''}
|
|
37
|
+
|
|
38
|
+
"
|
|
39
|
+
>
|
|
40
|
+
<slot />
|
|
41
|
+
</span>
|
|
42
|
+
{/if}
|